[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/inc sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Mon Jan 2 23:43:11 UTC 2017
sw/inc/ndarr.hxx | 2 +-
sw/qa/core/data/rtf/fail/table-3.rtf |binary
sw/source/core/docnode/ndtbl.cxx | 2 +-
sw/source/core/unocore/unotext.cxx | 2 +-
4 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1d45caa9a3a326a1947265feb02d7d0a378c75f3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 13 13:51:24 2016 +0000
crashtesting: assert on loading certain rtf
Change-Id: I17acf270f552571fec898e19fa2d000ec4c00df5
(cherry picked from commit 82f25d5de546225548725e4056fdf1148fe605eb)
Reviewed-on: https://gerrit.libreoffice.org/31979
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 39078e7..f4c00d4 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -258,7 +258,7 @@ public:
SwTextFormatColl* pTextColl,
SwUndoTextToTable* pUndo = nullptr );
- static SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
+ SwNodeRange * ExpandRangeForTableBox(const SwNodeRange & rRange);
/// create a table from a vector of NodeRanges - API support
SwTableNode* TextToTable( const TableRanges_t& rTableNodes,
diff --git a/sw/qa/core/data/rtf/fail/table-3.rtf b/sw/qa/core/data/rtf/fail/table-3.rtf
new file mode 100644
index 0000000..ea07218
Binary files /dev/null and b/sw/qa/core/data/rtf/fail/table-3.rtf differ
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 56a54575..889a513 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1315,7 +1315,7 @@ SwNodeRange * SwNodes::ExpandRangeForTableBox(const SwNodeRange & rRange)
}
SwNode * pNode = &aIndex.GetNode();
- while (pNode->IsEndNode())
+ while (pNode->IsEndNode() && aIndex < Count() - 1)
{
SwNode * pStartNode = pNode->StartOfSectionNode();
SwNodeIndex aStartIndex(*pStartNode);
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index bad069f..f87543c 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1839,7 +1839,7 @@ void SwXText::Impl::ConvertCell(
SwNodeRange aTmpRange(aStartCellPam.Start()->nNode,
aEndCellPam.End()->nNode);
SwNodeRange * pCorrectedRange =
- SwNodes::ExpandRangeForTableBox(aTmpRange);
+ m_pDoc->GetNodes().ExpandRangeForTableBox(aTmpRange);
if (pCorrectedRange != nullptr)
{
More information about the Libreoffice-commits
mailing list