diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwpframelayout.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpframelayout.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwpframelayout.cxx b/lotuswordpro/source/filter/lwpframelayout.cxx index ef95f678ad2a..d1616b815a03 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) { } @@ -946,6 +946,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()); @@ -974,6 +978,7 @@ double LwpFrameLayout::GetMaxWidth() fActualWidth = fParentWidth - fXOffset - fParentMarginRight - fWrapRight; } + m_bGettingMaxWidth = false; return fActualWidth; } |