Kaydet (Commit) 22faf843 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert SV_DECL_PTRARR_SORT(SwpFmts) to std::set

Change-Id: Ia5bbf4960cae0b2e4a975ded067d46a85a0b3ab9
üst c09d284e
...@@ -55,8 +55,7 @@ using namespace ::com::sun::star; ...@@ -55,8 +55,7 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::util; using namespace ::com::sun::star::util;
SV_DECL_PTRARR_SORT( SwpFmts, SwFmt*, 0 ) typedef std::set<SwFmt*> SwpFmts;
SV_IMPL_PTRARR_SORT( SwpFmts, SwFmt* )
// Sonderbehandlung fuer SvxFontItem, nur den Namen vergleichen: // Sonderbehandlung fuer SvxFontItem, nur den Namen vergleichen:
int CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 ) int CmpAttr( const SfxPoolItem& rItem1, const SfxPoolItem& rItem2 )
...@@ -920,10 +919,10 @@ sal_Bool SwPaM::Find( const SfxPoolItem& rAttr, sal_Bool bValue, SwMoveFn fnMove ...@@ -920,10 +919,10 @@ sal_Bool SwPaM::Find( const SfxPoolItem& rAttr, sal_Bool bValue, SwMoveFn fnMove
// no hard attribution, so check if node was asked for this attr before // no hard attribution, so check if node was asked for this attr before
if( !pNode->HasSwAttrSet() ) if( !pNode->HasSwAttrSet() )
{ {
const SwFmt* pTmpFmt = pNode->GetFmtColl(); SwFmt* pTmpFmt = pNode->GetFmtColl();
if( aFmtArr.Count() && aFmtArr.Seek_Entry( pTmpFmt )) if( aFmtArr.find( pTmpFmt ) != aFmtArr.end() )
continue; // collection was requested earlier continue; // collection was requested earlier
aFmtArr.Insert( pTmpFmt ); aFmtArr.insert( pTmpFmt );
} }
if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich, if( SFX_ITEM_SET == pNode->GetSwAttrSet().GetItemState( nWhich,
...@@ -1016,10 +1015,10 @@ sal_Bool SwPaM::Find( const SfxItemSet& rSet, sal_Bool bNoColls, SwMoveFn fnMove ...@@ -1016,10 +1015,10 @@ sal_Bool SwPaM::Find( const SfxItemSet& rSet, sal_Bool bNoColls, SwMoveFn fnMove
// no hard attribution, so check if node was asked for this attr before // no hard attribution, so check if node was asked for this attr before
if( !pNode->HasSwAttrSet() ) if( !pNode->HasSwAttrSet() )
{ {
const SwFmt* pTmpFmt = pNode->GetFmtColl(); SwFmt* pTmpFmt = pNode->GetFmtColl();
if( aFmtArr.Count() && aFmtArr.Seek_Entry( pTmpFmt )) if( aFmtArr.find( pTmpFmt ) != aFmtArr.end() )
continue; // collection was requested earlier continue; // collection was requested earlier
aFmtArr.Insert( pTmpFmt ); aFmtArr.insert( pTmpFmt );
} }
if( lcl_Search( *pNode, aOtherSet, bNoColls )) if( lcl_Search( *pNode, aOtherSet, bNoColls ))
......
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