sc/source/filter/html/htmlpars.cxx | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 2ea7055ea6115051a92c66a439b02d83bb067db7
Author: Eike Rathke <er...@redhat.com>
AuthorDate: Sat Feb 5 22:43:13 2022 +0100
Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Feb 7 08:27:24 2022 +0100
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
(cherry picked from commit 8a9b870a40c41c7cae6e43452b593804fa17f831)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129550
Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>
diff --git a/sc/source/filter/html/htmlpars.cxx
b/sc/source/filter/html/htmlpars.cxx
index 2dabd09d10b4..ae93c3e56021 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -761,6 +761,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 )
{