[Libreoffice-commits] core.git: vcl/source

Jan-Marek Glogowski glogow at fbihome.de
Wed Jul 27 06:47:33 UTC 2016


 vcl/source/window/status.cxx |   12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 9f4af777a832d8a0b9a21d793d421fa6228131e0
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Mon Jul 18 13:21:14 2016 +0200

    Don't Update() and Flush() status bar draws
    
    From reading the code of vcl::Window::Update, this already calls
    Invalidate and Flush in case of top-level widgets and also handles
    child windows.
    
    And there is no need to invalidate the progress bar text, if we
    just update the progress value.
    
    Change-Id: Ie296c6ffe5db5a927ad69104ce8ffe3d0d29034a
    Reviewed-on: https://gerrit.libreoffice.org/27285
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 97d59e3..4ab7121 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1162,7 +1162,6 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
             // re-draw item if StatusBar is visible and UpdateMode active
             if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() )
             {
-                Update();
                 Rectangle aRect = ImplGetItemRectPos(nPos);
                 Invalidate(aRect);
                 Flush();
@@ -1216,7 +1215,6 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData )
         if ( (pItem->mnBits & StatusBarItemBits::UserDraw) && pItem->mbVisible &&
              !mbFormat && ImplIsItemUpdate() )
         {
-            Update();
             Rectangle aRect = ImplGetItemRectPos(nPos);
             Invalidate(aRect, InvalidateFlags::NoErase);
             Flush();
@@ -1247,7 +1245,6 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId)
     if (pItem && (pItem->mnBits & StatusBarItemBits::UserDraw) &&
         pItem->mbVisible && ImplIsItemUpdate())
     {
-        Update();
         Rectangle aRect = ImplGetItemRectPos(nPos);
         Invalidate(aRect);
         Flush();
@@ -1342,7 +1339,6 @@ void StatusBar::StartProgressMode( const OUString& rText )
     if ( IsReallyVisible() )
     {
         Invalidate();
-        Update();
         Flush();
     }
 }
@@ -1356,8 +1352,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
     &&   IsReallyVisible()
     &&   (!mnPercent || (mnPercent != nNewPercent)) )
     {
-        Update();
-        Invalidate();
+        Invalidate(maPrgsFrameRect, InvalidateFlags::NONE);
         Flush();
     }
     mnPercent = nNewPercent;
@@ -1373,7 +1368,6 @@ void StatusBar::EndProgressMode()
     if ( IsReallyVisible() )
     {
         Invalidate();
-        Update();
         Flush();
     }
 }
@@ -1389,9 +1383,8 @@ void StatusBar::SetText(const OUString& rText)
         }
         else
         {
-            Update();
-            Window::SetText(rText);
             Invalidate();
+            Window::SetText(rText);
             Flush();
         }
     }
@@ -1401,7 +1394,6 @@ void StatusBar::SetText(const OUString& rText)
         if (IsReallyVisible())
         {
             Invalidate();
-            Update();
             Flush();
         }
     }


More information about the Libreoffice-commits mailing list