diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2012-09-29 14:47:11 +0200 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-10-01 18:48:05 +0000 |
commit | 36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 (patch) | |
tree | 838cdec72aeea68c3ad78f8d18535afd5408d43a /svtools | |
parent | Unused code cleanup. (diff) | |
download | core-36a2db3722b79ed3df075d7f3fa77fb761bcf5a4.tar.gz core-36a2db3722b79ed3df075d7f3fa77fb761bcf5a4.zip |
Replace usage of rtl_*Memory with equivalent from string.h
Change-Id: I50ffc10f007f03c3252ef0196b59b881429cc159
Reviewed-on: https://gerrit.libreoffice.org/734
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 4 | ||||
-rw-r--r-- | svtools/source/filter/filter.cxx | 2 | ||||
-rw-r--r-- | svtools/source/graphic/graphic.cxx | 2 | ||||
-rw-r--r-- | svtools/source/misc/transfer.cxx | 5 |
4 files changed, 6 insertions, 7 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index e6d63fa3933d..065fa18d2555 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -669,7 +669,7 @@ sal_Int64 SAL_CALL ValueSetAcc::getSomething( const uno::Sequence< sal_Int8 >& r { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == rtl_compareMemory( ValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueSetAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -1217,7 +1217,7 @@ sal_Int64 SAL_CALL ValueItemAcc::getSomething( const uno::Sequence< sal_Int8 >& { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == rtl_compareMemory( ValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ValueItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index 5cd2f8d7fd20..aaacb12884f8 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -1959,7 +1959,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& if ( nChunkLen ) { aChunkData.aData.resize( nChunkLen ); - rtl_copyMemory( &aChunkData.aData[ 0 ], aByteSeq.getConstArray(), nChunkLen ); + memcpy( &aChunkData.aData[ 0 ], aByteSeq.getConstArray(), nChunkLen ); } std::vector< vcl::PNGWriter::ChunkData >::iterator aIter = rChunkData.end() - 1; rChunkData.insert( aIter, aChunkData ); diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index 14a5c32de6d8..9d522d3f8163 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -274,7 +274,7 @@ const ::Graphic* Graphic::getImplementation( const uno::Reference< uno::XInterfa sal_Int64 SAL_CALL Graphic::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw( uno::RuntimeException ) { - return( ( rId.getLength() == 16 && 0 == rtl_compareMemory( ::Graphic::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ? + return( ( rId.getLength() == 16 && 0 == memcmp( ::Graphic::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ? reinterpret_cast< sal_Int64 >( mpGraphic ) : 0 ); } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 8c41222d2193..53b9fd1f5e7f 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -32,7 +32,6 @@ #include <shlobj.h> #endif #include <osl/mutex.hxx> -#include <rtl/memory.h> #include <rtl/uri.hxx> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -610,7 +609,7 @@ sal_Int64 SAL_CALL TransferableHelper::getSomething( const Sequence< sal_Int8 >& sal_Int64 nRet; if( ( rId.getLength() == 16 ) && - ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + ( 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) { nRet = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); } @@ -791,7 +790,7 @@ sal_Bool TransferableHelper::SetString( const ::rtl::OUString& rString, const Da const rtl::OString aByteStr(rtl::OUStringToOString(rString, osl_getThreadTextEncoding())); Sequence< sal_Int8 > aSeq( aByteStr.getLength() + 1 ); - rtl_copyMemory( aSeq.getArray(), aByteStr.getStr(), aByteStr.getLength() ); + memcpy( aSeq.getArray(), aByteStr.getStr(), aByteStr.getLength() ); aSeq[ aByteStr.getLength() ] = 0; maAny <<= aSeq; } |