summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-04-06 18:30:47 +0200
commit8005237d71a75fe9bcfd860111bb0fe1fa6064d6 (patch)
tree0ef38f86283763745d6e9531fb34b22fd000713d /sw/qa
parentcbb2f42ecc86b3fc327e976f5a1a591b40f40299 (diff)
Improved loplugin:redundantcast, static_cast on arithmetic types: sw
Change-Id: I1d52df4fe3f276ebf017aa7cfb7b313cefaf0844
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/globalfilter/globalfilter.cxx6
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx2
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx
index 68187a49c4ab..0fcc0a48e2a2 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -612,7 +612,7 @@ void Test::testMSCharBackgroundEditing()
case 3: nBackColor = 0x00ff00; break; //green
case 4: nBackColor = 0xff00ff; break; //magenta
}
- xRun->setPropertyValue("CharBackColor", uno::makeAny(static_cast<sal_Int32>(nBackColor)));
+ xRun->setPropertyValue("CharBackColor", uno::makeAny(nBackColor));
// Remove highlighting
xRun->setPropertyValue("CharHighlight", uno::makeAny(static_cast<sal_Int32>(COL_TRANSPARENT)));
// Remove shading marker
@@ -661,11 +661,11 @@ void Test::testMSCharBackgroundEditing()
if( strcmp(aFilterNames[nFilter], "writer8") == 0 )
{
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharHighlight"));
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(nBackColor), getProperty<sal_Int32>(xRun,"CharBackColor"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), nBackColor, getProperty<sal_Int32>(xRun,"CharBackColor"));
}
else
{
- CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(nBackColor), getProperty<sal_Int32>(xRun,"CharHighlight"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), nBackColor, getProperty<sal_Int32>(xRun,"CharHighlight"));
CPPUNIT_ASSERT_EQUAL_MESSAGE(sFailedMessage.getStr(), static_cast<sal_Int32>(COL_TRANSPARENT), getProperty<sal_Int32>(xRun,"CharBackColor"));
}
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 166d4658fda0..b954283754a9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -2065,7 +2065,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf90810, "tdf90810short.docx")
uno::Reference<text::XFootnote> xFootnote(xFootnoteIdxAcc->getByIndex(0), uno::UNO_QUERY);
uno::Reference<text::XText> xFootnoteText(xFootnote, uno::UNO_QUERY);
rtl::OUString sFootnoteText = xFootnoteText->getString();
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(90), static_cast<sal_Int32>(sFootnoteText.getLength()));
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(90), sFootnoteText.getLength());
}
DECLARE_OOXMLEXPORT_TEST(testTdf89165, "tdf89165.docx")