summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-01 09:33:21 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-01 09:33:21 +0100
commit2744ad999be969cbcf81eb631a8414ed6584e955 (patch)
tree1aceb02b20fadcc6629d2486d160f86031b4b4c7 /sw/source
parent2cbabb5e6e0d2e3649f181a523e39a2f1a5c013c (diff)
Compare char* with string literal via strcmp
...as found by Clang and reported by DenverCoder9 on IRC.
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 875edfb7b221..0dd4f108cf8f 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -27,6 +27,10 @@
*
************************************************************************/
+#include "sal/config.h"
+
+#include <cstring>
+
#include "rtfattributeoutput.hxx"
#include "rtfsdrexport.hxx"
#include "writerwordglue.hxx"
@@ -3211,7 +3215,7 @@ static OString ExportPICT( const SwFlyFrmFmt* pFlyFrmFmt, const Size &rOrig, con
unsigned long nSize, const RtfExport& rExport )
{
OStringBuffer aRet;
- bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
+ bool bIsWMF = std::strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE) == 0;
if (pBLIPType && nSize && pGraphicAry)
{
aRet.append("{" OOO_STRING_SVTOOLS_RTF_PICT);
@@ -3431,7 +3435,7 @@ void RtfAttributeOutput::FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const S
the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its
a wmf already then we don't need any such wrapping
*/
- bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
+ bool bIsWMF = std::strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE) == 0;
if (!bIsWMF)
m_aRunText.append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_SHPPICT);