Kaydet (Commit) acd3b2f0 authored tarafından Arnaud Versini's avatar Arnaud Versini

Replace usage of rtl/memory.h in xmlhelp with their equivalent from string.h

Change-Id: I02a1af9bac1e1283f33bc204cd8737ebd2ebd06c
üst 04710a69
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#define _XMLSEARCH_QE_QUERY_HXX_ #define _XMLSEARCH_QE_QUERY_HXX_
#include <sal/types.h> #include <sal/types.h>
#include <rtl/memory.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <vector> #include <vector>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
* *
************************************************************************/ ************************************************************************/
#include <string.h>
#include <rtl/memory.h> #include <rtl/memory.h>
#include "bufferedinputstream.hxx" #include "bufferedinputstream.hxx"
...@@ -69,10 +70,10 @@ BufferedInputStream::BufferedInputStream(const Reference<XInputStream>& xInputSt ...@@ -69,10 +70,10 @@ BufferedInputStream::BufferedInputStream(const Reference<XInputStream>& xInputSt
{ {
tmp = m_pBuffer; tmp = m_pBuffer;
m_pBuffer = new sal_Int8[m_nBufferSize+num]; m_pBuffer = new sal_Int8[m_nBufferSize+num];
rtl_copyMemory((void *)(m_pBuffer), memcpy((void *)(m_pBuffer),
(void *)(tmp), (void *)(tmp),
sal_uInt32(m_nBufferSize)); sal_uInt32(m_nBufferSize));
rtl_copyMemory((void *)(m_pBuffer+m_nBufferSize), memcpy((void *)(m_pBuffer+m_nBufferSize),
(void *)(aData.getArray()), (void *)(aData.getArray()),
sal_uInt32(num)); sal_uInt32(num));
m_nBufferSize += num; m_nBufferSize += num;
...@@ -142,7 +143,7 @@ sal_Int32 SAL_CALL BufferedInputStream::readBytes( Sequence< sal_Int8 >& aData,s ...@@ -142,7 +143,7 @@ sal_Int32 SAL_CALL BufferedInputStream::readBytes( Sequence< sal_Int8 >& aData,s
if( aData.getLength() < nBytesToRead ) if( aData.getLength() < nBytesToRead )
aData.realloc(nBytesToRead); aData.realloc(nBytesToRead);
rtl_copyMemory((void*)(aData.getArray()), memcpy((void*)(aData.getArray()),
(void*)(m_pBuffer+m_nBufferLocation), (void*)(m_pBuffer+m_nBufferLocation),
nBytesToRead); nBytesToRead);
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <osl/process.h> #include <osl/process.h>
#include <rtl/uri.hxx> #include <rtl/uri.hxx>
#include <osl/file.hxx> #include <osl/file.hxx>
#include <rtl/memory.h>
#include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/Locale.hpp>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include "inputstream.hxx" #include "inputstream.hxx"
...@@ -1197,11 +1196,11 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount ...@@ -1197,11 +1196,11 @@ void Databases::popupDocument( URLParameter* urlPar,char **buffer,int *byteCount
*buffer = new char[ 1+*byteCount ]; *buffer = new char[ 1+*byteCount ];
rtl_copyMemory( *buffer,pop1,l1 ); memcpy( *buffer,pop1,l1 );
rtl_copyMemory( *buffer+l1,pop2,l2 ); memcpy( *buffer+l1,pop2,l2 );
rtl_copyMemory( *buffer+(l1+l2),pop3,l3 ); memcpy( *buffer+(l1+l2),pop3,l3 );
rtl_copyMemory( *buffer+(l1+l2+l3),pop4,l4 ); memcpy( *buffer+(l1+l2+l3),pop4,l4 );
rtl_copyMemory( *buffer+(l1+l2+l3+l4),pop5,l5 ); memcpy( *buffer+(l1+l2+l3+l4),pop5,l5 );
(*buffer)[*byteCount] = 0; (*buffer)[*byteCount] = 0;
} }
...@@ -1306,7 +1305,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language, ...@@ -1306,7 +1305,7 @@ void Databases::cascadingStylesheet( const rtl::OUString& Language,
*byteCount = m_nCustomCSSDocLength; *byteCount = m_nCustomCSSDocLength;
*buffer = new char[ 1 + *byteCount ]; *buffer = new char[ 1 + *byteCount ];
(*buffer)[*byteCount] = 0; (*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, ...@@ -1377,7 +1376,7 @@ void Databases::setActiveText( const rtl::OUString& Module,
*byteCount = nSize; *byteCount = nSize;
*buffer = new char[ 1 + nSize ]; *buffer = new char[ 1 + nSize ];
(*buffer)[nSize] = 0; (*buffer)[nSize] = 0;
rtl_copyMemory( *buffer, pData, nSize ); memcpy( *buffer, pData, nSize );
} }
else else
{ {
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <string.h> #include <string.h>
#include <osl/diagnose.hxx> #include <osl/diagnose.hxx>
#include <osl/thread.h> #include <osl/thread.h>
#include <rtl/memory.h>
#include <osl/file.hxx> #include <osl/file.hxx>
#include <cppuhelper/weak.hxx> #include <cppuhelper/weak.hxx>
#include <cppuhelper/queryinterface.hxx> #include <cppuhelper/queryinterface.hxx>
...@@ -1206,8 +1205,8 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ ) ...@@ -1206,8 +1205,8 @@ void InputStreamTransformer::addToBuffer( const char* buffer_,int len_ )
char* tmp = buffer; char* tmp = buffer;
buffer = new char[ len+len_ ]; buffer = new char[ len+len_ ];
rtl_copyMemory( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) ); memcpy( (void*)(buffer),(void*)(tmp),sal_uInt32( len ) );
rtl_copyMemory( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) ); memcpy( (void*)(buffer+len),(void*)(buffer_),sal_uInt32( len_ ) );
delete[] tmp; delete[] tmp;
len += len_; len += len_;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment