diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-01 09:48:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-01 12:11:20 +0100 |
commit | 299fdae0ee07bc5a44fa77c628813a48508b663a (patch) | |
tree | 6cc5726659df3124dc97c55d5c5f0c0db83af2e6 | |
parent | aa3df611323d207483d4e122d66f459c2ca50e5c (diff) |
SV_DECL_PTRARR_SORT->boost::ptr_set
Change-Id: I770d684a11347593656edc80d173bc7631d58fd8
-rw-r--r-- | sw/source/ui/dialog/uiregionsw.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/inc/regionsw.hxx | 4 | ||||
-rwxr-xr-x | unusedcode.easy | 5 |
3 files changed, 7 insertions, 13 deletions
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 746cc9df5231..e35dc9e27cd7 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -215,8 +215,6 @@ public: }; -SV_IMPL_OP_PTRARR_SORT( SectReprArr, SectReprPtr ) - SectRepr::SectRepr( sal_uInt16 nPos, SwSection& rSect ) : m_SectionData( rSect ) , m_Brush( RES_BACKGROUND ) @@ -585,7 +583,6 @@ SwEditRegionDlg::~SwEditRegionDlg( ) pEntry = aTree.Next( pEntry ); } - aSectReprArr.DeleteAndDestroy( 0, aSectReprArr.Count() ); delete m_pDocInserter; } @@ -870,9 +867,9 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl) pEntry = aTree.Next( pEntry ); } - for(sal_uInt16 i = aSectReprArr.Count(); i; ) + for (SectReprArr::reverse_iterator aI = aSectReprArr.rbegin(), aEnd = aSectReprArr.rend(); aI != aEnd; ++aI) { - SwSectionFmt* pFmt = aOrigArray[ aSectReprArr[ --i ]->GetArrPos() ]; + SwSectionFmt* pFmt = aOrigArray[ aI->GetArrPos() ]; sal_uInt16 nNewPos = rDocFmts.GetPos( pFmt ); if( USHRT_MAX != nNewPos ) rSh.DelSectionFmt( nNewPos ); @@ -992,7 +989,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl) sal_Bool bRestart = sal_False; if(pSectRepr->IsSelected()) { - aSectReprArr.Insert( pSectRepr ); + aSectReprArr.insert( pSectRepr ); while( (pChild = aTree.FirstChild(pEntry) )!= 0 ) { // because of the repositioning we have to start at the beginning again @@ -1012,7 +1009,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, ChangeDismissHdl) if ( (pEntry=aTree.FirstSelected()) == 0 ) { - aConditionFT. Enable(sal_False); + aConditionFT. Enable(sal_False); aConditionED. Enable(sal_False); aDismiss. Enable(sal_False); aCurName. Enable(sal_False); diff --git a/sw/source/ui/inc/regionsw.hxx b/sw/source/ui/inc/regionsw.hxx index 1e6ce87b1746..e9a682cfc0c2 100644 --- a/sw/source/ui/inc/regionsw.hxx +++ b/sw/source/ui/inc/regionsw.hxx @@ -52,6 +52,8 @@ #include <svx/paraprev.hxx> #include <editeng/lrspitem.hxx> +#include <boost/ptr_container/ptr_set.hpp> + class SwWrtShell; class EditRegionDlg; @@ -66,7 +68,7 @@ namespace sfx2 *************************************************************************/ class SectRepr; typedef SectRepr* SectReprPtr; -SV_DECL_PTRARR_SORT( SectReprArr, SectReprPtr, 0 ) +typedef boost::ptr_set<SectRepr> SectReprArr; class SwEditRegionDlg : public SfxModalDialog { diff --git a/unusedcode.easy b/unusedcode.easy index 8377f93fccf1..519093fdedef 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -82,11 +82,6 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::getXServiceInfo() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) ScVbaFormat<ooo::vba::excel::XStyle>::setNumberFormat(com::sun::star::lang::Locale, rtl::OUString const&) -SectReprArr::Insert(SectRepr* const&, unsigned short&) -SectReprArr::Insert(SectRepr* const*, unsigned short) -SectReprArr::Insert(SectReprArr const*, unsigned short, unsigned short) -SectReprArr::Remove(SectRepr* const&, unsigned short) -SectReprArr::Remove(unsigned short, unsigned short) SecurityEnvironment_NssImpl::getImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XInterface>) SfxDockingWrapper::GetChildWindowId() SfxFilterPtrArr::DeleteAndDestroy(unsigned short, unsigned short) |