[Libreoffice-commits] .: vcl/aqua vcl/source vcl/unx vcl/win

Arnaud Versini aversini at kemper.freedesktop.org
Tue Aug 14 07:18:38 PDT 2012


 vcl/aqua/source/dtrans/DataFlavorMapping.cxx |    4 ++--
 vcl/aqua/source/dtrans/HtmlFmtFlt.cxx        |    6 +++---
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx      |    5 +++--
 vcl/source/control/edit.cxx                  |    3 +--
 vcl/source/gdi/bitmap3.cxx                   |    2 +-
 vcl/source/gdi/bmpfast.cxx                   |    2 +-
 vcl/source/gdi/pdfwriter_impl.cxx            |   22 +++++++++++-----------
 vcl/source/gdi/pdfwriter_impl.hxx            |    6 +++---
 vcl/source/gdi/pdfwriter_impl2.cxx           |    6 +++---
 vcl/source/gdi/pngread.cxx                   |   11 +++++------
 vcl/source/gdi/pngwrite.cxx                  |    5 ++---
 vcl/source/gdi/salmisc.cxx                   |    1 -
 vcl/source/helper/canvasbitmap.cxx           |    6 +++---
 vcl/unx/generic/app/saldisp.cxx              |    2 +-
 vcl/unx/generic/app/sm.cxx                   |    2 +-
 vcl/unx/generic/gdi/salbmp.cxx               |    1 -
 vcl/unx/generic/window/salframe.cxx          |    2 +-
 vcl/unx/gtk/window/gtkframe.cxx              |    2 +-
 vcl/win/source/app/salinst.cxx               |    2 +-
 vcl/win/source/gdi/salprn.cxx                |    8 ++++----
 20 files changed, 47 insertions(+), 51 deletions(-)

New commits:
commit 9a3d8ed28dc44743b6715cd8bac39b55762cba11
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Mon Aug 13 11:21:13 2012 +0200

    Replace usage of rtl/memory.h in vcl with equivalent from string.h
    
    Change-Id: If8d460189c57f9c02923019e95bf47db1d96c716

diff --git a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
index 4bc25e9..ee9a020 100644
--- a/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
+++ b/vcl/aqua/source/dtrans/DataFlavorMapping.cxx
@@ -36,10 +36,10 @@
 #include "com/sun/star/uno/Sequence.hxx"
 
 #include <rtl/ustring.hxx>
-#include <rtl/memory.h>
 #include <osl/endian.h>
 
 #include <stdio.h>
+#include <string.h>
 
 #include <premac.h>
 #include <Cocoa/Cocoa.h>
@@ -486,7 +486,7 @@ Any FileListDataProvider::getOOoData()
 
       Sequence<sal_Int8> oOOFileList(lenSeqRequired);
       unichar* pBuffer = reinterpret_cast<unichar*>(oOOFileList.getArray());
-      rtl_zeroMemory(pBuffer, lenSeqRequired);
+      memset(pBuffer, 0, lenSeqRequired);
 
       for (size_t i = 0; i < length; i++)
         {
diff --git a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
index c337c99..2a5f40e 100644
--- a/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
+++ b/vcl/aqua/source/dtrans/HtmlFmtFlt.cxx
@@ -108,9 +108,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());
@@ -141,7 +141,7 @@ Sequence<sal_Int8> HTMLFormatToTextHtml(const Sequence<sal_Int8>& aHTMLFormat)
   sal_Int32 len = dataEnd - htmlStartTag;
   Sequence<sal_Int8> plainHtmlData(len);
 
-  rtl_copyMemory(static_cast<void*>(plainHtmlData.getArray()), htmlStartTag, len);
+  memcpy(static_cast<void*>(plainHtmlData.getArray()), htmlStartTag, len);
 
   return plainHtmlData;
 }
diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index f6016e2..8a545da 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -29,6 +29,7 @@
 #include <Carbon/Carbon.h>
 #include <QuickTime/QuickTime.h>
 #include <postmac.h>
+#include <string.h>
 
 #include "PictToBmpFlt.hxx"
 
@@ -68,7 +69,7 @@ bool PICTtoBMP(com::sun::star::uno::Sequence<sal_Int8>& aPict,
       aBmp.realloc(sz);
 
       HLock(hBmp);
-      rtl_copyMemory(aBmp.getArray(), ((sal_Int8*)*hBmp), sz);
+      memcpy(aBmp.getArray(), ((sal_Int8*)*hBmp), sz);
       HUnlock(hBmp);
 
       result = true;
@@ -130,7 +131,7 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
       aPict.realloc(sz);
 
       HLock((Handle)hPict);
-      rtl_copyMemory(aPict.getArray(), ((sal_Int8*)*hPict), sz);
+      memcpy(aPict.getArray(), ((sal_Int8*)*hPict), sz);
       HUnlock((Handle)hPict);
 
       // Release the data associated with the picture
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 2d5e53e..8389d2d 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -71,7 +71,6 @@
 
 #include <sot/exchange.hxx>
 #include <sot/formats.hxx>
-#include <rtl/memory.h>
 #include <sal/macros.h>
 
 #include <vcl/unohelp.hxx>
@@ -172,7 +171,7 @@ void Impl_IMEInfos::CopyAttribs( const xub_StrLen* pA, xub_StrLen nL )
     nLen = nL;
     delete[] pAttribs;
     pAttribs = new sal_uInt16[ nL ];
-    rtl_copyMemory( pAttribs, pA, nL*sizeof(sal_uInt16) );
+    memcpy( pAttribs, pA, nL*sizeof(sal_uInt16) );
 }
 
 // -----------------------------------------------------------------------
diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index 41a1dc3..1ce4253 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -1685,7 +1685,7 @@ sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount )
         PopularColorCount*  pCountTable = new PopularColorCount[ nTotalColors ];
         long                nX, nY, nR, nG, nB, nIndex;
 
-        rtl_zeroMemory( pCountTable, nTotalColors * sizeof( PopularColorCount ) );
+        memset( pCountTable, 0, nTotalColors * sizeof( PopularColorCount ) );
 
         for( nR = 0, nIndex = 0; nR < 256; nR += nColorOffset )
         {
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx
index 3d0a48d..3bbed3e 100644
--- a/vcl/source/gdi/bmpfast.cxx
+++ b/vcl/source/gdi/bmpfast.cxx
@@ -919,7 +919,7 @@ bool ImplFastEraseBitmap( BitmapBuffer& rDst, const BitmapColor& rColor )
     if( bByteFill )
     {
         long nByteCount = rDst.mnHeight * rDst.mnScanlineSize;
-        rtl_fillMemory( rDst.mpBits, nByteCount, nFillByte );
+        memset( rDst.mpBits, nFillByte, nByteCount );
         return true;
     }
 
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index ca44916..e17c318 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -126,7 +126,7 @@ void PDFTestOutputStream::write( const com::sun::star::uno::Reference< com::sun:
 {
     OString aStr( "lalala\ntest\ntest\ntest" );
     com::sun::star::uno::Sequence< sal_Int8 > aData( aStr.getLength() );
-    rtl_copyMemory( aData.getArray(), aStr.getStr(), aStr.getLength() );
+    memcpy( aData.getArray(), aStr.getStr(), aStr.getLength() );
     xStream->writeBytes( aData );
 }
 
@@ -3151,7 +3151,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitSystemFont( const PhysicalFo
     aInfo.m_aFontBBox = Rectangle( Point( -200, -200 ), Size( 1700, 1700 ) );
     aInfo.m_aPSName = pFont->maName;
     sal_Int32 pWidths[256];
-    rtl_zeroMemory( pWidths, sizeof(pWidths) );
+    memset( pWidths, 0, sizeof(pWidths) );
     if( pFont->IsEmbeddable() )
     {
         const unsigned char* pFontData = NULL;
@@ -3304,10 +3304,10 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
     sal_Int32 pEncToUnicodeIndex[256];
     if( pEncoding )
     {
-        rtl_zeroMemory( nEncoding, sizeof(nEncoding) );
-        rtl_zeroMemory( nEncodedCodes, sizeof(nEncodedCodes) );
-        rtl_zeroMemory( pUnicodesPerGlyph, sizeof(pUnicodesPerGlyph) );
-        rtl_zeroMemory( pEncToUnicodeIndex, sizeof(pEncToUnicodeIndex) );
+        memset( nEncoding, 0, sizeof(nEncoding) );
+        memset( nEncodedCodes, 0, sizeof(nEncodedCodes) );
+        memset( pUnicodesPerGlyph, 0, sizeof(pUnicodesPerGlyph) );
+        memset( pEncToUnicodeIndex, 0, sizeof(pEncToUnicodeIndex) );
         for( Ucs2SIntMap::const_iterator it = pEncoding->begin(); it != pEncoding->end(); ++it )
         {
             if( it->second != -1 )
@@ -3599,7 +3599,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical
                     else
                     {
                         boost::shared_array<unsigned char> pWriteBuffer( new unsigned char[ nLength2 ] );
-                        rtl_zeroMemory( pWriteBuffer.get(), nLength2 );
+                        memset( pWriteBuffer.get(), 0, nLength2 );
                         int nWriteIndex = 0;
 
                         int nNextSectionIndex = 0;
@@ -4085,10 +4085,10 @@ bool PDFWriterImpl::emitFonts()
             // fill arrays and prepare encoding index map
             sal_Int32 nToUnicodeStream = 0;
 
-            rtl_zeroMemory( pGlyphIDs, sizeof( pGlyphIDs ) );
-            rtl_zeroMemory( pEncoding, sizeof( pEncoding ) );
-            rtl_zeroMemory( pUnicodesPerGlyph, sizeof( pUnicodesPerGlyph ) );
-            rtl_zeroMemory( pEncToUnicodeIndex, sizeof( pEncToUnicodeIndex ) );
+            memset( pGlyphIDs, 0, sizeof( pGlyphIDs ) );
+            memset( pEncoding, 0, sizeof( pEncoding ) );
+            memset( pUnicodesPerGlyph, 0, sizeof( pUnicodesPerGlyph ) );
+            memset( pEncToUnicodeIndex, 0, sizeof( pEncToUnicodeIndex ) );
             for( FontEmitMapping::iterator fit = lit->m_aMapping.begin(); fit != lit->m_aMapping.end();++fit )
             {
                 sal_uInt8 nEnc = fit->second.getGlyphId();
diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx
index 2f3a6b3..2a57926 100644
--- a/vcl/source/gdi/pdfwriter_impl.hxx
+++ b/vcl/source/gdi/pdfwriter_impl.hxx
@@ -294,7 +294,7 @@ public:
     public:
         GlyphEmit() : m_nUnicodes(0), m_nSubsetGlyphID(0)
         {
-            rtl_zeroMemory( m_aBufferedUnicodes, sizeof( m_aBufferedUnicodes ) );
+            memset( m_aBufferedUnicodes, 0, sizeof( m_aBufferedUnicodes ) );
             m_nMaxUnicodes = SAL_N_ELEMENTS(m_aBufferedUnicodes);
         }
         ~GlyphEmit()
@@ -310,9 +310,9 @@ public:
             {
                 sal_Ucs* pNew = new sal_Ucs[ 2 * m_nMaxUnicodes];
                 if( m_pUnicodes.get() )
-                    rtl_copyMemory( pNew, m_pUnicodes.get(), m_nMaxUnicodes * sizeof(sal_Ucs) );
+                    memcpy( pNew, m_pUnicodes.get(), m_nMaxUnicodes * sizeof(sal_Ucs) );
                 else
-                    rtl_copyMemory( pNew, m_aBufferedUnicodes, m_nMaxUnicodes * sizeof(sal_Ucs) );
+                    memcpy( pNew, m_aBufferedUnicodes, m_nMaxUnicodes * sizeof(sal_Ucs) );
                 m_pUnicodes.reset( pNew );
                 m_nMaxUnicodes *= 2;
             }
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index d7998c9..16f806b 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1234,8 +1234,8 @@ uno::Reference< beans::XMaterialHolder > PDFWriterImpl::initEncryption( const rt
             xResult.clear();
 
         // trash temporary padded cleartext PWDs
-        rtl_zeroMemory( aPadOPW, sizeof(aPadOPW) );
-        rtl_zeroMemory( aPadUPW, sizeof(aPadUPW) );
+        memset( aPadOPW, 0, sizeof(aPadOPW) );
+        memset( aPadUPW, 0, sizeof(aPadUPW) );
 
     }
     return xResult;
@@ -1317,7 +1317,7 @@ void PDFWriterImpl::padPassword( const rtl::OUString& i_rPassword, sal_uInt8* o_
         o_pPaddedPW[i] = s_nPadString[y];
 
     // trash memory of temporary clear text password
-    rtl_zeroMemory( (sal_Char*)aString.getStr(), aString.getLength() );
+    memset( (sal_Char*)aString.getStr(), 0, aString.getLength() );
 }
 
 /**********************************
diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index a01b66d..e94f0f5 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -31,7 +31,6 @@
 
 #include <cmath>
 #include <rtl/crc.h>
-#include <rtl/memory.h>
 #include <rtl/alloc.h>
 #include <tools/zcodec.hxx>
 #include <tools/stream.hxx>
@@ -750,7 +749,7 @@ sal_Bool PNGReaderImpl::ImplReadTransparent()
                 if ( mnChunkLen == 2 )
                 {
                     mpTransTab = new sal_uInt8[ 256 ];
-                    rtl_fillMemory( mpTransTab, 256, 0xff );
+                    memset( mpTransTab, 0xff, 256);
                     // color type 0 and 4 is always greyscale,
                     // so the return value can be used as index
                     sal_uInt8 nIndex = ImplScaleColor();
@@ -778,10 +777,10 @@ sal_Bool PNGReaderImpl::ImplReadTransparent()
                 {
                     mbTransparent = true;
                     mpTransTab = new sal_uInt8 [ 256 ];
-                    rtl_fillMemory( mpTransTab, 256, 0xff );
+                    memset( mpTransTab, 0xff, 256 );
                     if (mnChunkLen > 0)
                     {
-                        rtl_copyMemory( mpTransTab, &(*maDataIter), mnChunkLen );
+                        memcpy( mpTransTab, &(*maDataIter), mnChunkLen );
                         maDataIter += mnChunkLen;
                         // need alpha transparency if not on/off masking
                         for( int i = 0; i < mnChunkLen; ++i )
@@ -1023,7 +1022,7 @@ bool PNGReaderImpl::ImplPreparePass()
     mnScansize = ( mnScansize*mnPngDepth + 7 ) >> 3;
 
     ++mnScansize; // scan size also needs room for the filtertype byte
-    rtl_zeroMemory( mpScanPrior, mnScansize );
+    memset( mpScanPrior, 0, mnScansize );
 
     return true;
 }
@@ -1132,7 +1131,7 @@ void PNGReaderImpl::ImplApplyFilter()
         break;
     }
 
-    rtl_copyMemory( mpScanPrior, mpInflateInBuf, mnScansize );
+    memcpy( mpScanPrior, mpInflateInBuf, mnScansize );
 }
 
 // ---------------------------------------------------------------------------------------------------
diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx
index 9a90fd9..2412cf8 100644
--- a/vcl/source/gdi/pngwrite.cxx
+++ b/vcl/source/gdi/pngwrite.cxx
@@ -32,7 +32,6 @@
 #include <cmath>
 #include <limits>
 #include <rtl/crc.h>
-#include <rtl/memory.h>
 #include <rtl/alloc.h>
 #include <tools/zcodec.hxx>
 #include <tools/stream.hxx>
@@ -648,7 +647,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uL
 void PNGWriterImpl::ImplClearFirstScanline()
 {
     if ( mnFilterType )
-        rtl_zeroMemory( mpPreviousScan, mnDeflateInSize );
+        memset( mpPreviousScan, 0, mnDeflateInSize );
 }
 
 // ------------------------------------------------------------------------
@@ -682,7 +681,7 @@ void PNGWriterImpl::ImplWriteChunk ( unsigned char* pSource, sal_uInt32 nDatSize
         vcl::PNGWriter::ChunkData& rChunkData = maChunkSeq.back();
         sal_uInt32 nSize = rChunkData.aData.size();
         rChunkData.aData.resize( nSize + nDatSize );
-        rtl_copyMemory( &rChunkData.aData[ nSize ], pSource, nDatSize );
+        memcpy( &rChunkData.aData[ nSize ], pSource, nDatSize );
     }
 }
 
diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 4f13fbb..a6241ad 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -26,7 +26,6 @@
  *
  ************************************************************************/
 
-#include <rtl/memory.h>
 #include <vcl/bmpacc.hxx>
 #include <vcl/salbtype.hxx>
 #include <bmpfast.hxx>
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx
index d54240b..849b0a6 100644
--- a/vcl/source/helper/canvasbitmap.cxx
+++ b/vcl/source/helper/canvasbitmap.cxx
@@ -520,7 +520,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getData( rendering::IntegerB
         for( long y=aRequestedBytes.Top(); y<aRequestedBytes.Bottom(); ++y )
         {
             Scanline pScan = m_pBmpAcc->GetScanline(y);
-            rtl_copyMemory(pOutBuf, pScan+aRequestedBytes.Left(), aRequestedBytes.getWidth());
+            memcpy(pOutBuf, pScan+aRequestedBytes.Left(), aRequestedBytes.getWidth());
             pOutBuf += nScanlineStride;
         }
     }
@@ -605,7 +605,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
 
         // can return bitmap data as-is
         Scanline pScan = m_pBmpAcc->GetScanline(pos.Y);
-        rtl_copyMemory(pOutBuf, pScan+nScanlineLeftOffset, aRet.getLength() );
+        memcpy(pOutBuf, pScan+nScanlineLeftOffset, aRet.getLength() );
     }
     else
     {
@@ -629,7 +629,7 @@ uno::Sequence< sal_Int8 > SAL_CALL VclCanvasBitmap::getPixel( rendering::Integer
             Scanline  pScan = m_pBmpAcc->GetScanline(pos.Y);
 
             // input integer multiple of byte - copy directly
-            rtl_copyMemory(pOutBuf, pScan+nScanlineLeftOffset, nNonAlphaBytes );
+            memcpy(pOutBuf, pScan+nScanlineLeftOffset, nNonAlphaBytes );
             pOutBuf += nNonAlphaBytes;
             *pOutBuf++ = m_pAlphaAcc->GetPixel(pos.Y,pos.X);
         }
diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index a76d035..2414643 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -2391,7 +2391,7 @@ bool SalDisplay::XIfEventWithTimeout( XEvent* o_pEvent, XPointer i_pPredicateDat
 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 SalVisual::SalVisual()
 {
-    rtl_zeroMemory( this, sizeof( SalVisual ) );
+    memset( this, 0, sizeof( SalVisual ) );
 }
 
 SalVisual::SalVisual( const XVisualInfo* pXVI )
diff --git a/vcl/unx/generic/app/sm.cxx b/vcl/unx/generic/app/sm.cxx
index 0122038..67e7db2 100644
--- a/vcl/unx/generic/app/sm.cxx
+++ b/vcl/unx/generic/app/sm.cxx
@@ -637,7 +637,7 @@ void ICEConnectionWorker(void * data)
             nConnectionsBefore = pThis->m_nConnections;
             int nBytes = sizeof( struct pollfd )*(nConnectionsBefore+1);
             pLocalFD = (struct pollfd*)rtl_allocateMemory( nBytes );
-            rtl_copyMemory( pLocalFD, pThis->m_pFilehandles, nBytes );
+            memcpy( pLocalFD, pThis->m_pFilehandles, nBytes );
         }
 
         int nRet = poll( pLocalFD,nConnectionsBefore+1,-1 );
diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx
index 46f1169..c35aaec 100644
--- a/vcl/unx/generic/gdi/salbmp.cxx
+++ b/vcl/unx/generic/gdi/salbmp.cxx
@@ -36,7 +36,6 @@
 #endif
 
 #include <osl/endian.h>
-#include <rtl/memory.h>
 
 #include <vcl/bitmap.hxx>
 #include <vcl/salbtype.hxx>
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 9d74444..ebed2d0 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -188,7 +188,7 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
 {
     XEvent aEvent;
 
-    rtl_zeroMemory( &aEvent, sizeof(aEvent) );
+    memset( &aEvent, 0, sizeof(aEvent) );
     aEvent.xclient.window = mhForeignParent;
     aEvent.xclient.type = ClientMessage;
     aEvent.xclient.message_type = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::XEMBED );
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index a6f8e0d..fdbc6de 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1062,7 +1062,7 @@ void GtkSalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode )
 #if !GTK_CHECK_VERSION(3,0,0)
     XEvent aEvent;
 
-    rtl_zeroMemory( &aEvent, sizeof(aEvent) );
+    memset( &aEvent, 0, sizeof(aEvent) );
     aEvent.xclient.window = m_aForeignParentWindow;
     aEvent.xclient.type = ClientMessage;
     aEvent.xclient.message_type = getDisplay()->getWMAdaptor()->getAtom( vcl_sal::WMAdaptor::XEMBED );
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index b63d658..7b2b1cc 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -492,7 +492,7 @@ SalInstance* CreateSalInstance()
 
     // determine the windows version
     aSalShlData.mbWXP        = 0;
-    rtl_zeroMemory( &aSalShlData.maVersionInfo, sizeof(aSalShlData.maVersionInfo) );
+    memset( &aSalShlData.maVersionInfo, 0, sizeof(aSalShlData.maVersionInfo) );
     aSalShlData.maVersionInfo.dwOSVersionInfoSize = sizeof( aSalShlData.maVersionInfo );
     if ( GetVersionEx( &aSalShlData.maVersionInfo ) )
     {
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 70be7f4..5f7e191 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1071,9 +1071,9 @@ static HDC ImplCreateSalPrnIC( WinSalInfoPrinter* pPrinter, ImplJobSetup* pSetup
         return 0;
     sal_Unicode pDriverName[ 4096 ];
     sal_Unicode pDeviceName[ 4096 ];
-    rtl_copyMemory( pDriverName, pPrinter->maDriverName.getStr(), pPrinter->maDriverName.getLength()*sizeof(sal_Unicode));
+    memcpy( pDriverName, pPrinter->maDriverName.getStr(), pPrinter->maDriverName.getLength()*sizeof(sal_Unicode));
     memset( pDriverName+pPrinter->maDriverName.getLength(), 0, 32 );
-    rtl_copyMemory( pDeviceName, pPrinter->maDeviceName.getStr(), pPrinter->maDeviceName.getLength()*sizeof(sal_Unicode));
+    memcpy( pDeviceName, pPrinter->maDeviceName.getStr(), pPrinter->maDeviceName.getLength()*sizeof(sal_Unicode));
     memset( pDeviceName+pPrinter->maDeviceName.getLength(), 0, 32 );
     hDC = ImplCreateICW_WithCatch( reinterpret_cast< LPWSTR >(pDriverName),
                                    reinterpret_cast< LPCWSTR >(pDeviceName),
@@ -1557,8 +1557,8 @@ sal_Bool WinSalPrinter::StartJob( const rtl::OUString* pFileName,
     // #95347 some buggy drivers (eg, OKI) write to those buffers in CreateDC, although declared const - so provide some space
     sal_Unicode aDrvBuf[4096];
     sal_Unicode aDevBuf[4096];
-    rtl_copyMemory( aDrvBuf, mpInfoPrinter->maDriverName.getStr(), (mpInfoPrinter->maDriverName.getLength()+1)*sizeof(sal_Unicode));
-    rtl_copyMemory( aDevBuf, mpInfoPrinter->maDeviceName.getStr(), (mpInfoPrinter->maDeviceName.getLength()+1)*sizeof(sal_Unicode));
+    memcpy( aDrvBuf, mpInfoPrinter->maDriverName.getStr(), (mpInfoPrinter->maDriverName.getLength()+1)*sizeof(sal_Unicode));
+    memcpy( aDevBuf, mpInfoPrinter->maDeviceName.getStr(), (mpInfoPrinter->maDeviceName.getLength()+1)*sizeof(sal_Unicode));
     hDC = CreateDCW( reinterpret_cast<LPCWSTR>(aDrvBuf),
                      reinterpret_cast<LPCWSTR>(aDevBuf),
                      NULL,


More information about the Libreoffice-commits mailing list