diff options
Diffstat (limited to 'sw')
123 files changed, 344 insertions, 379 deletions
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx index 28b4facb981e..415cb3055b60 100644 --- a/sw/inc/format.hxx +++ b/sw/inc/format.hxx @@ -329,8 +329,7 @@ inline const SfxPoolItem& SwFmt::GetFmtAttr( sal_uInt16 nWhich, inline void SwFmt::SetName( const sal_Char* pNewName, sal_Bool bBroadcast ) { - String aTmp( String::CreateFromAscii( pNewName ) ); - SetName( aTmp, bBroadcast ); + SetName(rtl::OUString::createFromAscii(pNewName), bBroadcast); } inline SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent, diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 1b86c326c89c..66533c6e3231 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1633,14 +1633,14 @@ SwAccessibleTableColHeaders::SwAccessibleTableColHeaders( SwAccessibleMap *pMap2 OUStringBuffer aBuffer( rName.Len() + 15 + 6 ); aBuffer.append( OUString(rName) ); - aBuffer.append( String::CreateFromAscii("-ColumnHeaders-") ); + aBuffer.append( rtl::OUString("-ColumnHeaders-") ); aBuffer.append( static_cast<sal_Int32>( pTabFrm->GetPhyPageNum() ) ); SetName( aBuffer.makeStringAndClear() ); OUStringBuffer aBuffer2( rName.Len() + 14 ); aBuffer2.append( OUString(rName) ); - aBuffer2.append( String::CreateFromAscii("-ColumnHeaders") ); + aBuffer2.append( rtl::OUString("-ColumnHeaders") ); OUString sArg1( aBuffer2.makeStringAndClear() ); OUString sArg2( GetFormattedPageNumber() ); diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 3f9f6e4783cb..78cf03adcb98 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -393,7 +393,7 @@ SwDoc::SwDoc() _InitFieldTypes(); // Create a default OutlineNumRule (for Filters) - pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ), + pOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), // #i89178# numfunc::GetDefaultPositionAndSpaceMode(), OUTLINE_RULE ); @@ -825,7 +825,7 @@ void SwDoc::ClearDoc() InitTOXTypes(); // create a dummy pagedesc for the layout - sal_uInt16 nDummyPgDsc = MakePageDesc( String::CreateFromAscii( "?DUMMY?" )); + sal_uInt16 nDummyPgDsc = MakePageDesc(rtl::OUString("?DUMMY?")); SwPageDesc* pDummyPgDsc = aPageDescs[ nDummyPgDsc ]; SwNodeIndex aSttIdx( *GetNodes().GetEndOfContent().StartOfSectionNode(), 1 ); @@ -853,7 +853,7 @@ void SwDoc::ClearDoc() delete pNumRule; pNumRuleTbl->clear(); // creation of new outline numbering rule - pOutlineRule = new SwNumRule( String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ), + pOutlineRule = new SwNumRule( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), // #i89178# numfunc::GetDefaultPositionAndSpaceMode(), OUTLINE_RULE ); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index dcb9b1a69446..a264f7bd9b11 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -113,7 +113,7 @@ void SwDoc::SetOutlineNumRule( const SwNumRule& rRule ) } pOutlineRule->SetRuleType( OUTLINE_RULE ); - pOutlineRule->SetName( String::CreateFromAscii( + pOutlineRule->SetName( rtl::OUString::createFromAscii( SwNumRule::GetOutlineRuleName() ), *this); @@ -2605,7 +2605,7 @@ namespace listfunc const String CreateUniqueListId( const SwDoc& rDoc ) { // #i92478# - String aNewListId = String::CreateFromAscii( "list" ); + String aNewListId = rtl::OUString("list"); sal_Int64 n = Time( Time::SYSTEM ).GetTime(); n += Date( Date::SYSTEM ).GetDate(); n += rand(); diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index e781cc80b9a1..939c4472ab93 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -804,7 +804,7 @@ String SwNumRule::MakeRefNumString( const SwNodeNum& rNodeNum, } else if ( aRefNumStr.Len() > 0 ) { - aRefNumStr.Insert( String::CreateFromAscii(" "), 0 ); + aRefNumStr.Insert( rtl::OUString(" "), 0 ); bOldHadPrefix = true; } @@ -1174,7 +1174,7 @@ namespace numfunc SwDefBulletConfig::SwDefBulletConfig() : ConfigItem( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office.Writer/Numbering/DefaultBulletList")) ), // default bullet font is now OpenSymbol - msFontname( String::CreateFromAscii("OpenSymbol") ), + msFontname( rtl::OUString("OpenSymbol") ), mbUserDefinedFontname( false ), meFontWeight( WEIGHT_DONTKNOW ), meFontItalic( ITALIC_NONE ), @@ -1195,7 +1195,7 @@ namespace numfunc void SwDefBulletConfig::SetToDefault() { - msFontname = String::CreateFromAscii("OpenSymbol"); + msFontname = rtl::OUString("OpenSymbol"); mbUserDefinedFontname = false; meFontWeight = WEIGHT_DONTKNOW; meFontItalic = ITALIC_NONE; diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 3e4ddc2e0a27..a4b3acd37eba 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -4196,9 +4196,8 @@ void SwDoc::ClearLineNumAttrs( SwPosition & rPos ) aRegH.RegisterInModify( pTxtNode , *pTxtNode ); if ( pUndo ) pUndo->AddNode( *pTxtNode , sal_False ); - String aStyle = String::CreateFromAscii(""); SfxStringItem * pNewItem = (SfxStringItem*)pFmtItem->Clone(); - pNewItem->SetValue( aStyle ); + pNewItem->SetValue(rtl::OUString()); rSet.Put( *pNewItem ); pTxtNode->SetAttr( rSet ); delete pNewItem; diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index d94e417d7772..854995816a11 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1265,7 +1265,7 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh, const SfxFilter* pSfxFlt = 0; if( !pMed->GetError() ) { - String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName())); + String sFactory(rtl::OUString::createFromAscii(SwDocShell::Factory().GetShortName())); SfxFilterMatcher aMatcher( sFactory ); // kein Filter, dann suche ihn. Ansonsten teste, ob der angegebene @@ -1539,15 +1539,6 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh, STREAM_READ ); aStrm.Seek( 0 ); -#if OSL_DEBUG_LEVEL > 1 - { - SvFileStream aDeb( String::CreateFromAscii( - "file:///d|/temp/update.txt" ), STREAM_WRITE ); - aDeb << aStrm; - } - aStrm.Seek( 0 ); -#endif - // TODO/MBA: it's impossible to set a BaseURL here! SwReader aTmpReader( aStrm, aEmptyStr, pDoc->GetDocShell()->GetMedium()->GetBaseURL(), *pPam ); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 91d32a80c31f..6ba3a935642a 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -296,8 +296,7 @@ sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk ) #if defined(UNX) rBuf += '\012'; #else - rBuf += String::CreateFromAscii( - RTL_CONSTASCII_STRINGPARAM( "\015\012" )); + rBuf += rtl::OUString("\015\012"); #endif } } @@ -310,7 +309,7 @@ sal_Bool SwEditShell::GetSelectedText( String &rBuf, int nHndlParaBrk ) aStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); #endif WriterRef xWrt; - SwReaderWriter::GetWriter( String::CreateFromAscii( FILTER_TEXT ), String(), xWrt ); + SwReaderWriter::GetWriter( rtl::OUString(FILTER_TEXT), String(), xWrt ); if( xWrt.Is() ) { // Selektierte Bereiche in ein ASCII Dokument schreiben diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index b146f55a2c66..8df55373e57f 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1128,12 +1128,12 @@ String SwDocInfoField::Expand() const { String sText(aDuration.Negative ? '-' : '+'); sText += ViewShell::GetShellRes()->sDurationFormat; - sText.SearchAndReplace(String::CreateFromAscii( "%1"), String::CreateFromInt32( aDuration.Years ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%2"), String::CreateFromInt32( aDuration.Months ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%3"), String::CreateFromInt32( aDuration.Days ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%4"), String::CreateFromInt32( aDuration.Hours ) ); - sText.SearchAndReplace(String::CreateFromAscii( "%5"), String::CreateFromInt32( aDuration.Minutes) ); - sText.SearchAndReplace(String::CreateFromAscii( "%6"), String::CreateFromInt32( aDuration.Seconds) ); + sText.SearchAndReplace(rtl::OUString("%1"), String::CreateFromInt32( aDuration.Years ) ); + sText.SearchAndReplace(rtl::OUString("%2"), String::CreateFromInt32( aDuration.Months ) ); + sText.SearchAndReplace(rtl::OUString("%3"), String::CreateFromInt32( aDuration.Days ) ); + sText.SearchAndReplace(rtl::OUString("%4"), String::CreateFromInt32( aDuration.Hours ) ); + sText.SearchAndReplace(rtl::OUString("%5"), String::CreateFromInt32( aDuration.Minutes) ); + sText.SearchAndReplace(rtl::OUString("%6"), String::CreateFromInt32( aDuration.Seconds) ); sVal = sText; } else diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 9afe6075568d..ba2754c6d208 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -506,7 +506,7 @@ SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const String& rName, sal_uInt1 : SwValueFieldType( pDc, RES_SETEXPFLD ), sName( rName ), pOutlChgNd( 0 ), - sDelim( String::CreateFromAscii( "." ) ), + sDelim( rtl::OUString(".") ), nType(nTyp), nLevel( UCHAR_MAX ), bDeleted( sal_False ) { @@ -684,10 +684,9 @@ bool SwSetExpFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId ) { String sTmp; if( ::GetString( rAny, sTmp ).Len() ) -// SetDelimiter( sTmp.GetChar( 0 )); SetDelimiter( sTmp ); else - SetDelimiter(String::CreateFromAscii( " ")); + SetDelimiter(rtl::OUString(" ")); } break; case FIELD_PROP_SHORT1: diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 843dff9bcfcf..57c0c97818b3 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -2362,7 +2362,7 @@ sal_Bool SwFEShell::GetAutoSum( String& rFml ) const if( !pTab ) return sal_False; - rFml = String::CreateFromAscii( sCalc_Sum ); + rFml = rtl::OUString::createFromAscii( sCalc_Sum ); SwCellFrms aCells; if( ::GetAutoSumSel( *this, aCells )) diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6eb1abe8d5e1..2654eaf58ebe 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -559,14 +559,14 @@ void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetTxt().GetChar(rInf.GetIdx())) { rInf.DrawBackBrush( *this ); - const XubString aTxt = XubString::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDEND); - rInf.DrawText( aTxt, *this, 0, aTxt.Len(), false ); + const rtl::OUString aTxt(CH_TXT_ATR_SUBST_FIELDEND); + rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false ); } else if (rInf.OnWin() && 1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetTxt().GetChar(rInf.GetIdx())) { rInf.DrawBackBrush( *this ); - const XubString aTxt = XubString::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDSTART); - rInf.DrawText( aTxt, *this, 0, aTxt.Len(), false ); + const rtl::OUString aTxt(CH_TXT_ATR_SUBST_FIELDSTART); + rInf.DrawText( aTxt, *this, 0, aTxt.getLength(), false ); } else if( GetLen() ) { diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index c802c3aaee82..ff7f3070ae11 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -130,10 +130,10 @@ SwFormTokens lcl_GetAuthPattern(sal_uInt16 nTypeId) aStartToken.nAuthorityField = AUTH_FIELD_IDENTIFIER; aRet.push_back( aStartToken ); SwFormToken aSeparatorToken( TOKEN_TEXT ); - aSeparatorToken.sText = String::CreateFromAscii( ": " ); + aSeparatorToken.sText = rtl::OUString(": "); aRet.push_back( aSeparatorToken ); SwFormToken aTextToken( TOKEN_TEXT ); - aTextToken.sText = String::CreateFromAscii( ", " ); + aTextToken.sText = rtl::OUString(", "); for(sal_uInt16 i = 0; i < 5 ; i++) { diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a27754494e5e..9848b60c04b8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3409,8 +3409,7 @@ namespace { rTxtNode.RemoveFromList(); // If new list style is the outline style, apply outline // level as the list level. - if ( sNumRule == - String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) ) + if ( sNumRule.EqualsAscii(SwNumRule::GetOutlineRuleName()) ) { // #i70748# OSL_ENSURE( rTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle(), @@ -4656,8 +4655,8 @@ namespace { // If paragraph has no list level attribute set and list style // is the outline style, apply outline level as the list level. if ( !mrTxtNode.HasAttrListLevel() && - mrTxtNode.GetNumRule()->GetName() == - String::CreateFromAscii( SwNumRule::GetOutlineRuleName() ) && + mrTxtNode.GetNumRule()->GetName().EqualsAscii( + SwNumRule::GetOutlineRuleName()) && mrTxtNode.GetTxtColl()->IsAssignedToListLevelOfOutlineStyle() ) { int nNewListLevel = mrTxtNode.GetTxtColl()->GetAssignedOutlineStyleLevel(); diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index f5e4b16fee26..56f9b33798e7 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -806,10 +806,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) { xub_StrLen nOldIdx(rInf.GetIdx()); xub_StrLen nOldLen(rInf.GetLen()); - String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDSTART); + rtl::OUString aNewText(CH_TXT_ATR_SUBST_FIELDSTART); rInf.SetText( aNewText ); rInf.SetIdx( 0 ); - rInf.SetLen( aNewText.Len() ); + rInf.SetLen( aNewText.getLength() ); aTxtSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); @@ -818,10 +818,10 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) { xub_StrLen nOldIdx(rInf.GetIdx()); xub_StrLen nOldLen(rInf.GetLen()); - String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDEND); + rtl::OUString aNewText(CH_TXT_ATR_SUBST_FIELDEND); rInf.SetText( aNewText ); rInf.SetIdx( 0 ); - rInf.SetLen( aNewText.Len() ); + rInf.SetLen( aNewText.getLength() ); aTxtSize = pLastFont->GetTextSize( rInf ); rInf.SetIdx( nOldIdx ); rInf.SetLen( nOldLen ); diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index f27ca9634826..df04bca69077 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -2184,12 +2184,12 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel( String aNew; if (bUseCol) { - aRplc = String::CreateFromAscii( "%COLUMNLETTER" ); + aRplc = rtl::OUString("%COLUMNLETTER"); aNew = rtl::OUString(aCellName.GetBuffer(), pBuf - aCellName.GetBuffer()); } else { - aRplc = String::CreateFromAscii( "%ROWNUMBER" ); + aRplc = rtl::OUString("%ROWNUMBER"); aNew = rtl::OUString(pBuf, (aCellName.GetBuffer() + nLen) - pBuf); } xub_StrLen nPos = aTxt.Search( aRplc ); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index a2168df6c681..a37d25c9b5a2 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -191,7 +191,7 @@ void SwUnoCursorHelper::GetTextFromPam(SwPaM & rPam, OUString & rBuffer) #endif WriterRef xWrt; // TODO/MBA: looks like a BaseURL doesn't make sense here - SwReaderWriter::GetWriter( C2S(FILTER_TEXT_DLG), String(), xWrt ); + SwReaderWriter::GetWriter( rtl::OUString(FILTER_TEXT_DLG), String(), xWrt ); if( xWrt.Is() ) { SwWriter aWriter( aStream, rPam ); diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 34e2e7e5f3a7..4231b47987b2 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1013,7 +1013,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (!m_pImpl->m_bIsDescriptor) { throw uno::RuntimeException( - C2S("SwXMeta::attach(): already attached"), + rtl::OUString("SwXMeta::attach(): already attached"), static_cast< ::cppu::OWeakObject* >(this)); } @@ -1021,7 +1021,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (!xRangeTunnel.is()) { throw lang::IllegalArgumentException( - C2S("SwXMeta::attach(): argument is no XUnoTunnel"), + rtl::OUString("SwXMeta::attach(): argument is no XUnoTunnel"), static_cast< ::cppu::OWeakObject* >(this), 0); } SwXTextRange *const pRange( @@ -1031,7 +1031,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (!pRange && !pCursor) { throw lang::IllegalArgumentException( - C2S("SwXMeta::attach(): argument not supported type"), + rtl::OUString("SwXMeta::attach(): argument not supported type"), static_cast< ::cppu::OWeakObject* >(this), 0); } @@ -1040,7 +1040,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (!pDoc) { throw lang::IllegalArgumentException( - C2S("SwXMeta::attach(): argument has no SwDoc"), + rtl::OUString("SwXMeta::attach(): argument has no SwDoc"), static_cast< ::cppu::OWeakObject* >(this), 0); } @@ -1068,14 +1068,14 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) if (!bSuccess) { throw lang::IllegalArgumentException( - C2S("SwXMeta::attach(): cannot create meta: range invalid?"), + rtl::OUString("SwXMeta::attach(): cannot create meta: range invalid?"), static_cast< ::cppu::OWeakObject* >(this), 1); } if (!pTxtAttr) { OSL_FAIL("meta inserted, but has no text attribute?"); throw uno::RuntimeException( - C2S("SwXMeta::attach(): cannot create meta"), + rtl::OUString("SwXMeta::attach(): cannot create meta"), static_cast< ::cppu::OWeakObject* >(this)); } @@ -1107,7 +1107,7 @@ SwXMeta::getAnchor() throw (uno::RuntimeException) if (m_pImpl->m_bIsDescriptor) { throw uno::RuntimeException( - C2S("SwXMeta::getAnchor(): not inserted"), + rtl::OUString("SwXMeta::getAnchor(): not inserted"), static_cast< ::cppu::OWeakObject* >(this)); } @@ -1119,7 +1119,7 @@ SwXMeta::getAnchor() throw (uno::RuntimeException) if (!bSuccess) { throw lang::DisposedException( - C2S("SwXMeta::getAnchor(): not attached"), + rtl::OUString("SwXMeta::getAnchor(): not attached"), static_cast< ::cppu::OWeakObject* >(this)); } @@ -1243,7 +1243,7 @@ void SAL_CALL SwXMeta::setParent(uno::Reference< uno::XInterface > const& /*xParent*/) throw (uno::RuntimeException, lang::NoSupportException) { - throw lang::NoSupportException(C2S("setting parent not supported"), *this); + throw lang::NoSupportException(rtl::OUString("setting parent not supported"), *this); } // XElementAccess @@ -1274,7 +1274,7 @@ SwXMeta::createEnumeration() throw (uno::RuntimeException) if (m_pImpl->m_bIsDescriptor) { throw uno::RuntimeException( - C2S("createEnumeration(): not inserted"), + rtl::OUString("createEnumeration(): not inserted"), static_cast< ::cppu::OWeakObject* >(this)); } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 27064efb4d4a..8a2fbbeffe6c 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -460,13 +460,13 @@ String lcl_GetCellName( sal_Int32 nColumn, sal_Int32 nRow ) #if OSL_DEBUG_LEVEL > 0 { sal_Int32 nCol, nRow2; - lcl_GetCellPosition( String::CreateFromAscii("z1"), nCol, nRow2); + lcl_GetCellPosition( rtl::OUString("z1"), nCol, nRow2); OSL_ENSURE( nCol == 51, "lcl_GetCellPosition failed" ); - lcl_GetCellPosition( String::CreateFromAscii("AA1"), nCol, nRow2); + lcl_GetCellPosition( rtl::OUString("AA1"), nCol, nRow2); OSL_ENSURE( nCol == 52, "lcl_GetCellPosition failed" ); - lcl_GetCellPosition( String::CreateFromAscii("AB1"), nCol, nRow2); + lcl_GetCellPosition( rtl::OUString("AB1"), nCol, nRow2); OSL_ENSURE( nCol == 53, "lcl_GetCellPosition failed" ); - lcl_GetCellPosition( String::CreateFromAscii("BB1"), nCol, nRow2); + lcl_GetCellPosition( rtl::OUString("BB1"), nCol, nRow2); OSL_ENSURE( nCol == 105, "lcl_GetCellPosition failed" ); } #endif diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 2a06f9614d7c..3808519ba943 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -744,7 +744,7 @@ String NameFromCharSet(rtl_TextEncoding nChrSet) OSL_ENSURE(pRet != pStart->pName, "TXT: That was an unknown language!"); - return String::CreateFromAscii(pRet); + return rtl::OUString::createFromAscii(pRet); } // for the automatic conversion (mail/news/...) diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index f45b4b0991e7..6c211f8e8bc7 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -101,12 +101,12 @@ const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, sal_uLong nLen_, const String SwIoSystem::GetSubStorageName( const SfxFilter& rFltr ) { /* bei den StorageFiltern noch den SubStorageNamen setzen */ - const String& rUserData = rFltr.GetUserData(); - if( rUserData.EqualsAscii(FILTER_XML) || - rUserData.EqualsAscii(FILTER_XMLV) || - rUserData.EqualsAscii(FILTER_XMLVW) ) + const rtl::OUString& rUserData = rFltr.GetUserData(); + if (rUserData == FILTER_XML || + rUserData == FILTER_XMLV || + rUserData == FILTER_XMLVW) return rtl::OUString("content.xml"); - if( rUserData.EqualsAscii(sWW6) || rUserData.EqualsAscii(FILTER_WW8) ) + if (rUserData == sWW6 || rUserData == FILTER_WW8) return rtl::OUString("WordDocument"); return rtl::OUString(); } @@ -126,7 +126,7 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm, const SfxFilter* pFilter = aIter.First(); while ( pFilter ) { - if( pFilter->GetUserData() == rFmtNm ) + if( pFilter->GetUserData().equals(rFmtNm) ) return pFilter; pFilter = aIter.Next(); } @@ -159,11 +159,8 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter { sal_uLong nStgFmtId = rStg.GetFormat(); /*#i8409# We cannot trust the clipboard id anymore :-(*/ - if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) || - rFilter.GetUserData().EqualsAscii(sWW6) ) - { + if (rFilter.GetUserData() == FILTER_WW8 || rFilter.GetUserData() == sWW6) nStgFmtId = 0; - } sal_Bool bRet = SVSTREAM_OK == rStg.GetError() && ( !nStgFmtId || rFilter.GetFormat() == nStgFmtId ) && @@ -172,12 +169,11 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter { /* Bug 53445 - es gibt Excel Docs ohne ClipBoardId! */ /* Bug 62703 - und auch WinWord Docs ohne ClipBoardId! */ - if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) || - rFilter.GetUserData().EqualsAscii(sWW6) ) + if (rFilter.GetUserData() == FILTER_WW8 || rFilter.GetUserData() == sWW6) { bRet = !((rStg.IsContained( rtl::OUString("0Table")) || rStg.IsContained( rtl::OUString("1Table"))) ^ - rFilter.GetUserData().EqualsAscii(FILTER_WW8)); + (rFilter.GetUserData() == FILTER_WW8)); if (bRet && !rFilter.IsAllowedAsTemplate()) { SotStorageStreamRef xRef = @@ -234,16 +230,16 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName, const SfxFilter* pFltr = aIter.First(); while ( pFltr ) { - if( pFltr->GetUserData() == rFmtName ) + if( pFltr->GetUserData().equals(rFmtName) ) { - const String& rUserData = pFltr->GetUserData(); - if( 'C' == *rUserData.GetBuffer() ) + const rtl::OUString& rUserData = pFltr->GetUserData(); + if( 'C' == rUserData[0] ) { if ( xStor.is() ) bRet = IsValidStgFilter( xStor, *pFltr ); else if ( xStg.Is() ) bRet = xStg.Is() && IsValidStgFilter( *xStg, *pFltr ); - bRet = bRet && (pFltr->GetUserData() == rFmtName); + bRet = bRet && (pFltr->GetUserData().equals(rFmtName)); } else if( !xStg.Is() && !xStor.is() ) { @@ -322,7 +318,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName, { while ( pFilter ) { - if( 'C' == *pFilter->GetUserData().GetBuffer() && IsValidStgFilter( xStor, *pFilter ) ) + if( 'C' == pFilter->GetUserData()[0] && IsValidStgFilter( xStor, *pFilter ) ) { if ( pFilter->IsOwnTemplateFormat() && !bLookForTemplate ) // found template filter; maybe there's a "normal" one also @@ -349,7 +345,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName, { while ( pFilter ) { - if( 'C' == *pFilter->GetUserData().GetBuffer() && IsValidStgFilter( *xStg, *pFilter ) ) + if( 'C' == pFilter->GetUserData()[0] && IsValidStgFilter( *xStg, *pFilter ) ) { if ( pFilter->IsOwnTemplateFormat() && !bLookForTemplate ) // found template filter; maybe there's a "normal" one also @@ -400,7 +396,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName, { String sEmptyUserData; pNm = aFilterDetect[n].IsReader(aBuffer, nBytesRead, rFileName, sEmptyUserData); - pFilterTmp = pNm ? SwIoSystem::GetFilterOfFormat(String::CreateFromAscii(pNm), pFCntnr) : 0; + pFilterTmp = pNm ? SwIoSystem::GetFilterOfFormat(rtl::OUString::createFromAscii(pNm), pFCntnr) : 0; if (pNm && pFilterTmp) { return pFilterTmp; @@ -565,7 +561,7 @@ const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, sal_uLong nLen { bool bAuto = IsDetectableText(pBuf, nLen); const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG; - return SwIoSystem::GetFilterOfFormat( String::CreateFromAscii(pNm), 0 ); + return SwIoSystem::GetFilterOfFormat( rtl::OUString::createFromAscii(pNm), 0 ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index e9a30e75be0c..9bf099083d96 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -302,7 +302,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp, // In STYLE-Optionen den String codieren Strm() << sOut.makeStringAndClear().getStr(); if( pVal ) - HTMLOutFuncs::Out_String( Strm(), String::CreateFromAscii(pVal), + HTMLOutFuncs::Out_String( Strm(), rtl::OUString::createFromAscii(pVal), eDestEnc, &aNonConvertableCharacters ); else if( pSVal ) HTMLOutFuncs::Out_String( Strm(), *pSVal, eDestEnc, &aNonConvertableCharacters ); @@ -3401,7 +3401,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt, if( pTempFileName ) sGrfNm = *pTempFileName; sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm, - String::CreateFromAscii("JPG"), + rtl::OUString("JPG"), XOUTBMP_USE_NATIVE_IF_POSSIBLE ); if( !nErr ) // fehlerhaft, da ist nichts auszugeben { diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 389c75718e89..42816109099f 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -132,7 +132,7 @@ sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId ) return 1 | HTML_DLCOLL_DT; } - String sDTDD( String::CreateFromAscii(OOO_STRING_SVTOOLS_HTML_dt) ); + String sDTDD( rtl::OUString(OOO_STRING_SVTOOLS_HTML_dt) ); sDTDD += ' '; if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) ) // DefinitionList - term diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 9dc4cefc6954..5f09dc911e6b 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -291,8 +291,7 @@ void SwHTMLWriter::OutBasic() const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) ); OSL_ENSURE( pModule, "Wo ist das Modul?" ); - String sLang( - String::CreateFromAscii( SVX_MACRO_LANGUAGE_STARBASIC ) ); + rtl::OUString sLang(SVX_MACRO_LANGUAGE_STARBASIC); ScriptType eType = STARBASIC; if( 0==i && 0==j ) diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 5abd02894e0a..36dfe97d31f4 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -234,7 +234,7 @@ void SwCSS1Parser::SetLinkCharFmts() OSL_ENSURE( !bLinkCharFmtsSet, "Aufruf von SetLinkCharFmts unnoetig" ); SvxCSS1MapEntry *pStyleEntry = - GetTag( String::CreateFromAscii(OOO_STRING_SVTOOLS_HTML_anchor) ); + GetTag( rtl::OUString(OOO_STRING_SVTOOLS_HTML_anchor) ); SwCharFmt *pUnvisited = 0, *pVisited = 0; if( pStyleEntry ) { @@ -250,7 +250,7 @@ void SwCSS1Parser::SetLinkCharFmts() bBodyVLinkSet |= bColorSet; } - String sTmp( String::CreateFromAscii(OOO_STRING_SVTOOLS_HTML_anchor) ); + String sTmp( rtl::OUString(OOO_STRING_SVTOOLS_HTML_anchor) ); sTmp.Append( ':' ); sTmp.AppendAscii( sCSS1_link ); pStyleEntry = GetTag( sTmp ); @@ -1204,7 +1204,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const String& rClass ) c } else { - String sCName( String::CreateFromAscii(sName) ); + String sCName( rtl::OUString::createFromAscii(sName) ); pCFmt = pDoc->FindCharFmtByName( sCName ); if( !pCFmt ) { @@ -1886,7 +1886,7 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn ) } - pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), sal_True ); + pPageEntry = GetPage( rtl::OUString::createFromAscii(sCSS1_first), sal_True ); if( pPageEntry ) { SetPageDescAttrs( GetFirstPageDesc(sal_True), pPageEntry->GetItemSet(), @@ -1894,7 +1894,7 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn ) bSetFirstPageDesc = sal_True; } - pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), sal_True ); + pPageEntry = GetPage( rtl::OUString::createFromAscii(sCSS1_right), sal_True ); if( pPageEntry ) { SetPageDescAttrs( GetRightPageDesc(sal_True), pPageEntry->GetItemSet(), @@ -1902,7 +1902,7 @@ sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn ) bSetRightPageDesc = sal_True; } - pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), sal_True ); + pPageEntry = GetPage( rtl::OUString::createFromAscii(sCSS1_left), sal_True ); if( pPageEntry ) SetPageDescAttrs( GetLeftPageDesc(sal_True), pPageEntry->GetItemSet(), pPageEntry->GetPropertyInfo() ); diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx index 9aabb328e8bd..2a9bc9425889 100644 --- a/sw/source/filter/html/htmlfly.cxx +++ b/sw/source/filter/html/htmlfly.cxx @@ -1232,7 +1232,7 @@ Writer& OutHTML_BulletImage( Writer& rWrt, if( rHTMLWrt.GetOrigFileName() ) rGrfName = *rHTMLWrt.GetOrigFileName(); sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName, - String::CreateFromAscii("JPG"), + rtl::OUString("JPG"), (XOUTBMP_USE_GIF_IF_SENSIBLE | XOUTBMP_USE_NATIVE_IF_POSSIBLE)); if( !nErr ) @@ -1569,7 +1569,7 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt, aGrfNm = *rHTMLWrt.GetOrigFileName(); if( aGrf.GetType() == GRAPHIC_NONE || XOutBitmap::WriteGraphic( aGrf, aGrfNm, - String::CreateFromAscii( "JPG" ), + rtl::OUString("JPG"), (XOUTBMP_USE_GIF_IF_POSSIBLE| XOUTBMP_USE_NATIVE_IF_POSSIBLE) ) != 0 ) { @@ -1628,7 +1628,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt, MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM )); sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm, - String::CreateFromAscii("JPG"), nFlags, &aMM100Size ); + rtl::OUString("JPG"), nFlags, &aMM100Size ); if( nErr ) // fehlerhaft, da ist nichts auszugeben { rHTMLWrt.nWarn = WARN_SWG_POOR_LOAD | WARN_SW_WRITE_BASE; diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index 9b85c922c146..b3a8af03aaf6 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -504,7 +504,7 @@ sal_uInt16 lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo, const sal_Char *pStr = SwHTMLWriter::GetNumFormat( eFmt ); if( pStr ) { - pParts[0] = String::CreateFromAscii( pStr ); + pParts[0] = rtl::OUString::createFromAscii( pStr ); nParts = 1; } } @@ -537,12 +537,12 @@ void lcl_html_outFootEndNoteInfo( Writer& rWrt, String *pParts, { xub_StrLen nPos = 0; String aTmp( pParts[i] ); - String aRep( String::CreateFromAscii("\\\\") ); + rtl::OUString aRep("\\\\"); while( STRING_NOTFOUND != (nPos = aTmp.SearchAndReplaceAscii( "\\", aRep, nPos ) ) ) nPos += 2; nPos = 0; - aRep.AssignAscii( "\\;" ); + aRep = rtl::OUString("\\;"); while( STRING_NOTFOUND != (nPos = aTmp.SearchAndReplaceAscii( ";", aRep, nPos ) ) ) nPos += 2; diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index 31f00de2d0c3..2d8f4c814c90 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1275,7 +1275,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt, aGrfNm = *pTempFileName; sal_uInt16 nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm, - String::CreateFromAscii("JPG"), + rtl::OUString("JPG"), (XOUTBMP_USE_GIF_IF_POSSIBLE | XOUTBMP_USE_NATIVE_IF_POSSIBLE) ); if( nErr ) // fehlerhaft, da ist nichts auszugeben diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 2966c2224f0c..fcdf0970c0af 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1141,7 +1141,7 @@ void SwHTMLWriter::OutBackground( const SvxBrushItem *pBrushItem, if(pTempFileName) rEmbGrfNm = *pTempFileName; sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, rEmbGrfNm, - String::CreateFromAscii( "JPG" ), + rtl::OUString("JPG"), XOUTBMP_USE_NATIVE_IF_POSSIBLE ); if( !nErr ) // fehlerhaft, da ist nichts auszugeben { diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index cdd6e638f7a9..81a7dd2a98c5 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -1180,17 +1180,17 @@ void SwRTFParser::ReadShpTxt(String& s) break; case '{': level++; - s.Append(String::CreateFromAscii("{")); + s.Append(rtl::OUString("{")); break; case '}': level--; - s.Append(String::CreateFromAscii("}")); + s.Append(rtl::OUString("}")); break; default: s.Append(aToken); if (bTokenHasValue) s.Append(rtl::OUString::valueOf(static_cast<sal_Int64>(nTokenValue))); - s.Append(String::CreateFromAscii(" ")); + s.Append(rtl::OUString(" ")); break; } } @@ -1488,7 +1488,7 @@ void SwRTFParser::ReadShapeObject() RTL_TEXTENCODING_ASCII_US)); SvMemoryStream aStream(const_cast<sal_Char*>(bs.getStr()), bs.getLength(), STREAM_READ); - rOutliner.Read(aStream, String::CreateFromAscii(""), EE_FORMAT_RTF); + rOutliner.Read(aStream, rtl::OUString(), EE_FORMAT_RTF); OutlinerParaObject* pParaObject=rOutliner.CreateParaObject(); pStroke->NbcSetOutlinerParaObject(pParaObject); rOutliner.Clear(); diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx index 287020c7ed30..b4d2e3fdc2a8 100644 --- a/sw/source/filter/ww1/fltshell.cxx +++ b/sw/source/filter/ww1/fltshell.cxx @@ -1088,7 +1088,7 @@ SwFltShell& SwFltShell::AddError( const sal_Char* pErr ) pFT = GetDoc().InsertFldType(aS); } SwSetExpField aFld( (SwSetExpFieldType*)pFT, - String::CreateFromAscii( pErr )); + rtl::OUString::createFromAscii( pErr )); //, VVF_INVISIBLE GetDoc().InsertPoolItem(*pPaM, SwFmtFld(aFld), 0); return *this; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 42b003705411..8e95869b7ebc 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -766,7 +766,7 @@ void DocxAttributeOutput::CmdField_Impl( FieldInfos& rInfos ) // Replace tabs by </instrText><tab/><instrText> if ( i < ( nNbToken - 1 ) ) - RunText( String::CreateFromAscii( "\t" ) ); + RunText( rtl::OUString( "\t" ) ); } m_pSerializer->endElementNS( XML_w, XML_r ); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index bf1b1931952b..0a946b8dba3b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -119,17 +119,17 @@ static String lcl_getFieldCode( const IFieldmark* pFieldmark ) { if ( !pFieldmark) { return String(); } else if ( pFieldmark->GetFieldname( ) == ODF_FORMTEXT ) { - return String::CreateFromAscii(" FORMTEXT "); + return rtl::OUString(" FORMTEXT "); } else if ( pFieldmark->GetFieldname( ) == ODF_FORMDROPDOWN ) { - return String::CreateFromAscii(" FORMDROPDOWN "); + return rtl::OUString(" FORMDROPDOWN "); } else if ( pFieldmark->GetFieldname( ) == ODF_FORMCHECKBOX ) { - return String::CreateFromAscii(" FORMCHECKBOX "); + return rtl::OUString(" FORMCHECKBOX "); } else if ( pFieldmark->GetFieldname( ) == ODF_TOC ) { - return String::CreateFromAscii(" TOC "); + return rtl::OUString(" TOC "); } else if ( pFieldmark->GetFieldname( ) == ODF_HYPERLINK ) { - return String::CreateFromAscii(" HYPERLINK "); + return rtl::OUString(" HYPERLINK "); } else if ( pFieldmark->GetFieldname( ) == ODF_PAGEREF ) { - return String::CreateFromAscii(" PAGEREF "); + return rtl::OUString(" PAGEREF "); } else { return pFieldmark->GetFieldname(); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 9c662da10bb9..80ec3bcc8707 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -3176,7 +3176,7 @@ void WW8Export::PrepareStorage() SvGlobalName aGName( nId1, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 ); - GetWriter().GetStorage().SetClass( aGName, 0, String::CreateFromAscii( pName )); + GetWriter().GetStorage().SetClass( aGName, 0, rtl::OUString::createFromAscii( pName )); SvStorageStreamRef xStor( GetWriter().GetStorage().OpenSotStream(sCompObj) ); xStor->Write( pData, nLen ); diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx index e45e0e6989c4..bdaded82da3a 100644 --- a/sw/source/filter/ww8/ww8glsy.cxx +++ b/sw/source/filter/ww8/ww8glsy.cxx @@ -52,7 +52,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion, if (aWwFib.nFibBack >= 0x6A) //Word97 { - xTableStream = pStg->OpenSotStream(String::CreateFromAscii( + xTableStream = pStg->OpenSotStream(rtl::OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError()) diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx index 2f3c47fcf8b5..e4e0f7d25d95 100644 --- a/sw/source/filter/ww8/ww8graf.cxx +++ b/sw/source/filter/ww8/ww8graf.cxx @@ -967,7 +967,7 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS rString = comphelper::string::remove(rString, 0x1); rString = comphelper::string::remove(rString, 0x5); rString = comphelper::string::remove(rString, 0x8); - rString.SearchAndReplaceAllAscii("\007\007", String::CreateFromAscii("\007\012")); + rString.SearchAndReplaceAllAscii("\007\007", rtl::OUString("\007\012")); rString.SearchAndReplaceAll(0x7, ' '); } diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 536b1bbcc622..e4f747b076c4 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4331,10 +4331,10 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF aBasicImporter.import( mpDocShell->GetMedium()->GetInputStream() ); lcl_createTemplateToProjectEntry( xPrjNameCache, aURL, aBasicImporter.getProjectName() ); // Read toolbars & menus - SvStorageStreamRef refMainStream = rRoot->OpenSotStream( String::CreateFromAscii( "WordDocument" )); + SvStorageStreamRef refMainStream = rRoot->OpenSotStream( rtl::OUString( "WordDocument" )); refMainStream->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); WW8Fib aWwFib( *refMainStream, 8 ); - SvStorageStreamRef xTableStream = rRoot->OpenSotStream(String::CreateFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); + SvStorageStreamRef xTableStream = rRoot->OpenSotStream(rtl::OUString::createFromAscii( aWwFib.fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); if (xTableStream.Is() && SVSTREAM_OK == xTableStream->GetError()) { @@ -4767,7 +4767,7 @@ sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream, break; } - rTableStream = pStg->OpenSotStream( String::CreateFromAscii( + rTableStream = pStg->OpenSotStream( rtl::OUString::createFromAscii( pWwFib->fWhichTblStm ? SL::a1Table : SL::a0Table), STREAM_STD_READ); @@ -5463,7 +5463,7 @@ sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuff { sal_uLong nRet = ERR_SWG_READ_ERROR; OSL_ENSURE( pStg, "wo ist mein Storage?" ); - rRef = pStg->OpenSotStream( String::CreateFromAscii( "WordDocument" ), STREAM_READ | STREAM_SHARE_DENYALL); + rRef = pStg->OpenSotStream( rtl::OUString("WordDocument"), STREAM_READ | STREAM_SHARE_DENYALL); if( rRef.Is() ) { diff --git a/sw/source/ui/app/apphdl.cxx b/sw/source/ui/app/apphdl.cxx index 0efa29160747..0049b7bc1521 100644 --- a/sw/source/ui/app/apphdl.cxx +++ b/sw/source/ui/app/apphdl.cxx @@ -207,7 +207,7 @@ SwView* lcl_LoadDoc(SwView* pView, const String& rURL) if(rURL.Len()) { SfxStringItem aURL(SID_FILE_NAME, rURL); - SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") ); + SfxStringItem aTargetFrameName( SID_TARGETNAME, rtl::OUString("_blank") ); SfxBoolItem aHidden( SID_HIDDEN, sal_True ); SfxStringItem aReferer(SID_REFERER, pView->GetDocShell()->GetTitle()); SfxObjectItem* pItem = (SfxObjectItem*)pView->GetViewFrame()->GetDispatcher()-> diff --git a/sw/source/ui/app/applab.cxx b/sw/source/ui/app/applab.cxx index 4159f1835bda..66819aaa1ed5 100644 --- a/sw/source/ui/app/applab.cxx +++ b/sw/source/ui/app/applab.cxx @@ -156,7 +156,7 @@ const SwFrmFmt *lcl_InsertLabText( SwWrtShell& rSh, const SwLabItem& rItem, String sDBName; if( (!rItem.bSynchron || !(nCol|nRow)) && (sDBName = InsertLabEnvText( rSh, rFldMgr, rItem.aWriting )).Len() && !bLast ) { - sDBName.SetToken( 3, DB_DELIM, String::CreateFromAscii("True")); + sDBName.SetToken( 3, DB_DELIM, rtl::OUString("True")); SwInsertFld_Data aData(TYP_DBNEXTSETFLD, 0, sDBName, aEmptyStr, 0, &rSh ); rFldMgr.InsertFld( aData ); } @@ -367,7 +367,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel) pSh->SetMark(); // set only the mark SwSectionData aSect(CONTENT_SECTION, - String::CreateFromAscii(MASTER_LABEL)); + rtl::OUString(MASTER_LABEL)); pSh->InsertSection(aSect); } } @@ -377,7 +377,7 @@ void SwModule::InsertLab(SfxRequest& rReq, sal_Bool bLabel) pSh->GetUniqueSectionName()); String sLinkName(sfx2::cTokenSeperator); sLinkName += sfx2::cTokenSeperator; - sLinkName += String::CreateFromAscii(MASTER_LABEL); + sLinkName += rtl::OUString(MASTER_LABEL); aSect.SetLinkFileName(sLinkName); aSect.SetProtectFlag(true); pSh->Insert(aDotStr); // Dummytext to allocate the Section diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx index 909741733987..9d51d7e6edaa 100644 --- a/sw/source/ui/app/docsh.cxx +++ b/sw/source/ui/app/docsh.cxx @@ -212,7 +212,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, pRead->SetTemplateName( pFlt->GetDefaultTemplate() ); if( pRead == ReadAscii && 0 != rMedium.GetInStream() && - pFlt->GetUserData().EqualsAscii( FILTER_TEXT_DLG ) ) + pFlt->GetUserData() == FILTER_TEXT_DLG ) { SwAsciiOptions aOpt; const SfxItemSet* pSet; @@ -411,10 +411,10 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium ) // Task 75666 - is the Document imported by our Microsoft-Filters? const SfxFilter* pOldFilter = GetMedium()->GetFilter(); if( pOldFilter && - ( pOldFilter->GetUserData().EqualsAscii( FILTER_WW8 ) || - pOldFilter->GetUserData().EqualsAscii( "CWW6" ) || - pOldFilter->GetUserData().EqualsAscii( "WW6" ) || - pOldFilter->GetUserData().EqualsAscii( "WW1" ) )) + ( pOldFilter->GetUserData() == FILTER_WW8 || + pOldFilter->GetUserData() == "CWW6" || + pOldFilter->GetUserData() == "WW6" || + pOldFilter->GetUserData() == "WW1" ) ) { // when saving it in our own fileformat, then remove the template // name from the docinfo. @@ -558,7 +558,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) if( pDoc->ContainsMSVBasic() ) { - sal_Bool bSave = pFlt->GetUserData().EqualsAscii( "CWW8" ) + sal_Bool bSave = pFlt->GetUserData() == "CWW8" && SvtFilterOptions::Get().IsLoadWordBasicStorage(); if ( bSave ) @@ -567,7 +567,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) OSL_ENSURE( !xStg->GetError(), "No storage available for storing VBA macros!" ); if ( !xStg->GetError() ) { - nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, String::CreateFromAscii("Macros") ); + nVBWarning = SaveOrDelMSVBAStorage( (SfxObjectShell&) *this, *xStg, bSave, rtl::OUString("Macros") ); xStg->Commit(); pDoc->SetContainsMSVBasic( sal_True ); } @@ -578,7 +578,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) if( pWrtShell ) pWrtShell->EndAllTblBoxEdit(); - if( pFlt->GetUserData().EqualsAscii( "HTML") ) + if( pFlt->GetUserData() == "HTML" ) { #ifndef DISABLE_SCRIPTING SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get(); @@ -621,10 +621,9 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) } if( xWriter->IsStgWriter() && - ( /*xWriter->IsSw3Writer() ||*/ - pFlt->GetUserData().EqualsAscii( FILTER_XML ) || - pFlt->GetUserData().EqualsAscii( FILTER_XMLV ) || - pFlt->GetUserData().EqualsAscii( FILTER_XMLVW ) ) ) + ( pFlt->GetUserData() == FILTER_XML || + pFlt->GetUserData() == FILTER_XMLV || + pFlt->GetUserData() == FILTER_XMLVW ) ) { // determine the own Type sal_uInt8 nMyType = 0; @@ -689,7 +688,7 @@ sal_Bool SwDocShell::ConvertTo( SfxMedium& rMedium ) return bRet; } - if( pFlt->GetUserData().EqualsAscii( FILTER_TEXT_DLG ) && + if( pFlt->GetUserData() == FILTER_TEXT_DLG && ( pWrtShell || !::lcl_GetSourceView( this ) )) { SwAsciiOptions aOpt; diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx index cb1e6f9a81fd..9f64bfae107e 100644 --- a/sw/source/ui/app/docsh2.cxx +++ b/sw/source/ui/app/docsh2.cxx @@ -798,7 +798,7 @@ void SwDocShell::Execute(SfxRequest& rReq) xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); SfxObjectFactory &rFact = GetFactory(); - SfxFilterMatcher aMatcher( String::CreateFromAscii(rFact.GetShortName()) ); + SfxFilterMatcher aMatcher( rtl::OUString::createFromAscii(rFact.GetShortName()) ); SfxFilterMatcherIter aIter( aMatcher ); uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY); const SfxFilter* pFlt = aIter.First(); @@ -807,8 +807,8 @@ void SwDocShell::Execute(SfxRequest& rReq) // --> OD #i117339# // if( pFlt && pFlt->IsAllowedAsTemplate() ) if( pFlt && pFlt->IsAllowedAsTemplate() && - ( pFlt->GetUserData().EqualsAscii("CXML") || - pFlt->GetUserData().EqualsAscii("CXMLV") ) ) + ( pFlt->GetUserData() == "CXML" || + pFlt->GetUserData() == "CXMLV" ) ) { const String sWild = pFlt->GetWildcard().getGlob(); xFltMgr->appendFilter( pFlt->GetUIName(), sWild ); @@ -818,7 +818,7 @@ void SwDocShell::Execute(SfxRequest& rReq) sal_Bool bWeb = 0 != dynamic_cast< SwWebDocShell *>( this ); const SfxFilter *pOwnFlt = SwDocShell::Factory().GetFilterContainer()-> - GetFilter4FilterName(String::CreateFromAscii("writer8")); + GetFilter4FilterName(rtl::OUString("writer8")); // make sure the default file format is also available if(bWeb) @@ -886,7 +886,7 @@ void SwDocShell::Execute(SfxRequest& rReq) // 3 - file saved in non-HTML -> QueryBox to save as HTML const SfxFilter* pHtmlFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii("HTML"), + rtl::OUString("HTML"), SwWebDocShell::Factory().GetFilterContainer() ); sal_Bool bLocalHasName = HasName(); if(bLocalHasName) @@ -1225,7 +1225,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for HTML there is only one filter!! pFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii("HTML"), + rtl::OUString("HTML"), SwWebDocShell::Factory().GetFilterContainer() ); nStrId = STR_LOAD_HTML_DOC; } @@ -1233,7 +1233,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { // for Global-documents we now only offer the current one. pFlt = SwGlobalDocShell::Factory().GetFilterContainer()-> - GetFilter4Extension( String::CreateFromAscii("odm") ); + GetFilter4Extension( rtl::OUString("odm") ); nStrId = STR_LOAD_GLOBAL_DOC; } @@ -1709,7 +1709,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, String sURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); // Set filter: - String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName())); + String sFactory(rtl::OUString::createFromAscii(SwDocShell::Factory().GetShortName())); SfxFilterMatcher aMatcher( sFactory ); // search for filter in WebDocShell, too @@ -1718,7 +1718,7 @@ sal_uLong SwDocShell::LoadStylesFromFile( const String& rURL, aMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False ); if(!pFlt) { - String sWebFactory(String::CreateFromAscii(SwWebDocShell::Factory().GetShortName())); + String sWebFactory(rtl::OUString::createFromAscii(SwWebDocShell::Factory().GetShortName())); SfxFilterMatcher aWebMatcher( sWebFactory ); aWebMatcher.DetectFilter( aMed, &pFlt, sal_False, sal_False ); } diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index 1c46d35cd42e..344f684f3fde 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -586,7 +586,7 @@ String SwDocStyleSheet::GetDescription(SfxMapUnit eUnit) ::comphelper::getProcessServiceFactory(), SvtSysLocale().GetLocaleData().getLocale()); - String sPlus(String::CreateFromAscii(" + ")); + rtl::OUString sPlus(" + "); if ( SFX_STYLE_FAMILY_PAGE == nFamily ) { if( !pSet ) @@ -1875,13 +1875,11 @@ sal_Bool SwDocStyleSheet::IsUsed() const sal_uLong SwDocStyleSheet::GetHelpId( String& rFile ) { -static String sTemplateHelpFile = String::CreateFromAscii("swrhlppi.hlp"); - sal_uInt16 nId = 0; sal_uInt16 nPoolId = 0; unsigned char nFileId = UCHAR_MAX; - rFile = sTemplateHelpFile; + rFile = rtl::OUString("swrhlppi.hlp"); const SwFmt* pTmpFmt = 0; switch( nFamily ) diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx index 8afea9eaaec2..c65b4ba58802 100644 --- a/sw/source/ui/app/swdll.cxx +++ b/sw/source/ui/app/swdll.cxx @@ -104,12 +104,12 @@ SwDLL::SwDLL() SwModule* pModule = new SwModule( pWDocFact, pDocFact, pGlobDocFact ); *ppShlPtr = pModule; - pWDocFact->SetDocumentServiceName(C2S("com.sun.star.text.WebDocument")); + pWDocFact->SetDocumentServiceName(rtl::OUString("com.sun.star.text.WebDocument")); if ( aOpt.IsWriter() ) { - pGlobDocFact->SetDocumentServiceName(C2S("com.sun.star.text.GlobalDocument")); - pDocFact->SetDocumentServiceName(C2S("com.sun.star.text.TextDocument")); + pGlobDocFact->SetDocumentServiceName(rtl::OUString("com.sun.star.text.GlobalDocument")); + pDocFact->SetDocumentServiceName(rtl::OUString("com.sun.star.text.TextDocument")); } // register SvDraw-Fields diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 46f5d63edfcb..d487902c9a09 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -182,7 +182,7 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, pDragDrop( 0 ), pXSelection( 0 ) { - SetName( String::CreateFromAscii("StarWriter") ); + SetName( rtl::OUString("StarWriter") ); pSwResMgr = GetResMgr(); SvxErrorHandler::ensure(); pErrorHdl = new SfxErrorHandler( RID_SW_ERRHDL, diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx index 9c300c5ceb86..4de3bca3d465 100644 --- a/sw/source/ui/cctrl/actctrl.cxx +++ b/sw/source/ui/cctrl/actctrl.cxx @@ -60,7 +60,7 @@ long NumEditAction::Notify( NotifyEvent& rNEvt ) NoSpaceEdit::NoSpaceEdit( Window* pParent, const ResId& rResId) : Edit(pParent, rResId), - sForbiddenChars(String::CreateFromAscii(" ")) + sForbiddenChars(rtl::OUString(" ")) { } diff --git a/sw/source/ui/config/caption.cxx b/sw/source/ui/config/caption.cxx index 12eb296b12bb..eb76a7efe7cb 100644 --- a/sw/source/ui/config/caption.cxx +++ b/sw/source/ui/config/caption.cxx @@ -39,7 +39,7 @@ InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleI sNumberSeparator(RTL_CONSTASCII_USTRINGPARAM((". "))), nPos(1), nLevel(0), - sSeparator( String::CreateFromAscii( ": " ) ), + sSeparator( rtl::OUString(": ") ), bIgnoreSeqOpts(sal_False), bCopyAttributes(sal_False) { diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx index 59559c6025b8..c0dd013303c4 100644 --- a/sw/source/ui/config/optcomp.cxx +++ b/sw/source/ui/config/optcomp.cxx @@ -185,21 +185,18 @@ SwCompatibilityOptPage::~SwCompatibilityOptPage() void SwCompatibilityOptPage::ReplaceFormatName( String& rEntry ) { - static const String sOpenOfficeName = String::CreateFromAscii("OpenOffice.org"); - static const String sAsianName = String::CreateFromAscii("StarSuite"); - - String sFormatName( utl::ConfigManager::getProductName() ); - String sFormatVersion; - bool bOpenOffice = ( sOpenOfficeName == sFormatName ); + rtl::OUString sFormatName(utl::ConfigManager::getProductName()); + rtl::OUString sFormatVersion; + bool bOpenOffice = ( sFormatName == "OpenOffice.org" ); if ( bOpenOffice ) - sFormatVersion = String::CreateFromAscii("1.1"); + sFormatVersion = rtl::OUString("1.1"); else - sFormatVersion = String::CreateFromAscii("6.0/7"); - if ( !bOpenOffice && ( sAsianName != sFormatName ) ) - sFormatName = String::CreateFromAscii("StarOffice"); + sFormatVersion = rtl::OUString("6.0/7"); + if ( !bOpenOffice && ( sFormatName != "StarSuite" ) ) + sFormatName = rtl::OUString("StarOffice"); - rEntry.SearchAndReplace( String::CreateFromAscii("%FORMATNAME"), sFormatName ); - rEntry.SearchAndReplace( String::CreateFromAscii("%FORMATVERSION"), sFormatVersion ); + rEntry.SearchAndReplace( rtl::OUString("%FORMATNAME"), sFormatName ); + rEntry.SearchAndReplace( rtl::OUString("%FORMATVERSION"), sFormatVersion ); } sal_uLong convertBools2Ulong_Impl @@ -281,7 +278,7 @@ void SwCompatibilityOptPage::InitControls( const SfxItemSet& rSet ) m_aDefaultPB.Disable(); } String sText = m_aMainFL.GetText(); - sText.SearchAndReplace( String::CreateFromAscii("%DOCNAME"), sDocTitle ); + sText.SearchAndReplace( rtl::OUString("%DOCNAME"), sDocTitle ); m_aMainFL.SetText( sText ); // loading file formats diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index db1991f4a628..6c89e9f29f5b 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -460,7 +460,7 @@ SwCaptionOptPage::SwCaptionOptPage( Window* pParent, const SfxItemSet& rSet ) aLbLevel.InsertEntry(String::CreateFromInt32(i + 1)); sal_Unicode nLvl = MAXLEVEL; - String sDelim( String::CreateFromAscii( ": " ) ); + rtl::OUString sDelim(": "); if (pSh) { diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index ee54b9a8b464..961b89f81fbb 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2476,17 +2476,17 @@ SwTestTabPage::SwTestTabPage( Window* pParent, lcl_SetPosSize(aTest9CBox , Point(116, 53), Size(74 , 10)); lcl_SetPosSize(aTest10CBox , Point(116, 66), Size(74 , 10)); - aTestFL.SetText(rtl::OUString::createFromAscii("Settings only for testpurposes")); - aTest1CBox .SetText( C2S("unused")); - aTest2CBox .SetText( C2S("dynamic")); - aTest3CBox .SetText( C2S("No calm" )); - aTest4CBox .SetText( C2S("WYSIWYG debug" )); - aTest5CBox .SetText( C2S("No idle format" )); - aTest6CBox .SetText( C2S("No screen adj" )); - aTest7CBox .SetText( C2S("win format" )); - aTest8CBox .SetText( C2S("No Scroll" )); - aTest9CBox .SetText( C2S("DrawingLayerNotLoading")); - aTest10CBox.SetText( C2S("AutoFormat by Input" )); + aTestFL.SetText(rtl::OUString("Settings only for testpurposes")); + aTest1CBox.SetText(rtl::OUString("unused")); + aTest2CBox.SetText(rtl::OUString("dynamic")); + aTest3CBox.SetText(rtl::OUString("No calm")); + aTest4CBox.SetText(rtl::OUString("WYSIWYG debug")); + aTest5CBox.SetText(rtl::OUString("No idle format")); + aTest6CBox.SetText(rtl::OUString("No screen adj")); + aTest7CBox.SetText(rtl::OUString("win format")); + aTest8CBox.SetText(rtl::OUString("No Scroll")); + aTest9CBox.SetText(rtl::OUString("DrawingLayerNotLoading")); + aTest10CBox.SetText(rtl::OUString("AutoFormat by Input")); aTestFL.Show(); aTest1CBox .Show(); aTest2CBox .Show(); diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index f2118661b21b..763327e362ce 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -170,7 +170,7 @@ int SwBaseNumRules::Load(SvStream &rStream) } SwChapterNumRules::SwChapterNumRules() : - SwBaseNumRules(C2S(CHAPTER_FILENAME)) + SwBaseNumRules(rtl::OUString(CHAPTER_FILENAME)) { } diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index b44179f0d4f8..18ab294d7526 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -137,7 +137,7 @@ void SwViewOption::DrawRectPrinter( OutputDevice *pOut, sal_uInt16 SwViewOption::GetPostItsWidth( const OutputDevice *pOut ) const { OSL_ENSURE( pOut, "no Outdev" ); - return sal_uInt16(pOut->GetTextWidth( String::CreateFromAscii(aPostItStr ))); + return sal_uInt16(pOut->GetTextWidth( rtl::OUString(aPostItStr ))); } void SwViewOption::PaintPostIts( OutputDevice *pOut, const SwRect &rRect, sal_Bool bIsScript ) const diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx index 0a27f292726a..0647b8d30936 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -421,7 +421,7 @@ IMPL_LINK(SwAddressListDialog, CreateHdl_Impl, PushButton*, pButton) uno::Reference<sdb::XDocumentDataSource> xDS(xNewInstance, UNO_QUERY_THROW); uno::Reference<frame::XStorable> xStore(xDS->getDatabaseDocument(), UNO_QUERY_THROW); - String sExt = String::CreateFromAscii(".odb"); + String sExt = rtl::OUString(".odb"); String sTmpName; { String sHomePath(SvtPathOptions().GetWorkPath()); diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx index f3359a9aa629..30ff5e122748 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -568,7 +568,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl) uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); String sPath( SvtPathOptions().SubstituteVariable( - String::CreateFromAscii("$(userurl)/database") )); + rtl::OUString("$(userurl)/database") )); aDlgHelper.SetDisplayDirectory( sPath ); uno::Reference< XFilterManager > xFltMgr(xFP, uno::UNO_QUERY); ::rtl::OUString sCSV(C2U("*.csv")); @@ -579,7 +579,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl) { m_sURL = xFP->getFiles().getConstArray()[0]; INetURLObject aResult( m_sURL ); - aResult.setExtension(String::CreateFromAscii("csv")); + aResult.setExtension(rtl::OUString("csv")); m_sURL = aResult.GetMainURL(INetURLObject::NO_DECODE); } } diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 8d2cf8746f70..130dc792a107 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -294,7 +294,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, Any aCol = xCols->getByName(pColNames[n]); Reference <XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(C2S("Type")); + Any aType = xCol->getPropertyValue(rtl::OUString("Type")); sal_Int32 eDataType = 0; aType >>= eDataType; switch(eDataType) @@ -832,7 +832,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox ) if( bEnableFmt ) { - (( sTxt += C2S(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')'; + (( sTxt += rtl::OUString(" (" )) += String(aSrch.sColumn) ) += (sal_Unicode)')'; } sal_Bool bIsDBFmt = aDBColumns[ nFndPos ]->bIsDBFmt; @@ -1260,7 +1260,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection, aDBFormatData.aLocale = SvxCreateLocale( rSh.GetCurLang() ); SwDBNextSetField aNxtDBFld( (SwDBNextSetFieldType*)rSh. GetFldType( 0, RES_DBNEXTSETFLD ), - C2S("1"), aEmptyStr, aDBData ); + rtl::OUString("1"), aEmptyStr, aDBData ); sal_Bool bSetCrsr = sal_True; @@ -1639,7 +1639,7 @@ void SwInsertDBColAutoPilot::Commit() SetSetProperties(rtl::OUString(), aValues); sNewNode += C2U("/ColumnSet"); - String sDelim( String::CreateFromAscii( "/__" )); + rtl::OUString sDelim("/__"); LanguageType ePrevLang = (LanguageType)-1; rtl::OUString sPrevLang; diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx index 6b0a789404c7..27fc513a297b 100644 --- a/sw/source/ui/dbui/dbmgr.cxx +++ b/sw/source/ui/dbui/dbmgr.cxx @@ -893,8 +893,7 @@ sal_Bool SwNewDBMgr::MergeMailFiles(SwWrtShell* pSourceShell, // if a save_to filter is set then use it - otherwise use the default if( bEMail && !rMergeDescriptor.bSendAsAttachment ) { - String sExtension( String::CreateFromAscii( - rMergeDescriptor.bSendAsHTML ? "html" : "txt" )); + rtl::OUString sExtension = rMergeDescriptor.bSendAsHTML ? rtl::OUString("html") : rtl::OUString("txt"); pStoreToFilter = pFilterContainer->GetFilter4Extension(sExtension, SFX_FILTER_EXPORT); } else if( rMergeDescriptor.sSaveToFilter.Len()) @@ -1564,7 +1563,7 @@ sal_Int32 SwNewDBMgr::GetColumnType( const String& rDBName, Any aCol = xCols->getByName(rColNm); uno::Reference<XPropertySet> xCol; aCol >>= xCol; - Any aType = xCol->getPropertyValue(C2S("Type")); + Any aType = xCol->getPropertyValue(rtl::OUString("Type")); aType >>= nRet; } if(bDispose) @@ -2364,7 +2363,7 @@ String SwNewDBMgr::LoadAndRegisterDataSource() Reference<XDocumentDataSource> xDS(xNewInstance, UNO_QUERY_THROW); Reference<XStorable> xStore(xDS->getDatabaseDocument(), UNO_QUERY_THROW); - String sOutputExt = String::CreateFromAscii(".odb"); + String sOutputExt = rtl::OUString(".odb"); String sTmpName; { utl::TempFile aTempFile(sNewName , &sOutputExt, &sHomePath); @@ -2446,7 +2445,7 @@ void SwNewDBMgr::ExecuteFormLetter( SwWrtShell& rSh, //copy rSh to aTempFile ::rtl::OUString sTempURL; const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString(FILTER_XML), SwDocShell::Factory().GetFilterContainer() ); try { diff --git a/sw/source/ui/dbui/dbui.cxx b/sw/source/ui/dbui/dbui.cxx index 16952455bd50..47b86ce92b35 100644 --- a/sw/source/ui/dbui/dbui.cxx +++ b/sw/source/ui/dbui/dbui.cxx @@ -100,15 +100,15 @@ CreateMonitor::CreateMonitor( Window *pParent ) m_aCounting (this, SW_RES( FT_COUNTING )), m_aCancelButton (this, SW_RES( PB_CANCELPRNMON )), m_sCountingPattern(), - m_sVariable_Total( String::CreateFromAscii("%Y") ), - m_sVariable_Position( String::CreateFromAscii("%X") ), + m_sVariable_Total( rtl::OUString("%Y") ), + m_sVariable_Position( rtl::OUString("%X") ), m_nTotalCount(0), m_nCurrentPosition(0) { FreeResource(); m_sCountingPattern = m_aCounting.GetText(); - m_aCounting.SetText(String::CreateFromAscii("...")); + m_aCounting.SetText(rtl::OUString("...")); } void CreateMonitor::UpdateCountingText() diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx index 227d79694390..9f756c267c69 100644 --- a/sw/source/ui/dbui/mailmergehelper.cxx +++ b/sw/source/ui/dbui/mailmergehelper.cxx @@ -64,7 +64,7 @@ namespace SwMailMergeHelper String CallSaveAsDialog(String& rFilter) { ErrCode nRet; - String sFactory(String::CreateFromAscii(SwDocShell::Factory().GetShortName())); + String sFactory(rtl::OUString::createFromAscii(SwDocShell::Factory().GetShortName())); ::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, 0, sFactory ); diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index d9734eefb0fc..5fc7ba5ff11b 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -580,7 +580,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( m_rConfigItem(rConfig), m_eType(eType) { - m_aFieldCB.SetForbiddenChars( String::CreateFromAscii("<>")); + m_aFieldCB.SetForbiddenChars( rtl::OUString("<>")); m_aDragED.SetStyle(m_aDragED.GetStyle() |WB_NOHIDESELECTION); if( eType >= GREETING_FEMALE ) { @@ -600,7 +600,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( ResStringArray aPunctArr(SW_RES(RA_PUNCTUATION)); for(i = 0; i < aPunctArr.Count(); ++i) m_aPunctuations.push_back(aPunctArr.GetString(i)); - m_aDragED.SetText(String::CreateFromAscii(" ")); + m_aDragED.SetText(rtl::OUString(" ")); SetText( String( SW_RES( eType == GREETING_MALE ? ST_TITLE_MALE : ST_TITLE_FEMALE))); m_aAddressElementsFT.SetText(String(SW_RES(ST_SALUTATIONELEMENTS))); m_aInsertFieldIB.SetQuickHelpText(String(SW_RES(ST_INSERTSALUTATIONFIELD))); @@ -620,7 +620,7 @@ SwCustomizeAddressBlockDialog::SwCustomizeAddressBlockDialog( aPreviewSize.Height() += nDiff; m_aPreviewWIN.SetSizePixel(aPreviewSize); m_aPreviewWIN.SetPosPixel(m_aFieldCB.GetPosPixel()); - m_aDragED.SetText(String::CreateFromAscii("\n\n\n\n\n")); + m_aDragED.SetText(rtl::OUString("\n\n\n\n\n")); } FreeResource(); const ResStringArray& rHeaders = m_rConfigItem.GetDefaultAddressHeaders(); @@ -1041,7 +1041,7 @@ SwAssignFieldsControl::SwAssignFieldsControl( { const XubString& rHeader = rHeaders.GetString( i ); FixedInfo* pNewText = new FixedInfo(&m_aWindow, ResId( FT_FIELDS, *rResId.GetResMgr())); - String sLabel(String::CreateFromAscii("<>")); + String sLabel(rtl::OUString("<>")); sLabel.Insert(rHeader, 1); pNewText->SetText(sLabel); ListBox* pNewLB = new ListBox(&m_aWindow, ResId(LB_FIELDS, *rResId.GetResMgr())); @@ -1474,7 +1474,7 @@ void AddressMultiLineEdit::SetText( const String& rStr ) if(nLastLen) { TextPaM aPaM(nParaCount ? nParaCount - 1 : 0, nLastLen); - pTextEngine->ReplaceText( TextSelection( aPaM ), String::CreateFromAscii("\n \n ")); + pTextEngine->ReplaceText( TextSelection( aPaM ), rtl::OUString("\n \n ")); } } } diff --git a/sw/source/ui/dbui/mmconfigitem.cxx b/sw/source/ui/dbui/mmconfigitem.cxx index af6473ab9428..c74912e5cd21 100644 --- a/sw/source/ui/dbui/mmconfigitem.cxx +++ b/sw/source/ui/dbui/mmconfigitem.cxx @@ -403,7 +403,7 @@ void lcl_ConvertToNumbers(OUString& rBlock, const ResStringArray& rHeaders ) { //convert the strings used for UI to numbers used for the configuration String sBlock(rBlock); - sBlock.SearchAndReplaceAllAscii("\n", String::CreateFromAscii("\\n")); + sBlock.SearchAndReplaceAllAscii("\n", rtl::OUString("\\n")); for(sal_uInt16 i = 0; i < rHeaders.Count(); ++i) { String sHeader = rHeaders.GetString( i ); diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx index 229ef6866790..8442329166b3 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -148,7 +148,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, PushButton*, pButton) xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() ); SfxObjectFactory &rFact = m_pWizard->GetSwView()->GetDocShell()->GetFactory(); - SfxFilterMatcher aMatcher( String::CreateFromAscii(rFact.GetShortName()) ); + SfxFilterMatcher aMatcher( rtl::OUString::createFromAscii(rFact.GetShortName()) ); SfxFilterMatcherIter aIter( aMatcher ); Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY); const SfxFilter* pFlt = aIter.First(); diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 2e3403e7afbb..94a29dd6a82d 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -120,7 +120,7 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); //save the current document into a temporary file { @@ -151,9 +151,9 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : m_aLeftMF.SetValue(m_aLeftMF.Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP); m_aTopMF.SetValue(m_aTopMF.Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP); - m_aZoomLB.InsertEntry(String::CreateFromAscii("50 %"), 1); - m_aZoomLB.InsertEntry(String::CreateFromAscii("75 %"), 2); - m_aZoomLB.InsertEntry(String::CreateFromAscii("100 %"), 3); + m_aZoomLB.InsertEntry(rtl::OUString("50 %"), 1); + m_aZoomLB.InsertEntry(rtl::OUString("75 %"), 2); + m_aZoomLB.InsertEntry(rtl::OUString("100 %"), 3); m_aZoomLB.SelectEntryPos(0); //page size m_aZoomLB.SetSelectHdl(LINK(this, SwMailMergeLayoutPage, ZoomHdl_Impl)); diff --git a/sw/source/ui/dbui/mmmergepage.cxx b/sw/source/ui/dbui/mmmergepage.cxx index b8c072145482..7519e23e7292 100644 --- a/sw/source/ui/dbui/mmmergepage.cxx +++ b/sw/source/ui/dbui/mmmergepage.cxx @@ -63,7 +63,7 @@ SwMailMergeMergePage::SwMailMergeMergePage( SwMailMergeWizard* _pParent) : { FreeResource(); String sTemp(m_aEditFI.GetText()); - sTemp.SearchAndReplace(String::CreateFromAscii("%1"), m_aEditPB.GetText()); + sTemp.SearchAndReplace(rtl::OUString("%1"), m_aEditPB.GetText()); m_aEditFI.SetText(sTemp); m_aEditPB.SetClickHdl( LINK( this, SwMailMergeMergePage, EditDocumentHdl_Impl)); m_aFindPB.SetClickHdl( LINK( this, SwMailMergeMergePage, FindHdl_Impl )); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 460bb072bde1..d4e346c218f8 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -85,14 +85,14 @@ using namespace ::com::sun::star::uno; String lcl_GetExtensionForDocType(sal_uLong nDocType) { - String sExtension; + rtl::OUString sExtension; switch( nDocType ) { - case MM_DOCTYPE_OOO : sExtension = String::CreateFromAscii( "odt" ); break; - case MM_DOCTYPE_PDF : sExtension = String::CreateFromAscii( "pdf" ); break; - case MM_DOCTYPE_WORD: sExtension = String::CreateFromAscii( "doc" ); break; - case MM_DOCTYPE_HTML: sExtension = String::CreateFromAscii( "html" ); break; - case MM_DOCTYPE_TEXT: sExtension = String::CreateFromAscii( "txt" ); break; + case MM_DOCTYPE_OOO : sExtension = rtl::OUString( "odt" ); break; + case MM_DOCTYPE_PDF : sExtension = rtl::OUString( "pdf" ); break; + case MM_DOCTYPE_WORD: sExtension = rtl::OUString( "doc" ); break; + case MM_DOCTYPE_HTML: sExtension = rtl::OUString( "html" ); break; + case MM_DOCTYPE_TEXT: sExtension = rtl::OUString( "txt" ); break; } return sExtension; } @@ -730,7 +730,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); uno::Sequence< beans::PropertyValue > aValues(1); @@ -1054,7 +1054,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) //Make sure we don't pick e.g. the flat xml filter //for this format pSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); } break; @@ -1072,10 +1072,9 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); SfxFilterMatcherIter aIter( aMatcher ); const SfxFilter* pFilter = aIter.First(); - String sFilterUserData( String::CreateFromAscii( FILTER_WW8 )); while ( pFilter ) { - if( pFilter->GetUserData() == sFilterUserData && pFilter->CanExport() ) + if( pFilter->GetUserData() == FILTER_WW8 && pFilter->CanExport() ) { pSfxFlt = pFilter; break; @@ -1159,7 +1158,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) INetURLObject(), utl::TempFile::CreateTempName(), URIHelper::GetMaybeFileHdl()); const SfxFilter *pTargetSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); uno::Sequence< beans::PropertyValue > aValues(1); diff --git a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx index 93d590c44c2d..59bb7ed34764 100644 --- a/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/ui/dialog/SwSpellDialogChildWindow.cxx @@ -166,8 +166,7 @@ SwSpellDialogChildWindow::SwSpellDialogChildWindow ( _pParent, nId, pBindings, pInfo), m_pSpellState(new SpellState) { - - String aPropName( String::CreateFromAscii(UPN_IS_GRAMMAR_INTERACTIVE ) ); + rtl::OUString aPropName(UPN_IS_GRAMMAR_INTERACTIVE); SvtLinguConfig().GetProperty( aPropName ) >>= m_bIsGrammarCheckingOn; } @@ -503,7 +502,7 @@ void SwSpellDialogChildWindow::SetGrammarChecking(bool bOn) uno::Any aVal; aVal <<= bOn; m_bIsGrammarCheckingOn = bOn; - String aPropName( C2S(UPN_IS_GRAMMAR_INTERACTIVE ) ); + rtl::OUString aPropName(UPN_IS_GRAMMAR_INTERACTIVE); SvtLinguConfig().SetProperty( aPropName, aVal ); // set current spell position to the start of the current sentence to // continue with this sentence after grammar checking state has been changed diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index d6ca4072e6d9..8c9fdcb9cbd6 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -86,10 +86,10 @@ SwAsciiFilterDlg::SwAsciiFilterDlg( Window* pParent, SwDocShell& rDocSh, SwAsciiOptions aOpt; { - const String& rFindNm = String::CreateFromAscii( + const rtl::OUString sFindNm = rtl::OUString::createFromAscii( pStream ? sDialogImpExtraData : sDialogExpExtraData); - sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm ); + sal_uInt16 nEnd, nStt = GetExtraData().Search( sFindNm ); if( STRING_NOTFOUND != nStt ) { nStt += nDialogExtraDataLen; @@ -319,10 +319,10 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) rOptions.WriteUserData( sData ); if( sData.Len() ) { - const String& rFindNm = String::CreateFromAscii( + const rtl::OUString sFindNm = rtl::OUString::createFromAscii( aFontLB.IsVisible() ? sDialogImpExtraData : sDialogExpExtraData); - sal_uInt16 nEnd, nStt = GetExtraData().Search( rFindNm ); + sal_uInt16 nEnd, nStt = GetExtraData().Search( sFindNm ); if( STRING_NOTFOUND != nStt ) { // called twice, so remove "old" settings @@ -332,7 +332,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) GetExtraData().Erase( nStt, nEnd - nStt + 1 ); } String sTmp(GetExtraData()); - sTmp += rFindNm; + sTmp += sFindNm; sTmp += sData; sTmp += cDialogExtraDataClose; GetExtraData() = sTmp; diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 08962f044d4f..20040c9429f7 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1104,7 +1104,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, FileSearchHdl) Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = - new ::sfx2::DocumentInserter( String::CreateFromAscii("swriter") ); + new ::sfx2::DocumentInserter( rtl::OUString("swriter") ); m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) ); return 0; } @@ -1854,7 +1854,7 @@ IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl) Application::SetDefDialogParent( this ); delete m_pDocInserter; m_pDocInserter = new ::sfx2::DocumentInserter( - String::CreateFromAscii("swriter") ); + rtl::OUString("swriter") ); m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) ); return 0; } diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx index 41bfbe087d4d..9cba41c344e7 100644 --- a/sw/source/ui/dochdl/gloshdl.cxx +++ b/sw/source/ui/dochdl/gloshdl.cxx @@ -774,7 +774,7 @@ sal_Bool SwGlossaryHdl::ImportGlossaries( const String& rName ) { const SfxFilter* pFilter = 0; SfxMedium* pMed = new SfxMedium( rName, STREAM_READ, 0, 0 ); - SfxFilterMatcher aMatcher( String::CreateFromAscii("swriter") ); + SfxFilterMatcher aMatcher( rtl::OUString("swriter") ); pMed->UseInteractionHandler( sal_True ); if( !aMatcher.GuessFilter( *pMed, &pFilter, sal_False ) ) { diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index db94f67c806a..a83adb2c7a6e 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -647,8 +647,8 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl) { String sTmp(aQueryMB.GetMessText()); String sQuery(sTmp); - sQuery.SearchAndReplace(C2S("%1"), sMake); - sQuery.SearchAndReplace(C2S("%2"), sType); + sQuery.SearchAndReplace(rtl::OUString("%1"), sMake); + sQuery.SearchAndReplace(rtl::OUString("%2"), sType); aQueryMB.SetMessText(sQuery); short eRet = aQueryMB.Execute(); diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 14cc5b297ead..f7050da7e8a1 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -383,7 +383,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, for(sal_uInt16 nEntry = 0; nEntry < aAddressFldLB.GetEntryCount(); nEntry++) aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry)); - aAddressFldLB.SelectEntry(C2S("EMAIL")); + aAddressFldLB.SelectEntry(rtl::OUString("EMAIL")); String sPath(pModOpt->GetMailingPath()); if(!sPath.Len()) @@ -399,7 +399,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, if (!bColumn ) { - aColumnLB.SelectEntry(C2S("NAME")); + aColumnLB.SelectEntry(rtl::OUString("NAME")); } else aColumnLB.SelectEntry(pModOpt->GetNameFromColumn()); diff --git a/sw/source/ui/fldui/fldedt.cxx b/sw/source/ui/fldui/fldedt.cxx index 89d0ef3ef78a..c9a3131c5b18 100644 --- a/sw/source/ui/fldui/fldedt.cxx +++ b/sw/source/ui/fldui/fldedt.cxx @@ -213,7 +213,7 @@ SfxTabPage* SwFldEditDlg::CreatePage(sal_uInt16 nGroup) SetTabPage(pTabPage); String sTitle(GetText()); - sTitle.Insert(String::CreateFromAscii(": "), 0); + sTitle.Insert(rtl::OUString(": "), 0); sTitle.Insert(SW_RESSTR(STR_FLD_EDIT_DLG), 0); SetText(sTitle); diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx index 262ab14efff6..0cab6a9b8414 100644 --- a/sw/source/ui/fldui/fldpage.cxx +++ b/sw/source/ui/fldui/fldpage.cxx @@ -107,9 +107,9 @@ void SwFldPage::Init() { SwDoc* pDoc = pSh->GetDoc(); pSh->InsertFldType( SwSetExpFieldType( pDoc, - String::CreateFromAscii("HTML_ON"), 1)); + rtl::OUString("HTML_ON"), 1)); pSh->InsertFldType( SwSetExpFieldType(pDoc, - String::CreateFromAscii("HTML_OFF"), 1)); + rtl::OUString("HTML_OFF"), 1)); } } } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 222fddfff16a..c6477bbbce6f 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -1289,7 +1289,7 @@ long SelectionListBox::PreNotify( NotifyEvent& rNEvt ) void SwFldVarPage::FillUserData() { - String sData(String::CreateFromAscii(USER_DATA_VERSION)); + String sData(rtl::OUString(USER_DATA_VERSION)); sData += ';'; sal_uInt16 nTypeSel = aTypeLB.GetSelectEntryPos(); if( LISTBOX_ENTRY_NOTFOUND == nTypeSel ) diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index 5f893dadbbad..2ee666a60f34 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -278,7 +278,7 @@ IMPL_LINK( SwJavaEditDialog, InsertFileHdl, PushButton *, pBtn ) pFileDlg = new ::sfx2::FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, - SFXWB_INSERT, String::CreateFromAscii("swriter") ); + SFXWB_INSERT, rtl::OUString("swriter") ); } pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) ); diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index 534297a48060..535495ff3163 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -110,7 +110,7 @@ public: String GetCharacterStyle() const; }; -String SwCaptionDialog::our_aSepTextSave = String::CreateFromAscii(": "); // Caption separator text +String SwCaptionDialog::our_aSepTextSave = rtl::OUString(": "); // Caption separator text SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) : @@ -507,7 +507,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV, RES_SETEXPFLD, aFldTypeName ); sal_Unicode nLvl = MAXLEVEL; - String sDelim( String::CreateFromAscii( ": " ) ); + rtl::OUString sDelim(": "); if( pFldType ) { sDelim = pFldType->GetDelimiter(); @@ -515,7 +515,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV, } aLbLevel.SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 ); - aEdDelim.SetText( sDelim ); + aEdDelim.SetText(sDelim); ::FillCharStyleListBox( aLbCharStyle, rView.GetDocShell(), sal_True, sal_True ); aLbCharStyle.SelectEntryPos( 0 ); diff --git a/sw/source/ui/inc/actctrl.hxx b/sw/source/ui/inc/actctrl.hxx index f28bd79ec8e5..6e6330b52cbe 100644 --- a/sw/source/ui/inc/actctrl.hxx +++ b/sw/source/ui/inc/actctrl.hxx @@ -75,7 +75,7 @@ class TableNameEdit : public NoSpaceEdit public: TableNameEdit(Window* pWin, const ResId& rResId) : NoSpaceEdit(pWin, rResId) - {SetForbiddenChars(String::CreateFromAscii(" .<>"));} + {SetForbiddenChars(rtl::OUString(" .<>"));} }; /* -------------------------------------------------- diff --git a/sw/source/ui/index/cntex.cxx b/sw/source/ui/index/cntex.cxx index e9af11339e75..52333d739dac 100644 --- a/sw/source/ui/index/cntex.cxx +++ b/sw/source/ui/index/cntex.cxx @@ -455,7 +455,7 @@ void SwMultiTOXTabDialog::CreateOrUpdateExample( } for(sal_uInt16 i = 1; i < nEndLevel; i++) { - String sPropName(C2S("ParaStyleLevel")); + String sPropName(rtl::OUString("ParaStyleLevel")); sPropName += String::CreateFromInt32( i ); lcl_SetProp(xInfo, xIdxProps, diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index d2aae21d9ef3..942a7a44beca 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -310,7 +310,7 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(Window* pParent, const SfxItemSet& rSet } else { - pDescArr[nArrayIndex]->SetAuthBrackets(C2S("[]")); + pDescArr[nArrayIndex]->SetAuthBrackets(rtl::OUString("[]")); } } } @@ -458,7 +458,7 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType) } else { - pDescArr[nIndex]->SetAuthBrackets(C2S("[]")); + pDescArr[nIndex]->SetAuthBrackets(rtl::OUString("[]")); } } else if(TOX_INDEX == eType.eType) @@ -2358,7 +2358,7 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, PushButton*, pButton) String sToInsert(aAuthFieldsLB.GetSelectEntry()); SwFormToken aInsert(TOKEN_AUTHORITY); aInsert.nAuthorityField = (sal_uInt16)(sal_uIntPtr)aAuthFieldsLB.GetEntryData(nSelPos); - aTokenWIN.InsertAtSelection(String::CreateFromAscii( + aTokenWIN.InsertAtSelection(rtl::OUString::createFromAscii( SwForm::aFormAuth), aInsert); aAuthFieldsLB.RemoveEntry(sToInsert); aAuthFieldsLB.SelectEntryPos( nSelPos ? nSelPos - 1 : 0); @@ -2914,8 +2914,8 @@ void SwTokenWindow::SetForm(SwForm& rForm, sal_uInt16 nL) default:; //prevent warning } - InsertItem( pTmp ? String::CreateFromAscii(pTmp) - : aEmptyStr, aToken ); + InsertItem( pTmp ? rtl::OUString::createFromAscii(pTmp) + : rtl::OUString(), aToken ); bLastWasText = sal_False; } diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 7d7f43a0a543..fbc59561c9ba 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -525,8 +525,7 @@ SwSpellPopup::SwSpellPopup( aKeyboardLang = aLanguageTable.GetString( nLang ); // get the language that is in use - const String aMultipleLanguages = String::CreateFromAscii("*"); - String aCurrentLang = aMultipleLanguages; + String aCurrentLang = rtl::OUString("*"); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = aLanguageTable.GetString( nLang ); @@ -679,8 +678,7 @@ aInfo16( SW_RES(IMG_INFO_16) ) aKeyboardLang = aLanguageTable.GetString( nLang ); // get the language that is in use - const String aMultipleLanguages = String::CreateFromAscii("*"); - String aCurrentLang = aMultipleLanguages; + String aCurrentLang = rtl::OUString("*"); nLang = SwLangHelper::GetCurrentLanguage( *pWrtSh ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = aLanguageTable.GetString( nLang ); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index fe056ee6f36e..0f2b3e773d95 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -47,7 +47,7 @@ #include "bookmark.hrc" #include "misc.hrc" -const String BookmarkCombo::aForbiddenChars = String::CreateFromAscii("/\\@:*?\";,.#"); +const String BookmarkCombo::aForbiddenChars = rtl::OUString("/\\@:*?\";,.#"); IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox ) { diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 044402b95350..2cbb826d9c55 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -616,15 +616,14 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn ) SvtPathOptions aPathOpt; xFP->setDisplayDirectory(aPathOpt.GetWorkPath() ); - String sWW8( C2S( FILTER_WW8 ) ); uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY); - SfxFilterMatcher aMatcher( String::CreateFromAscii(SwDocShell::Factory().GetShortName()) ); + SfxFilterMatcher aMatcher( rtl::OUString::createFromAscii(SwDocShell::Factory().GetShortName()) ); SfxFilterMatcherIter aIter( aMatcher ); const SfxFilter* pFilter = aIter.First(); while ( pFilter ) { - if( pFilter->GetUserData() == sWW8 ) + if( pFilter->GetUserData() == FILTER_WW8 ) { xFltMgr->appendFilter( pFilter->GetUIName(), pFilter->GetWildcard().getGlob() ); diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx index 81c466a6dd23..e5c003f64b02 100644 --- a/sw/source/ui/misc/linenum.cxx +++ b/sw/source/ui/misc/linenum.cxx @@ -108,14 +108,14 @@ SwLineNumberingPage::SwLineNumberingPage( Window* pParent, { String sIntervalName = aDivIntervalFT.GetAccessibleName(); - sIntervalName += String::CreateFromAscii("("); + sIntervalName += rtl::OUString("("); sIntervalName += aDivRowsFT.GetAccessibleName(); - sIntervalName += String::CreateFromAscii(")"); + sIntervalName += rtl::OUString(")"); aDivIntervalNF.SetAccessibleName(sIntervalName); sIntervalName = aNumIntervalFT.GetAccessibleName(); - sIntervalName += String::CreateFromAscii("("); + sIntervalName += rtl::OUString("("); sIntervalName += aNumRowsFT.GetAccessibleName(); - sIntervalName += String::CreateFromAscii(")"); + sIntervalName += rtl::OUString(")"); aNumIntervalNF.SetAccessibleName(sIntervalName); FreeResource(); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 912b24b342de..2d205956e840 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -152,7 +152,7 @@ SwNumPositionTabPage::SwNumPositionTabPage(Window* pParent, // insert levels for(sal_uInt16 i = 1; i <= MAXLEVEL; i++) aLevelLB.InsertEntry(String::CreateFromInt32(i)); - String sEntry(String::CreateFromAscii("1 - ")); + String sEntry(rtl::OUString("1 - ")); sEntry += String::CreateFromInt32(MAXLEVEL); aLevelLB.InsertEntry(sEntry); aLevelLB.SelectEntry(sEntry); diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index cfa46f51cd1c..41e00c591bad 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -177,7 +177,7 @@ SwOutlineTabDialog::SwOutlineTabDialog(Window* pParent, SwWrtShell &rSh) : // the UserString is set correctly afterwards SfxTabDialog(pParent, SW_RES(DLG_TAB_OUTLINE), pSwItemSet, sal_False, &aEmptyStr), - aNullStr(C2S("____")), + aNullStr(rtl::OUString("____")), aFormMenu(SW_RES(MN_FORM)), rWrtSh(rSh), pChapterNumRules(SW_MOD()->GetChapterNumRules()), diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index f6fb3cd3f000..86f7a2f50c1f 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -384,9 +384,9 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet) void SwTextGridPage::SetLinesOrCharsRanges(FixedText & rField, const sal_Int32 nValue ) { - String aFieldStr = String::CreateFromAscii("( 1 -"); - aFieldStr += String::CreateFromInt32( nValue ); - aFieldStr += String::CreateFromAscii(" )"); + String aFieldStr = rtl::OUString("( 1 -"); + aFieldStr += rtl::OUString::valueOf(nValue); + aFieldStr += rtl::OUString(" )"); rField.SetText( aFieldStr ); } diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index df8c355bc450..6a3239ad1065 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -1196,7 +1196,7 @@ void SwRedlineAcceptDlg::Initialize(const String& rExtraData) { if (rExtraData.Len()) { - sal_uInt16 nPos = rExtraData.Search(C2S("AcceptChgDat:")); + sal_uInt16 nPos = rExtraData.Search(rtl::OUString("AcceptChgDat:")); // try to read the alignment string "ALIGN:(...)"; if none existing, // it's an old version diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx index 64249d08709c..c59dab2a96eb 100644 --- a/sw/source/ui/ribbar/inputwin.cxx +++ b/sw/source/ui/ribbar/inputwin.cxx @@ -336,7 +336,7 @@ static const char * const aStrArr[] = { sal_uInt16 nId = pMenu->GetCurItemId(); if ( nId <= MN_CALC_ROUND ) { - String aTmp( String::CreateFromAscii(aStrArr[nId - 1]) ); + String aTmp( rtl::OUString::createFromAscii(aStrArr[nId - 1]) ); aTmp += ' '; aEdit.ReplaceSelected( aTmp ); } diff --git a/sw/source/ui/shells/basesh.cxx b/sw/source/ui/shells/basesh.cxx index e7867bb1443f..8d63e469a5c3 100644 --- a/sw/source/ui/shells/basesh.cxx +++ b/sw/source/ui/shells/basesh.cxx @@ -1936,7 +1936,7 @@ SwBaseShell::SwBaseShell(SwView& rVw) : SwWrtShell& rWrtSh = rView.GetWrtShell(); SetPool(&rWrtSh.GetAttrPool()); - SetName(C2S("Base")); + SetName(rtl::OUString("Base")); rWrtSh.SetGrfArrivedLnk( LINK( this, SwBaseShell, GraphicArrivedHdl)); } diff --git a/sw/source/ui/shells/beziersh.cxx b/sw/source/ui/shells/beziersh.cxx index 3f5fc406a1cc..4a4137607bd6 100644 --- a/sw/source/ui/shells/beziersh.cxx +++ b/sw/source/ui/shells/beziersh.cxx @@ -62,7 +62,7 @@ TYPEINIT1(SwBezierShell,SwBaseShell) SwBezierShell::SwBezierShell(SwView &_rView): SwBaseShell( _rView ) { - SetName(C2S("Bezier")); + SetName(rtl::OUString("Bezier")); SetHelpId(SW_BEZIERSHELL); SwWrtShell *pSh = &GetShell(); diff --git a/sw/source/ui/shells/drawsh.cxx b/sw/source/ui/shells/drawsh.cxx index f91723b4ace5..200811481faf 100644 --- a/sw/source/ui/shells/drawsh.cxx +++ b/sw/source/ui/shells/drawsh.cxx @@ -362,7 +362,7 @@ SwDrawShell::SwDrawShell(SwView &_rView) : SwDrawBaseShell(_rView) { SetHelpId(SW_DRAWSHELL); - SetName(String::CreateFromAscii("Draw")); + SetName(rtl::OUString("Draw")); } /************************************************************************* diff --git a/sw/source/ui/shells/drformsh.cxx b/sw/source/ui/shells/drformsh.cxx index 1205d1bcc262..c55f685004af 100644 --- a/sw/source/ui/shells/drformsh.cxx +++ b/sw/source/ui/shells/drformsh.cxx @@ -261,7 +261,7 @@ SwDrawFormShell::SwDrawFormShell(SwView &_rView) : { SetHelpId(SW_DRAWFORMSHELL); GetShell().NoEdit(sal_True); - SetName(String::CreateFromAscii("DrawForm")); + SetName(rtl::OUString("DrawForm")); } SwDrawFormShell::~SwDrawFormShell() diff --git a/sw/source/ui/shells/drwtxtsh.cxx b/sw/source/ui/shells/drwtxtsh.cxx index 2bb6c5ae27cc..eb8751514dfa 100644 --- a/sw/source/ui/shells/drwtxtsh.cxx +++ b/sw/source/ui/shells/drwtxtsh.cxx @@ -138,7 +138,7 @@ SwDrawTextShell::SwDrawTextShell(SwView &rV) : Init(); rSh.NoEdit(sal_True); - SetName(String::CreateFromAscii("ObjectText")); + SetName(rtl::OUString("ObjectText")); SetHelpId(SW_DRWTXTSHELL); } diff --git a/sw/source/ui/shells/frmsh.cxx b/sw/source/ui/shells/frmsh.cxx index d4e7b1301466..497d212d26c7 100644 --- a/sw/source/ui/shells/frmsh.cxx +++ b/sw/source/ui/shells/frmsh.cxx @@ -880,7 +880,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SwFrameShell::SwFrameShell(SwView &_rView) : SwBaseShell( _rView ) { - SetName(String::CreateFromAscii("Frame")); + SetName(rtl::OUString("Frame")); SetHelpId(SW_FRAMESHELL); /* #96392# Use this to announce it is the frame shell who creates the diff --git a/sw/source/ui/shells/grfsh.cxx b/sw/source/ui/shells/grfsh.cxx index 2e9884cb3520..20dd85f52a82 100644 --- a/sw/source/ui/shells/grfsh.cxx +++ b/sw/source/ui/shells/grfsh.cxx @@ -704,7 +704,7 @@ SwGrfShell::SwGrfShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(String::CreateFromAscii("Graphic")); + SetName(rtl::OUString("Graphic")); SetHelpId(SW_GRFSHELL); } diff --git a/sw/source/ui/shells/langhelper.cxx b/sw/source/ui/shells/langhelper.cxx index 68bfdcccefb8..4b389a3f049b 100644 --- a/sw/source/ui/shells/langhelper.cxx +++ b/sw/source/ui/shells/langhelper.cxx @@ -92,8 +92,7 @@ namespace SwLangHelper aKeyboardLang = aLangTable.GetString( nLang ); // get the language that is in use - const String aMultipleLanguages = String::CreateFromAscii("*"); - String aCurrentLang = aMultipleLanguages; + String aCurrentLang = rtl::OUString("*"); SfxItemSet aSet(pOLV->GetAttribs()); nLang = SwLangHelper::GetCurrentLanguage( aSet,nScriptType ); if (nLang != LANGUAGE_DONTKNOW) @@ -149,11 +148,11 @@ namespace SwLangHelper // setting the new language... if (aNewLangTxt.Len() > 0) { - const String aSelectionLangPrefix( String::CreateFromAscii("Current_") ); - const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") ); - const String aDocumentLangPrefix( String::CreateFromAscii("Default_") ); - const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") ); - const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") ); + const rtl::OUString aSelectionLangPrefix("Current_"); + const rtl::OUString aParagraphLangPrefix("Paragraph_"); + const rtl::OUString aDocumentLangPrefix("Default_"); + const String aStrNone( rtl::OUString("LANGUAGE_NONE") ); + const String aStrResetLangs( rtl::OUString("RESET_LANGUAGES") ); xub_StrLen nPos = 0; bool bForSelection = true; @@ -161,20 +160,20 @@ namespace SwLangHelper if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 ))) { // ... for the current selection - aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.getLength() ); bForSelection = true; } else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 ))) { // ... for the current paragraph language - aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.getLength() ); bForSelection = true; bForParagraph = true; } else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 ))) { // ... as default document language - aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.getLength() ); bForSelection = false; } diff --git a/sw/source/ui/shells/listsh.cxx b/sw/source/ui/shells/listsh.cxx index 063ce1f9687a..0f9fd07c2c72 100644 --- a/sw/source/ui/shells/listsh.cxx +++ b/sw/source/ui/shells/listsh.cxx @@ -280,7 +280,7 @@ void SwListShell::GetState(SfxItemSet &rSet) SwListShell::SwListShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(String::CreateFromAscii("List")); + SetName(rtl::OUString("List")); SetHelpId(SW_LISTSHELL); } diff --git a/sw/source/ui/shells/mediash.cxx b/sw/source/ui/shells/mediash.cxx index fdc63afd0ceb..5d080178d313 100644 --- a/sw/source/ui/shells/mediash.cxx +++ b/sw/source/ui/shells/mediash.cxx @@ -199,7 +199,7 @@ SwMediaShell::SwMediaShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(String::CreateFromAscii("Media Playback")); + SetName(rtl::OUString("Media Playback")); SetHelpId(SW_MEDIASHELL); } diff --git a/sw/source/ui/shells/navsh.cxx b/sw/source/ui/shells/navsh.cxx index 97898d2164d6..3cff898e025e 100644 --- a/sw/source/ui/shells/navsh.cxx +++ b/sw/source/ui/shells/navsh.cxx @@ -66,7 +66,7 @@ SwNavigationShell::SwNavigationShell(SwView &_rView): SwBaseShell( _rView ) { - SetName(C2S("Navigation")); + SetName(rtl::OUString("Navigation")); SetHelpId(SW_NAVIGATIONSHELL); } diff --git a/sw/source/ui/shells/olesh.cxx b/sw/source/ui/shells/olesh.cxx index 017633c379a3..8b06595c6ec5 100644 --- a/sw/source/ui/shells/olesh.cxx +++ b/sw/source/ui/shells/olesh.cxx @@ -49,7 +49,7 @@ SwOleShell::SwOleShell(SwView &_rView) : SwFrameShell(_rView) { - SetName(String::CreateFromAscii("Object")); + SetName(rtl::OUString("Object")); SetHelpId(SW_OLESHELL); } diff --git a/sw/source/ui/shells/tabsh.cxx b/sw/source/ui/shells/tabsh.cxx index b1884b740ef6..69c28c6a55ee 100644 --- a/sw/source/ui/shells/tabsh.cxx +++ b/sw/source/ui/shells/tabsh.cxx @@ -1356,7 +1356,7 @@ void SwTableShell::GetState(SfxItemSet &rSet) SwTableShell::SwTableShell(SwView &_rView) : SwBaseShell(_rView) { - SetName(String::CreateFromAscii("Table")); + SetName(rtl::OUString("Table")); SetHelpId(SW_TABSHELL); } diff --git a/sw/source/ui/shells/textsh.cxx b/sw/source/ui/shells/textsh.cxx index 3ad1e1ff61cb..d5eea66d6296 100644 --- a/sw/source/ui/shells/textsh.cxx +++ b/sw/source/ui/shells/textsh.cxx @@ -1000,7 +1000,7 @@ void SwTextShell::ExecRotateTransliteration( SfxRequest & rReq ) SwTextShell::SwTextShell(SwView &_rView) : SwBaseShell(_rView), pPostItFldMgr( 0 ) { - SetName(String::CreateFromAscii("Text")); + SetName(rtl::OUString("Text")); SetHelpId(SW_TEXTSHELL); } diff --git a/sw/source/ui/shells/textsh1.cxx b/sw/source/ui/shells/textsh1.cxx index 9cb232bd3b82..4929427611cb 100644 --- a/sw/source/ui/shells/textsh1.cxx +++ b/sw/source/ui/shells/textsh1.cxx @@ -326,11 +326,11 @@ void SwTextShell::Execute(SfxRequest &rReq) // setting the new language... if (aNewLangTxt.Len() > 0) { - const String aSelectionLangPrefix( String::CreateFromAscii("Current_") ); - const String aParagraphLangPrefix( String::CreateFromAscii("Paragraph_") ); - const String aDocumentLangPrefix( String::CreateFromAscii("Default_") ); - const String aStrNone( String::CreateFromAscii("LANGUAGE_NONE") ); - const String aStrResetLangs( String::CreateFromAscii("RESET_LANGUAGES") ); + const rtl::OUString aSelectionLangPrefix("Current_"); + const rtl::OUString aParagraphLangPrefix("Paragraph_"); + const rtl::OUString aDocumentLangPrefix("Default_"); + const String aStrNone( rtl::OUString("LANGUAGE_NONE") ); + const String aStrResetLangs( rtl::OUString("RESET_LANGUAGES") ); SfxItemSet aCoreSet( GetPool(), RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE, @@ -344,20 +344,20 @@ void SwTextShell::Execute(SfxRequest &rReq) if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aSelectionLangPrefix, 0 ))) { // ... for the current selection - aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aSelectionLangPrefix.getLength() ); bForSelection = true; } else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aParagraphLangPrefix , 0 ))) { // ... for the current paragraph language - aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aParagraphLangPrefix.getLength() ); bForSelection = true; bForParagraph = true; } else if (STRING_NOTFOUND != (nPos = aNewLangTxt.Search( aDocumentLangPrefix , 0 ))) { // ... as default document language - aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.Len() ); + aNewLangTxt = aNewLangTxt.Erase( nPos, aDocumentLangPrefix.getLength() ); bForSelection = false; } @@ -1331,8 +1331,7 @@ void SwTextShell::GetState( SfxItemSet &rSet ) aKeyboardLang = aLangTable.GetString( nLang ); // get the language that is in use - const String aMultipleLanguages = String::CreateFromAscii("*"); - String aCurrentLang = aMultipleLanguages; + String aCurrentLang = rtl::OUString("*"); nLang = SwLangHelper::GetCurrentLanguage( rSh ); if (nLang != LANGUAGE_DONTKNOW) aCurrentLang = aLangTable.GetString( nLang ); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index ecdc27d8e58c..631f12bddbd9 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1199,7 +1199,7 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pViewFrame, SfxViewShell* pOldSh): mbResetFormDesignMode( false ), mbFormDesignModeToReset( false ) { - SetName(String::CreateFromAscii("PageView" )); + SetName(rtl::OUString("PageView" )); SetWindow( &aViewWin ); SetHelpId(SW_PAGEPREVIEW); _CreateScrollbar( sal_True ); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 6da43e953213..0799925cbdc1 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -163,7 +163,7 @@ void lcl_PrintHeader( OutputDevice &rOutDev, sal_uInt16 nPages, sal_uInt16 nCurP { aFont.SetWeight( WEIGHT_NORMAL ); rOutDev.SetFont( aFont ); - String aPageStr( C2S(" [") ); + String aPageStr( rtl::OUString(" [") ); aPageStr += String( SW_RES( STR_PAGE ) ); aPageStr += ' '; aPageStr += String::CreateFromInt32( nCurPage ); @@ -255,7 +255,7 @@ void SwSrcView::SaveContentTo(SfxMedium& rMed) void SwSrcView::Init() { SetHelpId(SW_SRC_VIEWSHELL); - SetName(C2S("Source")); + SetName(rtl::OUString("Source")); SetWindow( &aEditWin ); SwDocShell* pDocShell = GetDocShell(); // wird das Doc noch geladen, dann muss die DocShell das Load @@ -304,7 +304,7 @@ void SwSrcView::Execute(SfxRequest& rReq) // search for an html filter for export SfxFilterContainer* pFilterCont = GetObjectShell()->GetFactory().GetFilterContainer(); const SfxFilter* pFilter = - pFilterCont->GetFilter4Extension( C2S("html"), SFX_FILTER_EXPORT ); + pFilterCont->GetFilter4Extension( rtl::OUString("html"), SFX_FILTER_EXPORT ); if ( pFilter ) { // filter found -> use its uiname and wildcard @@ -316,8 +316,8 @@ void SwSrcView::Execute(SfxRequest& rReq) else { // filter not found - String sHtml(C2S("HTML")); - xFltMgr->appendFilter( sHtml, C2S("*.html;*.htm") ); + rtl::OUString sHtml("HTML"); + xFltMgr->appendFilter( sHtml, rtl::OUString("*.html;*.htm") ); xFltMgr->setCurrentFilter( sHtml ) ; } @@ -446,7 +446,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) String aPos( SW_RES(STR_SRCVIEW_ROW) ); TextSelection aSel = pTextView->GetSelection(); aPos += String::CreateFromInt32( aSel.GetEnd().GetPara()+1 ); - aPos +=C2S(" : "); + aPos += rtl::OUString(" : "); aPos += String(SW_RES(STR_SRCVIEW_COL)); aPos += String::CreateFromInt32( aSel.GetEnd().GetIndex()+1 ); SfxStringItem aItem( nWhich, aPos ); @@ -776,7 +776,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) SfxMedium* pMedium = pDocShell->GetMedium(); const SfxFilter* pFilter = pMedium->GetFilter(); - sal_Bool bHtml = pFilter && pFilter->GetUserData().EqualsAscii("HTML"); + sal_Bool bHtml = pFilter && pFilter->GetUserData() == "HTML"; sal_Bool bDocModified = pDocShell->IsModified(); if(bHtml && !bDocModified && pDocShell->HasName()) { diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index 10d7fa98c22c..4993728dd569 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -778,7 +778,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) _CreateScrollbar( sal_False ); pViewImpl = new SwView_Impl(this); - SetName(C2S("View")); + SetName(rtl::OUString("View")); SetWindow( pEditWin ); aTimer.SetTimeout( 120 ); diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index fe9792a2a9cc..8e212c5efcb2 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -506,7 +506,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq) pOpt->SetOnlineSpell(bSet); { uno::Any aVal( &bSet, ::getCppuBooleanType() ); - String aPropName( C2S(UPN_IS_SPELL_AUTO) ); + rtl::OUString aPropName(UPN_IS_SPELL_AUTO); SvtLinguConfig aCfg; aCfg.SetProperty( aPropName, aVal ); diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index df3230cce9a3..ffff020363e5 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1981,7 +1981,7 @@ long SwView::InsertDoc( sal_uInt16 nSlotId, const String& rFileName, const Strin } else { - String sFactory = String::CreateFromAscii( pDocSh->GetFactory().GetShortName() ); + rtl::OUString sFactory = rtl::OUString::createFromAscii( pDocSh->GetFactory().GetShortName() ); pViewImpl->StartDocumentInserter( sFactory, LINK( this, SwView, DialogClosedHdl ) ); return -1; } diff --git a/sw/source/ui/uiview/viewprt.cxx b/sw/source/ui/uiview/viewprt.cxx index a9c065bee32c..4e668111ee7c 100644 --- a/sw/source/ui/uiview/viewprt.cxx +++ b/sw/source/ui/uiview/viewprt.cxx @@ -186,7 +186,7 @@ void SwView::ExecutePrint(SfxRequest& rReq) InfoBox aInfoBox(&GetEditWin(), SW_RES(MSG_ERR_NO_FAX)); String sMsg = aInfoBox.GetMessText(); sal_uInt16 nResNo = bWeb ? STR_WEBOPTIONS : STR_TEXTOPTIONS; - sMsg.SearchAndReplace(String::CreateFromAscii("%1"), String(SW_RES(nResNo))); + sMsg.SearchAndReplace(rtl::OUString("%1"), String(SW_RES(nResNo))); aInfoBox.SetMessText(sMsg); aInfoBox.Execute(); SfxUInt16Item aDefPage(SID_SW_EDITOPTIONS, TP_OPTPRINT_PAGE); diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx index ce57fca0ed5f..bb8d438953bd 100644 --- a/sw/source/ui/uiview/viewsrch.cxx +++ b/sw/source/ui/uiview/viewsrch.cxx @@ -330,7 +330,7 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage) if( !bApi && ULONG_MAX != nFound) { String aText( SW_RES( STR_NB_REPLACED ) ); - const xub_StrLen nPos = aText.Search( String::CreateFromAscii("XX") ); + const xub_StrLen nPos = aText.Search( rtl::OUString("XX") ); aText.Erase( nPos, 2 ); aText.Insert( String::CreateFromInt32( nFound ), nPos ); Window* pParentWindow = GetParentWindow( pSrchDlg ); diff --git a/sw/source/ui/uno/swdet2.cxx b/sw/source/ui/uno/swdet2.cxx index cfe82cd74770..f002610b25ca 100644 --- a/sw/source/ui/uno/swdet2.cxx +++ b/sw/source/ui/uno/swdet2.cxx @@ -76,11 +76,10 @@ sal_uLong SwFilterDetect::DetectFilter( SfxMedium& rMedium, const SfxFilter** pp else { //Bug 41417: JP 09.07.97: HTML documents should be loaded by WebWriter - SfxFilterContainer aFilterContainer( String::CreateFromAscii("swriter/web") ); - if( pTmp->GetUserData() != C2S(sHTML) || - String::CreateFromAscii( "com.sun.star.text.WebDocument" ) == - String( pTmp->GetServiceName() ) || - 0 == ( (*ppFilter) = SwIoSystem::GetFilterOfFormat( C2S(sHTML), + SfxFilterContainer aFilterContainer( rtl::OUString("swriter/web") ); + if( !pTmp->GetUserData().equals(sHTML) || + pTmp->GetServiceName() == "com.sun.star.text.WebDocument" || + 0 == ( (*ppFilter) = SwIoSystem::GetFilterOfFormat( rtl::OUString(sHTML), &aFilterContainer ) ) ) *ppFilter = pTmp; } diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index 7fec1f55a986..a8ac2afa7a94 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -173,13 +173,13 @@ SwFilterDetect::~SwFilterDetect() bWasReadOnly = pItem && pItem->GetValue(); const SfxFilter* pFilter = 0; - String aPrefix = String::CreateFromAscii( "private:factory/" ); + String aPrefix = rtl::OUString("private:factory/"); if( aURL.Match( aPrefix ) == aPrefix.Len() ) { if( SvtModuleOptions().IsWriter() ) { String aPattern( aPrefix ); - aPattern += String::CreateFromAscii("swriter"); + aPattern += rtl::OUString("swriter"); if ( aURL.Match( aPattern ) >= aPattern.Len() ) return aTypeName; } @@ -235,9 +235,9 @@ SwFilterDetect::~SwFilterDetect() { const SfxFilter* pPreFilter = aPreselectedFilterName.Len() ? SfxFilterMatcher().GetFilter4FilterName( aPreselectedFilterName ) : aTypeName.Len() ? - SfxFilterMatcher(String::CreateFromAscii("swriter")).GetFilter4EA( aTypeName ) : 0; + SfxFilterMatcher(rtl::OUString("swriter")).GetFilter4EA( aTypeName ) : 0; if (!pPreFilter) - pPreFilter = SfxFilterMatcher(String::CreateFromAscii("sweb")).GetFilter4EA( aTypeName ); + pPreFilter = SfxFilterMatcher(rtl::OUString("sweb")).GetFilter4EA( aTypeName ); String aFilterName; if ( pPreFilter ) { @@ -318,9 +318,9 @@ SwFilterDetect::~SwFilterDetect() else pFilter = SfxFilterMatcher().GetFilter4EA( aTypeName ); - sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.TextDocument") || - pFilter->GetServiceName().EqualsAscii("com.sun.star.text.WebDocument"); - sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName().EqualsAscii("com.sun.star.text.GlobalDocument"); + sal_Bool bTestWriter = !pFilter || pFilter->GetServiceName() == "com.sun.star.text.TextDocument" || + pFilter->GetServiceName() == "com.sun.star.text.WebDocument"; + sal_Bool bTestGlobal = !pFilter || pFilter->GetServiceName() == "com.sun.star.text.GlobalDocument"; const SfxFilter* pOrigFilter = NULL; if ( !bTestWriter && !bTestGlobal && pFilter ) diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx index e224320bf23c..bdcc408ea5e4 100644 --- a/sw/source/ui/uno/unomailmerge.cxx +++ b/sw/source/ui/uno/unomailmerge.cxx @@ -786,7 +786,7 @@ uno::Any SAL_CALL SwXMailMerge::execute( // save document with temporary filename const SfxFilter *pSfxFlt = SwIoSystem::GetFilterOfFormat( - String::CreateFromAscii( FILTER_XML ), + rtl::OUString( FILTER_XML ), SwDocShell::Factory().GetFilterContainer() ); String aExtension(comphelper::string::stripStart(pSfxFlt->GetDefaultExtension(), '*')); TempFile aTempFile( C2U("SwMM"), &aExtension ); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 8dd56f56f991..3f1028656c7c 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -3286,7 +3286,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) String sSuffix('|'); if(sToCompare == sTables) { - sSuffix += UniString::CreateFromAscii(pMarkToTable); + sSuffix += rtl::OUString::createFromAscii(pMarkToTable); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( pxDoc->getTextTables(), sToCompare, sSuffix ); @@ -3295,7 +3295,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sFrames) { - sSuffix += UniString::CreateFromAscii(pMarkToFrame); + sSuffix += rtl::OUString::createFromAscii(pMarkToFrame); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( pxDoc->getTextFrames(), sToCompare, sSuffix ); Reference< XPropertySet > xRet(xTbls, UNO_QUERY); @@ -3303,7 +3303,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sSections) { - sSuffix += UniString::CreateFromAscii(pMarkToRegion); + sSuffix += rtl::OUString::createFromAscii(pMarkToRegion); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( pxDoc->getTextSections(), sToCompare, sSuffix ); Reference< XPropertySet > xRet(xTbls, UNO_QUERY); @@ -3311,7 +3311,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sGraphics) { - sSuffix += UniString::CreateFromAscii(pMarkToGraphic); + sSuffix += rtl::OUString::createFromAscii(pMarkToGraphic); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( pxDoc->getGraphicObjects(), sToCompare, sSuffix ); Reference< XPropertySet > xRet(xTbls, UNO_QUERY); @@ -3319,7 +3319,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sOLEs) { - sSuffix += UniString::CreateFromAscii(pMarkToOLE); + sSuffix += rtl::OUString::createFromAscii(pMarkToOLE); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( pxDoc->getEmbeddedObjects(), sToCompare, sSuffix ); Reference< XPropertySet > xRet(xTbls, UNO_QUERY); @@ -3327,7 +3327,7 @@ Any SwXLinkTargetSupplier::getByName(const OUString& rName) } else if(sToCompare == sOutlines) { - sSuffix += UniString::CreateFromAscii(pMarkToOutline); + sSuffix += rtl::OUString::createFromAscii(pMarkToOutline); Reference< XNameAccess > xTbls = new SwXLinkNameAccessWrapper( *pxDoc, sToCompare, sSuffix ); Reference< XPropertySet > xRet(xTbls, UNO_QUERY); @@ -3499,7 +3499,7 @@ Sequence< OUString > SwXLinkNameAccessWrapper::getElementNames(void) aRet.realloc(nOutlineCount); OUString* pResArr = aRet.getArray(); String sSuffix('|'); - sSuffix += UniString::CreateFromAscii(pMarkToOutline); + sSuffix += rtl::OUString::createFromAscii(pMarkToOutline); const SwNumRule* pOutlRule = pDoc->GetOutlineNumRule(); for (sal_uInt16 i = 0; i < nOutlineCount; ++i) { diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx index 62c78b20d1e0..2bcc85248634 100644 --- a/sw/source/ui/utlui/attrdesc.cxx +++ b/sw/source/ui/utlui/attrdesc.cxx @@ -75,7 +75,7 @@ void SwAttrSet::GetPresentation( SfxMapUnit ePresMetric, String &rText ) const { -static sal_Char const sKomma[] = ", "; + static sal_Char const sKomma[] = ", "; rText.Erase(); String aStr; @@ -90,7 +90,7 @@ static sal_Char const sKomma[] = ", "; ePresMetric, aStr, &rInt ); if( rText.Len() && aStr.Len() ) - rText += String::CreateFromAscii(sKomma); + rText += rtl::OUString(sKomma); rText += aStr; if( aIter.IsAtEnd() ) break; diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index a0497aa8ea3b..0b26be5c04f3 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -227,7 +227,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) { case CONTENT_TYPE_OUTLINE : { - sTypeToken = C2S(pMarkToOutline); + sTypeToken = rtl::OUString::createFromAscii(pMarkToOutline); sal_uInt16 nOutlineCount = nMemberCount = static_cast<sal_uInt16>(pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount()); if(nOutlineLevel < MAXLEVEL) @@ -243,7 +243,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) break; case CONTENT_TYPE_TABLE : - sTypeToken = C2S(pMarkToTable); + sTypeToken = rtl::OUString::createFromAscii(pMarkToTable); nMemberCount = pWrtShell->GetTblFrmFmtCount(sal_True); bEdit = sal_True; break; @@ -253,16 +253,16 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) case CONTENT_TYPE_OLE : { FlyCntType eType = FLYCNTTYPE_FRM; - sTypeToken = C2S(pMarkToFrame); + sTypeToken = rtl::OUString::createFromAscii(pMarkToFrame); if(nContentType == CONTENT_TYPE_OLE) { eType = FLYCNTTYPE_OLE; - sTypeToken = C2S(pMarkToOLE); + sTypeToken = rtl::OUString::createFromAscii(pMarkToOLE); } else if(nContentType == CONTENT_TYPE_GRAPHIC) { eType = FLYCNTTYPE_GRF; - sTypeToken = C2S(pMarkToGraphic); + sTypeToken = rtl::OUString::createFromAscii(pMarkToGraphic); } nMemberCount = pWrtShell->GetFlyCount(eType); bEdit = sal_True; @@ -330,7 +330,7 @@ void SwContentType::Init(sal_Bool* pbInvalidateWindow) } } nMemberCount = pMember->Count(); - sTypeToken = C2S(pMarkToRegion); + sTypeToken = rtl::OUString::createFromAscii(pMarkToRegion); bEdit = sal_True; bDelete = sal_False; if(pOldMember) @@ -804,7 +804,7 @@ void SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged) SwContentTree::SwContentTree(Window* pParent, const ResId& rResId) : SvTreeListBox( pParent, rResId ), - sSpace(C2S(" ")), + sSpace(rtl::OUString(" ")), sRemoveIdx(SW_RES(ST_REMOVE_INDEX)), sUpdateIdx(SW_RES(ST_UPDATE)), @@ -1013,9 +1013,9 @@ PopupMenu* SwContentTree::CreateContextMenu( void ) if(pHiddenShell) { String sHiddenEntry = pHiddenShell->GetView().GetDocShell()->GetTitle(); - sHiddenEntry += C2S(" ( "); + sHiddenEntry += rtl::OUString(" ( "); sHiddenEntry += aContextStrings[ ST_HIDDEN - ST_CONTEXT_FIRST]; - sHiddenEntry += C2S(" )"); + sHiddenEntry += rtl::OUString(" )"); pSubPop3->InsertItem(nId, sHiddenEntry); } @@ -2523,7 +2523,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) if(((SwContent*)pUserData)->IsInvisible()) { if(sEntry.Len()) - sEntry += C2S(", "); + sEntry += rtl::OUString(", "); sEntry += sInvisible; bRet = sal_True; } @@ -2959,11 +2959,11 @@ void SwContentTree::EditEntry(SvLBoxEntry* pEntry, sal_uInt8 nMode) String sForbiddenChars; if(CONTENT_TYPE_BOOKMARK == nType) { - sForbiddenChars = C2S("/\\@:*?\";,.#"); + sForbiddenChars = rtl::OUString("/\\@:*?\";,.#"); } else if(CONTENT_TYPE_TABLE == nType) { - sForbiddenChars = C2S(" .<>"); + sForbiddenChars = rtl::OUString(" .<>"); } pDlg->SetForbiddenChars(sForbiddenChars); pDlg->Execute(); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 79a1c869afa2..29814b00389c 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -726,7 +726,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const String* pF Application::SetDefDialogParent( this ); delete pDocInserter; pDocInserter = new ::sfx2::DocumentInserter( - String::CreateFromAscii("swriter"), true ); + rtl::OUString("swriter"), true ); pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) ); } else if ( pFileName->Len() ) @@ -1200,7 +1200,7 @@ void SwGlobalTree::OpenDoc(const SwGlblDocContent* pCont) SfxStringItem aURL(SID_FILE_NAME, sFileName); SfxBoolItem aReadOnly(SID_DOC_READONLY, sal_False); - SfxStringItem aTargetFrameName( SID_TARGETNAME, String::CreateFromAscii("_blank") ); + SfxStringItem aTargetFrameName( SID_TARGETNAME, rtl::OUString("_blank") ); SfxStringItem aReferer(SID_REFERER, pActiveShell->GetView().GetDocShell()->GetTitle()); pActiveShell->GetView().GetViewFrame()->GetDispatcher()-> Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON, diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx index 1a3e6d4319d1..75f787a3f32c 100644 --- a/sw/source/ui/utlui/initui.cxx +++ b/sw/source/ui/utlui/initui.cxx @@ -254,14 +254,14 @@ ImpAutoFmtNameListLoader::ImpAutoFmtNameListLoader( std::vector<String>& rLst ) { #ifdef WNT //fuer Windows Sonderbehandlung, da MS hier ein paar Zeichen im Dialogfont vergessen hat - p.SearchAndReplace(C2S("%1"), C2S(",,")); - p.SearchAndReplace(C2S("%2"), C2S("''")); + p.SearchAndReplace(rtl::OUString("%1"), rtl::OUString(",,")); + p.SearchAndReplace(rtl::OUString("%2"), rtl::OUString("''")); #else const SvtSysLocale aSysLocale; const LocaleDataWrapper& rLclD = aSysLocale.GetLocaleData(); //unter richtigen Betriebssystemen funktioniert es auch so - p.SearchAndReplace(C2S("%1"), rLclD.getDoubleQuotationMarkStart()); - p.SearchAndReplace(C2S("%2"), rLclD.getDoubleQuotationMarkEnd()); + p.SearchAndReplace(rtl::OUString("%1"), rLclD.getDoubleQuotationMarkStart()); + p.SearchAndReplace(rtl::OUString("%2"), rLclD.getDoubleQuotationMarkEnd()); #endif } rLst.insert(rLst.begin() + n, p); diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 903d6affc852..d04e6a5778cb 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -1091,7 +1091,7 @@ void SwNavigationPI::UpdateListBox() if ( !pDoc->IsHelpDocument() ) { String sEntry = pDoc->GetTitle(); - sEntry += C2S(" ("); + sEntry += rtl::OUString(" ("); if (pView == pActView) { nAct = nCount; @@ -1117,7 +1117,7 @@ void SwNavigationPI::UpdateListBox() { String sEntry = aContentTree.GetHiddenWrtShell()->GetView(). GetDocShell()->GetTitle(); - sEntry += C2S(" ("); + sEntry += rtl::OUString(" ("); sEntry += aStatusArr[ST_HIDDEN - ST_STATUS_FIRST]; sEntry += ')'; aDocListBox.InsertEntry(sEntry); @@ -1234,8 +1234,7 @@ sal_Int8 SwNavigationPI::ExecuteDrop( const ExecuteDropEvent& rEvt ) DELETEZ( pxObjectShell); } SfxStringItem aFileItem(SID_FILE_NAME, sFileName ); - String sOptions = C2S("HRC"); - SfxStringItem aOptionsItem( SID_OPTIONS, sOptions ); + SfxStringItem aOptionsItem( SID_OPTIONS, rtl::OUString("HRC") ); SfxLinkItem aLink( SID_DONELINK, LINK( this, SwNavigationPI, DoneLink ) ); GetActiveView()->GetViewFrame()->GetDispatcher()->Execute( diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx index bdf712cc2fd6..8f3679f6556c 100644 --- a/sw/source/ui/utlui/numfmtlb.cxx +++ b/sw/source/ui/utlui/numfmtlb.cxx @@ -242,7 +242,7 @@ void NumFormatListBox::SetFormatType(const short nFormatType) sValue = pFmt->GetFormatstring(); else if( nFormatType == NUMBERFORMAT_TEXT ) { - String sTxt(C2S("\"ABC\"")); + String sTxt(rtl::OUString("\"ABC\"")); pFormatter->GetOutputString( sTxt, nFormat, sValue, &pCol); } @@ -317,7 +317,7 @@ void NumFormatListBox::SetDefFormat(const sal_uLong nDefFmt) if (nType == NUMBERFORMAT_TEXT) { - String sTxt(C2S("\"ABC\"")); + String sTxt(rtl::OUString("\"ABC\"")); pFormatter->GetOutputString(sTxt, nDefFmt, sValue, &pCol); } else diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx index 98eb46ecc3a8..e3438e6ccfa4 100644 --- a/sw/source/ui/utlui/unotools.cxx +++ b/sw/source/ui/utlui/unotools.cxx @@ -108,7 +108,7 @@ void SwOneExampleFrame::CreateErrorMessage(Window* pParent) if(SwOneExampleFrame::bShowServiceNotAvailableMessage) { String sInfo(SW_RES(STR_SERVICE_UNAVAILABLE)); - sInfo += C2S(cFrameControl); + sInfo += rtl::OUString(cFrameControl); InfoBox(pParent, sInfo).Execute(); SwOneExampleFrame::bShowServiceNotAvailableMessage = sal_False; } @@ -144,10 +144,10 @@ void SwOneExampleFrame::CreateControl() uno::Reference< beans::XPropertySet > xPrSet(xInst, uno::UNO_QUERY); uno::Any aURL; // create new doc - String sTempURL = C2S(cFactory); + rtl::OUString sTempURL(cFactory); if(sArgumentURL.Len()) sTempURL = sArgumentURL; - aURL <<= OUString(sTempURL); + aURL <<= sTempURL; uno::Sequence<beans::PropertyValue> aSeq(3); beans::PropertyValue* pValues = aSeq.getArray(); @@ -412,7 +412,7 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt) { String sTemp; sTemp = String::CreateFromInt32(nZoomValues[i]); - sTemp += String::CreateFromAscii(" %"); + sTemp += rtl::OUString(" %"); aSubPop1.InsertItem( ITEM_ZOOM + i + 1, sTemp); if(nZoom == nZoomValues[i]) aSubPop1.CheckItem(ITEM_ZOOM + i + 1); diff --git a/sw/source/ui/web/wgrfsh.cxx b/sw/source/ui/web/wgrfsh.cxx index c56fb9211f96..4299025c0621 100644 --- a/sw/source/ui/web/wgrfsh.cxx +++ b/sw/source/ui/web/wgrfsh.cxx @@ -50,7 +50,7 @@ SwWebGrfShell::SwWebGrfShell(SwView &_rView) : SwGrfShell(_rView) { - SetName(String::CreateFromAscii("Graphic")); + SetName(rtl::OUString("Graphic")); SetHelpId(SW_GRFSHELL); } diff --git a/sw/source/ui/web/wlistsh.cxx b/sw/source/ui/web/wlistsh.cxx index 9132acce4204..1e5ad3396ced 100644 --- a/sw/source/ui/web/wlistsh.cxx +++ b/sw/source/ui/web/wlistsh.cxx @@ -53,7 +53,7 @@ TYPEINIT1(SwWebListShell,SwListShell) SwWebListShell::SwWebListShell(SwView &_rView) : SwListShell(_rView) { - SetName(String::CreateFromAscii("List")); + SetName(rtl::OUString("List")); SetHelpId(SW_LISTSHELL); } diff --git a/sw/source/ui/web/wolesh.cxx b/sw/source/ui/web/wolesh.cxx index 37e6ffd179f6..9d93f13836a4 100644 --- a/sw/source/ui/web/wolesh.cxx +++ b/sw/source/ui/web/wolesh.cxx @@ -54,7 +54,7 @@ SwWebOleShell::SwWebOleShell(SwView &_rView) : SwOleShell(_rView) { - SetName(String::CreateFromAscii("Object")); + SetName(rtl::OUString("Object")); SetHelpId(SW_OLESHELL); } diff --git a/sw/source/ui/web/wtabsh.cxx b/sw/source/ui/web/wtabsh.cxx index 16876365ffa9..c797bf0ae5eb 100644 --- a/sw/source/ui/web/wtabsh.cxx +++ b/sw/source/ui/web/wtabsh.cxx @@ -60,7 +60,7 @@ SwWebTableShell::SwWebTableShell(SwView &_rView) : SwTableShell(_rView) { GetShell().UpdateTable(); - SetName(String::CreateFromAscii("Table")); + SetName(rtl::OUString("Table")); SetHelpId(SW_TABSHELL); } |