summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-04-19 12:08:24 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-04-19 12:10:59 +0100
commit3437d2196b1ca722a6146b40b4e06912482cedcd (patch)
treec2917423debf9609c6a677694387ce393ed30db7 /sfx2
parent284a86be4394522d2cdd1d5af9e7a2280bff9460 (diff)
Resolves: fdo#36358 Just use the same export dir as save as for all apps
I believe the original idea was that draw/impress export graphics and so default output dir is the gallery as you might want to export them in there. Catch is that we cane export in some many different formats there there isn't a good fit for the whole collection, so lets just use the same dir for all apps
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/guisaveas.cxx21
1 files changed, 8 insertions, 13 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 89b76f4df3d2..606afe80fe4e 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -311,8 +311,7 @@ public:
sal_Bool ShowDocumentInfoDialog();
- ::rtl::OUString GetReccomendedDir( const ::rtl::OUString& aSuggestedDir,
- const sfx2::FileDialogHelper::Context& rCtxt );
+ ::rtl::OUString GetReccomendedDir( const ::rtl::OUString& aSuggestedDir );
::rtl::OUString GetReccomendedName( const ::rtl::OUString& aSuggestedName,
const ::rtl::OUString& aTypeName );
@@ -884,9 +883,11 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
}
if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) )
- eCtxt = sfx2::FileDialogHelper::SD_EXPORT;
+ eCtxt = sfx2::FileDialogHelper::SD_EXPORT;
else if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) )
- eCtxt = sfx2::FileDialogHelper::SI_EXPORT;
+ eCtxt = sfx2::FileDialogHelper::SI_EXPORT;
+ else if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) )
+ eCtxt = sfx2::FileDialogHelper::SW_EXPORT;
if ( eCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT )
pFileDlg->SetContext( eCtxt );
@@ -957,7 +958,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
}
}
- ::rtl::OUString aReccomendedDir = GetReccomendedDir( aSuggestedDir, eCtxt );
+ ::rtl::OUString aReccomendedDir = GetReccomendedDir( aSuggestedDir );
if ( aReccomendedDir.getLength() )
pFileDlg->SetDisplayDirectory( aReccomendedDir );
::rtl::OUString aReccomendedName = GetReccomendedName( aSuggestedName, aAdjustToType );
@@ -1143,7 +1144,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
}
//-------------------------------------------------------------------------
-::rtl::OUString ModelData_Impl::GetReccomendedDir( const ::rtl::OUString& aSuggestedDir, const sfx2::FileDialogHelper::Context& rCtxt )
+::rtl::OUString ModelData_Impl::GetReccomendedDir( const ::rtl::OUString& aSuggestedDir )
{
::rtl::OUString aReccomendedDir;
@@ -1174,13 +1175,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
}
else
{
- ::rtl::OUString aConfigSuggestion;
- // Set graphic path if context == SD_EXPORT or SI_EXPORT else work path
- if (rCtxt == sfx2::FileDialogHelper::SD_EXPORT || rCtxt == sfx2::FileDialogHelper::SI_EXPORT)
- aConfigSuggestion = SvtPathOptions().GetGraphicPath();
- else
- aConfigSuggestion = SvtPathOptions().GetWorkPath();
- aReccomendedDir = INetURLObject( aConfigSuggestion ).GetMainURL( INetURLObject::NO_DECODE );
+ aReccomendedDir = INetURLObject( SvtPathOptions().GetWorkPath() ).GetMainURL( INetURLObject::NO_DECODE );
}
return aReccomendedDir;