summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-07-23 13:09:55 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-07-23 13:09:55 +0200
commit2270f32c6bc055ab79c075015843124a5370e020 (patch)
treebf58e350ed41ea83b2f13e05f3afb879280c7cdd /configmgr
parentbb67e709b70919efb41ec41e93dd92953dc6a003 (diff)
Clean up redundant explicit OUString(...) ctors
Change-Id: Ieb5d4a1d669e0472ec08704c618a9d9c1d30b77f
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx133
-rw-r--r--configmgr/source/broadcaster.cxx2
-rw-r--r--configmgr/source/childaccess.cxx3
-rw-r--r--configmgr/source/components.cxx106
-rw-r--r--configmgr/source/configurationprovider.cxx56
-rw-r--r--configmgr/source/configurationregistry.cxx91
-rw-r--r--configmgr/source/data.cxx34
-rw-r--r--configmgr/source/node.cxx3
-rw-r--r--configmgr/source/partial.cxx3
-rw-r--r--configmgr/source/propertynode.cxx4
-rw-r--r--configmgr/source/rootaccess.cxx13
-rw-r--r--configmgr/source/type.cxx4
-rw-r--r--configmgr/source/valueparser.cxx16
-rw-r--r--configmgr/source/writemodfile.cxx23
-rw-r--r--configmgr/source/xcdparser.cxx12
-rw-r--r--configmgr/source/xcsparser.cxx52
16 files changed, 204 insertions, 351 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 1219f37640c8..7417859a6b0c 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -240,35 +240,25 @@ css::uno::Sequence< OUString > Access::getSupportedServiceNames()
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
comphelper::SequenceAsVector< OUString > services;
- services.push_back(
- OUString("com.sun.star.configuration.ConfigurationAccess"));
+ services.push_back("com.sun.star.configuration.ConfigurationAccess");
if (getRootAccess()->isUpdate()) {
services.push_back(
- OUString("com.sun.star.configuration.ConfigurationUpdateAccess"));
+ "com.sun.star.configuration.ConfigurationUpdateAccess");
}
- services.push_back(
- OUString("com.sun.star.configuration.HierarchyAccess"));
- services.push_back(
- OUString("com.sun.star.configuration.HierarchyElement"));
+ services.push_back("com.sun.star.configuration.HierarchyAccess");
+ services.push_back("com.sun.star.configuration.HierarchyElement");
if (getNode()->kind() == Node::KIND_GROUP) {
- services.push_back(
- OUString("com.sun.star.configuration.GroupAccess"));
- services.push_back(
- OUString("com.sun.star.configuration.PropertyHierarchy"));
+ services.push_back("com.sun.star.configuration.GroupAccess");
+ services.push_back("com.sun.star.configuration.PropertyHierarchy");
if (getRootAccess()->isUpdate()) {
- services.push_back(
- OUString("com.sun.star.configuration.GroupUpdate"));
+ services.push_back("com.sun.star.configuration.GroupUpdate");
}
} else {
- services.push_back(
- OUString("com.sun.star.configuration.SetAccess"));
- services.push_back(
- OUString("com.sun.star.configuration.SimpleSetAccess"));
+ services.push_back("com.sun.star.configuration.SetAccess");
+ services.push_back("com.sun.star.configuration.SimpleSetAccess");
if (getRootAccess()->isUpdate()) {
- services.push_back(
- OUString("com.sun.star.configuration.SetUpdate"));
- services.push_back(
- OUString("com.sun.star.configuration.SimpleSetUpdate"));
+ services.push_back("com.sun.star.configuration.SetUpdate");
+ services.push_back("com.sun.star.configuration.SimpleSetUpdate");
}
}
addSupportedServiceNames(&services);
@@ -283,7 +273,7 @@ void Access::dispose() throw (css::uno::RuntimeException) {
checkLocalizedPropertyAccess();
if (getParentAccess().is()) {
throw css::uno::RuntimeException(
- OUString("configmgr dispose inappropriate Access"),
+ "configmgr dispose inappropriate Access",
static_cast< cppu::OWeakObject * >(this));
}
if (disposed_) {
@@ -306,8 +296,7 @@ void Access::addEventListener(
checkLocalizedPropertyAccess();
if (!xListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
if (!disposed_) {
disposeListeners_.insert(xListener);
@@ -352,8 +341,7 @@ css::uno::Type Access::getElementType() throw (css::uno::RuntimeException) {
default:
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
- static_cast< cppu::OWeakObject * >(this));
+ "this cannot happen", static_cast< cppu::OWeakObject * >(this));
}
}
@@ -458,14 +446,13 @@ void Access::replaceByHierarchicalName(
break;
case Node::KIND_SET:
throw css::lang::IllegalArgumentException(
- OUString("configmgr::Access::replaceByHierarchicalName does not"
- " currently support set members"),
+ ("configmgr::Access::replaceByHierarchicalName does not"
+ " currently support set members"),
static_cast< cppu::OWeakObject * >(this), 0);
case Node::KIND_ROOT:
throw css::lang::IllegalArgumentException(
- (OUString("configmgr::Access::replaceByHierarchicalName does not"
- " allow changing component ")
- + aName),
+ ("configmgr::Access::replaceByHierarchicalName does not allow"
+ " changing component " + aName),
static_cast< cppu::OWeakObject * >(this), 0);
default:
assert(false); // this cannot happen
@@ -486,8 +473,7 @@ void Access::addContainerListener(
checkLocalizedPropertyAccess();
if (!xListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
if (!disposed_) {
containerListeners_.insert(xListener);
@@ -589,8 +575,7 @@ OUString Access::composeHierarchicalName(
checkLocalizedPropertyAccess();
if (aRelativeName.isEmpty() || aRelativeName[0] == '/') {
throw css::lang::IllegalArgumentException(
- OUString("configmgr composeHierarchicalName inappropriate relative"
- " name"),
+ "configmgr composeHierarchicalName inappropriate relative name",
static_cast< cppu::OWeakObject * >(this), -1);
}
OUStringBuffer path(getRelativePathRepresentation());
@@ -662,7 +647,7 @@ void Access::setName(OUString const & aName)
// renaming a property could only work for an extension property,
// but a localized property is never an extension property
throw css::uno::RuntimeException(
- OUString("configmgr setName inappropriate node"),
+ "configmgr setName inappropriate node",
static_cast< cppu::OWeakObject * >(this));
default:
assert(false); // this cannot happen
@@ -701,7 +686,7 @@ void Access::setPropertyValue(
osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
- OUString("configmgr setPropertyValue on non-update access"),
+ "configmgr setPropertyValue on non-update access",
static_cast< cppu::OWeakObject * >(this));
}
Modifications localMods;
@@ -742,8 +727,7 @@ void Access::addPropertyChangeListener(
osl::MutexGuard g(*lock_);
if (!xListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
checkKnownProperty(aPropertyName);
if (!disposed_) {
@@ -794,8 +778,7 @@ void Access::addVetoableChangeListener(
osl::MutexGuard g(*lock_);
if (!aListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
checkKnownProperty(PropertyName);
if (!disposed_) {
@@ -847,21 +830,20 @@ void Access::setPropertyValues(
osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
- OUString("configmgr setPropertyValues on non-update access"),
+ "configmgr setPropertyValues on non-update access",
static_cast< cppu::OWeakObject * >(this));
}
if (aPropertyNames.getLength() != aValues.getLength()) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr setPropertyValues: aPropertyNames/aValues of"
- " different length"),
+ ("configmgr setPropertyValues: aPropertyNames/aValues of"
+ " different length"),
static_cast< cppu::OWeakObject * >(this), -1);
}
Modifications localMods;
for (sal_Int32 i = 0; i < aPropertyNames.getLength(); ++i) {
if (!setChildProperty(aPropertyNames[i], aValues[i], &localMods)) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr setPropertyValues inappropriate property"
- " name"),
+ "configmgr setPropertyValues inappropriate property name",
static_cast< cppu::OWeakObject * >(this), -1);
}
}
@@ -881,8 +863,7 @@ css::uno::Sequence< css::uno::Any > Access::getPropertyValues(
rtl::Reference< ChildAccess > child(getChild(aPropertyNames[i]));
if (!child.is()) {
throw css::uno::RuntimeException(
- OUString("configmgr getPropertyValues inappropriate property"
- " name"),
+ "configmgr getPropertyValues inappropriate property name",
static_cast< cppu::OWeakObject * >(this));
}
vals[i] = child->asValue();
@@ -901,8 +882,7 @@ void Access::addPropertiesChangeListener(
osl::MutexGuard g(*lock_);
if (!xListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
if (!disposed_) {
propertiesChangeListeners_.insert(xListener);
@@ -967,8 +947,7 @@ void Access::setHierarchicalPropertyValue(
osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
- OUString("configmgr setHierarchicalPropertyName on non-update"
- " access"),
+ "configmgr setHierarchicalPropertyName on non-update access",
static_cast< cppu::OWeakObject * >(this));
}
rtl::Reference< ChildAccess > child(
@@ -1017,14 +996,13 @@ void Access::setHierarchicalPropertyValues(
osl::MutexGuard g(*lock_);
if (!getRootAccess()->isUpdate()) {
throw css::uno::RuntimeException(
- OUString("configmgr setPropertyValues on non-update access"),
+ "configmgr setPropertyValues on non-update access",
static_cast< cppu::OWeakObject * >(this));
}
if (aHierarchicalPropertyNames.getLength() != Values.getLength()) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr setHierarchicalPropertyValues:"
- " aHierarchicalPropertyNames/Values of different"
- " length"),
+ ("configmgr setHierarchicalPropertyValues:"
+ " aHierarchicalPropertyNames/Values of different length"),
static_cast< cppu::OWeakObject * >(this), -1);
}
Modifications localMods;
@@ -1033,8 +1011,8 @@ void Access::setHierarchicalPropertyValues(
getSubChild(aHierarchicalPropertyNames[i]));
if (!child.is()) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr setHierarchicalPropertyValues"
- " inappropriate property name"),
+ ("configmgr setHierarchicalPropertyValues inappropriate"
+ " property name"),
static_cast< cppu::OWeakObject * >(this), -1);
}
child->checkFinalized();
@@ -1060,8 +1038,8 @@ css::uno::Sequence< css::uno::Any > Access::getHierarchicalPropertyValues(
getSubChild(aHierarchicalPropertyNames[i]));
if (!child.is()) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr getHierarchicalPropertyValues inappropriate"
- " hierarchical property name"),
+ ("configmgr getHierarchicalPropertyValues inappropriate"
+ " hierarchical property name"),
static_cast< cppu::OWeakObject * >(this), -1);
}
vals[i] = child->asValue();
@@ -1235,8 +1213,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance()
components_.getTemplate(Data::NO_LAYER, tmplName));
if (!tmpl.is()) {
throw css::uno::Exception(
- (OUString("unknown template ") +
- tmplName),
+ "unknown template " + tmplName,
static_cast< cppu::OWeakObject * >(this));
}
rtl::Reference< Node > node(tmpl->clone(true));
@@ -1252,8 +1229,8 @@ css::uno::Reference< css::uno::XInterface > Access::createInstanceWithArguments(
assert(thisIs(IS_SET|IS_UPDATE));
if (aArguments.getLength() != 0) {
throw css::uno::Exception(
- OUString("configuration SimpleSetUpdate createInstanceWithArguments"
- " must not specify any arguments"),
+ ("configuration SimpleSetUpdate createInstanceWithArguments"
+ " must not specify any arguments"),
static_cast< cppu::OWeakObject * >(this));
}
return createInstance();
@@ -1410,7 +1387,7 @@ void Access::checkLocalizedPropertyAccess() {
!Components::allLocales(getRootAccess()->getLocale()))
{
throw css::uno::RuntimeException(
- OUString("configmgr Access to specialized LocalizedPropertyNode"),
+ "configmgr Access to specialized LocalizedPropertyNode",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -1486,7 +1463,7 @@ rtl::Reference< ChildAccess > Access::getChild(OUString const & name) {
if (child.is()) {
return child;
}
- child = getChild(OUString());
+ child = getChild("");
if (child.is()) {
return child;
}
@@ -1552,7 +1529,7 @@ void Access::checkValue(css::uno::Any const & value, Type type, bool nillable) {
}
if (!ok) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr inappropriate property value"),
+ "configmgr inappropriate property value",
static_cast< cppu::OWeakObject * >(this), -1);
}
}
@@ -1696,7 +1673,7 @@ void Access::initBroadcasterAndChanges(
css::uno::Any()));
}
}
- j = propertyChangeListeners_.find(OUString());
+ j = propertyChangeListeners_.find("");
if (j != propertyChangeListeners_.end()) {
for (PropertyChangeListenersElement::iterator k(
j->second.begin());
@@ -1784,7 +1761,7 @@ void Access::initBroadcasterAndChanges(
css::uno::Any()));
}
}
- j = propertyChangeListeners_.find(OUString());
+ j = propertyChangeListeners_.find("");
if (j != propertyChangeListeners_.end()) {
for (PropertyChangeListenersElement::iterator k(
j->second.begin());
@@ -1876,10 +1853,7 @@ void Access::initBroadcasterAndChanges(
if (!path.isEmpty()) {
path.append(sal_Unicode('/'));
}
- path.append(
- Data::createSegment(
- OUString("*"),
- i->first));
+ path.append(Data::createSegment("*", i->first));
allChanges->push_back(
css::util::ElementChange(
css::uno::makeAny(path.makeStringAndClear()),
@@ -1918,7 +1892,7 @@ void Access::initBroadcasterAndChanges(
css::uno::Any()));
}
}
- j = propertyChangeListeners_.find(OUString());
+ j = propertyChangeListeners_.find("");
if (j != propertyChangeListeners_.end()) {
for (PropertyChangeListenersElement::iterator k(
j->second.begin());
@@ -1975,10 +1949,7 @@ void Access::initBroadcasterAndChanges(
if (!path.isEmpty()) {
path.append(sal_Unicode('/'));
}
- path.append(
- Data::createSegment(
- OUString("*"),
- i->first));
+ path.append(Data::createSegment("*", i->first));
allChanges->push_back(
css::util::ElementChange(
css::uno::makeAny(path.makeStringAndClear()),
@@ -2204,7 +2175,7 @@ css::beans::Property Access::asProperty() {
void Access::checkFinalized() {
if (isFinalized()) {
throw css::lang::IllegalArgumentException(
- OUString("configmgr modification of finalized item"),
+ "configmgr modification of finalized item",
static_cast< cppu::OWeakObject * >(this), -1);
}
}
@@ -2252,7 +2223,7 @@ rtl::Reference< ChildAccess > Access::getFreeSetMember(
freeAcc->getRootAccess() != getRootAccess()))
{
throw css::lang::IllegalArgumentException(
- OUString("configmgr inappropriate set element"),
+ "configmgr inappropriate set element",
static_cast< cppu::OWeakObject * >(this), 1);
}
assert(dynamic_cast< SetNode * >(getNode().get()) != 0);
@@ -2260,7 +2231,7 @@ rtl::Reference< ChildAccess > Access::getFreeSetMember(
freeAcc->getNode()->getTemplateName()))
{
throw css::lang::IllegalArgumentException(
- OUString("configmgr inappropriate set element"),
+ "configmgr inappropriate set element",
static_cast< cppu::OWeakObject * >(this), 1);
}
return freeAcc;
diff --git a/configmgr/source/broadcaster.cxx b/configmgr/source/broadcaster.cxx
index 6a6a503b0e0e..c080a3ee61b3 100644
--- a/configmgr/source/broadcaster.cxx
+++ b/configmgr/source/broadcaster.cxx
@@ -193,7 +193,7 @@ void Broadcaster::send() {
}
if (exception.hasValue()) {
throw css::lang::WrappedTargetRuntimeException(
- (OUString("configmgr exceptions during listener notification") +
+ ("configmgr exceptions during listener notification" +
messages.makeStringAndClear()),
css::uno::Reference< css::uno::XInterface >(),
exception);
diff --git a/configmgr/source/childaccess.cxx b/configmgr/source/childaccess.cxx
index b5a34efbd449..dec5c46e7b64 100644
--- a/configmgr/source/childaccess.cxx
+++ b/configmgr/source/childaccess.cxx
@@ -166,8 +166,7 @@ void ChildAccess::setParent(css::uno::Reference< css::uno::XInterface > const &)
osl::MutexGuard g(*lock_);
checkLocalizedPropertyAccess();
throw css::lang::NoSupportException(
- OUString("setParent"),
- static_cast< cppu::OWeakObject * >(this));
+ "setParent", static_cast< cppu::OWeakObject * >(this));
}
sal_Int64 ChildAccess::getSomething(
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 511dd41f1f73..84b45bbd49fc 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -311,8 +311,7 @@ void Components::insertExtensionXcsFile(
parseXcsFile(fileUri, layer, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- (OUString("insertExtensionXcsFile does not exist: ") +
- e.Message),
+ "insertExtensionXcsFile does not exist: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -328,8 +327,7 @@ void Components::insertExtensionXcuFile(
} catch (css::container::NoSuchElementException & e) {
data_.removeExtensionXcuAdditions(fileUri);
throw css::uno::RuntimeException(
- (OUString("insertExtensionXcuFile does not exist: ") +
- e.Message),
+ "insertExtensionXcuFile does not exist: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -412,8 +410,7 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
sal_Int32 i = descriptor.indexOf(' ');
if (i <= 0) {
throw css::uno::RuntimeException(
- (OUString("bad external value descriptor ") +
- descriptor),
+ "bad external value descriptor " + descriptor,
css::uno::Reference< css::uno::XInterface >());
}
//TODO: Do not make calls with mutex locked:
@@ -450,19 +447,16 @@ css::beans::Optional< css::uno::Any > Components::getExternalValue(
value))
{
throw css::uno::RuntimeException(
- (OUString("cannot obtain external value through ") +
- descriptor),
+ "cannot obtain external value through " + descriptor,
css::uno::Reference< css::uno::XInterface >());
}
} catch (css::beans::UnknownPropertyException & e) {
throw css::uno::RuntimeException(
- (OUString("unknown external value descriptor ID: ") +
- e.Message),
+ "unknown external value descriptor ID: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
} catch (css::lang::WrappedTargetException & e) {
throw css::uno::RuntimeException(
- (OUString("cannot obtain external value: ") +
- e.Message),
+ "cannot obtain external value: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -475,9 +469,7 @@ Components::Components(
{
assert(context.is());
lock_ = lock();
- OUString conf(
- expand(
- OUString("${CONFIGURATION_LAYERS}")));
+ OUString conf(expand("${CONFIGURATION_LAYERS}"));
int layer = 0;
for (sal_Int32 i = 0;;) {
while (i != conf.getLength() && conf[i] == ' ') {
@@ -488,15 +480,14 @@ Components::Components(
}
if (!modificationFileUrl_.isEmpty()) {
throw css::uno::RuntimeException(
- OUString("CONFIGURATION_LAYERS: \"user\" followed by further"
- " layers"),
+ "CONFIGURATION_LAYERS: \"user\" followed by further layers",
css::uno::Reference< css::uno::XInterface >());
}
sal_Int32 c = i;
for (;; ++c) {
if (c == conf.getLength() || conf[c] == ' ') {
throw css::uno::RuntimeException(
- OUString("CONFIGURATION_LAYERS: missing \":\""),
+ "CONFIGURATION_LAYERS: missing \":\"",
css::uno::Reference< css::uno::XInterface >());
}
if (conf[c] == ':') {
@@ -519,8 +510,7 @@ Components::Components(
} else if ( type == "sharedext" ) {
if (sharedExtensionLayer_ != -1) {
throw css::uno::RuntimeException(
- OUString("CONFIGURATION_LAYERS: multiple \"sharedext\""
- " layers"),
+ "CONFIGURATION_LAYERS: multiple \"sharedext\" layers",
css::uno::Reference< css::uno::XInterface >());
}
sharedExtensionLayer_ = layer;
@@ -529,8 +519,7 @@ Components::Components(
} else if ( type == "userext" ) {
if (userExtensionLayer_ != -1) {
throw css::uno::RuntimeException(
- OUString("CONFIGURATION_LAYERS: multiple \"userext\""
- " layers"),
+ "CONFIGURATION_LAYERS: multiple \"userext\" layers",
css::uno::Reference< css::uno::XInterface >());
}
userExtensionLayer_ = layer;
@@ -545,16 +534,14 @@ Components::Components(
} else if ( type == "user" ) {
if (url.isEmpty()) {
throw css::uno::RuntimeException(
- OUString("CONFIGURATION_LAYERS: empty \"user\" URL"),
+ "CONFIGURATION_LAYERS: empty \"user\" URL",
css::uno::Reference< css::uno::XInterface >());
}
modificationFileUrl_ = url;
parseModificationLayer(url);
} else {
throw css::uno::RuntimeException(
- (OUString("CONFIGURATION_LAYERS: unknown layer type \"") +
- type +
- OUString("\"")),
+ "CONFIGURATION_LAYERS: unknown layer type \"" + type + "\"",
css::uno::Reference< css::uno::XInterface >());
}
i = n;
@@ -603,8 +590,7 @@ void Components::parseFiles(
// fall through
default:
throw css::uno::RuntimeException(
- (OUString("cannot open directory ") +
- url),
+ "cannot open directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
for (;;) {
@@ -615,8 +601,7 @@ void Components::parseFiles(
}
if (rc != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot iterate directory ") +
- url),
+ "cannot iterate directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
osl::FileStatus stat(
@@ -624,8 +609,7 @@ void Components::parseFiles(
osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot stat in directory ") +
- url),
+ "cannot stat in directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
if (stat.getFileType() == osl::FileStatus::Directory) { //TODO: symlinks
@@ -640,8 +624,7 @@ void Components::parseFiles(
parseFile, stat.getFileURL(), layer, data_, 0, 0, 0);
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- (OUString("stat'ed file does not exist: ") +
- e.Message),
+ "stat'ed file does not exist: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -685,8 +668,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
return;
default:
throw css::uno::RuntimeException(
- (OUString("cannot open directory ") +
- url),
+ "cannot open directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
UnresolvedList unres;
@@ -700,8 +682,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
}
if (rc != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot iterate directory ") +
- url),
+ "cannot iterate directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
osl::FileStatus stat(
@@ -709,8 +690,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot stat in directory ") +
- url),
+ "cannot stat in directory " + url,
css::uno::Reference< css::uno::XInterface >());
}
if (stat.getFileType() != osl::FileStatus::Directory) { //TODO: symlinks
@@ -731,8 +711,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
new XcdParser(layer, processedDeps, data_));
} catch (css::container::NoSuchElementException & e) {
throw css::uno::RuntimeException(
- (OUString("stat'ed file does not exist: ") +
- e.Message),
+ "stat'ed file does not exist: " + e.Message,
css::uno::Reference< css::uno::XInterface >());
}
if (manager->parse(0)) {
@@ -756,8 +735,7 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
}
if (!resolved) {
throw css::uno::RuntimeException(
- (OUString("xcd: unresolved dependencies in ") +
- url),
+ "xcd: unresolved dependencies in " + url,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -765,14 +743,8 @@ void Components::parseXcdFiles(int layer, OUString const & url) {
void Components::parseXcsXcuLayer(int layer, OUString const & url) {
parseXcdFiles(layer, url);
- parseFiles(
- layer, OUString(".xcs"),
- &parseXcsFile,
- url + OUString("/schema"), false);
- parseFiles(
- layer + 1, OUString(".xcu"),
- &parseXcuFile,
- url + OUString("/data"), false);
+ parseFiles(layer, ".xcs", &parseXcsFile, url + "/schema", false);
+ parseFiles(layer + 1, ".xcu", &parseXcuFile, url + "/data", false);
}
void Components::parseXcsXcuIniLayer(
@@ -796,34 +768,27 @@ void Components::parseXcsXcuIniLayer(
}
}
prefix.append(':');
- OUString urls(prefix.toString() + OUString("SCHEMA}"));
+ OUString urls(prefix.toString() + "SCHEMA}");
rtl::Bootstrap::expandMacros(urls);
- if (!urls.isEmpty())
- {
+ if (!urls.isEmpty()) {
parseFileList(layer, &parseXcsFile, urls, false);
}
- urls = prefix.makeStringAndClear() + OUString("DATA}");
+ urls = prefix.makeStringAndClear() + "DATA}";
rtl::Bootstrap::expandMacros(urls);
- if (!urls.isEmpty())
- {
+ if (!urls.isEmpty()) {
parseFileList(layer + 1, &parseXcuFile, urls, recordAdditions);
}
}
}
void Components::parseModuleLayer(int layer, OUString const & url) {
- parseFiles(
- layer, OUString(".xcu"),
- &parseXcuFile, url, false);
+ parseFiles(layer, ".xcu", &parseXcuFile, url, false);
}
void Components::parseResLayer(int layer, OUString const & url) {
- OUString resUrl(
- url + OUString("/res"));
+ OUString resUrl(url + "/res");
parseXcdFiles(layer, resUrl);
- parseFiles(
- layer, OUString(".xcu"),
- &parseXcuFile, resUrl, false);
+ parseFiles(layer, ".xcu", &parseXcuFile, resUrl, false);
}
void Components::parseModificationLayer(OUString const & url) {
@@ -836,11 +801,10 @@ void Components::parseModificationLayer(OUString const & url) {
// longer relevant, probably OOo 4; also see hack for xsi namespace in
// xmlreader::XmlReader::registerNamespaceIri):
parseFiles(
- Data::NO_LAYER, OUString(".xcu"),
- &parseXcuFile,
+ Data::NO_LAYER, ".xcu", &parseXcuFile,
expand(
- OUString("${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
- ":UserInstallation}/user/registry/data")),
+ "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("bootstrap")
+ ":UserInstallation}/user/registry/data"),
false);
}
}
@@ -849,7 +813,7 @@ int Components::getExtensionLayer(bool shared) {
int layer = shared ? sharedExtensionLayer_ : userExtensionLayer_;
if (layer == -1) {
throw css::uno::RuntimeException(
- OUString("insert extension xcs/xcu file into undefined layer"),
+ "insert extension xcs/xcu file into undefined layer",
css::uno::Reference< css::uno::XInterface >());
}
return layer;
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 9244f989e404..a4aaa15d9cdb 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -52,7 +52,6 @@
#include "osl/mutex.hxx"
#include "sal/types.h"
#include "rtl/ref.hxx"
-#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include <i18nlangtag/languagetag.hxx>
@@ -73,8 +72,8 @@ char const updateAccessServiceName[] =
void badNodePath() {
throw css::uno::Exception(
- OUString("com.sun.star.configuration.ConfigurationProvider expects a"
- " single, non-empty, string nodepath argument"),
+ ("com.sun.star.configuration.ConfigurationProvider expects a single,"
+ " non-empty, string nodepath argument"),
0);
}
@@ -198,8 +197,8 @@ Service::createInstanceWithArguments(
break;
} else {
throw css::uno::Exception(
- OUString("com.sun.star.configuration.ConfigurationProvider"
- " expects NamedValue or PropertyValue arguments"),
+ ("com.sun.star.configuration.ConfigurationProvider expects"
+ " NamedValue or PropertyValue arguments"),
0);
}
// For backwards compatibility, allow "nodepath" and "Locale" in any
@@ -215,9 +214,8 @@ Service::createInstanceWithArguments(
locale.isEmpty())
{
throw css::uno::Exception(
- OUString("com.sun.star.configuration.ConfigurationProvider"
- " expects at most one, non-empty, string Locale"
- " argument"),
+ ("com.sun.star.configuration.ConfigurationProvider expects"
+ " at most one, non-empty, string Locale argument"),
0);
}
}
@@ -228,27 +226,24 @@ Service::createInstanceWithArguments(
// For backwards compatibility, allow a nodepath that misses the leading
// slash:
if (nodepath[0] != '/') {
- nodepath = OUString("/") + nodepath;
+ nodepath = "/" + nodepath;
}
if (locale.isEmpty()) {
//TODO: should the Access use the dynamically changing locale_ instead?
locale = locale_;
if (locale.isEmpty()) {
- locale = OUString("en-US");
+ locale = "en-US";
}
}
bool update;
- if ( ServiceSpecifier == accessServiceName )
- {
+ if (ServiceSpecifier == accessServiceName) {
update = false;
- } else if ( ServiceSpecifier == updateAccessServiceName )
- {
+ } else if (ServiceSpecifier == updateAccessServiceName) {
update = true;
} else {
throw css::uno::Exception(
- (OUString("com.sun.star.configuration.ConfigurationProvider does not"
- " support service ") +
- ServiceSpecifier),
+ ("com.sun.star.configuration.ConfigurationProvider does not support"
+ " service " + ServiceSpecifier),
static_cast< cppu::OWeakObject * >(this));
}
osl::MutexGuard guard(*lock_);
@@ -257,9 +252,8 @@ Service::createInstanceWithArguments(
new RootAccess(components, nodepath, locale, update));
if (root->isValue()) {
throw css::uno::Exception(
- (OUString("com.sun.star.configuration.ConfigurationProvider: there is"
- " a leaf value at nodepath ") +
- nodepath),
+ ("com.sun.star.configuration.ConfigurationProvider: there is a leaf"
+ " value at nodepath " + nodepath),
static_cast< cppu::OWeakObject * >(this));
}
components.addRootAccess(root);
@@ -270,8 +264,8 @@ css::uno::Sequence< OUString > Service::getAvailableServiceNames()
throw (css::uno::RuntimeException)
{
css::uno::Sequence< OUString > names(2);
- names[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(accessServiceName));
- names[1] = OUString(RTL_CONSTASCII_USTRINGPARAM(updateAccessServiceName));
+ names[0] = accessServiceName;
+ names[1] = updateAccessServiceName;
return names;
}
@@ -417,9 +411,8 @@ Factory::createInstanceWithArgumentsAndContext(
value = v2.Value;
} else {
throw css::uno::Exception(
- OUString("com.sun.star.configuration.ConfigurationProvider"
- " factory expects NamedValue or PropertyValue"
- " arguments"),
+ ("com.sun.star.configuration.ConfigurationProvider factory"
+ " expects NamedValue or PropertyValue arguments"),
0);
}
// For backwards compatibility, allow "Locale" and (ignored)
@@ -429,15 +422,15 @@ Factory::createInstanceWithArgumentsAndContext(
locale.isEmpty())
{
throw css::uno::Exception(
- OUString("com.sun.star.configuration."
- "ConfigurationProvider factory expects at most"
- " one, non-empty, string Locale argument"),
+ ("com.sun.star.configuration.ConfigurationProvider"
+ " factory expects at most one, non-empty, string"
+ " Locale argument"),
0);
}
} else if (!name.equalsIgnoreAsciiCase("enableasync")) {
throw css::uno::Exception(
- OUString("com.sun.star.configuration.ConfigurationProvider"
- " factory: unknown argument ") + name,
+ ("com.sun.star.configuration.ConfigurationProvider factory:"
+ " unknown argument " + name),
0);
}
}
@@ -450,8 +443,7 @@ Factory::createInstanceWithArgumentsAndContext(
css::uno::Reference< css::uno::XInterface > createDefault(
css::uno::Reference< css::uno::XComponentContext > const & context)
{
- return static_cast< cppu::OWeakObject * >(
- new Service(context, OUString()));
+ return static_cast< cppu::OWeakObject * >(new Service(context, ""));
}
OUString getImplementationName() {
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index a19f940bc17b..36dd43216098 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -321,17 +321,15 @@ Service::Service(
try {
provider_ = css::uno::Reference< css::lang::XMultiServiceFactory >(
context->getServiceManager()->createInstanceWithContext(
- OUString("com.sun.star.configuration.DefaultProvider"),
- context),
+ "com.sun.star.configuration.DefaultProvider", context),
css::uno::UNO_QUERY_THROW);
} catch (css::uno::RuntimeException &) {
throw;
} catch (css::uno::Exception & e) {
throw css::uno::DeploymentException(
- (OUString("component context fails to supply service"
- " com.sun.star.configuration.DefaultProvider of type"
- " com.sun.star.lang.XMultiServiceFactory: ") +
- e.Message),
+ ("component context fails to supply service"
+ " com.sun.star.configuration.DefaultProvider of type"
+ " com.sun.star.lang.XMultiServiceFactory: " + e.Message),
context);
}
}
@@ -351,21 +349,19 @@ void Service::open(OUString const & rURL, sal_Bool bReadOnly, sal_Bool)
doClose();
}
css::uno::Sequence< css::uno::Any > args(1);
- args[0] <<= css::beans::NamedValue(
- OUString("nodepath"),
- css::uno::makeAny(rURL));
+ args[0] <<= css::beans::NamedValue("nodepath", css::uno::makeAny(rURL));
try {
access_ = provider_->createInstanceWithArguments(
(bReadOnly
? OUString("com.sun.star.configuration.ConfigurationAccess")
- : OUString("com.sun.star.configuration.ConfigurationUpdateAccess")),
+ : OUString(
+ "com.sun.star.configuration.ConfigurationUpdateAccess")),
args);
} catch (css::uno::RuntimeException &) {
throw;
} catch (css::uno::Exception & e) {
throw css::uno::RuntimeException(
- (OUString("com.sun.star.configuration.ConfigurationRegistry: open"
- " failed: ") +
+ ("com.sun.star.configuration.ConfigurationRegistry: open failed: " +
e.Message),
static_cast< cppu::OWeakObject * >(this));
}
@@ -390,8 +386,7 @@ void Service::destroy()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -415,16 +410,14 @@ void Service::mergeKey(OUString const &, OUString const &)
css::registry::MergeConflictException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
void Service::flush() throw (css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -433,8 +426,7 @@ void Service::addFlushListener(
throw (css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -443,16 +435,14 @@ void Service::removeFlushListener(
throw (css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
void Service::checkValid() {
if (!access_.is()) {
throw css::registry::InvalidRegistryException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " valid"),
+ "com.sun.star.configuration.ConfigurationRegistry: not valid",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -460,8 +450,7 @@ void Service::checkValid() {
void Service::checkValid_RuntimeException() {
if (!access_.is()) {
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " valid"),
+ "com.sun.star.configuration.ConfigurationRegistry: not valid",
static_cast< cppu::OWeakObject * >(this));
}
}
@@ -478,8 +467,7 @@ OUString RegistryKey::getKeyName() throw (css::uno::RuntimeException) {
return named->getName();
}
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -543,7 +531,7 @@ sal_Int32 RegistryKey::getLongValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -551,8 +539,7 @@ void RegistryKey::setLongValue(sal_Int32)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -568,7 +555,7 @@ css::uno::Sequence< sal_Int32 > RegistryKey::getLongListValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -576,8 +563,7 @@ void RegistryKey::setLongListValue(css::uno::Sequence< sal_Int32 > const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -593,7 +579,7 @@ OUString RegistryKey::getAsciiValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -601,8 +587,7 @@ void RegistryKey::setAsciiValue(OUString const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -618,7 +603,7 @@ css::uno::Sequence< OUString > RegistryKey::getAsciiListValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -626,8 +611,7 @@ void RegistryKey::setAsciiListValue(css::uno::Sequence< OUString > const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -643,7 +627,7 @@ OUString RegistryKey::getStringValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -651,8 +635,7 @@ void RegistryKey::setStringValue(OUString const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -668,7 +651,7 @@ css::uno::Sequence< OUString > RegistryKey::getStringListValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -677,8 +660,7 @@ void RegistryKey::setStringListValue(
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -694,7 +676,7 @@ css::uno::Sequence< sal_Int8 > RegistryKey::getBinaryValue()
return v;
}
throw css::registry::InvalidValueException(
- OUString("com.sun.star.configuration.ConfigurationRegistry"),
+ "com.sun.star.configuration.ConfigurationRegistry",
static_cast< cppu::OWeakObject * >(this));
}
@@ -702,8 +684,7 @@ void RegistryKey::setBinaryValue(css::uno::Sequence< sal_Int8 > const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -729,8 +710,7 @@ css::uno::Reference< css::registry::XRegistryKey > RegistryKey::createKey(
css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -746,8 +726,7 @@ void RegistryKey::deleteKey(OUString const &)
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -756,8 +735,7 @@ RegistryKey::openKeys()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
@@ -765,8 +743,7 @@ css::uno::Sequence< OUString > RegistryKey::getKeyNames()
throw (css::registry::InvalidRegistryException, css::uno::RuntimeException)
{
throw css::uno::RuntimeException(
- OUString("com.sun.star.configuration.ConfigurationRegistry: not"
- " implemented"),
+ "com.sun.star.configuration.ConfigurationRegistry: not implemented",
static_cast< cppu::OWeakObject * >(this));
}
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index a2870dd21196..902dbaf5d03c 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -132,7 +132,7 @@ sal_Int32 Data::parseSegment(
}
if (templateName != 0) {
if (i - index == 1 && path[index] == '*') {
- *templateName = OUString();
+ *templateName = "";
} else {
*templateName = path.copy(index, i - index);
}
@@ -159,8 +159,7 @@ OUString Data::fullTemplateName(
{
if (component.indexOf(':') != -1 || name.indexOf(':') != -1) {
throw css::uno::RuntimeException(
- (OUString("bad component/name pair containing colon ") +
- component + OUString("/") +
+ ("bad component/name pair containing colon " + component + "/" +
name),
css::uno::Reference< css::uno::XInterface >());
}
@@ -203,8 +202,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
{
if (pathRepresentation.isEmpty() || pathRepresentation[0] != '/') {
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
if (path != 0) {
@@ -226,8 +224,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
if (n == -1 || setElement)
{
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
NodeMap const & components = getComponents();
@@ -251,8 +248,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
pathRepresentation[n++] != '/')
{
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
// for backwards compatibility, ignore a final slash
@@ -266,13 +262,12 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
return p;
}
parent = p;
- templateName = OUString();
+ templateName = "";
n = parseSegment(
pathRepresentation, n, &seg, &setElement, &templateName);
if (n == -1) {
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
// For backwards compatibility, allow set members to be accessed with
@@ -283,8 +278,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
case Node::KIND_LOCALIZED_PROPERTY:
if (!templateName.isEmpty()) {
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
break;
@@ -294,23 +288,20 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
templateName))
{
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
break;
default:
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
if (!templateName.isEmpty() && p != 0) {
assert(!p->getTemplateName().isEmpty());
if (!equalTemplateNames(templateName, p->getTemplateName())) {
throw css::uno::RuntimeException(
- (OUString("bad path ") +
- pathRepresentation),
+ "bad path " + pathRepresentation,
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -338,8 +329,7 @@ Additions * Data::addExtensionXcuAdditions(
url, rtl::Reference< ExtensionXcu >())).first);
if (i->second.is()) {
throw css::uno::RuntimeException(
- (OUString("already added extension xcu ") +
- url),
+ "already added extension xcu " + url,
css::uno::Reference< css::uno::XInterface >());
}
i->second = item;
diff --git a/configmgr/source/node.cxx b/configmgr/source/node.cxx
index fc9f14519e37..661f1aaf7bd0 100644
--- a/configmgr/source/node.cxx
+++ b/configmgr/source/node.cxx
@@ -37,8 +37,7 @@ namespace configmgr {
NodeMap & Node::getMembers() {
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
- css::uno::Reference< css::uno::XInterface >());
+ "this cannot happen", css::uno::Reference< css::uno::XInterface >());
}
OUString Node::getTemplateName() const {
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx
index 77e77e3e8f99..2856046fe719 100644
--- a/configmgr/source/partial.cxx
+++ b/configmgr/source/partial.cxx
@@ -55,8 +55,7 @@ bool parseSegment(
}
}
throw css::uno::RuntimeException(
- OUString("bad path ") + path,
- css::uno::Reference< css::uno::XInterface >());
+ "bad path " + path, css::uno::Reference< css::uno::XInterface >());
}
}
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index 0427bc9c4968..31d7c161cb15 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -61,7 +61,7 @@ css::uno::Any PropertyNode::getValue(Components & components) {
if (val.IsPresent) {
value_ = val.Value; //TODO: check value type
}
- externalDescriptor_ = OUString(); // must not throw
+ externalDescriptor_ = ""; // must not throw
}
SAL_WARN_IF(
!(value_.hasValue() || nillable_), "configmgr",
@@ -72,7 +72,7 @@ css::uno::Any PropertyNode::getValue(Components & components) {
void PropertyNode::setValue(int layer, css::uno::Any const & value) {
setLayer(layer);
value_ = value;
- externalDescriptor_ = OUString();
+ externalDescriptor_ = "";
}
void PropertyNode::setExternal(int layer, OUString const & descriptor) {
diff --git a/configmgr/source/rootaccess.cxx b/configmgr/source/rootaccess.cxx
index 06c0d77f7fc4..96fa39faf976 100644
--- a/configmgr/source/rootaccess.cxx
+++ b/configmgr/source/rootaccess.cxx
@@ -128,8 +128,7 @@ void RootAccess::addChangesListener(
checkLocalizedPropertyAccess();
if (!aListener.is()) {
throw css::uno::RuntimeException(
- OUString("null listener"),
- static_cast< cppu::OWeakObject * >(this));
+ "null listener", static_cast< cppu::OWeakObject * >(this));
}
if (!isDisposed()) {
changesListeners_.insert(aListener);
@@ -226,9 +225,7 @@ rtl::Reference< Node > RootAccess::getNode() {
pathRepresentation_, &canonic, &path_, &finalizedLayer);
if (!node_.is()) {
throw css::uno::RuntimeException(
- (OUString("cannot find ") +
- pathRepresentation_),
- 0);
+ "cannot find " + pathRepresentation_, 0);
// RootAccess::queryInterface indirectly calls
// RootAccess::getNode, so if this RootAccess were passed out in
// RuntimeException.Context, client code that called
@@ -273,11 +270,9 @@ void RootAccess::addSupportedServiceNames(
std::vector< OUString > * services)
{
assert(services != 0);
- services->push_back(
- OUString("com.sun.star.configuration.AccessRootElement"));
+ services->push_back("com.sun.star.configuration.AccessRootElement");
if (update_) {
- services->push_back(
- OUString("com.sun.star.configuration.UpdateRootElement"));
+ services->push_back("com.sun.star.configuration.UpdateRootElement");
}
}
diff --git a/configmgr/source/type.cxx b/configmgr/source/type.cxx
index f4973cec5908..73b0b0913856 100644
--- a/configmgr/source/type.cxx
+++ b/configmgr/source/type.cxx
@@ -61,7 +61,7 @@ Type elementType(Type type) {
default:
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
+ "this cannot happen",
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -102,7 +102,7 @@ css::uno::Type mapType(Type type) {
default:
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
+ "this cannot happen",
css::uno::Reference< css::uno::XInterface >());
}
}
diff --git a/configmgr/source/valueparser.cxx b/configmgr/source/valueparser.cxx
index 1deced03c59f..67a65a63148b 100644
--- a/configmgr/source/valueparser.cxx
+++ b/configmgr/source/valueparser.cxx
@@ -171,8 +171,7 @@ template< typename T > css::uno::Any parseSingleValue(
T val;
if (!parseValue(text, &val)) {
throw css::uno::RuntimeException(
- OUString("invalid value"),
- css::uno::Reference< css::uno::XInterface >());
+ "invalid value", css::uno::Reference< css::uno::XInterface >());
}
return css::uno::makeAny(val);
}
@@ -196,7 +195,7 @@ template< typename T > css::uno::Any parseListValue(
xmlreader::Span(t.begin, i == -1 ? t.length : i), &val))
{
throw css::uno::RuntimeException(
- OUString("invalid value"),
+ "invalid value",
css::uno::Reference< css::uno::XInterface >());
}
seq.push_back(val);
@@ -216,7 +215,7 @@ css::uno::Any parseValue(
switch (type) {
case TYPE_ANY:
throw css::uno::RuntimeException(
- OUString("invalid value of type any"),
+ "invalid value of type any",
css::uno::Reference< css::uno::XInterface >());
case TYPE_BOOLEAN:
return parseSingleValue< sal_Bool >(text);
@@ -250,7 +249,7 @@ css::uno::Any parseValue(
default:
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
+ "this cannot happen",
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -333,8 +332,7 @@ bool ValueParser::startElement(
pad_.add(RTL_CONSTASCII_STRINGPARAM("\xEF\xBF\xBF"));
} else {
throw css::uno::RuntimeException(
- (OUString("bad unicode scalar attribute in ") +
- reader.getUrl()),
+ "bad unicode scalar attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
state_ = State(state_ + 1);
@@ -345,9 +343,7 @@ bool ValueParser::startElement(
break;
}
throw css::uno::RuntimeException(
- (OUString("bad member <") +
- name.convertFromUtf8() +
- OUString("> in ") + reader.getUrl()),
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
diff --git a/configmgr/source/writemodfile.cxx b/configmgr/source/writemodfile.cxx
index daae55c2d860..1ab181cb08c9 100644
--- a/configmgr/source/writemodfile.cxx
+++ b/configmgr/source/writemodfile.cxx
@@ -69,7 +69,7 @@ OString convertToUtf8(
RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{
throw css::uno::RuntimeException(
- OUString("cannot convert to UTF-8"),
+ "cannot convert to UTF-8",
css::uno::Reference< css::uno::XInterface >());
}
return s;
@@ -110,8 +110,7 @@ void writeData(oslFileHandle handle, char const * begin, sal_Int32 length) {
n != static_cast< sal_uInt32 >(length))
{
throw css::uno::RuntimeException(
- OUString("write failure"),
- css::uno::Reference< css::uno::XInterface >());
+ "write failure", css::uno::Reference< css::uno::XInterface >());
}
}
@@ -500,8 +499,7 @@ void writeModifications(
} else {
assert(node.is());
OUString pathRep(
- parentPathRepresentation +
- OUString("/") +
+ parentPathRepresentation + "/" +
Data::createSegment(node->getTemplateName(), nodeName));
for (Modifications::Node::Children::const_iterator i(
modifications.children.begin());
@@ -534,8 +532,7 @@ void writeModFile(
return;
default:
throw css::uno::RuntimeException(
- (OUString("cannot create directory ") +
- dir),
+ "cannot create directory " + dir,
css::uno::Reference< css::uno::XInterface >());
}
TempFile tmp;
@@ -550,8 +547,7 @@ void writeModFile(
return;
default:
throw css::uno::RuntimeException(
- (OUString("cannot create temporary file in ") +
- dir),
+ "cannot create temporary file in " + dir,
css::uno::Reference< css::uno::XInterface >());
}
writeData(
@@ -569,8 +565,7 @@ void writeModFile(
j != data.modifications.getRoot().children.end(); ++j)
{
writeModifications(
- components, tmp.handle, OUString(), rtl::Reference< Node >(),
- j->first,
+ components, tmp.handle, "", rtl::Reference< Node >(), j->first,
Data::findNode(Data::NO_LAYER, data.getComponents(), j->first),
j->second);
}
@@ -579,14 +574,12 @@ void writeModFile(
tmp.closed = true;
if (e != osl_File_E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot close ") +
- tmp.url),
+ "cannot close " + tmp.url,
css::uno::Reference< css::uno::XInterface >());
}
if (osl::File::move(tmp.url, url) != osl::FileBase::E_None) {
throw css::uno::RuntimeException(
- (OUString("cannot move ") +
- tmp.url),
+ "cannot move " + tmp.url,
css::uno::Reference< css::uno::XInterface >());
}
tmp.handle = 0;
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index a547c1494497..27a813fc862d 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -96,15 +96,13 @@ bool XcdParser::startElement(
}
if (!attrFile.is()) {
throw css::uno::RuntimeException(
- (OUString("no dependency file attribute in ") +
- reader.getUrl()),
+ "no dependency file attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
dependencyFile_ = attrFile.convertFromUtf8();
if (dependencyFile_.isEmpty()) {
throw css::uno::RuntimeException(
- (OUString("bad dependency file attribute in ") +
- reader.getUrl()),
+ "bad dependency file attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -117,7 +115,7 @@ bool XcdParser::startElement(
return false;
}
state_ = STATE_DEPENDENCY;
- dependencyFile_ = OUString();
+ dependencyFile_ = "";
return true;
}
state_ = STATE_COMPONENTS;
@@ -145,9 +143,7 @@ bool XcdParser::startElement(
break;
}
throw css::uno::RuntimeException(
- (OUString("bad member <") +
- name.convertFromUtf8() +
- OUString("> in ") + reader.getUrl()),
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx
index 0dc218ddc1e6..ca64e2e68d68 100644
--- a/configmgr/source/xcsparser.cxx
+++ b/configmgr/source/xcsparser.cxx
@@ -169,8 +169,7 @@ bool XcsParser::startElement(
assert(elements_.empty());
elements_.push(
Element(
- new GroupNode(
- valueParser_.getLayer(), false, OUString()),
+ new GroupNode(valueParser_.getLayer(), false, ""),
componentName_));
return true;
}
@@ -253,9 +252,7 @@ bool XcsParser::startElement(
}
}
throw css::uno::RuntimeException(
- (OUString("bad member <") +
- name.convertFromUtf8() +
- OUString("> in ") + reader.getUrl()),
+ "bad member <" + name.convertFromUtf8() + "> in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
@@ -298,7 +295,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
default:
assert(false);
throw css::uno::RuntimeException(
- OUString("this cannot happen"),
+ "this cannot happen",
css::uno::Reference< css::uno::XInterface >());
}
} else {
@@ -306,10 +303,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
NodeMap::value_type(top.name, top.node)).second)
{
throw css::uno::RuntimeException(
- (OUString("duplicate ") +
- top.name +
- OUString(" in ") +
- reader.getUrl()),
+ "duplicate " + top.name + " in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -326,8 +320,7 @@ void XcsParser::endElement(xmlreader::XmlReader const & reader) {
break;
case STATE_TEMPLATES_DONE:
throw css::uno::RuntimeException(
- (OUString("no component element in ") +
- reader.getUrl()),
+ "no component element in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
case STATE_COMPONENT_DONE:
break;
@@ -357,8 +350,7 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
{
if (hasPackage) {
throw css::uno::RuntimeException(
- (OUString("multiple component-schema package attributes"
- " in ") +
+ ("multiple component-schema package attributes in " +
reader.getUrl()),
css::uno::Reference< css::uno::XInterface >());
}
@@ -370,7 +362,7 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
{
if (hasName) {
throw css::uno::RuntimeException(
- (OUString("multiple component-schema name attributes in ") +
+ ("multiple component-schema name attributes in " +
reader.getUrl()),
css::uno::Reference< css::uno::XInterface >());
}
@@ -381,14 +373,12 @@ void XcsParser::handleComponentSchema(xmlreader::XmlReader & reader) {
}
if (!hasPackage) {
throw css::uno::RuntimeException(
- (OUString("no component-schema package attribute in ") +
- reader.getUrl()),
+ "no component-schema package attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
if (!hasName) {
throw css::uno::RuntimeException(
- (OUString("no component-schema name attribute in ") +
- reader.getUrl()),
+ "no component-schema name attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
componentName_ = xmlreader::Span(buf.getStr(), buf.getLength()).
@@ -423,8 +413,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- (OUString("no node-ref name attribute in ") +
- reader.getUrl()),
+ "no node-ref name attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
rtl::Reference< Node > tmpl(
@@ -436,9 +425,7 @@ void XcsParser::handleNodeRef(xmlreader::XmlReader & reader) {
//TODO: this can erroneously happen as long as import/uses attributes
// are not correctly processed
throw css::uno::RuntimeException(
- (OUString("unknown node-ref ") +
- name + OUString(" in ") +
- reader.getUrl()),
+ "unknown node-ref " + name + " in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
rtl::Reference< Node > node(tmpl->clone(false));
@@ -478,14 +465,12 @@ void XcsParser::handleProp(xmlreader::XmlReader & reader) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- (OUString("no prop name attribute in ") +
- reader.getUrl()),
+ "no prop name attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
if (valueParser_.type_ == TYPE_ERROR) {
throw css::uno::RuntimeException(
- (OUString("no prop type attribute in ") +
- reader.getUrl()),
+ "no prop type attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
elements_.push(
@@ -517,8 +502,7 @@ void XcsParser::handlePropValue(
attrSeparator = reader.getAttributeValue(false);
if (attrSeparator.length == 0) {
throw css::uno::RuntimeException(
- (OUString("bad oor:separator attribute in ") +
- reader.getUrl()),
+ "bad oor:separator attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
}
@@ -549,8 +533,7 @@ void XcsParser::handleGroup(xmlreader::XmlReader & reader, bool isTemplate) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- (OUString("no group name attribute in ") +
- reader.getUrl()),
+ "no group name attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
if (isTemplate) {
@@ -592,8 +575,7 @@ void XcsParser::handleSet(xmlreader::XmlReader & reader, bool isTemplate) {
}
if (!hasName) {
throw css::uno::RuntimeException(
- (OUString("no set name attribute in ") +
- reader.getUrl()),
+ "no set name attribute in " + reader.getUrl(),
css::uno::Reference< css::uno::XInterface >());
}
if (isTemplate) {
@@ -632,7 +614,7 @@ void XcsParser::handleSetItem(xmlreader::XmlReader & reader, SetNode * set) {
}
set->getAdditionalTemplateNames().push_back(
xmldata::parseTemplateReference(component, hasNodeType, nodeType, 0));
- elements_.push(Element(rtl::Reference< Node >(), OUString()));
+ elements_.push(Element(rtl::Reference< Node >(), ""));
}
}