summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-09 09:06:19 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-09 09:38:17 +0100
commit469e17ac5be4205c0f3e704607c38274f092e617 (patch)
tree68d5b51c2e414a5aafff703107efdbe8b396f9df
parent50bf3061e6645125ef4355f214dd35656012048b (diff)
sw testcases: avoid using UI name for default style name
Change-Id: Ic2e08245dd022555ad6308283d406d81141a9124
-rw-r--r--sw/qa/extras/README4
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx2
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport2.cxx16
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx6
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx4
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx18
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx4
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx20
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx2
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx4
12 files changed, 42 insertions, 44 deletions
diff --git a/sw/qa/extras/README b/sw/qa/extras/README
index 74d84da4cdb0..c295858b83eb 100644
--- a/sw/qa/extras/README
+++ b/sw/qa/extras/README
@@ -124,7 +124,7 @@ when later this test fails for some reason. In cpp, you typically need to be
more verbose, so the code will look like:
----
-uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
----
@@ -269,5 +269,5 @@ ThisComponent.StyleFamilies.PageStyles.getByName("Default Style").Width
C++:
-getStyles("PageStyles")->getByName(DEFAULT_STYLE) >>= defaultStyle;
+getStyles("PageStyles")->getByName("Standard") >>= defaultStyle;
sal_Int32 width = getProperty< sal_Int32 >( defaultStyle, "Width" );
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 95eee3514266..424f03e078c7 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -54,8 +54,6 @@
using namespace css;
-#define DEFAULT_STYLE "Default Style"
-
/**
* Macro to declare a new test (with full round-trip. To test
* import only use the DECLARE_SW_IMPORT_TEST macro instead).
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 2feab11a6dbc..065cf787aaa8 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -308,7 +308,7 @@ DECLARE_ODFIMPORT_TEST(testFdo79269, "fdo79269.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage());
// The problem was that the first-footer was shared.
- uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPropSet, "FirstIsShared"));
uno::Reference<text::XTextRange> xFooter1 = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "FooterTextFirst");
@@ -325,7 +325,7 @@ DECLARE_ODFIMPORT_TEST(testFdo79269_header, "fdo79269_header.odt")
xCursor->jumpToLastPage();
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage());
- uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropSet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(false, getProperty<bool>(xPropSet, "FirstIsShared"));
uno::Reference<text::XTextRange> xFooter1 = getProperty< uno::Reference<text::XTextRange> >(xPropSet, "HeaderTextFirst");
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 7e693894ce9b..66766e4ec323 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -485,7 +485,7 @@ DECLARE_OOXMLEXPORT_TEST(testMultiPageToc, "multi-page-toc.docx")
uno::Reference<container::XNamed> xTextSection = getProperty< uno::Reference<container::XNamed> >(getParagraph(2), "TextSection");
CPPUNIT_ASSERT_EQUAL(OUString("Table of Contents1"), xTextSection->getName());
// There should be a field in the header as well.
- uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
CPPUNIT_ASSERT_EQUAL(OUString("TextFieldStart"), getProperty<OUString>(getRun(getParagraphOfText(1, xHeaderText), 1), "TextPortionType"));
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index dd41313e25ea..f751fff5ba38 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -101,7 +101,7 @@ DECLARE_OOXMLEXPORT_TEST(testPageGraphicBackground, "page-graphic-background.odt
// No idea how the graphic background should be exported (seems there is no
// way to do a non-tiling export to OOXML), but at least the background
// color shouldn't be black.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), getProperty<sal_Int32>(xPageStyle, "BackColor"));
}
@@ -667,7 +667,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo64826, "fdo64826.docx")
DECLARE_OOXMLEXPORT_TEST(testPageBackground, "page-background.docx")
{
// 'Document Background' wasn't exported.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getProperty<sal_Int32>(xPageStyle, "BackColor"));
}
@@ -687,7 +687,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo65655, "fdo65655.docx")
// The 'Different Odd & Even Pages' was turned on
// However - LO assumed that because the 'even' footer is blank - it should ignore the 'Different Odd & Even Pages' flag
// So it did not import it and did not export it
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
bool bValue = false;
xPropertySet->getPropertyValue("HeaderIsShared") >>= bValue;
CPPUNIT_ASSERT_EQUAL(false, bool(bValue));
@@ -772,7 +772,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo64238_a, "fdo64238_a.docx")
// This case specifically is for :
// 'Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word
// In this case the imported footer in LO was supposed to be blank, but instead was the 'even' footer
- uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "FooterText");
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
@@ -792,7 +792,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo64238_b, "fdo64238_b.docx")
// This case specifically is for :
// 'Non-Blank Odd Footer' with 'Non-Blank Even Footer' when 'Show Only Odd Footer' is marked in Word
// In this case the imported footer in LO was supposed to be just the odd footer, but instead was the 'odd' and 'even' footers concatenated
- uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "FooterText");
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xFooterParagraph, uno::UNO_QUERY);
uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
@@ -1007,7 +1007,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo65718, "fdo65718.docx")
DECLARE_OOXMLEXPORT_TEST(testFdo64350, "fdo64350.docx")
{
// The problem was that page border shadows were not exported
- table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "ShadowFormat");
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
}
@@ -1027,7 +1027,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo67013, "fdo67013.docx")
* xFooterFirstParagraph = xFooterEnum.nextElement()
* xFooterTopBorder = xFooterFirstParagraph.TopBorder
*/
- uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
uno::Reference< text::XTextRange > xHeaderParagraph = getParagraphOfText( 1, xHeaderText );
table::BorderLine2 aHeaderBottomBorder = getProperty<table::BorderLine2>(xHeaderParagraph, "BottomBorder");
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), aHeaderBottomBorder.Color);
@@ -1037,7 +1037,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo67013, "fdo67013.docx")
CPPUNIT_ASSERT_EQUAL(sal_uInt32(159), aHeaderBottomBorder.LineWidth);
CPPUNIT_ASSERT_EQUAL(sal_Int16(26), aHeaderBottomBorder.OuterLineWidth);
- uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "FooterText");
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
table::BorderLine2 aFooterTopBorder = getProperty<table::BorderLine2>(xFooterParagraph, "TopBorder");
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x622423), aFooterTopBorder.Color);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index 71518c34b82e..b6757a579c29 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -84,7 +84,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx")
// This check is correct if both have headers or both don't have headers.
// However - if one has a header, and the other one has an empty header (no header) - it is not correct to compare
// between them (same goes for 'footer').
- uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "FooterText");
+ uno::Reference<text::XText> xFooterText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "FooterText");
uno::Reference< text::XTextRange > xFooterParagraph = getParagraphOfText( 1, xFooterText );
// First page footer is empty, second page footer is 'aaaa'
@@ -98,14 +98,14 @@ DECLARE_OOXMLEXPORT_TEST(testA4AndBorders, "a4andborders.docx")
* was exported as a child of pgBorders, thus being ignored on reload.
* We assert dimension against A4 size in mm (to avoid minor rounding errors)
*/
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect Page Width (mm)", sal_Int32(210), getProperty<sal_Int32>(xPageStyle, "Width") / 100);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Incorrect Page Height (mm)", sal_Int32(297), getProperty<sal_Int32>(xPageStyle, "Height") / 100);
}
DECLARE_OOXMLEXPORT_TEST(testFdo68787, "fdo68787.docx")
{
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 25, the 'lack of w:separator' <-> '0 line width' mapping was missing.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 68c0e2d03611..95794d1eae17 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -856,7 +856,7 @@ DECLARE_OOXMLEXPORT_TEST(testTableCellWithDirectFormatting, "fdo80800.docx")
DECLARE_OOXMLEXPORT_TEST(test2colHeader, "2col-header.docx")
{
// Header was lost on export when the document had multiple columns.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xPageStyle, "HeaderIsOn"));
}
@@ -917,7 +917,7 @@ DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx")
DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx")
{
// Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 2000, page width wasn't large enough.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2540), getProperty<sal_Int32>(xPageStyle, "LeftMargin"));
}
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 5a5405f3ad06..f7be78bdef8a 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -254,7 +254,7 @@ DECLARE_OOXMLIMPORT_TEST(testN750935, "n750935.docx")
*
* xray ThisComponent.StyleFamilies.PageStyles.Default.FooterIsShared
*/
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
bool bValue = false;
xPropertySet->getPropertyValue("HeaderIsShared") >>= bValue;
CPPUNIT_ASSERT_EQUAL(true, bValue);
@@ -527,7 +527,7 @@ xray ThisComponent.StyleFamilies.PageStyles.Default.Width
uno::Reference<container::XNameAccess> pageStyles;
styleFamilies->getByName("PageStyles") >>= pageStyles;
uno::Reference<uno::XInterface> defaultStyle;
- pageStyles->getByName(DEFAULT_STYLE) >>= defaultStyle;
+ pageStyles->getByName("Standard") >>= defaultStyle;
uno::Reference<beans::XPropertySet> styleProperties( defaultStyle, uno::UNO_QUERY );
sal_Int32 width = 0;
styleProperties->getPropertyValue( "Width" ) >>= width;
@@ -571,7 +571,7 @@ DECLARE_OOXMLIMPORT_TEST(testN758883, "n758883.docx")
*
* xray ThisComponent.StyleFamilies.PageStyles.Default.LeftMargin
*/
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
sal_Int32 nValue = 0;
xPropertySet->getPropertyValue("LeftMargin") >>= nValue;
CPPUNIT_ASSERT_EQUAL(sal_Int32(847), nValue);
@@ -659,7 +659,7 @@ DECLARE_OOXMLIMPORT_TEST(testN693238, "n693238.docx")
*
* xray ThisComponent.StyleFamilies.PageStyles.Default.LeftMargin ' was 2000, should be 635
*/
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
sal_Int32 nValue = 0;
xPropertySet->getPropertyValue("LeftMargin") >>= nValue;
CPPUNIT_ASSERT_EQUAL(sal_Int32(635), nValue);
@@ -1220,7 +1220,7 @@ DECLARE_OOXMLIMPORT_TEST(testGroupshapeSmarttag, "groupshape-smarttag.docx")
DECLARE_OOXMLIMPORT_TEST(testN793262, "n793262.docx")
{
- uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<container::XEnumerationAccess> xHeaderText = getProperty< uno::Reference<container::XEnumerationAccess> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
uno::Reference<container::XEnumeration> xHeaderParagraphs(xHeaderText->createEnumeration());
xHeaderParagraphs->nextElement();
// Font size of the last empty paragraph in the header was ignored, this was 11.
@@ -1470,7 +1470,7 @@ DECLARE_OOXMLIMPORT_TEST(testIndentation, "indentation.docx")
DECLARE_OOXMLIMPORT_TEST(testPageBorderShadow, "page-border-shadow.docx")
{
// 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(DEFAULT_STYLE), "ShadowFormat");
+ table::ShadowFormat aShadow = getProperty<table::ShadowFormat>(getStyles("PageStyles")->getByName("Standard"), "ShadowFormat");
CPPUNIT_ASSERT_EQUAL(COL_BLACK, sal_uInt32(aShadow.Color));
CPPUNIT_ASSERT_EQUAL(table::ShadowLocation_BOTTOM_RIGHT, aShadow.Location);
// w:sz="48" is in eights of a point, 1 pt is 20 twips.
@@ -1680,7 +1680,7 @@ DECLARE_OOXMLIMPORT_TEST(testDefaultSectBreakCols, "default-sect-break-cols.docx
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount());
// Second problem: the page style had two columns, while it shouldn't have any.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xPageStyle, "TextColumns");
CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount());
// Check for the Column Separator value.It should be FALSE as the document does not contain separator line.
@@ -2150,7 +2150,7 @@ DECLARE_OOXMLIMPORT_TEST(testDMLGroupShapeRunFonts, "dml-groupshape-runfonts.doc
DECLARE_OOXMLIMPORT_TEST(testStrict, "strict.docx")
{
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ 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"));
// This was only 1397, same issue
@@ -2515,7 +2515,7 @@ DECLARE_OOXMLIMPORT_TEST(testHidemark, "hidemark.docx")
DECLARE_OOXMLIMPORT_TEST(testBnc519228OddBreaks, "bnc519228_odd-breaks.docx")
{
// 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(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), defaultStyle->getPropertyValue("PageStyleLayout"));
uno::Reference<beans::XPropertySet> firstPage( getStyles("PageStyles")->getByName("First Page"), uno::UNO_QUERY );
CPPUNIT_ASSERT_EQUAL(uno::makeAny(style::PageStyleLayout_ALL), firstPage->getPropertyValue("PageStyleLayout"));
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 235ec8e3b822..60a2293c99fb 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -664,7 +664,7 @@ DECLARE_RTFEXPORT_TEST(testFdo66743, "fdo66743.rtf")
DECLARE_RTFEXPORT_TEST(testFdo68787, "fdo68787.rtf")
{
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
// This was 0, the 'lack of \chftnsep' <-> '0 line width' mapping was missing in the RTF tokenizer / exporter.
CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty<sal_Int32>(xPageStyle, "FootnoteLineRelativeWidth"));
}
@@ -969,7 +969,7 @@ DECLARE_RTFEXPORT_TEST(testTdf94377, "tdf94377.rtf")
DECLARE_RTFEXPORT_TEST(testPageBackground, "page-background.rtf")
{
// The problem was that \background was ignored.
- uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0x92D050), getProperty<sal_Int32>(xPageStyle, "BackColor"));
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 3d1c77eab1d9..d98b9b9ccd62 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -364,7 +364,7 @@ DECLARE_RTFIMPORT_TEST(testFdo81892, "fdo81892.rtf")
DECLARE_RTFIMPORT_TEST(testFdo45394, "fdo45394.rtf")
{
- uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
OUString aActual = xHeaderText->getString();
// Encoding in the header was wrong.
OUString aExpected("\xd0\x9f\xd0\x9a \xd0\xa0\xd0\x98\xd0\x9a", 11, RTL_TEXTENCODING_UTF8);
@@ -402,7 +402,7 @@ DECLARE_RTFIMPORT_TEST(testFdo44176, "fdo44176.rtf")
{
uno::Reference<container::XNameAccess> xPageStyles(getStyles("PageStyles"));
uno::Reference<beans::XPropertySet> xFirstPage(xPageStyles->getByName("First Page"), uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xDefault(xPageStyles->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xDefault(xPageStyles->getByName("Standard"), uno::UNO_QUERY);
sal_Int32 nFirstTop = 0, nDefaultTop = 0, nDefaultHeader = 0;
xFirstPage->getPropertyValue("TopMargin") >>= nFirstTop;
xDefault->getPropertyValue("TopMargin") >>= nDefaultTop;
@@ -566,7 +566,7 @@ DECLARE_RTFIMPORT_TEST(testN757651, "n757651.rtf")
DECLARE_RTFIMPORT_TEST(testFdo49501, "fdo49501.rtf")
{
- uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_True, getProperty<sal_Bool>(xStyle, "IsLandscape"));
sal_Int32 nExpected(convertTwipToMm100(567));
@@ -650,7 +650,7 @@ DECLARE_RTFIMPORT_TEST(testFdo46966, "fdo46966.rtf")
*
* xray ThisComponent.StyleFamilies.PageStyles.Default.TopMargin
*/
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(720)), getProperty<sal_Int32>(xPropertySet, "TopMargin"));
}
@@ -858,7 +858,7 @@ DECLARE_RTFIMPORT_TEST(testCopyPastePageStyle, "copypaste-pagestyle.rtf")
// Once we have more copy&paste tests, makes sense to refactor this to some helper method.
paste("copypaste-pagestyle-paste.rtf");
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(21001), getProperty<sal_Int32>(xPropertySet, "Width")); // Was letter, i.e. 21590
}
@@ -915,7 +915,7 @@ DECLARE_RTFIMPORT_TEST(testDplinehollow, "dplinehollow.rtf")
DECLARE_RTFIMPORT_TEST(testLeftmarginDefault, "leftmargin-default.rtf")
{
// The default left/right margin was incorrect when the top margin was set to zero.
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), getProperty<sal_Int32>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "LeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2540), getProperty<sal_Int32>(getStyles("PageStyles")->getByName("Standard"), "LeftMargin"));
}
DECLARE_RTFIMPORT_TEST(testDppolyline, "dppolyline.rtf")
@@ -1012,7 +1012,7 @@ DECLARE_RTFIMPORT_TEST(testFdo57886, "fdo57886.rtf")
DECLARE_RTFIMPORT_TEST(testFdo58076, "fdo58076.rtf")
{
// An additional section was created, so the default page style didn't have the custom margins.
- uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(2251), getProperty<sal_Int32>(xStyle, "LeftMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(1752), getProperty<sal_Int32>(xStyle, "RightMargin"));
CPPUNIT_ASSERT_EQUAL(sal_Int32(635), getProperty<sal_Int32>(xStyle, "TopMargin"));
@@ -1208,7 +1208,7 @@ DECLARE_RTFIMPORT_TEST(testFdo51916, "fdo51916.rtf")
DECLARE_RTFIMPORT_TEST(testFdo63023, "fdo63023.rtf")
{
- uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
// Back color was black (0) in the header, due to missing color table in the substream.
CPPUNIT_ASSERT_EQUAL(sal_Int32(0xFFFF99), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xHeaderText), 1), "CharBackColor"));
}
@@ -1506,7 +1506,7 @@ DECLARE_RTFIMPORT_TEST(testFdo67365, "fdo67365.rtf")
DECLARE_RTFIMPORT_TEST(testFdo67498, "fdo67498.rtf")
{
// Left margin of the default page style wasn't set (was 2000).
- CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(5954)), getProperty<sal_Int32>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "LeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(5954)), getProperty<sal_Int32>(getStyles("PageStyles")->getByName("Standard"), "LeftMargin"));
}
DECLARE_RTFIMPORT_TEST(testFdo47440, "fdo47440.rtf")
@@ -1845,7 +1845,7 @@ DECLARE_RTFIMPORT_TEST(testFdo76628, "fdo76628.rtf")
// Should be 'SAMPLE' in Russian, was garbage.
getParagraph(1, aExpected);
- uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "HeaderText");
+ uno::Reference<text::XText> xHeaderText = getProperty< uno::Reference<text::XText> >(getStyles("PageStyles")->getByName("Standard"), "HeaderText");
OUString aExpectedHeader("\xd0\x9f\xd0\xbe\xd0\xb4\xd0\xb3\xd0\xbe\xd1\x82\xd0\xbe\xd0\xb2\xd0\xbb\xd0\xb5\xd0\xbd\xd0\xbe", 24, RTL_TEXTENCODING_UTF8);
// Should be 'prepared' in Russian, was garbage.
getParagraphOfText(1, xHeaderText, aExpectedHeader);
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 38c0ebffcd69..60e3fd103ba1 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -215,7 +215,7 @@ DECLARE_WW8EXPORT_TEST(testNewPageStylesTable, "new-page-styles.doc")
DECLARE_WW8EXPORT_TEST(testFdo42144, "fdo42144.odt")
{
// Footer wasn't disabled -- instead empty footer was exported.
- uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(false, bool(getProperty<sal_Bool>(xStyle, "FooterIsOn")));
}
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 7e9307b8f09b..56fdf30e1b69 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -222,14 +222,14 @@ DECLARE_WW8IMPORT_TEST(testN816593, "n816593.doc")
DECLARE_WW8IMPORT_TEST(testPageBorder, "page-border.doc")
{
// Page border was missing (LineWidth was 0), due to wrong interpretation of pgbApplyTo.
- table::BorderLine2 aBorder = getProperty<table::BorderLine2>(getStyles("PageStyles")->getByName(DEFAULT_STYLE), "TopBorder");
+ table::BorderLine2 aBorder = getProperty<table::BorderLine2>(getStyles("PageStyles")->getByName("Standard"), "TopBorder");
CPPUNIT_ASSERT_EQUAL(sal_uInt32(convertTwipToMm100(6 * 20)), aBorder.LineWidth);
}
DECLARE_WW8IMPORT_TEST(testN823651, "n823651.doc")
{
// Character height was 10pt instead of 7.5pt in the header.
- uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
uno::Reference<text::XText> xText = getProperty< uno::Reference<text::XTextRange> >(xStyle, "HeaderTextFirst")->getText();
CPPUNIT_ASSERT_EQUAL(7.5f, getProperty<float>(getParagraphOfText(1, xText), "CharHeight"));
}