summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Behrens <Katarina.Behrens@cib.de>2016-02-27 16:51:50 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2016-02-28 10:40:48 +0000
commit787e17d15a1cdb259b56f91bfda9af80b95167c3 (patch)
tree1c0a39fc7c5a155b1e50b9b815e8bc3110dd7fd4
parent74040d447912eff5f7366b8ae61244ad101000dc (diff)
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@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 63a5d748a8ab..5a39e36c8e32 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -129,11 +129,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) );