sc/source/filter/excel/xistyle.cxx |   17 ++---------------
 sc/source/filter/inc/xistyle.hxx   |    2 --
 2 files changed, 2 insertions(+), 17 deletions(-)

New commits:
commit 9c1a525c417c8ebe4a90abf00536a74bdd2de7c3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 26 14:45:44 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue May 27 09:35:39 2025 +0200

    tdf#166445 highlight bug
    
    So we revert two commits here
        commit cadfb0db14c6ff96688259b8a1eeb8615a2f8a49
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Mon Feb 10 13:20:24 2025 +0200
        tdf#165080 Background color cells are reset to white
    
    and
        commit 2d208c4e42595bb85fd0ef726a89e10dd32b48b1
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Tue Jun 25 09:03:49 2024 +0200
        tdf#161210 speed xls load
    
    And go with a simpler change in XclImpXFRangeBuffer::SetRowDefXF
    which seems to preserve most of the performance benefits without
    the drawbacks
    
    Change-Id: I2456e122146c4f0bb6763e18fca996bbbab17023
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185800
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit a0dd1c4a363b9d4d2a16ff82acc3ada0c075cb65)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185860
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/filter/excel/xistyle.cxx 
b/sc/source/filter/excel/xistyle.cxx
index 0c859e6be53f..c079c7ac9562 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -1890,7 +1890,6 @@ XclImpXFRangeBuffer::~XclImpXFRangeBuffer()
 void XclImpXFRangeBuffer::Initialize()
 {
     maColumns.clear();
-    maRows.clear();
     maHyperlinks.clear();
     maMergeList.RemoveAll();
 }
@@ -1943,10 +1942,8 @@ void XclImpXFRangeBuffer::SetBoolXF( const ScAddress& 
rScPos, sal_uInt16 nXFInde
 
 void XclImpXFRangeBuffer::SetRowDefXF( SCROW nScRow, sal_uInt16 nXFIndex )
 {
-    size_t nIndex = static_cast< size_t >( nScRow );
-    if( maRows.size() <= nIndex )
-        maRows.resize( nIndex + 1 );
-    maRows[ nIndex ].emplace(nXFIndex);
+    for( SCCOL nScCol = 0; nScCol < static_cast<SCCOL>(maColumns.size()); 
++nScCol )
+        SetXF( ScAddress( nScCol, nScRow, 0 ), nXFIndex, xlXFModeRow );
 }
 
 void XclImpXFRangeBuffer::SetColumnDefXF( SCCOL nScCol, sal_uInt16 nXFIndex )
@@ -2051,16 +2048,6 @@ void XclImpXFRangeBuffer::Finalize()
     if( pendingColStart != -1 )
         rDocImport.setAttrEntries(nScTab, pendingColStart, pendingColEnd, 
std::move(aPendingAttrParam));
 
-    // apply row styles
-    for( SCROW nScRow = 0; nScRow < static_cast<SCROW>(maRows.size()); 
++nScRow )
-    {
-        if (!maRows[nScRow])
-            continue;
-        sal_uInt16 nXFIndex = *maRows[nScRow];
-        for( nScCol = 0; nScCol < static_cast<SCCOL>(maColumns.size()); 
++nScCol )
-            SetXF( ScAddress( nScCol, nScRow, 0 ), nXFIndex, xlXFModeRow );
-    }
-
     // insert hyperlink cells
     for( const auto& [rXclRange, rUrl] : maHyperlinks )
         XclImpHyperlink::InsertUrl( GetRoot(), rXclRange, rUrl );
diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx
index 450719832042..ff56c5d1d370 100644
--- a/sc/source/filter/inc/xistyle.hxx
+++ b/sc/source/filter/inc/xistyle.hxx
@@ -659,8 +659,6 @@ private:
 
     std::vector< std::optional<XclImpXFRangeColumn> >
                         maColumns;        /// Array of column XF index buffers.
-    std::vector< std::optional<sal_uInt16> >
-                        maRows;        /// Array of row XF index.
     std::vector< std::pair< XclRange, OUString > >
                         maHyperlinks;     /// Maps URLs to hyperlink cells.
     ScRangeList         maMergeList;      /// List of merged cell ranges.

Reply via email to