summaryrefslogtreecommitdiff
path: root/include/svx
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-06-03 22:11:34 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-06-03 23:44:59 +0200
commit870dd818999ac62c6722c208527d5fbf28c5daee (patch)
tree61166ee2405ec08a230d7ddf4cb8799a6109e2af /include/svx
parent30f2fa988fa9ed52bd2db693e099ab2c7f4efdf5 (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.hxx10
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;