diff options
-rw-r--r-- | sw/source/core/bastyp/swcache.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/dbgoutsw.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/inc/fntcache.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/swcache.hxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 101 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 49 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 10 |
7 files changed, 84 insertions, 90 deletions
diff --git a/sw/source/core/bastyp/swcache.cxx b/sw/source/core/bastyp/swcache.cxx index 88c04f4b2624..b6c88be06cff 100644 --- a/sw/source/core/bastyp/swcache.cxx +++ b/sw/source/core/bastyp/swcache.cxx @@ -94,7 +94,7 @@ void SwCache::Check() SwCache::SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize #if OSL_DEBUG_LEVEL > 1 - , const ByteString &rNm + , const rtl::OString &rNm #endif ) : SwCacheObjArr( (sal_uInt8)nInitSize, (sal_uInt8)nGrowSize ), diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index a5cd9a50a343..12edea05680d 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -58,7 +58,7 @@ using namespace std; -static ByteString aDbgOutResult; +static rtl::OString aDbgOutResult; bool bDbgOutStdErr = false; bool bDbgOutPrintAttrSet = false; @@ -103,7 +103,7 @@ SW_DLLPUBLIC const char * dbg_out(const void * pVoid) SW_DLLPUBLIC const char * dbg_out(const String & aStr) { - aDbgOutResult = ByteString(aStr, RTL_TEXTENCODING_ASCII_US); + aDbgOutResult = rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US); if (bDbgOutStdErr) fprintf(stderr, "%s", aDbgOutResult.GetBuffer()); @@ -113,7 +113,7 @@ SW_DLLPUBLIC const char * dbg_out(const String & aStr) SW_DLLPUBLIC const char * dbg_out(const ::rtl::OUString & aStr) { - aDbgOutResult = ByteString( rtl::OUStringToOString( aStr, RTL_TEXTENCODING_ASCII_US ) ); + aDbgOutResult = rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US); return aDbgOutResult.GetBuffer(); } diff --git a/sw/source/core/inc/fntcache.hxx b/sw/source/core/inc/fntcache.hxx index 39a739ab41e2..c11f862d8278 100644 --- a/sw/source/core/inc/fntcache.hxx +++ b/sw/source/core/inc/fntcache.hxx @@ -53,7 +53,7 @@ public: inline SwFntCache() : SwCache(50,50 #if OSL_DEBUG_LEVEL > 1 - , ByteString( RTL_CONSTASCII_STRINGPARAM( + , rtl::OString( RTL_CONSTASCII_STRINGPARAM( "Globaler Font-Cache pFntCache" )) #endif ) {} diff --git a/sw/source/core/inc/swcache.hxx b/sw/source/core/inc/swcache.hxx index d609ad84c3c9..6273764c9714 100644 --- a/sw/source/core/inc/swcache.hxx +++ b/sw/source/core/inc/swcache.hxx @@ -92,7 +92,7 @@ class SwCache : public SwCacheObjArr void DeleteObj( SwCacheObj *pObj ); #if OSL_DEBUG_LEVEL > 1 - ByteString aName; + rtl::OString aName; long nAppend; //Anzahl der Eintragungen durch Erweiterung. long nInsertFree; //Anzahl der Eintragungen auf freie Plaetze. long nReplace; //Anzahl der Ersetzungen durch ein neues Objekt @@ -115,7 +115,7 @@ public: //nur sal_uInt8 hineinstecken!!! #if OSL_DEBUG_LEVEL > 1 SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize, - const ByteString &rNm ); + const rtl::OString &rNm ); ~SwCache(); #else SwCache( const sal_uInt16 nInitSize, const sal_uInt16 nGrowSize ); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 33bd07a8690f..157a106bf05a 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -701,12 +701,13 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, sal_Bool bUsed ) // wenn pPseudo gesetzt ist werden Styles-Sheets ausgegeben, // sonst wird nur nach Token und Class fuer ein Format gesucht -sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, +sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, rtl::OString& rToken, String& rClass, sal_uInt16& rRefPoolId, String *pPseudo ) { sal_uInt16 nDeep = 0; - rToken.Erase(); rClass.Erase(); + rToken = rtl::OString(); + rClass.Erase(); rRefPoolId = 0; if( pPseudo ) pPseudo->Erase(); @@ -737,7 +738,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case 'B': if( !bChrFmt && rNm.EqualsAscii(OOO_STRING_SVTOOLS_HTML_blockquote) ) { rRefPoolId = RES_POOLCOLL_HTML_BLOCKQUOTE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_blockquote ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_blockquote); } break; case 'C': if( bChrFmt ) @@ -745,19 +746,19 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, if( rNm.EqualsAscii(OOO_STRING_SVTOOLS_HTML_citiation) ) { rRefPoolId = RES_POOLCHR_HTML_CITIATION; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_citiation ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_citiation); } else if( rNm.EqualsAscii(OOO_STRING_SVTOOLS_HTML_code) ) { rRefPoolId = RES_POOLCHR_HTML_CODE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_code ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_code); } } break; case 'D': if( bChrFmt && rNm.EqualsAscii(OOO_STRING_SVTOOLS_HTML_definstance) ) { rRefPoolId = RES_POOLCHR_HTML_DEFINSTANCE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_definstance); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_definstance); } else if( !bChrFmt ) { @@ -775,12 +776,12 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, else if( nDefListLvl & HTML_DLCOLL_DD ) { rRefPoolId = RES_POOLCOLL_HTML_DD; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_dd ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_dd); } else { rRefPoolId = RES_POOLCOLL_HTML_DT; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_dt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_dt); } } } @@ -788,7 +789,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case 'E': if( bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_emphasis ) ) { rRefPoolId = RES_POOLCHR_HTML_EMPHASIS; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_emphasis ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_emphasis); } break; case 'H': if( !bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_horzrule ) ) @@ -798,14 +799,14 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case 'K': if( bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_keyboard ) ) { rRefPoolId = RES_POOLCHR_HTML_KEYBOARD; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_keyboard ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_keyboard); } break; case 'L': if( !bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_listing ) ) { // Listing als PRE exportieren bzw. von // PRE abgeleitete Vorlage exportieren - rToken.Assign( OOO_STRING_SVTOOLS_HTML_preformtxt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_preformtxt); rRefPoolId = RES_POOLCOLL_HTML_PRE; nDeep = CSS1_FMT_CMPREF; } @@ -813,7 +814,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case 'P': if( !bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_preformtxt ) ) { rRefPoolId = RES_POOLCOLL_HTML_PRE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_preformtxt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_preformtxt); } break; case 'S': if( bChrFmt ) @@ -821,32 +822,32 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, if( rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_sample ) ) { rRefPoolId = RES_POOLCHR_HTML_SAMPLE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_sample ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_sample); } else if( rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_strong ) ) { rRefPoolId = RES_POOLCHR_HTML_STRONG; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_strong ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_strong); } } break; case 'T': if( bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_teletype ) ) { rRefPoolId = RES_POOLCHR_HTML_TELETYPE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_teletype ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_teletype); } break; case 'V': if( bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_variable ) ) { rRefPoolId = RES_POOLCHR_HTML_VARIABLE; - rToken.Assign( OOO_STRING_SVTOOLS_HTML_variable ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_variable); } break; case 'X': if( !bChrFmt && rNm.EqualsAscii( OOO_STRING_SVTOOLS_HTML_xmp ) ) { // XMP als PRE exportieren (aber nicht die // Vorlage als Style) - rToken.Assign( OOO_STRING_SVTOOLS_HTML_preformtxt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_preformtxt); rRefPoolId = RES_POOLCOLL_HTML_PRE; nDeep = CSS1_FMT_CMPREF; } @@ -855,7 +856,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, // Wenn eine PoolId gesetzt ist, entspricht der Name der // Vorlage dem szugehoerigen Token - OSL_ENSURE( (rRefPoolId != 0) == (rToken.Len() > 0), + OSL_ENSURE( (rRefPoolId != 0) == (rToken.getLength() > 0), "Token missing" ); } else @@ -870,41 +871,41 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, bStop = (nDeep==0); break; case RES_POOLCOLL_TEXT: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_parabreak); break; case RES_POOLCOLL_HEADLINE1: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head1 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head1); break; case RES_POOLCOLL_HEADLINE2: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head2 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head2); break; case RES_POOLCOLL_HEADLINE3: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head3 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head3); break; case RES_POOLCOLL_HEADLINE4: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head4 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head4); break; case RES_POOLCOLL_HEADLINE5: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head5 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head5); break; case RES_POOLCOLL_HEADLINE6: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_head6 ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_head6); break; case RES_POOLCOLL_SENDADRESS: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_address ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_address); break; case RES_POOLCOLL_HTML_BLOCKQUOTE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_blockquote ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_blockquote); break; case RES_POOLCOLL_HTML_PRE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_preformtxt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_preformtxt); break; case RES_POOLCOLL_HTML_DD: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_dd ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_dd); break; case RES_POOLCOLL_HTML_DT: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_dt ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_dt); break; case RES_POOLCOLL_TABLE: @@ -917,7 +918,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, .makeStringAndClear(); } else - rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_parabreak); break; case RES_POOLCOLL_TABLE_HDLN: if( pPseudo ) @@ -929,7 +930,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, .makeStringAndClear(); } else - rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_parabreak); break; case RES_POOLCOLL_HTML_HR: // HR nicht ausgeben! @@ -938,7 +939,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case RES_POOLCOLL_FOOTNOTE: if( !nDeep ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_parabreak); rClass.AssignAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote ); rRefPoolId = RES_POOLCOLL_TEXT; nDeep = CSS1_FMT_CMPREF; @@ -947,7 +948,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, case RES_POOLCOLL_ENDNOTE: if( !nDeep ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_parabreak ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_parabreak); rClass.AssignAscii( OOO_STRING_SVTOOLS_HTML_sdendnote ); rRefPoolId = RES_POOLCOLL_TEXT; nDeep = CSS1_FMT_CMPREF; @@ -956,44 +957,44 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, // Zeichen-Vorlagen case RES_POOLCHR_HTML_EMPHASIS: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_emphasis ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_emphasis); break; case RES_POOLCHR_HTML_CITIATION: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_citiation ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_citiation); break; case RES_POOLCHR_HTML_STRONG: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_strong ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_strong); break; case RES_POOLCHR_HTML_CODE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_code ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_code); break; case RES_POOLCHR_HTML_SAMPLE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_sample ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_sample); break; case RES_POOLCHR_HTML_KEYBOARD: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_keyboard ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_keyboard); break; case RES_POOLCHR_HTML_VARIABLE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_variable ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_variable); break; case RES_POOLCHR_HTML_DEFINSTANCE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_definstance ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_definstance); break; case RES_POOLCHR_HTML_TELETYPE: - rToken.Assign( OOO_STRING_SVTOOLS_HTML_teletype ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_teletype); break; case RES_POOLCHR_INET_NORMAL: if( pPseudo ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_anchor ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_anchor); pPseudo->AssignAscii( sCSS1_link ); } break; case RES_POOLCHR_INET_VISIT: if( pPseudo ) { - rToken.Assign( OOO_STRING_SVTOOLS_HTML_anchor ); + rToken = rtl::OString(OOO_STRING_SVTOOLS_HTML_anchor); pPseudo->AssignAscii( sCSS1_visited ); } break; @@ -1001,11 +1002,11 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, // Wenn ein Token gesetzt ist, enthaelt nPoolId die dazugehoerige // Vorlage - if( rToken.Len() && !rRefPoolId ) + if( rToken.getLength() && !rRefPoolId ) rRefPoolId = nPoolId; } - if( rToken.Len() || bStop ) + if( rToken.getLength() || bStop ) { // Anhalten wenn eine HTML-Tag-Vorlage gefunden wurde break; @@ -1018,7 +1019,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, } } - if( rToken.Len() ) + if( rToken.getLength() ) { // Es ist eine HTML-Tag-Vorlage if( !nDeep ) @@ -1057,7 +1058,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector, sal_uInt16& rRefPoolId ) { - ByteString aToken; + rtl::OString aToken; String aClass; String aPseudo; @@ -1065,7 +1066,7 @@ static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector, rRefPoolId, &aPseudo ); if( nDeep ) { - if( aToken.Len() ) + if( aToken.getLength() ) rSelector = String( aToken, RTL_TEXTENCODING_ASCII_US ); else rSelector.Erase(); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 7354b6c6b296..7b796a5fbf19 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -272,7 +272,7 @@ sal_uInt16 SwHTMLWriter::GetCSS1ScriptForScriptType( sal_uInt16 nScriptType ) struct SwHTMLTxtCollOutputInfo { - ByteString aToken; // auszugendens End-Token + rtl::OString aToken; // auszugendens End-Token SfxItemSet *pItemSet; // harte Attributierung sal_Bool bInNumBulList; // in einer Aufzaehlungs-Liste; @@ -290,7 +290,7 @@ struct SwHTMLTxtCollOutputInfo ~SwHTMLTxtCollOutputInfo(); - sal_Bool HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; } + sal_Bool HasParaToken() const { return aToken.getLength()==1 && aToken[0]=='P'; } sal_Bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); } }; @@ -304,7 +304,7 @@ struct SwHTMLFmtInfo const SwFmt *pFmt; // das Format selbst const SwFmt *pRefFmt; // das Vergleichs-Format - ByteString aToken; // das auszugebende Token + rtl::OString aToken; // das auszugebende Token String aClass; // die auszugebende Klasse SfxItemSet *pItemSet; // der auszugebende Attribut-Set @@ -357,7 +357,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate, // Den Selektor des Formats holen sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass, nRefPoolId ); - OSL_ENSURE( nDeep ? aToken.Len()>0 : aToken.Len()==0, + OSL_ENSURE( nDeep ? aToken.getLength()>0 : aToken.getLength()==0, "Hier stimmt doch was mit dem Token nicht!" ); OSL_ENSURE( nDeep ? nRefPoolId : !nRefPoolId, "Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" ); @@ -658,34 +658,34 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel sal_Bool bOutNewLine = sal_False; // nur ein LF ausgeben? - if( pFmtInfo->aToken.Len() ) + if( pFmtInfo->aToken.getLength() ) { // Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer // solchen abgeleitet rInfo.aToken = pFmtInfo->aToken; // der erste Buchstabe reicht meistens - switch( rInfo.aToken.GetChar( 0 ) ) + switch( rInfo.aToken[0] ) { - case 'A': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address), + case 'A': OSL_ENSURE( rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_address)), "Doch kein ADDRESS?" ); rInfo.bParaPossible = sal_True; rHWrt.bNoAlign = sal_True; break; - case 'B': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote), + case 'B': OSL_ENSURE( rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_blockquote)), "Doch kein BLOCKQUOTE?" ); rInfo.bParaPossible = sal_True; rHWrt.bNoAlign = sal_True; break; - case 'P': if( rInfo.aToken.Len() == 1 ) + case 'P': if( rInfo.aToken.getLength() == 1 ) { bPara = sal_True; } else { - OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_preformtxt), + OSL_ENSURE( rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_preformtxt)), "Doch kein PRE?" ); if( HTML_PREFORMTXT_ON == rHWrt.nLastParaToken ) { @@ -700,10 +700,10 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, } break; - case 'D': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt) || - rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dd), + case 'D': OSL_ENSURE( rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_dt)) || + rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_dd)), "Doch kein DD/DT?" ); - bDT = rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt); + bDT = rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_dt)); rInfo.bParaPossible = !bDT; rHWrt.bNoAlign = sal_True; bForceDL = sal_True; @@ -768,7 +768,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, { // nur einen Zeilen-Umbruch (ohne Einrueckung) am Absatz-Anfang // ausgeben - rInfo.aToken.Erase(); // kein End-Tag ausgeben + rInfo.aToken = rtl::OString(); // kein End-Tag ausgeben rWrt.Strm() << SwHTMLWriter::sNewLine; return; @@ -969,7 +969,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( !rHWrt.bCfgOutStyles && rInfo.bParaPossible && !bPara && (bHasParSpace || pAdjItem) ) { - HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer() ); + HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.getStr() ); aToken = OOO_STRING_SVTOOLS_HTML_parabreak; bPara = sal_True; rHWrt.bNoAlign = sal_False; @@ -1090,7 +1090,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, // wenn kein End-Tag geschrieben werden soll, es loeschen if( bNoEndTag ) - rInfo.aToken.Erase(); + rInfo.aToken = rtl::OString(); } // ??? Warum nicht ueber den Hint-Mechanismus ??? @@ -1133,7 +1133,7 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo ) SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt; // wenn es kein Token gibt haben wir auch nichts auszugeben - if( !rInfo.aToken.Len() ) + if( !rInfo.aToken.getLength() ) { rHWrt.FillNextNumInfo(); const SwHTMLNumRuleInfo& rNextInfo = *rHWrt.GetNextNumInfo(); @@ -1166,11 +1166,12 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo ) if( rInfo.bParaPossible && rInfo.bOutPara ) HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, sal_False ); - HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer(), + HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.getStr(), sal_False ); - rHWrt.bLFPossible = !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dt ) && - !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dd ) && - !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_li ); + rHWrt.bLFPossible = + !rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_dt)) && + !rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_dd)) && + !rInfo.aToken.equalsL(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_li)); } if( rInfo.bOutDiv ) { @@ -1852,7 +1853,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem, const SwCharFmt* pFmt = rChrFmt.GetCharFmt(); const SwHTMLFmtInfo *pFmtInfo = GetFmtInfo( *pFmt, rFmtInfos ); - if( pFmtInfo->aToken.Len() ) + if( pFmtInfo->aToken.getLength() ) { // das Zeichenvorlagen-Tag muss vor den harten // Attributen ausgegeben werden @@ -3245,7 +3246,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt ) { rtl::OStringBuffer sOut; sOut.append('<'); - if( pFmtInfo->aToken.Len() > 0 ) + if( pFmtInfo->aToken.getLength() > 0 ) sOut.append(pFmtInfo->aToken); else sOut.append(OOO_STRING_SVTOOLS_HTML_span); @@ -3283,7 +3284,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt ) else { HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), - pFmtInfo->aToken.Len() ? pFmtInfo->aToken.GetBuffer() + pFmtInfo->aToken.getLength() ? pFmtInfo->aToken.getStr() : OOO_STRING_SVTOOLS_HTML_span, sal_False ); } diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index 537aab8076bc..a493c214bcbe 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -381,8 +381,6 @@ public: inline void OutCSS1_PropertyAscii( const sal_Char *pProp, const sal_Char *pVal ); inline void OutCSS1_PropertyAscii( const sal_Char *pProp, - const ByteString& rVal ); - inline void OutCSS1_PropertyAscii( const sal_Char *pProp, const rtl::OString& rVal ); inline void OutCSS1_Property( const sal_Char *pProp, const String& rVal ); void OutCSS1_Property( const sal_Char *pProp, const sal_Char *pVal, @@ -458,7 +456,7 @@ public: static const SdrObject *GetHTMLControl( const SwDrawFrmFmt& rFmt ); static const SdrObject *GetMarqueeTextObj( const SwDrawFrmFmt& rFmt ); - static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken, + static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, rtl::OString& rToken, String& rClass, sal_uInt16& rRefPoolId, String *pPseudo=0 ); @@ -512,12 +510,6 @@ inline void SwHTMLWriter::OutCSS1_PropertyAscii( const sal_Char *pProp, } inline void SwHTMLWriter::OutCSS1_PropertyAscii( const sal_Char *pProp, - const ByteString& rVal ) -{ - OutCSS1_Property( pProp, rVal.GetBuffer(), 0 ); -} - -inline void SwHTMLWriter::OutCSS1_PropertyAscii( const sal_Char *pProp, const rtl::OString& rVal ) { OutCSS1_Property( pProp, rVal.getStr(), 0 ); |