summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-29 08:58:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-29 15:12:26 +0100
commit41eeaace84b45c803fff3ebd5ab981f0ad09393b (patch)
tree0a0290bcc852507efa8241bd0853ebdd84ec9cbf /sw
parenta2f7678171618d958e3c387718cd389bea63eaeb (diff)
loplugin:oncevar
Change-Id: Iba892694acb378887a1d15ab59104c55f591f0bd Reviewed-on: https://gerrit.libreoffice.org/62498 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/layout/layout.cxx7
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx4
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx3
3 files changed, 7 insertions, 7 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 083c2f16302b..da45f2e9198e 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2430,11 +2430,12 @@ void SwLayoutWriter::testTdf118672()
}))
return;
- OUString aLine1("He heard quiet steps behind him. That didn't bode well. Who could be fol*1 2 "
- "3 4 5 6 7 8 9 10con-");
+ const OUString aLine1(
+ "He heard quiet steps behind him. That didn't bode well. Who could be fol*1 2 "
+ "3 4 5 6 7 8 9 10con-");
// This ended as "fol*1 2 3 4 5 6 7 8 9", i.e. "10con-" was moved to the next line.
assertXPath(pXmlDoc, "/root/page/body/txt[1]/LineBreak[1]", "Line", aLine1);
- OUString aLine2("setetur");
+ const OUString aLine2("setetur");
assertXPath(pXmlDoc, "/root/page/body/txt[1]/LineBreak[2]", "Line", aLine2);
}
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index e130d754b9d2..a2620feaf55a 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2020,9 +2020,9 @@ DECLARE_ODFEXPORT_TEST(testChapterNumberingNewLine, "chapter-number-new-line.odt
DECLARE_ODFEXPORT_TEST(testSpellOutNumberingTypes, "spellout-numberingtypes.odt")
{
// ordinal indicator, ordinal and cardinal number numbering styles (from LibreOffice 6.1)
- const char* aFieldTexts[] = { "1st", "Erste", "Eins", "1.", "Premier", "Un", "1ᵉʳ", "First", "One" };
+ 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
- const char* aFieldTextFallbacks[] = { "Ordinal-number 1", "Ordinal 1", "1" };
+ static const char* const aFieldTextFallbacks[] = { "Ordinal-number 1", "Ordinal 1", "1" };
uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
// update text field content
uno::Reference<util::XRefreshable>(xTextFieldsSupplier->getTextFields(), uno::UNO_QUERY)->refresh();
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 76cc659805dd..6d0ba0277d11 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -3561,8 +3561,7 @@ void SwUiWriterTest::testTableBackgroundColor()
pWrtShell->SelTableRow(); //Selecting First Row
pWrtShell->ClearMark();
//Modifying the color of Table Box
- Color colour = sal_Int32(0xFF00FF);
- pWrtShell->SetBoxBackground(SvxBrushItem(colour, sal_Int16(RES_BACKGROUND)));
+ pWrtShell->SetBoxBackground(SvxBrushItem(Color(sal_Int32(0xFF00FF)), sal_Int16(RES_BACKGROUND)));
//Checking cells for background color only A1 should be modified
uno::Reference<table::XCell> xCell;
xCell = xTable->getCellByName("A1");