SvStringsDtor->std::vector
This commit is contained in:
@@ -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]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user