summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-16 08:33:10 +0200
committerNoel Grandin <noel@peralex.com>2013-09-17 09:05:21 +0200
commit7865b9762da6d8b3c45cc08df1f3da3f3179b29f (patch)
tree18253ecd3f2211b87a184d95f354a5262719a783 /desktop
parent73c560a63e66a24233e635d60b7a97356eebc1e4 (diff)
convert DESKTOP module from String to OUString
Change-Id: I5dc43849ace8edbab9e6308db80a70797f090c69
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx58
-rw-r--r--desktop/source/app/appinit.cxx8
-rw-r--r--desktop/source/app/cmdlinehelp.cxx12
-rw-r--r--desktop/source/app/dispatchwatcher.cxx24
-rw-r--r--desktop/source/app/lockfile2.cxx12
-rw-r--r--desktop/source/app/officeipcthread.cxx4
-rw-r--r--desktop/source/deployment/gui/descedit.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx12
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx34
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx16
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx12
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx20
-rw-r--r--desktop/source/deployment/misc/lockfile.cxx4
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx16
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx2
18 files changed, 126 insertions, 126 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 28651f9a4a59..e4320e6de93d 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -363,7 +363,7 @@ OUString GetMsgString(
{
ResMgr* resMgr = Desktop::GetDesktopResManager();
if ( resMgr )
- return OUString( String( ResId( nId, *resMgr )));
+ return OUString( ResId( nId, *resMgr ) );
}
return aFallbackMsg;
}
@@ -391,7 +391,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
ResMgr* pResMgr = Desktop::GetDesktopResManager();
if ( pResMgr )
- aDiagnosticMessage.append( OUString(String(ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr ))) );
+ aDiagnosticMessage.append( OUString( ResId(STR_BOOTSTRAP_ERR_CFG_DATAACCESS, *pResMgr ) ) );
else
aDiagnosticMessage.appendAscii( "The program cannot be started." );
@@ -399,7 +399,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
{
aDiagnosticMessage.appendAscii( "\n\n" );
if ( pResMgr )
- aDiagnosticMessage.append( OUString(String(ResId(STR_INTERNAL_ERRMSG, *pResMgr ))) );
+ aDiagnosticMessage.append( OUString( ResId(STR_INTERNAL_ERRMSG, *pResMgr ) ) );
else
aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" );
aDiagnosticMessage.append( aInternalErrMsg );
@@ -457,23 +457,23 @@ CommandLineArgs& Desktop::GetCommandLineArgs()
namespace
{
struct BrandName
- : public rtl::Static< String, BrandName > {};
+ : public rtl::Static< OUString, BrandName > {};
struct Version
- : public rtl::Static< String, Version > {};
+ : public rtl::Static< OUString, Version > {};
struct AboutBoxVersion
- : public rtl::Static< String, AboutBoxVersion > {};
+ : public rtl::Static< OUString, AboutBoxVersion > {};
struct AboutBoxVersionSuffix
- : public rtl::Static< String, AboutBoxVersionSuffix > {};
+ : public rtl::Static< OUString, AboutBoxVersionSuffix > {};
struct OOOVendor
- : public rtl::Static< String, OOOVendor > {};
+ : public rtl::Static< OUString, OOOVendor > {};
struct Extension
- : public rtl::Static< String, Extension > {};
+ : public rtl::Static< OUString, Extension > {};
struct XMLFileFormatName
- : public rtl::Static< String, XMLFileFormatName > {};
+ : public rtl::Static< OUString, XMLFileFormatName > {};
struct XMLFileFormatVersion
- : public rtl::Static< String, XMLFileFormatVersion > {};
+ : public rtl::Static< OUString, XMLFileFormatVersion > {};
struct WriterCompatibilityVersionOOo11
- : public rtl::Static< String, WriterCompatibilityVersionOOo11 > {};
+ : public rtl::Static< OUString, WriterCompatibilityVersionOOo11 > {};
}
OUString ReplaceStringHookProc( const OUString& rStr )
@@ -840,11 +840,11 @@ OUString Desktop::CreateErrorMsgString(
if ( bFileInfo )
{
- String aMsgString( aMsg );
+ OUString aMsgString( aMsg );
osl::File::getSystemPathFromFileURL( aFileURL, aFilePath );
- aMsgString.SearchAndReplaceAscii( "$1", aFilePath );
+ aMsgString = aMsgString.replaceFirst( "$1", aFilePath );
aMsg = aMsgString;
}
@@ -1169,7 +1169,7 @@ void restartOnMac(bool passArguments) {
#if HAVE_FEATURE_MACOSX_SANDBOX
(void) passArguments; // avoid warnings
ResMgr *resMgr = Desktop::GetDesktopResManager();
- OUString aMessage = OUString( String( ResId( STR_LO_MUST_BE_RESTARTED, *resMgr )));
+ OUString aMessage = OUString( ResId( STR_LO_MUST_BE_RESTARTED, *resMgr ) );
ErrorBox aRestartBox( NULL, WB_OK, aMessage );
aRestartBox.Execute();
@@ -1255,7 +1255,7 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
if ( bInException )
{
- String aDoubleExceptionString;
+ OUString aDoubleExceptionString;
Application::Abort( aDoubleExceptionString );
}
@@ -1279,14 +1279,14 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
{
case EXC_RSCNOTLOADED:
{
- String aResExceptionString;
+ OUString aResExceptionString;
Application::Abort( aResExceptionString );
break;
}
case EXC_SYSOBJNOTCREATED:
{
- String aSysResExceptionString;
+ OUString aSysResExceptionString;
Application::Abort( aSysResExceptionString );
break;
}
@@ -1309,7 +1309,7 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
}
else
{
- Application::Abort( String() );
+ Application::Abort( OUString() );
}
break;
@@ -1494,16 +1494,16 @@ int Desktop::Main()
// create title string
LanguageTag aLocale( LANGUAGE_SYSTEM);
ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "ofa", aLocale );
- String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
+ OUString aTitle = pLabelResMgr ? OUString( ResId( RID_APPTITLE, *pLabelResMgr ) ) : OUString();
delete pLabelResMgr;
#ifdef DBG_UTIL
//include buildid in non product builds
OUString aDefault("development");
aTitle += OUString(" [");
- String aVerId( utl::Bootstrap::getBuildIdData(aDefault));
+ OUString aVerId( utl::Bootstrap::getBuildIdData(aDefault));
aTitle += aVerId;
- aTitle += ']';
+ aTitle += "]";
#endif
SetDisplayName( aTitle );
@@ -2034,7 +2034,7 @@ IMPL_LINK_NOARG(Desktop, OpenClients_Impl)
if (getenv ("OOO_EXIT_POST_STARTUP"))
new ExitTimer();
} catch (const ::com::sun::star::uno::Exception &e) {
- String a( "UNO exception during client open:\n" );
+ OUString a( "UNO exception during client open:\n" );
Application::Abort( a + e.Message );
}
return 0;
@@ -2586,24 +2586,24 @@ void Desktop::OpenDefault()
}
-String GetURL_Impl(
- const String& rName, boost::optional< OUString > const & cwdUrl )
+OUString GetURL_Impl(
+ const OUString& rName, boost::optional< OUString > const & cwdUrl )
{
// if rName is a vnd.sun.star.script URL do not attempt to parse it
// as INetURLObj does not handle handle there URLs
- if (rName.CompareToAscii("vnd.sun.star.script" , 19) == COMPARE_EQUAL)
+ if (rName.startsWith("vnd.sun.star.script"))
{
return rName;
}
// dont touch file urls, those should already be in internal form
// they won't get better here (#112849#)
- if (rName.CompareToAscii("file:" , 5) == COMPARE_EQUAL)
+ if (rName.startsWith("file:"))
{
return rName;
}
- if ( rName.CompareToAscii("service:" , 8) == COMPARE_EQUAL )
+ if ( rName.startsWith("service:"))
{
return rName;
}
@@ -2624,7 +2624,7 @@ String GetURL_Impl(
bool bWasAbsolute;
INetURLObject aURL = aObj.smartRel2Abs( rName, bWasAbsolute, false, INetURLObject::WAS_ENCODED,
RTL_TEXTENCODING_UTF8, true );
- String aFileURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
+ OUString aFileURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
::osl::DirectoryItem aItem;
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 9c818d8e3093..8c1086531320 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -157,7 +157,7 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
namespace
{
struct acceptorMap : public rtl::Static< AcceptorMap, acceptorMap > {};
- struct CurrentTempURL : public rtl::Static< String, CurrentTempURL > {};
+ struct CurrentTempURL : public rtl::Static< OUString, CurrentTempURL > {};
}
static sal_Bool bAccept = sal_False;
@@ -272,7 +272,7 @@ void Desktop::CreateTemporaryDirectory()
DesktopResId aResId( STR_BOOTSTRAP_ERR_NO_PATHSET_SERVICE );
aResId.SetRT( RSC_STRING );
if ( aResId.GetResMgr()->IsAvailable( aResId ))
- aMsg = String( aResId );
+ aMsg = OUString( aResId );
else
aMsg = OUString( "The path manager is not available.\n" );
e.Message = aMsg + e.Message;
@@ -314,8 +314,8 @@ void Desktop::RemoveTemporaryDirectory()
SAL_INFO( "desktop.app", "desktop (cd100003) ::removeTemporaryDirectory" );
// remove current temporary directory
- String &rCurrentTempURL = CurrentTempURL::get();
- if ( rCurrentTempURL.Len() > 0 )
+ OUString &rCurrentTempURL = CurrentTempURL::get();
+ if ( !rCurrentTempURL.isEmpty() )
{
::utl::UCBContentHelper::Kill( rCurrentTempURL );
}
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 41a9f300e9ba..119f9737fd5d 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -133,13 +133,13 @@ namespace desktop
{
// if you put variables in other chunks don't forget to call the replace routines
// for those chunks...
- String aHelpMessage_version(aCmdLineHelp_version, RTL_TEXTENCODING_ASCII_US);
- String aHelpMessage_head(aCmdLineHelp_head, RTL_TEXTENCODING_ASCII_US);
- String aHelpMessage_left(aCmdLineHelp_left, RTL_TEXTENCODING_ASCII_US);
- String aHelpMessage_right(aCmdLineHelp_right, RTL_TEXTENCODING_ASCII_US);
- String aHelpMessage_bottom(aCmdLineHelp_bottom, RTL_TEXTENCODING_ASCII_US);
+ OUString aHelpMessage_version = OUString::createFromAscii(aCmdLineHelp_version);
+ OUString aHelpMessage_head = OUString::createFromAscii(aCmdLineHelp_head);
+ OUString aHelpMessage_left = OUString::createFromAscii(aCmdLineHelp_left);
+ OUString aHelpMessage_right = OUString::createFromAscii(aCmdLineHelp_right);
+ OUString aHelpMessage_bottom = OUString::createFromAscii(aCmdLineHelp_bottom);
aHelpMessage_version = ReplaceStringHookProc(aHelpMessage_version);
- aHelpMessage_head.SearchAndReplaceAscii( "%CMDNAME", String( "soffice", RTL_TEXTENCODING_ASCII_US) );
+ aHelpMessage_head = aHelpMessage_head.replaceFirst( "%CMDNAME", "soffice" );
if (!unknown.isEmpty())
{
aHelpMessage_head = "Unknown option: " + unknown + "\n\n"
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 4afa35992f95..df7765e1fa36 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -68,8 +68,8 @@ using namespace ::com::sun::star::task;
namespace desktop
{
-String GetURL_Impl(
- const String& rName, boost::optional< OUString > const & cwdUrl );
+OUString GetURL_Impl(
+ const OUString& rName, boost::optional< OUString > const & cwdUrl );
struct DispatchHolder
{
@@ -81,10 +81,10 @@ struct DispatchHolder
Reference< XDispatch > xDispatch;
};
-static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
- String aAppl )
+static OUString impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
+ OUString aAppl )
{
- String aFilter;
+ OUString aFilter;
SfxMedium* pMedium = new SfxMedium( aUrl,
STREAM_STD_READ );
@@ -112,7 +112,7 @@ static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
static OUString impl_GuessFilter( OUString aUrlIn, OUString aUrlOut )
{
/* aAppl can also be set to Factory like scalc, swriter... */
- String aAppl;
+ OUString aAppl;
aAppl = impl_GetFilterFromExt( aUrlIn, SFX_FILTER_IMPORT, aAppl );
return impl_GetFilterFromExt( aUrlOut, SFX_FILTER_EXPORT, aAppl );
}
@@ -236,7 +236,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
aArgs[nCount-1].Value <<= aDispatchRequest.aPreselectedFactory;
}
- String aName( GetURL_Impl( aDispatchRequest.aURL, aDispatchRequest.aCwdUrl ) );
+ OUString aName( GetURL_Impl( aDispatchRequest.aURL, aDispatchRequest.aCwdUrl ) );
OUString aTarget("_default");
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
@@ -264,10 +264,10 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// Otherwise try to dispatch it ...
Reference < XPrintable > xDoc;
if(
- ( aName.CompareToAscii( ".uno" , 4 ) == COMPARE_EQUAL ) ||
- ( aName.CompareToAscii( "slot:" , 5 ) == COMPARE_EQUAL ) ||
- ( aName.CompareToAscii( "macro:", 6 ) == COMPARE_EQUAL ) ||
- ( aName.CompareToAscii("vnd.sun.star.script", 19) == COMPARE_EQUAL)
+ ( aName.startsWith( ".uno" ) ) ||
+ ( aName.startsWith( "slot:" ) ) ||
+ ( aName.startsWith( "macro:" ) ) ||
+ ( aName.startsWith("vnd.sun.star.script") )
)
{
// Attention: URL must be parsed full. Otherwise some detections on it will fail!
@@ -297,7 +297,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
aDispatches.push_back( DispatchHolder( aURL, xDispatcher ));
}
}
- else if ( ( aName.CompareToAscii( "service:" , 8 ) == COMPARE_EQUAL ) )
+ else if ( ( aName.startsWith( "service:" ) ) )
{
// TODO: the dispatch has to be done for loadComponentFromURL as well. Please ask AS for more details.
URL aURL ;
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index d338281d9d13..ac0ef233bd36 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -30,7 +30,7 @@ namespace desktop {
bool Lockfile_execWarning( Lockfile * that )
{
// read information from lock
- String aLockname = that->m_aLockname;
+ OUString aLockname = that->m_aLockname;
Config aConfig(aLockname);
aConfig.SetGroup( LOCKFILE_GROUP );
OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
@@ -40,15 +40,15 @@ bool Lockfile_execWarning( Lockfile * that )
// display warning and return response
QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) );
// set box title
- String aTitle = String( DesktopResId( STR_TITLE_USERDATALOCKED ));
+ OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
aBox.SetText( aTitle );
// insert values...
- String aMsgText = aBox.GetMessText( );
- aMsgText.SearchAndReplaceAscii(
+ OUString aMsgText = aBox.GetMessText( );
+ aMsgText = aMsgText.replaceFirst(
"$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) );
- aMsgText.SearchAndReplaceAscii(
+ aMsgText = aMsgText.replaceFirst(
"$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) );
- aMsgText.SearchAndReplaceAscii(
+ aMsgText = aMsgText.replaceFirst(
"$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) );
aBox.SetMessText(aMsgText);
// do it
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index e897ee151606..de1a340d69c4 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -249,7 +249,7 @@ rtl::Reference< OfficeIPCThread > OfficeIPCThread::pGlobalOfficeIPCThread;
// Turns a string in aMsg such as file:///home/foo/.libreoffice/3
// Into a hex string of well known length ff132a86...
-String CreateMD5FromString( const OUString& aMsg )
+OUString CreateMD5FromString( const OUString& aMsg )
{
#if (OSL_DEBUG_LEVEL > 2)
fprintf( stderr, "create md5 from '%s'\n",
@@ -278,7 +278,7 @@ String CreateMD5FromString( const OUString& aMsg )
return aBuffer.makeStringAndClear();
}
- return String();
+ return OUString();
}
class ProcessEventsClass_Impl
diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx
index 904adf350b38..7554c64b1154 100644
--- a/desktop/source/deployment/gui/descedit.cxx
+++ b/desktop/source/deployment/gui/descedit.cxx
@@ -57,7 +57,7 @@ void DescriptionEdit::Init()
void DescriptionEdit::Clear()
{
- SetText( String() );
+ SetText( OUString() );
m_bIsVerticalScrollBarHidden = true;
ScrollBar* pVScrBar = GetVScrollBar();
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 493943555df5..a653d1b6bbf5 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -96,7 +96,7 @@ struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
const SolarMutexGuard guard;
::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
OSL_ASSERT( resmgr.get() != 0 );
- String ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) );
+ OUString ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) );
return ret;
}
};
@@ -383,7 +383,7 @@ MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long
aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
}
- if ( GetEntryData( nPos )->m_sLicenseText.Len() )
+ if ( !GetEntryData( nPos )->m_sLicenseText.isEmpty() )
aPopup.InsertItem( CMD_SHOW_LICENSE, DialogHelper::getResourceString( RID_STR_SHOW_LICENSE_CMD ) );
return (MENU_COMMAND) aPopup.Execute( this, rPos );
@@ -898,7 +898,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
ui::dialogs::FilePicker::createWithMode(xContext, ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE);
xFilePicker->setTitle( m_sAddPackages );
- if ( m_sLastFolderURL.Len() )
+ if ( !m_sLastFolderURL.isEmpty() )
xFilePicker->setDisplayDirectory( m_sLastFolderURL );
// collect and set filter list:
@@ -1231,7 +1231,7 @@ UpdateRequiredDialog::UpdateRequiredDialog( Window *pParent, TheExtensionManager
// resize update button
Size aBtnSize = m_aUpdateBtn.GetSizePixel();
- String sTitle = m_aUpdateBtn.GetText();
+ OUString sTitle = m_aUpdateBtn.GetText();
long nWidth = m_aUpdateBtn.GetCtrlTextWidth( sTitle );
nWidth += 2 * m_aUpdateBtn.GetTextHeight();
if ( nWidth > aBtnSize.Width() )
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 436879b1885f..99890173330b 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -109,9 +109,9 @@ class ExtMgrDialog : public ModelessDialog,
FixedText *m_pProgressText;
ProgressBar *m_pProgressBar;
CancelButton *m_pCancelBtn;
- const String m_sAddPackages;
- String m_sProgressText;
- String m_sLastFolderURL;
+ const OUString m_sAddPackages;
+ OUString m_sProgressText;
+ OUString m_sLastFolderURL;
::osl::Mutex m_aMutex;
bool m_bHasProgress;
bool m_bProgressChanged;
@@ -181,9 +181,9 @@ class UpdateRequiredDialog : public ModalDialog,
FixedLine m_aDivider;
FixedText m_aProgressText;
ProgressBar m_aProgressBar;
- const String m_sAddPackages;
- const String m_sCloseText;
- String m_sProgressText;
+ const OUString m_sAddPackages;
+ const OUString m_sCloseText;
+ OUString m_sProgressText;
::osl::Mutex m_aMutex;
bool m_bHasProgress;
bool m_bProgressChanged;
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 19d274956ca8..3b9a3feb2c06 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -112,19 +112,19 @@ Entry_Impl::~Entry_Impl()
{}
//------------------------------------------------------------------------------
-StringCompare Entry_Impl::CompareTo( const CollatorWrapper *pCollator, const TEntry_Impl pEntry ) const
+sal_Int32 Entry_Impl::CompareTo( const CollatorWrapper *pCollator, const TEntry_Impl pEntry ) const
{
- StringCompare eCompare = (StringCompare) pCollator->compareString( m_sTitle, pEntry->m_sTitle );
- if ( eCompare == COMPARE_EQUAL )
+ sal_Int32 eCompare = pCollator->compareString( m_sTitle, pEntry->m_sTitle );
+ if ( eCompare == 0 )
{
- eCompare = m_sVersion.CompareTo( pEntry->m_sVersion );
- if ( eCompare == COMPARE_EQUAL )
+ eCompare = m_sVersion.compareTo( pEntry->m_sVersion );
+ if ( eCompare == 0 )
{
sal_Int32 nCompare = m_xPackage->getRepositoryName().compareTo( pEntry->m_xPackage->getRepositoryName() );
if ( nCompare < 0 )
- eCompare = COMPARE_LESS;
+ eCompare = -1;
else if ( nCompare > 0 )
- eCompare = COMPARE_GREATER;
+ eCompare = 1;
}
}
return eCompare;
@@ -573,7 +573,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
long aTextHeight = GetTextHeight();
// Init publisher link here
- if ( !pEntry->m_pPublisher && pEntry->m_sPublisher.Len() )
+ if ( !pEntry->m_pPublisher && !pEntry->m_sPublisher.isEmpty() )
{
pEntry->m_pPublisher = new FixedHyperlink( this );
pEntry->m_pPublisher->SetBackground();
@@ -603,7 +603,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
if ( aTitleWidth > nMaxTitleWidth - aVersionWidth )
{
aTitleWidth = nMaxTitleWidth - aVersionWidth - (aTextHeight / 3);
- String aShortTitle = GetEllipsisString( pEntry->m_sTitle, aTitleWidth );
+ OUString aShortTitle = GetEllipsisString( pEntry->m_sTitle, aTitleWidth );
DrawText( aPos, aShortTitle );
aTitleWidth += (aTextHeight / 3);
}
@@ -622,7 +622,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
// draw description
OUString sDescription;
- if ( pEntry->m_sErrorText.Len() )
+ if ( !pEntry->m_sErrorText.isEmpty() )
{
if ( pEntry->m_bActive )
sDescription = pEntry->m_sErrorText + OUString("\n") + pEntry->m_sDescription;
@@ -943,14 +943,14 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl pEntry, const long nStar
if ( nStart > nEnd )
return false;
- StringCompare eCompare;
+ sal_Int32 eCompare;
if ( nStart == nEnd )
{
eCompare = pEntry->CompareTo( m_pCollator, m_vEntries[ nStart ] );
- if ( eCompare == COMPARE_LESS )
+ if ( eCompare < 0 )
return false;
- else if ( eCompare == COMPARE_EQUAL )
+ else if ( eCompare == 0 )
{
//Workaround. See i86963.
if (pEntry->m_xPackage != m_vEntries[nStart]->m_xPackage)
@@ -970,9 +970,9 @@ bool ExtensionBox_Impl::FindEntryPos( const TEntry_Impl pEntry, const long nStar
const long nMid = nStart + ( ( nEnd - nStart ) / 2 );
eCompare = pEntry->CompareTo( m_pCollator, m_vEntries[ nMid ] );
- if ( eCompare == COMPARE_LESS )
+ if ( eCompare < 0 )
return FindEntryPos( pEntry, nStart, nMid-1, nPos );
- else if ( eCompare == COMPARE_GREATER )
+ else if ( eCompare > 0 )
return FindEntryPos( pEntry, nMid+1, nEnd, nPos );
else
{
@@ -1027,7 +1027,7 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
TEntry_Impl pEntry( new Entry_Impl( xPackage, eState, bLocked ) );
// Don't add empty entries
- if ( ! pEntry->m_sTitle.Len() )
+ if ( pEntry->m_sTitle.isEmpty() )
return 0;
::osl::ClearableMutexGuard guard(m_entriesMutex);
@@ -1093,7 +1093,7 @@ void ExtensionBox_Impl::updateEntry( const uno::Reference< deployment::XPackage
if ( eState == AMBIGUOUS )
(*iIndex)->m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS );
else if ( ! (*iIndex)->m_bMissingLic )
- (*iIndex)->m_sErrorText = String();
+ (*iIndex)->m_sErrorText = "";
if ( IsReallyVisible() )
Invalidate();
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 12cae91a0f0b..73859d9357ec 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -67,13 +67,13 @@ struct Entry_Impl
bool m_bHasButtons :1;
bool m_bMissingLic :1;
PackageState m_eState;
- String m_sTitle;
- String m_sVersion;
- String m_sDescription;
- String m_sPublisher;
- String m_sPublisherURL;
- String m_sErrorText;
- String m_sLicenseText;
+ OUString m_sTitle;
+ OUString m_sVersion;
+ OUString m_sDescription;
+ OUString m_sPublisher;
+ OUString m_sPublisherURL;
+ OUString m_sErrorText;
+ OUString m_sLicenseText;
Image m_aIcon;
Image m_aIconHC;
FixedHyperlink* m_pPublisher;
@@ -84,7 +84,7 @@ struct Entry_Impl
const PackageState eState, const bool bReadOnly );
~Entry_Impl();
- StringCompare CompareTo( const CollatorWrapper *pCollator, const TEntry_Impl pEntry ) const;
+ sal_Int32 CompareTo( const CollatorWrapper *pCollator, const TEntry_Impl pEntry ) const;
void checkDependencies();
};
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index e823e3c810ce..dc694a257540 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -88,17 +88,17 @@ void MyApp::DeInit()
namespace
{
struct ProductName
- : public rtl::Static< String, ProductName > {};
+ : public rtl::Static< OUString, ProductName > {};
struct Version
- : public rtl::Static< String, Version > {};
+ : public rtl::Static< OUString, Version > {};
struct AboutBoxVersion
- : public rtl::Static< String, AboutBoxVersion > {};
+ : public rtl::Static< OUString, AboutBoxVersion > {};
struct AboutBoxVersionSuffix
- : public rtl::Static< String, AboutBoxVersionSuffix > {};
+ : public rtl::Static< OUString, AboutBoxVersionSuffix > {};
struct OOOVendor
- : public rtl::Static< String, OOOVendor > {};
+ : public rtl::Static< OUString, OOOVendor > {};
struct Extension
- : public rtl::Static< String, Extension > {};
+ : public rtl::Static< OUString, Extension > {};
}
OUString ReplaceProductNameHookProc( const OUString& rStr )
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 84fccdf0bffe..98e066853b0f 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -951,7 +951,7 @@ void UpdateDialog::initDescription()
void UpdateDialog::clearDescription()
{
- String sEmpty;
+ OUString sEmpty;
m_PublisherLabel.Hide();
m_PublisherLink.Hide();
m_PublisherLink.SetText( sEmpty );
@@ -1022,9 +1022,9 @@ bool UpdateDialog::showDescription(std::pair< OUString, OUString > const & pairP
return true;
}
-bool UpdateDialog::showDescription( const String& rDescription, bool bWithPublisher )
+bool UpdateDialog::showDescription( const OUString& rDescription, bool bWithPublisher )
{
- if ( rDescription.Len() == 0 )
+ if ( rDescription.isEmpty() )
// nothing to show
return false;
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index e83df3cba7b1..8d7cdf003555 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -161,7 +161,7 @@ private:
OUString const & sReleaseNotes);
bool showDescription( ::com::sun::star::uno::Reference<
::com::sun::star::xml::dom::XNode > const & aUpdateInfo);
- bool showDescription( const String& rDescription, bool bWithPublisher );
+ bool showDescription( const OUString& rDescription, bool bWithPublisher );
bool isReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ) const;
DECL_LINK(selectionHandler, void *);
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 774f302972ab..fa5db6987a5e 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -217,14 +217,14 @@ UpdateInstallDialog::UpdateInstallDialog(
m_bError(false),
m_bNoEntry(true),
m_bActivated(false),
- m_sInstalling(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING))),
- m_sFinished(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED))),
- m_sNoErrors(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS))),
- m_sErrorDownload(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD))),
- m_sErrorInstallation(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION))),
- m_sErrorLicenseDeclined(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED))),
- m_sNoInstall(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))),
- m_sThisErrorOccurred(String(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))),
+ m_sInstalling(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_INSTALLING))),
+ m_sFinished(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_FINISHED))),
+ m_sNoErrors(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_NO_ERRORS))),
+ m_sErrorDownload(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_DOWNLOAD))),
+ m_sErrorInstallation(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_INSTALLATION))),
+ m_sErrorLicenseDeclined(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_ERROR_LIC_DECLINED))),
+ m_sNoInstall(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NOINSTALL))),
+ m_sThisErrorOccurred(OUString(DpGuiResId(RID_DLG_UPDATE_INSTALL_THIS_ERROR_OCCURRED))),
m_ft_action(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_DOWNLOADING)),
m_statusbar(this,DpGuiResId(RID_DLG_UPDATE_INSTALL_STATUSBAR)),
m_ft_extension_name(this, DpGuiResId(RID_DLG_UPDATE_INSTALL_EXTENSION_NAME)),
@@ -274,7 +274,7 @@ void UpdateInstallDialog::updateDone()
void UpdateInstallDialog::setError(INSTALL_ERROR err, OUString const & sExtension,
OUString const & exceptionMessage)
{
- String sError;
+ OUString sError;
m_bError = true;
switch (err)
@@ -293,7 +293,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, OUString const & sExtensio
OSL_ASSERT(0);
}
- sError.SearchAndReplace(String("%NAME"), String(sExtension), 0);
+ sError = sError.replaceFirst("%NAME", sExtension);
//We want to have an empty line between the error messages. However,
//there shall be no empty line after the last entry.
if (m_bNoEntry)
diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx
index 97202ecda67c..9641cbfea1c9 100644
--- a/desktop/source/deployment/misc/lockfile.cxx
+++ b/desktop/source/deployment/misc/lockfile.cxx
@@ -149,7 +149,7 @@ namespace desktop {
// this checks whether the lockfile was created on the same
// host by the same user. Should this be the case it is safe
// to assume that it is a stale lockfile which can be overwritten
- String aLockname = m_aLockname;
+ OUString aLockname = m_aLockname;
Config aConfig(aLockname);
aConfig.SetGroup(LOCKFILE_GROUP);
OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY );
@@ -175,7 +175,7 @@ namespace desktop {
void Lockfile::syncToFile( void ) const
{
- String aLockname = m_aLockname;
+ OUString aLockname = m_aLockname;
Config aConfig(aLockname);
aConfig.SetGroup(LOCKFILE_GROUP);
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 66cfd4b9bb89..74d7884ea2d2 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -671,7 +671,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
INetContentTypeParameter const * param = params.find(OString("platform"));
bool bPlatformFits(param == 0);
- String aPlatform;
+ OUString aPlatform;
if (!bPlatformFits) // platform is specified, we have to check
{
aPlatform = param->m_sValue;
@@ -683,8 +683,8 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
param = params.find(OString("type"));
if (param != 0)
{
- String const & value = param->m_sValue;
- if (value.EqualsIgnoreCaseAscii("native")) {
+ OUString const & value = param->m_sValue;
+ if (value.equalsIgnoreAsciiCase("native")) {
if (bPlatformFits)
return new BackendImpl::ComponentPackageImpl(
this, url, name, m_xDynComponentTypeInfo,
@@ -695,13 +695,13 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
this, url, name, m_xDynComponentTypeInfo,
bRemoved, identifier, aPlatform);
}
- if (value.EqualsIgnoreCaseAscii("Java")) {
+ if (value.equalsIgnoreAsciiCase("Java")) {
return new BackendImpl::ComponentPackageImpl(
this, url, name, m_xJavaComponentTypeInfo,
"com.sun.star.loader.Java2",
bRemoved, identifier);
}
- if (value.EqualsIgnoreCaseAscii("Python")) {
+ if (value.equalsIgnoreAsciiCase("Python")) {
return new BackendImpl::ComponentPackageImpl(
this, url, name, m_xPythonComponentTypeInfo,
"com.sun.star.loader.Python",
@@ -723,14 +723,14 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
INetContentTypeParameter const * param = params.find(OString("type"));
if (param != 0) {
- String const & value = param->m_sValue;
- if (value.EqualsIgnoreCaseAscii("RDB"))
+ OUString const & value = param->m_sValue;
+ if (value.equalsIgnoreAsciiCase("RDB"))
{
return new BackendImpl::TypelibraryPackageImpl(
this, url, name, m_xRDBTypelibTypeInfo,
false /* rdb */, bRemoved, identifier);
}
- if (value.EqualsIgnoreCaseAscii("Java")) {
+ if (value.equalsIgnoreAsciiCase("Java")) {
return new BackendImpl::TypelibraryPackageImpl(
this, url, name, m_xJavaTypelibTypeInfo,
true /* jar */, bRemoved, identifier);
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 5abe441c72ec..d359f185c665 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -153,7 +153,7 @@ bool IsUserWordbook( const OUString& rFile )
static const sal_Char* pVerOOo7 = "OOoUserDict1";
bool bRet = false;
- SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( String(rFile), STREAM_STD_READ );
+ SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( OUString(rFile), STREAM_STD_READ );
if ( pStream && !pStream->GetError() )
{
sal_Size nSniffPos = pStream->Tell();