diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-13 21:28:29 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-14 08:29:22 +0200 |
commit | 1123a47c9771e0f4a680316c034e9878919a85d5 (patch) | |
tree | 53a4e25bec1ea031c654a2af7e68e908722b98c9 /sw/qa | |
parent | 42204a80aa7d4ce778596fa6ccab7d144c04e9b1 (diff) |
loplugin:sequentialassign in sw
Change-Id: Iec56b41dba502e438dfdc7a99385545b3efdf8c7
Reviewed-on: https://gerrit.libreoffice.org/70720
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/htmlimport/htmlimport.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/inc/bordertest.hxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport12.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport5.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 3 | ||||
-rw-r--r-- | sw/qa/extras/ww8export/ww8export3.cxx | 3 |
7 files changed, 8 insertions, 14 deletions
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 52a6a7145bc4..db046ad6c556 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -84,8 +84,7 @@ DECLARE_HTMLIMPORT_TEST(testInlinedImage, "inlined_image.html") uno::Reference<container::XNamed> const xNamed(xShape, uno::UNO_QUERY_THROW); CPPUNIT_ASSERT_EQUAL(OUString("Image1"), xNamed->getName()); - uno::Reference<graphic::XGraphic> xGraphic; - xGraphic = getProperty< uno::Reference<graphic::XGraphic> >(xShape, "Graphic"); + uno::Reference<graphic::XGraphic> xGraphic = getProperty< uno::Reference<graphic::XGraphic> >(xShape, "Graphic"); CPPUNIT_ASSERT(xGraphic.is()); CPPUNIT_ASSERT(xGraphic->getType() != graphic::GraphicType::EMPTY); diff --git a/sw/qa/extras/inc/bordertest.hxx b/sw/qa/extras/inc/bordertest.hxx index 3e95af91f441..160ddbd5db67 100644 --- a/sw/qa/extras/inc/bordertest.hxx +++ b/sw/qa/extras/inc/bordertest.hxx @@ -165,8 +165,7 @@ public: if(currentTable == sal_Int32(7)) tempMap = &map7; - BorderLineMap::iterator it; - it = tempMap->begin(); + BorderLineMap::iterator it = tempMap->begin(); for (sal_Int32 i = 0; i < nLength; ++i) { diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 3065d64c4935..b9e4f604a960 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -165,8 +165,7 @@ DECLARE_ODFIMPORT_TEST(testOdtBorders, "borders_ooo33.odt") uno::Sequence<OUString> const cells = xTextTable->getCellNames(); sal_Int32 nLength = cells.getLength(); - AllBordersMap::iterator it; - it = map.begin(); + AllBordersMap::iterator it = map.begin(); for (sal_Int32 i = 0; i < nLength; ++i) { diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx index 797c2d1e8884..3008ab8186a1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx @@ -727,8 +727,7 @@ DECLARE_OOXMLEXPORT_TEST(testObjectCrossReference, "object_cross_reference.odt") DECLARE_OOXMLEXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFields.doc") { //using .doc input file to verify cross-format compatibility. - uno::Reference<text::XFormField> xFormField; - xFormField + uno::Reference<text::XFormField> xFormField = getProperty<uno::Reference<text::XFormField>>(getRun(getParagraph(5), 3), "Bookmark"); uno::Reference<container::XNameContainer> xParameters(xFormField->getParameters()); diff --git a/sw/qa/extras/rtfexport/rtfexport5.cxx b/sw/qa/extras/rtfexport/rtfexport5.cxx index b2b898738d1d..8e73fa5e2747 100644 --- a/sw/qa/extras/rtfexport/rtfexport5.cxx +++ b/sw/qa/extras/rtfexport/rtfexport5.cxx @@ -989,8 +989,8 @@ DECLARE_RTFEXPORT_TEST(testClassificatonPasteLevels, "classification-confidentia DECLARE_RTFEXPORT_TEST(testTdf95707, "tdf95707.rtf") { // Graphic was replaced with a "Read-Error" placeholder. - uno::Reference<graphic::XGraphic> xGraphic; - xGraphic = getProperty<uno::Reference<graphic::XGraphic>>(getShape(1), "Graphic"); + uno::Reference<graphic::XGraphic> xGraphic + = getProperty<uno::Reference<graphic::XGraphic>>(getShape(1), "Graphic"); CPPUNIT_ASSERT(xGraphic.is()); CPPUNIT_ASSERT(xGraphic->getType() != graphic::GraphicType::EMPTY); } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 9a50ff1d5819..74fd2b147d76 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -6559,8 +6559,7 @@ void SwUiWriterTest::testHtmlCopyImages() SwDoc* pDoc = createDoc("image.odt"); // Trigger the copy part of HTML copy&paste. - WriterRef xWrt; - xWrt = new SwHTMLWriter( /*rBaseURL=*/OUString() ); + WriterRef xWrt = new SwHTMLWriter( /*rBaseURL=*/OUString() ); CPPUNIT_ASSERT(xWrt.is()); xWrt->m_bWriteClipboardDoc = true; diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx index 5afb7b187d80..b016bb5f3e04 100644 --- a/sw/qa/extras/ww8export/ww8export3.cxx +++ b/sw/qa/extras/ww8export/ww8export3.cxx @@ -88,8 +88,7 @@ DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc") DECLARE_WW8EXPORT_TEST(testTdf79435_legacyInputFields, "tdf79435_legacyInputFields.docx") { //using .docx input file to verify cross-format compatibility. - uno::Reference<text::XFormField> xFormField; - xFormField = getProperty< uno::Reference<text::XFormField> >(getRun(getParagraph(5), 3), "Bookmark"); + uno::Reference<text::XFormField> xFormField = getProperty< uno::Reference<text::XFormField> >(getRun(getParagraph(5), 3), "Bookmark"); uno::Reference<container::XNameContainer> xParameters(xFormField->getParameters()); OUString sTmp; |