diff options
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ascii/ascatr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfldw.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtfatr.cxx | 10 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 12 |
5 files changed, 15 insertions, 14 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index c1ba4908a339..f2a8229c3092 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -125,7 +125,7 @@ BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos ) { case RES_TXTATR_FIELD: sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld() - ->ExpandField(rWrt.pDoc->IsClipBoard()); + ->ExpandField(true); break; case RES_TXTATR_FTN: diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index 50b7bdc7ddc8..6b905e450dee 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -305,7 +305,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld, } // Inhalt des Feldes ausgeben - String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) ); + String const sExpand( pFld->ExpandField(true) ); sal_Bool bNeedsCJKProcessing = sal_False; if( sExpand.Len() ) { diff --git a/sw/source/filter/rtf/rtfatr.cxx b/sw/source/filter/rtf/rtfatr.cxx index 17050299c84b..db91ec79d2e7 100644 --- a/sw/source/filter/rtf/rtfatr.cxx +++ b/sw/source/filter/rtf/rtfatr.cxx @@ -1425,7 +1425,7 @@ void ExportPICT(const Size &rOrig, const Size &rRendered, const Size &rMapped, const SwCropGrf &rCr, const char *pBLIPType, const sal_uInt8 *pGraphicAry, unsigned long nSize, SwRTFWriter &rWrt) { - bool bIsWMF = (const char *)pBLIPType == (const char *)OOO_STRING_SVTOOLS_RTF_WMETAFILE ? true : false; + bool bIsWMF = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false; if (pBLIPType && nSize && pGraphicAry) { rWrt.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_PICT; @@ -1570,7 +1570,7 @@ static Writer& OutRTF_SwGrfNode(Writer& rWrt, SwCntntNode & rNode) 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 = (pBLIPType && !strcmp(pBLIPType, OOO_STRING_SVTOOLS_RTF_WMETAFILE)) ? true : false; if (!bIsWMF) OutComment(rRTFWrt, OOO_STRING_SVTOOLS_RTF_SHPPICT); @@ -2903,7 +2903,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) case RES_HIDDENTXTFLD: if( TYP_CONDTXTFLD == ((SwHiddenTxtField*)pFld)->GetSubType() ) RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); else { @@ -2960,7 +2960,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) if( ' ' != cCh ) // vorweg immer einen Trenner rWrt.Strm() << ' '; RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); } break; @@ -2970,7 +2970,7 @@ static Writer& OutRTF_SwField( Writer& rWrt, const SfxPoolItem& rHt ) { rWrt.Strm() << "}{" << OOO_STRING_SVTOOLS_RTF_FLDRSLT << ' '; RTFOutFuncs::Out_String( rWrt.Strm(), - pFld->ExpandField(rWrt.pDoc->IsClipBoard()), + pFld->ExpandField(true), rRTFWrt.eDefaultEncoding, rRTFWrt.bWriteHelpFmt ); rWrt.Strm() << "}}"; rRTFWrt.bOutFmtAttr = FALSE; diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 7f1b6658800e..c7f5c06cb81c 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -343,7 +343,8 @@ void WW8Export::DoFormText(const SwInputField * pFld) OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END); - SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false); + String const fieldStr( pFld->ExpandField(true) ); + SwWW8Writer::WriteString16(Strm(), fieldStr, false); static BYTE aArr2[] = { 0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 89aef162ec01..6e00687ffafa 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -1743,9 +1743,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c, aItems.GetData()); } -String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc) +String lcl_GetExpandedField(const SwField &rFld) { - String sRet(rFld.ExpandField(rDoc.IsClipBoard())); + String sRet(rFld.ExpandField(true)); //replace LF 0x0A with VT 0x0B sRet.SearchAndReplaceAll(0x0A, 0x0B); @@ -1871,7 +1871,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType, { String sOut; if( pFld ) - sOut = lcl_GetExpandedField(*pFld, *pDoc); + sOut = lcl_GetExpandedField(*pFld); else sOut = rFldCmd; if( sOut.Len() ) @@ -2598,7 +2598,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) sStr.APPEND_CONST_ASC( "\" " ); m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START | WRITEFIELD_CMD_START | WRITEFIELD_CMD_END ); - String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc ); + String sVar = lcl_GetExpandedField( rFld ); if ( sVar.Len() ) { if ( m_rWW8Export.IsUnicode() ) @@ -2614,7 +2614,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef) void WW8AttributeOutput::WriteExpand( const SwField* pFld ) { - String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) ); + String sExpand( lcl_GetExpandedField( *pFld ) ); if ( m_rWW8Export.IsUnicode() ) SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false ); else @@ -2776,7 +2776,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField ) if (pDocInfoField != NULL) { - String sFieldname = pDocInfoField->GetCntnt(TRUE); + String sFieldname = pDocInfoField->GetFieldName(); xub_StrLen nIndex = sFieldname.Search(':'); if (nIndex != sFieldname.Len()) |