[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source

Katarina Behrens Katarina.Behrens at cib.de
Mon Feb 29 09:43:25 UTC 2016


 sc/source/ui/pagedlg/scuitphfedit.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 7eae3f0389503a39291d0d8dc746a2390588068e
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Sat Feb 27 16:51:50 2016 +0100

    tdf#97963: Impose size limit on all 3 edit windows
    
    Doing it for 1 window (tdf#90257) isn't enough, the dialog will grow
    outta screen with large fonts not immediately, but on the next opening
    
    Change-Id: I890ecd91a00efc4c7596b30a237f5abb4f87215a
    Reviewed-on: https://gerrit.libreoffice.org/22739
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 787e17d15a1cdb259b56f91bfda9af80b95167c3)
    Reviewed-on: https://gerrit.libreoffice.org/22758
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index be28c11..7e3840f 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -131,11 +131,15 @@ ScHFEditPage::ScHFEditPage( vcl::Window*             pParent,
     m_pWndCenter->SetFont( aPatAttr );
     m_pWndRight->SetFont( aPatAttr );
 
-    // Set size request of 1 widget, the other two will follow as they are
-    // in the same grid
+    // Set size request for all 3 widgets
     Size aSize = LogicToPixel(Size(80, 120), MAP_APPFONT);
-    m_pWndLeft->set_width_request(aSize.Width());
-    m_pWndLeft->set_height_request(aSize.Height());
+    VclPtr<ScEditWindow> aEditWindows[] = {m_pWndLeft, m_pWndCenter, m_pWndRight};
+
+    for (auto &pEditWindow : aEditWindows)
+    {
+        pEditWindow->set_width_request(aSize.Width());
+        pEditWindow->set_height_request(aSize.Height());
+    }
 
     m_pWndLeft->SetObjectSelectHdl( LINK(this,ScHFEditPage,ObjectSelectHdl) );
     m_pWndCenter->SetObjectSelectHdl( LINK(this,ScHFEditPage,ObjectSelectHdl) );


More information about the Libreoffice-commits mailing list