diff options
author | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-23 14:38:46 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@sun.com> | 2009-11-23 14:38:46 +0100 |
commit | 1e30a9a1368eab0b8a56efdcf677bb3c8e27c768 (patch) | |
tree | 9745c35172ca19a55fe028287edbcc688c72dd98 /sfx2/source/inet | |
parent | 61addfefa431d7c5fd8a445c08bd5b1bf122161b (diff) |
[CWS autorecovery] removed SfxCancellable/SfxCancelManager, and (part of) its transitive closure
No real-life use cases for this exist anymore, since nowadays document loading happens
synchronously all the time.
Diffstat (limited to 'sfx2/source/inet')
-rw-r--r-- | sfx2/source/inet/inettbc.cxx | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index d6ce65c96b6d..e9cf246b9919 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -42,7 +42,6 @@ #include <com/sun/star/task/XInteractionHandler.hpp> #include <svtools/eitem.hxx> #include <svtools/stritem.hxx> -#include <svtools/cancel.hxx> #include <svtools/historyoptions.hxx> #include <svtools/folderrestriction.hxx> #include <vcl/toolbox.hxx> @@ -305,102 +304,3 @@ void SfxURLToolBoxControl_Impl::StateChanged } } -//*************************************************************************** -// SfxCancelToolBoxControl_Impl -//*************************************************************************** - -SFX_IMPL_TOOLBOX_CONTROL(SfxCancelToolBoxControl_Impl,SfxBoolItem) - -//*************************************************************************** - -SfxCancelToolBoxControl_Impl::SfxCancelToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox ) : - SfxToolBoxControl( nSlotId, nId, rBox ) -{ -} - -//*************************************************************************** - -SfxPopupWindowType SfxCancelToolBoxControl_Impl::GetPopupWindowType() const -{ - return SFX_POPUPWINDOW_ONTIMEOUT; -} - -//*************************************************************************** - -SfxPopupWindow* SfxCancelToolBoxControl_Impl::CreatePopupWindow() -{ - PopupMenu aMenu; - BOOL bExecute = FALSE, bSeparator = FALSE; - USHORT nIndex = 1; - for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager(); - pCancelMgr; - pCancelMgr = pCancelMgr->GetParent() ) - { - for ( USHORT n=0; n<pCancelMgr->GetCancellableCount(); ++n ) - { - if ( !n && bSeparator ) - { - aMenu.InsertSeparator(); - bSeparator = FALSE; - } - String aItemText = pCancelMgr->GetCancellable(n)->GetTitle(); - if ( aItemText.Len() > 50 ) - { - aItemText.Erase( 48 ); - aItemText += DEFINE_CONST_UNICODE("..."); - } - aMenu.InsertItem( nIndex++, aItemText ); - bExecute = TRUE; - bSeparator = TRUE; - } - } - - ToolBox& rToolBox = GetToolBox(); - USHORT nId = bExecute ? aMenu.Execute( &rToolBox, rToolBox.GetPointerPosPixel() ) : 0; - GetToolBox().EndSelection(); -// ClearCache(); -// UpdateSlot(); - if ( nId ) - { - String aSearchText = aMenu.GetItemText(nId); - for ( SfxCancelManager *pCancelMgr = SfxViewFrame::Current()->GetTopViewFrame()->GetCancelManager(); - pCancelMgr; - pCancelMgr = pCancelMgr->GetParent() ) - { - for ( USHORT n = 0; n < pCancelMgr->GetCancellableCount(); ++n ) - { - SfxCancellable *pCancel = pCancelMgr->GetCancellable(n); - String aItemText = pCancel->GetTitle(); - if ( aItemText.Len() > 50 ) - { - aItemText.Erase( 48 ); - aItemText += DEFINE_CONST_UNICODE("..."); - } - - if ( aItemText == aSearchText ) - { - pCancel->Cancel(); - return 0; - } - } - } - - } - - return 0; -} - -//*************************************************************************** - -void SfxCancelToolBoxControl_Impl::StateChanged -( - USHORT nSID, - SfxItemState eState, - const SfxPoolItem* pState -) -{ - SfxVoidItem aVoidItem( nSID ); - //SfxToolBoxControl::StateChanged( nSID, eState, pState ? &aVoidItem : 0 ); - SfxToolBoxControl::StateChanged( nSID, eState, pState ); -} - |