Kaydet (Commit) 07f4021c authored tarafından Michael Stahl's avatar Michael Stahl

move some functions from tblrwcl.hxx into cxx files

üst 1df74354
...@@ -336,7 +336,9 @@ struct _GCLinePara ...@@ -336,7 +336,9 @@ struct _GCLinePara
{} {}
}; };
sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara ) static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void*const pPara);
static bool lcl_MergeGCBox(const SwTableBox*& rpTblBox, void*const pPara)
{ {
SwTableBox*& rpBox = (SwTableBox*&)rpTblBox; SwTableBox*& rpBox = (SwTableBox*&)rpTblBox;
sal_uInt16 n, nLen = rpBox->GetTabLines().Count(); sal_uInt16 n, nLen = rpBox->GetTabLines().Count();
...@@ -364,13 +366,13 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara ) ...@@ -364,13 +366,13 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
// Delete the old Box with the Line // Delete the old Box with the Line
pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos ); pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos );
return sal_False; // set up anew return false; // set up anew
} }
} }
return sal_True; return true;
} }
sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara ) static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void *const pPara)
{ {
SwTableLine* pLn = (SwTableLine*)rpLine; SwTableLine* pLn = (SwTableLine*)rpLine;
sal_uInt16 nLen = pLn->GetTabBoxes().Count(); sal_uInt16 nLen = pLn->GetTabBoxes().Count();
...@@ -431,7 +433,7 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara ) ...@@ -431,7 +433,7 @@ sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara )
if( !lcl_MergeGCBox( *(pLn->GetTabBoxes().GetData() + nLen ), pPara )) if( !lcl_MergeGCBox( *(pLn->GetTabBoxes().GetData() + nLen ), pPara ))
--nLen; --nLen;
} }
return sal_True; return true;
} }
// Clean structure a bit // Clean structure a bit
......
...@@ -326,7 +326,9 @@ struct _CpyPara ...@@ -326,7 +326,9 @@ struct _CpyPara
void SetBoxWidth( SwTableBox* pBox ); void SetBoxWidth( SwTableBox* pBox );
}; };
sal_Bool lcl_CopyCol( _FndBox & rFndBox, _CpyPara* pCpyPara ) static void lcl_CopyRow(_FndLine & rFndLine, _CpyPara *const pCpyPara);
static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara)
{ {
// Look up the Frame Format in the Frame Format Array // Look up the Frame Format in the Frame Format Array
SwTableBox* pBox = rFndBox.GetBox(); SwTableBox* pBox = rFndBox.GetBox();
...@@ -452,10 +454,9 @@ sal_Bool lcl_CopyCol( _FndBox & rFndBox, _CpyPara* pCpyPara ) ...@@ -452,10 +454,9 @@ sal_Bool lcl_CopyCol( _FndBox & rFndBox, _CpyPara* pCpyPara )
} }
} }
} }
return sal_True;
} }
sal_Bool lcl_CopyRow( _FndLine& rFndLine, _CpyPara* pCpyPara ) static void lcl_CopyRow(_FndLine& rFndLine, _CpyPara *const pCpyPara)
{ {
SwTableLine* pNewLine = new SwTableLine( SwTableLine* pNewLine = new SwTableLine(
(SwTableLineFmt*)rFndLine.GetLine()->GetFrmFmt(), (SwTableLineFmt*)rFndLine.GetLine()->GetFrmFmt(),
...@@ -478,7 +479,6 @@ sal_Bool lcl_CopyRow( _FndLine& rFndLine, _CpyPara* pCpyPara ) ...@@ -478,7 +479,6 @@ sal_Bool lcl_CopyRow( _FndLine& rFndLine, _CpyPara* pCpyPara )
} }
pCpyPara->nDelBorderFlag &= 0xf8; pCpyPara->nDelBorderFlag &= 0xf8;
return sal_True;
} }
void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt, void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, sal_uInt16 nCpyCnt,
...@@ -1484,7 +1484,9 @@ struct _InsULPara ...@@ -1484,7 +1484,9 @@ struct _InsULPara
{ bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; } { bUL_LR = sal_True; bUL = sal_False; if( pLine ) pInsLine = pLine; }
}; };
sal_Bool lcl_Merge_MoveBox( _FndBox & rFndBox, _InsULPara* pULPara ) static void lcl_Merge_MoveLine(_FndLine & rFndLine, _InsULPara *const pULPara);
static void lcl_Merge_MoveBox(_FndBox & rFndBox, _InsULPara *const pULPara)
{ {
SwTableBoxes* pBoxes; SwTableBoxes* pBoxes;
...@@ -1543,10 +1545,9 @@ sal_Bool lcl_Merge_MoveBox( _FndBox & rFndBox, _InsULPara* pULPara ) ...@@ -1543,10 +1545,9 @@ sal_Bool lcl_Merge_MoveBox( _FndBox & rFndBox, _InsULPara* pULPara )
else else
delete pBox; delete pBox;
} }
return sal_True;
} }
sal_Bool lcl_Merge_MoveLine( _FndLine& rFndLine, _InsULPara* pULPara ) static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
{ {
SwTableLines* pLines; SwTableLines* pLines;
...@@ -1722,8 +1723,6 @@ sal_Bool lcl_Merge_MoveLine( _FndLine& rFndLine, _InsULPara* pULPara ) ...@@ -1722,8 +1723,6 @@ sal_Bool lcl_Merge_MoveLine( _FndLine& rFndLine, _InsULPara* pULPara )
} }
else else
delete pNewLine; delete pNewLine;
return sal_True;
} }
sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
...@@ -1981,7 +1980,10 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara ) ...@@ -1981,7 +1980,10 @@ void lcl_CalcNewWidths( const _FndLines& rFndLines, _CpyPara& rPara )
} }
} }
sal_Bool lcl_CopyBoxToDoc( _FndBox const& rFndBox, _CpyPara *const pCpyPara ) static void
lcl_CopyLineToDoc(_FndLine const& rpFndLn, _CpyPara *const pCpyPara);
static void lcl_CopyBoxToDoc(_FndBox const& rFndBox, _CpyPara *const pCpyPara)
{ {
// Calculation of new size // Calculation of new size
sal_uLong nRealSize; sal_uLong nRealSize;
...@@ -2103,10 +2105,10 @@ sal_Bool lcl_CopyBoxToDoc( _FndBox const& rFndBox, _CpyPara *const pCpyPara ) ...@@ -2103,10 +2105,10 @@ sal_Bool lcl_CopyBoxToDoc( _FndBox const& rFndBox, _CpyPara *const pCpyPara )
} }
} }
while( nSize ); while( nSize );
return sal_True;
} }
sal_Bool lcl_CopyLineToDoc( const _FndLine& rFndLine, _CpyPara* pCpyPara ) static void
lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara)
{ {
// Find the Frame Format in the list of all Frame Formats // Find the Frame Format in the list of all Frame Formats
_CpyTabFrm aFindFrm( (SwTableBoxFmt*)rFndLine.GetLine()->GetFrmFmt() ); _CpyTabFrm aFindFrm( (SwTableBoxFmt*)rFndLine.GetLine()->GetFrmFmt() );
...@@ -2165,7 +2167,6 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine& rFndLine, _CpyPara* pCpyPara ) ...@@ -2165,7 +2167,6 @@ sal_Bool lcl_CopyLineToDoc( const _FndLine& rFndLine, _CpyPara* pCpyPara )
lcl_CopyBoxToDoc(*it, &aPara); lcl_CopyBoxToDoc(*it, &aPara);
if( pCpyPara->pTblNd->GetTable().IsNewModel() ) if( pCpyPara->pTblNd->GetTable().IsNewModel() )
++pCpyPara->nLnIdx; ++pCpyPara->nLnIdx;
return sal_True;
} }
sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd ) sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
......
...@@ -50,17 +50,6 @@ class SwFmtFrmSize; ...@@ -50,17 +50,6 @@ class SwFmtFrmSize;
class _CpyPara; class _CpyPara;
class _InsULPara; class _InsULPara;
sal_Bool lcl_CopyRow(_FndLine& rFndLine, _CpyPara* pCpyPara);
sal_Bool lcl_MergeGCBox( const SwTableBox*& rpBox, void* pPara );
sal_Bool lcl_MergeGCLine( const SwTableLine*& rpLine, void* pPara );
sal_Bool lcl_Merge_MoveBox(_FndBox & rFndBox, _InsULPara* pULPara);
sal_Bool lcl_Merge_MoveLine(_FndLine & rFndLine, _InsULPara* pULPara);
sal_Bool lcl_CopyBoxToDoc( const _FndBox*& rpFndBox, void* pPara );
sal_Bool lcl_CopyLineToDoc( const _FndLine& rpFndLn, _CpyPara* pPara );
sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara ); sal_Bool lcl_BoxSetHeadCondColl( const SwTableBox*& rpBox, void* pPara );
sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara ); sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* pPara );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment