[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 20 03:16:35 PDT 2012
sw/source/ui/inc/numberingtypelistbox.hxx | 4 +++-
sw/source/ui/misc/numberingtypelistbox.cxx | 12 ++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
New commits:
commit f9480348d46815f4a8242971d9b3d9e2963fb43f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Aug 20 11:15:58 2012 +0100
add support for custom property for custom widget
Change-Id: I166522cb801282ce7b887b694e9ab25c84bd7759
diff --git a/sw/source/ui/inc/numberingtypelistbox.hxx b/sw/source/ui/inc/numberingtypelistbox.hxx
index 43a20f6..15fdb89 100644
--- a/sw/source/ui/inc/numberingtypelistbox.hxx
+++ b/sw/source/ui/inc/numberingtypelistbox.hxx
@@ -37,9 +37,11 @@ class SW_DLLPUBLIC SwNumberingTypeListBox : public ListBox
public:
SwNumberingTypeListBox( Window* pWin, const ResId& rResId,
sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
- SwNumberingTypeListBox( Window* pWin, WinBits nStyle = WB_BORDER, sal_uInt16 nTypeFlags = INSERT_NUM_TYPE_PAGE_STYLE_NUMBERING|INSERT_NUM_TYPE_NO_NUMBERING|INSERT_NUM_EXTENDED_TYPES );
+ SwNumberingTypeListBox( Window* pWin, WinBits nStyle = WB_BORDER );
~SwNumberingTypeListBox();
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
+
void Reload(sal_uInt16 nTypeFlags);
sal_Int16 GetSelectedNumberingType();
diff --git a/sw/source/ui/misc/numberingtypelistbox.cxx b/sw/source/ui/misc/numberingtypelistbox.cxx
index 82d81b8..1fa26fc 100644
--- a/sw/source/ui/misc/numberingtypelistbox.cxx
+++ b/sw/source/ui/misc/numberingtypelistbox.cxx
@@ -58,7 +58,7 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, const ResId& rResI
Reload(nTypeFlags);
}
-SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, WinBits nStyle, sal_uInt16 nTypeFlags ) :
+SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, WinBits nStyle ) :
ListBox(pWin, nStyle),
pImpl(new SwNumberingTypeListBox_Impl)
{
@@ -66,7 +66,15 @@ SwNumberingTypeListBox::SwNumberingTypeListBox( Window* pWin, WinBits nStyle, sa
uno::Reference<text::XDefaultNumberingProvider> xDefNum = text::DefaultNumberingProvider::create(xContext);
pImpl->xInfo = uno::Reference<text::XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY);
- Reload(nTypeFlags);
+}
+
+bool SwNumberingTypeListBox::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey.equalsL(RTL_CONSTASCII_STRINGPARAM("type")))
+ Reload(rValue.toInt32());
+ else
+ return ListBox::set_property(rKey, rValue);
+ return true;
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSwNumberingTypeListBox(Window *pParent)
More information about the Libreoffice-commits
mailing list