summaryrefslogtreecommitdiff
path: root/vcl/source/gdi
diff options
context:
space:
mode:
authorPhilipp Lohmann <pl@openoffice.org>2002-06-19 10:21:25 +0000
committerPhilipp Lohmann <pl@openoffice.org>2002-06-19 10:21:25 +0000
commit7cf9bc8320b301143590f7ee7e72471f20e6e794 (patch)
tree1e28dee49ed7a77d02b581f44925008c068d8370 /vcl/source/gdi
parentc1376ab31c953f6aad2fb0409aef120c04100641 (diff)
#90353# #i5181# use correct allocation
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r--vcl/source/gdi/jobset.cxx13
-rw-r--r--vcl/source/gdi/print.cxx6
2 files changed, 11 insertions, 8 deletions
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 3af744e5dd7b..c31334cd37c1 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: jobset.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: ka $ $Date: 2002-05-29 12:53:04 $
+ * last change: $Author: pl $ $Date: 2002-06-19 11:20:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,6 +67,9 @@
#ifndef _STREAM_HXX
#include <tools/stream.hxx>
#endif
+#ifndef _RTL_ALLOC_H
+#include <rtl/alloc.h>
+#endif
#ifndef _SV_JOBSET_HXX
#include <jobset.hxx>
@@ -134,7 +137,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
mnDriverDataLen = rJobSetup.mnDriverDataLen;
if ( rJobSetup.mpDriverData )
{
- mpDriverData = new BYTE[mnDriverDataLen];
+ mpDriverData = (BYTE*)rtl_allocateMemory( mnDriverDataLen );
memcpy( mpDriverData, rJobSetup.mpDriverData, mnDriverDataLen );
}
else
@@ -146,7 +149,7 @@ ImplJobSetup::ImplJobSetup( const ImplJobSetup& rJobSetup ) :
ImplJobSetup::~ImplJobSetup()
{
- delete[] mpDriverData;
+ rtl_freeMemory( mpDriverData );
}
// =======================================================================
@@ -381,7 +384,7 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
if ( pJobData->mnDriverDataLen )
{
BYTE* pDriverData = ((BYTE*)pOldJobData) + nOldJobDataSize;
- pJobData->mpDriverData = new BYTE[pJobData->mnDriverDataLen];
+ pJobData->mpDriverData = (BYTE*)rtl_allocateMemory( pJobData->mnDriverDataLen );
memcpy( pJobData->mpDriverData, pDriverData, pJobData->mnDriverDataLen );
}
if( nSystem == JOBSET_FILE605_SYSTEM )
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 9cfba5539420..6a8bf1437e43 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: print.cxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: ka $ $Date: 2002-05-29 12:53:04 $
+ * last change: $Author: pl $ $Date: 2002-06-19 11:20:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -532,7 +532,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
if ( (pJobSetup->maPrinterName != pInfo->maPrinterName) ||
(pJobSetup->maDriver != pInfo->maDriver) )
{
- delete[] pJobSetup->mpDriverData;
+ rtl_freeMemory( pJobSetup->mpDriverData );
pJobSetup->mpDriverData = NULL;
pJobSetup->mnDriverDataLen = 0;
}