merge the formfield patch from ooo-build
[ooovba.git] / applied_patches / 0394-warning-string-comparsion-sw.diff
blob0817c190875046c4080c3d1a55f36290e137331f
1 --- sw/source/filter/rtf/rtfatr.cxx.old 2007-10-22 17:12:26.000000000 +0200
2 +++ sw/source/filter/rtf/rtfatr.cxx 2008-03-07 13:34:55.000000000 +0100
3 @@ -1438,7 +1438,7 @@ void ExportPICT(const Size &rOrig, const
4 const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry,
5 unsigned long nSize, SwRTFWriter &rWrt)
7 - bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
8 + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
9 if (pBLIPType && nSize && pGraphicAry)
11 rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT;
12 @@ -1583,7 +1583,7 @@ static Writer& OutRTF_SwGrfNode(Writer&
13 the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its
14 a wmf already then we don't need any such wrapping
16 - bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false;
17 + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false;
18 if (!bIsWMF)
19 OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT);