summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.cxx7
-rw-r--r--lotuswordpro/source/filter/lwpframelayout.hxx1
2 files changed, 7 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx
index c4de8630c4be..c26d61f75378 100644
--- a/lotuswordpro/source/filter/lwpframelayout.cxx
+++ b/lotuswordpro/source/filter/lwpframelayout.cxx
@@ -761,7 +761,7 @@ void LwpFrameLink::Read(LwpObjectStream* pStrm)
}
LwpFrameLayout::LwpFrameLayout(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
- : LwpPlacableLayout(objHdr, pStrm), m_pFrame(nullptr)
+ : LwpPlacableLayout(objHdr, pStrm), m_pFrame(nullptr), m_bGettingMaxWidth(false)
{
}
@@ -945,6 +945,10 @@ double LwpFrameLayout::GetWidth()
*/
double LwpFrameLayout::GetMaxWidth()
{
+ if (m_bGettingMaxWidth)
+ throw std::runtime_error("recursive GetMaxWidth");
+
+ m_bGettingMaxWidth = true;
double fActualWidth = 0;
rtl::Reference<LwpVirtualLayout> xLayout(GetContainerLayout());
LwpMiddleLayout* pParent = dynamic_cast<LwpMiddleLayout*>(xLayout.get());
@@ -973,6 +977,7 @@ double LwpFrameLayout::GetMaxWidth()
fActualWidth = fParentWidth - fXOffset - fParentMarginRight - fWrapRight;
}
+ m_bGettingMaxWidth = false;
return fActualWidth;
}
diff --git a/lotuswordpro/source/filter/lwpframelayout.hxx b/lotuswordpro/source/filter/lwpframelayout.hxx
index 527e5fbd50b5..734fe88ae35f 100644
--- a/lotuswordpro/source/filter/lwpframelayout.hxx
+++ b/lotuswordpro/source/filter/lwpframelayout.hxx
@@ -141,6 +141,7 @@ private:
private:
LwpFrameLink m_Link;
std::unique_ptr<LwpFrame> m_pFrame;
+ bool m_bGettingMaxWidth;
};
/**