diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 04:04:45 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2006-06-20 04:04:45 +0000 |
commit | d7506393cf726c9d49ae69458a41937c51618663 (patch) | |
tree | 139e99eae954deb7eedeee442ac406b6a09b3e28 /pyuno/source/module/pyuno_util.cxx | |
parent | dae1234edeb6808955fc2ce5172fa189ab2b264c (diff) |
INTEGRATION: CWS warnings01 (1.3.14); FILE MERGED
2006/04/20 14:46:09 sb 1.3.14.4: #i53898# Made code warning-free again after resync to SRC680m162.
2006/04/07 21:24:45 sb 1.3.14.3: RESYNC: (1.4-1.5); FILE MERGED
2005/09/23 02:09:43 sb 1.3.14.2: RESYNC: (1.3-1.4); FILE MERGED
2005/09/09 15:31:23 sb 1.3.14.1: #i53898# Made code warning-free.
Diffstat (limited to 'pyuno/source/module/pyuno_util.cxx')
-rw-r--r-- | pyuno/source/module/pyuno_util.cxx | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/pyuno/source/module/pyuno_util.cxx b/pyuno/source/module/pyuno_util.cxx index a683e9e63c00..16c518a996b1 100644 --- a/pyuno/source/module/pyuno_util.cxx +++ b/pyuno/source/module/pyuno_util.cxx @@ -4,9 +4,9 @@ * * $RCSfile: pyuno_util.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-03-22 10:52:11 $ + * last change: $Author: hr $ $Date: 2006-06-20 05:04:45 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -32,6 +32,9 @@ * MA 02111-1307 USA * ************************************************************************/ + +#include "pyuno_impl.hxx" + #include <time.h> #include <osl/thread.h> @@ -43,9 +46,6 @@ #include <com/sun/star/beans/XMaterialHolder.hpp> -#include "pyuno_impl.hxx" - - using rtl::OUStringToOString; using rtl::OUString; using rtl::OString; @@ -167,15 +167,26 @@ void log( RuntimeCargo * cargo, sal_Int32 level, const char *str ) } } +namespace { + +void appendPointer(rtl::OUStringBuffer & buffer, void * pointer) { + buffer.append( + sal::static_int_cast< sal_Int64 >( + reinterpret_cast< sal_IntPtr >(pointer)), + 16); +} + +} + void logException( RuntimeCargo *cargo, const char *intro, - sal_Int64 ptr, const rtl::OUString &aFunctionName, + void * ptr, const rtl::OUString &aFunctionName, const void * data, const com::sun::star::uno::Type & type ) { if( isLog( cargo, LogLevel::CALL ) ) { rtl::OUStringBuffer buf( 128 ); buf.appendAscii( intro ); - buf.append( ptr , 16); + appendPointer(buf, ptr); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") ); buf.append( aFunctionName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM( " = " ) ); @@ -189,14 +200,14 @@ void logException( RuntimeCargo *cargo, const char *intro, void logReply( RuntimeCargo *cargo, const char *intro, - sal_Int64 ptr, + void * ptr, const rtl::OUString & aFunctionName, const Any &returnValue, const Sequence< Any > & aParams ) { rtl::OUStringBuffer buf( 128 ); buf.appendAscii( intro ); - buf.append( (sal_Int64) ptr, 16); + appendPointer(buf, ptr); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") ); buf.append( aFunctionName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("()=") ); @@ -216,11 +227,12 @@ void logReply( } void logCall( RuntimeCargo *cargo, const char *intro, - sal_Int64 ptr, const rtl::OUString & aFunctionName, const Sequence< Any > & aParams ) + void * ptr, const rtl::OUString & aFunctionName, + const Sequence< Any > & aParams ) { rtl::OUStringBuffer buf( 128 ); buf.appendAscii( intro ); - buf.append( (sal_Int64) ptr, 16); + appendPointer(buf, ptr); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("].") ); buf.append( aFunctionName ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("(") ); |