CPPUNIT_TEST_FIXTURE(Test, testRedlineFormatCharStyleDirectExport)
{ // Given a document that contains a format redline: both the character style and direct // formatting changes:
loadFromFile(u"format-charstyle-direct.docx");
// When exporting the document to ODT:
save(u"writer8"_ustr);
// Then make sure the named style is not lost in the redline:
xmlDocUniquePtr pXmlDoc = parseExport(u"content.xml"_ustr);
OString aAutoName
= getXPath(pXmlDoc, "//text:tracked-changes/text:changed-region/text:format-change", "style-name")
.toUtf8(); // Without the accompanying fix in place, this test would have failed with: // - XPath '//office:automatic-styles/style:style[@style:name='T2']' no attribute 'parent-style-name' exist // i.e. the named character style in the format redline was lost.
OUString aParentName = getXPath(
pXmlDoc, "//office:automatic-styles/style:style[@style:name='" + aAutoName + "']", "parent-style-name");
CPPUNIT_ASSERT_EQUAL(u"Strong_20_Emphasis"_ustr, aParentName);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.