summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/filter/igif/decode.cxx6
-rw-r--r--vcl/source/filter/igif/gifread.cxx2
-rw-r--r--vcl/source/fontsubset/list.cxx11
-rw-r--r--vcl/source/gdi/impvect.cxx6
-rw-r--r--vcl/source/gdi/jobset.cxx6
-rw-r--r--vcl/source/gdi/octree.cxx8
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx7
-rw-r--r--vcl/source/gdi/print.cxx2
9 files changed, 25 insertions, 25 deletions
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 7e136d1e3f20..8cbb52c9f9d8 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -64,7 +64,7 @@ Scanline GIFLZWDecompressor::DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSiz
{
sal_uLong nTargetSize = 4096;
sal_uLong nCount = 0;
- sal_uInt8* pTarget = static_cast<sal_uInt8*>(rtl_allocateMemory( nTargetSize ));
+ sal_uInt8* pTarget = static_cast<sal_uInt8*>(std::malloc( nTargetSize ));
sal_uInt8* pTmpTarget = pTarget;
nBlockBufSize = cBufSize;
@@ -79,10 +79,10 @@ Scanline GIFLZWDecompressor::DecompressBlock( sal_uInt8* pSrc, sal_uInt8 cBufSiz
{
sal_uLong nNewSize = nTargetSize << 1;
sal_uLong nOffset = pTmpTarget - pTarget;
- sal_uInt8* pTmp = static_cast<sal_uInt8*>(rtl_allocateMemory( nNewSize ));
+ sal_uInt8* pTmp = static_cast<sal_uInt8*>(std::malloc( nNewSize ));
memcpy( pTmp, pTarget, nTargetSize );
- rtl_freeMemory( pTarget );
+ std::free( pTarget );
nTargetSize = nNewSize;
pTmpTarget = ( pTarget = pTmp ) + nOffset;
diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx
index 8698a2672f3f..3d1b191c798f 100644
--- a/vcl/source/filter/igif/gifread.cxx
+++ b/vcl/source/filter/igif/gifread.cxx
@@ -530,7 +530,7 @@ sal_uLong GIFReader::ReadNextBlock()
if( nRead && !bOverreadBlock )
FillImages( pTarget, nRead );
- rtl_freeMemory( pTarget );
+ std::free( pTarget );
}
}
}
diff --git a/vcl/source/fontsubset/list.cxx b/vcl/source/fontsubset/list.cxx
index aab4bf40d2f6..986cf5eb2633 100644
--- a/vcl/source/fontsubset/list.cxx
+++ b/vcl/source/fontsubset/list.cxx
@@ -27,6 +27,7 @@
#include <rtl/alloc.h>
#include <assert.h>
+#include <cstdlib>
#include "list.h"
@@ -49,7 +50,7 @@ struct list_ {
static lnode *newNode(void *el)
{
- lnode *ptr = static_cast<lnode *>(rtl_allocateMemory(sizeof(lnode)));
+ lnode *ptr = static_cast<lnode *>(std::malloc(sizeof(lnode)));
assert(ptr != nullptr);
ptr->value = el;
@@ -84,7 +85,7 @@ static lnode *appendPrim(list pThis, void *el)
/*- public methods */
list listNewEmpty() /*- default ctor */
{
- list pThis = static_cast<list>(rtl_allocateMemory(sizeof(struct list_)));
+ list pThis = static_cast<list>(std::malloc(sizeof(struct list_)));
assert(pThis != nullptr);
pThis->aCount = 0;
@@ -98,7 +99,7 @@ void listDispose(list pThis) /*- dtor */
{
assert(pThis != nullptr);
listClear(pThis);
- rtl_freeMemory(pThis);
+ std::free(pThis);
}
void listSetElementDtor(list pThis, list_destructor f)
@@ -199,7 +200,7 @@ list listRemove(list pThis)
if (pThis->eDtor) pThis->eDtor(pThis->cptr->value); /* call the dtor callback */
- rtl_freeMemory(pThis->cptr);
+ std::free(pThis->cptr);
pThis->aCount--;
pThis->cptr = ptr;
return pThis;
@@ -212,7 +213,7 @@ list listClear(list pThis)
while (node) {
ptr = node->next;
if (pThis->eDtor) pThis->eDtor(node->value); /* call the dtor callback */
- rtl_freeMemory(node);
+ std::free(node);
pThis->aCount--;
node = ptr;
}
diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 8f80bbb11cf6..482ab0facbd0 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -206,7 +206,7 @@ public:
ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
mpBuf ( static_cast<Scanline>(rtl_allocateZeroMemory(nWidth * nHeight)) ),
- mpScan ( static_cast<Scanline*>(rtl_allocateMemory(nHeight * sizeof(Scanline))) ),
+ mpScan ( static_cast<Scanline*>(std::malloc(nHeight * sizeof(Scanline))) ),
mnWidth ( nWidth ),
mnHeight( nHeight )
{
@@ -219,8 +219,8 @@ ImplVectMap::ImplVectMap( long nWidth, long nHeight ) :
ImplVectMap::~ImplVectMap()
{
- rtl_freeMemory( mpBuf );
- rtl_freeMemory( mpScan );
+ std::free( mpBuf );
+ std::free( mpScan );
}
inline void ImplVectMap::Set( long nY, long nX, sal_uInt8 cVal )
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 6326c6703a6b..7fc650c38e07 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -81,7 +81,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
{
if ( rJobSetup.GetDriverData() )
{
- mpDriverData = static_cast<sal_uInt8*>(rtl_allocateMemory( mnDriverDataLen ));
+ mpDriverData = static_cast<sal_uInt8*>(std::malloc( mnDriverDataLen ));
memcpy( mpDriverData, rJobSetup.GetDriverData(), mnDriverDataLen );
}
else
@@ -90,7 +90,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
ImplJobSetup::~ImplJobSetup()
{
- rtl_freeMemory( mpDriverData );
+ std::free( mpDriverData );
}
void ImplJobSetup::SetSystem(sal_uInt16 nSystem)
@@ -283,7 +283,7 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
else
{
sal_uInt8* pNewDriverData = static_cast<sal_uInt8*>(
- rtl_allocateMemory( rJobData.GetDriverDataLen() ));
+ std::malloc( rJobData.GetDriverDataLen() ));
memcpy( pNewDriverData, pDriverData, rJobData.GetDriverDataLen() );
rJobData.SetDriverData( pNewDriverData );
}
diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx
index c2900cee7d1f..3397a1fb08f3 100644
--- a/vcl/source/gdi/octree.cxx
+++ b/vcl/source/gdi/octree.cxx
@@ -282,8 +282,8 @@ InverseColorMap::InverseColorMap( const BitmapPalette& rPal ) :
InverseColorMap::~InverseColorMap()
{
- rtl_freeMemory( pBuffer );
- rtl_freeMemory( pMap );
+ std::free( pBuffer );
+ std::free( pMap );
}
void InverseColorMap::ImplCreateBuffers( const sal_uLong nMax )
@@ -291,10 +291,10 @@ void InverseColorMap::ImplCreateBuffers( const sal_uLong nMax )
const sal_uLong nCount = nMax * nMax * nMax;
const sal_uLong nSize = nCount * sizeof( sal_uLong );
- pMap = static_cast<sal_uInt8*>(rtl_allocateMemory( nCount ));
+ pMap = static_cast<sal_uInt8*>(std::malloc( nCount ));
memset( pMap, 0x00, nCount );
- pBuffer = static_cast<sal_uInt8*>(rtl_allocateMemory( nSize ));
+ pBuffer = static_cast<sal_uInt8*>(std::malloc( nSize ));
memset( pBuffer, 0xff, nSize );
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 38e1ab075363..562927d505b0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1822,7 +1822,7 @@ PDFWriterImpl::~PDFWriterImpl()
if( m_aCipher )
rtl_cipher_destroyARCFOUR( m_aCipher );
- rtl_freeMemory( m_pEncryptionBuffer );
+ std::free( m_pEncryptionBuffer );
}
void PDFWriterImpl::setupDocInfo()
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 11bffa24682d..0d2baba291de 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1154,9 +1154,8 @@ bool PDFWriterImpl::checkEncryptionBufferSize( sal_Int32 newSize )
{
if( m_nEncryptionBufferSize < newSize )
{
- /* reallocate the buffer, the used function allocate as rtl_allocateMemory
- if the pointer parameter is NULL */
- m_pEncryptionBuffer = static_cast<sal_uInt8*>(rtl_reallocateMemory( m_pEncryptionBuffer, newSize ));
+ /* reallocate the buffer */
+ m_pEncryptionBuffer = static_cast<sal_uInt8*>(std::realloc( m_pEncryptionBuffer, newSize ));
if( m_pEncryptionBuffer )
m_nEncryptionBufferSize = newSize;
else
@@ -2014,7 +2013,7 @@ void PDFWriterImpl::writeG4Stream( BitmapReadAccess const * i_pBitmap )
aBitState.flush();
}
- rtl_freeMemory( pFirstRefLine );
+ std::free( pFirstRefLine );
}
static bool lcl_canUsePDFAxialShading(const Gradient& rGradient) {
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 90396200063e..2574e37f6736 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -643,7 +643,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
if ( rData.GetPrinterName() != pInfo->maPrinterName ||
rData.GetDriver() != pInfo->maDriver )
{
- rtl_freeMemory( const_cast<sal_uInt8*>(rData.GetDriverData()) );
+ std::free( const_cast<sal_uInt8*>(rData.GetDriverData()) );
rData.SetDriverData(nullptr);
rData.SetDriverDataLen(0);
}