diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-04-26 10:33:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-04-26 13:18:27 +0200 |
commit | c3d89622b18b600ceff4fde964567b269fed2484 (patch) | |
tree | 64f3da98459e533c1201c3f7c21f4a7286ce4ca1 | |
parent | fb8b077e220ad8477ebc7feeb37d9d8356ec82aa (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.cxx | 5 | ||||
-rw-r--r-- | vcl/source/filter/idxf/dxfentrd.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/idxf/dxfentrd.hxx | 2 |
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(); |