sw/inc/switerator.hxx | 2 +- sw/source/core/attr/cellatr.cxx | 4 ++-- sw/source/core/doc/tblrwcl.cxx | 2 +- sw/source/core/docnode/node.cxx | 4 ++-- sw/source/core/docnode/node2lay.cxx | 8 ++++---- sw/source/core/docnode/section.cxx | 6 +++--- sw/source/core/draw/dcontact.cxx | 4 ++-- sw/source/core/fields/docufld.cxx | 2 +- sw/source/core/frmedt/feshview.cxx | 2 +- sw/source/core/layout/atrfrm.cxx | 14 +++++++------- sw/source/core/layout/fly.cxx | 4 ++-- sw/source/core/layout/flypos.cxx | 4 ++-- sw/source/core/layout/frmtool.cxx | 2 +- sw/source/core/table/swtable.cxx | 14 +++++++------- sw/source/core/txtnode/ndtxt.cxx | 3 +-- sw/source/core/undo/unattr.cxx | 4 ++-- sw/source/core/unocore/unodraw.cxx | 2 +- sw/source/core/unocore/unoframe.cxx | 6 +++--- sw/source/core/unocore/unoobj2.cxx | 2 +- sw/source/core/unocore/unotbl.cxx | 8 ++++---- 20 files changed, 48 insertions(+), 49 deletions(-)
New commits: commit 5a751d32b99e330d6656efc337829778e2b58bdb Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sun Mar 15 02:55:35 2015 +0100 make SwIterator final Change-Id: I48ef94ca7681c3ef5cf04aad79eab4b7dd84ca2d diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx index 7d2e27a..9df5906 100644 --- a/sw/inc/switerator.hxx +++ b/sw/inc/switerator.hxx @@ -22,7 +22,7 @@ #include <calbck.hxx> #include <sal/log.hxx> -template< class TElementType, class TSource > class SwIterator +template< class TElementType, class TSource > class SwIterator SAL_FINAL { SwClientIter aClientIter; public: commit 553a058ec877e5ea858dbc47eec456033a6323ab Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Mar 14 20:43:43 2015 +0100 core: dont use 'shortcut' that is longer than the original Change-Id: I0154e484a4f4d6ce6672ddf35d1869157a61f71e diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 2ef00af..79f2a52 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 d0bdb86..d144b9e 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 4490134..040a498 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 2a74a43..d6631e7 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 6b3cdb4..b2d8173 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 e4d61da..d082e47 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 00614b5..55bdf18 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 3c0467c..1e00de1 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(); commit bc2740dd91cef7b91eb140fefd38bd05d0dede15 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Mar 14 20:43:13 2015 +0100 unocore: dont use 'shortcut' that is longer than the original Change-Id: I0bc66003528b6603ce46325176973d72dcbac2ac diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index cc83db1..375e8c6 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -283,7 +283,7 @@ uno::Reference< uno::XInterface > SwFmDrawPage::GetInterface( SdrObject* pObj if( pObj ) { SwFrmFmt* pFmt = ::FindFrmFmt( pObj ); - SwXShape* pxShape = SwIterator<SwXShape,SwFmt>::FirstElement( *pFmt ); + SwXShape* pxShape = SwIterator<SwXShape,SwFmt>( *pFmt ).First(); if(pxShape) { xShape = *(cppu::OWeakObject*)pxShape; diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index b604a78..39e74f2 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2203,7 +2203,7 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName) // format document completely in order to get correct value pFmt->GetDoc()->GetEditShell()->CalcLayout(); - SwFrm* pTmpFrm = SwIterator<SwFrm,SwFmt>::FirstElement( *pFmt ); + SwFrm* pTmpFrm = SwIterator<SwFrm,SwFmt>( *pFmt ).First(); if ( pTmpFrm ) { OSL_ENSURE( pTmpFrm->IsValid(), "frame not valid" ); @@ -3616,7 +3616,7 @@ uno::Reference< lang::XComponent > SwXTextEmbeddedObject::getEmbeddedObject(voi uno::Reference< frame::XModel > xModel( xRet, uno::UNO_QUERY); if( xBrdcst.is() && xModel.is() ) { - SwXOLEListener* pListener = SwIterator<SwXOLEListener,SwFmt>::FirstElement( *pFmt ); + SwXOLEListener* pListener = SwIterator<SwXOLEListener,SwFmt>( *pFmt ).First(); //create a new one if the OLE object doesn't have one already if( !pListener ) { @@ -3656,7 +3656,7 @@ uno::Reference< embed::XEmbeddedObject > SAL_CALL SwXTextEmbeddedObject::getExte uno::Reference< frame::XModel > xModel( xComp, uno::UNO_QUERY); if( xBrdcst.is() && xModel.is() ) { - SwXOLEListener* pListener = SwIterator<SwXOLEListener,SwFmt>::FirstElement( *pFmt ); + SwXOLEListener* pListener = SwIterator<SwXOLEListener,SwFmt>( *pFmt ).First(); //create a new one if the OLE object doesn't have one already if( !pListener ) { diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 1066edf..4980ed0 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1742,7 +1742,7 @@ lcl_CreateNextObject(SwUnoCrsr& i_rUnoCrsr, // the format should be valid here, otherwise the client // would have been removed in ::Modify // check for a shape first - SwDrawContact* const pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement( *pFormat ); + SwDrawContact* const pContact = SwIterator<SwDrawContact,SwFmt>( *pFormat ).First(); if (pContact) { SdrObject * const pSdr = pContact->GetMaster(); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 75f2b0c..ee4d66f 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -2259,7 +2259,7 @@ uno::Reference< table::XTableRows > SwXTextTable::getRows(void) throw( uno::Run uno::Reference< table::XTableRows > xRet; if (SwFrmFmt* pFmt = GetFrmFmt()) { - SwXTableRows* pRows = SwIterator<SwXTableRows,SwFmt>::FirstElement(*pFmt); + SwXTableRows* pRows = SwIterator<SwXTableRows,SwFmt>(*pFmt).First(); if (!pRows) pRows = new SwXTableRows(*pFmt); xRet = pRows; @@ -2275,7 +2275,7 @@ uno::Reference< table::XTableColumns > SwXTextTable::getColumns(void) throw( un uno::Reference< table::XTableColumns > xRet; if (SwFrmFmt* pFmt = GetFrmFmt()) { - SwXTableColumns* pCols = SwIterator<SwXTableColumns,SwFmt>::FirstElement(*pFmt); + SwXTableColumns* pCols = SwIterator<SwXTableColumns,SwFmt>(*pFmt).First(); if (!pCols) pCols = new SwXTableColumns(*pFmt); xRet = pCols; @@ -3184,7 +3184,7 @@ void SwXTextTable::setPropertyValue(const OUString& rPropertyName, const uno::An break; // something else } SwDoc* pDoc = pFmt->GetDoc(); - SwFrm* pFrm = SwIterator<SwFrm,SwFmt>::FirstElement( *pFmt ); + SwFrm* pFrm = SwIterator<SwFrm,SwFmt>( *pFmt ).First(); // tables without layout (invisible header/footer?) if (!pFrm) { @@ -3378,7 +3378,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName) case FN_UNO_TABLE_BORDER2: { SwDoc* pDoc = pFmt->GetDoc(); - SwFrm* pFrm = SwIterator<SwFrm,SwFmt>::FirstElement( *pFmt ); + SwFrm* pFrm = SwIterator<SwFrm,SwFmt>( *pFmt ).First(); // tables without layout (invisible header/footer?) if (!pFrm) { commit 883cb9eadc48bbe6b7028226fa193c47f0346fca Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Mar 14 20:42:51 2015 +0100 core/layout: dont use 'shortcut' that is longer than the original Change-Id: I2f5104e992cc5c33a27f2d2770ba4e6b25b40f70 diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 565cd47..d93118f 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -147,7 +147,7 @@ void DelHFFormat( SwClient *pToRemove, SwFrmFmt *pFmt ) if ( pNode->IsCntntNode() && static_cast<SwCntntNode*>(pNode)->GetDepends() ) { - SwCrsrShell *pShell = SwIterator<SwCrsrShell,SwCntntNode>::FirstElement( *static_cast<SwCntntNode*>(pNode) ); + SwCrsrShell *pShell = SwIterator<SwCrsrShell,SwCntntNode>( *static_cast<SwCntntNode*>(pNode) ).First(); if( pShell ) { pShell->ParkCrsr( aIdx ); @@ -2704,7 +2704,7 @@ SwRect SwFrmFmt::FindLayoutRect( const bool bPrtArea, const Point* pPoint, SwContact* SwFrmFmt::FindContactObj() { - return SwIterator<SwContact,SwFmt>::FirstElement( *this ); + return SwIterator<SwContact,SwFmt>( *this ).First(); } SdrObject* SwFrmFmt::FindSdrObject() @@ -2731,10 +2731,10 @@ bool SwFrmFmt::IsLowerOf( const SwFrmFmt& rFmt ) const { //Also linking from inside to outside or from outside to inside is not //allowed. - SwFlyFrm *pSFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement(*this); + SwFlyFrm *pSFly = SwIterator<SwFlyFrm,SwFmt>(*this).First(); if( pSFly ) { - SwFlyFrm *pAskFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement(rFmt); + SwFlyFrm *pAskFly = SwIterator<SwFlyFrm,SwFmt>(rFmt).First(); if( pAskFly ) return pSFly->IsLowerOf( pAskFly ); } @@ -2903,7 +2903,7 @@ void SwFlyFrmFmt::MakeFrms() } if ( pCNd ) { - if( SwIterator<SwFrm,SwCntntNode>::FirstElement( *pCNd ) ) + if( SwIterator<SwFrm,SwCntntNode>( *pCNd ).First() ) { pModify = pCNd; } @@ -3062,7 +3062,7 @@ bool SwFlyFrmFmt::GetInfo( SfxPoolItem& rInfo ) const { case RES_CONTENT_VISIBLE: { - static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFmt>::FirstElement( *this ); + static_cast<SwPtrMsgPoolItem&>(rInfo).pObject = SwIterator<SwFrm,SwFmt>( *this ).First(); } bRet = false; break; @@ -3373,7 +3373,7 @@ IMapObject* SwFrmFmt::GetIMapObject( const Point& rPoint, if( !pFly ) { - pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement( *this ); + pFly = SwIterator<SwFlyFrm,SwFmt>( *this ).First(); if( !pFly ) return 0; } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 8e788e0..f76ca7e 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -400,7 +400,7 @@ void SwFlyFrm::InitDrawObj( bool bNotify ) // need to create a new Ref, else we create the Contact now. IDocumentDrawModelAccess* pIDDMA = GetFmt()->getIDocumentDrawModelAccess(); - SwFlyDrawContact *pContact = SwIterator<SwFlyDrawContact,SwFmt>::FirstElement( *GetFmt() ); + SwFlyDrawContact *pContact = SwIterator<SwFlyDrawContact,SwFmt>( *GetFmt() ).First(); if ( !pContact ) { // #i52858# - method name changed @@ -461,7 +461,7 @@ void SwFlyFrm::FinitDrawObj() if ( bContinue ) // no Frm left, find Contact object to destroy - pMyContact = SwIterator<SwFlyDrawContact,SwFmt>::FirstElement( *GetFmt() ); + pMyContact = SwIterator<SwFlyDrawContact,SwFmt>( *GetFmt() ).First(); } // OD, OS 2004-03-31 #116203# - clear user call of Writer fly frame 'master' diff --git a/sw/source/core/layout/flypos.cxx b/sw/source/core/layout/flypos.cxx index 2857b14..135e5c3 100644 --- a/sw/source/core/layout/flypos.cxx +++ b/sw/source/core/layout/flypos.cxx @@ -51,7 +51,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt, if( RES_FLYFRMFMT == pFmt->Which() ) { // Let's see if we have an SdrObject for this - SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement(*pFmt); + SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFmt>(*pFmt).First(); if( pFly ) { nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum(); @@ -61,7 +61,7 @@ SwPosFlyFrm::SwPosFlyFrm( const SwNodeIndex& rIdx, const SwFrmFmt* pFmt, else if( RES_DRAWFRMFMT == pFmt->Which() ) { // Let's see if we have an SdrObject for this - SwDrawContact* pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement(*pFmt); + SwDrawContact* pContact = SwIterator<SwDrawContact,SwFmt>(*pFmt).First(); if( pContact ) { nOrdNum = pContact->GetMaster()->GetOrdNum(); diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 0fafeb2..431176f 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1118,7 +1118,7 @@ static bool lcl_ObjConnected( const SwFrmFmt *pFmt, const SwFrm* pSib ) } else { - SwDrawContact *pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement(*pFmt); + SwDrawContact *pContact = SwIterator<SwDrawContact,SwFmt>(*pFmt).First(); if ( pContact ) return pContact->GetAnchorFrm() != 0; } commit 274a1bca4f1e41613ee374584880593482c7045b Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Mar 14 20:42:30 2015 +0100 core/docnode: dont use 'shortcut' that is longer than the original Change-Id: Idf0bdea2ffb987859e413f2cea4eaa0d97d2ba7b diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index d27ce9b..5118385 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 319a16b..832e9e77 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 b101800..62e00e6 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(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits