[Libreoffice-commits] core.git: sw/inc sw/qa sw/source uitest/writer_tests
ayhanyalcinsoy (via logerrit)
logerrit at kemper.freedesktop.org
Sun Feb 2 14:41:28 UTC 2020
sw/inc/strings.hrc | 5 +++--
sw/qa/extras/layout/layout.cxx | 2 +-
sw/qa/extras/odfimport/odfimport.cxx | 6 +++---
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 4 ++--
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 4 ++--
sw/qa/extras/rtfimport/rtfimport.cxx | 12 ++++++------
sw/qa/extras/tiledrendering/tiledrendering.cxx | 10 +++++-----
sw/qa/extras/uiwriter/uiwriter.cxx | 8 ++++----
sw/qa/extras/uiwriter/uiwriter2.cxx | 2 +-
sw/qa/extras/ww8export/ww8export3.cxx | 4 ++--
sw/qa/uitest/writer_tests3/insertPageFooter.py | 4 ++--
sw/qa/uitest/writer_tests5/tdf107494.py | 8 ++++----
sw/source/core/doc/SwStyleNameMapper.cxx | 4 ++--
sw/source/core/unocore/unosett.cxx | 2 +-
sw/source/core/unocore/unostyle.cxx | 2 +-
sw/source/filter/xml/xmlimp.cxx | 2 +-
sw/source/ui/index/cnttab.cxx | 2 +-
sw/source/uibase/app/docst.cxx | 3 +--
sw/source/uibase/app/docstyle.cxx | 9 +++------
sw/source/uibase/utlui/uitool.cxx | 4 ++--
uitest/writer_tests/insertPageHeader.py | 4 ++--
21 files changed, 49 insertions(+), 52 deletions(-)
New commits:
commit 0298a702b32bdc4c4711cf31461169e549153b39
Author: ayhanyalcinsoy <ayhanyalcinsoy at pisilinux.org>
AuthorDate: Sat Jan 11 15:54:49 2020 +0300
Commit: Maxim Monastirsky <momonasmon at gmail.com>
CommitDate: Sun Feb 2 15:40:45 2020 +0100
tdf#129568 Rename Default Style to Default Paragraph/Page/Table Style
Change-Id: I21672c9b78e52c3c9b2687cb2c0ab21dcf67f19a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86538
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
Tested-by: Heiko Tietze <heiko.tietze at documentfoundation.org>
Reviewed-by: Maxim Monastirsky <momonasmon at gmail.com>
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index fbb64babe662..755bcc58e47c 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -24,6 +24,7 @@
#define NNC_(Context, StringSingular, StringPlural) reinterpret_cast<char const *>(Context "\004" u8##StringSingular "\004" u8##StringPlural)
// Format names
+#define STR_POOLCHR_STANDARD NC_("STR_POOLCHR_STANDARD", "Default Character Style")
#define STR_POOLCHR_FOOTNOTE NC_("STR_POOLCHR_FOOTNOTE", "Footnote Characters")
#define STR_POOLCHR_PAGENO NC_("STR_POOLCHR_PAGENO", "Page Number")
#define STR_POOLCHR_LABEL NC_("STR_POOLCHR_LABEL", "Caption Characters")
@@ -60,7 +61,7 @@
#define STR_POOLFRM_WATERSIGN NC_("STR_POOLFRM_WATERSIGN", "Watermark")
#define STR_POOLFRM_LABEL NC_("STR_POOLFRM_LABEL", "Labels")
// Template names
-#define STR_POOLCOLL_STANDARD NC_("STR_POOLCOLL_STANDARD", "Default Style")
+#define STR_POOLCOLL_STANDARD NC_("STR_POOLCOLL_STANDARD", "Default Paragraph Style")
#define STR_POOLCOLL_TEXT NC_("STR_POOLCOLL_TEXT", "Text Body")
#define STR_POOLCOLL_TEXT_IDENT NC_("STR_POOLCOLL_TEXT_IDENT", "First Line Indent")
#define STR_POOLCOLL_TEXT_NEGIDENT NC_("STR_POOLCOLL_TEXT_NEGIDENT", "Hanging Indent")
@@ -188,7 +189,7 @@
#define STR_POOLCOLL_HTML_DD NC_("STR_POOLCOLL_HTML_DD", "List Contents")
#define STR_POOLCOLL_HTML_DT NC_("STR_POOLCOLL_HTML_DT", "List Heading")
//page style names
-#define STR_POOLPAGE_STANDARD NC_("STR_POOLPAGE_STANDARD", "Default Style")
+#define STR_POOLPAGE_STANDARD NC_("STR_POOLPAGE_STANDARD", "Default Page Style")
#define STR_POOLPAGE_FIRST NC_("STR_POOLPAGE_FIRST", "First Page")
#define STR_POOLPAGE_LEFT NC_("STR_POOLPAGE_LEFT", "Left Page")
#define STR_POOLPAGE_RIGHT NC_("STR_POOLPAGE_RIGHT", "Right Page")
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 746b8a068aaf..4ed828a0fb56 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -462,7 +462,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
SwRootFrame* pLayout(pWrtShell->GetLayout());
CPPUNIT_ASSERT(!pLayout->IsHideRedlines());
- pWrtShell->ChangeHeaderOrFooter("Default Style", /*bHeader*/ true, /*bOn*/ true, false);
+ pWrtShell->ChangeHeaderOrFooter("Default Page Style", /*bHeader*/ true, /*bOn*/ true, false);
CPPUNIT_ASSERT(
pWrtShell
->IsInHeaderFooter()); // assume this is supposed to put cursor in the new header...
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 7e4e4a252ae7..56df38c6d686 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -253,7 +253,7 @@ DECLARE_ODFIMPORT_TEST(testTdf41542_borderlessPadding, "tdf41542_borderlessPaddi
DECLARE_ODFIMPORT_TEST(testPageStyleLayoutDefault, "hello.odt")
{
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
// This was style::PageStyleLayout_MIRRORED.
CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_ALL, getProperty<style::PageStyleLayout>(xPropertySet, "PageStyleLayout"));
}
@@ -363,7 +363,7 @@ DECLARE_ODFIMPORT_TEST(testTdf74524, "tdf74524.odt")
DECLARE_ODFIMPORT_TEST(testPageStyleLayoutRight, "hello.odt")
{
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
// This caused a crash.
xPropertySet->setPropertyValue("PageStyleLayout", uno::makeAny(style::PageStyleLayout_RIGHT));
}
@@ -424,7 +424,7 @@ DECLARE_ODFIMPORT_TEST(testFdo79269_header, "fdo79269_header.odt")
DECLARE_ODFIMPORT_TEST(testPageBackground, "PageBackground.odt")
{
- uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
// The background image was lost
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_BITMAP, getProperty<drawing::FillStyle>(xPropertySet, "FillStyle"));
CPPUNIT_ASSERT_EQUAL(OUString("Sky"), getProperty<OUString>(xPropertySet, "FillBitmapName"));
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index d0579508fabe..149b5dc3e3cd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -229,7 +229,7 @@ DECLARE_OOXMLEXPORT_TEST(testKern, "kern.docx")
// This failed: kerning was also enabled for the second paragraph.
CPPUNIT_ASSERT(!getProperty<bool>(getRun(getParagraph(2), 1), "CharAutoKerning"));
- uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY);
//tdf107801: kerning normally isn't enabled by default for .docx
CPPUNIT_ASSERT_EQUAL_MESSAGE("AutoKern should be false", false, getProperty<bool>(xStyle, "CharAutoKerning"));
}
@@ -239,7 +239,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89377, "tdf89377_tableWithBreakBeforeParaStyle.d
// the paragraph style should set table's text-flow break-before-page
CPPUNIT_ASSERT_EQUAL( 3, getPages() );
- uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY);
//tdf107801: kerning info wasn't exported previously.
CPPUNIT_ASSERT_EQUAL_MESSAGE("AutoKern should be true", true, getProperty<bool>(xStyle, "CharAutoKerning"));
}
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 4f4412e2678f..5e758f642624 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -658,7 +658,7 @@ DECLARE_OOXMLIMPORT_TEST(testN820504, "n820504.docx")
uno::Reference<style::XStyleFamiliesSupplier> xFamiliesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xFamiliesAccess = xFamiliesSupplier->getStyleFamilies();
uno::Reference<container::XNameAccess> xStylesAccess(xFamiliesAccess->getByName("ParagraphStyles"), uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xStyle(xStylesAccess->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(xStylesAccess->getByName("Default Paragraph Style"), uno::UNO_QUERY);
// The problem was that the CharColor was set to AUTO (-1) even if we have some default char color set
CPPUNIT_ASSERT_EQUAL(sal_Int32(4040635), getProperty<sal_Int32>(xStyle, "CharColor"));
@@ -1437,7 +1437,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf87533_bidi, "tdf87533_bidi.docx")
// check: "Default Style" master-style has RTL
{
- const uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY);
+ const uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Page Style"), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), getProperty<sal_Int32>(xPropertySet, writingMode));
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 32ab5666ef0b..4e9b5e0a7002 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1448,12 +1448,12 @@ CPPUNIT_TEST_FIXTURE(Test, testImportHeaderFooter)
CPPUNIT_ASSERT_EQUAL(OUString("First Page Header"), aActual);
uno::Reference<text::XText> xHeaderTextLeft = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "HeaderTextLeft");
+ getStyles("PageStyles")->getByName("Default Page Style"), "HeaderTextLeft");
aActual = xHeaderTextLeft->getString();
CPPUNIT_ASSERT_EQUAL(OUString("Header even"), aActual);
uno::Reference<text::XText> xHeaderTextRight = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "HeaderTextRight");
+ getStyles("PageStyles")->getByName("Default Page Style"), "HeaderTextRight");
aActual = xHeaderTextRight->getString();
CPPUNIT_ASSERT_EQUAL(OUString("Header uneven"), aActual);
@@ -1463,12 +1463,12 @@ CPPUNIT_TEST_FIXTURE(Test, testImportHeaderFooter)
CPPUNIT_ASSERT_EQUAL(OUString("First Page Footer"), aActual);
uno::Reference<text::XText> xFooterTextLeft = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "FooterTextLeft");
+ getStyles("PageStyles")->getByName("Default Page Style"), "FooterTextLeft");
aActual = xFooterTextLeft->getString();
CPPUNIT_ASSERT_EQUAL(OUString("Footer even"), aActual);
uno::Reference<text::XText> xFooterTextRight = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "FooterTextRight");
+ getStyles("PageStyles")->getByName("Default Page Style"), "FooterTextRight");
aActual = xFooterTextRight->getString();
CPPUNIT_ASSERT_EQUAL(OUString("Footer uneven"), aActual);
}
@@ -1478,7 +1478,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108947)
load(mpTestDocumentPath, "tdf108947.rtf");
//Check if Headers/Footers contain what they should in this document
uno::Reference<text::XText> xHeaderTextRight = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "HeaderTextRight");
+ getStyles("PageStyles")->getByName("Default Page Style"), "HeaderTextRight");
OUString aActual = xHeaderTextRight->getString();
CPPUNIT_ASSERT_EQUAL(OUString(""), aActual);
@@ -1486,7 +1486,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf108947)
#if HAVE_MORE_FONTS
OUString aExpected = SAL_NEWLINE_STRING SAL_NEWLINE_STRING "Header Page 2 ?";
uno::Reference<text::XText> xHeaderTextLeft = getProperty<uno::Reference<text::XText>>(
- getStyles("PageStyles")->getByName("Default Style"), "HeaderTextLeft");
+ getStyles("PageStyles")->getByName("Default Page Style"), "HeaderTextLeft");
aActual = xHeaderTextLeft->getString();
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
#endif
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 8993111dbb41..16196e1327ba 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2035,7 +2035,7 @@ void checkPageHeaderOrFooter(const SfxViewShell* pViewShell, sal_uInt16 nWhich,
if (bValue)
{
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aSeq.getLength());
- CPPUNIT_ASSERT_EQUAL(OUString("Default Style"), aSeq[0]);
+ CPPUNIT_ASSERT_EQUAL(OUString("Default Page Style"), aSeq[0]);
}
else
CPPUNIT_ASSERT(!aSeq.hasElements());
@@ -2053,7 +2053,7 @@ void SwTiledRenderingTest::testPageHeader()
checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEHEADER, false);
// Insert Page Header
{
- SfxStringItem aStyle(FN_INSERT_PAGEHEADER, "Default Style");
+ SfxStringItem aStyle(FN_INSERT_PAGEHEADER, "Default Page Style");
SfxBoolItem aItem(FN_PARAM_1, true);
pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEHEADER, SfxCallMode::API | SfxCallMode::SYNCHRON, {&aStyle, &aItem});
}
@@ -2062,7 +2062,7 @@ void SwTiledRenderingTest::testPageHeader()
// Remove Page Header
{
- SfxStringItem aStyle(FN_INSERT_PAGEHEADER, "Default Style");
+ SfxStringItem aStyle(FN_INSERT_PAGEHEADER, "Default Page Style");
SfxBoolItem aItem(FN_PARAM_1, false);
pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEHEADER, SfxCallMode::API | SfxCallMode::SYNCHRON, {&aStyle, &aItem});
}
@@ -2080,7 +2080,7 @@ void SwTiledRenderingTest::testPageFooter()
checkPageHeaderOrFooter(pViewShell, FN_INSERT_PAGEFOOTER, false);
// Insert Page Footer
{
- SfxStringItem aPageStyle(FN_INSERT_PAGEFOOTER, "Default Style");
+ SfxStringItem aPageStyle(FN_INSERT_PAGEFOOTER, "Default Page Style");
SfxBoolItem aItem(FN_PARAM_1, true);
pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEFOOTER, SfxCallMode::API | SfxCallMode::SYNCHRON, {&aPageStyle, &aItem});
}
@@ -2089,7 +2089,7 @@ void SwTiledRenderingTest::testPageFooter()
// Remove Page Footer
{
- SfxStringItem aPageStyle(FN_INSERT_PAGEFOOTER, "Default Style");
+ SfxStringItem aPageStyle(FN_INSERT_PAGEFOOTER, "Default Page Style");
SfxBoolItem aItem(FN_PARAM_1, false);
pViewShell->GetDispatcher()->ExecuteList(FN_INSERT_PAGEFOOTER, SfxCallMode::API | SfxCallMode::SYNCHRON, {&aPageStyle, &aItem});
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8ef96faa47dc..0782cef8a209 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1137,7 +1137,7 @@ void SwUiWriterTest::testWatermarkPosition()
SwDoc* pDoc = createDoc("watermark-position.odt");
SwEditShell* pEditShell = pDoc->GetEditShell();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- const OUString rPageStyleName = "Default Style";
+ const OUString rPageStyleName = "Default Page Style";
uno::Reference<frame::XModel> xModel = pDoc->GetDocShell()->GetBaseModel();
uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xModel, uno::UNO_QUERY);
uno::Reference<container::XNameAccess> xStyleFamilies = xStyleFamiliesSupplier->getStyleFamilies();
@@ -1803,7 +1803,7 @@ void SwUiWriterTest::testTextCursorInvalidation()
// can't go right in empty header
CPPUNIT_ASSERT(!xCursor->goRight(1, false));
// this does not actually delete the header: xPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(false));
- pWrtShell->ChangeHeaderOrFooter("Default Style", true, false, false);
+ pWrtShell->ChangeHeaderOrFooter("Default Page Style", true, false, false);
// must be disposed after deleting header
CPPUNIT_ASSERT_THROW(xCursor->goRight(1, false), uno::RuntimeException);
}
@@ -2576,7 +2576,7 @@ void SwUiWriterTest::testTdf60967()
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
SwPaM* pCursor = pDoc->GetEditShell()->GetCursor();
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
- pWrtShell->ChangeHeaderOrFooter("Default Style", true, true, true);
+ pWrtShell->ChangeHeaderOrFooter("Default Page Style", true, true, true);
//Inserting table
SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0);
pWrtShell->InsertTable(TableOpt, 2, 2);
@@ -6520,7 +6520,7 @@ void SwUiWriterTest::testTdf108048()
uno::Sequence<beans::PropertyValue> aPropertyValues = comphelper::InitPropertySequence({
{ "Kind", uno::makeAny(sal_Int16(3)) },
- { "TemplateName", uno::makeAny(OUString("Default Style")) },
+ { "TemplateName", uno::makeAny(OUString("Default Page Style")) },
{ "PageNumber", uno::makeAny(sal_uInt16(6)) }, // Even number to avoid auto-inserted blank page
{ "PageNumberFilled", uno::makeAny(true) },
});
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 190b82f51cd0..80e6019d7a79 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -1114,7 +1114,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRTLparaStyle_LocaleArabic)
reload("Office Open XML Text", "tdf116404_paraStyleFrameDir.docx");
uno::Reference<beans::XPropertySet> xPageStyle(
- getStyles("ParagraphStyles")->getByName("Default Style"), uno::UNO_QUERY_THROW);
+ getStyles("ParagraphStyles")->getByName("Default Paragraph Style"), uno::UNO_QUERY_THROW);
// Test the text Direction value for the -none- based paragraph styles
CPPUNIT_ASSERT_EQUAL_MESSAGE("RTL Writing Mode", sal_Int32(1),
getProperty<sal_Int32>(xPageStyle, "WritingMode"));
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 103476d25407..af21711d0136 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -55,7 +55,7 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
{
uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
- uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Page Style"), uno::UNO_QUERY);
bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn");
CPPUNIT_ASSERT(headerIsOn);
}
@@ -63,7 +63,7 @@ DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
DECLARE_WW8EXPORT_TEST(testTdf122460_header, "tdf122460_header.odt")
{
uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
- uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Style"), uno::UNO_QUERY);
+ uno::Reference<style::XStyle> pageStyle(pageStyles->getByName("Default Page Style"), uno::UNO_QUERY);
bool headerIsOn = getProperty<bool>(pageStyle, "HeaderIsOn");
CPPUNIT_ASSERT(headerIsOn);
}
diff --git a/sw/qa/uitest/writer_tests3/insertPageFooter.py b/sw/qa/uitest/writer_tests3/insertPageFooter.py
index fd9b31368d6f..94bd3e23e1ce 100644
--- a/sw/qa/uitest/writer_tests3/insertPageFooter.py
+++ b/sw/qa/uitest/writer_tests3/insertPageFooter.py
@@ -18,7 +18,7 @@ class WriterInsertPageFooter(UITestCase):
document.StyleFamilies.PageStyles.Standard.FooterIsOn, False)
self.xUITest.executeCommand(
- ".uno:InsertPageFooter?PageStyle:string=Default%20Style&On:bool=true")
+ ".uno:InsertPageFooter?PageStyle:string=Default%20Page%20Style&On:bool=true")
self.assertEqual(
document.StyleFamilies.PageStyles.Standard.FooterIsOn, True)
@@ -30,7 +30,7 @@ class WriterInsertPageFooter(UITestCase):
document.StyleFamilies.PageStyles.Standard.FooterIsOn, True)
self.ui_test.execute_dialog_through_command(
- ".uno:InsertPageFooter?PageStyle:string=Default%20Style&On:bool=false")
+ ".uno:InsertPageFooter?PageStyle:string=Default%20Page%20Style&On:bool=false")
xDialog = self.xUITest.getTopFocusWindow()
diff --git a/sw/qa/uitest/writer_tests5/tdf107494.py b/sw/qa/uitest/writer_tests5/tdf107494.py
index df6dba08bf24..0828e26bfbd1 100644
--- a/sw/qa/uitest/writer_tests5/tdf107494.py
+++ b/sw/qa/uitest/writer_tests5/tdf107494.py
@@ -25,7 +25,7 @@ class tdf107494(UITestCase):
xWriterDoc = self.xUITest.getTopFocusWindow()
#insert header
self.assertEqual(document.StyleFamilies.PageStyles.Standard.HeaderIsOn, False)
- self.xUITest.executeCommand(".uno:InsertPageHeader?PageStyle:string=Default%20Style&On:bool=true")
+ self.xUITest.executeCommand(".uno:InsertPageHeader?PageStyle:string=Default%20Page%20Style&On:bool=true")
self.assertEqual(document.StyleFamilies.PageStyles.Standard.HeaderIsOn, True)
#insert image
text = document.getText()
@@ -46,7 +46,7 @@ class tdf107494(UITestCase):
textGraphic.Graphic = graphic
text.insertTextContent(cursor, textGraphic, False)
# Delete the header
- self.ui_test.execute_dialog_through_command(".uno:InsertPageHeader?PageStyle:string=Default%20Style&On:bool=false")
+ self.ui_test.execute_dialog_through_command(".uno:InsertPageHeader?PageStyle:string=Default%20Page%20Style&On:bool=false")
xDialog = self.xUITest.getTopFocusWindow() #question dialog
xOption = xDialog.getChild("yes")
xOption.executeAction("CLICK", tuple())
@@ -61,7 +61,7 @@ class tdf107494(UITestCase):
xWriterDoc = self.xUITest.getTopFocusWindow()
#insert footer
self.assertEqual(document.StyleFamilies.PageStyles.Standard.FooterIsOn, False)
- self.xUITest.executeCommand(".uno:InsertPageFooter?PageStyle:string=Default%20Style&On:bool=true")
+ self.xUITest.executeCommand(".uno:InsertPageFooter?PageStyle:string=Default%20Page%20Style&On:bool=true")
self.assertEqual(document.StyleFamilies.PageStyles.Standard.FooterIsOn, True)
#insert image
text = document.getText()
@@ -82,7 +82,7 @@ class tdf107494(UITestCase):
textGraphic.Graphic = graphic
text.insertTextContent(cursor, textGraphic, False)
# Delete the footer
- self.ui_test.execute_dialog_through_command(".uno:InsertPageFooter?PageStyle:string=Default%20Style&On:bool=false")
+ self.ui_test.execute_dialog_through_command(".uno:InsertPageFooter?PageStyle:string=Default%20Page%20Style&On:bool=false")
xDialog = self.xUITest.getTopFocusWindow() #question dialog
xOption = xDialog.getChild("yes")
xOption.executeAction("CLICK", tuple())
diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx
index 6f7f18c4ee29..17c14e7eb925 100644
--- a/sw/source/core/doc/SwStyleNameMapper.cxx
+++ b/sw/source/core/doc/SwStyleNameMapper.cxx
@@ -278,7 +278,7 @@ void SwStyleNameMapper::FillProgName(
fillNameFromId(nId, rFillName, true);
}
- if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == SwResId(STR_POOLCOLL_STANDARD))
+ if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == SwResId(STR_POOLCHR_STANDARD))
rFillName = "Standard";
}
@@ -289,7 +289,7 @@ void SwStyleNameMapper::FillUIName(
{
OUString aName = rName;
if (eFlags == SwGetPoolIdFromName::ChrFmt && rName == "Standard")
- aName = SwResId(STR_POOLCOLL_STANDARD);
+ aName = SwResId(STR_POOLCHR_STANDARD);
sal_uInt16 nId = GetPoolIdFromProgName ( aName, eFlags );
if ( nId == USHRT_MAX )
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 45e7d76b834f..612a938cc621 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -202,7 +202,7 @@ static SwCharFormat* lcl_getCharFormat(SwDoc* pDoc, const uno::Any& aValue)
aValue >>= uTmp;
OUString sCharFormat;
SwStyleNameMapper::FillUIName(uTmp, sCharFormat, SwGetPoolIdFromName::ChrFmt);
- if (sCharFormat != SwResId(STR_POOLCOLL_STANDARD))
+ if (sCharFormat != SwResId(STR_POOLCHR_STANDARD))
{
pRet = pDoc->FindCharFormatByName( sCharFormat );
}
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 7301c7afb8fa..a45d0b9ac601 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -641,7 +641,7 @@ sal_Int32 lcl_GetCountOrName<SfxStyleFamily::Char>(const SwDoc& rDoc, OUString*
{
// the default character format needs to be set to "Default!"
if(rDoc.GetDfltCharFormat() == pFormat)
- SwStyleNameMapper::FillUIName(RES_POOLCOLL_STANDARD, *pString);
+ *pString = SwResId(STR_POOLCHR_STANDARD);
else
*pString = pFormat->GetName();
break;
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 416dba1b12bc..3373607993c3 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -145,7 +145,7 @@ SwXMLBodyContext_Impl::SwXMLBodyContext_Impl( SwXMLImport& rImport ) :
// into the file since it's not really a style but "no style"
// (hence referencing it actually makes no sense except for hyperlinks
// which default to something other than "Default")
- OUString const sDefault(SwResId(STR_POOLCOLL_STANDARD));
+ OUString const sDefault(SwResId(STR_POOLCHR_STANDARD));
uno::Reference<container::XNameContainer> const& xStyles(
rImport.GetTextImport()->GetTextStyles());
if (!xStyles->hasByName("Default"))
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d5aa63eeeae6..60ced0cbbf30 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2516,7 +2516,7 @@ void SwTOXEntryTabPage::SetWrtShell(SwWrtShell& rSh)
{
SwDocShell* pDocSh = rSh.GetView().GetDocShell();
::FillCharStyleListBox(*m_xCharStyleLB, pDocSh, true, true);
- const OUString sDefault(SwResId(STR_POOLCOLL_STANDARD));
+ const OUString sDefault(SwResId(STR_POOLCHR_STANDARD));
for (int i = 0, nCount = m_xCharStyleLB->get_count(); i < nCount; ++i)
{
const OUString sEntry = m_xCharStyleLB->get_text(i);
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 6e242317c0d7..b31edfeb2d4f 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -140,8 +140,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh)
if(pFormat)
aName = pFormat->GetName();
else
- aName = SwStyleNameMapper::GetTextUINameArray()[
- RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ];
+ aName = SwResId(STR_POOLCHR_STANDARD);
rSet.Put(SfxTemplateItem(nWhich, aName));
}
break;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index ddfd2c4e6d12..5fef48e77b9c 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -132,8 +132,7 @@ static SwCharFormat* lcl_FindCharFormat( SwDoc& rDoc,
if (!rName.isEmpty())
{
pFormat = rDoc.FindCharFormatByName( rName );
- if( !pFormat && rName == SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
- RES_POOLCOLL_TEXT_BEGIN ] )
+ if( !pFormat && rName == SwResId(STR_POOLCHR_STANDARD))
{
// Standard-Character template
pFormat = rDoc.GetDfltCharFormat();
@@ -1881,8 +1880,7 @@ bool SwDocStyleSheet::FillStyleSheet(
pFormat = pCharFormat;
if( !bCreate && !pFormat )
{
- if( aName == SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
- RES_POOLCOLL_TEXT_BEGIN ] )
+ if( aName == SwResId(STR_POOLCHR_STANDARD))
nPoolId = 0;
else
nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( aName, SwGetPoolIdFromName::ChrFmt );
@@ -2737,8 +2735,7 @@ SfxStyleSheetBase* SwStyleSheetIterator::First()
}
aLst.Append( cCHAR, pFormat == rDoc.GetDfltCharFormat()
- ? SwStyleNameMapper::GetTextUINameArray()[ RES_POOLCOLL_STANDARD -
- RES_POOLCOLL_TEXT_BEGIN ]
+ ? SwResId(STR_POOLCHR_STANDARD)
: pFormat->GetName() );
}
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index a8eedaa52e16..1acca5313503 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -64,6 +64,7 @@
#include <docary.hxx>
#include <charfmt.hxx>
#include <SwStyleNameMapper.hxx>
+#include <strings.hrc>
// 50 cm 28350
#define MAXHEIGHT 28350
@@ -728,8 +729,7 @@ void FillCharStyleListBox(weld::ComboBox& rToFill, SwDocShell* pDocSh, bool bSor
pPool->SetSearchMask(SfxStyleFamily::Char);
SwDoc* pDoc = pDocSh->GetDoc();
const SfxStyleSheetBase* pBase = pPool->First();
- OUString sStandard;
- SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sStandard );
+ const OUString sStandard(SwResId(STR_POOLCHR_STANDARD));
while(pBase)
{
if(bWithDefault || pBase->GetName() != sStandard)
diff --git a/uitest/writer_tests/insertPageHeader.py b/uitest/writer_tests/insertPageHeader.py
index d510e726e669..245073ace5a5 100644
--- a/uitest/writer_tests/insertPageHeader.py
+++ b/uitest/writer_tests/insertPageHeader.py
@@ -15,7 +15,7 @@ class WriterInsertPageHeader(UITestCase):
document.StyleFamilies.PageStyles.Standard.HeaderIsOn, False)
self.xUITest.executeCommand(
- ".uno:InsertPageHeader?PageStyle:string=Default%20Style&On:bool=true")
+ ".uno:InsertPageHeader?PageStyle:string=Default%20Page%20Style&On:bool=true")
self.assertEqual(
document.StyleFamilies.PageStyles.Standard.HeaderIsOn, True)
@@ -27,7 +27,7 @@ class WriterInsertPageHeader(UITestCase):
document.StyleFamilies.PageStyles.Standard.HeaderIsOn, True)
self.ui_test.execute_dialog_through_command(
- ".uno:InsertPageHeader?PageStyle:string=Default%20Style&On:bool=false")
+ ".uno:InsertPageHeader?PageStyle:string=Default%20Page%20Style&On:bool=false")
xDialog = self.xUITest.getTopFocusWindow()
More information about the Libreoffice-commits
mailing list