summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-12 20:37:30 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-13 09:50:16 +0100
commitdcf6fd8bb66cddbd54ec3f019ea606d2c99d9e08 (patch)
treec678d001c89f11dde0925bf34538201a5682ef98 /dbaccess
parenttdf#130623 owner of FieldControl needs to set its allocation (diff)
downloadcore-dcf6fd8bb66cddbd54ec3f019ea606d2c99d9e08.tar.gz
core-dcf6fd8bb66cddbd54ec3f019ea606d2c99d9e08.zip
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@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx18
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx2
2 files changed, 17 insertions, 3 deletions
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;