diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/inc/xfilter/xfcontent.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp | bin | 0 -> 21428 bytes | |||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx | 9 |
3 files changed, 9 insertions, 3 deletions
diff --git a/lotuswordpro/inc/xfilter/xfcontent.hxx b/lotuswordpro/inc/xfilter/xfcontent.hxx index 611f9daaa719..38021b4fcd7a 100644 --- a/lotuswordpro/inc/xfilter/xfcontent.hxx +++ b/lotuswordpro/inc/xfilter/xfcontent.hxx @@ -105,6 +105,7 @@ public: protected: XFContent() : m_bDoingToXml(false) + , m_bInserted(false) { } @@ -115,6 +116,8 @@ protected: OUString m_strStyleName; private: bool m_bDoingToXml; +public: + bool m_bInserted; }; #endif diff --git a/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp b/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp Binary files differnew file mode 100644 index 000000000000..5b068065a1f0 --- /dev/null +++ b/lotuswordpro/qa/cppunit/data/fail/ofz6208-1.lwp diff --git a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx index 67dc59017343..b1398bc023cd 100644 --- a/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx +++ b/lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx @@ -68,8 +68,11 @@ XFContentContainer::~XFContentContainer() { } -void XFContentContainer::Add(XFContent *pContent) +void XFContentContainer::Add(XFContent *pContent) { + if (pContent->m_bInserted) + throw std::runtime_error("already inserted"); + pContent->m_bInserted = true; m_aContents.emplace_back(pContent); } @@ -80,12 +83,12 @@ void XFContentContainer::Add(const OUString& text) Add(xTC.get()); } -int XFContentContainer::GetCount() const +int XFContentContainer::GetCount() const { return m_aContents.size(); } -void XFContentContainer::Reset() +void XFContentContainer::Reset() { m_aContents.clear(); } |