summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewdata.cxx
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2018-08-08 20:29:19 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2018-08-10 22:03:39 +0200
commitd54861bac28c0c6dd84bca6a9c1ddeb76de184a8 (patch)
treed5d52182594941f5a91376750273fad9b6d5d997 /sc/source/ui/view/viewdata.cxx
parentbb22d405b2c5cdccf5644d1025543801463cea46 (diff)
Simplify control logic
Change-Id: I71d688862458df25e3f417e7aee32d072aa51d50
Diffstat (limited to 'sc/source/ui/view/viewdata.cxx')
-rw-r--r--sc/source/ui/view/viewdata.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index e261b01d9934..9044e527c490 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2838,8 +2838,7 @@ void ScViewData::ReadUserData(const OUString& rData)
if (rData.isEmpty()) // empty string on "reload"
return; // then exit without assertion
- sal_Int32 nCount = comphelper::string::getTokenCount(rData, ';');
- if ( nCount <= 2 )
+ if ( comphelper::string::getTokenCount(rData, ';') <= 2 )
{
// when reload, in page preview, the preview UserData may have been left intact.
// we don't want the zoom from the page preview here.
@@ -2847,9 +2846,6 @@ void ScViewData::ReadUserData(const OUString& rData)
return;
}
- // not per sheet:
- SCTAB nTabStart = 2;
-
Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY; // evaluate (all sheets?)
sal_Int32 nMainIdx {0};
@@ -2879,7 +2875,6 @@ void ScViewData::ReadUserData(const OUString& rData)
if (aTabOpt.startsWith(TAG_TABBARWIDTH, &aRest))
{
pView->SetTabBarWidth(aRest.toInt32());
- nTabStart = 3;
}
else
{
@@ -2889,7 +2884,7 @@ void ScViewData::ReadUserData(const OUString& rData)
// per sheet
SCTAB nPos = 0;
- while ( nCount > nPos+nTabStart )
+ while ( nMainIdx>0 )
{
aTabOpt = rData.getToken(0, ';', nMainIdx);
EnsureTabDataSize(nPos + 1);