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 <nem...@numbertext.org>
AuthorDate: Tue Sep 3 17:19:18 2019 +0200
Commit:     Xisco Faulí <xiscofa...@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 <nem...@numbertext.org>
    (cherry picked from commit 47aa9324e3d15fcc9d1195b9b0822b5568e6d96e)
    Reviewed-on: https://gerrit.libreoffice.org/78577
    Reviewed-by: Xisco Faulí <xiscofa...@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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to