diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 09:34:01 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 09:34:01 +0000 |
commit | fb8cba16caa87bf21fdd2747b22d90d913557dac (patch) | |
tree | d39d5cbf791053da25b88b38f9e8c90cc782a5d0 /lotuswordpro/source/filter/lwplayout.hxx | |
parent | 9e820dc8e6e8ebc65e3afad813755422bef33c63 (diff) |
infinite recurse protection
Change-Id: I7139e67e7b5bcd7e1867dff1cfbd53fa0f5748b7
Diffstat (limited to 'lotuswordpro/source/filter/lwplayout.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwplayout.hxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwplayout.hxx b/lotuswordpro/source/filter/lwplayout.hxx index 1ed947404133..e9c039aa46dd 100644 --- a/lotuswordpro/source/filter/lwplayout.hxx +++ b/lotuswordpro/source/filter/lwplayout.hxx @@ -111,9 +111,25 @@ public: bool IsAutoGrowWidth(); bool IsInlineToMargin(); virtual sal_uInt8 GetContentOrientation(){ return TEXT_ORIENT_LRTB;} - virtual bool HonorProtection(); + bool GetHonorProtection() + { + if (m_bGettingHonorProtection) + throw std::runtime_error("recursion in layout"); + m_bGettingHonorProtection = true; + bool bRet = HonorProtection(); + m_bGettingHonorProtection = false; + return bRet; + } virtual bool IsProtected(); - bool HasProtection(); + bool GetHasProtection() + { + if (m_bGettingHasProtection) + throw std::runtime_error("recursion in layout"); + m_bGettingHasProtection = true; + bool bRet = HasProtection(); + m_bGettingHasProtection = false; + return bRet; + } OUString GetStyleName(){ return m_StyleName;} bool IsComplex(); virtual bool IsAnchorPage(){ return false;} @@ -163,7 +179,11 @@ public: //End by protected: void Read() override; + bool HasProtection(); + virtual bool HonorProtection(); protected: + bool m_bGettingHonorProtection; + bool m_bGettingHasProtection; sal_uInt32 m_nAttributes; sal_uInt32 m_nAttributes2; sal_uInt32 m_nAttributes3; |