diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwplayout.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index 5e86cafc9723..64598dc89b6c 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -316,7 +316,15 @@ public: virtual bool MarginsSameAsParent() override; virtual double MarginsValue(const sal_uInt8& nWhichSide) override; virtual double GetExtMarginsValue(const sal_uInt8& nWhichSide) override; - LwpLayoutGeometry* GetGeometry(); + LwpLayoutGeometry* GetGeometry() + { + if (m_bGettingGeometry) + throw std::runtime_error("recursion in layout"); + m_bGettingGeometry = true; + auto pRet = Geometry(); + m_bGettingGeometry = false; + return pRet; + } double GetGeometryHeight(); double GetGeometryWidth(); LwpBorderStuff* GetBorderStuff(); @@ -363,6 +371,7 @@ protected: void Read() override; private: LwpObjectID m_BasedOnStyle; + LwpLayoutGeometry* Geometry(); protected: enum { @@ -381,6 +390,7 @@ protected: LwpObjectID m_LayBorderStuff; LwpObjectID m_LayBackgroundStuff; LwpObjectID m_LayExtBorderStuff; + bool m_bGettingGeometry; public: LwpObjectID& GetContent() { return m_Content; } LwpTabOverride* GetTabOverride(); |