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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Feb 13 08:50:53 UTC 2020


 dbaccess/source/ui/control/FieldDescControl.cxx |   18 +++++++++++++++---
 dbaccess/source/ui/inc/FieldDescControl.hxx     |    2 ++
 2 files changed, 17 insertions(+), 3 deletions(-)

New commits:
commit dcf6fd8bb66cddbd54ec3f019ea606d2c99d9e08
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Feb 12 20:37:30 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Feb 13 09:50:16 2020 +0100

    tdf#130623 host gtk FieldControl within the design view
    
    to make this work in master
    
    Change-Id: I96a4e7fc0993fbdcf28e2ccad17573b93f4f99dc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88570
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index c40558e573da..d4aee8488a22 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -75,9 +75,6 @@ namespace
 
 OFieldDescControl::OFieldDescControl(weld::Container* pPage, vcl::Window* pParent, OTableDesignHelpBar* pHelpBar)
     :TabPage(pPage ? Application::GetDefDialogParent() : pParent, WB_3DLOOK | WB_DIALOGCONTROL)
-    ,m_xBuilder(pPage ? Application::CreateBuilder(pPage, "dbaccess/ui/fielddescpage.ui")
-                      : Application::CreateInterimBuilder(this, "dbaccess/ui/fielddescpage.ui"))
-    ,m_xContainer(m_xBuilder->weld_container("FieldDescPage"))
     ,pHelp( pHelpBar )
     ,m_pLastFocusWindow(nullptr)
     ,m_pActFocusWindow(nullptr)
@@ -89,6 +86,16 @@ OFieldDescControl::OFieldDescControl(weld::Container* pPage, vcl::Window* pParen
     ,m_bAdded(false)
     ,pActFieldDescr(nullptr)
 {
+    if (pPage)
+        m_xBuilder.reset(Application::CreateBuilder(pPage, "dbaccess/ui/fielddescpage.ui"));
+    else
+    {
+        m_xVclContentArea = VclPtr<VclVBox>::Create(this);
+        m_xVclContentArea->Show();
+        m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, "dbaccess/ui/fielddescpage.ui"));
+    }
+
+    m_xContainer = m_xBuilder->weld_container("FieldDescPage");
 }
 
 OFieldDescControl::~OFieldDescControl()
@@ -144,6 +151,7 @@ void OFieldDescControl::dispose()
     m_xFormat.reset();
     m_xContainer.reset();
     m_xBuilder.reset();
+    m_xVclContentArea.disposeAndClear();
     TabPage::dispose();
 }
 
@@ -597,6 +605,8 @@ void OFieldDescControl::ActivateAggregate( EControlType eType )
         m_xBoolDefault->show();
         break;
     }
+
+    queue_resize();
 }
 
 void OFieldDescControl::InitializeControl(OPropListBoxCtrl* _pControl,const OString& _sHelpId,bool _bAddChangeHandler)
@@ -692,6 +702,8 @@ void OFieldDescControl::DeactivateAggregate( EControlType eType )
         lcl_HideAndDeleteControl(m_nPos,m_xBoolDefault,m_xBoolDefaultText);
         break;
     }
+
+    queue_resize();
 }
 
 void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 3da2cc72d795..e57bc60b4c5b 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -19,6 +19,7 @@
 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCCONTROL_HXX
 #define INCLUDED_DBACCESS_SOURCE_UI_INC_FIELDDESCCONTROL_HXX
 
+#include <vcl/layout.hxx>
 #include <vcl/tabpage.hxx>
 #include <vcl/weld.hxx>
 #include "QEnumTypes.hxx"
@@ -66,6 +67,7 @@ namespace dbaui
     class OFieldDescControl : public TabPage
     {
     private:
+        VclPtr<VclVBox> m_xVclContentArea;
         std::unique_ptr<weld::Builder> m_xBuilder;
         std::unique_ptr<weld::Container> m_xContainer;
 


More information about the Libreoffice-commits mailing list