[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/source

Caolán McNamara caolanm at redhat.com
Wed Aug 20 01:16:43 PDT 2014


 vcl/source/window/layout.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit c0aedce4e6f5393eb31a88a24a5f25cd5cf21142
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 19 17:20:00 2014 +0100

    only subtract height of hscroll if visible
    
    otherwise infinite loop in extensions update check
    
    Change-Id: I0dbf4f34208f1bf0854e365006a79470b26571f3
    (cherry picked from commit 749f7548b4ee746d69c20a828ea6d3b853eba8d3)
    Reviewed-on: https://gerrit.libreoffice.org/11033
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 9e204a8..975df2f 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1706,8 +1706,11 @@ void VclScrolledWindow::setAllocation(const Size &rAllocation)
     // horz. ScrollBar
     if (GetStyle() & WB_AUTOHSCROLL)
     {
-        m_aHScroll.Show(nAvailWidth < aChildReq.Width());
-        nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
+        bool bShowHScroll = nAvailWidth < aChildReq.Width();
+        m_aHScroll.Show(bShowHScroll);
+
+        if (bShowHScroll)
+            nAvailHeight -= getLayoutRequisition(m_aHScroll).Height();
 
         if (GetStyle() & WB_AUTOVSCROLL)
             m_aVScroll.Show(nAvailHeight < aChildReq.Height());


More information about the Libreoffice-commits mailing list