[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sc/source
Eike Rathke
erack at redhat.com
Fri Nov 28 15:19:14 PST 2014
sc/source/ui/view/viewdata.cxx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit 8f973b2669d9925f98dfe5633b33b5d4d5f622ae
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/13182
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 90f1377..121d510 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2506,10 +2506,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