summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-04-19 11:57:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-04-19 12:33:00 +0100
commit83de55e4587840180caf1937687d93613cf07534 (patch)
tree9bd039e4951979d9a5bbfaed302f8179a8296e43
parent31dd8b55accd586d454280814b1ad856802454ef (diff)
Resolves: fdo#36358, firstly lets code what the comment says it wants to do
(cherry picked from commit 058335969debe302e23fa2c36d84d3ef55e2b47a)
-rw-r--r--sfx2/source/doc/guisaveas.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 74f3193a52..f086bc67c1 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -312,7 +312,7 @@ public:
sal_Bool ShowDocumentInfoDialog();
::rtl::OUString GetReccomendedDir( const ::rtl::OUString& aSuggestedDir,
- const sfx2::FileDialogHelper::Context& aCtxt );
+ const sfx2::FileDialogHelper::Context& rCtxt );
::rtl::OUString GetReccomendedName( const ::rtl::OUString& aSuggestedName,
const ::rtl::OUString& aTypeName );
@@ -885,10 +885,8 @@ 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" ) ) )
+ else 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::SW_EXPORT;
if ( eCtxt != sfx2::FileDialogHelper::UNKNOWN_CONTEXT )
pFileDlg->SetContext( eCtxt );
@@ -1144,7 +1142,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, const sfx2::FileDialogHelper::Context& rCtxt )
{
::rtl::OUString aReccomendedDir;
@@ -1175,8 +1173,12 @@ 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() );
+ ::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 );
}