summaryrefslogtreecommitdiff
path: root/fpicker/source/office/iodlg.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'fpicker/source/office/iodlg.hxx')
-rw-r--r--fpicker/source/office/iodlg.hxx131
1 files changed, 58 insertions, 73 deletions
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index e6adff2657c6..bd5d9225b676 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -44,9 +44,8 @@
class SvTabListBox;
class SvtFileView;
class SvtFileDialogFilter_Impl;
-class SvtURLBox;
class SvtExpFileDlg_Impl;
-class CustomContainer;
+class URLBox;
enum class AdjustFilterFlags {
NONE = 0x0000,
@@ -62,25 +61,24 @@ namespace o3tl {
class SvtFileDialog final : public SvtFileDialog_Base
{
private:
- VclPtr<CheckBox> _pCbReadOnly;
- VclPtr<CheckBox> _pCbLinkBox;
- VclPtr<CheckBox> _pCbPreviewBox;
- VclPtr<CheckBox> _pCbSelection;
- VclPtr<PushButton> _pPbPlay;
- VclPtr<vcl::Window> _pPrevWin;
- VclPtr<FixedBitmap> _pPrevBmp;
- VclPtr<CustomContainer> _pContainer;
- VclPtr<SvtFileView> _pFileView;
- VclPtr<Splitter> _pSplitter;
- ::svt::IFilePickerListener* _pFileNotifier;
- std::unique_ptr<SvtExpFileDlg_Impl> pImpl;
- PickerFlags _nPickerFlags;
- bool _bIsInExecute : 1;
+ std::unique_ptr<weld::CheckButton> m_xCbReadOnly;
+ std::unique_ptr<weld::CheckButton> m_xCbLinkBox;
+ std::unique_ptr<weld::CheckButton> m_xCbPreviewBox;
+ std::unique_ptr<weld::CheckButton> m_xCbSelection;
+ std::unique_ptr<weld::Button> m_xPbPlay;
+ std::unique_ptr<weld::Widget> m_xPreviewFrame;
+ std::unique_ptr<weld::Image> m_xPrevBmp;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<SvtFileView> m_xFileView;
+ ::svt::IFilePickerListener* m_pFileNotifier;
+ std::unique_ptr<SvtExpFileDlg_Impl> m_xImpl;
+ Size m_aPreviewSize;
+ PickerFlags m_nPickerFlags;
+ bool m_bIsInExecute : 1;
::svt::SmartContent m_aContent;
- ::std::set< VclPtr<Control> >
- m_aDisabledControls;
+ ::std::set<weld::Widget*> m_aDisabledControls;
::utl::OConfigurationNode m_aConfiguration;
::rtl::Reference< ::svt::AsyncPickerAction >
@@ -88,26 +86,26 @@ private:
bool m_bInExecuteAsync;
bool m_bHasFilename;
css::uno::Reference < css::uno::XComponentContext >
- m_context;
+ m_xContext;
- DECL_LINK( FilterSelectHdl_Impl, ListBox&, void );
+ DECL_LINK( FilterSelectHdl_Impl, weld::ComboBox&, void );
DECL_LINK( FilterSelectTimerHdl_Impl, Timer*, void );
- DECL_LINK( NewFolderHdl_Impl, Button*, void );
- DECL_LINK( OpenUrlHdl_Impl, SvtURLBox*, void );
- DECL_LINK( OpenClickHdl_Impl, Button*, void );
- DECL_LINK( CancelHdl_Impl, Button*, void );
- DECL_LINK( FileNameGetFocusHdl_Impl, Control&, void );
- DECL_LINK( FileNameModifiedHdl_Impl, Edit&, void );
-
- DECL_LINK( URLBoxModifiedHdl_Impl, SvtURLBox*, void );
- DECL_LINK( ConnectToServerPressed_Hdl, Button*, void );
-
- DECL_LINK( AddPlacePressed_Hdl, Button*, void );
- DECL_LINK( RemovePlacePressed_Hdl, Button*, void );
- DECL_LINK( Split_Hdl, Splitter*, void );
-
- void OpenHdl_Impl(void const * pVoid);
- void Init_Impl( PickerFlags nBits );
+ DECL_LINK( NewFolderHdl_Impl, weld::Button&, void );
+ DECL_LINK( OpenUrlHdl_Impl, weld::ComboBox&, bool );
+ DECL_LINK( OpenClickHdl_Impl, weld::Button&, void );
+ DECL_LINK( CancelHdl_Impl, weld::Button&, void );
+ DECL_LINK( FileNameGetFocusHdl_Impl, weld::Widget&, void );
+ DECL_LINK( FileNameModifiedHdl_Impl, weld::ComboBox&, void );
+
+ DECL_LINK( URLBoxModifiedHdl_Impl, weld::ComboBox&, bool );
+ DECL_LINK( ConnectToServerPressed_Hdl, weld::Button&, void );
+
+ DECL_LINK( AddPlacePressed_Hdl, weld::Button&, void );
+ DECL_LINK( RemovePlacePressed_Hdl, weld::Button&, void );
+ DECL_LINK( PreviewSizeAllocHdl, const Size&, void);
+
+ void OpenHdl_Impl(void const * pVoid);
+
/** find a filter with the given wildcard
@param _rFilter
the wildcard pattern to look for in the filter list
@@ -126,24 +124,20 @@ private:
void OpenMultiSelection_Impl();
void AddControls_Impl( );
- DECL_LINK( SelectHdl_Impl, SvTreeListBox*, void );
- DECL_LINK( DblClickHdl_Impl, SvTreeListBox*, bool);
- DECL_LINK( EntrySelectHdl_Impl, ComboBox&, void);
- DECL_LINK( OpenDoneHdl_Impl, SvtFileView*, void );
- DECL_LINK( AutoExtensionHdl_Impl, Button*, void);
- DECL_LINK( ClickHdl_Impl, Button*, void );
- DECL_LINK( PlayButtonHdl_Impl, Button*, void);
-
+ DECL_LINK(SelectHdl_Impl, SvtFileView*, void);
+ DECL_LINK(DblClickHdl_Impl, SvtFileView*, bool);
+ DECL_LINK(EntrySelectHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(OpenDoneHdl_Impl, SvtFileView*, void);
+ DECL_LINK(AutoExtensionHdl_Impl, weld::Button&, void);
+ DECL_LINK(ClickHdl_Impl, weld::Button&, void);
+ DECL_LINK(PlayButtonHdl_Impl, weld::Button&, void);
+ DECL_LINK(SizeAllocHdl, const Size&, void);
// removes a filter with wildcards from the path and returns it
static bool IsolateFilterFromPath_Impl( OUString& rPath, OUString& rFilter );
- void implUpdateImages( );
-
- virtual bool EventNotify( NotifyEvent& rNEvt ) override;
-
- OUString _aPath;
- OUString _aDefExt;
+ OUString m_aPath;
+ OUString m_aDefExt;
/** enables or disables the complete UI of the file picker, with only offering a
cancel button
@@ -158,19 +152,17 @@ private:
/** enables or disables a control
- You are strongly encouraged to prefer this method over pControl->Enable( _bEnable ). See
+ You are strongly encouraged to prefer this method over pControl->Enable( bEnable ). See
<member>EnableUI</member> for details.
*/
- void EnableControl( Control* _pControl, bool _bEnable );
- bool PrepareExecute();
+ void EnableControl(weld::Widget* pControl, bool bEnable);
+ virtual bool PrepareExecute() override;
public:
- SvtFileDialog( vcl::Window* _pParent, PickerFlags nBits );
+ SvtFileDialog( weld::Window* pParent, PickerFlags nBits );
virtual ~SvtFileDialog() override;
- virtual void dispose() override;
- virtual short Execute() override;
- virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext &rCtx) override;
+ virtual short run() override;
void FileSelect();
void FilterSelect() override;
@@ -193,9 +185,6 @@ public:
sal_uInt16 GetFilterCount() const;
const OUString& GetFilterName( sal_uInt16 nPos ) const;
- virtual void Resize() override;
- virtual void DataChanged( const DataChangedEvent& _rDCEvt ) override;
-
void PrevLevel_Impl();
void OpenURL_Impl( const OUString& rURL );
@@ -205,9 +194,8 @@ public:
void UpdateControls( const OUString& rURL ) override;
void EnableAutocompletion( bool _bEnable = true ) override;
- void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) override { _pFileNotifier = pNotifier; }
+ void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) override { m_pFileNotifier = pNotifier; }
- sal_Int32 getTargetColorDepth() override;
sal_Int32 getAvailableWidth() override;
sal_Int32 getAvailableHeight() override;
void setImage( const css::uno::Any& rImage ) override;
@@ -232,8 +220,6 @@ public:
inline void EraseDefaultExt( sal_Int32 _nIndex = 0 );
inline const OUString& GetDefaultExt() const;
- static Image GetButtonImage(const OUString& rButtonId);
-
bool ContentIsFolder( const OUString& rURL ) override { return m_aContent.isFolder( rURL ) && m_aContent.isValid(); }
bool ContentHasParentFolder( const OUString& rURL );
bool ContentCanMakeFolder( const OUString& rURL );
@@ -242,7 +228,7 @@ public:
private:
SvtFileDialogFilter_Impl* implAddFilter( const OUString& _rFilter, const OUString& _rType );
- /** updates _pUserFilter with a new filter
+ /** updates m_xUserFilter with a new filter
<p>No checks for necessity are made.</p>
*/
void createNewUserFilter( const OUString& _rNewFilter );
@@ -250,7 +236,7 @@ private:
AdjustFilterFlags adjustFilter( const OUString& _rFilter );
// IFilePickerController, needed by OControlAccess
- virtual Control* getControl( sal_Int16 _nControlId, bool _bLabelControl = false ) const override;
+ virtual weld::Widget* getControl( sal_Int16 nControlId, bool bLabelControl = false ) const override;
virtual void enableControl( sal_Int16 _nControlId, bool _bEnable ) override;
virtual OUString getCurFilter( ) const override;
@@ -286,7 +272,7 @@ private:
inline void SvtFileDialog::SetPath( const OUString& rNewURL )
{
- _aPath = rNewURL;
+ m_aPath = rNewURL;
}
@@ -298,32 +284,31 @@ inline void SvtFileDialog::SetHasFilename( bool bHasFilename )
inline const OUString& SvtFileDialog::GetPath()
{
- return _aPath;
+ return m_aPath;
}
inline void SvtFileDialog::SetDefaultExt( const OUString& rExt )
{
- _aDefExt = rExt;
+ m_aDefExt = rExt;
}
inline void SvtFileDialog::EraseDefaultExt( sal_Int32 _nIndex )
{
- _aDefExt = _aDefExt.copy( 0, _nIndex );
+ m_aDefExt = m_aDefExt.copy( 0, _nIndex );
}
inline const OUString& SvtFileDialog::GetDefaultExt() const
{
- return _aDefExt;
+ return m_aDefExt;
}
inline SvtFileView* SvtFileDialog::GetView()
{
- return _pFileView;
+ return m_xFileView.get();
}
-
#endif // INCLUDED_FPICKER_SOURCE_OFFICE_IODLG_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */