summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-06-12 13:15:45 +0000
committerAndre Fischer <af@apache.org>2013-06-12 13:15:45 +0000
commit5d8bbe5fe43f94d1c29dda7f1e6e06668a304f78 (patch)
treea7c82d8cc02b65048425fea684b7965c3d5744d8 /svx/source
parentf7f162aef22b025b0d0ffcd0bf0c5eead74143d0 (diff)
122453: Initialize and update units of PosSize panel spin fields.
Notes
Notes: merged as: 4ea968a7b051e4e0f6febeb9996ed7689b08672f
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 1ebece0f647f..d093d0be10cd 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -720,6 +720,11 @@ void PosSizePropertyPanel::NotifyItemUpdate(
else
mbAdjustEnabled = false;
+ // Pool unit and dialog unit may have changed, make sure that we
+ // have the current values.
+ mePoolUnit = maTransfWidthControl.GetCoreMetric();
+ meDlgUnit = GetModuleFieldUnit();
+
switch (nSID)
{
case SID_ATTR_TRANSFORM_WIDTH:
@@ -732,6 +737,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
long mlOldWidth1 = pWidthItem->GetValue();
mlOldWidth1 = Fraction( mlOldWidth1 ) / maUIScale;
+ SetFieldUnit( *mpMtrWidth, meDlgUnit, true );
SetMetricValue( *mpMtrWidth, mlOldWidth1, mePoolUnit );
mlOldWidth = mlOldWidth1;
break;
@@ -751,6 +757,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
long mlOldHeight1 = pHeightItem->GetValue();
mlOldHeight1 = Fraction( mlOldHeight1 ) / maUIScale;
+ SetFieldUnit( *mpMtrHeight, meDlgUnit, true );
SetMetricValue( *mpMtrHeight, mlOldHeight1, mePoolUnit );
mlOldHeight = mlOldHeight1;
break;
@@ -769,6 +776,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosX, meDlgUnit, true );
SetMetricValue( *mpMtrPosX, nTmp, mePoolUnit );
break;
}
@@ -786,6 +794,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
SetMetricValue( *mpMtrPosY, nTmp, mePoolUnit );
break;
}