framework/source/uielement/saveasmenucontroller.cxx | 7 ++-- include/sfx2/sfxsids.hrc | 1 sc/source/ui/app/scdll.cxx | 1 sc/uiconfig/scalc/toolbar/standardbar.xml | 2 - sfx2/sdi/docslots.sdi | 5 +++ sfx2/sdi/sfx.sdi | 27 ++++++++++++++++ sfx2/source/doc/guisaveas.cxx | 33 +++++++++++++------- sfx2/source/doc/objserv.cxx | 2 - sw/inc/cmdid.h | 1 sw/sdi/docsh.sdi | 5 --- sw/sdi/swriter.sdi | 27 ---------------- sw/source/uibase/app/swmodule.cxx | 2 - 12 files changed, 64 insertions(+), 49 deletions(-)
New commits: commit e2169af9c75739464594d38de12170c47bff8c9d Author: Szymon KÅos <eszka...@gmail.com> Date: Wed Jul 8 23:17:53 2015 +0200 Working toolbar entry: Save As > Remote file Change-Id: I5601c7847f30a7d5fb7ede5f90b2a6a89f4c8693 diff --git a/framework/source/uielement/saveasmenucontroller.cxx b/framework/source/uielement/saveasmenucontroller.cxx index 7e4fd92..6460013 100644 --- a/framework/source/uielement/saveasmenucontroller.cxx +++ b/framework/source/uielement/saveasmenucontroller.cxx @@ -41,7 +41,7 @@ using namespace framework; namespace { -static const char CMD_SAVE_REMOTE[] = ".uno:OpenRemote"; // TODO +static const char CMD_SAVE_REMOTE[] = ".uno:SaveAsRemote"; class SaveAsMenuController : public svt::PopupMenuControllerBase { @@ -115,9 +115,9 @@ void SaveAsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo if ( pVCLPopupMenu ) { // Open remote menu entry - pVCLPopupMenu->InsertItem( sal_uInt16( 0 ), + pVCLPopupMenu->InsertItem( sal_uInt16( 1 ), FWK_RESSTR( STR_REMOTE_FILE ) ); - pVCLPopupMenu->SetItemCommand( sal_uInt16( 0 ), + pVCLPopupMenu->SetItemCommand( sal_uInt16( 1 ), OUString( CMD_SAVE_REMOTE ) ); } } @@ -160,6 +160,7 @@ void SAL_CALL SaveAsMenuController::itemSelected( const css::awt::MenuEvent& rEv if ( aCommand == CMD_SAVE_REMOTE ) { Sequence< PropertyValue > aArgsList( 0 ); + dispatchCommand( CMD_SAVE_REMOTE, aArgsList ); } } diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc index 0f4344e..1755eb5 100644 --- a/include/sfx2/sfxsids.hrc +++ b/include/sfx2/sfxsids.hrc @@ -102,6 +102,7 @@ #define SID_JUMPTOMARK (SID_SFX_START + 598) #define SID_OPENTEMPLATE (SID_SFX_START + 594) #define SID_SAVEASDOC (SID_SFX_START + 502) +#define SID_SAVEASREMOTE (SID_SFX_START + 516) #define SID_SAVEACOPY (SID_SFX_START + 999) #define SID_SAVEACOPYITEM (SID_SFX_START + 998) #define SID_CLOSING (SID_SFX_START +1539) diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi index be17f43..9398f72 100644 --- a/sfx2/sdi/docslots.sdi +++ b/sfx2/sdi/docslots.sdi @@ -148,6 +148,11 @@ interface OfficeDocument : Document ExecMethod = ExecFile_Impl ; StateMethod = GetState_Impl ; ] + SID_SAVEASREMOTE // ole(req) api(final/play/rec) + [ + ExecMethod = ExecFile_Impl ; + StateMethod = GetState_Impl ; + ] SID_DOCTEMPLATE // ole(no) api(final/play/rec) [ ExecMethod = ExecFile_Impl ; diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index eb6cccc..63c73c3 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -5013,6 +5013,33 @@ SfxBoolItem SaveAs SID_SAVEASDOC GroupId = GID_DOCUMENT; ] +SfxBoolItem SaveAsRemote SID_SAVEASREMOTE +(SfxStringItem URL SID_FILE_NAME,SfxStringItem FilterName SID_FILTER_NAME,SfxStringItem Password SID_PASSWORD,SfxBoolItem PasswordInteraction SID_PASSWORDINTERACTION,SfxStringItem FilterOptions SID_FILE_FILTEROPTIONS,SfxStringItem VersionComment SID_DOCINFO_COMMENTS,SfxStringItem VersionAuthor SID_DOCINFO_AUTHOR,SfxBoolItem Overwrite SID_OVERWRITE,SfxBoolItem Unpacked SID_UNPACK,SfxBoolItem SaveTo SID_SAVETO) +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* status: */ + SlotType = SfxStringItem + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_DOCUMENT; +] + SfxBoolItem SaveAsTemplate SID_DOCTEMPLATE (SfxStringItem TemplateRegion SID_TEMPLATE_REGIONNAME,SfxStringItem TemplateName SID_TEMPLATE_NAME) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index a3aef2d..a9b8296 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -105,6 +105,7 @@ #define SAVE_REQUESTED 16 #define SAVEAS_REQUESTED 32 #define SAVEACOPY_REQUESTED 64 +#define SAVEASREMOTE_REQUESTED -1 // possible statuses of save operation #define STATUS_NO_ACTION 0 @@ -136,6 +137,8 @@ static sal_uInt16 getSlotIDFromMode( sal_Int8 nStoreMode ) nResult = SID_DIRECTEXPORTDOCASPDF; else if ( nStoreMode == SAVEAS_REQUESTED || nStoreMode == ( EXPORT_REQUESTED | WIDEEXPORT_REQUESTED ) ) nResult = SID_SAVEASDOC; + else if ( nStoreMode == SAVEASREMOTE_REQUESTED ) + nResult = SID_SAVEASREMOTE; else { DBG_ASSERT( false, "Unacceptable slot name is provided!\n" ); } @@ -157,6 +160,8 @@ static sal_uInt8 getStoreModeFromSlotName( const OUString& aSlotName ) nResult = SAVE_REQUESTED; else if ( aSlotName == "SaveAs" ) nResult = SAVEAS_REQUESTED; + else if ( aSlotName == "SaveAsRemote" ) + nResult = SAVEASREMOTE_REQUESTED; else throw task::ErrorCodeIOException( ("getStoreModeFromSlotName(\"" + aSlotName @@ -547,7 +552,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl( SfxFilterFlags nMust = getMustFlags( nStoreMode ); SfxFilterFlags nDont = getDontFlags( nStoreMode ); - if ( nStoreMode & PDFEXPORT_REQUESTED ) + if ( ( nStoreMode != SAVEASREMOTE_REQUESTED ) && ( nStoreMode & PDFEXPORT_REQUESTED ) ) { // Preselect PDF-Filter for EXPORT uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); @@ -1548,17 +1553,25 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel, if ( aFileNameIter == aModelData.GetMediaDescr().end() ) { sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG; - ::comphelper::SequenceAsHashMap::const_iterator aDlgIter = - aModelData.GetMediaDescr().find( OUString("UseSystemDialog") ); - if ( aDlgIter != aModelData.GetMediaDescr().end() ) + + if( nStoreMode == SAVEASREMOTE_REQUESTED ) { - bool bUseSystemDialog = true; - if ( aDlgIter->second >>= bUseSystemDialog ) + nDialog = SFX2_IMPL_DIALOG_REMOTE; + } + else + { + ::comphelper::SequenceAsHashMap::const_iterator aDlgIter = + aModelData.GetMediaDescr().find( OUString("UseSystemDialog") ); + if ( aDlgIter != aModelData.GetMediaDescr().end() ) { - if ( bUseSystemDialog ) - nDialog = SFX2_IMPL_DIALOG_SYSTEM; - else - nDialog = SFX2_IMPL_DIALOG_OOO; + bool bUseSystemDialog = true; + if ( aDlgIter->second >>= bUseSystemDialog ) + { + if ( bUseSystemDialog ) + nDialog = SFX2_IMPL_DIALOG_SYSTEM; + else + nDialog = SFX2_IMPL_DIALOG_OOO; + } } } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index f4ba28b..4c442b1 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -528,13 +528,13 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_EXPORTDOCASPDF: case SID_DIRECTEXPORTDOCASPDF: bIsPDFExport = true; //fall-through case SID_EXPORTDOC: case SID_SAVEASDOC: + case SID_SAVEASREMOTE: case SID_SAVEDOC: { // derived class may decide to abort this diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 913f81a..dda4a38 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -62,7 +62,6 @@ // Region: File #define FN_NEW_GLOBAL_DOC (FN_FILE + 4 ) /* Create Global Document */ -#define FN_SAVE_FILE_AS (FN_FILE + 5 ) /* Save As */ #define FN_OPEN_FILE (FN_FILE + 7 ) /* Open */ #define FN_OUTLINE_TO_IMPRESS (FN_FILE + 36) /* Send outline to impress */ diff --git a/sw/sdi/docsh.sdi b/sw/sdi/docsh.sdi index 5e9fe78..9085bdf 100644 --- a/sw/sdi/docsh.sdi +++ b/sw/sdi/docsh.sdi @@ -59,11 +59,6 @@ interface TextDocument : BaseTextDocument ExecMethod = Execute; StateMethod = GetState; ] - FN_SAVE_FILE_AS - [ - ExecMethod = Execute; - StateMethod = GetState; - ] } shell SwDocShell diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 364ece7..deea1c0 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -10026,33 +10026,6 @@ SfxVoidItem OpenFromWriter FN_OPEN_FILE GroupId = GID_APPLICATION; ] -SfxVoidItem SaveAs FN_SAVE_FILE_AS -() -[ - /* flags: */ - AutoUpdate = FALSE, - Cachable = Cachable, - FastCall = FALSE, - HasCoreId = FALSE, - HasDialog = FALSE, - ReadOnlyDoc = TRUE, - Toggle = FALSE, - Container = FALSE, - RecordAbsolute = FALSE, - RecordPerSet; - Synchron; - - /* status: */ - SlotType = SfxStringItem - - /* config: */ - AccelConfig = TRUE, - MenuConfig = TRUE, - StatusBarConfig = FALSE, - ToolBoxConfig = TRUE, - GroupId = GID_APPLICATION; -] - SfxInt16Item PageColumnType SID_ATTR_PAGE_COLUMN [ diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 2bd0ebc..4c0b27b 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -307,7 +307,7 @@ void SwDLL::RegisterControls() SvxColorToolBoxControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod ); svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod ); - SfxSaveAsToolBoxControl::RegisterControl(FN_SAVE_FILE_AS, pMod ); + SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEASDOC, pMod ); SvxClipBoardControl::RegisterControl(SID_PASTE, pMod ); SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod ); SvxUndoRedoControl::RegisterControl(SID_REDO, pMod ); commit c1976fc6ef8a82e3b86ca83636cce996ab62ff53 Author: Szymon KÅos <eszka...@gmail.com> Date: Tue Jul 7 17:41:09 2015 +0200 'Save As' popup menu in the Calc's toolbar Change-Id: I5e7d5594062bb722b1076450c1e6e633183279b3 diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 384ae4c..a6dfd57 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -153,6 +153,7 @@ void ScDLL::Init() ScPageBreakShell ::RegisterInterface(pMod); SfxRecentFilesToolBoxControl::RegisterControl(SID_OPEN_CALC, pMod); + SfxSaveAsToolBoxControl::RegisterControl(SID_SAVEASDOC, pMod ); // Own Controller ScTbxInsertCtrl ::RegisterControl(SID_TBXCTL_INSERT, pMod); diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml index 1402b8b..8dfa3c5 100644 --- a/sc/uiconfig/scalc/toolbar/standardbar.xml +++ b/sc/uiconfig/scalc/toolbar/standardbar.xml @@ -24,7 +24,7 @@ <toolbar:toolbaritem xlink:href=".uno:OpenFromCalc" toolbar:style="dropdown"/> <toolbar:toolbaritem xlink:href=".uno:OpenRemote"/> <toolbar:toolbaritem xlink:href=".uno:Save"/> - <toolbar:toolbaritem xlink:href=".uno:SaveAs"/> + <toolbar:toolbaritem xlink:href=".uno:SaveAs" toolbar:style="dropdown"/> <toolbar:toolbaritem xlink:href=".uno:SendMail" toolbar:visible="false"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:EditDoc" toolbar:visible="false"/>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits