summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-06-20 23:57:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-06-21 15:07:52 +0100
commitc3f2401d49b1374431da54e799a23bc122c5def7 (patch)
tree81ea39989af360ca879c7a84e7b1643698255589 /sw
parent3d506e814719ecaa5862663bce467994ccf31a4d (diff)
reduce scope and replace some String::CreateFromAscii
Change-Id: I8c375e3bfbcd3d7046a8bdb1968934b7d7ca96f8
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/acccontext.cxx6
-rw-r--r--sw/source/core/attr/swatrset.cxx3
-rw-r--r--sw/source/core/doc/docdraw.cxx6
-rw-r--r--sw/source/core/doc/docedt.cxx5
-rw-r--r--sw/source/core/doc/docglbl.cxx6
-rw-r--r--sw/source/core/doc/notxtfrm.cxx3
-rw-r--r--sw/source/core/doc/tblafmt.cxx3
-rw-r--r--sw/source/core/draw/drawdoc.cxx3
-rw-r--r--sw/source/core/edit/autofmt.cxx6
-rw-r--r--sw/source/core/frmedt/fetab.cxx6
-rw-r--r--sw/source/core/layout/paintfrm.cxx3
-rw-r--r--sw/source/core/swg/SwXMLTextBlocks1.cxx17
-rw-r--r--sw/source/core/view/viewimp.cxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx6
-rw-r--r--sw/source/filter/basflt/iodetect.cxx26
-rw-r--r--sw/source/filter/html/swhtml.cxx29
-rw-r--r--sw/source/filter/ww1/fltshell.cxx6
-rw-r--r--sw/source/filter/ww1/w1filter.cxx3
-rw-r--r--sw/source/ui/app/docshini.cxx2
19 files changed, 58 insertions, 83 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx
index 4e46af13859f..d4efa24e2dab 100644
--- a/sw/source/core/access/acccontext.cxx
+++ b/sw/source/core/access/acccontext.cxx
@@ -1420,14 +1420,12 @@ OUString SwAccessibleContext::GetResource( sal_uInt16 nResId,
if( pArg1 )
{
- sStr.SearchAndReplace( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )),
+ sStr.SearchAndReplace( rtl::OUString("$(ARG1)"),
String( *pArg1 ) );
}
if( pArg2 )
{
- sStr.SearchAndReplace( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "$(ARG2)" )),
+ sStr.SearchAndReplace( rtl::OUString("$(ARG2)"),
String( *pArg2 ) );
}
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index f03d0ccbf640..07306c4da4c9 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -47,8 +47,7 @@
SwAttrPool::SwAttrPool( SwDoc* pD )
- : SfxItemPool( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "SWG" )),
+ : SfxItemPool( rtl::OUString("SWG"),
POOLATTR_BEGIN, POOLATTR_END-1,
aSlotTab, aAttrTab ),
pDoc( pD )
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index cbff06442cd2..8e5db3d1a9b7 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -261,8 +261,7 @@ SwDrawContact* SwDoc::GroupSelection( SdrView& rDrawView )
pObj->NbcMove( Size( aAnchorPos.X(), aAnchorPos.Y() ) );
}
- pFmt = MakeDrawFrmFmt( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "DrawObject" )),
+ pFmt = MakeDrawFrmFmt( rtl::OUString("DrawObject"),
GetDfltFrmFmt() );
pFmt->SetFmtAttr( aAnch );
// #i36010# - set layout direction of the position
@@ -327,8 +326,7 @@ void SwDoc::UnGroupSelection( SdrView& rDrawView )
SdrObject *pMyObj = rMrkList.GetMark( 0 )->GetMarkedSdrObj();
if( !pMyObj->GetUpGroup() )
{
- String sDrwFmtNm( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM("DrawObject" )));
+ rtl::OUString sDrwFmtNm("DrawObject");
for ( sal_uInt16 i = 0; i < nMarkCount; ++i )
{
SdrObject *pObj = rMrkList.GetMark( i )->GetMarkedSdrObj();
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index e72196633e57..371351da7b4b 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2142,8 +2142,7 @@ sal_Bool lcl_GetTokenToParaBreak( String& rStr, String& rRet, sal_Bool bRegExpRp
if( bRegExpRplc )
{
xub_StrLen nPos = 0;
- String sPara( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "\\n" )));
+ rtl::OUString sPara("\\n");
while( STRING_NOTFOUND != ( nPos = rStr.Search( sPara, nPos )) )
{
// Has this been escaped?
@@ -2155,7 +2154,7 @@ sal_Bool lcl_GetTokenToParaBreak( String& rStr, String& rRet, sal_Bool bRegExpRp
else
{
rRet = rStr.Copy( 0, nPos );
- rStr.Erase( 0, nPos + sPara.Len() );
+ rStr.Erase( 0, nPos + sPara.getLength() );
bRet = sal_True;
break;
}
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index d3a4cf5f5206..60dbf890cad0 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -207,13 +207,11 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const String& rPath, bool bOutline, c
switch( eDocType )
{
case SPLITDOC_TO_HTML:
- pFilter = SwIoSystem::GetFilterOfFormat( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "HTML" )));
+ pFilter = SwIoSystem::GetFilterOfFormat(rtl::OUString("HTML"));
break;
default:
- pFilter = SwIoSystem::GetFilterOfFormat(
- String::CreateFromAscii( FILTER_XML ));
+ pFilter = SwIoSystem::GetFilterOfFormat(rtl::OUString(FILTER_XML));
eDocType = SPLITDOC_TO_GLOBALDOC;
break;
}
diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx
index 0233e55e36e5..7d45201616d8 100644
--- a/sw/source/core/doc/notxtfrm.cxx
+++ b/sw/source/core/doc/notxtfrm.cxx
@@ -103,8 +103,7 @@ void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
pFont = new Font();
pFont->SetWeight( WEIGHT_BOLD );
pFont->SetStyleName( aEmptyStr );
- pFont->SetName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "Arial Unicode" )));
+ pFont->SetName(rtl::OUString("Arial Unicode"));
pFont->SetFamily( FAMILY_SWISS );
pFont->SetTransparent( sal_True );
}
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index a015d01b42af..65f26200e887 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1126,8 +1126,7 @@ SwTableAutoFmtTbl::SwTableAutoFmtTbl()
sal_Bool SwTableAutoFmtTbl::Load()
{
sal_Bool bRet = sal_False;
- String sNm( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( sAutoTblFmtName )));
+ String sNm(rtl::OUString(sAutoTblFmtName));
SvtPathOptions aOpt;
if( aOpt.SearchFile( sNm, SvtPathOptions::PATH_USERCONFIG ))
{
diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx
index 00ea9c7e276a..703b50e0fdbe 100644
--- a/sw/source/core/draw/drawdoc.cxx
+++ b/sw/source/core/draw/drawdoc.cxx
@@ -156,8 +156,7 @@ SwDrawDocument::~SwDrawDocument()
SdrPage* SwDrawDocument::AllocPage(bool bMasterPage)
{
SwDPage* pPage = new SwDPage(*this, 0 != bMasterPage);
- pPage->SetName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "Controls" )) );
+ pPage->SetName(rtl::OUString("Controls"));
return pPage;
}
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 40047278093d..667fed3d21bd 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -313,8 +313,7 @@ void SwAutoFormat::_SetRedlineTxt( sal_uInt16 nActionId )
}
#if OSL_DEBUG_LEVEL > 0
else
- sTxt = String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "Action-Text fehlt" ));
+ sTxt = rtl::OUString("Action-Text fehlt");
#endif
pDoc->SetAutoFmtRedlineComment( &sTxt, nSeqNo );
@@ -1834,8 +1833,7 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
{
String sTxt(ViewShell::GetShellRes()->GetAutoFmtNameLst()[
STR_AUTOFMTREDL_SET_TMPL_HEADLINE ] );
- sTxt.SearchAndReplace( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "$(ARG1)" )),
+ sTxt.SearchAndReplace( rtl::OUString("$(ARG1)"),
String::CreateFromInt32( nLvl + 1 ) );
pDoc->SetAutoFmtRedlineComment( &sTxt );
}
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index 65f67e4125b6..843dff9bcfcf 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -2392,8 +2392,7 @@ sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
// restore previous spaces!
for( size_t i = aCells.size(); n+1 < i; )
{
- String sTmp( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "|<" )) );
+ String sTmp(rtl::OUString("|<"));
sTmp += aCells[ --i ]->GetTabBox()->GetName();
sTmp += '>';
rFml.Insert( sTmp, nInsPos );
@@ -2430,8 +2429,7 @@ sal_Bool SwFEShell::GetAutoSum( String& rFml ) const
// restore previous spaces!
for( size_t i = aCells.size(); n+1 < i; )
{
- String sTmp( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "|<" )) );
+ String sTmp(rtl::OUString("|<" ));
sTmp += aCells[ --i ]->GetTabBox()->GetName();
sTmp += '>';
rFml.Insert( sTmp, nInsPos );
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 2510c45b507e..2520bc94b723 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -6828,8 +6828,7 @@ const Font& SwPageFrm::GetEmptyPageFont()
pEmptyPgFont->SetSize( Size( 0, 80 * 20 )); // == 80 pt
pEmptyPgFont->SetWeight( WEIGHT_BOLD );
pEmptyPgFont->SetStyleName( aEmptyStr );
- pEmptyPgFont->SetName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "Helvetica" )) );
+ pEmptyPgFont->SetName(rtl::OUString("Helvetica"));
pEmptyPgFont->SetFamily( FAMILY_SWISS );
pEmptyPgFont->SetTransparent( sal_True );
pEmptyPgFont->SetColor( COL_GRAY );
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 3a20eb832b87..f8feb966f171 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -99,7 +99,7 @@ sal_uLong SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
}
else
{
- String aStreamName = aFolderName + (OUString) String::CreateFromAscii(".xml");
+ String aStreamName = aFolderName + rtl::OUString(".xml");
try
{
xRoot = xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
@@ -315,7 +315,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
sal_uLong n = 0;
sal_Bool bTextOnly = sal_True;
String aFolderName = GeneratePackageName ( rShort );
- String aStreamName = aFolderName + (OUString) String::CreateFromAscii(".xml");
+ String aStreamName = aFolderName + rtl::OUString(".xml");
rText.Erase();
try
@@ -325,7 +325,7 @@ sal_uLong SwXMLTextBlocks::GetBlockText( const String& rShort, String& rText )
if ( !xAccess->hasByName( aStreamName ) || !xRoot->isStreamElement( aStreamName ) )
{
bTextOnly = sal_False;
- aStreamName = String::CreateFromAscii("content.xml");
+ aStreamName = rtl::OUString("content.xml");
}
uno::Reference < io::XStream > xContents = xRoot->openStreamElement( aStreamName, embed::ElementModes::READ );
@@ -400,7 +400,7 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
}
*/
String aFolderName( rPackageName );
- String aStreamName = aFolderName + (OUString) String::CreateFromAscii(".xml");
+ String aStreamName = aFolderName + rtl::OUString(".xml");
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
comphelper::getProcessServiceFactory();
@@ -423,11 +423,10 @@ sal_uLong SwXMLTextBlocks::PutBlockText( const String& rShort, const String& ,
embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime ( RTL_CONSTASCII_USTRINGPARAM ( "text/xml") );
Any aAny;
aAny <<= aMime;
- xSet->setPropertyValue( aPropName, aAny );
+ xSet->setPropertyValue( rtl::OUString("MediaType"), aAny );
uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY);
xSrc->setOutputStream(xOut);
@@ -571,11 +570,10 @@ void SwXMLTextBlocks::WriteInfo( void )
embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime ( RTL_CONSTASCII_USTRINGPARAM ( "text/xml") );
Any aAny;
aAny <<= aMime;
- xSet->setPropertyValue( aPropName, aAny );
+ xSet->setPropertyValue( rtl::OUString("MediaType"), aAny );
uno::Reference < io::XOutputStream > xOut = xDocStream->getOutputStream();
uno::Reference<io::XActiveDataSource> xSrc(xWriter, uno::UNO_QUERY);
xSrc->setOutputStream(xOut);
@@ -646,11 +644,10 @@ sal_uLong SwXMLTextBlocks::SetMacroTable(
embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE );
uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY );
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime ( RTL_CONSTASCII_USTRINGPARAM ( "text/xml") );
Any aAny;
aAny <<= aMime;
- xSet->setPropertyValue( aPropName, aAny );
+ xSet->setPropertyValue( rtl::OUString("MediaType"), aAny );
uno::Reference < io::XOutputStream > xOutputStream = xDocStream->getOutputStream();
// get XML writer
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 98d2311c8d29..3c61405ee7ee 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -334,7 +334,7 @@ void SwViewImp::MakeDrawView()
pDrawView = new SwDrawView( *this, pIDDMA->GetDrawModel(), pOutDevForDrawView);
}
- GetDrawView()->SetActiveLayer( XubString::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Heaven" ) ) );
+ GetDrawView()->SetActiveLayer(rtl::OUString("Heaven"));
const SwViewOption* pSwViewOption = GetShell()->GetViewOptions();
Init(pSwViewOption);
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 052f359db375..2a06f9614d7c 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -272,8 +272,7 @@ sal_Bool SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOpti
</FilterFlags>
*/
-#define FILTER_OPTION_ROOT String::CreateFromAscii( \
- RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
+#define FILTER_OPTION_ROOT rtl::OUString("Office.Writer/FilterFlags")
SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
sal_uInt32* pValues )
@@ -543,8 +542,7 @@ void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
// if the first node dont contained any content, then
// insert one char in it calc again and delete once again
SwIndex aNdIdx( pFirstTxtNd );
- pFirstTxtNd->InsertText( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
+ pFirstTxtNd->InsertText(rtl::OUString("MM"), aNdIdx);
sal_uLong nAbsMinCnts;
pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
nMinFrm, nMaxFrm, nAbsMinCnts );
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 41adf6762445..f45b4b0991e7 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -105,19 +105,17 @@ const String SwIoSystem::GetSubStorageName( const SfxFilter& rFltr )
if( rUserData.EqualsAscii(FILTER_XML) ||
rUserData.EqualsAscii(FILTER_XMLV) ||
rUserData.EqualsAscii(FILTER_XMLVW) )
- return String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "content.xml" ));
+ return rtl::OUString("content.xml");
if( rUserData.EqualsAscii(sWW6) || rUserData.EqualsAscii(FILTER_WW8) )
- return String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "WordDocument" ));
- return String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "" ));
+ return rtl::OUString("WordDocument");
+ return rtl::OUString();
}
const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm,
const SfxFilterContainer* pCnt)
{
- SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
- SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
+ SfxFilterContainer aCntSw( rtl::OUString(sSWRITER) );
+ SfxFilterContainer aCntSwWeb( rtl::OUString(sSWRITERWEB) );
const SfxFilterContainer* pFltCnt = pCnt ? pCnt : ( IsDocShellRegistered() ? &aCntSw : &aCntSwWeb );
do {
@@ -177,13 +175,13 @@ sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter
if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) ||
rFilter.GetUserData().EqualsAscii(sWW6) )
{
- bRet = !((rStg.IsContained( String::CreateFromAscii("0Table" )) ||
- rStg.IsContained( String::CreateFromAscii("1Table" ))) ^
+ bRet = !((rStg.IsContained( rtl::OUString("0Table")) ||
+ rStg.IsContained( rtl::OUString("1Table"))) ^
rFilter.GetUserData().EqualsAscii(FILTER_WW8));
if (bRet && !rFilter.IsAllowedAsTemplate())
{
SotStorageStreamRef xRef =
- rStg.OpenSotStream(String::CreateFromAscii("WordDocument"),
+ rStg.OpenSotStream(rtl::OUString("WordDocument"),
STREAM_STD_READ | STREAM_NOCREATE );
xRef->Seek(10);
sal_uInt8 nByte;
@@ -216,8 +214,8 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
{
sal_Bool bRet = sal_False;
- SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
- SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
+ SfxFilterContainer aCntSw( rtl::OUString(sSWRITER) );
+ SfxFilterContainer aCntSwWeb( rtl::OUString(sSWRITERWEB) );
const SfxFilterContainer& rFltContainer = IsDocShellRegistered() ? aCntSw : aCntSwWeb;
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStor;
@@ -288,8 +286,8 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
const String& rPrefFltName, SfxMedium* pMedium)
{
- SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
- SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
+ SfxFilterContainer aCntSw( rtl::OUString(sSWRITER) );
+ SfxFilterContainer aCntSwWeb( rtl::OUString(sSWRITERWEB) );
const SfxFilterContainer* pFCntnr = IsDocShellRegistered() ? &aCntSw : &aCntSwWeb;
if( !pFCntnr )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 6da5da760823..166ad70f8347 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <comphelper/string.hxx>
+#include <rtl/ustrbuf.hxx>
#include <sfx2/sfx.hrc>
#include <svx/svxids.hrc>
#if OSL_DEBUG_LEVEL > 0
@@ -5371,25 +5372,25 @@ void SwHTMLParser::ParseMoreMetaOptions()
return;
}
- String sText(
- String::CreateFromAscii(TOOLS_CONSTASCII_STRINGPARAM("HTML: <")) );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_meta) );
- sText.Append( ' ' );
+ rtl::OUStringBuffer sText;
+ sText.append("HTML: <");
+ sText.append(OOO_STRING_SVTOOLS_HTML_meta);
+ sText.append(' ');
if( bHTTPEquiv )
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_O_httpequiv) );
+ sText.append(OOO_STRING_SVTOOLS_HTML_O_httpequiv);
else
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_O_name) );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("=\"") );
- sText.Append( aName );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("\" ") );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_O_content) );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("=\"") );
- sText.Append( aContent );
- sText.AppendAscii( TOOLS_CONSTASCII_STRINGPARAM("\">") );
+ sText.append(OOO_STRING_SVTOOLS_HTML_O_name);
+ sText.append("=\"");
+ sText.append(aName);
+ sText.append("\" ");
+ sText.append(OOO_STRING_SVTOOLS_HTML_O_content);
+ sText.append("=\"");
+ sText.append(aContent);
+ sText.append("\">");
SwPostItField aPostItFld(
(SwPostItFieldType*)pDoc->GetSysFldType( RES_POSTITFLD ),
- aEmptyStr, sText, DateTime( DateTime::SYSTEM ) );
+ aEmptyStr, sText.makeStringAndClear(), DateTime( DateTime::SYSTEM ) );
SwFmtFld aFmtFld( aPostItFld );
InsertAttr( aFmtFld );
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 4e155642067b..719dfb6c8051 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -1001,8 +1001,7 @@ SwFltShell::~SwFltShell()
SwDoc& rDoc = GetDoc();
// 1. SectionFmt und Section anlegen
SwSectionFmt* pSFmt = rDoc.MakeSectionFmt( 0 );
- SwSectionData aSectionData( CONTENT_SECTION, String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM("PMW-Protect") ));
+ SwSectionData aSectionData(CONTENT_SECTION, rtl::OUString("PMW-Protect"));
aSectionData.SetProtectFlag( true );
// 2. Start- und EndIdx suchen
const SwNode* pEndNd = &rDoc.GetNodes().GetEndOfContent();
@@ -1085,8 +1084,7 @@ SwFltShell& SwFltShell::operator << ( const sal_Unicode c )
SwFltShell& SwFltShell::AddError( const sal_Char* pErr )
{
- String aName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "ErrorTag" )));
+ String aName(rtl::OUString("ErrorTag"));
SwFieldType* pFT = GetDoc().GetFldType( RES_SETEXPFLD, aName, false );
if( pFT == 0)
{
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index ec1c754ee16e..0a46f88ec661 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -822,8 +822,7 @@ oncemore:
}
else // rekursion:
{
- String aName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "Ww" )));
+ rtl::OUString aName("Ww");
aName += String::CreateFromInt32( nPlcIndex );
SwFieldType* pFT = rOut.GetDoc().GetFldType( RES_SETEXPFLD, aName, false);
if (pFT == 0)
diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx
index 383b4a3e4292..e0ce4e011849 100644
--- a/sw/source/ui/app/docshini.cxx
+++ b/sw/source/ui/app/docshini.cxx
@@ -646,7 +646,7 @@ sal_Bool SwDocShell::LoadFrom( SfxMedium& rMedium )
do { // middle check loop
sal_uInt32 nErr = ERR_SWG_READ_ERROR;
String aStreamName;
- aStreamName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("styles.xml"));
+ aStreamName = rtl::OUString("styles.xml");
uno::Reference < container::XNameAccess > xAccess( rMedium.GetStorage(), uno::UNO_QUERY );
if ( xAccess->hasByName( aStreamName ) && rMedium.GetStorage()->isStreamElement( aStreamName ) )
{