summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-04-26 10:33:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-04-26 13:18:27 +0200
commitc3d89622b18b600ceff4fde964567b269fed2484 (patch)
tree64f3da98459e533c1201c3f7c21f4a7286ce4ca1
parentfb8b077e220ad8477ebc7feeb37d9d8356ec82aa (diff)
use a std::vector here
Change-Id: Ic5ad467bc6f1f8537d17be4bec3a92be947239a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133433 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/filter/idxf/dxf2mtf.cxx5
-rw-r--r--vcl/source/filter/idxf/dxfentrd.cxx4
-rw-r--r--vcl/source/filter/idxf/dxfentrd.hxx2
3 files changed, 5 insertions, 6 deletions
diff --git a/vcl/source/filter/idxf/dxf2mtf.cxx b/vcl/source/filter/idxf/dxf2mtf.cxx
index 3c248c31fca0..c0105f4bc6da 100644
--- a/vcl/source/filter/idxf/dxf2mtf.cxx
+++ b/vcl/source/filter/idxf/dxf2mtf.cxx
@@ -577,12 +577,11 @@ void DXF2GDIMetaFile::DrawHatchEntity(const DXFHatchEntity & rE, const DXFTransf
return;
SetAreaAttribute( rE );
- sal_Int32 j = 0;
tools::PolyPolygon aPolyPoly;
- for ( j = 0; j < rE.nBoundaryPathCount; j++ )
+ for (sal_Int32 j = 0; j < rE.nBoundaryPathCount; ++j)
{
std::vector< Point > aPtAry;
- const DXFBoundaryPathData& rPathData = rE.pBoundaryPathData[ j ];
+ const DXFBoundaryPathData& rPathData = rE.aBoundaryPathData[j];
if ( rPathData.bIsPolyLine )
{
for (const auto& a : rPathData.aP)
diff --git a/vcl/source/filter/idxf/dxfentrd.cxx b/vcl/source/filter/idxf/dxfentrd.cxx
index 03ff1e9f0877..2582b6a15b45 100644
--- a/vcl/source/filter/idxf/dxfentrd.cxx
+++ b/vcl/source/filter/idxf/dxfentrd.cxx
@@ -672,7 +672,7 @@ void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR )
nBoundaryPathCount = rDGR.GetI();
// limit alloc to max reasonable size based on remaining data in stream
if (nBoundaryPathCount > 0 && o3tl::make_unsigned(nBoundaryPathCount) <= rDGR.remainingSize())
- pBoundaryPathData.reset( new DXFBoundaryPathData[ nBoundaryPathCount ] );
+ aBoundaryPathData.resize(nBoundaryPathCount);
else
nBoundaryPathCount = 0;
}
@@ -701,7 +701,7 @@ void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR )
{
if ( ( nCurrentBoundaryPathIndex >= 0 ) &&
( nCurrentBoundaryPathIndex < nBoundaryPathCount ) )
- bExecutingGroupCode = pBoundaryPathData[ nCurrentBoundaryPathIndex ].EvaluateGroup( rDGR );
+ bExecutingGroupCode = aBoundaryPathData[ nCurrentBoundaryPathIndex ].EvaluateGroup( rDGR );
}
if ( !bExecutingGroupCode )
DXFBasicEntity::EvaluateGroup(rDGR);
diff --git a/vcl/source/filter/idxf/dxfentrd.hxx b/vcl/source/filter/idxf/dxfentrd.hxx
index 33a684454fc8..775d6a0844cb 100644
--- a/vcl/source/filter/idxf/dxfentrd.hxx
+++ b/vcl/source/filter/idxf/dxfentrd.hxx
@@ -439,7 +439,7 @@ class DXFHatchEntity : public DXFBasicEntity
double fPixelSize; // 47
sal_Int32 nNumberOfSeedPoints; // 98
- std::unique_ptr<DXFBoundaryPathData[]> pBoundaryPathData;
+ std::vector<DXFBoundaryPathData> aBoundaryPathData;
DXFHatchEntity();