diff options
Diffstat (limited to 'sfx2/source/doc/guisaveas.cxx')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index f6d3fb221b0a..87fb028cd1f3 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& aCtxt ); + ::rtl::OUString GetReccomendedDir( const ::rtl::OUString& aSuggestedDir ); ::rtl::OUString GetReccomendedName( const ::rtl::OUString& aSuggestedName, const ::rtl::OUString& aTypeName ); @@ -884,10 +883,10 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, } if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.drawing.DrawingDocument" ) ) ) - eCtxt = sfx2::FileDialogHelper::SD_EXPORT; - if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) - eCtxt = sfx2::FileDialogHelper::SI_EXPORT; - if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) ) + eCtxt = sfx2::FileDialogHelper::SD_EXPORT; + else if( aDocServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.presentation.PresentationDocument" ) ) ) + 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 ) @@ -959,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 ); @@ -1144,7 +1143,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() } //------------------------------------------------------------------------- -::rtl::OUString ModelData_Impl::GetReccomendedDir( const ::rtl::OUString& aSuggestedDir, const sfx2::FileDialogHelper::Context& aCtxt ) +::rtl::OUString ModelData_Impl::GetReccomendedDir( const ::rtl::OUString& aSuggestedDir ) { ::rtl::OUString aReccomendedDir; @@ -1175,9 +1174,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog() } else { - // pb: set graphic path if context == SD_EXPORT or SI_EXPORT else work path - ::rtl::OUString aConfigSuggestion( ( aCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT ) ? SvtPathOptions().GetGraphicPath() : SvtPathOptions().GetWorkPath() ); - aReccomendedDir = INetURLObject( aConfigSuggestion ).GetMainURL( INetURLObject::NO_DECODE ); + aReccomendedDir = INetURLObject( SvtPathOptions().GetWorkPath() ).GetMainURL( INetURLObject::NO_DECODE ); } return aReccomendedDir; |