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 /sc/qa | |
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 'sc/qa')
-rw-r--r-- | sc/qa/unit/copy_paste_test.cxx | 3 | ||||
-rw-r--r-- | sc/qa/unit/screenshots/screenshots.cxx | 3 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx index 54202137d0de..527afccaafe6 100644 --- a/sc/qa/unit/copy_paste_test.cxx +++ b/sc/qa/unit/copy_paste_test.cxx @@ -407,9 +407,8 @@ void ScCopyPasteTest::testTdf107394() ScImportExport aObj(rDoc, ScAddress(0,0,0)); aObj.SetImportBroadcast(true); - OString aHTML("<pre>First\nVery long sentence.</pre>"); SvMemoryStream aStream; - aStream.WriteOString(aHTML); + aStream.WriteOString("<pre>First\nVery long sentence.</pre>"); aStream.Seek(0); CPPUNIT_ASSERT(aObj.ImportStream(aStream, OUString(), SotClipboardFormatId::HTML)); diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index b7113ee1658c..8cd66991674f 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -193,10 +193,9 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID) case 8: // "modules/scalc/ui/inputstringdialog.ui" { - const OString aEmpty(""); pReturnDialog = mpFact->CreateScStringInputDlg(mpViewShell->GetFrameWeld(), ScResId(SCSTR_APDTABLE), ScResId(SCSTR_NAME), - aDefaultSheetName, "modules/scalc/ui/inputstringdialog/InputStringDialog", aEmpty ); + aDefaultSheetName, "modules/scalc/ui/inputstringdialog/InputStringDialog", "" ); break; } diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 08ef8c7fcdb0..6eba2bf05e84 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -5124,9 +5124,11 @@ void ScExportTest::testRotatedImageODS() xmlDocUniquePtr pXmlDoc = XPathHelper::parseExport(pTemp, m_xSFactory, "content.xml"); CPPUNIT_ASSERT(pXmlDoc); - const OString sPathStart = "/office:document-content/office:body/office:spreadsheet/" - "table:table/table:shapes/draw:frame"; - const OUString sTransform = getXPath(pXmlDoc, sPathStart, "transform"); + const OUString sTransform = getXPath( + pXmlDoc, + "/office:document-content/office:body/office:spreadsheet/" + "table:table/table:shapes/draw:frame", + "transform"); // Attribute transform has the structure skew (...) rotate (...) translate (x y) // parts are separated by blank OUString sTranslate(sTransform.copy(sTransform.lastIndexOf('('))); |