vcl/source/window/syswin.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit ba8b0906d8cfa2151363c718fd2e22091b7fd053
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Apr 2 15:05:48 2021 +0100
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Apr 5 07:18:48 2021 +0200

    tdf#141318 Dialog::GetOptimalSize not including border if called before Show
    
    Change-Id: I96ed67d84660106af2ef5de488da8abc7d556d1b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113483
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 8e396207df92..04139f454881 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -1066,7 +1066,10 @@ Size SystemWindow::GetOptimalSize() const
     if (!isLayoutEnabled())
         return Window::GetOptimalSize();
 
-    Size aSize = 
VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
+    Window *pBox = GetWindow(GetWindowType::FirstChild);
+    // tdf#141318 Do the same as SystemWindow::setOptimalLayoutSize in case 
we're called before initial layout
+    const_cast<SystemWindow*>(this)->settingOptimalLayoutSize(pBox);
+    Size aSize = VclContainer::getLayoutRequisition(*pBox);
 
     sal_Int32 nBorderWidth = get_border_width();
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to