diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-01 16:12:21 +0000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-02-08 14:12:50 +0100 |
commit | 2a2436c34ff70a99c803eac503f6495dcdeffc2d (patch) | |
tree | 7a0f4ead48b989b42f335d1a11a41458ea628bc3 /sw/source/filter/html/htmlftn.cxx | |
parent | 96af996b06f980006414dedcecc96978f5a31779 (diff) |
ofz#4767 Bad-cast
Reviewed-on: https://gerrit.libreoffice.org/47235
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 5670a9619b77a6a9e53b0cf20c059ea66ca5f450)
Change-Id: Ibf8285efae7c570452954feb41a1a36bf44504a4
ofz: avoid deleting the table still being processed
Change-Id: Ia92d469fd0e280bdc6470e780ab12b00366f0f8d
Reviewed-on: https://gerrit.libreoffice.org/46902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit f297b0d043e0767d85f00aa1e4cae5b036b0ac51)
ofz#4753 Bad-cast, check all open tables
Reviewed-on: https://gerrit.libreoffice.org/47199
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 80fc91db239869b513f47866f45d8a43fb98fe16)
Change-Id: Ie6e2fb9f2e16e021a4719c418f52ce074c359904
CurrentTableInPaM->PendingTableInPaM
Change-Id: Ic8b48d3b3e3f87e9ac3e8a6bb832f8e8dfe8ab7d
(cherry picked from commit 2ed6eba4f99681fe717741ddc1534ed3ccc15e82)
ofz#4848 Null-dereference READ
Change-Id: I632aca7e3f59b7edf48c8c35eff4abf1946af652
(cherry picked from commit d4d0b1a2b9f11fb7629559e08c345697ba129c04)
ofz#4817 Bad-cast
Change-Id: I5dc9c66ce17f6401fbc9683cf8b10bf62755a166
Reviewed-on: https://gerrit.libreoffice.org/47236
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9e269ef68e33fc9da154f6694be7cbcd5e3b4bfc)
ofz#4872 Null-dereference READ
we're going to need a bigger boat
Reviewed-on: https://gerrit.libreoffice.org/47269
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit dfc72242e5bf67bdd5127bf38ed2ad5b3e49cea3)
Change-Id: Ie4ee3ae1ac9f906ca3faec412bbafc0c6a911aaf
ofz#4971 Bad-cast
Reviewed-on: https://gerrit.libreoffice.org/47466
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit c75c3b2fdab5614664215e52d85657472ec86f05)
Change-Id: Icf66aa82e72a2b9f24f590b84bb0441ebf09463f
ofz#5007 Null-dereference READ
Reviewed-on: https://gerrit.libreoffice.org/47537
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 6d05e0945054459ed04d50ae16731f933be48664)
Change-Id: I830483071ce481fd14b0d1227c90e492e125f35e
ofz#5235 Bad-cast
Change-Id: I041f09f37941a92ccee3f0ebf9e5a950dee0c52f
Reviewed-on: https://gerrit.libreoffice.org/47747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 710cf469bf0e43a021fc1a24a80745bc602368ef)
ofz#5909 Null-dereference READ
Reviewed-on: https://gerrit.libreoffice.org/49218
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 5090d575117fbe6ced75dc45c514f8d990523251)
Change-Id: I830d3e8bda517e7681cea7481c32457486ced693
ofz#6064 clear footnotes from tobe-deleted paragraph
Change-Id: I33f75adab35d43a4bbf51e33a0abcb5daeca93a3
ofz: Null-deref
Change-Id: I9992191fe5b4cfd771cc36a61d0ebaa8a9e6e9db
Reviewed-on: https://gerrit.libreoffice.org/46743
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit e867b393ef95cb9bec7f68787771dfa329b00bea)
ofz#4728 Null-deref
Reviewed-on: https://gerrit.libreoffice.org/47000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit f2e0c18cd44fff1e1b79924f582ced400fb00dad)
Change-Id: Ide91a63424f864e2913b8268c4eca7961ba54572
Reviewed-on: https://gerrit.libreoffice.org/49357
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/filter/html/htmlftn.cxx')
-rw-r--r-- | sw/source/filter/html/htmlftn.cxx | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index ef384761f2b3..749b01dcf142 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -31,17 +31,6 @@ #include "swhtml.hxx" #include "wrthtml.hxx" -struct SwHTMLFootEndNote_Impl -{ - SwHTMLTextFootnotes aTextFootnotes; - std::vector<OUString> aNames; - - OUString sName; - OUString sContent; // information for the last footnote - bool bEndNote; - bool bFixed; -}; - sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent, sal_Int32 nPos ) { @@ -209,11 +198,8 @@ void SwHTMLParser::FinishFootEndNote() m_pPam->GetNode().GetTextNode()->GetTextAttrForCharAt( m_pPam->GetPoint()->nContent.GetIndex() - 1, RES_TXTATR_FTN ) ); // In header and footer no footnotes can be inserted. - if( pTextFootnote ) - { - m_pFootEndNoteImpl->aTextFootnotes.push_back( pTextFootnote ); - m_pFootEndNoteImpl->aNames.push_back(m_pFootEndNoteImpl->sName); - } + if (pTextFootnote) + m_pFootEndNoteImpl->aTextFootnotes.push_back(SwHTMLTextFootnote(m_pFootEndNoteImpl->sName,pTextFootnote)); m_pFootEndNoteImpl->sName = aEmptyOUStr; m_pFootEndNoteImpl->sContent = aEmptyOUStr; m_pFootEndNoteImpl->bFixed = false; @@ -235,19 +221,18 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const OUString& rName ) { SwNodeIndex *pStartNodeIdx = nullptr; - if( m_pFootEndNoteImpl ) + if (m_pFootEndNoteImpl) { OUString aName(rName.toAsciiUpperCase()); - size_t nCount = m_pFootEndNoteImpl->aNames.size(); + size_t nCount = m_pFootEndNoteImpl->aTextFootnotes.size(); for(size_t i = 0; i < nCount; ++i) { - if(m_pFootEndNoteImpl->aNames[i] == aName) + if (m_pFootEndNoteImpl->aTextFootnotes[i].sName == aName) { - pStartNodeIdx = m_pFootEndNoteImpl->aTextFootnotes[i]->GetStartNode(); - m_pFootEndNoteImpl->aNames.erase(m_pFootEndNoteImpl->aNames.begin() + i); + pStartNodeIdx = m_pFootEndNoteImpl->aTextFootnotes[i].pTextFootnote->GetStartNode(); m_pFootEndNoteImpl->aTextFootnotes.erase( m_pFootEndNoteImpl->aTextFootnotes.begin() + i ); - if(m_pFootEndNoteImpl->aNames.empty()) + if (m_pFootEndNoteImpl->aTextFootnotes.empty()) { delete m_pFootEndNoteImpl; m_pFootEndNoteImpl = nullptr; @@ -288,7 +273,7 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt ) } if( !rHTMLWrt.m_pFootEndNotes ) - rHTMLWrt.m_pFootEndNotes = new SwHTMLTextFootnotes; + rHTMLWrt.m_pFootEndNotes = new std::vector<SwTextFootnote*>; rHTMLWrt.m_pFootEndNotes->insert( rHTMLWrt.m_pFootEndNotes->begin() + nPos, pTextFootnote ); OStringBuffer sOut; |