sw/source/ui/config/optpage.cxx   |    4 +++-
 sw/source/uibase/app/swmodul1.cxx |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 9400c0cf10bc14963a994ec0c0caeeb22a7c2513
Author:     Oliver Specht <oliver.spe...@cib.de>
AuthorDate: Tue Oct 8 10:46:24 2024 +0200
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Wed Oct 9 20:15:46 2024 +0200

    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.behr...@allotropia.de>
    Tested-by: Jenkins

diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index ee8d46b1c401..476d4957257d 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -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)
diff --git a/sw/source/uibase/app/swmodul1.cxx 
b/sw/source/uibase/app/swmodul1.cxx
index b246dbbb5b2e..be12a460ab6d 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -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);
 }
 

Reply via email to