From 20997b4598f559d3274916dc1c343c69e8feeceb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 22 Feb 2021 11:33:52 +0000 Subject: factor out as a ResizableDockingWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I557ccf866cc879b3cc22fcdbca882f4413cb57d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111334 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- basctl/source/basicide/baside2b.cxx | 4 ++-- basctl/source/basicide/bastypes.cxx | 30 +++++++++++++----------------- 2 files changed, 15 insertions(+), 19 deletions(-) (limited to 'basctl/source/basicide') diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index b5d65507fb50..a420949e4584 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1704,7 +1704,7 @@ void WatchWindow::Resize() if ( aBoxSz.Height() < 4 ) aBoxSz.setHeight( 0 ); - m_xVclContentArea->SetPosSizePixel(Point(DWBORDER, DWBORDER), aBoxSz); + m_xBox->SetPosSizePixel(Point(DWBORDER, DWBORDER), aBoxSz); Invalidate(); } @@ -1863,7 +1863,7 @@ void StackWindow::Resize() if ( aBoxSz.Height() < 4 ) aBoxSz.setHeight( 0 ); - m_xVclContentArea->SetPosSizePixel(Point(DWBORDER, DWBORDER), aBoxSz); + m_xBox->SetPosSizePixel(Point(DWBORDER, DWBORDER), aBoxSz); Invalidate(); } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index a9a927a27878..cc58ffa6c846 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -260,21 +259,19 @@ WinBits const DockingWindow::StyleBits = WB_BORDER | WB_3DLOOK | WB_CLIPCHILDREN | WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_DOCKABLE; -DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID) : - ::DockingWindow(pParent, "DockingWindow", "vcl/ui/dockingwindow.ui"), - pLayout(nullptr), - nShowCount(0) +DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID) + : ResizableDockingWindow(pParent) + , pLayout(nullptr) + , nShowCount(0) { - m_xVclContentArea = VclPtr::Create(this); - m_xVclContentArea->Show(); - m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription, true)); + m_xBuilder.reset(Application::CreateInterimBuilder(m_xBox.get(), rUIXMLDescription, true)); m_xContainer = m_xBuilder->weld_container(rID); } -DockingWindow::DockingWindow (Layout* pParent) : - ::DockingWindow(pParent, StyleBits), - pLayout(pParent), - nShowCount(0) +DockingWindow::DockingWindow (Layout* pParent) + : ResizableDockingWindow(pParent, StyleBits) + , pLayout(pParent) + , nShowCount(0) { } DockingWindow::~DockingWindow() @@ -286,9 +283,8 @@ void DockingWindow::dispose() { m_xContainer.reset(); m_xBuilder.reset(); - m_xVclContentArea.disposeAndClear(); pLayout.clear(); - ::DockingWindow::dispose(); + ResizableDockingWindow::dispose(); } // Sets the position and the size of the docking window. This property is saved @@ -327,12 +323,12 @@ void DockingWindow::Show (bool bShow) // = true if (bShow) { if (++nShowCount == 1) - ::DockingWindow::Show(); + ResizableDockingWindow::Show(); } else { if (--nShowCount == 0) - ::DockingWindow::Hide(); + ResizableDockingWindow::Hide(); } } @@ -361,7 +357,7 @@ bool DockingWindow::Docking( const Point& rPos, tools::Rectangle& rRect ) void DockingWindow::EndDocking( const tools::Rectangle& rRect, bool bFloatMode ) { if ( bFloatMode ) - ::DockingWindow::EndDocking( rRect, bFloatMode ); + ResizableDockingWindow::EndDocking( rRect, bFloatMode ); else { SetFloatingMode(false); -- cgit