Kaydet (Commit) f90eb33a authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Caolán McNamara

DLG_FPICKER_EXPLORERFILE conversion to .ui

Change-Id: I5d8f5d0182fb6af5111b60caa29912d313c2efa0
üst 0ee6282c
......@@ -10,6 +10,7 @@
$(eval $(call gb_UIConfig_UIConfig,fps))
$(eval $(call gb_UIConfig_add_uifiles,fps,\
fpicker/uiconfig/ui/explorerfiledialog \
fpicker/uiconfig/ui/foldernamedialog \
))
......
......@@ -193,7 +193,6 @@ void SvtFilePicker::prepareExecute()
aAccess.enableControl( rEntry.m_nElementID, rEntry.m_bEnabled );
}
getDialog()->updateListboxLabelSizes();
}
if ( m_pFilterList && !m_pFilterList->empty() )
......
......@@ -11,8 +11,6 @@
#include <vcl/fpicker.hrc>
#define DLG_FPICKER_EXPLORERFILE (RID_FPICKER_START+14)
#define DLG_FPICKER_PLACE_EDIT (RID_FPICKER_START+16)
#define RID_FILEPICKER_IMAGES (RID_FPICKER_START+17)
......
......@@ -53,8 +53,8 @@ void PlacesListBox_Impl::MouseButtonUp( const MouseEvent& rMEvt )
mpParent->updateView( );
}
PlacesListBox::PlacesListBox( SvtFileDialog* pFileDlg, const OUString& rTitle, const ResId& rResId ) :
Control( pFileDlg, rResId ),
PlacesListBox::PlacesListBox( Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits ) :
Control( pParent, nBits ),
maPlaces( ),
mpDlg( pFileDlg ),
mpImpl( NULL ),
......
......@@ -48,7 +48,7 @@ class PlacesListBox : public Control
bool mbSelectionChanged;
public:
PlacesListBox( SvtFileDialog* pFileDlg, const OUString& rTitle, const ResId& rResId );
PlacesListBox( Window* pParent, SvtFileDialog* pFileDlg, const OUString& rTitle, WinBits nBits );
virtual ~PlacesListBox( );
void AppendPlace( PlacePtr pPlace );
......
This diff is collapsed.
......@@ -21,50 +21,26 @@
#define _SVTOOLS_IODLGIMPL_HRC
#include "svtools/helpid.hrc"
#include <vcl/fpicker.hrc>
// ModalDialog DLG_SVT_EXPLORERFILE
#define ED_EXPLORERFILE_CURRENTPATH 10
#define BTN_EXPLORERFILE_NEWFOLDER 11
#define BTN_EXPLORERFILE_UP 12
#define BTN_EXPLORERFILE_OPEN 14
#define BTN_EXPLORERFILE_CANCEL 15
#define BTN_EXPLORERFILE_HELP 16
#define IMG_FILEDLG_BTN_UP 10
#define IMG_FILEDLG_BTN_STD 11
#define IMG_FILEDLG_CREATEFOLDER 14
#define IMG_FILEDLG_PLACE_LOCAL 15
#define IMG_FILEDLG_PLACE_REMOTE 16
#define CTL_EXPLORERFILE_FILELIST 20
#define FT_EXPLORERFILE_FILENAME 30
#define ED_EXPLORERFILE_FILENAME 31
#define FT_EXPLORERFILE_SHARED_LISTBOX 32
#define LB_EXPLORERFILE_SHARED_LISTBOX 33
#define FT_EXPLORERFILE_FILETYPE 34
#define LB_EXPLORERFILE_FILETYPE 35
#define CB_EXPLORERFILE_READONLY 40
#define CB_EXPLORERFILE_PASSWORD 41
#define CB_AUTO_EXTENSION 42
#define CB_OPTIONS 43
#define LB_EXPLORERFILE_PLACES_LISTBOX 50
#define BTN_EXPLORERFILE_CONNECT_TO_SERVER 51
#define EXPLORERFILE_SPLITTER 52
#define STR_EXPLORERFILE_OPEN 1
#define STR_EXPLORERFILE_SAVE 2
#define STR_EXPLORERFILE_BUTTONSAVE 3
#define STR_PATHNAME 4
#define STR_PATHSELECT 5
#define STR_BUTTONSELECT 6
#define STR_ACTUALVERSION 7
#define STR_PREVIEW 8
#define STR_DEFAULT_DIRECTORY 9
#define STR_PLACES_TITLE 10
#define STR_EXPLORERFILE_OPEN (RID_FPICKER_START+31)
#define STR_EXPLORERFILE_SAVE (RID_FPICKER_START+32)
#define STR_EXPLORERFILE_BUTTONSAVE (RID_FPICKER_START+33)
#define STR_PATHNAME (RID_FPICKER_START+34)
#define STR_PATHSELECT (RID_FPICKER_START+35)
#define STR_BUTTONSELECT (RID_FPICKER_START+36)
#define STR_ACTUALVERSION (RID_FPICKER_START+37)
#define STR_PREVIEW (RID_FPICKER_START+38)
#define STR_DEFAULT_DIRECTORY (RID_FPICKER_START+39)
#define STR_PLACES_TITLE (RID_FPICKER_START+40)
#endif
......
......@@ -161,7 +161,6 @@ private:
// removes a filter with wildcards from the path and returns it
bool IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter );
void implArrangeControls();
void implUpdateImages( );
protected:
......@@ -176,8 +175,6 @@ protected:
OUString _aPath;
OUString _aDefExt;
void ReleaseOwnership( Window* pUserControl );
/** enables or disables the complete UI of the file picker, with only offering a
cancel button
......@@ -260,9 +257,6 @@ public:
void displayIOException( const OUString& _rURL, ::com::sun::star::ucb::IOErrorCode _eCode );
// originally from VclFileDialog
virtual bool AddControl( Window* pControl, sal_Bool bNewLine = sal_False );
// inline
inline void SetPath( const OUString& rNewURL );
inline void SetHasFilename( bool bHasFilename );
......@@ -284,13 +278,6 @@ public:
bool ContentCanMakeFolder( const OUString& rURL );
bool ContentGetTitle( const OUString& rURL, OUString& rTitle );
/** updates the sizes of the listboxes in the bottom area of the dialog, and of their labels,
according to the space occupied by the current label texts
@since #i42824#
*/
void updateListboxLabelSizes();
private:
SvtFileDialogFilter_Impl* implAddFilter( const OUString& _rFilter, const OUString& _rType );
......
......@@ -47,200 +47,48 @@ ImageList RID_FILEPICKER_IMAGES
FILEPICKER_IL_IDLIST
};
// dialogs *******************************************************************
// strings *******************************************************************
ModalDialog DLG_FPICKER_EXPLORERFILE
String STR_EXPLORERFILE_OPEN
{
OutputSize = TRUE ;
SVLook = TRUE ;
Moveable = TRUE ;
Closeable = TRUE ;
Sizeable = TRUE;
HelpId = HID_EXPLORERDLG_FILE ;
Size = MAP_APPFONT ( 280 , 174 ) ;
ComboBox ED_EXPLORERFILE_CURRENTPATH
{
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 90 , 12 ) ;
Border = TRUE ;
};
ImageButton BTN_EXPLORERFILE_NEWFOLDER
{
HelpID = "fpicker:ImageButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_NEWFOLDER";
TabStop = FALSE ;
Pos = MAP_APPFONT ( 59 , 6 ) ;
Size = MAP_APPFONT( 12, 12 ) ;
QuickHelpText [ en-US ] = "Create New Folder" ;
};
MenuButton BTN_EXPLORERFILE_UP
{
HelpID = "fpicker:MenuButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_UP";
TabStop = FALSE ;
Pos = MAP_APPFONT ( 109 , 6 ) ;
Size = MAP_APPFONT( 12, 12 ) ;
QuickHelpText [ en-US ] = "Up One Level" ;
};
Splitter EXPLORERFILE_SPLITTER
{
Pos = MAP_APPFONT( 56, 26 );
Size = MAP_APPFONT( 3, 85 );
HScroll = TRUE;
};
Control LB_EXPLORERFILE_PLACES_LISTBOX
{
HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_PLACES_LISTBOX";
Pos = MAP_APPFONT ( 6 , 26 ) ;
Size = MAP_APPFONT ( 50 , 85 ) ;
Border = TRUE ;
};
PushButton BTN_EXPLORERFILE_CONNECT_TO_SERVER
{
HelpID = "fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_CONNECT_TO_SERVER";
Pos = MAP_APPFONT ( 94 , 6 ) ;
Size = MAP_APPFONT ( 50 , 12 ) ;
Text [ en-US ] = "Servers..." ;
QuickHelpText [ en-US ] = "Connect To Server" ;
};
Control CTL_EXPLORERFILE_FILELIST
{
TabStop = TRUE ;
Pos = MAP_APPFONT ( 59 , 26 ) ;
Size = MAP_APPFONT ( 215 , 85 ) ;
Border = TRUE ;
};
FixedText FT_EXPLORERFILE_FILENAME
{
Pos = MAP_APPFONT ( 6 , 118 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "File ~name:" ;
};
ComboBox ED_EXPLORERFILE_FILENAME
{
HelpID = "fpicker:Edit:DLG_SVT_EXPLORERFILE:ED_EXPLORERFILE_FILENAME";
Pos = MAP_APPFONT ( 59 , 117 ) ;
Size = MAP_APPFONT ( 159 , 12 ) ;
Border = TRUE ;
DropDown = TRUE ;
AutoSize = TRUE ;
AutoHScroll = TRUE ;
};
FixedText FT_EXPLORERFILE_SHARED_LISTBOX
{
Pos = MAP_APPFONT ( 6 , 133 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
// Note: this control does not have a text. The text is filled at runtime from the STR_SVT_FILEPICKER_VERSION,
// STR_SVT_FILEPICKER_TEMPLATES, or STR_SVT_FILEPICKER_IMAGE_TEMPLATE resource
};
ListBox LB_EXPLORERFILE_SHARED_LISTBOX
{
HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_SHARED_LISTBOX";
Pos = MAP_APPFONT ( 59 , 132 ) ;
Size = MAP_APPFONT ( 159 , 40 ) ;
DropDown = TRUE ;
AutoSize = TRUE ;
AutoHScroll = TRUE ;
};
FixedText FT_EXPLORERFILE_FILETYPE
{
Pos = MAP_APPFONT ( 6 , 148 ) ;
Size = MAP_APPFONT ( 50 , 10 ) ;
Text [ en-US ] = "File ~type:" ;
};
ListBox LB_EXPLORERFILE_FILETYPE
{
HelpID = "fpicker:ListBox:DLG_SVT_EXPLORERFILE:LB_EXPLORERFILE_FILETYPE";
Pos = MAP_APPFONT ( 59 , 147 ) ;
Size = MAP_APPFONT ( 159 , 80 ) ;
DropDown = TRUE ;
AutoSize = TRUE ;
AutoHScroll = TRUE ;
Sort = FALSE ;
};
CheckBox CB_EXPLORERFILE_READONLY
{
HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_READONLY";
Size = MAP_APPFONT ( 80 , 10 ) ;
Text [ en-US ] = "~Read-only" ;
};
CheckBox CB_EXPLORERFILE_PASSWORD
{
HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_EXPLORERFILE_PASSWORD";
Size = MAP_APPFONT ( 100, 10 ) ;
Text [ en-US ] = "Save with password" ;
};
CheckBox CB_AUTO_EXTENSION
{
HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_AUTO_EXTENSION";
Size = MAP_APPFONT ( 160 , 10 ) ;
Text [ en-US ] = "~Automatic file name extension" ;
};
CheckBox CB_OPTIONS
{
HelpID = "fpicker:CheckBox:DLG_SVT_EXPLORERFILE:CB_OPTIONS";
Size = MAP_APPFONT ( 120 , 10 ) ;
Text [ en-US ] = "Edit ~filter settings";
};
PushButton BTN_EXPLORERFILE_OPEN
{
HelpID = "fpicker:PushButton:DLG_SVT_EXPLORERFILE:BTN_EXPLORERFILE_OPEN";
Pos = MAP_APPFONT ( 224 , 117 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
Text [ en-US ] = "~Open" ;
};
CancelButton BTN_EXPLORERFILE_CANCEL
{
Pos = MAP_APPFONT ( 224 , 134 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
HelpButton BTN_EXPLORERFILE_HELP
{
Pos = MAP_APPFONT ( 224 , 151 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
};
String STR_EXPLORERFILE_OPEN
{
Text [ en-US ] = "Open" ;
};
String STR_EXPLORERFILE_SAVE
{
Text [ en-US ] = "Save as" ;
};
String STR_EXPLORERFILE_BUTTONSAVE
{
Text [ en-US ] = "~Save" ;
};
String STR_PATHNAME
{
Text [ en-US ] = "~Path:" ;
};
String STR_PATHSELECT
{
Text [ en-US ] = "Select path" ;
};
String STR_BUTTONSELECT
{
Text [ en-US ] = "~Select";
};
String STR_ACTUALVERSION
{
Text [ en-US ] = "Current version";
};
String STR_PREVIEW
{
Text [ en-US ] = "File Preview";
};
String STR_DEFAULT_DIRECTORY
{
Text [ en-US ] = "My Documents" ;
};
String STR_PLACES_TITLE
{
Text [ en-US ] = "Places" ;
};
Text [ en-US ] = "Open" ;
};
String STR_EXPLORERFILE_SAVE
{
Text [ en-US ] = "Save as" ;
};
String STR_EXPLORERFILE_BUTTONSAVE
{
Text [ en-US ] = "~Save" ;
};
String STR_PATHNAME
{
Text [ en-US ] = "~Path:" ;
};
String STR_PATHSELECT
{
Text [ en-US ] = "Select path" ;
};
String STR_BUTTONSELECT
{
Text [ en-US ] = "~Select";
};
String STR_ACTUALVERSION
{
Text [ en-US ] = "Current version";
};
String STR_PREVIEW
{
Text [ en-US ] = "File Preview";
};
String STR_DEFAULT_DIRECTORY
{
Text [ en-US ] = "My Documents" ;
};
String STR_PLACES_TITLE
{
Text [ en-US ] = "Places" ;
};
// strings *******************************************************************
String RID_FILEOPEN_NOTEXISTENTFILE
{
......
......@@ -91,13 +91,13 @@ SvtFileDialogFilter_Impl::~SvtFileDialogFilter_Impl()
SvtFileDialogURLSelector::SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId )
:MenuButton ( _pParent, _rResId )
,m_pParent ( _pParent )
SvtFileDialogURLSelector::SvtFileDialogURLSelector( Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId )
:MenuButton ( _pParent, nBits )
,m_pDlg ( _pDlg )
,m_pMenu ( new PopupMenu )
{
SetStyle( GetStyle() | WB_NOPOINTERFOCUS | WB_RECTSTYLE | WB_SMALLSTYLE );
SetModeImage( m_pParent->GetButtonImage( _nButtonId ) );
SetModeImage( _pDlg->GetButtonImage( _nButtonId ) );
SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
SetDropDown( PUSHBUTTON_DROPDOWN_TOOLBOX );
}
......@@ -123,8 +123,8 @@ void SvtFileDialogURLSelector::Activate()
SvtUpButton_Impl::SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId )
:SvtFileDialogURLSelector( pParent, rResId, IMG_FILEDLG_BTN_UP )
SvtUpButton_Impl::SvtUpButton_Impl( Window *pParent, SvtFileDialog* pDlg, WinBits nBits )
:SvtFileDialogURLSelector( pParent, pDlg, nBits, IMG_FILEDLG_BTN_UP )
{
}
......@@ -190,19 +190,19 @@ void SvtUpButton_Impl::Select()
}
}
void SvtUpButton_Impl::Click()
{
GetDialogParent()->PrevLevel_Impl();
}
Size SvtUpButton_Impl::GetOptimalSize() const
{
return LogicToPixel(Size(12, 12), MAP_APPFONT);
}
// SvtExpFileDlg_Impl
SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
_pLbFilter ( NULL ),
_pCurFilter ( NULL ),
_pFilter ( new SvtFileDialogFilterList_Impl() ),
_pUserFilter ( NULL ),
......@@ -215,6 +215,7 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
_pFtImageTemplates ( NULL ),
_pLbImageTemplates ( NULL ),
_pFtFileType ( NULL ),
_pLbFilter ( NULL ),
_pBtnFileOpen ( NULL ),
_pBtnCancel ( NULL ),
_pBtnHelp ( NULL ),
......@@ -234,7 +235,6 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
m_bNeedDelayedFilterExecute ( false ),
_pDefaultFilter ( NULL ),
_bMultiSelection ( false ),
_nFixDeltaHeight ( 0 ),
_bFolderHasOpened ( false )
{
}
......@@ -243,29 +243,10 @@ SvtExpFileDlg_Impl::SvtExpFileDlg_Impl( WinBits ) :
SvtExpFileDlg_Impl::~SvtExpFileDlg_Impl()
{
delete _pEdCurrentPath;
delete _pCbPassword;
delete _pCbAutoExtension;
delete _pCbOptions;
delete _pBtnNewFolder;
delete _pBtnUp;
delete _pBtnHelp;
delete _pBtnCancel;
delete _pBtnFileOpen;
delete _pLbFilter;
delete _pFtFileType;
delete _pLbFileVersion;
delete _pFtFileVersion;
delete _pFtTemplates;
delete _pLbTemplates;
delete _pFtImageTemplates;
delete _pLbImageTemplates;
delete _pEdFileName;
delete _pFtFileName;
delete _pUserFilter;
delete _pFilter;
delete _pPlaces;
delete _pBtnConnectToServer;
}
......@@ -343,16 +324,4 @@ void SvtExpFileDlg_Impl::InitFilterList( )
InsertFilterListEntry( &(*_pFilter)[ nPos-- ] );
}
void SvtExpFileDlg_Impl::CreateFilterListControl( Window* _pParent, const ResId& _rId )
{
DBG_ASSERT( !_pLbFilter, "SvtExpFileDlg_Impl::CreateFilterListControl: already created the control!" );
if ( !_pLbFilter )
{
_pLbFilter = new ListBox( _pParent, _rId );
_pLbFilter->SetDropDownLineCount( 10 );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -79,18 +79,18 @@ enum SvtFileDlgType
class SvtFileDialogURLSelector : public MenuButton
{
private:
SvtFileDialog* m_pParent;
SvtFileDialog* m_pDlg;
PopupMenu* m_pMenu;
protected:
inline SvtFileDialog* GetDialogParent() { return m_pParent; }
inline SvtFileDialog* GetDialogParent() { return m_pDlg; }
protected:
virtual void FillURLMenu( PopupMenu* _pMenu ) = 0;
protected:
SvtFileDialogURLSelector( SvtFileDialog* _pParent, const ResId& _rResId, sal_uInt16 _nButtonId );
SvtFileDialogURLSelector( Window* _pParent, SvtFileDialog* _pDlg, WinBits nBits, sal_uInt16 _nButtonId );
virtual ~SvtFileDialogURLSelector();
virtual void Activate() SAL_OVERRIDE;
......@@ -102,13 +102,14 @@ private:
std::vector<OUString> _aURLs;
public:
SvtUpButton_Impl( SvtFileDialog* pParent, const ResId& rResId );
SvtUpButton_Impl( Window* pParent, SvtFileDialog* pDlg, WinBits nBits );
virtual ~SvtUpButton_Impl();
protected:
virtual void FillURLMenu( PopupMenu* _pMenu ) SAL_OVERRIDE;
virtual void Select() SAL_OVERRIDE;
virtual void Click() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
};
typedef sal_uInt8 SvtFileDlgState;
......@@ -123,8 +124,6 @@ private:
DECL_STATIC_LINK( SvtExpFileDlg_Impl, UnClickHdl, Button* );
private:
ListBox* _pLbFilter;
const SvtFileDialogFilter_Impl* _pCurFilter;
OUString m_sCurrentFilterDisplayName; // may differ from _pCurFilter->GetName in case it is a cached entry
......@@ -147,11 +146,12 @@ public:
ListBox* _pLbImageTemplates;
FixedText* _pFtFileType;
ListBox* _pLbFilter;
PushButton* _pBtnFileOpen;
PushButton* _pBtnCancel;
HelpButton* _pBtnHelp;
SvtUpButton_Impl* _pBtnUp;
ImageButton* _pBtnNewFolder;
PushButton* _pBtnNewFolder;
CheckBox* _pCbPassword;
SvtURLBox* _pEdCurrentPath;
CheckBox* _pCbAutoExtension;
......@@ -182,7 +182,6 @@ public:
bool _bMultiSelection;
// remember fixsizes for resize
long _nFixDeltaHeight;
Size _a6Size;
Size _aDlgSize;
OUString _aIniKey;
......@@ -203,7 +202,6 @@ public:
// access to the filter listbox only as Control* - we want to maintain the entries/userdata ourself
Control* GetFilterListControl() { return _pLbFilter; }
const Control* GetFilterListControl() const { return _pLbFilter; }
void CreateFilterListControl( Window* _pParent, const ResId& _rId );
inline void SetFilterListSelectHdl( const Link& _rHandler );
// inits the listbox for the filters from the filter list (_pFilter)
......
This diff is collapsed.
......@@ -80,7 +80,7 @@ protected:
virtual void GetFocus() SAL_OVERRIDE;
public:
SvtFileView( Window* pParent, const ResId& rResId, bool bOnlyFolder, bool bMultiSelection );
SvtFileView( Window* pParent, WinBits nBits, bool bOnlyFolder, bool bMultiSelection );
SvtFileView( Window* pParent, const ResId& rResId, sal_uInt8 nFlags );
virtual ~SvtFileView();
......
......@@ -1100,11 +1100,10 @@ bool ViewTabListBox_Impl::Kill( const OUString& rContent )
// class SvtFileView -----------------------------------------------------
SvtFileView::SvtFileView( Window* pParent, const ResId& rResId,
SvtFileView::SvtFileView( Window* pParent, WinBits nBits,
bool bOnlyFolder, bool bMultiSelection ) :
Control( pParent, rResId )
Control( pParent, nBits )
{
sal_Int8 nFlags = 0;
if ( bOnlyFolder )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment