[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - sc/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 5 10:26:33 UTC 2019


 sc/source/filter/excel/xeview.cxx |    6 ++++--
 sc/source/filter/inc/xeview.hxx   |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 09afdc89572202f100e5ab5112ae0878ae032fc1
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Tue Sep 3 17:19:18 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Thu Sep 5 12:25:49 2019 +0200

    tdf#127110 XLSX export: fix bad view position
    
    Update SheetView attribute topLeftCell only
    in the case of embedded OLE sheets.
    
    Regression from commit 3707e2a7b8b05617b0afb75374f866c967593861
    "tdf#122624 XLSX OLE in DOCX: export view positions".
    
    Change-Id: I9ea57ff1531d710bff34df12fb7e0bb1e3edbea5
    Reviewed-on: https://gerrit.libreoffice.org/78570
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 47aa9324e3d15fcc9d1195b9b0822b5568e6d96e)
    Reviewed-on: https://gerrit.libreoffice.org/78577
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx
index b83937452b1a..f6fb858dc77f 100644
--- a/sc/source/filter/excel/xeview.cxx
+++ b/sc/source/filter/excel/xeview.cxx
@@ -285,7 +285,8 @@ sal_uInt16 lclGetXclZoom( long nScZoom, sal_uInt16 nDefXclZoom )
 
 XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nScTab ) :
     XclExpRoot( rRoot ),
-    mnGridColorId( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_WINDOWTEXT ) )
+    mnGridColorId( XclExpPalette::GetColorIdFromIndex( EXC_COLOR_WINDOWTEXT ) ),
+    mbHasTabSettings(false)
 {
     // *** sheet flags ***
 
@@ -304,6 +305,7 @@ XclExpTabViewSettings::XclExpTabViewSettings( const XclExpRoot& rRoot, SCTAB nSc
 
     if( const ScExtTabSettings* pTabSett = GetExtDocOptions().GetTabSettings( nScTab ) )
     {
+        mbHasTabSettings = true;
         const ScExtTabSettings& rTabSett = *pTabSett;
         XclExpAddressConverter& rAddrConv = GetAddressConverter();
 
@@ -419,7 +421,7 @@ void XclExpTabViewSettings::SaveXml( XclExpXmlStream& rStrm )
     rWorksheet->startElement(XML_sheetViews);
 
     // handle missing viewdata at embedded XLSX OLE objects
-    if (maData.mbSelected)
+    if( !mbHasTabSettings && maData.mbSelected )
     {
         SCCOL nPosLeft = rStrm.GetRoot().GetDoc().GetPosLeft();
         SCROW nPosTop = rStrm.GetRoot().GetDoc().GetPosTop();
diff --git a/sc/source/filter/inc/xeview.hxx b/sc/source/filter/inc/xeview.hxx
index 4416417ea623..8d320177d8d0 100644
--- a/sc/source/filter/inc/xeview.hxx
+++ b/sc/source/filter/inc/xeview.hxx
@@ -159,6 +159,7 @@ private:
 private:
     XclTabViewData      maData;             /// All view settings for a sheet.
     sal_uInt32          mnGridColorId;      /// Color identifier for grid color.
+    bool                mbHasTabSettings;   /// It's false for embedded OLE spreadsheets.
 };
 
 #endif


More information about the Libreoffice-commits mailing list