diff options
19 files changed, 175 insertions, 153 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index 3dc9eeb90e08..1e655af2ec2a 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -74,6 +74,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/specialsettingspage \ dbaccess/uiconfig/ui/sortdialog \ dbaccess/uiconfig/ui/sqlexception \ + dbaccess/uiconfig/ui/tableborderwindow \ dbaccess/uiconfig/ui/tabledesignrowmenu \ dbaccess/uiconfig/ui/tabledesignsavemodifieddialog \ dbaccess/uiconfig/ui/tablelistbox \ diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.hxx b/dbaccess/source/ui/app/AppDetailPageHelper.hxx index f5cd662236cb..ecc5048163bb 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.hxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.hxx @@ -26,13 +26,13 @@ #include <com/sun/star/sdbc/XConnection.hpp> #include <com/sun/star/ucb/XContent.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <AppElementType.hxx> #include <sfx2/weldutils.hxx> #include <vcl/graph.hxx> #include <vcl/GraphicObject.hxx> #include <vcl/customweld.hxx> #include <vcl/weld.hxx> -#include "ChildWindow.hxx" +#include <AppElementType.hxx> +#include <ChildWindow.hxx> #include "DocumentInfoPreview.hxx" namespace com::sun::star::awt { class XWindow; } diff --git a/dbaccess/source/ui/app/AppSwapWindow.hxx b/dbaccess/source/ui/app/AppSwapWindow.hxx index fadfb6fb3ccc..9fcd3ba816af 100644 --- a/dbaccess/source/ui/app/AppSwapWindow.hxx +++ b/dbaccess/source/ui/app/AppSwapWindow.hxx @@ -22,7 +22,7 @@ #include <IClipBoardTest.hxx> #include "AppIconControl.hxx" #include <AppElementType.hxx> -#include "ChildWindow.hxx" +#include <ChildWindow.hxx> class MnemonicGenerator; diff --git a/dbaccess/source/ui/app/AppTitleWindow.hxx b/dbaccess/source/ui/app/AppTitleWindow.hxx index 2c536bfd2a93..e83a2ecbc815 100644 --- a/dbaccess/source/ui/app/AppTitleWindow.hxx +++ b/dbaccess/source/ui/app/AppTitleWindow.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_DBACCESS_SOURCE_UI_APP_APPTITLEWINDOW_HXX #define INCLUDED_DBACCESS_SOURCE_UI_APP_APPTITLEWINDOW_HXX -#include "ChildWindow.hxx" +#include <ChildWindow.hxx> namespace dbaui { diff --git a/dbaccess/source/ui/app/ChildWindow.cxx b/dbaccess/source/ui/app/ChildWindow.cxx index 879b5f84a387..a8091c8637a5 100644 --- a/dbaccess/source/ui/app/ChildWindow.cxx +++ b/dbaccess/source/ui/app/ChildWindow.cxx @@ -8,7 +8,7 @@ */ #include <vcl/svapp.hxx> -#include "ChildWindow.hxx" +#include <ChildWindow.hxx> namespace dbaui { diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 8f9186b01ccb..9b2fa25aa8d9 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -49,12 +49,7 @@ void OColumnControlTopLevel::dispose() void OColumnControlTopLevel::GetFocus() { - m_xControl->GetFocus(); -} - -void OColumnControlTopLevel::LoseFocus() -{ - m_xControl->LoseFocus(); + m_xControl->GrabFocus(); } // OColumnControlWindow diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index bb10fb787f9f..28f3c9662500 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -78,6 +78,7 @@ OFieldDescControl::OFieldDescControl(weld::Container* pPage, OTableDesignHelpBar , m_nEditWidth(50) , pActFieldDescr(nullptr) { + m_pHelp->connect_focus_out(LINK(this, OFieldDescControl, HelpFocusOut)); } OFieldDescControl::~OFieldDescControl() @@ -170,7 +171,7 @@ void OFieldDescControl::SetReadOnly( bool bReadOnly ) , m_xScale.get(), m_xColumnName.get() , m_xType.get(), m_xAutoIncrementValue.get() }; - weld::Widget* ppAggregatesText[] = { m_xRequiredText.get(), m_xNumTypeText.get() + weld::Widget* ppAggregatesText[] = { m_xRequiredText.get(), m_xNumTypeText.get() , m_xAutoIncrementText.get(), m_xDefaultText.get() , m_xTextLenText.get(), m_xLengthText.get() , m_xScaleText.get(), m_xColumnNameText.get() @@ -1145,8 +1146,10 @@ void OFieldDescControl::UpdateFormatSample(OFieldDescription const * pFieldDescr m_xFormatSample->set_text(getControlDefault(pFieldDescr,false)); } -void OFieldDescControl::GetFocus() +void OFieldDescControl::GrabFocus() { + m_xContainer->grab_focus(); + // Set the Focus to the Control that has been active last if (m_pLastFocusWindow) { @@ -1166,9 +1169,9 @@ void OFieldDescControl::implFocusLost(weld::Widget* _pWhich) m_pHelp->SetHelpText( OUString() ); } -void OFieldDescControl::LoseFocus() +IMPL_LINK_NOARG(OFieldDescControl, HelpFocusOut, weld::Widget&, void) { - implFocusLost(nullptr); + m_pHelp->SetHelpText(OUString()); } bool OFieldDescControl::IsFocusInEditableWidget() const @@ -1190,6 +1193,11 @@ bool OFieldDescControl::IsFocusInEditableWidget() const return false; } +bool OFieldDescControl::HasChildPathFocus() const +{ + return m_pActFocusWindow && m_pActFocusWindow->has_focus(); +} + bool OFieldDescControl::isCopyAllowed() { int nStartPos, nEndPos; diff --git a/dbaccess/source/ui/app/ChildWindow.hxx b/dbaccess/source/ui/inc/ChildWindow.hxx index 5b9906142f94..8da6c8570dea 100644 --- a/dbaccess/source/ui/app/ChildWindow.hxx +++ b/dbaccess/source/ui/inc/ChildWindow.hxx @@ -28,6 +28,10 @@ public: 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(); } }; } 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 { diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 6dbb9327877a..4d42125dd241 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -125,8 +125,9 @@ void OTableEditorCtrl::Init() RowInserted(0, m_pRowList->size()); } -OTableEditorCtrl::OTableEditorCtrl(vcl::Window* pWindow) +OTableEditorCtrl::OTableEditorCtrl(vcl::Window* pWindow, OTableDesignView* pView) :OTableRowView(pWindow) + ,m_pView(pView) ,pNameCell(nullptr) ,pTypeCell(nullptr) ,pHelpTextCell(nullptr) @@ -142,7 +143,6 @@ OTableEditorCtrl::OTableEditorCtrl(vcl::Window* pWindow) ,bReadOnly(true) ,m_aInvalidate(this) { - SetHelpId(HID_TABDESIGN_BACKGROUND); GetDataWindow().SetHelpId(HID_CTL_TABLEEDIT); @@ -273,7 +273,8 @@ void OTableEditorCtrl::dispose() pTypeCell.disposeAndClear(); pDescrCell.disposeAndClear(); pHelpTextCell.disposeAndClear(); - pDescrWin.clear(); + pDescrWin = nullptr; + m_pView.clear(); OTableRowView::dispose(); } @@ -1640,7 +1641,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType ) OTableDesignView* OTableEditorCtrl::GetView() const { - return static_cast<OTableDesignView*>(GetParent()->GetParent()); + return m_pView; } void OTableEditorCtrl::DeactivateCell(bool bUpdate) diff --git a/dbaccess/source/ui/tabledesign/TEditControl.hxx b/dbaccess/source/ui/tabledesign/TEditControl.hxx index b216cb518d55..d858555ce0d6 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.hxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.hxx @@ -44,11 +44,12 @@ namespace dbaui std::vector< std::shared_ptr<OTableRow> >* m_pRowList; + VclPtr<OTableDesignView> m_pView; VclPtr<OSQLNameEditControl> pNameCell; VclPtr<::svt::ListBoxControl> pTypeCell; VclPtr<::svt::EditControl> pHelpTextCell; VclPtr<::svt::EditControl> pDescrCell; - VclPtr<OTableFieldDescWin> pDescrWin; // properties of one column + OTableFieldDescWin* pDescrWin; // properties of one column std::shared_ptr<OTableRow> pActRow; @@ -116,7 +117,7 @@ namespace dbaui bool IsPrimaryKey(); public: - explicit OTableEditorCtrl(vcl::Window* pParentWin); + explicit OTableEditorCtrl(vcl::Window* pParentWin, OTableDesignView* pView); virtual ~OTableEditorCtrl() override; virtual void dispose() override; virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override; diff --git a/dbaccess/source/ui/tabledesign/TableDesignView.cxx b/dbaccess/source/ui/tabledesign/TableDesignView.cxx index 3f15dfba10cb..ae32e9706302 100644 --- a/dbaccess/source/ui/tabledesign/TableDesignView.cxx +++ b/dbaccess/source/ui/tabledesign/TableDesignView.cxx @@ -25,6 +25,7 @@ #include "TableFieldDescWin.hxx" #include <TableRow.hxx> #include <i18nlangtag/languagetag.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include <unotools/syslocale.hxx> #include <vcl/settings.hxx> #include <memory> @@ -36,23 +37,21 @@ using namespace ::com::sun::star::datatransfer::clipboard; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; -OTableBorderWindow::OTableBorderWindow(OTableDesignView* pParent) : Window(pParent,WB_BORDER) - ,m_aHorzSplitter( VclPtr<Splitter>::Create(this) ) +OTableBorderWindow::OTableBorderWindow(OTableDesignView* pParent) + : InterimItemWindow(pParent, "dbaccess/ui/tableborderwindow.ui", "TableBorderWindow", false) + , m_xHorzSplitter(m_xBuilder->weld_paned("splitter")) + , m_xEditorParent(m_xBuilder->weld_container("editor")) + , m_xEditorParentWin(m_xEditorParent->CreateChildFrame()) + , m_xEditorCtrl(VclPtr<OTableEditorCtrl>::Create(VCLUnoHelper::GetWindow(m_xEditorParentWin), pParent)) + , m_xFieldDescParent(m_xBuilder->weld_container("fielddesc")) + , m_xFieldDescWin(new OTableFieldDescWin(m_xFieldDescParent.get(), pParent)) { + SetStyle(GetStyle() | WB_DIALOGCONTROL); - ImplInitSettings(); - // create children - m_pEditorCtrl = VclPtr<OTableEditorCtrl>::Create( this); - m_pFieldDescWin = VclPtr<OTableFieldDescWin>::Create(this, pParent); - - m_pFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN); + m_xFieldDescWin->SetHelpId(HID_TAB_DESIGN_DESCWIN); // set depending windows and controls - m_pEditorCtrl->SetDescrWin(m_pFieldDescWin); - - // set up splitter - m_aHorzSplitter->SetSplitHdl( LINK(this, OTableBorderWindow, SplitHdl) ); - m_aHorzSplitter->Show(); + m_xEditorCtrl->SetDescrWin(m_xFieldDescWin.get()); } OTableBorderWindow::~OTableBorderWindow() @@ -63,93 +62,45 @@ OTableBorderWindow::~OTableBorderWindow() void OTableBorderWindow::dispose() { // destroy children - // ::dbaui::notifySystemWindow(this,m_pFieldDescWin,::comphelper::mem_fun(&TaskPaneList::RemoveWindow)); - m_pEditorCtrl->Hide(); - m_pFieldDescWin->Hide(); - m_pEditorCtrl.disposeAndClear(); - m_pFieldDescWin.disposeAndClear(); - m_aHorzSplitter.disposeAndClear(); - vcl::Window::dispose(); + m_xEditorCtrl.disposeAndClear(); + m_xEditorParentWin->dispose(); + m_xEditorParentWin.clear(); + m_xEditorParent.reset(); + m_xFieldDescWin.reset(); + m_xFieldDescParent.reset(); + m_xHorzSplitter.reset(); + InterimItemWindow::dispose(); } -void OTableBorderWindow::Resize() +void OTableBorderWindow::IdleResize() { - const long nSplitterHeight(3); - // dimensions of parent window - Size aOutputSize( GetOutputSize() ); - long nOutputWidth = aOutputSize.Width(); - long nOutputHeight = aOutputSize.Height(); - long nSplitPos = m_aHorzSplitter->GetSplitPosPixel(); + auto nOutputHeight = GetSizePixel().Height(); + auto nOldSplitPos = m_xHorzSplitter->get_position(); + auto nSplitPos = nOldSplitPos; // shift range of the splitter is the middle third of the output - long nDragPosY = nOutputHeight/3; - long nDragSizeHeight = nOutputHeight/3; - m_aHorzSplitter->SetDragRectPixel( tools::Rectangle(Point(0,nDragPosY), Size(nOutputWidth,nDragSizeHeight) ), this ); - if( (nSplitPos < nDragPosY) || (nSplitPos > (nDragPosY+nDragSizeHeight)) ) - nSplitPos = nDragPosY+nDragSizeHeight-5; + auto nDragPosY = nOutputHeight/3; + auto nDragSizeHeight = nOutputHeight/3; + if (nSplitPos < nDragPosY || nSplitPos > nDragPosY + nDragSizeHeight) + nSplitPos = nDragPosY + nDragSizeHeight; // set splitter - m_aHorzSplitter->SetPosSizePixel( Point( 0, nSplitPos ), Size(nOutputWidth, nSplitterHeight)); - m_aHorzSplitter->SetSplitPosPixel( nSplitPos ); + m_xHorzSplitter->set_position(nSplitPos); - // set window - m_pEditorCtrl->SetPosSizePixel( Point(0, 0), Size(nOutputWidth , nSplitPos) ); + InterimItemWindow::IdleResize(); - m_pFieldDescWin->SetPosSizePixel( Point(0, nSplitPos+nSplitterHeight), - Size(nOutputWidth, nOutputHeight-nSplitPos-nSplitterHeight) ); -} - -IMPL_LINK( OTableBorderWindow, SplitHdl, Splitter*, pSplit, void ) -{ - if(pSplit == m_aHorzSplitter.get()) - { - m_aHorzSplitter->SetPosPixel( Point( m_aHorzSplitter->GetPosPixel().X(),m_aHorzSplitter->GetSplitPosPixel() ) ); - Resize(); - } -} - -void OTableBorderWindow::ImplInitSettings() -{ - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - - // FIXME RenderContext - - vcl::Font aFont = rStyleSettings.GetAppFont(); - if ( IsControlFont() ) - aFont.Merge( GetControlFont() ); - SetPointFont(*this, aFont); - - Color aTextColor = rStyleSettings.GetButtonTextColor(); - if ( IsControlForeground() ) - aTextColor = GetControlForeground(); - SetTextColor( aTextColor ); - - if( IsControlBackground() ) - SetBackground( GetControlBackground() ); - else - SetBackground( rStyleSettings.GetFaceColor() ); -} - -void OTableBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) -{ - Window::DataChanged( rDCEvt ); - - if ( (rDCEvt.GetType() == DataChangedEventType::SETTINGS) && - (rDCEvt.GetFlags() & AllSettingsFlags::STYLE) ) - { - ImplInitSettings(); - Invalidate(); - } + if (nOldSplitPos != nSplitPos) + m_xHorzSplitter->set_position(nSplitPos); } void OTableBorderWindow::GetFocus() { - Window::GetFocus(); + InterimItemWindow::GetFocus(); // forward the focus to the current cell of the editor control - if (m_pEditorCtrl) - m_pEditorCtrl->GrabFocus(); + if (m_xEditorCtrl) + m_xEditorCtrl->GrabFocus(); } OTableDesignView::OTableDesignView( vcl::Window* pParent, diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx index b85bc2e74a9d..af7dfd6168b7 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.cxx @@ -29,8 +29,8 @@ using namespace dbaui; -OTableFieldDescWin::OTableFieldDescWin(vcl::Window* pParent, OTableDesignView* pView) - : InterimItemWindow(pParent, "dbaccess/ui/fielddescpanel.ui", "FieldDescPanel") +OTableFieldDescWin::OTableFieldDescWin(weld::Container* pParent, OTableDesignView* pView) + : OChildWindow(pParent, "dbaccess/ui/fielddescpanel.ui", "FieldDescPanel") , m_xHelpBar(new OTableDesignHelpBar(m_xBuilder->weld_text_view("textview"))) , m_xBox(m_xBuilder->weld_container("box")) , m_xFieldControl(new OTableFieldControl(m_xBox.get(), m_xHelpBar.get(), pView)) @@ -46,19 +46,13 @@ OTableFieldDescWin::OTableFieldDescWin(vcl::Window* pParent, OTableDesignView* p m_xFieldControl->connect_focus_in(LINK(this, OTableFieldDescWin, FieldFocusIn)); } -OTableFieldDescWin::~OTableFieldDescWin() +bool OTableFieldDescWin::HasChildPathFocus() const { - disposeOnce(); + return m_xFieldControl->HasChildPathFocus() || m_xHelpBar->HasFocus(); } -void OTableFieldDescWin::dispose() +OTableFieldDescWin::~OTableFieldDescWin() { - // destroy children - m_xFieldControl.reset(); - m_xBox.reset(); - m_xHeader.reset(); - m_xHelpBar.reset(); - InterimItemWindow::dispose(); } void OTableFieldDescWin::Init() @@ -129,16 +123,9 @@ void OTableFieldDescWin::paste() getActiveChild()->paste(); } -void OTableFieldDescWin::GetFocus() -{ - if ( getGenPage() ) - getGenPage()->GetFocus(); -} - -void OTableFieldDescWin::LoseFocus() +void OTableFieldDescWin::GrabFocus() { - if ( getGenPage() ) - getGenPage()->LoseFocus(); + m_xFieldControl->GrabFocus(); } IMPL_LINK(OTableFieldDescWin, HelpFocusIn, weld::Widget&, rWidget, void) diff --git a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx index d25c5c61b60b..7d7fbbe5d9b1 100644 --- a/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx +++ b/dbaccess/source/ui/tabledesign/TableFieldDescWin.hxx @@ -21,6 +21,7 @@ #include <vcl/InterimItemWindow.hxx> #include <IClipBoardTest.hxx> +#include <ChildWindow.hxx> #include "TableFieldControl.hxx" namespace dbaui @@ -29,7 +30,7 @@ namespace dbaui class OTableDesignView; class OFieldDescription; - class OTableFieldDescWin final : public InterimItemWindow + class OTableFieldDescWin final : public OChildWindow , public IClipboardTest { enum ChildFocusState @@ -53,9 +54,8 @@ namespace dbaui DECL_LINK(FieldFocusIn, weld::Widget&, void); public: - explicit OTableFieldDescWin(vcl::Window* pParent, OTableDesignView* pView); + explicit OTableFieldDescWin(weld::Container* pParent, OTableDesignView* pView); virtual ~OTableFieldDescWin() override; - virtual void dispose() override; void Init(); @@ -69,8 +69,8 @@ namespace dbaui OUString BoolStringPersistent(const OUString& rUIString) const { return m_xFieldControl->BoolStringPersistent(rUIString); } OUString BoolStringUI(const OUString& rPersistentString) const { return m_xFieldControl->BoolStringUI(rPersistentString); } - virtual void GetFocus() override; - virtual void LoseFocus() override; + virtual bool HasChildPathFocus() const override; + virtual void GrabFocus() override; // IClipboardTest virtual bool isCutAllowed() override; diff --git a/dbaccess/uiconfig/ui/appdetailwindow.ui b/dbaccess/uiconfig/ui/appdetailwindow.ui index 3c6a3fee6959..b3fcc707ef68 100644 --- a/dbaccess/uiconfig/ui/appdetailwindow.ui +++ b/dbaccess/uiconfig/ui/appdetailwindow.ui @@ -15,11 +15,11 @@ <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="orientation">vertical</property> + <property name="wide_handle">True</property> <child> <object class="GtkBox" id="tasks"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_bottom">3</property> <property name="orientation">vertical</property> <child> <placeholder/> @@ -34,7 +34,6 @@ <object class="GtkBox" id="container"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="margin_top">3</property> <property name="orientation">vertical</property> <child> <placeholder/> diff --git a/dbaccess/uiconfig/ui/tableborderwindow.ui b/dbaccess/uiconfig/ui/tableborderwindow.ui new file mode 100644 index 000000000000..f37621282fae --- /dev/null +++ b/dbaccess/uiconfig/ui/tableborderwindow.ui @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.36.0 --> +<interface domain="dba"> + <requires lib="gtk+" version="3.18"/> + <object class="GtkBox" id="TableBorderWindow"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <child> + <object class="GtkSeparator"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_top">3</property> + <property name="margin_bottom">3</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkPaned" id="splitter"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="wide_handle">True</property> + <child> + <object class="GtkBox" id="editor"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="resize">True</property> + <property name="shrink">True</property> + </packing> + </child> + <child> + <object class="GtkBox" id="fielddesc"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="resize">True</property> + <property name="shrink">True</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> +</interface> |