tdf#132274 follow-up fix to Writer zoom options

Applying the zoom value works now as expected. The prior
fix mixed up zoom value and 100% and didn't always apply
special zoom values.

Change-Id: I7cf1f34fca5724eea14339535e7614cfecffdd79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174688
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Tested-by: Jenkins
This commit is contained in:
Oliver Specht
2024-10-09 20:15:46 +02:00
committed by Thorsten Behrens
parent b09017c578
commit 9400c0cf10
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -433,9 +433,11 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet)
aElem.SetDefaultZoomValue(100);
}
else
{
aElem.SetDefaultZoomType(SvxZoomType::PERCENT);
aElem.SetDefaultZoomValue(m_xZoomValue->get_value(FieldUnit::PERCENT));
}
}
aElem.SetDefaultZoomValue(m_xZoomValue->get_value(FieldUnit::PERCENT));
bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
+1 -1
View File
@@ -100,7 +100,7 @@ static void lcl_SetUIPrefs(const SwViewOption &rPref, SwView* pView, SwViewShell
pView->CreateTab();
else
pView->KillTab();
pView->SetZoom(rPref.GetZoomType(), rPref.GetZoom(), true);
pView->GetPostItMgr()->PrepareView(true);
}