diff options
120 files changed, 187 insertions, 202 deletions
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx index 759ed9687bcf..cde2949538e7 100644 --- a/accessibility/source/standard/vclxaccessibletoolbox.cxx +++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> + #include <accessibility/standard/vclxaccessibletoolbox.hxx> #include <accessibility/standard/vclxaccessibletoolboxitem.hxx> #include <toolkit/helper/convert.hxx> @@ -164,7 +166,7 @@ namespace sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) throw (RuntimeException) { if ( ( 16 == _rId.getLength() ) - && ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) ) + && ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) ) ) return reinterpret_cast< sal_Int64>( this ); diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index a194dcc53eb5..36eeb6cd761d 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -52,6 +52,7 @@ #include <osl/mutex.hxx> #include <list> #include <algorithm> +#include <string.h> using ::osl::Mutex; using ::osl::Guard; @@ -2018,7 +2019,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis // XUnoTunnel ::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId ) throw (RuntimeException) { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 422a9d80eba2..d4b8c5f12b85 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -677,7 +677,7 @@ void implCopyStreamToByteSequence( Reference< XInputStream > xStream, sal_Int32 nPos = bytes.getLength(); bytes.realloc( nPos + nRead ); - ::rtl_copyMemory( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); + memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); } } @@ -810,8 +810,8 @@ void DlgEditor::Copy() pCombinedData[i] = sal_Int8( n & 0xff ); n >>= 8; } - ::rtl_copyMemory( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen ); - ::rtl_copyMemory( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen ); + memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen ); + memcpy( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen ); Any aCombinedDataAny; aCombinedDataAny <<= aCombinedData; @@ -905,10 +905,10 @@ void DlgEditor::Paste() sal_Int32 nDialogDataLen = nTotalLen - nResDataLen - 4; DialogModelBytes.realloc( nDialogDataLen ); - ::rtl_copyMemory( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen ); + memcpy( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen ); aResData.realloc( nResDataLen ); - ::rtl_copyMemory( aResData.getArray(), pCombinedData + nResOffset, nResDataLen ); + memcpy( aResData.getArray(), pCombinedData + nResOffset, nResDataLen ); } else { diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index 82a430fe3daa..5ed17967df39 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> + #include "basebmp/bitmapdevice.hxx" #include "basebmp/compositeiterator.hxx" @@ -47,7 +49,6 @@ #include "intconversion.hxx" #include <rtl/alloc.h> -#include <rtl/memory.h> #include <osl/diagnose.h> #include <basegfx/tools/tools.hxx> @@ -1892,7 +1893,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& &rtl_freeMemory ); if (pMem.get() == 0 && nMemSize != 0) return BitmapDeviceSharedPtr(); - rtl_zeroMemory(pMem.get(),nMemSize); + memset(pMem.get(), 0, nMemSize); } sal_uInt8* pFirstScanline = nScanlineStride < 0 ? diff --git a/basegfx/inc/basegfx/raster/bpixelraster.hxx b/basegfx/inc/basegfx/raster/bpixelraster.hxx index 6f3379546385..9d95b3f40769 100644 --- a/basegfx/inc/basegfx/raster/bpixelraster.hxx +++ b/basegfx/inc/basegfx/raster/bpixelraster.hxx @@ -32,7 +32,6 @@ #include <algorithm> #include <sal/types.h> #include <basegfx/pixel/bpixel.hxx> -#include <rtl/memory.h> #include <basegfx/basegfxdllapi.h> ////////////////////////////////////////////////////////////////////////////// @@ -59,7 +58,7 @@ namespace basegfx // reset void reset() { - rtl_zeroMemory(mpContent, sizeof(BPixel) * mnCount); + memset(mpContent, 0, sizeof(BPixel) * mnCount); } // constructor/destructor diff --git a/basegfx/inc/basegfx/raster/bzpixelraster.hxx b/basegfx/inc/basegfx/raster/bzpixelraster.hxx index 2f161b687144..a3e1db61d087 100644 --- a/basegfx/inc/basegfx/raster/bzpixelraster.hxx +++ b/basegfx/inc/basegfx/raster/bzpixelraster.hxx @@ -30,7 +30,6 @@ #define _BGFX_RASTER_BZPIXELRASTER_HXX #include <basegfx/raster/bpixelraster.hxx> -#include <rtl/memory.h> #include <basegfx/basegfxdllapi.h> ////////////////////////////////////////////////////////////////////////////// @@ -51,7 +50,7 @@ namespace basegfx void resetZ() { reset(); - rtl_zeroMemory(mpZBuffer, sizeof(sal_uInt16) * mnCount); + memset(mpZBuffer, 0, sizeof(sal_uInt16) * mnCount); } // constructor/destructor @@ -59,7 +58,7 @@ namespace basegfx : BPixelRaster(nWidth, nHeight), mpZBuffer(new sal_uInt16[mnCount]) { - rtl_zeroMemory(mpZBuffer, sizeof(sal_uInt16) * mnCount); + memset(mpZBuffer, 0, sizeof(sal_uInt16) * mnCount); } ~BZPixelRaster() diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 7f5c691da472..3bd3a52438b2 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -2009,7 +2009,7 @@ uno::Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog ) uno::Sequence< sal_Int8 > aData( nLen ); sal_Int8* pDestData = aData.getArray(); const sal_Int8* pSrcData = (const sal_Int8*)aMemStream.GetData(); - rtl_copyMemory( pDestData, pSrcData, nLen ); + memcpy( pDestData, pSrcData, nLen ); return aData; } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 7f2753ad8b61..d03b8a67d58d 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> #include <vcl/dialog.hxx> #include <vcl/edit.hxx> #include <vcl/button.hxx> @@ -435,14 +436,14 @@ sal_uIntPtr UCBStream::GetData( void* pData, sal_uIntPtr nSize ) { Sequence<sal_Int8> aData; nSize = xIS->readBytes( aData, nSize ); - rtl_copyMemory( pData, aData.getConstArray(), nSize ); + memcpy( pData, aData.getConstArray(), nSize ); return nSize; } else if( xS.is() && (xISFromS = xS->getInputStream()).is() ) { Sequence<sal_Int8> aData; nSize = xISFromS->readBytes( aData, nSize ); - rtl_copyMemory( pData, aData.getConstArray(), nSize ); + memcpy(pData, aData.getConstArray(), nSize ); return nSize; } else diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index cdd4b9ef6b56..393dc7771238 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -639,7 +639,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, sal_Int32 nSize = (sal_Int32)aMemStream.Tell(); Sequence< sal_Int8 > aBinSeq( nSize ); sal_Int8* pData = aBinSeq.getArray(); - ::rtl_copyMemory( pData, aMemStream.GetData(), nSize ); + memcpy( pData, aMemStream.GetData(), nSize ); Reference< XOutputStream > xOut = xCodeStream->getOutputStream(); if ( !xOut.is() ) @@ -775,7 +775,7 @@ sal_Bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, sal_Int32 nSize = (sal_Int32)aMemStream.Tell(); Sequence< sal_Int8 > aBinSeq( nSize ); sal_Int8* pData = aBinSeq.getArray(); - ::rtl_copyMemory( pData, aMemStream.GetData(), nSize ); + memcpy( pData, aMemStream.GetData(), nSize ); Reference< XOutputStream > xOut = xCodeStream->getOutputStream(); if ( xOut.is() ) diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx index 664208a517ab..dbbaf85e6c4c 100644 --- a/binaryurp/source/writer.cxx +++ b/binaryurp/source/writer.cxx @@ -21,13 +21,13 @@ #include <exception> #include <vector> +#include <string.h> #include "com/sun/star/connection/XConnection.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/uno/XCurrentContext.hpp" #include "cppuhelper/exc_hlp.hxx" #include "osl/mutex.hxx" -#include "rtl/memory.h" #include "uno/dispatcher.hxx" #include "binaryany.hxx" @@ -421,10 +421,10 @@ void Writer::sendMessage(std::vector< unsigned char > const & buffer) { css::uno::Sequence< sal_Int8 > s( static_cast< sal_Int32 >(header.size() + k)); OSL_ASSERT(!header.empty()); - rtl_copyMemory( + memcpy( s.getArray(), &header[0], static_cast< sal_Size >(header.size())); for (;;) { - rtl_copyMemory(s.getArray() + s.getLength() - k, p, k); + memcpy(s.getArray() + s.getLength() - k, p, k); try { bridge_->getConnection()->write(s); } catch (const css::io::IOException & e) { diff --git a/bridges/source/jni_uno/nativethreadpool.cxx b/bridges/source/jni_uno/nativethreadpool.cxx index a1e623a9cc66..969d91bb4e80 100644 --- a/bridges/source/jni_uno/nativethreadpool.cxx +++ b/bridges/source/jni_uno/nativethreadpool.cxx @@ -27,10 +27,10 @@ ************************************************************************/ +#include <string.h> #include "jvmaccess/virtualmachine.hxx" #include "rtl/byteseq.h" #include "rtl/byteseq.hxx" -#include "rtl/memory.h" #include "rtl/ref.hxx" #include "sal/types.h" #include "uno/threadpool.h" @@ -111,7 +111,7 @@ Java_com_sun_star_lib_uno_environments_remote_NativeThreadPool_threadId( if (p == 0) { return 0; } - rtl_copyMemory(p, seq.getConstArray(), n); + memcpy(p, seq.getConstArray(), n); // sal_Int8 and jbyte ought to be compatible env->ReleasePrimitiveArrayCritical(a, p, 0); return a; diff --git a/canvas/source/directx/dx_9rm.cxx b/canvas/source/directx/dx_9rm.cxx index 8d3ffd8b2755..e67898c07ba8 100644 --- a/canvas/source/directx/dx_9rm.cxx +++ b/canvas/source/directx/dx_9rm.cxx @@ -38,6 +38,7 @@ // vertex buffer (must be divisable // by 3, as each triangle primitive // has 3 vertices) +#include <string.h> #include <vcl/syschild.hxx> #include <vcl/window.hxx> @@ -439,7 +440,7 @@ namespace dxcanvas for(sal_uInt32 i=0; i<nNumLines; ++i) { - rtl_copyMemory(pDst,pImage,nNumBytesToCopy); + memcpy(pDst,pImage,nNumBytesToCopy); if( bClearRightColumn ) { @@ -458,7 +459,7 @@ namespace dxcanvas } if( bClearBottomRow ) - rtl_zeroMemory(pDst,nNumBytesToCopy+4); + memset(pDst, 0, nNumBytesToCopy+4); } break; @@ -498,7 +499,7 @@ namespace dxcanvas } if( bClearBottomRow ) - rtl_zeroMemory(pDst,4*(nNumColumns+1)); + memset(pDst, 0, 4*(nNumColumns+1)); } break; @@ -531,7 +532,7 @@ namespace dxcanvas } if( bClearBottomRow ) - rtl_zeroMemory(pDst,4*(nNumColumns+1)); + memset(pDst, 0, 4*(nNumColumns+1)); } break; diff --git a/canvas/source/directx/dx_surfacebitmap.cxx b/canvas/source/directx/dx_surfacebitmap.cxx index 8a416b380d3f..c45d5af9fa79 100644 --- a/canvas/source/directx/dx_surfacebitmap.cxx +++ b/canvas/source/directx/dx_surfacebitmap.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> #include "dx_surfacebitmap.hxx" #include "dx_impltools.hxx" @@ -83,7 +84,7 @@ namespace dxcanvas sal_uInt8* DXColorBuffer::lock() const { #if DIRECTX_VERSION < 0x0900 - rtl_zeroMemory((void *)&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset((void *)&aSurfaceDesc, 0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_READONLY; if(SUCCEEDED(mpSurface->Lock(NULL,&aSurfaceDesc,dwFlags,NULL))) @@ -344,7 +345,7 @@ namespace dxcanvas #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory(&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset(&aSurfaceDesc, 0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_READONLY; @@ -468,7 +469,7 @@ namespace dxcanvas { #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory( &aSurfaceDesc,sizeof(DDSURFACEDESC) ); + memset( &aSurfaceDesc, 0, sizeof(DDSURFACEDESC) ); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); if( FAILED(mpSurface->Lock( NULL, @@ -541,7 +542,7 @@ namespace dxcanvas #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory(&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset(&aSurfaceDesc,0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_READONLY; @@ -554,7 +555,7 @@ namespace dxcanvas sal_uInt32 nSegmentSizeInBytes = nWidth<<4; for(sal_uInt32 y=0; y<nHeight; ++y) { - rtl_copyMemory(pDst,pSrc,nSegmentSizeInBytes); + memcpy(pDst,pSrc,nSegmentSizeInBytes); pDst += nSegmentSizeInBytes; pSrc += aSurfaceDesc.lPitch; } @@ -570,7 +571,7 @@ namespace dxcanvas sal_uInt32 nSegmentSizeInBytes = nWidth<<4; for(sal_uInt32 y=0; y<nHeight; ++y) { - rtl_copyMemory(pDst,pSrc,nSegmentSizeInBytes); + memcpy(pDst,pSrc,nSegmentSizeInBytes); pDst += nSegmentSizeInBytes; pSrc += aLockedRect.Pitch; } @@ -623,7 +624,7 @@ namespace dxcanvas #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory(&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset(&aSurfaceDesc, 0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_WRITEONLY; @@ -636,7 +637,7 @@ namespace dxcanvas sal_uInt32 nSegmentSizeInBytes = nWidth<<4; for(sal_uInt32 y=0; y<nHeight; ++y) { - rtl_copyMemory(pDst,pSrc,nSegmentSizeInBytes); + memcpy(pDst,pSrc,nSegmentSizeInBytes); pSrc += nSegmentSizeInBytes; pDst += aSurfaceDesc.lPitch; } @@ -653,7 +654,7 @@ namespace dxcanvas sal_uInt32 nSegmentSizeInBytes = nWidth<<4; for(sal_uInt32 y=0; y<nHeight; ++y) { - rtl_copyMemory(pDst,pSrc,nSegmentSizeInBytes); + memcpy(pDst,pSrc,nSegmentSizeInBytes); pSrc += nSegmentSizeInBytes; pDst += aLockedRect.Pitch; } @@ -703,7 +704,7 @@ namespace dxcanvas #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory(&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset(&aSurfaceDesc, 0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_WRITEONLY; @@ -761,7 +762,7 @@ namespace dxcanvas #if DIRECTX_VERSION < 0x0900 DDSURFACEDESC aSurfaceDesc; - rtl_zeroMemory(&aSurfaceDesc,sizeof(DDSURFACEDESC)); + memset(&aSurfaceDesc, 0, sizeof(DDSURFACEDESC)); aSurfaceDesc.dwSize = sizeof(DDSURFACEDESC); const DWORD dwFlags = DDLOCK_NOSYSLOCK|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WAIT|DDLOCK_READONLY; diff --git a/canvas/source/null/null_canvasfont.cxx b/canvas/source/null/null_canvasfont.cxx index 838e9256e95a..22a5d738a2c4 100644 --- a/canvas/source/null/null_canvasfont.cxx +++ b/canvas/source/null/null_canvasfont.cxx @@ -26,7 +26,6 @@ * ************************************************************************/ - #include "null_canvasfont.hxx" #include "null_textlayout.hxx" #include "null_spritecanvas.hxx" diff --git a/chart2/source/controller/main/ChartRenderer.cxx b/chart2/source/controller/main/ChartRenderer.cxx index 74869c26353b..93d66e9c3121 100644 --- a/chart2/source/controller/main/ChartRenderer.cxx +++ b/chart2/source/controller/main/ChartRenderer.cxx @@ -140,7 +140,7 @@ bool ChartRenderer::DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObject ::sal_Int64 SAL_CALL ChartRenderer::getSomething( const Sequence< ::sal_Int8 >& aIdentifier ) throw( uno::RuntimeException) { - if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( + if( aIdentifier.getLength() == 16 && 0 == memcmp( ChartPrettyPainter::getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index ff09525040b5..053bf079df4a 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -1286,7 +1286,7 @@ Reference< util::XNumberFormatsSupplier > ChartModel::impl_getNumberFormatsSuppl ::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier ) throw( uno::RuntimeException) { - if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(), + if( aIdentifier.getLength() == 16 && 0 == memcmp( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { Reference< lang::XUnoTunnel > xTunnel( impl_getNumberFormatsSupplier(), uno::UNO_QUERY ); diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 763994e1a131..ab2ea1ca1d97 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -359,7 +359,7 @@ uno::Sequence< datatransfer::DataFlavor > SAL_CALL ChartView::getTransferDataFla ::sal_Int64 SAL_CALL ChartView::getSomething( const uno::Sequence< ::sal_Int8 >& aIdentifier ) throw( uno::RuntimeException) { - if( aIdentifier.getLength() == 16 && 0 == rtl_compareMemory( ExplicitValueProvider::getUnoTunnelId().getConstArray(), + if( aIdentifier.getLength() == 16 && 0 == memcmp( ExplicitValueProvider::getUnoTunnelId().getConstArray(), aIdentifier.getConstArray(), 16 ) ) { ExplicitValueProvider* pProvider = this; diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx index bfc71f6de6a4..9130fd17ff8f 100644 --- a/codemaker/source/codemaker/global.cxx +++ b/codemaker/source/codemaker/global.cxx @@ -194,7 +194,7 @@ sal_Bool checkFileContent(const OString& targetFileName, const OString& tmpFileN if ( n1 != n2 ) bFindChanges = sal_True; else - if ( rtl_compareMemory(buffer1, buffer2, n2) != 0 ) + if ( memcmp(buffer1, buffer2, n2) != 0 ) bFindChanges = sal_True; } } diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index df1b93f7c057..a01040146e18 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -27,7 +27,6 @@ #include <osl/interlck.h> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <rtl/memory.h> #include <rtl/instance.hxx> #include <typelib/typedescription.h> diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx index a270f6e6f75e..a3a26bf08ba9 100644 --- a/cppu/source/uno/eq.hxx +++ b/cppu/source/uno/eq.hxx @@ -20,7 +20,6 @@ #define EQ_HXX #include <math.h> -#include <rtl/memory.h> #include "prim.hxx" #include "destr.hxx" diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 136992e1750d..a75a155441b3 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -455,7 +455,7 @@ void SAL_CALL ORowSet::release() throw() // com::sun::star::XUnoTunnel sal_Int64 SAL_CALL ORowSet::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; @@ -2909,7 +2909,7 @@ Sequence< sal_Int8 > ORowSetClone::getUnoTunnelImplementationId() // com::sun::star::XUnoTunnel sal_Int64 SAL_CALL ORowSetClone::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index a3d35e281162..55aa752d4f00 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -318,7 +318,7 @@ IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(OSingleSelectQueryComposer) sal_Int64 SAL_CALL OSingleSelectQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OSingleSelectQueryComposer::getSomething" ); - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return sal_Int64(0); diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index c7a9a12a2621..30eee81a9976 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> #include "TableDeco.hxx" #include <definitioncolumn.hxx> @@ -496,7 +497,7 @@ Reference< XNameAccess> ODBTableDecorator::getColumns() throw (RuntimeException) sal_Int64 SAL_CALL ODBTableDecorator::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTableDecorator::getSomething" ); - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); sal_Int64 nRet = 0; diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx index 1c72c7800e84..336e726d65bb 100644 --- a/dbaccess/source/core/api/querycomposer.cxx +++ b/dbaccess/source/core/api/querycomposer.cxx @@ -115,7 +115,7 @@ Sequence< sal_Int8 > SAL_CALL OQueryComposer::getImplementationId() throw (Runti sal_Int64 SAL_CALL OQueryComposer::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OQueryComposer::getSomething" ); - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index a1bef51c0a7b..8b6db104e3c3 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> #include "querydescriptor.hxx" #include "apitools.hxx" @@ -154,7 +155,7 @@ sal_Int64 SAL_CALL OQueryDescriptor_Base::getSomething( const Sequence< sal_Int8 if (_rIdentifier.getLength() != 16) return 0; - if (0 == rtl_compareMemory(getImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) + if (0 == memcmp(getImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 818a388a45c1..2bb0e7d53a7a 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -18,6 +18,8 @@ */ +#include <string.h> + #include "table.hxx" #include <definitioncolumn.hxx> #include "dbastrings.hrc" @@ -343,7 +345,7 @@ sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) thr { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ODBTable::getSomething" ); sal_Int64 nRet(0); - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) nRet = reinterpret_cast<sal_Int64>(this); else nRet = OTable_Base::getSomething(rId); diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 5cbf8c6524a3..fed2637e58f7 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -590,7 +590,7 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent // com::sun::star::lang::XUnoTunnel sal_Int64 OContentHelper::getSomething( const Sequence< sal_Int8 > & rId ) throw (RuntimeException) { - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index 4d8f3babc9a8..4ca37127c2ca 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -720,7 +720,7 @@ void ODatabaseContext::databaseDocumentURLChange( const ::rtl::OUString& _rOldUR sal_Int64 SAL_CALL ODatabaseContext::getSomething( const Sequence< sal_Int8 >& rId ) throw(RuntimeException) { - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index a77df938f369..3a8ac73c81bb 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -69,7 +69,6 @@ #include <connectivity/dbtools.hxx> #include <connectivity/dbconversion.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <comphelper/extract.hxx> #include <comphelper/servicehelper.hxx> #include <com/sun/star/sdbcx/XTablesSupplier.hpp> @@ -588,7 +587,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException) //------------------------------------------------------------------ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId ) throw(::com::sun::star::uno::RuntimeException) { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast< sal_Int64 >( this ); return FmXGridPeer::getSomething(rId); diff --git a/dbaccess/source/ui/querydesign/JoinExchange.cxx b/dbaccess/source/ui/querydesign/JoinExchange.cxx index 82100a1e053a..9614c49c94db 100644 --- a/dbaccess/source/ui/querydesign/JoinExchange.cxx +++ b/dbaccess/source/ui/querydesign/JoinExchange.cxx @@ -112,7 +112,7 @@ namespace dbaui //------------------------------------------------------------------------ sal_Int64 SAL_CALL OJoinExchObj::getSomething( const Sequence< sal_Int8 >& _rIdentifier ) throw(RuntimeException) { - if (_rIdentifier.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) + if (_rIdentifier.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return 0; diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 2c30677aff02..31cb38c2f4ed 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -526,7 +526,7 @@ OUString readConsole() } #else char buf[1024]; - rtl_zeroMemory(buf, 1024); + memset(buf, 0, 1024); // read one char less so that the last char in buf is always zero if (fgets(buf, 1024, stdin) != NULL) { diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index c1019bacefe4..06589bf80ed6 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -39,7 +39,6 @@ #include "rtl/string.hxx" #include "rtl/ustrbuf.hxx" #include "rtl/uri.hxx" -#include "rtl/memory.h" #include "osl/file.hxx" #include "cppuhelper/exc_hlp.hxx" #include "ucbhelper/content.hxx" @@ -640,7 +639,7 @@ OUString replaceOrigin( if ((write_pos + index) > filtered.getLength()) filtered.realloc( (filtered.getLength() + index) * 2 ); - rtl_copyMemory( filtered.getArray() + write_pos, pBytes, index ); + memcpy( filtered.getArray() + write_pos, pBytes, index ); write_pos += index; pBytes += index; nBytes -= index; @@ -679,7 +678,7 @@ OUString replaceOrigin( } if ((write_pos + nAdd) > filtered.getLength()) filtered.realloc( (filtered.getLength() + nAdd) * 2 ); - rtl_copyMemory( filtered.getArray() + write_pos, pAdd, nAdd ); + memcpy( filtered.getArray() + write_pos, pAdd, nAdd ); write_pos += nAdd; } if (!use_filtered) diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index b7b57b27e1d4..85141645fb96 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -31,7 +31,6 @@ #include "../../deployment/gui/dp_gui_shared.hxx" #include "unopkg_shared.h" #include "osl/thread.h" -#include "rtl/memory.h" #include "tools/string.hxx" #include "tools/resmgr.hxx" #include "cppuhelper/implbase3.hxx" 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 ); } diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index 8bc3fccddde7..90ef8741d82b 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -245,7 +245,7 @@ const ::com::sun::star::uno::Sequence< sal_Int8 > & SvxUnoTextField::getUnoTunne sal_Int64 SAL_CALL SvxUnoTextField::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_IntPtr>(this)); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index bbe42e00f01c..14121c6eb484 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -2160,7 +2160,7 @@ SvxUnoTextBase* SvxUnoTextBase::getImplementation( const uno::Reference< uno::XI sal_Int64 SAL_CALL SvxUnoTextBase::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) \ { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); @@ -2208,7 +2208,7 @@ const uno::Sequence< sal_Int8 > & SvxUnoText::getUnoTunnelId() throw() sal_Int64 SAL_CALL SvxUnoText::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) \ { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 88ef33662dba..f77cfcca28ed 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -55,7 +55,6 @@ #include <typelib/typedescription.hxx> #include <rtl/uuid.h> -#include <rtl/memory.h> #include <rtl/ustring.hxx> #include "jscriptclasses.hxx" diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index 65016a64af66..d1db88cbcea1 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -57,7 +57,6 @@ #include <com/sun/star/xml/xpath/XXPathAPI.hpp> #include <rtl/ref.hxx> -#include <rtl/memory.h> #include <rtl/bootstrap.hxx> #include <rtl/ustrbuf.hxx> #include <osl/process.h> diff --git a/extensions/workben/testpgp.cxx b/extensions/workben/testpgp.cxx index e6499dd0c2f1..5dad9bea661e 100644 --- a/extensions/workben/testpgp.cxx +++ b/extensions/workben/testpgp.cxx @@ -27,7 +27,6 @@ ************************************************************************/ #include <sal/types.h> -#include <rtl/memory.h> #ifndef _RTL_WSTRING_ #include <rtl/wstring> #endif @@ -220,7 +219,7 @@ void DataSource_Impl::setBuffer (const Sequence<sal_Int8> &rBuffer) { // Fill buffer from file descriptor. char buffer[1024]; - rtl_zeroMemory (buffer, sizeof(buffer)); + memset (buffer, 0, sizeof(buffer)); int k = read (m_fd, buffer, sizeof(buffer)); while (k > 0) @@ -228,10 +227,10 @@ void DataSource_Impl::setBuffer (const Sequence<sal_Int8> &rBuffer) sal_Int32 n = m_buffer.getLength(); m_buffer.realloc (n + k); - rtl_copyMemory (m_buffer.getArray() + n, buffer, k); + memcpy (m_buffer.getArray() + n, buffer, k); n += k; - rtl_zeroMemory (buffer, k); + memset (buffer, 0, k); k = read (m_fd, buffer, sizeof(buffer)); } } @@ -283,7 +282,7 @@ sal_Int32 SAL_CALL DataSource_Impl::readBytes ( if (k > 0) { rData.realloc(k); - rtl_copyMemory ( + memcpy ( rData.getArray(), m_buffer.getConstArray() + m_position, k); m_position += k; } @@ -390,7 +389,7 @@ void SAL_CALL DataSink_Impl::writeBytes (const Sequence<sal_Int8> &rBuffer) sal_Int32 n = m_buffer.getLength(); m_buffer.realloc (n + rBuffer.getLength()); - rtl_copyMemory ( + memcpy ( m_buffer.getArray() + n, rBuffer.getConstArray(), rBuffer.getLength()); diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 7f8b95877eae..77372ae6d20c 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -26,6 +26,8 @@ * ************************************************************************/ +#include <string.h> + #include "Columns.hxx" #include "property.hrc" #include "property.hxx" @@ -49,7 +51,6 @@ #include "services.hxx" #include "frm_resource.hrc" #include <tools/debug.hxx> -#include <rtl/memory.h> //......................................................................... namespace frm @@ -138,7 +139,7 @@ sal_Int64 SAL_CALL OGridColumn::getSomething( const Sequence<sal_Int8>& _rIdenti sal_Int64 nReturn(0); if ( (_rIdentifier.getLength() == 16) - && (0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 )) + && (0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 )) ) { nReturn = reinterpret_cast<sal_Int64>(this); diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index be2843044899..49e539bc4012 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -90,7 +90,7 @@ ImgProdLockBytes::ImgProdLockBytes( ::com::sun::star::uno::Reference< ::com::sun { const sal_uInt32 nOldLength = maSeq.getLength(); maSeq.realloc( nOldLength + nRead ); - rtl_copyMemory( maSeq.getArray() + nOldLength, aReadSeq.getConstArray(), aReadSeq.getLength() ); + memcpy( maSeq.getArray() + nOldLength, aReadSeq.getConstArray(), aReadSeq.getLength() ); } } while( nBytesToRead == nRead ); diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx index 141b2f0df325..33aba9509c65 100644 --- a/forms/source/richtext/richtextmodel.cxx +++ b/forms/source/richtext/richtextmodel.cxx @@ -589,7 +589,7 @@ namespace frm { Sequence< sal_Int8 > aEditEngineAccessId( getEditEngineTunnelId() ); if ( ( _rId.getLength() == aEditEngineAccessId.getLength() ) - && ( 0 == rtl_compareMemory( aEditEngineAccessId.getConstArray(), _rId.getConstArray(), _rId.getLength() ) ) + && ( 0 == memcmp( aEditEngineAccessId.getConstArray(), _rId.getConstArray(), _rId.getLength() ) ) ) return reinterpret_cast< sal_Int64 >( m_pEngine.get() ); diff --git a/framework/source/fwi/uielement/constitemcontainer.cxx b/framework/source/fwi/uielement/constitemcontainer.cxx index 078bf3000404..1d5482df6c3b 100644 --- a/framework/source/fwi/uielement/constitemcontainer.cxx +++ b/framework/source/fwi/uielement/constitemcontainer.cxx @@ -26,6 +26,8 @@ * ************************************************************************/ +#include <string.h> + #include <uielement/constitemcontainer.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/itemcontainer.hxx> @@ -266,7 +268,7 @@ Reference< XIndexAccess > ConstItemContainer::deepCopyContainer( const Reference // XUnoTunnel sal_Int64 ConstItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) { - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ConstItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) + if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ConstItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) { return reinterpret_cast< sal_Int64 >( this ); } diff --git a/framework/source/fwi/uielement/rootitemcontainer.cxx b/framework/source/fwi/uielement/rootitemcontainer.cxx index 92fca28ccc08..c373bcf948c9 100644 --- a/framework/source/fwi/uielement/rootitemcontainer.cxx +++ b/framework/source/fwi/uielement/rootitemcontainer.cxx @@ -26,6 +26,8 @@ * ************************************************************************/ +#include <string.h> + #include <comphelper/servicehelper.hxx> #include <uielement/rootitemcontainer.hxx> #include <uielement/itemcontainer.hxx> @@ -167,7 +169,7 @@ Reference< XIndexAccess > RootItemContainer::deepCopyContainer( const Reference< // XUnoTunnel sal_Int64 RootItemContainer::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) { - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( RootItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) + if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( RootItemContainer::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) return sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr >( this )); return 0; } diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 28276b8bda5d..324b112b4e7e 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -1204,7 +1204,7 @@ JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * pInfo) (JavaInfo*) rtl_allocateMemory(sizeof(JavaInfo)); if (newInfo) { - rtl_copyMemory(newInfo, pInfo, sizeof(JavaInfo)); + memcpy(newInfo, pInfo, sizeof(JavaInfo)); rtl_uString_acquire(pInfo->sVendor); rtl_uString_acquire(pInfo->sLocation); rtl_uString_acquire(pInfo->sVersion); diff --git a/lotuswordpro/source/filter/xfilter/xfbase64.cxx b/lotuswordpro/source/filter/xfilter/xfbase64.cxx index 0e0e433de1bf..5ce056d483e8 100644 --- a/lotuswordpro/source/filter/xfilter/xfbase64.cxx +++ b/lotuswordpro/source/filter/xfilter/xfbase64.cxx @@ -57,7 +57,8 @@ * @file * Base64 tool. ************************************************************************/ -#include "xfbase64.hxx" +#include <string.h> +#include "xfbase64.hxx" const sal_Char aBase64EncodeTable[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', @@ -105,7 +106,7 @@ rtl::OUString XFBase64::Encode(sal_uInt8 *buf, sal_Int32 len) nNeeded = (cycles+1)*4; buffer = new sal_Char[nNeeded+1]; - rtl_zeroMemory(buffer,nNeeded+1); + memset(buffer, 0, nNeeded+1); for( sal_Int32 i=0; i<cycles; i++ ) Encode_(buf+i*3,buffer+i*4); diff --git a/lotuswordpro/source/filter/xfilter/xfcolor.cxx b/lotuswordpro/source/filter/xfilter/xfcolor.cxx index c2e66be99448..09d505865dd8 100644 --- a/lotuswordpro/source/filter/xfilter/xfcolor.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcolor.cxx @@ -57,14 +57,15 @@ * @file * Color object to serial to xml filter. ************************************************************************/ +#include <string.h> #include <stdio.h> -#include "xfcolor.hxx" +#include "xfcolor.hxx" rtl::OUString XFColor::ToString() const { char buf[8]; - rtl_zeroMemory(buf,8); + memset(buf, 0, 8); sprintf(buf,"#%2x%2x%2x",m_nRed, m_nGreen, m_nBlue); for( int i=1; i<7;i++ ) { diff --git a/lotuswordpro/source/filter/xfilter/xfdate.cxx b/lotuswordpro/source/filter/xfilter/xfdate.cxx index 2935392cb2dc..c5025086e64b 100644 --- a/lotuswordpro/source/filter/xfilter/xfdate.cxx +++ b/lotuswordpro/source/filter/xfilter/xfdate.cxx @@ -57,12 +57,13 @@ * @file * Date field with date style. ************************************************************************/ +#include <string.h> #include "xfdate.hxx" XFDate::XFDate() { m_bFixed = 0; - rtl_zeroMemory(&m_aDateTime,sizeof(m_aDateTime)); + memset(&m_aDateTime, 0, sizeof(m_aDateTime)); m_bValued = sal_False; } diff --git a/lotuswordpro/source/filter/xfilter/xflineheight.hxx b/lotuswordpro/source/filter/xfilter/xflineheight.hxx index 838dbd1a84d3..9573fe31443f 100644 --- a/lotuswordpro/source/filter/xfilter/xflineheight.hxx +++ b/lotuswordpro/source/filter/xfilter/xflineheight.hxx @@ -60,6 +60,8 @@ #ifndef _XFLINEHEIGHT_HXX #define _XFLINEHEIGHT_HXX +#include <string.h> + class XFLineHeight { public: @@ -117,7 +119,7 @@ inline void XFLineHeight::SetSpace(double value) inline void XFLineHeight::Reset() { m_eType = enumLHNone; - rtl_zeroMemory(&m_Value,sizeof(m_Value)); + memset(&m_Value, 0, sizeof(m_Value)); } inline enumLHType XFLineHeight::GetType() diff --git a/lotuswordpro/source/filter/xfilter/xfutil.hxx b/lotuswordpro/source/filter/xfilter/xfutil.hxx index df49ff4c1797..1cf756193d2a 100644 --- a/lotuswordpro/source/filter/xfilter/xfutil.hxx +++ b/lotuswordpro/source/filter/xfilter/xfutil.hxx @@ -63,7 +63,6 @@ #include "xfdefs.hxx" #include <rtl/ustring.hxx> -#include <rtl/memory.h> #include <string> diff --git a/package/source/zipapi/MemoryByteGrabber.hxx b/package/source/zipapi/MemoryByteGrabber.hxx index adde3a6daa66..90f542db4a7a 100644 --- a/package/source/zipapi/MemoryByteGrabber.hxx +++ b/package/source/zipapi/MemoryByteGrabber.hxx @@ -54,7 +54,7 @@ public: nBytesToRead = mnEnd - mnCurrent; aData.realloc ( nBytesToRead ); - rtl_copyMemory( aData.getArray(), mpBuffer + mnCurrent, nBytesToRead ); + memcpy( aData.getArray(), mpBuffer + mnCurrent, nBytesToRead ); mnCurrent += nBytesToRead; return nBytesToRead; } diff --git a/rdbmaker/inc/codemaker/registry.hxx b/rdbmaker/inc/codemaker/registry.hxx index 404d53bfe571..bb30b85fb1e6 100644 --- a/rdbmaker/inc/codemaker/registry.hxx +++ b/rdbmaker/inc/codemaker/registry.hxx @@ -20,6 +20,8 @@ #ifndef _CODEMAKER_REGISTRY_HXX_ #define _CODEMAKER_REGISTRY_HXX_ +#include <string.h> + #include <rtl/alloc.h> #include <osl/interlck.h> #include <registry/registry.hxx> @@ -40,7 +42,7 @@ struct TypeReader_Impl if (copyData) { m_pBlop = (sal_uInt8*)rtl_allocateMemory(bufferLen); - rtl_copyMemory((void*)m_pBlop, buffer, bufferLen); + memcpy(const_cast<sal_uInt8*>(m_pBlop), buffer, bufferLen); } else { m_blopSize = bufferLen; diff --git a/rdbmaker/source/rdbmaker/typeblop.cxx b/rdbmaker/source/rdbmaker/typeblop.cxx index f9acdfd93343..7049da4502be 100644 --- a/rdbmaker/source/rdbmaker/typeblop.cxx +++ b/rdbmaker/source/rdbmaker/typeblop.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <string.h> + #include <rtl/alloc.h> #include <registry/reflwrit.hxx> #include <cppuhelper/servicefactory.hxx> @@ -287,7 +289,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; case TypeClass_MODULE: @@ -329,7 +331,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; case TypeClass_INTERFACE: @@ -404,7 +406,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; case TypeClass_STRUCT: @@ -444,7 +446,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; case TypeClass_ENUM: @@ -473,7 +475,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; case TypeClass_TYPEDEF: @@ -488,7 +490,7 @@ sal_uInt32 SAL_CALL getTypeBlop(const sal_Char* pTypeName, sal_uInt8** pBlop) 0, 0, 0); length = writer.getBlopSize(); *pBlop = (sal_uInt8*)rtl_allocateMemory( length ); - rtl_copyMemory(*pBlop, writer.getBlop(), length); + memcpy(*pBlop, writer.getBlop(), length); } break; default: diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index d51aafdc53e2..e364a1757953 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -45,7 +45,6 @@ #include <osl/thread.h> #include <rtl/alloc.h> -#include <rtl/memory.h> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <osl/file.hxx> diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 7e9f4f584f0e..ca28b10cd66a 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2168,7 +2168,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL OReportDefinition::getAvailableMimeTyp sal_Int64 SAL_CALL OReportDefinition::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) { sal_Int64 nRet = 0; - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) nRet = reinterpret_cast<sal_Int64>(this); else { diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx index 71aeef5ffc59..186a4a86cf3c 100644 --- a/reportdesign/source/core/api/Section.cxx +++ b/reportdesign/source/core/api/Section.cxx @@ -670,7 +670,7 @@ sal_Bool SAL_CALL OSection::hasForms() throw (uno::RuntimeException) //------------------------------------------------------------------ sal_Int64 OSection::getSomething( const uno::Sequence< sal_Int8 > & rId ) throw (uno::RuntimeException) { - if (rId.getLength() == 16 && 0 == rtl_compareMemory(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) + if (rId.getLength() == 16 && 0 == memcmp(getUnoTunnelImplementationId().getConstArray(), rId.getConstArray(), 16 ) ) return reinterpret_cast<sal_Int64>(this); return (m_xDrawPage_Tunnel.is()) ? m_xDrawPage_Tunnel->getSomething(rId) : 0; } diff --git a/rsc/source/tools/rsctools.cxx b/rsc/source/tools/rsctools.cxx index 8c72ac4c540a..63d787e4e12f 100644 --- a/rsc/source/tools/rsctools.cxx +++ b/rsc/source/tools/rsctools.cxx @@ -36,7 +36,6 @@ #include <osl/file.h> #include <rtl/alloc.h> -#include <rtl/memory.h> using ::rtl::OUString; using ::rtl::OUStringToOString; @@ -97,7 +96,7 @@ char* rsc_strdup( const char* pStr ) { int nLen = strlen( pStr ); char* pBuffer = (char*)rtl_allocateMemory( nLen+1 ); - rtl_copyMemory( pBuffer, pStr, nLen+1 ); + memcpy( pBuffer, pStr, nLen+1 ); return pBuffer; } @@ -405,7 +404,7 @@ void RscWriteRc :: PutUTF8( char * pStr ) n++; sal_uInt32 nOldLen = IncSize( n ); - rtl_copyMemory( GetPointer( nOldLen ), pStr, nStrLen ); + memcpy( GetPointer( nOldLen ), pStr, nStrLen ); // 0 terminated pMem[ nOldLen + nStrLen ] = '\0'; } diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx index 52a855d00620..39dccaad9c7a 100644 --- a/sdext/source/pdfimport/filterdet.cxx +++ b/sdext/source/pdfimport/filterdet.cxx @@ -590,7 +590,7 @@ bool checkDocChecksum( const rtl::OUString& rInPDFFileURL, rtl_digest_destroyMD5( aActualDigest ); // compare the contents - bRet = (0 == rtl_compareMemory( nActualChecksum, nTestChecksum, sizeof( nActualChecksum ) )); + bRet = (0 == memcmp( nActualChecksum, nTestChecksum, sizeof( nActualChecksum ) )); #if OSL_DEBUG_LEVEL > 1 OSL_TRACE( "test checksum: " ); for( unsigned int i = 0; i < sizeof(nTestChecksum); i++ ) diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx index 9a7855492685..10bb30d827dd 100644 --- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx @@ -35,7 +35,6 @@ #include <rtl/alloc.h> #include <rtl/digest.h> #include <rtl/cipher.h> -#include <rtl/memory.h> #ifdef SYSTEM_ZLIB #include "zlib.h" #else @@ -728,7 +727,7 @@ bool PDFObject::getDeflatedStream( char** ppStream, unsigned int* pBytes, const // get the compressed length *pBytes = m_pStream->getDictLength( pObjectContainer ); if( pStream != *ppStream ) - rtl_moveMemory( *ppStream, pStream, *pBytes ); + memmove( *ppStream, pStream, *pBytes ); if( rContext.m_bDecrypt ) { EmitImplData* pEData = getEmitData( rContext ); diff --git a/sdext/source/pdfimport/pdfparse/pdfparse.cxx b/sdext/source/pdfimport/pdfparse/pdfparse.cxx index 21c195de48ff..75ee3eeb305a 100644 --- a/sdext/source/pdfimport/pdfparse/pdfparse.cxx +++ b/sdext/source/pdfimport/pdfparse/pdfparse.cxx @@ -44,7 +44,6 @@ #include <string.h> #include <rtl/strbuf.hxx> -#include <rtl/memory.h> #include <rtl/alloc.h> // disable warnings again because someone along the line has enabled them diff --git a/sfx2/source/control/thumbnailviewacc.cxx b/sfx2/source/control/thumbnailviewacc.cxx index 901cf412f1f1..511ad8a49ac5 100644 --- a/sfx2/source/control/thumbnailviewacc.cxx +++ b/sfx2/source/control/thumbnailviewacc.cxx @@ -552,7 +552,7 @@ sal_Int64 SAL_CALL ThumbnailViewAcc::getSomething( const uno::Sequence< sal_Int8 { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == rtl_compareMemory( ThumbnailViewAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ThumbnailViewAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; @@ -983,7 +983,7 @@ sal_Int64 SAL_CALL ThumbnailViewItemAcc::getSomething( const uno::Sequence< sal_ { sal_Int64 nRet; - if( ( rId.getLength() == 16 ) && ( 0 == rtl_compareMemory( ThumbnailViewItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) + if( ( rId.getLength() == 16 ) && ( 0 == memcmp( ThumbnailViewItemAcc::getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) ) nRet = reinterpret_cast< sal_Int64 >( this ); else nRet = 0; diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index 48c0ca942ae6..dc450c558830 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -190,8 +190,8 @@ CntStaticPoolDefaults_Impl::CntStaticPoolDefaults_Impl( CntItemPool* /*pPool*/ ) m_ppDefaults( new SfxPoolItem* [ m_nItems ] ), m_pItemInfos( new SfxItemInfo [ m_nItems ] ) { - rtl_zeroMemory( m_ppDefaults, sizeof( SfxPoolItem* ) * m_nItems ); - rtl_zeroMemory( m_pItemInfos, sizeof( SfxItemInfo ) * m_nItems ); + memset( m_ppDefaults, 0, sizeof( SfxPoolItem* ) * m_nItems ); + memset( m_pItemInfos, 0, sizeof( SfxItemInfo ) * m_nItems ); Insert( new SfxStringItem( WID_CHAOS_START, String() ), 0, diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 2c083680d8a0..ccca612276e0 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -391,7 +391,7 @@ sal_Int64 SAL_CALL SmXMLExport::getSomething( throw(uno::RuntimeException) { if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index a57b83b51899..04d26efe36d1 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -543,7 +543,7 @@ sal_Int64 SAL_CALL SmXMLImport::getSomething( throw(uno::RuntimeException) { if ( rId.getLength() == 16 && - 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 07e4535a8765..0cba7ccee2c2 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -381,7 +381,7 @@ sal_Int64 SAL_CALL SmModel::getSomething( const uno::Sequence< sal_Int8 >& rId ) throw(uno::RuntimeException) { if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_uIntPtr >(this)); diff --git a/store/source/store.cxx b/store/source/store.cxx index 06ad766b9c90..184de2ca2cd0 100644 --- a/store/source/store.cxx +++ b/store/source/store.cxx @@ -21,7 +21,6 @@ #include "store/store.h" #include <sal/types.h> -#include <rtl/memory.h> #include <rtl/string.hxx> #include <rtl/ref.hxx> @@ -353,7 +352,7 @@ storeError SAL_CALL store_findFirst ( return store_E_InvalidParameter; // Initialize FindData. - rtl_zeroMemory (pFindData, sizeof (storeFindData)); + memset (pFindData, 0, sizeof (storeFindData)); // Find first. pFindData->m_nReserved = (sal_uInt32)(~0); diff --git a/store/workben/t_base.cxx b/store/workben/t_base.cxx index ffb1e066cc8a..e60db8970121 100644 --- a/store/workben/t_base.cxx +++ b/store/workben/t_base.cxx @@ -18,10 +18,10 @@ */ +#include <string.h> #include "sal/types.h" #include "osl/diagnose.h" #include "osl/thread.h" -#include "rtl/memory.h" #include "rtl/ustring.hxx" #include "object.hxx" @@ -242,15 +242,15 @@ static void __store_testUnicode (const sal_Char *pszFilename) hConvert = rtl_createTextToUnicodeConverter (RTL_TEXTENCODING_UTF8); MyFindData it; - rtl_zeroMemory (&it, sizeof(it)); + memset (&it, 0, sizeof(it)); sal_Int32 n = rtl_str_getLength (pszFilename); n = __store_convertTextToUnicode ( hConvert, pszFilename, n, it.m_pszName, STORE_MAXIMUM_NAMESIZE - 1); if (it.m_nLength > n) - rtl_zeroMemory ( - &it.m_pszName[n], ((it.m_nLength - n) * sizeof(sal_Unicode))); + memset ( + &it.m_pszName[n], 0, ((it.m_nLength - n) * sizeof(sal_Unicode))); it.m_nLength = n; rtl_destroyTextToUnicodeConverter (hConvert); @@ -340,8 +340,8 @@ int SAL_CALL main (int argc, char **argv) xLockBytes.clear(); sal_Char pBuffer[TEST_PAGESIZE]; - rtl_zeroMemory (pBuffer, sizeof (pBuffer)); - rtl_copyMemory (pBuffer, argv[0], rtl_str_getLength(argv[0]) + 1); + memset (pBuffer, 0, sizeof (pBuffer)); + memcpy (pBuffer, argv[0], rtl_str_getLength(argv[0]) + 1); eErrCode = xBIOS->write (TEST_PAGESIZE, pBuffer, sizeof (pBuffer)); if (eErrCode != store_E_None) diff --git a/store/workben/t_file.cxx b/store/workben/t_file.cxx index 745fbbd978e9..058d04b3577a 100644 --- a/store/workben/t_file.cxx +++ b/store/workben/t_file.cxx @@ -24,6 +24,7 @@ #include "lockbyte.hxx" +#include <string.h> #include <stdio.h> #include "osl/file.h" @@ -91,7 +92,7 @@ int SAL_CALL main (int argc, char **argv) } sal_Char buffer[TEST_PAGESIZE]; - rtl_fillMemory (buffer, sizeof(buffer), sal_uInt8('B')); + memset (buffer, sal_uInt8('B'), sizeof(buffer)); sal_uInt32 i, k; for (k = 0; k < 4; k++) @@ -173,14 +174,14 @@ int SAL_CALL main (int argc, char **argv) if (offset == 0) { sal_uInt32 magic = 256 * 4; - if (rtl_compareMemory (&verify[index], &magic, sizeof(magic))) + if (memcmp (&verify[index], &magic, sizeof(magic))) { // Failure. fprintf (stderr, "t_file: Unexpected value at 0x00000000\n"); } index += 4; } - if (rtl_compareMemory ( + if (memcmp ( &verify[index], &buffer[index], TEST_PAGESIZE - index)) { // Failure. 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; } diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx index 7ef5c90e1a43..05b37d488aac 100644 --- a/svx/source/accessibility/AccessibleShape.cxx +++ b/svx/source/accessibility/AccessibleShape.cxx @@ -944,7 +944,7 @@ sal_Int64 SAL_CALL { sal_Int64 nReturn( 0 ); - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) + if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) nReturn = reinterpret_cast< sal_Int64 >( this ); return( nReturn ); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 2c14e44a0fcd..c37687a9fe8d 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -735,7 +735,7 @@ SvxPixelCtl::SvxPixelCtl( Window* pParent, const ResId& rResId, sal_uInt16 nNumb nSquares = nLines * nLines; pPixel = new sal_uInt16[ nSquares ]; - rtl_zeroMemory(pPixel, nSquares * sizeof(sal_uInt16)); + memset(pPixel, 0, nSquares * sizeof(sal_uInt16)); } // Destructor dealocating the dynamic array @@ -852,7 +852,7 @@ void SvxPixelCtl::SetXBitmap( const XOBitmap& rXBmp ) void SvxPixelCtl::Reset() { // clear pixel area - rtl_zeroMemory(pPixel, nSquares * sizeof(sal_uInt16)); + memset(pPixel, 0, nSquares * sizeof(sal_uInt16)); Invalidate(); } diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index c5a1abca40b2..ad73e3bf060f 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -1210,7 +1210,7 @@ sal_Int64 SAL_CALL FmXGridPeer::getSomething( const Sequence< sal_Int8 >& _rIden sal_Int64 nReturn(0); if ( (_rIdentifier.getLength() == 16) - && (0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 )) + && (0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rIdentifier.getConstArray(), 16 )) ) { nReturn = reinterpret_cast<sal_Int64>(this); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index a015f6cce669..d24fd2653e9e 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -4681,7 +4681,7 @@ sal_Int64 SAL_CALL FmXFilterCell::getSomething( const Sequence< sal_Int8 >& _rId sal_Int64 nReturn(0); if ( (_rIdentifier.getLength() == 16) - && (0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), _rIdentifier.getConstArray(), 16 )) + && (0 == memcmp( getUnoTunnelId().getConstArray(), _rIdentifier.getConstArray(), 16 )) ) { nReturn = reinterpret_cast<sal_Int64>(this); diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index fb7a95b10789..22a284129947 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -33,7 +33,6 @@ #include <sot/clsids.hxx> #include <comphelper/serviceinfohelper.hxx> -#include <rtl/memory.h> #include <sfx2/objsh.hxx> #include <svx/svdpool.hxx> #include <svx/svdobj.hxx> diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 93f8e18f32a4..04da106169a1 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -45,7 +45,6 @@ #include <boost/scoped_ptr.hpp> #include <svx/svdpool.hxx> -#include <rtl/memory.h> #include <editeng/unoprnms.hxx> #include <svx/unoshape.hxx> diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index bab97e794a84..895674de2f69 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -36,7 +36,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/serviceinfohelper.hxx> -#include <rtl/memory.h> #include <svx/svdpool.hxx> #include <svx/unoshape.hxx> #include <svx/unopage.hxx> diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 13398726d1c7..2875ad6f6fd0 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -44,7 +44,6 @@ #include <comphelper/servicehelper.hxx> #include <comphelper/serviceinfohelper.hxx> #include <toolkit/unohlp.hxx> -#include <rtl/memory.h> #include <vcl/gfxlink.hxx> #include <vcl/virdev.hxx> #include <sfx2/objsh.hxx> @@ -341,7 +340,7 @@ SvxShape* SvxShape::getImplementation( const uno::Reference< uno::XInterface >& //---------------------------------------------------------------------- sal_Int64 SAL_CALL SvxShape::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId ) throw(::com::sun::star::uno::RuntimeException) \ { - if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) + if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this)); } diff --git a/sw/source/core/undo/undraw.cxx b/sw/source/core/undo/undraw.cxx index 35c8dea51b80..e2b97ae2b66b 100644 --- a/sw/source/core/undo/undraw.cxx +++ b/sw/source/core/undo/undraw.cxx @@ -30,7 +30,6 @@ #include <UndoDraw.hxx> #include <rtl/string.h> -#include <rtl/memory.h> #include <svx/svdogrp.hxx> #include <svx/svdundo.hxx> diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx index 01d5705c60f5..a8282477b3d9 100644 --- a/toolkit/inc/toolkit/helper/macros.hxx +++ b/toolkit/inc/toolkit/helper/macros.hxx @@ -29,12 +29,14 @@ #ifndef _TOOLKIT_HELPER_MACROS_HXX_ #define _TOOLKIT_HELPER_MACROS_HXX_ +#include <string.h> + #include <comphelper/servicehelper.hxx> #define IMPL_XUNOTUNNEL_MINIMAL( ClassName ) \ sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) \ { \ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) \ + if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) \ { \ return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); \ } \ @@ -60,7 +62,7 @@ ClassName* ClassName::GetImplementation( const ::com::sun::star::uno::Reference< #define IMPL_XUNOTUNNEL2( ClassName, BaseClass ) \ sal_Int64 ClassName::getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier ) throw(::com::sun::star::uno::RuntimeException) \ { \ - if( ( rIdentifier.getLength() == 16 ) && ( 0 == rtl_compareMemory( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) \ + if( ( rIdentifier.getLength() == 16 ) && ( 0 == memcmp( ClassName::GetUnoTunnelId().getConstArray(), rIdentifier.getConstArray(), 16 ) ) ) \ { \ return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this)); \ } \ diff --git a/toolkit/source/awt/vclxbitmap.cxx b/toolkit/source/awt/vclxbitmap.cxx index 736751ec232e..773b69a7e4a4 100644 --- a/toolkit/source/awt/vclxbitmap.cxx +++ b/toolkit/source/awt/vclxbitmap.cxx @@ -30,7 +30,6 @@ #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> #include <tools/stream.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> // ---------------------------------------------------- diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index 1afcfabe0fb9..1ea0e4765d5c 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -30,7 +30,6 @@ #include <toolkit/helper/macros.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <vcl/svapp.hxx> diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx index e73b1f2cd13e..1cc74ae90f26 100644 --- a/toolkit/source/awt/vclxdevice.cxx +++ b/toolkit/source/awt/vclxdevice.cxx @@ -37,7 +37,6 @@ #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <vcl/svapp.hxx> diff --git a/toolkit/source/awt/vclxfont.cxx b/toolkit/source/awt/vclxfont.cxx index 822d82246211..a44526a548b2 100644 --- a/toolkit/source/awt/vclxfont.cxx +++ b/toolkit/source/awt/vclxfont.cxx @@ -26,11 +26,12 @@ * ************************************************************************/ +#include <string.h> + #include <toolkit/awt/vclxfont.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/ustring.h> diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx index 2def418ce61f..491b2855c21b 100644 --- a/toolkit/source/awt/vclxgraphics.cxx +++ b/toolkit/source/awt/vclxgraphics.cxx @@ -32,7 +32,6 @@ #include <toolkit/helper/macros.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <vcl/svapp.hxx> diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index b12d79510ab1..7748aa675000 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -32,7 +32,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/convert.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <osl/mutex.hxx> diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index f51ee238d659..1462087cf4a2 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -29,7 +29,6 @@ #include <toolkit/awt/vclxprinter.hxx> #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> diff --git a/toolkit/source/awt/vclxregion.cxx b/toolkit/source/awt/vclxregion.cxx index 4d463c1ad770..079aa2fb8a20 100644 --- a/toolkit/source/awt/vclxregion.cxx +++ b/toolkit/source/awt/vclxregion.cxx @@ -31,7 +31,6 @@ #include <toolkit/helper/vclunohelper.hxx> #include <toolkit/helper/convert.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <vcl/svapp.hxx> diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index bea6a744dc86..6053de716e7c 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -53,7 +53,6 @@ #include <com/sun/star/beans/NamedValue.hpp> #include <cppuhelper/typeprovider.hxx> #include <osl/conditn.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/process.h> diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index 9d7cb73078c8..9d26ffbdd98f 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -53,7 +53,6 @@ #include <toolkit/helper/property.hxx> #include <toolkit/helper/accessibilityclient.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/ustrbuf.hxx> #include <vcl/svapp.hxx> diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx index fcf33553c9e4..9a88234a30de 100644 --- a/toolkit/source/controls/stdtabcontroller.cxx +++ b/toolkit/source/controls/stdtabcontroller.cxx @@ -34,7 +34,6 @@ #include <toolkit/awt/vclxwindow.hxx> #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <tools/debug.hxx> diff --git a/toolkit/source/controls/stdtabcontrollermodel.cxx b/toolkit/source/controls/stdtabcontrollermodel.cxx index 344daaef67b4..982d029d93f8 100644 --- a/toolkit/source/controls/stdtabcontrollermodel.cxx +++ b/toolkit/source/controls/stdtabcontrollermodel.cxx @@ -33,7 +33,6 @@ #include <toolkit/helper/servicenames.hxx> #include <toolkit/helper/property.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <tools/debug.hxx> diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx index 7d5a6ac98c68..8ad20ecac814 100644 --- a/toolkit/source/controls/unocontrol.cxx +++ b/toolkit/source/controls/unocontrol.cxx @@ -36,7 +36,6 @@ #include <toolkit/controls/unocontrol.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <osl/mutex.hxx> #include <tools/date.hxx> diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx index 0bdf24c195db..7e6f3c97054d 100644 --- a/toolkit/source/controls/unocontrolcontainer.cxx +++ b/toolkit/source/controls/unocontrolcontainer.cxx @@ -31,7 +31,6 @@ #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/implbase1.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <toolkit/controls/unocontrolcontainer.hxx> diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index a0c0230d50ba..86df917f6c16 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -40,7 +40,6 @@ #include <toolkit/controls/unocontrolmodel.hxx> #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> -#include <rtl/memory.h> #include <rtl/uuid.h> #include <tools/diagnose_ex.h> #include <tools/date.hxx> diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx index d2852cf5f737..30709499733f 100644 --- a/tools/source/generic/config.cxx +++ b/tools/source/generic/config.cxx @@ -116,7 +116,7 @@ static sal_uInt8* ImplSysReadConfig( const rtl::OUString& rFileName, if (nRead > 2 && memcmp(pBuf, BOM, 3) == 0) { nRead -= 3; - rtl_moveMemory(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(sal_uInt8)) ); + memmove(pBuf, pBuf + 3, sal::static_int_cast<sal_Size>(nRead * sizeof(sal_uInt8)) ); rbIsUTF8BOM = sal_True; } diff --git a/tools/source/inet/inetstrm.cxx b/tools/source/inet/inetstrm.cxx index 19db6ee5a76a..7392f50b6647 100644 --- a/tools/source/inet/inetstrm.cxx +++ b/tools/source/inet/inetstrm.cxx @@ -19,7 +19,6 @@ #include <comphelper/string.hxx> #include <sal/types.h> -#include <rtl/memory.h> #include <rtl/strbuf.hxx> #include <tools/cachestr.hxx> #include <tools/inetmsg.hxx> @@ -1284,7 +1283,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) aDelim.append(pMsg->GetMultipartBoundary()); aDelim.append(RTL_CONSTASCII_STRINGPARAM("\r\n")); - rtl_copyMemory(pData, aDelim.getStr(), + memcpy(pData, aDelim.getStr(), aDelim.getLength()); return aDelim.getLength(); } @@ -1303,7 +1302,7 @@ int INetMIMEMessageStream::GetMsgLine (sal_Char *pData, sal_uIntPtr nSize) aDelim.append(pMsg->GetMultipartBoundary()); aDelim.append(RTL_CONSTASCII_STRINGPARAM("--\r\n")); - rtl_copyMemory (pData, aDelim.getStr(), + memcpy (pData, aDelim.getStr(), aDelim.getLength()); return aDelim.getLength(); } diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx index 58217be7c270..0893e4afb256 100644 --- a/tools/source/string/tustring.cxx +++ b/tools/source/string/tustring.cxx @@ -23,7 +23,6 @@ #include <osl/interlck.h> #include <rtl/alloc.h> -#include <rtl/memory.h> #include <rtl/tencinfo.h> #include <rtl/instance.hxx> #include <tools/string.hxx> diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 9d63b26022e0..314226aaf6dc 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -47,7 +47,7 @@ #include <memory> #include <vector> -#include <rtl/memory.h> +#include <string.h> #include "curl.hxx" #include <curl/easy.h> #include <ucbhelper/cancelcommandexecution.hxx> @@ -730,7 +730,7 @@ sal_Int32 InsertData::read(sal_Int8 *dest,sal_Int32 nBytesRequested) if(m_xInputStream.is()) { Sequence<sal_Int8> seq(nBytesRequested); m = m_xInputStream->readBytes(seq,nBytesRequested); - rtl_copyMemory(dest,seq.getConstArray(),m); + memcpy(dest,seq.getConstArray(),m); } return m; } diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index 13b5ae89b4ff..06ffa42cfe67 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -94,7 +94,7 @@ int MemoryContainer::append( m_pBuffer = rtl_reallocateMemory(m_pBuffer,m_nLen); } - rtl_copyMemory(static_cast<sal_Int8*>(m_pBuffer)+m_nWritePos, + memcpy(static_cast<sal_Int8*>(m_pBuffer)+m_nWritePos, pBuffer,nLen); m_nWritePos = tmp; return nLen; diff --git a/ucb/source/ucp/ftp/test_ftpurl.cxx b/ucb/source/ucp/ftp/test_ftpurl.cxx index 3e2a5c22a2dd..573453e04595 100644 --- a/ucb/source/ucp/ftp/test_ftpurl.cxx +++ b/ucb/source/ucp/ftp/test_ftpurl.cxx @@ -32,7 +32,6 @@ #include "ftploaderthread.hxx" #include "ftphandleprovider.hxx" #include "debughelper.hxx" -#include <rtl/memory.h> #include <vector> #define TESTEVAL \ @@ -252,7 +251,7 @@ int test_ftpopen(void) char *dest = (char*) malloc(sizeof(char)); dest[0] = 0; do { - rtl_zeroMemory((void*)buff,bffsz); + memset((void*)buff, 0, bffsz); fread(buff,bffsz-1,1,file); nbuf = strlen(buff); ndest = strlen(dest); diff --git a/ucb/source/ucp/gio/gio_inputstream.cxx b/ucb/source/ucp/gio/gio_inputstream.cxx index e0bc9c38b185..f4d60c85b5fc 100644 --- a/ucb/source/ucp/gio/gio_inputstream.cxx +++ b/ucb/source/ucp/gio/gio_inputstream.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rtl/memory.h> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <ucbhelper/cancelcommandexecution.hxx> #include <string.h> diff --git a/ucb/source/ucp/gio/gio_outputstream.cxx b/ucb/source/ucp/gio/gio_outputstream.cxx index 047ef9fcdfc9..050133ebc9af 100644 --- a/ucb/source/ucp/gio/gio_outputstream.cxx +++ b/ucb/source/ucp/gio/gio_outputstream.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rtl/memory.h> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <ucbhelper/cancelcommandexecution.hxx> #include <string.h> diff --git a/ucb/source/ucp/gio/gio_seekable.cxx b/ucb/source/ucp/gio/gio_seekable.cxx index e78ec0485903..2f9774ef5de4 100644 --- a/ucb/source/ucp/gio/gio_seekable.cxx +++ b/ucb/source/ucp/gio/gio_seekable.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rtl/memory.h> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <ucbhelper/cancelcommandexecution.hxx> #include <string.h> diff --git a/ucb/source/ucp/gvfs/gvfs_stream.cxx b/ucb/source/ucp/gvfs/gvfs_stream.cxx index 3741703ac052..18dacfa50c34 100644 --- a/ucb/source/ucp/gvfs/gvfs_stream.cxx +++ b/ucb/source/ucp/gvfs/gvfs_stream.cxx @@ -27,7 +27,6 @@ ************************************************************************/ #include "gvfs_stream.hxx" -#include <rtl/memory.h> #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp> #include <libgnomevfs/gnome-vfs-ops.h> diff --git a/ucb/source/ucp/webdav/NeonInputStream.cxx b/ucb/source/ucp/webdav/NeonInputStream.cxx index 240f41232c2a..882fa2520b4f 100644 --- a/ucb/source/ucp/webdav/NeonInputStream.cxx +++ b/ucb/source/ucp/webdav/NeonInputStream.cxx @@ -26,8 +26,9 @@ * ************************************************************************/ +#include <string.h> + #include "NeonInputStream.hxx" -#include <rtl/memory.h> using namespace cppu; using namespace com::sun::star::io; @@ -57,7 +58,7 @@ NeonInputStream::~NeonInputStream( void ) void NeonInputStream::AddToStream( const char * inBuf, sal_Int32 inLen ) { mInputBuffer.realloc( sal::static_int_cast<sal_Int32>(mLen) + inLen ); - rtl_copyMemory( mInputBuffer.getArray() + mLen, inBuf, inLen ); + memcpy( mInputBuffer.getArray() + mLen, inBuf, inLen ); mLen += inLen; } @@ -94,7 +95,7 @@ sal_Int32 SAL_CALL NeonInputStream::readBytes( aData.realloc( theBytes2Read ); // Write the data - rtl_copyMemory( + memcpy( aData.getArray(), mInputBuffer.getConstArray() + mPos, theBytes2Read ); // Update our stream position for next time diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 45ee2409f0f0..b3a737fb5fa6 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -2125,7 +2125,7 @@ NeonSession::getDataFromInputStream( rData.realloc( nPos + nRead ); aBuffer.realloc( nRead ); - rtl_copyMemory( (void*)( rData.getArray() + nPos ), + memcpy( (void*)( rData.getArray() + nPos ), (const void*)aBuffer.getConstArray(), nRead ); nPos += nRead; diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index 2b709a98c157..758aef20670c 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1435,7 +1435,7 @@ ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, return ERRCODE_IO_CANTREAD; } - rtl_copyMemory (pBuffer, aData.getConstArray(), nSize); + memcpy (pBuffer, aData.getConstArray(), nSize); if (pRead) *pRead = sal_uLong(nSize); diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 37f9b3f7a5d1..cbfe97a7eb71 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -29,7 +29,6 @@ #include <boost/shared_ptr.hpp> #include <rtl/alloc.h> -#include <rtl/memory.h> #include <rtl/ustrbuf.hxx> #include <comphelper/processfactory.hxx> @@ -210,7 +209,7 @@ namespace DOM int nread = pctx->rInputStream->readBytes(chunk, len); // copy bytes to the provided buffer - rtl_copyMemory(buffer, chunk.getConstArray(), nread); + memcpy(buffer, chunk.getConstArray(), nread); return nread; } catch (const com::sun::star::uno::Exception& ex) { (void) ex; diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index 39fe729c9083..3fcb3dacfdc7 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -1033,7 +1033,7 @@ namespace DOM throw (RuntimeException) { if ((rId.getLength() == 16) && - (0 == rtl_compareMemory(theCNodeUnoTunnelId::get().getSeq().getConstArray(), + (0 == memcmp(theCNodeUnoTunnelId::get().getSeq().getConstArray(), rId.getConstArray(), 16))) { return ::sal::static_int_cast< sal_Int64 >( diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx index 67e7db213bf5..de2bf2caf912 100644 --- a/vcl/unx/generic/app/sm.cxx +++ b/vcl/unx/generic/app/sm.cxx @@ -736,8 +736,8 @@ void ICEWatchProc( { if( i < pThis->m_nConnections-1 ) { - rtl_moveMemory( pThis->m_pConnections+i, pThis->m_pConnections+i+1, sizeof( IceConn )*(pThis->m_nConnections-i-1) ); - rtl_moveMemory( pThis->m_pFilehandles+i+1, pThis->m_pFilehandles+i+2, sizeof( struct pollfd )*(pThis->m_nConnections-i-1) ); + memmove( pThis->m_pConnections+i, pThis->m_pConnections+i+1, sizeof( IceConn )*(pThis->m_nConnections-i-1) ); + memmove( pThis->m_pFilehandles+i+1, pThis->m_pFilehandles+i+2, sizeof( struct pollfd )*(pThis->m_nConnections-i-1) ); } pThis->m_nConnections--; pThis->m_pConnections = (IceConn*)rtl_reallocateMemory( pThis->m_pConnections, sizeof( IceConn )*pThis->m_nConnections ); diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 09dee9314975..8670a45ffbb6 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -340,7 +340,7 @@ sal_Int64 SAL_CALL OOXMLFastContextHandler::getSomething( const uno::Sequence< s throw(uno::RuntimeException) { if( rId.getLength() == 16 - && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), + && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) { return sal::static_int_cast<sal_Int64> diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx index d5628f39f3ce..b9f52f379517 100644 --- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx +++ b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx @@ -22,7 +22,7 @@ #include <sal/types.h> #include <rtl/ustring.hxx> #include <vector> - +#include <string.h> namespace xmlsearch { @@ -40,7 +40,7 @@ namespace xmlsearch { matches_( new sal_Int32[ 2*nColumns ] ), penalty_( penalty ) { - rtl_zeroMemory( matches_,sizeof( sal_Int32 ) * matchesL_ ); + memset( matches_, 0, sizeof( sal_Int32 ) * matchesL_ ); } ~QueryHit() { delete[] matches_; } diff --git a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx index ef84cc86cbb7..303340e614aa 100644 --- a/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx +++ b/xmlhelp/source/cxxhelp/provider/bufferedinputstream.cxx @@ -28,7 +28,6 @@ #include <string.h> -#include <rtl/memory.h> #include "bufferedinputstream.hxx" diff --git a/xmlscript/source/xml_helper/xml_byteseq.cxx b/xmlscript/source/xml_helper/xml_byteseq.cxx index dc90b75723bb..b6dee8dc59c5 100644 --- a/xmlscript/source/xml_helper/xml_byteseq.cxx +++ b/xmlscript/source/xml_helper/xml_byteseq.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <rtl/memory.h> +#include <string.h> #include <cppuhelper/implbase1.hxx> #include <xmlscript/xml_helper.hxx> @@ -129,7 +129,7 @@ void BSeqOutputStream::writeBytes( Sequence< sal_Int8 > const & rData ) { sal_Int32 nPos = _seq->getLength(); _seq->realloc( nPos + rData.getLength() ); - ::rtl_copyMemory( (char *)_seq->getArray() + nPos, + memcpy( (char *)_seq->getArray() + nPos, (char const *)rData.getConstArray(), rData.getLength() ); } diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index 0b1c90c9deca..42cc8851a86c 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -19,7 +19,6 @@ #include <stdio.h> -#include <rtl/memory.h> #include "osl/file.h" #include <rtl/ustrbuf.hxx> @@ -138,7 +137,7 @@ void exportToFile( sal_Int32 nPos = bytes.getLength(); bytes.realloc( nPos + nRead ); - ::rtl_copyMemory( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); + memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); } FILE * f = ::fopen( fname, "w" ); |