diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 12:06:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-04-07 14:23:11 +0200 |
commit | 1946794ae09ba732022fe6a74ea45e304ab70b84 (patch) | |
tree | e32bd7ba61fa021ecc7f8c85959df8ca837d6e81 /pyuno | |
parent | 5b08c6e7a21dda94d5b755eea0b1ed1e9c199bec (diff) |
mass removal of rtl:: prefixes for O(U)String*
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk
have kept them, in order not to break external API (the automatic using declaration
is LO-internal).
Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
Diffstat (limited to 'pyuno')
-rw-r--r-- | pyuno/source/loader/pyuno_loader.cxx | 21 | ||||
-rw-r--r-- | pyuno/source/module/pyuno.cxx | 6 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_adapter.cxx | 5 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_callable.cxx | 2 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_except.cxx | 3 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_gc.cxx | 4 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_impl.hxx | 44 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_module.cxx | 8 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 11 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_type.cxx | 5 | ||||
-rw-r--r-- | pyuno/source/module/pyuno_util.cxx | 21 |
11 files changed, 46 insertions, 84 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx index 9a9fb638f367..0db1b9b59023 100644 --- a/pyuno/source/loader/pyuno_loader.cxx +++ b/pyuno/source/loader/pyuno_loader.cxx @@ -43,9 +43,6 @@ #endif #endif -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OString; using pyuno::PyRef; using pyuno::Runtime; @@ -121,7 +118,7 @@ static void setPythonHome ( const OUString & pythonHome ) { OUString systemPythonHome; osl_getSystemPathFromFileURL( pythonHome.pData, &(systemPythonHome.pData) ); - OString o = rtl::OUStringToOString( systemPythonHome, osl_getThreadTextEncoding() ); + OString o = OUStringToOString( systemPythonHome, osl_getThreadTextEncoding() ); #if PY_MAJOR_VERSION >= 3 // static because Py_SetPythonHome just copies the "wide" pointer static wchar_t wide[PATH_MAX + 1]; @@ -145,7 +142,7 @@ static void setPythonHome ( const OUString & pythonHome ) static void prependPythonPath( const OUString & pythonPathBootstrap ) { - rtl::OUStringBuffer bufPYTHONPATH( 256 ); + OUStringBuffer bufPYTHONPATH( 256 ); sal_Int32 nIndex = 0; while( 1 ) { @@ -169,10 +166,10 @@ static void prependPythonPath( const OUString & pythonPathBootstrap ) } const char * oldEnv = getenv( "PYTHONPATH"); if( oldEnv ) - bufPYTHONPATH.append( rtl::OUString(oldEnv, strlen(oldEnv), osl_getThreadTextEncoding()) ); + bufPYTHONPATH.append( OUString(oldEnv, strlen(oldEnv), osl_getThreadTextEncoding()) ); - rtl::OUString envVar("PYTHONPATH"); - rtl::OUString envValue(bufPYTHONPATH.makeStringAndClear()); + OUString envVar("PYTHONPATH"); + OUString envValue(bufPYTHONPATH.makeStringAndClear()); osl_setEnvironment(envVar.pData, envValue.pData); } @@ -203,13 +200,13 @@ Reference< XInterface > CreateInstance( const Reference< XComponentContext > & c #ifdef WNT //extend PATH under windows to include the branddir/program so ssl libs will be found //for use by terminal mailmerge dependency _ssl.pyd - rtl::OUString sEnvName("PATH"); - rtl::OUString sPath; + OUString sEnvName("PATH"); + OUString sPath; osl_getEnvironment(sEnvName.pData, &sPath.pData); - rtl::OUString sBrandLocation("$BRAND_BASE_DIR/program"); + OUString sBrandLocation("$BRAND_BASE_DIR/program"); rtl::Bootstrap::expandMacros(sBrandLocation); osl::FileBase::getSystemPathFromFileURL(sBrandLocation, sBrandLocation); - sPath = rtl::OUStringBuffer(sPath). + sPath = OUStringBuffer(sPath). append(static_cast<sal_Unicode>(SAL_PATHSEPARATOR)). append(sBrandLocation).makeStringAndClear(); osl_setEnvironment(sEnvName.pData, sPath.pData); diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index cf18d9c6de6a..4c6191d4da30 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -29,10 +29,6 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMaterialHolder.hpp> -using rtl::OStringBuffer; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; -using rtl::OUString; using com::sun::star::uno::Sequence; using com::sun::star::uno::Reference; using com::sun::star::uno::XInterface; @@ -754,7 +750,7 @@ PyObject* PyUNO_new_UNCHECKED ( Reference<XInvocation2> tmp_invocation (tmp_interface, UNO_QUERY); if (!tmp_invocation.is()) { - throw RuntimeException (rtl::OUString::createFromAscii ( + throw RuntimeException (OUString::createFromAscii ( "XInvocation2 not implemented, cannot interact with object"), Reference< XInterface > ()); } diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx index e987a7e42762..b51bc06912d0 100644 --- a/pyuno/source/module/pyuno_adapter.cxx +++ b/pyuno/source/module/pyuno_adapter.cxx @@ -25,11 +25,6 @@ #include <cppuhelper/typeprovider.hxx> -using rtl::OUStringToOString; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OString; -using rtl::OStringBuffer; using com::sun::star::beans::XIntrospectionAccess; using com::sun::star::beans::XIntrospection; diff --git a/pyuno/source/module/pyuno_callable.cxx b/pyuno/source/module/pyuno_callable.cxx index 1b9a20b91d1c..4175c8066e76 100644 --- a/pyuno/source/module/pyuno_callable.cxx +++ b/pyuno/source/module/pyuno_callable.cxx @@ -21,8 +21,6 @@ #include <osl/thread.h> #include <rtl/ustrbuf.hxx> -using rtl::OUStringToOString; -using rtl::OUString; using com::sun::star::uno::Sequence; using com::sun::star::uno::Reference; using com::sun::star::uno::XInterface; diff --git a/pyuno/source/module/pyuno_except.cxx b/pyuno/source/module/pyuno_except.cxx index 3d1c104ca2d2..9c21a9e65e4e 100644 --- a/pyuno/source/module/pyuno_except.cxx +++ b/pyuno/source/module/pyuno_except.cxx @@ -22,9 +22,6 @@ #include <typelib/typedescription.hxx> -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; using com::sun::star::uno::RuntimeException; using com::sun::star::uno::Sequence; diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx index 7195a3563334..637be9d62523 100644 --- a/pyuno/source/module/pyuno_gc.cxx +++ b/pyuno/source/module/pyuno_gc.cxx @@ -86,8 +86,8 @@ void GCThread::execute() } catch( const com::sun::star::uno::RuntimeException & e ) { - rtl::OString msg; - msg = rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ); + OString msg; + msg = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ); fprintf( stderr, "Leaking python objects bridged to UNO for reason %s\n",msg.getStr()); } } diff --git a/pyuno/source/module/pyuno_impl.hxx b/pyuno/source/module/pyuno_impl.hxx index 446a28615ed5..95245230fb5a 100644 --- a/pyuno/source/module/pyuno_impl.hxx +++ b/pyuno/source/module/pyuno_impl.hxx @@ -144,21 +144,21 @@ static const sal_Int32 ARGS = 2; } bool isLog( RuntimeCargo *cargo, sal_Int32 loglevel ); -void log( RuntimeCargo *cargo, sal_Int32 level, const rtl::OUString &logString ); +void log( RuntimeCargo *cargo, sal_Int32 level, const OUString &logString ); void log( RuntimeCargo *cargo, sal_Int32 level, const char *str ); void logCall( RuntimeCargo *cargo, const char *intro, - void * ptr, const rtl::OUString & aFunctionName, + void * ptr, const OUString & aFunctionName, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & args ); void logReply( RuntimeCargo *cargo, const char *intro, - void * ptr, const rtl::OUString & aFunctionName, + void * ptr, const OUString & aFunctionName, const com::sun::star::uno::Any &returnValue, const com::sun::star::uno::Sequence< com::sun::star::uno::Any > & args ); void logException( RuntimeCargo *cargo, const char *intro, - void * ptr, const rtl::OUString &aFunctionName, + void * ptr, const OUString &aFunctionName, const void * data, const com::sun::star::uno::Type & type ); static const sal_Int32 VAL2STR_MODE_DEEP = 0; static const sal_Int32 VAL2STR_MODE_SHALLOW = 1; -rtl::OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef, sal_Int32 mode = VAL2STR_MODE_DEEP ) SAL_THROW(()); +OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef, sal_Int32 mode = VAL2STR_MODE_DEEP ) SAL_THROW(()); //-------------------------------------------------- typedef ::boost::unordered_map @@ -172,18 +172,18 @@ typedef ::boost::unordered_map typedef ::boost::unordered_map < -rtl::OUString, +OUString, PyRef, -rtl::OUStringHash, -std::equal_to<rtl::OUString> +OUStringHash, +std::equal_to<OUString> > ExceptionClassMap; typedef ::boost::unordered_map < - rtl::OUString, + OUString, com::sun::star::uno::Sequence< sal_Int16 >, - rtl::OUStringHash, - std::equal_to< rtl::OUString > + OUStringHash, + std::equal_to< OUString > > MethodOutIndexMap; typedef ::boost::unordered_set< PyRef , PyRef::Hash , std::equal_to<PyRef> > ClassSet; @@ -208,9 +208,9 @@ typedef struct PyUNOInternals* members; } PyUNO; -PyRef ustring2PyUnicode( const rtl::OUString &source ); -PyRef ustring2PyString( const ::rtl::OUString & source ); -rtl::OUString pyString2ustring( PyObject *str ); +PyRef ustring2PyUnicode( const OUString &source ); +PyRef ustring2PyString( const OUString & source ); +OUString pyString2ustring( PyObject *str ); PyRef AnyToPyObject (const com::sun::star::uno::Any & a, const Runtime &r ) @@ -226,7 +226,7 @@ com::sun::star::uno::TypeClass StringToTypeClass (char* string); PyRef PyUNO_callable_new ( const com::sun::star::uno::Reference<com::sun::star::script::XInvocation2> &xInv, - const rtl::OUString &methodName, + const OUString &methodName, const com::sun::star::uno::Reference<com::sun::star::lang::XSingleServiceFactory> &ssf, const com::sun::star::uno::Reference<com::sun::star::script::XTypeConverter> &tc, ConversionMode mode = REJECT_UNO_ANY ); @@ -242,7 +242,7 @@ PyRef getBoolClass( const Runtime &); PyRef getCharClass( const Runtime &); PyRef getByteSequenceClass( const Runtime & ); PyRef getPyUnoClass(); -PyRef getClass( const rtl::OUString & name , const Runtime & runtime ); +PyRef getClass( const OUString & name , const Runtime & runtime ); PyRef getAnyClass( const Runtime &); PyObject *PyUNO_invoke( PyObject *object, const char *name , PyObject *args ); @@ -308,7 +308,7 @@ class Adapter : public cppu::WeakImplHelper2< MethodOutIndexMap m_methodOutIndexMap; private: - com::sun::star::uno::Sequence< sal_Int16 > getOutIndexes( const rtl::OUString & functionName ); + com::sun::star::uno::Sequence< sal_Int16 > getOutIndexes( const OUString & functionName ); public: public: @@ -324,7 +324,7 @@ public: virtual com::sun::star::uno::Reference< ::com::sun::star::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Any SAL_CALL invoke( - const ::rtl::OUString& aFunctionName, + const OUString& aFunctionName, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aParams, ::com::sun::star::uno::Sequence< sal_Int16 >& aOutParamIndex, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aOutParam ) @@ -334,19 +334,19 @@ public: ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setValue( - const ::rtl::OUString& aPropertyName, + const OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::script::CannotConvertException, ::com::sun::star::reflection::InvocationTargetException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) + virtual ::com::sun::star::uno::Any SAL_CALL getValue( const OUString& aPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) + virtual sal_Bool SAL_CALL hasMethod( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); - virtual sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) + virtual sal_Bool SAL_CALL hasProperty( const OUString& aName ) throw (::com::sun::star::uno::RuntimeException); // XUnoTunnel diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx index b709c13a63ca..768b6d735a8a 100644 --- a/pyuno/source/module/pyuno_module.cxx +++ b/pyuno/source/module/pyuno_module.cxx @@ -44,12 +44,6 @@ using osl::Module; -using rtl::OString; -using rtl::OUString; -using rtl::OUStringHash; -using rtl::OUStringToOString; -using rtl::OUStringBuffer; -using rtl::OStringBuffer; using com::sun::star::uno::Sequence; using com::sun::star::uno::Reference; @@ -171,7 +165,7 @@ static void fillStruct( { const OUString OUMemberName (pCompType->ppMemberNames[i]); PyObject *pyMemberName = - PyStr_FromString(::rtl::OUStringToOString(OUMemberName, + PyStr_FromString(OUStringToOString(OUMemberName, RTL_TEXTENCODING_UTF8).getStr()); if ( PyObject *element = PyDict_GetItem(kwinitializer, pyMemberName ) ) { diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 7f03b21dde1a..15615ba48dcb 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -35,11 +35,6 @@ #include <com/sun/star/script/Converter.hpp> #include <com/sun/star/reflection/theCoreReflection.hpp> -using rtl::OUString; -using rtl::OUStringToOString; -using rtl::OUStringBuffer; -using rtl::OStringBuffer; -using rtl::OString; using com::sun::star::uno::Reference; using com::sun::star::uno::XInterface; @@ -915,7 +910,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, PyRef args( PyTuple_New( 1), SAL_NO_ACQUIRE ); PyTuple_SetItem( args.get(), 0, excTraceback.getAcquired() ); PyRef pyStr( PyObject_CallObject( extractTraceback.get(),args.get() ), SAL_NO_ACQUIRE); - str = rtl::OUString::createFromAscii( PyStr_AsString(pyStr.get()) ); + str = OUString::createFromAscii( PyStr_AsString(pyStr.get()) ); } else { @@ -980,7 +975,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, e.Message = buf.makeStringAndClear(); #if OSL_DEBUG_LEVEL > 0 fprintf( stderr, "Python exception: %s\n", - rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); + OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr() ); #endif ret = com::sun::star::uno::makeAny( e ); } @@ -989,7 +984,7 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue, static const char * g_NUMERICID = "pyuno.lcNumeric"; -static ::std::vector< rtl::OString > g_localeList; +static ::std::vector< OString > g_localeList; static const char *ensureUnlimitedLifetime( const char *str ) { diff --git a/pyuno/source/module/pyuno_type.cxx b/pyuno/source/module/pyuno_type.cxx index d03368ab136f..2cd663ca9325 100644 --- a/pyuno/source/module/pyuno_type.cxx +++ b/pyuno/source/module/pyuno_type.cxx @@ -23,11 +23,6 @@ #include <typelib/typedescription.hxx> -using rtl::OString; -using rtl::OUString; -using rtl::OUStringBuffer; -using rtl::OUStringToOString; -using rtl::OStringBuffer; using com::sun::star::uno::TypeClass; using com::sun::star::uno::Type; diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx index 0b0d6ef488a4..1cf1e40b343c 100644 --- a/pyuno/source/module/pyuno_util.cxx +++ b/pyuno/source/module/pyuno_util.cxx @@ -30,11 +30,6 @@ #include <com/sun/star/beans/XMaterialHolder.hpp> -using rtl::OUStringToOString; -using rtl::OUString; -using rtl::OString; -using rtl::OStringBuffer; -using rtl::OUStringBuffer; using com::sun::star::uno::TypeDescription; @@ -127,7 +122,7 @@ bool isLog( RuntimeCargo * cargo, sal_Int32 loglevel ) return cargo && cargo->logFile && loglevel <= cargo->logLevel; } -void log( RuntimeCargo * cargo, sal_Int32 level, const rtl::OUString &logString ) +void log( RuntimeCargo * cargo, sal_Int32 level, const OUString &logString ) { log( cargo, level, OUStringToOString( logString, osl_getThreadTextEncoding() ).getStr() ); } @@ -165,7 +160,7 @@ void log( RuntimeCargo * cargo, sal_Int32 level, const char *str ) namespace { -void appendPointer(rtl::OUStringBuffer & buffer, void * pointer) { +void appendPointer(OUStringBuffer & buffer, void * pointer) { buffer.append( sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >(pointer)), @@ -175,12 +170,12 @@ void appendPointer(rtl::OUStringBuffer & buffer, void * pointer) { } void logException( RuntimeCargo *cargo, const char *intro, - void * ptr, const rtl::OUString &aFunctionName, + void * ptr, const OUString &aFunctionName, const void * data, const com::sun::star::uno::Type & type ) { if( isLog( cargo, LogLevel::CALL ) ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( intro ); appendPointer(buf, ptr); buf.append( "]." ); @@ -197,11 +192,11 @@ void logReply( RuntimeCargo *cargo, const char *intro, void * ptr, - const rtl::OUString & aFunctionName, + const OUString & aFunctionName, const Any &returnValue, const Sequence< Any > & aParams ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( intro ); appendPointer(buf, ptr); buf.append( "]." ); @@ -223,10 +218,10 @@ void logReply( } void logCall( RuntimeCargo *cargo, const char *intro, - void * ptr, const rtl::OUString & aFunctionName, + void * ptr, const OUString & aFunctionName, const Sequence< Any > & aParams ) { - rtl::OUStringBuffer buf( 128 ); + OUStringBuffer buf( 128 ); buf.appendAscii( intro ); appendPointer(buf, ptr); buf.append( "]." ); |