Kaydet (Commit) 4d66989d authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#1078 cgm infinite recurse

Change-Id: I6ba4c6a432f1dd150591f8d9b0f03e248a97c33e
üst 7cd4b591
...@@ -51,6 +51,7 @@ CGM::CGM(uno::Reference< frame::XModel > const & rModel) ...@@ -51,6 +51,7 @@ CGM::CGM(uno::Reference< frame::XModel > const & rModel)
, mbPictureBody(false) , mbPictureBody(false)
, mbFigure(false) , mbFigure(false)
, mbFirstOutPut(false) , mbFirstOutPut(false)
, mbInDefaultReplacement(false)
, mnAct4PostReset(0) , mnAct4PostReset(0)
, mpBitmapInUse(nullptr) , mpBitmapInUse(nullptr)
, mpChart(nullptr) , mpChart(nullptr)
...@@ -620,8 +621,16 @@ void CGM::ImplDoClass() ...@@ -620,8 +621,16 @@ void CGM::ImplDoClass()
void CGM::ImplDefaultReplacement() void CGM::ImplDefaultReplacement()
{ {
if ( !maDefRepList.empty() ) if (!maDefRepList.empty())
{ {
if (mbInDefaultReplacement)
{
SAL_WARN("filter", "recursion in ImplDefaultReplacement");
return;
}
mbInDefaultReplacement = true;
sal_uInt32 nOldEscape = mnEscape; sal_uInt32 nOldEscape = mnEscape;
sal_uInt32 nOldElementClass = mnElementClass; sal_uInt32 nOldElementClass = mnElementClass;
sal_uInt32 nOldElementID = mnElementID; sal_uInt32 nOldElementID = mnElementID;
...@@ -663,6 +672,8 @@ void CGM::ImplDefaultReplacement() ...@@ -663,6 +672,8 @@ void CGM::ImplDefaultReplacement()
mnParaSize = mnElementSize = nOldElementSize; mnParaSize = mnElementSize = nOldElementSize;
mpSource = pOldBuf; mpSource = pOldBuf;
mpEndValidSource = pOldEndValidSource; mpEndValidSource = pOldEndValidSource;
mbInDefaultReplacement = false;
} }
} }
......
...@@ -64,7 +64,8 @@ class CGM ...@@ -64,7 +64,8 @@ class CGM
bool mbPictureBody; bool mbPictureBody;
bool mbFigure; bool mbFigure;
bool mbFirstOutPut; bool mbFirstOutPut;
sal_uInt32 mnAct4PostReset; bool mbInDefaultReplacement;
sal_uInt32 mnAct4PostReset;
CGMBitmap* mpBitmapInUse; CGMBitmap* mpBitmapInUse;
CGMChart* mpChart; // if sal_True->"SHWSLIDEREC" CGMChart* mpChart; // if sal_True->"SHWSLIDEREC"
// otherwise "BEGINPIC" commands // otherwise "BEGINPIC" commands
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment