summaryrefslogtreecommitdiffstats
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-18 21:35:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-19 09:54:06 +0100
commitd727479c0065e211ce97663ba54bad57a0a1a6f1 (patch)
treed2c0acdccda6152ed4a67dddc17e669a88438d75 /basctl
parentremove and replace newly unused ctor (diff)
downloadcore-d727479c0065e211ce97663ba54bad57a0a1a6f1.tar.gz
core-d727479c0065e211ce97663ba54bad57a0a1a6f1.zip
merge common code together
Change-Id: I1c514c1a83dac4556ad68b44972a97fb4b3384e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88991 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/ObjectCatalog.cxx12
-rw-r--r--basctl/source/basicide/baside2.cxx1
-rw-r--r--basctl/source/basicide/baside2.hxx6
-rw-r--r--basctl/source/basicide/baside2b.cxx23
-rw-r--r--basctl/source/basicide/bastypes.cxx13
-rw-r--r--basctl/source/dlged/propbrw.cxx1
-rw-r--r--basctl/source/inc/ObjectCatalog.hxx4
-rw-r--r--basctl/source/inc/bastypes.hxx8
-rw-r--r--basctl/source/inc/propbrw.hxx3
9 files changed, 24 insertions, 47 deletions
diff --git a/basctl/source/basicide/ObjectCatalog.cxx b/basctl/source/basicide/ObjectCatalog.cxx
index 72c66dea0b75..5142a71e837c 100644
--- a/basctl/source/basicide/ObjectCatalog.cxx
+++ b/basctl/source/basicide/ObjectCatalog.cxx
@@ -25,19 +25,12 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/layout.hxx>
namespace basctl
{
ObjectCatalog::ObjectCatalog(vcl::Window* pParent)
- : DockingWindow(pParent)
+ : DockingWindow(pParent, "modules/BasicIDE/ui/dockingorganizer.ui", "DockingOrganizer")
{
- m_xVclContentArea = VclPtr<VclVBox>::Create(this);
- m_xVclContentArea->Show();
- m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea,
- "modules/BasicIDE/ui/dockingorganizer.ui"));
- m_xContainer = m_xBuilder->weld_container("DockingOrganizer");
-
m_xTitle = m_xBuilder->weld_label("title");
m_xTree.reset(new SbTreeListBox(m_xBuilder->weld_tree_view("libraries"), GetFrameWeld()));
@@ -66,9 +59,6 @@ void ObjectCatalog::dispose()
GetParent()->GetSystemWindow()->GetTaskPaneList()->RemoveWindow(this);
m_xTitle.reset();
m_xTree.reset();
- m_xContainer.reset();
- m_xBuilder.reset();
- m_xVclContentArea.disposeAndClear();
DockingWindow::dispose();
}
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index d07aa96dda2f..57351c678409 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -34,6 +34,7 @@
#include <basic/basmgr.hxx>
#include <basic/basrdll.hxx>
#include <basic/sbmeth.hxx>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/script/ModuleType.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 03eebc402771..0886234e6856 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -188,9 +188,6 @@ public:
class WatchWindow final : public DockingWindow
{
private:
- std::unique_ptr<weld::Builder> m_xBuilder;
- VclPtr<vcl::Window> m_xVclContentArea;
- std::unique_ptr<weld::Container> m_xContainer;
std::unique_ptr<weld::Container> m_xTitleArea;
std::unique_ptr<weld::Label> m_xTitle;
std::unique_ptr<weld::Entry> m_xEdit;
@@ -230,9 +227,6 @@ public:
class StackWindow : public DockingWindow
{
private:
- std::unique_ptr<weld::Builder> m_xBuilder;
- VclPtr<vcl::Window> m_xVclContentArea;
- std::unique_ptr<weld::Container> m_xContainer;
std::unique_ptr<weld::Label> m_xTitle;
std::unique_ptr<weld::TreeView> m_xTreeListBox;
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index d3b7e9563e29..8f5888e5c9d8 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -43,7 +43,6 @@
#include <sfx2/progress.hxx>
#include <sfx2/viewfrm.hxx>
#include <tools/debug.hxx>
-#include <vcl/layout.hxx>
#include <vcl/weld.hxx>
#include <svl/urihelper.hxx>
#include <svx/svxids.hrc>
@@ -1584,15 +1583,9 @@ struct WatchItem
}
WatchWindow::WatchWindow(Layout* pParent)
- : DockingWindow(pParent)
+ : DockingWindow(pParent, "modules/BasicIDE/ui/dockingwatch.ui", "DockingWatch")
, m_nUpdateWatchesId(nullptr)
{
- m_xVclContentArea = VclPtr<VclVBox>::Create(this);
- m_xVclContentArea->Show();
- m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea,
- "modules/BasicIDE/ui/dockingwatch.ui"));
- m_xContainer = m_xBuilder->weld_container("DockingWatch");
-
m_xTitleArea = m_xBuilder->weld_container("titlearea");
nVirtToolBoxHeight = m_xTitleArea->get_preferred_size().Height();
@@ -1666,9 +1659,6 @@ void WatchWindow::dispose()
m_xRemoveWatchButton.reset();
m_xTitleArea.reset();
m_xTreeListBox.reset();
- m_xContainer.reset();
- m_xBuilder.reset();
- m_xVclContentArea.disposeAndClear();
if (!IsDisposed())
GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this );
DockingWindow::dispose();
@@ -1797,14 +1787,8 @@ IMPL_LINK(WatchWindow, KeyInputHdl, const KeyEvent&, rKEvt, bool)
// StackWindow
StackWindow::StackWindow(Layout* pParent)
- : DockingWindow(pParent)
+ : DockingWindow(pParent, "modules/BasicIDE/ui/dockingstack.ui", "DockingStack")
{
- m_xVclContentArea = VclPtr<VclVBox>::Create(this);
- m_xVclContentArea->Show();
- m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea,
- "modules/BasicIDE/ui/dockingstack.ui"));
- m_xContainer = m_xBuilder->weld_container("DockingStack");
-
m_xTitle = m_xBuilder->weld_label("title");
m_xTitle->set_label(IDEResId(RID_STR_STACK));
@@ -1836,9 +1820,6 @@ void StackWindow::dispose()
GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this );
m_xTitle.reset();
m_xTreeListBox.reset();
- m_xContainer.reset();
- m_xBuilder.reset();
- m_xVclContentArea.disposeAndClear();
DockingWindow::dispose();
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 1fef74fb7812..5120e456342a 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -38,6 +38,7 @@
#include <svl/srchdefs.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
+#include <vcl/layout.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
#include <tools/stream.hxx>
@@ -255,11 +256,16 @@ WinBits const DockingWindow::StyleBits =
WB_BORDER | WB_3DLOOK | WB_CLIPCHILDREN |
WB_MOVEABLE | WB_SIZEABLE | WB_ROLLABLE | WB_DOCKABLE;
-DockingWindow::DockingWindow(vcl::Window* pParent) :
+DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID) :
::DockingWindow(pParent, "DockingWindow", "sfx/ui/dockingwindow.ui"),
pLayout(nullptr),
nShowCount(0)
-{ }
+{
+ m_xVclContentArea = VclPtr<VclVBox>::Create(this);
+ m_xVclContentArea->Show();
+ m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription));
+ m_xContainer = m_xBuilder->weld_container(rID);
+}
DockingWindow::DockingWindow (Layout* pParent) :
::DockingWindow(pParent, StyleBits),
@@ -274,6 +280,9 @@ DockingWindow::~DockingWindow()
void DockingWindow::dispose()
{
+ m_xContainer.reset();
+ m_xBuilder.reset();
+ m_xVclContentArea.disposeAndClear();
pLayout.clear();
::DockingWindow::dispose();
}
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 8b8775dddaa3..6aa1691ad9ad 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -38,6 +38,7 @@
#include <svx/svdview.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/diagnose_ex.h>
+#include <vcl/layout.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/weld.hxx>
diff --git a/basctl/source/inc/ObjectCatalog.hxx b/basctl/source/inc/ObjectCatalog.hxx
index e18a37fdfa0c..6ef3d639001b 100644
--- a/basctl/source/inc/ObjectCatalog.hxx
+++ b/basctl/source/inc/ObjectCatalog.hxx
@@ -46,10 +46,6 @@ public:
void SetCurrentEntry(BaseWindow* pCurWin);
private:
- std::unique_ptr<weld::Builder> m_xBuilder;
- VclPtr<vcl::Window> m_xVclContentArea;
- std::unique_ptr<weld::Container> m_xContainer;
-
std::unique_ptr<weld::Label> m_xTitle; ///< Title of the Object Catalog window
std::unique_ptr<SbTreeListBox> m_xTree; ///< The Treelist of the objects in window
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index c4bf5bb3f227..2a09af077d8f 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -25,6 +25,7 @@
#include <svtools/tabbar.hxx>
#include <basic/sbdef.hxx>
#include <vcl/dockwin.hxx>
+#include <vcl/weld.hxx>
#include <unordered_map>
@@ -80,7 +81,7 @@ struct BasicStatus
class DockingWindow : public ::DockingWindow
{
public:
- DockingWindow(vcl::Window* pParent);
+ DockingWindow(vcl::Window* pParent, const OUString& rUIXMLDescription, const OString& rID);
DockingWindow(Layout* pParent);
virtual ~DockingWindow() override;
virtual void dispose() override;
@@ -99,6 +100,11 @@ protected:
virtual bool PrepareToggleFloatingMode() override;
virtual void StartDocking() override;
+protected:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ VclPtr<vcl::Window> m_xVclContentArea;
+ std::unique_ptr<weld::Container> m_xContainer;
+
private:
// the position and the size of the floating window
tools::Rectangle aFloatingRect;
diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx
index 6bc9066527ce..4f21e2ec7cfd 100644
--- a/basctl/source/inc/propbrw.hxx
+++ b/basctl/source/inc/propbrw.hxx
@@ -29,7 +29,6 @@
#include <svl/lstner.hxx>
#include <svl/SfxBroadcaster.hxx>
#include <svx/svdmark.hxx>
-#include <vcl/layout.hxx>
#include "bastypes.hxx"
class SfxBindings;
@@ -44,7 +43,7 @@ class DialogWindowLayout;
class PropBrw final : public DockingWindow, public SfxListener, public SfxBroadcaster
{
private:
- VclPtr<VclBox> m_xContentArea;
+ VclPtr<vcl::Window> m_xContentArea;
bool m_bInitialStateChange;
css::uno::Reference< css::frame::XFrame2 >