summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx71
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlencryption.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport10.cxx89
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx78
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport12.cxx18
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx53
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx34
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx84
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport6.cxx42
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx77
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx76
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx59
-rw-r--r--sw/qa/extras/ww8export/ww8export2.cxx40
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx28
14 files changed, 0 insertions, 753 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index cabf37dd3e52..6614e1642efc 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -102,7 +102,6 @@ public:
DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT(!xModifiable->isModified());
// see preTest(), set the OLE cache to 1 for this test
@@ -209,7 +208,6 @@ static void testTdf43569_CheckIfFieldParse()
// instead of insertion of the pair of two field-marks: <field:fieldmark-start> + <field:fieldmark-end>.
DECLARE_ODFEXPORT_TEST(testTdf43569, "tdf43569_conditionalfield.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check if our parser is valid
testTdf43569_CheckIfFieldParse();
@@ -224,7 +222,6 @@ DECLARE_ODFEXPORT_TEST(testTdf43569, "tdf43569_conditionalfield.doc")
DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> const xShape(getShape(1));
// contour wrap polygon
@@ -260,7 +257,6 @@ DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
DECLARE_ODFEXPORT_TEST(testUserFieldDecl, "user-field-decl.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"))
// Without the accompanying fix in place, this test would have failed with 'Expected: 2;
// Actual: 1', i.e. the in-table field had no declaration (in the header), while the
@@ -270,7 +266,6 @@ DECLARE_ODFEXPORT_TEST(testUserFieldDecl, "user-field-decl.odt")
DECLARE_ODFEXPORT_TEST(testUserFieldDeclFly, "user-field-decl-fly.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("styles.xml"))
// Without the accompanying fix in place, this test would have failed with 'Expected: 2;
// Actual: 1', i.e. the in-textframe field had no declaration (in the header), while the
@@ -280,7 +275,6 @@ DECLARE_ODFEXPORT_TEST(testUserFieldDeclFly, "user-field-decl-fly.odt")
DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//Counting the Number of Frames and checking with the expected count
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
@@ -407,19 +401,16 @@ DECLARE_ODFEXPORT_TEST(testFramebackgrounds, "framebackgrounds.odt")
DECLARE_SW_ROUNDTRIP_TEST(testSHA1Correct, "sha1_correct.odt", "1012345678901234567890123456789012345678901234567890", Test)
{ // tdf#114939 this has both an affected password as well as content.xml
- CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph(1, "012");
}
DECLARE_SW_ROUNDTRIP_TEST(testSHA1Wrong, "sha1_wrong.odt", "1012345678901234567890123456789012345678901234567890", Test)
{ // tdf#114939 this has both an affected password as well as content.xml
- CPPUNIT_ASSERT_EQUAL(1, getPages());
getParagraph(1, "012");
}
DECLARE_ODFEXPORT_TEST(testOOoxmlEmbedded, "oooxml_embedded.sxw")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTEOSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xAccess(xTEOSupplier->getEmbeddedObjects());
uno::Sequence<OUString> aSeq(xAccess->getElementNames());
@@ -452,7 +443,6 @@ DECLARE_ODFEXPORT_TEST(testOOoxmlEmbedded, "oooxml_embedded.sxw")
DECLARE_ODFEXPORT_TEST(testredlineTextFrame, "redlineTextFrame.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//Note this is for a crash test
//Counting the Number of Frames and checking with the expected count
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
@@ -468,7 +458,6 @@ DECLARE_ODFEXPORT_TEST(testTdf131621, "tdf131621.ott")
DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// See ooxmlexport's testFdo38244().
// Test comment range feature.
@@ -495,7 +484,6 @@ DECLARE_ODFEXPORT_TEST(testFdo38244, "fdo38244.odt")
DECLARE_ODFEXPORT_TEST(testSenderInitials, "sender-initials.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test sender-initial properties (both annotation metadata and text field)
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
@@ -516,7 +504,6 @@ DECLARE_ODFEXPORT_TEST(testSenderInitials, "sender-initials.fodt")
DECLARE_ODFEXPORT_TEST(testResolvedComment, "resolved-comment.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
@@ -528,7 +515,6 @@ DECLARE_ODFEXPORT_TEST(testResolvedComment, "resolved-comment.odt")
DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// frame style fo:background-color was not imported
uno::Reference<container::XNameAccess> xStyles(getStyles("FrameStyles"));
uno::Reference<beans::XPropertySet> xStyle(xStyles->getByName("encarts"),
@@ -609,7 +595,6 @@ DECLARE_ODFEXPORT_TEST(testTdf92379, "tdf92379.fodt")
DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// the boolean properties of the index were not exported properly
uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes();
@@ -629,7 +614,6 @@ DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt")
DECLARE_ODFEXPORT_TEST(testFirstHeaderFooter, "first-header-footer.odt")
{
- CPPUNIT_ASSERT_EQUAL(6, getPages());
// Test import and export of the header-first token.
// The document has 6 pages, two page styles for the first and second half of pages.
@@ -649,7 +633,6 @@ DECLARE_ODFEXPORT_TEST(testFirstHeaderFooter, "first-header-footer.odt")
DECLARE_ODFEXPORT_TEST(testTextframeGradient, "textframe-gradient.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
@@ -671,7 +654,6 @@ DECLARE_ODFEXPORT_TEST(testTextframeGradient, "textframe-gradient.odt")
DECLARE_ODFEXPORT_TEST(testDuplicateCrossRefHeadingBookmark, "CrossRefHeadingBookmark.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// the file contains invalid duplicate heading cross reference bookmarks
// but we have to round trip them, tdf#94804
@@ -699,7 +681,6 @@ DECLARE_ODFEXPORT_TEST(testDuplicateCrossRefHeadingBookmark, "CrossRefHeadingBoo
DECLARE_ODFEXPORT_TEST(testFdo60769, "fdo60769.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test multi-paragraph comment range feature.
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
@@ -726,7 +707,6 @@ DECLARE_ODFEXPORT_TEST(testFdo60769, "fdo60769.odt")
DECLARE_ODFEXPORT_TEST(testFdo58949, "fdo58949.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the exporter didn't insert "Obj102" to the
* resulting zip file. No idea how to check for "broken" (missing OLE data
@@ -762,7 +742,6 @@ DECLARE_ODFEXPORT_TEST(testFdo58949, "fdo58949.docx")
DECLARE_ODFEXPORT_TEST(testStylePageNumber, "ooo321_stylepagenumber.odt")
{
- CPPUNIT_ASSERT_EQUAL(5, getPages());
uno::Reference<text::XTextContent> xTable1(getParagraphOrTable(1));
// actually no break attribute is written in this case
// CPPUNIT_ASSERT_EQUAL(style::BreakType_PAGE_BEFORE, getProperty<style::BreakType>(xTable1, "BreakType"));
@@ -794,7 +773,6 @@ DECLARE_ODFEXPORT_TEST(testStylePageNumber, "ooo321_stylepagenumber.odt")
DECLARE_ODFEXPORT_TEST(testCharacterBorder, "charborder.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Make sure paragraph and character attributes don't interfere
// First paragraph has a paragraph border and a character border included by the paragraph style
@@ -950,7 +928,6 @@ DECLARE_ODFEXPORT_TEST(testCharacterBorder, "charborder.odt")
DECLARE_ODFEXPORT_TEST(testProtectionKey, "protection-key.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
OUString const password("1012345678901234567890123456789012345678901234567890");
// check 1 invalid OOo legacy password and 3 valid ODF 1.2 passwords
@@ -982,7 +959,6 @@ DECLARE_ODFEXPORT_TEST(testProtectionKey, "protection-key.fodt")
DECLARE_ODFEXPORT_TEST(testTdf128188, "footnote-collect-at-end-of-section.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwDoc *const pDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get())->GetDocShell()->GetDoc();
CPPUNIT_ASSERT(pDoc);
SwFootnoteIdxs const& rFootnotes(pDoc->GetFootnoteIdxs());
@@ -1006,7 +982,6 @@ DECLARE_ODFEXPORT_TEST(testTdf128188, "footnote-collect-at-end-of-section.fodt")
DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xSet(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Drop Caps"),getProperty<OUString>(xSet,"DropCapCharStyleName"));
@@ -1016,7 +991,6 @@ DECLARE_ODFEXPORT_TEST(testFdo43807, "fdo43807.odt")
DECLARE_ODFEXPORT_TEST(testTdf103091, "tdf103091.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check that all conditional paragraph style conditions are imported
uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
@@ -1084,7 +1058,6 @@ DECLARE_ODFEXPORT_TEST(testTdf103091, "tdf103091.fodt")
DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, "textframe-transparent-shadow.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xPicture = getShape(1);
// ODF stores opacity of 75%, that means 25% transparency.
CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty<sal_Int32>(xPicture, "ShadowTransparence"));
@@ -1092,7 +1065,6 @@ DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, "textframe-transparent-sh
DECLARE_ODFEXPORT_TEST(testRelhPage, "relh-page.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xTextFrame = getShape(1);
// This was text::RelOrientation::FRAME (the default), RelativeHeightRelation was not handled in xmloff.
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeHeightRelation"));
@@ -1105,7 +1077,6 @@ DECLARE_ODFEXPORT_TEST(testRelhPage, "relh-page.odt")
DECLARE_ODFEXPORT_TEST(testRelhPageTdf80282, "relh-page-tdf80282.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xTextFrame = getShape(1);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Height", sal_Int32(8391), parseDump("//anchored/fly/infos/bounds", "height").toInt32());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Width", sal_Int32(5953), parseDump("//anchored/fly/infos/bounds", "width").toInt32());
@@ -1113,7 +1084,6 @@ DECLARE_ODFEXPORT_TEST(testRelhPageTdf80282, "relh-page-tdf80282.odt")
DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xTextFrame = getShape(1);
// This was text::RelOrientation::FRAME (the default), RelativeWidthRelation was not handled in xmloff.
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xTextFrame, "RelativeWidthRelation"));
@@ -1126,7 +1096,6 @@ DECLARE_ODFEXPORT_TEST(testRelwPage, "relw-page.odt")
DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test import/export of new frame attribute called TextVerticalAdjust
// 1st frame's context is adjusted to the top
@@ -1142,14 +1111,12 @@ DECLARE_ODFEXPORT_TEST(testTextFrameVertAdjust, "textframe-vertadjust.odt")
DECLARE_ODFEXPORT_TEST(testTdf111891_frameVertStyle, "tdf111891_frameVertStyle.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xFrame, "TextVerticalAdjust"));
}
DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// These were all 0, as style:rel-width/height was ignored on import for shapes.
CPPUNIT_ASSERT_EQUAL(sal_Int16(40), getProperty<sal_Int16>(xShape, "RelativeWidth"));
@@ -1163,7 +1130,6 @@ DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt")
DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry"));
@@ -1185,7 +1151,6 @@ DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
// test that import whitespace collapsing is compatible with old docs
DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XEnumerationAccess> xPara;
uno::Reference<container::XEnumeration> xPortions;
uno::Reference<text::XTextRange> xPortion;
@@ -1508,7 +1473,6 @@ DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt")
DECLARE_ODFEXPORT_TEST(testBtlrCell, "btlr-cell.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the accompanying fix in place, this test would have failed, as
// the btlr text direction in the A1 cell was lost on ODF import and
// export.
@@ -1528,7 +1492,6 @@ DECLARE_ODFEXPORT_TEST(testBtlrCell, "btlr-cell.odt")
DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the accompanying fix in place, this test would have failed, as
// the btlr text direction in the text frame was lost on ODF import and
// export.
@@ -1583,7 +1546,6 @@ DECLARE_ODFEXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
DECLARE_ODFEXPORT_TEST(testFdo86963, "fdo86963.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Export of this document failed with beans::UnknownPropertyException.
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1639,12 +1601,10 @@ DECLARE_ODFEXPORT_TEST(testTdf118393, "tdf118393.odt")
DECLARE_ODFEXPORT_TEST(testGerrit13858, "gerrit13858.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Just make sure the output is valid.
}
DECLARE_ODFEXPORT_TEST(testOdtBorderTypes, "border_types.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
static const sal_Int32 lineStyles[] = { 0, 1, 2, 14, 16, 17, 3, 15 };
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(textDocument->getText(), uno::UNO_QUERY);
@@ -1679,7 +1639,6 @@ DECLARE_ODFEXPORT_TEST(testOdtBorderTypes, "border_types.odt")
DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<table::XCell> const xCellA1(xTable->getCellByName("A1"), uno::UNO_SET_THROW);
uno::Reference<table::XCell> const xCellB1(xTable->getCellByName("B1"), uno::UNO_SET_THROW);
@@ -1692,7 +1651,6 @@ DECLARE_ODFEXPORT_TEST(testCellUserDefineAttr, "userdefattr-tablecell.odt")
#if HAVE_FEATURE_PDFIUM
DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// This failed, pdf+png replacement graphics pair didn't survive an ODT roundtrip.
auto xReplacementGraphic = getProperty<uno::Reference<graphic::XGraphic>>(xShape, "ReplacementGraphic");
@@ -1726,7 +1684,6 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedPdf, "embedded-pdf.odt")
DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Table styles basic graphic test.
// Doesn't cover all attributes.
uno::Reference<style::XStyleFamiliesSupplier> XFamiliesSupplier(mxComponent, uno::UNO_QUERY);
@@ -1767,7 +1724,6 @@ DECLARE_ODFEXPORT_TEST(testTableStyles1, "table_styles_1.odt")
DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Table styles paragraph and char tests
// Doesn't cover all attributes.
// Problem: underline for table autoformat doesn't work.
@@ -1975,7 +1931,6 @@ DECLARE_ODFEXPORT_TEST(testTableStyles2, "table_styles_2.odt")
DECLARE_ODFEXPORT_TEST(testTableStyles3, "table_styles_3.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This test checks if default valued attributes aren't exported.
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
if (!pXmlDoc)
@@ -2050,7 +2005,6 @@ DECLARE_ODFIMPORT_TEST(testTableStyles4, "table_styles_4.odt")
DECLARE_ODFEXPORT_TEST(testTableStyles5, "table_styles_5.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test if cell styles doesn't have a style:parent-style-name attribute.
xmlDocUniquePtr pXmlDoc = parseExport("styles.xml");
if (!pXmlDoc)
@@ -2077,7 +2031,6 @@ DECLARE_ODFEXPORT_TEST(testTableStyles5, "table_styles_5.odt")
DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test that number format of cell styles can be imported and exported.
uno::Reference<beans::XPropertySet> xStyle(getStyles("CellStyles")->getByName("Test Style.11"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_uInt32(10104), getProperty<sal_uInt32>(xStyle, "NumberFormat"));
@@ -2085,7 +2038,6 @@ DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt")
DECLARE_ODFEXPORT_TEST(testTdf129568, "tdf129568.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test that export doesn't fail, and that style is imported and in use.
uno::Reference<style::XStyle> xStyle(getStyles("CellStyles")->getByName("Default Style.1"), uno::UNO_QUERY);
CPPUNIT_ASSERT(xStyle->isInUse());
@@ -2094,7 +2046,6 @@ DECLARE_ODFEXPORT_TEST(testTdf129568, "tdf129568.fodt")
DECLARE_ODFEXPORT_TEST(testTdf129568ui, "tdf129568-ui.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Same as above, but styles referenced by UI name.
uno::Reference<style::XStyle> xStyle(getStyles("CellStyles")->getByName("Default Style.1"), uno::UNO_QUERY);
CPPUNIT_ASSERT(xStyle->isInUse());
@@ -2103,7 +2054,6 @@ DECLARE_ODFEXPORT_TEST(testTdf129568ui, "tdf129568-ui.fodt")
DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test that the loext:mimetype attribute is written for exported images, tdf#109202
if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml"))
{
@@ -2114,7 +2064,6 @@ DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt")
DECLARE_ODFEXPORT_TEST(testEmbeddedFontProps, "embedded-font-props.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
#if !defined(MACOSX)
// Test that font style/weight of embedded fonts is exposed.
// Test file is a normal ODT, except EmbedFonts is set to true in settings.xml.
@@ -2135,7 +2084,6 @@ DECLARE_ODFEXPORT_TEST(testEmbeddedFontProps, "embedded-font-props.odt")
DECLARE_ODFEXPORT_TEST(testTdf100492, "tdf100492.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT(xShape.is());
@@ -2167,7 +2115,6 @@ DECLARE_ODFEXPORT_TEST(testTdf100492, "tdf100492.odt")
DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XNameAccess> xStyles(getStyles("PageStyles"));
uno::Reference<beans::XPropertySet> xStyle(xStyles->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL( false , getProperty<bool>(xStyle, "GridDisplay"));
@@ -2176,7 +2123,6 @@ DECLARE_ODFEXPORT_TEST(testTdf77961, "tdf77961.odt")
DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Test loext:reference-language attribute of reference fields
// (used from LibreOffice 6.1, and proposed for next ODF)
const char* aFieldTexts[] = { "A 2", "Az Isten", "Az 50-esek",
@@ -2210,7 +2156,6 @@ DECLARE_ODFEXPORT_TEST(testReferenceLanguage, "referencelanguage.odt")
DECLARE_ODFEXPORT_TEST(testRubyPosition, "ruby-position.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("content.xml"))
{
assertXPath(pXmlDoc, "//style:style[@style:family='ruby']/style:ruby-properties[@loext:ruby-position='inter-character']", 1);
@@ -2220,7 +2165,6 @@ DECLARE_ODFEXPORT_TEST(testRubyPosition, "ruby-position.odt")
DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// Without the accompanying fix in place, this test would have failed with:
// - Expression: !getProperty<bool>(xShape, "AllowOverlap")
@@ -2232,7 +2176,6 @@ DECLARE_ODFEXPORT_TEST(testAllowOverlap, "allow-overlap.odt")
DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, "signatureline-properties.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT(xShape.is());
@@ -2259,7 +2202,6 @@ DECLARE_ODFEXPORT_TEST(testSignatureLineProperties, "signatureline-properties.fo
DECLARE_ODFEXPORT_TEST(testQrCodeGenProperties, "qrcode-properties.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
CPPUNIT_ASSERT(xShape.is());
@@ -2275,7 +2217,6 @@ DECLARE_ODFEXPORT_TEST(testQrCodeGenProperties, "qrcode-properties.odt")
DECLARE_ODFEXPORT_TEST(testChapterNumberingNewLine, "chapter-number-new-line.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XChapterNumberingSupplier> xNumberingSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xNumberingRules = xNumberingSupplier->getChapterNumberingRules();
comphelper::SequenceAsHashMap hashMap(xNumberingRules->getByIndex(0));
@@ -2287,7 +2228,6 @@ DECLARE_ODFEXPORT_TEST(testChapterNumberingNewLine, "chapter-number-new-line.odt
DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// ordinal indicator, ordinal and cardinal number numbering styles (from LibreOffice 6.1)
static const char* const aFieldTexts[] = { "1st", "Erste", "Eins", "1.", "Premier", "Un", "1ᵉʳ", "First", "One" };
// fallback for old platforms without std::codecvt and std::regex supports
@@ -2315,7 +2255,6 @@ DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt"
// MAILMERGE Add conditional to expand / collapse bookmarks
DECLARE_ODFEXPORT_TEST(tdf101856_overlapped, "tdf101856_overlapped.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// get bookmark interface
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
@@ -2340,7 +2279,6 @@ DECLARE_ODFEXPORT_TEST(tdf101856_overlapped, "tdf101856_overlapped.odt")
// MAILMERGE Add conditional to expand / collapse bookmarks
DECLARE_ODFEXPORT_TEST(tdf101856, "tdf101856.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// get bookmark interface
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
@@ -2386,7 +2324,6 @@ DECLARE_ODFEXPORT_TEST(tdf101856, "tdf101856.odt")
DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// Make sure the replacement graphic is still there
// (was gone because the original graphic was not recognized during load)
@@ -2397,7 +2334,6 @@ DECLARE_ODFEXPORT_TEST(tdf118502, "tdf118502.odt")
DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check import of VisualArea settings of the embedded XLSX OLE objects
xmlDocUniquePtr pXmlDoc = parseExport("Object 1/settings.xml");
if (!pXmlDoc)
@@ -2414,7 +2350,6 @@ DECLARE_ODFEXPORT_TEST(tdf99631, "tdf99631.docx")
DECLARE_ODFEXPORT_TEST(tdf128504, "tdf128504.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(6);
uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
OUString unVisitedStyleName = getProperty<OUString>(xRun, "UnvisitedCharStyleName");
@@ -2425,7 +2360,6 @@ DECLARE_ODFEXPORT_TEST(tdf128504, "tdf128504.docx")
DECLARE_ODFEXPORT_TEST(tdf121658, "tdf121658.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles"));
uno::Reference<beans::XPropertySet> xStyle1(xParaStyles->getByName(
"Standard"), uno::UNO_QUERY);
@@ -2434,7 +2368,6 @@ DECLARE_ODFEXPORT_TEST(tdf121658, "tdf121658.odt")
DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -2448,7 +2381,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.odt")
DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -2462,7 +2394,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.odt")
DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -2476,7 +2407,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.odt")
DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -2490,7 +2420,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.odt")
DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
index 34bd0bc10773..c0d6d2ba95b3 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlencryption.cxx
@@ -23,7 +23,6 @@ protected:
DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2007, "Encrypted_MSO2007_abc.docx", "abc", Test)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Standard encryption format, AES 128, SHA1
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
CPPUNIT_ASSERT_EQUAL(OUString("abc"), xParagraph->getString());
@@ -31,7 +30,6 @@ DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2007, "Encrypted_MSO2007_abc.docx", "ab
DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2010, "Encrypted_MSO2010_abc.docx", "abc", Test)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Agile encryption format, AES 128, CBC, SHA1
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
CPPUNIT_ASSERT_EQUAL(OUString("abc"), xParagraph->getString());
@@ -39,7 +37,6 @@ DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2010, "Encrypted_MSO2010_abc.docx", "ab
DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2013, "Encrypted_MSO2013_abc.docx", "abc", Test)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Agile encryption format, AES 256, CBC, SHA512
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
CPPUNIT_ASSERT_EQUAL(OUString("ABC"), xParagraph->getString());
@@ -47,7 +44,6 @@ DECLARE_SW_ROUNDTRIP_TEST(testPasswordMSO2013, "Encrypted_MSO2013_abc.docx", "ab
DECLARE_SW_ROUNDTRIP_TEST(testPasswordLOStandard, "Encrypted_LO_Standard_abc.docx", "abc", Test)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Standard encryption format, AES 128, SHA1
uno::Reference<text::XTextRange> xParagraph(getParagraph(1));
CPPUNIT_ASSERT_EQUAL(OUString("ABC"), xParagraph->getString());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
index dbd1ef17f3b3..4ba57fabc25f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport10.cxx
@@ -102,7 +102,6 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws = xDrawPageSupplier->getDrawPage();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xDraws->getCount()); // One groupshape in the doc
@@ -127,7 +126,6 @@ DECLARE_OOXMLEXPORT_TEST(testSmartart, "smartart.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo69548, "fdo69548.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (!mbExported)
return;
@@ -137,7 +135,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69548, "fdo69548.docx")
DECLARE_OOXMLEXPORT_TEST(testWpsOnly, "wps-only.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Document has wp:anchor, not wp:inline, so handle it accordingly.
uno::Reference<drawing::XShape> xShape = getShape(1);
text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(xShape, "AnchorType");
@@ -161,7 +158,6 @@ DECLARE_OOXMLEXPORT_TEST(testWpsOnly, "wps-only.docx")
DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// Check position, it was nearly 0. This is a shape, so use getPosition(), not a property.
CPPUNIT_ASSERT_EQUAL(oox::drawingml::convertEmuToHmm(548005), xShape->getPosition().X);
@@ -169,7 +165,6 @@ DECLARE_OOXMLEXPORT_TEST(testWpgOnly, "wpg-only.docx")
DECLARE_OOXMLEXPORT_TEST(testWpgNested, "wpg-nested.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<drawing::XShapeDescriptor> xShapeDescriptor(xGroup->getByIndex(0), uno::UNO_QUERY);
// This was a com.sun.star.drawing.CustomShape, due to lack of handling of groupshapes inside groupshapes.
@@ -192,7 +187,6 @@ DECLARE_OOXMLEXPORT_TEST(testWpgNested, "wpg-nested.docx")
DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// The relativeFrom attribute was ignored for groupshapes, i.e. these were text::RelOrientation::FRAME.
CPPUNIT_ASSERT_EQUAL(text::RelOrientation::PAGE_FRAME, getProperty<sal_Int16>(xShape, "HoriOrientRelation"));
@@ -212,7 +206,6 @@ DECLARE_OOXMLEXPORT_TEST(textboxWpgOnly, "textbox-wpg-only.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf120412_400PercentSubscript, "tdf120412_400PercentSubscript.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
// The word "Base" should not be subscripted.
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
@@ -222,7 +215,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120412_400PercentSubscript, "tdf120412_400Percen
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFontEsc, "test_tdf120412.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc =parseExport("word/document.xml");
// don't lose the run with superscript formatting
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r", 2);
@@ -234,7 +226,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFontEsc, "test_tdf120412.docx")
DECLARE_OOXMLEXPORT_TEST(testMceWpg, "mce-wpg.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Make sure that we read the primary branch, if wpg is requested as a feature.
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(0), uno::UNO_QUERY_THROW)->getText();
@@ -244,7 +235,6 @@ DECLARE_OOXMLEXPORT_TEST(testMceWpg, "mce-wpg.docx")
DECLARE_OOXMLEXPORT_TEST(testMceNested, "mce-nested.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Vertical position of the shape was incorrect due to incorrect nested mce handling.
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
// positionV's posOffset from the bugdoc, was 0.
@@ -268,7 +258,6 @@ DECLARE_OOXMLEXPORT_TEST(testMceNested, "mce-nested.docx")
DECLARE_OOXMLEXPORT_TEST(testMissingPath, "missing-path.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty<beans::PropertyValues>(getShape(1), "CustomShapeGeometry"));
comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"].get<beans::PropertyValues>());
uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates = aPath["Coordinates"].get< uno::Sequence<drawing::EnhancedCustomShapeParameterPair> >();
@@ -278,7 +267,6 @@ DECLARE_OOXMLEXPORT_TEST(testMissingPath, "missing-path.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo70457, "fdo70457.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The document contains a rotated bitmap
// It must be imported as a XShape object with the proper rotation value
@@ -293,14 +281,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo70457, "fdo70457.docx")
DECLARE_OOXMLEXPORT_TEST(testLOCrash,"file_crash.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
//The problem was libreoffice crash while opening the file.
getParagraph(1,"Contents");
}
DECLARE_OOXMLEXPORT_TEST(testFdo72560, "fdo72560.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was libreoffice confuse when there RTL default style for paragraph
uno::Reference<uno::XInterface> xParaLeftRTL(getParagraph( 1, "RTL LEFT"));
uno::Reference<uno::XInterface> xParaRightLTR(getParagraph( 2, "LTR RIGHT"));
@@ -315,7 +301,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560, "fdo72560.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo72560b, "fdo72560b.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was libreoffice confuse when RTL was specified in non-default style
uno::Reference<uno::XInterface> xParaEndRTL(getParagraph( 2, "RTL END"));
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaEndRTL, "WritingMode" ));
@@ -324,7 +309,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560b, "fdo72560b.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo72560c, "fdo72560c.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was libreoffice confuse when RTL was specified in DocDefaults
uno::Reference<uno::XInterface> xParaEndRTL(getParagraph( 2, "RTL END"));
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( xParaEndRTL, "WritingMode" ));
@@ -333,7 +317,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560c, "fdo72560c.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo72560d, "fdo72560d.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was libreoffice confuse when RTL was specified in "Normal" when not using Normal at all
CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(1), "ParaAdjust" ));
CPPUNIT_ASSERT_EQUAL( sal_Int32(style::ParagraphAdjust_RIGHT), getProperty< sal_Int32 >( getParagraph(2), "ParaAdjust" ));
@@ -341,7 +324,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560d, "fdo72560d.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo72560e, "fdo72560e.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was libreoffice confuse when *locale* is RTL, but w:bidi / w:jc are never defined.
// This unit test would only be noticed if the testing environment is set to something like an Arabic locale.
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::LR_TB, getProperty<sal_Int16>( getParagraph(2), "WritingMode" ));
@@ -353,7 +335,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo72560e, "fdo72560e.docx")
DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Redline defined by rPrChanged wasn't removed.
// First paragraph has an rPrChange element, make sure it doesn't appear in the second paragraph.
CPPUNIT_ASSERT_EQUAL(false, hasProperty(getRun(getParagraph(2), 1), "RedlineType"));
@@ -361,7 +342,6 @@ DECLARE_OOXMLEXPORT_TEST(testRPrChangeClosed, "rprchange_closed.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo65090, "fdo65090.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -372,7 +352,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo65090, "fdo65090.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
{
- CPPUNIT_ASSERT_EQUAL(15, getPages());
// The DOCX containing the Table of Contents was not imported with correct page nos
uno::Reference<text::XDocumentIndexesSupplier> xIndexSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexes = xIndexSupplier->getDocumentIndexes( );
@@ -391,7 +370,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73389,"fdo73389.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The width of the inner table was too large. The first fix still converted
// the "auto" table width to a fixed one. The second fix used variable width.
// The recent fix uses fixed width again, according to the fixed width cells.
@@ -403,7 +381,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73389,"fdo73389.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf59274, "tdf59274.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Table with "auto" table width and incomplete grid: 11 columns, but only 4 gridCol elements.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -418,7 +395,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf59274, "tdf59274.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
// The text in the groupshape was missing due to the w:sdt and w:sdtContent wrapper around it.
CPPUNIT_ASSERT_EQUAL(OUString("sdt and sdtContent inside groupshape"), uno::Reference<text::XTextRange>(xGroupShape->getByIndex(1), uno::UNO_QUERY_THROW)->getString());
@@ -426,7 +402,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupshapeSdt, "dml-groupshape-sdt.docx")
DECLARE_OOXMLEXPORT_TEST(testDmlCharheightDefault, "dml-charheight-default.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
// This was 16: the first run of the second para incorrectly inherited the char height of the first para.
@@ -435,7 +410,6 @@ DECLARE_OOXMLEXPORT_TEST(testDmlCharheightDefault, "dml-charheight-default.docx"
DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeCapitalization, "dml-groupshape-capitalization.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Capitalization inside a group shape was not imported
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
@@ -451,7 +425,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeCapitalization, "dml-groupshape-capita
DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// At the start of the document, a picture which has a color specified with a color scheme, lost
// it's color during import.
uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
@@ -468,7 +441,6 @@ DECLARE_OOXMLEXPORT_TEST(testPictureWithSchemeColor, "picture-with-schemecolor.d
DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8153), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
@@ -476,7 +448,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
DECLARE_OOXMLEXPORT_TEST(testFloatingTablesAnchor, "floating-tables-anchor.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was one of the two text frames was anchored to the other text frame
// Both frames should be anchored to the paragraph with the text "Anchor point"
uno::Reference<text::XTextContent> xTextContent(getShape(1), uno::UNO_QUERY);
@@ -492,7 +463,6 @@ DECLARE_OOXMLEXPORT_TEST(testFloatingTablesAnchor, "floating-tables-anchor.docx"
DECLARE_OOXMLEXPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(2), 2), "TextField");
uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XText> >(xTextField, "TextRange");
// Make sure we test the right annotation.
@@ -503,7 +473,6 @@ DECLARE_OOXMLEXPORT_TEST(testAnnotationFormatting, "annotation-formatting.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Fonts defined by w:rFonts was not imported and so the font specified by a:fontRef was used.
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
@@ -515,7 +484,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.doc
DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was only 127, pt suffix was ignored, so this got parsed as twips instead of points.
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(72 * 20)), getProperty<sal_Int32>(xPageStyle, "BottomMargin"));
@@ -547,7 +515,6 @@ DECLARE_OOXMLEXPORT_TEST(testStrict, "strict.docx")
DECLARE_OOXMLEXPORT_TEST(testSmartartStrict, "strict-smartart.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
// This was 0, SmartArt was visually missing.
CPPUNIT_ASSERT_EQUAL(sal_Int32(7), xGroup->getCount()); // background, 3 ellipses + 3 arrows
@@ -555,7 +522,6 @@ DECLARE_OOXMLEXPORT_TEST(testSmartartStrict, "strict-smartart.docx")
DECLARE_OOXMLEXPORT_TEST(testLibreOfficeHang, "frame-wrap-auto.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#72775
// This was text::WrapTextMode_NONE.
CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_DYNAMIC, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
@@ -569,7 +535,6 @@ DECLARE_OOXMLEXPORT_TEST(testI124106, "i124106.docx")
DECLARE_OOXMLEXPORT_TEST(testLargeTwips, "large-twips.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// cp#1000043: MSO seems to ignore large twips values, we didn't, which resulted in different
// layout of broken documents (text not visible in this specific document).
OUString width = parseDump( "/root/page/body/tab/row[1]/cell[1]/txt/infos/bounds", "width" );
@@ -578,7 +543,6 @@ DECLARE_OOXMLEXPORT_TEST(testLargeTwips, "large-twips.docx" )
DECLARE_OOXMLEXPORT_TEST(testNegativeCellMarginTwips, "negative-cell-margin-twips.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Slightly related to cp#1000043, the twips value was negative, which wrapped around somewhere,
// while MSO seems to ignore that as well.
OUString width = parseDump( "/root/page/body/tab/row[1]/cell[1]/txt/infos/bounds", "width" );
@@ -602,7 +566,6 @@ DECLARE_OOXMLIMPORT_TEST(testFdo38414, "fdo38414.docx" )
DECLARE_OOXMLEXPORT_TEST(test_extra_image, "test_extra_image.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#74652 Check there is no shape added to the doc during import
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws = xDrawPageSupplier->getDrawPage();
@@ -611,7 +574,6 @@ DECLARE_OOXMLEXPORT_TEST(test_extra_image, "test_extra_image.docx" )
DECLARE_OOXMLEXPORT_TEST(testFdo74401, "fdo74401.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
uno::Reference<drawing::XShapeDescriptor> xShape(xGroupShape->getByIndex(1), uno::UNO_QUERY);
// The triangle (second child) was a TextShape before, so it was shown as a rectangle.
@@ -628,7 +590,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo74401, "fdo74401.docx")
DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// w:gridBefore is faked by inserting two cells without border (because Writer can't do non-rectangular tables).
// So check the first cell in the first row is in fact 3rd and that it's more to the right than the second
// cell on the second row.
@@ -646,7 +607,6 @@ DECLARE_OOXMLEXPORT_TEST(testGridBefore, "gridbefore.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf116194, "tdf116194.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the importer lost consecutive tables with w:gridBefore
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl", 2);
@@ -654,7 +614,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf116194, "tdf116194.docx")
DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> image = getShape(1);
uno::Reference<beans::XPropertySet> imageProperties(image, uno::UNO_QUERY);
uno::Reference<graphic::XGraphic> graphic;
@@ -669,7 +628,6 @@ DECLARE_OOXMLEXPORT_TEST(testMsoBrightnessContrast, "msobrightnesscontrast.docx"
DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// When chart was in a TextFrame, its size was too large.
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
@@ -683,7 +641,6 @@ DECLARE_OOXMLEXPORT_TEST(testChartSize, "chart-size.docx")
DECLARE_OOXMLEXPORT_TEST(testInlineGroupshape, "inline-groupshape.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Inline groupshape was in the background, so it was hidden sometimes by other shapes.
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(getShape(1), "Opaque"));
}
@@ -706,7 +663,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo79535, "fdo79535.docx")
DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The frame in the footer must not accidentally end up in the document body.
// The easiest way for this to test I've found is checking that
// xray ThisComponent.TextFrames.GetByIndex( index ).Anchor.Text.ImplementationName
@@ -730,7 +686,6 @@ DECLARE_OOXMLEXPORT_TEST(testBnc875718, "bnc875718.docx")
DECLARE_OOXMLEXPORT_TEST(testCaption, "caption.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Caption"), uno::UNO_QUERY);
// This was awt::FontSlant_ITALIC: Writer default was used instead of what is in the document.
CPPUNIT_ASSERT_EQUAL(awt::FontSlant_NONE, getProperty<awt::FontSlant>(xStyle, "CharPosture"));
@@ -738,7 +693,6 @@ DECLARE_OOXMLEXPORT_TEST(testCaption, "caption.docx")
DECLARE_OOXMLEXPORT_TEST(testGroupshapeTrackedchanges, "groupshape-trackedchanges.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
// Shape text was completely missing, ensure inserted text is available.
@@ -747,7 +701,6 @@ DECLARE_OOXMLEXPORT_TEST(testGroupshapeTrackedchanges, "groupshape-trackedchange
DECLARE_OOXMLEXPORT_TEST(testFdo78939, "fdo78939.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#78939 : LO hanged while opening issue document
// Whenever a para-style was applied to a Numbering format level,
@@ -760,7 +713,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo78939, "fdo78939.docx")
DECLARE_OOXMLEXPORT_TEST(testFootnote, "footnote.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XTextRange> xFootnote(xFootnotes->getByIndex(0), uno::UNO_QUERY);
@@ -771,7 +723,6 @@ DECLARE_OOXMLEXPORT_TEST(testFootnote, "footnote.docx")
DECLARE_OOXMLEXPORT_TEST(testTableBtlrCenter, "table-btlr-center.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Note that this is btLr text, so layout and doc model horizontal/vertical is the opposite of
// each other.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -789,7 +740,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableBtlrCenter, "table-btlr-center.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo80555, "fdo80555.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// Shape was wrongly placed at X=0, Y=0
CPPUNIT_ASSERT_EQUAL(sal_Int32(3318), xShape->getPosition().X);
@@ -798,7 +748,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80555, "fdo80555.docx")
DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was that <w:hideMark> cell property was ignored.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
@@ -815,7 +764,6 @@ DECLARE_OOXMLEXPORT_TEST(testHidemark, "hidemark.docx")
DECLARE_OOXMLEXPORT_TEST(testHidemarkb, "tdf99616_hidemarkb.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was that the smallest possible height was forced, not the min specified size.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
@@ -829,7 +777,6 @@ DECLARE_OOXMLEXPORT_TEST(testHidemarkb, "tdf99616_hidemarkb.docx")
DECLARE_OOXMLEXPORT_TEST(testBnc891663, "bnc891663.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The image should be inside a cell, so the text in the following cell should be below it.
int imageTop = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds", "top").toInt32();
int imageHeight = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds", "height").toInt32();
@@ -839,7 +786,6 @@ DECLARE_OOXMLEXPORT_TEST(testBnc891663, "bnc891663.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf123104, "tdf123104.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -852,7 +798,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123104, "tdf123104.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo85542, "fdo85542.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), xBookmarksByIdx->getCount());
@@ -882,7 +827,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo85542, "fdo85542.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf65955, "tdf65955.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), xBookmarksByIdx->getCount());
@@ -901,7 +845,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf65955, "tdf65955.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf65955_2, "tdf65955_2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
@@ -915,7 +858,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf65955_2, "tdf65955_2.odt")
DECLARE_OOXMLEXPORT_TEST(testChtOutlineNumberingOoxml, "chtoutline.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
const sal_Unicode aExpectedNumbering[] = { 0x7b2c, ' ', '1', ' ', 0x7ae0 };
uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
@@ -925,7 +867,6 @@ DECLARE_OOXMLEXPORT_TEST(testChtOutlineNumberingOoxml, "chtoutline.docx")
DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextEmbeddedObjectsSupplier> xTextEmbeddedObjectsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xEmbeddedObjects(xTextEmbeddedObjectsSupplier->getEmbeddedObjects(), uno::UNO_QUERY);
// This failed as the Model property was empty.
@@ -935,7 +876,6 @@ DECLARE_OOXMLEXPORT_TEST(mathtype, "mathtype.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf8255, "tdf8255.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xTextDocument, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -945,7 +885,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf8255, "tdf8255.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(xTextDocument, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
@@ -955,7 +894,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87460, "tdf87460.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90611, "tdf90611.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XText> xFootnoteText;
@@ -966,7 +904,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90611, "tdf90611.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf89702, "tdf89702.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Get the first paragraph's numbering style's 2nd level's character style name.
uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
@@ -981,7 +918,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89702, "tdf89702.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf86374, "tdf86374.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -992,7 +928,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf86374, "tdf86374.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf87924, "tdf87924.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
// This was -270, the text rotation angle was set when it should not be rotated.
@@ -1001,7 +936,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87924, "tdf87924.docx")
DECLARE_OOXMLEXPORT_TEST(testIndents, "indents.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//expected left margin and first line indent values
static const sal_Int32 indents[] =
{
@@ -1035,7 +969,6 @@ DECLARE_OOXMLEXPORT_TEST(testIndents, "indents.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf92454, "tdf92454.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The first paragraph had a large indentation / left margin as inheritance
// in Word and Writer works differently, and no direct value was set to be
// explicit.
@@ -1046,7 +979,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92454, "tdf92454.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertyState> xParagraph(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xParagraph, "ParaRightMargin"));
@@ -1071,7 +1003,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95377, "tdf95377.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95376, "tdf95376.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertyState> xParagraph(getParagraph(2), uno::UNO_QUERY);
// This was beans::PropertyState_DIRECT_VALUE: indentation-from-numbering
// did not have priority over indentation-from-paragraph-style, due to a
@@ -1085,7 +1016,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95376, "tdf95376.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf92124, "tdf92124.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Get the second paragraph's numbering style's 1st level's suffix.
uno::Reference<text::XTextRange> xParagraph = getParagraph(2);
auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
@@ -1098,21 +1028,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf92124, "tdf92124.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90153, "tdf90153.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was at-para, so the line-level VertOrientRelation was lost, resulting in an incorrect vertical position.
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf93919, "tdf93919.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, left margin was not inherited from the list style.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), getProperty<sal_Int32>(getParagraph(1), "ParaLeftMargin"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf91417, "tdf91417.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The first paragraph should contain a link to "http://www.google.com/"
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XTextCursor> xTextCursor = xTextDocument->getText()->createTextCursor( );
@@ -1124,7 +1051,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf91417, "tdf91417.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90810, "tdf90810short.docx")
{
- CPPUNIT_ASSERT_EQUAL(4, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XFootnotesSupplier> xFootnoteSupp(xTextDocument, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnoteIdxAcc = xFootnoteSupp->getFootnotes();
@@ -1136,13 +1062,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90810, "tdf90810short.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf89165, "tdf89165.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This must not hang in layout
}
DECLARE_OOXMLEXPORT_TEST(testTdf95777, "tdf95777.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This must not fail on open
}
@@ -1158,7 +1082,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94374)
DECLARE_OOXMLEXPORT_TEST(testTdf83300, "tdf83300.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 'Contents Heading', which (in the original document) implied 'keep with next' on unexpected paragraphs.
CPPUNIT_ASSERT_EQUAL(OUString("TOC Heading"), getProperty<OUString>(getParagraph(1), "ParaStyleName"));
}
@@ -1171,13 +1094,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf78902, "tdf78902.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95775, "tdf95775.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This must not fail in layout
}
DECLARE_OOXMLEXPORT_TEST(testTdf92157, "tdf92157.docx")
{
- CPPUNIT_ASSERT_EQUAL(7, getPages());
// A graphic with dimensions 0,0 should not fail on load
}
@@ -1199,7 +1120,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97417, "section_break_numbering.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf94043, "tdf94043.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
auto xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
// This was 0, the separator line was not visible due to 0 width.
@@ -1208,7 +1128,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf94043, "tdf94043.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95213, "tdf95213.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Get the second paragraph's numbering style's 2nd level's character style name.
uno::Reference<text::XTextRange> xParagraph = getParagraph(2);
auto xLevels = getProperty< uno::Reference<container::XIndexAccess> >(xParagraph, "NumberingRules");
@@ -1223,7 +1142,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95213, "tdf95213.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf97371, "tdf97371.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -1237,7 +1155,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97371, "tdf97371.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf99140, "tdf99140.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xTextDocument, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1253,7 +1170,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99140, "tdf99140.docx")
DECLARE_OOXMLEXPORT_TEST(testTableMarginAdjustment, "table.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Writer, (new) Word: margin 0 means table border starts at 0
// (old) Word: margin 0 means paragraph in table starts at 0
@@ -1273,7 +1189,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableMarginAdjustment, "table.fodt")
DECLARE_OOXMLEXPORT_TEST(testTdf119760_tableInTablePosition, "tdf119760_tableInTablePosition.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if ( mbExported )
{
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -1292,7 +1207,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119760_tableInTablePosition, "tdf119760_tableInT
DECLARE_OOXMLEXPORT_TEST( testTableCellMargin, "table-cell-margin.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_Int32 const cellLeftMarginFromOffice[] = { 250, 100, 0, 0 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
@@ -1334,7 +1248,6 @@ DECLARE_OOXMLEXPORT_TEST( testTableCellMargin, "table-cell-margin.docx" )
// tdf#106742 for DOCX with compatibility level <= 14 (MS Word up to and incl. ver.2010), we should use cell margins when calculating table left border position
DECLARE_OOXMLEXPORT_TEST( testTablePosition14, "table-position-14.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_Int32 const aXCoordsFromOffice[] = { 2500, -1000, 0, 0 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
@@ -1360,7 +1273,6 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition14, "table-position-14.docx" )
// we should NOT use cell margins when calculating table left border position. But we do need to use border width.
DECLARE_OOXMLEXPORT_TEST( testTablePosition15, "table-position-15.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_Int32 const aXCoordsFromOffice[] = { 2751, -899, 1, 212 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
@@ -1384,7 +1296,6 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition15, "table-position-15.docx" )
DECLARE_OOXMLEXPORT_TEST( testTdf107359, "tdf107359-char-pitch.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
bool bGridSnapToChars;
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 86d6c5aa7194..1e9e55da8958 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -38,7 +38,6 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
CPPUNIT_ASSERT_EQUAL(COL_LIGHTMAGENTA, Color(getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(2), "FillStyle"));
@@ -47,7 +46,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf57589_hashColor, "tdf57589_hashColor.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAuto, "tdf90906_colAuto.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -60,7 +58,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAuto, "tdf90906_colAuto.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -81,14 +78,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90906_colAutoB, "tdf90906_colAutoB.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf92524_autoColor, "tdf92524_autoColor.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(getParagraph(1), "FillStyle"));
CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(getParagraph(1), "ParaBackColor")));
}
DECLARE_OOXMLEXPORT_TEST(testTdf116436_rowFill, "tdf116436_rowFill.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -98,14 +93,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116436_rowFill, "tdf116436_rowFill.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf121665_back2backColumnBreaks, "tdf121665_back2backColumnBreaks.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Column break type",
style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent0, "tdf126795_TabsRelativeToIndent0.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops");
CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment );
@@ -114,7 +107,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent0, "tdf126795_TabsRel
DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent1, "tdf126795_TabsRelativeToIndent1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Sequence< style::TabStop > stops = getProperty< uno::Sequence<style::TabStop> >(getParagraph( 2 ), "ParaTabStops");
CPPUNIT_ASSERT_EQUAL( sal_Int32(1), stops.getLength());
CPPUNIT_ASSERT_EQUAL( css::style::TabAlign_LEFT, stops[ 0 ].Alignment );
@@ -123,14 +115,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126795_TabsRelativeToIndent1, "tdf126795_TabsRel
DECLARE_OOXMLEXPORT_TEST(testTdf46938_clearTabStop, "tdf46938_clearTabStop.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Number of tabstops should be zero, overriding the one in the style
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
}
DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs, "tdf63561_clearTabs.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
CPPUNIT_ASSERT_EQUAL(sal_Int32(7), getProperty< uno::Sequence<style::TabStop> >(getParagraph(3), "ParaTabStops").getLength());
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
@@ -138,7 +128,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs, "tdf63561_clearTabs.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf63561_clearTabs2, "tdf63561_clearTabs2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), getProperty< uno::Sequence<style::TabStop> >(getParagraph(1), "ParaTabStops").getLength());
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), getProperty< uno::Sequence<style::TabStop> >(getParagraph(3), "ParaTabStops").getLength());
CPPUNIT_ASSERT_EQUAL(sal_Int32(4), getProperty< uno::Sequence<style::TabStop> >(getParagraph(4), "ParaTabStops").getLength());
@@ -174,7 +163,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121561_tocTitle, "tdf121456_tabsOffse
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf129525, "tdf129525.rtf")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[4]/w:t", "Overview");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[5]/w:t", "3");
@@ -185,7 +173,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf129525, "tdf129525.rtf")
// Related issue tdf#121561: w:sdt/w:sdtContent around TOC
DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> textDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<text::XText> text = textDocument->getText();
// -1 if the 'Y' character does not occur
@@ -195,7 +182,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124106, "tdf121456.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121561_tocTitleDocx, "tdf121456_tabsOffset.odt")
{
- CPPUNIT_ASSERT_EQUAL(7, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
// get TOC node
@@ -212,7 +198,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121561_tocTitleDocx, "tdf121456_tabsO
DECLARE_OOXMLEXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(1), "ParaAdjust"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(2), "ParaAdjust"));
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Another paragraph aligned to right"), uno::UNO_QUERY);
@@ -233,7 +218,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.doc
DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_strict.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aProps;
@@ -254,7 +238,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82065_Ind_start_strict, "tdf82065_Ind_start_stri
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf76683_negativeTwipsMeasure, "tdf76683_negativeTwipsMeasure.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col", 2);
sal_uInt32 nColumn1 = getXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:cols/w:col[1]", "w").toUInt32();
@@ -264,7 +247,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf76683_negativeTwipsMeasure, "tdf76683
DECLARE_OOXMLEXPORT_TEST(testTdf112694, "tdf112694.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
// Header was on when header for file was for explicit first pages only
// (marked via <w:titlePg>).
@@ -290,14 +272,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113849_evenAndOddHeaders, "tdf113849_evenAndOddH
DECLARE_OOXMLEXPORT_TEST(testTdf118361_RTLfootnoteSeparator, "tdf118361_RTLfootnoteSeparator.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Any aPageStyle = getStyles("PageStyles")->getByName("Standard");
CPPUNIT_ASSERT_EQUAL_MESSAGE("Footnote separator RTL", sal_Int16(2), getProperty<sal_Int16>(aPageStyle, "FootnoteLineAdjust"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf115861, "tdf115861.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Second item in the paragraph enumeration was a table, 2nd paragraph was
// lost.
CPPUNIT_ASSERT_EQUAL(OUString("(k)"), getParagraph(2)->getString());
@@ -305,7 +285,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf115861, "tdf115861.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), "TextField");
CPPUNIT_ASSERT(xTextField.is());
uno::Reference<lang::XServiceInfo> xServiceInfo(xTextField, uno::UNO_QUERY_THROW);
@@ -382,7 +361,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf94801, "tdf94801.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testParagraphSplitOnSectionBorder, "parasplit-on-section-border.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Test document has only two paragraphs. After splitting, it should contain
@@ -393,14 +371,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testParagraphSplitOnSectionBorder, "paraspli
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf44832_testSectionWithDifferentHeader, "tdf44832_section_new_header.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:headerReference", 1);
}
DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xSignatureLineShape = getShape(1);
uno::Reference<beans::XPropertySet> xPropSet(xSignatureLineShape, uno::UNO_QUERY);
@@ -439,7 +415,6 @@ DECLARE_OOXMLEXPORT_TEST(testSignatureLineShape, "signature-line-all-props-set.d
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf117805, "tdf117805.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess
= packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
maTempFile.GetURL());
@@ -453,7 +428,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf117805, "tdf117805.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The horizontal positioning of the star shape affected the positioning of
// the triangle one, so the triangle was outside the page frame.
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
@@ -471,14 +445,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113183, "tdf113183.docx")
DECLARE_OOXMLEXPORT_TEST(testGraphicObjectFliph, "graphic-object-fliph.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT(getProperty<bool>(getShape(1), "HoriMirroredOnEvenPages"));
CPPUNIT_ASSERT(getProperty<bool>(getShape(1), "HoriMirroredOnOddPages"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(
getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xLevels(
@@ -490,7 +462,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113547, "tdf113547.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf113399, "tdf113399.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// 0 padding was not preserved
// In LO 0 is the default, but in OOXML format the default is 254 / 127
uno::Reference<beans::XPropertySet> xPropSet(getShape(1), uno::UNO_QUERY);
@@ -507,13 +478,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113399, "tdf113399.doc")
DECLARE_OOXMLEXPORT_TEST(testTdf114882, "tdf114882.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fastserializer must not fail assertion because of mismatching elements
}
DECLARE_OOXMLEXPORT_TEST(testTdf49073, "tdf49073.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// test case for Asian phontic guide (ruby text.)
sal_Unicode aRuby[3] = {0x304D,0x3082,0x3093};
OUString sRuby(aRuby, SAL_N_ELEMENTS(aRuby));
@@ -531,7 +500,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf49073, "tdf49073.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xRules
= getProperty<uno::Reference<container::XIndexAccess>>(
getStyles("NumberingStyles")->getByName("WWNum1"), "NumberingRules");
@@ -544,7 +512,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf114703, "tdf114703.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf113258, "tdf113258.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
// This was 494, i.e. automatic spacing resulted in non-zero paragraph top
// margin for the first paragraph in a shape.
@@ -554,7 +521,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113258, "tdf113258.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeAutospacing.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
// This was 0, i.e. disabled automatic spacing still resulted in zero paragraph
// top margin for the first paragraph in a shape.
@@ -564,7 +530,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113258_noBeforeAutospacing, "tdf113258_noBeforeA
DECLARE_OOXMLEXPORT_TEST(testTdf120511_eatenSection, "tdf120511_eatenSection.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
sal_Int32 nHeight = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds", "height").toInt32();
sal_Int32 nWidth = getXPath(pXmlDoc, "/root/page[1]/infos/prtBounds", "width").toInt32();
@@ -576,7 +541,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120511_eatenSection, "tdf120511_eatenSection.doc
DECLARE_OOXMLEXPORT_TEST(testTdf104354, "tdf104354.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xShape(getShape(1), uno::UNO_QUERY);
// This was 494, i.e. automatic spacing resulted in non-zero paragraph top
// margin for the first paragraph in a text frame.
@@ -608,7 +572,6 @@ DECLARE_OOXMLEXPORT_TEST(testPageBreak_after, "pageBreak_after.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Select the second run containing the page number field
auto xPgNumRun = getRun(getParagraph(1), 2, "1");
@@ -619,7 +582,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107035, "tdf107035.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// The resulting left margin width (2081) differs from its DOC counterpart from ww8export2.cxx,
// because DOCX import does two conversions between mm/100 and twips on the route, losing one
// twip on the road and arriving with a value that is 2 mm/100 less. I don't see an obvious way
@@ -685,7 +647,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112118_DOCX, "tdf112118.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf82177_outsideCellBorders, "tdf82177_outsideCellBorders.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
@@ -696,7 +657,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82177_outsideCellBorders, "tdf82177_outsideCellB
DECLARE_OOXMLEXPORT_TEST(testTdf82177_insideCellBorders, "tdf82177_insideCellBorders.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
@@ -707,7 +667,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82177_insideCellBorders, "tdf82177_insideCellBor
DECLARE_OOXMLEXPORT_TEST(testTdf82177_tblBorders, "tdf82177_tblBorders.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference< text::XTextTable > xTable( xTables->getByIndex(0), uno::UNO_QUERY );
@@ -721,7 +680,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82177_tblBorders, "tdf82177_tblBorders.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCellBorder.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//inconsistent in Word even. 2016 positions on last row, 2003 positions on first cell.
sal_Int32 nRowLeft = parseDump("/root/page/body/tab[4]/row[1]/infos/bounds", "left").toInt32();
sal_Int32 nTextLeft = parseDump("/root/page/body/tab[4]/row[1]/cell[1]/txt/infos/bounds", "left").toInt32();
@@ -730,7 +688,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119760_positionCellBorder, "tdf119760_positionCe
DECLARE_OOXMLEXPORT_TEST(testTdf98620_environmentBiDi, "tdf98620_environmentBiDi.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::RL_TB, getProperty<sal_Int16>( getParagraph(1), "WritingMode" ));
CPPUNIT_ASSERT_EQUAL(sal_Int32(style::ParagraphAdjust_RIGHT), getProperty<sal_Int32>( getParagraph(1), "ParaAdjust" ));
@@ -740,7 +697,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf98620_environmentBiDi, "tdf98620_environmentBiDi
DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, relative size of shape after bitmap was ignored.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int16>(40),
getProperty<sal_Int16>(getShape(1), "RelativeWidth"));
@@ -748,7 +704,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116976, "tdf116976.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Body frame width is 10800, 40% is the requested relative width, with 144
// spacing to text on the left/right side. So ideal width would be 4032,
// was 3431. Allow one pixel tolerance, though.
@@ -759,7 +714,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116985, "tdf116985.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
uno::UNO_QUERY);
@@ -772,7 +726,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116801, "tdf116801.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf107969, "tdf107969.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// A VML object in a footnote's tracked changes caused write past end of document.xml at export to docx.
// After that, importing after export failed with
// SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word/document.xml'.
@@ -780,7 +733,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107969, "tdf107969.docx")
DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, "open-as-read-only.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
CPPUNIT_ASSERT(pTextDoc->GetDocShell()->IsSecurityOptOpenReadOnly());
@@ -788,7 +740,6 @@ DECLARE_OOXMLEXPORT_TEST(testOpenDocumentAsReadOnly, "open-as-read-only.docx")
DECLARE_OOXMLEXPORT_TEST(testNoDefault, "noDefault.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -817,7 +768,6 @@ DECLARE_OOXMLEXPORT_TEST(testNoDefault, "noDefault.docx")
DECLARE_OOXMLEXPORT_TEST(testMarginsFromStyle, "margins_from_style.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#118521 paragraphs with direct formatting of top or bottom margins have
// lost the other margin comes from paragraph style, getting a bad
// margin from the default style
@@ -835,7 +785,6 @@ DECLARE_OOXMLEXPORT_TEST(testMarginsFromStyle, "margins_from_style.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf104348_contextMargin, "tdf104348_contextMargin.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#104348 shows that ContextMargin belongs with Top/Bottom handling
uno::Reference<beans::XPropertySet> xMyStyle(getStyles("ParagraphStyles")->getByName("MyStyle"), uno::UNO_QUERY);
@@ -848,7 +797,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104348_contextMargin, "tdf104348_contextMargin.d
DECLARE_OOXMLEXPORT_TEST(testTdf118521_marginsLR, "tdf118521_marginsLR.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#118521 paragraphs with direct formatting of only some of left, right, or first margins have
// lost the other unset margins coming from paragraph style, getting a bad margin from the default style instead
@@ -886,7 +834,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf104797, "tdf104797.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf113608_runAwayNumbering, "tdf113608_runAwayNumbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// check that an incorrect numbering style is not applied
// after removing a w:r-less paragraph
CPPUNIT_ASSERT_EQUAL(OUString(), getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
@@ -894,7 +841,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf113608_runAwayNumbering, "tdf113608_runAwayNumbe
DECLARE_OOXMLEXPORT_TEST(testTdf119188_list_margin_in_cell, "tdf119188_list_margin_in_cell.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -914,7 +860,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119188_list_margin_in_cell, "tdf119188_list_marg
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testChart_BorderLine_Style, "Chart_BorderLine_Style.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* DOCX containing Chart with BorderLine Style as Dash Type should get preserved
* inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
*/
@@ -926,7 +871,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testChart_BorderLine_Style, "Chart_BorderLin
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testChart_Plot_BorderLine_Style, "Chart_Plot_BorderLine_Style.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* DOCX containing Chart wall (plot area) and Chart Page with BorderLine Style as Dash Type
* should get preserved inside an XML tag <a:prstDash> with value "dash", "sysDot, "lgDot", etc.
*/
@@ -938,14 +882,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testChart_Plot_BorderLine_Style, "Chart_Plot
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesDeletedEmptyParagraph, "testTrackChangesDeletedEmptyParagraph.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:pPr/w:rPr/w:del");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesEmptyParagraphsInADeletion, "testTrackChangesEmptyParagraphsInADeletion.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
for (int i = 1; i < 12; ++i)
assertXPath(pXmlDoc, "/w:document/w:body/w:p[" + OString::number(i) + "]/w:pPr/w:rPr/w:del");
@@ -953,7 +895,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTrackChangesEmptyParagraphsInADeletion,
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf70234, "tdf70234.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// import field with tracked deletion
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:del/w:r[1]/w:fldChar");
@@ -967,7 +908,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf70234, "tdf70234.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115212, "tdf115212.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// export field with tracked deletion
assertXPath(pXmlDoc, "//w:p[2]/w:del[1]/w:r[1]/w:fldChar");
@@ -975,7 +915,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115212, "tdf115212.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126243, "tdf120338.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// export change tracking rejection data for tracked paragraph style change
assertXPath(pXmlDoc, "/w:document/w:body/w:p[11]/w:pPr/w:pPrChange/w:pPr/w:pStyle", "val", "Heading3");
@@ -983,7 +922,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126243, "tdf120338.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126245, "tdf126245.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// export change tracking rejection data for tracked numbering change
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:pPrChange/w:pPr/w:numPr/w:numId", "val", "1");
@@ -991,7 +929,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf126245, "tdf126245.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124491, "tdf124491.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// import format change of empty lines, FIXME: change w:r with w:pPr in export
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/*/w:rPr/w:rPrChange");
@@ -1002,7 +939,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124491, "tdf124491.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105485, "tdf105485.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// import change tracking of deleted comments
assertXPath(pXmlDoc, "//w:del/w:r/w:commentReference");
@@ -1010,7 +946,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105485, "tdf105485.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125894, "tdf125894.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// import change tracking in frames
assertXPath(pXmlDoc, "//w:del", 2);
@@ -1019,7 +954,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125894, "tdf125894.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128156, "tdf128156.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// import change tracking in frames
assertXPath(pXmlDoc, "//w:ins");
@@ -1027,7 +961,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128156, "tdf128156.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125546, "tdf125546.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// compress redlines (it was 15)
assertXPath(pXmlDoc, "//w:rPrChange", 2);
@@ -1035,7 +968,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125546, "tdf125546.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLabelWidthAndPosition_Left_FirstLineIndent, "Hau_min_list2.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// list is LABEL_WIDTH_AND_POSITION with SvxAdjust::Left
// I) LTR
@@ -1138,7 +1070,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLabelWidthAndPosition_Left_FirstLineInde
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124604, "tdf124604.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// If the numbering comes from a base style, indentation of the base style has also priority.
assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", "0");
@@ -1146,7 +1077,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf124604, "tdf124604.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf95374, "tdf95374.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Numbering disabled by non-existent numId=0, disabling also inheritance of indentation of parent styles
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:ind", "hanging", "0");
@@ -1155,7 +1085,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf95374, "tdf95374.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf108493, "tdf108493.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// set in the paragraph
assertXPath(pXmlDoc, "/w:document/w:body/w:p[7]/w:pPr/w:ind", "start", "709");
@@ -1165,7 +1094,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf108493, "tdf108493.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf118691, "tdf118691.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
uno::UNO_QUERY);
@@ -1246,7 +1174,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77417, "tdf77417.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130494, "tdf130494.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight", "val", "yellow");
// keep direct formatting of table cell paragraph with removed highlighting
@@ -1255,7 +1182,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130494, "tdf130494.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130690, "tdf130690.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:highlight", "val", "yellow");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:r[1]/w:rPr/w:highlight", 1);
@@ -1265,7 +1191,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130690, "tdf130690.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105215, "tdf105215.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:pPr/w:rPr/w:rFonts", "ascii", "Linux Libertine G");
@@ -1280,7 +1205,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf105215, "tdf105215.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagraphs, "tdf121597.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// check paragraphs with removed paragraph mark
@@ -1294,7 +1218,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagr
DECLARE_OOXMLEXPORT_TEST(testTdf123189_tableBackground, "table-black_fill.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1327,7 +1250,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123054, "tdf123054.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD_DATABASE, "tdf67207.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// database fields use the database "database" and its table "Sheet1"
uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(2), 2), "TextField");
CPPUNIT_ASSERT(xTextField.is());
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 7fd2ec0e5e72..ff7bbc5e4b01 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -38,7 +38,6 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testTableCrossReference, "table_cross_reference.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#42346: Cross references to tables were not saved
// MSO uses simple bookmarks for referencing table caption, so we do the same by export
if (!mbExported)
@@ -212,7 +211,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableCrossReference, "table_cross_reference.odt")
DECLARE_OOXMLEXPORT_TEST(testTableCrossReferenceCustomFormat,
"table_cross_reference_custom_format.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#42346: Cross references to tables were not saved
// Check also captions with custom formatting
if (!mbExported)
@@ -346,7 +344,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableCrossReferenceCustomFormat,
DECLARE_OOXMLEXPORT_TEST(testObjectCrossReference, "object_cross_reference.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// tdf#42346: Cross references to objects were not saved
// MSO uses simple bookmarks for referencing table caption, so we do the same by export
if (!mbExported)
@@ -679,7 +676,6 @@ DECLARE_OOXMLEXPORT_TEST(testObjectCrossReference, "object_cross_reference.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf112202, "090716_Studentische_Arbeit_VWS.docx")
{
- CPPUNIT_ASSERT_EQUAL(6, getPages());
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
// page 1 header: 1 paragraph, 2 flys, 1 draw object
@@ -725,7 +721,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112202, "090716_Studentische_Arbeit_VWS.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFields.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//using .doc input file to verify cross-format compatibility.
uno::Reference<text::XFormField> xFormField
= getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(5), 3), "Bookmark");
@@ -784,7 +779,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFi
DECLARE_OOXMLEXPORT_TEST(testTdf120224_textControlCrossRef, "tdf120224_textControlCrossRef.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(),
uno::UNO_QUERY);
@@ -822,7 +816,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120224_textControlCrossRef, "tdf120224_textContr
DECLARE_OOXMLEXPORT_TEST(testTdf117504_numberingIndent, "tdf117504_numberingIndent.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
OUString sName = getProperty<OUString>(getParagraph(1), "NumberingStyleName");
CPPUNIT_ASSERT_MESSAGE("Paragraph has numbering style", !sName.isEmpty());
@@ -835,7 +828,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117504_numberingIndent, "tdf117504_numberingInde
DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
sal_Int32 nHeight = xShape->getSize().Height;
@@ -850,7 +842,6 @@ DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark.docx")
DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> xShape = getShape(1);
// Rounding errors
@@ -864,7 +855,6 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf73547, "tdf73547-dash.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
double nD = getXPath(pXmlDoc, "//a:custDash/a:ds[1]", "d").toDouble();
CPPUNIT_ASSERT_DOUBLES_EQUAL(105000.0, nD, 5000.0); // was 100000
@@ -874,7 +864,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf73547, "tdf73547-dash.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The runs inside <w:dir> were ignored
const OUString sParaText = getParagraph(1)->getString();
CPPUNIT_ASSERT_EQUAL(
@@ -895,7 +884,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119143, "tdf119143.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf105444, "tdf105444.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlComm = parseExport("word/comments.xml");
if (!pXmlComm)
return;
@@ -905,7 +893,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105444, "tdf105444.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Paragraphs were not part of a numbering anymore after roundtrip.
uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xPara1.is());
@@ -922,7 +909,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117137, "tdf117137.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99631, "tdf99631.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "//w:object", 2);
@@ -937,7 +923,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99631, "tdf99631.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf122563, "tdf122563.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/w:object", 1);
@@ -967,7 +952,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf94628, "tdf94628.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// test import/export of ActiveTable (visible sheet) of embedded XLSX OLE objects
uno::Reference<text::XTextEmbeddedObjectsSupplier> xEmbeddedObjectsSupplier(mxComponent,
uno::UNO_QUERY);
@@ -1026,7 +1010,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122594, "tdf122594.docx")
DECLARE_OOXMLEXPORT_TEST(testLanguageInGroupShape, "tdf131922_LanguageInGroupShape.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#131922: Check if good language is used in shape group texts
xmlDocUniquePtr pXml = parseExport("word/document.xml");
if (!pXml)
@@ -1040,7 +1023,6 @@ DECLARE_OOXMLEXPORT_TEST(testLanguageInGroupShape, "tdf131922_LanguageInGroupSha
DECLARE_OOXMLEXPORT_TEST(testTdf116883, "tdf116883.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
{
uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("1>1>"), getProperty<OUString>(xPara, "ListLabelString"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 5740055965c5..d7102f0631ee 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -82,7 +82,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF2, "tdf121374_sectionHF2.doc")
DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
OUString listId;
OUString listStyle;
{
@@ -116,7 +115,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95848, "tdf95848.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95848_2, "tdf95848_2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
OUString listId;
OUString listStyle;
{
@@ -182,7 +180,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95848_2, "tdf95848_2.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf108496, "tdf108496.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
OUString listId;
OUString listStyle;
// Lists with override
@@ -260,13 +257,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf108496, "tdf108496.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf126723, "tdf126723.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaLeftMargin"));
}
DECLARE_OOXMLEXPORT_TEST(testendingSectionProps, "endingSectionProps.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xHeaderText = getProperty< uno::Reference<text::XTextRange> >(xPageStyle, "HeaderText");
CPPUNIT_ASSERT_EQUAL( OUString("General header"), xHeaderText->getString());
@@ -283,7 +278,6 @@ DECLARE_OOXMLEXPORT_TEST(testendingSectionProps, "endingSectionProps.docx")
DECLARE_OOXMLEXPORT_TEST(testTbrlTextbox, "tbrl-textbox.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
// Without the accompanying fix in place, this test would have failed with 'Expected: -90;
@@ -294,7 +288,6 @@ DECLARE_OOXMLEXPORT_TEST(testTbrlTextbox, "tbrl-textbox.docx")
DECLARE_OOXMLEXPORT_TEST(testBtlrShape, "btlr-textbox.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -311,7 +304,6 @@ DECLARE_OOXMLEXPORT_TEST(testBtlrShape, "btlr-textbox.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This should be roughly .8*35% of the ORIGINAL(non-reduced) size. However, during export the
// proportional height has to be changed into direct formatting, which then changes the relative percent.
// In this case, a 24pt font, proportional at 65% becomes roughly a 16pt font.
@@ -334,7 +326,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement
DECLARE_OOXMLEXPORT_TEST(testTdf99602_subscript_charStyleSize, "tdf99602_subscript_charStyleSize.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
// The word "Base" should not be subscripted.
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
@@ -344,7 +335,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99602_subscript_charStyleSize, "tdf99602_subscri
DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript, "tdf99602_charStyleSubscript.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
// The word "Base" should not be subscripted.
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base"), "CharEscapement"), 0);
@@ -355,7 +345,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript, "tdf99602_charStyleSub
DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript2, "tdf99602_charStyleSubscript2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// *_In styles_*, don't let the proportionality/escapement affect the fontsize - otherwise it starts doubling up,
// so instead just throw away the values and use the default settings instead - meaning fontsize is unaffected.
// subscript custom: Proportional size is 80%, lower by 25%.
@@ -368,7 +357,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99602_charStyleSubscript2, "tdf99602_charStyleSu
DECLARE_OOXMLEXPORT_TEST(testTdf124637_sectionMargin, "tdf124637_sectionMargin.docx")
{
- CPPUNIT_ASSERT_EQUAL(7, getPages());
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
// sections 0 and 1 must be related to footnotes...
@@ -417,7 +405,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123636_newlinePageBreak4, "tdf123636_newlinePage
DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle, "tdf118947_tableStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
@@ -451,7 +438,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle, "tdf118947_tableStyle.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle2, "tdf118947_tableStyle2.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
// This cell is affected by compatSetting overrideTableStyleFontSizeAndJustification=1 (no goofy exception)
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A2"), uno::UNO_QUERY);
@@ -469,7 +455,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf118947_tableStyle2, "tdf118947_tableStyle2.docx"
DECLARE_OOXMLEXPORT_TEST(tdf123912_protectedForm, "tdf123912_protectedForm.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -485,7 +470,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf123912_protectedForm, "tdf123912_protectedForm.odt")
DECLARE_OOXMLEXPORT_TEST(tdf124600b, "tdf124600b.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// <wp:anchor allowOverlap="0"> was lost on roundtrip, we always wrote "1" on export.
bool bAllowOverlap1 = getProperty<bool>(getShape(1), "AllowOverlap");
CPPUNIT_ASSERT(!bAllowOverlap1);
@@ -495,7 +479,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf124600b, "tdf124600b.docx")
DECLARE_OOXMLEXPORT_TEST(testDateControl, "empty-date-control.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Check that we exported the empty date control correctly
// Date form field is converted to date content control.
if (!mbExported)
@@ -542,7 +525,6 @@ DECLARE_OOXMLEXPORT_TEST(testDateControl, "empty-date-control.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf121867, "tdf121867.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
SwEditShell* pEditShell = pTextDoc->GetDocShell()->GetEditShell();
// Without the accompanying fix in place, this test would have failed with
@@ -552,7 +534,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121867, "tdf121867.odt")
DECLARE_OOXMLEXPORT_TEST(testParaAdjustDistribute, "para-adjust-distribute.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the accompanying fix in place, this test would have failed with
// 'Expected: 2; Actual : 0', i.e. the first paragraph's ParaAdjust was
// left, not block.
@@ -573,7 +554,6 @@ DECLARE_OOXMLEXPORT_TEST(testParaAdjustDistribute, "para-adjust-distribute.docx"
DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (!mbExported) // importing the ODT, an input field
{
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
@@ -602,7 +582,6 @@ DECLARE_OOXMLEXPORT_TEST(testInputListExport, "tdf122186_input_list.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf116371, "tdf116371.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Make sure the rotation is exported correctly, and size not distorted
auto xShape(getShape(1));
CPPUNIT_ASSERT_DOUBLES_EQUAL(4700.0, getProperty<double>(xShape, "RotateAngle"), 10);
@@ -613,7 +592,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf116371, "tdf116371.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFrameSizeExport, "floating-tables-anchor.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Make sure the table width is 4000
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl[1]/w:tblPr/w:tblW", "w", "4000");
@@ -621,7 +599,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFrameSizeExport, "floating-tables-anchor
DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Visibility of shapes wasn't imported/exported, for now base printable property on that, too
auto xShape(getShape(1));
CPPUNIT_ASSERT_MESSAGE("First shape should be visible.", getProperty<bool>(xShape, "Visible"));
@@ -636,7 +613,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf119201, "tdf119201.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pDump = parseLayoutDump();
// Without the accompanying fix in place, this test would have failed, as the portion text was
// only "Er horte leise Schritte hinter", which means the 1st line of the 2nd paragraph was
@@ -647,7 +623,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTextInput, "textinput.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -739,7 +714,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf123460, "tdf123460.docx")
//tdf#125298: fix charlimit restrictions in bookmarknames and field references if they contain non-ascii characters
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125298, "tdf125298_crossreflink_nonascii_charlimit.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// check whether test file keeps non-ascii values or not
OUString bookmarkName1 = getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:bookmarkStart[1]", "name");
@@ -774,7 +748,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf121784, "tdf121784.docx")
DECLARE_OOXMLEXPORT_TEST(testTbrlFrameVml, "tbrl-frame-vml.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextFrame(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xTextFrame.is());
@@ -798,7 +771,6 @@ DECLARE_OOXMLEXPORT_TEST(testTbrlFrameVml, "tbrl-frame-vml.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf119037, "tdf119037.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXmlDoc);
@@ -855,7 +827,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf119037, "tdf119037.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125657, "tdf125657.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXmlDoc);
auto checkAttrIsInt = [&](const OString& sAttrName) {
@@ -881,7 +852,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125657, "tdf125657.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
discardDumpedLayout();
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
assertXPath(pXmlDoc, "/root/page/body/txt[2]/anchored/fly/tab/infos/bounds", "top", "4193");
@@ -889,7 +859,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf125324, "tdf125324.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf78657, "tdf78657_picture_hyperlink.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
if (!pXmlDoc || !pXmlRels)
@@ -901,7 +870,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf78657, "tdf78657_picture_hyperlink.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBtlrFrame, "btlr-frame.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
comphelper::SequenceAsHashMap aGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
// Without the accompanying fix in place, this test would have failed with 'Expected:
@@ -912,7 +880,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBtlrFrame, "btlr-frame.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125518, "tdf125518.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -935,7 +902,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf125518, "tdf125518.odt")
DECLARE_OOXMLEXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
CPPUNIT_ASSERT_EQUAL(OUString("Text"),
getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
@@ -953,7 +919,6 @@ DECLARE_OOXMLEXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131594, "tdf131594.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// lnNumType should not be exported if w:countBy="0"
assertXPath(pXmlDoc, "/w:document/w:body/w:sectPr/w:lnNumType", 0);
@@ -961,7 +926,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131594, "tdf131594.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121663, "tdf121663.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// auto distance of line numbering is 0.5 cm
assertXPath(pXmlDoc, "//w:lnNumType", "distance", "283");
@@ -969,7 +933,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121663, "tdf121663.docx")
DECLARE_OOXMLEXPORT_TEST(testInvalidDateFormField, "invalid_date_form_field.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -1047,7 +1010,6 @@ DECLARE_OOXMLEXPORT_TEST(testInvalidDateFormField, "invalid_date_form_field.docx
DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Fill transparency was lost during export
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int16(50), getProperty<sal_Int16>(xShape, "FillTransparence"));
@@ -1055,7 +1017,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf127085, "tdf127085.docx")
DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Combobox without an item list lost during import
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
@@ -1066,7 +1027,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf119809, "tdf119809.docx")
DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Unicode characters were converted to question marks.
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
@@ -1077,7 +1037,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf118169, "tdf118169.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127116, "tdf127116.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -1088,7 +1047,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127116, "tdf127116.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf127339, "tdf127339.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
if (!pXmlRels)
return;
@@ -1098,7 +1056,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127339, "tdf127339.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127362, "tdf127362.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
xmlDocUniquePtr pXmlRels = parseExport("word/_rels/document.xml.rels");
@@ -1112,7 +1069,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127362, "tdf127362.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127605, "tdf127605.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart", "name");
@@ -1122,7 +1078,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127605, "tdf127605.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127732, "internal_hyperlink_frame.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/mc:AlternateContent/mc:Fallback/w:pict/v:rect/v:textbox/w:txbxContent/w:p/w:bookmarkStart", "name");
@@ -1132,7 +1087,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127732, "internal_hyperlink_frame.odt
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127733, "internal_hyperlink_ole.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -1143,7 +1097,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127733, "internal_hyperlink_ole.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127734, "internal_hyperlink_region.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart", "name");
@@ -1153,7 +1106,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127734, "internal_hyperlink_region.od
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127735, "internal_hyperlink_table.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
OUString bookmarkName = getXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:bookmarkStart", "name");
@@ -1163,7 +1115,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127735, "internal_hyperlink_table.odt
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123628, "tdf123628.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
@@ -1176,7 +1127,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123628, "tdf123628.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
uno::Reference<beans::XPropertySet> xRun(getRun(xPara,1), uno::UNO_QUERY);
OUString unVisitedStyleName = getProperty<OUString>(xRun, "UnvisitedCharStyleName");
@@ -1187,7 +1137,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127741, "tdf127741.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf127925, "tdf127925.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlStyles = parseExport("word/styles.xml");
if (!pXmlStyles)
return;
@@ -1197,14 +1146,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf127925, "tdf127925.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127579, "tdf127579.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink/w:r/w:rPr/w:rStyle", "val", "InternetLink");
}
DECLARE_OOXMLEXPORT_TEST(testTdf128304, "tdf128304.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
css::text::WritingMode eMode;
uno::Reference<beans::XPropertySet> xProps1(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xProps1->getPropertyValue("TextWritingMode") >>= eMode);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index fb1519da898f..358ed59bd4ae 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -73,7 +73,6 @@ DECLARE_OOXMLIMPORT_TEST(Tdf130907,"tdf130907.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf78749, "tdf78749.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//Shape lost the background image before, now check if it still has...
auto xShape = getShape(1);
uno::Reference<beans::XPropertySet> xShpProps(xShape, uno::UNO_QUERY);
@@ -84,7 +83,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf78749, "tdf78749.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128207, "tdf128207.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//There was the charts on each other, because their horizontal and vertical position was 0!
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(p_XmlDoc);
@@ -93,7 +91,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128207, "tdf128207.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123873, "tdf123873.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//OLE Object were overlapped due to missing wrap import
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(p_XmlDoc);
@@ -112,7 +109,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf130814model, "tdf130814.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107020, "tdf107020.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(p_XmlDoc);
assertXPath(
@@ -127,7 +123,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107020, "tdf107020.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130814ooxml, "tdf130814.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(p_XmlDoc);
assertXPath(
@@ -176,7 +171,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf129888dml, "tdf129888dml.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130120, "tdf130120.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
//Text for exporting the allowincell attribute:
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
assertXPath(p_XmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:p/w:r/mc:AlternateContent/"
@@ -186,7 +180,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf130120, "tdf130120.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf87569v, "tdf87569_vml.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//the original tdf87569 sample has vml shapes...
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
bool bValue;
@@ -197,7 +190,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569v, "tdf87569_vml.docx")
DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -211,7 +203,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.docx")
DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -225,7 +216,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZero3Numbering, "arabic-zero3-numbering.docx")
DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -239,7 +229,6 @@ DECLARE_ODFEXPORT_TEST(testArabicZero4Numbering, "arabic-zero4-numbering.docx")
DECLARE_ODFEXPORT_TEST(testArabicZero5Numbering, "arabic-zero5-numbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -309,7 +298,6 @@ CPPUNIT_TEST_FIXTURE(Test, testChicagoNumberingFootnote)
DECLARE_OOXMLEXPORT_TEST(testTdf87569d, "tdf87569_drawingml.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//if the original tdf87569 sample is upgraded it will have drawingml shapes...
uno::Reference<beans::XPropertySet> xShapeProperties(getShape(1), uno::UNO_QUERY);
bool bValue;
@@ -320,7 +308,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf87569d, "tdf87569_drawingml.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf130610, "tdf130610_bold_in_2_styles.ott")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check character properties
{
uno::Reference<beans::XPropertySet> xStyle(
@@ -349,7 +336,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf130610, "tdf130610_bold_in_2_styles.ott")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121045, "tdf121045.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc[1]/w:p/w:pPr/w:rPr/w:sz", "val", "20");
@@ -371,7 +357,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121045, "tdf121045.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf92472, "tdf92472.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXmlDoc);
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:pPr/w:rPr/w:sz", "val", "20");
@@ -393,7 +378,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf92472, "tdf92472.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf131260, "tdf131260.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
uno::UNO_QUERY);
@@ -404,7 +388,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf131260, "tdf131260.docx")
}
DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#120315 cells of the second column weren't vertically merged
// because their horizontal positions are different a little bit
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -422,7 +405,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120315, "tdf120315.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf108350_noFontdefaults, "tdf108350_noFontdefaults.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("NoParent"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(OUString("Times New Roman"), getProperty<OUString>(xStyleProps, "CharFontName"));
@@ -438,7 +420,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123116_oversizedRowSplit, "tdf123116_oversizedRo
DECLARE_OOXMLEXPORT_TEST(testPageContentBottom, "page-content-bottom.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
// Without the accompanying fix in place, this test would have failed with:
@@ -450,7 +431,6 @@ DECLARE_OOXMLEXPORT_TEST(testPageContentBottom, "page-content-bottom.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf129522_removeShadowStyle, "tdf129522_removeShadowStyle.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("Shadow"), uno::UNO_QUERY_THROW);
table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xStyleProps, "ParaShadowFormat");
@@ -473,7 +453,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129522_removeShadowStyle, "tdf129522_removeShado
DECLARE_OOXMLEXPORT_TEST(testTdf130167_spilloverHeaderShape, "testTdf130167_spilloverHeader.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextGraphicObjectsSupplier> xTextGraphicObjectsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xNameAccess(
xTextGraphicObjectsSupplier->getGraphicObjects(), uno::UNO_QUERY);
@@ -546,7 +525,6 @@ DECLARE_OOXMLIMPORT_TEST(testTdf125038c, "tdf125038c.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf121661, "tdf121661.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
if (!pXmlSettings)
return;
@@ -555,7 +533,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121661, "tdf121661.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf121658, "tdf121658.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
if (!pXmlSettings)
return;
@@ -698,7 +675,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132766, "tdf132766.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf124367, "tdf124367.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(),
uno::UNO_QUERY);
@@ -745,7 +721,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf95189, "tdf95189.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128820, "tdf128820.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Import of exported DOCX failed because of wrong namespace used for wsp element
// Now test the exported XML, in case we stop failing opening invalid files
xmlDocUniquePtr pXml = parseExport("word/document.xml");
@@ -771,7 +746,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128820, "tdf128820.fodt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128889, "tdf128889.fodt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXml = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXml);
// There was an w:r (with w:br) as an invalid child of first paragraph's w:pPr
@@ -799,7 +773,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132754, "tdf132754.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(8, getParagraphs());
getParagraph(1, "(Verne, 1870)");
getParagraph(2, "Bibliography");
@@ -827,7 +800,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129353, "tdf129353.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77796, "tdf77796.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXml = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXml);
// cell paddings from table style
@@ -840,7 +812,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf77796, "tdf77796.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128290, "tdf128290.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXml = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXml);
assertXPath(pXml, "/w:document/w:body/w:tbl/w:tblPr/w:tblLayout", "type", "fixed");
@@ -848,7 +819,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128290, "tdf128290.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123757, "tdf123757.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXml = parseExport("word/document.xml");
CPPUNIT_ASSERT(pXml);
assertXPath(pXml, "/w:document/w:body/w:tbl", 2);
@@ -856,7 +826,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf123757, "tdf123757.docx")
DECLARE_OOXMLEXPORT_TEST(testContSectBreakHeaderFooter, "cont-sect-break-header-footer.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// Load a document with a continuous section break on page 2.
CPPUNIT_ASSERT_EQUAL(OUString("First page header, section 1"),
parseDump("/root/page[1]/header/txt/text()"));
@@ -900,7 +869,6 @@ DECLARE_OOXMLEXPORT_TEST(testContSectBreakHeaderFooter, "cont-sect-break-header-
DECLARE_OOXMLEXPORT_TEST(testHyphenationAuto, "hyphenation.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Explicitly set hyphenation=auto on document level
xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml");
CPPUNIT_ASSERT(pXmlSettings);
@@ -919,7 +887,6 @@ DECLARE_OOXMLEXPORT_TEST(testHyphenationAuto, "hyphenation.odt")
DECLARE_OOXMLEXPORT_TEST(testStrikeoutGroupShapeText, "tdf131776_StrikeoutGroupShapeText.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#131776: Check if strikeout is used in shape group texts
xmlDocUniquePtr pXml = parseExport("word/document.xml");
if (!pXml)
@@ -960,7 +927,6 @@ DECLARE_OOXMLEXPORT_TEST(testStrikeoutGroupShapeText, "tdf131776_StrikeoutGroupS
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131539, "tdf131539.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//The positions of OLE objects were not exported, check if now it is exported correctly
xmlDocUniquePtr p_XmlDoc = parseExport("word/document.xml");
CPPUNIT_ASSERT(p_XmlDoc);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 5a3b5d570252..a8e4f3d5fc5b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -47,7 +47,6 @@ protected:
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76248, "FDO76248.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// In two cases the a:graphicData elements had no children, which is invalid.
assertXPath(pXmlDoc, "//a:graphicData[not(*)]", 0);
@@ -55,7 +54,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76248, "FDO76248.docx")
DECLARE_OOXMLEXPORT_TEST(testTscp, "tscp.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<uno::XComponentContext> xComponentContext(comphelper::getProcessComponentContext());
uno::Reference<rdf::XURI> xType = rdf::URI::create(xComponentContext, "urn:bails");
uno::Reference<rdf::XDocumentMetadataAccess> xDocumentMetadataAccess(mxComponent, uno::UNO_QUERY);
@@ -95,7 +93,6 @@ DECLARE_OOXMLEXPORT_TEST(testTscp, "tscp.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo76589 , "fdo76589.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Numbered list was not preserve after RT.
* In numbering.xml, when NumberingType is "decimal" and level is zero,
* w:val of w:lvlText was empty.
@@ -108,7 +105,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo76589 , "fdo76589.docx")
DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-leveltext.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was "%1", not empty: we turned a kind-of-none numbering into a decimal one.
if (xmlDocUniquePtr pXmlDoc = parseExport("word/numbering.xml"))
assertXPath (pXmlDoc, "/w:numbering/w:abstractNum[1]/w:lvl[1]/w:lvlText","val", "");
@@ -116,14 +112,12 @@ DECLARE_OOXMLEXPORT_TEST(testDecimalNumberingNoLeveltext, "decimal-numbering-no-
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testNoDuplicateAttributeExport, "duplicate-east-asia.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// File asserting while saving in LO.
parseExport("word/document.xml");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79008, "fdo79008.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* File crashing while saving in LO.
* Check if document.xml file is created after fix
*/
@@ -137,7 +131,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79008, "fdo79008.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyProtection, "tdf120852_readOnlyProtection.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml"))
{
assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "enforcement", "1");
@@ -152,7 +145,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyProtection, "tdf120852_readOnlyPr
DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyUnProtected, "tdf120852_readOnlyUnProtected.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Readonly is not enforced, just a suggestion,
// so when a section is protected, the document should enable forms protection.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
@@ -180,7 +172,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120852_readOnlyUnProtected, "tdf120852_readOnlyU
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAuthorPropertySdt, "author-property.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", "xpath", "/ns1:coreProperties[1]/ns0:creator[1]");
@@ -192,7 +183,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAuthorPropertySdt, "author-property.docx
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76586, "fdo76586.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* In the test file gridCol had only one value for entire table width
* while there are two cells in a table row.
@@ -207,7 +197,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76586, "fdo76586.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76587 , "fdo76587.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml");
assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "line", "240");
assertXPath(pXmlDoc, "/w:styles/w:style[8]/w:pPr/w:spacing", "lineRule", "auto");
@@ -215,7 +204,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76587 , "fdo76587.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77890 , "fdo77890.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
/*
Ensure that the page break is preserved i.e it should not be converted to a section break, in case
if the different first page is set for the pages in the document.
@@ -249,7 +237,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131819, "NumberedList.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131959, "NumberedList.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// import tblInd from table style
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// These were 0.
@@ -259,7 +246,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131959, "NumberedList.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76597, "fdo76597.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check XML
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:pPr/w:spacing", "before", "96");
@@ -268,7 +254,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76597, "fdo76597.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testContentTypeTIF, "fdo77476.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc, "/ContentType:Types/ContentType:Override[@ContentType='image/tiff']", "PartName", "/word/media/image1.tif");
@@ -276,7 +261,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testContentTypeTIF, "fdo77476.docx")
DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xShape(xGroup->getByIndex(0), uno::UNO_QUERY);
// This checks textbox textrun size of font which is in group shape.
@@ -285,7 +269,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFloatingTable, "fdo77887.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tblPr[1]/w:tblpPr[1]", "horzAnchor", "margin");
@@ -301,7 +284,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFloatingTable, "fdo77887.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeRight, "tdf90681-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:tcPr/w:vMerge", "val", "restart");
@@ -312,7 +294,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeRight, "tdf90681-1.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOldComplexMergeleft, "tdf90681-2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:tcPr/w:vMerge", "val", "restart");
@@ -331,7 +312,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlinkContainingPlaceholderField, "hy
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTablePreferredWidth, "tablePreferredWidth.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Problem :If the table preferred width is in percent, then after RT it changes to 0 & width type changes
@@ -342,7 +322,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTablePreferredWidth, "tablePreferredWidt
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO75431, "fdo75431.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "//w:tbl", 2);
@@ -351,7 +330,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO75431, "fdo75431.docx")
DECLARE_OOXMLEXPORT_TEST(testFDO77725, "fdo77725.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
if (!pXmlFootnotes)
return;
@@ -363,7 +341,6 @@ DECLARE_OOXMLEXPORT_TEST(testFDO77725, "fdo77725.docx")
DECLARE_OOXMLEXPORT_TEST(testFieldRotation, "field-rotated.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> const xRun(getRun(uno::Reference<text::XTextRange>(getParagraphOrTable(1), uno::UNO_QUERY), 1));
uno::Reference<text::XTextField> const xField(getProperty<uno::Reference<text::XTextField>>(xRun, "TextField"));
CPPUNIT_ASSERT(xField.is());
@@ -375,7 +352,6 @@ DECLARE_OOXMLEXPORT_TEST(testFieldRotation, "field-rotated.fodt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFootnoteSeparator, "footnotesep.fodt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// footnote separator definitions - taken from default page style
xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
assertXPath(pXmlFootnotes, "/w:footnotes[1]/w:footnote[1]", "id", "0");
@@ -395,7 +371,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFootnoteSeparator, "footnotesep.fodt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121441, "tdf121441.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlFootnotes = parseExport("word/footnotes.xml");
assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r[1]/w:rPr/w:rStyle", 1);
assertXPath(pXmlFootnotes, "/w:footnotes/w:footnote[3]/w:p/w:r[2]/w:rPr/w:rStyle", 0);
@@ -410,7 +385,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121441, "tdf121441.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77812, "fdo77812.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Additional sectPr was getting inserted and hence Column properties
* were getting added into this additional sectPr instead of Default setPr.
*/
@@ -427,7 +401,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77812, "fdo77812.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testContentTypeOLE, "fdo77759.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc,
@@ -451,7 +424,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testContentTypeOLE, "fdo77759.docx")
DECLARE_OOXMLEXPORT_TEST(testfdo78420, "fdo78420.docx")
{
- CPPUNIT_ASSERT_EQUAL(23, getPages());
xmlDocUniquePtr pXmlHeader = parseExport("word/header2.xml");
if (!pXmlHeader)
@@ -467,7 +439,6 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78420, "fdo78420.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageBreakInFirstPara,"fdo77727.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
/* Break to next page was not exported if it is in first paragraph of the section.
* Now after fix , LO writes Next Page Break and also preserves <w:br> tag.
*/
@@ -478,7 +449,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageBreakInFirstPara,"fdo77727.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78284, "fdo78284.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc,"/ContentType:Types/ContentType:Override[@PartName='/word/media/OOXDiagramDataRels1_0.png']",
"ContentType",
@@ -487,14 +457,12 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78284, "fdo78284.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78384,"fdo78384.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/w:rPr/w:rFonts","ascii","Wingdings");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78469, "fdo78469.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
// make sure dataBinding & text tags not present in sdtcontent
assertXPath(pXmlDoc, "/w:hdr[1]/w:tbl[1]/w:tr[1]/w:tc[2]/w:p[1]/w:sdt[2]/w:sdtPr[1]/w:dataBinding[1]",0);
@@ -503,7 +471,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78469, "fdo78469.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78887, "fdo78887.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[1]/w:br[1]", 1);
@@ -513,7 +480,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78887, "fdo78887.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78887b, "missing_newline.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:p[1]/w:r[2]/w:br[1]", 1);
@@ -524,7 +490,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78887b, "missing_newline.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo78651, "fdo78651.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// ensure that there are only two tables
assertXPath(pXmlDoc, "//w:tbl", 2);
@@ -532,7 +497,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo78651, "fdo78651.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78882, "fdo78882.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Ensure that Section Break is getting written inside second paragraph
@@ -544,7 +508,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78882, "fdo78882.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo76934, "fdo76934.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Issue was, AutoSpacing property if present inside styles.xml, LO was not able to
* preserve it.
*/
@@ -557,7 +520,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo76934, "fdo76934.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79540, "fdo79540.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Issue was, <w:drawing> was getting written inside <w:drawing>.
* So postpone the writing of Inner Drawing tag.
* MS Office does not allow nesting of drawing tags.
@@ -572,7 +534,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79540, "fdo79540.docx")
DECLARE_OOXMLEXPORT_TEST(testFDO79062, "fdo79062.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlFootNotes = parseExport("word/footnotes.xml");
if (!pXmlFootNotes)
return;
@@ -618,7 +579,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf123262_textFootnoteSeparators, "tdf123262_textFo
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79668,"fdo79668.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// fdo#79668: Document was Crashing on DebugUtil build while Saving
// because of repeated attribute value in same element.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -630,7 +590,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79668,"fdo79668.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78907,"fdo78907.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page" );
@@ -642,7 +601,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78907,"fdo78907.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(tdf118702,"tdf118702.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:type", "val", "nextPage" );
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:pPr/w:sectPr/w:pgSz", "orient", "landscape" );
@@ -650,7 +608,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(tdf118702,"tdf118702.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79822, "fdo79822.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* File getting crash while saving in LO.
* The Docx contain smartart and the file was created in ms word 2007
*/
@@ -659,7 +616,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79822, "fdo79822.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO79915, "fdo79915.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[10]/w:t", "How much buoyancy does the water provide?");
@@ -667,7 +623,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO79915, "fdo79915.docx")
DECLARE_OOXMLEXPORT_TEST(testfdo79817, "fdo79817.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "storeItemID", "{9222E47B-A68B-4AEB-9855-21C912B9D3D2}");
@@ -678,7 +633,6 @@ DECLARE_OOXMLEXPORT_TEST(testfdo79817, "fdo79817.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79968_sldx, "fdo79968.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This UT for DOCX embedded with powerpoint slide
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
@@ -703,7 +657,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79968_sldx, "fdo79968.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79969_xlsb, "fdo79969_xlsb.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This UT for DOCX embedded with binary excel work sheet.
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
@@ -728,7 +681,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79969_xlsb, "fdo79969_xlsb.docx")
DECLARE_OOXMLEXPORT_TEST(testfdo80097, "fdo80097.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
//fdo#76635 : Table borders are not getting preserved.
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
@@ -752,7 +704,6 @@ DECLARE_OOXMLEXPORT_TEST(testfdo80097, "fdo80097.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf95033, "tdf95033.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
//tdf#95033 : Table borders defined by row-level tblPrEx are not getting preserved.
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
@@ -770,7 +721,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95033, "tdf95033.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -785,7 +735,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128646, "tdf128646.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf119800, "tdf119800.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that not hidden shapes anchored to empty hidden paragraphs were imported as hidden.
// (tdf#128646 solved the same only for table paragraphs)
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -811,7 +760,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo77129, "fdo77129.docx")
// Test the same testdoc used for testFdo77129.
DECLARE_OOXMLEXPORT_TEST(testTdf129402, "fdo77129.docx")
{
- CPPUNIT_ASSERT_EQUAL(5, getPages());
// tdf#129402: ToC title must be "Contents", not "Content"; the index field must include
// pre-rendered element.
@@ -838,7 +786,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129402, "fdo77129.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79969_xlsm, "fdo79969_xlsm.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This UT for DOCX embedded with excel work sheet.
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
@@ -863,7 +810,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo79969_xlsm, "fdo79969_xlsm.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80522,"fdo80522.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc,
@@ -887,7 +833,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80522,"fdo80522.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80523_pptm,"fdo80523_pptm.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc,
@@ -911,7 +856,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80523_pptm,"fdo80523_pptm.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80523_sldm,"fdo80523_sldm.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
assertXPath(pXmlDoc,
@@ -935,7 +879,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80523_sldm,"fdo80523_sldm.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80898, "fdo80898.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This UT for DOCX embedded with binary excel work sheet.
xmlDocUniquePtr pXmlDoc = parseExport("[Content_Types].xml");
@@ -960,7 +903,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo80898, "fdo80898.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTableCellWithDirectFormatting, "fdo80800.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Issue was Direct Formatting for non-first Table cells was not getting preserved.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -974,7 +916,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTableCellWithDirectFormatting, "fdo80800
DECLARE_OOXMLEXPORT_TEST(testFdo80800b_tableStyle, "fdo80800b_tableStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
@@ -1003,7 +944,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo80800b_tableStyle, "fdo80800b_tableStyle.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf117297_tableStyle, "tdf117297_tableStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("B1"), uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCell->getText(), uno::UNO_QUERY);
@@ -1023,7 +963,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf117297_tableStyle, "tdf117297_tableStyle.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf82175_noStyleInheritance, "tdf82175_noStyleInheritance.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The document's "Default" paragraph style is 1 inch fixed line spacing, and that is what should not be inherited.
style::LineSpacing aSpacing = getProperty<style::LineSpacing>(getParagraph(1), "ParaLineSpacing");
// MSWord uses 115% line spacing, but LO follows the documentation and sets single spacing.
@@ -1034,7 +973,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82175_noStyleInheritance, "tdf82175_noStyleInher
DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Header was lost on export when the document had multiple columns.
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
@@ -1042,7 +980,6 @@ DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo83048, "fdo83048.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Issue was wrong SDT properties were getting exported for Date SDT
xmlDocUniquePtr pXmlDoc = parseExport("word/footer1.xml");
@@ -1054,7 +991,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo83048, "fdo83048.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSdt2Run, "sdt-2-run.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
// The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
@@ -1066,7 +1002,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSdt2Run, "sdt-2-run.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFD083057, "fdo83057.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
// A fly frame was attached to a para which started with a hint (run) containing an SDT.
@@ -1081,7 +1016,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFD083057, "fdo83057.docx")
DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
// This was 0, as header margin was lost during import.
@@ -1095,7 +1029,6 @@ DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx")
DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either.
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 2000, page width wasn't large enough.
@@ -1104,14 +1037,12 @@ DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx")
DECLARE_OOXMLEXPORT_TEST(testImageNoborder, "image-noborder.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 26; we exported border for an image that had no border.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(0), getProperty<table::BorderLine2>(getShape(1), "TopBorder").LineWidth);
}
DECLARE_OOXMLEXPORT_TEST(testTdf89774, "tdf89774.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("docProps/app.xml"))
// This was 65, as unit was seconds instead of minutes.
assertXPathContent(pXmlDoc, "/extended-properties:Properties/extended-properties:TotalTime", "1");
@@ -1141,7 +1072,6 @@ DECLARE_OOXMLEXPORT_TEST(testSectionProtection, "sectionprot.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSectionProtection2, "sectionprot2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml"))
{
assertXPath(pXmlSettings, "/w:settings/w:documentProtection", "enforcement", "true");
@@ -1156,7 +1086,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSectionProtection2, "sectionprot2.odt")
DECLARE_OOXMLEXPORT_TEST(tdf66398_permissions, "tdf66398_permissions.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check document permission settings for the whole document
if (xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml"))
{
@@ -1184,7 +1113,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf66398_permissions, "tdf66398_permissions.docx")
DECLARE_OOXMLEXPORT_TEST(tdf106843, "tdf106843.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check Track Changes permission set in Writer/OpenDocument (password: "test", encoded by default encoding of Writer)
if (xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml"))
{
@@ -1201,7 +1129,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf106843, "tdf106843.fodt")
DECLARE_OOXMLEXPORT_TEST(tdf89991_revisionView, "tdf89991.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// check revisionView (Show Changes) import and export
if (xmlDocUniquePtr pXmlSettings = parseExport("word/settings.xml"))
{
@@ -1218,7 +1145,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf89991_revisionView, "tdf89991.docx")
DECLARE_OOXMLEXPORT_TEST(tdf122201_editUnprotectedText, "tdf122201_editUnprotectedText.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// get the document
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -1241,7 +1167,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf122201_editUnprotectedText, "tdf122201_editUnprotect
DECLARE_OOXMLEXPORT_TEST(testSectionHeader, "sectionprot.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
// this test must not be zero
@@ -1251,14 +1176,12 @@ DECLARE_OOXMLEXPORT_TEST(testSectionHeader, "sectionprot.odt")
DECLARE_OOXMLEXPORT_TEST(testOO47778_1, "ooo47778-3.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPathContent(pXmlDoc, "(//w:t)[3]", "c");
}
DECLARE_OOXMLEXPORT_TEST(testOO47778_2, "ooo47778-4.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPathContent(pXmlDoc, "(//w:t)[4]", "c");
@@ -1272,28 +1195,24 @@ DECLARE_OOXMLEXPORT_TEST(testOO47778_2, "ooo47778-4.odt")
DECLARE_OOXMLEXPORT_TEST(testOO67471, "ooo67471-2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPathContent(pXmlDoc, "(//w:t)[2]", "B");
}
DECLARE_OOXMLEXPORT_TEST(testKDE302504, "kde302504-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPath(pXmlDoc, "//v:shape", "ID", "KoPathShape");
}
DECLARE_OOXMLEXPORT_TEST(testKDE216114, "kde216114-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPath(pXmlDoc, "//w:pict", 1);
}
DECLARE_OOXMLEXPORT_TEST(testOO72950, "ooo72950-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPath(pXmlDoc, "//w:tbl", 1);
}
@@ -1303,7 +1222,6 @@ DECLARE_OOXMLEXPORT_TEST(testOO72950, "ooo72950-1.odt")
//considered the same table
DECLARE_OOXMLEXPORT_TEST(fdo60957, "fdo60957-2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
assertXPath(pXmlDoc, "//w:tbl", 2);
}
@@ -1318,7 +1236,6 @@ DECLARE_OOXMLEXPORT_TEST(testOO106020, "ooo106020-1.odt")
DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, "nonbmpchar.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_uInt32 nCh = 0x24b62;
OUString aExpected( &nCh, 1);
// Assert that UTF8 encoded non-BMP Unicode character is correct
@@ -1328,7 +1245,6 @@ DECLARE_OOXMLEXPORT_TEST(testNonBMPChar, "nonbmpchar.docx")
DECLARE_OOXMLEXPORT_TEST(testSpacingGroupShapeText, "tdf131775_SpacingGroupShapeText.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#131775: Check if correct spacing.
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
index 68218c9c02a5..4bfa75ed28eb 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport6.cxx
@@ -43,14 +43,12 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testDmlShapeTitle, "dml-shape-title.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(OUString("Title"), getProperty<OUString>(getShape(1), "Title"));
CPPUNIT_ASSERT_EQUAL(OUString("Description"), getProperty<OUString>(getShape(1), "Description"));
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlZorder, "dml-zorder.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This was "0": causing that in Word, the second shape was on top, while in the original odt the first shape is on top.
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent[1]/mc:Choice/w:drawing/wp:anchor", "relativeHeight", "2");
@@ -58,7 +56,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlZorder, "dml-zorder.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlShapeRelsize, "dml-shape-relsize.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Relative size wasn't exported all, then relativeFrom was "page", not "margin".
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "margin");
@@ -66,7 +63,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlShapeRelsize, "dml-shape-relsize.docx
DECLARE_OOXMLEXPORT_TEST(testDmlPictureInTextframe, "dml-picture-in-textframe.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (!mbExported)
return;
@@ -78,7 +74,6 @@ DECLARE_OOXMLEXPORT_TEST(testDmlPictureInTextframe, "dml-picture-in-textframe.do
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlGroupshapeRelsize, "dml-groupshape-relsize.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Relative size wasn't imported.
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/wp14:sizeRelH", "relativeFrom", "margin");
@@ -86,7 +81,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDmlGroupshapeRelsize, "dml-groupshape-re
DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(text::VertOrientation::TOP, getProperty<sal_Int16>(xGroup, "VertOrient"));
uno::Reference<drawing::XShape> xShape(xGroup->getByIndex(1), uno::UNO_QUERY);
@@ -115,7 +109,6 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshape, "dml-textshape.docx")
DECLARE_OOXMLEXPORT_TEST(testDmlTextshapeB, "dml-textshapeB.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
if (!pXmlDocument)
@@ -133,7 +126,6 @@ DECLARE_OOXMLEXPORT_TEST(testDmlTextshapeB, "dml-textshapeB.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was that the transparency was not exported (a:alpha).
// RGB color (a:srgbClr)
uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
@@ -146,7 +138,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLSolidfillAlpha, "dml-solidfill-alpha.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLCustomGeometry, "dml-customgeometry-cubicbezier.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that a custom shape was not exported.
uno::Sequence<beans::PropertyValue> aProps = getProperty< uno::Sequence<beans::PropertyValue> >(getShape(1), "CustomShapeGeometry");
@@ -208,7 +199,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLCustomGeometry, "dml-customgeometry-cubicbezier.
DECLARE_OOXMLEXPORT_TEST(testDmlRectangleRelsize, "dml-rectangle-relsize.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was around 19560, as we did not read wp14:pctHeight for
// drawinglayer shapes and the fallback data was invalid.
OString aMessage("Height is only " + OString::number(getShape(1)->getSize().Height));
@@ -220,7 +210,6 @@ DECLARE_OOXMLEXPORT_TEST(testDmlRectangleRelsize, "dml-rectangle-relsize.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLTextFrameVertAdjust, "dml-textframe-vertadjust.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// DOCX textboxes with text are imported as text frames but in Writer text frames did not have
// TextVerticalAdjust attribute so far.
@@ -237,7 +226,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLTextFrameVertAdjust, "dml-textframe-vertadjust.d
DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillBitmapCrop, "dml-shape-fillbitmapcrop.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Test the new GraphicCrop property which is introduced to define
// cropping of shapes filled with a picture in stretch mode.
@@ -259,7 +247,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillBitmapCrop, "dml-shape-fillbitmapcrop.d
DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillPattern, "dml-shape-fillpattern.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// Hatching was ignored by the export.
// 1st shape: light horizontal pattern (ltHorz)
@@ -338,7 +325,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLShapeFillPattern, "dml-shape-fillpattern.docx")
DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, "dml-groupshape-childposition.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was parent transformation was ignored fully, but translate component
// which specify the position must be also applied for children of the group.
@@ -359,7 +345,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeChildPosition, "dml-groupshape-childpo
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDMLGradientFillTheme, "dml-gradientfill-theme.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was when a fill gradient was imported from a theme, (fillRef in ooxml)
// not just the theme was written out but the explicit values too
// Besides the duplication of values it causes problems with writing out
@@ -382,7 +367,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testDMLGradientFillTheme, "dml-gradientfill-
DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeParaSpacing, "dml-groupshape-paraspacing.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Paragraph spacing (top/bottom margin and line spacing) inside a group shape was not imported
uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XText> xText = uno::Reference<text::XTextRange>(xGroup->getByIndex(1), uno::UNO_QUERY_THROW)->getText();
@@ -443,7 +427,6 @@ DECLARE_OOXMLEXPORT_TEST(testDMLGroupShapeParaSpacing, "dml-groupshape-paraspaci
DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// In case the table had custom left cell margin, the horizontal position was still incorrect (too small, -199).
uno::Reference<beans::XPropertySet> xFrame(getShape(1), uno::UNO_QUERY);
sal_Int32 nHoriOrientPosition = getProperty<sal_Int32>(xFrame, "HoriOrientPosition");
@@ -461,7 +444,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableFloatingMargins, "table-floating-margins.docx"
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127814, "tdf127814.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Paragraph top margin was 0 in a table started on a new page
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "before", "0");
@@ -469,7 +451,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf127814, "tdf127814.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf128752, "tdf128752.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Paragraph bottom margin was 200, docDefault instead of table style setting
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p[1]/w:pPr/w:spacing", "after", "0");
@@ -488,7 +469,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf119054, "tdf119054.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131258, "tdf131258.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
// Use table style based bottom margin instead of the docDefaults in empty tables, too
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[1]/w:p/w:pPr/w:spacing", "after", "0");
@@ -496,7 +476,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf131258, "tdf131258.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132514, "tdf132514.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
// Keep table style setting, when the footer also contain a table
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc[2]/w:p[2]/w:pPr/w:spacing", "before", "0");
@@ -505,7 +484,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132514, "tdf132514.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69636, "fdo69636.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the exporter didn't mirror the workaround of the
* importer, regarding the btLr text frame direction: the
@@ -520,7 +498,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69636, "fdo69636.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testVMLData, "TestVMLData.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was exporter was exporting vml data for shape in w:rPr element.
// vml data should not come under w:rPr element.
xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
@@ -529,7 +506,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testVMLData, "TestVMLData.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testImageData, "image_data.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was exporter was exporting v:imagedata data for shape in w:pict as v:fill w element.
xmlDocUniquePtr pXmlDoc = parseExport("word/header2.xml");
@@ -538,7 +514,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testImageData, "image_data.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo70838, "fdo70838.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that VMLExport::Commit didn't save the correct width and height,
// and ImplEESdrWriter::ImplFlipBoundingBox made a mistake calculating the position
@@ -665,7 +640,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo70838, "fdo70838.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73215, "fdo73215.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// 'rect' was 'pictureFrame', which isn't valid.
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wpg:wgp/wps:wsp[1]/wps:spPr/a:prstGeom",
@@ -677,7 +651,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73215, "fdo73215.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBehinddoc, "behinddoc.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This was "0", shape was in the foreground.
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor", "behindDoc", "1");
@@ -685,7 +658,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBehinddoc, "behinddoc.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSmartArtAnchoredInline, "fdo73227.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Given file contains 3 DrawingML objects as 1Picture,1SmartArt and 1Shape.
* Check for SmartArt.
* SmartArt should get written as "Floating Object" i.e. inside <wp:anchor> tag.
@@ -706,7 +678,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSmartArtAnchoredInline, "fdo73227.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo65833, "fdo65833.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The "editas" attribute for vml group shape was not preserved.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/mc:AlternateContent/mc:Fallback/w:pict/v:group", "editas", "canvas");
@@ -714,7 +685,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo65833, "fdo65833.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73247, "fdo73247.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:xfrm",
@@ -723,7 +693,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo73247, "fdo73247.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo70942, "fdo70942.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[1]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor/a:graphic/a:graphicData/wps:wsp/wps:spPr/a:prstGeom",
"prst", "ellipse");
@@ -731,7 +700,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo70942, "fdo70942.docx")
DECLARE_OOXMLEXPORT_TEST(testDrawinglayerPicPos, "drawinglayer-pic-pos.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the position of the picture was incorrect, it was shifted towards the bottom right corner.
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
if (!pXmlDocument)
@@ -746,7 +714,6 @@ DECLARE_OOXMLEXPORT_TEST(testDrawinglayerPicPos, "drawinglayer-pic-pos.docx")
DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
if (!pXmlDocument)
return;
@@ -858,14 +825,12 @@ DECLARE_OOXMLEXPORT_TEST(testShapeThemePreservation, "shape-theme-preservation.d
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO73546, "FDO73546.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
assertXPath(pXmlDoc, "/w:hdr/w:p[1]/w:r[3]/mc:AlternateContent/mc:Choice/w:drawing/wp:anchor", "distL","0");
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69616, "fdo69616.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
// VML
CPPUNIT_ASSERT(getXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[1]/mc:AlternateContent/mc:Fallback/w:pict/v:group", "coordorigin").match("696,725"));
@@ -873,7 +838,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69616, "fdo69616.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignForShape,"Shape.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//fdo73545:Shape Horizontal and vertical orientation is wrong
//The wp:align tag is missing after roundtrip
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -883,7 +847,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlignForShape,"Shape.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLineStyle_DashType, "LineStyle_DashType.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* DOCX contatining Shape with LineStyle as Dash Type should get preserved inside
* an XML tag <a:prstDash> with value "dash", "sysDot", "lgDot", etc.
*/
@@ -900,7 +863,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLineStyle_DashType, "LineStyle_DashType.
DECLARE_OOXMLEXPORT_TEST(testGradientFillPreservation, "gradient-fill-preservation.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDocument = parseExport("word/document.xml");
if (!pXmlDocument)
return;
@@ -940,7 +902,6 @@ DECLARE_OOXMLEXPORT_TEST(testGradientFillPreservation, "gradient-fill-preservati
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLineStyle_DashType_VML, "LineStyle_DashType_VML.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* DOCX contatining "Shape with text inside" having Line Style as "Dash Type" should get
* preserved inside an XML tag <v:stroke> with attribute dashstyle having value "dash".
*/
@@ -950,7 +911,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testLineStyle_DashType_VML, "LineStyle_DashT
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo74110,"fdo74110.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
The File contains word art which is being exported as shape and the mapping is defaulted to
shape type rect since the actual shape type(s) is/are commented out for some reason.
@@ -965,7 +925,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo74110,"fdo74110.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testOuterShdw,"testOuterShdw.docx")
{
- CPPUNIT_ASSERT_EQUAL(12, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "//mc:AlternateContent[1]/mc:Choice[1]/w:drawing[1]/wp:anchor[1]/a:graphic[1]/a:graphicData[1]/wps:wsp[1]/wps:spPr[1]/a:effectLst[1]/a:outerShdw[1]", "dist", "1041400");
}
@@ -986,7 +945,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testExtentValue, "fdo74605.docx")
// other dimension.
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testSyncedRelativePercent, "tdf93676-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// check no explicit pctHeight has been exported, all we care
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 064acab5426f..772f4bd9dc82 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -81,14 +81,12 @@ protected:
DECLARE_OOXMLEXPORT_TEST(testN751054, "n751054.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType");
CPPUNIT_ASSERT(eValue != text::TextContentAnchorType_AS_CHARACTER);
}
DECLARE_OOXMLEXPORT_TEST(testTdf48569, "tdf48569.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// File crashing while saving in LO
text::TextContentAnchorType eValue = getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType");
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, eValue);
@@ -114,7 +112,6 @@ DECLARE_OOXMLEXPORT_TEST(testN750935, "n750935.docx")
DECLARE_OOXMLEXPORT_TEST(testN751117, "n751117.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// First shape: the end should be an arrow, should be rotated and should be flipped.
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
OUString aValue;
@@ -137,7 +134,6 @@ DECLARE_OOXMLEXPORT_TEST(testN751117, "n751117.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo49940, "fdo49940.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
@@ -149,21 +145,18 @@ DECLARE_OOXMLEXPORT_TEST(testFdo49940, "fdo49940.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo74745, "fdo74745.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange > paragraph = getParagraph(3);
CPPUNIT_ASSERT_EQUAL(OUString("09/02/14"), paragraph->getString());
}
DECLARE_OOXMLEXPORT_TEST(testFdo81486, "fdo81486.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange > paragraph = getParagraph(1);
CPPUNIT_ASSERT_EQUAL(OUString("CustomTitle"), paragraph->getString());
}
DECLARE_OOXMLEXPORT_TEST(testFdo79738, "fdo79738.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( mxComponent, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xStyleFamilies = xStylesSupplier->getStyleFamilies();
uno::Reference<container::XNameContainer> xStyles;
@@ -176,7 +169,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo79738, "fdo79738.docx")
DECLARE_OOXMLEXPORT_TEST(testN705956_1, "n705956-1.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
Get the first image in the document and check it's the one image in the document.
It should be also anchored inline (as character) and be inside a groupshape.
@@ -205,7 +197,6 @@ xray image.AnchorType
DECLARE_OOXMLEXPORT_TEST(testN705956_2, "n705956-2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
<v:shapetype> must be global, reachable even from <v:shape> inside another <w:pict>
image = ThisComponent.DrawPage.getByIndex(0)
@@ -220,7 +211,6 @@ xray image.FillColor
DECLARE_OOXMLEXPORT_TEST(testN747461, "n747461.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
The document contains 3 images (Red, Black, Green, in this order), with explicit
w:relativeHeight (300, 0, 225763766). Check that they are in the right ZOrder
@@ -248,7 +238,6 @@ after they are loaded.
DECLARE_OOXMLEXPORT_TEST(testN750255, "n750255.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
/*
Column break without columns on the page is a page break, so check those paragraphs
@@ -284,7 +273,6 @@ xray para2.PageStyleName
DECLARE_OOXMLEXPORT_TEST(testN764005, "n764005.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
// The picture in the header wasn't absolutely positioned and wasn't in the background.
@@ -298,7 +286,6 @@ DECLARE_OOXMLEXPORT_TEST(testN764005, "n764005.docx")
DECLARE_OOXMLEXPORT_TEST(testN766481, "n766481.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
/*
* The problem was that we had an additional paragraph before the pagebreak.
*
@@ -317,7 +304,6 @@ DECLARE_OOXMLEXPORT_TEST(testN766481, "n766481.docx")
DECLARE_OOXMLEXPORT_TEST(testN766487, "n766487.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that 1) the font size of the first para was too large 2) numbering had no first-line-indent.
*
@@ -348,7 +334,6 @@ DECLARE_OOXMLEXPORT_TEST(testN766487, "n766487.docx")
DECLARE_OOXMLEXPORT_TEST(testN693238, "n693238.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that a continuous section break at the end of the doc caused the margins to be ignored.
*
@@ -362,7 +347,6 @@ DECLARE_OOXMLEXPORT_TEST(testN693238, "n693238.docx")
DECLARE_OOXMLEXPORT_TEST(testNumbering1, "numbering1.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* <w:numPr> in the paragraph itself was overridden by <w:numpr> introduced by the paragraph's <w:pStyle>
enum = ThisComponent.Text.createEnumeration
para = enum.NextElement
@@ -408,14 +392,12 @@ note that the indexes may get off as the implementation evolves, C++ code search
DECLARE_OOXMLEXPORT_TEST(testAllGapsWord, "all_gaps_word.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
BorderTest borderTest;
BorderTest::testTheBorders(mxComponent, false);
}
DECLARE_OOXMLEXPORT_TEST(testN775906, "n775906.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that right margin (via direct formatting) erased the left/first margin (inherited from numbering style).
*
@@ -430,7 +412,6 @@ DECLARE_OOXMLEXPORT_TEST(testN775906, "n775906.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf59699, "tdf59699.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xImage(getShape(1), uno::UNO_QUERY);
auto xGraphic = getProperty<uno::Reference<graphic::XGraphic> >(xImage, "Graphic");
// This was false: the referenced graphic data wasn't imported.
@@ -439,7 +420,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf59699, "tdf59699.docx")
DECLARE_OOXMLEXPORT_TEST(testN777337, "n777337.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the top and bottom margin on the first page was only 0.1cm instead of 1.7cm.
*
@@ -454,7 +434,6 @@ DECLARE_OOXMLEXPORT_TEST(testN777337, "n777337.docx")
DECLARE_OOXMLEXPORT_TEST(testN778836, "n778836.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the paragraph inherited margins from the numbering
* and parent paragraph styles and the result was incorrect.
@@ -475,19 +454,16 @@ DECLARE_OOXMLEXPORT_TEST(testN778828, "n778828.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106724, "tdf106724.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This document simply crashed the importer.
}
DECLARE_OOXMLEXPORT_TEST(testN779834, "n779834.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This document simply crashed the importer.
}
DECLARE_OOXMLEXPORT_TEST(testRHBZ1180114, "rhbz1180114.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This document simply crashed the importer.
}
@@ -498,7 +474,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf66496, "tdf66496.docx")
DECLARE_OOXMLEXPORT_TEST(testTDF91122, "tdf91122.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* OLE object shape: default vertical position is top in MSO, not bottom
*/
@@ -523,7 +498,6 @@ DECLARE_OOXMLEXPORT_TEST(testTDF91122, "tdf91122.docx")
DECLARE_OOXMLEXPORT_TEST(testTDF91260, "tdf91260.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* textbox can't extend beyond the page bottom
* solution: shrinking textbox (its text frame) height, if needed
@@ -535,7 +509,6 @@ DECLARE_OOXMLEXPORT_TEST(testTDF91260, "tdf91260.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo74357, "fdo74357.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Floating table wasn't converted to a textframe.
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -549,14 +522,12 @@ DECLARE_OOXMLEXPORT_TEST(testFdo74357, "fdo74357.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo55187, "fdo55187.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// 0x010d was imported as a newline.
getParagraph(1, OUString(u"lup\u010Dka"));
}
DECLARE_OOXMLEXPORT_TEST(testN780563, "n780563.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* Make sure we have the table in the fly frame created
*/
@@ -567,7 +538,6 @@ DECLARE_OOXMLEXPORT_TEST(testN780563, "n780563.docx")
DECLARE_OOXMLEXPORT_TEST(testN780853, "n780853.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the table was not imported.
*
@@ -604,7 +574,6 @@ DECLARE_OOXMLEXPORT_TEST(testN780843, "n780843.docx")
DECLARE_OOXMLEXPORT_TEST(testN780843b, "n780843b.docx")
{
- CPPUNIT_ASSERT_EQUAL(4, getPages());
// Same document as testN780843 except there is more text before the continuous break. Now the opposite footer results should happen.
uno::Reference< text::XTextRange > xPara = getParagraph(3);
OUString aStyleName = getProperty<OUString>(xPara, "PageStyleName");
@@ -617,7 +586,6 @@ DECLARE_OOXMLEXPORT_TEST(testN780843b, "n780843b.docx")
DECLARE_OOXMLEXPORT_TEST(testShadow, "imgshadow.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that drop shadows on inline images were not being
* imported and applied.
@@ -633,7 +601,6 @@ DECLARE_OOXMLEXPORT_TEST(testShadow, "imgshadow.docx")
DECLARE_OOXMLEXPORT_TEST(testN782345, "n782345.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
/*
* The problem was that the page break was inserted before the 3rd para, instead of before the 2nd para.
*/
@@ -642,7 +609,6 @@ DECLARE_OOXMLEXPORT_TEST(testN782345, "n782345.docx")
DECLARE_OOXMLEXPORT_TEST(testN779941, "n779941.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* Make sure top/bottom margins of tables are set to 0 (problem was: bottom margin set to 0.35cm)
*/
@@ -665,7 +631,6 @@ DECLARE_OOXMLEXPORT_TEST(testN779941, "n779941.docx")
DECLARE_OOXMLEXPORT_TEST(testN783638, "n783638.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the margins of inline images were not zero.
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPropertySet, "LeftMargin"));
@@ -679,7 +644,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo52208, "fdo52208.docx")
DECLARE_OOXMLEXPORT_TEST(testN785767, "n785767.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -691,7 +655,6 @@ DECLARE_OOXMLEXPORT_TEST(testN785767, "n785767.docx")
DECLARE_OOXMLEXPORT_TEST(testFineTableDash, "tableborder-finedash.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that finely dashed borders on tables were unsupported
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
@@ -703,7 +666,6 @@ DECLARE_OOXMLEXPORT_TEST(testFineTableDash, "tableborder-finedash.docx")
DECLARE_OOXMLEXPORT_TEST(testN792778, "n792778.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* The problem was that the importer didn't handle complex groupshapes with groupshapes, textboxes and graphics inside.
*
@@ -736,7 +698,6 @@ DECLARE_OOXMLEXPORT_TEST(testN792778, "n792778.docx")
DECLARE_OOXMLEXPORT_TEST(testGroupshapeSmarttag, "groupshape-smarttag.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xGroupShape(getShape(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
// First run of shape text was missing due to the w:smartTag wrapper around it.
@@ -748,7 +709,6 @@ DECLARE_OOXMLEXPORT_TEST(testGroupshapeSmarttag, "groupshape-smarttag.docx")
DECLARE_OOXMLEXPORT_TEST(testN793262, "n793262.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
uno::Reference<container::XEnumeration> xHeaderParagraphs(xHeaderText->createEnumeration());
xHeaderParagraphs->nextElement();
@@ -764,7 +724,6 @@ DECLARE_OOXMLEXPORT_TEST(testN793262, "n793262.docx")
DECLARE_OOXMLEXPORT_TEST(testN793998, "n793998.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_Int32 nTextPortion = parseDump("/root/page/body/txt/Text[1]", "nWidth").toInt32(); // Width of the first (text) portion
sal_Int32 nTabPortion = parseDump("/root/page/body/txt/Text[2]", "nWidth").toInt32(); // Width of the second (tab) portion
sal_Int32 nParagraph = parseDump("/root/page/body/txt/infos/bounds", "width").toInt32(); // Width of the paragraph
@@ -775,7 +734,6 @@ DECLARE_OOXMLEXPORT_TEST(testN793998, "n793998.docx")
DECLARE_OOXMLEXPORT_TEST(testN779642, "n779642.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
// First problem: check that we have 2 tables, nesting caused the
@@ -803,7 +761,6 @@ DECLARE_OOXMLEXPORT_TEST(testN779642, "n779642.docx")
DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -813,7 +770,6 @@ DECLARE_OOXMLEXPORT_TEST(testTbLrHeight, "tblr-height.docx")
DECLARE_OOXMLEXPORT_TEST(testBnc865381, "bnc865381.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -823,7 +779,6 @@ DECLARE_OOXMLEXPORT_TEST(testBnc865381, "bnc865381.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo53985, "fdo53985.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Unhandled exception prevented import of the rest of the document.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -847,7 +802,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo53985, "fdo53985.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo59638, "fdo59638.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that w:lvlOverride inside w:num was ignores by dmapper.
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
@@ -871,7 +825,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo59638, "fdo59638.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo61343, "fdo61343.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that there were a groupshape in the doc, followed by an
// OLE object, and this lead to a crash.
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
@@ -881,7 +834,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo61343, "fdo61343.docx")
DECLARE_OOXMLEXPORT_TEST(testToolsLineNumbering, "tools-line-numbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/*
* Test the line numbering feature import (Tools->Line Numbering ...)
*
@@ -917,7 +869,6 @@ DECLARE_OOXMLEXPORT_TEST(testToolsLineNumbering, "tools-line-numbering.docx")
DECLARE_OOXMLEXPORT_TEST(testfdo78904, "fdo78904.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
if (xIndexAccess->getCount())
@@ -929,14 +880,12 @@ DECLARE_OOXMLEXPORT_TEST(testfdo78904, "fdo78904.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo60922, "fdo60922.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, not 100, due to wrong import of w:position w:val="0"
CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(getRun(getParagraph(1), 1), "CharEscapementHeight"));
}
DECLARE_OOXMLEXPORT_TEST(testFdo59273, "fdo59273.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -953,7 +902,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo59273, "fdo59273.docx")
DECLARE_OOXMLEXPORT_TEST(testConditionalstylesTablelook, "conditionalstyles-tbllook.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -963,14 +911,12 @@ DECLARE_OOXMLEXPORT_TEST(testConditionalstylesTablelook, "conditionalstyles-tbll
DECLARE_OOXMLEXPORT_TEST(testFdo63685, "fdo63685.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// An inline image's wrapping should be always zero, even if the doc model has a non-zero value.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(getShape(1), "TopMargin"));
}
DECLARE_OOXMLEXPORT_TEST(testN592908_Frame, "n592908-frame.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
text::WrapTextMode eValue;
xPropertySet->getPropertyValue("Surround") >>= eValue;
@@ -979,7 +925,6 @@ DECLARE_OOXMLEXPORT_TEST(testN592908_Frame, "n592908-frame.docx")
DECLARE_OOXMLEXPORT_TEST(testN592908_Picture, "n592908-picture.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
text::WrapTextMode eValue;
xPropertySet->getPropertyValue("Surround") >>= eValue;
@@ -988,7 +933,6 @@ DECLARE_OOXMLEXPORT_TEST(testN592908_Picture, "n592908-picture.docx")
DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// A combo box is imported
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
uno::Reference<beans::XPropertySet> xPropertySet(xControlShape->getControl(), uno::UNO_QUERY);
@@ -1001,7 +945,6 @@ DECLARE_OOXMLEXPORT_TEST(testN779630, "n779630.docx")
DECLARE_OOXMLEXPORT_TEST(testIndentation, "indentation.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<uno::XInterface> xParaLTRTitle(getParagraph( 1, "Title aligned"));
uno::Reference<uno::XInterface> xParaLTRNormal(getParagraph( 2, ""));
@@ -1012,7 +955,6 @@ DECLARE_OOXMLEXPORT_TEST(testIndentation, "indentation.docx")
DECLARE_OOXMLEXPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that in w:pgBorders, child elements had a w:shadow attribute, but that was ignored.
table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
CPPUNIT_ASSERT_EQUAL(COL_BLACK, Color(aShadow.Color));
@@ -1023,7 +965,6 @@ DECLARE_OOXMLEXPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
DECLARE_OOXMLEXPORT_TEST(testN816593, "n816593.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Two consecutive <w:tbl> without any paragraph in between, but with different tblpPr. In this
// case we need to have 2 different tables instead of 1
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -1033,7 +974,6 @@ DECLARE_OOXMLEXPORT_TEST(testN816593, "n816593.docx")
DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// M.d.yyyy date format was unhandled.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -1058,21 +998,16 @@ DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx")
DECLARE_OOXMLEXPORT_TEST(testN830205, "n830205.docx")
{
- CPPUNIT_ASSERT_EQUAL(7, getPages());
// Previously import just crashed (due to infinite recursion).
getParagraph(1, "XXX");
}
DECLARE_OOXMLEXPORT_TEST(tdf123705, "tdf123705.docx")
{
-#if !defined(MACOSX)
- CPPUNIT_ASSERT_EQUAL(4, getPages());
-#endif
}
DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize, "table-auto-column-fixed-size.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1083,7 +1018,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize, "table-auto-column-fixed-
DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize2, "table-auto-column-fixed-size2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1093,7 +1027,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableAutoColumnFixedSize2, "table-auto-column-fixed
DECLARE_OOXMLEXPORT_TEST(testFdo46361, "fdo46361.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XIndexAccess> xGroupShape(getShape(1), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(xGroupShape->getByIndex(0), uno::UNO_QUERY);
// This was CENTER.
@@ -1121,7 +1054,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo46361, "fdo46361.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo65632, "fdo65632.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the footnote text had fake redline: only the body
// text has redline in fact.
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
@@ -1133,7 +1065,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo65632, "fdo65632.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo66474, "fdo66474.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The table width was too small, so the text in the second cell was unreadable: this was 1397.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
@@ -1142,7 +1073,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo66474, "fdo66474.docx")
DECLARE_OOXMLEXPORT_TEST(testGroupshapeRotation, "groupshape-rotation.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Rotation on groupshapes wasn't handled at all by the VML importer.
// Note: the shapes are still shifting on the page, so the rotation drifts after multiple round-trips.
CPPUNIT_ASSERT_DOUBLES_EQUAL(31500.0, getProperty<double>(getShape(1), "RotateAngle"), 100);
@@ -1157,7 +1087,6 @@ DECLARE_OOXMLEXPORT_TEST(testBnc780044Spacing, "bnc780044_spacing.docx")
DECLARE_OOXMLEXPORT_TEST(testTableAutoNested, "table-auto-nested.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 176, when compat option is not enabled, the auto paragraph bottom margin value was incorrect.
CPPUNIT_ASSERT_EQUAL(sal_Int32(494), getProperty<sal_Int32>(getParagraph(1), "ParaBottomMargin"));
@@ -1169,7 +1098,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableAutoNested, "table-auto-nested.docx")
DECLARE_OOXMLEXPORT_TEST(testTableStyleParprop, "table-style-parprop.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that w:spacing's w:after=0 (a paragraph property) wasn't imported from table style.
uno::Reference<text::XTextTable> xTable(getParagraphOrTable(1), uno::UNO_QUERY);
uno::Reference<text::XTextRange> xCell(xTable->getCellByName("A1"), uno::UNO_QUERY);
@@ -1179,7 +1107,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableStyleParprop, "table-style-parprop.docx")
DECLARE_OOXMLEXPORT_TEST(testTablePagebreak, "table-pagebreak.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Page break inside table: should be ignored (was style::BreakType_PAGE_BEFORE before).
CPPUNIT_ASSERT_EQUAL(style::BreakType_NONE, getProperty<style::BreakType>(getParagraphOrTable(2), "BreakType"));
@@ -1197,7 +1124,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo68607, "fdo68607.docx")
DECLARE_OOXMLEXPORT_TEST(testVmlTextVerticalAdjust, "vml-text-vertical-adjust.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShapes> xOuterGroupShape(getShape(1), uno::UNO_QUERY);
uno::Reference<drawing::XShapes> xInnerGroupShape(xOuterGroupShape->getByIndex(0), uno::UNO_QUERY);
uno::Reference<drawing::XShape> xShape(xInnerGroupShape->getByIndex(0), uno::UNO_QUERY);
@@ -1207,7 +1133,6 @@ DECLARE_OOXMLEXPORT_TEST(testVmlTextVerticalAdjust, "vml-text-vertical-adjust.do
DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the mso-layout-flow-alt:bottom-to-top VML shape property wasn't handled for sw text frames.
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY);
comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
@@ -1216,7 +1141,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69636, "fdo69636.docx")
DECLARE_OOXMLEXPORT_TEST(testChartProp, "chart-prop.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that chart was not getting parsed in writer module.
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -1229,7 +1153,6 @@ DECLARE_OOXMLEXPORT_TEST(testChartProp, "chart-prop.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo43093, "fdo43093b.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the direction and alignment are not correct for RTL paragraphs.
uno::Reference<uno::XInterface> xParaRtlRight(getParagraph( 1, "Right and RTL in M$"));
sal_Int32 nRtlRight = getProperty< sal_Int32 >( xParaRtlRight, "ParaAdjust" );
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 80e0c667e983..4227765975de 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -108,7 +108,6 @@ DECLARE_OOXMLEXPORT_TEST(testDefaultContentTypes, "fdo55381.docx")
DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was
// application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml,
// we used the wrong content type for .docm files.
@@ -121,7 +120,6 @@ DECLARE_SW_ROUNDTRIP_TEST(testDocmSave, "hello.docm", nullptr, DocmTest)
DECLARE_SW_ROUNDTRIP_TEST(testBadDocm, "bad.docm", nullptr, DocmTest)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
// This was 'MS Word 2007 XML', broken docm files were not recognized.
@@ -130,7 +128,6 @@ DECLARE_SW_ROUNDTRIP_TEST(testBadDocm, "bad.docm", nullptr, DocmTest)
DECLARE_OOXMLEXPORT_TEST(testTdf109063, "tdf109063.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
// This was 1, near-page-width table was imported as a TextFrame.
@@ -139,7 +136,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf109063, "tdf109063.docx")
DECLARE_SW_ROUNDTRIP_TEST(testTdf108269, "tdf108269.docm", nullptr, DocmTest)
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (!mbExported)
return;
@@ -152,14 +148,12 @@ DECLARE_SW_ROUNDTRIP_TEST(testTdf108269, "tdf108269.docm", nullptr, DocmTest)
DECLARE_OOXMLEXPORT_TEST(testTdf92045, "tdf92045.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was true, <w:effect w:val="none"/> resulted in setting the blinking font effect.
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(getRun(getParagraph(1), 1), "CharFlash"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf95031, "tdf95031.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 494, in-numbering paragraph's automating spacing was handled as visible spacing, while it should not.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(getParagraph(3), "ParaTopMargin"));
@@ -167,7 +161,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf95031, "tdf95031.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106690, "tdf106690.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, numbering rules with automatic spacing meant 0
// before/autospacing for all text nodes, even for ones at the start/end of
// a numbered text node block.
@@ -177,7 +170,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106690, "tdf106690.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106690Cell, "tdf106690-cell.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -190,7 +182,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106690Cell, "tdf106690-cell.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf122342, "tdf122342.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// These were 494, style based numbering rules with automatic spacing meant 0
// before/autospacing for all text nodes, even for ones at the start/end of
// a numbered text node block.
@@ -202,7 +193,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf122342, "tdf122342.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf129575_directBefore, "tdf129575-directBefore.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -216,7 +206,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129575_directBefore, "tdf129575-directBefore.doc
DECLARE_OOXMLEXPORT_TEST(testTdf129575_directAfter, "tdf129575-directAfter.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -229,7 +218,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129575_directAfter, "tdf129575-directAfter.docx"
DECLARE_OOXMLEXPORT_TEST(testTdf129575_styleAfter, "tdf129575-styleAfter.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -242,7 +230,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129575_styleAfter, "tdf129575-styleAfter.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf129575_docDefault, "tdf129575-docDefault.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -270,7 +257,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf129575_docDefault, "tdf129575-docDefault.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118812, "tdf118812_tableStyles-comprehensive.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// cell A1
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[1]/w:tc/w:p/w:pPr/w:pStyle", "val", "Normal");
@@ -347,7 +333,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf118812, "tdf118812_tableStyles-compre
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107626, "tdf107626.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This was 2 (missing trailing cell in merged cell range)
assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr[3]/w:tc", 3);
@@ -355,7 +340,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107626, "tdf107626.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf106970, "tdf106970.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The second paragraph (first numbered one) had 0 bottom margin:
// autospacing was even collapsed between different numbering styles.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(494), getProperty<sal_Int32>(getParagraph(2), "ParaBottomMargin"));
@@ -365,7 +349,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106970, "tdf106970.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf79272_strictDxa, "tdf79272_strictDxa.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(4318), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
@@ -383,7 +366,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf79272_strictDxa, "tdf79272_strictDxa.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf109306, "tdf109306.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
// Both types of relative width specification (pct): simple integers (in fiftieths of percent)
@@ -397,7 +379,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf109306, "tdf109306.docx")
DECLARE_OOXMLEXPORT_TEST(testKern, "kern.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT(getProperty<bool>(getRun(getParagraph(1), 1), "CharAutoKerning"));
// This failed: kerning was also enabled for the second paragraph.
CPPUNIT_ASSERT(!getProperty<bool>(getRun(getParagraph(2), 1), "CharAutoKerning"));
@@ -439,7 +420,6 @@ DECLARE_OOXMLEXPORT_TEST(tdf105490_negativeMargins, "tdf105490_negativeMargins.d
DECLARE_OOXMLEXPORT_TEST(testTdf97648_relativeWidth,"tdf97648_relativeWidth.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(7616), getShape(1)->getSize().Width, 10);
CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(8001), getShape(2)->getSize().Width, 10);
CPPUNIT_ASSERT_DOUBLES_EQUAL( sal_Int32(4001), getShape(3)->getSize().Width, 10);
@@ -469,7 +449,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104061_tableSectionColumns,"tdf104061_tableSecti
DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, "tdf46940_dontEquallyDistributeColumns.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
@@ -480,7 +459,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf46940_dontEquallyDistributeColumns, "tdf46940_do
DECLARE_OOXMLEXPORT_TEST(testTdf98700_keepWithNext, "tdf98700_keepWithNext.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_EQUAL_MESSAGE("Heading style keeps with next", true, getProperty<bool>(getParagraph(1), "ParaKeepTogether"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Default style doesn't keep with next", false, getProperty<bool>(getParagraph(2), "ParaKeepTogether"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("Heading 1 style inherits keeps with next", true, getProperty<bool>(getParagraph(3), "ParaKeepTogether"));
@@ -669,14 +647,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakD, "tdf103975_notPageBreakD.d
DECLARE_OOXMLEXPORT_TEST(testTdf103975_notPageBreakE, "tdf103975_notPageBreakE.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the column break was getting lost.
CPPUNIT_ASSERT_EQUAL(style::BreakType_COLUMN_BEFORE, getProperty<style::BreakType>(getParagraph(2), "BreakType"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf112352_nextPageColumns, "tdf112352_nextPageColumns.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection");
uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
@@ -688,7 +664,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112352_nextPageColumns, "tdf112352_nextPageColum
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf109310_endnoteStyleForMSO, "tdf109310_endnoteStyleForMSO.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/endnotes.xml");
// Check w:rStyle element has w:val attribute - note that w: is not specified for attribute
assertXPath(pXmlDoc, "/w:endnotes/w:endnote[@w:id='2']/w:p/w:r[1]/w:rPr/w:rStyle", "val",
@@ -697,7 +672,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf109310_endnoteStyleForMSO, "tdf109310
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103389, "tdf103389.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// No geometry was exported for the second canvas
// Check both canvases' geometry
@@ -707,7 +681,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103389, "tdf103389.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf84678, "tdf84678.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, left margin inside a shape+text wasn't imported from DOCX.
// 360000 EMU, but layout uses twips.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(567), parseDump("/root/page/body/txt/anchored/fly/infos/prtBounds", "left").toInt32());
@@ -716,7 +689,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf84678, "tdf84678.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf103544, "tdf103544.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// We have two shapes: a frame and an image
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
@@ -730,7 +702,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103544, "tdf103544.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Relative positions to the left or right margin (MS Word naming) was not handled.
uno::Reference<beans::XPropertySet> xShapeProperties( getShape(1), uno::UNO_QUERY );
sal_Int16 nValue;
@@ -748,7 +719,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103573, "tdf103573.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106132, "tdf106132.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xShape(getShapeByName("Frame1"), uno::UNO_QUERY);
// This was 250, <wps:bodyPr ... rIns="0" ...> was ignored for an outer shape.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), getProperty<sal_Int32>(xShape, "TextRightDistance"));
@@ -756,7 +726,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106132, "tdf106132.docx")
DECLARE_OOXMLEXPORT_TEST(testBnc519228OddBreaks, "bnc519228_odd-breaksB.docx")
{
- CPPUNIT_ASSERT_EQUAL(5, getPages());
// Check that all the normal styles are not set as right-only, those should be only those used after odd page breaks.
uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), defaultStyle->getPropertyValue("PageStyleLayout"));
@@ -785,7 +754,6 @@ DECLARE_OOXMLEXPORT_TEST(testBnc519228OddBreaks, "bnc519228_odd-breaksB.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf79329, "tdf79329.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
// This was 1: only the inner, not the outer table was created.
@@ -794,7 +762,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf79329, "tdf79329.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103982, "tdf103982.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
sal_Int32 nDistB = getXPath(pXmlDoc, "//wp:anchor", "distB").toInt32();
// This was -260350, which is not a valid value for an unsigned type.
@@ -807,7 +774,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103982, "tdf103982.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf104115, "tdf104115.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This found 0 nodes: the custom geometry was not written for the Bezier
// curve -> Word refused to open the document.
@@ -816,7 +782,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf104115, "tdf104115.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf103651, "tdf103651.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 1), "TextField");
OUString sContent;
xTextField->getPropertyValue("Content") >>= sContent;
@@ -829,7 +794,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103651, "tdf103651.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99227, "tdf99227.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// A drawing anchored as character to a footnote caused write past end of document.xml at export to docx.
// After that, importing after export failed with
// SAXParseException: '[word/document.xml line 2]: Extra content at the end of the document', Stream 'word / document.xml',
@@ -841,7 +805,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf99227, "tdf99227.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -859,13 +822,11 @@ DECLARE_OOXMLEXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf112446_frameStyle, "tdf112446_frameStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::NONE, getProperty<sal_Int16>(getShape(1), "HoriOrient"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
@@ -889,7 +850,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82173_footnoteStyle, "tdf82173_footnoteStyle.doc
DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, "tdf82173_endnoteStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
uno::Reference<text::XFootnote> xEndnote;
@@ -915,7 +875,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf82173_endnoteStyle, "tdf82173_endnoteStyle.docx"
DECLARE_OOXMLEXPORT_TEST(testTdf55427_footnote2endnote, "tdf55427_footnote2endnote.odt")
{
- CPPUNIT_ASSERT_EQUAL(4, getPages());
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("ParagraphStyles")->getByName("Footnote"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Footnote style is rose color", sal_Int32(0xFF007F), getProperty< sal_Int32 >(xPageStyle, "CharColor") );
xPageStyle.set(getStyles("ParagraphStyles")->getByName("Endnote"), uno::UNO_QUERY);
@@ -973,7 +932,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf55427_footnote2endnote, "tdf55427_footnote2endno
DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This crashed: the comment field contained a table with a <w:hideMark/>.
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XElementAccess> xTextFields(xTextFieldsSupplier->getTextFields());
@@ -982,7 +940,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104162, "tdf104162.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf104150, "tdf104150.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 0xff0000, i.e. red: background shape wasn't ignored.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(-1), getProperty<sal_Int32>(xPageStyle, "BackColor"));
@@ -990,7 +947,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104150, "tdf104150.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf103976, "tdf103976.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1006,14 +962,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf103976, "tdf103976.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106001, "tdf106001.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0 (1 on UI), while Word treats outliers as 100 (outlier = not in [1..600])
CPPUNIT_ASSERT_EQUAL( static_cast<sal_Int16>( 100 ), getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharScaleWidth" ));
}
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf106001_2, "tdf106001-2.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// In test ODT CharScaleWidth = 900, this was not changed upon OOXML export to stay in [1..600], now it's clamped to 600
// Note: we disregard what's set in pPr / rPr and only care about r / rPr
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -1022,7 +976,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf106001_2, "tdf106001-2.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
uno::Reference<view::XViewSettingsSupplier> const xController(
xModel->getCurrentController(), uno::UNO_QUERY);
@@ -1037,7 +990,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99074, "tdf99074.docx")
DECLARE_OOXMLEXPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// First problem: the first two paragraphs did not have their own text section, so the whole document had two columns.
uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1, "First."), "TextSection");
CPPUNIT_ASSERT(xTextSection.is());
@@ -1055,7 +1007,6 @@ DECLARE_OOXMLEXPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx
DECLARE_OOXMLEXPORT_TEST(testMultiColumnSeparator, "multi-column-separator-with-line.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(1, "First data."), "TextSection");
CPPUNIT_ASSERT(xTextSection.is());
uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns");
@@ -1067,7 +1018,6 @@ DECLARE_OOXMLEXPORT_TEST(testMultiColumnSeparator, "multi-column-separator-with-
DECLARE_OOXMLEXPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
// This was false, last section was balanced, but it's unbalanced in Word.
@@ -1076,7 +1026,6 @@ DECLARE_OOXMLEXPORT_TEST(testUnbalancedColumns, "unbalanced-columns.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly, "tdf121670_columnsInSectionsOnly.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("DontBalanceTextColumns?", true, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
@@ -1094,7 +1043,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121670_columnsInSectionsOnly, "tdf121670_columns
DECLARE_OOXMLEXPORT_TEST(testTdf106492, "tdf106492.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
// This was 4: an additional sectPr was added to the document.
assertXPath(pXmlDoc, "//w:sectPr", 3);
@@ -1102,7 +1050,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106492, "tdf106492.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT(getShape(1)->getSize().Width > 0);
// This failed: the second arrow was invisible because it had zero width.
CPPUNIT_ASSERT(getShape(2)->getSize().Width > 0);
@@ -1110,7 +1057,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107104, "tdf107104.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 0: footnote separator was disabled even in case the document
// had no footnotes.
@@ -1120,7 +1066,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107033, "tdf107033.docx")
#if HAVE_MORE_FONTS
DECLARE_OOXMLEXPORT_TEST(testTdf107889, "tdf107889.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
// This was 1, multi-page table was imported as a floating one.
@@ -1130,7 +1075,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107889, "tdf107889.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf107837, "tdf107837.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextSectionsSupplier> xTextSectionsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTextSections(xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
// This was true, a balanced section from ODF turned into a non-balanced one after OOXML roundtrip.
@@ -1139,7 +1083,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107837, "tdf107837.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf107684, "tdf107684.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/styles.xml"))
// This was 1, <w:outlineLvl> was duplicated for Heading1.
assertXPath(pXmlDoc, "//w:style[@w:styleId='Heading1']/w:pPr/w:outlineLvl", 1);
@@ -1147,7 +1090,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107684, "tdf107684.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf107618, "tdf107618.doc")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// This was false, header was lost on export.
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
@@ -1155,7 +1097,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf107618, "tdf107618.doc")
DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto aLineSpacing = getProperty<style::LineSpacing>(getParagraph(1), "ParaLineSpacing");
// This was style::LineSpacingMode::PROP.
CPPUNIT_ASSERT_EQUAL(style::LineSpacingMode::FIX, aLineSpacing.Mode);
@@ -1165,7 +1106,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf108682, "tdf108682.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf100075, "tdf100075.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
@@ -1183,7 +1123,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf100075, "tdf100075.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf105095, "tdf105095.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
@@ -1194,7 +1133,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf105095, "tdf105095.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf106062_nonHangingFootnote, "tdf106062_nonHangingFootnote.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
@@ -1204,7 +1142,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf106062_nonHangingFootnote, "tdf106062_nonHanging
DECLARE_OOXMLEXPORT_TEST( testActiveXTextfield, "activex_textbox.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XControlShape> xControlShape( getShape(1), uno::UNO_QUERY );
CPPUNIT_ASSERT( xControlShape.is() );
@@ -1235,7 +1172,6 @@ DECLARE_OOXMLEXPORT_TEST( testActiveXTextfield, "activex_textbox.docx" )
DECLARE_OOXMLEXPORT_TEST( testActiveXCheckbox, "activex_checkbox.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XControlShape> xControlShape( getShape(1), uno::UNO_QUERY );
CPPUNIT_ASSERT( xControlShape.is() );
@@ -1263,7 +1199,6 @@ DECLARE_OOXMLEXPORT_TEST( testActiveXCheckbox, "activex_checkbox.docx" )
DECLARE_OOXMLEXPORT_TEST(testActiveXControlAlign, "activex_control_align.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// First check box aligned as a floating object
uno::Reference<drawing::XControlShape> xControlShape(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xControlShape.is());
@@ -1325,7 +1260,6 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXControlAlign, "activex_control_align.odt")
DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1345,7 +1279,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf109184, "tdf109184.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf111964, "tdf111964.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Unicode spaces that are not XML whitespace must not be trimmed
const sal_Unicode sWSReference [] { 0x2002, 0x2002, 0x2002, 0x2002, 0x2002, 0 };
@@ -1354,7 +1287,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf111964, "tdf111964.docx")
DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark-shapetype.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<drawing::XShape> xShape1(getShape(1), uno::UNO_QUERY);
CPPUNIT_ASSERT(xShape1.is());
uno::Reference<beans::XPropertySet> xPropertySet1(xShape1, uno::UNO_QUERY);
@@ -1368,7 +1300,6 @@ DECLARE_OOXMLEXPORT_TEST(testWatermark, "watermark-shapetype.docx")
DECLARE_OOXMLEXPORT_TEST(testActiveXControlAtRunEnd, "activex_control_at_run_end.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Two issues were here:
// 1) second shape was not export (it is anchored to the end of the run)
// 2) inline property was inherited to the second shape by mistake
@@ -1403,7 +1334,6 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXControlAtRunEnd, "activex_control_at_run_end
DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Optionbutton groups were not handled
// The two optionbutton should have the same group name
const OUString sGroupName = "GroupX";
@@ -1421,7 +1351,6 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_gr
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(tdf112169, "tdf112169.odt")
{
- CPPUNIT_ASSERT_EQUAL(6, getPages());
// LO crashed while export because of character background color handling
//tdf76683 - Cannot be negative number - use firstLine instead of hanging
@@ -1432,7 +1361,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(tdf112169, "tdf112169.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103090, "tdf103090.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Get bookmark name
@@ -1451,7 +1379,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf103090, "tdf103090.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107111, "tdf107111.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Ensure that hyperlink and its properties are in place.
@@ -1463,7 +1390,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf107111, "tdf107111.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf90789, "tdf90789.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextContent> xShape(getShape(1), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xShape->getAnchor() != nullptr);
@@ -1485,7 +1411,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90789_2, "tdf90789-2.docx")
DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -1534,7 +1459,6 @@ DECLARE_OOXMLEXPORT_TEST(testTdf104354_2, "tdf104354-2.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf115557, "tdf115557.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// A chart anchored to a footnote multiplied during import
xmlDocUniquePtr pXmlDoc = parseExport("word/footnotes.xml");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 9f1f05b3b2bd..8ac7b706d1da 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -41,7 +41,6 @@ DECLARE_OOXMLEXPORT_TEST(testFdo47669, "fdo47669.docx")
DECLARE_OOXMLEXPORT_TEST(testN789482, "n789482.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that w:del was exported before w:hyperlink, resulting in an invalid XML.
uno::Reference<text::XTextRange> xParagraph = getParagraph(1);
getRun(xParagraph, 1, "Before. ");
@@ -60,7 +59,6 @@ DECLARE_OOXMLEXPORT_TEST(testN789482, "n789482.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBnc834035, "bnc834035.odt")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// Illustration index had wrong hyperlinks: anchor was using Writer's
// <seqname>!<index>|sequence syntax, not a bookmark name.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -70,7 +68,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBnc834035, "bnc834035.odt")
DECLARE_OOXMLEXPORT_TEST(testCp1000015, "cp1000015.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Redline and hyperlink end got exported in an incorrect order.
getParagraph(1, "Hello.");
getParagraph(2, "http://www.google.com/");
@@ -78,7 +75,6 @@ DECLARE_OOXMLEXPORT_TEST(testCp1000015, "cp1000015.odt")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlineIsEnd, "hyperlink.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Check that the document.xml contents all the tag properly closed.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// If document.xml miss any ending tag then parseExport() returns NULL which fail the test case.
@@ -89,7 +85,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperlineIsEnd, "hyperlink.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69649, "fdo69649.docx")
{
- CPPUNIT_ASSERT_EQUAL(15, getPages());
// The DOCX containing the Table of Contents was not exported with correct page nos
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -98,7 +93,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo69649, "fdo69649.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagO,"TOC_field_f.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// This test case is to verify \o flag should come once.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -109,7 +103,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagO,"TOC_field_f.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_f, "toc_doc.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// Export logic for all TOC field flags was enclosed inside
// if( SwTOXElement::Mark & pTOX->GetCreateType() ) in ww8atr.cxx which gets true for \f,
// this was the reason if there is \f flag present in original doc then only other flags like
@@ -125,7 +118,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_f, "toc_doc.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveZfield,"preserve_Z_field_TOC.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p[1]/w:r[2]/w:instrText", " TOC \\z \\f \\o \"1-3\" \\h");
@@ -133,7 +125,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveZfield,"preserve_Z_field_TOC.doc
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveWfieldTOC, "PreserveWfieldTOC.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\w \\f \\o \"1-3\" \\h");
@@ -141,7 +132,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveWfieldTOC, "PreserveWfieldTOC.do
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagB,"TOC_field_b.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This test case is to verify \b flag.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -152,7 +142,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFieldFlagB,"TOC_field_b.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\x \\f \\o \"1-3\" \\h");
@@ -160,7 +149,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPreserveXfieldTOC, "PreserveXfieldTOC.do
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77715,"FDO77715.docx")
{
- CPPUNIT_ASSERT_EQUAL(46, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[3]/w:r[2]/w:instrText[1]", " TOC \\c ");
@@ -168,7 +156,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO77715,"FDO77715.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// DOCX containing TOC should preserve code field '\u'.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -179,7 +166,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_RunInStyle,"fdo73596_RunInStyle.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// INDEX should be preserved.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -188,7 +174,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_RunInStyle,"fdo73596_RunInStyle
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_AlphaSeparator,"fdo73596_AlphaSeparator.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// INDEX flag \h "A" should be preserved.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
@@ -197,7 +182,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo73596_AlphaSeparator,"fdo73596_AlphaS
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption1, "EquationAsScientificNumbering.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#74431 : This test case is to verify the Captions are coming properly
// earlier it was coming as "SEQ "scientific"\*ROMAN now it is SEQ scientific\* ROMAN"
@@ -208,7 +192,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption1, "EquationAsScientificNumbering
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption2, "EquationWithAboveAndBelowCaption.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
// This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -218,7 +201,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption2, "EquationWithAboveAndBelowCapt
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption3, "FigureAsLabelPicture.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
// This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -228,7 +210,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption3, "FigureAsLabelPicture.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption4, "TableWithAboveCaptions.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
// This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -238,7 +219,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCaption4, "TableWithAboveCaptions.docx")
DECLARE_OOXMLEXPORT_TEST(testFooterContainHyperlink,"footer-contain-hyperlink.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem is that footer1.xml.rels contains the empty
// Target due to which the file get corrupted
// in MS Office 2007.
@@ -273,7 +253,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlphabeticalIndex_MultipleColumns,"alpha
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageref, "testPageref.docx")
{
- CPPUNIT_ASSERT_EQUAL(15, getPages());
// fdo#72563 : There was a problem that in case of TOC,PAGEREF field tag was not preserved during Roundtrip
// This test case is to verify that PAGEREF tag is coming with proper values inside <hyperlink> tag.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -283,7 +262,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testPageref, "testPageref.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_AutoColumn.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
// Bug :: fdo#73596
/*
* When the columns in Index are 0; i.e not specified by the
@@ -309,7 +287,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testIndexFieldFlagF,"IndexFieldFlagF.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBibliography,"FDO75133.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPathContent(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " BIBLIOGRAPHY ");
@@ -319,7 +296,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testBibliography,"FDO75133.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testGenericTextField, "Unsupportedtextfields.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// fdo#75158 : This test case is to verify the unsupported textfields are exported properly.
xmlDocUniquePtr pXmlDoc = parseExport();
@@ -333,7 +309,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testGenericTextField, "Unsupportedtextfields
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(test_FieldType, "99_Fields.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// Checking for three field types (BIBLIOGRAPHY, BIDIOUTLINE, CITATION) in sequence
assertXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:r[2]/w:instrText");
@@ -343,7 +318,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(test_FieldType, "99_Fields.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCitation,"FDO74775.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport();
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[2]/w:instrText", " CITATION Kra06 \\l 1033 ");
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtContent/w:r[4]/w:t", "(Kramer & Chen, 2006)");
@@ -351,7 +325,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCitation,"FDO74775.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperLinkTagEnded, "fdo76316.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* XML tag <w:hyperlink> was not getting closed when its inside another
* <w:hyperlink> tag.
*/
@@ -363,7 +336,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testHyperLinkTagEnded, "fdo76316.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76163 , "fdo76163.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
//docx file after RT is getting corrupted.
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[2]/w:hyperlink/w:r[10]/w:fldChar", "fldCharType", "end" );
@@ -371,7 +343,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO76163 , "fdo76163.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78659, "fdo78659.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[3]/w:fldChar[1]", 0);
@@ -379,7 +350,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78659, "fdo78659.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78654 , "fdo78654.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// In case of two "Hyperlink" tags in one paragraph and one of them
// contains "PAGEREF" field then field end tag was missing from hyperlink.
@@ -389,7 +359,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78654 , "fdo78654.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78599,"fdo78599.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
//docx file after RT is getting corrupted.
assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink/w:r[6]/w:fldChar", "fldCharType", "end" );
@@ -402,7 +371,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78599,"fdo78599.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78886, "fdo78886.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "/w:document[1]/w:body[1]/w:tbl[2]/w:tr[1]/w:tc[1]/w:p[1]/w:hyperlink[1]/w:r[2]/w:fldChar[1]", 0);
@@ -410,7 +378,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo78886, "fdo78886.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo78910, "fdo78910.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This is to ensure that the fld starts and ends inside a hyperlink...
@@ -420,7 +387,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo78910, "fdo78910.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78590, "FDO78590.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// This is to ensure that the fld starts and ends inside a hyperlink...
@@ -430,7 +396,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFDO78590, "FDO78590.docx")
DECLARE_OOXMLEXPORT_TEST(testSdtCitationRun, "sdt-citation-run.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the SDT was around the whole paragraph, not only around the citation field.
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
@@ -442,7 +407,6 @@ DECLARE_OOXMLEXPORT_TEST(testSdtCitationRun, "sdt-citation-run.docx")
DECLARE_OOXMLEXPORT_TEST(testParagraphSdt, "paragraph-sdt.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The problem was that the SDT was around the run only, not the whole paragraph.
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
@@ -453,7 +417,6 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphSdt, "paragraph-sdt.docx")
DECLARE_OOXMLEXPORT_TEST(testSdt2Run, "sdt-2-para.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
// The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
@@ -466,7 +429,6 @@ DECLARE_OOXMLEXPORT_TEST(testSdt2Run, "sdt-2-para.docx")
DECLARE_OOXMLEXPORT_TEST(test2Id, "2-id.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
// This was 2, but only one w:id is allowed.
@@ -476,7 +438,6 @@ DECLARE_OOXMLEXPORT_TEST(test2Id, "2-id.docx")
DECLARE_OOXMLEXPORT_TEST(testTableStart2Sdt, "table-start-2-sdt.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
// w:docPartGallery should be a child of <w:docPartObj>, make sure it's not a child of w:text.
@@ -486,7 +447,6 @@ DECLARE_OOXMLEXPORT_TEST(testTableStart2Sdt, "table-start-2-sdt.docx")
DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
{
// Single <w:sdt> was exported as 2 <w:sdt> elements.
@@ -508,14 +468,12 @@ DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo81492, "fdo81492.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[6]/w:instrText", "ADDIN EN.CITE.DATA");
}
DECLARE_OOXMLEXPORT_TEST(testEditTime, "fdo81341.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
/* Issue was LO was not able to Import and Export EditTime in seconds format.
* It was supporting Time in "HH:MM" format. But if DOCX contains Time in seconds,
* then LO was not able to display time in "HH:MM:SS" format.
@@ -533,7 +491,6 @@ DECLARE_OOXMLEXPORT_TEST(testEditTime, "fdo81341.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo81945, "fdo81945.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
assertXPath(pXmlDoc, "//w:sdt//w:sdt", 0);
@@ -541,7 +498,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testFdo81945, "fdo81945.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82123, "fdo82123.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// make sure there is only one run inside first SDT after RT as in the Original file.
@@ -550,7 +506,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82123, "fdo82123.docx")
DECLARE_OOXMLEXPORT_TEST(testSdtBeforeField, "sdt-before-field.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
// Make sure the field doesn't sneak inside the SDT: the SDT should contain only a single run (there were 6 ones).
@@ -560,7 +515,6 @@ DECLARE_OOXMLEXPORT_TEST(testSdtBeforeField, "sdt-before-field.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo81946, "fdo81946.docx")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml");
// make sure AlternateContent should not present in sdt
assertXPath(pXmlDoc, "/w:hdr[1]/w:p[1]/w:sdt[1]/w:sdtContent[1]/w:r[2]/mc:AlternateContent[1]",0);
@@ -568,7 +522,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo81946, "fdo81946.docx")
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82492, "fdo82492.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
// make sure there is only one run inside first SDT after RT as in the Original file.
@@ -577,7 +530,6 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testfdo82492, "fdo82492.docx")
DECLARE_OOXMLEXPORT_TEST(testSdtHeader, "sdt-header.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Problem was that w:sdt elements in headers were lost on import.
if (xmlDocUniquePtr pXmlDoc = parseExport("word/header1.xml"))
// This was 0, w:sdt (and then w:date) was missing.
@@ -586,7 +538,6 @@ DECLARE_OOXMLEXPORT_TEST(testSdtHeader, "sdt-header.docx")
DECLARE_OOXMLEXPORT_TEST(testSdtCompanyMultipara, "sdt-company-multipara.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
// This was 3, but multiple paragraphs inside "Company" SDT is now allowed.
@@ -596,7 +547,6 @@ DECLARE_OOXMLEXPORT_TEST(testSdtCompanyMultipara, "sdt-company-multipara.docx")
DECLARE_OOXMLEXPORT_TEST(testFixedDateFields, "fixed-date-field.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
@@ -619,34 +569,29 @@ DECLARE_OOXMLEXPORT_TEST(testFixedDateFields, "fixed-date-field.docx")
DECLARE_OOXMLEXPORT_TEST(testToxmarkHyperlink, "toxmarkhyperlink.fodt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// test that export doesn't assert with overlapping fields / hyperlink attr
}
DECLARE_OOXMLEXPORT_TEST(testOO34469, "ooo34469-1.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", "anchor", "2.9.2.Creating_New_files|outline");
}
DECLARE_OOXMLEXPORT_TEST(testOO39845, "ooo39845-7.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport())
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:hyperlink[1]", "anchor", "Figure4|graphic");
}
DECLARE_OOXMLEXPORT_TEST( testTdf85161, "tdf85161.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(OUString("Symbol"), getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName"));
CPPUNIT_ASSERT_EQUAL(OUString(u'\x5e'),getParagraph(1)->getString());
}
DECLARE_OOXMLEXPORT_TEST( testTdf66401, "tdf66401.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml"))
{
assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:r[3]/w:rPr/w:rFonts", 1);
@@ -660,7 +605,6 @@ DECLARE_OOXMLEXPORT_TEST( testTdf66401, "tdf66401.docx")
DECLARE_OOXMLEXPORT_TEST( testDateFieldInShape, "date_field_in_shape.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was crashed on export.
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -677,7 +621,6 @@ DECLARE_OOXMLEXPORT_TEST( testDateFieldInShape, "date_field_in_shape.docx" )
DECLARE_OOXMLEXPORT_TEST( testDateFieldAtEndOfParagraph, "date_field_at_end_of_paragraph.docx" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Additional line end was added by import and it was crashed on export
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -694,7 +637,6 @@ DECLARE_OOXMLEXPORT_TEST( testDateFieldAtEndOfParagraph, "date_field_at_end_of_p
DECLARE_OOXMLEXPORT_TEST(testDropDownFieldEntryLimit, "tdf126792.odt" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// In MSO, there is a limit of 25 for the items in a drop-down form field.
// So we truncate the list of items to not exceed this limit.
@@ -722,7 +664,6 @@ DECLARE_OOXMLEXPORT_TEST(testDropDownFieldEntryLimit, "tdf126792.odt" )
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132185, "tdf132185.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseExport("word/footer1.xml");
// Since the default (without xml:space attribute) is to ignore leading and trailing spaces,
// " PAGE \\* roman " will get imported as "PAGE \\* roman". This is also valid, and must be
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx b/sw/qa/extras/ww8export/ww8export2.cxx
index a8ba4c8c8969..0f0f9bebd713 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -42,7 +42,6 @@ public:
};
DECLARE_WW8EXPORT_TEST(testTdf99120, "tdf99120.doc")
{
- CPPUNIT_ASSERT_EQUAL(4, getPages());
CPPUNIT_ASSERT_EQUAL(OUString("Section 1, odd."), parseDump("/root/page[1]/header/txt/text()"));
CPPUNIT_ASSERT_EQUAL(OUString("Section 1, even."), parseDump("/root/page[2]/header/txt/text()"));
// This failed: the header was empty on the 3rd page, as the first page header was shown.
@@ -58,7 +57,6 @@ DECLARE_WW8EXPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPaddi
DECLARE_WW8EXPORT_TEST(testTdf55528_relativeTableWidth, "tdf55528_relativeTableWidth.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
@@ -69,7 +67,6 @@ DECLARE_WW8EXPORT_TEST(testTdf55528_relativeTableWidth, "tdf55528_relativeTableW
DECLARE_WW8EXPORT_TEST(testTdf128700_relativeTableWidth, "tdf128700_relativeTableWidth.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -81,7 +78,6 @@ DECLARE_WW8EXPORT_TEST(testTdf128700_relativeTableWidth, "tdf128700_relativeTabl
DECLARE_WW8EXPORT_TEST(testTdf116436_tableBackground, "tdf116436_tableBackground.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -95,7 +91,6 @@ DECLARE_WW8EXPORT_TEST(testTdf116436_tableBackground, "tdf116436_tableBackground
DECLARE_WW8EXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(text::WrapTextMode_THROUGH, getProperty<text::WrapTextMode>(getShape(1), "Surround"));
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
@@ -113,7 +108,6 @@ DECLARE_WW8EXPORT_TEST(testTdf37153, "tdf37153_considerWrapOnObjPos.doc")
DECLARE_WW8EXPORT_TEST(testTdf49102_mergedCellNumbering, "tdf49102_mergedCellNumbering.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL( OUString("2."), parseDump("/root/page/body/tab/row[4]/cell/txt/Special[@nType='PortionType::Number']", "rText") );
}
@@ -176,7 +170,6 @@ DECLARE_WW8EXPORT_TEST(testTdf55427_footnote2endnote, "tdf55427_footnote2endnote
DECLARE_WW8EXPORT_TEST(testTdf107931_KERN_DocEnabled_disabledDefStyle, "testTdf107931_KERN_DocEnabled_disabledDefStyle.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Paragraph 3: the default style has kerning disabled
CPPUNIT_ASSERT(!getProperty<bool>(getRun(getParagraph(3), 1), "CharAutoKerning"));
// Paragraph 4: style with kerning disabled
@@ -191,7 +184,6 @@ DECLARE_WW8EXPORT_TEST(testTdf107931_KERN_DocEnabled_disabledDefStyle, "testTdf1
DECLARE_WW8EXPORT_TEST(testTdf107931_KERN_enabledDefStyle, "testTdf107931_KERN_enabledDefStyle.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Paragraph 3: the default style has kerning enabled
CPPUNIT_ASSERT(getProperty<bool>(getRun(getParagraph(3), 1), "CharAutoKerning"));
// Paragraph 4: style with kerning disabled
@@ -225,7 +217,6 @@ DECLARE_WW8EXPORT_TEST(testBnc863018b, "bnc863018b.doc")
DECLARE_WW8EXPORT_TEST(testTdf112517_maxSprms, "tdf112517_maxSprms.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -234,7 +225,6 @@ DECLARE_WW8EXPORT_TEST(testTdf112517_maxSprms, "tdf112517_maxSprms.doc")
DECLARE_WW8EXPORT_TEST(testTdf108448_endNote, "tdf108448_endNote.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XEndnotesSupplier> xEndnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xEndnotes = xEndnotesSupplier->getEndnotes();
uno::Reference<text::XText> xEndnote;
@@ -245,7 +235,6 @@ DECLARE_WW8EXPORT_TEST(testTdf108448_endNote, "tdf108448_endNote.odt")
DECLARE_WW8EXPORT_TEST(testTdf106062_nonHangingFootnote, "tdf106062_nonHangingFootnote.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
@@ -255,7 +244,6 @@ DECLARE_WW8EXPORT_TEST(testTdf106062_nonHangingFootnote, "tdf106062_nonHangingFo
DECLARE_WW8EXPORT_TEST(testTdf116570_exportFootnote, "tdf116570_exportFootnote.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xFootnotes = xFootnotesSupplier->getFootnotes();
uno::Reference<text::XText> xFootnoteText;
@@ -278,7 +266,6 @@ DECLARE_WW8EXPORT_TEST(testTdf80635_pageRightRTL, "tdf80635_pageRightRTL.doc")
DECLARE_WW8EXPORT_TEST(testTdf80635_marginRTL, "tdf80635_marginRightRTL.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#80635 - transfer the float orientation to the table.
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
@@ -289,7 +276,6 @@ DECLARE_WW8EXPORT_TEST(testTdf80635_marginRTL, "tdf80635_marginRightRTL.doc")
DECLARE_WW8EXPORT_TEST(testTdf80635_marginLeft, "tdf80635_marginLeft.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#80635 - transfer the float orientation to the table.
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
@@ -300,7 +286,6 @@ DECLARE_WW8EXPORT_TEST(testTdf80635_marginLeft, "tdf80635_marginLeft.doc")
DECLARE_WW8EXPORT_TEST(testTdf80635_pageLeft, "tdf80635_pageLeft.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#80635 - transfer the float orientation to the table.
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
@@ -311,7 +296,6 @@ DECLARE_WW8EXPORT_TEST(testTdf80635_pageLeft, "tdf80635_pageLeft.doc")
DECLARE_WW8EXPORT_TEST(testTdf99197_defaultLTR, "tdf99197_defaultLTR.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Default Paragraph style, LTR",
text::WritingMode2::LR_TB, getProperty<sal_Int16>(getParagraph(1), "WritingMode") );
@@ -321,7 +305,6 @@ DECLARE_WW8EXPORT_TEST(testTdf99197_defaultLTR, "tdf99197_defaultLTR.doc")
DECLARE_WW8EXPORT_TEST(testTdf107773, "tdf107773.doc")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage();
// This was 1, multi-page table was imported as a floating one.
@@ -336,7 +319,6 @@ DECLARE_WW8EXPORT_TEST(testTdf107773, "tdf107773.doc")
DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJustification.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -350,20 +332,17 @@ DECLARE_WW8EXPORT_TEST(testTdf112074_RTLtableJustification, "tdf112074_RTLtableJ
DECLARE_WW8EXPORT_TEST(testTdf98620_rtlJustify, "tdf98620_rtlJustify.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
}
DECLARE_WW8EXPORT_TEST(testTdf121110_absJustify, "tdf121110_absJustify.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_RIGHT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(1), "ParaAdjust")) );
CPPUNIT_ASSERT_EQUAL( style::ParagraphAdjust_LEFT, static_cast<style::ParagraphAdjust>(getProperty<sal_Int16>(getParagraph(3), "ParaAdjust")) );
}
DECLARE_WW8EXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(1), "ParaAdjust"));
CPPUNIT_ASSERT_EQUAL(sal_Int16(style::ParagraphAdjust_CENTER), getProperty<sal_Int16>(getParagraph(2), "ParaAdjust"));
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Another paragraph aligned to right"), uno::UNO_QUERY);
@@ -384,13 +363,11 @@ DECLARE_WW8EXPORT_TEST(testTdf106174_rtlParaAlign, "tdf106174_rtlParaAlign.docx"
DECLARE_WW8EXPORT_TEST(testTdf119232_startEvenPage, "tdf119232_startEvenPage.doc")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), getProperty<sal_Int16>(getParagraph(1), "PageNumberOffset"));
}
DECLARE_WW8EXPORT_TEST(testTdf104805, "tdf104805.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WW8Num1"), uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
uno::Sequence<beans::PropertyValue> aNumberingRule;
@@ -408,7 +385,6 @@ DECLARE_WW8EXPORT_TEST(testTdf104805, "tdf104805.doc")
DECLARE_WW8EXPORT_TEST(testTdf104334, "tdf104334.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This failed with a container::NoSuchElementException: STYLEREF was
// mapped to SwChapterField, and the field result was "This is a Heading 1"
// instead of just "1".
@@ -417,7 +393,6 @@ DECLARE_WW8EXPORT_TEST(testTdf104334, "tdf104334.doc")
DECLARE_WW8EXPORT_TEST(testTdf108072, "tdf108072.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The property IsSplitAllowed was imported from an obsolete property, sprmTFCantSplit90
// instead of sprmTFCantSplit. sprmTFCantSplit90 is set to true for merged rows, so
// for merged rows incorrect settings were imported, which prevented them from breaking over pages.
@@ -430,7 +405,6 @@ DECLARE_WW8EXPORT_TEST(testTdf108072, "tdf108072.doc")
DECLARE_WW8EXPORT_TEST(testTdf91687, "tdf91687.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Exported Watermarks were resized
uno::Reference<drawing::XShape> xWatermark = getShape(1);
@@ -440,7 +414,6 @@ DECLARE_WW8EXPORT_TEST(testTdf91687, "tdf91687.doc")
DECLARE_WW8EXPORT_TEST(testTdf114308, "tdf114308.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Watermark with no additional padding
uno::Reference<drawing::XShape> xWatermark = getShape(1);
@@ -449,7 +422,6 @@ DECLARE_WW8EXPORT_TEST(testTdf114308, "tdf114308.doc")
DECLARE_WW8EXPORT_TEST(testTdf111480, "tdf111480.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Circular text was imported horizontally
uno::Reference<drawing::XShape> xText = getShape(1);
@@ -459,7 +431,6 @@ DECLARE_WW8EXPORT_TEST(testTdf111480, "tdf111480.doc")
DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -470,7 +441,6 @@ DECLARE_WW8EXPORT_TEST(testTdf70838, "tdf70838.odt")
DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotation.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
@@ -484,7 +454,6 @@ DECLARE_WW8EXPORT_TEST(testTdf70838b_verticalRotation, "tdf70838b_verticalRotati
DECLARE_WW8EXPORT_TEST( testActiveXCheckbox, "checkbox_control.odt" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// First check box anchored as a floating object
uno::Reference<drawing::XControlShape> xControlShape;
if(!mbExported)
@@ -522,7 +491,6 @@ DECLARE_WW8EXPORT_TEST( testActiveXCheckbox, "checkbox_control.odt" )
DECLARE_WW8EXPORT_TEST( testTdf115896_layoutInCell, "tdf115896_layoutInCell.doc" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Check anchor type - was anchored to page because of unknown version of Word
uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet,"AnchorType"));
@@ -530,7 +498,6 @@ DECLARE_WW8EXPORT_TEST( testTdf115896_layoutInCell, "tdf115896_layoutInCell.doc"
DECLARE_WW8EXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> xTextField = getProperty< uno::Reference<beans::XPropertySet> >(getRun(getParagraph(1), 2), "TextField");
CPPUNIT_ASSERT(xTextField.is());
uno::Reference<lang::XServiceInfo> xServiceInfo(xTextField, uno::UNO_QUERY_THROW);
@@ -557,7 +524,6 @@ DECLARE_WW8EXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.doc")
DECLARE_OOXMLEXPORT_TEST( testTableCrossReference, "table_cross_reference.odt" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#42346: Cross references to tables were not saved
// MSO uses simple bookmarks for referencing table caption, so we do the same by export
if (!mbExported)
@@ -716,7 +682,6 @@ DECLARE_OOXMLEXPORT_TEST( testTableCrossReference, "table_cross_reference.odt" )
DECLARE_OOXMLEXPORT_TEST( testTableCrossReferenceCustomFormat, "table_cross_reference_custom_format.odt" )
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// tdf#42346: Cross references to tables were not saved
// Check also captions with custom formatting
if (!mbExported)
@@ -833,7 +798,6 @@ DECLARE_OOXMLEXPORT_TEST( testTableCrossReferenceCustomFormat, "table_cross_refe
DECLARE_OOXMLEXPORT_TEST( testObjectCrossReference, "object_cross_reference.odt" )
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
// tdf#42346: Cross references to objects were not saved
// MSO uses simple bookmarks for referencing table caption, so we do the same by export
if (!mbExported)
@@ -947,7 +911,6 @@ DECLARE_OOXMLEXPORT_TEST( testObjectCrossReference, "object_cross_reference.odt"
DECLARE_WW8EXPORT_TEST(testTdf112118_DOC, "tdf112118.doc")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
static const struct {
const char* styleName;
struct {
@@ -1016,7 +979,6 @@ DECLARE_WW8EXPORT_TEST(testTdf117503, "tdf117503.docx")
DECLARE_WW8EXPORT_TEST(testTdf117885, "tdf117885.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
/* Get the vertical position of the paragraph containing the text "Start" */
@@ -1036,7 +998,6 @@ DECLARE_WW8EXPORT_TEST(testTdf117885, "tdf117885.doc")
DECLARE_WW8EXPORT_TEST(testTdf118133, "tdf118133.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// This was 0, doc import + doc export resulted in lost image due to broken
// lazy-loading of tiff images.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(15240), getShape(1)->getSize().Width);
@@ -1044,7 +1005,6 @@ DECLARE_WW8EXPORT_TEST(testTdf118133, "tdf118133.docx")
DECLARE_WW8EXPORT_TEST(testTdf118412, "tdf118412.doc")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
/* Check that the first page's bottom margin is 1.251cm (not 2.540cm) */
OUString sPageStyleName = getProperty<OUString>(getParagraph(1), "PageStyleName");
uno::Reference<style::XStyle> xPageStyle(
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 516b5344a0fa..f021491a164e 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -39,7 +39,6 @@ public:
DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
CPPUNIT_ASSERT( xStorable->isReadonly() );
@@ -56,7 +55,6 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
DECLARE_WW8EXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xNumberingRules
= getProperty<uno::Reference<container::XIndexAccess>>(getParagraph(1), "NumberingRules");
comphelper::SequenceAsHashMap aMap(xNumberingRules->getByIndex(0));
@@ -130,7 +128,6 @@ CPPUNIT_TEST_FIXTURE(SwModelTestBase, testChicagoNumberingFootnote)
DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, "tdf79553_lineNumbers.doc")
{
- CPPUNIT_ASSERT_EQUAL(7, getPages());
bool bValue = false;
sal_Int32 nValue = -1;
@@ -147,7 +144,6 @@ DECLARE_WW8EXPORT_TEST(testdf79553_lineNumbers, "tdf79553_lineNumbers.doc")
DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Page Style"), uno::UNO_QUERY);
bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn");
@@ -156,7 +152,6 @@ DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Page Style"), uno::UNO_QUERY);
bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn");
@@ -165,7 +160,6 @@ DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTables->getCount()); // Only 4 tables were imported.
@@ -187,7 +181,6 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
DECLARE_WW8EXPORT_TEST(testTdf73056_cellMargins, "tdf73056_cellMargins.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
uno::Reference< container::XIndexAccess > xTables( xTablesSupplier->getTextTables(), uno::UNO_QUERY );
uno::Reference< text::XTextTable > xTable1( xTables->getByIndex( 0 ), uno::UNO_QUERY );
@@ -200,7 +193,6 @@ DECLARE_WW8EXPORT_TEST(testTdf73056_cellMargins, "tdf73056_cellMargins.doc")
}
DECLARE_WW8EXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFields.docx")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//using .docx input file to verify cross-format compatibility.
uno::Reference<text::XFormField> xFormField = getProperty< uno::Reference<text::XFormField> >(getRun(getParagraph(5), 3), "Bookmark");
uno::Reference<container::XNameContainer> xParameters(xFormField->getParameters());
@@ -254,7 +246,6 @@ DECLARE_WW8EXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFiel
DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControlCrossRef.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
@@ -287,7 +278,6 @@ DECLARE_WW8EXPORT_TEST(testTdf120225_textControlCrossRef, "tdf120225_textControl
DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(2);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Normal text "), "CharEscapement"), 0);
// Negative escapements (subscripts) were decreasing by 1% every round-trip due to bad manual rounding.
@@ -300,7 +290,6 @@ DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement, "tdf127316_autoEscapement.o
DECLARE_WW8EXPORT_TEST(testTdf127316_autoEscapement2, "tdf127316_autoEscapement2.odt")
{
- CPPUNIT_ASSERT_EQUAL(2, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
CPPUNIT_ASSERT_DOUBLES_EQUAL( 0.f, getProperty<float>(getRun(xPara, 1, "Base1"), "CharEscapement"), 0);
// Font is 80% of 40pt or 32pt, original escapement is 6.4pt, so round-trip escapement is 20%.
@@ -322,7 +311,6 @@ DECLARE_WW8EXPORT_TEST(testTdf120412_proportionalEscapement, "tdf120412_proporti
DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.docx")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Numbering - First level"),
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(Color(184,204,228), Color(getProperty<sal_uInt32>(xStyle, "ParaBackColor")));//R:184 G:204 B:228
@@ -335,7 +323,6 @@ DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.doc
DECLARE_WW8EXPORT_TEST(testTdf128608_fillStyleNoneB, "tdf128608_fillStyleNoneB.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xText(getParagraph(1));
CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
CPPUNIT_ASSERT_EQUAL_MESSAGE("No fill", drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
@@ -343,7 +330,6 @@ DECLARE_WW8EXPORT_TEST(testTdf128608_fillStyleNoneB, "tdf128608_fillStyleNoneB.o
DECLARE_WW8EXPORT_TEST(testTdf132094_transparentPageImage, "tdf132094_transparentPageImage.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<drawing::XShape> image (getShape(1), uno::UNO_QUERY);
// Don't add fillstyle when none is set.
// Well, ok, at least make it transparent if you do uselessly set a solid color...
@@ -354,7 +340,6 @@ DECLARE_WW8EXPORT_TEST(testTdf132094_transparentPageImage, "tdf132094_transparen
DECLARE_WW8EXPORT_TEST(testTdf112618_textbox_no_bg, "tdf112618_textbox_no_bg.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_uInt16 nTransparence = getProperty<sal_Int16>(getShape(2), "FillTransparence");
CPPUNIT_ASSERT_EQUAL(sal_uInt16(100), nTransparence);
CPPUNIT_ASSERT_EQUAL(nTransparence, getProperty<sal_uInt16>(getShape(2), "BackColorTransparency"));
@@ -362,7 +347,6 @@ DECLARE_WW8EXPORT_TEST(testTdf112618_textbox_no_bg, "tdf112618_textbox_no_bg.doc
DECLARE_WW8EXPORT_TEST(testTdf101826_xattrTextBoxFill, "tdf101826_xattrTextBoxFill.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
//Basic 1 Color Fill: gradient from yellow(FFFF00) to brown(767600) currently saves as mid-color
CPPUNIT_ASSERT_MESSAGE("background color", Color(0xFF, 0xFF, 0x00) != getProperty<Color>(getShape(1), "BackColor"));
//Basic 2 Color Fill: gradient from yellow(FFFF00) to green(00B050) currently saves as mid-color
@@ -373,7 +357,6 @@ DECLARE_WW8EXPORT_TEST(testTdf101826_xattrTextBoxFill, "tdf101826_xattrTextBoxFi
DECLARE_WW8EXPORT_TEST(testTdf123433_fillStyleStop, "tdf123433_fillStyleStop.doc")
{
- CPPUNIT_ASSERT_EQUAL(3, getPages());
uno::Reference<text::XTextRange> xText(getParagraph(12));
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
@@ -381,14 +364,12 @@ DECLARE_WW8EXPORT_TEST(testTdf123433_fillStyleStop, "tdf123433_fillStyleStop.doc
DECLARE_WW8EXPORT_TEST(testTdf127862_pageFillStyle, "tdf127862_pageFillStyle.odt")
{
- CPPUNIT_ASSERT_EQUAL(6, getPages());
uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT(drawing::FillStyle_NONE != getProperty<drawing::FillStyle>(xStyle, "FillStyle"));
}
DECLARE_WW8EXPORT_TEST(testTdf128608_tableParaBackColor, "tdf128608_tableParaBackColor.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
@@ -405,7 +386,6 @@ DECLARE_WW8EXPORT_TEST(testTdf128608_tableParaBackColor, "tdf128608_tableParaBac
DECLARE_WW8EXPORT_TEST(testTdf94009_zeroPgMargin, "tdf94009_zeroPgMargin.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"),
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(defaultStyle, "TopMargin"));
@@ -413,7 +393,6 @@ DECLARE_WW8EXPORT_TEST(testTdf94009_zeroPgMargin, "tdf94009_zeroPgMargin.odt")
DECLARE_WW8EXPORT_TEST(testTdf120711_joinedParagraphWithChangeTracking, "tdf120711.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
sal_Int16 numFormat = getNumberingTypeOfParagraph(5);
// last paragraph is not a list item
CPPUNIT_ASSERT(style::NumberingType::CHAR_SPECIAL != numFormat);
@@ -421,7 +400,6 @@ DECLARE_WW8EXPORT_TEST(testTdf120711_joinedParagraphWithChangeTracking, "tdf1207
DECLARE_WW8EXPORT_TEST(testTdf129522_removeShadowStyle, "tdf129522_removeShadowStyle.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference< container::XNameAccess > paragraphStyles = getStyles("ParagraphStyles");
uno::Reference< beans::XPropertySet > xStyleProps(paragraphStyles->getByName("Shadow"), uno::UNO_QUERY_THROW);
table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(xStyleProps, "ParaShadowFormat");
@@ -444,7 +422,6 @@ DECLARE_WW8EXPORT_TEST(testTdf129522_removeShadowStyle, "tdf129522_removeShadowS
DECLARE_WW8EXPORT_TEST(testBtlrCell, "btlr-cell.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Without the accompanying fix in place, this test would have failed, as
// the btlr text direction in the A1 cell was lost on DOC import and
// export.
@@ -464,7 +441,6 @@ DECLARE_WW8EXPORT_TEST(testBtlrCell, "btlr-cell.doc")
DECLARE_WW8EXPORT_TEST(testTdf118375export, "tdf118375_240degClockwise.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// The input document has one custom shape, which is rotated 240deg. Check
// that it has the same position as in Word.
uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(mxComponent,
@@ -488,7 +464,6 @@ DECLARE_WW8EXPORT_TEST(testTdf118375export, "tdf118375_240degClockwise.doc")
DECLARE_WW8EXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
uno::Reference<text::XTextRange> xPara = getParagraph(1);
CPPUNIT_ASSERT_EQUAL(OUString("Text"),
getProperty<OUString>(getRun(xPara, 1), "TextPortionType"));
@@ -506,7 +481,6 @@ DECLARE_WW8EXPORT_TEST(testImageCommentAtChar, "image-comment-at-char.doc")
DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
auto xShape = getShape(1);
// First check the size of the EMF graphic contained in the shape.
auto xGraphic = getProperty< uno::Reference<graphic::XGraphic> >(
@@ -524,7 +498,6 @@ DECLARE_WW8EXPORT_TEST(testTdf126708emf, "tdf126708_containsemf.odt")
DECLARE_WW8EXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
if (!mbExported)
{
return;
@@ -539,7 +512,6 @@ DECLARE_WW8EXPORT_TEST(testBtlrFrame, "btlr-frame.odt")
DECLARE_WW8EXPORT_TEST(testPresetDash, "tdf127166_prstDash_Word97.doc")
{
- CPPUNIT_ASSERT_EQUAL(1, getPages());
// Error was, that the 'sys' preset dash styles were neither imported not
// exported, the mixed styles had wrong dash-dot order, they were imported
// with absolute values.