summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-09-12 15:58:47 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-09-12 15:58:47 +0300
commitd78e8d25c190f8a73f5d43e68ba99177e914c313 (patch)
tree622f5bf54c464cc54e25a4329f655aacac956f39
parent475762597529e621ce8abfe967ab802231cabe83 (diff)
Remove boolean members from SwTableAutoFmt
Remove members made obsolete by previous patch. As a side-effect, the checkboxes in the AutoFormat dialog which selected what properties from the style to apply no longer have any effect. Should not be a problem, since the dialog will have to be reworked anyway. Change-Id: Ib5f19808ca90187007f13c1c8c65e003fe6c715f
-rw-r--r--sw/inc/tblafmt.hxx17
-rw-r--r--sw/source/core/doc/tblafmt.cxx34
-rw-r--r--sw/source/ui/table/tautofmt.cxx18
3 files changed, 14 insertions, 55 deletions
diff --git a/sw/inc/tblafmt.hxx b/sw/inc/tblafmt.hxx
index d91225139c6b..a4a330a13c81 100644
--- a/sw/inc/tblafmt.hxx
+++ b/sw/inc/tblafmt.hxx
@@ -112,16 +112,6 @@ class SW_DLLPUBLIC SwTableAutoFmt
SwTableFmt* m_pTableStyle;
sal_uInt16 nStrResId;
- // Common flags of Calc and Writer.
- sal_Bool bInclFont : 1;
- sal_Bool bInclJustify : 1;
- sal_Bool bInclFrame : 1;
- sal_Bool bInclBackground : 1;
- sal_Bool bInclValueFormat : 1;
-
- // Calc specific flags.
- sal_Bool bInclWidthHeight : 1;
-
public:
SwTableAutoFmt( const String& rName, SwTableFmt* pTableStyle );
SwTableAutoFmt( const SwTableAutoFmt& rNew );
@@ -152,13 +142,6 @@ public:
sal_Bool IsBackground() const { return m_pTableStyle->IsBackground(); }
sal_Bool IsValueFormat() const { return m_pTableStyle->IsValueFormat(); }
- void SetFont( const sal_Bool bNew ) { bInclFont = bNew; }
- void SetJustify( const sal_Bool bNew ) { bInclJustify = bNew; }
- void SetFrame( const sal_Bool bNew ) { bInclFrame = bNew; }
- void SetBackground( const sal_Bool bNew ) { bInclBackground = bNew; }
- void SetValueFormat( const sal_Bool bNew ) { bInclValueFormat = bNew; }
- void SetWidthHeight( const sal_Bool bNew ) { bInclWidthHeight = bNew; }
-
static SwTableAutoFmt* Load( SvStream& rStream, const SwAfVersions&, SwDoc* pDoc );
sal_Bool Save( SvStream& rStream, sal_uInt16 fileVersion ) const;
};
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 5ec240bc2bc0..426f0e6fc455 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -553,13 +553,6 @@ SwTableAutoFmt::SwTableAutoFmt( const String& rName, SwTableFmt* pTableStyle )
: m_pTableStyle( pTableStyle )
, nStrResId( USHRT_MAX )
{
- bInclFont = sal_True;
- bInclJustify = sal_True;
- bInclFrame = sal_True;
- bInclBackground = sal_True;
- bInclValueFormat = sal_True;
- bInclWidthHeight = sal_True;
-
m_pTableStyle->SetName( rName );
}
@@ -576,12 +569,6 @@ SwTableAutoFmt& SwTableAutoFmt::operator=( const SwTableAutoFmt& rNew )
m_pTableStyle = rNew.m_pTableStyle;
nStrResId = rNew.nStrResId;
- bInclFont = rNew.bInclFont;
- bInclJustify = rNew.bInclJustify;
- bInclFrame = rNew.bInclFrame;
- bInclBackground = rNew.bInclBackground;
- bInclValueFormat = rNew.bInclValueFormat;
- bInclWidthHeight = rNew.bInclWidthHeight;
return *this;
}
@@ -851,12 +838,14 @@ SwTableAutoFmt* SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVe
pRet->nStrResId = nStrResId;
- rStream >> b; pRet->bInclFont = b;
- rStream >> b; pRet->bInclJustify = b;
- rStream >> b; pRet->bInclFrame = b;
- rStream >> b; pRet->bInclBackground = b;
- rStream >> b; pRet->bInclValueFormat = b;
- rStream >> b; pRet->bInclWidthHeight = b;
+ // No longer needed, but still read to not misread other data
+ rStream >> b;
+ rStream >> b;
+ rStream >> b;
+ rStream >> b;
+ rStream >> b;
+ rStream >> b;
+ // <- close
bRet = pStyle->Load( rStream, rVersions, pDoc, nVal );
}
@@ -871,18 +860,11 @@ SwTableAutoFmt* SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVe
sal_Bool SwTableAutoFmt::Save( SvStream& rStream, sal_uInt16 fileVersion ) const
{
sal_uInt16 nVal = AUTOFORMAT_DATA_ID;
- sal_Bool b;
rStream << nVal;
// --- from 680/dr25 on: store strings as UTF-8
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rStream, GetName(),
RTL_TEXTENCODING_UTF8 );
rStream << nStrResId;
- rStream << ( b = bInclFont );
- rStream << ( b = bInclJustify );
- rStream << ( b = bInclFrame );
- rStream << ( b = bInclBackground );
- rStream << ( b = bInclValueFormat );
- rStream << ( b = bInclWidthHeight );
{
WriterSpecificAutoFormatBlock block(rStream);
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx
index dc68eb2b65e0..41297480a8b1 100644
--- a/sw/source/ui/table/tautofmt.cxx
+++ b/sw/source/ui/table/tautofmt.cxx
@@ -255,18 +255,18 @@ void SwAutoFormatDlg::FillAutoFmtOfIndex( SwTableAutoFmt*& rToFill ) const
IMPL_LINK( SwAutoFormatDlg, CheckHdl, Button *, pBtn )
{
SwTableAutoFmt* pData = &(*pTableTbl)[nIndex];
- sal_Bool bCheck = ((CheckBox*)pBtn)->IsChecked(), bDataChgd = sal_True;
+ sal_Bool bDataChgd = sal_True;
if( pBtn == m_pBtnNumFormat )
- pData->SetValueFormat( bCheck );
+ ;
else if ( pBtn == m_pBtnBorder )
- pData->SetFrame( bCheck );
+ ;
else if ( pBtn == m_pBtnFont )
- pData->SetFont( bCheck );
+ ;
else if ( pBtn == m_pBtnPattern )
- pData->SetBackground( bCheck );
+ ;
else if ( pBtn == m_pBtnAlignment )
- pData->SetJustify( bCheck );
+ ;
else
bDataChgd = sal_False;
@@ -479,12 +479,6 @@ IMPL_LINK_NOARG(SwAutoFormatDlg, SelFmtHdl)
if ( !pStyle )
pStyle = pShell->GetDoc()->MakeTblFrmFmt(sNm, NULL);
SwTableAutoFmt aTmp( sNm, pStyle );
- aTmp.SetFont( sal_False );
- aTmp.SetJustify( sal_False );
- aTmp.SetFrame( sal_False );
- aTmp.SetBackground( sal_False );
- aTmp.SetValueFormat( sal_False );
- aTmp.SetWidthHeight( sal_False );
if( nOldIdx != nIndex )
m_pWndPreview->NotifyChange( *(SwTableAutoFmt*)0 );