[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - svx/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Sep 25 18:58:34 UTC 2019
svx/source/stbctrls/zoomctrl.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 5e6d6c21be77ac9d05b306dde041a1ee1d1d552d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Sep 25 11:12:19 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Sep 25 20:57:51 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 <noel.grandin at collabora.co.uk>
(cherry picked from commit e39ddbdb5b6f49e3585a03444dce077709b855e6)
Reviewed-on: https://gerrit.libreoffice.org/79557
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index eac10c81fef6..601e79ef21e8 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& )
More information about the Libreoffice-commits
mailing list