diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-21 13:05:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-21 19:31:34 +0100 |
commit | 08f4ecd5823c420bb7157c238460d50f1f1f9791 (patch) | |
tree | f9bd43bba0d6d8bd3baa752fd6c4f51a1f4f7d52 /sfx2/source | |
parent | 46db544b41fd30f61dd7b7b4fa2b97ab22ceb079 (diff) |
unused SID command in sfx2
Change-Id: Ib11b2fb8d922cf522cc28d86082036b75002ba87
Reviewed-on: https://gerrit.libreoffice.org/46908
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 101 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 61 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm2.cxx | 48 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
5 files changed, 2 insertions, 214 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 31de5352644b..eaa244153fc2 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -324,45 +324,12 @@ 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 ) { @@ -394,10 +361,6 @@ 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 = @@ -436,40 +399,6 @@ 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; @@ -1029,10 +958,6 @@ 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() ) @@ -1063,15 +988,6 @@ 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; @@ -1569,23 +1485,6 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) break; #endif // HAVE_FEATURE_SCRIPTING - case SID_OFFICE_CHECK_PLZ: - { - bool bRet = false; - const SfxStringItem* pStringItem = rReq.GetArg<SfxStringItem>(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 50fa6bc2b5f1..4304a659c111 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -244,16 +244,8 @@ 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) @@ -1111,14 +1103,6 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq) case SID_DOCINFO_COMMENTS : getDocProperties()->setDescription( static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(rReq.GetSlot())).GetValue() ); break; - - case SID_DOCINFO_KEYWORDS : - { - const OUString aStr = static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(rReq.GetSlot())).GetValue(); - getDocProperties()->setKeywords( - ::comphelper::string::convertCommaSeparated(aStr) ); - break; - } } } @@ -1144,19 +1128,6 @@ 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) ) ); @@ -1175,44 +1146,16 @@ 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 149b24b89826..95f97dee1672 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2038,8 +2038,6 @@ 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 ); @@ -2186,8 +2184,6 @@ 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 0357d90c987e..f32bb3a6eca1 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -155,39 +155,6 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) switch ( rReq.GetSlot() ) { - case SID_SHOWPOPUPS : - { - const SfxBoolItem* pShowItem = rReq.GetArg<SfxBoolItem>(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<SfxStringItem>(SID_NEWDOCDIRECT); @@ -299,9 +266,6 @@ void SfxViewFrame::GetState_Impl( SfxItemSet &rSet ) break; } - case SID_SHOWPOPUPS : - break; - case SID_OBJECT: if ( GetViewShell() && GetViewShell()->GetVerbs().getLength() && !GetObjectShell()->IsInPlaceActive() ) { @@ -329,12 +293,6 @@ 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 ); @@ -358,12 +316,6 @@ 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 8060a330f132..6f3519a81d85 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -444,7 +444,6 @@ 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( @@ -657,7 +656,6 @@ 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: |