summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-03-20 14:36:21 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-20 16:49:46 +0000
commit36be3d94c2e142d01c026a93fa88454cb5316bff (patch)
tree345654471002178ec76a7a96c6ff34de35bca8c3 /svx
parente489729dd6a66769bf96cb8e87344861af13d7c8 (diff)
Resolves: #i124409# use slot SID_ATTR_METRIC...
to retrive the UI unit, not GetModuleFieldUnit (cherry picked from commit 34279ea85c33e3efd21971ab692a3de4bdd91817) Conflicts: svx/source/sidebar/possize/PosSizePropertyPanel.cxx Change-Id: Id81847bf7e989a3e49fbe8adaad23048956067df
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 9091ce44f55c..0b9543d0614d 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -66,7 +66,7 @@ PosSizePropertyPanel::PosSizePropertyPanel(
mlRotY(0),
maUIScale(),
mePoolUnit(),
- meDlgUnit(),
+ meDlgUnit(FUNIT_INCH), // #i124409# init with fallback default
maTransfPosXControl(SID_ATTR_TRANSFORM_POS_X, *pBindings, *this),
maTransfPosYControl(SID_ATTR_TRANSFORM_POS_Y, *pBindings, *this),
maTransfWidthControl(SID_ATTR_TRANSFORM_WIDTH, *pBindings, *this),
@@ -208,11 +208,6 @@ void PosSizePropertyPanel::Initialize()
}
mePoolUnit = maTransfWidthControl.GetCoreMetric();
- meDlgUnit = GetModuleFieldUnit();
- SetFieldUnit( *mpMtrPosX, meDlgUnit, true );
- SetFieldUnit( *mpMtrPosY, meDlgUnit, true );
- SetFieldUnit( *mpMtrWidth, meDlgUnit, true );
- SetFieldUnit( *mpMtrHeight, meDlgUnit, true );
}
@@ -599,7 +594,6 @@ void PosSizePropertyPanel::NotifyItemUpdate(
// Pool unit and dialog unit may have changed, make sure that we
// have the current values.
mePoolUnit = maTransfWidthControl.GetCoreMetric();
- meDlgUnit = GetModuleFieldUnit();
switch (nSID)
{
@@ -1014,6 +1008,9 @@ void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem*
bool bPosYBlank = false;
bool bWidthBlank = false;
bool bHeightBlank = false;
+
+ // #i124409# use the given Item to get the correct UI unit and initialize it
+ // and the Fields using it
meDlgUnit = GetCurrentUnit(eState,pState);
if (mpMtrPosX->GetText().isEmpty())