summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-05-20 16:20:42 +0200
committerMichael Stahl <mstahl@redhat.com>2014-05-20 16:44:29 +0200
commit68bc8af6b6c4d0399bd10ed450d81aa2f17931a1 (patch)
treef3fde30fe52bccf4932cf932b2ed0543d54f72cc /include
parent35199df7b7af9d9dd3e98eb5f1b24ac1d407345c (diff)
SvxRelativeField: set the unit from the passed stringmap
In the Paragraph "Indents & Spacing" tab there are fields with unit: <object class="svxlo-SvxRelativeField" id="spinED_LEFTINDENT:0cm"> But the unit is effectively ignored, and the resulting SvxRelativeField with FUNIT_NONE and 9999 max somehow results in 0.18cm max when the dialog sets cm as unit. Change-Id: I6001c93079fd7d899f1e119913b29ea4898b1c34
Diffstat (limited to 'include')
-rw-r--r--include/svx/relfld.hxx3
-rw-r--r--include/vcl/builder.hxx2
2 files changed, 4 insertions, 1 deletions
diff --git a/include/svx/relfld.hxx b/include/svx/relfld.hxx
index 9b9d72619f27..91fb36d6d709 100644
--- a/include/svx/relfld.hxx
+++ b/include/svx/relfld.hxx
@@ -19,6 +19,7 @@
#ifndef INCLUDED_SVX_RELFLD_HXX
#define INCLUDED_SVX_RELFLD_HXX
+#include <tools/fldunit.hxx>
#include <vcl/field.hxx>
#include <svx/svxdllapi.h>
@@ -39,7 +40,7 @@ protected:
void Modify() SAL_OVERRIDE;
public:
- SvxRelativeField( Window* pParent, WinBits nBits);
+ SvxRelativeField(Window* pParent, WinBits nBits, FieldUnit eUnit);
void EnableRelativeMode( sal_uInt16 nMin = 50, sal_uInt16 nMax = 150,
sal_uInt16 nStep = 5 );
diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index f8208f560407..3f4841e0ef17 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -13,6 +13,7 @@
#include <typeinfo>
#include <osl/module.hxx>
#include <tools/resmgr.hxx>
+#include <tools/fldunit.hxx>
#include <vcl/dllapi.h>
#include <vcl/window.hxx>
#include <xmlreader/xmlreader.hxx>
@@ -303,6 +304,7 @@ public:
static OString convertMnemonicMarkup(const OString &rIn);
static OString extractCustomProperty(stringmap &rMap);
+ static FieldUnit detectUnit(OString const&);
static bool extractDropdown(stringmap &rMap);