From d9fcfef9981a48ddd4472df71fc469884a426baa Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Thu, 9 Jul 2015 10:43:26 +0200 Subject: SaveAsRemote: corresponding dialog type Change-Id: I5face9064bafc3c99b9a7af7809bd40a105b11bd --- sfx2/source/doc/guisaveas.cxx | 16 +++++++++++++++- sfx2/source/doc/objserv.cxx | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) (limited to 'sfx2/source/doc') diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 247c2f4372a1..6a204fa381f9 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -544,6 +544,9 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( Sf uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( sal_Int8 nStoreMode ) { + if ( nStoreMode == SAVEASREMOTE_REQUESTED ) + nStoreMode = SAVEAS_REQUESTED; + uno::Sequence< beans::PropertyValue > aFilterProps; SfxFilterFlags nMust = getMustFlags( nStoreMode ); @@ -882,6 +885,9 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, const OUString& rStandardDir, const ::com::sun::star::uno::Sequence< OUString >& rBlackList) { + if ( nStoreMode == SAVEASREMOTE_REQUESTED ) + nStoreMode = SAVEAS_REQUESTED; + bool bUseFilterOptions = false; ::comphelper::SequenceAsHashMap::const_iterator aOverwriteIter = @@ -1396,7 +1402,15 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel, bool bSetStandardName = false; // can be set only for SaveAs // parse the slot name + bool bRemote = false; sal_Int8 nStoreMode = getStoreModeFromSlotName( aSlotName ); + + if ( nStoreMode == SAVEASREMOTE_REQUESTED ) + { + nStoreMode = SAVEAS_REQUESTED; + bRemote = true; + } + sal_Int8 nStatusSave = STATUS_NO_ACTION; ::comphelper::SequenceAsHashMap::const_iterator aSaveACopyIter = @@ -1551,7 +1565,7 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel, { sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG; - if( nStoreMode == SAVEASREMOTE_REQUESTED ) + if( bRemote ) { nDialog = SFX2_IMPL_DIALOG_REMOTE; } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index c5107101580d..bc1a668f5f12 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -561,7 +561,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) { SfxErrorContext aEc( ERRCTX_SFX_SAVEASDOC, GetTitle() ); // ??? - if ( nId == SID_SAVEASDOC ) + if ( nId == SID_SAVEASDOC || nId == SID_SAVEASREMOTE ) { // in case of plugin mode the SaveAs operation means SaveTo SFX_ITEMSET_ARG( GetMedium()->GetItemSet(), pViewOnlyItem, SfxBoolItem, SID_VIEWONLY, false ); @@ -726,7 +726,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) nErrorCode = ( lErr != ERRCODE_IO_ABORT ) && ( nErrorCode == ERRCODE_NONE ) ? nErrorCode : lErr; } - if ( nId == SID_SAVEASDOC && nErrorCode == ERRCODE_NONE ) + if ( ( nId == SID_SAVEASDOC || nId == SID_SAVEASREMOTE ) && nErrorCode == ERRCODE_NONE ) { SfxBoolItem const * saveTo = static_cast( rReq.GetArg(SID_SAVETO, false, TYPE(SfxBoolItem))); -- cgit