summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppController.cxx6
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx5
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx1
3 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index d2fd90d9ad7d..b704fdca97a9 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1078,13 +1078,13 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
OUString sUrl;
if ( m_xModel.is() )
sUrl = m_xModel->getURL();
- if ( sUrl.isEmpty() )
- sUrl = SvtPathOptions().GetWorkPath();
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE, getFrameWeld());
- aFileDlg.SetDisplayDirectory( sUrl );
+ aFileDlg.SetContext(sfx2::FileDialogHelper::BaseSaveAs);
+ if (!sUrl.isEmpty())
+ aFileDlg.SetDisplayDirectory( sUrl );
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 1d9f89c8791f..7707408f4288 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -772,15 +772,14 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE, m_xAssistant.get());
+ aFileDlg.SetContext(sfx2::FileDialogHelper::BaseSaveAs);
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
- INetURLObject aWorkURL( m_sWorkPath );
- aFileDlg.SetDisplayFolder( aWorkURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ));
-
OUString sDefaultName = DBA_RES( STR_DATABASEDEFAULTNAME );
OUString sExtension = pFilter->GetDefaultExtension();
sDefaultName += sExtension.replaceAt( 0, 1, OUString() );
+ INetURLObject aWorkURL( m_sWorkPath );
aWorkURL.Append( sDefaultName );
sDefaultName = createUniqueFileName( aWorkURL );
aFileDlg.SetFileName( sDefaultName );
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index da41b8984d6f..27eb77dc78ab 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -664,6 +664,7 @@ namespace dbaui
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE, "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld());
+ aFileDlg.SetContext(sfx2::FileDialogHelper::BaseDataSource);
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{