[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sc/source
Eike Rathke
erack at redhat.com
Fri Nov 28 15:18:48 PST 2014
sc/source/ui/view/viewdata.cxx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit d29fee4c0d18f8665c342707a2e54f4427bffec6
Author: Eike Rathke <erack at redhat.com>
Date: Fri Nov 28 23:47:02 2014 +0100
set only valid positions from ScExtTabSettings at ScViewDataTable
Some address fields of ScExtTabSettings are initialized invalid and
maybe kept invalid, on purpose, so take care of that and use only the
valid fields.
Change-Id: I37cbf8ff49c6ccf38bfac3e1c8c6492ac7bad61b
(cherry picked from commit 8bc56801af0540c0496c1f8ddd335578a8791017)
Reviewed-on: https://gerrit.libreoffice.org/13184
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 414f07f..dee7139 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2486,10 +2486,19 @@ void ScViewData::ReadExtOptions( const ScExtDocOptions& rDocOpt )
bool bVSplit = bFrozen ? (rTabSett.maFreezePos.Row() > 0) : (rTabSett.maSplitPos.Y() > 0);
// first visible cell of top-left pane and additional panes
- rViewTab.nPosX[ SC_SPLIT_LEFT ] = rTabSett.maFirstVis.Col();
- rViewTab.nPosY[ bVSplit ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM ] = rTabSett.maFirstVis.Row();
- if( bHSplit ) rViewTab.nPosX[ SC_SPLIT_RIGHT ] = rTabSett.maSecondVis.Col();
- if( bVSplit ) rViewTab.nPosY[ SC_SPLIT_BOTTOM ] = rTabSett.maSecondVis.Row();
+ if (rTabSett.maFirstVis.IsValid())
+ {
+ rViewTab.nPosX[ SC_SPLIT_LEFT ] = rTabSett.maFirstVis.Col();
+ rViewTab.nPosY[ bVSplit ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM ] = rTabSett.maFirstVis.Row();
+ }
+
+ if (rTabSett.maSecondVis.IsValid())
+ {
+ if (bHSplit)
+ rViewTab.nPosX[ SC_SPLIT_RIGHT ] = rTabSett.maSecondVis.Col();
+ if (bVSplit)
+ rViewTab.nPosY[ SC_SPLIT_BOTTOM ] = rTabSett.maSecondVis.Row();
+ }
// split mode, split and freeze position
rViewTab.eHSplitMode = rViewTab.eVSplitMode = SC_SPLIT_NONE;
More information about the Libreoffice-commits
mailing list