From 85d1ce27ad9ce7a3740bd8bbbaf1d3abe643ba10 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 2 Jan 2012 15:58:10 -0200 Subject: Fix for fdo43460 Part XXVII getLength() to isEmpty() Please find attached a partial fix for Easy Hack FDO43460 Part XXVII Modules padmin, pyuno, rdbmaker, regexp, registry, rsc, sal --- pyuno/source/loader/pyuno_loader.cxx | 4 ++-- pyuno/source/module/pyuno_module.cxx | 2 +- pyuno/source/module/pyuno_runtime.cxx | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'pyuno') diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 9e93e1961c3f..dced1006d265 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -191,10 +191,10 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c // pythonhome+pythonpath must be set before Py_Initialize(), otherwise there appear warning on the console // sadly, there is no api for setting the pythonpath, we have to use the environment variable - if( pythonHome.getLength() ) + if( !pythonHome.isEmpty() ) setPythonHome( pythonHome ); - if( pythonPath.getLength() ) + if( !pythonPath.isEmpty() ) prependPythonPath( pythonPath ); #if WNT diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index f02cec84e3a0..0382259f95b3 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -270,7 +270,7 @@ static PyObject* getComponentContext (PyObject*, PyObject*) else { OUString iniFile; - if( !path.getLength() ) + if( path.isEmpty() ) { PyErr_SetString( PyExc_RuntimeError, "osl_getUrlFromAddress fails, that's why I cannot find ini " diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 21b63893323a..9dc5b5214419 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -955,7 +955,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, else { str = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not load uno.py, no stacktrace available")); - if ( e.Message.getLength() > 0 ) + if ( !e.Message.isEmpty() ) { str += OUString (RTL_CONSTASCII_USTRINGPARAM(" (Error loading uno.py: ")); str += e.Message; @@ -997,7 +997,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, buf.appendAscii( "Couldn't convert exception value to a string" ); } buf.appendAscii( ", traceback follows\n" ); - if( str.getLength() > 0 ) + if( !str.isEmpty() ) { buf.append( str ); buf.appendAscii( "\n" ); -- cgit