sc/source/filter/html/htmlpars.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit bf50bfb5aa1f0dae37a703f1dc0ca1199693c3ce Author: Eike Rathke <er...@redhat.com> AuthorDate: Sat Feb 5 22:43:13 2022 +0100 Commit: Gabor Kelemen <kelem...@ubuntu.com> CommitDate: Fri Jun 9 23:07:02 2023 +0200 Resolves: tdf#74577 tdf#92960 Create missing offsets in very outer table ... if local table is outer table. Change-Id: I5996609264f4ad9efa8d76a8d0ab730bf1dded24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129540 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152805 Tested-by: Gabor Kelemen <kelem...@ubuntu.com> Reviewed-by: Gabor Kelemen <kelem...@ubuntu.com> diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index ae46949e4b21..34f481eba09c 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -752,6 +752,16 @@ void ScHTMLLayoutParser::SetWidths() sal_uInt16 nMax = static_cast<sal_uInt16>(pLocalColOffset->back()); if ( aPageSize.Width() < nMax ) aPageSize.setWidth( nMax ); + if (nTableLevel == 0) + { + // Local table is very outer table, create missing offsets. + for (auto it = pLocalColOffset->begin(); it != pLocalColOffset->end(); ++it) + { + // Only exact offsets, do not use MakeColNoRef(). + if (maColOffset.find(*it) == maColOffset.end()) + maColOffset.insert(*it); + } + } } for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i ) {