sc/source/filter/excel/xeview.cxx | 6 ++++-- sc/source/filter/inc/xeview.hxx | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
New commits: commit 47aa9324e3d15fcc9d1195b9b0822b5568e6d96e Author: László Németh <nem...@numbertext.org> AuthorDate: Tue Sep 3 17:19:18 2019 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Wed Sep 4 08:28:19 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> diff --git a/sc/source/filter/excel/xeview.cxx b/sc/source/filter/excel/xeview.cxx index 964b7d2447b0..91a372700560 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