summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/msfilter/svdfppt.cxx9
-rw-r--r--include/filter/msfilter/svdfppt.hxx6
2 files changed, 7 insertions, 8 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 1162815f17bc..c34f8dc42968 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -122,6 +122,7 @@
#include <algorithm>
#include <cassert>
#include <set>
+#include <utility>
#include <rtl/strbuf.hxx>
#include <tools/time.hxx>
#include <memory>
@@ -1219,12 +1220,12 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
}
if (nRowCount > 0)
{
- sal_uInt32* pTableArry = new sal_uInt32[ nRowCount + 2 ];
+ std::unique_ptr<sal_uInt32[]> pTableArry(new sal_uInt32[ nRowCount + 2 ]);
pTableArry[ 0 ] = nTableProperties;
pTableArry[ 1 ] = nRowCount;
for ( i = 0; i < nRowCount; i++ )
rSt.ReadUInt32( pTableArry[ i + 2 ] );
- rData.pTableRowProperties = pTableArry;
+ rData.pTableRowProperties = std::move(pTableArry);
}
}
}
@@ -2862,12 +2863,12 @@ void SdrPowerPointImport::ImportPage( SdrPage* pRet, const PptSlidePersistEntry*
Rectangle aEmpty;
aShapeHd.SeekToBegOfRecord( rStCtrl );
sal_Int32 nShapeId;
- aProcessData.pTableRowProperties = nullptr;
+ aProcessData.pTableRowProperties.reset();
SdrObject* pObj = ImportObj( rStCtrl, static_cast<void*>(&aProcessData), aEmpty, aEmpty, 0, &nShapeId );
if ( pObj )
{
if ( aProcessData.pTableRowProperties )
- pObj = CreateTable( pObj, aProcessData.pTableRowProperties, aProcessData.rPersistEntry.pSolverContainer );
+ pObj = CreateTable( pObj, aProcessData.pTableRowProperties.get(), aProcessData.rPersistEntry.pSolverContainer );
pRet->NbcInsertObject( pObj );
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index 9633234fd747..d1a1078c7a99 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -508,13 +508,11 @@ struct ProcessData
PptSlidePersistEntry& rPersistEntry;
SdPageCapsule pPage;
::std::vector< SdrObject* > aBackgroundColoredObjects;
- sal_uInt32* pTableRowProperties;
+ std::unique_ptr<sal_uInt32[]> pTableRowProperties;
ProcessData( PptSlidePersistEntry& rP, SdPageCapsule pP ) :
rPersistEntry ( rP ),
- pPage ( pP ),
- pTableRowProperties ( nullptr ) {};
- ~ProcessData() { delete[] pTableRowProperties; };
+ pPage ( pP ) {};
};