summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-16 20:33:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-16 20:37:54 +0000
commit36e590ee00affc89b26055c748b862cf79f56247 (patch)
treee9abf3da2ef50cb48bd8399b862391bfaa0baf07 /include
parent75043c23c7d08fcc9b22a38fe08014d1381e2f90 (diff)
make use that these VclBuilders have an XFrame to expose its dispatch
the sidebar widget-layout enabled panels could use frame::XDispatch::dispatch to send their commands directly rather than mapping back to SIDS and Executing those, which would allow removing piles of weird-ass stuff Change-Id: Ibbff56d4fb96820d3bdbf4b1cb582d25337fe48b
Diffstat (limited to 'include')
-rw-r--r--include/svx/sidebar/PanelLayout.hxx4
-rw-r--r--include/vcl/builder.hxx5
2 files changed, 8 insertions, 1 deletions
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx
index 5275ced74092..fe55f11f8c5b 100644
--- a/include/svx/sidebar/PanelLayout.hxx
+++ b/include/svx/sidebar/PanelLayout.hxx
@@ -16,6 +16,7 @@
#include <vcl/ctrl.hxx>
#include <vcl/timer.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
/// This class is the base for the Widget Layout-based sidebar panels.
@@ -36,6 +37,9 @@ public:
virtual Size GetOptimalSize() const;
virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL);
virtual void queue_resize();
+
+ void dispatch(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArgs =
+ css::uno::Sequence<css::beans::PropertyValue>());
};
#endif
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index 8cd25a0ce287..2719aba8e913 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -242,7 +242,7 @@ private:
};
/// XFrame to be able to extract labels and other properties of the UNO commands (like of .uno:Bold).
- com::sun::star::uno::Reference<com::sun::star::frame::XFrame> m_xFrame;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
public:
VclBuilder(::Window *pParent, OUString sUIRootDir, OUString sUIFile,
@@ -308,6 +308,8 @@ public:
//Helpers to retrofit all the existing code to the builder
static void reorderWithinParent(std::vector< ::Window*>& rChilds, bool bIsButtonBox);
static void reorderWithinParent(::Window &rWindow, sal_uInt16 nNewPosition);
+
+ css::uno::Reference<css::frame::XFrame> getFrame() { return m_xFrame; }
private:
::Window *insertObject(::Window *pParent,
const OString &rClass, const OString &rID,
@@ -390,6 +392,7 @@ public:
virtual ~VclBuilderContainer();
static OUString getUIRootDir();
bool hasBuilder() const { return m_pUIBuilder != NULL; }
+ css::uno::Reference<css::frame::XFrame> getFrame() { return m_pUIBuilder->getFrame(); }
template <typename T> T* get(T*& ret, OString sID)
{
return m_pUIBuilder->get<T>(ret, sID);