summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-28 10:29:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-08-28 20:15:45 +0200
commit3fc63a7463149685b04c676968a82bc00a48a9af (patch)
tree730a8219e3617b3fd6773dab0a961265945cf9b7 /dbaccess/source/ui/inc
parentbde1637b30570ee82fd8f3f72d1f6f4012914fc0 (diff)
weld OTableBorderWindow
Change-Id: I8008d9ea1e1c5418c960ec9c80b55602a11f15f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101552 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/inc')
-rw-r--r--dbaccess/source/ui/inc/ChildWindow.hxx38
-rw-r--r--dbaccess/source/ui/inc/ColumnControlWindow.hxx1
-rw-r--r--dbaccess/source/ui/inc/FieldDescControl.hxx7
-rw-r--r--dbaccess/source/ui/inc/TableDesignHelpBar.hxx5
-rw-r--r--dbaccess/source/ui/inc/TableDesignView.hxx32
5 files changed, 62 insertions, 21 deletions
diff --git a/dbaccess/source/ui/inc/ChildWindow.hxx b/dbaccess/source/ui/inc/ChildWindow.hxx
new file mode 100644
index 000000000000..8da6c8570dea
--- /dev/null
+++ b/dbaccess/source/ui/inc/ChildWindow.hxx
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <vcl/weld.hxx>
+
+namespace dbaui
+{
+class OChildWindow
+{
+protected:
+ OChildWindow(weld::Container* pParent, const OUString& rUIXMLDescription, const OString& rID);
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+
+public:
+ virtual ~OChildWindow();
+
+ virtual void GrabFocus() = 0;
+
+ virtual bool HasChildPathFocus() const = 0;
+
+ void Enable(bool bEnable) { m_xContainer->set_sensitive(bEnable); }
+
+ void SetHelpId(const OString& rHelpId) { m_xContainer->set_help_id(rHelpId); }
+
+ void Show() { m_xContainer->show(); }
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/dbaccess/source/ui/inc/ColumnControlWindow.hxx b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
index 1a5abac2c06d..587c47564cef 100644
--- a/dbaccess/source/ui/inc/ColumnControlWindow.hxx
+++ b/dbaccess/source/ui/inc/ColumnControlWindow.hxx
@@ -76,7 +76,6 @@ namespace dbaui
OColumnControlWindow& GetControl() { return *m_xControl; }
virtual void GetFocus() override;
- virtual void LoseFocus() override;
};
} // namespace dbaui
diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx
index 3948c11066a8..8114e41aa62c 100644
--- a/dbaccess/source/ui/inc/FieldDescControl.hxx
+++ b/dbaccess/source/ui/inc/FieldDescControl.hxx
@@ -119,6 +119,8 @@ namespace dbaui
DECL_LINK( OnControlFocusLost, weld::Widget&, void );
DECL_LINK( OnControlFocusGot, weld::Widget&, void );
+ DECL_LINK( HelpFocusOut, weld::Widget&, void );
+
void UpdateFormatSample(OFieldDescription const * pFieldDescr);
bool isTextFormat(const OFieldDescription* _pFieldDescr,sal_uInt32& _nFormatKey) const;
@@ -187,8 +189,9 @@ namespace dbaui
void Init();
- void GetFocus();
- void LoseFocus();
+ void GrabFocus();
+
+ bool HasChildPathFocus() const;
virtual css::uno::Reference< css::sdbc::XDatabaseMetaData> getMetaData() = 0;
virtual css::uno::Reference< css::sdbc::XConnection> getConnection() = 0;
diff --git a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
index b34f0392f418..c69b3ed50769 100644
--- a/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
+++ b/dbaccess/source/ui/inc/TableDesignHelpBar.hxx
@@ -41,6 +41,11 @@ namespace dbaui
m_xTextWin->connect_focus_in(rLink);
}
+ void connect_focus_out(const Link<weld::Widget&, void>& rLink)
+ {
+ m_xTextWin->connect_focus_out(rLink);
+ }
+
// IClipboardTest
virtual bool isCutAllowed() override;
virtual bool isCopyAllowed() override;
diff --git a/dbaccess/source/ui/inc/TableDesignView.hxx b/dbaccess/source/ui/inc/TableDesignView.hxx
index e6e7abe02b20..aa1c88e4bcaf 100644
--- a/dbaccess/source/ui/inc/TableDesignView.hxx
+++ b/dbaccess/source/ui/inc/TableDesignView.hxx
@@ -21,14 +21,10 @@
#include <dbaccess/dataview.hxx>
#include <com/sun/star/lang/Locale.hpp>
-#include <vcl/split.hxx>
+#include <vcl/InterimItemWindow.hxx>
+#include <vcl/weld.hxx>
#include "IClipBoardTest.hxx"
-namespace weld
-{
- class Widget;
-}
-
namespace dbaui
{
class OTableController;
@@ -36,30 +32,30 @@ namespace dbaui
class OTableFieldDescWin;
class OTableEditorCtrl;
- class OTableBorderWindow : public vcl::Window
+ class OTableBorderWindow final : public InterimItemWindow
{
- VclPtr<Splitter> m_aHorzSplitter;
- VclPtr<OTableFieldDescWin> m_pFieldDescWin;
- VclPtr<OTableEditorCtrl> m_pEditorCtrl;
+ std::unique_ptr<weld::Paned> m_xHorzSplitter;
+ std::unique_ptr<weld::Container> m_xEditorParent;
+ css::uno::Reference<css::awt::XWindow> m_xEditorParentWin;
+ VclPtr<OTableEditorCtrl> m_xEditorCtrl;
+ std::unique_ptr<weld::Container> m_xFieldDescParent;
+ std::unique_ptr<OTableFieldDescWin> m_xFieldDescWin;
- void ImplInitSettings();
- DECL_LINK( SplitHdl, Splitter*, void );
- protected:
- virtual void DataChanged(const DataChangedEvent& rDCEvt) override;
public:
OTableBorderWindow(OTableDesignView* pParent);
virtual ~OTableBorderWindow() override;
// Window overrides
virtual void dispose() override;
- virtual void Resize() override;
+
virtual void GetFocus() override;
+ virtual void IdleResize() override;
- OTableEditorCtrl* GetEditorCtrl() const { return m_pEditorCtrl; }
- OTableFieldDescWin* GetDescWin() const { return m_pFieldDescWin; }
+ OTableEditorCtrl* GetEditorCtrl() const { return m_xEditorCtrl.get(); }
+ OTableFieldDescWin* GetDescWin() const { return m_xFieldDescWin.get(); }
};
class OTableDesignView : public ODataView
- ,public IClipboardTest
+ , public IClipboardTest
{
enum ChildFocusState
{