summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-09-25 11:12:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-09-25 15:49:50 +0200
commite39ddbdb5b6f49e3585a03444dce077709b855e6 (patch)
tree0ddb1f94722a78cdd644a9f4cf001a086c485241 /svx
parent34752f7418bc5e1631869a73249414e52fa8a1cc (diff)
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/stbctrls/zoomctrl.cxx8
1 files changed, 6 insertions, 2 deletions
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& )