summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-06-12 13:15:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-12 16:00:29 +0100
commitcc2e15f2c86097d6a6076badb49663a0e2dba08d (patch)
tree27cedb7acb5dc5919a1f3a11c65182c150939b9e /svx/source
parent97b0dc25007a0ee6728ec9a1079c0616c1783dc6 (diff)
Related: #i122453# Initialize and update units of PosSize panel spin fields
(cherry picked from commit 5d8bbe5fe43f94d1c29dda7f1e6e06668a304f78) Change-Id: Ibfcca05efddbcee9983ac4d6bc75703234ea6d67 (cherry picked from commit 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 fdba30fdc9d9..5854e36840d4 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -716,6 +716,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:
@@ -728,6 +733,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
long mlOldWidth1 = pWidthItem->GetValue();
mlOldWidth1 = Fraction( mlOldWidth1 ) / maUIScale;
+ SetFieldUnit( *mpMtrWidth, meDlgUnit, true );
SetMetricValue( *mpMtrWidth, mlOldWidth1, mePoolUnit );
mlOldWidth = mlOldWidth1;
break;
@@ -747,6 +753,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
long mlOldHeight1 = pHeightItem->GetValue();
mlOldHeight1 = Fraction( mlOldHeight1 ) / maUIScale;
+ SetFieldUnit( *mpMtrHeight, meDlgUnit, true );
SetMetricValue( *mpMtrHeight, mlOldHeight1, mePoolUnit );
mlOldHeight = mlOldHeight1;
break;
@@ -765,6 +772,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosX, meDlgUnit, true );
SetMetricValue( *mpMtrPosX, nTmp, mePoolUnit );
break;
}
@@ -782,6 +790,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
{
long nTmp = pItem->GetValue();
nTmp = Fraction( nTmp ) / maUIScale;
+ SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
SetMetricValue( *mpMtrPosY, nTmp, mePoolUnit );
break;
}