Kaydet (Commit) cf8ae83b authored tarafından Matteo Casalin's avatar Matteo Casalin

SwRefPageGetFieldType::MakeSetList can return bool

Change-Id: I79965d94e077345357952e7bded4b7e5b4c51c85
üst a5295aad
...@@ -605,7 +605,7 @@ protected: ...@@ -605,7 +605,7 @@ protected:
public: public:
SwRefPageGetFieldType( SwDoc* pDoc ); SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const SAL_OVERRIDE; virtual SwFieldType* Copy() const SAL_OVERRIDE;
sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst ); bool MakeSetList( _SetGetExpFlds& rTmpLst );
SwDoc* GetDoc() const { return pDoc; } SwDoc* GetDoc() const { return pDoc; }
}; };
......
...@@ -701,7 +701,7 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) con ...@@ -701,7 +701,7 @@ const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm ) con
{ {
const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts(); const SwFrmFmts& rTblFmts = *rDoc.GetTblFrmFmts();
const SwTable* pTmpTbl = 0, *pRet = 0; const SwTable* pTmpTbl = 0, *pRet = 0;
for( sal_uInt16 nFmtCnt = rTblFmts.size(); nFmtCnt; ) for( auto nFmtCnt = rTblFmts.size(); nFmtCnt; )
{ {
SwFrmFmt* pFmt = rTblFmts[ --nFmtCnt ]; SwFrmFmt* pFmt = rTblFmts[ --nFmtCnt ];
// if we are called from Sw3Writer, a number is dependent on the format name // if we are called from Sw3Writer, a number is dependent on the format name
......
...@@ -2075,7 +2075,7 @@ void SwRefPageGetFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* ...@@ -2075,7 +2075,7 @@ void SwRefPageGetFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem*
NotifyClients( pOld, pNew ); NotifyClients( pOld, pNew );
} }
sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst ) bool SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst )
{ {
SwIterator<SwFmtFld,SwFieldType> aIter(*pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_REFPAGESETFLD)); SwIterator<SwFmtFld,SwFieldType> aIter(*pDoc->getIDocumentFieldsAccess().GetSysFldType( RES_REFPAGESETFLD));
for ( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() ) for ( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
...@@ -2118,7 +2118,7 @@ sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst ) ...@@ -2118,7 +2118,7 @@ sal_uInt16 SwRefPageGetFieldType::MakeSetList( _SetGetExpFlds& rTmpLst )
} }
} }
return rTmpLst.size(); return !rTmpLst.empty();
} }
void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld, void SwRefPageGetFieldType::UpdateField( SwTxtFld* pTxtFld,
......
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