diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-04-02 17:20:26 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-04-02 22:08:54 +0200 |
commit | b2a20dad907bfd6ca14847d548b44ad8b9ee5321 (patch) | |
tree | 0245edfcd728565e8be448324db95d35782cfdee | |
parent | filter-showIncludes.pl: Attempt to prevent creating incomplete .d files. (diff) | |
download | core-b2a20dad907bfd6ca14847d548b44ad8b9ee5321.tar.gz core-b2a20dad907bfd6ca14847d548b44ad8b9ee5321.zip |
show synchronized checked only if all margins are the same, related fdo#44337
(cherry picked from commit 149650b087ab5b15ef23e4ac6af5368b2820af1e)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | cui/source/inc/border.hxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/border.cxx | 15 |
2 files changed, 10 insertions, 8 deletions
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index 7766ec92fcd2..ecb6c9ea46f0 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -125,8 +125,7 @@ private: bool mbTLBREnabled; /// true = Top-left to bottom-right border enabled. bool mbBLTREnabled; /// true = Bottom-left to top-right border enabled. bool mbUseMarginItem; - - static sal_Bool bSync; + bool mbSync; #ifdef _SVX_BORDER_CXX // Handler diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index d6c474f7c247..709d04b7af06 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( SvxBorderTabPage, LinesChanged_Impl, void*, EMPTYARG ) 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; } |