diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-06-13 10:09:21 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-06-15 13:34:14 +0200 |
commit | 4ea281a3ccb5bd21e1808d8cb127a91a1bb72691 (patch) | |
tree | 183a2ab634d770b7ef777323fa6851fc38e14011 /sw | |
parent | 943f4b4ff1c524c514584c459b899ba3e9dfb71f (diff) |
cppcheck:redundantAssignment
Change-Id: I1167d0ce6b6f6e48309d0551c1d2a283d79546a7
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/uwriter.cxx | 4 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index d1e74600fb58..f4e03a060feb 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -320,7 +320,7 @@ SwTextNode* getModelToViewTestDocument(SwDoc *pDoc) SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc) { - SwTextNode* pTextNode = getModelToViewTestDocument(pDoc); + getModelToViewTestDocument(pDoc); SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); @@ -336,7 +336,7 @@ SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc) (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] = uno::makeAny(vListEntries); (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] = uno::makeAny(sal_Int32(0)); pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("CCCCC")); - pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(11), pTextNode->GetText().getLength()); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 21140f319830..cfeea16433b8 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -662,11 +662,8 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphWithComments, "paragraphWithComments.docx" if(!pXmlDoc) return; - sal_Int32 idInDocXml = 0; - sal_Int32 idInCommentXml = -1; //intentionally assigning -1 so that it differs from idInDocXml - //and also because getXpath does not assert. - idInDocXml = getXPath(pXmlDoc,"/w:document/w:body/w:p[3]/w:commentRangeEnd[1]","id").toInt32(); - idInCommentXml = getXPath(pXmlComm,"/w:comments/w:comment[1]","id").toInt32(); + sal_Int32 idInDocXml = getXPath(pXmlDoc,"/w:document/w:body/w:p[3]/w:commentRangeEnd[1]","id").toInt32(); + sal_Int32 idInCommentXml = getXPath(pXmlComm,"/w:comments/w:comment[1]","id").toInt32(); CPPUNIT_ASSERT_EQUAL( idInDocXml, idInCommentXml ); } |