summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-10-28 16:40:39 +0530
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-28 12:26:09 +0000
commit99fbcffa3d85c00770977e205626493ec2be1883 (patch)
tree3a4851031d22b9e2d0fa0ecfa32ed67977347347 /fpicker
parent03c7cfb6a680a483962d64d52c70ad5972a7b08b (diff)
tdf#89329: use unique_ptr for pImpl in fpicker/
Change-Id: I4a5db5ceafe509bffc32a8800ab3d678f41244f7 Reviewed-on: https://gerrit.libreoffice.org/30309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/office/iodlg.cxx588
-rw-r--r--fpicker/source/office/iodlg.hxx2
2 files changed, 295 insertions, 295 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 10140e0d371d..4630e33455e9 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -86,6 +86,7 @@
#include <algorithm>
#include <functional>
#include <vector>
+#include <memory>
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
@@ -114,7 +115,7 @@ namespace
{
- OUString getMostCurrentFilter( SvtExpFileDlg_Impl* pImpl )
+ OUString getMostCurrentFilter( std::unique_ptr<SvtExpFileDlg_Impl>& pImpl )
{
assert( pImpl && "invalid impl pointer" );
const SvtFileDialogFilter_Impl* pFilter = pImpl->_pUserFilter;
@@ -129,20 +130,20 @@ namespace
}
- bool restoreCurrentFilter( SvtExpFileDlg_Impl* _pImpl )
+ bool restoreCurrentFilter( std::unique_ptr<SvtExpFileDlg_Impl>& pImpl )
{
- SAL_WARN_IF( !_pImpl->GetCurFilter(), "fpicker.office", "restoreCurrentFilter: no current filter!" );
- SAL_WARN_IF( _pImpl->GetCurFilterDisplayName().isEmpty(), "fpicker.office", "restoreCurrentFilter: no current filter (no display name)!" );
+ SAL_WARN_IF( !pImpl->GetCurFilter(), "fpicker.office", "restoreCurrentFilter: no current filter!" );
+ SAL_WARN_IF( pImpl->GetCurFilterDisplayName().isEmpty(), "fpicker.office", "restoreCurrentFilter: no current filter (no display name)!" );
- _pImpl->SelectFilterListEntry( _pImpl->GetCurFilterDisplayName() );
+ pImpl->SelectFilterListEntry( pImpl->GetCurFilterDisplayName() );
#ifdef DBG_UTIL
OUString sSelectedDisplayName;
- DBG_ASSERT( ( _pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == _pImpl->GetCurFilter() )
- && ( sSelectedDisplayName == _pImpl->GetCurFilterDisplayName() ),
+ DBG_ASSERT( ( pImpl->GetSelectedFilterEntry( sSelectedDisplayName ) == pImpl->GetCurFilter() )
+ && ( sSelectedDisplayName == pImpl->GetCurFilterDisplayName() ),
"restoreCurrentFilter: inconsistence!" );
#endif
- return _pImpl->m_bNeedDelayedFilterExecute;
+ return pImpl->m_bNeedDelayedFilterExecute;
}
@@ -308,7 +309,7 @@ SvtFileDialog::SvtFileDialog
,_pPrevBmp( nullptr )
,_pFileView( nullptr )
,_pFileNotifier( nullptr )
- ,_pImp( new SvtExpFileDlg_Impl )
+ ,pImpl( new SvtExpFileDlg_Impl )
,_nPickerFlags( nBits )
,_bIsInExecute( false )
,m_bInExecuteAsync( false )
@@ -332,7 +333,7 @@ class CustomContainer : public vcl::Window
FocusCount
};
- SvtExpFileDlg_Impl* _pImp;
+ SvtExpFileDlg_Impl* pImpl;
VclPtr<SvtFileView> _pFileView;
VclPtr<Splitter> _pSplitter;
@@ -342,7 +343,7 @@ class CustomContainer : public vcl::Window
public:
explicit CustomContainer(vcl::Window *pParent)
: Window(pParent)
- , _pImp(nullptr)
+ , pImpl(nullptr)
, _pFileView(nullptr)
, _pSplitter(nullptr)
, m_nCurrentFocus(FocusState::Prev)
@@ -362,14 +363,14 @@ public:
vcl::Window* pPrev,
vcl::Window* pNext)
{
- _pImp = pImp;
+ pImpl = pImp;
_pFileView = pFileView;
_pSplitter = pSplitter;
m_pFocusWidgets[FocusState::Prev] = pPrev;
- m_pFocusWidgets[FocusState::Places] = _pImp->_pPlaces->GetPlacesListBox();
- m_pFocusWidgets[FocusState::Add] = _pImp->_pPlaces->GetAddButton();
- m_pFocusWidgets[FocusState::Delete] = _pImp->_pPlaces->GetDeleteButton();
+ m_pFocusWidgets[FocusState::Places] = pImpl->_pPlaces->GetPlacesListBox();
+ m_pFocusWidgets[FocusState::Add] = pImpl->_pPlaces->GetAddButton();
+ m_pFocusWidgets[FocusState::Delete] = pImpl->_pPlaces->GetDeleteButton();
m_pFocusWidgets[FocusState::FileView] = pFileView;
m_pFocusWidgets[FocusState::Next] = pNext;
}
@@ -378,7 +379,7 @@ public:
{
Window::Resize();
- if (!_pImp || !_pImp->_pPlaces)
+ if (!pImpl || !pImpl->_pPlaces)
return;
Size aSize = GetSizePixel();
@@ -391,19 +392,19 @@ public:
Size splitterNewSize = _pSplitter->GetSizePixel( );
splitterNewSize.Height() = aSize.Height();
_pSplitter->SetSizePixel( splitterNewSize );
- sal_Int32 nMinX = _pImp->_pPlaces->GetPosPixel( ).X( );
+ sal_Int32 nMinX = pImpl->_pPlaces->GetPosPixel( ).X( );
sal_Int32 nMaxX = _pFileView->GetPosPixel( ).X( ) + _pFileView->GetSizePixel( ).Width() - nMinX;
_pSplitter->SetDragRectPixel( Rectangle( Point( nMinX, 0 ), Size( nMaxX, aSize.Width() ) ) );
// Resize the places list box to fit the height of the FileView
- Size placesNewSize(_pImp->_pPlaces->GetSizePixel());
+ Size placesNewSize(pImpl->_pPlaces->GetSizePixel());
placesNewSize.Height() = aSize.Height();
- _pImp->_pPlaces->SetSizePixel( placesNewSize );
+ pImpl->_pPlaces->SetSizePixel( placesNewSize );
}
void changeFocus( bool bReverse )
{
- if( !_pFileView || !_pImp || !_pImp->_pPlaces )
+ if( !_pFileView || !pImpl || !pImpl->_pPlaces )
return;
if( bReverse && m_nCurrentFocus > FocusState::Prev && m_nCurrentFocus <= FocusState::Next )
@@ -426,7 +427,7 @@ public:
virtual void GetFocus() override
{
- if( !_pFileView || !_pImp || !_pImp->_pPlaces )
+ if( !_pFileView || !pImpl || !pImpl->_pPlaces )
return;
GetFocusFlags aFlags = GetGetFocusFlags();
@@ -483,10 +484,10 @@ SvtFileDialog::~SvtFileDialog()
void SvtFileDialog::dispose()
{
- if ( !_pImp->_aIniKey.isEmpty() )
+ if ( !pImpl->_aIniKey.isEmpty() )
{
// save window state
- SvtViewOptions aDlgOpt( E_DIALOG, _pImp->_aIniKey );
+ SvtViewOptions aDlgOpt( E_DIALOG, pImpl->_aIniKey );
aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(), osl_getThreadTextEncoding()));
OUString sUserData = _pFileView->GetConfigString();
aDlgOpt.SetUserItem( "UserData",
@@ -496,10 +497,10 @@ void SvtFileDialog::dispose()
_pFileView->SetSelectHdl( Link<SvTreeListBox*,void>() );
// Save bookmarked places
- if(_pImp->_pPlaces->IsUpdated()) {
- const std::vector<PlacePtr> aPlaces = _pImp->_pPlaces->GetPlaces();
- Sequence< OUString > placesUrlsList(_pImp->_pPlaces->GetNbEditablePlaces());
- Sequence< OUString > placesNamesList(_pImp->_pPlaces->GetNbEditablePlaces());
+ if(pImpl->_pPlaces->IsUpdated()) {
+ const std::vector<PlacePtr> aPlaces = pImpl->_pPlaces->GetPlaces();
+ Sequence< OUString > placesUrlsList(pImpl->_pPlaces->GetNbEditablePlaces());
+ Sequence< OUString > placesNamesList(pImpl->_pPlaces->GetNbEditablePlaces());
int i(0);
for(std::vector<PlacePtr>::const_iterator it = aPlaces.begin(); it != aPlaces.end(); ++it) {
if((*it)->IsEditable()) {
@@ -515,8 +516,7 @@ void SvtFileDialog::dispose()
batch->commit();
}
- delete _pImp;
- _pImp = nullptr;
+ pImpl.reset();
_pFileView.disposeAndClear();
_pSplitter.disposeAndClear();
_pContainer.disposeAndClear();
@@ -542,65 +542,65 @@ void SvtFileDialog::Init_Impl
get(_pCbSelection, "selection");
get(_pPrevWin, "preview");
get(_pPbPlay, "play");
- get(_pImp->_pCbOptions, "options");
- get(_pImp->_pFtFileName, "file_name_label");
- get(_pImp->_pEdFileName, "file_name");
- _pImp->_pEdFileName->GetFocus();
- get(_pImp->_pFtFileType, "file_type_label");
- get(_pImp->_pLbFilter, "file_type");
- get(_pImp->_pEdCurrentPath, "current_path");
- get(_pImp->_pBtnFileOpen, "open");
- get(_pImp->_pBtnCancel, "cancel");
- get(_pImp->_pBtnHelp, "help");
- get(_pImp->_pBtnConnectToServer, "connect_to_server");
- get(_pImp->_pBtnNewFolder, "new_folder");
- get(_pImp->_pCbPassword, "password");
- get(_pImp->_pCbAutoExtension, "extension");
- get(_pImp->_pFtFileVersion, "shared_label");
- get(_pImp->_pLbFileVersion, "shared");
- get(_pImp->_pFtTemplates, "shared_label");
- get(_pImp->_pLbTemplates, "shared");
- get(_pImp->_pFtImageTemplates, "shared_label");
- get(_pImp->_pLbImageTemplates, "shared");
-
- _pImp->_pLbImageTemplates->setMaxWidthChars(40);
- _pImp->_pLbFilter->setMaxWidthChars(40);
+ get(pImpl->_pCbOptions, "options");
+ get(pImpl->_pFtFileName, "file_name_label");
+ get(pImpl->_pEdFileName, "file_name");
+ pImpl->_pEdFileName->GetFocus();
+ get(pImpl->_pFtFileType, "file_type_label");
+ get(pImpl->_pLbFilter, "file_type");
+ get(pImpl->_pEdCurrentPath, "current_path");
+ get(pImpl->_pBtnFileOpen, "open");
+ get(pImpl->_pBtnCancel, "cancel");
+ get(pImpl->_pBtnHelp, "help");
+ get(pImpl->_pBtnConnectToServer, "connect_to_server");
+ get(pImpl->_pBtnNewFolder, "new_folder");
+ get(pImpl->_pCbPassword, "password");
+ get(pImpl->_pCbAutoExtension, "extension");
+ get(pImpl->_pFtFileVersion, "shared_label");
+ get(pImpl->_pLbFileVersion, "shared");
+ get(pImpl->_pFtTemplates, "shared_label");
+ get(pImpl->_pLbTemplates, "shared");
+ get(pImpl->_pFtImageTemplates, "shared_label");
+ get(pImpl->_pLbImageTemplates, "shared");
+
+ pImpl->_pLbImageTemplates->setMaxWidthChars(40);
+ pImpl->_pLbFilter->setMaxWidthChars(40);
m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
vcl::Window *pUpContainer = get<vcl::Window>("up");
- _pImp->_pBtnUp = VclPtr<SvtUpButton_Impl>::Create(pUpContainer, this, 0);
- _pImp->_pBtnUp->SetHelpId( HID_FILEOPEN_LEVELUP );
- _pImp->_pBtnUp->set_vexpand(true);
- _pImp->_pBtnUp->Show();
+ pImpl->_pBtnUp = VclPtr<SvtUpButton_Impl>::Create(pUpContainer, this, 0);
+ pImpl->_pBtnUp->SetHelpId( HID_FILEOPEN_LEVELUP );
+ pImpl->_pBtnUp->set_vexpand(true);
+ pImpl->_pBtnUp->Show();
- _pImp->_nStyle = nStyle;
- _pImp->_eMode = ( nStyle & PickerFlags::SaveAs ) ? FILEDLG_MODE_SAVE : FILEDLG_MODE_OPEN;
- _pImp->_eDlgType = FILEDLG_TYPE_FILEDLG;
+ pImpl->_nStyle = nStyle;
+ pImpl->_eMode = ( nStyle & PickerFlags::SaveAs ) ? FILEDLG_MODE_SAVE : FILEDLG_MODE_OPEN;
+ pImpl->_eDlgType = FILEDLG_TYPE_FILEDLG;
if ( nStyle & PickerFlags::PathDialog )
- _pImp->_eDlgType = FILEDLG_TYPE_PATHDLG;
+ pImpl->_eDlgType = FILEDLG_TYPE_PATHDLG;
// Set the directory for the "back to the default dir" button
INetURLObject aStdDirObj( SvtPathOptions().GetWorkPath() );
SetStandardDir( aStdDirObj.GetMainURL( INetURLObject::NO_DECODE ) );
// Create control element, the order defines the tab control.
- _pImp->_pEdFileName->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
- _pImp->_pEdFileName->SetOpenHdl( LINK( this, SvtFileDialog, OpenUrlHdl_Impl ) );
+ pImpl->_pEdFileName->SetSelectHdl( LINK( this, SvtFileDialog, EntrySelectHdl_Impl ) );
+ pImpl->_pEdFileName->SetOpenHdl( LINK( this, SvtFileDialog, OpenUrlHdl_Impl ) );
// in folder picker mode, only auto-complete directories (no files)
- bool bIsFolderPicker = ( _pImp->_eDlgType == FILEDLG_TYPE_PATHDLG );
- _pImp->_pEdFileName->SetOnlyDirectories( bIsFolderPicker );
+ bool bIsFolderPicker = ( pImpl->_eDlgType == FILEDLG_TYPE_PATHDLG );
+ pImpl->_pEdFileName->SetOnlyDirectories( bIsFolderPicker );
// in save mode, don't use the autocompletion as selection in the edit part
- bool bSaveMode = ( FILEDLG_MODE_SAVE == _pImp->_eMode );
- _pImp->_pEdFileName->SetNoURLSelection( bSaveMode );
+ bool bSaveMode = ( FILEDLG_MODE_SAVE == pImpl->_eMode );
+ pImpl->_pEdFileName->SetNoURLSelection( bSaveMode );
- _pImp->_pBtnNewFolder->SetStyle( _pImp->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
- _pImp->_pBtnUp->SetAccessibleName( _pImp->_pBtnUp->GetQuickHelpText() );
+ pImpl->_pBtnNewFolder->SetStyle( pImpl->_pBtnNewFolder->GetStyle() | WB_NOPOINTERFOCUS );
+ pImpl->_pBtnUp->SetAccessibleName( pImpl->_pBtnUp->GetQuickHelpText() );
if ( nStyle & PickerFlags::MultiSelection )
- _pImp->_bMultiSelection = true;
+ pImpl->_bMultiSelection = true;
_pContainer.reset(VclPtr<CustomContainer>::Create(get<vcl::Window>("container")));
Size aSize(LogicToPixel(Size(270, 85), MapUnit::MapAppFont));
@@ -611,8 +611,8 @@ void SvtFileDialog::Init_Impl
_pContainer->SetStyle( _pContainer->GetStyle() | WB_TABSTOP );
_pFileView = VclPtr<SvtFileView>::Create( _pContainer, WB_BORDER,
- FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType,
- _pImp->_bMultiSelection );
+ FILEDLG_TYPE_PATHDLG == pImpl->_eDlgType,
+ pImpl->_bMultiSelection );
_pFileView->Show();
_pFileView->EnableAutoResize();
_pFileView->SetHelpId( HID_FILEDLG_STANDARD );
@@ -623,7 +623,7 @@ void SvtFileDialog::Init_Impl
_pSplitter->SetSplitHdl( LINK( this, SvtFileDialog, Split_Hdl ) );
Image aNewFolderImg( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
- _pImp->_pBtnNewFolder->SetModeImage( aNewFolderImg );
+ pImpl->_pBtnNewFolder->SetModeImage( aNewFolderImg );
if ( nStyle & PickerFlags::ReadOnly )
{
@@ -635,13 +635,13 @@ void SvtFileDialog::Init_Impl
if ( nStyle & PickerFlags::Password )
{
- _pImp->_pCbPassword->SetText( SvtResId( STR_SVT_FILEPICKER_PASSWORD ) );
- _pImp->_pCbPassword->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
- _pImp->_pCbPassword->Show();
+ pImpl->_pCbPassword->SetText( SvtResId( STR_SVT_FILEPICKER_PASSWORD ) );
+ pImpl->_pCbPassword->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+ pImpl->_pCbPassword->Show();
}
// set the ini file for extracting the size
- _pImp->_aIniKey = "FileDialog";
+ pImpl->_aIniKey = "FileDialog";
AddControls_Impl( );
@@ -657,7 +657,7 @@ void SvtFileDialog::Init_Impl
if ( nStyle & PickerFlags::PathDialog )
{
- _pImp->_pFtFileName->SetText( SvtResId( STR_PATHNAME ) );
+ pImpl->_pFtFileName->SetText( SvtResId( STR_PATHNAME ) );
nResId = STR_PATHSELECT;
nButtonResId = STR_BUTTONSELECT;
}
@@ -665,23 +665,23 @@ void SvtFileDialog::Init_Impl
SetText( SvtResId( nResId ) );
if ( nButtonResId )
- _pImp->_pBtnFileOpen->SetText( SvtResId( nButtonResId ) );
+ pImpl->_pBtnFileOpen->SetText( SvtResId( nButtonResId ) );
- if ( FILEDLG_TYPE_FILEDLG != _pImp->_eDlgType )
+ if ( FILEDLG_TYPE_FILEDLG != pImpl->_eDlgType )
{
- _pImp->_pFtFileType->Hide();
- _pImp->GetFilterListControl()->Hide();
+ pImpl->_pFtFileType->Hide();
+ pImpl->GetFilterListControl()->Hide();
}
// Setting preferences of the control elements.
- _pImp->_pBtnNewFolder->SetClickHdl( LINK( this, SvtFileDialog, NewFolderHdl_Impl ) );
- _pImp->_pBtnFileOpen->SetClickHdl( LINK( this, SvtFileDialog, OpenClickHdl_Impl ) );
- _pImp->_pBtnCancel->SetClickHdl( LINK( this, SvtFileDialog, CancelHdl_Impl ) );
- _pImp->SetFilterListSelectHdl( LINK( this, SvtFileDialog, FilterSelectHdl_Impl ) );
- _pImp->_pEdFileName->SetGetFocusHdl( LINK( this, SvtFileDialog, FileNameGetFocusHdl_Impl ) );
- _pImp->_pEdFileName->SetModifyHdl( LINK( this, SvtFileDialog, FileNameModifiedHdl_Impl ) );
- _pImp->_pEdCurrentPath->SetOpenHdl ( LINK( this, SvtFileDialog, URLBoxModifiedHdl_Impl ) );
- _pImp->_pBtnConnectToServer->SetClickHdl( LINK ( this, SvtFileDialog, ConnectToServerPressed_Hdl ) );
+ pImpl->_pBtnNewFolder->SetClickHdl( LINK( this, SvtFileDialog, NewFolderHdl_Impl ) );
+ pImpl->_pBtnFileOpen->SetClickHdl( LINK( this, SvtFileDialog, OpenClickHdl_Impl ) );
+ pImpl->_pBtnCancel->SetClickHdl( LINK( this, SvtFileDialog, CancelHdl_Impl ) );
+ pImpl->SetFilterListSelectHdl( LINK( this, SvtFileDialog, FilterSelectHdl_Impl ) );
+ pImpl->_pEdFileName->SetGetFocusHdl( LINK( this, SvtFileDialog, FileNameGetFocusHdl_Impl ) );
+ pImpl->_pEdFileName->SetModifyHdl( LINK( this, SvtFileDialog, FileNameModifiedHdl_Impl ) );
+ pImpl->_pEdCurrentPath->SetOpenHdl ( LINK( this, SvtFileDialog, URLBoxModifiedHdl_Impl ) );
+ pImpl->_pBtnConnectToServer->SetClickHdl( LINK ( this, SvtFileDialog, ConnectToServerPressed_Hdl ) );
_pFileView->SetSelectHdl( LINK( this, SvtFileDialog, SelectHdl_Impl ) );
@@ -690,19 +690,19 @@ void SvtFileDialog::Init_Impl
// set timer for the filterbox travel
- _pImp->_aFilterTimer.SetTimeout( TRAVELFILTER_TIMEOUT );
- _pImp->_aFilterTimer.SetTimeoutHdl( LINK( this, SvtFileDialog, FilterSelectTimerHdl_Impl ) );
+ pImpl->_aFilterTimer.SetTimeout( TRAVELFILTER_TIMEOUT );
+ pImpl->_aFilterTimer.SetTimeoutHdl( LINK( this, SvtFileDialog, FilterSelectTimerHdl_Impl ) );
if ( PickerFlags::SaveAs & nStyle )
{
// different help ids if in save-as mode
SetHelpId( HID_FILESAVE_DIALOG );
- _pImp->_pEdFileName->SetHelpId( HID_FILESAVE_FILEURL );
- _pImp->_pBtnFileOpen->SetHelpId( HID_FILESAVE_DOSAVE );
- _pImp->_pBtnNewFolder->SetHelpId( HID_FILESAVE_CREATEDIRECTORY );
- _pImp->_pBtnUp->SetHelpId( HID_FILESAVE_LEVELUP );
- _pImp->GetFilterListControl()->SetHelpId( HID_FILESAVE_FILETYPE );
+ pImpl->_pEdFileName->SetHelpId( HID_FILESAVE_FILEURL );
+ pImpl->_pBtnFileOpen->SetHelpId( HID_FILESAVE_DOSAVE );
+ pImpl->_pBtnNewFolder->SetHelpId( HID_FILESAVE_CREATEDIRECTORY );
+ pImpl->_pBtnUp->SetHelpId( HID_FILESAVE_LEVELUP );
+ pImpl->GetFilterListControl()->SetHelpId( HID_FILESAVE_FILETYPE );
_pFileView->SetHelpId( HID_FILESAVE_FILEVIEW );
// formerly, there was only _pLbFileVersion, which was used for 3 different
@@ -710,16 +710,16 @@ void SvtFileDialog::Init_Impl
// for the extra use cases, and separated _pLbFileVersion
// I did not find out in which cases the help ID is really needed HID_FILESAVE_TEMPLATE - all
// tests I made lead to a dialog where _no_ of the three list boxes was present.
- if ( _pImp->_pLbFileVersion )
- _pImp->_pLbFileVersion->SetHelpId( HID_FILESAVE_TEMPLATE );
- if ( _pImp->_pLbTemplates )
- _pImp->_pLbTemplates->SetHelpId( HID_FILESAVE_TEMPLATE );
- if ( _pImp->_pLbImageTemplates )
- _pImp->_pLbImageTemplates->SetHelpId( HID_FILESAVE_TEMPLATE );
-
- if ( _pImp->_pCbPassword ) _pImp->_pCbPassword->SetHelpId( HID_FILESAVE_SAVEWITHPASSWORD );
- if ( _pImp->_pCbAutoExtension ) _pImp->_pCbAutoExtension->SetHelpId( HID_FILESAVE_AUTOEXTENSION );
- if ( _pImp->_pCbOptions ) _pImp->_pCbOptions->SetHelpId( HID_FILESAVE_CUSTOMIZEFILTER );
+ if ( pImpl->_pLbFileVersion )
+ pImpl->_pLbFileVersion->SetHelpId( HID_FILESAVE_TEMPLATE );
+ if ( pImpl->_pLbTemplates )
+ pImpl->_pLbTemplates->SetHelpId( HID_FILESAVE_TEMPLATE );
+ if ( pImpl->_pLbImageTemplates )
+ pImpl->_pLbImageTemplates->SetHelpId( HID_FILESAVE_TEMPLATE );
+
+ if ( pImpl->_pCbPassword ) pImpl->_pCbPassword->SetHelpId( HID_FILESAVE_SAVEWITHPASSWORD );
+ if ( pImpl->_pCbAutoExtension ) pImpl->_pCbAutoExtension->SetHelpId( HID_FILESAVE_AUTOEXTENSION );
+ if ( pImpl->_pCbOptions ) pImpl->_pCbOptions->SetHelpId( HID_FILESAVE_CUSTOMIZEFILTER );
if ( _pCbSelection ) _pCbSelection->SetHelpId( HID_FILESAVE_SELECTION );
}
@@ -729,7 +729,7 @@ void SvtFileDialog::Init_Impl
"/org.openoffice.Office.UI/FilePicker"
);
- _pContainer->init(_pImp, _pFileView, _pSplitter, _pImp->_pBtnNewFolder, _pImp->_pEdFileName);
+ _pContainer->init(pImpl.get(), _pFileView, _pSplitter, pImpl->_pBtnNewFolder, pImpl->_pEdFileName);
_pContainer->Show();
Resize();
@@ -764,8 +764,8 @@ IMPL_LINK_NOARG( SvtFileDialog, NewFolderHdl_Impl, Button*, void)
bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter )
{
// delete the old user filter and create a new one
- DELETEZ( _pImp->_pUserFilter );
- _pImp->_pUserFilter = new SvtFileDialogFilter_Impl( _rNewFilter, _rNewFilter );
+ DELETEZ( pImpl->_pUserFilter );
+ pImpl->_pUserFilter = new SvtFileDialogFilter_Impl( _rNewFilter, _rNewFilter );
// remember the extension
bool bIsAllFiles = _rNewFilter == FILEDIALOG_FILTER_ALL;
@@ -777,8 +777,8 @@ bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter )
// is always "*.<something>". But changing this would take some more time than I have now...
// now, the default extension is set to the one of the user filter (or empty)
- if ( _pImp->GetCurFilter( ) )
- SetDefaultExt( _pImp->GetCurFilter( )->GetExtension() );
+ if ( pImpl->GetCurFilter( ) )
+ SetDefaultExt( pImpl->GetCurFilter( )->GetExtension() );
else
EraseDefaultExt();
@@ -854,7 +854,7 @@ IMPL_LINK( SvtFileDialog, OpenUrlHdl_Impl, SvtURLBox*, pVoid, void )
}
void SvtFileDialog::OpenHdl_Impl(void* pVoid)
{
- if ( _pImp->_bMultiSelection && _pFileView->GetSelectionCount() > 1 )
+ if ( pImpl->_bMultiSelection && _pFileView->GetSelectionCount() > 1 )
{
// special open in case of multiselection
OpenMultiSelection_Impl();
@@ -863,7 +863,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
OUString aFileName;
OUString aOldPath( _pFileView->GetViewURL() );
- if ( _pImp->_bDoubleClick || _pFileView->HasChildPathFocus() )
+ if ( pImpl->_bDoubleClick || _pFileView->HasChildPathFocus() )
// Selection done by doubleclicking in the view, get filename from the view
aFileName = _pFileView->GetCurrentURL();
@@ -878,14 +878,14 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
if ( aFileName.isEmpty() )
{
- if ( _pImp->_eMode == FILEDLG_MODE_OPEN && _pImp->_pEdFileName->IsTravelSelect() )
+ if ( pImpl->_eMode == FILEDLG_MODE_OPEN && pImpl->_pEdFileName->IsTravelSelect() )
// OpenHdl called from URLBox; travelling through the list of URLs should not cause an opening
return; // MBA->PB: seems to be called never ?!
// get the URL from the edit field ( if not empty )
- if ( !_pImp->_pEdFileName->GetText().isEmpty() )
+ if ( !pImpl->_pEdFileName->GetText().isEmpty() )
{
- OUString aText = _pImp->_pEdFileName->GetText();
+ OUString aText = pImpl->_pEdFileName->GetText();
// did we reach the root?
if ( !INetURLObject( aOldPath ).getSegmentCount() )
@@ -902,24 +902,24 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
// go to the home directory
if ( lcl_getHomeDirectory( _pFileView->GetViewURL(), aFileName ) )
// in case we got a home dir, reset the text of the edit
- _pImp->_pEdFileName->SetText( OUString() );
+ pImpl->_pEdFileName->SetText( OUString() );
}
if ( aFileName.isEmpty() )
#endif
{
// get url from autocomplete edit
- aFileName = _pImp->_pEdFileName->GetURL();
+ aFileName = pImpl->_pEdFileName->GetURL();
}
}
- else if ( pVoid == _pImp->_pBtnFileOpen.get() )
+ else if ( pVoid == pImpl->_pBtnFileOpen.get() )
// OpenHdl was called for the "Open" Button; if edit field is empty, use selected element in the view
aFileName = _pFileView->GetCurrentURL();
}
// MBA->PB: ?!
- if ( aFileName.isEmpty() && pVoid == _pImp->_pEdFileName && _pImp->_pUserFilter )
+ if ( aFileName.isEmpty() && pVoid == pImpl->_pEdFileName && pImpl->_pUserFilter )
{
- DELETEZ( _pImp->_pUserFilter );
+ DELETEZ( pImpl->_pUserFilter );
return;
}
@@ -927,9 +927,9 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
if ( !nLen )
{
// if the dialog was opened to select a folder, the last selected folder should be selected
- if( _pImp->_eDlgType == FILEDLG_TYPE_PATHDLG )
+ if( pImpl->_eDlgType == FILEDLG_TYPE_PATHDLG )
{
- aFileName = _pImp->_pEdCurrentPath->GetText();
+ aFileName = pImpl->_pEdCurrentPath->GetText();
nLen = aFileName.getLength();
}
else
@@ -938,7 +938,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
}
// mark input as selected
- _pImp->_pEdFileName->SetSelection( Selection( 0, nLen ) );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, nLen ) );
// if a path with wildcards is given, divide the string into path and wildcards
OUString aFilter;
@@ -950,8 +950,8 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
if ( nNewFilterFlags & FLT_CHANGED )
{
// cut off all text before wildcard in edit and select wildcard
- _pImp->_pEdFileName->SetText( aFilter );
- _pImp->_pEdFileName->SetSelection( Selection( 0, aFilter.getLength() ) );
+ pImpl->_pEdFileName->SetText( aFilter );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, aFilter.getLength() ) );
}
{
@@ -999,7 +999,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
return;
if ( m_aContent.isInvalid() &&
- ( _pImp->_eMode == FILEDLG_MODE_OPEN ) )
+ ( pImpl->_eMode == FILEDLG_MODE_OPEN ) )
{
if ( !pHandler->wasUsed() )
ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTS );
@@ -1015,25 +1015,25 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
}
if ( !bIsFolder // no existent folder
- && _pImp->_pCbAutoExtension // auto extension is enabled in general
- && _pImp->_pCbAutoExtension->IsChecked() // auto extension is really to be used
+ && pImpl->_pCbAutoExtension // auto extension is enabled in general
+ && pImpl->_pCbAutoExtension->IsChecked() // auto extension is really to be used
&& !GetDefaultExt().isEmpty() // there is a default extension
&& GetDefaultExt() != "*" // the default extension is not "all"
- && !( FILEDLG_MODE_SAVE == _pImp->_eMode // we're saving a file
+ && !( FILEDLG_MODE_SAVE == pImpl->_eMode // we're saving a file
&& _pFileView->GetSelectionCount() // there is a selected file in the file view -> it will later on
) // (in SvtFileDialog::GetPathList) be taken as file to save to
- && FILEDLG_MODE_OPEN != _pImp->_eMode // #i83408# don't append extension on open
+ && FILEDLG_MODE_OPEN != pImpl->_eMode // #i83408# don't append extension on open
)
{
// check extension and append the default extension if necessary
appendDefaultExtension(aFileName,
GetDefaultExt(),
- _pImp->GetCurFilter()->GetType());
+ pImpl->GetCurFilter()->GetType());
}
- bool bOpenFolder = ( FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType ) &&
- !_pImp->_bDoubleClick && pVoid != _pImp->_pEdFileName;
+ bool bOpenFolder = ( FILEDLG_TYPE_PATHDLG == pImpl->_eDlgType ) &&
+ !pImpl->_bDoubleClick && pVoid != pImpl->_pEdFileName;
if ( bIsFolder )
{
if ( bOpenFolder )
@@ -1075,7 +1075,7 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
return;
}
- switch ( _pImp->_eMode )
+ switch ( pImpl->_eMode )
{
case FILEDLG_MODE_SAVE:
{
@@ -1149,19 +1149,19 @@ void SvtFileDialog::OpenHdl_Impl(void* pVoid)
void SvtFileDialog::EnableAutocompletion( bool _bEnable )
{
- _pImp->_pEdFileName->EnableAutocompletion( _bEnable );
+ pImpl->_pEdFileName->EnableAutocompletion( _bEnable );
}
IMPL_LINK_NOARG( SvtFileDialog, FilterSelectHdl_Impl, ListBox&, void )
{
OUString sSelectedFilterDisplayName;
- SvtFileDialogFilter_Impl* pSelectedFilter = _pImp->GetSelectedFilterEntry( sSelectedFilterDisplayName );
+ SvtFileDialogFilter_Impl* pSelectedFilter = pImpl->GetSelectedFilterEntry( sSelectedFilterDisplayName );
if ( !pSelectedFilter )
{ // there is no current selection. This happens if for instance the user selects a group separator using
// the keyboard, and then presses enter: When the selection happens, we immediately deselect the entry,
// so in this situation there is no current selection.
- if ( restoreCurrentFilter( _pImp ) )
+ if ( restoreCurrentFilter( pImpl ) )
ExecuteFilter();
}
else
@@ -1169,31 +1169,31 @@ IMPL_LINK_NOARG( SvtFileDialog, FilterSelectHdl_Impl, ListBox&, void )
if ( pSelectedFilter->isGroupSeparator() )
{ // group separators can't be selected
// return to the previously selected entry
- if ( _pImp->IsFilterListTravelSelect() )
+ if ( pImpl->IsFilterListTravelSelect() )
{
- _pImp->SetNoFilterListSelection( );
+ pImpl->SetNoFilterListSelection( );
// stop the timer for executing the filter
- if ( _pImp->_aFilterTimer.IsActive() )
- _pImp->m_bNeedDelayedFilterExecute = true;
- _pImp->_aFilterTimer.Stop();
+ if ( pImpl->_aFilterTimer.IsActive() )
+ pImpl->m_bNeedDelayedFilterExecute = true;
+ pImpl->_aFilterTimer.Stop();
}
else
{
- if ( restoreCurrentFilter( _pImp ) )
+ if ( restoreCurrentFilter( pImpl ) )
ExecuteFilter();
}
}
- else if ( ( pSelectedFilter != _pImp->GetCurFilter() )
- || _pImp->_pUserFilter
+ else if ( ( pSelectedFilter != pImpl->GetCurFilter() )
+ || pImpl->_pUserFilter
)
{
// Store the old filter for the auto extension handling
- OUString sLastFilterExt = _pImp->GetCurFilter()->GetExtension();
- DELETEZ( _pImp->_pUserFilter );
+ OUString sLastFilterExt = pImpl->GetCurFilter()->GetExtension();
+ DELETEZ( pImpl->_pUserFilter );
// if applicable remove filter of the user
- _pImp->SetCurFilter( pSelectedFilter, sSelectedFilterDisplayName );
+ pImpl->SetCurFilter( pSelectedFilter, sSelectedFilterDisplayName );
// if applicable show extension
SetDefaultExt( pSelectedFilter->GetExtension() );
@@ -1207,16 +1207,16 @@ IMPL_LINK_NOARG( SvtFileDialog, FilterSelectHdl_Impl, ListBox&, void )
// if the user is traveling fast through the filterbox
// do not filter instantly
- if ( _pImp->IsFilterListTravelSelect() )
+ if ( pImpl->IsFilterListTravelSelect() )
{
// FilterSelectHdl_Impl should be started again in
// TRAVELFILTER_TIMEOUT ms
- _pImp->_aFilterTimer.Start();
+ pImpl->_aFilterTimer.Start();
}
else
{
// stop previously started timer
- _pImp->_aFilterTimer.Stop();
+ pImpl->_aFilterTimer.Stop();
// filter the view again
ExecuteFilter();
@@ -1240,13 +1240,13 @@ IMPL_LINK_NOARG( SvtFileDialog, FileNameGetFocusHdl_Impl, Control&, void )
IMPL_LINK_NOARG( SvtFileDialog, FileNameModifiedHdl_Impl, Edit&, void )
{
- FileNameGetFocusHdl_Impl( *_pImp->_pEdFileName );
+ FileNameGetFocusHdl_Impl( *pImpl->_pEdFileName );
}
IMPL_LINK_NOARG( SvtFileDialog, URLBoxModifiedHdl_Impl, SvtURLBox*, void )
{
- OUString aPath = _pImp->_pEdCurrentPath->GetURL();
+ OUString aPath = pImpl->_pEdCurrentPath->GetURL();
OpenURL_Impl(aPath);
}
@@ -1262,7 +1262,7 @@ IMPL_LINK_NOARG( SvtFileDialog, ConnectToServerPressed_Hdl, Button*, void )
case RET_OK :
{
PlacePtr newPlace = aDlg->GetPlace();
- _pImp->_pPlaces->AppendPlace(newPlace);
+ pImpl->_pPlaces->AppendPlace(newPlace);
break;
}
@@ -1282,13 +1282,13 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, Button*, void )
PlacePtr newPlace(
new Place( aURLObj.GetLastName(INetURLObject::DECODE_WITH_CHARSET),
OUString(_pFileView->GetViewURL()), true));
- _pImp->_pPlaces->AppendPlace(newPlace);
+ pImpl->_pPlaces->AppendPlace(newPlace);
}
IMPL_LINK_NOARG ( SvtFileDialog, RemovePlacePressed_Hdl, Button*, void )
{
- _pImp->_pPlaces->RemoveSelectedPlace();
+ pImpl->_pPlaces->RemoveSelectedPlace();
}
@@ -1308,7 +1308,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
{
SvtFileDialogFilter_Impl* pFoundFilter = nullptr;
- SvtFileDialogFilterList_Impl& rList = _pImp->m_aFilter;
+ SvtFileDialogFilterList_Impl& rList = pImpl->m_aFilter;
sal_uInt16 nFilter = rList.size();
while ( nFilter-- )
@@ -1341,7 +1341,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
if ( pFoundFilter )
{
// activate filter
- _rFilterChanged = _pImp->_pUserFilter || ( _pImp->GetCurFilter() != pFilter );
+ _rFilterChanged = pImpl->_pUserFilter || ( pImpl->GetCurFilter() != pFilter );
createNewUserFilter( _rFilter );
@@ -1354,8 +1354,8 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
void SvtFileDialog::ExecuteFilter()
{
- _pImp->m_bNeedDelayedFilterExecute = false;
- executeAsync( AsyncPickerAction::eExecuteFilter, OUString(), getMostCurrentFilter( _pImp ) );
+ pImpl->m_bNeedDelayedFilterExecute = false;
+ executeAsync( AsyncPickerAction::eExecuteFilter, OUString(), getMostCurrentFilter( pImpl ) );
}
@@ -1379,7 +1379,7 @@ void SvtFileDialog::OpenMultiSelection_Impl()
void SvtFileDialog::UpdateControls( const OUString& rURL )
{
- _pImp->_pEdFileName->SetBaseURL( rURL );
+ pImpl->_pEdFileName->SetBaseURL( rURL );
INetURLObject aObj( rURL );
@@ -1403,9 +1403,9 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
}
// path mode ?
- if ( FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType )
+ if ( FILEDLG_TYPE_PATHDLG == pImpl->_eDlgType )
// -> set new path in the edit field
- _pImp->_pEdFileName->SetText( sText );
+ pImpl->_pEdFileName->SetText( sText );
// in the "current path" field, truncate the trailing slash
if ( aObj.hasFinalSlash() )
@@ -1419,7 +1419,7 @@ void SvtFileDialog::UpdateControls( const OUString& rURL )
if ( sText.isEmpty() && !rURL.isEmpty() )
// happens, for instance, for URLs which the INetURLObject does not know to belong to a hierarchical scheme
sText = rURL;
- _pImp->_pEdCurrentPath->SetText( sText );
+ pImpl->_pEdCurrentPath->SetText( sText );
}
@@ -1438,42 +1438,42 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTreeListBox*, pBox, void )
if ( pUserData )
{
INetURLObject aObj( pUserData->maURL );
- if ( FILEDLG_TYPE_PATHDLG == _pImp->_eDlgType )
+ if ( FILEDLG_TYPE_PATHDLG == pImpl->_eDlgType )
{
if ( aObj.GetProtocol() == INetProtocol::File )
{
if ( !pUserData->mbIsFolder )
aObj.removeSegment();
OUString aName = aObj.getFSysPath( (INetURLObject::FSysStyle)(INetURLObject::FSYS_DETECT & ~INetURLObject::FSYS_VOS) );
- _pImp->_pEdFileName->SetText( aName );
- _pImp->_pEdFileName->SetSelection( Selection( 0, aName.getLength() ) );
+ pImpl->_pEdFileName->SetText( aName );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, aName.getLength() ) );
_aPath = pUserData->maURL;
}
else if ( !pUserData->mbIsFolder )
{
- _pImp->_pEdFileName->SetText( pUserData->maURL );
- _pImp->_pEdFileName->SetSelection( Selection( 0, pUserData->maURL.getLength() ) );
+ pImpl->_pEdFileName->SetText( pUserData->maURL );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, pUserData->maURL.getLength() ) );
_aPath = pUserData->maURL;
}
else
- _pImp->_pEdFileName->SetText( OUString() );
+ pImpl->_pEdFileName->SetText( OUString() );
}
else
{
if ( !pUserData->mbIsFolder )
{
OUString aName = SvTabListBox::GetEntryText( pEntry, 0 );
- _pImp->_pEdFileName->SetText( aName );
- _pImp->_pEdFileName->SetSelection( Selection( 0, aName.getLength() ) );
+ pImpl->_pEdFileName->SetText( aName );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, aName.getLength() ) );
_aPath = pUserData->maURL;
}
}
}
- if ( _pImp->_bMultiSelection && _pFileView->GetSelectionCount() > 1 )
+ if ( pImpl->_bMultiSelection && _pFileView->GetSelectionCount() > 1 )
{
// clear the file edit for multiselection
- _pImp->_pEdFileName->SetText( OUString() );
+ pImpl->_pEdFileName->SetText( OUString() );
}
FileSelect();
@@ -1482,9 +1482,9 @@ IMPL_LINK( SvtFileDialog, SelectHdl_Impl, SvTreeListBox*, pBox, void )
IMPL_LINK_NOARG(SvtFileDialog, DblClickHdl_Impl, SvTreeListBox*, bool)
{
- _pImp->_bDoubleClick = true;
+ pImpl->_bDoubleClick = true;
OpenHdl_Impl( nullptr );
- _pImp->_bDoubleClick = false;
+ pImpl->_bDoubleClick = false;
return false;
}
@@ -1500,7 +1500,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView, void )
{
OUString sCurrentFolder( pView->GetViewURL() );
// check if we can create new folders
- EnableControl( _pImp->_pBtnNewFolder, ContentCanMakeFolder( sCurrentFolder ) );
+ EnableControl( pImpl->_pBtnNewFolder, ContentCanMakeFolder( sCurrentFolder ) );
// check if we can travel one level up
bool bCanTravelUp = ContentHasParentFolder( pView->GetViewURL() );
@@ -1513,7 +1513,7 @@ IMPL_LINK( SvtFileDialog, OpenDoneHdl_Impl, SvtFileView*, pView, void )
aCurrentFolder.removeSegment();
}
- EnableControl( _pImp->_pBtnUp, bCanTravelUp );
+ EnableControl( pImpl->_pBtnUp, bCanTravelUp );
}
@@ -1524,7 +1524,7 @@ IMPL_LINK_NOARG(SvtFileDialog, AutoExtensionHdl_Impl, Button*, void)
CHECKBOX_AUTOEXTENSION );
// update the extension of the current file if necessary
- lcl_autoUpdateFileExtension( this, _pImp->GetCurFilter()->GetExtension() );
+ lcl_autoUpdateFileExtension( this, pImpl->GetCurFilter()->GetExtension() );
}
@@ -1535,13 +1535,13 @@ IMPL_LINK( SvtFileDialog, ClickHdl_Impl, Button*, pCheckBox, void )
sal_Int16 nId = -1;
- if ( pCheckBox == _pImp->_pCbOptions )
+ if ( pCheckBox == pImpl->_pCbOptions )
nId = CHECKBOX_FILTEROPTIONS;
else if ( pCheckBox == _pCbSelection )
nId = CHECKBOX_SELECTION;
else if ( pCheckBox == _pCbReadOnly )
nId = CHECKBOX_READONLY;
- else if ( pCheckBox == _pImp->_pCbPassword )
+ else if ( pCheckBox == pImpl->_pCbPassword )
nId = CHECKBOX_PASSWORD;
else if ( pCheckBox == _pCbLinkBox )
nId = CHECKBOX_LINK;
@@ -1578,11 +1578,11 @@ bool SvtFileDialog::Notify( NotifyEvent& rNEvt )
sal_uInt16 nCode = rKeyCode.GetCode();
if ( !rKeyCode.GetModifier() &&
- KEY_BACKSPACE == nCode && !_pImp->_pEdFileName->HasChildPathFocus() )
+ KEY_BACKSPACE == nCode && !pImpl->_pEdFileName->HasChildPathFocus() )
{
bRet = false;
- if ( !bRet && _pImp->_pBtnUp->IsEnabled() )
+ if ( !bRet && pImpl->_pBtnUp->IsEnabled() )
{
PrevLevel_Impl();
bRet = true;
@@ -1681,7 +1681,7 @@ short SvtFileDialog::Execute()
// remember the selected directory only for file URLs not for virtual folders
sal_Int32 nLevel = aURL.getSegmentCount();
bool bDir = m_aContent.isFolder( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
- if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == _pImp->_eDlgType || !bDir ) )
+ if ( nLevel > 1 && ( FILEDLG_TYPE_FILEDLG == pImpl->_eDlgType || !bDir ) )
aURL.removeSegment();
}
}
@@ -1703,8 +1703,8 @@ void SvtFileDialog::onAsyncOperationStarted()
{
EnableUI( false );
// the cancel button must be always enabled
- _pImp->_pBtnCancel->Enable();
- _pImp->_pBtnCancel->GrabFocus();
+ pImpl->_pBtnCancel->Enable();
+ pImpl->_pBtnCancel->GrabFocus();
}
@@ -1713,7 +1713,7 @@ void SvtFileDialog::onAsyncOperationFinished()
EnableUI( true );
m_pCurrentAsyncAction = nullptr;
if ( !m_bInExecuteAsync )
- _pImp->_pEdFileName->GrabFocus();
+ pImpl->_pEdFileName->GrabFocus();
// (if m_bInExecuteAsync is true, then the operation was finished within the minimum wait time,
// and to the user, the operation appears to be synchronous)
}
@@ -1721,7 +1721,7 @@ void SvtFileDialog::onAsyncOperationFinished()
void SvtFileDialog::RemovablePlaceSelected(bool enable)
{
- _pImp->_pPlaces->SetDelEnabled( enable );
+ pImpl->_pPlaces->SetDelEnabled( enable );
}
@@ -1854,7 +1854,7 @@ short SvtFileDialog::PrepareExecute()
}
}
- if ( ( _pImp->_nStyle & PickerFlags::SaveAs ) && m_bHasFilename )
+ if ( ( pImpl->_nStyle & PickerFlags::SaveAs ) && m_bHasFilename )
// when doing a save-as, we do not want the handler to handle "this file does not exist" messages
// - finally we're going to save that file, aren't we?
m_aContent.enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::E_DOESNOTEXIST);
@@ -1863,7 +1863,7 @@ short SvtFileDialog::PrepareExecute()
// possibly just a filename without a path
OUString aFileNameOnly;
- if( !_aPath.isEmpty() && (_pImp->_eMode == FILEDLG_MODE_SAVE)
+ if( !_aPath.isEmpty() && (pImpl->_eMode == FILEDLG_MODE_SAVE)
&& (_aPath.indexOf(':') == -1)
&& (_aPath.indexOf('\\') == -1)
&& (_aPath.indexOf('/') == -1))
@@ -1876,7 +1876,7 @@ short SvtFileDialog::PrepareExecute()
if ( _aPath.isEmpty() )
{
// then use the standard directory
- _aPath = lcl_ensureFinalSlash( _pImp->GetStandardDir() );
+ _aPath = lcl_ensureFinalSlash( pImpl->GetStandardDir() );
// attach given filename to path
if ( !aFileNameOnly.isEmpty() )
@@ -1886,23 +1886,23 @@ short SvtFileDialog::PrepareExecute()
_aPath = implGetInitialURL( _aPath, GetStandardDir() );
- if ( _pImp->_nStyle & PickerFlags::SaveAs && !m_bHasFilename )
+ if ( pImpl->_nStyle & PickerFlags::SaveAs && !m_bHasFilename )
// when doing a save-as, we do not want the handler to handle "this file does not exist" messages
// - finally we're going to save that file, aren't we?
m_aContent.enableOwnInteractionHandler(::svt::OFilePickerInteractionHandler::E_DOESNOTEXIST);
// if applicable show filter
- _pImp->InitFilterList();
+ pImpl->InitFilterList();
// set up initial filter
sal_uInt16 nFilterCount = GetFilterCount();
OUString aAll = SvtResId( STR_FILTERNAME_ALL ).toString();
- bool bHasAll = _pImp->HasFilterListEntry( aAll );
- if ( _pImp->GetCurFilter() || nFilterCount == 1 || ( nFilterCount == 2 && bHasAll ) )
+ bool bHasAll = pImpl->HasFilterListEntry( aAll );
+ if ( pImpl->GetCurFilter() || nFilterCount == 1 || ( nFilterCount == 2 && bHasAll ) )
{
// if applicable set the only filter or the only filter that
// does not refer to all files, as the current one
- if ( !_pImp->GetCurFilter() )
+ if ( !pImpl->GetCurFilter() )
{
sal_uInt16 nPos = 0;
if ( 2 == nFilterCount && bHasAll )
@@ -1914,14 +1914,14 @@ short SvtFileDialog::PrepareExecute()
break;
}
}
- SvtFileDialogFilter_Impl* pNewCurFilter = _pImp->m_aFilter[ nPos ].get();
+ SvtFileDialogFilter_Impl* pNewCurFilter = pImpl->m_aFilter[ nPos ].get();
assert( pNewCurFilter && "SvtFileDialog::Execute: invalid filter pos!" );
- _pImp->SetCurFilter( pNewCurFilter, pNewCurFilter->GetName() );
+ pImpl->SetCurFilter( pNewCurFilter, pNewCurFilter->GetName() );
}
// adjust view
- _pImp->SelectFilterListEntry( _pImp->GetCurFilter()->GetName() );
- SetDefaultExt( _pImp->GetCurFilter()->GetExtension() );
+ pImpl->SelectFilterListEntry( pImpl->GetCurFilter()->GetName() );
+ SetDefaultExt( pImpl->GetCurFilter()->GetExtension() );
sal_Int32 nSepPos = GetDefaultExt().indexOf( FILEDIALOG_DEF_EXTSEP );
if ( nSepPos != -1 )
EraseDefaultExt( nSepPos );
@@ -1932,13 +1932,13 @@ short SvtFileDialog::PrepareExecute()
if ( !bHasAll )
{
SvtFileDialogFilter_Impl* pAllFilter = implAddFilter( aAll, FILEDIALOG_FILTER_ALL );
- _pImp->InsertFilterListEntry( pAllFilter );
- _pImp->SetCurFilter( pAllFilter, aAll );
+ pImpl->InsertFilterListEntry( pAllFilter );
+ pImpl->SetCurFilter( pAllFilter, aAll );
}
- _pImp->SelectFilterListEntry( aAll );
+ pImpl->SelectFilterListEntry( aAll );
}
- _pImp->_pDefaultFilter = _pImp->GetCurFilter();
+ pImpl->_pDefaultFilter = pImpl->GetCurFilter();
// if applicable isolate filter
OUString aFilter;
@@ -1949,7 +1949,7 @@ short SvtFileDialog::PrepareExecute()
sal_uInt16 nNewFilterFlags = adjustFilter( aFilter );
if ( nNewFilterFlags & ( FLT_NONEMPTY | FLT_USERFILTER ) )
{
- _pImp->_pEdFileName->SetText( aFilter );
+ pImpl->_pEdFileName->SetText( aFilter );
}
// create and show instance for set path
@@ -1960,7 +1960,7 @@ short SvtFileDialog::PrepareExecute()
if ( bFileToSelect && aFileName[ nFileNameLen - 1 ] != '/' )
{
OUString aDecodedName = aFolderURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- _pImp->_pEdFileName->SetText( aDecodedName );
+ pImpl->_pEdFileName->SetText( aDecodedName );
aFolderURL.removeSegment();
}
@@ -2035,18 +2035,18 @@ void SvtFileDialog::SetStandardDir( const OUString& rStdDir )
INetURLObject aObj( rStdDir );
SAL_WARN_IF( aObj.GetProtocol() == INetProtocol::NotValid, "fpicker.office", "Invalid protocol!" );
aObj.setFinalSlash();
- _pImp->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
+ pImpl->SetStandardDir( aObj.GetMainURL( INetURLObject::NO_DECODE ) );
}
void SvtFileDialog::SetBlackList( const css::uno::Sequence< OUString >& rBlackList )
{
- _pImp->SetBlackList( rBlackList );
+ pImpl->SetBlackList( rBlackList );
}
const css::uno::Sequence< OUString >& SvtFileDialog::GetBlackList() const
{
- return _pImp->GetBlackList();
+ return pImpl->GetBlackList();
}
@@ -2058,7 +2058,7 @@ const OUString& SvtFileDialog::GetStandardDir() const
*/
{
- return _pImp->GetStandardDir();
+ return pImpl->GetStandardDir();
}
@@ -2075,17 +2075,17 @@ void SvtFileDialog::OpenURL_Impl( const OUString& _rURL )
{
_pFileView->EndInplaceEditing();
- executeAsync( AsyncPickerAction::eOpenURL, _rURL, getMostCurrentFilter( _pImp ) );
+ executeAsync( AsyncPickerAction::eOpenURL, _rURL, getMostCurrentFilter( pImpl ) );
}
SvtFileDialogFilter_Impl* SvtFileDialog::implAddFilter( const OUString& _rFilter, const OUString& _rType )
{
SvtFileDialogFilter_Impl* pNewFilter = new SvtFileDialogFilter_Impl( _rFilter, _rType );
- _pImp->m_aFilter.push_front( std::unique_ptr<SvtFileDialogFilter_Impl>( pNewFilter ) );
+ pImpl->m_aFilter.push_front( std::unique_ptr<SvtFileDialogFilter_Impl>( pNewFilter ) );
- if ( !_pImp->GetCurFilter() )
- _pImp->SetCurFilter( pNewFilter, _rFilter );
+ if ( !pImpl->GetCurFilter() )
+ pImpl->SetCurFilter( pNewFilter, _rFilter );
return pNewFilter;
}
@@ -2115,14 +2115,14 @@ void SvtFileDialog::SetCurFilter( const OUString& rFilter )
SAL_WARN_IF( IsInExecute(), "fpicker.office", "SvtFileDialog::SetCurFilter: currently executing!" );
// look for corresponding filter
- sal_uInt16 nPos = _pImp->m_aFilter.size();
+ sal_uInt16 nPos = pImpl->m_aFilter.size();
while ( nPos-- )
{
- SvtFileDialogFilter_Impl* pFilter = _pImp->m_aFilter[ nPos ].get();
+ SvtFileDialogFilter_Impl* pFilter = pImpl->m_aFilter[ nPos ].get();
if ( pFilter->GetName() == rFilter )
{
- _pImp->SetCurFilter( pFilter, rFilter );
+ pImpl->SetCurFilter( pFilter, rFilter );
break;
}
}
@@ -2133,7 +2133,7 @@ OUString SvtFileDialog::GetCurFilter() const
{
OUString aFilter;
- const SvtFileDialogFilter_Impl* pCurrentFilter = _pImp->GetCurFilter();
+ const SvtFileDialogFilter_Impl* pCurrentFilter = pImpl->GetCurFilter();
if ( pCurrentFilter )
aFilter = pCurrentFilter->GetName();
@@ -2148,24 +2148,24 @@ OUString SvtFileDialog::getCurFilter( ) const
sal_uInt16 SvtFileDialog::GetFilterCount() const
{
- return _pImp->m_aFilter.size();
+ return pImpl->m_aFilter.size();
}
const OUString& SvtFileDialog::GetFilterName( sal_uInt16 nPos ) const
{
assert( nPos < GetFilterCount() && "invalid index" );
- return _pImp->m_aFilter[ nPos ]->GetName();
+ return pImpl->m_aFilter[ nPos ]->GetName();
}
void SvtFileDialog::InitSize()
{
- if ( _pImp->_aIniKey.isEmpty() )
+ if ( pImpl->_aIniKey.isEmpty() )
return;
// initialize from config
- SvtViewOptions aDlgOpt( E_DIALOG, _pImp->_aIniKey );
+ SvtViewOptions aDlgOpt( E_DIALOG, pImpl->_aIniKey );
if ( aDlgOpt.Exists() )
{
@@ -2187,8 +2187,8 @@ std::vector<OUString> SvtFileDialog::GetPathList() const
if ( ! pEntry )
{
- if ( !_pImp->_pEdFileName->GetText().isEmpty() && _bIsInExecute )
- aList.push_back(_pImp->_pEdFileName->GetURL());
+ if ( !pImpl->_pEdFileName->GetText().isEmpty() && _bIsInExecute )
+ aList.push_back(pImpl->_pEdFileName->GetURL());
else
aList.push_back(_aPath);
}
@@ -2282,11 +2282,11 @@ void SvtFileDialog::implUpdateImages( )
m_aImages = ImageList( SvtResId( RID_FILEPICKER_IMAGES ) );
// set the appropriate images on the buttons
- if ( _pImp->_pBtnUp )
- _pImp->_pBtnUp->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_UP ) );
+ if ( pImpl->_pBtnUp )
+ pImpl->_pBtnUp->SetModeImage( GetButtonImage( IMG_FILEDLG_BTN_UP ) );
- if ( _pImp->_pBtnNewFolder )
- _pImp->_pBtnNewFolder->SetModeImage( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
+ if ( pImpl->_pBtnNewFolder )
+ pImpl->_pBtnNewFolder->SetModeImage( GetButtonImage( IMG_FILEDLG_CREATEFOLDER ) );
}
@@ -2322,24 +2322,24 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, bool _bLabelControl )
case EDIT_FILEURL:
pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtFileName )
- : static_cast< Control* >( _pImp->_pEdFileName );
+ ? static_cast< Control* >( pImpl->_pFtFileName )
+ : static_cast< Control* >( pImpl->_pEdFileName );
break;
case EDIT_FILEURL_LABEL:
- pReturn = static_cast< Control* >( _pImp->_pFtFileName );
+ pReturn = static_cast< Control* >( pImpl->_pFtFileName );
break;
case CHECKBOX_AUTOEXTENSION:
- pReturn = _pImp->_pCbAutoExtension;
+ pReturn = pImpl->_pCbAutoExtension;
break;
case CHECKBOX_PASSWORD:
- pReturn = _pImp->_pCbPassword;
+ pReturn = pImpl->_pCbPassword;
break;
case CHECKBOX_FILTEROPTIONS:
- pReturn = _pImp->_pCbOptions;
+ pReturn = pImpl->_pCbOptions;
break;
case CHECKBOX_READONLY:
@@ -2359,53 +2359,53 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, bool _bLabelControl )
break;
case LISTBOX_FILTER:
- pReturn = _bLabelControl ? _pImp->_pFtFileType : _pImp->GetFilterListControl();
+ pReturn = _bLabelControl ? pImpl->_pFtFileType : pImpl->GetFilterListControl();
break;
case LISTBOX_FILTER_LABEL:
- pReturn = _pImp->_pFtFileType;
+ pReturn = pImpl->_pFtFileType;
break;
case FIXEDTEXT_CURRENTFOLDER:
- pReturn = _pImp->_pEdCurrentPath;
+ pReturn = pImpl->_pEdCurrentPath;
break;
case LISTBOX_VERSION:
pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtFileVersion )
- : static_cast< Control* >( _pImp->_pLbFileVersion );
+ ? static_cast< Control* >( pImpl->_pFtFileVersion )
+ : static_cast< Control* >( pImpl->_pLbFileVersion );
break;
case LISTBOX_TEMPLATE:
pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtTemplates )
- : static_cast< Control* >( _pImp->_pLbTemplates );
+ ? static_cast< Control* >( pImpl->_pFtTemplates )
+ : static_cast< Control* >( pImpl->_pLbTemplates );
break;
case LISTBOX_IMAGE_TEMPLATE:
pReturn = _bLabelControl
- ? static_cast< Control* >( _pImp->_pFtImageTemplates )
- : static_cast< Control* >( _pImp->_pLbImageTemplates );
+ ? static_cast< Control* >( pImpl->_pFtImageTemplates )
+ : static_cast< Control* >( pImpl->_pLbImageTemplates );
break;
case LISTBOX_VERSION_LABEL:
- pReturn = _pImp->_pFtFileVersion;
+ pReturn = pImpl->_pFtFileVersion;
break;
case LISTBOX_TEMPLATE_LABEL:
- pReturn = _pImp->_pFtTemplates;
+ pReturn = pImpl->_pFtTemplates;
break;
case LISTBOX_IMAGE_TEMPLATE_LABEL:
- pReturn = _pImp->_pFtImageTemplates;
+ pReturn = pImpl->_pFtImageTemplates;
break;
case PUSHBUTTON_OK:
- pReturn = _pImp->_pBtnFileOpen;
+ pReturn = pImpl->_pBtnFileOpen;
break;
case PUSHBUTTON_CANCEL:
- pReturn = _pImp->_pBtnCancel;
+ pReturn = pImpl->_pBtnCancel;
break;
case PUSHBUTTON_PLAY:
@@ -2413,15 +2413,15 @@ Control* SvtFileDialog::getControl( sal_Int16 _nControlId, bool _bLabelControl )
break;
case PUSHBUTTON_HELP:
- pReturn = _pImp->_pBtnHelp;
+ pReturn = pImpl->_pBtnHelp;
break;
case TOOLBOXBUTOON_LEVEL_UP:
- pReturn = _pImp->_pBtnUp;
+ pReturn = pImpl->_pBtnUp;
break;
case TOOLBOXBUTOON_NEW_FOLDER:
- pReturn = _pImp->_pBtnNewFolder;
+ pReturn = pImpl->_pBtnNewFolder;
break;
case LISTBOX_FILTER_SELECTOR:
@@ -2460,10 +2460,10 @@ void SvtFileDialog::AddControls_Impl( )
// create the "show preview" checkbox ( and the preview window, too ), if needed
if ( _nPickerFlags & PickerFlags::ShowPreview )
{
- _pImp->_aIniKey = "ImportGraphicDialog";
+ pImpl->_aIniKey = "ImportGraphicDialog";
// because the "<All Formats> (*.bmp,*...)" entry is to wide,
// we need to disable the auto width feature of the filter box
- _pImp->DisableFilterBoxAutoWidth();
+ pImpl->DisableFilterBoxAutoWidth();
// "preview"
_pCbPreviewBox->SetText( SvtResId( STR_SVT_FILEPICKER_SHOW_PREVIEW ) );
@@ -2484,17 +2484,17 @@ void SvtFileDialog::AddControls_Impl( )
if ( _nPickerFlags & PickerFlags::AutoExtension )
{
- _pImp->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) );
- _pImp->_pCbAutoExtension->Check();
- _pImp->_pCbAutoExtension->SetClickHdl( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) );
- _pImp->_pCbAutoExtension->Show();
+ pImpl->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) );
+ pImpl->_pCbAutoExtension->Check();
+ pImpl->_pCbAutoExtension->SetClickHdl( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) );
+ pImpl->_pCbAutoExtension->Show();
}
if ( _nPickerFlags & PickerFlags::FilterOptions )
{
- _pImp->_pCbOptions->SetText( SvtResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) );
- _pImp->_pCbOptions->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
- _pImp->_pCbOptions->Show();
+ pImpl->_pCbOptions->SetText( SvtResId( STR_SVT_FILEPICKER_FILTER_OPTIONS ) );
+ pImpl->_pCbOptions->SetClickHdl( LINK( this, SvtFileDialog, ClickHdl_Impl ) );
+ pImpl->_pCbOptions->Show();
}
if ( _nPickerFlags & PickerFlags::Selection )
@@ -2514,47 +2514,47 @@ void SvtFileDialog::AddControls_Impl( )
if ( _nPickerFlags & PickerFlags::ShowVersions )
{
- _pImp->_pFtFileVersion->SetText( SvtResId( STR_SVT_FILEPICKER_VERSION ) );
- _pImp->_pFtFileVersion->Show();
+ pImpl->_pFtFileVersion->SetText( SvtResId( STR_SVT_FILEPICKER_VERSION ) );
+ pImpl->_pFtFileVersion->Show();
- _pImp->_pLbFileVersion->SetHelpId( HID_FILEOPEN_VERSION );
- _pImp->_pLbFileVersion->Show();
+ pImpl->_pLbFileVersion->SetHelpId( HID_FILEOPEN_VERSION );
+ pImpl->_pLbFileVersion->Show();
}
else if ( _nPickerFlags & PickerFlags::Templates )
{
- _pImp->_pFtTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_TEMPLATES ) );
- _pImp->_pFtTemplates->Show();
+ pImpl->_pFtTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_TEMPLATES ) );
+ pImpl->_pFtTemplates->Show();
- _pImp->_pLbTemplates->SetHelpId( HID_FILEOPEN_VERSION );
- _pImp->_pLbTemplates->Show();
+ pImpl->_pLbTemplates->SetHelpId( HID_FILEOPEN_VERSION );
+ pImpl->_pLbTemplates->Show();
// This is strange. During the re-factoring during 96930, I discovered that this help id
// is set in the "Templates mode". This was hidden in the previous implementation.
// Shouldn't this be a more meaningfull help id.
}
else if ( _nPickerFlags & PickerFlags::ImageTemplate )
{
- _pImp->_pFtImageTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_IMAGE_TEMPLATE ) );
- _pImp->_pFtImageTemplates->Show();
+ pImpl->_pFtImageTemplates->SetText( SvtResId( STR_SVT_FILEPICKER_IMAGE_TEMPLATE ) );
+ pImpl->_pFtImageTemplates->Show();
- _pImp->_pLbImageTemplates->SetHelpId( HID_FILEOPEN_IMAGE_TEMPLATE );
- _pImp->_pLbImageTemplates->Show();
+ pImpl->_pLbImageTemplates->SetHelpId( HID_FILEOPEN_IMAGE_TEMPLATE );
+ pImpl->_pLbImageTemplates->Show();
}
- _pImp->_pPlaces = VclPtr<PlacesListBox>::Create(_pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER);
- _pImp->_pPlaces->SetHelpId("SVT_HID_FILESAVE_PLACES_LISTBOX");
+ pImpl->_pPlaces = VclPtr<PlacesListBox>::Create(_pContainer, this, SVT_RESSTR(STR_PLACES_TITLE), WB_BORDER);
+ pImpl->_pPlaces->SetHelpId("SVT_HID_FILESAVE_PLACES_LISTBOX");
Size aSize(LogicToPixel(Size(50, 85), MapUnit::MapAppFont));
- _pImp->_pPlaces->set_height_request(aSize.Height());
- _pImp->_pPlaces->set_width_request(aSize.Width());
- _pImp->_pPlaces->SetSizePixel(aSize);
- _pImp->_pPlaces->Show();
+ pImpl->_pPlaces->set_height_request(aSize.Height());
+ pImpl->_pPlaces->set_width_request(aSize.Width());
+ pImpl->_pPlaces->SetSizePixel(aSize);
+ pImpl->_pPlaces->Show();
- sal_Int32 nPosX = _pImp->_pPlaces->GetSizePixel().Width();
+ sal_Int32 nPosX = pImpl->_pPlaces->GetSizePixel().Width();
_pSplitter->SetPosPixel(Point(nPosX, 0));
nPosX += _pSplitter->GetSizePixel().Width();
_pFileView->SetPosPixel(Point(nPosX, 0));
- _pImp->_pPlaces->SetAddHdl( LINK ( this, SvtFileDialog, AddPlacePressed_Hdl ) );
- _pImp->_pPlaces->SetDelHdl( LINK ( this, SvtFileDialog, RemovePlacePressed_Hdl ) );
+ pImpl->_pPlaces->SetAddHdl( LINK ( this, SvtFileDialog, AddPlacePressed_Hdl ) );
+ pImpl->_pPlaces->SetDelHdl( LINK ( this, SvtFileDialog, RemovePlacePressed_Hdl ) );
initDefaultPlaces();
}
@@ -2615,26 +2615,26 @@ void SvtFileDialog::setImage( sal_Int16 /*aImageFormat*/, const Any& rImage )
OUString SvtFileDialog::getCurrentFileText( ) const
{
OUString sReturn;
- if ( _pImp && _pImp->_pEdFileName )
- sReturn = _pImp->_pEdFileName->GetText();
+ if ( pImpl && pImpl->_pEdFileName )
+ sReturn = pImpl->_pEdFileName->GetText();
return sReturn;
}
void SvtFileDialog::setCurrentFileText( const OUString& _rText, bool _bSelectAll )
{
- if ( _pImp && _pImp->_pEdFileName )
+ if ( pImpl && pImpl->_pEdFileName )
{
- _pImp->_pEdFileName->SetText( _rText );
+ pImpl->_pEdFileName->SetText( _rText );
if ( _bSelectAll )
- _pImp->_pEdFileName->SetSelection( Selection( 0, _rText.getLength() ) );
+ pImpl->_pEdFileName->SetSelection( Selection( 0, _rText.getLength() ) );
}
}
bool SvtFileDialog::isAutoExtensionEnabled()
{
- return _pImp->_pCbAutoExtension && _pImp->_pCbAutoExtension->IsChecked();
+ return pImpl->_pCbAutoExtension && pImpl->_pCbAutoExtension->IsChecked();
}
@@ -2710,7 +2710,7 @@ void SvtFileDialog::appendDefaultExtension(OUString& _rFileName,
void SvtFileDialog::initDefaultPlaces( )
{
PlacePtr pRootPlace( new Place( SVT_RESSTR(STR_DEFAULT_DIRECTORY), GetStandardDir() ) );
- _pImp->_pPlaces->AppendPlace( pRootPlace );
+ pImpl->_pPlaces->AppendPlace( pRootPlace );
// Load from user settings
Sequence< OUString > placesUrlsList(officecfg::Office::Common::Misc::FilePickerPlacesUrls::get(m_context));
@@ -2719,11 +2719,11 @@ void SvtFileDialog::initDefaultPlaces( )
for(sal_Int32 nPlace = 0; nPlace < placesUrlsList.getLength() && nPlace < placesNamesList.getLength(); ++nPlace)
{
PlacePtr pPlace(new Place(placesNamesList[nPlace], placesUrlsList[nPlace], true));
- _pImp->_pPlaces->AppendPlace(pPlace);
+ pImpl->_pPlaces->AppendPlace(pPlace);
}
// Reset the placesList "updated" state
- _pImp->_pPlaces->IsUpdated();
+ pImpl->_pPlaces->IsUpdated();
}
IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
@@ -2731,10 +2731,10 @@ IMPL_LINK_NOARG( SvtFileDialog, Split_Hdl, Splitter*, void )
sal_Int32 nSplitPos = _pSplitter->GetSplitPosPixel();
// Resize the places list
- sal_Int32 nPlaceX = _pImp->_pPlaces->GetPosPixel( ).X();
- Size placeSize = _pImp->_pPlaces->GetSizePixel( );
+ sal_Int32 nPlaceX = pImpl->_pPlaces->GetPosPixel( ).X();
+ Size placeSize = pImpl->_pPlaces->GetSizePixel( );
placeSize.Width() = nSplitPos - nPlaceX;
- _pImp->_pPlaces->SetSizePixel( placeSize );
+ pImpl->_pPlaces->SetSizePixel( placeSize );
// Change Pos and size of the fileview
Point fileViewPos = _pFileView->GetPosPixel();
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index f841ee44b73b..c76956bcb138 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -65,7 +65,7 @@ private:
VclPtr<SvtFileView> _pFileView;
VclPtr<Splitter> _pSplitter;
::svt::IFilePickerListener* _pFileNotifier;
- SvtExpFileDlg_Impl* _pImp;
+ std::unique_ptr<SvtExpFileDlg_Impl> pImpl;
PickerFlags _nPickerFlags;
bool _bIsInExecute : 1;