summaryrefslogtreecommitdiff
path: root/pyuno/source
diff options
context:
space:
mode:
authorJean-Noël Rouvignac <jn.rouvignac@gmail.com>2013-02-01 09:33:19 +0100
committerTor Lillqvist <tml@iki.fi>2013-02-14 13:20:14 +0000
commit77fd448d0990adc79406e13a127b2b1834984b71 (patch)
tree3b8d1b23e7029dedcb97eb1d38ba83c91dfdac51 /pyuno/source
parent5502501a8848c771aff5a77448a02451e22398a4 (diff)
Removed several useless macros: UNISTRING, USTR, USTR_ASCII, ASCII_STR, ASCII_STRING, CONST_ASCII, ASCSTR, ASCII, DEFINE_CONST_UNICODE, DEFINE_CONST_OUSTRING
Change-Id: I96d690bf9f9b319e9eeafcf218ec5ce87f21215f Reviewed-on: https://gerrit.libreoffice.org/1954 Reviewed-by: Tor Lillqvist <tml@iki.fi> Tested-by: Tor Lillqvist <tml@iki.fi>
Diffstat (limited to 'pyuno/source')
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx9
-rw-r--r--pyuno/source/module/pyuno_type.cxx9
2 files changed, 8 insertions, 10 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index 6e282a73793a..7f03b21dde1a 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -69,7 +69,6 @@ using com::sun::star::beans::Introspection;
namespace pyuno
{
-#define USTR_ASCII(x) OUString( x )
static PyTypeObject RuntimeImpl_Type =
{
@@ -184,7 +183,7 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile )
rtl::Bootstrap bootstrapHandle( fileName );
OUString str;
- if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGLEVEL" ), str ) )
+ if( bootstrapHandle.getFrom( "PYUNO_LOGLEVEL", str ) )
{
if ( str == "NONE" )
*pLevel = LogLevel::NONE;
@@ -201,7 +200,7 @@ static void readLoggingConfig( sal_Int32 *pLevel, FILE **ppFile )
if( *pLevel > LogLevel::NONE )
{
*ppFile = stdout;
- if( bootstrapHandle.getFrom( USTR_ASCII( "PYUNO_LOGTARGET" ), str ) )
+ if( bootstrapHandle.getFrom( "PYUNO_LOGTARGET", str ) )
{
if ( str == "stdout" )
*ppFile = stdout;
@@ -767,7 +766,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
else
{
throw RuntimeException(
- USTR_ASCII( "struct or exception wrapper does not support XMaterialHolder" ),
+ "struct or exception wrapper does not support XMaterialHolder",
Reference< XInterface > () );
}
}
@@ -785,7 +784,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum ConversionMode mode ) con
if (!my_mh.is ())
{
throw RuntimeException(
- USTR_ASCII( "struct wrapper does not support XMaterialHolder" ),
+ "struct wrapper does not support XMaterialHolder",
Reference< XInterface > () );
}
else
diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx
index d30e07dd0f83..d03368ab136f 100644
--- a/pyuno/source/module/pyuno_type.cxx
+++ b/pyuno/source/module/pyuno_type.cxx
@@ -37,7 +37,6 @@ using com::sun::star::uno::XInterface;
using com::sun::star::uno::Reference;
using com::sun::star::uno::TypeDescription;
-#define USTR_ASCII(x) rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
namespace pyuno
{
const char *typeClassToString( TypeClass t )
@@ -142,14 +141,14 @@ sal_Unicode PyChar2Unicode( PyObject *obj ) throw ( RuntimeException )
if( ! PyUnicode_Check( value.get() ) )
{
throw RuntimeException(
- USTR_ASCII( "attribute value of uno.Char is not a unicode string" ),
+ "attribute value of uno.Char is not a unicode string",
Reference< XInterface > () );
}
if( PyUnicode_GetSize( value.get() ) < 1 )
{
throw RuntimeException(
- USTR_ASCII( "uno.Char contains an empty unicode string" ),
+ "uno.Char contains an empty unicode string",
Reference< XInterface > () );
}
@@ -165,7 +164,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
if( !PyStr_Check( typeName.get() ) || ! PyStr_Check( value.get() ) )
{
throw RuntimeException(
- USTR_ASCII( "attributes typeName and/or value of uno.Enum are not strings" ),
+ "attributes typeName and/or value of uno.Enum are not strings",
Reference< XInterface > () );
}
@@ -221,7 +220,7 @@ Type PyType2Type( PyObject * o ) throw(RuntimeException )
if( !PyStr_Check( pyName.get() ) )
{
throw RuntimeException(
- USTR_ASCII( "type object does not have typeName property" ),
+ "type object does not have typeName property",
Reference< XInterface > () );
}