summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-22 08:11:58 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-22 08:13:42 +0100
commite6c124ae3b4de78848344a172003de934e1cb163 (patch)
tree99bbb9c600af26b18842ef33fca9790685d55ccc /sw/qa
parent08bdb40656898fc484f5200b63610a31369ddd87 (diff)
Some more loplugin:cstylecast: sw
note the two TODOs about suspicious casts Change-Id: I324fa05b30a5c8aa1d9e9a6d488a1e295226e788
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx6
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport3.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx2
4 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index e1840dd3054a..7528ced17835 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -394,7 +394,7 @@ protected:
if (!mpXmlBuffer)
dumpLayout();
- return xmlParseMemory((const char*)xmlBufferContent(mpXmlBuffer), xmlBufferLength(mpXmlBuffer));;
+ return xmlParseMemory(reinterpret_cast<const char*>(xmlBufferContent(mpXmlBuffer)), xmlBufferLength(mpXmlBuffer));;
}
/**
@@ -413,9 +413,9 @@ protected:
xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
OUString aRet;
if (aAttribute.getLength())
- aRet = OUString::createFromAscii((const char*)xmlGetProp(pXmlNode, BAD_CAST(aAttribute.getStr())));
+ aRet = OUString::createFromAscii(reinterpret_cast<char*>(xmlGetProp(pXmlNode, BAD_CAST(aAttribute.getStr()))));
else
- aRet = OUString::createFromAscii((const char*)xmlNodeGetContent(pXmlNode));
+ aRet = OUString::createFromAscii(reinterpret_cast<char*>(xmlNodeGetContent(pXmlNode)));
xmlFreeDoc(pXmlDoc);
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
index c2361415072e..0c5a0f8e4c9e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx
@@ -534,7 +534,7 @@ DECLARE_OOXMLEXPORT_TEST(testFontNameIsEmpty, "font-name-is-empty.docx")
sal_Int32 length = xmlXPathNodeSetGetLength(pXmlNodes);
for(sal_Int32 index = 0; index < length; index++){
xmlNodePtr pXmlNode = pXmlNodes->nodeTab[index];
- OUString attrVal = OUString::createFromAscii((const char*)xmlGetProp(pXmlNode, BAD_CAST("name")));
+ OUString attrVal = OUString::createFromAscii(reinterpret_cast<char*>(xmlGetProp(pXmlNode, BAD_CAST("name"))));
if (attrVal.isEmpty()){
CPPUNIT_FAIL("Font name is empty.");
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 7d18e3e8b0c0..fa806794f0fd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -388,7 +388,7 @@ DECLARE_OOXMLEXPORT_TEST(testGenericTextField, "Unsupportedtextfields.docx")
xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc,"/w:document/w:body/w:p[2]/w:r[2]/w:instrText");
xmlNodeSetPtr pXmlNodes = pXmlObj->nodesetval;
xmlNodePtr pXmlNode = pXmlNodes->nodeTab[0];
- OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
+ OUString contents = OUString::createFromAscii(reinterpret_cast<char*>((pXmlNode->children[0]).content));
CPPUNIT_ASSERT(contents.match("PRINTDATE \\* MERGEFORMAT"));
xmlXPathFreeObject(pXmlObj);
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
index 73831a90db73..8e6fa93531f9 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlsdrexport.cxx
@@ -1566,7 +1566,7 @@ DECLARE_OOXMLEXPORT_TEST(testAbsolutePositionOffsetValue,"fdo78432.docx")
{
CPPUNIT_ASSERT(pXmlObjs[index]->nodesetval != 0);
xmlNodePtr pXmlNode = pXmlObjs[index]->nodesetval->nodeTab[0];
- OUString contents = OUString::createFromAscii((const char*)((pXmlNode->children[0]).content));
+ OUString contents = OUString::createFromAscii(reinterpret_cast<const char*>((pXmlNode->children[0]).content));
CPPUNIT_ASSERT( contents.toInt64() <= IntMax );
xmlXPathFreeObject(pXmlObjs[index]);
}