[Libreoffice-commits] core.git: 13 commits - bridges/source configmgr/source cppuhelper/source cppu/source idlc/source io/source jvmaccess/source jvmfwk/plugins jvmfwk/source remotebridges/source sal/qa stoc/source testtools/source unodevtools/source
Stephan Bergmann
sbergman at redhat.com
Tue Dec 16 08:32:14 PST 2014
bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx | 6
configmgr/source/data.cxx | 4
configmgr/source/propertynode.cxx | 6
configmgr/source/xcdparser.cxx | 2
cppu/source/AffineBridge/AffineBridge.cxx | 6
cppu/source/LogBridge/LogBridge.cxx | 6
cppu/source/UnsafeBridge/UnsafeBridge.cxx | 6
cppuhelper/source/component.cxx | 3
cppuhelper/source/implbase.cxx | 6
idlc/source/astscope.cxx | 2
io/source/stm/opipe.cxx | 3
jvmaccess/source/classpath.cxx | 2
jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 11 -
jvmfwk/plugins/sunmajor/pluginlib/util.hxx | 2
jvmfwk/source/fwkbase.cxx | 5
remotebridges/source/unourl_resolver/unourl_resolver.cxx | 4
sal/qa/osl/file/osl_File.cxx | 4
sal/qa/osl/process/osl_process.cxx | 4
sal/qa/rtl/doublelock/rtl_doublelocking.cxx | 2
sal/qa/rtl/uri/rtl_testuri.cxx | 36 ++--
stoc/source/corereflection/crefl.cxx | 3
stoc/source/invocation/invocation.cxx | 5
stoc/source/invocation_adapterfactory/iafactory.cxx | 4
stoc/source/security/access_controller.cxx | 2
stoc/source/security/file_policy.cxx | 2
stoc/source/servicemanager/servicemanager.cxx | 6
stoc/source/simpleregistry/simpleregistry.cxx | 78 +++++-----
stoc/source/typeconv/convert.cxx | 4
stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx | 3
testtools/source/bridgetest/constructors.cxx | 2
testtools/source/bridgetest/multi.hxx | 10 -
unodevtools/source/skeletonmaker/cppcompskeleton.cxx | 8 -
unodevtools/source/skeletonmaker/javacompskeleton.cxx | 24 +--
unodevtools/source/skeletonmaker/skeletoncommon.cxx | 4
34 files changed, 128 insertions(+), 147 deletions(-)
New commits:
commit 102ae9f11a57a90330234e66250719b727c06d1e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:31:18 2014 +0100
unodevtools: Use appropriate OUString functions on string constants
Change-Id: I70a86543c0269cbaeefc9cbe1da30c2ad7e48333
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index d8441c7..947340c 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -51,7 +51,7 @@ void generateIncludes(std::ostream & o,
}
if (propertyhelper.getLength() > 1) {
- if (propertyhelper.equals("_"))
+ if (propertyhelper == "_")
o << "#include \"cppuhelper/rpopshlp.hxx\"\n";
else
o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";
@@ -882,7 +882,7 @@ void generateMethodBodies(std::ostream& o,
std::set< OUString >::const_iterator iter = interfaces.begin();
codemaker::GeneratedTypeSet generated;
while (iter != interfaces.end()) {
- if ( (*iter).equals("com.sun.star.lang.XServiceInfo") ) {
+ if ( *iter == "com.sun.star.lang.XServiceInfo" ) {
generateXServiceInfoBodies(o, name, comphelpernamespace);
generated.add(u2b(*iter));
} else {
@@ -930,7 +930,7 @@ void generateQueryInterface(std::ostream& o,
} else {
o << "::queryInterface(type));\n";
o << " return a.hasValue() ? a\n : (";
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "::cppu::OPropertySetHelper::queryInterface(type));\n";
} else {
o << "::cppu::PropertySetMixin<\n ";
@@ -1109,7 +1109,7 @@ void generateCalcAddin(ProgramOptions const & options,
// get the one and only add-in service for later use
std::set< OUString >::const_iterator iter2 = services.begin();
sAddinService = *iter2;
- if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
+ if (sAddinService == "com.sun.star.sheet.AddIn") {
sAddinService = *(++iter2);
}
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 8edb92c..4ba2e99 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -52,14 +52,14 @@ void generateImports(std::ostream & o, ProgramOptions const & options,
o << "import com.sun.star.registry.XRegistryKey;\n";
}
- if (!propertyhelper.equals("_")) {
+ if (propertyhelper != "_") {
if (supportxcomponent)
o << "import com.sun.star.lib.uno.helper.ComponentBase;\n";
else
o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
}
if (!propertyhelper.isEmpty()) {
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
o << "import com.sun.star.beans.PropertyAttribute;\n";
} else {
@@ -503,18 +503,18 @@ void generateMethodBodies(std::ostream& o,
while (iter != interfaces.end()) {
OUString type(*iter);
++iter;
- if (type.equals("com.sun.star.lang.XServiceInfo")) {
+ if (type == "com.sun.star.lang.XServiceInfo") {
generateXServiceInfoBodies(o);
generated.add(u2b(type));
} else {
if (options.componenttype == 2) {
- if (type.equals("com.sun.star.lang.XServiceName")) {
+ if (type == "com.sun.star.lang.XServiceName") {
o << " // com.sun.star.lang.XServiceName:\n"
" public String getServiceName() {\n"
" return sADDIN_SERVICENAME;\n }\n";
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.sheet.XAddIn")) {
+ } else if (type == "com.sun.star.sheet.XAddIn") {
generateXAddInBodies(o, options);
generated.add(u2b(type));
@@ -524,26 +524,26 @@ void generateMethodBodies(std::ostream& o,
generated.add("com.sun.star.lang.XLocalizable");
}
continue;
- } else if (type.equals("com.sun.star.lang.XLocalizable")) {
+ } else if (type == "com.sun.star.lang.XLocalizable") {
generateXLocalizableBodies(o);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.sheet.XCompatibilityNames")) {
+ } else if (type == "com.sun.star.sheet.XCompatibilityNames") {
generateXCompatibilityNamesBodies(o);
generated.add(u2b(type));
continue;
}
}
if (options.componenttype == 3) {
- if (type.equals("com.sun.star.lang.XInitialization")) {
+ if (type == "com.sun.star.lang.XInitialization") {
generateXInitializationBodies(o);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.frame.XDispatch")) {
+ } else if (type == "com.sun.star.frame.XDispatch") {
generateXDispatchBodies(o, options);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.frame.XDispatchProvider")) {
+ } else if (type == "com.sun.star.frame.XDispatchProvider") {
generateXDispatchProviderBodies(o, options);
generated.add(u2b(type));
continue;
@@ -712,7 +712,7 @@ void generateClassDefinition(std::ostream& o,
o << "\n\npublic final class " << classname << " extends ";
if (!interfaces.empty()) {
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "PropertySet\n";
} else {
if (supportxcomponent)
@@ -791,7 +791,7 @@ void generateClassDefinition(std::ostream& o,
} else {
o << "\n public " << classname << "( XComponentContext context )\n"
" {\n m_xContext = context;\n";
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
registerProperties(o, properties, " ");
} else {
if (propertyhelper.getLength() > 1) {
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 2d1ead5..3569638 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -279,7 +279,7 @@ void checkDefaultInterfaces(
interfaces.insert("com.sun.star.lang.XServiceInfo");
}
- if ( propertyhelper.equals("_") ) {
+ if ( propertyhelper == "_" ) {
interfaces.erase("com.sun.star.beans.XPropertySet");
interfaces.erase("com.sun.star.beans.XFastPropertySet");
interfaces.erase("com.sun.star.beans.XPropertyAccess");
@@ -406,7 +406,7 @@ bool checkXComponentSupport(rtl::Reference< TypeManager > const & manager,
std::set< OUString >::const_iterator iter = interfaces.begin();
while ( iter != interfaces.end() ) {
- if ( (*iter).equals("com.sun.star.lang.XComponent") ) {
+ if ( *iter == "com.sun.star.lang.XComponent" ) {
interfaces.erase("com.sun.star.lang.XComponent");
return true;
}
commit a11c68174b464317d34409a4171427843680b9c9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:30:51 2014 +0100
testtools: Use appropriate OUString functions on string constants
Change-Id: Iacc67a087321e9cf0f699f4eecb334eb7372b885
diff --git a/testtools/source/bridgetest/constructors.cxx b/testtools/source/bridgetest/constructors.cxx
index 37135da..423306a 100644
--- a/testtools/source/bridgetest/constructors.cxx
+++ b/testtools/source/bridgetest/constructors.cxx
@@ -431,7 +431,7 @@ void Impl2::setatt1( double _att1 )throw (::com::sun::star::uno::RuntimeExceptio
OUString Impl2::fn12( const OUString& arg )
throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- return OUString("12") + arg;
+ return "12" + arg;
}
css::uno::Reference< css::uno::XInterface > SAL_CALL create(
diff --git a/testtools/source/bridgetest/multi.hxx b/testtools/source/bridgetest/multi.hxx
index 0b0ca68..055d09c 100644
--- a/testtools/source/bridgetest/multi.hxx
+++ b/testtools/source/bridgetest/multi.hxx
@@ -50,7 +50,7 @@ public:
virtual OUString SAL_CALL fn12(OUString const & arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return OUString("12") + arg; }
+ { return "12" + arg; }
virtual sal_Int32 SAL_CALL fn21(sal_Int32 arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -58,7 +58,7 @@ public:
virtual OUString SAL_CALL fn22(OUString const & arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return OUString("22") + arg; }
+ { return "22" + arg; }
virtual double SAL_CALL getatt3()
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -74,7 +74,7 @@ public:
virtual OUString SAL_CALL fn32(OUString const & arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return OUString("32") + arg; }
+ { return "32" + arg; }
virtual sal_Int32 SAL_CALL fn33()
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -90,7 +90,7 @@ public:
virtual OUString SAL_CALL fn62(OUString const & arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return OUString("62") + arg; }
+ { return "62" + arg; }
virtual sal_Int32 SAL_CALL fn71(sal_Int32 arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
@@ -98,7 +98,7 @@ public:
virtual OUString SAL_CALL fn72(OUString const & arg)
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
- { return OUString("72") + arg; }
+ { return "72" + arg; }
virtual sal_Int32 SAL_CALL fn73()
throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
commit bc909149fdb3256b80367cd6e55378406ec8d979
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:30:34 2014 +0100
stoc: Use appropriate OUString functions on string constants
Change-Id: If8c20c8a0958016c14007406244fc8ab9a742933
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 87c4e86..23089fb 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -44,13 +44,12 @@ namespace stoc_corefl
static const sal_Int32 CACHE_SIZE = 256;
-#define SERVICENAME "com.sun.star.reflection.CoreReflection"
#define IMPLNAME "com.sun.star.comp.stoc.CoreReflection"
static Sequence< OUString > core_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString( SERVICENAME );
+ seqNames.getArray()[0] = "com.sun.star.reflection.CoreReflection";
return seqNames;
}
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index 8f0a543..a928f5b 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -523,8 +523,7 @@ Any Invocation_Impl::getValue( const OUString& PropertyName )
{
}
- throw UnknownPropertyException(
- OUString("cannot get value ") + PropertyName );
+ throw UnknownPropertyException( "cannot get value " + PropertyName );
}
@@ -621,7 +620,7 @@ Any Invocation_Impl::invoke( const OUString& FunctionName, const Sequence<Any>&
if (nFParamsLen != InParams.getLength())
{
throw IllegalArgumentException(
- OUString("incorrect number of parameters passed invoking function ") + FunctionName,
+ "incorrect number of parameters passed invoking function " + FunctionName,
(OWeakObject *) this, (sal_Int16) 1 );
}
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index c35cca4..c3bdf2f 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/reflection/InvocationTargetException.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
-#define SERVICENAME "com.sun.star.script.InvocationAdapterFactory"
#define IMPLNAME "com.sun.star.comp.stoc.InvocationAdapterFactory"
@@ -63,8 +62,7 @@ namespace stoc_invadp
static Sequence< OUString > invadp_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] =
- OUString(SERVICENAME);
+ seqNames.getArray()[0] = "com.sun.star.script.InvocationAdapterFactory";
return seqNames;
}
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 71b54df..4fc3de1 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -945,7 +945,7 @@ Sequence< OUString > AccessController::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
Sequence< OUString > aSNS( 1 );
- aSNS[0] = OUString(SERVICE_NAME);
+ aSNS[0] = SERVICE_NAME;
return aSNS;
}
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index 90ddd78..b26806f 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -510,7 +510,7 @@ Sequence< OUString > FilePolicy::getSupportedServiceNames()
throw (RuntimeException, std::exception)
{
Sequence< OUString > aSNS( 1 );
- aSNS[0] = OUString("com.sun.star.security.Policy");
+ aSNS[0] = "com.sun.star.security.Policy";
return aSNS;
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index ca2ab6a..9641332 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -776,7 +776,7 @@ void OServiceManager::setPropertyValue(
else
{
throw UnknownPropertyException(
- OUString("unknown property ") + PropertyName,
+ "unknown property " + PropertyName,
(OWeakObject *)this );
}
}
@@ -1238,8 +1238,8 @@ void OServiceManager::remove( const Any & Element )
if (iFind == m_ImplementationNameMap.end())
{
throw NoSuchElementException(
- OUString("element is not in: ")
- + implName, static_cast< OWeakObject * >(this) );
+ "element is not in: " + implName,
+ static_cast< OWeakObject * >(this) );
}
xEle = iFind->second;
}
diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx
index 56f4dac..3a038f3 100644
--- a/stoc/source/simpleregistry/simpleregistry.cxx
+++ b/stoc/source/simpleregistry/simpleregistry.cxx
@@ -272,8 +272,8 @@ css::registry::RegistryKeyType Key::getKeyType(OUString const & rKeyName)
RegError err = key_.getKeyType(rKeyName, &type);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getKeyType:"
- " underlying RegistryKey::getKeyType() = ") +
+ ("com.sun.star.registry.SimpleRegistry key getKeyType:"
+ " underlying RegistryKey::getKeyType() = " +
OUString::number(err)),
static_cast< OWeakObject * >(this));
}
@@ -303,7 +303,7 @@ css::registry::RegistryValueType Key::getValueType()
break;
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getValueType:"
+ (("com.sun.star.registry.SimpleRegistry key getValueType:"
" underlying RegistryKey::getValueInfo() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -348,7 +348,7 @@ sal_Int32 Key::getLongValue() throw (
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getLongValue:"
+ (("com.sun.star.registry.SimpleRegistry key getLongValue:"
" underlying RegistryKey::getValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -364,7 +364,7 @@ void Key::setLongValue(sal_Int32 value)
OUString(), RG_VALUETYPE_LONG, &value, sizeof (sal_Int32));
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key setLongValue:"
+ (("com.sun.star.registry.SimpleRegistry key setLongValue:"
" underlying RegistryKey::setValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -391,7 +391,7 @@ css::uno::Sequence< sal_Int32 > Key::getLongListValue() throw (
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getLongListValue:"
+ (("com.sun.star.registry.SimpleRegistry key getLongListValue:"
" underlying RegistryKey::getLongListValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -423,7 +423,7 @@ void Key::setLongListValue(css::uno::Sequence< sal_Int32 > const & seqValue)
static_cast< sal_uInt32 >(list.size()));
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key setLongListValue:"
+ (("com.sun.star.registry.SimpleRegistry key setLongListValue:"
" underlying RegistryKey::setLongListValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -440,14 +440,14 @@ OUString Key::getAsciiValue() throw (
RegError err = key_.getValueInfo(OUString(), &type, &size);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ (("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
" underlying RegistryKey::getValueInfo() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
}
if (type != RG_VALUETYPE_STRING) {
throw css::registry::InvalidValueException(
- (OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ (("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
" underlying RegistryKey type = ") +
OUString::number(type)),
static_cast< OWeakObject * >(this));
@@ -470,7 +470,7 @@ OUString Key::getAsciiValue() throw (
err = key_.getValue(OUString(), &list[0]);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
+ (("com.sun.star.registry.SimpleRegistry key getAsciiValue:"
" underlying RegistryKey::getValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -519,7 +519,7 @@ void Key::setAsciiValue(OUString const & value)
// +1 for terminating null (error in underlying registry.cxx)
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key setAsciiValue:"
+ (("com.sun.star.registry.SimpleRegistry key setAsciiValue:"
" underlying RegistryKey::setValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -546,7 +546,7 @@ css::uno::Sequence< OUString > Key::getAsciiListValue() throw (
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key"
+ (("com.sun.star.registry.SimpleRegistry key"
" getAsciiListValue: underlying"
" RegistryKey::getStringListValue() = ") +
OUString::number(err)),
@@ -612,7 +612,7 @@ void Key::setAsciiListValue(
static_cast< sal_uInt32 >(list2.size()));
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key"
+ (("com.sun.star.registry.SimpleRegistry key"
" setAsciiListValue: underlying"
" RegistryKey::setStringListValue() = ") +
OUString::number(err)),
@@ -630,14 +630,14 @@ OUString Key::getStringValue() throw (
RegError err = key_.getValueInfo(OUString(), &type, &size);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
+ (("com.sun.star.registry.SimpleRegistry key getStringValue:"
" underlying RegistryKey::getValueInfo() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
}
if (type != RG_VALUETYPE_UNICODE) {
throw css::registry::InvalidValueException(
- (OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
+ (("com.sun.star.registry.SimpleRegistry key getStringValue:"
" underlying RegistryKey type = ") +
OUString::number(type)),
static_cast< OWeakObject * >(this));
@@ -661,7 +661,7 @@ OUString Key::getStringValue() throw (
err = key_.getValue(OUString(), &list[0]);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getStringValue:"
+ (("com.sun.star.registry.SimpleRegistry key getStringValue:"
" underlying RegistryKey::getValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -687,7 +687,7 @@ void Key::setStringValue(OUString const & value)
// +1 for terminating null (error in underlying registry.cxx)
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key setStringValue:"
+ (("com.sun.star.registry.SimpleRegistry key setStringValue:"
" underlying RegistryKey::setValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -714,7 +714,7 @@ css::uno::Sequence< OUString > Key::getStringListValue() throw (
static_cast< OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key"
+ (("com.sun.star.registry.SimpleRegistry key"
" getStringListValue: underlying"
" RegistryKey::getUnicodeListValue() = ") +
OUString::number(err)),
@@ -749,7 +749,7 @@ void Key::setStringListValue(
static_cast< sal_uInt32 >(list.size()));
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key"
+ (("com.sun.star.registry.SimpleRegistry key"
" setStringListValue: underlying"
" RegistryKey::setUnicodeListValue() = ") +
OUString::number(err)),
@@ -768,14 +768,14 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue()
RegError err = key_.getValueInfo(OUString(), &type, &size);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
+ (("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
" underlying RegistryKey::getValueInfo() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
}
if (type != RG_VALUETYPE_BINARY) {
throw css::registry::InvalidValueException(
- (OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
+ (("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
" underlying RegistryKey type = ") +
OUString::number(type)),
static_cast< OWeakObject * >(this));
@@ -790,7 +790,7 @@ css::uno::Sequence< sal_Int8 > Key::getBinaryValue()
err = key_.getValue(OUString(), value.getArray());
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
+ (("com.sun.star.registry.SimpleRegistry key getBinaryValue:"
" underlying RegistryKey::getValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -808,7 +808,7 @@ void Key::setBinaryValue(css::uno::Sequence< sal_Int8 > const & value)
static_cast< sal_uInt32 >(value.getLength()));
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key setBinaryValue:"
+ (("com.sun.star.registry.SimpleRegistry key setBinaryValue:"
" underlying RegistryKey::setValue() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -829,7 +829,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::openKey(
return css::uno::Reference< css::registry::XRegistryKey >();
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key openKey:"
+ (("com.sun.star.registry.SimpleRegistry key openKey:"
" underlying RegistryKey::openKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -850,7 +850,7 @@ css::uno::Reference< css::registry::XRegistryKey > Key::createKey(
return css::uno::Reference< css::registry::XRegistryKey >();
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key createKey:"
+ (("com.sun.star.registry.SimpleRegistry key createKey:"
" underlying RegistryKey::createKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -864,7 +864,7 @@ void Key::closeKey()
RegError err = key_.closeKey();
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key closeKey:"
+ (("com.sun.star.registry.SimpleRegistry key closeKey:"
" underlying RegistryKey::closeKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -878,7 +878,7 @@ void Key::deleteKey(OUString const & rKeyName)
RegError err = key_.deleteKey(rKeyName);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key deleteKey:"
+ (("com.sun.star.registry.SimpleRegistry key deleteKey:"
" underlying RegistryKey::deleteKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -894,7 +894,7 @@ Key::openKeys()
RegError err = key_.openSubKeys(OUString(), list);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key openKeys:"
+ (("com.sun.star.registry.SimpleRegistry key openKeys:"
" underlying RegistryKey::openSubKeys() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -923,7 +923,7 @@ css::uno::Sequence< OUString > Key::getKeyNames()
RegError err = key_.getKeyNames(OUString(), list);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getKeyNames:"
+ (("com.sun.star.registry.SimpleRegistry key getKeyNames:"
" underlying RegistryKey::getKeyNames() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -954,7 +954,7 @@ sal_Bool Key::createLink(
case REG_INVALID_KEY:
case REG_DETECT_RECURSION:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key createLink:"
+ (("com.sun.star.registry.SimpleRegistry key createLink:"
" underlying RegistryKey::createLink() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -970,7 +970,7 @@ void Key::deleteLink(OUString const & rLinkName)
RegError err = key_.deleteLink(rLinkName);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key deleteLink:"
+ (("com.sun.star.registry.SimpleRegistry key deleteLink:"
" underlying RegistryKey::deleteLink() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -985,7 +985,7 @@ OUString Key::getLinkTarget(OUString const & rLinkName)
RegError err = key_.getLinkTarget(rLinkName, target);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getLinkTarget:"
+ (("com.sun.star.registry.SimpleRegistry key getLinkTarget:"
" underlying RegistryKey::getLinkTarget() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -1001,7 +1001,7 @@ OUString Key::getResolvedName(OUString const & aKeyName)
RegError err = key_.getResolvedKeyName(aKeyName, true, resolved);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry key getResolvedName:"
+ (("com.sun.star.registry.SimpleRegistry key getResolvedName:"
" underlying RegistryKey::getResolvedName() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -1027,9 +1027,9 @@ void SimpleRegistry::open(
}
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry.open(") +
+ ("com.sun.star.registry.SimpleRegistry.open(" +
rURL +
- OUString("): underlying Registry::open/create() = ") +
+ "): underlying Registry::open/create() = " +
OUString::number(err)),
static_cast< OWeakObject * >(this));
}
@@ -1047,7 +1047,7 @@ void SimpleRegistry::close()
RegError err = registry_.close();
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry.close:"
+ (("com.sun.star.registry.SimpleRegistry.close:"
" underlying Registry::close() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -1061,7 +1061,7 @@ void SimpleRegistry::destroy()
RegError err = registry_.destroy(OUString());
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry.destroy:"
+ (("com.sun.star.registry.SimpleRegistry.destroy:"
" underlying Registry::destroy() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -1076,7 +1076,7 @@ css::uno::Reference< css::registry::XRegistryKey > SimpleRegistry::getRootKey()
RegError err = registry_.openRootKey(root);
if (err != REG_NO_ERROR) {
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry.getRootKey:"
+ (("com.sun.star.registry.SimpleRegistry.getRootKey:"
" underlying Registry::getRootKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
@@ -1114,7 +1114,7 @@ void SimpleRegistry::mergeKey(
static_cast< cppu::OWeakObject * >(this));
default:
throw css::registry::InvalidRegistryException(
- (OUString("com.sun.star.registry.SimpleRegistry.mergeKey:"
+ (("com.sun.star.registry.SimpleRegistry.mergeKey:"
" underlying Registry::getRootKey/mergeKey() = ") +
OUString::number(err)),
static_cast< OWeakObject * >(this));
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 6e10a0c..182c030 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -50,7 +50,7 @@ using namespace css::script;
using namespace css::registry;
using namespace cppu;
using namespace osl;
-#define SERVICENAME "com.sun.star.script.Converter"
+
#define IMPLNAME "com.sun.star.comp.stoc.TypeConverter"
namespace stoc_services
@@ -58,7 +58,7 @@ namespace stoc_services
Sequence< OUString > tcv_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(SERVICENAME);
+ seqNames.getArray()[0] = "com.sun.star.script.Converter";
return seqNames;
}
diff --git a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
index e315095..777651a 100644
--- a/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
+++ b/stoc/source/uriproc/UriSchemeParser_vndDOTsunDOTstarDOTexpand.cxx
@@ -230,8 +230,7 @@ OUString getImplementationName() {
css::uno::Sequence< OUString > getSupportedServiceNames() {
css::uno::Sequence< OUString > s(1);
- s[0] = OUString(
- "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand");
+ s[0] = "com.sun.star.uri.UriSchemeParser_vndDOTsunDOTstarDOTexpand";
return s;
}
commit 9b03a827b2955edf5dc726d498276c4f94639c8d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:30:08 2014 +0100
sal: Use appropriate OUString functions on string constants
Change-Id: I4382504549eb1e3a8c34495a21d6df10a86ac23b
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index fdf44a0..e573d4a 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -572,9 +572,9 @@ namespace osl_FileBase
void getAbsoluteFileURL::getAbsoluteFileURL_004()
{
//create two level directories under $Temp/PID/
- ::rtl::OUString aUStrUpBase = aUserDirectoryURL + ::rtl::OUString("/test1");
+ ::rtl::OUString aUStrUpBase = aUserDirectoryURL + "/test1";
createTestDirectory( aUStrUpBase );
- ::rtl::OUString aUStrBase = aUserDirectoryURL + ::rtl::OUString("/test1/dir1");
+ ::rtl::OUString aUStrBase = aUserDirectoryURL + "/test1/dir1";
createTestDirectory( aUStrBase );
::rtl::OUString suAssume = aUserDirectoryURL.concat( ::rtl::OUString("/mytestfile") );
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 07731e8..5a5e8a8 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -439,9 +439,9 @@ public:
{
oslProcess process;
#if defined(WNT)
- rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.bat");
+ rtl::OUString suBatch = suCWD + "/batch.bat";
#else
- rtl::OUString suBatch = suCWD + rtl::OUString("/") + rtl::OUString("batch.sh");
+ rtl::OUString suBatch = suCWD + "/batch.sh";
#endif
oslProcessError osl_error = osl_executeProcess(
suBatch.pData,
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 6c4227e..79451cc 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -92,7 +92,7 @@ public:
:m_nOK(0),
m_nFails(0)
{
- m_sConstStr = rtl::OUString( CONST_TEST_STRING );
+ m_sConstStr = CONST_TEST_STRING;
}
sal_Int32 getOK() { return m_nOK; }
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index d798a85..e92afe5 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -188,8 +188,7 @@ void Test::test_Uri() {
aBuffer.append(static_cast< sal_Unicode >(0xDFFF)); // %ED%BF%BF
aBuffer.append('A'); // A
aText1 = aBuffer.makeStringAndClear();
- aText2 = rtl::OUString(
- "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A");
+ aText2 = "%ED%A0%80" "%F0%90%8F%BF" "%ED%BF%BF" "A";
CPPUNIT_ASSERT_MESSAGE(
"failure 11",
(rtl::Uri::encode(
@@ -209,8 +208,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8)
== aText2));
- aText1 = rtl::OUString(
- "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A");
+ aText1 = "%ed%a0%80" "%f0%90%8f%bf" "%ed%bf%bf" "A";
aBuffer.append("%ED%A0%80");
aBuffer.append(static_cast< sal_Unicode >(0xD800));
aBuffer.append(static_cast< sal_Unicode >(0xDFFF));
@@ -229,7 +227,7 @@ void Test::test_Uri() {
// Check UTF-8 handling:
- aText1 = rtl::OUString("%E0%83%BF");
+ aText1 = "%E0%83%BF";
// \U+00FF encoded with three instead of two bytes
aText2 = aText1;
CPPUNIT_ASSERT_MESSAGE(
@@ -239,7 +237,7 @@ void Test::test_Uri() {
RTL_TEXTENCODING_UTF8)
== aText2));
- aText1 = rtl::OUString("%EF%BF%BF");
+ aText1 = "%EF%BF%BF";
// \U+FFFF is no legal character
aText2 = aText1;
CPPUNIT_ASSERT_MESSAGE(
@@ -251,7 +249,7 @@ void Test::test_Uri() {
// Check IURI handling:
- aText1 = rtl::OUString("%30%C3%BF");
+ aText1 = "%30%C3%BF";
aBuffer.append("%30");
aBuffer.append(static_cast< sal_Unicode >(0x00FF));
aText2 = aBuffer.makeStringAndClear();
@@ -262,8 +260,8 @@ void Test::test_Uri() {
// Check modified rtl_UriCharClassUnoParamValue (removed '[' and ']'):
- aText1 = rtl::OUString("[]%5B%5D");
- aText2 = rtl::OUString("%5B%5D%5B%5D");
+ aText1 = "[]%5B%5D";
+ aText2 = "%5B%5D%5B%5D";
CPPUNIT_ASSERT_MESSAGE(
"failure 19",
(rtl::Uri::encode(
@@ -367,7 +365,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { ' ', '!', 0x0401, 0x045F, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%20!%A1%FF");
+ aText2 = "%20!%A1%FF";
CPPUNIT_ASSERT_MESSAGE(
"failure 20",
(rtl::Uri::encode(
@@ -402,7 +400,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { ' ', '!', 0x028A, 0xD849, 0xDD13, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%20!%81%30%B1%33%95%39%C5%37");
+ aText2 = "%20!%81%30%B1%33%95%39%C5%37";
CPPUNIT_ASSERT_MESSAGE(
"failure 22",
(rtl::Uri::encode(
@@ -430,7 +428,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%20%C4%80%FF");
+ aText1 = "%20%C4%80%FF";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 24",
@@ -440,7 +438,7 @@ void Test::test_Uri() {
}
#if WITH_LOCALE_ALL || WITH_LOCALE_zh
{
- aText1 = rtl::OUString("%81 ");
+ aText1 = "%81 ";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 25",
@@ -449,7 +447,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%81%20");
+ aText1 = "%81%20";
aText2 = rtl::OUString();
CPPUNIT_ASSERT_MESSAGE(
"failure 26",
@@ -458,7 +456,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%81%30%B1%33");
+ aText1 = "%81%30%B1%33";
sal_Unicode const aText2U[] = { 0x028A, 0 };
aText2 = rtl::OUString(aText2U);
CPPUNIT_ASSERT_MESSAGE(
@@ -468,7 +466,7 @@ void Test::test_Uri() {
== aText2));
}
{
- aText1 = rtl::OUString("%810%B13");
+ aText1 = "%810%B13";
sal_Unicode const aText2U[] = { 0x028A, 0 };
aText2 = rtl::OUString(aText2U);
CPPUNIT_ASSERT_MESSAGE(
@@ -481,8 +479,8 @@ void Test::test_Uri() {
// Check rtl_UriEncodeStrictKeepEscapes mode:
{
- aText1 = rtl::OUString("%%ea%c3%aa");
- aText2 = rtl::OUString("%25%EA%C3%AA");
+ aText1 = "%%ea%c3%aa";
+ aText2 = "%25%EA%C3%AA";
CPPUNIT_ASSERT_MESSAGE(
"failure 29",
(rtl::Uri::encode(
@@ -493,7 +491,7 @@ void Test::test_Uri() {
{
sal_Unicode const aText1U[] = { 0x00EA, 0 };
aText1 = rtl::OUString(aText1U);
- aText2 = rtl::OUString("%C3%AA");
+ aText2 = "%C3%AA";
CPPUNIT_ASSERT_MESSAGE(
"failure 30",
(rtl::Uri::encode(
commit 7fbdb69c6ba160ad0835542736a5def07f0c642e
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:29:49 2014 +0100
remotebridges: Use appropriate OUString functions on string constants
Change-Id: I3f860dbcac3c81216d53de1530ddb0565e38a38e
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index e4fefad..9468392 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -42,8 +42,6 @@ using namespace com::sun::star::connection;
using namespace com::sun::star::bridge;
using namespace com::sun::star::registry;
-
-#define SERVICENAME "com.sun.star.bridge.UnoUrlResolver"
#define IMPLNAME "com.sun.star.comp.bridge.UnoUrlResolver"
namespace unourl_resolver
@@ -52,7 +50,7 @@ namespace unourl_resolver
Sequence< OUString > resolver_getSupportedServiceNames()
{
Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(SERVICENAME);
+ seqNames.getArray()[0] = "com.sun.star.bridge.UnoUrlResolver";
return seqNames;
}
commit f582ad2c696dfd2fc7f43b70d9afab7877974b7b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:29:29 2014 +0100
jvmfwk: Use appropriate OUString functions on string constants
Change-Id: I3e0b70c61c4e92f2cbd27ce7c45e67ae04dfe14c
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 7ea4d1b..d79ed47 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -946,8 +946,7 @@ rtl::Reference<VendorBase> getJREInfoByPath(
if (path.getLength() == sizeof("file:///") - 1)
sFullPath = sResolvedDir + (*i);
else
- sFullPath = sResolvedDir +
- OUString("/") + (*i);
+ sFullPath = sResolvedDir + "/" + (*i);
sFilePath = resolveFilePath(sFullPath);
@@ -1103,8 +1102,6 @@ void addJavaInfosFromPath(
{
#if !defined JVM_ONE_PATH_CHECK
// Get Java from PATH environment variable
- static const char sCurDir[] = ".";
- static const char sParentDir[] = "..";
char *szPath= getenv("PATH");
if(szPath)
{
@@ -1119,15 +1116,13 @@ void addJavaInfosFromPath(
if(!usTokenUrl.isEmpty())
{
OUString usBin;
- // "."
- if(usTokenUrl.equals(sCurDir))
+ if(usTokenUrl == ".")
{
OUString usWorkDirUrl;
if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDirUrl.pData))
usBin= usWorkDirUrl;
}
- // ".."
- else if(usTokenUrl.equals(sParentDir))
+ else if(usTokenUrl == "..")
{
OUString usWorkDir;
if(osl_Process_E_None == osl_getProcessWorkingDir(&usWorkDir.pData))
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
index ffe07c2..456cfd7 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.hxx
@@ -84,7 +84,7 @@ struct SameOrSubDirJREMap
if (s1 == s2.first)
return true;
OUString sSub;
- sSub = s2.first + OUString("/");
+ sSub = s2.first + "/";
if (s1.match(sSub))
return true;
return false;
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 95d7f3f..548bed4 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -232,7 +232,7 @@ std::vector<OUString> VendorSettings::getSupportedVendors()
for (sal_Int32 i = 1; ; i++)
{
- OUString sName = OUString(UNO_JAVA_JFW_PARAMETER) + OUString::number(i);
+ OUString sName = UNO_JAVA_JFW_PARAMETER + OUString::number(i);
OUString sValue;
if (Bootstrap::get()->getFrom(sName, sValue))
{
@@ -436,8 +436,7 @@ JFW_MODE getMode()
OUString sEnvClasspath(UNO_JAVA_JFW_ENV_CLASSPATH);
if (!aBoot->getFrom(sEnvClasspath, sValue))
{
- OUString sParams = OUString(
- UNO_JAVA_JFW_PARAMETER) +
+ OUString sParams = UNO_JAVA_JFW_PARAMETER +
OUString::number(1);
if (!aBoot->getFrom(sParams, sValue))
{
commit 43e889da0229ee62774f9d359f48046682295402
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:29:05 2014 +0100
jvmaccess: Use appropriate OUString functions on string constants
Change-Id: I57b6de337eae1dcd8bc08f51ba9be36b61d5c470
diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx
index bcbfce1..d01e9ce 100644
--- a/jvmaccess/source/classpath.cxx
+++ b/jvmaccess/source/classpath.cxx
@@ -68,7 +68,7 @@ void * ::jvmaccess::ClassPath::doTranslateToUrls(
url = expUrl->expand( expander );
} catch (const css::lang::IllegalArgumentException & e) {
throw css::uno::RuntimeException(
- OUString("com.sun.star.lang.IllegalArgumentException: ")
+ "com.sun.star.lang.IllegalArgumentException: "
+ e.Message);
}
}
commit e7d6a1d238b16d1e9de0308a9c9ad35e6d30bcee
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:28:43 2014 +0100
io: Use appropriate OUString functions on string constants
Change-Id: Ib05e759a1223d71e738940f6f9298ac593d94a27
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index d40f55d..8f4f952 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -47,7 +47,6 @@ using namespace ::com::sun::star::lang;
// Implementation and service names
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.stm.Pipe"
-#define SERVICE_NAME "com.sun.star.io.Pipe"
namespace io_stm{
@@ -447,7 +446,7 @@ OUString OPipeImpl_getImplementationName()
Sequence<OUString> OPipeImpl_getSupportedServiceNames(void)
{
Sequence<OUString> aRet(1);
- aRet.getArray()[0] = OUString( SERVICE_NAME );
+ aRet.getArray()[0] = "com.sun.star.io.Pipe";
return aRet;
}
}
commit 500910feff50c07ae8335c8fcb0564936bb175a9
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:28:22 2014 +0100
idlc: Use appropriate OUString functions on string constants
Change-Id: Ia537f5d5d573d24f5bbed7a20b9e9268181faa5f
diff --git a/idlc/source/astscope.cxx b/idlc/source/astscope.cxx
index c57d14c..e7f030e 100644
--- a/idlc/source/astscope.cxx
+++ b/idlc/source/astscope.cxx
@@ -179,7 +179,7 @@ AstDeclaration* AstScope::lookupByName(const OString& scopedName)
{
// last try if is not the global scope and the scopeName isn't specify global too
pDecl = scopeAsDecl(this);
- if ( pDecl && (pDecl->getLocalName() != "") )
+ if ( pDecl && !pDecl->getLocalName().isEmpty() )
{
pScope = pDecl->getScope();
if ( pScope )
commit f1373539043d9040b68e44500d12cfa20126f6d3
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:27:57 2014 +0100
cppuhelper: Use appropriate OUString functions on string constants
Change-Id: I52a38a07982801087903817ec5b65e992a1d58d1
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index 361dba0..2c34da0 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -197,8 +197,7 @@ void OComponentHelper::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString("unexpected UNO exception caught: ") +
- exc.Message );
+ "unexpected UNO exception caught: " + exc.Message );
}
}
else
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index aa75e9e..f42047c 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -128,8 +128,7 @@ void WeakComponentImplHelperBase::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString("unexpected UNO exception caught: ") +
- exc.Message );
+ "unexpected UNO exception caught: " + exc.Message );
}
}
}
@@ -261,8 +260,7 @@ void WeakAggComponentImplHelperBase::dispose()
catch (Exception & exc)
{
throw RuntimeException(
- OUString("unexpected UNO exception caught: ") +
- exc.Message );
+ "unexpected UNO exception caught: " + exc.Message );
}
}
}
commit a1a8654c853372aad3546cbc5d31aaea705809a7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:27:35 2014 +0100
cppu: Use appropriate OUString functions on string constants
Change-Id: Id1d763c83821b7af6c541cb28ff438765026ea4d
diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx
index a6cc4b7..c340282 100644
--- a/cppu/source/AffineBridge/AffineBridge.cxx
+++ b/cppu/source/AffineBridge/AffineBridge.cxx
@@ -330,18 +330,18 @@ bool AffineBridge::v_isValid(rtl::OUString * pReason)
{
bool result = m_enterCount > 0;
if (!result)
- *pReason = rtl::OUString("not entered");
+ *pReason = "not entered";
else
{
result = m_innerThreadId == osl::Thread::getCurrentIdentifier();
if (!result)
- *pReason = rtl::OUString("wrong thread");
+ *pReason = "wrong thread";
}
if (result)
- *pReason = rtl::OUString("OK");
+ *pReason = "OK";
return result;
}
diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx
index 709946e..3a8f035 100644
--- a/cppu/source/LogBridge/LogBridge.cxx
+++ b/cppu/source/LogBridge/LogBridge.cxx
@@ -112,18 +112,18 @@ bool LogBridge::v_isValid(rtl::OUString * pReason)
bool result = m_count > 0;
if (!result)
{
- *pReason = rtl::OUString("not entered");
+ *pReason = "not entered";
}
else
{
result = m_threadId == osl::Thread::getCurrentIdentifier();
if (!result)
- *pReason = rtl::OUString("wrong thread");
+ *pReason = "wrong thread";
}
if (result)
- *pReason = rtl::OUString("OK");
+ *pReason = "OK";
return result;
}
diff --git a/cppu/source/UnsafeBridge/UnsafeBridge.cxx b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
index 7483bbd..b51f178 100644
--- a/cppu/source/UnsafeBridge/UnsafeBridge.cxx
+++ b/cppu/source/UnsafeBridge/UnsafeBridge.cxx
@@ -123,18 +123,18 @@ bool UnsafeBridge::v_isValid(rtl::OUString * pReason)
bool result = m_count > 0;
if (!result)
{
- *pReason = rtl::OUString("not entered");
+ *pReason = "not entered";
}
else
{
result = m_threadId == osl::Thread::getCurrentIdentifier();
if (!result)
- *pReason = rtl::OUString("wrong thread");
+ *pReason = "wrong thread";
}
if (result)
- *pReason = rtl::OUString("OK");
+ *pReason = "OK";
return result;
}
commit 0e7804b8978e106d08d026fd959714a8094b2403
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:27:07 2014 +0100
configmgr: Use appropriate OUString functions on string constants
Change-Id: I7345234957aab62e884c0e884ac0b3b8a21e9cc5
diff --git a/configmgr/source/data.cxx b/configmgr/source/data.cxx
index 2383940..e322b10 100644
--- a/configmgr/source/data.cxx
+++ b/configmgr/source/data.cxx
@@ -127,7 +127,7 @@ sal_Int32 Data::parseSegment(
}
if (templateName != 0) {
if (i - index == 1 && path[index] == '*') {
- *templateName = "";
+ templateName->clear();
} else {
*templateName = path.copy(index, i - index);
}
@@ -245,7 +245,7 @@ rtl::Reference< Node > Data::resolvePathRepresentation(
return p;
}
parent = p;
- templateName = "";
+ templateName.clear();
n = parseSegment(
pathRepresentation, n, &seg, &setElement, &templateName);
if (n == -1) {
diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx
index acc3577..967a105 100644
--- a/configmgr/source/propertynode.cxx
+++ b/configmgr/source/propertynode.cxx
@@ -56,7 +56,7 @@ css::uno::Any PropertyNode::getValue(Components & components) {
if (val.IsPresent) {
value_ = val.Value; //TODO: check value type
}
- externalDescriptor_ = ""; // must not throw
+ externalDescriptor_.clear(); // must not throw
}
SAL_WARN_IF(
!(value_.hasValue() || nillable_), "configmgr",
@@ -67,13 +67,13 @@ css::uno::Any PropertyNode::getValue(Components & components) {
void PropertyNode::setValue(int layer, css::uno::Any const & value) {
setLayer(layer);
value_ = value;
- externalDescriptor_ = "";
+ externalDescriptor_.clear();
}
com::sun::star::uno::Any *PropertyNode::getValuePtr(int layer)
{
setLayer(layer);
- externalDescriptor_ = "";
+ externalDescriptor_.clear();
return &value_;
}
diff --git a/configmgr/source/xcdparser.cxx b/configmgr/source/xcdparser.cxx
index 6a9c3f0..11502e3 100644
--- a/configmgr/source/xcdparser.cxx
+++ b/configmgr/source/xcdparser.cxx
@@ -113,7 +113,7 @@ bool XcdParser::startElement(
return false;
}
state_ = STATE_DEPENDENCY;
- dependencyFile_ = "";
+ dependencyFile_.clear();
return true;
}
state_ = STATE_COMPONENTS;
commit b4a73f9d003ff5c452eeb80993073137e52848e8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Dec 16 17:26:39 2014 +0100
bridges: Use appropriate OUString functions on string constants
Change-Id: I95ec7503ab7cf0309427118cc5af95eba4f5785b
diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index a912da2..4814a24 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -288,7 +288,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
if (! pTypeDescr)
{
throw RuntimeException(
- OUString("cannot get typedescription for type ") +
+ "cannot get typedescription for type " +
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
@@ -318,7 +318,7 @@ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
if (! rtti)
{
throw RuntimeException(
- OUString("no rtti for type ") +
+ "no rtti for type " +
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ) );
}
}
@@ -346,7 +346,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
if (0 == pExcTypeDescr)
{
- RuntimeException aRE( OUString("exception type not found: ") + unoName );
+ RuntimeException aRE( "exception type not found: " + unoName );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
SAL_WARN("bridges", aRE.Message);
More information about the Libreoffice-commits
mailing list