summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-04-18 09:34:36 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-04-18 10:06:04 +0100
commita8e1ed87ff7ccd24ccbcd74cc7689e0eda2fec36 (patch)
tree8911a1619cfcc8e15dcdf9dc147c7e2d2d9116eb /svtools
parent61a690cd79a0c1412d8432a62d48632b5c2adc80 (diff)
allow tree and tab boxes to have borders via .ui
Change-Id: I988f307d2ce88ac5f7e1ee7d7c5cffd352c963e0
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svtabbx.cxx13
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
2 files changed, 18 insertions, 3 deletions
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 3774a450f9bf..3c8111f89e7c 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -22,7 +22,8 @@
#include <svtools/svtresid.hxx>
#include <svtools/svlbitm.hxx>
#include <svtools/svtools.hrc>
-#include "svtools/treelistentry.hxx"
+#include <svtools/treelistentry.hxx>
+#include <vcl/builder.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include "svtaccessiblefactory.hxx"
@@ -107,6 +108,16 @@ SvTabListBox::SvTabListBox( Window* pParent, WinBits nBits )
SetHighlightRange(); // select full width
}
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvTabListBox(Window *pParent,
+ VclBuilder::stringmap &rMap)
+{
+ WinBits nWinStyle = WB_TABSTOP;
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinStyle |= WB_BORDER;
+ return new SvTabListBox(pParent, nWinStyle);
+}
+
SvTabListBox::SvTabListBox( Window* pParent, const ResId& rResId )
: SvTreeListBox( pParent, rResId )
{
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index f19018246040..5fa6021abce0 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -452,9 +452,13 @@ SvTreeListBox::SvTreeListBox(Window* pParent, const ResId& rResId) :
SetSublistOpenWithLeftRight();
}
-extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvTreeListBox(Window *pParent, VclBuilder::stringmap &)
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvTreeListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
- return new SvTreeListBox(pParent, WB_TABSTOP);
+ WinBits nWinStyle = WB_TABSTOP;
+ OString sBorder = VclBuilder::extractCustomProperty(rMap);
+ if (!sBorder.isEmpty())
+ nWinStyle |= WB_BORDER;
+ return new SvTreeListBox(pParent, nWinStyle);
}
void SvTreeListBox::Clear()