diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-02 17:20:26 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-02 17:29:27 +0200 |
commit | 149650b087ab5b15ef23e4ac6af5368b2820af1e (patch) | |
tree | 0d2ce6d57cf1fca68ea4660df373d29525c7a583 /cui/source/tabpages | |
parent | 843dd3f75e4d35b8ae5fd3be6804e54233292948 (diff) |
show synchronized checked only if all margins are the same, related fdo#44337
Diffstat (limited to 'cui/source/tabpages')
-rw-r--r-- | cui/source/tabpages/border.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 390d60ad4530..fd9c63c74cab 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -86,8 +86,6 @@ static sal_uInt16 pRanges[] = 0 }; -sal_Bool SvxBorderTabPage::bSync = sal_True; - // ----------------------------------------------------------------------- void lcl_SetDecimalDigitsTo1(MetricField& rField) { @@ -147,7 +145,8 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, mbVerEnabled( false ), mbTLBREnabled( false ), mbBLTREnabled( false ), - mbUseMarginItem( false ) + mbUseMarginItem( false ), + mbSync(true) { // diese Page braucht ExchangeSupport @@ -217,7 +216,6 @@ SvxBorderTabPage::SvxBorderTabPage( Window* pParent, SetFieldUnit(aRightMF, eFUnit); SetFieldUnit(aTopMF, eFUnit); SetFieldUnit(aBottomMF, eFUnit); - aSynchronizeCB.Check(bSync); aSynchronizeCB.SetClickHdl(LINK(this, SvxBorderTabPage, SyncHdl_Impl)); aLeftMF.SetModifyHdl(LINK(this, SvxBorderTabPage, ModifyDistanceHdl_Impl)); aRightMF.SetModifyHdl(LINK(this, SvxBorderTabPage, ModifyDistanceHdl_Impl)); @@ -571,6 +569,11 @@ void SvxBorderTabPage::Reset( const SfxItemSet& rSet ) } LinesChanged_Impl( 0 ); + if(aLeftMF.GetValue() == aRightMF.GetValue() && aTopMF.GetValue() == aBottomMF.GetValue() && aTopMF.GetValue() == aLeftMF.GetValue()) + mbSync = true; + else + mbSync = false; + aSynchronizeCB.Check(mbSync); } // ----------------------------------------------------------------------- @@ -1153,7 +1156,7 @@ IMPL_LINK_NOARG(SvxBorderTabPage, LinesChanged_Impl) IMPL_LINK( SvxBorderTabPage, ModifyDistanceHdl_Impl, MetricField*, pField) { - if ( bSync ) + if ( mbSync ) { sal_Int64 nVal = pField->GetValue(); if(pField != &aLeftMF) @@ -1170,7 +1173,7 @@ IMPL_LINK( SvxBorderTabPage, ModifyDistanceHdl_Impl, MetricField*, pField) IMPL_LINK( SvxBorderTabPage, SyncHdl_Impl, CheckBox*, pBox) { - bSync = pBox->IsChecked(); + mbSync = pBox->IsChecked(); return 0; } |