diff options
author | Henry Castro <hcastro@collabora.com> | 2019-03-29 09:01:05 -0400 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-04-25 13:26:38 +0200 |
commit | 5e2270a1be33a3408b01729a75a09516fd4408b2 (patch) | |
tree | 26bdcbf40fe4263ba59e396d67e88981336dab59 /sc/source/ui | |
parent | a835ffa3945a393e0d58705f50682c6e635e9f8a (diff) |
sc lok: avoid save incorrect data, whether the pane has ...
horizontal / vertical splits
In the tiled rendering case the horizontal / vertical splits were
not implemented, so the leftmost visible column is 0.
So preserve horizontal / vertical splits when saving the document
Change-Id: I15b6f009910e51fdaf475de5aac1ebded16c1956
Reviewed-on: https://gerrit.libreoffice.org/69926
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/70079
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/viewdata.hxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/viewdata.cxx | 23 |
2 files changed, 16 insertions, 11 deletions
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 7b58edc13736..b94c3343f70b 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -396,8 +396,8 @@ public: SCTAB GetTabNo() const { return nTabNo; } ScSplitPos GetActivePart() const { return pThisTab->eWhichActive; } - SCCOL GetPosX( ScHSplitPos eWhich ) const { return pThisTab->nPosX[eWhich]; } - SCROW GetPosY( ScVSplitPos eWhich ) const { return pThisTab->nPosY[eWhich]; } + SCCOL GetPosX( ScHSplitPos eWhich ) const; + SCROW GetPosY( ScVSplitPos eWhich ) const; SCCOL GetCurX() const { return pThisTab->nCurX; } SCROW GetCurY() const { return pThisTab->nCurY; } SCCOL GetCurXForTab( SCTAB nTabIndex ) const; diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index c144256df7a7..ff46031d37ff 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -565,7 +565,6 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV sal_Int32 nTempPosHTw(0); bool bHasVSplitInTwips = false; bool bHasHSplitInTwips = false; - bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive(); for (sal_Int32 i = 0; i < nCount; i++) { OUString sName(aSettings[i].Name); @@ -617,26 +616,22 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV else if (sName == SC_POSITIONLEFT) { aSettings[i].Value >>= nTemp32; - nPosX[SC_SPLIT_LEFT] = bIsTiledRendering ? 0 : - SanitizeCol( static_cast<SCCOL>(nTemp32)); + nPosX[SC_SPLIT_LEFT] = SanitizeCol( static_cast<SCCOL>(nTemp32)); } else if (sName == SC_POSITIONRIGHT) { aSettings[i].Value >>= nTemp32; - nPosX[SC_SPLIT_RIGHT] = bIsTiledRendering ? 0 : - SanitizeCol( static_cast<SCCOL>(nTemp32)); + nPosX[SC_SPLIT_RIGHT] = SanitizeCol( static_cast<SCCOL>(nTemp32)); } else if (sName == SC_POSITIONTOP) { aSettings[i].Value >>= nTemp32; - nPosY[SC_SPLIT_TOP] = bIsTiledRendering ? 0 : - SanitizeRow( static_cast<SCROW>(nTemp32)); + nPosY[SC_SPLIT_TOP] = SanitizeRow( static_cast<SCROW>(nTemp32)); } else if (sName == SC_POSITIONBOTTOM) { aSettings[i].Value >>= nTemp32; - nPosY[SC_SPLIT_BOTTOM] = bIsTiledRendering ? 0 : - SanitizeRow( static_cast<SCROW>(nTemp32)); + nPosY[SC_SPLIT_BOTTOM] = SanitizeRow( static_cast<SCROW>(nTemp32)); } else if (sName == SC_ZOOMTYPE) { @@ -1364,6 +1359,16 @@ void ScViewData::ResetOldCursor() pThisTab->mbOldCursorValid = false; } +SCCOL ScViewData::GetPosX( ScHSplitPos eWhich ) const +{ + return comphelper::LibreOfficeKit::isActive() ? 0 : pThisTab->nPosX[eWhich]; +} + +SCROW ScViewData::GetPosY( ScVSplitPos eWhich ) const +{ + return comphelper::LibreOfficeKit::isActive() ? 0 : pThisTab->nPosY[eWhich]; +} + SCCOL ScViewData::GetCurXForTab( SCTAB nTabIndex ) const { if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size()))) |