summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--uui/source/iahndl-authentication.cxx9
-rw-r--r--uui/source/iahndl-errorhandler.cxx7
-rw-r--r--uui/source/iahndl-ioexceptions.cxx55
-rw-r--r--uui/source/iahndl-locking.cxx9
-rw-r--r--uui/source/iahndl.cxx39
-rw-r--r--uui/source/interactionhandler.cxx17
-rw-r--r--uui/source/newerverwarn.cxx20
-rw-r--r--uui/source/passwordcontainer.cxx14
-rw-r--r--uui/source/requeststringresolver.cxx11
9 files changed, 61 insertions, 120 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 31d26b27a679..7df39cd85c75 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -125,8 +125,7 @@ executeLoginDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
}
@@ -439,8 +438,7 @@ executeMasterPasswordDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
@@ -560,8 +558,7 @@ executePasswordDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface>());
}
}
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index ae4f2bc80743..3827f0af7482 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -51,9 +51,9 @@ executeErrorDialog(
{
SolarMutexGuard aGuard;
- rtl::OUStringBuffer aText(rContext);
+ OUStringBuffer aText(rContext);
if (!rContext.isEmpty() && !rMessage.isEmpty())
- aText.appendAscii(RTL_CONSTASCII_STRINGPARAM(":\n"));
+ aText.appendAscii(":\n");
//TODO! must be internationalized
aText.append(rMessage);
@@ -99,8 +99,7 @@ executeErrorDialog(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
diff --git a/uui/source/iahndl-ioexceptions.cxx b/uui/source/iahndl-ioexceptions.cxx
index 33aaf2510a8f..1412a53529c0 100644
--- a/uui/source/iahndl-ioexceptions.cxx
+++ b/uui/source/iahndl-ioexceptions.cxx
@@ -80,20 +80,13 @@ getResourceNameRequestArgument(uno::Sequence< uno::Any > const & rArguments,
rtl::OUString * pValue)
SAL_THROW(())
{
- if (!getStringRequestArgument(rArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "Uri")),
- pValue))
+ if (!getStringRequestArgument(rArguments, "Uri", pValue))
return false;
// Use the resource name only for file URLs, to avoid confusion:
//TODO! work with ucp locality concept instead of hardcoded "file"?
if (pValue
- && pValue->matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(
- "file:")))
- getStringRequestArgument(rArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "ResourceName")),
- pValue);
+ && pValue->matchIgnoreAsciiCaseAsciiL("file:", pValue->getLength()))
+ getStringRequestArgument(rArguments, "ResourceName", pValue);
return true;
}
@@ -194,14 +187,10 @@ UUIInteractionHelper::handleInteractiveIOException(
{
case ucb::IOErrorCode_CANT_CREATE:
{
- rtl::OUString aArgFolder;
- if (getStringRequestArgument(
- aRequestArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "Folder")),
- &aArgFolder))
+ OUString aArgFolder;
+ if (getStringRequestArgument(aRequestArguments, "Folder", &aArgFolder))
{
- rtl::OUString aArgUri;
+ OUString aArgUri;
if (getResourceNameRequestArgument(aRequestArguments,
&aArgUri))
{
@@ -227,18 +216,10 @@ UUIInteractionHelper::handleInteractiveIOException(
if (getResourceNameRequestArgument(aRequestArguments,
&aArgUri))
{
- rtl::OUString aResourceType;
- getStringRequestArgument(
- aRequestArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "ResourceType")),
- &aResourceType);
+ OUString aResourceType;
+ getStringRequestArgument(aRequestArguments, "ResourceType", &aResourceType);
bool bRemovable = false;
- getBoolRequestArgument(aRequestArguments,
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "Removable")),
- &bRemovable);
+ getBoolRequestArgument(aRequestArguments, "Removable", &bRemovable);
nErrorCode = aResourceType == "volume"
? (bRemovable
? ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE
@@ -257,15 +238,8 @@ UUIInteractionHelper::handleInteractiveIOException(
{
rtl::OUString aArgVolume;
rtl::OUString aArgOtherVolume;
- if (getStringRequestArgument(
- aRequestArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "Volume")),
- &aArgVolume)
- && getStringRequestArgument(
- aRequestArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "OtherVolume")),
+ if (getStringRequestArgument(aRequestArguments, "Volume", &aArgVolume)
+ && getStringRequestArgument(aRequestArguments, "OtherVolume",
&aArgOtherVolume))
{
nErrorCode = aErrorCode[aIoException.Code][1];
@@ -285,11 +259,8 @@ UUIInteractionHelper::handleInteractiveIOException(
&aArgUri))
{
rtl::OUString aResourceType;
- getStringRequestArgument(
- aRequestArguments,
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "ResourceType")),
- &aResourceType);
+ getStringRequestArgument(aRequestArguments, "ResourceType",
+ &aResourceType);
nErrorCode = aResourceType == "volume"
? ERRCODE_UUI_IO_NOTEXISTS_VOLUME
: (aResourceType == "folder"
diff --git a/uui/source/iahndl-locking.cxx b/uui/source/iahndl-locking.cxx
index 57faaa11e6cd..cc392512da28 100644
--- a/uui/source/iahndl-locking.cxx
+++ b/uui/source/iahndl-locking.cxx
@@ -140,8 +140,7 @@ handleLockedDocumentRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
}
@@ -178,8 +177,7 @@ handleChangedByOthersRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
}
@@ -216,8 +214,7 @@ handleLockFileIgnoreRequest_(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 92db8392eb4c..f12ae0c0d99e 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -403,7 +403,7 @@ bool UUIInteractionHelper::handleTypedHandlerImplementations( Reference< XIntera
// the base registration node for "typed" interaction handlers
const ::utl::OConfigurationTreeRoot aConfigRoot( ::utl::OConfigurationTreeRoot::createWithServiceFactory(
m_xServiceFactory,
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Interaction/InteractionHandlers" ) ),
+ OUString( "/org.openoffice.Interaction/InteractionHandlers" ),
-1,
::utl::OConfigurationTreeRoot::CM_READONLY
) );
@@ -904,8 +904,7 @@ UUIInteractionHelper::handleRequest_impl(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ throw uno::RuntimeException(OUString("out of memory"),
uno::Reference< uno::XInterface >());
}
catch( const uno::RuntimeException& )
@@ -935,31 +934,23 @@ UUIInteractionHelper::getInteractionHandlerList(
uno::Sequence< uno::Any > aArguments( 1 );
beans::PropertyValue aProperty;
- aProperty.Name
- = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) );
+ aProperty.Name = OUString( "nodepath" );
aProperty.Value <<= aFullPath.makeStringAndClear();
aArguments[ 0 ] <<= aProperty;
uno::Reference< uno::XInterface > xInterface(
xConfigProv->createInstanceWithArguments(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationAccess" ) ),
- aArguments ) );
+ "com.sun.star.configuration.ConfigurationAccess" , aArguments ) );
if ( !xInterface.is() )
- throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "unable to instanciate config access")),
+ throw uno::RuntimeException(OUString("unable to instanciate config access"),
uno::Reference< uno::XInterface >());
uno::Reference< container::XNameAccess > xNameAccess(
xInterface, uno::UNO_QUERY );
if ( !xNameAccess.is() )
- throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "config access does not implement XNameAccess")),
+ throw uno::RuntimeException(OUString(
+ "config access does not implement XNameAccess"),
uno::Reference< uno::XInterface >());
uno::Sequence< rtl::OUString > aElems = xNameAccess->getElementNames();
@@ -972,10 +963,8 @@ UUIInteractionHelper::getInteractionHandlerList(
xHierNameAccess( xInterface, uno::UNO_QUERY );
if ( !xHierNameAccess.is() )
- throw uno::RuntimeException(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "config access does not implement XHierarchicalNameAccess")),
+ throw uno::RuntimeException(OUString(
+ "config access does not implement XHierarchicalNameAccess"),
uno::Reference< uno::XInterface >());
// Iterate over children.
@@ -1214,16 +1203,16 @@ UUIInteractionHelper::handleGenericErrorRequest(
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( "uui" ) );
- rtl::OUString aTitle( utl::ConfigManager::getProductName() );
+ OUString aTitle( utl::ConfigManager::getProductName() );
- ::rtl::OUString aErrTitle
+ OUString aErrTitle
= ResId( nError == ERRCODE_SFX_BROKENSIGNATURE
? STR_WARNING_BROKENSIGNATURE_TITLE
: STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE,
*xManager.get() ).toString();
if ( !aTitle.isEmpty() && !aErrTitle.isEmpty() )
- aTitle += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " - " ) );
+ aTitle += " - " ;
aTitle += aErrTitle;
executeMessageBox(
@@ -1417,9 +1406,9 @@ UUIInteractionHelper::handleBrokenPackageRequest(
else
return;
- rtl::OUString title(
+ OUString title(
utl::ConfigManager::getProductName() +
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ) ) +
+ OUString( " " ) +
utl::ConfigManager::getProductVersion() );
switch (
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index 71f11eb33533..76d23c355df2 100644
--- a/uui/source/interactionhandler.cxx
+++ b/uui/source/interactionhandler.cxx
@@ -125,17 +125,14 @@ UUIInteractionHandler::handle(
char const UUIInteractionHandler::m_aImplementationName[]
= "com.sun.star.comp.uui.UUIInteractionHandler";
-uno::Sequence< rtl::OUString >
+uno::Sequence< OUString >
UUIInteractionHandler::getSupportedServiceNames_static()
{
- uno::Sequence< rtl::OUString > aNames(3);
- aNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.task.InteractionHandler"));
+ uno::Sequence< OUString > aNames(3);
+ aNames[0] = "com.sun.star.task.InteractionHandler";
// added to indicate support for configuration.backend.MergeRecoveryRequest
- aNames[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.backend.InteractionHandler"));
- aNames[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.uui.InteractionHandler"));
+ aNames[1] = "com.sun.star.configuration.backend.InteractionHandler";
+ aNames[2] = "com.sun.star.uui.InteractionHandler";
// for backwards compatibility
return aNames;
}
@@ -152,9 +149,7 @@ UUIInteractionHandler::createInstance(
}
catch (std::bad_alloc const &)
{
- throw uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
- 0);
+ throw uno::RuntimeException(OUString("out of memory"), 0);
}
}
diff --git a/uui/source/newerverwarn.cxx b/uui/source/newerverwarn.cxx
index d7c8b966210e..02a9a3272710 100644
--- a/uui/source/newerverwarn.cxx
+++ b/uui/source/newerverwarn.cxx
@@ -46,8 +46,6 @@ namespace container = ::com::sun::star::container;
using namespace com::sun::star::system;
-#define DEFINE_CONST_UNICODE( CONSTASCII ) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CONSTASCII ) )
-
namespace uui
{
@@ -78,18 +76,18 @@ NewerVersionWarningDialog::~NewerVersionWarningDialog()
IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl)
{
// detect execute path
- ::rtl::OUString sProgramPath;
+ OUString sProgramPath;
osl_getExecutableFile( &sProgramPath.pData );
sal_uInt32 nLastIndex = sProgramPath.lastIndexOf( '/' );
if ( nLastIndex > 0 )
sProgramPath = sProgramPath.copy( 0, nLastIndex + 1 );
// read keys from soffice.ini (sofficerc)
- ::rtl::OUString sIniFileName = sProgramPath;
- sIniFileName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_CONFIGFILE( "version" ) ) );
+ OUString sIniFileName = sProgramPath;
+ sIniFileName += OUString( SAL_CONFIGFILE( "version" ) );
::rtl::Bootstrap aIniFile( sIniFileName );
- ::rtl::OUString sNotifyURL;
- aIniFile.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ODFNotifyURL" ) ), sNotifyURL );
+ OUString sNotifyURL;
+ aIniFile.getFrom( OUString( "ODFNotifyURL" ), sNotifyURL );
try
{
@@ -112,16 +110,16 @@ IMPL_LINK_NOARG(NewerVersionWarningDialog, UpdateHdl)
aContext.createComponent( "com.sun.star.setup.UpdateCheckConfig" ), uno::UNO_QUERY_THROW );
sal_Bool bUpdateCheckEnabled = sal_False;
- OSL_VERIFY( xUpdateConfig->getByName( DEFINE_CONST_UNICODE( "AutoCheckEnabled" ) ) >>= bUpdateCheckEnabled );
+ OSL_VERIFY( xUpdateConfig->getByName( OUString( "AutoCheckEnabled" ) ) >>= bUpdateCheckEnabled );
// TODO: do we need to respect the bUpdateCheckEnabled flag? Finally, its meaning is "are automatic
// updates enabled", but this here is not an automatic update, but one triggered explicitly by the user.
uno::Any aVal = ::comphelper::ConfigurationHelper::readDirectKey(
aContext.getUNOContext(),
- DEFINE_CONST_UNICODE("org.openoffice.Office.Addons/"),
- DEFINE_CONST_UNICODE("AddonUI/OfficeHelp/UpdateCheckJob"),
- DEFINE_CONST_UNICODE("URL"),
+ "org.openoffice.Office.Addons/",
+ "AddonUI/OfficeHelp/UpdateCheckJob",
+ "URL",
::comphelper::ConfigurationHelper::E_READONLY );
util::URL aURL;
if ( aVal >>= aURL.Complete )
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 0005fe976668..cc3d5894f8fa 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -329,22 +329,20 @@ PasswordContainerInteractionHandler::getSupportedServiceNames()
//=========================================================================
// static
-rtl::OUString
+OUString
PasswordContainerInteractionHandler::getImplementationName_Static()
{
- return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.comp.uui.PasswordContainerInteractionHandler" ) );
+ return OUString( "com.sun.star.comp.uui.PasswordContainerInteractionHandler" );
}
//=========================================================================
// static
-uno::Sequence< rtl::OUString >
+uno::Sequence< OUString >
PasswordContainerInteractionHandler::getSupportedServiceNames_Static()
{
- uno::Sequence< rtl::OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ]
- = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.task.PasswordContainerInteractionHandler" ) );
+ uno::Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[ 0 ] = OUString(
+ "com.sun.star.task.PasswordContainerInteractionHandler" );
return aSNS;
}
diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx
index de69c5681899..35b87446065f 100644
--- a/uui/source/requeststringresolver.cxx
+++ b/uui/source/requeststringresolver.cxx
@@ -82,12 +82,11 @@ UUIInteractionRequestStringResolver::getStringFromInformationalRequest(
char const UUIInteractionRequestStringResolver::m_aImplementationName[]
= "com.sun.star.comp.uui.UUIInteractionRequestStringResolver";
-star::uno::Sequence< rtl::OUString >
+star::uno::Sequence< OUString >
UUIInteractionRequestStringResolver::getSupportedServiceNames_static()
{
- star::uno::Sequence< rtl::OUString > aNames(1);
- aNames[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.task.InteractionRequestStringResolver"));
+ star::uno::Sequence< OUString > aNames(1);
+ aNames[0] = "com.sun.star.task.InteractionRequestStringResolver";
return aNames;
}
@@ -103,9 +102,7 @@ UUIInteractionRequestStringResolver::createInstance(
}
catch (std::bad_alloc const &)
{
- throw star::uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
- 0);
+ throw star::uno::RuntimeException(OUString("out of memory"), 0);
}
}