summaryrefslogtreecommitdiff
path: root/fpicker/source/office
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-07 16:27:06 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-12 23:25:09 +0200
commit153c5e3f07ec26fac352765b776188035e1fdeb2 (patch)
treea12eb15a87d0d6ac7f937a997f31634d4e0fc6ed /fpicker/source/office
parent0169c40e133bafa9d7c1226d1fa747d7958a1d4f (diff)
Convert SV_DECL_PTRARR_DEL(ImageItemListDescriptor) to boost::ptr_vector
Change-Id: Ic3b06e179d182d68288c7c6832149309160cd637
Diffstat (limited to 'fpicker/source/office')
-rw-r--r--fpicker/source/office/iodlg.cxx16
-rw-r--r--fpicker/source/office/iodlgimp.cxx8
-rw-r--r--fpicker/source/office/iodlgimp.hxx5
3 files changed, 13 insertions, 16 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index acb134732ebe..7f5aed991d30 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -1479,11 +1479,11 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
{
SvtFileDialogFilter_Impl* pFoundFilter = NULL;
SvtFileDialogFilterList_Impl* pList = _pImp->_pFilter;
- sal_uInt16 nFilter = pList->Count();
+ sal_uInt16 nFilter = pList->size();
while ( nFilter-- )
{
- SvtFileDialogFilter_Impl* pFilter = pList->GetObject( nFilter );
+ SvtFileDialogFilter_Impl* pFilter = &(*pList)[ nFilter ];
const String& rType = pFilter->GetType();
String aSingleType = rType;
@@ -2191,7 +2191,7 @@ short SvtFileDialog::PrepareExecute()
break;
}
}
- SvtFileDialogFilter_Impl* pNewCurFilter = _pImp->_pFilter->GetObject( nPos );
+ SvtFileDialogFilter_Impl* pNewCurFilter = &(*_pImp->_pFilter)[ nPos ];
DBG_ASSERT( pNewCurFilter, "SvtFileDialog::Execute: invalid filter pos!" );
_pImp->SetCurFilter( pNewCurFilter, pNewCurFilter->GetName() );
}
@@ -2366,7 +2366,7 @@ void SvtFileDialog::OpenURL_Impl( const String& _rURL )
SvtFileDialogFilter_Impl* SvtFileDialog::implAddFilter( const String& _rFilter, const String& _rType )
{
SvtFileDialogFilter_Impl* pNewFilter = new SvtFileDialogFilter_Impl( _rFilter, _rType );
- _pImp->_pFilter->C40_INSERT( SvtFileDialogFilter_Impl, pNewFilter, (sal_uInt16)0 );
+ _pImp->_pFilter->push_front( pNewFilter );
if ( !_pImp->GetCurFilter() )
_pImp->SetCurFilter( pNewFilter, _rFilter );
@@ -2400,11 +2400,11 @@ void SvtFileDialog::SetCurFilter( const String& rFilter )
DBG_ASSERT( !IsInExecute(), "SvtFileDialog::SetCurFilter: currently executing!" );
// look for corresponding filter
- sal_uInt16 nPos = _pImp->_pFilter->Count();
+ sal_uInt16 nPos = _pImp->_pFilter->size();
while ( nPos-- )
{
- SvtFileDialogFilter_Impl* pFilter = _pImp->_pFilter->GetObject( nPos );
+ SvtFileDialogFilter_Impl* pFilter = &(*_pImp->_pFilter)[ nPos ];
if ( pFilter->GetName() == rFilter )
{
_pImp->SetCurFilter( pFilter, rFilter );
@@ -2435,7 +2435,7 @@ String SvtFileDialog::getCurFilter( ) const
sal_uInt16 SvtFileDialog::GetFilterCount() const
{
- return _pImp->_pFilter->Count();
+ return _pImp->_pFilter->size();
}
//*****************************************************************************
@@ -2443,7 +2443,7 @@ sal_uInt16 SvtFileDialog::GetFilterCount() const
const String& SvtFileDialog::GetFilterName( sal_uInt16 nPos ) const
{
DBG_ASSERT( nPos < GetFilterCount(), "invalid index" );
- return _pImp->_pFilter->GetObject( nPos )->GetName();
+ return (*_pImp->_pFilter)[ nPos ].GetName();
}
//*****************************************************************************
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx
index 84a714894afa..01b3a9436347 100644
--- a/fpicker/source/office/iodlgimp.cxx
+++ b/fpicker/source/office/iodlgimp.cxx
@@ -122,8 +122,6 @@ SvtFileDialogFilter_Impl::~SvtFileDialogFilter_Impl()
// SvtFileDialogFilterList_Impl
//*****************************************************************************
-SV_IMPL_PTRARR( SvtFileDialogFilterList_Impl, SvtFileDialogFilter_Impl* );
-
//=============================================================================
//= SvtFileDialogURLSelector
//=============================================================================
@@ -375,15 +373,15 @@ void SvtExpFileDlg_Impl::InitFilterList( )
ClearFilterList( );
// reinit it
- sal_uInt16 nPos = _pFilter->Count();
+ sal_uInt16 nPos = _pFilter->size();
// search for the first entry which is no group separator
- while ( nPos-- && _pFilter->GetObject( nPos ) && _pFilter->GetObject( nPos )->isGroupSeparator() )
+ while ( nPos-- && (*_pFilter)[ nPos ].isGroupSeparator() )
;
// add all following entries
while ( (sal_Int16)nPos >= 0 )
- InsertFilterListEntry( _pFilter->GetObject( nPos-- ) );
+ InsertFilterListEntry( &(*_pFilter)[ nPos-- ] );
}
//-----------------------------------------------------------------------------
diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx
index 7a30e9392758..12bfc0a0a59e 100644
--- a/fpicker/source/office/iodlgimp.hxx
+++ b/fpicker/source/office/iodlgimp.hxx
@@ -37,9 +37,8 @@
#include <vcl/timer.hxx>
#include <vcl/group.hxx>
-#include "svl/svarray.hxx"
-
#include <vector>
+#include <boost/ptr_container/ptr_deque.hpp>
class Accelerator;
class CheckBox;
@@ -76,7 +75,7 @@ public:
sal_Bool isGroupSeparator() const { return 0 == m_aType.Len(); }
};
-SV_DECL_PTRARR_DEL( SvtFileDialogFilterList_Impl, SvtFileDialogFilter_Impl*, 3 )
+typedef boost::ptr_deque<SvtFileDialogFilter_Impl> SvtFileDialogFilterList_Impl;
enum SvtFileDlgMode
{