diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-20 21:07:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-21 13:15:32 +0200 |
commit | 7049328fb2d656d8454d4f704ad75d057e766c0b (patch) | |
tree | 0e8f2e1cce68c6a07c82d5e8496a64f716fecfde /pyuno | |
parent | a003e4ff69263c7feb8e97e3291e5579fbd181ac (diff) |
loplugin:stringadd replace OUStringLiteral temporaries with OUString::Concat
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 8 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_type.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index 35986b3646ba..f3c6d92669fb 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -219,7 +219,7 @@ OUString getLibDir() void raisePySystemException( const char * exceptionType, std::u16string_view message ) { - OString buf = OStringLiteral("Error during bootstrapping uno (") + + OString buf = OString::Concat("Error during bootstrapping uno (") + exceptionType + "):" + OUStringToOString( message, osl_getThreadTextEncoding() ); @@ -386,14 +386,14 @@ PyObject * extractOneStringArg( PyObject *args, char const *funcName ) { if( !PyTuple_Check( args ) || PyTuple_Size( args) != 1 ) { - OString buf = funcName + OStringLiteral(": expecting one string argument"); + OString buf = funcName + OString::Concat(": expecting one string argument"); PyErr_SetString( PyExc_RuntimeError, buf.getStr() ); return nullptr; } PyObject *obj = PyTuple_GetItem( args, 0 ); if (!PyUnicode_Check(obj)) { - OString buf = funcName + OStringLiteral(": expecting one string argument"); + OString buf = funcName + OString::Concat(": expecting one string argument"); PyErr_SetString( PyExc_TypeError, buf.getStr()); return nullptr; } @@ -504,7 +504,7 @@ static PyObject *getTypeByName( } else { - OString buf = OStringLiteral("Type ") + name + " is unknown"; + OString buf = OString::Concat("Type ") + name + " is unknown"; PyErr_SetString( PyExc_RuntimeError, buf.getStr() ); } } diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx index 63176c3a2970..a04b4e26d78c 100644 --- a/pyuno/source/module/pyuno_type.cxx +++ b/pyuno/source/module/pyuno_type.cxx @@ -226,7 +226,7 @@ static PyObject* callCtor( const Runtime &r , const char * clazz, const PyRef & PyRef code( PyDict_GetItemString( r.getImpl()->cargo->getUnoModule().get(), clazz ) ); if( ! code.is() ) { - OString buf = OStringLiteral("couldn't access uno.") + clazz; + OString buf = OString::Concat("couldn't access uno.") + clazz; PyErr_SetString( PyExc_RuntimeError, buf.getStr() ); return nullptr; } |