summaryrefslogtreecommitdiff
path: root/sw/source/core/docnode
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/docnode')
-rw-r--r--sw/source/core/docnode/ndsect.cxx12
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx12
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/docnode/nodes.cxx15
-rw-r--r--sw/source/core/docnode/section.cxx6
6 files changed, 28 insertions, 27 deletions
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 9bb5888dad8d..5f7b6df7aba1 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -84,7 +84,7 @@ static bool lcl_IsInSameTblBox( SwNodes& _rNds,
do
{
if ( _bPrev
- ? !_rNds.GoPrevSection( &aChkIdx, false, false )
+ ? !SwNodes::GoPrevSection( &aChkIdx, false, false )
: !_rNds.GoNextSection( &aChkIdx, false, false ) )
{
OSL_FAIL( "<lcl_IsInSameTblBox(..)> - no previous/next!" );
@@ -134,7 +134,7 @@ static void lcl_CheckEmptyLayFrm( SwNodes& rNds, SwSectionData& rSectionData,
const SwNode& rStt, const SwNode& rEnd )
{
SwNodeIndex aIdx( rStt );
- if( !rNds.GoPrevSection( &aIdx, true, false ) ||
+ if( !SwNodes::GoPrevSection( &aIdx, true, false ) ||
!CheckNodesRange( rStt, aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, rStt, true ))
@@ -386,7 +386,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData,
}
sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
- const SwNode** ppSttNd ) const
+ const SwNode** ppSttNd )
{
sal_uInt16 nRet = 1;
if( rRange.HasMark() )
@@ -498,7 +498,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange,
return nRet;
}
-SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) const
+SwSection* SwDoc::GetCurrSection( const SwPosition& rPos )
{
const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode();
if( pSectNd )
@@ -1067,7 +1067,7 @@ void SwSectionNode::MakeFrms(const SwNodeIndex & rIdx )
if( !pCNd )
{
aIdx = *this;
- pCNd = rNds.GoPrevSection(&aIdx, true, false);
+ pCNd = SwNodes::GoPrevSection(&aIdx, true, false);
if (!pCNd)
return;
}
@@ -1203,7 +1203,7 @@ void SwSectionNode::DelFrms()
// Or else the Fly/TblBox Frame does not have a Lower!
{
SwNodeIndex aIdx( *this );
- if( !rNds.GoPrevSection( &aIdx, true, false ) ||
+ if( !SwNodes::GoPrevSection( &aIdx, true, false ) ||
!CheckNodesRange( *this, aIdx, true ) ||
// #i21457#
!lcl_IsInSameTblBox( rNds, *this, true ))
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 78afb54d14d2..208aefcbdb25 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -381,7 +381,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
pCntntNd (aka the node the table is inserted at) thus causing
SwNodes::InsertTable to propagate an adjust item if
necessary. */
- SwTableNode *pTblNd = GetNodes().InsertTable(
+ SwTableNode *pTblNd = SwNodes::InsertTable(
rPos.nNode,
nCols,
pBodyColl,
@@ -2457,7 +2457,7 @@ void SwTableNode::RemoveRedlines()
}
void SwDoc::GetTabCols( SwTabCols &rFill, const SwCursor* pCrsr,
- const SwCellFrm* pBoxFrm ) const
+ const SwCellFrm* pBoxFrm )
{
const SwTableBox* pBox = 0;
SwTabFrm *pTab = 0;
@@ -2535,7 +2535,7 @@ static bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
}
void SwDoc::GetTabRows( SwTabCols &rFill, const SwCursor* ,
- const SwCellFrm* pBoxFrm ) const
+ const SwCellFrm* pBoxFrm )
{
OSL_ENSURE( pBoxFrm, "GetTabRows called without pBoxFrm" );
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 25705e22922b..fe857d4f538a 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -316,7 +316,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFmtRowSplit &rNew )
}
}
-void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz ) const
+void SwDoc::GetRowSplit( const SwCursor& rCursor, SwFmtRowSplit *& rpSz )
{
rpSz = 0;
@@ -388,7 +388,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFmtFrmSize &rNew )
}
}
-void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz ) const
+void SwDoc::GetRowHeight( const SwCursor& rCursor, SwFmtFrmSize *& rpSz )
{
rpSz = 0;
@@ -493,7 +493,7 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew
}
}
-bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill ) const
+bool SwDoc::GetRowBackground( const SwCursor& rCursor, SvxBrushItem &rToFill )
{
bool bRet = false;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
@@ -905,7 +905,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
}
}
-void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
+void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
{
SwCntntNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetCntntNode();
SwTableNode* pTblNd = pCntNd ? pCntNd->FindTableNode() : 0;
@@ -1170,7 +1170,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
}
}
-bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) const
+bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill )
{
bool bRet = false;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
@@ -1228,7 +1228,7 @@ void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign )
SetBoxAttr( rCursor, aVertOri );
}
-sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
+sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor )
{
sal_uInt16 nAlign = USHRT_MAX;
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 5810b1e1145d..7ad39abd8184 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -370,7 +370,7 @@ bool SwNode::IsInVisibleArea( SwViewShell const * pSh ) const
else if( ND_ENDNODE & nNodeType )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
- pNd = GetNodes().GoPrevious( &aIdx );
+ pNd = SwNodes::GoPrevious( &aIdx );
}
else
pNd = GetCntntNode();
@@ -472,7 +472,7 @@ const SwPageDesc* SwNode::FindPageDesc( bool bCalcLay,
else if( ND_ENDNODE & nNodeType )
{
SwNodeIndex aIdx( *EndOfSectionNode() );
- pNode = GetNodes().GoPrevious( &aIdx );
+ pNode = SwNodes::GoPrevious( &aIdx );
}
else
{
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 08068945af12..25f94bf74fc6 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -364,7 +364,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, sal_uLong nSz,
{
OSL_ENSURE( false, "here, something wrong happened" );
aFrmNdIdx = rNds.GetEndOfContent();
- pFrmNd = rNds.GoPrevSection( &aFrmNdIdx, true, false );
+ pFrmNd = SwNodes::GoPrevSection( &aFrmNdIdx, true, false );
if( pFrmNd && !static_cast<SwCntntNode*>(pFrmNd)->HasWriterListeners() )
pFrmNd = 0;
OSL_ENSURE( pFrmNd, "ChgNode() - no FrameNode found" );
@@ -1248,14 +1248,15 @@ void SwNodes::Delete(const SwNodeIndex &rIndex, sal_uLong nNodes)
* @param rIdx position of the node
* @return section level at the given position
*/
-sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx) const {
+sal_uInt16 SwNodes::GetSectionLevel(const SwNodeIndex &rIdx)
+{
// special treatment for 1st Node
if(rIdx == 0) return 1;
// no recursion! This calles a SwNode::GetSectionLevel (missing "s")
return rIdx.GetNode().GetSectionLevel();
}
-void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) const
+void SwNodes::GoStartOfSection(SwNodeIndex *pIdx)
{
// after the next start node
SwNodeIndex aTmp( *pIdx->GetNode().StartOfSectionNode(), +1 );
@@ -1273,7 +1274,7 @@ void SwNodes::GoStartOfSection(SwNodeIndex *pIdx) const
(*pIdx) = aTmp; // is on a ContentNode
}
-void SwNodes::GoEndOfSection(SwNodeIndex *pIdx) const
+void SwNodes::GoEndOfSection(SwNodeIndex *pIdx)
{
if( !pIdx->GetNode().IsEndNode() )
(*pIdx) = *pIdx->GetNode().EndOfSectionNode();
@@ -1296,7 +1297,7 @@ SwCntntNode* SwNodes::GoNext(SwNodeIndex *pIdx) const
return static_cast<SwCntntNode*>(pNd);
}
-SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) const
+SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx)
{
if( !pIdx->GetIndex() )
return 0;
@@ -1434,7 +1435,7 @@ static bool lcl_HighestLevel( const SwNodePtr& rpNode, void * pPara )
*/
sal_uInt16 HighestLevel( SwNodes & rNodes, const SwNodeRange & rRange )
{
- HighLevel aPara( rNodes.GetSectionLevel( rRange.aStart ));
+ HighLevel aPara( SwNodes::GetSectionLevel( rRange.aStart ));
rNodes.ForEach( rRange.aStart, rRange.aEnd, lcl_HighestLevel, &aPara );
return aPara.nTop;
@@ -1981,7 +1982,7 @@ SwCntntNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
///@see SwNodes::GoNextSection (TODO: seems to be C&P programming here)
SwCntntNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
- bool bSkipHidden, bool bSkipProtect ) const
+ bool bSkipHidden, bool bSkipProtect )
{
bool bFirst = true;
SwNodeIndex aTmp( *pIdx );
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index a5707dc74a97..e993c42204a3 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -651,7 +651,7 @@ SwSectionFmt::~SwSectionFmt()
// If it was a linked Section, we need to make all Child Links
// visible again
if( rSect.IsConnected() )
- rSect.MakeChildLinksVisible( *pSectNd );
+ SwSection::MakeChildLinksVisible( *pSectNd );
// Check whether we need to be visible, before deleting the Nodes
if( rSect.IsHiddenFlag() )
@@ -1228,7 +1228,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
SwPosition aPos( aIdx, SwIndex( pNewNd, 0 ));
--aPos.nNode;
- pDoc->CorrAbs( aIdx, aEndIdx, aPos, true );
+ SwDoc::CorrAbs( aIdx, aEndIdx, aPos, true );
pPam = new SwPaM( aPos );
@@ -1485,7 +1485,7 @@ void SwIntrnlSectRefLink::Closed()
// Make all Links within the Section visible again
SwSectionNode* pSectNd = rSectFmt.GetSectionNode( false );
if( pSectNd )
- pSectNd->GetSection().MakeChildLinksVisible( *pSectNd );
+ SwSection::MakeChildLinksVisible( *pSectNd );
if( pESh )
pESh->EndAllAction();