From b9b2ab0f9f1ad91bba899068d2be7fc7767f41c9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 22 Dec 2017 13:20:26 +0200 Subject: Revert "unused SID command in sfx2" This reverts commit 08f4ecd5823c420bb7157c238460d50f1f1f9791. Change-Id: I93c4e44de73ce62b4cad7e3c6c56943dafaaebb4 Reviewed-on: https://gerrit.libreoffice.org/46966 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/sdi/appslots.sdi | 36 ++++ sfx2/sdi/docslots.sdi | 38 +++++ sfx2/sdi/frmslots.sdi | 31 ++++ sfx2/sdi/sfx.sdi | 378 ++++++++++++++++++++++++++++++++++++++++++ sfx2/sdi/viwslots.sdi | 5 + sfx2/source/appl/appserv.cxx | 101 +++++++++++ sfx2/source/doc/objserv.cxx | 61 ++++++- sfx2/source/view/viewfrm.cxx | 4 + sfx2/source/view/viewfrm2.cxx | 48 ++++++ sfx2/source/view/viewsh.cxx | 2 + 10 files changed, 702 insertions(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi index 7e9eef75047a..da6d084403fe 100644 --- a/sfx2/sdi/appslots.sdi +++ b/sfx2/sdi/appslots.sdi @@ -25,11 +25,18 @@ interface Application [ ExecMethod = MiscExec_Impl ; ] + SID_SETOPTIONS + [ + ExecMethod = MiscExec_Impl ; + ] SID_QUITAPP // ole(req) api(final/play) [ ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] + SID_LOGOUT // ole(req) api(final/play) + [ + ] SID_HELPINDEX // ole(no) api(final/todo) [ ExecMethod = MiscExec_Impl ; @@ -54,6 +61,26 @@ interface Application ExecMethod = MiscExec_Impl ; StateMethod = MiscState_Impl ; ] + SID_TOOLBOXOPTIONS // ole(no) api(final/play) + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] + SID_CONFIGSTATUSBAR // ole(no) api(final/play) + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] + SID_CONFIGMENU // ole(no) api(final/play) + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] + SID_CONFIGACCEL // ole(no) api(final/play) + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] SID_CONFIGEVENT // ole(no) api(final/play) [ ExecMethod = MiscExec_Impl ; @@ -189,6 +216,11 @@ shell SfxApplication [ ExecMethod = NewDocDirectExec_Impl ; ] + SID_CLOSEDOCS + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] SID_BASICIDE_APPEAR // status(final|play) [ ExecMethod = OfaExec_Impl; @@ -216,6 +248,10 @@ shell SfxApplication + SID_OFFICE_CHECK_PLZ + [ + ExecMethod = OfaExec_Impl; + ] SID_NEWSD // status(final|play) [ ExecMethod = OfaExec_Impl; diff --git a/sfx2/sdi/docslots.sdi b/sfx2/sdi/docslots.sdi index 5789187c8963..811467cd94be 100644 --- a/sfx2/sdi/docslots.sdi +++ b/sfx2/sdi/docslots.sdi @@ -46,6 +46,11 @@ interface Documents [ ExecMethod = OpenDocExec_Impl ; ] + SID_CLOSEDOCS // ole(req) api(final/play/rec) + [ + ExecMethod = MiscExec_Impl ; + StateMethod = MiscState_Impl ; + ] SID_SAVEDOCS // ole(no) api(final/play/rec) [ ExecMethod = MiscExec_Impl ; @@ -61,6 +66,11 @@ interface Document ExecMethod = ExecProps_Impl ; StateMethod = StateProps_Impl ; ] + SID_DOCPATH // ole(req) api(final/play/norec) + [ + ExecMethod = ExecProps_Impl ; + StateMethod = StateProps_Impl ; + ] SID_DOCFULLNAME // ole(req) api(final/play/norec) [ ExecMethod = ExecProps_Impl ; @@ -71,6 +81,15 @@ interface Document ExecMethod = ExecFile_Impl ; StateMethod = GetState_Impl ; ] + SID_CLOSING // ole(no) api(final/play/norec) + [ + StateMethod = StateProps_Impl ; + ] + SID_ACTIVATE // ole(no) api(final/play/norec) + [ + ExecMethod = ExecView_Impl ; + StateMethod = StateView_Impl ; + ] } interface OfficeDocument : Document @@ -85,11 +104,21 @@ interface OfficeDocument : Document ExecMethod = ExecProps_Impl ; StateMethod = StateProps_Impl ; ] + SID_DOCINFO_KEYWORDS // ole(opt) api(todo) + [ + ExecMethod = ExecProps_Impl ; + StateMethod = StateProps_Impl ; + ] SID_DOC_READONLY // ole(opt) api(final/play/norec) [ ExecMethod = ExecProps_Impl ; StateMethod = StateProps_Impl ; ] + SID_DOC_SAVED // ole(req) api(final/play/norec) + [ + ExecMethod = ExecProps_Impl ; + StateMethod = StateProps_Impl ; + ] SID_DOC_MODIFIED // ole(no) api(final/noplay/norec) [ StateMethod = GetState_Impl ; @@ -130,10 +159,19 @@ interface OfficeDocument : Document ExecMethod = PrintExec_Impl ; StateMethod = NoState ; ] + SID_PRINTOUT // ole(opt) api(final/play/norec) + [ + ExecMethod = PrintExec_Impl ; + StateMethod = PrintState_Impl ; + ] SID_DOC_LOADING // ole(no) api(final/play/norec) [ StateMethod = StateProps_Impl ; ] + SID_IMG_LOADING // ole(no) api(final/play/norec) + [ + StateMethod = StateProps_Impl ; + ] SID_VERSION [ ExecMethod = ExecFile_Impl; diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi index 8ea5a60bb7b9..09aafef95b7d 100644 --- a/sfx2/sdi/frmslots.sdi +++ b/sfx2/sdi/frmslots.sdi @@ -194,6 +194,10 @@ interface Window interface BrowseWindow : Window { + SID_ACTIVATE // ole(no) api(final/play/rec) + [ + // Implementations in Subclasses + ] SID_NEWWINDOW // ole(no) api(play/rec) [ ExecMethod = ExecView_Impl ; @@ -234,6 +238,16 @@ interface BrowseWindow : Window ExecMethod = ExecView_Impl ; StateMethod = StateView_Impl ; ] + SID_VIEWSHELL3 // ole(no) api(no) + [ + ExecMethod = ExecView_Impl ; + StateMethod = StateView_Impl ; + ] + SID_VIEWSHELL4 // ole(no) api(no) + [ + ExecMethod = ExecView_Impl ; + StateMethod = StateView_Impl ; + ] } interface TopWindow : BrowseWindow @@ -263,6 +277,11 @@ interface TopWindow : BrowseWindow ExecMethod = INetExecute_Impl ; StateMethod = INetState_Impl ; ] + SID_CREATELINK // ole(no) api() + [ + ExecMethod = INetExecute_Impl ; + StateMethod = INetState_Impl ; + ] SID_FOCUSURLBOX // ole(no) api(final/play/rec) [ ExecMethod = INetExecute_Impl ; @@ -275,5 +294,17 @@ interface TopWindow : BrowseWindow shell SfxViewFrame { import TopWindow; + + SID_ACTIVATE // ole(no) api(final/play/rec) + [ + ExecMethod = Exec_Impl ; + StateMethod = GetState_Impl ; + ] + + SID_SHOWPOPUPS + [ + ExecMethod = Exec_Impl ; + StateMethod = GetState_Impl ; + ] } diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 6a34243d396e..79d10caa0716 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -77,6 +77,46 @@ SfxBoolItem _SwitchViewShell2 SID_VIEWSHELL2 ] +SfxBoolItem _SwitchViewShell3 SID_VIEWSHELL3 + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::View; +] + + +SfxBoolItem _SwitchViewShell4 SID_VIEWSHELL4 + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::View; +] + + SfxVoidItem About SID_ABOUT () [ @@ -95,6 +135,24 @@ SfxVoidItem About SID_ABOUT ] +SfxVoidItem Activate SID_ACTIVATE +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = TRUE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::View; +] + + SfxBoolItem ActiveHelp SID_HELPBALLOONS [ @@ -151,6 +209,25 @@ SfxStringItem NewDoc SID_NEWDOC GroupId = SfxGroupId::Application; ] + +SfxVoidItem AddBookmark SID_CREATELINK +() +[ + AutoUpdate = FALSE, + FastCall = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Explorer; +] + + SfxStringItem AddDirect SID_NEWDOCDIRECT () [ @@ -543,6 +620,25 @@ SfxVoidItem ClearHistory SID_CLEARHISTORY GroupId = SfxGroupId::Options; ] +SfxVoidItem CloseDocs SID_CLOSEDOCS +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Application; +] + + SfxStringItem CloseDoc SID_CLOSEDOC (SfxBoolItem saveChanges SID_CLOSEDOC_SAVE,SfxStringItem fileName SID_CLOSEDOC_FILENAME) [ @@ -581,6 +677,25 @@ SfxVoidItem CloseWin SID_CLOSEWIN ] +SfxBoolItem Closing SID_CLOSING + +[ + AutoUpdate = TRUE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Intern; +] + + SfxStringItem Comments SID_DOCINFO_COMMENTS [ @@ -1876,6 +1991,43 @@ SfxBoolItem IsLoading SID_DOC_LOADING ] +SfxBoolItem IsLoadingImages SID_IMG_LOADING + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::View; +] + + +SfxBoolItem PrintOut SID_PRINTOUT +(SfxInt16Item copies SID_PRINT_COPIES,SfxBoolItem silent SID_SILENT) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Document; +] + + SfxVoidItem JumpToMark SID_JUMPTOMARK (SfxStringItem Bookmark SID_JUMPTOMARK) [ @@ -1894,6 +2046,25 @@ SfxVoidItem JumpToMark SID_JUMPTOMARK ] +SfxStringItem Keywords SID_DOCINFO_KEYWORDS + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = ; +] + + SfxStringItem LibLoaded SID_BASICIDE_LIBLOADED (SfxUsrAnyItem Document SID_BASICIDE_ARG_DOCUMENT_MODEL,SfxStringItem LibName SID_BASICIDE_ARG_LIBNAME) [ @@ -1967,6 +2138,25 @@ SfxStringItem LibSelector SID_BASICIDE_LIBSELECTOR ] +SfxVoidItem LoadAccel SID_CONFIGACCEL +(SfxStringItem FileName SID_CFGFILE) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Options; +] + + SfxVoidItem LoadBasic SID_BASICLOAD () [ @@ -2005,6 +2195,82 @@ SfxVoidItem LoadEvents SID_CONFIGEVENT ] +SfxVoidItem LoadMenu SID_CONFIGMENU +(SfxStringItem FileName SID_CFGFILE) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Options; +] + + +SfxVoidItem LoadStatusBar SID_CONFIGSTATUSBAR +(SfxStringItem FileName SID_CFGFILE) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Options; +] + + +SfxVoidItem LoadToolBox SID_TOOLBOXOPTIONS +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Options; +] + + +SfxStringItem Logout SID_LOGOUT +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Application; +] + + SfxScriptOrganizerItem ScriptOrganizer SID_SCRIPTORGANIZER (SfxScriptOrganizerItem ScriptOrganizer SID_SCRIPTORGANIZER) [ @@ -2843,6 +3109,25 @@ SfxVoidItem PasteOnlyValue SID_PASTE_ONLY_VALUE ] +SfxStringItem DocPath SID_DOCPATH + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = ; +] + + SfxVoidItem Print SID_PRINTDOC (SfxStringItem PrinterName SID_PRINTER_NAME,SfxStringItem FileName SID_FILE_NAME,SfxInt16Item Copies SID_PRINT_COPIES,SfxStringItem RangeText SID_PRINT_PAGES,SfxBoolItem Selection SID_SELECTION,SfxBoolItem Asynchron SID_ASYNCHRON,SfxBoolItem Collate SID_PRINT_COLLATE,SfxBoolItem Silent SID_SILENT) [ @@ -3399,6 +3684,25 @@ SfxVoidItem ImportDialog SID_IMPORT_DIALOG ] +SfxBoolItem Saved SID_DOC_SAVED + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = ; +] + + SfxVoidItem SbxDeleted SID_BASICIDE_SBXDELETED (SbxItem Sbx SID_BASICIDE_ARG_SBX) [ @@ -3618,6 +3922,24 @@ SfxStringItem SendViaBluetooth SID_BLUETOOTH_SENDDOC ] +SfxStringItem SendMailDocAsFormat SID_MAIL_SENDDOCASFORMAT +(SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY,SfxStringItem TypeName SID_TYPE_NAME) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Document; +] + SfxStringItem SendMailDocAsMS SID_MAIL_SENDDOCASMS (SfxStringItem Recipient SID_MAIL_RECIPIENT,SfxStringItem Subject SID_MAIL_SUBJECT,SfxStringItem MailText SID_MAIL_TEXT,SfxUInt16Item Priority SID_MAIL_PRIORITY) [ @@ -3655,6 +3977,44 @@ SfxStringItem SendMailDocAsOOo SID_MAIL_SENDDOCASOOO ] +SfxVoidItem SetOptions SID_SETOPTIONS +() +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = ; +] + + +SfxBoolItem ShowPopups SID_SHOWPOPUPS + +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = TRUE, + RecordAbsolute = FALSE, + RecordPerSet; + + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Options; +] + + SfxVoidItem ShowSbx SID_BASICIDE_SHOWSBX (SbxItem Sbx SID_BASICIDE_ARG_SBX) [ @@ -4589,6 +4949,24 @@ SfxVoidItem InternetDialog SID_INET_DLG ] +SfxVoidItem CheckPLZ SID_OFFICE_CHECK_PLZ +(SfxStringItem PLZ SID_OFFICE_CHECK_PLZ) +[ + AutoUpdate = FALSE, + FastCall = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + + AccelConfig = FALSE, + MenuConfig = FALSE, + ToolBoxConfig = FALSE, + GroupId = SfxGroupId::Special; +] + + SfxVoidItem AutoPilotAddressDataSource SID_ADDRESS_DATA_SOURCE () [ diff --git a/sfx2/sdi/viwslots.sdi b/sfx2/sdi/viwslots.sdi index 2e89181f9d04..111180b30d7d 100644 --- a/sfx2/sdi/viwslots.sdi +++ b/sfx2/sdi/viwslots.sdi @@ -34,6 +34,11 @@ interface View ExecMethod = ExecMisc_Impl ; StateMethod = GetState_Impl ; ] + SID_MAIL_SENDDOCASFORMAT // ole(no) api(todo) + [ + ExecMethod = ExecMisc_Impl ; + StateMethod = GetState_Impl ; + ] SID_MAIL_SENDDOCASMS // ole(no) api(todo) [ ExecMethod = ExecMisc_Impl ; diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index eaa244153fc2..31de5352644b 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -324,12 +324,45 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) bool bDone = false; switch ( rReq.GetSlot() ) { + case SID_SETOPTIONS: + { + if( rReq.GetArgs() ) + SetOptions_Impl( *rReq.GetArgs() ); + break; + } + case SID_QUITAPP: + case SID_LOGOUT: { // protect against reentrant calls if ( pImpl->bInQuit ) return; + if ( rReq.GetSlot() == SID_LOGOUT ) + { + for ( SfxObjectShell *pObjSh = SfxObjectShell::GetFirst(); + pObjSh; pObjSh = SfxObjectShell::GetNext( *pObjSh ) ) + { + if ( !pObjSh->IsModified() ) + continue; + + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pObjSh ); + if ( !pFrame || !pFrame->GetWindow().IsReallyVisible() ) + continue; + + if (pObjSh->PrepareClose()) + pObjSh->SetModified( false ); + else + return; + } + + SfxStringItem aNameItem( SID_FILE_NAME, OUString("vnd.sun.star.cmd:logout") ); + SfxStringItem aReferer( SID_REFERER, "private/user" ); + pImpl->pAppDispat->ExecuteList(SID_OPENDOC, + SfxCallMode::SLOT, { &aNameItem, &aReferer }); + return; + } + // try from nested requests again after 100ms if( Application::GetDispatchLevel() > 1 ) { @@ -361,6 +394,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } case SID_CONFIG: + case SID_TOOLBOXOPTIONS: + case SID_CONFIGSTATUSBAR: + case SID_CONFIGMENU: + case SID_CONFIGACCEL: case SID_CONFIGEVENT: { SfxAbstractDialogFactory* pFact = @@ -399,6 +436,40 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) break; } + case SID_CLOSEDOCS: + { + + Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); + Reference< XIndexAccess > xTasks( xDesktop->getFrames(), UNO_QUERY ); + if ( !xTasks.is() ) + break; + + sal_Int32 n=0; + do + { + if ( xTasks->getCount() <= n ) + break; + + Any aAny = xTasks->getByIndex(n); + Reference < XCloseable > xTask; + aAny >>= xTask; + try + { + xTask->close(true); + n++; + } + catch( CloseVetoException& ) + { + } + } + while( true ); + + bool bOk = ( n == 0); + rReq.SetReturnValue( SfxBoolItem( 0, bOk ) ); + bDone = true; + break; + } + case SID_SAVEDOCS: { bool bOK = true; @@ -958,6 +1029,10 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) } case SID_CONFIG: + case SID_TOOLBOXOPTIONS: + case SID_CONFIGSTATUSBAR: + case SID_CONFIGMENU: + case SID_CONFIGACCEL: case SID_CONFIGEVENT: { if( SvtMiscOptions().DisableUICustomization() ) @@ -988,6 +1063,15 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet) } break; + case SID_CLOSEDOCS: + { + Reference < XDesktop2 > xDesktop = Desktop::create( ::comphelper::getProcessComponentContext() ); + Reference< XIndexAccess > xTasks( xDesktop->getFrames(), UNO_QUERY ); + if ( !xTasks.is() || !xTasks->getCount() ) + rSet.DisableItem(nWhich); + break; + } + case SID_SAVEDOCS: { bool bModified = false; @@ -1485,6 +1569,23 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) break; #endif // HAVE_FEATURE_SCRIPTING + case SID_OFFICE_CHECK_PLZ: + { + bool bRet = false; + const SfxStringItem* pStringItem = rReq.GetArg(rReq.GetSlot()); + + if ( pStringItem ) + { + bRet = true /*!!!SfxIniManager::CheckPLZ( aPLZ )*/; + } +#if HAVE_FEATURE_SCRIPTING + else + SbxBase::SetError( ERRCODE_BASIC_WRONG_ARGS ); +#endif + rReq.SetReturnValue( SfxBoolItem( rReq.GetSlot(), bRet ) ); + } + break; + case SID_AUTO_CORRECT_DLG: { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 4304a659c111..50fa6bc2b5f1 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -244,8 +244,16 @@ void SfxObjectShell::PrintExec_Impl(SfxRequest &rReq) } -void SfxObjectShell::PrintState_Impl(SfxItemSet &/*rSet*/) +void SfxObjectShell::PrintState_Impl(SfxItemSet &rSet) { + bool bPrinting = false; + SfxViewFrame* pFrame = SfxViewFrame::GetFirst( this ); + if ( pFrame ) + { + SfxPrinter *pPrinter = pFrame->GetViewShell()->GetPrinter(); + bPrinting = pPrinter && pPrinter->IsPrinting(); + } + rSet.Put( SfxBoolItem( SID_PRINTOUT, bPrinting ) ); } bool SfxObjectShell::APISaveAs_Impl(const OUString& aFileName, SfxItemSet& rItemSet) @@ -1103,6 +1111,14 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq) case SID_DOCINFO_COMMENTS : getDocProperties()->setDescription( static_cast(rReq.GetArgs()->Get(rReq.GetSlot())).GetValue() ); break; + + case SID_DOCINFO_KEYWORDS : + { + const OUString aStr = static_cast(rReq.GetArgs()->Get(rReq.GetSlot())).GetValue(); + getDocProperties()->setKeywords( + ::comphelper::string::convertCommaSeparated(aStr) ); + break; + } } } @@ -1128,6 +1144,19 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet) break; } + case SID_DOCINFO_KEYWORDS : + { + rSet.Put( SfxStringItem( nSID, ::comphelper::string:: + convertCommaSeparated(getDocProperties()->getKeywords())) ); + break; + } + + case SID_DOCPATH: + { + OSL_FAIL( "Not supported anymore!" ); + break; + } + case SID_DOCFULLNAME: { rSet.Put( SfxStringItem( SID_DOCFULLNAME, GetTitle(SFX_TITLE_FULLNAME) ) ); @@ -1146,16 +1175,44 @@ void SfxObjectShell::StateProps_Impl(SfxItemSet &rSet) break; } + case SID_DOC_SAVED: + { + rSet.Put( SfxBoolItem( SID_DOC_SAVED, !IsModified() ) ); + break; + } + + case SID_CLOSING: + { + rSet.Put( SfxBoolItem( SID_CLOSING, false ) ); + break; + } + case SID_DOC_LOADING: rSet.Put( SfxBoolItem( nSID, ! ( pImpl->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ) ); break; + + case SID_IMG_LOADING: + rSet.Put( SfxBoolItem( nSID, ! ( pImpl->nLoadedFlags & SfxLoadedFlags::IMAGES ) ) ); + break; } } } -void SfxObjectShell::ExecView_Impl(SfxRequest & /*rReq*/) +void SfxObjectShell::ExecView_Impl(SfxRequest &rReq) { + switch ( rReq.GetSlot() ) + { + case SID_ACTIVATE: + { + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this ); + if ( pFrame ) + pFrame->GetFrame().Appear(); + rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) ); + rReq.Done(); + break; + } + } } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 95f97dee1672..149b24b89826 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2038,6 +2038,8 @@ void SfxViewFrame::ExecView_Impl case SID_VIEWSHELL0: case SID_VIEWSHELL1: case SID_VIEWSHELL2: + case SID_VIEWSHELL3: + case SID_VIEWSHELL4: { const sal_uInt16 nViewNo = rReq.GetSlot() - SID_VIEWSHELL0; bool bSuccess = SwitchToViewShell_Impl( nViewNo, true ); @@ -2184,6 +2186,8 @@ void SfxViewFrame::StateView_Impl case SID_VIEWSHELL0: case SID_VIEWSHELL1: case SID_VIEWSHELL2: + case SID_VIEWSHELL3: + case SID_VIEWSHELL4: { sal_uInt16 nViewNo = nWhich - SID_VIEWSHELL0; if ( GetObjectShell()->GetFactory().GetViewFactoryCount() > diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index f32bb3a6eca1..0357d90c987e 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -155,6 +155,39 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) switch ( rReq.GetSlot() ) { + case SID_SHOWPOPUPS : + { + const SfxBoolItem* pShowItem = rReq.GetArg(SID_SHOWPOPUPS); + bool bShow = pShowItem == nullptr || pShowItem->GetValue(); + + SfxWorkWindow *pWorkWin = GetFrame().GetWorkWindow_Impl(); + if ( bShow ) + { + // First, make the floats viewable + pWorkWin->MakeChildrenVisible_Impl( bShow ); + GetDispatcher()->Update_Impl( true ); + + // Then view it + GetBindings().HidePopups( !bShow ); + } + else + { + pWorkWin->HidePopups_Impl( !bShow, true ); + pWorkWin->MakeChildrenVisible_Impl( bShow ); + } + + Invalidate( rReq.GetSlot() ); + rReq.Done(); + break; + } + + case SID_ACTIVATE: + { + MakeActive_Impl( true ); + rReq.SetReturnValue( SfxObjectItem( 0, this ) ); + break; + } + case SID_NEWDOCDIRECT : { const SfxStringItem* pFactoryItem = rReq.GetArg(SID_NEWDOCDIRECT); @@ -266,6 +299,9 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet ) break; } + case SID_SHOWPOPUPS : + break; + case SID_OBJECT: if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() ) { @@ -293,6 +329,12 @@ void SfxViewFrame::INetExecute_Impl( SfxRequest &rRequest ) case SID_BROWSE_BACKWARD: OSL_FAIL( "SfxViewFrame::INetExecute_Impl: SID_BROWSE_FORWARD/BACKWARD are dead!" ); break; + case SID_CREATELINK: + { +/*! (pb) we need new implementation to create a link +*/ + break; + } case SID_FOCUSURLBOX: { SfxStateCache *pCache = GetBindings().GetAnyStateCache_Impl( SID_OPENURL ); @@ -316,6 +358,12 @@ void SfxViewFrame::INetState_Impl( SfxItemSet &rItemSet ) { rItemSet.DisableItem( SID_BROWSE_FORWARD ); rItemSet.DisableItem( SID_BROWSE_BACKWARD ); + + // Add/SaveToBookmark at BASIC-IDE, QUERY-EDITOR etc. disable + SfxObjectShell *pDocSh = GetObjectShell(); + bool bEmbedded = pDocSh && pDocSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED; + if ( !pDocSh || bEmbedded || !pDocSh->HasName() ) + rItemSet.DisableItem( SID_CREATELINK ); } void SfxViewFrame::Activate( bool /*bMDI*/ ) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 6f3519a81d85..8060a330f132 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -444,6 +444,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) case SID_MAIL_SENDDOCASOOO: case SID_MAIL_SENDDOCASPDF: case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASFORMAT: { SfxObjectShell* pDoc = GetObjectShell(); if ( pDoc && pDoc->QueryHiddenInformation( @@ -656,6 +657,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) #if HAVE_FEATURE_MACOSX_SANDBOX case SID_BLUETOOTH_SENDDOC: case SID_MAIL_SENDDOC: + case SID_MAIL_SENDDOCASFORMAT: case SID_MAIL_SENDDOCASMS: case SID_MAIL_SENDDOCASOOO: case SID_MAIL_SENDDOCASPDF: -- cgit