diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-03 22:11:34 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-04 00:18:04 +0200 |
commit | 4786d95b3187442ad2c3d0760e9bdcbc0a5e6825 (patch) | |
tree | 0577a658d15b5200de090b728229ca3f65546bde /include/svx | |
parent | 01c5c1de3acc9039fabef1fa03d171fa1a75a702 (diff) |
fdo#60120 Modify DialControl to store 100th degree angle.
DialControl internally stores the angle to a 100th of a degree
percision, but when SetRotation is called, the value was always
rounded to a 1 degree percision. This has now been modified to
round only on DialControl mouse interaction.
Additionally add add a parameter to SetLinkedField which states
the number of decimal places the NumericField is set to. This change
makes possible to set the NumericField to 100th of a Degree as the
internal angle is represented in. Default value is 0, so no change is
needed to existing DialControls.
Change-Id: I1f0c20092cdfccbd0878d7eb620bfdad7825b0fb
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/dialcontrol.hxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/svx/dialcontrol.hxx b/include/svx/dialcontrol.hxx index 342a38452ee8..84dc1dcc0873 100644 --- a/include/svx/dialcontrol.hxx +++ b/include/svx/dialcontrol.hxx @@ -109,8 +109,13 @@ public: /** Sets the rotation to the passed value (in 1/100 degrees). */ void SetRotation( sal_Int32 nAngle ); - /** Links the passed numeric edit field to the control (bi-directional). */ - void SetLinkedField( NumericField* pField ); + /** Links the passed numeric edit field to the control (bi-directional). + * nDecimalPlaces: + * field value is usign given decimal places + * default is 0 which means field values are in degrees, + * 2 means 100th of degree + */ + void SetLinkedField( NumericField* pField, sal_Int32 nDecimalPlaces = 0); /** Returns the linked numeric edit field, or 0. */ NumericField* GetLinkedField() const; @@ -133,6 +138,7 @@ protected: ::boost::scoped_ptr<DialControlBmp> mpBmpBuffered; Link maModifyHdl; NumericField* mpLinkField; + sal_Int32 mnLinkedFieldValueMultiplyer; Size maWinSize; Font maWinFont; sal_Int32 mnAngle; |