summaryrefslogtreecommitdiff
path: root/pyuno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-27 20:21:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-27 20:22:03 +0200
commit6671fa81db0ecea4ada005bb79f55f08fb440ad4 (patch)
tree85ad806ece8d60736b6b01310b04b053dc2f8179 /pyuno
parentb6d8251eee90b7e24ebb3f8452eff36a507e6d91 (diff)
Removed uses of rtl::O[U]String[Buffer]::operator sal_{char|Unicode} const *().
Diffstat (limited to 'pyuno')
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx4
-rw-r--r--pyuno/source/module/pyuno_except.cxx8
-rw-r--r--pyuno/source/module/pyuno_module.cxx16
3 files changed, 16 insertions, 12 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index f7a909fbd0fc..f1dcf06218ef 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -150,11 +150,11 @@ static void prependPythonPath( const OUString & pythonPathBootstrap )
OUString fileUrl;
if( nNew == -1 )
{
- fileUrl = OUString( &( pythonPathBootstrap[nIndex] ) );
+ fileUrl = pythonPathBootstrap.copy(nIndex);
}
else
{
- fileUrl = OUString( &(pythonPathBootstrap[nIndex]) , nNew - nIndex );
+ fileUrl = pythonPathBootstrap.copy(nIndex, nNew - nIndex);
}
OUString systemPath;
osl_getSystemPathFromFileURL( fileUrl.pData, &(systemPath.pData) );
diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx
index 97b876fbcc31..f36cb0ab13ae 100644
--- a/pyuno/source/module/pyuno_except.cxx
+++ b/pyuno/source/module/pyuno_except.cxx
@@ -69,23 +69,23 @@ void raisePyExceptionWithAny( const com::sun::star::uno::Any &anyExc )
buf.appendAscii( ")" );
PyErr_SetString(
PyExc_SystemError,
- OUStringToOString(buf.makeStringAndClear(),RTL_TEXTENCODING_ASCII_US) );
+ OUStringToOString(buf.makeStringAndClear(),RTL_TEXTENCODING_ASCII_US).getStr() );
}
}
catch( com::sun::star::lang::IllegalArgumentException & e)
{
PyErr_SetString( PyExc_SystemError,
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
catch( com::sun::star::script::CannotConvertException & e)
{
PyErr_SetString( PyExc_SystemError,
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
catch( RuntimeException & e)
{
PyErr_SetString( PyExc_SystemError,
- OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US) );
+ OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US).getStr() );
}
}
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index a126152ef8c0..07659aabc51f 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -694,7 +694,7 @@ static PyObject * absolutize( PyObject *, PyObject * args )
PyErr_SetString(
PyExc_OSError,
- OUStringToOString(buf.makeStringAndClear(),osl_getThreadTextEncoding()));
+ OUStringToOString(buf.makeStringAndClear(),osl_getThreadTextEncoding()).getStr());
return 0;
}
return ustring2PyUnicode( ret ).getAcquired();
@@ -722,7 +722,8 @@ static PyObject * invoke(PyObject *, PyObject *args)
OStringBuffer buf;
buf.append("uno.invoke expects a tuple as 3rd argument, got ");
buf.append(PyString_AsString(PyObject_Str(item2)));
- PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
+ PyErr_SetString(
+ PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
}
else
@@ -730,14 +731,15 @@ static PyObject * invoke(PyObject *, PyObject *args)
OStringBuffer buf;
buf.append("uno.invoke expected a string as 2nd argument, got ");
buf.append(PyString_AsString(PyObject_Str(item1)));
- PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
+ PyErr_SetString(
+ PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
}
else
{
OStringBuffer buf;
buf.append("uno.invoke expects object, name, (arg1, arg2, ... )\n");
- PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear());
+ PyErr_SetString(PyExc_RuntimeError, buf.makeStringAndClear().getStr());
}
return ret;
}
@@ -780,14 +782,16 @@ static PyObject *setCurrentContext( PyObject *, PyObject * args )
OStringBuffer buf;
buf.append( "uno.setCurrentContext expects an XComponentContext implementation, got " );
buf.append( PyString_AsString( PyObject_Str( PyTuple_GetItem( args, 0) ) ) );
- PyErr_SetString( PyExc_RuntimeError, buf.makeStringAndClear() );
+ PyErr_SetString(
+ PyExc_RuntimeError, buf.makeStringAndClear().getStr() );
}
}
else
{
OStringBuffer buf;
buf.append( "uno.setCurrentContext expects exactly one argument (the current Context)\n" );
- PyErr_SetString( PyExc_RuntimeError, buf.makeStringAndClear() );
+ PyErr_SetString(
+ PyExc_RuntimeError, buf.makeStringAndClear().getStr() );
}
}
catch( com::sun::star::uno::Exception & e )