From 68bc8af6b6c4d0399bd10ed450d81aa2f17931a1 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 20 May 2014 16:20:42 +0200 Subject: SvxRelativeField: set the unit from the passed stringmap In the Paragraph "Indents & Spacing" tab there are fields with unit: 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 --- include/svx/relfld.hxx | 3 ++- include/vcl/builder.hxx | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') 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 #include #include @@ -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 #include #include +#include #include #include #include @@ -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); -- cgit v1.2.3