diff options
Diffstat (limited to 'include/svtools/filectrl.hxx')
-rw-r--r-- | include/svtools/filectrl.hxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx index 53486c0e4d35..20506dbd7b51 100644 --- a/include/svtools/filectrl.hxx +++ b/include/svtools/filectrl.hxx @@ -54,8 +54,8 @@ namespace o3tl class SVT_DLLPUBLIC FileControl : public vcl::Window { private: - Edit maEdit; - PushButton maButton; + VclPtr<Edit> maEdit; + VclPtr<PushButton> maButton; OUString maButtonText; bool mbOpenDlg; @@ -77,10 +77,11 @@ protected: public: FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode = FileControlMode::NONE ); - virtual ~FileControl(); + virtual ~FileControl(); + virtual void dispose() SAL_OVERRIDE; - Edit& GetEdit() { return maEdit; } - PushButton& GetButton() { return maButton; } + Edit& GetEdit() { return *maEdit.get(); } + PushButton& GetButton() { return *maButton.get(); } void Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) SAL_OVERRIDE; @@ -89,13 +90,13 @@ public: void SetText( const OUString& rStr ) SAL_OVERRIDE; OUString GetText() const SAL_OVERRIDE; - OUString GetSelectedText() const { return maEdit.GetSelected(); } + OUString GetSelectedText() const { return maEdit->GetSelected(); } - void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); } - Selection GetSelection() const { return maEdit.GetSelection(); } + void SetSelection( const Selection& rSelection ) { maEdit->SetSelection( rSelection ); } + Selection GetSelection() const { return maEdit->GetSelection(); } - void SetReadOnly( bool bReadOnly = true ) { maEdit.SetReadOnly( bReadOnly ); } - bool IsReadOnly() const { return maEdit.IsReadOnly(); } + void SetReadOnly( bool bReadOnly = true ) { maEdit->SetReadOnly( bReadOnly ); } + bool IsReadOnly() const { return maEdit->IsReadOnly(); } //use this to manipulate the dialog bevore executing it: |