diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-12 18:39:22 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-15 08:37:54 +0200 |
commit | b52f309f2b9037ee53ab8ac2d66967c012ba82f1 (patch) | |
tree | 4a4ace081c742af0cef50909e06394d9aef80345 /sw/qa/extras | |
parent | 897493fbd34a1bd10320767b48cbf04d422f89b3 (diff) |
improve loplugin simplifyconstruct
to find stuff like
OUString s = OUString("xxx")
Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/odfexport/odfexport.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx index 5579c802833b..e08e29403d9d 100644 --- a/sw/qa/extras/odfexport/odfexport.cxx +++ b/sw/qa/extras/odfexport/odfexport.cxx @@ -1052,7 +1052,7 @@ DECLARE_ODFEXPORT_TEST(testShapeRelsize, "shape-relsize.odt") DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt") { uno::Reference<drawing::XShape> xShape = getShape(1); - comphelper::SequenceAsHashMap aCustomShapeGeometry = comphelper::SequenceAsHashMap(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry")); + comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry")); // Test that the shape is a rounded rectangle. CPPUNIT_ASSERT_EQUAL(OUString("round-rectangle"), aCustomShapeGeometry["Type"].get<OUString>()); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index 82139b936f16..734ada046e6a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -868,7 +868,7 @@ DECLARE_OOXMLEXPORT_TEST(testCommentInitials, "comment_initials.odt") DECLARE_OOXMLEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.docx") { uno::Reference<drawing::XShape> xShape = getShape(1); - comphelper::SequenceAsHashMap aCustomShapeGeometry = comphelper::SequenceAsHashMap(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry")); + comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty< uno::Sequence<beans::PropertyValue> >(xShape, "CustomShapeGeometry")); // Test that the shape is a rounded rectangle. CPPUNIT_ASSERT_EQUAL(OUString("ooxml-roundRect"), aCustomShapeGeometry["Type"].get<OUString>()); diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 359144d5169e..53f09826a2c1 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -483,7 +483,7 @@ DECLARE_RTFEXPORT_TEST(testFdo61507, "fdo61507.rtf") mxComponent, uno::UNO_QUERY); uno::Reference<document::XDocumentProperties> xDocumentProperties( xDocumentPropertiesSupplier->getDocumentProperties()); - OUString aExpected = OUString(u"\u00C9\u00C1\u0150\u0170\u222D"); + OUString aExpected(u"\u00C9\u00C1\u0150\u0170\u222D"); CPPUNIT_ASSERT_EQUAL(aExpected, xDocumentProperties->getTitle()); // Only "Hello.", no additional characters. diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 693038a268dd..c63fc4064685 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -6855,11 +6855,11 @@ void SwUiWriterTest::testTdf108423() pWrtShell->AutoCorrect(corr, cChar); // The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); - OUString sIApostrophe = OUString(u"I" + OUStringLiteral1(0x2019)); + OUString sIApostrophe(u"I" + OUStringLiteral1(0x2019)); CPPUNIT_ASSERT_EQUAL(sIApostrophe, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); pWrtShell->Insert(" i"); pWrtShell->AutoCorrect(corr, cChar); - OUString sText = OUString(sIApostrophe + u" " + sIApostrophe); + OUString sText(sIApostrophe + u" " + sIApostrophe); CPPUNIT_ASSERT_EQUAL(sText, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); } |