summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ivan <alexnivan@yahoo.com>2013-07-15 19:13:14 +0300
committerAlex Ivan <alexnivan@yahoo.com>2013-07-15 19:13:14 +0300
commita52ce17f99cabca41d55404e63cd7717bc2bd8ab (patch)
treea720d6510c5fda82160a0695ce61bc02f7cd5214
parent391b96732815ca6eafca698b5a4f03bac5677c81 (diff)
Removed no longer used helper functions
lcl_SetAFmtBox/Line helper functions and structure _SetAFmtTabPara have been removed since they are no longer used because table styles are now stored in order to get the relevant properties at render time. Change-Id: I8a6824d30f9cfd997ac29b94638cdc37400f7976
-rw-r--r--sw/source/core/docnode/ndtbl.cxx83
1 files changed, 0 insertions, 83 deletions
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index d6a16fdac2ce..6e38a77297fa 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3468,89 +3468,6 @@ sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
}
-// Use the PtrArray's ForEach method
-struct _SetAFmtTabPara
-{
- SwTableAutoFmt& rTblFmt;
- SwUndoTblAutoFmt* pUndo;
- sal_uInt16 nEndBox, nCurBox;
- sal_uInt8 nAFmtLine, nAFmtBox;
-
- _SetAFmtTabPara( const SwTableAutoFmt& rNew )
- : rTblFmt( (SwTableAutoFmt&)rNew ), pUndo( 0 ),
- nEndBox( 0 ), nCurBox( 0 ), nAFmtLine( 0 ), nAFmtBox( 0 )
- {}
-};
-
-// Forward declare so that the Lines and Boxes can use recursion
-static bool lcl_SetAFmtBox(_FndBox &, _SetAFmtTabPara *pSetPara);
-static bool lcl_SetAFmtLine(_FndLine &, _SetAFmtTabPara *pPara);
-
-static bool lcl_SetAFmtLine(_FndLine & rLine, _SetAFmtTabPara *pPara)
-{
- for (_FndBoxes::iterator it = rLine.GetBoxes().begin();
- it != rLine.GetBoxes().end(); ++it)
- {
- lcl_SetAFmtBox(*it, pPara);
- }
- return true;
-}
-
-static bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara )
-{
- if (!rBox.GetUpper()->GetUpper()) // Box on first level?
- {
- if( !pSetPara->nCurBox )
- pSetPara->nAFmtBox = 0;
- else if( pSetPara->nCurBox == pSetPara->nEndBox )
- pSetPara->nAFmtBox = 3;
- else
- pSetPara->nAFmtBox = (sal_uInt8)(1 + ((pSetPara->nCurBox-1) & 1));
- }
-
- if (rBox.GetBox()->GetSttNd())
- {
- SwTableBox* pSetBox = static_cast<SwTableBox*>(rBox.GetBox());
- SwDoc* pDoc = pSetBox->GetFrmFmt()->GetDoc();
- SfxItemSet aCharSet( pDoc->GetAttrPool(), RES_CHRATR_BEGIN, RES_PARATR_LIST_END-1 );
- SfxItemSet aBoxSet( pDoc->GetAttrPool(), aTableBoxSetRange );
- sal_uInt8 nPos = pSetPara->nAFmtLine * 4 + pSetPara->nAFmtBox;
- pSetPara->rTblFmt.UpdateToSet( nPos, aCharSet,
- SwTableAutoFmt::UPDATE_CHAR, 0 );
- pSetPara->rTblFmt.UpdateToSet( nPos, aBoxSet,
- SwTableAutoFmt::UPDATE_BOX,
- pDoc->GetNumberFormatter( sal_True ) );
- if( aCharSet.Count() )
- {
- sal_uLong nSttNd = pSetBox->GetSttIdx()+1;
- sal_uLong nEndNd = pSetBox->GetSttNd()->EndOfSectionIndex();
- for( ; nSttNd < nEndNd; ++nSttNd )
- {
- SwCntntNode* pNd = pDoc->GetNodes()[ nSttNd ]->GetCntntNode();
- if( pNd )
- pNd->SetAttr( aCharSet );
- }
- }
-
- if( aBoxSet.Count() )
- {
- if( pSetPara->pUndo &&
- SFX_ITEM_SET == aBoxSet.GetItemState( RES_BOXATR_FORMAT ))
- pSetPara->pUndo->SaveBoxCntnt( *pSetBox );
-
- pSetBox->ClaimFrmFmt()->SetFmtAttr( aBoxSet );
- }
- }
- else
- BOOST_FOREACH( _FndLine& rFndLine, rBox.GetLines() )
- lcl_SetAFmtLine( rFndLine, pSetPara );
-
- if (!rBox.GetUpper()->GetUpper()) // a BaseLine
- ++pSetPara->nCurBox;
- return true;
-}
-
-
/**
* AutoFormat for the Table/TableSelection
*/