diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-28 13:35:27 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-28 13:52:42 +0100 |
commit | f7ef84640258e4ee6ddc4cc5cbf58a2d89860afa (patch) | |
tree | 4697a4ca3c94a4c16630ef8028b093eac6c40321 /writerfilter/source/rtftok/rtfdocumentimpl.hxx | |
parent | 64f57612e3010594a8a72532cabfd0ff5fb39dff (diff) |
abi#2128 RTF import: fix memory leak
Commit 9389cf78e304a5a99bcf1745b9388e14ac36281a (cp#1000018 RTF import:
empty para at the end of footnote text got lost, 2013-11-15) assumed
that \par at the end of all substreams means an empty paragraph, but it
turns out this is only true for footnotes/endnotes, but not for e.g.
headers.
Additionally, that commit actually causes a memory leak, which is
detected by an assert in the SwIndexReg dtor, so crash-testing caught
this.
Change-Id: Idfa040bf3026a9515a120cd7afaf7d314553a131
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.hxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index a0b1076f3a03..eada5faf0092 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -313,6 +313,7 @@ namespace writerfilter { Stream& Mapper(); void setSubstream(bool bIsSubtream); void setSuperstream(RTFDocumentImpl *pSuperstream); + void setStreamType(Id nId); void setAuthor(OUString& rAuthor); void setAuthorInitials(OUString& rAuthorInitials); void setIgnoreFirst(OUString& rIgnoreFirst); @@ -413,6 +414,8 @@ namespace writerfilter { bool m_bHasFootnote; /// Superstream of this substream. RTFDocumentImpl *m_pSuperstream; + /// Type of the stream: header, footer, footnote, etc. + Id m_nStreamType; std::queue< std::pair<Id, sal_uInt32> > m_nHeaderFooterPositions; sal_uInt32 m_nGroupStartPos; /// Ignore the first occurrence of this text. |