1 --- sw/source/filter/html/htmlforw.cxx.old 2007-09-27 11:48:34.000000000 +0200
2 +++ sw/source/filter/html/htmlforw.cxx 2008-03-07 13:29:49.000000000 +0100
3 @@ -1088,7 +1088,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
7 - if( (const sal_Char *)sHTML_IT_image == (const sal_Char *)pType )
8 + if( pType && !strcmp( sHTML_IT_image, pType ) )
10 aTmp = xPropSet->getPropertyValue(
11 OUString::createFromAscii( "ImageURL" ) );
12 @@ -1153,7 +1153,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
14 // Wenn Zeichen-Objekte nicht absolut positioniert werden duerfen,
15 // das entsprechende Flag loeschen.
16 - nFrmOpts |= ((const sal_Char *)sHTML_IT_image == (const sal_Char *)pType
17 + nFrmOpts |= ( ( pType && !strcmp ( sHTML_IT_image, pType ) )
18 ? HTML_FRMOPTS_IMG_CONTROL_CSS1
19 : HTML_FRMOPTS_CONTROL_CSS1);
21 @@ -1163,8 +1163,9 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
23 if( rHTMLWrt.bCfgOutStyles )
25 - sal_Bool bEdit = sHTML_textarea == pTag || (const sal_Char *)sHTML_IT_file == (const sal_Char *)pType ||
26 - (const sal_Char *)sHTML_IT_text == (const sal_Char *)pType;
27 + sal_Bool bEdit = ( pTag && !strcmp ( sHTML_textarea, pTag ) ) ||
28 + ( pType && !strcmp ( sHTML_IT_file, pType ) ) ||
29 + ( pType && !strcmp ( sHTML_IT_text, pType ) );
31 SfxItemSet aItemSet( rHTMLWrt.pDoc->GetAttrPool(), RES_CHRATR_BEGIN,
33 @@ -1286,7 +1287,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
37 - if( sHTML_select == pTag )
38 + if( pTag && !strcmp ( sHTML_select, pTag ) )
40 aTmp = xPropSet->getPropertyValue(
41 OUString::createFromAscii( "StringItemList" ) );
42 @@ -1366,7 +1367,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
44 HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sHTML_select, sal_False );
46 - else if( sHTML_textarea == pTag )
47 + else if( pTag && !strcmp ( sHTML_textarea, pTag ) )
49 // In TextAreas duerfen keine zusaetzlichen Spaces oder LF exportiert
51 @@ -1393,7 +1394,8 @@ Writer& OutHTML_DrawFrmFmtAsControl( Wri
53 HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sHTML_textarea, sal_False );
55 - else if( (const sal_Char *)sHTML_IT_checkbox == (const sal_Char *)pType || (const sal_Char *)sHTML_IT_radio == (const sal_Char *)pType )
56 + else if( ( pType && !strcmp ( sHTML_IT_checkbox, pType ) ) ||
57 + ( pType && !strcmp ( sHTML_IT_radio, pType ) ) )
59 aTmp = xPropSet->getPropertyValue( OUString::createFromAscii("Label") );
60 if( aTmp.getValueType() == ::getCppuType((const OUString*)0) &&
61 --- sw/source/filter/rtf/rtfatr.cxx.old 2007-10-22 17:12:26.000000000 +0200
62 +++ sw/source/filter/rtf/rtfatr.cxx 2008-03-07 13:34:55.000000000 +0100
63 @@ -1615,7 +1615,7 @@ void ExportPICT(const Size &rOrig, const
64 const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry,
65 unsigned long nSize, SwRTFWriter &rWrt)
67 - bool bIsWMF = (const char *)pBLIPType == (const char *)sRTF_WMETAFILE ? true : false;
68 + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, sRTF_WMETAFILE)) ? true : false;
69 if (pBLIPType && nSize && pGraphicAry)
71 rWrt.Strm() << '{' << sRTF_PICT;
72 @@ -1760,7 +1760,7 @@ static Writer& OutRTF_SwGrfNode(Writer&
73 the wmf format wrapped in nonshppict, so as to keep wordpad happy. If its
74 a wmf already then we don't need any such wrapping
76 - bool bIsWMF = (const sal_Char*)pBLIPType == (const sal_Char*)sRTF_WMETAFILE ? true : false;
77 + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, sRTF_WMETAFILE)) ? true : false;
79 OutComment(rRTFWrt, sRTF_SHPPICT);