summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-14 20:42:30 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 15:17:58 +0100
commit274a1bca4f1e41613ee374584880593482c7045b (patch)
tree6fac0565897d8cd999926c3d4f1b3672964bdb16
parente6fb43ca7f2e96e0bc0cd0b162828c6d0771ef28 (diff)
core/docnode: dont use 'shortcut' that is longer than the original
Change-Id: Idf0bdea2ffb987859e413f2cea4eaa0d97d2ba7b
-rw-r--r--sw/source/core/docnode/node.cxx4
-rw-r--r--sw/source/core/docnode/node2lay.cxx8
-rw-r--r--sw/source/core/docnode/section.cxx6
3 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index d27ce9b1f9e1..511838540f50 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -708,7 +708,7 @@ SwFrmFmt* SwNode::GetFlyFmt() const
{
if( IsCntntNode() )
{
- SwCntntFrm* pFrm = SwIterator<SwCntntFrm,SwCntntNode>::FirstElement( *static_cast<const SwCntntNode*>(this) );
+ SwCntntFrm* pFrm = SwIterator<SwCntntFrm,SwCntntNode>( *static_cast<const SwCntntNode*>(this) ).First();
if( pFrm )
pRet = pFrm->FindFlyFrm()->GetFmt();
}
@@ -1412,7 +1412,7 @@ bool SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
case RES_CONTENT_VISIBLE:
{
static_cast<SwPtrMsgPoolItem&>(rInfo).pObject =
- SwIterator<SwFrm,SwCntntNode>::FirstElement(*this);
+ SwIterator<SwFrm,SwCntntNode>(*this).First();
}
return false;
}
diff --git a/sw/source/core/docnode/node2lay.cxx b/sw/source/core/docnode/node2lay.cxx
index 319a16bf6c40..832e9e77a650 100644
--- a/sw/source/core/docnode/node2lay.cxx
+++ b/sw/source/core/docnode/node2lay.cxx
@@ -69,9 +69,9 @@ SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
pNd = &aTmp.GetNode();
bool bFound = false;
if ( pNd->IsCntntNode() )
- bFound = ( SwIterator<SwFrm,SwCntntNode>::FirstElement(*static_cast<SwCntntNode*>(pNd)) != 0);
+ bFound = SwIterator<SwFrm,SwCntntNode>(*static_cast<SwCntntNode*>(pNd)).First();
else if ( pNd->IsTableNode() )
- bFound = ( SwIterator<SwFrm,SwFmt>::FirstElement(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrmFmt()) != 0 );
+ bFound = SwIterator<SwFrm,SwFmt>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrmFmt()).First() ;
else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() )
{
pNd = 0;
@@ -101,9 +101,9 @@ SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
pNd = &aTmp.GetNode();
bool bFound = false;
if ( pNd->IsCntntNode() )
- bFound = ( SwIterator<SwFrm,SwCntntNode>::FirstElement(*static_cast<SwCntntNode*>(pNd)) != 0);
+ bFound = SwIterator<SwFrm,SwCntntNode>(*static_cast<SwCntntNode*>(pNd)).First();
else if ( pNd->IsTableNode() )
- bFound = ( SwIterator<SwFrm,SwFmt>::FirstElement(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrmFmt()) != 0 );
+ bFound = SwIterator<SwFrm,SwFmt>(*static_cast<SwTableNode*>(pNd)->GetTable().GetFrmFmt()).First();
else if( pNd->IsStartNode() && !pNd->IsSectionNode() )
{
pNd = 0;
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index b101800029ea..62e00e663e8f 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -679,7 +679,7 @@ SwSectionFmt::~SwSectionFmt()
SwSection * SwSectionFmt::GetSection() const
{
- return SwIterator<SwSection,SwSectionFmt>::FirstElement( *this );
+ return SwIterator<SwSection,SwSectionFmt>( *this ).First();
}
// Do not destroy all Frms in aDepend (Frms are recognized with a PTR_CAST).
@@ -858,7 +858,7 @@ bool SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
case RES_CONTENT_VISIBLE:
{
- SwFrm* pFrm = SwIterator<SwFrm,SwFmt>::FirstElement(*this);
+ SwFrm* pFrm = SwIterator<SwFrm,SwFmt>(*this).First();
// if the current section has no own frame search for the children
if(!pFrm)
{
@@ -866,7 +866,7 @@ bool SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
SwSectionFmt* pChild = aFormatIter.First();
while(pChild && !pFrm)
{
- pFrm = SwIterator<SwFrm,SwFmt>::FirstElement(*pChild);
+ pFrm = SwIterator<SwFrm,SwFmt>(*pChild).First();
pChild = aFormatIter.Next();
}
}