diff options
Diffstat (limited to 'filter/source/graphicfilter')
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfreprd.cxx | 7 | ||||
-rw-r--r-- | filter/source/graphicfilter/idxf/dxfreprd.hxx | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/filter/source/graphicfilter/idxf/dxfreprd.cxx b/filter/source/graphicfilter/idxf/dxfreprd.cxx index 4373e51a1698..93847e53acc4 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.cxx @@ -132,11 +132,11 @@ void DXFPalette::SetColor(sal_uInt8 nIndex, sal_uInt8 nRed, sal_uInt8 nGreen, sa DXFRepresentation::DXFRepresentation() : mEnc(RTL_TEXTENCODING_DONTKNOW) + , mbInCalc(false) { setGlobalLineTypeScale(1.0); } - DXFRepresentation::~DXFRepresentation() { } @@ -293,6 +293,10 @@ void DXFRepresentation::ReadHeader(DXFGroupReader & rDGR) void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities, DXFBoundingBox & rBox) { + if (mbInCalc) + return; + mbInCalc = true; + DXFBasicEntity * pBE=rEntities.pFirst; while (pBE!=nullptr) { switch (pBE->eType) { @@ -437,6 +441,7 @@ void DXFRepresentation::CalcBoundingBox(const DXFEntities & rEntities, } pBE=pBE->pSucc; } + mbInCalc = false; } namespace { diff --git a/filter/source/graphicfilter/idxf/dxfreprd.hxx b/filter/source/graphicfilter/idxf/dxfreprd.hxx index a7e15b274a33..2f8fc7af90e3 100644 --- a/filter/source/graphicfilter/idxf/dxfreprd.hxx +++ b/filter/source/graphicfilter/idxf/dxfreprd.hxx @@ -92,6 +92,8 @@ public: double mfGlobalLineTypeScale; // $LTSCALE + bool mbInCalc; // guard for self-recursive bounding box calc + DXFRepresentation(); ~DXFRepresentation(); |