diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwpobj.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpobj.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpobj.hxx b/lotuswordpro/source/filter/lwpobj.hxx index 978bc494a1b5..4b2e7b187870 100644 --- a/lotuswordpro/source/filter/lwpobj.hxx +++ b/lotuswordpro/source/filter/lwpobj.hxx @@ -96,10 +96,12 @@ protected: LwpSvStream* m_pStrm; bool m_bRegisteringStyle; bool m_bParsingStyle; + bool m_bConvertingContent; protected: virtual void Read(); virtual void RegisterStyle(); virtual void Parse(IXFStream* pOutputStream); + virtual void XFConvert(XFContentContainer* pCont); public: void QuickRead(); //calls RegisterStyle but bails if DoRegisterStyle is called @@ -122,8 +124,16 @@ public: Parse(pOutputStream); m_bParsingStyle = false; } - - virtual void XFConvert(XFContentContainer* pCont); + //calls XFConvert but bails if DoXFConvert is called + //on the same object recursively + void DoXFConvert(XFContentContainer* pCont) + { + if (m_bConvertingContent) + throw std::runtime_error("recursion in parsing"); + m_bConvertingContent = true; + XFConvert(pCont); + m_bConvertingContent = false; + } LwpFoundry* GetFoundry(){return m_pFoundry;} void SetFoundry(LwpFoundry* pFoundry){m_pFoundry = pFoundry;} |