diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-11-26 22:26:39 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-11-27 16:09:32 +0200 |
commit | 16bfe15d9175f52030bcb1265f8f48728786f910 (patch) | |
tree | 518ac0ad6a51f958359d5c4a6ee6a1040a0733e7 /svx | |
parent | e678a333c1f4a7a1bf8594d888938e598ed2f6a1 (diff) |
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)
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 2867a5ce43fc..0cfc697282e7 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 |