From cc2e15f2c86097d6a6076badb49663a0e2dba08d Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 12 Jun 2013 13:15:45 +0000 Subject: Related: #i122453# Initialize and update units of PosSize panel spin fields (cherry picked from commit 5d8bbe5fe43f94d1c29dda7f1e6e06668a304f78) Change-Id: Ibfcca05efddbcee9983ac4d6bc75703234ea6d67 (cherry picked from commit 4ea968a7b051e4e0f6febeb9996ed7689b08672f) --- svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'svx/source') 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; } -- cgit v1.2.3