summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
Diffstat (limited to 'svtools')
-rw-r--r--svtools/bmpmaker/bmpcore.cxx2
-rw-r--r--svtools/source/contnr/fileview.cxx8
-rw-r--r--svtools/source/contnr/svtreebx.cxx2
-rw-r--r--svtools/source/control/fmtfield.cxx2
-rw-r--r--svtools/source/control/inettbc.cxx16
-rw-r--r--svtools/source/control/roadmap.cxx4
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx6
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx2
-rw-r--r--svtools/source/filter/wmf/enhwmf.cxx2
-rw-r--r--svtools/source/misc/ehdl.cxx25
-rw-r--r--svtools/source/misc/imagemgr.cxx2
11 files changed, 36 insertions, 35 deletions
diff --git a/svtools/bmpmaker/bmpcore.cxx b/svtools/bmpmaker/bmpcore.cxx
index c2c954ab7dae..4512cac56b0d 100644
--- a/svtools/bmpmaker/bmpcore.cxx
+++ b/svtools/bmpmaker/bmpcore.cxx
@@ -111,7 +111,7 @@ void BmpCreator::ImplCreate( const ::std::vector< DirEntry >& rInDirs,
else
aPrefix = String( aName, 0, 2 );
- String aNumStr( String::CreateFromAscii( rLang.maLangDir )) ;
+ String aNumStr(rtl::OUString::createFromAscii(rLang.maLangDir));
if( aNumStr.Len() == 1 )
aNumStr.Insert( '0', 0 );
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 4acae0d06b9a..4487a68c5776 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -164,8 +164,10 @@ void FilterMatch::createWildCardFilterList(const String& _rFilterList,::std::vec
while ( nIndex != STRING_NOTFOUND );
}
else
+ {
// no filter is given -> match all
- _rFilters.push_back( WildCard( String::CreateFromAscii( "*" ) ) );
+ _rFilters.push_back( WildCard(rtl::OUString("*")) );
+ }
}
// class ViewTabListBox_Impl ---------------------------------------------
@@ -460,7 +462,7 @@ void NameTranslationList::Init()
NameTranslationList::NameTranslationList( const INetURLObject& rBaseURL ):
maTransFile( rBaseURL ),
maHashedURL( rBaseURL ),
- maTransFileName( String::CreateFromAscii( ".nametranslation.table" ) )
+ maTransFileName( rtl::OUString(".nametranslation.table") )
{
maTransFile.insertName( maTransFileName );
Init();
@@ -1793,7 +1795,7 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand
,mxCmdEnv ( xEnv )
{
- maAllFilter = String::CreateFromAscii( "*.*" );
+ maAllFilter = rtl::OUString("*.*");
mpView = new ViewTabListBox_Impl( mpAntiImpl, this, nFlags );
mpView->EnableCellFocus();
}
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index a6844727fcbf..d57f8b6225a6 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -759,7 +759,7 @@ void SvTreeListBox::RequestingChildren( SvLBoxEntry* pParent )
{
DBG_CHKTHIS(SvTreeListBox,0);
if( !pParent->HasChildren() )
- InsertEntry( String::CreateFromAscii("<dummy>"), pParent, sal_False, LIST_APPEND );
+ InsertEntry( rtl::OUString("<dummy>"), pParent, sal_False, LIST_APPEND );
}
void SvTreeListBox::GetFocus()
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 8dcffcea938b..c59b1a57dcde 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -1288,7 +1288,7 @@ void DoubleCurrencyField::UpdateCurrencyFormat()
sTemp = comphelper::string::stripStart(sTemp, ' ');
sTemp = comphelper::string::stripEnd(sTemp, ' ');
- sNewFormat += String::CreateFromAscii(" [$");
+ sNewFormat += rtl::OUString(" [$");
sNewFormat += sTemp;
sNewFormat += ']';
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 065615848939..3c31e1511111 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -321,7 +321,7 @@ void SvtMatchContext_Impl::ReadFolder( const String& rURL,
// for pure home paths ( ~username ) the '.' at the end of rMatch
// means that it poits to root catalog
// this is done only for file contents since home paths parsing is usefull only for them
- if ( bPureHomePath && rMatch.Equals( String::CreateFromAscii( "file:///." ) ) )
+ if ( bPureHomePath && rMatch.Equals( rtl::OUString("file:///.") ) )
{
// a home that refers to /
@@ -1212,7 +1212,7 @@ sal_Bool SvtURLBox_Impl::TildeParsing(
if( !aHomeLocation )
aHomeLocation = "";
- aParseTilde = String::CreateFromAscii( aHomeLocation );
+ aParseTilde = rtl::OUString::createFromAscii(aHomeLocation);
// in case the whole path is just "~" then there should
// be no trailing slash at the end
@@ -1223,25 +1223,25 @@ sal_Bool SvtURLBox_Impl::TildeParsing(
{
// covers "~username" and "~username/..." cases
xub_StrLen nNameEnd = aText.Search( '/' );
- String aUserName = aText.Copy( 1, ( nNameEnd != STRING_NOTFOUND ) ? nNameEnd : ( aText.Len() - 1 ) );
+ rtl::OUString aUserName = aText.Copy( 1, ( nNameEnd != STRING_NOTFOUND ) ? nNameEnd : ( aText.Len() - 1 ) );
struct passwd* pPasswd = NULL;
#ifdef SOLARIS
Sequence< sal_Int8 > sBuf( 1024 );
struct passwd aTmp;
- sal_Int32 nRes = getpwnam_r( OUStringToOString( OUString( aUserName ), RTL_TEXTENCODING_ASCII_US ).getStr(),
+ sal_Int32 nRes = getpwnam_r( OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US ).getStr(),
&aTmp,
(char*)sBuf.getArray(),
1024,
&pPasswd );
if( !nRes && pPasswd )
- aParseTilde = String::CreateFromAscii( pPasswd->pw_dir );
+ aParseTilde = rtl::OUString::createFromAscii(pPasswd->pw_dir);
else
return sal_False; // no such user
#else
- pPasswd = getpwnam( OUStringToOString( OUString( aUserName ), RTL_TEXTENCODING_ASCII_US ).getStr() );
+ pPasswd = getpwnam( OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US ).getStr() );
if( pPasswd )
- aParseTilde = String::CreateFromAscii( pPasswd->pw_dir );
+ aParseTilde = rtl::OUString::createFromAscii(pPasswd->pw_dir);
else
return sal_False; // no such user
#endif
@@ -1257,7 +1257,7 @@ sal_Bool SvtURLBox_Impl::TildeParsing(
if( !aParseTilde.Len() || aParseTilde.EqualsAscii( "/" ) )
{
// "/" path should be converted to "/."
- aParseTilde = String::CreateFromAscii( "/." );
+ aParseTilde = rtl::OUString("/.");
}
else
{
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index a008910b6e33..395128c40510 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -346,7 +346,7 @@ namespace svt
}
}
else if ( bWasComplete )
- m_pImpl->InCompleteHyperLabel = InsertHyperLabel( m_pImpl->getItemCount(), ::String::CreateFromAscii( "..." ), RMINCOMPLETE );
+ m_pImpl->InCompleteHyperLabel = InsertHyperLabel( m_pImpl->getItemCount(), rtl::OUString("..."), RMINCOMPLETE );
}
//---------------------------------------------------------------------
@@ -371,7 +371,7 @@ namespace svt
{
RoadmapItem* pOldItem = GetPreviousHyperLabel( m_pImpl->getItemCount() );
m_pImpl->InCompleteHyperLabel->SetPosition( pOldItem );
- m_pImpl->InCompleteHyperLabel->Update( m_pImpl->getItemCount(), ::String::CreateFromAscii("...") );
+ m_pImpl->InCompleteHyperLabel->Update( m_pImpl->getItemCount(), rtl::OUString("...") );
}
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index e423b6a1c382..67c964ec0bcc 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -797,7 +797,7 @@ void AssignmentPersistentData::Commit()
if (!m_xORB.is())
return;
- const String sContextServiceName = String::CreateFromAscii("com.sun.star.sdb.DatabaseContext");
+ const rtl::OUString sContextServiceName("com.sun.star.sdb.DatabaseContext");
try
{
m_xDatabaseContext = Reference< XNameAccess >(m_xORB->createInstance(sContextServiceName), UNO_QUERY);
@@ -846,7 +846,7 @@ void AssignmentPersistentData::Commit()
m_aDatasource.SaveValue();
// create an interaction handler (may be needed for connecting)
- const String sInteractionHandlerServiceName = String::CreateFromAscii("com.sun.star.task.InteractionHandler");
+ const rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
Reference< XInteractionHandler > xHandler;
try
{
@@ -1223,7 +1223,7 @@ void AssignmentPersistentData::Commit()
aArgs[0] <<= PropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParentWindow")), 0, makeAny(VCLUnoHelper::GetInterface(this)), PropertyState_DIRECT_VALUE);
// create the dialog object
- const String sDialogServiceName = String::CreateFromAscii("com.sun.star.ui.dialogs.AddressBookSourcePilot");
+ const rtl::OUString sDialogServiceName("com.sun.star.ui.dialogs.AddressBookSourcePilot");
Reference< XExecutableDialog > xAdminDialog;
try
{
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index b024364c4861..dd5a974042a1 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -242,7 +242,7 @@ namespace svt
TabPage* pCurrentPage = GetPage(getCurrentState());
if ( pCurrentPage && pCurrentPage->GetText().Len() )
{
- sCompleteTitle += String::CreateFromAscii(" - ");
+ sCompleteTitle += rtl::OUString(" - ");
sCompleteTitle += pCurrentPage->GetText();
}
diff --git a/svtools/source/filter/wmf/enhwmf.cxx b/svtools/source/filter/wmf/enhwmf.cxx
index 7d04d3d40979..72ea16de8b92 100644
--- a/svtools/source/filter/wmf/enhwmf.cxx
+++ b/svtools/source/filter/wmf/enhwmf.cxx
@@ -254,7 +254,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC)
// debug code - write the stream to debug file /tmp/emf-stream.emf
EMFP_DEBUG(int pos = pWMF->Tell();
pWMF->Seek(0);
- SvFileStream file( UniString::CreateFromAscii( "/tmp/emf-stream.emf" ), STREAM_WRITE | STREAM_TRUNC );
+ SvFileStream file( rtl::OUString( "/tmp/emf-stream.emf" ), STREAM_WRITE | STREAM_TRUNC );
*pWMF >> file;
file.Flush();
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index c56cb894abc5..b23feb7d10c4 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -93,9 +93,9 @@ static sal_uInt16 aWndFunc(
String aErr(SvtResId(STR_ERR_HDLMESS).toString());
String aAction(rAction);
if ( aAction.Len() )
- aAction += String::CreateFromAscii( ":\n" );
- aErr.SearchAndReplace(String::CreateFromAscii( "$(ACTION)" ), aAction);
- aErr.SearchAndReplace(String::CreateFromAscii( "$(ERROR)" ), rErr);
+ aAction += rtl::OUString(":\n");
+ aErr.SearchAndReplace(rtl::OUString("$(ACTION)"), aAction);
+ aErr.SearchAndReplace(rtl::OUString("$(ERROR)"), rErr);
MessBox* pBox;
switch ( nFlags & 0xf000 )
@@ -194,7 +194,7 @@ sal_Bool SfxErrorHandler::CreateString(
{
for (xub_StrLen i = 0; i < rStr.Len();)
{
- i = rStr.SearchAndReplace(String::CreateFromAscii( "$(ARG1)" ),
+ i = rStr.SearchAndReplace(rtl::OUString("$(ARG1)"),
pMsgInfo->GetMessageArg(), i);
if (i == STRING_NOTFOUND)
break;
@@ -209,7 +209,7 @@ sal_Bool SfxErrorHandler::CreateString(
if(pStringInfo)
for (xub_StrLen i = 0; i < rStr.Len();)
{
- i = rStr.SearchAndReplace(String::CreateFromAscii( "$(ARG1)" ),
+ i = rStr.SearchAndReplace(rtl::OUString("$(ARG1)"),
pStringInfo->GetErrorString(), i);
if (i == STRING_NOTFOUND)
break;
@@ -222,8 +222,8 @@ sal_Bool SfxErrorHandler::CreateString(
if (pTwoStringInfo)
for (sal_uInt16 i = 0; i < rStr.Len();)
{
- sal_uInt16 nArg1Pos = rStr.Search(String::CreateFromAscii( "$(ARG1)" ), i);
- sal_uInt16 nArg2Pos = rStr.Search(String::CreateFromAscii( "$(ARG2)" ), i);
+ sal_uInt16 nArg1Pos = rStr.Search(rtl::OUString("$(ARG1)"), i);
+ sal_uInt16 nArg2Pos = rStr.Search(rtl::OUString("$(ARG2)"), i);
if (nArg1Pos < nArg2Pos)
{
rStr.Replace(nArg1Pos, 7, pTwoStringInfo->GetArg1());
@@ -383,8 +383,7 @@ sal_Bool SfxErrorHandler::GetErrorString(
sal_uInt16 nResFlags = aErrorString.GetFlags();
if ( nResFlags )
nFlags = nResFlags;
- rStr.SearchAndReplace(
- String::CreateFromAscii("$(ERROR)"), aErrorString.GetString());
+ rStr.SearchAndReplace(rtl::OUString("$(ERROR)"), aErrorString.GetString());
bRet = sal_True;
}
else
@@ -397,8 +396,8 @@ sal_Bool SfxErrorHandler::GetErrorString(
GetClassString(lErrId & ERRCODE_CLASS_MASK,
aErrStr);
if(aErrStr.Len())
- aErrStr+=String::CreateFromAscii( ".\n" );
- rStr.SearchAndReplace(String::CreateFromAscii( "$(CLASS)" ),aErrStr);
+ aErrStr += rtl::OUString(".\n");
+ rStr.SearchAndReplace(rtl::OUString("$(CLASS)"),aErrStr);
}
return bRet;
@@ -453,7 +452,7 @@ sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, String &rStr)
if ( aTestEr )
{
rStr = ( (ResString)aTestEr ).GetString();
- rStr.SearchAndReplace( String::CreateFromAscii( "$(ARG1)" ), aArg1 );
+ rStr.SearchAndReplace(rtl::OUString("$(ARG1)"), aArg1 );
bRet = true;
}
else
@@ -467,7 +466,7 @@ sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, String &rStr)
sal_uInt16 nId = ( nErrId & ERRCODE_WARNING_MASK ) ? ERRCTX_WARNING : ERRCTX_ERROR;
ResId aSfxResId( RID_ERRCTX, *pMgr );
ErrorResource_Impl aEr( aSfxResId, nId );
- rStr.SearchAndReplace( String::CreateFromAscii( "$(ERR)" ), ( (ResString)aEr ).GetString() );
+ rStr.SearchAndReplace( rtl::OUString("$(ERR)"), ( (ResString)aEr ).GetString() );
}
}
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 1e65ecdd40ea..044275eca64a 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -218,7 +218,7 @@ static String GetImageExtensionByFactory_Impl( const String& rURL )
if ( aPath.EqualsAscii( Fac2ExtMap_Impl[ nIndex ]._pFactory ) )
{
// extension found
- aExtension = String::CreateFromAscii( Fac2ExtMap_Impl[ nIndex ]._pExtension );
+ aExtension = rtl::OUString::createFromAscii(Fac2ExtMap_Impl[ nIndex ]._pExtension);
// and return it
return aExtension;
}