[Libreoffice-commits] .: 4 commits - desktop/source fpicker/source framework/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri Oct 29 08:43:40 PDT 2010
desktop/source/migration/migration.cxx | 128 ++++++++++----------
fpicker/source/unx/kde/makefile.mk | 2
framework/source/services/autorecovery.cxx | 172 +++++++++++++--------------
framework/source/services/taskcreatorsrv.cxx | 22 +--
4 files changed, 162 insertions(+), 162 deletions(-)
New commits:
commit afb8e9d8d4680d3023133fa6840d1a8e539191d1
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 29 15:31:57 2010 +0100
small startup optimizations
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 7cbe0fe..83e00d8 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -79,19 +79,19 @@ using namespace com::sun::star;
namespace desktop {
-static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL");
-static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer");
-static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label");
+static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL(RTL_CONSTASCII_USTRINGPARAM("CommandURL"));
+static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER(RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer"));
+static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL(RTL_CONSTASCII_USTRINGPARAM("Label"));
-static const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | ");
-static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("...");
+static const ::rtl::OUString MENU_SEPERATOR(RTL_CONSTASCII_USTRINGPARAM(" | "));
+static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
{
::rtl::OUString sLabel;
uno::Reference< container::XNameAccess > xUICommands;
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Any a = xNameAccess->getByName( sModuleIdentifier );
@@ -152,44 +152,44 @@ static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..
{
::rtl::OUString sIdentifier;
- if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule");
+ if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartModule"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("swriter")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swriter"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("scalc")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("scalc"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("sdraw")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdraw"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("simpress")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("simpress"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("smath")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smath"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.formula.FormulaProperties"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("schart")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("schart"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("BasicIDE")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BasicIDE"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.BasicIDE"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("dbapp")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbapp"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("sglobal")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sglobal"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("sweb")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sweb"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("swxform")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swxform"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xforms.XMLFormDocument"));
- else if (sShortName.equals(::rtl::OUString::createFromAscii("sbibliography")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sbibliography"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Bibliography"));
return sIdentifier;
}
@@ -288,8 +288,8 @@ sal_Bool MigrationImpl::doMigration()
copyFiles();
- const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+ const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
+ const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
{
::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName);
@@ -297,15 +297,15 @@ sal_Bool MigrationImpl::doMigration()
continue;
uno::Sequence< uno::Any > lArgs(2);
- ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/");
+ ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/config/soffice.cfg/modules/"));
lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName;
lArgs[1] <<= embed::ElementModes::READ;
- uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.FileSystemStorageFactory"))), uno::UNO_QUERY);
uno::Reference< embed::XStorage > xModules;
xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
- uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY );
+ uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.UIConfigurationManager"))), uno::UNO_QUERY );
uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY );
uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY );
@@ -371,7 +371,7 @@ sal_Bool MigrationImpl::doMigration()
void MigrationImpl::refresh()
{
uno::Reference< XRefreshable > xRefresh(m_xFactory->createInstance(
- OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), uno::UNO_QUERY);
if (xRefresh.is())
xRefresh->refresh();
else
@@ -383,7 +383,7 @@ void MigrationImpl::setMigrationCompleted()
{
try {
uno::Reference< XPropertySet > aPropertySet(getConfigAccess("org.openoffice.Setup/Office", true), uno::UNO_QUERY_THROW);
- aPropertySet->setPropertyValue(OUString::createFromAscii("MigrationCompleted"), uno::makeAny(sal_True));
+ aPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationCompleted")), uno::makeAny(sal_True));
uno::Reference< XChangesBatch >(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges();
} catch (...) {
// fail silently
@@ -397,7 +397,7 @@ sal_Bool MigrationImpl::checkMigrationCompleted()
uno::Reference< XPropertySet > aPropertySet(
getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);
aPropertySet->getPropertyValue(
- OUString::createFromAscii("MigrationCompleted")) >>= bMigrationCompleted;
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationCompleted"))) >>= bMigrationCompleted;
static const char* pEnv = getenv("SAL_DISABLE_USERMIGRATION" );
if( !bMigrationCompleted && pEnv != NULL )
@@ -482,7 +482,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
// read included files from current step description
::rtl::OUString aSeqEntry;
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedFiles"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
{
@@ -492,35 +492,35 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
}
// exluded files...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedFiles")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedFiles"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.excludeFiles.push_back(tmpSeq[j]);
}
// included nodes...
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedNodes")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedNodes"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.includeConfig.push_back(tmpSeq[j]);
}
// excluded nodes...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedNodes")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedNodes"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.excludeConfig.push_back(tmpSeq[j]);
}
// included extensions...
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedExtensions")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedExtensions"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.includeExtensions.push_back(tmpSeq[j]);
}
// excluded extensions...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedExtensions"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
{
@@ -530,7 +530,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
}
// generic service
- tmpAccess->getByName(OUString::createFromAscii("MigrationService")) >>= tmpStep.service;
+ tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationService"))) >>= tmpStep.service;
vrMigrations->push_back(tmpStep);
}
@@ -559,7 +559,7 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
install_info aInfo;
strings_v::const_iterator i_ver = rVersions.begin();
- uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.PathSubstitution")), uno::UNO_QUERY );
+ uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution"))), uno::UNO_QUERY );
while (i_ver != rVersions.end())
{
::rtl::OUString aVersion, aProfileName;
@@ -577,10 +577,10 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
::rtl::OUString aUserInst;
osl::Security().getConfigDir( aUserInst );
if ( aUserInst.getLength() && aUserInst[ aUserInst.getLength()-1 ] != '/' )
- aUserInst += ::rtl::OUString::createFromAscii("/");
+ aUserInst += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
#if defined UNX && ! defined MACOSX
// tribute to whoever had the "great" idea to use different names on Windows and Unix
- aUserInst += ::rtl::OUString::createFromAscii(".");
+ aUserInst += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
#endif
aUserInst += aProfileName;
try
@@ -854,12 +854,12 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
{
uno::Reference< XNameAccess > xNameAccess;
try{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
OUString sAccessSrvc;
if (bUpdate)
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
else
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
OUString sConfigURL = OUString::createFromAscii(pPath);
@@ -924,10 +924,10 @@ void MigrationImpl::runServices()
// Build argument array
uno::Sequence< uno::Any > seqArguments(3);
seqArguments[0] = uno::makeAny(NamedValue(
- OUString::createFromAscii("Productname"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Productname")),
uno::makeAny(m_aInfo.productname)));
seqArguments[1] = uno::makeAny(NamedValue(
- OUString::createFromAscii("UserData"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("UserData")),
uno::makeAny(m_aInfo.userdata)));
@@ -950,7 +950,7 @@ void MigrationImpl::runServices()
seqExtBlackList = comphelper::arrayToSequence< ::rtl::OUString >(
&i_mig->excludeExtensions[0], nSize );
seqArguments[2] = uno::makeAny(NamedValue(
- OUString::createFromAscii("ExtensionBlackList"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ExtensionBlackList")),
uno::makeAny( seqExtBlackList )));
xMigrationJob = uno::Reference< XJob >(m_xFactory->createInstanceWithArguments(
@@ -981,14 +981,14 @@ void MigrationImpl::runServices()
::std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules() const
{
::std::vector< MigrationModuleInfo > vModulesInfo;
- const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar");
- const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar");
+ const ::rtl::OUString MENUBAR(RTL_CONSTASCII_USTRINGPARAM("menubar"));
+ const ::rtl::OUString TOOLBAR(RTL_CONSTASCII_USTRINGPARAM("toolbar"));
uno::Sequence< uno::Any > lArgs(2);
- lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules");
+ lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/config/soffice.cfg/modules"));
lArgs[1] <<= embed::ElementModes::READ;
- uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.FileSystemStorageFactory"))), uno::UNO_QUERY);
uno::Reference< embed::XStorage > xModules;
xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
@@ -1020,7 +1020,7 @@ void MigrationImpl::runServices()
uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ);
if (xToolbar.is())
{
- const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_");
+ const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT(RTL_CONSTASCII_USTRINGPARAM("custom_"));
sal_Int32 nCustomLen = 7;
uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY);
@@ -1329,9 +1329,9 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules
m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
- const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
- const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+ const ::rtl::OUString sModuleCfgSupplier(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"));
+ const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
+ const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY);
commit be1ce67f82f89630f42200bbe95a21e935dd9727
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 29 15:26:24 2010 +0100
small startup optimizations
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index f81ed77..74debc9 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -129,86 +129,86 @@ namespace framework
//-----------------------------------------------
// recovery.xcu
-static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
-static const ::rtl::OUString CFG_ENTRY_RECOVERYLIST = ::rtl::OUString::createFromAscii("RecoveryList" );
-static const ::rtl::OUString CFG_PATH_RECOVERYINFO = ::rtl::OUString::createFromAscii("RecoveryInfo" );
-static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
-static const ::rtl::OUString CFG_ENTRY_CRASHED = ::rtl::OUString::createFromAscii("Crashed" );
-static const ::rtl::OUString CFG_ENTRY_SESSIONDATA = ::rtl::OUString::createFromAscii("SessionData" );
-
-static const ::rtl::OUString CFG_ENTRY_AUTOSAVE_ENABLED = ::rtl::OUString::createFromAscii("AutoSave/Enabled" );
-static const ::rtl::OUString CFG_ENTRY_AUTOSAVE_TIMEINTERVALL = ::rtl::OUString::createFromAscii("AutoSave/TimeIntervall" );
-
-static const ::rtl::OUString CFG_PATH_AUTOSAVE = ::rtl::OUString::createFromAscii("AutoSave" );
-static const ::rtl::OUString CFG_ENTRY_MINSPACE_DOCSAVE = ::rtl::OUString::createFromAscii("MinSpaceDocSave" );
-static const ::rtl::OUString CFG_ENTRY_MINSPACE_CONFIGSAVE = ::rtl::OUString::createFromAscii("MinSpaceConfigSave" );
-
-static const ::rtl::OUString CFG_PACKAGE_MODULES = ::rtl::OUString::createFromAscii("org.openoffice.Setup/Office/Factories");
-static const ::rtl::OUString CFG_ENTRY_REALDEFAULTFILTER = ::rtl::OUString::createFromAscii("ooSetupFactoryActualFilter" );
-
-static const ::rtl::OUString CFG_ENTRY_PROP_TEMPURL = ::rtl::OUString::createFromAscii("TempURL" );
-static const ::rtl::OUString CFG_ENTRY_PROP_ORIGINALURL = ::rtl::OUString::createFromAscii("OriginalURL" );
-static const ::rtl::OUString CFG_ENTRY_PROP_TEMPLATEURL = ::rtl::OUString::createFromAscii("TemplateURL" );
-static const ::rtl::OUString CFG_ENTRY_PROP_FACTORYURL = ::rtl::OUString::createFromAscii("FactoryURL" );
-static const ::rtl::OUString CFG_ENTRY_PROP_MODULE = ::rtl::OUString::createFromAscii("Module" );
-static const ::rtl::OUString CFG_ENTRY_PROP_DOCUMENTSTATE = ::rtl::OUString::createFromAscii("DocumentState");
-static const ::rtl::OUString CFG_ENTRY_PROP_FILTER = ::rtl::OUString::createFromAscii("Filter" );
-static const ::rtl::OUString CFG_ENTRY_PROP_TITLE = ::rtl::OUString::createFromAscii("Title" );
-static const ::rtl::OUString CFG_ENTRY_PROP_ID = ::rtl::OUString::createFromAscii("ID" );
-static const ::rtl::OUString CFG_ENTRY_PROP_VIEWNAMES = ::rtl::OUString::createFromAscii("ViewNames" );
-
-static const ::rtl::OUString FILTER_PROP_TYPE = ::rtl::OUString::createFromAscii("Type" );
-static const ::rtl::OUString FILTER_PROP_NAME = ::rtl::OUString::createFromAscii("Name" );
-static const ::rtl::OUString TYPE_PROP_EXTENSIONS = ::rtl::OUString::createFromAscii("Extensions" );
-static const ::rtl::OUString DOCINFO_PROP_TEMPLATE = ::rtl::OUString::createFromAscii("TemplateFileName");
+static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/"));
+static const ::rtl::OUString CFG_ENTRY_RECOVERYLIST(RTL_CONSTASCII_USTRINGPARAM("RecoveryList"));
+static const ::rtl::OUString CFG_PATH_RECOVERYINFO(RTL_CONSTASCII_USTRINGPARAM("RecoveryInfo"));
+static const ::rtl::OUString CFG_ENTRY_ENABLED(RTL_CONSTASCII_USTRINGPARAM("Enabled"));
+static const ::rtl::OUString CFG_ENTRY_CRASHED(RTL_CONSTASCII_USTRINGPARAM("Crashed"));
+static const ::rtl::OUString CFG_ENTRY_SESSIONDATA(RTL_CONSTASCII_USTRINGPARAM("SessionData"));
+
+static const ::rtl::OUString CFG_ENTRY_AUTOSAVE_ENABLED(RTL_CONSTASCII_USTRINGPARAM("AutoSave/Enabled"));
+static const ::rtl::OUString CFG_ENTRY_AUTOSAVE_TIMEINTERVALL(RTL_CONSTASCII_USTRINGPARAM("AutoSave/TimeIntervall"));
+
+static const ::rtl::OUString CFG_PATH_AUTOSAVE(RTL_CONSTASCII_USTRINGPARAM("AutoSave"));
+static const ::rtl::OUString CFG_ENTRY_MINSPACE_DOCSAVE(RTL_CONSTASCII_USTRINGPARAM("MinSpaceDocSave"));
+static const ::rtl::OUString CFG_ENTRY_MINSPACE_CONFIGSAVE(RTL_CONSTASCII_USTRINGPARAM("MinSpaceConfigSave"));
+
+static const ::rtl::OUString CFG_PACKAGE_MODULES(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office/Factories"));
+static const ::rtl::OUString CFG_ENTRY_REALDEFAULTFILTER(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryActualFilter"));
+
+static const ::rtl::OUString CFG_ENTRY_PROP_TEMPURL(RTL_CONSTASCII_USTRINGPARAM("TempURL"));
+static const ::rtl::OUString CFG_ENTRY_PROP_ORIGINALURL(RTL_CONSTASCII_USTRINGPARAM("OriginalURL"));
+static const ::rtl::OUString CFG_ENTRY_PROP_TEMPLATEURL(RTL_CONSTASCII_USTRINGPARAM("TemplateURL"));
+static const ::rtl::OUString CFG_ENTRY_PROP_FACTORYURL(RTL_CONSTASCII_USTRINGPARAM("FactoryURL"));
+static const ::rtl::OUString CFG_ENTRY_PROP_MODULE(RTL_CONSTASCII_USTRINGPARAM("Module"));
+static const ::rtl::OUString CFG_ENTRY_PROP_DOCUMENTSTATE(RTL_CONSTASCII_USTRINGPARAM("DocumentState"));
+static const ::rtl::OUString CFG_ENTRY_PROP_FILTER(RTL_CONSTASCII_USTRINGPARAM("Filter"));
+static const ::rtl::OUString CFG_ENTRY_PROP_TITLE(RTL_CONSTASCII_USTRINGPARAM("Title"));
+static const ::rtl::OUString CFG_ENTRY_PROP_ID(RTL_CONSTASCII_USTRINGPARAM("ID"));
+static const ::rtl::OUString CFG_ENTRY_PROP_VIEWNAMES(RTL_CONSTASCII_USTRINGPARAM("ViewNames"));
+
+static const ::rtl::OUString FILTER_PROP_TYPE(RTL_CONSTASCII_USTRINGPARAM("Type"));
+static const ::rtl::OUString FILTER_PROP_NAME(RTL_CONSTASCII_USTRINGPARAM("Name"));
+static const ::rtl::OUString TYPE_PROP_EXTENSIONS(RTL_CONSTASCII_USTRINGPARAM("Extensions"));
+static const ::rtl::OUString DOCINFO_PROP_TEMPLATE(RTL_CONSTASCII_USTRINGPARAM("TemplateFileName"));
// setup.xcu
-static const ::rtl::OUString CFG_ENTRY_PROP_EMPTYDOCUMENTURL = ::rtl::OUString::createFromAscii("ooSetupFactoryEmptyDocumentURL");
-static const ::rtl::OUString CFG_ENTRY_PROP_DEFAULTFILTER = ::rtl::OUString::createFromAscii("ooSetupFactoryDefaultFilter" );
-static const ::rtl::OUString CFG_ENTRY_PROP_FACTORYSERVICE = ::rtl::OUString::createFromAscii("ooSetupFactoryDocumentService" );
-
-static const ::rtl::OUString EVENT_ON_NEW = ::rtl::OUString::createFromAscii("OnNew" );
-static const ::rtl::OUString EVENT_ON_LOAD = ::rtl::OUString::createFromAscii("OnLoad" );
-static const ::rtl::OUString EVENT_ON_UNLOAD = ::rtl::OUString::createFromAscii("OnUnload" );
-static const ::rtl::OUString EVENT_ON_MODIFYCHANGED = ::rtl::OUString::createFromAscii("OnModifyChanged");
-static const ::rtl::OUString EVENT_ON_SAVE = ::rtl::OUString::createFromAscii("OnSave" );
-static const ::rtl::OUString EVENT_ON_SAVEAS = ::rtl::OUString::createFromAscii("OnSaveAs" );
-static const ::rtl::OUString EVENT_ON_SAVETO = ::rtl::OUString::createFromAscii("OnCopyTo" );
-static const ::rtl::OUString EVENT_ON_SAVEDONE = ::rtl::OUString::createFromAscii("OnSaveDone" );
-static const ::rtl::OUString EVENT_ON_SAVEASDONE = ::rtl::OUString::createFromAscii("OnSaveAsDone" );
-static const ::rtl::OUString EVENT_ON_SAVETODONE = ::rtl::OUString::createFromAscii("OnCopyToDone" );
-static const ::rtl::OUString EVENT_ON_SAVEFAILED = ::rtl::OUString::createFromAscii("OnSaveFailed" );
-static const ::rtl::OUString EVENT_ON_SAVEASFAILED = ::rtl::OUString::createFromAscii("OnSaveAsFailed" );
-static const ::rtl::OUString EVENT_ON_SAVETOFAILED = ::rtl::OUString::createFromAscii("OnCopyToFailed" );
-
-static const ::rtl::OUString RECOVERY_ITEM_BASE_IDENTIFIER = ::rtl::OUString::createFromAscii("recovery_item_" );
-
-static const ::rtl::OUString CMD_PROTOCOL = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:");
-
-static const ::rtl::OUString CMD_DO_AUTO_SAVE = ::rtl::OUString::createFromAscii("/doAutoSave" ); // force AutoSave ignoring the AutoSave timer
-static const ::rtl::OUString CMD_DO_PREPARE_EMERGENCY_SAVE = ::rtl::OUString::createFromAscii("/doPrepareEmergencySave" ); // prepare the office for the following EmergencySave step (hide windows etcpp.)
-static const ::rtl::OUString CMD_DO_EMERGENCY_SAVE = ::rtl::OUString::createFromAscii("/doEmergencySave" ); // do EmergencySave on crash
-static const ::rtl::OUString CMD_DO_RECOVERY = ::rtl::OUString::createFromAscii("/doAutoRecovery" ); // recover all crashed documents
-static const ::rtl::OUString CMD_DO_ENTRY_BACKUP = ::rtl::OUString::createFromAscii("/doEntryBackup" ); // try to store a temp or original file to a user defined location
-static const ::rtl::OUString CMD_DO_ENTRY_CLEANUP = ::rtl::OUString::createFromAscii("/doEntryCleanUp" ); // remove the specified entry from the recovery cache
-static const ::rtl::OUString CMD_DO_SESSION_SAVE = ::rtl::OUString::createFromAscii("/doSessionSave" ); // save all open documents if e.g. a window manager closes an user session
-static const ::rtl::OUString CMD_DO_SESSION_QUIET_QUIT = ::rtl::OUString::createFromAscii("/doSessionQuietQuit" ); // let the current session be quietly closed ( the saving should be done using doSessionSave previously ) if e.g. a window manager closes an user session
-static const ::rtl::OUString CMD_DO_SESSION_RESTORE = ::rtl::OUString::createFromAscii("/doSessionRestore" ); // restore a saved user session from disc
-static const ::rtl::OUString CMD_DO_DISABLE_RECOVERY = ::rtl::OUString::createFromAscii("/disableRecovery" ); // disable recovery and auto save (!) temp. for this office session
-static const ::rtl::OUString CMD_DO_SET_AUTOSAVE_STATE = ::rtl::OUString::createFromAscii("/setAutoSaveState" ); // disable/enable auto save (not crash save) for this office session
-
-static const ::rtl::OUString REFERRER_USER = ::rtl::OUString::createFromAscii("private:user");
-
-static const ::rtl::OUString PROP_DISPATCH_ASYNCHRON = ::rtl::OUString::createFromAscii("DispatchAsynchron");
-static const ::rtl::OUString PROP_PROGRESS = ::rtl::OUString::createFromAscii("StatusIndicator" );
-static const ::rtl::OUString PROP_SAVEPATH = ::rtl::OUString::createFromAscii("SavePath" );
-static const ::rtl::OUString PROP_ENTRY_ID = ::rtl::OUString::createFromAscii("EntryID" );
-static const ::rtl::OUString PROP_DBG_MAKE_IT_FASTER = ::rtl::OUString::createFromAscii("DBGMakeItFaster" );
-static const ::rtl::OUString PROP_AUTOSAVE_STATE = ::rtl::OUString::createFromAscii("AutoSaveState" );
-
-static const ::rtl::OUString OPERATION_START = ::rtl::OUString::createFromAscii("start" );
-static const ::rtl::OUString OPERATION_STOP = ::rtl::OUString::createFromAscii("stop" );
-static const ::rtl::OUString OPERATION_UPDATE = ::rtl::OUString::createFromAscii("update");
+static const ::rtl::OUString CFG_ENTRY_PROP_EMPTYDOCUMENTURL(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryEmptyDocumentURL"));
+static const ::rtl::OUString CFG_ENTRY_PROP_DEFAULTFILTER(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDefaultFilter"));
+static const ::rtl::OUString CFG_ENTRY_PROP_FACTORYSERVICE(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDocumentService"));
+
+static const ::rtl::OUString EVENT_ON_NEW(RTL_CONSTASCII_USTRINGPARAM("OnNew"));
+static const ::rtl::OUString EVENT_ON_LOAD(RTL_CONSTASCII_USTRINGPARAM("OnLoad"));
+static const ::rtl::OUString EVENT_ON_UNLOAD(RTL_CONSTASCII_USTRINGPARAM("OnUnload"));
+static const ::rtl::OUString EVENT_ON_MODIFYCHANGED(RTL_CONSTASCII_USTRINGPARAM("OnModifyChanged"));
+static const ::rtl::OUString EVENT_ON_SAVE(RTL_CONSTASCII_USTRINGPARAM("OnSave"));
+static const ::rtl::OUString EVENT_ON_SAVEAS(RTL_CONSTASCII_USTRINGPARAM("OnSaveAs"));
+static const ::rtl::OUString EVENT_ON_SAVETO(RTL_CONSTASCII_USTRINGPARAM("OnCopyTo"));
+static const ::rtl::OUString EVENT_ON_SAVEDONE(RTL_CONSTASCII_USTRINGPARAM("OnSaveDone"));
+static const ::rtl::OUString EVENT_ON_SAVEASDONE(RTL_CONSTASCII_USTRINGPARAM("OnSaveAsDone"));
+static const ::rtl::OUString EVENT_ON_SAVETODONE(RTL_CONSTASCII_USTRINGPARAM("OnCopyToDone"));
+static const ::rtl::OUString EVENT_ON_SAVEFAILED(RTL_CONSTASCII_USTRINGPARAM("OnSaveFailed"));
+static const ::rtl::OUString EVENT_ON_SAVEASFAILED(RTL_CONSTASCII_USTRINGPARAM("OnSaveAsFailed"));
+static const ::rtl::OUString EVENT_ON_SAVETOFAILED(RTL_CONSTASCII_USTRINGPARAM("OnCopyToFailed"));
+
+static const ::rtl::OUString RECOVERY_ITEM_BASE_IDENTIFIER(RTL_CONSTASCII_USTRINGPARAM("recovery_item_"));
+
+static const ::rtl::OUString CMD_PROTOCOL(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:"));
+
+static const ::rtl::OUString CMD_DO_AUTO_SAVE(RTL_CONSTASCII_USTRINGPARAM("/doAutoSave")); // force AutoSave ignoring the AutoSave timer
+static const ::rtl::OUString CMD_DO_PREPARE_EMERGENCY_SAVE(RTL_CONSTASCII_USTRINGPARAM("/doPrepareEmergencySave")); // prepare the office for the following EmergencySave step (hide windows etcpp.)
+static const ::rtl::OUString CMD_DO_EMERGENCY_SAVE(RTL_CONSTASCII_USTRINGPARAM("/doEmergencySave")); // do EmergencySave on crash
+static const ::rtl::OUString CMD_DO_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("/doAutoRecovery")); // recover all crashed documents
+static const ::rtl::OUString CMD_DO_ENTRY_BACKUP(RTL_CONSTASCII_USTRINGPARAM("/doEntryBackup")); // try to store a temp or original file to a user defined location
+static const ::rtl::OUString CMD_DO_ENTRY_CLEANUP(RTL_CONSTASCII_USTRINGPARAM("/doEntryCleanUp")); // remove the specified entry from the recovery cache
+static const ::rtl::OUString CMD_DO_SESSION_SAVE(RTL_CONSTASCII_USTRINGPARAM("/doSessionSave")); // save all open documents if e.g. a window manager closes an user session
+static const ::rtl::OUString CMD_DO_SESSION_QUIET_QUIT(RTL_CONSTASCII_USTRINGPARAM("/doSessionQuietQuit")); // let the current session be quietly closed ( the saving should be done using doSessionSave previously ) if e.g. a window manager closes an user session
+static const ::rtl::OUString CMD_DO_SESSION_RESTORE(RTL_CONSTASCII_USTRINGPARAM("/doSessionRestore")); // restore a saved user session from disc
+static const ::rtl::OUString CMD_DO_DISABLE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("/disableRecovery")); // disable recovery and auto save (!) temp. for this office session
+static const ::rtl::OUString CMD_DO_SET_AUTOSAVE_STATE(RTL_CONSTASCII_USTRINGPARAM("/setAutoSaveState")); // disable/enable auto save (not crash save) for this office session
+
+static const ::rtl::OUString REFERRER_USER(RTL_CONSTASCII_USTRINGPARAM("private:user"));
+
+static const ::rtl::OUString PROP_DISPATCH_ASYNCHRON(RTL_CONSTASCII_USTRINGPARAM("DispatchAsynchron"));
+static const ::rtl::OUString PROP_PROGRESS(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator"));
+static const ::rtl::OUString PROP_SAVEPATH(RTL_CONSTASCII_USTRINGPARAM("SavePath"));
+static const ::rtl::OUString PROP_ENTRY_ID(RTL_CONSTASCII_USTRINGPARAM("EntryID"));
+static const ::rtl::OUString PROP_DBG_MAKE_IT_FASTER(RTL_CONSTASCII_USTRINGPARAM("DBGMakeItFaster"));
+static const ::rtl::OUString PROP_AUTOSAVE_STATE(RTL_CONSTASCII_USTRINGPARAM("AutoSaveState"));
+
+static const ::rtl::OUString OPERATION_START(RTL_CONSTASCII_USTRINGPARAM("start"));
+static const ::rtl::OUString OPERATION_STOP(RTL_CONSTASCII_USTRINGPARAM("stop"));
+static const ::rtl::OUString OPERATION_UPDATE(RTL_CONSTASCII_USTRINGPARAM("update"));
static const sal_Int32 MIN_DISCSPACE_DOCSAVE = 5; // [MB]
static const sal_Int32 MIN_DISCSPACE_CONFIGSAVE = 1; // [MB]
@@ -423,7 +423,7 @@ void CacheLockGuard::lock(sal_Bool bLockForAddRemoveVectorItems)
{
OSL_ENSURE(sal_False, "Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.");
throw css::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp."),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Re-entrance problem detected. Using of an stl structure in combination with iteration, adding, removing of elements etcpp.")),
m_xOwner);
}
@@ -450,7 +450,7 @@ void CacheLockGuard::unlock()
{
OSL_ENSURE(sal_False, "Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)");
throw css::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wrong using of member m_nDocCacheLock detected. A ref counted value shouldn't reach values <0 .-)")),
m_xOwner);
}
aWriteLock.unlock();
@@ -813,7 +813,7 @@ void SAL_CALL AutoRecovery::addStatusListener(const css::uno::Reference< css::fr
throw(css::uno::RuntimeException)
{
if (!xListener.is())
- throw css::uno::RuntimeException(::rtl::OUString::createFromAscii("Invalid listener reference."), static_cast< css::frame::XDispatch* >(this));
+ throw css::uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid listener reference.")), static_cast< css::frame::XDispatch* >(this));
// container is threadsafe by using a shared mutex!
m_lListener.addInterface(aURL.Complete, xListener);
@@ -848,7 +848,7 @@ void SAL_CALL AutoRecovery::removeStatusListener(const css::uno::Reference< css:
throw(css::uno::RuntimeException)
{
if (!xListener.is())
- throw css::uno::RuntimeException(::rtl::OUString::createFromAscii("Invalid listener reference."), static_cast< css::frame::XDispatch* >(this));
+ throw css::uno::RuntimeException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid listener reference.")), static_cast< css::frame::XDispatch* >(this));
// container is threadsafe by using a shared mutex!
m_lListener.removeInterface(aURL.Complete, xListener);
}
@@ -1212,7 +1212,7 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
if (!rInfo.AppModule.getLength())
{
throw css::uno::RuntimeException(
- ::rtl::OUString::createFromAscii("Cant find out the default filter and its extension, if no application module is known!"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Cant find out the default filter and its extension, if no application module is known!")),
static_cast< css::frame::XDispatch* >(this));
}
@@ -1254,11 +1254,11 @@ void AutoRecovery::implts_specifyDefaultFilterAndExtension(AutoRecovery::TDocume
css::uno::Sequence< ::rtl::OUString > lExtensions = lTypeProps.getUnpackedValueOrDefault(TYPE_PROP_EXTENSIONS, css::uno::Sequence< ::rtl::OUString >());
if (lExtensions.getLength())
{
- rInfo.Extension = ::rtl::OUString::createFromAscii(".");
+ rInfo.Extension = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
rInfo.Extension += lExtensions[0];
}
else
- rInfo.Extension = ::rtl::OUString::createFromAscii(".unknown");
+ rInfo.Extension = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".unknown"));
}
catch(const css::uno::Exception&)
{
@@ -3715,7 +3715,7 @@ void AutoRecovery::st_impl_removeFile(const ::rtl::OUString& sURL)
try
{
::ucbhelper::Content aContent = ::ucbhelper::Content(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >());
- aContent.executeCommand(::rtl::OUString::createFromAscii("delete"), css::uno::makeAny(sal_True));
+ aContent.executeCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), css::uno::makeAny(sal_True));
}
catch(const css::uno::Exception&)
{}
commit a2f635cee7c41fcdd46b842b15aed19b9136e389
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 29 15:12:58 2010 +0100
small startup optimization
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 67ba0e5..f8b62da 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -66,14 +66,14 @@ namespace framework
{
//-----------------------------------------------
-const ::rtl::OUString TaskCreatorService::ARGUMENT_PARENTFRAME = ::rtl::OUString::createFromAscii("ParentFrame" ); // XFrame
-const ::rtl::OUString TaskCreatorService::ARGUMENT_FRAMENAME = ::rtl::OUString::createFromAscii("FrameName" ); // OUString
-const ::rtl::OUString TaskCreatorService::ARGUMENT_MAKEVISIBLE = ::rtl::OUString::createFromAscii("MakeVisible" ); // sal_Bool
-const ::rtl::OUString TaskCreatorService::ARGUMENT_CREATETOPWINDOW = ::rtl::OUString::createFromAscii("CreateTopWindow" ); // sal_Bool
-const ::rtl::OUString TaskCreatorService::ARGUMENT_POSSIZE = ::rtl::OUString::createFromAscii("PosSize" ); // Rectangle
-const ::rtl::OUString TaskCreatorService::ARGUMENT_CONTAINERWINDOW = ::rtl::OUString::createFromAscii("ContainerWindow" ); // XWindow
-const ::rtl::OUString TaskCreatorService::ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE = ::rtl::OUString::createFromAscii("SupportPersistentWindowState" ); // sal_Bool
-const ::rtl::OUString TaskCreatorService::ARGUMENT_ENABLE_TITLEBARUPDATE = ::rtl::OUString::createFromAscii("EnableTitleBarUpdate" ); // sal_Bool
+const ::rtl::OUString TaskCreatorService::ARGUMENT_PARENTFRAME(RTL_CONSTASCII_USTRINGPARAM("ParentFrame")); // XFrame
+const ::rtl::OUString TaskCreatorService::ARGUMENT_FRAMENAME(RTL_CONSTASCII_USTRINGPARAM("FrameName")); // OUString
+const ::rtl::OUString TaskCreatorService::ARGUMENT_MAKEVISIBLE(RTL_CONSTASCII_USTRINGPARAM("MakeVisible")); // sal_Bool
+const ::rtl::OUString TaskCreatorService::ARGUMENT_CREATETOPWINDOW(RTL_CONSTASCII_USTRINGPARAM("CreateTopWindow")); // sal_Bool
+const ::rtl::OUString TaskCreatorService::ARGUMENT_POSSIZE(RTL_CONSTASCII_USTRINGPARAM("PosSize")); // Rectangle
+const ::rtl::OUString TaskCreatorService::ARGUMENT_CONTAINERWINDOW(RTL_CONSTASCII_USTRINGPARAM("ContainerWindow")); // XWindow
+const ::rtl::OUString TaskCreatorService::ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE(RTL_CONSTASCII_USTRINGPARAM("SupportPersistentWindowState")); // sal_Bool
+const ::rtl::OUString TaskCreatorService::ARGUMENT_ENABLE_TITLEBARUPDATE(RTL_CONSTASCII_USTRINGPARAM("EnableTitleBarUpdate")); // sal_Bool
//-----------------------------------------------
DEFINE_XINTERFACE_3(TaskCreatorService ,
@@ -263,7 +263,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
if (bTopWindow)
{
aDescriptor.Type = css::awt::WindowClass_TOP ;
- aDescriptor.WindowServiceName = DECLARE_ASCII("window") ;
+ aDescriptor.WindowServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("window"));
aDescriptor.ParentIndex = -1 ;
aDescriptor.Parent = css::uno::Reference< css::awt::XWindowPeer >() ;
aDescriptor.Bounds = aPosSize ;
@@ -276,7 +276,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
else
{
aDescriptor.Type = css::awt::WindowClass_TOP ;
- aDescriptor.WindowServiceName = DECLARE_ASCII("dockingwindow") ;
+ aDescriptor.WindowServiceName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dockingwindow"));
aDescriptor.ParentIndex = 1 ;
aDescriptor.Parent = xParentWindowPeer ;
aDescriptor.Bounds = aPosSize ;
@@ -287,7 +287,7 @@ css::uno::Reference< css::awt::XWindow > TaskCreatorService::implts_createContai
css::uno::Reference< css::awt::XWindowPeer > xPeer = xToolkit->createWindow( aDescriptor );
css::uno::Reference< css::awt::XWindow > xWindow ( xPeer, css::uno::UNO_QUERY );
if ( ! xWindow.is())
- throw css::uno::Exception(::rtl::OUString::createFromAscii("TaskCreator service was not able to create suitable frame window."),
+ throw css::uno::Exception(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TaskCreator service was not able to create suitable frame window.")),
static_cast< ::cppu::OWeakObject* >(this));
if (bTopWindow)
xPeer->setBackground(::svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor);
commit f4a113650b7b06efb3033589ba68c7bb1dc4d4ca
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 29 15:12:34 2010 +0100
explicit X11 for Xlib calls
diff --git a/fpicker/source/unx/kde/makefile.mk b/fpicker/source/unx/kde/makefile.mk
index 03cfafb..dcb16d9 100644
--- a/fpicker/source/unx/kde/makefile.mk
+++ b/fpicker/source/unx/kde/makefile.mk
@@ -63,7 +63,7 @@ APP1OBJS=$(SLOFILES)
APP1RPATH=BRAND
APP1STDLIBS=\
$(SALLIB) \
- $(KDE_LIBS) -lkio
+ $(KDE_LIBS) -lkio -lX11
.ENDIF # "$(GUIBASE)" != "unx" || "$(ENABLE_KDE)" != "TRUE"
More information about the Libreoffice-commits
mailing list