summaryrefslogtreecommitdiff
path: root/dtrans/source/win32
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-09-29 14:47:11 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-10-01 18:48:05 +0000
commit36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 (patch)
tree838cdec72aeea68c3ad78f8d18535afd5408d43a /dtrans/source/win32
parent053b68a0c7b75eae7d86d4465f65abc6046515ee (diff)
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 'dtrans/source/win32')
-rw-r--r--dtrans/source/win32/dtobj/FmtFilter.cxx14
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx8
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx2
3 files changed, 13 insertions, 11 deletions
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx
index 909fd28a219f..516870bd7b7e 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/dtrans/source/win32/dtobj/FmtFilter.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <string.h>
+
#include "FmtFilter.hxx"
#include <osl/diagnose.h>
#include <comphelper/sequence.hxx>
@@ -199,7 +201,7 @@ Sequence< sal_Int8 > SAL_CALL WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB
BITMAPFILEHEADER *pBmpFileHdr = reinterpret_cast< BITMAPFILEHEADER* >( ooBmpStream.getArray() );
DWORD nOffset = sizeof( BITMAPFILEHEADER ) + sizeof( BITMAPINFOHEADER );
- rtl_copyMemory( pBmpFileHdr + 1, pBmpInfoHdr, aWinDIB.getLength( ) );
+ memcpy( pBmpFileHdr + 1, pBmpInfoHdr, aWinDIB.getLength( ) );
if( pBmpInfoHdr->biBitCount <= 8 )
nOffset += ( pBmpInfoHdr->biClrUsed ? pBmpInfoHdr->biClrUsed : ( 1 << pBmpInfoHdr->biBitCount ) ) << 2;
@@ -226,7 +228,7 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp )
Sequence< sal_Int8 > winDIBStream( aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
- rtl_copyMemory( winDIBStream.getArray( ),
+ memcpy( winDIBStream.getArray( ),
aOOBmp.getArray( ) + sizeof( BITMAPFILEHEADER ),
aOOBmp.getLength( ) - sizeof( BITMAPFILEHEADER ) );
@@ -328,12 +330,12 @@ Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextH
rtl_zeroMemory( aHTMLFmtSequence.getArray( ), aHTMLFmtSequence.getLength( ) );
// copy the HTML Format header
- rtl_copyMemory(
+ memcpy(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) ),
static_cast< LPVOID >( aHTMLFmtHdr ), lHTMLFmtHdr );
// concat the text/html
- rtl_copyMemory(
+ memcpy(
static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) + lHTMLFmtHdr ),
static_cast< LPVOID >( aTextHtml.getArray( ) ),
aTextHtml.getLength( ) );
@@ -391,9 +393,9 @@ Sequence<sal_Int8> SAL_CALL TextHtmlToHTMLFormat(Sequence<sal_Int8>& aTextHtml)
htmlFormat += textHtml;
Sequence<sal_Int8> byteSequence(htmlFormat.length() + 1); // space the trailing '\0'
- rtl_zeroMemory(byteSequence.getArray(), byteSequence.getLength());
+ memset(byteSequence.getArray(), 0, byteSequence.getLength());
- rtl_copyMemory(
+ memcpy(
static_cast<void*>(byteSequence.getArray()),
static_cast<const void*>(htmlFormat.c_str()),
htmlFormat.length());
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index 93f0ba198468..d85674dc6375 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -20,9 +20,9 @@
#include <osl/diagnose.h>
#include "ImplHelper.hxx"
#include <rtl/tencinfo.h>
-#include <rtl/memory.h>
-
+#include <string.h>
#include <memory>
+
#if defined _MSC_VER
#pragma warning(push,1)
#endif
@@ -259,7 +259,7 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
if ( NULL != ptdSrc )
{
ptdDest = static_cast< DVTARGETDEVICE* >( CoTaskMemAlloc( ptdSrc->tdSize ) );
- rtl_copyMemory( ptdDest, ptdSrc, static_cast< size_t >( ptdSrc->tdSize ) );
+ memcpy( ptdDest, ptdSrc, static_cast< size_t >( ptdSrc->tdSize ) );
}
}
#ifdef __MINGW32__
@@ -450,7 +450,7 @@ sal_Bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE*
if ( ptdLeft->tdSize == ptdRight->tdSize )
- if ( rtl_compareMemory( ptdLeft, ptdRight, ptdLeft->tdSize ) == 0 )
+ if ( memcmp( ptdLeft, ptdRight, ptdLeft->tdSize ) == 0 )
bRet = sal_True;
}
#ifdef __MINGW32__
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx
index 6cc69e2e706b..9839af5d7832 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/dtrans/source/win32/workbench/test_wincb.cxx
@@ -182,7 +182,7 @@ Any SAL_CALL CTransferable::getTransferData( const DataFlavor& aFlavor )
Sequence< sal_Int8 > textStream( text.getLength( ) + 1 );
- rtl_copyMemory( textStream.getArray( ), text.getStr( ), textStream.getLength( ) );
+ memcpy( textStream.getArray( ), text.getStr( ), textStream.getLength( ) );
anyData = makeAny( textStream );
}