From acd3b2f07026a78a0b819dae0a4a308d115bb1b5 Mon Sep 17 00:00:00 2001 From: Arnaud Versini Date: Sun, 29 Jul 2012 14:42:26 +0200 Subject: Replace usage of rtl/memory.h in xmlhelp with their equivalent from string.h Change-Id: I02a1af9bac1e1283f33bc204cd8737ebd2ebd06c --- xmlhelp/source/cxxhelp/inc/qe/Query.hxx | 1 - xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx | 7 ++++--- xmlhelp/source/cxxhelp/provider/databases.cxx | 15 +++++++-------- xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 5 ++--- 4 files changed, 13 insertions(+), 15 deletions(-) (limited to 'xmlhelp') diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx index 9aa5e95b8c0d..9a3eb4810e5f 100644 --- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx +++ b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx @@ -20,7 +20,6 @@ #define _XMLSEARCH_QE_QUERY_HXX_ #include -#include #include #include diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx index 4384a2cfedca..ef84cc86cbb7 100644 --- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx +++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx @@ -26,6 +26,7 @@ * ************************************************************************/ +#include #include #include "bufferedinputstream.hxx" @@ -69,10 +70,10 @@ BufferedInputStream::BufferedInputStream(const Reference& xInputSt { tmp = m_pBuffer; m_pBuffer = new sal_Int8[m_nBufferSize+num]; - rtl_copyMemory((void *)(m_pBuffer), + memcpy((void *)(m_pBuffer), (void *)(tmp), sal_uInt32(m_nBufferSize)); - rtl_copyMemory((void *)(m_pBuffer+m_nBufferSize), + memcpy((void *)(m_pBuffer+m_nBufferSize), (void *)(aData.getArray()), sal_uInt32(num)); m_nBufferSize += num; @@ -142,7 +143,7 @@ sal_Int32 SAL_CALL BufferedInputStream::readBytes( Sequence< sal_Int8 >& aData,s if( aData.getLength() < nBytesToRead ) aData.realloc(nBytesToRead); - rtl_copyMemory((void*)(aData.getArray()), + memcpy((void*)(aData.getArray()), (void*)(m_pBuffer+m_nBufferLocation), nBytesToRead); diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx index 2abd91bb77f2..51ef2cb2ebce 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.cxx +++ b/xmlhelp/source/cxxhelp/provider/databases.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include "inputstream.hxx" @@ -1197,11 +1196,11 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount *buffer = new char[ 1+*byteCount ]; - rtl_copyMemory( *buffer,pop1,l1 ); - rtl_copyMemory( *buffer+l1,pop2,l2 ); - rtl_copyMemory( *buffer+(l1+l2),pop3,l3 ); - rtl_copyMemory( *buffer+(l1+l2+l3),pop4,l4 ); - rtl_copyMemory( *buffer+(l1+l2+l3+l4),pop5,l5 ); + memcpy( *buffer,pop1,l1 ); + memcpy( *buffer+l1,pop2,l2 ); + memcpy( *buffer+(l1+l2),pop3,l3 ); + memcpy( *buffer+(l1+l2+l3),pop4,l4 ); + memcpy( *buffer+(l1+l2+l3+l4),pop5,l5 ); (*buffer)[*byteCount] = 0; } @@ -1306,7 +1305,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, *byteCount = m_nCustomCSSDocLength; *buffer = new char[ 1 + *byteCount ]; (*buffer)[*byteCount] = 0; - rtl_copyMemory( *buffer,m_pCustomCSSDoc,m_nCustomCSSDocLength ); + memcpy( *buffer,m_pCustomCSSDoc,m_nCustomCSSDocLength ); } @@ -1377,7 +1376,7 @@ void Databases::setActiveText( const rtl::OUString& Module, *byteCount = nSize; *buffer = new char[ 1 + nSize ]; (*buffer)[nSize] = 0; - rtl_copyMemory( *buffer, pData, nSize ); + memcpy( *buffer, pData, nSize ); } else { diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx index fddd2acacf79..2060c3dab3cd 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -1206,8 +1205,8 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ ) char* tmp = buffer; buffer = new char[ len+len_ ]; - rtl_copyMemory( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) ); - rtl_copyMemory( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) ); + memcpy( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) ); + memcpy( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) ); delete[] tmp; len += len_; } -- cgit