summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-07-04 14:47:32 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-07-04 18:32:20 +0200
commita8bcd1a39eebb3b2e28972592915c793391c500d (patch)
tree77a0a33ff6dfef1a53f7bdd95f2c3a4633625f29
parent2ee1de716cd8326cd56d441019db2c32b2e10a32 (diff)
glade: add new svxlo-HatchingLB custom widget
Change-Id: I124adc8e4b20a2d4629113906bcd9b6e4856cc54
-rw-r--r--extras/source/glade/libreoffice-catalog.xml.in3
-rw-r--r--include/svx/dlgctrl.hxx1
-rw-r--r--svx/source/dialog/dlgctrl.cxx18
3 files changed, 22 insertions, 0 deletions
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 962c42f2ea56..6d60839a9484 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -215,6 +215,9 @@
<glade-widget-class title="Gradiant ListBox" name="svxlo-GradientLB"
generic-name="GradiantListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
+ <glade-widget-class title="Hatching ListBox" name="svxlo-HatchingLB"
+ generic-name="HatchingListBox" parent="GtkComboBox"
+ icon-name="widget-gtk-combobox"/>
<glade-widget-class title="Category ComboBox" name="swuilo-CategoryBox"
generic-name="CategoryComboBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index d88d2e28e300..d218ba2586fd 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -220,6 +220,7 @@ class SVX_DLLPUBLIC HatchingLB : public ListBox
XHatchListRef mpList;
public:
explicit HatchingLB(Window* pParent, ResId Id);
+ explicit HatchingLB(Window* pParent, WinBits aWB);
virtual void Fill( const XHatchListRef &pList );
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 9dc7bb875991..29ac4d234ea4 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -975,6 +975,24 @@ HatchingLB::HatchingLB( Window* pParent, ResId Id)
SetEdgeBlending(true);
}
+HatchingLB::HatchingLB( Window* pParent, WinBits nWinStyle)
+: ListBox( pParent, nWinStyle ),
+ mpList ( NULL )
+{
+ SetEdgeBlending(true);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeHatchingLB(Window *pParent, VclBuilder::stringmap& rMap)
+{
+ WinBits nWinStyle = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE;
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinStyle |= WB_BORDER;
+ HatchingLB *pListBox = new HatchingLB(pParent, nWinStyle);
+ pListBox->EnableAutoSize(true);
+ return pListBox;
+}
+
void HatchingLB::Fill( const XHatchListRef &pList )
{
if( !pList.is() )