diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/lnkbase.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/fileobj.cxx | 14 | ||||
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 10 |
3 files changed, 16 insertions, 10 deletions
diff --git a/sfx2/inc/sfx2/lnkbase.hxx b/sfx2/inc/sfx2/lnkbase.hxx index 984136665f2a..c564b83af235 100644 --- a/sfx2/inc/sfx2/lnkbase.hxx +++ b/sfx2/inc/sfx2/lnkbase.hxx @@ -173,7 +173,7 @@ public: void clearStreamToLoadFrom(); inline sal_Bool WasLastEditOK() const { return bWasLastEditOK; } - FileDialogHelper* GetFileDialog( sal_uInt32 nFlags, const String& rFactory ) const; + FileDialogHelper & GetInsertFileDialog(const String& rFactory) const; }; SV_DECL_IMPL_REF(SvBaseLink); diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx index e3b12c5a16d4..1b982526eafa 100644 --- a/sfx2/source/appl/fileobj.cxx +++ b/sfx2/source/appl/fileobj.cxx @@ -471,9 +471,10 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r pOldParent = Application::GetDefDialogParent(); Application::SetDefDialogParent( pParent ); - ::sfx2::FileDialogHelper* pFileDlg = - pLink->GetFileDialog( SFXWB_INSERT, String() ); - pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) ); + ::sfx2::FileDialogHelper & rFileDlg = + pLink->GetInsertFileDialog( String() ); + rFileDlg.StartExecuteModal( + LINK( this, SvFileObject, DialogClosedHdl ) ); } break; @@ -488,9 +489,10 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r if ( pShell ) sFactory = pShell->GetFactory().GetFactoryName(); - ::sfx2::FileDialogHelper* pFileDlg = - pLink->GetFileDialog( SFXWB_INSERT, sFactory ); - pFileDlg->StartExecuteModal( LINK( this, SvFileObject, DialogClosedHdl ) ); + ::sfx2::FileDialogHelper & rFileDlg = + pLink->GetInsertFileDialog(sFactory); + rFileDlg.StartExecuteModal( + LINK( this, SvFileObject, DialogClosedHdl ) ); } break; diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 0bca5e327586..cf1a651a3160 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -31,6 +31,7 @@ #include <sot/exchange.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <vcl/msgbox.hxx> #include <sfx2/linkmgr.hxx> #include <vcl/svapp.hxx> @@ -40,6 +41,7 @@ #include <tools/debug.hxx> #include <svl/svdde.hxx> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; namespace sfx2 @@ -526,12 +528,14 @@ void SvBaseLink::Closed() xObj->RemoveAllDataAdvise( this ); } -FileDialogHelper* SvBaseLink::GetFileDialog( sal_uInt32 nFlags, const String& rFactory ) const +FileDialogHelper & SvBaseLink::GetInsertFileDialog(const String& rFactory) const { if ( pImpl->m_pFileDlg ) delete pImpl->m_pFileDlg; - pImpl->m_pFileDlg = new FileDialogHelper( nFlags, rFactory ); - return pImpl->m_pFileDlg; + pImpl->m_pFileDlg = new FileDialogHelper( + ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, + SFXWB_INSERT, rFactory); + return *pImpl->m_pFileDlg; } ImplDdeItem::~ImplDdeItem() |