diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-26 14:47:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-27 08:42:53 +0200 |
commit | 8dca2d5ac740f262b045f6529bd8e97af0ec9c47 (patch) | |
tree | e984203a66a5fb178b08341e53fab913a7af7d53 /svl/qa | |
parent | 513ac8eb79e45de332d7ddab5b27c70578b904f1 (diff) |
loplugin:oncevar in starmath..svl
Change-Id: I20e3796407c7e429a88d2811673929ac1141a41c
Reviewed-on: https://gerrit.libreoffice.org/39280
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/qa')
-rw-r--r-- | svl/qa/unit/items/test_IndexedStyleSheets.cxx | 25 | ||||
-rw-r--r-- | svl/qa/unit/svl.cxx | 2 |
2 files changed, 10 insertions, 17 deletions
diff --git a/svl/qa/unit/items/test_IndexedStyleSheets.cxx b/svl/qa/unit/items/test_IndexedStyleSheets.cxx index 6560e7de6832..d7cccebaa833 100644 --- a/svl/qa/unit/items/test_IndexedStyleSheets.cxx +++ b/svl/qa/unit/items/test_IndexedStyleSheets.cxx @@ -73,10 +73,8 @@ void IndexedStyleSheetsTest::InstantiationWorks() void IndexedStyleSheetsTest::AddedStylesheetsCanBeFoundAndRetrievedByPosition() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1")); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2")); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); iss.AddStyleSheet(sheet2); @@ -97,10 +95,8 @@ void IndexedStyleSheetsTest::AddingSameStylesheetTwiceHasNoEffect() void IndexedStyleSheetsTest::RemovedStyleSheetIsNotFound() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1")); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2")); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); iss.AddStyleSheet(sheet2); @@ -147,8 +143,8 @@ void IndexedStyleSheetsTest::StyleSheetsCanBeRetrievedByTheirName() void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); + rtl::OUString const name1("name1"); + rtl::OUString const name2("name2"); rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1)); rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name1)); rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet(name2)); @@ -169,12 +165,9 @@ void IndexedStyleSheetsTest::KnowsThatItStoresAStyleSheet() void IndexedStyleSheetsTest::PositionCanBeQueriedByFamily() { - rtl::OUString name1("name1"); - rtl::OUString name2("name2"); - rtl::OUString name3("name3"); - rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet(name1, SfxStyleFamily::Char)); - rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet(name2, SfxStyleFamily::Para)); - rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet(name3, SfxStyleFamily::Char)); + rtl::Reference<SfxStyleSheetBase> sheet1(new MockedStyleSheet("name1", SfxStyleFamily::Char)); + rtl::Reference<SfxStyleSheetBase> sheet2(new MockedStyleSheet("name2", SfxStyleFamily::Para)); + rtl::Reference<SfxStyleSheetBase> sheet3(new MockedStyleSheet("name3", SfxStyleFamily::Char)); IndexedStyleSheets iss; iss.AddStyleSheet(sheet1); diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 10fcbd5672b6..c8b030dc3e00 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -317,7 +317,7 @@ void Test::testSharedStringPool() CPPUNIT_ASSERT_EQUAL(p1.getData(), p2.getData()); // Test case insensitive string ID's. - OUString aAndyLower("andy"), aAndyUpper("ANDY"); + OUString const aAndyLower("andy"), aAndyUpper("ANDY"); p1 = aPool.intern(aAndy); p2 = aPool.intern(aAndyLower); CPPUNIT_ASSERT_MESSAGE("Failed to intern strings.", p1.getData() && p2.getData()); |