diff options
author | August Sodora <augsod@gmail.com> | 2012-01-11 21:33:02 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2012-01-11 21:33:43 -0500 |
commit | 278c91304cbfb66b05cd39c16282bde944758093 (patch) | |
tree | 90728652aa4b23c3c147ef251178ab0af5a0efd8 /fpicker/source/office | |
parent | 399e425fc9b9a89045bb1653769f581ed5fa5028 (diff) |
SvStringsDtor->std::vector
Diffstat (limited to 'fpicker/source/office')
-rw-r--r-- | fpicker/source/office/iodlgimp.cxx | 18 | ||||
-rw-r--r-- | fpicker/source/office/iodlgimp.hxx | 37 |
2 files changed, 8 insertions, 47 deletions
diff --git a/fpicker/source/office/iodlgimp.cxx b/fpicker/source/office/iodlgimp.cxx index 2fabd6253352..2c7b4c15ecc7 100644 --- a/fpicker/source/office/iodlgimp.cxx +++ b/fpicker/source/office/iodlgimp.cxx @@ -189,14 +189,12 @@ void SvtFileDialogURLSelector::Activate() //----------------------------------------------------------------------------- SvtUpButton_Impl::SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId ) :SvtFileDialogURLSelector( pParent, rResId, IMG_FILEDLG_BTN_UP ) - ,_pURLs ( NULL ) { } //----------------------------------------------------------------------------- SvtUpButton_Impl::~SvtUpButton_Impl() { - delete _pURLs; } //----------------------------------------------------------------------------- @@ -206,8 +204,7 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu ) sal_uInt16 nItemId = 1; - delete _pURLs; - _pURLs = new SvStringsDtor; + _aURLs.clear(); // determine parent levels INetURLObject aObject( pBox->GetViewURL() ); @@ -221,20 +218,20 @@ void SvtUpButton_Impl::FillURLMenu( PopupMenu* _pMenu ) while ( nCount >= 1 ) { aObject.removeSegment(); - String* pParentURL = new String( aObject.GetMainURL( INetURLObject::NO_DECODE ) ); + String aParentURL(aObject.GetMainURL(INetURLObject::NO_DECODE)); - if ( GetDialogParent()->isUrlAllowed( *pParentURL ) ) + if (GetDialogParent()->isUrlAllowed(aParentURL)) { String aTitle; // 97148# -------------------------------- - if ( !GetDialogParent()->ContentGetTitle( *pParentURL, aTitle ) || aTitle.Len() == 0 ) + if (!GetDialogParent()->ContentGetTitle(aParentURL, aTitle) || aTitle.Len() == 0) aTitle = aObject.getName(); Image aImage = ( nCount > 1 ) // if nCount == 1 means workplace, which detects the wrong image ? SvFileInformationManager::GetImage( aObject ) : aVolumeImage; _pMenu->InsertItem( nItemId++, aTitle, aImage ); - _pURLs->Insert( pParentURL, _pURLs->Count() ); + _aURLs.push_back(aParentURL); if ( nCount == 1 ) { @@ -255,10 +252,9 @@ void SvtUpButton_Impl::Select() if ( nId ) { --nId; - DBG_ASSERT( nId <= _pURLs->Count(), "SvtUpButton_Impl:falscher Index" ); + DBG_ASSERT( nId <= _aURLs.size(), "SvtUpButton_Impl:falscher Index" ); - String aURL = *(_pURLs->GetObject( nId )); - GetDialogParent()->OpenURL_Impl( aURL ); + GetDialogParent()->OpenURL_Impl(_aURLs[nId]); } } diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index 1048bc3092a7..7c1eb8548b9b 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -39,14 +39,9 @@ #include <vector> -//***************************************************************************** - class Accelerator; class CheckBox; class SvtFileDialog; -class SvStringsDtor; - -//***************************************************************************** #define FILEDIALOG_DEF_EXTSEP ';' #define FILEDIALOG_DEF_WILDCARD '*' @@ -79,35 +74,20 @@ public: sal_Bool isGroupSeparator() const { return 0 == m_aType.Len(); } }; -//***************************************************************************** -// SvtFileDialogFilterList_Impl -//***************************************************************************** - SV_DECL_PTRARR_DEL( SvtFileDialogFilterList_Impl, SvtFileDialogFilter_Impl*, 3, 3 ) -//***************************************************************************** -// SvtFileDlgMode -//***************************************************************************** - enum SvtFileDlgMode { FILEDLG_MODE_OPEN = 0, FILEDLG_MODE_SAVE = 1 }; -//***************************************************************************** -// SvtFileDlgType -//***************************************************************************** - enum SvtFileDlgType { FILEDLG_TYPE_FILEDLG = 0, FILEDLG_TYPE_PATHDLG }; -//***************************************************************************** -// SvtFileDialogURLSelector -//***************************************************************************** class SvtFileDialogURLSelector : public MenuButton { private: @@ -129,14 +109,10 @@ protected: virtual void Activate(); }; -//***************************************************************************** -// SvtUpButton_Impl -//***************************************************************************** - class SvtUpButton_Impl : public SvtFileDialogURLSelector { private: - SvStringsDtor* _pURLs; + std::vector<rtl::OUString> _aURLs; public: SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId ); @@ -148,10 +124,6 @@ protected: virtual void Click(); }; -//***************************************************************************** -// SvtTravelButton_Impl -//***************************************************************************** - class SvtTravelButton_Impl : public SvtFileDialogURLSelector { private: @@ -169,18 +141,11 @@ protected: virtual void Click(); }; -//***************************************************************************** -// SvtFileDlgState -//***************************************************************************** - typedef sal_uInt8 SvtFileDlgState; #define FILEDLG_STATE_NONE ((SvtFileDlgState)0x00) #define FILEDLG_STATE_REMOTE ((SvtFileDlgState)0x01) -//***************************************************************************** -// SvtExpFileDlg_Impl -//***************************************************************************** class SvtURLBox; class SvtExpFileDlg_Impl { |