summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Faller <gertfaller@aliceadsl.fr>2010-11-08 15:14:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-11-08 15:17:22 +0000
commitb931cb786415877ac15813927a55dd36cbebd8cd (patch)
tree1abc96c8c19193d5e0e343c13902b77d29b8114c
parent17a2466f6be4dde82461a9f593b6bb2be4f644f9 (diff)
use RTL_CONSTASCII_USTRINGPARAM
-rw-r--r--desktop/source/app/app.cxx14
-rw-r--r--desktop/source/app/appfirststart.cxx20
-rw-r--r--desktop/source/app/appinit.cxx21
-rw-r--r--desktop/source/app/check_ext_deps.cxx22
-rw-r--r--desktop/source/app/cmdlineargs.cxx12
-rw-r--r--desktop/source/app/officeipcthread.cxx4
-rw-r--r--desktop/source/app/userinstall.cxx18
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx86
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx2
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx4
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx2
-rw-r--r--desktop/source/migration/cfgfilter.cxx6
-rw-r--r--desktop/source/migration/services/autocorrmigration.cxx2
-rw-r--r--desktop/source/offacc/acceptor.cxx14
-rw-r--r--desktop/source/so_comp/evaluation.cxx2
-rw-r--r--desktop/source/so_comp/oemjob.cxx48
-rw-r--r--desktop/source/so_comp/services.cxx33
-rw-r--r--desktop/source/splash/services_spl.cxx32
-rw-r--r--desktop/unx/splash/services_unxsplash.cxx4
19 files changed, 167 insertions, 179 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e3ce4127c9..4bef6e5b3e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1827,8 +1827,8 @@ void Desktop::Main()
catch ( ... )
{
FatalError( MakeStartupErrorMessage(
- OUString::createFromAscii(
- "Unknown error during startup (Office wrapper service).\nInstallation could be damaged.")));
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Unknown error during startup (Office wrapper service).\nInstallation could be damaged."))));
return;
}
*/
@@ -1879,8 +1879,8 @@ void Desktop::Main()
catch ( ... )
{
FatalError( MakeStartupErrorMessage(
- OUString::createFromAscii(
- "Unknown error during startup (TD/Desktop service).\nInstallation could be damaged.")));
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Unknown error during startup (TD/Desktop service).\nInstallation could be damaged."))));
return;
}
*/
@@ -2693,9 +2693,9 @@ void Desktop::OpenClients()
/*
::comphelper::ConfigurationHelper::writeDirectKey(
::comphelper::getProcessServiceFactory(),
- ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery"),
- ::rtl::OUString::createFromAscii("AutoSave"),
- ::rtl::OUString::createFromAscii("Enabled"),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoSave")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
::com::sun::star::uno::makeAny(sal_False),
::comphelper::ConfigurationHelper::E_STANDARD);
diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx
index 79c3c57934..9ef0a8a6fd 100644
--- a/desktop/source/app/appfirststart.cxx
+++ b/desktop/source/app/appfirststart.cxx
@@ -81,11 +81,11 @@ OUString Desktop::GetLicensePath()
aLangString = aLocale.Language;
if ( aLocale.Country.getLength() != 0 )
{
- aLangString += OUString::createFromAscii("-");
+ aLangString += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
aLangString += aLocale.Country;
if ( aLocale.Variant.getLength() != 0 )
{
- aLangString += OUString::createFromAscii("-");
+ aLangString += OUString(RTL_CONSTASCII_USTRINGPARAM("-"));
aLangString += aLocale.Variant;
}
}
@@ -93,14 +93,14 @@ OUString Desktop::GetLicensePath()
aLicensePath =
aBaseInstallPath + OUString::createFromAscii(szLicensePath)
+ OUString::createFromAscii(szWNTLicenseName)
- + OUString::createFromAscii("_")
+ + OUString(RTL_CONSTASCII_USTRINGPARAM("_"))
+ aLangString
+ OUString::createFromAscii(szWNTLicenseExt);
#else
aLicensePath =
aBaseInstallPath + OUString::createFromAscii(szLicensePath)
+ OUString::createFromAscii(szUNXLicenseName)
- + OUString::createFromAscii("_")
+ + OUString(RTL_CONSTASCII_USTRINGPARAM("_"))
+ aLangString
+ OUString::createFromAscii(szUNXLicenseExt);
#endif
@@ -153,7 +153,7 @@ static sal_Bool impl_isFirstStart()
try {
Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
- Any result = xPSet->getPropertyValue(OUString::createFromAscii("FirstStartWizardCompleted"));
+ Any result = xPSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FirstStartWizardCompleted")));
sal_Bool bCompleted = sal_False;
if ((result >>= bCompleted) && bCompleted)
return sal_False; // wizard was already completed
@@ -188,10 +188,10 @@ static sal_Bool impl_parseDateTime(const OUString& aString, DateTime& aDateTime)
sal_Int32 nDateLength = 10;
sal_Int32 nTimeLength = 8;
- OUString aDateTimeSep = OUString::createFromAscii("T");
- OUString aDateSep = OUString::createFromAscii("-");
- OUString aTimeSep = OUString::createFromAscii(":");
- OUString aUTCString = OUString::createFromAscii("Z");
+ OUString aDateTimeSep(RTL_CONSTASCII_USTRINGPARAM("T"));
+ OUString aDateSep(RTL_CONSTASCII_USTRINGPARAM("-"));
+ OUString aTimeSep(RTL_CONSTASCII_USTRINGPARAM(":"));
+ OUString aUTCString(RTL_CONSTASCII_USTRINGPARAM("Z"));
OUString aDateString = aDateTimeString.copy(0, nDateLength);
OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength);
@@ -229,7 +229,7 @@ static sal_Bool impl_isLicenseAccepted()
{
Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
- Any result = xPSet->getPropertyValue(OUString::createFromAscii("LicenseAcceptDate"));
+ Any result = xPSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LicenseAcceptDate")));
OUString aAcceptDate;
if (result >>= aAcceptDate)
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index c33e7c0077..cee4db2482 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -118,14 +118,13 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
Sequence< Any > aArgs(6);
aArgs[0]
- <<= rtl::OUString::createFromAscii(bServer ?
- UCB_CONFIGURATION_KEY1_SERVER :
- UCB_CONFIGURATION_KEY1_LOCAL);
+ <<= bServer ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_SERVER)) :
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_LOCAL));
aArgs[1]
- <<= rtl::OUString::createFromAscii(UCB_CONFIGURATION_KEY2_OFFICE);
- aArgs[2] <<= rtl::OUString::createFromAscii("PIPE");
+ <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE));
+ aArgs[2] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE"));
aArgs[3] <<= aPipe;
- aArgs[4] <<= rtl::OUString::createFromAscii("PORTAL");
+ aArgs[4] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PORTAL"));
aArgs[5] <<= aPortal.makeStringAndClear();
bool ret =
@@ -161,13 +160,13 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
{
Reference<XContentProvider> xCP(
xServiceFactory->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.GnomeVFSContentProvider")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb.GnomeVFSContentProvider"))),
UNO_QUERY);
if(xCP.is())
xCPM->registerContentProvider(
xCP,
- rtl::OUString::createFromAscii(".*"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")),
false);
} catch (...)
{
@@ -278,7 +277,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
if ( !configureUcb( bServer, aPortalConnect ) )
{
DBG_ERROR( "Can't configure UCB" );
- throw com::sun::star::uno::Exception(rtl::OUString::createFromAscii("RegisterServices, configureUcb"), NULL);
+ throw com::sun::star::uno::Exception(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegisterServices, configureUcb")), NULL);
}
CreateTemporaryDirectory();
@@ -306,7 +305,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
aSeq[1] <<= bAccept;
Reference<XInitialization> rAcceptor(
::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii( "com.sun.star.office.Acceptor" )), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Acceptor" ))), UNO_QUERY );
if ( rAcceptor.is() ) {
try{
rAcceptor->initialize( aSeq );
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index bfc0197b3a..20bad6f450 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -148,7 +148,7 @@ void SilentCommandEnv::handle( Reference< task::XInteractionRequest> const & xRe
uno::Reference< uno::XComponentContext > xContext = comphelper_getProcessComponentContext();
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
deployment::ui::LicenseDialog::create(
- xContext, VCLUnoHelper::GetInterface( NULL ),
+ xContext, VCLUnoHelper::GetInterface( NULL ),
licExc.ExtensionName, licExc.Text ) );
sal_Int16 res = xDialog->execute();
if ( res == ui::dialogs::ExecutableDialogResults::CANCEL )
@@ -233,7 +233,7 @@ static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContex
uno::Reference< lang::XMultiComponentFactory > xServiceManager( xContext->getServiceManager() );
if( !xServiceManager.is() )
- throw uno::RuntimeException(
+ throw uno::RuntimeException(
UNISTRING( "impl_showExtensionDialog(): unable to obtain service manager from component context" ), uno::Reference< uno::XInterface > () );
xService = xServiceManager->createInstanceWithContext( sServiceName, xContext );
@@ -334,15 +334,15 @@ static void impl_setNeedsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any value = makeAny( OUString::createFromAscii("never") );
+ Any value = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("never")) );
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), value );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), value );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
catch (const Exception&) {}
@@ -387,20 +387,20 @@ static bool impl_needsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any result = pset->getPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID") );
+ Any result = pset->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")) );
result >>= aLastCheckBuildID;
if ( aLastCheckBuildID != aCurrentBuildID )
{
bNeedsCheck = true;
result <<= aCurrentBuildID;
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), result );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), result );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
#ifdef DEBUG
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 841f55ce5e..677db8f24b 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -138,8 +138,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
Reference< XExternalUriReferenceTranslator > xTranslator(
xMS->createInstance(
- OUString::createFromAscii(
- "com.sun.star.uri.ExternalUriReferenceTranslator")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.ExternalUriReferenceTranslator"))),
UNO_QUERY);
// parse command line arguments
@@ -168,7 +168,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
break;
}
// convert file URLs to internal form #112849#
- if (aArg.indexOf(OUString::createFromAscii("file:"))==0 &&
+ if (aArg.indexOf(OUString(RTL_CONSTASCII_USTRINGPARAM("file:")))==0 &&
xTranslator.is())
{
OUString tmp(xTranslator->translateToInternal(aArg));
@@ -242,7 +242,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bPrintToEvent = sal_False;
bForceNewEvent = sal_False;
bForceOpenEvent = sal_False;
- bViewEvent = sal_True;
+ bViewEvent = sal_True;
bStartEvent = sal_False;
bDisplaySpec = sal_False;
}
@@ -982,8 +982,6 @@ sal_Bool CommandLineArgs::GetConversionOut( ::rtl::OUString& rPara ) const
return m_aStrSetParams[ CMD_STRINGPARAM_CONVERSIONOUT ];
}
-
-
sal_Bool CommandLineArgs::IsEmpty() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index c685596d26..db0ae82f74 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -979,13 +979,13 @@ static void AddConversionsToDispatchList(
if( rParamOut.trim().getLength() )
{
- aParam += ::rtl::OUString::createFromAscii(";");
+ aParam += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";"));
aParam += aOutDir;
}
else
{
::osl::FileBase::getSystemPathFromFileURL( aPWD, aPWD );
- aParam += ::rtl::OUString::createFromAscii( ";" ) + aPWD;
+ aParam += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";" )) + aPWD;
}
if ( rRequestList.getLength() > 0 )
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index ca68ab00ad..71d2b9bd04 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -109,8 +109,8 @@ namespace desktop {
Sequence< Any > theArgs(1);
NamedValue v;
- v.Name = OUString::createFromAscii("NodePath");
- v.Value = makeAny(OUString::createFromAscii("org.openoffice.Setup"));
+ v.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath"));
+ v.Value = makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")));
theArgs[0] <<= v;
Reference< XHierarchicalNameAccess> hnacc(
theConfigProvider->createInstanceWithArguments(
@@ -202,7 +202,7 @@ namespace desktop {
rtl::OUString itemname = aFileStatus.getFileName();
// append trailing '/' if needed
if (newDstUnqPath.lastIndexOf(sal_Unicode('/')) != newDstUnqPath.getLength()-1)
- newDstUnqPath += rtl::OUString::createFromAscii("/");
+ newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
newDstUnqPath += itemname;
// recursion
err = copy_recursive(newSrcUnqPath, newDstUnqPath);
@@ -261,21 +261,21 @@ namespace desktop {
}
try
{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
- OUString sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
+ OUString sAccessSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
// get configuration provider
Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory();
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
theMSF->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"), makeAny(OUString::createFromAscii("org.openoffice.Setup")));
- //v.Name = OUString::createFromAscii("NodePath");
- //v.Value = makeAny(OUString::createFromAscii("org.openoffice.Setup"));
+ NamedValue v(OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")), makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup"))));
+ //v.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath"));
+ //v.Value = makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")));
theArgs[0] <<= v;
Reference< XHierarchicalPropertySet> hpset(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- hpset->setHierarchicalPropertyValue(OUString::createFromAscii("Office/ooSetupInstCompleted"), makeAny(sal_True));
+ hpset->setHierarchicalPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Office/ooSetupInstCompleted")), makeAny(sal_True));
Reference< XChangesBatch >(hpset, UNO_QUERY_THROW)->commitChanges();
}
catch ( PropertyVetoException& )
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 053929c4b1..a211a11f7e 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@
#include "svl/inettype.hxx"
#include "unotools/pathoptions.hxx"
-#include <l10ntools/compilehelp.hxx>
+#include <l10ntools/compilehelp.hxx>
#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
@@ -68,7 +68,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
BackendImpl * getMyBackend() const;
// HelpBackendDb::Data m_dbData;
-
+
// Package
virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_(
::osl::ResettableMutexGuard & guard,
@@ -112,15 +112,15 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference< ucb::XSimpleFileAccess > getFileAccess( void );
Reference< ucb::XSimpleFileAccess > m_xSFA;
-
+
const Reference<deployment::XPackageTypeInfo> m_xHelpTypeInfo;
Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos;
std::auto_ptr<HelpBackendDb> m_backendDb;
-
+
public:
BackendImpl( Sequence<Any> const & args,
Reference<XComponentContext> const & xComponentContext );
-
+
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
@@ -175,7 +175,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
throw lang::IllegalArgumentException(
StrCannotDetectMediaType::get() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
-
+
String type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType_, type, subType, &params ))
@@ -194,7 +194,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
"vnd.sun.star.help"))
{
return new PackageImpl(
- this, url, name, m_xHelpTypeInfo, bRemoved,
+ this, url, name, m_xHelpTypeInfo, bRemoved,
identifier);
}
}
@@ -238,7 +238,7 @@ BackendImpl::PackageImpl::PackageImpl(
{
// if (bRemoved)
// {
-// ::boost::optional<HelpBackendDb::Data> opt =
+// ::boost::optional<HelpBackendDb::Data> opt =
// getMyBackend()->readDataFromDb(url);
// if (opt)
// m_dbData = *opt;
@@ -250,23 +250,22 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
if (NULL == pBackend)
- {
+ {
//May throw a DisposedException
check();
//We should never get here...
throw RuntimeException(
- OUSTR("Failed to get the BackendImpl"),
+ OUSTR("Failed to get the BackendImpl"),
static_cast<OWeakObject*>(const_cast<PackageImpl *>(this)));
}
return pBackend;
}
-
-bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
+bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
{
bool bCompiled = true;
rtl::OUString aExpandedHelpURL = dp_misc::expandUnoRcUrl(getURL());
-
+
::osl::Directory helpFolder(aExpandedHelpURL);
if ( helpFolder.open() == ::osl::File::E_None)
{
@@ -284,7 +283,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
{
if (stat.getFileType() != ::osl::FileStatus::Directory)
continue;
-
+
//look if there is the folder help.idxl in the language folder
OUString compUrl(stat.getFileURL() + OUSTR("/help.idxl"));
::osl::Directory compiledFolder(compUrl);
@@ -307,7 +306,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
{
//Error
OSL_ASSERT(0);
- bCompiled = false;
+ bCompiled = false;
}
}
return bCompiled;
@@ -355,19 +354,17 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
::boost::optional<HelpBackendDb::Data> data =
getMyBackend()->readDataFromDb(getURL());
-
+
if (data)
return beans::Optional<OUString>(true, data->dataUrl);
- return beans::Optional<OUString>(true, OUString());
+ return beans::Optional<OUString>(true, OUString());
}
-
//##############################################################################
-static rtl::OUString aSlash( rtl::OUString::createFromAscii( "/" ) );
-static rtl::OUString aHelpStr( rtl::OUString::createFromAscii( "help" ) );
-
+static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
+static rtl::OUString aHelpStr(RTL_CONSTASCII_USTRINGPARAM("help"));
void BackendImpl::implProcessHelp
( Reference< deployment::XPackage > xPackage, bool doRegisterPackage, bool compiledHelp,
@@ -394,7 +391,7 @@ void BackendImpl::implProcessHelp
if( !xSFA->isFolder( aExpandedHelpURL ) )
{
rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
- aErrStr += rtl::OUString::createFromAscii( "No help folder" );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No help folder" ));
OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
@@ -406,9 +403,9 @@ void BackendImpl::implProcessHelp
{
try
{
- xInvocation = Reference< script::XInvocation >(
- xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ xInvocation = Reference< script::XInvocation >(
+ xContext->getServiceManager()->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.help.HelpIndexer" )), xContext ) , UNO_QUERY );
}
catch (Exception &)
{
@@ -441,19 +438,19 @@ void BackendImpl::implProcessHelp
::dp_misc::create_folder(
&langFolderContent,
langFolderDest, xCmdEnv);
-
+
rtl::OUString aJarFile(
makeURL(sHelpFolder, langFolderURLSegment + aSlash + aHelpStr +
OUSTR(".jar")));
aJarFile = ::dp_misc::expandUnoRcUrl(aJarFile);
-
+
rtl::OUString aEncodedJarFilePath = rtl::Uri::encode(
aJarFile, rtl_UriCharClassPchar,
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 );
- rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.pkg://" );
+ rtl::OUString aDestBasePath(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.pkg://" ));
aDestBasePath += aEncodedJarFilePath;
- aDestBasePath += rtl::OUString::createFromAscii( "/" );
+ aDestBasePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
@@ -487,7 +484,7 @@ void BackendImpl::implProcessHelp
rtl::OUString aOfficeHelpPath( SvtPathOptions().GetHelpPath() );
rtl::OUString aOfficeHelpPathFileURL;
- ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
+ ::osl::File::getFileURLFromSystemPath( aOfficeHelpPath, aOfficeHelpPathFileURL );
HelpProcessingErrorInfo aErrorInfo;
bool bSuccess = compileExtensionHelp(
@@ -499,20 +496,20 @@ void BackendImpl::implProcessHelp
{
Sequence<uno::Any> aParamsSeq( 6 );
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+ aParamsSeq[0] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-lang" )) );
rtl::OUString aLang;
sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
if( nLastSlash != -1 )
aLang = aLangURL.copy( nLastSlash + 1 );
else
- aLang = rtl::OUString::createFromAscii( "en" );
+ aLang = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en" ));
aParamsSeq[1] = uno::makeAny( aLang );
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+ aParamsSeq[2] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-mod" )) );
+ aParamsSeq[3] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "help" )) );
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ aParamsSeq[4] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-zipdir" )) );
rtl::OUString aSystemPath;
osl::FileBase::getSystemPathFromFileURL(
langFolderDestExpanded, aSystemPath );
@@ -520,7 +517,7 @@ void BackendImpl::implProcessHelp
Sequence< sal_Int16 > aOutParamIndex;
Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ uno::Any aRet = xInvocation->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "createIndex" )),
aParamsSeq, aOutParamIndex, aOutParam );
}
@@ -560,14 +557,14 @@ void BackendImpl::implProcessHelp
aErrStr += aErrMsg;
if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
{
- aErrStr += rtl::OUString::createFromAscii( " in " );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " in " ));
rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
aErrStr += aDecodedFile;
if( aErrorInfo.m_nXMLParsingLine != -1 )
{
- aErrStr += rtl::OUString::createFromAscii( ", line " );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ", line " ));
aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
}
}
@@ -590,7 +587,6 @@ void BackendImpl::implProcessHelp
}
}
-
void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector )
{
@@ -613,7 +609,7 @@ void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir,
if( nLastDot != -1 )
{
rtl::OUString aExt = aURL.copy( nLastDot + 1 );
- if( aExt.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "xhp" ) ) )
+ if( aExt.equalsIgnoreAsciiCase( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "xhp" )) ) )
o_rXhpFileVector.push_back( aURL );
}
}
@@ -627,17 +623,17 @@ Reference< ucb::XSimpleFileAccess > BackendImpl::getFileAccess( void )
Reference<XComponentContext> const & xContext = getComponentContext();
if( xContext.is() )
{
- m_xSFA = Reference< ucb::XSimpleFileAccess >(
+ m_xSFA = Reference< ucb::XSimpleFileAccess >(
xContext->getServiceManager()->createInstanceWithContext(
- rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )),
xContext ), UNO_QUERY );
}
if( !m_xSFA.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"dp_registry::backend::help::BackendImpl::getFileAccess(), "
- "could not instatiate SimpleFileAccess." ),
+ "could not instatiate SimpleFileAccess." )),
Reference< XInterface >() );
}
}
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 91873b471e..b62451a095 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -347,7 +347,7 @@ Sequence<OUString> BackendImpl::getSupportedServiceNames()
throw (RuntimeException)
{
return comphelper::makeSequence(
- OUString::createFromAscii(BACKEND_SERVICE_NAME) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(BACKEND_SERVICE_NAME)) );
}
// XPackageRegistry
diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
index 9d66e80f71..4ac316e785 100644
--- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
@@ -99,9 +99,9 @@ ParcelDescDocHandler::startElement( const OUString& aName,
aName + OUSTR("\n"));
if ( !skipIndex )
{
- if ( aName.equals( OUString::createFromAscii( "parcel" ) ) )
+ if ( aName.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "parcel" )) ) )
{
- m_sLang = xAttribs->getValueByName( OUString::createFromAscii( "language" ) );
+ m_sLang = xAttribs->getValueByName( OUString(RTL_CONSTASCII_USTRINGPARAM( "language" )) );
}
++skipIndex;
}
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 0e8dc29d53..a39d33b01f 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -256,7 +256,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.framework-script"))
{
- OUString lang = OUString::createFromAscii("Script");
+ OUString lang = OUString(RTL_CONSTASCII_USTRINGPARAM("Script"));
OUString sParcelDescURL = makeURL(
url, OUSTR("parcel-descriptor.xml") );
diff --git a/desktop/source/migration/cfgfilter.cxx b/desktop/source/migration/cfgfilter.cxx
index 2e5a20e708..5220965edb 100644
--- a/desktop/source/migration/cfgfilter.cxx
+++ b/desktop/source/migration/cfgfilter.cxx
@@ -64,7 +64,7 @@ void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
}
}
if (m_aCurrentComponent.getLength() == 0)
- m_aCurrentComponent = OUString::createFromAscii("unknown.component");
+ m_aCurrentComponent = OUString(RTL_CONSTASCII_USTRINGPARAM("unknown.component"));
if (!m_xSourceLayer.is()) {
throw Exception();
@@ -78,7 +78,7 @@ void CConfigFilter::pushElement(rtl::OUString aName, sal_Bool bUse)
OUString aPath;
if (!m_elementStack.empty()) {
aPath = m_elementStack.top().path; // or use base path
- aPath += OUString::createFromAscii("/");
+ aPath += OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
}
aPath += aName;
@@ -103,7 +103,7 @@ sal_Bool CConfigFilter::checkElement(rtl::OUString aName)
// get full pathname for element
OUString aFullPath;
if (!m_elementStack.empty())
- aFullPath = m_elementStack.top().path + OUString::createFromAscii("/");
+ aFullPath = m_elementStack.top().path + OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aFullPath += aName;
diff --git a/desktop/source/migration/services/autocorrmigration.cxx b/desktop/source/migration/services/autocorrmigration.cxx
index 1f5290f383..80c0aa4da9 100644
--- a/desktop/source/migration/services/autocorrmigration.cxx
+++ b/desktop/source/migration/services/autocorrmigration.cxx
@@ -175,7 +175,7 @@ namespace migration
::rtl::OUString sLanguageType = sSourceLocalName.copy( nStart, nEnd - nStart );
::rtl::OUString sIsoName = MsLangId::convertLanguageToIsoString( (LanguageType) sLanguageType.toInt32() );
::rtl::OUString sTargetLocalName = sBaseName;
- sTargetLocalName += ::rtl::OUString::createFromAscii( "_" );
+ sTargetLocalName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" ));
sTargetLocalName += sIsoName;
sTargetLocalName += sSuffix;
::rtl::OUString sTargetName = sTargetDir + sTargetLocalName;
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 1989937597..7e0bb3ffe0 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -69,10 +69,10 @@ Acceptor::Acceptor( const Reference< XMultiServiceFactory >& rFactory )
{
m_rSMgr = rFactory;
m_rAcceptor = Reference< XAcceptor > (m_rSMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.connection.Acceptor" )),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.connection.Acceptor" ))),
UNO_QUERY );
m_rBridgeFactory = Reference < XBridgeFactory > (m_rSMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.bridge.BridgeFactory" )),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.BridgeFactory" ))),
UNO_QUERY );
// get component context
m_rContext = getComponentContext(m_rSMgr);
@@ -174,7 +174,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
// "<connectString>;<protocol>"
sal_Int32 nIndex1 = m_aAcceptString.indexOf( (sal_Unicode) ';' );
if (nIndex1 < 0) throw IllegalArgumentException(
- OUString::createFromAscii("Invalid accept-string format"), m_rContext, 1);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid accept-string format")), m_rContext, 1);
m_aConnectString = m_aAcceptString.copy( 0 , nIndex1 ).trim();
nIndex1++;
sal_Int32 nIndex2 = m_aAcceptString.indexOf( (sal_Unicode) ';' , nIndex1 );
@@ -200,7 +200,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
if (!bOk)
{
throw IllegalArgumentException(
- OUString::createFromAscii("invalid initialization"), m_rContext, 1);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("invalid initialization")), m_rContext, 1);
}
}
@@ -275,14 +275,14 @@ Reference<XInterface> SAL_CALL AccInstanceProvider::getInstance (const OUString&
else if ( aName.compareToAscii("StarOffice.NamingService" ) == 0 )
{
Reference< XNamingService > rNamingService(
- m_rSMgr->createInstance( OUString::createFromAscii( "com.sun.star.uno.NamingService" )),
+ m_rSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.NamingService" ))),
UNO_QUERY );
if ( rNamingService.is() )
{
rNamingService->registerObject(
- OUString::createFromAscii( "StarOffice.ServiceManager" ), m_rSMgr );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )), m_rSMgr );
rNamingService->registerObject(
- OUString::createFromAscii( "StarOffice.ComponentContext" ), getComponentContext( m_rSMgr ));
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ComponentContext" )), getComponentContext( m_rSMgr ));
rInstance = rNamingService;
}
}
diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx
index 547398df18..95c50f7e23 100644
--- a/desktop/source/so_comp/evaluation.cxx
+++ b/desktop/source/so_comp/evaluation.cxx
@@ -151,7 +151,7 @@ rtl::OUString SAL_CALL SOEvaluation::getExactName( const rtl::OUString& rApproxi
rValue.Value >>= aEval;
}
// append eval string to title
- aTitle += OUString::createFromAscii(" ") + aEval;
+ aTitle += OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + aEval;
if ( bExpired )
throw RuntimeException();
}
diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx
index f5d6787889..13ab666673 100644
--- a/desktop/source/so_comp/oemjob.cxx
+++ b/desktop/source/so_comp/oemjob.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -75,7 +75,7 @@ Sequence< OUString > OEMPreloadJob::GetSupportedServiceNames()
{
sal_Int32 nSize = (sizeof( interfaces ) / sizeof( const char *)) - 1;
Sequence< OUString > aResult( nSize );
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
aResult[i] = OUString::createFromAscii( interfaces[i] );
return aResult;
@@ -89,7 +89,7 @@ Reference< XInterface > SAL_CALL OEMPreloadJob::CreateInstance(
return (XComponent*) ( new OEMPreloadJob( rSMgr ) );
}
-OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
+OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
m_aListeners( m_aMutex ),
m_xServiceManager( xFactory )
{
@@ -118,24 +118,24 @@ void SAL_CALL OEMPreloadJob::removeEventListener( const Reference< XEventListene
}
// XServiceInfo
-::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
+::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
throw ( RuntimeException )
{
return OEMPreloadJob::GetImplementationName();
}
-sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
+sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
throw ( RuntimeException )
{
sal_Int32 nSize = sizeof( interfaces ) / sizeof( const char *);
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
if ( rServiceName.equalsAscii( interfaces[i] ))
return sal_True;
return sal_False;
}
-Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
+Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
throw ( RuntimeException )
{
return OEMPreloadJob::GetSupportedServiceNames();
@@ -151,7 +151,7 @@ throw ( RuntimeException )
{
// create OEM preload service dialog
Reference <XExecutableDialog> xDialog( m_xServiceManager->createInstance(
- OUString::createFromAscii("org.openoffice.comp.preload.OEMPreloadWizard")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.preload.OEMPreloadWizard"))),
UNO_QUERY );
if ( xDialog.is() ){
// execute OEM preload dialog and check return value
@@ -161,11 +161,11 @@ throw ( RuntimeException )
bCont = sal_True;
disableOEMPreloadFlag();
} else {
- // user declined...
+ // user declined...
// terminate.
/*
Reference< XDesktop > xDesktop( m_xServiceManager->createInstance(
- OUString::createFromAscii("com.sun.star.frame.Desktop")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))),
UNO_QUERY );
xDesktop->terminate();
*/
@@ -176,7 +176,7 @@ throw ( RuntimeException )
Reference<XModel> rModel;
Reference<XCloseable> rClose;
for (int i=0; i<args.getLength(); i++)
- {
+ {
if (args[i].Name.equalsAscii("EnvType"))
args[i].Value >>= aEnvType;
else if (args[i].Name.equalsAscii("Frame")) {
@@ -186,8 +186,8 @@ throw ( RuntimeException )
else if (args[i].Name.equalsAscii("Model")) {
args[i].Value >>= rModel;
rClose = Reference<XCloseable>(rModel, UNO_QUERY);
- }
- }
+ }
+ }
if (rClose.is()) rClose->close(sal_True);
*/
bCont = sal_False;
@@ -196,10 +196,10 @@ throw ( RuntimeException )
} else {
// don't try again
bCont = sal_True;
- }
+ }
/*
- NamedValue nv;
- nv.Name = OUString::createFromAscii("Deactivate");
+ NamedValue nv;
+ nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Deactivate"));
nv.Value <<= bDeactivate;
Sequence<NamedValue> s(1);
s[0] = nv;
@@ -209,32 +209,30 @@ throw ( RuntimeException )
return r;
}
-
static sal_Bool existsURL( OUString const& _sURL )
{
using namespace osl;
DirectoryItem aDirItem;
-
+
if (_sURL.getLength() != 0)
return ( DirectoryItem::get( _sURL, aDirItem ) == DirectoryItem::E_None );
-
+
return sal_False;
}
-
// locate soffice.ini/.rc file
static OUString locateIniFile()
{
OUString aUserDataPath;
OUString aSofficeIniFileURL;
-
+
// Retrieve the default file URL for the soffice.ini/rc
Bootstrap().getIniName( aSofficeIniFileURL );
if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS )
{
const char CONFIG_DIR[] = "/config";
-
+
sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/');
if ( nIndex > 0 )
{
@@ -243,11 +241,11 @@ static OUString locateIniFile()
aBuffer.appendAscii( CONFIG_DIR );
aBuffer.append( aSofficeIniFileURL.copy( nIndex ));
aUserSofficeIniFileURL = aBuffer.makeStringAndClear();
-
+
if ( existsURL( aUserSofficeIniFileURL ))
return aUserSofficeIniFileURL;
}
- }
+ }
// Fallback try to use the soffice.ini/rc from program folder
return aSofficeIniFileURL;
}
@@ -270,7 +268,7 @@ void OEMPreloadJob::disableOEMPreloadFlag()
{
OUString aSofficeIniFileURL = locateIniFile();
if ( aSofficeIniFileURL.getLength() > 0 )
- {
+ {
Config aConfig(aSofficeIniFileURL);
aConfig.SetGroup( OEM_PRELOAD_SECTION );
aConfig.WriteKey( OEM_PRELOAD, STR_FALSE );
diff --git a/desktop/source/so_comp/services.cxx b/desktop/source/so_comp/services.cxx
index c79f36820c..1eedd4d47b 100644
--- a/desktop/source/so_comp/services.cxx
+++ b/desktop/source/so_comp/services.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -59,7 +59,7 @@ static const char* pServices[] =
static const char* pImplementations[] =
{
SOEvaluation::implementationName,
- OEMPreloadJob::implementationName,
+ OEMPreloadJob::implementationName,
NULL
};
@@ -72,13 +72,12 @@ static const fProvider pInstanceProviders[] =
NULL
};
-
static const char** pSupportedServices[] =
{
SOEvaluation::interfaces,
OEMPreloadJob::interfaces,
NULL
-};
+};
static Sequence<OUString>
getSupportedServiceNames(int p) {
@@ -89,26 +88,26 @@ getSupportedServiceNames(int p) {
aSeq[i] = OUString::createFromAscii(names[i]);
}
return aSeq;
-}
+}
extern "C"
{
-void SAL_CALL
+void SAL_CALL
component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName,
+ const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL
+sal_Bool SAL_CALL
component_writeInfo(
- void* pServiceManager,
+ void* pServiceManager,
void* pRegistryKey)
{
- Reference<XMultiServiceFactory> xMan(
+ Reference<XMultiServiceFactory> xMan(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- Reference<XRegistryKey> xKey(
+ Reference<XRegistryKey> xKey(
reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
// iterate over service names and register them...
@@ -118,16 +117,16 @@ component_writeInfo(
for (int i = 0; (pServices[i]!=NULL)&&(pImplementations[i]!=NULL); i++) {
pServiceName= pServices[i];
pImplName = pImplementations[i];
- aImpl = OUString::createFromAscii("/")
+ aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/"))
+ OUString::createFromAscii(pImplName)
- + OUString::createFromAscii("/UNO/SERVICES");
+ + OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
Reference<XRegistryKey> xNewKey = xKey->createKey(aImpl);
xNewKey->createKey(OUString::createFromAscii(pServiceName));
}
return sal_True;
}
-void* SAL_CALL
+void* SAL_CALL
component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
@@ -137,11 +136,11 @@ component_getFactory(
if ( pImplementationName && pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
- Reference< XMultiServiceFactory > xServiceManager(
+ Reference< XMultiServiceFactory > xServiceManager(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
+
// search implementation
- for (int i = 0; (pImplementations[i]!=NULL); i++) {
+ for (int i = 0; (pImplementations[i]!=NULL); i++) {
if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
// found implementation
xFactory = Reference<XSingleServiceFactory>(cppu::createSingleFactory(
diff --git a/desktop/source/splash/services_spl.cxx b/desktop/source/splash/services_spl.cxx
index adcf9c1a5f..b63f89792a 100644
--- a/desktop/source/splash/services_spl.cxx
+++ b/desktop/source/splash/services_spl.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,6 @@
#include "splash.hxx"
-
using namespace rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -65,12 +64,11 @@ static const fProvider pInstanceProviders[] =
NULL
};
-
static const char** pSupportedServices[] =
{
SplashScreen::interfaces,
NULL
-};
+};
static Sequence<OUString>
getSupportedServiceNames(int p) {
@@ -81,26 +79,26 @@ getSupportedServiceNames(int p) {
aSeq[i] = OUString::createFromAscii(names[i]);
}
return aSeq;
-}
+}
extern "C"
{
-void SAL_CALL
+void SAL_CALL
component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName,
+ const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-sal_Bool SAL_CALL
+sal_Bool SAL_CALL
component_writeInfo(
- void* pServiceManager,
+ void* pServiceManager,
void* pRegistryKey)
{
- Reference<XMultiServiceFactory> xMan(
+ Reference<XMultiServiceFactory> xMan(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
- Reference<XRegistryKey> xKey(
+ Reference<XRegistryKey> xKey(
reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
// iterate over service names and register them...
@@ -110,16 +108,16 @@ component_writeInfo(
for (int i = 0; (pServices[i]!=NULL)&&(pImplementations[i]!=NULL); i++) {
pServiceName= pServices[i];
pImplName = pImplementations[i];
- aImpl = OUString::createFromAscii("/")
+ aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM("/"))
+ OUString::createFromAscii(pImplName)
- + OUString::createFromAscii("/UNO/SERVICES");
+ + OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
Reference<XRegistryKey> xNewKey = xKey->createKey(aImpl);
xNewKey->createKey(OUString::createFromAscii(pServiceName));
}
return sal_True;
}
-void* SAL_CALL
+void* SAL_CALL
component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
@@ -129,11 +127,11 @@ component_getFactory(
if ( pImplementationName && pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
- Reference< XMultiServiceFactory > xServiceManager(
+ Reference< XMultiServiceFactory > xServiceManager(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
+
// search implementation
- for (int i = 0; (pImplementations[i]!=NULL); i++) {
+ for (int i = 0; (pImplementations[i]!=NULL); i++) {
if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
// found implementation
xFactory = Reference<XSingleServiceFactory>(cppu::createSingleFactory(
diff --git a/desktop/unx/splash/services_unxsplash.cxx b/desktop/unx/splash/services_unxsplash.cxx
index 6e8b63afa5..f83c7f6d27 100644
--- a/desktop/unx/splash/services_unxsplash.cxx
+++ b/desktop/unx/splash/services_unxsplash.cxx
@@ -111,9 +111,9 @@ component_writeInfo(
{
pServiceName= pServices[i];
pImplName = pImplementations[i];
- aImpl = OUString::createFromAscii( "/" )
+ aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))
+ OUString::createFromAscii( pImplName )
- + OUString::createFromAscii( "/UNO/SERVICES" );
+ + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ));
Reference<XRegistryKey> xNewKey = xKey->createKey( aImpl );
xNewKey->createKey( OUString::createFromAscii( pServiceName ) );
}