diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-10-27 23:18:23 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-10-28 08:03:52 +0100 |
commit | 40fa3a61ac7dbe2ba73b5ee71bb85cc3bb4a27af (patch) | |
tree | 26f9d288b5434f5e23980053dab9d5a57749b60e /sd | |
parent | c4967928475f2be20ac2d79e3fa84ac435a7e560 (diff) |
Extend loplugin:elidestringvar to OString
(In VisitVarDecl, filtering out AbstractConditionalOperator avoids an unhelpful
> ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:63:32: error: replace single use of literal 'rtl::OString' variable with a literal [loplugin:elidestringvar]
> aXmlWriter.content(sPdfConformance);
> ^~~~~~~~~~~~~~~
> ~/lo/core/vcl/source/pdf/XmpMetadata.cxx:52:21: note: literal 'rtl::OString' variable defined here [loplugin:elidestringvar]
> OString sPdfConformance = (mnPDF_A == 1) ? "A" : "B";
> ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)
Change-Id: I7d0410f04827d79b4b526752917c37d33cad2671
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104911
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/dialogs-test.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/remotecontrol/Communicator.cxx | 5 |
5 files changed, 14 insertions, 15 deletions
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx index b0f5ce782969..cd3a3cf82151 100644 --- a/sd/qa/unit/dialogs-test.cxx +++ b/sd/qa/unit/dialogs-test.cxx @@ -634,9 +634,7 @@ void SdDialogsTest::openAnyDialog() // // Take any example here, it's only for demonstration - using // even a known one to demonstrate the fallback possibility - const OString aUIXMLDescription("modules/sdraw/ui/breakdialog.ui"); - - dumpDialogToPath(aUIXMLDescription); + dumpDialogToPath("modules/sdraw/ui/breakdialog.ui"); } } diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index db64dc374481..7e47d964f7a0 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1100,8 +1100,7 @@ void SdOOXMLExportTest1::testDashOnHairline() xDocShRef->DoClose(); xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml"); - const OString sXmlPath = "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds"; - assertXPath(pXmlDoc, sXmlPath, 11); + assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds", 11); } void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect() @@ -1170,8 +1169,7 @@ void SdOOXMLExportTest1::testTdf128345FullTransparentGradient() // Make sure the shape has no fill. Without the patch, fill was solid red. xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml"); - const OString sPathStart("//p:sld/p:cSld/p:spTree/p:sp/p:spPr"); - assertXPath(pXmlDoc, sPathStart + "/a:noFill"); + assertXPath(pXmlDoc, "//p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:noFill"); } void SdOOXMLExportTest1::testTdf128345GradientLinear() diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 135cfb5b8b78..9f967b7963b9 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -2685,8 +2685,8 @@ void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX() // Error was, that attribute 'fromWordArt' was ignored // ensure, resulting pptx has fromWordArt="1" on textArchDown shape xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); - const OString sPathStart("/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr"); - assertXPath(pXmlDocContent, sPathStart + "[@fromWordArt='1']"); + assertXPath( + pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[1]/p:txBody/a:bodyPr[@fromWordArt='1']"); // Error was, that text in legacy shapes of category "Follow Path" was not scaled to the path. uno::Reference<beans::XPropertySet> xShapeArchProps(getShapeFromPage(0, 0, xDocShRef)); diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 22e2b4bfe2a4..86c522723904 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -1611,10 +1611,14 @@ void SdTiledRenderingTest::testTdf104405() // check that the first cell has acquired the resulting vertical style xmlDocUniquePtr pXmlDoc = parseXmlDump(); - OString aPrefix = "/SdDrawDocument/SdrModel/SdPage/SdrObjList/SdrTableObj/SdrTableObjImpl" - "/TableModel/Cell[1]/DefaultProperties/SfxItemSet/SdrTextVertAdjustItem"; // the following name has a compiler-dependent part - CPPUNIT_ASSERT_EQUAL(OUString("2"), getXPath(pXmlDoc, aPrefix, "value")); + CPPUNIT_ASSERT_EQUAL( + OUString("2"), + getXPath( + pXmlDoc, + "/SdDrawDocument/SdrModel/SdPage/SdrObjList/SdrTableObj/SdrTableObjImpl" + "/TableModel/Cell[1]/DefaultProperties/SfxItemSet/SdrTextVertAdjustItem", + "value")); } void SdTiledRenderingTest::testTdf81754() diff --git a/sd/source/ui/remotecontrol/Communicator.cxx b/sd/source/ui/remotecontrol/Communicator.cxx index b93112d9542c..a500d9191131 100644 --- a/sd/source/ui/remotecontrol/Communicator.cxx +++ b/sd/source/ui/remotecontrol/Communicator.cxx @@ -58,9 +58,8 @@ void Communicator::execute() pTransmitter->addMessage( "LO_SERVER_SERVER_PAIRED\n\n", Transmitter::PRIORITY_HIGH ); - OString aServerInformation = "LO_SERVER_INFO\n" LIBO_VERSION_DOTTED "\n\n"; - - pTransmitter->addMessage( aServerInformation, Transmitter::PRIORITY_HIGH ); + pTransmitter->addMessage( "LO_SERVER_INFO\n" LIBO_VERSION_DOTTED "\n\n", + Transmitter::PRIORITY_HIGH ); Receiver aReceiver( pTransmitter.get() ); try { |