[Libreoffice-commits] core.git: svx/source

Armin Le Grand alg at apache.org
Thu Mar 20 09:52:09 PDT 2014


 svx/source/sidebar/possize/PosSizePropertyPanel.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 36be3d94c2e142d01c026a93fa88454cb5316bff
Author: Armin Le Grand <alg at apache.org>
Date:   Thu Mar 20 14:36:21 2014 +0000

    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

diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 9091ce4..0b9543d 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())


More information about the Libreoffice-commits mailing list