[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sc/source
Eike Rathke
erack at redhat.com
Fri Nov 28 14:58:17 PST 2014
sc/source/ui/view/viewdata.cxx | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
New commits:
commit d1c111e2cdbf6217403058ea3259c01e8f913e39
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)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index b301c90..87aaddc 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2491,10 +2491,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