svx/source/stbctrls/zoomctrl.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit e39ddbdb5b6f49e3585a03444dce077709b855e6
Author:     Noel Grandin <[email protected]>
AuthorDate: Wed Sep 25 11:12:19 2019 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Wed Sep 25 15:49:50 2019 +0200

    tdf#127701 Zoom factor percentage calculating fault
    
    regression from
        commit c53f3f8f58f55d0978fb968446975856d72a52f8
    tdf#126819 Can't retrieve the mouse position written in the
    statusbar
    
    note that this is a workaround - we fire an sfx2 event when we choose
    one of the "smart" zoom options, and normally we then receive another
    sfx2 event to notify us of the real zoom value.
    But when we choose the same smart option twice, we don't receive the
    second sfx2 event.
    
    Change-Id: I31c2e34ff31a4f4e03a447ffbd783589982edc57
    Reviewed-on: https://gerrit.libreoffice.org/79516
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <[email protected]>

diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index bb019e4a4814..ace1cc1ffea7 100644
--- a/svx/source/stbctrls/zoomctrl.cxx
+++ b/svx/source/stbctrls/zoomctrl.cxx
@@ -141,8 +141,12 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, 
SfxItemState eState,
 
 void SvxZoomStatusBarControl::ImplUpdateItemText()
 {
-    OUString aStr(unicode::formatPercent(nZoom, 
Application::GetSettings().GetUILanguageTag()));
-    GetStatusBar().SetItemText( GetId(), aStr );
+    // workaround - don't bother updating when we don't have a real zoom value
+    if (nZoom)
+    {
+        OUString aStr(unicode::formatPercent(nZoom, 
Application::GetSettings().GetUILanguageTag()));
+        GetStatusBar().SetItemText( GetId(), aStr );
+    }
 }
 
 void SvxZoomStatusBarControl::Paint( const UserDrawEvent& )
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to