diff options
author | gt <gt@openoffice.org> | 2002-11-21 08:27:18 +0000 |
---|---|---|
committer | gt <gt@openoffice.org> | 2002-11-21 08:27:18 +0000 |
commit | 0542661bee653c9a02cb0f6596a764afdfaae9f7 (patch) | |
tree | cbf90bc4f648faaf64aa28c04a3e9fd0f75601f1 | |
parent | c6d6ebb8a1a72a7174a54122f0d5eac0222540fa (diff) |
#104383# SfxObjectShell::GUISaveAs_Impl(): set context at file dialog for export to preserve last used filter
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 8c8b8c2fd766..341fee9e15fe 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -2,9 +2,9 @@ * * $RCSfile: objserv.cxx,v $ * - * $Revision: 1.52 $ + * $Revision: 1.53 $ * - * last change: $Author: obo $ $Date: 2002-11-20 11:42:32 $ + * last change: $Author: gt $ $Date: 2002-11-21 09:27:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -519,8 +519,13 @@ sal_Bool SfxObjectShell::GUISaveAs_Impl(sal_Bool bUrl, SfxRequest *pRequest) else if ( bIsExport ) { // This is the normal dialog - pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, GetFactory(), nMust, nDont ); - pFileDlg->CreateMatcher( GetFactory() ); + SfxObjectFactory& rFact = GetFactory(); + pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, rFact, nMust, nDont ); + if( strcmp( rFact.GetShortName(), "sdraw" ) != 0 ) + pFileDlg->SetContext( sfx2::FileDialogHelper::SD_EXPORT ); + else if( strcmp( rFact.GetShortName(), "simpress" ) != 0 ) + pFileDlg->SetContext( sfx2::FileDialogHelper::SI_EXPORT ); + pFileDlg->CreateMatcher( rFact ); Reference< ::com::sun::star::ui::dialogs::XFilePicker > xFilePicker = pFileDlg->GetFilePicker(); Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess > xControlAccess = Reference< ::com::sun::star::ui::dialogs::XFilePickerControlAccess >( xFilePicker, UNO_QUERY ); |