diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 08:43:34 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-16 13:23:40 +0100 |
commit | 4beed2ba7335fdb211aca7f70a144ffecf90a781 (patch) | |
tree | 23b645a3a2dca69466eaa664a34556d110745c95 /sd/source/ui/sidebar | |
parent | 79afa1d9b3ac33b75512095c6383db7f47342f26 (diff) |
Revert "loplugin:changetoolsgen in sd" and reapply the plugin...
because I
(a) forgot to insert parentheses which changes the meaning of some expressions and
(b) I now use the AdjustFoo calls when changing unary operations, which reads much better
This reverts commit 0d9f3f7628f88fa66aaeea1f7148db620e17e728.
Change-Id: I33f79bf755aedc1ed48d95f7b82f3fabed1347fb
Reviewed-on: https://gerrit.libreoffice.org/49834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/sidebar')
-rw-r--r-- | sd/source/ui/sidebar/LayoutMenu.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index 23cbdbf1624a..935f34d7be00 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -238,8 +238,8 @@ ui::LayoutSize LayoutMenu::GetHeightForWidth (const sal_Int32 nWidth) Size aItemSize = CalcItemSizePixel (aImage.GetSizePixel()); if (nWidth>0 && aItemSize.Width()>0) { - aItemSize.setWidth( aItemSize.Width() + 8 ); - aItemSize.setHeight( aItemSize.Height() + 8 ); + aItemSize.AdjustWidth(8 ); + aItemSize.AdjustHeight(8 ); int nColumnCount = nWidth / aItemSize.Width(); if (nColumnCount <= 0) nColumnCount = 1; @@ -263,8 +263,8 @@ void LayoutMenu::Resize() Image aImage = GetItemImage(GetItemId(0)); Size aItemSize = CalcItemSizePixel ( aImage.GetSizePixel()); - aItemSize.setWidth( aItemSize.Width() + 8 ); - aItemSize.setHeight( aItemSize.Height() + 8 ); + aItemSize.AdjustWidth(8 ); + aItemSize.AdjustHeight(8 ); int nColumnCount = aWindowSize.Width() / aItemSize.Width(); if (nColumnCount < 1) nColumnCount = 1; |