sc/source/filter/html/htmlpars.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 8a9b870a40c41c7cae6e43452b593804fa17f831
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Sat Feb 5 22:43:13 2022 +0100
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Sun Feb 6 11:47:47 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

diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index e64fa6fbb921..e3dfffac0c0c 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -762,6 +762,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 )
     {

Reply via email to