extensions/source/update/ui/updatecheckui.cxx | 34 ++++++++++++-------------- 1 file changed, 16 insertions(+), 18 deletions(-)
New commits: commit 51270a2cc26c8714c62f983702dae58dad1e6bd8 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed Apr 26 11:01:48 2017 +0200 loplugin:staticmethods Change-Id: Ib8a5e36dda6e953529d27233a65469e46f035292 diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 99bbcaf349b5..67ac2c6c3ed2 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -82,6 +82,22 @@ static OUString getImplementationName() namespace { +Image GetMenuBarIcon( MenuBar* pMBar ) +{ + OUString sResID; + vcl::Window *pMBarWin = pMBar->GetWindow(); + sal_uInt32 nMBarHeight = 20; + + if ( pMBarWin ) + nMBarHeight = pMBarWin->GetOutputSizePixel().getHeight(); + + if (nMBarHeight >= 35) + sResID = RID_UPDATE_AVAILABLE_26; + else + sResID = RID_UPDATE_AVAILABLE_16; + + return Image(BitmapEx(sResID)); +} class BubbleWindow : public FloatingWindow { @@ -147,7 +163,6 @@ private: VclPtr<BubbleWindow> GetBubbleWindow(); void RemoveBubbleWindow( bool bRemoveIcon ); - Image GetMenuBarIcon( MenuBar* pMBar ); void AddMenuBarIcon( SystemWindow* pSysWin, bool bAddEventHdl ); Image GetBubbleImage( OUString &rURL ); @@ -229,23 +244,6 @@ UpdateCheckUI::supportsService( OUString const & serviceName ) return cppu::supportsService(this, serviceName); } -Image UpdateCheckUI::GetMenuBarIcon( MenuBar* pMBar ) -{ - OUString sResID; - vcl::Window *pMBarWin = pMBar->GetWindow(); - sal_uInt32 nMBarHeight = 20; - - if ( pMBarWin ) - nMBarHeight = pMBarWin->GetOutputSizePixel().getHeight(); - - if (nMBarHeight >= 35) - sResID = RID_UPDATE_AVAILABLE_26; - else - sResID = RID_UPDATE_AVAILABLE_16; - - return Image(BitmapEx(sResID)); -} - Image UpdateCheckUI::GetBubbleImage( OUString &rURL ) { Image aImage; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits