[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - svx/source
Maxim Monastirsky
momonasmon at gmail.com
Thu Nov 27 06:11:13 PST 2014
svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
New commits:
commit 16bfe15d9175f52030bcb1265f8f48728786f910
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Wed Nov 26 22:26:39 2014 +0200
sidebar: Try to fix initial spacing values
Process SID_ATTR_METRIC status before any other,
and call SetMax methods before SetValue, so indent
values won't be truncated by a wrong max value.
Change-Id: I36d8c0cce9561902aa2c4d531740f56c80207012
(cherry picked from commit 9a410f9cedbce5276aea48479812ff68210712b0)
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
index 2867a5c..0cfc697 100644
--- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
+++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx
@@ -568,7 +568,6 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat
long nVal = OutputDevice::LogicToLogic( maTxtLeft, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
nVal = (long)mpLeftIndent->Normalize( (long)nVal );
- mpLeftIndent->SetValue( nVal, FUNIT_100TH_MM );
if ( maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Text)
&& maContext.GetCombinedContext_DI() != CombinedEnumContext(Application_WriterVariants, Context_Default)
@@ -579,11 +578,6 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat
long nrVal = OutputDevice::LogicToLogic( aTxtRight, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
nrVal = (long)mpRightIndent->Normalize( (long)nrVal );
- mpRightIndent->SetValue( nrVal, FUNIT_100TH_MM );
-
- long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
- nfVal = (long)mpFLineIndent->Normalize( (long)nfVal );
- mpFLineIndent->SetValue( nfVal, FUNIT_100TH_MM );
switch (maContext.GetCombinedContext_DI())
{
@@ -610,6 +604,13 @@ void ParaPropertyPanel::StateChangedIndentImpl( sal_uInt16 /*nSID*/, SfxItemStat
}
}
+ mpLeftIndent->SetValue( nVal, FUNIT_100TH_MM );
+ mpRightIndent->SetValue( nrVal, FUNIT_100TH_MM );
+
+ long nfVal = OutputDevice::LogicToLogic( aTxtFirstLineOfst, (MapUnit)(SFX_MAPUNIT_TWIP), MAP_100TH_MM );
+ nfVal = (long)mpFLineIndent->Normalize( (long)nfVal );
+ mpFLineIndent->SetValue( nfVal, FUNIT_100TH_MM );
+
mpTbxIndent_IncDec->Enable();
const sal_uInt16 nIdIncrIndent = mpTbxIndent_IncDec->GetItemId(UNO_INCREMENTINDENT);
@@ -843,6 +844,7 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent,
get(mpTbxUL_IncDec, "paraspacing");
initial();
+ m_aMetricCtl.RequestUpdate();
}
} } // end of namespace svx::sidebar
More information about the Libreoffice-commits
mailing list