summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-14 20:43:43 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-03-16 15:17:59 +0100
commit553a058ec877e5ea858dbc47eec456033a6323ab (patch)
tree97fa213edfb0d4a9090e1732908d6560213ff67c
parentbc2740dd91cef7b91eb140fefd38bd05d0dede15 (diff)
core: dont use 'shortcut' that is longer than the original
Change-Id: I0154e484a4f4d6ce6672ddf35d1869157a61f71e
-rw-r--r--sw/source/core/attr/cellatr.cxx4
-rw-r--r--sw/source/core/doc/tblrwcl.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx4
-rw-r--r--sw/source/core/fields/docufld.cxx2
-rw-r--r--sw/source/core/frmedt/feshview.cxx2
-rw-r--r--sw/source/core/table/swtable.cxx14
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx3
-rw-r--r--sw/source/core/undo/unattr.cxx4
8 files changed, 17 insertions, 18 deletions
diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx
index 2ef00af60f7e..79f2a5258478 100644
--- a/sw/source/core/attr/cellatr.cxx
+++ b/sw/source/core/attr/cellatr.cxx
@@ -82,7 +82,7 @@ const SwNode* SwTblBoxFormula::GetNodeOfFormula() const
const SwNode* pRet = 0;
if( pDefinedIn )
{
- SwTableBox* pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
+ SwTableBox* pBox = SwIterator<SwTableBox,SwModify>( *pDefinedIn ).First();
if( pBox )
pRet = pBox->GetSttNd();
}
@@ -93,7 +93,7 @@ SwTableBox* SwTblBoxFormula::GetTableBox()
{
SwTableBox* pBox = 0;
if( pDefinedIn )
- pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
+ pBox = SwIterator<SwTableBox,SwModify>( *pDefinedIn ).First();
return pBox;
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index d0bdb867b38b..d144b9ef1515 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -586,7 +586,7 @@ bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
// Find Lines for the layout update
const bool bLayout = !IsNewModel() &&
- 0 != SwIterator<SwTabFrm,SwFmt>( *GetFrmFmt() ).First();
+ nullptr != SwIterator<SwTabFrm,SwFmt>( *GetFrmFmt() ).First();
if ( bLayout )
{
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 4490134f1930..040a4984f0cc 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -639,7 +639,7 @@ void SwDrawContact::GetTextObjectsFromFmt( std::list<SdrTextObj*>& rTextObjects,
const SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n];
if( pFly->IsA( TYPE(SwDrawFrmFmt) ) )
{
- SwDrawContact* pContact = SwIterator<SwDrawContact,SwFrmFmt>::FirstElement(*pFly);
+ SwDrawContact* pContact = SwIterator<SwDrawContact,SwFrmFmt>(*pFly).First();
if( pContact )
{
SdrObject* pSdrO = pContact->GetMaster();
@@ -1794,7 +1794,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
{
SwNodeIndex aIdx( pAnch->GetCntntAnchor()->nNode );
SwCntntNode* pCNd = pDrawFrmFmt->GetDoc()->GetNodes().GoNext( &aIdx );
- if ( SwIterator<SwFrm,SwCntntNode>::FirstElement( *pCNd ) )
+ if ( SwIterator<SwFrm,SwCntntNode>( *pCNd ).First() )
pModify = pCNd;
else
{
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 2a74a435394b..d6631e7225a4 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -159,7 +159,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc,
const SwCntntNode* pNd = PTR_CAST( SwCntntNode, pDesc->GetDefinedIn() );
if( pNd )
{
- if ( SwIterator<SwFrm,SwCntntNode>::FirstElement(*pNd) )
+ if ( SwIterator<SwFrm,SwCntntNode>(*pNd).First() )
bVirtuell = true;
}
else if( pDesc->GetDefinedIn()->ISA( SwFmt ))
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 6b3cdb4d1c8c..b2d817302dd4 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2232,7 +2232,7 @@ bool SwFEShell::GotoFly( const OUString& rName, FlyCntType eType, bool bSelFrm )
{
SET_CURR_SHELL( this );
- SwFlyFrm* pFrm = SwIterator<SwFlyFrm,SwFmt>::FirstElement( *pFlyFmt );
+ SwFlyFrm* pFrm = SwIterator<SwFlyFrm,SwFmt>( *pFlyFmt ).First();
if( pFrm )
{
if( bSelFrm )
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index e4d61da0ca3e..d082e474ae2e 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1469,7 +1469,7 @@ SwTableBox* SwTable::GetTblBox( sal_uLong nSttIdx )
if ( pTblNd && pTblNd->GetTable().GetFrmFmt() )
pModify = pTblNd->GetTable().GetFrmFmt();
- SwFrm* pFrm = pModify ? SwIterator<SwFrm,SwModify>::FirstElement(*pModify) : NULL;
+ SwFrm* pFrm = pModify ? SwIterator<SwFrm,SwModify>(*pModify).First() : nullptr;
while ( pFrm && !pFrm->IsCellFrm() )
pFrm = pFrm->GetUpper();
if ( pFrm )
@@ -1730,7 +1730,7 @@ SwTableBoxFmt* SwTableBox::CheckBoxFmt( SwTableBoxFmt* pFmt )
if( SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_VALUE, false ) ||
SfxItemState::SET == pFmt->GetItemState( RES_BOXATR_FORMULA, false ) )
{
- SwTableBox* pOther = SwIterator<SwTableBox,SwFmt>::FirstElement( *pFmt );
+ SwTableBox* pOther = SwIterator<SwTableBox,SwFmt>( *pFmt ).First();
if( pOther )
{
SwTableBoxFmt* pNewFmt = pFmt->GetDoc()->MakeTableBoxFmt();
@@ -1927,7 +1927,7 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
break;
case RES_CONTENT_VISIBLE:
- static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFmt>::FirstElement( *GetFrmFmt() );
+ static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFmt>( *GetFrmFmt() ).First();
return false;
}
return true;
@@ -1936,8 +1936,8 @@ bool SwTable::GetInfo( SfxPoolItem& rInfo ) const
SwTable * SwTable::FindTable( SwFrmFmt const*const pFmt )
{
return (pFmt)
- ? SwIterator<SwTable,SwFmt>::FirstElement(*pFmt)
- : 0;
+ ? SwIterator<SwTable,SwFmt>(*pFmt).First()
+ : nullptr;
}
SwTableNode* SwTable::GetTableNode() const
@@ -2595,7 +2595,7 @@ public:
{
m_pTable = pTable;
SwFrmFmt * pFrmFmt = m_pTable->GetFrmFmt();
- m_pTabFrm = SwIterator<SwTabFrm,SwFmt>::FirstElement(*pFrmFmt);
+ m_pTabFrm = SwIterator<SwTabFrm,SwFmt>(*pFrmFmt).First();
if (m_pTabFrm && m_pTabFrm->IsFollow())
m_pTabFrm = m_pTabFrm->FindMaster(true);
}
@@ -2738,7 +2738,7 @@ bool SwTable::HasLayout() const
{
const SwFrmFmt* pFrmFmt = GetFrmFmt();
//a table in a clipboard document doesn't have any layout information
- return pFrmFmt && SwIterator<SwTabFrm,SwFmt>::FirstElement(*pFrmFmt);
+ return pFrmFmt && SwIterator<SwTabFrm,SwFmt>(*pFrmFmt).First();
}
void SwTableLine::RegisterToFormat( SwFmt& rFmt )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 00614b582d89..55bdf180032d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -312,8 +312,7 @@ static void lcl_ChangeFtnRef( SwTxtNode &rNode )
{
if( !pFrm )
{
- pFrm = SwIterator<SwCntntFrm,SwTxtNode>::FirstElement( rNode );
- if( !pFrm )
+ if(!SwIterator<SwCntntFrm,SwTxtNode>( rNode ).First())
return;
}
SwTxtFtn *pAttr = static_cast<SwTxtFtn*>(pHt);
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 3c0467c6d40b..1e00de147573 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -153,7 +153,7 @@ void SwUndoFmtAttr::Init()
if ( pDoc->GetTblFrmFmts()->Contains( m_pFmt ))
{
// Table Format: save table position, table formats are volatile!
- SwTable * pTbl = SwIterator<SwTable,SwFmt>::FirstElement( *m_pFmt );
+ SwTable * pTbl = SwIterator<SwTable,SwFmt>( *m_pFmt ).First();
if ( pTbl )
{
m_nNodeIndex = pTbl->GetTabSortBoxes()[ 0 ]->GetSttNd()
@@ -166,7 +166,7 @@ void SwUndoFmtAttr::Init()
}
else if ( 0 != dynamic_cast< SwTableBoxFmt* >( m_pFmt ) )
{
- SwTableBox * pTblBox = SwIterator<SwTableBox,SwFmt>::FirstElement( *m_pFmt );
+ SwTableBox * pTblBox = SwIterator<SwTableBox,SwFmt>( *m_pFmt ).First();
if ( pTblBox )
{
m_nNodeIndex = pTblBox->GetSttIdx();