diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-11-26 22:26:39 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-11-26 22:50:25 +0200 |
commit | 9a410f9cedbce5276aea48479812ff68210712b0 (patch) | |
tree | 652ac25d0cef5653cd8c873ac0ef9fe77a5fb6e1 | |
parent | 3e1dc286891e7542f66ddc4ac407556a5aedc9e3 (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
-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 d7828c4795a0..e6949e41339a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -563,7 +563,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) @@ -574,11 +573,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()) { @@ -605,6 +599,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); @@ -823,6 +824,7 @@ ParaPropertyPanel::ParaPropertyPanel(vcl::Window* pParent, get(mpTbxUL_IncDec, "paraspacing"); initial(); + m_aMetricCtl.RequestUpdate(); } } } // end of namespace svx::sidebar |