diff options
-rw-r--r-- | sw/qa/core/data/html/pass/ofz5007-1.html | 1 | ||||
-rw-r--r-- | sw/qa/core/data/html/pass/ofz53680-1.html | bin | 0 -> 9727 bytes | |||
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 73 | ||||
-rw-r--r-- | sw/source/filter/html/swhtml.hxx | 2 |
4 files changed, 1 insertions, 75 deletions
diff --git a/sw/qa/core/data/html/pass/ofz5007-1.html b/sw/qa/core/data/html/pass/ofz5007-1.html new file mode 100644 index 000000000000..f427c4c6069f --- /dev/null +++ b/sw/qa/core/data/html/pass/ofz5007-1.html @@ -0,0 +1 @@ +<table> <caption> <table><td></td><caption><table align="right"><td><MARQUEE>
\ No newline at end of file diff --git a/sw/qa/core/data/html/pass/ofz53680-1.html b/sw/qa/core/data/html/pass/ofz53680-1.html Binary files differnew file mode 100644 index 000000000000..d7fbcb2ebbce --- /dev/null +++ b/sw/qa/core/data/html/pass/ofz53680-1.html diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 3f7f03f19d3c..c8fee89794cc 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -4869,75 +4869,6 @@ HTMLTableOptions::HTMLTableOptions( const HTMLOptions& rOptions, } } -namespace -{ - class IndexInRange - { - private: - SwNodeIndex maStart; - SwNodeIndex maEnd; - public: - explicit IndexInRange(const SwNodeIndex& rStart, const SwNodeIndex& rEnd) - : maStart(rStart) - , maEnd(rEnd) - { - } - bool operator()(const SwHTMLTextFootnote& rTextFootnote) const - { - const SwNodeIndex aTextIdx(rTextFootnote.pTextFootnote->GetTextNode()); - return aTextIdx >= maStart && aTextIdx <= maEnd; - } - }; -} - -void SwHTMLParser::ClearFootnotesMarksInRange(const SwNodeIndex& rMkNdIdx, const SwNodeIndex& rPtNdIdx) -{ - //similarly for footnotes - if (m_pFootEndNoteImpl) - { - m_pFootEndNoteImpl->aTextFootnotes.erase(std::remove_if(m_pFootEndNoteImpl->aTextFootnotes.begin(), - m_pFootEndNoteImpl->aTextFootnotes.end(), IndexInRange(rMkNdIdx, rPtNdIdx)), m_pFootEndNoteImpl->aTextFootnotes.end()); - if (m_pFootEndNoteImpl->aTextFootnotes.empty()) - { - m_pFootEndNoteImpl.reset(); - } - } - - //follow DelFlyInRange pattern here - assert(rMkNdIdx.GetIndex() <= rPtNdIdx.GetIndex()); - - SwDoc& rDoc = rMkNdIdx.GetNode().GetDoc(); - - //ofz#9733 drop bookmarks in this range - IDocumentMarkAccess* const pMarkAccess = rDoc.getIDocumentMarkAccess(); - pMarkAccess->deleteMarks(rMkNdIdx.GetNode(), SwNodeIndex(rPtNdIdx, 1).GetNode(), nullptr, std::nullopt, std::nullopt); - - SwFrameFormats& rTable = *rDoc.GetSpzFrameFormats(); - for ( auto i = rTable.size(); i; ) - { - SwFrameFormat *pFormat = rTable[--i]; - const SwFormatAnchor &rAnch = pFormat->GetAnchor(); - SwNode const*const pAnchorNode = rAnch.GetAnchorNode(); - if (pAnchorNode && - ((rAnch.GetAnchorId() == RndStdIds::FLY_AT_PARA) || - (rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) && - ( rMkNdIdx < *pAnchorNode && *pAnchorNode <= rPtNdIdx.GetNode() )) - { - if( rPtNdIdx != *pAnchorNode ) - { - // If the Fly is deleted, all Flys in its content have to be deleted too. - const SwFormatContent &rContent = pFormat->GetContent(); - // But only fly formats own their content, not draw formats. - if (rContent.GetContentIdx() && pFormat->Which() == RES_FLYFRMFMT) - { - ClearFootnotesMarksInRange(*rContent.GetContentIdx(), - SwNodeIndex(*rContent.GetContentIdx()->GetNode().EndOfSectionNode())); - } - } - } - } -} - void SwHTMLParser::DeleteSection(SwStartNode* pSttNd) { //if section to be deleted contains a pending m_pMarquee, it will be deleted @@ -4945,10 +4876,6 @@ void SwHTMLParser::DeleteSection(SwStartNode* pSttNd) SwFrameFormat* pObjectFormat = m_pMarquee ? ::FindFrameFormat(m_pMarquee.get()) : nullptr; FrameDeleteWatch aWatch(pObjectFormat); - //similarly for footnotes - SwNodeIndex aSttIdx(*pSttNd), aEndIdx(*pSttNd->EndOfSectionNode()); - ClearFootnotesMarksInRange(aSttIdx, aEndIdx); - m_xDoc->getIDocumentContentOperations().DeleteSection(pSttNd); if (pObjectFormat) diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx index fa4811c6d416..8fa4d5bdfba7 100644 --- a/sw/source/filter/html/swhtml.hxx +++ b/sw/source/filter/html/swhtml.hxx @@ -659,8 +659,6 @@ class SwHTMLParser : public SfxHTMLParser, public SvtListener // tags realized via character styles void NewCharFormat( HtmlTokenId nToken ); - void ClearFootnotesMarksInRange(const SwNodeIndex& rSttIdx, const SwNodeIndex& rEndIdx); - void DeleteSection(SwStartNode* pSttNd); // <SDFIELD> |