[Libreoffice-commits] .: 2 commits - cui/source sc/source
Markus Mohrhard
mmohrhard at kemper.freedesktop.org
Mon Apr 2 08:29:27 PDT 2012
cui/source/inc/border.hxx | 3 +--
cui/source/tabpages/border.cxx | 15 +++++++++------
sc/source/core/data/docpool.cxx | 5 +----
3 files changed, 11 insertions(+), 12 deletions(-)
New commits:
commit 149650b087ab5b15ef23e4ac6af5368b2820af1e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 2 17:20:26 2012 +0200
show synchronized checked only if all margins are the same, related fdo#44337
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index 7766ec9..ecb6c9e 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 390d60a..fd9c63c 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;
}
commit 843dd3f75e4d35b8ae5fd3be6804e54233292948
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 2 17:23:46 2012 +0200
this hack in no longer needed, fdo#44337
excel import now uses the stored row height and we should go back to a
symetric default margin
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 3061856..36f0d3b 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -275,10 +275,7 @@ ScDocumentPool::ScDocumentPool( SfxItemPool* pSecPool, sal_Bool bLoadRefCounts )
ppPoolDefaults[ ATTR_SHRINKTOFIT - ATTR_STARTINDEX ] = new SfxBoolItem( ATTR_SHRINKTOFIT );
ppPoolDefaults[ ATTR_BORDER_TLBR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_TLBR );
ppPoolDefaults[ ATTR_BORDER_BLTR - ATTR_STARTINDEX ] = new SvxLineItem( ATTR_BORDER_BLTR );
- SvxMarginItem* pItem = new SvxMarginItem( ATTR_MARGIN );
- pItem->SetTopMargin( 27 );
- pItem->SetBottomMargin( 27 );
- ppPoolDefaults[ ATTR_MARGIN - ATTR_STARTINDEX ] = pItem;
+ ppPoolDefaults[ ATTR_MARGIN - ATTR_STARTINDEX ] = new SvxMarginItem( ATTR_MARGIN );
ppPoolDefaults[ ATTR_MERGE - ATTR_STARTINDEX ] = new ScMergeAttr;
ppPoolDefaults[ ATTR_MERGE_FLAG - ATTR_STARTINDEX ] = new ScMergeFlagAttr;
ppPoolDefaults[ ATTR_VALUE_FORMAT - ATTR_STARTINDEX ] = new SfxUInt32Item( ATTR_VALUE_FORMAT, 0 );
More information about the Libreoffice-commits
mailing list