diff options
author | Noel Grandin <noel@peralex.com> | 2013-10-10 12:06:40 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-10-15 12:25:31 +0200 |
commit | e1cebdd841cd87f7b73b617eff0bc0d719ab95fd (patch) | |
tree | a733618589df44aa685dd749d2c465986bd16c75 /sw/source/filter | |
parent | 9285f8de9bc654dcb6a7de4891239276233adb2a (diff) |
convert sw/source/filter/html/*.hxx from String to OUString
Change-Id: Idb409a930b2f93fc862fdd62352c38365751bd34
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlcss1.cxx | 28 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfld.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlfly.cxx | 22 | ||||
-rw-r--r-- | sw/source/filter/html/htmlftn.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/html/htmlgrin.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/html/htmlnum.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlsect.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.cxx | 36 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 50 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/wrthtml.hxx | 30 |
13 files changed, 121 insertions, 121 deletions
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 5dfa8bb854e2..260ae531c1d1 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -732,7 +732,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, if( bNumbered ) { - if( rHWrt.aBulletGrfs[nBulletGrfLvl].Len() ) + if( !rHWrt.aBulletGrfs[nBulletGrfLvl].isEmpty() ) bNumbered = sal_False; else nBulletGrfLvl = 255; diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 915887f7833f..6391500734fe 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1717,7 +1717,7 @@ void SwHTMLParser::EndStyle() } } -sal_Bool SwHTMLParser::FileDownload( const String& rURL, +sal_Bool SwHTMLParser::FileDownload( const OUString& rURL, OUString& rStr ) { // View wegschmeissen (wegen Reschedule) @@ -1890,17 +1890,17 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const OUString& rIn ) return sal_True; } -sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle, - const String &rId, - const String &rClass, - SfxItemSet &rItemSet, - SvxCSS1PropertyInfo &rPropInfo, - const String *pLang, - const String *pDir ) +sal_Bool SwHTMLParser::ParseStyleOptions( const OUString &rStyle, + const OUString &rId, + const OUString &rClass, + SfxItemSet &rItemSet, + SvxCSS1PropertyInfo &rPropInfo, + const OUString *pLang, + const OUString *pDir ) { sal_Bool bRet = sal_False; - if( rClass.Len() ) + if( !rClass.isEmpty() ) { OUString aClass( rClass ); SwCSS1Parser::GetScriptFromClass( aClass ); @@ -1914,18 +1914,18 @@ sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle, } } - if( rId.Len() ) + if( !rId.isEmpty() ) { const SvxCSS1MapEntry *pId = pCSS1Parser->GetId( rId ); if( pId ) pCSS1Parser->MergeStyles( pId->GetItemSet(), pId->GetPropertyInfo(), - rItemSet, rPropInfo, rClass.Len()!=0 ); + rItemSet, rPropInfo, !rClass.isEmpty() ); rPropInfo.aId = rId; bRet = sal_True; } - if( rStyle.Len() ) + if( !rStyle.isEmpty() ) { pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo ); bRet = sal_True; @@ -1934,7 +1934,7 @@ sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle, if( bRet ) rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST ); - if( pLang && pLang->Len() ) + if( pLang && !pLang->isEmpty() ) { LanguageType eLang = LanguageTag::convertToLanguageTypeWithFallback( *pLang ); if( LANGUAGE_DONTKNOW != eLang ) @@ -1949,7 +1949,7 @@ sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle, bRet = sal_True; } } - if( pDir && pDir->Len() ) + if( pDir && !pDir->isEmpty() ) { OUString aValue( *pDir ); SvxFrameDirection eDir = FRMDIR_ENVIRONMENT; diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index e2fd2026709d..fd486e56f28c 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -600,7 +600,7 @@ void SwHTMLParser::InsertCommentText( const sal_Char *pTag ) } } -void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag ) +void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag ) { OUString aComment( rComment ); if( pTag ) diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 2c03016018bf..f0de56120838 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -527,7 +527,7 @@ void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt, OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, - const String& rAlternateTxt, + const OUString& rAlternateTxt, sal_uInt32 nFrmOpts, const OString &rEndTags ) { @@ -559,7 +559,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt, // ALT - if( (nFrmOpts & HTML_FRMOPT_ALT) && rAlternateTxt.Len() ) + if( (nFrmOpts & HTML_FRMOPT_ALT) && !rAlternateTxt.isEmpty() ) { sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_alt). append("=\""); @@ -1646,28 +1646,28 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt, } -void SwHTMLWriter::AddLinkTarget( const String& rURL ) +void SwHTMLWriter::AddLinkTarget( const OUString& rURL ) { - if( !rURL.Len() || rURL.GetChar(0) != '#' ) + if( rURL.isEmpty() || rURL[0] != '#' ) return; // There might be a '|' as delimiter (if the link has been inserted // freshly) or a '%7c' or a '%7C' if the document has been saved and // loaded already. - xub_StrLen nPos = rURL.Len(); + xub_StrLen nPos = rURL.getLength(); sal_Bool bFound = sal_False, bEncoded = sal_False; while( !bFound && nPos > 0 ) { - sal_Unicode c = rURL.GetChar( --nPos ); + sal_Unicode c = rURL[ --nPos ]; switch( c ) { case cMarkSeparator: bFound = sal_True; break; case '%': - bFound = (rURL.Len() - nPos) >=3 && - rURL.GetChar( nPos+1 ) == '7' && - ((c =rURL.GetChar( nPos+2 )) == 'C' || c == 'c'); + bFound = (rURL.getLength() - nPos) >=3 && + rURL[ nPos+1 ] == '7' && + ((c =rURL[ nPos+2 ]) == 'C' || c == 'c'); if( bFound ) bEncoded = sal_True; } @@ -1675,7 +1675,7 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL ) if( !bFound || nPos < 2 ) // mindetsens "#a|..." return; - String aURL( rURL.Copy( 1 ) ); + String aURL( rURL.copy( 1 ) ); // nPos-1+1/3 (-1 wg. Erase) OUString sCmp(comphelper::string::remove(aURL.Copy(bEncoded ? nPos+2 : nPos), @@ -1720,7 +1720,7 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL ) aURL.Erase( nPos, 2 ); aURL.SetChar( nPos-1, cMarkSeparator ); } - aOutlineMarks.insert( aOutlineMarks.begin()+nIns, new String( aURL ) ); + aOutlineMarks.insert( aOutlineMarks.begin()+nIns, aURL ); } } else if( sCmp == "text" ) diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index 5609ebdf6bd0..94f0194f7ab4 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -404,7 +404,7 @@ void SwHTMLWriter::OutFootEndNotes() nFootNote = nEndNote = 0; } -String SwHTMLWriter::GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ) +OUString SwHTMLWriter::GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ) { const SwEndNoteInfo * pInfo = 0; if( rFmtFtn.GetNumStr().isEmpty() ) @@ -422,7 +422,7 @@ String SwHTMLWriter::GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ) } void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, - const String& rNum, + const OUString& rNum, sal_uInt16 nScript ) { const SwEndNoteInfo *pInfo; diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 94b35052f498..47723b5ca361 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -796,7 +796,7 @@ void SwHTMLParser::InsertBodyOptions() pDoc->SetTxtFmtColl( *pPam, pCSS1Parser->GetTxtCollFromPool( RES_POOLCOLL_TEXT ) ); - String aBackGround, aId, aStyle, aLang, aDir; + OUString aBackGround, aId, aStyle, aLang, aDir; Color aBGColor, aTextColor, aLinkColor, aVLinkColor; sal_Bool bBGColor=sal_False, bTextColor=sal_False; sal_Bool bLinkColor=sal_False, bVLinkColor=sal_False; @@ -923,7 +923,7 @@ void SwHTMLParser::InsertBodyOptions() pCSS1Parser->SetBodyBGColorSet(); } - if( aBackGround.Len() && !pCSS1Parser->IsBodyBackgroundSet() ) + if( !aBackGround.isEmpty() && !pCSS1Parser->IsBodyBackgroundSet() ) { // Hintergrundgrafik aus "BACKGROUND" aBrushItem.SetGraphicLink( INetURLObject::GetAbsURL( sBaseURL, aBackGround ) ); @@ -932,11 +932,11 @@ void SwHTMLParser::InsertBodyOptions() pCSS1Parser->SetBodyBackgroundSet(); } - if( aStyle.Len() || aDir.Len() ) + if( !aStyle.isEmpty() || !aDir.isEmpty() ) { SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() ); SvxCSS1PropertyInfo aPropInfo; - String aDummy; + OUString aDummy; ParseStyleOptions( aStyle, aDummy, aDummy, aItemSet, aPropInfo, 0, &aDir ); // Ein par Attribute muessen an der Seitenvorlage gesetzt werden, @@ -986,7 +986,7 @@ void SwHTMLParser::InsertBodyOptions() pCharFmt->SetFmtAttr( SvxColorItem(aVLinkColor, RES_CHRATR_COLOR) ); pCSS1Parser->SetBodyVLinkSet(); } - if( aLang.Len() ) + if( !aLang.isEmpty() ) { LanguageType eLang = LanguageTag::convertToLanguageTypeWithFallback( aLang ); if( LANGUAGE_DONTKNOW != eLang ) @@ -1013,7 +1013,7 @@ void SwHTMLParser::InsertBodyOptions() } } - if( aId.Len() ) + if( !aId.isEmpty() ) InsertBookmark( aId ); } @@ -1032,7 +1032,7 @@ void SwHTMLParser::NewAnchor() SvxMacroTableDtor aMacroTbl; String sHRef, aName, sTarget; - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; sal_Bool bHasHRef = sal_False, bFixed = sal_False; ScriptType eDfltScriptType; @@ -1238,7 +1238,7 @@ void SwHTMLParser::EndAnchor() /* */ -void SwHTMLParser::InsertBookmark( const String& rName ) +void SwHTMLParser::InsertBookmark( const OUString& rName ) { _HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(), SfxStringItem( RES_FLTR_BOOKMARK, rName )); diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx index 110e8b0fa389..e4d6f6e44bfd 100644 --- a/sw/source/filter/html/htmlnum.cxx +++ b/sw/source/filter/html/htmlnum.cxx @@ -163,7 +163,7 @@ void SwHTMLParser::NewNumBulList( int nToken ) } // und es ggf. durch die Optionen veraendern - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; OUString aBulletSrc; sal_Int16 eVertOri = text::VertOrientation::NONE; sal_uInt16 nWidth=USHRT_MAX, nHeight=USHRT_MAX; @@ -464,7 +464,7 @@ void SwHTMLParser::EndNumBulList( int nToken ) void SwHTMLParser::NewNumBulListItem( int nToken ) { sal_uInt8 nLevel = GetNumInfo().GetLevel(); - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; sal_uInt16 nStart = HTML_LISTHEADER_ON != nToken ? GetNumInfo().GetNodeStartValue( nLevel ) : USHRT_MAX; @@ -789,7 +789,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt, { rWrt.OutNewLine(); // <OL>/<UL> in eine neue Zeile - rWrt.aBulletGrfs[i].Erase(); + rWrt.aBulletGrfs[i] = ""; OStringBuffer sOut; sOut.append('<'); const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get( i ); diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 6a68eace7b45..07a8b68fd58f 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -65,7 +65,7 @@ using namespace ::com::sun::star; void SwHTMLParser::NewDivision( int nToken ) { OUString aId, aHRef; - String aStyle, aLang, aDir; + OUString aStyle, aLang, aDir; OUString aClass; SvxAdjust eAdjust = HTML_CENTER_ON==nToken ? SVX_ADJUST_CENTER : SVX_ADJUST_END; @@ -543,7 +543,7 @@ sal_Bool SwHTMLParser::EndSections( sal_Bool bLFStripped ) void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) { OUString aId; - String aStyle, aClass, aLang, aDir; + OUString aStyle, aClass, aLang, aDir; long nWidth = 100; sal_uInt16 nCols = columnsFromCss, nGutter = 10; sal_Bool bPrcWidth = sal_True; @@ -769,7 +769,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet, _HTMLAttrContext *pCntxt, - const String& rName, + const OUString& rName, sal_uInt16 nFlags ) { RndStdIds eAnchorId = @@ -779,7 +779,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet, SwFlyFrmFmt* pFlyFmt = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(), &rItemSet ); // Ggf. den Namen setzen - if( rName.Len() ) + if( !rName.isEmpty() ) pFlyFmt->SetName( rName ); RegisterFlyFrm( pFlyFmt ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index cae27824c45e..b15a8132fa40 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -381,7 +381,7 @@ class HTMLTable OUString aId; OUString aStyle; OUString aClass; - String aDir; + OUString aDir; SdrObjects *pResizeDrawObjs;// SDR objects std::vector<sal_uInt16> *pDrawObjPrcWidths; // column of draw object and its rel. width @@ -645,7 +645,7 @@ public: const OUString& GetId() const { return aId; } const OUString& GetClass() const { return aClass; } const OUString& GetStyle() const { return aStyle; } - const String& GetDirection() const { return aDir; } + const OUString& GetDirection() const { return aDir; } void IncBoxCount() { nBoxes++; } sal_Bool IsOverflowing() const { return nBoxes > 64000; } @@ -2982,20 +2982,20 @@ xub_StrLen SwHTMLParser::StripTrailingLF() } SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, - const String& rImageURL, - const String& rStyle, - const String& rId, - const String& rClass ) + const OUString& rImageURL, + const OUString& rStyle, + const OUString& rId, + const OUString& rClass ) { SvxBrushItem *pBrushItem = 0; - if( rStyle.Len() || rId.Len() || rClass.Len() ) + if( !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() ) { SfxItemSet aItemSet( pDoc->GetAttrPool(), RES_BACKGROUND, RES_BACKGROUND ); SvxCSS1PropertyInfo aPropInfo; - if( rClass.Len() ) + if( !rClass.isEmpty() ) { OUString aClass( rClass ); SwCSS1Parser::GetScriptFromClass( aClass ); @@ -3004,7 +3004,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, aItemSet.Put( pClass->GetItemSet() ); } - if( rId.Len() ) + if( !rId.isEmpty() ) { const SvxCSS1MapEntry *pId = pCSS1Parser->GetId( rId ); if( pId ) @@ -3020,14 +3020,14 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor, } } - if( !pBrushItem && (pColor || rImageURL.Len()) ) + if( !pBrushItem && (pColor || !rImageURL.isEmpty()) ) { pBrushItem = new SvxBrushItem(RES_BACKGROUND); if( pColor ) pBrushItem->SetColor(*pColor); - if( rImageURL.Len() ) + if( !rImageURL.isEmpty() ) { pBrushItem->SetGraphicLink( URIHelper::SmartRel2Abs( INetURLObject(sBaseURL), rImageURL, Link(), false) ); pBrushItem->SetGraphicPos( GPOS_TILED ); @@ -3119,7 +3119,7 @@ void _SectionSaveStruct::Restore( SwHTMLParser& rParser ) class _CellSaveStruct : public _SectionSaveStruct { - String aStyle, aId, aClass, aLang, aDir; + OUString aStyle, aId, aClass, aLang, aDir; String aBGImage; Color aBGColor; boost::shared_ptr<SvxBoxItem> m_pBoxItem; @@ -3269,7 +3269,7 @@ _CellSaveStruct::_CellSaveStruct( SwHTMLParser& rParser, HTMLTable *pCurTable, } } - if( aId.Len() ) + if( !aId.isEmpty() ) rParser.InsertBookmark( aId ); } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 799ca384e903..b750e438b809 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1901,7 +1901,7 @@ void SwHTMLParser::NextToken( int nToken ) const HTMLOption& rOption = rHTMLOptions[--i]; if( HTML_O_DIR == rOption.GetToken() ) { - const String& rDir = rOption.GetString(); + const OUString& rDir = rOption.GetString(); SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() ); SvxCSS1PropertyInfo aPropInfo; @@ -3424,7 +3424,7 @@ void SwHTMLParser::InsertAttrs( _HTMLAttrs& rAttrs ) void SwHTMLParser::NewStdAttr( int nToken ) { - String aId, aStyle, aLang, aDir; + OUString aId, aStyle, aLang, aDir; OUString aClass; const HTMLOptions& rHTMLOptions = GetOptions(); @@ -3478,7 +3478,7 @@ void SwHTMLParser::NewStdAttr( int nToken, _HTMLAttr **ppAttr2, const SfxPoolItem *pItem2, _HTMLAttr **ppAttr3, const SfxPoolItem *pItem3 ) { - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -3558,7 +3558,7 @@ void SwHTMLParser::EndTag( int nToken ) void SwHTMLParser::NewBasefontAttr() { - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; sal_uInt16 nSize = 3; const HTMLOptions& rHTMLOptions = GetOptions(); @@ -3656,7 +3656,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) ? (aFontStack[aFontStack.size()-1] & FONTSIZE_MASK) : nBaseSize ); - String aFace, aId, aStyle, aClass, aLang, aDir; + OUString aFace, aId, aStyle, aClass, aLang, aDir; Color aColor; sal_uLong nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe sal_uInt16 nSize = 0; // Fontgroesse in Netscape-Notation (1-7) @@ -3756,7 +3756,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) FontPitch ePitch = PITCH_DONTKNOW; // falls nicht gefunden rtl_TextEncoding eEnc = osl_getThreadTextEncoding(); - if( aFace.Len() && !pCSS1Parser->IsIgnoreFontFamily() ) + if( !aFace.isEmpty() && !pCSS1Parser->IsIgnoreFontFamily() ) { const FontList *pFList = 0; SwDocShell *pDocSh = pDoc->GetDocShell(); @@ -3772,7 +3772,7 @@ void SwHTMLParser::NewFontAttr( int nToken ) sal_Int32 nStrPos = 0; while( nStrPos!= -1 ) { - String aFName = aFace.GetToken( 0, ',', nStrPos ); + String aFName = aFace.getToken( 0, ',', nStrPos ); aFName = comphelper::string::strip(aFName, ' '); if( aFName.Len() ) { @@ -3882,7 +3882,7 @@ void SwHTMLParser::NewPara() AddParSpace(); eParaAdjust = SVX_ADJUST_END; - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -3913,7 +3913,7 @@ void SwHTMLParser::NewPara() // einen neuen Kontext anlegen _HTMLAttrContext *pCntxt = - aClass.Len() ? new _HTMLAttrContext( HTML_PARABREAK_ON, + !aClass.isEmpty() ? new _HTMLAttrContext( HTML_PARABREAK_ON, RES_POOLCOLL_TEXT, aClass ) : new _HTMLAttrContext( HTML_PARABREAK_ON ); @@ -3926,7 +3926,7 @@ void SwHTMLParser::NewPara() if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) ) { - OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ), + OSL_ENSURE( aClass.isEmpty() || !pCSS1Parser->GetClass( aClass ), "Class wird nicht beruecksichtigt" ); DoPositioning( aItemSet, aPropInfo, pCntxt ); InsertAttrs( aItemSet, aPropInfo, pCntxt ); @@ -3940,7 +3940,7 @@ void SwHTMLParser::NewPara() PushContext( pCntxt ); // die aktuelle Vorlage oder deren Attribute setzen - SetTxtCollAttrs( aClass.Len() ? pCntxt : 0 ); + SetTxtCollAttrs( !aClass.isEmpty() ? pCntxt : 0 ); // Laufbalkenanzeige ShowStatline(); @@ -4002,7 +4002,7 @@ void SwHTMLParser::NewHeading( int nToken ) { eParaAdjust = SVX_ADJUST_END; - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -4061,7 +4061,7 @@ void SwHTMLParser::NewHeading( int nToken ) if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) ) { - OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ), + OSL_ENSURE( aClass.isEmpty() || !pCSS1Parser->GetClass( aClass ), "Class wird nicht beruecksichtigt" ); DoPositioning( aItemSet, aPropInfo, pCntxt ); InsertAttrs( aItemSet, aPropInfo, pCntxt ); @@ -4127,7 +4127,7 @@ void SwHTMLParser::EndHeading() void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) { - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -4195,7 +4195,7 @@ void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl ) if( ParseStyleOptions( aStyle, aId, aEmptyStr, aItemSet, aPropInfo, &aLang, &aDir ) ) { - OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ), + OSL_ENSURE( aClass.isEmpty() || !pCSS1Parser->GetClass( aClass ), "Class wird nicht beruecksichtigt" ); DoPositioning( aItemSet, aPropInfo, pCntxt ); InsertAttrs( aItemSet, aPropInfo, pCntxt ); @@ -4255,7 +4255,7 @@ void SwHTMLParser::EndTxtFmtColl( int nToken ) void SwHTMLParser::NewDefList() { - String aId, aStyle, aClass, aLang, aDir; + OUString aId, aStyle, aClass, aLang, aDir; const HTMLOptions& rHTMLOptions = GetOptions(); for (size_t i = rHTMLOptions.size(); i; ) @@ -4554,7 +4554,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0; - const OUString& rTopClass = pContext ? pContext->GetClass() : aEmptyStr; + const OUString& rTopClass = pContext ? pContext->GetClass() : aEmptyOUStr; sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT; sal_Bool bInPRE=sal_False; // etwas Kontext Info @@ -4775,7 +4775,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext ) void SwHTMLParser::NewCharFmt( int nToken ) { - String aId, aStyle, aLang, aDir; + OUString aId, aStyle, aLang, aDir; OUString aClass; const HTMLOptions& rHTMLOptions = GetOptions(); diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index f345fa6a216b..e574f30cc203 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -196,7 +196,7 @@ class _HTMLAttrContext { _HTMLAttrs aAttrs; // die in dem Kontext gestarteten Attribute - String aClass; // die Klasse des Kontexts + OUString aClass; // die Klasse des Kontexts _HTMLAttrContext_SaveDoc *pSaveDocContext; SfxItemSet *pFrmItemSet; @@ -227,7 +227,7 @@ class _HTMLAttrContext public: void ClearSaveDocContext(); - _HTMLAttrContext( sal_uInt16 nTokn, sal_uInt16 nPoolId, const String& rClass, + _HTMLAttrContext( sal_uInt16 nTokn, sal_uInt16 nPoolId, const OUString& rClass, sal_Bool bDfltColl=sal_False ) : aClass( rClass ), pSaveDocContext( 0 ), @@ -280,7 +280,7 @@ public: sal_uInt16 GetTxtFmtColl() const { return bDfltTxtFmtColl ? 0 : nTxtFmtColl; } sal_uInt16 GetDfltTxtFmtColl() const { return bDfltTxtFmtColl ? nTxtFmtColl : 0; } - const String& GetClass() const { return aClass; } + const OUString& GetClass() const { return aClass; } inline void SetMargins( sal_uInt16 nLeft, sal_uInt16 nRight, short nIndent ); @@ -593,7 +593,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient // Fly-Frames einfuegen/verlassen void InsertFlyFrame( const SfxItemSet& rItemSet, _HTMLAttrContext *pCntxt, - const String& rId, sal_uInt16 nFlags ); + const OUString& rId, sal_uInt16 nFlags ); void SaveDocContext( _HTMLAttrContext *pCntxt, sal_uInt16 nFlags, const SwPosition *pNewPos ); @@ -732,11 +732,11 @@ private: void EndAnchor(); // eine ::com::sun::star::text::Bookmark einfuegen - void InsertBookmark( const String& rName ); + void InsertBookmark( const OUString& rName ); void InsertCommentText( const sal_Char *pTag = 0 ); - void InsertComment( const String& rName, const sal_Char *pTag = 0 ); + void InsertComment( const OUString& rName, const sal_Char *pTag = 0 ); // sind im aktuellen Absatz ::com::sun::star::text::Bookmarks vorhanden? sal_Bool HasCurrentParaBookmarks( sal_Bool bIgnoreStack=sal_False ) const; @@ -755,7 +755,7 @@ private: ScriptType eScrType, const OUString& rScrType ); // ein Event an ein VC-Control anhaengen (htmlform.cxx) - void InsertBasicCtrlEvent( sal_uInt16 nEvent, const String& rName ); + void InsertBasicCtrlEvent( sal_uInt16 nEvent, const OUString& rName ); // Inserting styles @@ -763,13 +763,13 @@ private: void NewStyle(); void EndStyle(); - inline sal_Bool HasStyleOptions( const String &rStyle, const String &rId, - const String &rClass, const String *pLang=0, - const String *pDir=0 ); - sal_Bool ParseStyleOptions( const String &rStyle, const String &rId, - const String &rClass, SfxItemSet &rItemSet, + inline sal_Bool HasStyleOptions( const OUString &rStyle, const OUString &rId, + const OUString &rClass, const OUString *pLang=0, + const OUString *pDir=0 ); + sal_Bool ParseStyleOptions( const OUString &rStyle, const OUString &rId, + const OUString &rClass, SfxItemSet &rItemSet, SvxCSS1PropertyInfo &rPropInfo, - const String *pLang=0, const String *pDir=0 ); + const OUString *pLang=0, const OUString *pDir=0 ); // Inserting Controls and ::com::sun::star::form::Forms (htmlform.cxx) @@ -852,7 +852,7 @@ private: void ParseMoreMetaOptions(); - sal_Bool FileDownload( const String& rURL, OUString& rStr ); + sal_Bool FileDownload( const OUString& rURL, OUString& rStr ); void InsertLink(); void InsertIDOption(); @@ -880,10 +880,10 @@ public: // used in tables // Create brush item (with new) or 0 SvxBrushItem* CreateBrushItem( const Color *pColor, - const String &rImageURL, - const String &rStyle, - const String &rId, - const String &rClass ); + const OUString &rImageURL, + const OUString &rStyle, + const OUString &rId, + const OUString &rClass ); protected: // Executed for each token recognized by CallParser @@ -980,14 +980,14 @@ inline void _HTMLAttrContext::GetULSpace( sal_uInt16& rUpper, } } -inline sal_Bool SwHTMLParser::HasStyleOptions( const String &rStyle, - const String &rId, - const String &rClass, - const String *pLang, - const String *pDir ) +inline sal_Bool SwHTMLParser::HasStyleOptions( const OUString &rStyle, + const OUString &rId, + const OUString &rClass, + const OUString *pLang, + const OUString *pDir ) { - return rStyle.Len() || rId.Len() || rClass.Len() || - (pLang && pLang->Len()) || (pDir && pDir->Len()); + return !rStyle.isEmpty() || !rId.isEmpty() || !rClass.isEmpty() || + (pLang && !pLang->isEmpty()) || (pDir && !pDir->isEmpty()); } inline const _HTMLAttrContext *SwHTMLParser::GetTopContext() const diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 612400fc56d3..b1abdafd25de 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -83,7 +83,7 @@ static sal_Char sIndentTabs[MAX_INDENT_LEVEL+2] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; -SwHTMLWriter::SwHTMLWriter( const String& rBaseURL ) +SwHTMLWriter::SwHTMLWriter( const OUString& rBaseURL ) : bCfgOutStyles( sal_False ) , bCfgPreferStyles( sal_False ) , bCfgFormFeed( sal_False ) @@ -428,7 +428,7 @@ sal_uLong SwHTMLWriter::WriteStream() ClearNextNumInfo(); for( i=0; i<MAXLEVEL; i++ ) - aBulletGrfs[i].Erase(); + aBulletGrfs[i] = ""; aNonConvertableCharacters = ""; @@ -1010,7 +1010,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs ) return pPageDesc; } -void SwHTMLWriter::OutAnchor( const String& rName ) +void SwHTMLWriter::OutAnchor( const OUString& rName ) { OStringBuffer sOut; sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_anchor).append(' ') @@ -1060,10 +1060,10 @@ void SwHTMLWriter::OutBookmarks() } } -void SwHTMLWriter::OutImplicitMark( const String& rMark, +void SwHTMLWriter::OutImplicitMark( const OUString& rMark, const sal_Char *pMarkType ) { - if( rMark.Len() && !aImplicitMarks.empty() ) + if( !rMark.isEmpty() && !aImplicitMarks.empty() ) { OUString sMark( rMark ); sMark + OUString(cMarkSeparator) + OUString::createFromAscii(pMarkType); @@ -1074,7 +1074,7 @@ void SwHTMLWriter::OutImplicitMark( const String& rMark, } } -void SwHTMLWriter::OutHyperlinkHRefValue( const String& rURL ) +void SwHTMLWriter::OutHyperlinkHRefValue( const OUString& rURL ) { OUString sURL( rURL ); sal_Int32 nPos = sURL.lastIndexOf( cMarkSeparator ); diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx index e58939db2446..bd6a826b3770 100644 --- a/sw/source/filter/html/wrthtml.hxx +++ b/sw/source/filter/html/wrthtml.hxx @@ -276,19 +276,19 @@ class SwHTMLWriter : public Writer const SwPageDesc *MakeHeader( sal_uInt16& rHeaderAtrs ); void GetControls(); - void AddLinkTarget( const String& rURL ); + void AddLinkTarget( const OUString& rURL ); void CollectLinkTargets(); protected: sal_uLong WriteStream(); public: - std::vector<String> aImgMapNames; // geschriebene Image Maps - std::set<String> aImplicitMarks;// implizite Stprungmarken - std::set<String> aNumRuleNames;// Names of exported num rules - std::set<String> aScriptParaStyles;// script dependent para styles + std::vector<OUString> aImgMapNames; // geschriebene Image Maps + std::set<OUString> aImplicitMarks;// implizite Stprungmarken + std::set<OUString> aNumRuleNames;// Names of exported num rules + std::set<OUString> aScriptParaStyles;// script dependent para styles std::set<OUString> aScriptTextStyles;// script dependent text styles - boost::ptr_vector<String> aOutlineMarks; + std::vector<OUString> aOutlineMarks; std::vector<sal_uInt32> aOutlineMarkPoss; HTMLControls aHTMLControls; // die zu schreibenden ::com::sun::star::form::Forms SwHTMLFmtInfos aChrFmtInfos; @@ -296,9 +296,9 @@ public: INetFmts aINetFmts; // die "offenen" INet-Attribute SwHTMLTxtFtns *pFootEndNotes; - String aCSS1Selector; // der Selektor eines Styles + OUString aCSS1Selector; // der Selektor eines Styles OUString aNonConvertableCharacters; - String aBulletGrfs[MAXLEVEL]; // die Grafiken fuer Listen + OUString aBulletGrfs[MAXLEVEL]; // die Grafiken fuer Listen ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexContainer > *pxFormComps; // die aktuelle Form @@ -394,16 +394,16 @@ public: sal_Bool bCfgNetscape4 : 1; // Netscape4 Hacks // 23 - SwHTMLWriter( const String& rBaseURL ); + SwHTMLWriter( const OUString& rBaseURL ); virtual ~SwHTMLWriter(); void Out_SwDoc( SwPaM* ); // schreibe den makierten Bereich // gebe alle an in aktuellen Ansatz stehenden ::com::sun::star::text::Bookmarks aus - void OutAnchor( const String& rName ); + void OutAnchor( const OUString& rName ); void OutBookmarks(); - void OutImplicitMark( const String& rMark, const sal_Char *pMarkType ); - void OutHyperlinkHRefValue( const String& rURL ); + void OutImplicitMark( const OUString& rMark, const sal_Char *pMarkType ); + void OutHyperlinkHRefValue( const OUString& rURL ); // gebe die evt. an der akt. Position stehenden FlyFrame aus. sal_Bool OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx, @@ -425,8 +425,8 @@ public: void OutFootEndNoteInfo(); void OutFootEndNotes(); - String GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ); - void OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, const String& rNum, + OUString GetFootEndNoteSym( const SwFmtFtn& rFmtFtn ); + void OutFootEndNoteSym( const SwFmtFtn& rFmtFtn, const OUString& rNum, sal_uInt16 nScript ); void OutBasic(); @@ -461,7 +461,7 @@ public: // ALT/ALIGN/WIDTH/HEIGHT/HSPACE/VSPACE-Optionen des aktuellen // Frame-Formats ausgeben und ggf. ein <BR CLEAR=...> vorne an // rEndTags anhaengen - OString OutFrmFmtOptions( const SwFrmFmt& rFrmFmt, const String& rAltTxt, + OString OutFrmFmtOptions( const SwFrmFmt& rFrmFmt, const OUString& rAltTxt, sal_uInt32 nFrmOpts, const OString& rEndTags = OString() ); void OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt ); void OutCSS1_TableCellBorderHack(const SwFrmFmt& rFrmFmt); |