Kaydet (Commit) d54861ba authored tarafından Matteo Casalin's avatar Matteo Casalin

Simplify control logic

Change-Id: I71d688862458df25e3f417e7aee32d072aa51d50
üst bb22d405
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment