summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svtools/source/contnr/svtabbx.cxx13
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
-rw-r--r--vcl/inc/vcl/builder.hxx2
-rw-r--r--vcl/source/window/builder.cxx20
4 files changed, 30 insertions, 13 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()
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index 8202aa1494fe..5de792aaab5e 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -257,6 +257,8 @@ public:
//Convert _ gtk markup to ~ vcl markup
static OString convertMnemonicMarkup(const OString &rIn);
+ static OString extractCustomProperty(stringmap &rMap);
+
private:
Window *insertObject(Window *pParent, const OString &rClass, const OString &rID,
stringmap &rProps, stringmap &rPangoAttributes,
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index bf09bbc71e11..7a7919054c9a 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -490,20 +490,20 @@ void VclBuilder::handleTranslations(xmlreader::XmlReader &reader)
}
}
-namespace
+OString VclBuilder::extractCustomProperty(VclBuilder::stringmap &rMap)
{
- OString extractCustomProperty(VclBuilder::stringmap &rMap)
+ OString sCustomProperty;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("customproperty"));
+ if (aFind != rMap.end())
{
- OString sCustomProperty;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("customproperty"));
- if (aFind != rMap.end())
- {
- sCustomProperty = aFind->second;
- rMap.erase(aFind);
- }
- return sCustomProperty;
+ sCustomProperty = aFind->second;
+ rMap.erase(aFind);
}
+ return sCustomProperty;
+}
+namespace
+{
bool extractResizable(VclBuilder::stringmap &rMap)
{
bool bResizable = true;