[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 15 15:45:36 UTC 2018
sw/qa/core/data/html/fail/ofz6891-1.html | 1 +
sw/source/filter/html/htmltab.cxx | 8 +++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 29d3d6735a98b80dd9fc0dbdb5274639883d08d9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Mar 13 14:19:46 2018 +0000
ofz#6891 empty vector access
Change-Id: Ic36d03d2646ebd90bea5fa91bc4dac3596a55d4a
Reviewed-on: https://gerrit.libreoffice.org/51229
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sw/qa/core/data/html/fail/ofz6891-1.html b/sw/qa/core/data/html/fail/ofz6891-1.html
new file mode 100644
index 000000000000..7d767d72a135
--- /dev/null
+++ b/sw/qa/core/data/html/fail/ofz6891-1.html
@@ -0,0 +1 @@
+<table align=left><td><table><S STYLE="position:absolute;width: 6">
\ No newline at end of file
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index f3a96c5e9278..4df09634005f 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2599,7 +2599,11 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
// Only tables with relative width or without width should be modified
m_pLayoutInfo->SetMustResize( m_bPrcWidth || !m_nWidth );
- m_pLayoutInfo->SetWidths();
+ SwTableLine *pLine1 = (m_pSwTable->GetTabLines())[0];
+ if (!pLine1->GetTabBoxes().empty())
+ m_pLayoutInfo->SetWidths();
+ else
+ SAL_WARN("sw.html", "no table box");
const_cast<SwTable *>(m_pSwTable)->SetHTMLTableLayout( m_pLayoutInfo );
@@ -3990,6 +3994,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
while( m_aContexts.size() > m_nContextStAttrMin )
{
HTMLAttrContext *pCntxt = PopContext();
+ if (!pCntxt)
+ break;
ClearContext( pCntxt );
delete pCntxt;
}
More information about the Libreoffice-commits
mailing list