summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-12-19 15:29:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-12-19 19:06:35 +0000
commitd32f7a6e57d42fa03965f22513848bf7b100ac34 (patch)
tree42cd53b6c3a586798677376a52e0ea6b92b30445
parent695e2938ff954f6dcceac4b6b170e6724294be2f (diff)
provide a route to load ToolbarMenu things via .ui
Change-Id: Ic2175faf247d7c05717d397b8afdb9d90087f1d3
-rw-r--r--include/sfx2/dockwin.hxx2
-rw-r--r--include/svtools/toolbarmenu.hxx18
-rw-r--r--include/vcl/dockwin.hxx6
-rw-r--r--sfx2/source/dialog/dockwin.cxx2
-rw-r--r--svtools/source/control/toolbarmenu.cxx15
-rw-r--r--vcl/source/window/dockwin.cxx11
6 files changed, 31 insertions, 23 deletions
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx
index 1d50cc430762..729513adeee4 100644
--- a/include/sfx2/dockwin.hxx
+++ b/include/sfx2/dockwin.hxx
@@ -82,7 +82,7 @@ public:
SfxDockingWindow( SfxBindings *pBindings,
SfxChildWindow *pCW,
vcl::Window* pParent,
- const OUString& rID, const OUString& rUIXMLDescription );
+ const OString& rID, const OUString& rUIXMLDescription );
virtual ~SfxDockingWindow();
void Initialize (SfxChildWinInfo* pInfo);
diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index 5719949a1265..230c33d0f97d 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -46,15 +46,19 @@ class SVT_DLLPUBLIC ToolbarMenu : public DockingWindow
friend class ToolbarMenuStatusListener;
friend struct ToolbarMenu_Impl;
public:
- ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- vcl::Window* pParentWindow,
- WinBits nBits );
+ ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ vcl::Window* pParentWindow,
+ WinBits nBits );
- ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
- vcl::Window* pParentWindow,
- const ResId& rResId );
+ ToolbarMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame,
+ vcl::Window* pParentWindow,
+ const ResId& rResId );
- virtual ~ToolbarMenu();
+ ToolbarMenu(vcl::Window* pParentWindow,
+ const OString& rID, const OUString& rUIXMLDescription,
+ const css::uno::Reference<css::frame::XFrame>& rFrame);
+
+ virtual ~ToolbarMenu();
virtual void MouseMove( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index fea01a0c10ba..6dfad81eb3a5 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -281,7 +281,8 @@ protected:
SAL_DLLPRIVATE void DoInitialLayout();
- void loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription);
+ void loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
+ const css::uno::Reference<css::frame::XFrame> &rFrame);
public:
bool isLayoutEnabled() const;
@@ -297,7 +298,8 @@ protected:
public:
DockingWindow(vcl::Window* pParent, WinBits nStyle = WB_STDDOCKWIN);
DockingWindow(vcl::Window* pParent, const ResId& rResId);
- DockingWindow(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription);
+ DockingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
+ const css::uno::Reference<css::frame::XFrame> &rFrame = css::uno::Reference<css::frame::XFrame>());
virtual ~DockingWindow();
virtual void StartDocking();
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index d7117623baac..6218e0ce8bfc 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -944,7 +944,7 @@ SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
}
SfxDockingWindow::SfxDockingWindow( SfxBindings *pBindinx, SfxChildWindow *pCW,
- vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription)
+ vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
: DockingWindow(pParent, rID, rUIXMLDescription)
, pBindings(pBindinx)
, pMgr(pCW)
diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx
index d5cb6fbe97fa..e8af87f1d3e2 100644
--- a/svtools/source/control/toolbarmenu.cxx
+++ b/svtools/source/control/toolbarmenu.cxx
@@ -435,23 +435,24 @@ IMPL_LINK( ToolbarMenu, HighlightHdl, Control *, pControl )
return 0;
}
-
-
ToolbarMenu::ToolbarMenu( const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, WinBits nBits )
-: DockingWindow(pParentWindow, nBits)
+ : DockingWindow(pParentWindow, nBits)
{
implInit(rFrame);
}
-
-
ToolbarMenu::ToolbarMenu( const Reference< XFrame >& rFrame, vcl::Window* pParentWindow, const ResId& rResId )
-: DockingWindow(pParentWindow, rResId)
+ : DockingWindow(pParentWindow, rResId)
{
implInit(rFrame);
}
-
+ToolbarMenu::ToolbarMenu(vcl::Window* pParentWindow, const OString& rID,
+ const OUString& rUIXMLDescription, const Reference< XFrame >& rFrame)
+ : DockingWindow(pParentWindow, rID, rUIXMLDescription, rFrame)
+{
+ implInit(rFrame);
+}
void ToolbarMenu::implInit(const Reference< XFrame >& rFrame)
{
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index cc3902b60222..95dd54b0400b 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -440,20 +440,21 @@ void DockingWindow::doDeferredInit(WinBits nBits)
mbIsDefferedInit = false;
}
-void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
+void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription,
+ const css::uno::Reference<css::frame::XFrame> &rFrame)
{
mbIsDefferedInit = true;
mpDialogParent = pParent; //should be unset in doDeferredInit
- m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID);
+ m_pUIBuilder = new VclBuilder(this, getUIRootDir(), rUIXMLDescription, rID, rFrame);
}
-DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& rID,
- const OUString& rUIXMLDescription)
+DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,
+ const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
: Window(WINDOW_DOCKINGWINDOW)
{
ImplInitDockingWindowData();
- loadUI(pParent, OUStringToOString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription);
+ loadUI(pParent, rID, rUIXMLDescription, rFrame);
}
DockingWindow::~DockingWindow()