summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basic/source/uno/namecont.cxx18
-rw-r--r--basic/source/uno/scriptcont.cxx6
-rw-r--r--editeng/source/misc/svxacorr.cxx11
-rw-r--r--editeng/source/misc/swafopt.cxx3
-rw-r--r--filter/source/msfilter/msdffimp.cxx12
-rw-r--r--filter/source/msfilter/msoleexp.cxx28
-rw-r--r--sfx2/source/appl/impldde.cxx2
-rw-r--r--sfx2/source/appl/linkmgr2.cxx5
-rw-r--r--sfx2/source/doc/docfilt.cxx12
-rw-r--r--sot/inc/sot/object.hxx15
-rw-r--r--sot/source/sdstor/stgdir.cxx2
-rw-r--r--sot/source/sdstor/stgole.cxx4
-rw-r--r--sot/source/sdstor/storinfo.cxx2
-rw-r--r--svl/source/misc/inettype.cxx4
-rw-r--r--svtools/source/filter/FilterConfigCache.cxx4
-rw-r--r--svtools/source/filter/filter.cxx60
-rw-r--r--svtools/source/filter/igif/gifread.cxx2
-rw-r--r--svtools/source/filter/ixbm/xbmread.cxx2
-rw-r--r--svtools/source/filter/jpeg/jpeg.cxx2
-rw-r--r--svtools/source/filter/sgvmain.cxx3
-rw-r--r--svtools/source/filter/sgvtext.cxx14
-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
-rw-r--r--tools/source/fsys/tdir.cxx2
41 files changed, 152 insertions, 202 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 2baa1853a35b..fc7b5328cfaa 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1393,7 +1393,6 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
embed::ElementModes::READWRITE );
// throw uno::RuntimeException(); // TODO: method must either return the stream or throw an exception
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") );
uno::Reference< beans::XPropertySet > xProps( xElementStream, uno::UNO_QUERY );
@@ -1404,11 +1403,10 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
if ( xProps.is() )
{
- xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+ xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) );
// #87671 Allow encryption
- aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) );
- xProps->setPropertyValue( aPropName, uno::makeAny( sal_True ) );
+ xProps->setPropertyValue( rtl::OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
Reference< XOutputStream > xOutput = xElementStream->getOutputStream();
Reference< XNameContainer > xLib( pLib );
@@ -1541,13 +1539,11 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
if ( xProps.is() )
{
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") );
- xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+ xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) );
// #87671 Allow encryption
- aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "UseCommonStoragePasswordEncryption" ) );
- xProps->setPropertyValue( aPropName, uno::makeAny( sal_True ) );
+ xProps->setPropertyValue( rtl::OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
xOut = xInfoStream->getOutputStream();
}
@@ -2014,13 +2010,11 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto
if ( !xProps.is() )
throw uno::RuntimeException();
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") );
- xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+ xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) );
// #87671 Allow encryption
- aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("UseCommonStoragePasswordEncryption") );
- xProps->setPropertyValue( aPropName, uno::makeAny( sal_True ) );
+ xProps->setPropertyValue( rtl::OUString("UseCommonStoragePasswordEncryption"), uno::makeAny( sal_True ) );
xOut = xInfoStream->getOutputStream();
}
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 30e4328c812b..45311f567a6b 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -688,9 +688,8 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
if ( !xProps.is() )
throw uno::RuntimeException();
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( "text/xml" );
- xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+ xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) );
// Set encryption key
setStreamKey( xSourceStream, pLib->maPassword );
@@ -824,9 +823,8 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
uno::Reference< beans::XPropertySet > xProps( xSourceStream, uno::UNO_QUERY );
if ( !xProps.is() )
throw uno::RuntimeException();
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( "text/xml" );
- xProps->setPropertyValue( aPropName, uno::makeAny( aMime ) );
+ xProps->setPropertyValue( rtl::OUString("MediaType"), uno::makeAny( aMime ) );
Reference< XOutputStream > xOut = xSourceStream->getOutputStream();
Reference< XNameContainer > xLib( pLib );
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 7f8da77cd122..bc23e9086bdc 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -672,7 +672,7 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
// Check the presence of "://" in the word
- xub_StrLen nStrPos = rTxt.Search( String::CreateFromAscii( "://" ), nSttWdPos + 1 );
+ xub_StrLen nStrPos = rTxt.Search( rtl::OUString( "://" ), nSttWdPos + 1 );
if ( STRING_NOTFOUND == nStrPos && nEndPos > 0 )
{
// Check the previous char
@@ -2110,11 +2110,10 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
{
xStrm->SetSize( 0 );
xStrm->SetBufferSize( 8192 );
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
OUString aMime( "text/xml" );
uno::Any aAny;
aAny <<= aMime;
- xStrm->SetProperty( aPropName, aAny );
+ xStrm->SetProperty( rtl::OUString("MediaType"), aAny );
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
@@ -2388,7 +2387,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
aDest = INetURLObject ( sUserAutoCorrFile );
if ( SotStorage::IsOLEStorage ( sShareAutoCorrFile ) )
{
- aDest.SetExtension ( String::CreateFromAscii ( "bak" ) );
+ aDest.SetExtension ( rtl::OUString("bak") );
bConvert = sal_True;
}
bCopy = sal_True;
@@ -2397,7 +2396,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
{
aSource = INetURLObject ( sUserAutoCorrFile );
aDest = INetURLObject ( sUserAutoCorrFile );
- aDest.SetExtension ( String::CreateFromAscii ( "bak" ) );
+ aDest.SetExtension ( rtl::OUString("bak") );
bCopy = bConvert = sal_True;
}
if (bCopy)
@@ -2486,7 +2485,7 @@ sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
{
refList->SetSize( 0 );
refList->SetBufferSize( 8192 );
- String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
+ String aPropName( rtl::OUString( "MediaType" ) );
OUString aMime( "text/xml" );
uno::Any aAny;
aAny <<= aMime;
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index aa6a4e9c4699..3bdf5730b28f 100644
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -32,8 +32,7 @@
#include <editeng/swafopt.hxx>
SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
- : aBulletFont( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM( "StarSymbol" )),
+ : aBulletFont( rtl::OUString("StarSymbol"),
Size( 0, 14 ) )
{
bAutoCorrect =
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index fbcc445f9f54..88c527808613 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6766,8 +6766,7 @@ SdrObject* SvxMSDffManager::ImportOLE( long nOLEId,
sal_Bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile & rMtf )
{
- String aPersistStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( SVEXT_PERSIST_STREAM ) ) );
- SotStorageStreamRef xStm = pStor->OpenSotStream( aPersistStream );
+ SotStorageStreamRef xStm = pStor->OpenSotStream(rtl::OUString(SVEXT_PERSIST_STREAM));
xStm->SetVersion( pStor->GetVersion() );
xStm->SetBufferSize( 8192 );
@@ -6908,7 +6907,7 @@ sal_Bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
const GDIMetaFile * pMtf, const SotStorageRef& rDest )
{
sal_Bool bMtfRead = sal_False;
- SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole10Native" ) ),
+ SotStorageStreamRef xOle10Stm = rDest->OpenSotStream( rtl::OUString("\1Ole10Native"),
STREAM_WRITE| STREAM_SHARE_DENYALL );
if( xOle10Stm->GetError() )
return sal_False;
@@ -7174,7 +7173,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
static sal_Int32 nOleCount(0);
String aTmpName(RTL_CONSTASCII_USTRINGPARAM("/tmp/embedded_stream_"));
aTmpName += String::CreateFromInt32(nOleCount++);
- aTmpName += String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(".bin"));
+ aTmpName += rtl::OUString(".bin");
SvFileStream aTmpStream(aTmpName,STREAM_READ|STREAM_WRITE|STREAM_TRUNC);
pStream->Seek(0);
*pStream >> aTmpStream;
@@ -7183,7 +7182,7 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
if ( pName || pFilter )
{
//Reuse current ole name
- String aDstStgName(String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(MSO_OLE_Obj)));
+ rtl::OUString aDstStgName(MSO_OLE_Obj);
aDstStgName += String::CreateFromInt32(nMSOleObjCntr);
::rtl::OUString aFilterName;
@@ -7288,8 +7287,7 @@ SdrOle2Obj* SvxMSDffManager::CreateSdrOLEFromStorage(
// ( ist er z.B. bei FontWork nicht )
// Wenn nicht -> Einbindung als Grafik
sal_Bool bValidStorage = sal_False;
- String aDstStgName( String::CreateFromAscii(
- RTL_CONSTASCII_STRINGPARAM(MSO_OLE_Obj)));
+ rtl::OUString aDstStgName(MSO_OLE_Obj);
aDstStgName += String::CreateFromInt32( ++nMSOleObjCntr );
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index edd0ad7a160f..0ba8b7e342c3 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -53,9 +53,6 @@
#include "filter/msfilter/msoleexp.hxx"
-#define CREATE_CONST_ASC(s) String::CreateFromAscii( \
- RTL_CONSTASCII_STRINGPARAM(s))
-
using namespace ::com::sun::star;
SvGlobalName GetEmbeddedVersion( const SvGlobalName& aAppName )
@@ -79,19 +76,18 @@ SvGlobalName GetEmbeddedVersion( const SvGlobalName& aAppName )
String GetStorageType( const SvGlobalName& aEmbName )
{
if ( aEmbName == SvGlobalName( SO3_SM_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.MathDocument.1" );
+ return rtl::OUString("LibreOffice.MathDocument.1");
else if ( aEmbName == SvGlobalName( SO3_SW_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.WriterDocument.1" );
+ return rtl::OUString("LibreOffice.WriterDocument.1");
else if ( aEmbName == SvGlobalName( SO3_SC_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.CalcDocument.1" );
+ return rtl::OUString("LibreOffice.CalcDocument.1");
else if ( aEmbName == SvGlobalName( SO3_SDRAW_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.DrawDocument.1" );
+ return rtl::OUString("LibreOffice.DrawDocument.1");
else if ( aEmbName == SvGlobalName( SO3_SIMPRESS_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.ImpressDocument.1" );
+ return rtl::OUString("LibreOffice.ImpressDocument.1");
else if ( aEmbName == SvGlobalName( SO3_SCH_OLE_EMBED_CLASSID_8 ) )
- return String::CreateFromAscii( "LibreOffice.ChartDocument.1" );
-
- return String();
+ return rtl::OUString("LibreOffice.ChartDocument.1");
+ return rtl::OUString();
}
sal_Bool UseOldMSExport()
@@ -239,8 +235,8 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE,
GetStorageType( aEmbName ) );
SotStorageStreamRef xExtStm = rDestStg.OpenSotStream(
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "properties_stream" ) ),
- STREAM_STD_READWRITE );
+ rtl::OUString("properties_stream"),
+ STREAM_STD_READWRITE);
sal_Bool bExtentSuccess = sal_False;
if( !xExtStm->GetError() )
@@ -294,8 +290,8 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
if ( bExtentSuccess )
{
SotStorageStreamRef xEmbStm = rDestStg.OpenSotStream(
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "package_stream" ) ),
- STREAM_STD_READWRITE );
+ rtl::OUString("package_stream"),
+ STREAM_STD_READWRITE);
if( !xEmbStm->GetError() )
{
try
@@ -349,7 +345,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
}
//We never need this stream: See #99809# and #i2179#
- rDestStg.Remove(CREATE_CONST_ASC(SVEXT_PERSIST_STREAM));
+ rDestStg.Remove(rtl::OUString(SVEXT_PERSIST_STREAM));
}
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 9184f57d92e3..73ca33ec1f5f 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -240,7 +240,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
{
sal_Bool bSysTopic;
{
- DdeConnection aTmp( sServer, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "SYSTEM" ) ) );
+ DdeConnection aTmp(sServer, rtl::OUString("SYSTEM"));
bSysTopic = !aTmp.GetError();
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index b397b3b2b3a8..9ee75174a338 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -547,8 +547,7 @@ sal_uIntPtr LinkManager::RegisterStatusInfoId()
if( !nFormat )
{
nFormat = SotExchange::RegisterFormatName(
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
- "StatusInfo from SvxInternalLink" )));
+ rtl::OUString("StatusInfo from SvxInternalLink"));
}
return nFormat;
}
@@ -704,7 +703,7 @@ sal_Bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
SfxStringItem aName( SID_FILE_NAME, sTopic );
SfxBoolItem aMinimized(SID_MINIMIZED, sal_True);
SfxBoolItem aHidden(SID_HIDDEN, sal_True);
- SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
+ SfxStringItem aTarget( SID_TARGETNAME, rtl::OUString("_blank") );
SfxStringItem aReferer( SID_REFERER, sReferer );
SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
SfxBoolItem aReadOnly(SID_DOC_READONLY, false);
diff --git a/sfx2/source/doc/docfilt.cxx b/sfx2/source/doc/docfilt.cxx
index 197fc9838eba..e428190c1a11 100644
--- a/sfx2/source/doc/docfilt.cxx
+++ b/sfx2/source/doc/docfilt.cxx
@@ -136,26 +136,26 @@ const SfxFilter* SfxFilter::GetFilterByName( const String& rName )
String SfxFilter::GetTypeFromStorage( const SotStorage& rStg )
{
const char* pType=0;
- if ( rStg.IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "WordDocument" ) ) ) )
+ if ( rStg.IsStream( rtl::OUString("WordDocument") ) )
{
- if ( rStg.IsStream( String::CreateFromAscii("0Table" ) ) || rStg.IsStream( String::CreateFromAscii("1Table" ) ) )
+ if ( rStg.IsStream( rtl::OUString("0Table") ) || rStg.IsStream( rtl::OUString("1Table") ) )
pType = "writer_MS_Word_97";
else
pType = "writer_MS_Word_95";
}
- else if ( rStg.IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Book" ) ) ) )
+ else if ( rStg.IsStream( rtl::OUString("Book") ) )
{
pType = "calc_MS_Excel_95";
}
- else if ( rStg.IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Workbook" ) ) ) )
+ else if ( rStg.IsStream( rtl::OUString("Workbook" ) ) )
{
pType = "calc_MS_Excel_97";
}
- else if ( rStg.IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "PowerPoint Document" ) ) ) )
+ else if ( rStg.IsStream( rtl::OUString("PowerPoint Document") ) )
{
pType = "impress_MS_PowerPoint_97";
}
- else if ( rStg.IsStream( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Equation Native" ) ) ) )
+ else if ( rStg.IsStream( rtl::OUString("Equation Native") ) )
{
pType = "math_MathType_3x";
}
diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx
index 239a4cd69d63..2e97cc23ae38 100644
--- a/sot/inc/sot/object.hxx
+++ b/sot/inc/sot/object.hxx
@@ -66,8 +66,7 @@ SotFactory * ClassName::ClassFactory() \
if( !*ppFactory ) \
{ \
*ppFactory = new FactoryName( GlobalName, \
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \
- ClassName::CreateInstance ); \
+ rtl::OUString( #ClassName ), ClassName::CreateInstance ); \
} \
return *ppFactory; \
} \
@@ -103,8 +102,7 @@ SotFactory * ClassName::ClassFactory() \
if( !*ppFactory ) \
{ \
*ppFactory = new FactoryName( GlobalName, \
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \
- ClassName::CreateInstance ); \
+ rtl::OUString( #ClassName ), ClassName::CreateInstance ); \
(*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \
} \
return *ppFactory; \
@@ -145,8 +143,7 @@ SotFactory * ClassName::ClassFactory() \
if( !*ppFactory ) \
{ \
*ppFactory = new FactoryName( GlobalName, \
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \
- ClassName::CreateInstance ); \
+ rtl::OUString( #ClassName ), ClassName::CreateInstance ); \
(*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \
(*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \
} \
@@ -187,8 +184,7 @@ SotFactory * ClassName::ClassFactory() \
if( !*ppFactory ) \
{ \
*ppFactory = new FactoryName( GlobalName, \
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \
- ClassName::CreateInstance );\
+ rtl::OUString( #ClassName ), ClassName::CreateInstance ); \
(*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \
(*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \
(*ppFactory)->PutSuperClass( Super3::ClassFactory() ); \
@@ -233,8 +229,7 @@ SotFactory * ClassName::ClassFactory() \
if( !*ppFactory ) \
{ \
*ppFactory = new SotFactory( GlobalName, \
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( #ClassName ) ), \
- ClassName::CreateInstance );\
+ rtl::OUString( #ClassName ), ClassName::CreateInstance ); \
(*ppFactory)->PutSuperClass( Super1::ClassFactory() ); \
(*ppFactory)->PutSuperClass( Super2::ClassFactory() ); \
(*ppFactory)->PutSuperClass( Super3::ClassFactory() ); \
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 7a69118569ef..da8d00ad9fd8 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -758,7 +758,7 @@ StgDirStrm::StgDirStrm( StgIo& r )
{
StgEntry aRoot;
aRoot.Init();
- aRoot.SetName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Root Entry" ) ) );
+ aRoot.SetName( rtl::OUString("Root Entry") );
aRoot.SetType( STG_ROOT );
pRoot = new StgDirEntry( aRoot );
pRoot->SetDirty();
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 68a7a3a00c6f..b23280ccb14f 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -103,7 +103,7 @@ void StgInternalStream::Commit()
///////////////////////// class StgCompObjStream /////////////////////////
StgCompObjStream::StgCompObjStream( BaseStorage& rStg, sal_Bool bWr )
- : StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1CompObj" ) ), bWr )
+ : StgInternalStream( rStg, rtl::OUString("\1CompObj"), bWr )
{
memset( &aClsId, 0, sizeof( ClsId ) );
nCbFormat = 0;
@@ -168,7 +168,7 @@ sal_Bool StgCompObjStream::Store()
/////////////////////////// class StgOleStream ///////////////////////////
StgOleStream::StgOleStream( BaseStorage& rStg, sal_Bool bWr )
- : StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ) ), bWr )
+ : StgInternalStream( rStg, rtl::OUString("\1Ole"), bWr )
{
nFlags = 0;
}
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index d3a84809f423..b0be41e9a295 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -47,7 +47,7 @@ sal_uLong ReadClipboardFormat( SvStream & rStm )
sal_Char * p = new sal_Char[ nLen ];
if( rStm.Read( p, nLen ) == (sal_uLong) nLen )
{
- nFormat = SotExchange::RegisterFormatName( String::CreateFromAscii( p, short(nLen-1) ) );
+ nFormat = SotExchange::RegisterFormatName(rtl::OUString(p, nLen-1, RTL_TEXTENCODING_ASCII_US));
}
else
rStm.SetError( SVSTREAM_GENERALERROR );
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index fac059bff228..0a110f7aa253 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -765,9 +765,7 @@ UniString INetContentTypes::GetContentType(INetContentType eTypeID)
if (aTypeName.Len() == 0)
{
OSL_FAIL("INetContentTypes::GetContentType(): Bad ID");
- return
- UniString::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM(
- CONTENT_TYPE_STR_APP_OCTSTREAM));
+ return rtl::OUString(CONTENT_TYPE_STR_APP_OCTSTREAM);
}
return aTypeName;
}
diff --git a/svtools/source/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx
index da5b879e6568..79743cf8c41f 100644
--- a/svtools/source/filter/FilterConfigCache.cxx
+++ b/svtools/source/filter/FilterConfigCache.cxx
@@ -434,7 +434,7 @@ String FilterConfigCache::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntr
{
String aWildcard( GetImportFormatExtension( nFormat, nEntry ) );
if ( aWildcard.Len() )
- aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 );
+ aWildcard.Insert( rtl::OUString("*."), 0 );
return aWildcard;
}
@@ -551,7 +551,7 @@ String FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntr
{
String aWildcard( GetExportFormatExtension( nFormat, nEntry ) );
if ( aWildcard.Len() )
- aWildcard.Insert( UniString::CreateFromAscii( "*.", 2 ), 0 );
+ aWildcard.Insert( rtl::OUString("*."), 0 );
return aWildcard;
}
diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx
index 0d7f1e1c298f..063f2cd64092 100644
--- a/svtools/source/filter/filter.cxx
+++ b/svtools/source/filter/filter.cxx
@@ -314,7 +314,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
}
rStream.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
if (bOK && !rStream.GetError()) {
- rFormatExtension= UniString::CreateFromAscii( "MET", 3 );
+ rFormatExtension = rtl::OUString("MET");
return sal_True;
}
}
@@ -348,7 +348,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
sFirstBytes[14+nOffs] == 0x28 ||
sFirstBytes[14+nOffs] == 0x0c )
{
- rFormatExtension = UniString::CreateFromAscii( "BMP", 3 );
+ rFormatExtension = rtl::OUString("BMP");
return sal_True;
}
}
@@ -364,13 +364,13 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if ( nFirstLong==0xd7cdc69a || nFirstLong==0x01000900 )
{
- rFormatExtension = UniString::CreateFromAscii( "WMF", 3 );
+ rFormatExtension = rtl::OUString("WMF");
return sal_True;
}
else if( nFirstLong == 0x01000000 && sFirstBytes[ 40 ] == 0x20 && sFirstBytes[ 41 ] == 0x45 &&
sFirstBytes[ 42 ] == 0x4d && sFirstBytes[ 43 ] == 0x46 )
{
- rFormatExtension = UniString::CreateFromAscii( "EMF", 3 );
+ rFormatExtension = rtl::OUString("EMF");
return sal_True;
}
}
@@ -385,7 +385,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
sal_uInt8 nEncoding=sFirstBytes[2];
if( ( nVersion==0 || nVersion==2 || nVersion==3 || nVersion==5 ) && nEncoding<=1 )
{
- rFormatExtension = UniString::CreateFromAscii( "PCX", 3 );
+ rFormatExtension = rtl::OUString("PCX");
return sal_True;
}
}
@@ -397,7 +397,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if ( nFirstLong==0x49492a00 || nFirstLong==0x4d4d002a )
{
- rFormatExtension=UniString::CreateFromAscii( "TIF", 3 );
+ rFormatExtension = rtl::OUString("TIF");
return sal_True;
}
}
@@ -408,7 +408,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if ( nFirstLong==0x47494638 && (sFirstBytes[4]==0x37 || sFirstBytes[4]==0x39) && sFirstBytes[5]==0x61 )
{
- rFormatExtension = UniString::CreateFromAscii( "GIF", 3 );
+ rFormatExtension = rtl::OUString("GIF");
return sal_True;
}
}
@@ -419,7 +419,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if (nFirstLong==0x89504e47 && nSecondLong==0x0d0a1a0a)
{
- rFormatExtension = UniString::CreateFromAscii( "PNG", 3 );
+ rFormatExtension = rtl::OUString("PNG");
return sal_True;
}
}
@@ -431,7 +431,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if ( ( nFirstLong==0xffd8ffe0 && sFirstBytes[6]==0x4a && sFirstBytes[7]==0x46 && sFirstBytes[8]==0x49 && sFirstBytes[9]==0x46 ) ||
( nFirstLong==0xffd8fffe ) || ( 0xffd8ff00 == ( nFirstLong & 0xffffff00 ) ) )
{
- rFormatExtension = UniString::CreateFromAscii( "JPG", 3 );
+ rFormatExtension = rtl::OUString("JPG");
return sal_True;
}
}
@@ -442,13 +442,13 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if( nFirstLong==0x53564744 && sFirstBytes[4]==0x49 )
{
- rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
+ rFormatExtension = rtl::OUString("SVM");
return sal_True;
}
else if( sFirstBytes[0]==0x56 && sFirstBytes[1]==0x43 && sFirstBytes[2]==0x4C &&
sFirstBytes[3]==0x4D && sFirstBytes[4]==0x54 && sFirstBytes[5]==0x46 )
{
- rFormatExtension = UniString::CreateFromAscii( "SVM", 3 );
+ rFormatExtension = rtl::OUString("SVM");
return sal_True;
}
}
@@ -465,7 +465,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if( strncmp( sBuf, "PCD_IPI", 7 ) == 0 )
{
- rFormatExtension = UniString::CreateFromAscii( "PCD", 3 );
+ rFormatExtension = rtl::OUString("PCD");
return sal_True;
}
}
@@ -477,7 +477,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested = sal_True;
if ( ( nFirstLong == 0x38425053 ) && ( (nSecondLong >> 16 ) == 1 ) )
{
- rFormatExtension = UniString::CreateFromAscii( "PSD", 3 );
+ rFormatExtension = rtl::OUString("PSD");
return sal_True;
}
}
@@ -489,7 +489,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if ( ( nFirstLong == 0xC5D0D3C6 ) || ( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"%!PS-Adobe", 10, 10 ) &&
ImplSearchEntry( &sFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) )
{
- rFormatExtension = UniString::CreateFromAscii( "EPS", 3 );
+ rFormatExtension = rtl::OUString("EPS");
return sal_True;
}
}
@@ -500,7 +500,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
//Binary DXF File Format
if( strncmp( (const char*) sFirstBytes, "AutoCAD Binary DXF", 18 ) == 0 )
{
- rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
+ rFormatExtension = rtl::OUString("DXF");
return sal_True;
}
@@ -522,7 +522,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if (i+7<256 && (strncmp((const char*)(sFirstBytes+i),"SECTION",7)==0))
{
- rFormatExtension = UniString::CreateFromAscii( "DXF", 3 );
+ rFormatExtension = rtl::OUString("DXF");
return sal_True;
}
}
@@ -561,19 +561,19 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
// normal version 2 - page A23 and A24
if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x02)
{
- rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
+ rFormatExtension = rtl::OUString("PCT");
return sal_True;
}
// normal version 1 - page A25
else if (sBuf[ 0 ] == 0x11 && sBuf[ 1 ] == 0x01 && bdBoxOk) {
- rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
+ rFormatExtension = rtl::OUString("PCT");
return sal_True;
}
// previous code kept in order to do not break any compatibility
// probably eroneous
else if ( sBuf[ 0 ] == 0x00 && sBuf[ 1 ] == 0x11 && sBuf[ 2 ] == 0x01 && bdBoxOk)
{
- rFormatExtension = UniString::CreateFromAscii( "PCT", 3 );
+ rFormatExtension = rtl::OUString("PCT");
return sal_True;
}
}
@@ -592,17 +592,17 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
{
case '1' :
case '4' :
- rFormatExtension = UniString::CreateFromAscii( "PBM", 3 );
+ rFormatExtension = rtl::OUString("PBM");
return sal_True;
case '2' :
case '5' :
- rFormatExtension = UniString::CreateFromAscii( "PGM", 3 );
+ rFormatExtension = rtl::OUString("PGM");
return sal_True;
case '3' :
case '6' :
- rFormatExtension = UniString::CreateFromAscii( "PPM", 3 );
+ rFormatExtension = rtl::OUString("PPM");
return sal_True;
}
}
@@ -614,7 +614,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if( nFirstLong == 0x59a66a95 )
{
- rFormatExtension = UniString::CreateFromAscii( "RAS", 3 );
+ rFormatExtension = rtl::OUString("RAS");
return sal_True;
}
}
@@ -625,7 +625,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested = sal_True;
if( ImplSearchEntry( sFirstBytes, (sal_uInt8*)"/* XPM */", 256, 9 ) )
{
- rFormatExtension = UniString::CreateFromAscii( "XPM", 3 );
+ rFormatExtension = rtl::OUString("XPM");
return sal_True;
}
}
@@ -649,7 +649,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
{
if( ImplSearchEntry( pPtr, (sal_uInt8*)"_width", pBuf + nSize - pPtr, 6 ) )
{
- rFormatExtension = UniString::CreateFromAscii( "XBM", 3 );
+ rFormatExtension = rtl::OUString("XBM");
delete[] pBuf;
return sal_True;
}
@@ -683,7 +683,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if( std::search(aBuf.begin(), aBuf.end(),
aMagic1, aMagic1+SAL_N_ELEMENTS(aMagic1)) != aBuf.end() )
{
- rFormatExtension = UniString::CreateFromAscii( "SVG", 3 );
+ rFormatExtension = rtl::OUString("SVG");
return sal_True;
}
@@ -691,7 +691,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
if( std::search(aBuf.begin(), aBuf.end(),
aMagic2, aMagic2+SAL_N_ELEMENTS(aMagic2)) != aBuf.end() )
{
- rFormatExtension = UniString::CreateFromAscii( "SVG", 3 );
+ rFormatExtension = rtl::OUString("SVG");
return sal_True;
}
}
@@ -722,7 +722,7 @@ static sal_Bool ImpPeekGraphicFormat( SvStream& rStream, String& rFormatExtensio
bSomethingTested=sal_True;
if( sFirstBytes[ 0 ] == 'J' && sFirstBytes[ 1 ] == 'J' )
{
- rFormatExtension = UniString::CreateFromAscii( "SGF", 3 );
+ rFormatExtension = rtl::OUString("SGF");
return sal_True;
}
}
@@ -941,7 +941,7 @@ ImpFilterLibCacheEntry::ImpFilterLibCacheEntry( const String& rPathname, const S
PFilterCall ImpFilterLibCacheEntry::GetImportFunction()
{
if( !mpfnImport )
- mpfnImport = (PFilterCall) maLibrary.getFunctionSymbol( UniString::CreateFromAscii( IMPORT_FUNCTION_NAME ) );
+ mpfnImport = (PFilterCall) maLibrary.getFunctionSymbol(rtl::OUString(IMPORT_FUNCTION_NAME));
return mpfnImport;
}
@@ -2052,7 +2052,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String&
String aPhysicalName( ImpCreateFullFilterPath( getToken(aFilterPath, i, ';'), aFilterName ) );
osl::Module aLibrary( aPhysicalName );
- PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol( UniString::CreateFromAscii( EXPORT_FUNCTION_NAME ) );
+ PFilterCall pFunc = (PFilterCall) aLibrary.getFunctionSymbol(rtl::OUString(EXPORT_FUNCTION_NAME));
// Dialog in DLL ausfuehren
if( pFunc )
{
diff --git a/svtools/source/filter/igif/gifread.cxx b/svtools/source/filter/igif/gifread.cxx
index 4dc675043099..5f91b61c81ed 100644
--- a/svtools/source/filter/igif/gifread.cxx
+++ b/svtools/source/filter/igif/gifread.cxx
@@ -60,7 +60,7 @@ GIFReader::GIFReader( SvStream& rStm ) :
bGCTransparent ( sal_False ),
bImGraphicReady ( sal_False )
{
- maUpperName = UniString::CreateFromAscii( "SVIGIF", 6 );
+ maUpperName = rtl::OUString("SVIGIF");
pSrcBuf = new sal_uInt8[ 256 ];
ClearImageExtensions();
}
diff --git a/svtools/source/filter/ixbm/xbmread.cxx b/svtools/source/filter/ixbm/xbmread.cxx
index 1b79c3f80580..599cc7d7aaea 100644
--- a/svtools/source/filter/ixbm/xbmread.cxx
+++ b/svtools/source/filter/ixbm/xbmread.cxx
@@ -45,7 +45,7 @@ XBMReader::XBMReader( SvStream& rStm ) :
bStatus ( sal_True )
{
pHexTable = new short[ 256 ];
- maUpperName = String::CreateFromAscii( "SVIXBM", 6 );
+ maUpperName = rtl::OUString("SVIXBM");
InitTable();
}
diff --git a/svtools/source/filter/jpeg/jpeg.cxx b/svtools/source/filter/jpeg/jpeg.cxx
index 59f7d4ec69cb..11990d736c96 100644
--- a/svtools/source/filter/jpeg/jpeg.cxx
+++ b/svtools/source/filter/jpeg/jpeg.cxx
@@ -308,7 +308,7 @@ JPEGReader::JPEGReader( SvStream& rStm, void* /*pCallData*/, sal_Bool bSetLS ) :
nLastLines ( 0 ),
bSetLogSize ( bSetLS )
{
- maUpperName = String::CreateFromAscii( "SVIJPEG", 7 );
+ maUpperName = rtl::OUString("SVIJPEG");
nFormerPos = nLastPos;
}
diff --git a/svtools/source/filter/sgvmain.cxx b/svtools/source/filter/sgvmain.cxx
index 886bf98e41b3..c1ad1f625d78 100644
--- a/svtools/source/filter/sgvmain.cxx
+++ b/svtools/source/filter/sgvmain.cxx
@@ -962,8 +962,7 @@ sal_Bool SgfSDrwFilter(SvStream& rInp, GDIMetaFile& rMtf, INetURLObject aIniPath
sal_Bool bRdFlag=sal_False; // Grafikentry gelesen ?
sal_Bool bRet=sal_False; // Returncode
- aIniPath.Append( String::CreateFromAscii( "sgf.ini", 7 ) );
-// aIniPath.ToAbs();
+ aIniPath.Append(rtl::OUString("sgf.ini"));
pSgfFonts = new SgfFontLst;
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index 0f0ae91ac56f..5670530ed52b 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -575,32 +575,32 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, sal_Bool Kapt, s
case 92500: case 92501: case 92504: case 92505:
{
#if defined(WNT)
- FNam=String::CreateFromAscii( "Times New Roman" ); // CG Times ist unter Windows Times New Roman
+ FNam=rtl::OUString("Times New Roman"); // CG Times ist unter Windows Times New Roman
#else
- FNam=String::CreateFromAscii( "Times" ); // ansonsten ist das einfach Times
+ FNam=rtl::OUString("Times"); // ansonsten ist das einfach Times
#endif
StdBrei=40;
aFont.SetFamily(FAMILY_ROMAN);
} break;
case 94021: case 94022: case 94023: case 94024: {
#if defined(WNT)
- FNam=String::CreateFromAscii( "Arial", 5 ); // Univers ist unter Windows Arial
+ FNam=rtl::OUString("Arial"); // Univers ist unter Windows Arial
#else
- FNam=String::CreateFromAscii( "Helvetica" ); // und ansonsten Helvetica
+ FNam=rtl::OUString("Helvetica"); // und ansonsten Helvetica
#endif
aFont.SetFamily(FAMILY_SWISS);
StdBrei=47;
} break;
case 93950: case 93951: case 93952: case 93953: {
#if defined(WNT)
- FNam=String::CreateFromAscii( "Courier New" ); // Der Vector-Courierfont unter Windows heisst Courier New
+ FNam=rtl::OUString("Courier New"); // Der Vector-Courierfont unter Windows heisst Courier New
#else
- FNam=String::CreateFromAscii( "Courier" ); // ansonsten ist und bleibt Courier immer Courier
+ FNam=rtl::OUString("Courier"); // ansonsten ist und bleibt Courier immer Courier
#endif
aFont.SetFamily(FAMILY_ROMAN);
aFont.SetPitch(PITCH_FIXED);
} break;
- default: FNam=String::CreateFromAscii( "Helvetica", 9 );
+ default: FNam = rtl::OUString("Helvetica");
}
aFont.SetName(FNam);
//aFont.SetCharSet(CHARSET_SYSTEM);
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 ) )
{
diff --git a/tools/source/fsys/tdir.cxx b/tools/source/fsys/tdir.cxx
index c04e6a52cfb2..d3d6c718f1aa 100644
--- a/tools/source/fsys/tdir.cxx
+++ b/tools/source/fsys/tdir.cxx
@@ -258,7 +258,7 @@ void Dir::Construct( DirEntryKind nKindFlags )
#endif
}
else
- aNameMask.setGlob(String("*", osl_getThreadTextEncoding()));
+ aNameMask.setGlob(rtl::OUString(static_cast<sal_Unicode>('*')));
}
/*************************************************************************