summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-06-05 14:57:11 +0200
committerJan Holesovsky <kendy@suse.cz>2013-06-05 18:32:58 +0200
commit07b0ad4fa63e2a5606587370da4b60e6b1ddfa39 (patch)
treea05c7c206176b1aeedd98b768d6dff122c80d362
parent4774976d82be529c6057a5d3451933b2fc6e19cc (diff)
sidebar conversion tutorial: Create entry points for custom widgets.
For custom widgets, you need an external function named 'makeXYZ' where XYZ is name of the type you want to construct. It exists for many already, but for those that don't yet, you need to create that. Change-Id: I3ad65886897fa73764af2372ceffeca1a57f3165
-rw-r--r--include/svx/sidebar/SidebarDialControl.hxx1
-rw-r--r--sc/uiconfig/scalc/ui/sidebaralignment.ui2
-rw-r--r--svx/source/sidebar/possize/SidebarDialControl.cxx14
3 files changed, 16 insertions, 1 deletions
diff --git a/include/svx/sidebar/SidebarDialControl.hxx b/include/svx/sidebar/SidebarDialControl.hxx
index f468784cb36f..4f2c11860313 100644
--- a/include/svx/sidebar/SidebarDialControl.hxx
+++ b/include/svx/sidebar/SidebarDialControl.hxx
@@ -27,6 +27,7 @@ namespace svx { namespace sidebar {
class SVX_DLLPUBLIC SidebarDialControl : public svx::DialControl
{
public:
+ SidebarDialControl (Window* pParent, WinBits nBits = 0);
SidebarDialControl (Window* pParent, const ResId& rResId);
virtual ~SidebarDialControl (void);
diff --git a/sc/uiconfig/scalc/ui/sidebaralignment.ui b/sc/uiconfig/scalc/ui/sidebaralignment.ui
index 23335e290d0b..0a1481022016 100644
--- a/sc/uiconfig/scalc/ui/sidebaralignment.ui
+++ b/sc/uiconfig/scalc/ui/sidebaralignment.ui
@@ -285,7 +285,7 @@
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
- <object class="GtkScaleButton" id="orientationcontrol">
+ <object class="svxlo-SidebarDialControl" id="orientationcontrol">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
diff --git a/svx/source/sidebar/possize/SidebarDialControl.cxx b/svx/source/sidebar/possize/SidebarDialControl.cxx
index 374c9051375a..a6611b722184 100644
--- a/svx/source/sidebar/possize/SidebarDialControl.cxx
+++ b/svx/source/sidebar/possize/SidebarDialControl.cxx
@@ -22,6 +22,20 @@
namespace svx { namespace sidebar {
+SidebarDialControl::SidebarDialControl (Window* pParent, WinBits nBits)
+ : svx::DialControl(pParent, nBits)
+{
+ mpImpl->mpBmpEnabled.reset(new SidebarDialControlBmp(*this));
+ mpImpl->mpBmpDisabled.reset(new SidebarDialControlBmp(*this));
+ mpImpl->mpBmpBuffered.reset(new SidebarDialControlBmp(*this));
+ Init(GetOutputSizePixel());
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSidebarDialControl(Window *pParent)
+{
+ return new SidebarDialControl(pParent, WB_TABSTOP);
+}
+
SidebarDialControl::SidebarDialControl (
Window* pParent,
const ResId& rResId)