summaryrefslogtreecommitdiff
path: root/stoc/source/corereflection
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-05-13 15:16:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-13 20:11:48 +0200
commitdf4b0ba2f631e2a99d72011e58ac5e81fbc1dec5 (patch)
treee5bcefcb888f5db573789262319e9ac2647e8204 /stoc/source/corereflection
parenta9cf09844ee35610cbf102895014a7f03f8de100 (diff)
loplugin:ostr in stoc
Change-Id: I638b1e12781264770ce742d3303693e3b7fa82c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'stoc/source/corereflection')
-rw-r--r--stoc/source/corereflection/crarray.cxx4
-rw-r--r--stoc/source/corereflection/crcomp.cxx4
-rw-r--r--stoc/source/corereflection/crefl.cxx18
-rw-r--r--stoc/source/corereflection/crenum.cxx4
-rw-r--r--stoc/source/corereflection/criface.cxx16
-rw-r--r--stoc/source/corereflection/dump.cxx8
6 files changed, 27 insertions, 27 deletions
diff --git a/stoc/source/corereflection/crarray.cxx b/stoc/source/corereflection/crarray.cxx
index 67be31e1ac93..f3de3041c260 100644
--- a/stoc/source/corereflection/crarray.cxx
+++ b/stoc/source/corereflection/crarray.cxx
@@ -45,7 +45,7 @@ void ArrayIdlClassImpl::realloc( Any & rArray, sal_Int32 nLen )
if (nLen < 0)
{
throw IllegalArgumentException(
- "negative length given!",
+ u"negative length given!"_ustr,
getXWeak(), 1 );
}
@@ -134,7 +134,7 @@ void ArrayIdlClassImpl::set( Any & rArray, sal_Int32 nIndex, const Any & rNewVal
{
TYPELIB_DANGER_RELEASE( pElemTypeDescr );
throw IllegalArgumentException(
- "sequence element is not assignable by given value!",
+ u"sequence element is not assignable by given value!"_ustr,
getXWeak(), 2 );
}
TYPELIB_DANGER_RELEASE( pElemTypeDescr );
diff --git a/stoc/source/corereflection/crcomp.cxx b/stoc/source/corereflection/crcomp.cxx
index b1143e158b09..d47151c7ea92 100644
--- a/stoc/source/corereflection/crcomp.cxx
+++ b/stoc/source/corereflection/crcomp.cxx
@@ -160,7 +160,7 @@ void IdlCompFieldImpl::set( const Any & rObj, const Any & rValue )
if (!coerce_assign( const_cast<char *>(static_cast<char const *>(rObj.getValue()) + _nOffset), getTypeDescr(), rValue, getReflection() ))
{
throw IllegalArgumentException(
- "cannot assign value to destination",
+ u"cannot assign value to destination"_ustr,
getXWeak(), 1 );
}
return;
@@ -193,7 +193,7 @@ void IdlCompFieldImpl::set( Any & rObj, const Any & rValue )
if (!coerce_assign( const_cast<char *>(static_cast<char const *>(rObj.getValue()) + _nOffset), getTypeDescr(), rValue, getReflection() ))
{
throw IllegalArgumentException(
- "cannot assign to destination",
+ u"cannot assign to destination"_ustr,
getXWeak(), 1 );
}
return;
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 1f4562181abb..f9ca56720fed 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -45,7 +45,7 @@ IdlReflectionServiceImpl::IdlReflectionServiceImpl(
: WeakComponentImplHelper( _aComponentMutex )
{
xContext->getValueByName(
- "/singletons/com.sun.star.reflection.theTypeDescriptionManager" ) >>= _xTDMgr;
+ u"/singletons/com.sun.star.reflection.theTypeDescriptionManager"_ustr ) >>= _xTDMgr;
OSL_ENSURE( _xTDMgr.is(), "### cannot get singleton \"TypeDescriptionManager\" from context!" );
}
@@ -70,7 +70,7 @@ void IdlReflectionServiceImpl::disposing()
OUString IdlReflectionServiceImpl::getImplementationName()
{
- return "com.sun.star.comp.stoc.CoreReflection";
+ return u"com.sun.star.comp.stoc.CoreReflection"_ustr;
}
sal_Bool IdlReflectionServiceImpl::supportsService( const OUString & rServiceName )
@@ -80,7 +80,7 @@ sal_Bool IdlReflectionServiceImpl::supportsService( const OUString & rServiceNam
Sequence< OUString > IdlReflectionServiceImpl::getSupportedServiceNames()
{
- Sequence< OUString > seqNames { "com.sun.star.reflection.CoreReflection" };
+ Sequence< OUString > seqNames { u"com.sun.star.reflection.CoreReflection"_ustr };
return seqNames;
}
@@ -260,7 +260,7 @@ Reference< XIdlClass > IdlReflectionServiceImpl::forType( typelib_TypeDescriptio
return xRet;
}
throw RuntimeException(
- "IdlReflectionServiceImpl::forType() failed!",
+ u"IdlReflectionServiceImpl::forType() failed!"_ustr,
getXWeak() );
}
@@ -272,12 +272,12 @@ const Mapping & IdlReflectionServiceImpl::getCpp2Uno()
MutexGuard aGuard( getMutexAccess() );
if (! _aCpp2Uno.is())
{
- _aCpp2Uno = Mapping( CPPU_CURRENT_LANGUAGE_BINDING_NAME, UNO_LB_UNO );
+ _aCpp2Uno = Mapping( CPPU_CURRENT_LANGUAGE_BINDING_NAME, u"" UNO_LB_UNO ""_ustr );
OSL_ENSURE( _aCpp2Uno.is(), "### cannot get c++ to uno mapping!" );
if (! _aCpp2Uno.is())
{
throw RuntimeException(
- "cannot get c++ to uno mapping!",
+ u"cannot get c++ to uno mapping!"_ustr,
getXWeak() );
}
}
@@ -292,12 +292,12 @@ const Mapping & IdlReflectionServiceImpl::getUno2Cpp()
MutexGuard aGuard( getMutexAccess() );
if (! _aUno2Cpp.is())
{
- _aUno2Cpp = Mapping( UNO_LB_UNO, CPPU_CURRENT_LANGUAGE_BINDING_NAME );
+ _aUno2Cpp = Mapping( u"" UNO_LB_UNO ""_ustr, CPPU_CURRENT_LANGUAGE_BINDING_NAME );
OSL_ENSURE( _aUno2Cpp.is(), "### cannot get uno to c++ mapping!" );
if (! _aUno2Cpp.is())
{
throw RuntimeException(
- "cannot get uno to c++ mapping!",
+ u"cannot get uno to c++ mapping!"_ustr,
getXWeak() );
}
}
@@ -313,7 +313,7 @@ uno_Interface * IdlReflectionServiceImpl::mapToUno(
return static_cast<uno_Interface *>(getCpp2Uno().mapInterface( xObj.get(), pTo ));
throw RuntimeException(
- "illegal object given!",
+ u"illegal object given!"_ustr,
getXWeak() );
}
diff --git a/stoc/source/corereflection/crenum.cxx b/stoc/source/corereflection/crenum.cxx
index 2cb07c9b5ec8..13484e0eb324 100644
--- a/stoc/source/corereflection/crenum.cxx
+++ b/stoc/source/corereflection/crenum.cxx
@@ -91,14 +91,14 @@ Any IdlEnumFieldImpl::get( const Any & )
void IdlEnumFieldImpl::set( const Any &, const Any & )
{
throw IllegalAccessException(
- "cannot set enum field, it is constant",
+ u"cannot set enum field, it is constant"_ustr,
getXWeak() );
}
void IdlEnumFieldImpl::set( Any &, const Any & )
{
throw IllegalAccessException(
- "cannot set enum field, it is constant",
+ u"cannot set enum field, it is constant"_ustr,
getXWeak() );
}
diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx
index 130ff546e278..7b35020fb67f 100644
--- a/stoc/source/corereflection/criface.cxx
+++ b/stoc/source/corereflection/criface.cxx
@@ -150,7 +150,7 @@ Any IdlAttributeFieldImpl::get( const Any & rObj )
return aRet;
}
throw IllegalArgumentException(
- "illegal object given!",
+ u"illegal object given!"_ustr,
getXWeak(), 0 );
}
@@ -159,7 +159,7 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
if (getAttributeTypeDescr()->bReadOnly)
{
throw IllegalAccessException(
- "cannot set readonly attribute!",
+ u"cannot set readonly attribute!"_ustr,
getXWeak() );
}
@@ -232,11 +232,11 @@ void IdlAttributeFieldImpl::set( Any & rObj, const Any & rValue )
(*pUnoI->release)( pUnoI );
throw IllegalArgumentException(
- "illegal value given!",
+ u"illegal value given!"_ustr,
*o3tl::doAccess<Reference<XInterface>>(rObj), 1 );
}
throw IllegalArgumentException(
- "illegal destination object given!",
+ u"illegal destination object given!"_ustr,
getXWeak(), 0 );
}
@@ -261,8 +261,8 @@ void IdlAttributeFieldImpl::checkException(
cppu::UnoType<RuntimeException>::get()))
{
throw WrappedTargetRuntimeException(
- "non-RuntimeException occurred when accessing an"
- " interface type attribute",
+ u"non-RuntimeException occurred when accessing an"
+ " interface type attribute"_ustr,
context, e);
}
cppu::throwException(e);
@@ -609,7 +609,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
uno_type_copyAndConvertData(&aRet, pUnoExc, cppu::UnoType<Any>::get().getTypeLibType(),
getReflection()->getUno2Cpp().get() );
uno_any_destruct( pUnoExc, nullptr );
- throw InvocationTargetException("exception occurred during invocation!",
+ throw InvocationTargetException(u"exception occurred during invocation!"_ustr,
*o3tl::doAccess<Reference<XInterface>>(rObj), aRet);
}
else
@@ -640,7 +640,7 @@ Any SAL_CALL IdlInterfaceMethodImpl::invoke( const Any & rObj, Sequence< Any > &
return aRet;
}
throw IllegalArgumentException(
- "illegal destination object given!",
+ u"illegal destination object given!"_ustr,
getXWeak(), 0 );
}
diff --git a/stoc/source/corereflection/dump.cxx b/stoc/source/corereflection/dump.cxx
index 0905393db9bc..445e05b83e79 100644
--- a/stoc/source/corereflection/dump.cxx
+++ b/stoc/source/corereflection/dump.cxx
@@ -105,7 +105,7 @@ public:
explicit Dump(css::uno::Reference<css::uno::XComponentContext> const& context)
: WeakComponentImplHelper(m_aMutex)
, manager_(context->getValueByName(
- "/singletons/com.sun.star.reflection.theTypeDescriptionManager"),
+ u"/singletons/com.sun.star.reflection.theTypeDescriptionManager"_ustr),
css::uno::UNO_QUERY_THROW)
{
}
@@ -121,7 +121,7 @@ public:
switch (value.getValueTypeClass())
{
case css::uno::TypeClass_VOID:
- return "void";
+ return u"void"_ustr;
case css::uno::TypeClass_BOOLEAN:
return OUString::boolean(value.get<bool>());
case css::uno::TypeClass_BYTE:
@@ -218,7 +218,7 @@ public:
case css::uno::TypeClass_INTERFACE:
{
auto const p = *static_cast<void* const*>(value.getValue());
- return p == nullptr ? OUString("null")
+ return p == nullptr ? u"null"_ustr
: OUString("0x"
+ hex(reinterpret_cast<sal_uIntPtr>(p),
SAL_TYPES_SIZEOFPOINTER * 2));
@@ -241,7 +241,7 @@ public:
osl::MutexGuard g(m_aMutex);
if (rBHelper.bDisposed)
{
- throw css::lang::DisposedException("css.reflection.Dumper");
+ throw css::lang::DisposedException(u"css.reflection.Dumper"_ustr);
}
manager = manager_;
}