diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-03-01 09:33:21 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-03-01 09:33:21 +0100 |
commit | 2744ad999be969cbcf81eb631a8414ed6584e955 (patch) | |
tree | 1aceb02b20fadcc6629d2486d160f86031b4b4c7 | |
parent | 2cbabb5e6e0d2e3649f181a523e39a2f1a5c013c (diff) |
Compare char* with string literal via strcmp
...as found by Clang and reported by DenverCoder9 on IRC.
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 8 |
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); |