diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-21 11:24:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-21 16:00:14 +0100 |
commit | f297b0d043e0767d85f00aa1e4cae5b036b0ac51 (patch) | |
tree | 426d156ab573fc7be07b3785c3dc274510c879ec /sw/source/filter/html/htmltab.cxx | |
parent | b39e627be45f847554f11fdac040b6f4da4054ba (diff) |
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>
Diffstat (limited to 'sw/source/filter/html/htmltab.cxx')
-rw-r--r-- | sw/source/filter/html/htmltab.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 0f5f5ae162b1..7d40e971d559 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -5246,4 +5246,18 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust, return xRetTable; } +bool SwHTMLParser::CurrentTableInPaM(SwPaM& rPam) const +{ + if (!m_xTable) + return false; + const SwTable *pTable = m_xTable->GetSwTable(); + if (!pTable) + return false; + const SwTableNode* pTableNode = pTable->GetTableNode(); + if (!pTableNode) + return false; + SwNodeIndex aTableNodeIndex(*pTableNode); + return (aTableNodeIndex >= rPam.Start()->nNode && aTableNodeIndex <= rPam.End()->nNode); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |