avmedia/source/framework/soundhandler.cxx | 10 +++++----- avmedia/source/framework/soundhandler.hxx | 2 +- basctl/source/basicide/baside2.hxx | 2 +- basctl/source/basicide/baside2b.cxx | 14 +++++++------- framework/inc/services/layoutmanager.hxx | 2 +- framework/inc/uielement/toolbarmanager.hxx | 2 +- framework/source/layoutmanager/layoutmanager.cxx | 22 +++++++++++----------- framework/source/uielement/toolbarmanager.cxx | 18 +++++++++--------- sc/source/ui/formdlg/dwfunctr.cxx | 6 +++--- sc/source/ui/inc/anyrefdg.hxx | 2 +- sc/source/ui/inc/dwfunctr.hxx | 2 +- sc/source/ui/miscdlgs/anyrefdg.cxx | 6 +++--- 12 files changed, 44 insertions(+), 44 deletions(-)
New commits: commit ccbd142b37ca0184528e4a63515b9a7a878eb0e2 Author: Jennifer Liebel <jliebe...@gmail.com> Date: Thu Nov 13 13:10:55 2014 +0000 changed timers to idle Change-Id: I05ccb8bd73070462edcc911956859aa7967b5901 diff --git a/avmedia/source/framework/soundhandler.cxx b/avmedia/source/framework/soundhandler.cxx index d80d29b..6801d4c 100644 --- a/avmedia/source/framework/soundhandler.cxx +++ b/avmedia/source/framework/soundhandler.cxx @@ -188,7 +188,7 @@ SoundHandler::SoundHandler( const css::uno::Reference< css::lang::XMultiServiceF , m_bError ( false ) , m_xFactory ( xFactory ) { - m_aUpdateTimer.SetTimeoutHdl(LINK(this, SoundHandler, implts_PlayerNotify)); + m_aUpdateIdle.SetIdleHdl(LINK(this, SoundHandler, implts_PlayerNotify)); } /*-************************************************************************************************************ @@ -245,7 +245,7 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& // If player currently used for other dispatch() requests ... // cancel it by calling stop()! - m_aUpdateTimer.Stop(); + m_aUpdateIdle.Stop(); if (m_xPlayer.is()) { if (m_xPlayer->isPlaying()) @@ -263,8 +263,8 @@ void SAL_CALL SoundHandler::dispatchWithNotification(const css::util::URL& // Count this request and initialize self-holder against dieing by uno ref count ... m_xSelfHold = css::uno::Reference< css::uno::XInterface >(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY); m_xPlayer->start(); - m_aUpdateTimer.SetTimeout( 200 ); - m_aUpdateTimer.Start(); + m_aUpdateIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER ); + m_aUpdateIdle.Start(); } catch( css::uno::Exception& e ) { @@ -347,7 +347,7 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify) if (m_xPlayer.is() && m_xPlayer->isPlaying() && m_xPlayer->getMediaTime() < m_xPlayer->getDuration()) { - m_aUpdateTimer.Start(); + m_aUpdateIdle.Start(); return 0L; } m_xPlayer.clear(); diff --git a/avmedia/source/framework/soundhandler.hxx b/avmedia/source/framework/soundhandler.hxx index d41c033..642dbba 100644 --- a/avmedia/source/framework/soundhandler.hxx +++ b/avmedia/source/framework/soundhandler.hxx @@ -130,7 +130,7 @@ class SoundHandler : // interfaces css::uno::Reference< css::media::XPlayer > m_xPlayer ; // uses avmedia player to play sounds... css::uno::Reference< css::frame::XDispatchResultListener > m_xListener ; - Timer m_aUpdateTimer; + Idle m_aUpdateIdle; }; // class SoundHandler diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index df3aae8..4e18db6 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -93,7 +93,7 @@ private: long nCurTextWidth; SyntaxHighlighter aHighlighter; - Timer aSyntaxIdleTimer; + Idle aSyntaxIdle; typedef std::set<sal_uInt16> SyntaxLineSet; SyntaxLineSet aSyntaxLineTable; DECL_LINK(SyntaxTimerHdl, void *); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index f8fb47f..61a7e6b 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -271,7 +271,7 @@ EditorWindow::~EditorWindow() n->removePropertiesChangeListener(listener_.get()); } - aSyntaxIdleTimer.Stop(); + aSyntaxIdle.Stop(); if ( pEditEngine ) { @@ -962,8 +962,8 @@ void EditorWindow::CreateEditEngine() ImplSetFont(); - aSyntaxIdleTimer.SetTimeout( 200 ); - aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) ); + aSyntaxIdle.SetPriority( VCL_IDLE_PRIORITY_LOWER ); + aSyntaxIdle.SetIdleHdl( LINK( this, EditorWindow, SyntaxTimerHdl ) ); bool bWasDoSyntaxHighlight = bDoSyntaxHighlight; bDoSyntaxHighlight = false; // too slow for large texts... @@ -998,7 +998,7 @@ void EditorWindow::CreateEditEngine() StartListening( *pEditEngine ); - aSyntaxIdleTimer.Stop(); + aSyntaxIdle.Stop(); bDoSyntaxHighlight = bWasDoSyntaxHighlight; @@ -1265,7 +1265,7 @@ void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara ) if ( bDelayHighlight ) { aSyntaxLineTable.insert( nPara ); - aSyntaxIdleTimer.Start(); + aSyntaxIdle.Start(); } else DoSyntaxHighlight( nPara ); @@ -1345,8 +1345,8 @@ void EditorWindow::DestroyProgress() void EditorWindow::ForceSyntaxTimeout() { - aSyntaxIdleTimer.Stop(); - aSyntaxIdleTimer.GetTimeoutHdl().Call(&aSyntaxIdleTimer); + aSyntaxIdle.Stop(); + aSyntaxIdle.GetTimeoutHdl().Call(&aSyntaxIdle); } diff --git a/framework/inc/services/layoutmanager.hxx b/framework/inc/services/layoutmanager.hxx index 12e9d30..5635c7f 100644 --- a/framework/inc/services/layoutmanager.hxx +++ b/framework/inc/services/layoutmanager.hxx @@ -310,7 +310,7 @@ namespace framework css::uno::Reference< ::com::sun::star::container::XNameAccess > m_xPersistentWindowStateSupplier; GlobalSettings* m_pGlobalSettings; OUString m_aModuleIdentifier; - Idle m_aAsyncLayoutIdle; + Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener ToolbarLayoutManager* m_pToolbarManager; css::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener > m_xToolbarManager; diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 320aa7c..462f48e 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -208,7 +208,7 @@ class ToolBarManager : public ToolbarManager_Base CommandToInfoMap m_aCommandMap; SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap; - Idle m_aAsyncUpdateControllersIdle; + Timer m_aAsyncUpdateControllersTimer; OUString m_sIconTheme; MenuDescriptionMap m_aMenuMap; bool m_bAcceleratorCfg; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index e5cc2dd..ad8187d 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -138,8 +138,8 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_aAsyncLayoutIdle.SetPriority( VCL_IDLE_PRIORITY_RESIZE ); - m_aAsyncLayoutIdle.SetIdleHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); + m_aAsyncLayoutTimer.SetTimeout( 50 ); + m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); registerProperty( LAYOUTMANAGER_PROPNAME_AUTOMATICTOOLBARS, LAYOUTMANAGER_PROPHANDLE_AUTOMATICTOOLBARS, css::beans::PropertyAttribute::TRANSIENT, &m_bAutomaticToolbars, ::getCppuType( &m_bAutomaticToolbars ) ); registerProperty( LAYOUTMANAGER_PROPNAME_HIDECURRENTUI, LAYOUTMANAGER_PROPHANDLE_HIDECURRENTUI, beans::PropertyAttribute::TRANSIENT, &m_bHideCurrentUI, ::getCppuType( &m_bHideCurrentUI ) ); @@ -152,7 +152,7 @@ LayoutManager::LayoutManager( const Reference< XComponentContext >& xContext ) : LayoutManager::~LayoutManager() { Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); - m_aAsyncLayoutIdle.Stop(); + m_aAsyncLayoutTimer.Stop(); setDockingAreaAcceptor(NULL); delete m_pGlobalSettings; } @@ -1250,7 +1250,7 @@ throw ( RuntimeException, std::exception ) // IMPORTANT: Be sure to stop layout timer if don't have a docking area acceptor! if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutIdle.Stop(); + m_aAsyncLayoutTimer.Stop(); bool bAutomaticToolbars( m_bAutomaticToolbars ); std::vector< Reference< awt::XWindow > > oldDockingAreaWindows; @@ -1258,7 +1258,7 @@ throw ( RuntimeException, std::exception ) ToolbarLayoutManager* pToolbarManager = m_pToolbarManager; if ( !xDockingAreaAcceptor.is() ) - m_aAsyncLayoutIdle.Stop(); + m_aAsyncLayoutTimer.Stop(); // Remove listener from old docking area acceptor if ( m_xDockingAreaAcceptor.is() ) @@ -2259,7 +2259,7 @@ throw (RuntimeException, std::exception) SolarMutexClearableGuard aWriteLock; if ( bDoLayout ) - m_aAsyncLayoutIdle.Stop(); + m_aAsyncLayoutTimer.Stop(); aWriteLock.clear(); Any a( nLockCount ); @@ -2658,14 +2658,14 @@ throw( uno::RuntimeException, std::exception ) // application modules need this. So we have to check if this is the first // call after the async layout time expired. m_bMustDoLayout = true; - if ( !m_aAsyncLayoutIdle.IsActive() ) + if ( !m_aAsyncLayoutTimer.IsActive() ) { - const Link& aLink = m_aAsyncLayoutIdle.GetTimeoutHdl(); + const Link& aLink = m_aAsyncLayoutTimer.GetTimeoutHdl(); if ( aLink.IsSet() ) - aLink.Call( &m_aAsyncLayoutIdle ); + aLink.Call( &m_aAsyncLayoutTimer ); } if ( m_nLockCount == 0 ) - m_aAsyncLayoutIdle.Start(); + m_aAsyncLayoutTimer.Start(); } else if ( m_xFrame.is() && aEvent.Source == m_xFrame->getContainerWindow() ) { @@ -2735,7 +2735,7 @@ void SAL_CALL LayoutManager::windowHidden( const lang::EventObject& aEvent ) thr IMPL_LINK_NOARG(LayoutManager, AsyncLayoutHdl) { SolarMutexClearableGuard aReadLock; - m_aAsyncLayoutIdle.Stop(); + m_aAsyncLayoutTimer.Stop(); if( !m_xContainerWindow.is() ) return 0; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index cbcc849..ab96b06 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -235,15 +235,15 @@ ToolBarManager::ToolBarManager( const Reference< XComponentContext >& rxContext, aHelpIdAsString += OUStringToOString( aToolbarName, RTL_TEXTENCODING_UTF8 );; m_pToolBar->SetHelpId( aHelpIdAsString ); - m_aAsyncUpdateControllersIdle.SetPriority( VCL_IDLE_PRIORITY_MEDIUM ); - m_aAsyncUpdateControllersIdle.SetIdleHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); + m_aAsyncUpdateControllersTimer.SetTimeout( 50 ); + m_aAsyncUpdateControllersTimer.SetTimeoutHdl( LINK( this, ToolBarManager, AsyncUpdateControllersHdl ) ); SvtMiscOptions().AddListenerLink( LINK( this, ToolBarManager, MiscOptionsChanged ) ); } ToolBarManager::~ToolBarManager() { - assert(!m_aAsyncUpdateControllersIdle.IsActive()); + assert(!m_aAsyncUpdateControllersTimer.IsActive()); OSL_ASSERT( m_pToolBar == 0 ); OSL_ASSERT( !m_bAddedToTaskPaneList ); } @@ -476,7 +476,7 @@ throw ( RuntimeException, std::exception ) { SolarMutexGuard g; if ( Action.Action == FrameAction_CONTEXT_CHANGED ) - m_aAsyncUpdateControllersIdle.Start(); + m_aAsyncUpdateControllersTimer.Start(); } void SAL_CALL ToolBarManager::statusChanged( const ::com::sun::star::frame::FeatureStateEvent& Event ) @@ -629,7 +629,7 @@ void SAL_CALL ToolBarManager::dispose() throw( RuntimeException, std::exception // stop timer to prevent timer events after dispose // do it last because other calls could restart timer in StateChanged() - m_aAsyncUpdateControllersIdle.Stop(); + m_aAsyncUpdateControllersTimer.Stop(); m_bDisposed = true; } @@ -1414,7 +1414,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if( m_pToolBar->WillUsePopupMode() ) UpdateControllers(); else if ( m_pToolBar->IsReallyVisible() ) - m_aAsyncUpdateControllersIdle.Start(); + m_aAsyncUpdateControllersTimer.Start(); // Try to retrieve UIName from the container property set and set it as the title // if it is not empty. @@ -2040,11 +2040,11 @@ IMPL_LINK( ToolBarManager, StateChanged, StateChangedType*, pStateChangedType ) else if ( *pStateChangedType == StateChangedType::VISIBLE ) { if ( m_pToolBar->IsReallyVisible() ) - m_aAsyncUpdateControllersIdle.Start(); + m_aAsyncUpdateControllersTimer.Start(); } else if ( *pStateChangedType == StateChangedType::INITSHOW ) { - m_aAsyncUpdateControllersIdle.Start(); + m_aAsyncUpdateControllersTimer.Start(); } return 1; } @@ -2099,7 +2099,7 @@ IMPL_LINK_NOARG(ToolBarManager, AsyncUpdateControllersHdl) return 1; // Request to update our controllers - m_aAsyncUpdateControllersIdle.Stop(); + m_aAsyncUpdateControllersTimer.Stop(); UpdateControllers(); return 0; diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 32ea15d..d1caf27 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -103,8 +103,8 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, InitLRUList(); SetStyle(GetStyle()|WB_CLIPCHILDREN); - aTimer.SetTimeout(200); - aTimer.SetTimeoutHdl(LINK( this, ScFunctionDockWin, TimerHdl)); + aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER); + aIdle.SetIdleHdl(LINK( this, ScFunctionDockWin, TimerHdl)); if (pCW != NULL) eSfxNewAlignment=GetAlignment(); @@ -1026,7 +1026,7 @@ void ScFunctionDockWin::ToggleFloatingMode() aOldSize.Height()=0; aOldSize.Width()=0; - aTimer.Start(); + aIdle.Start(); } IMPL_LINK_NOARG(ScFunctionDockWin, TimerHdl) diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx index 32157a6..51beb66 100644 --- a/sc/source/ui/inc/anyrefdg.hxx +++ b/sc/source/ui/inc/anyrefdg.hxx @@ -121,7 +121,7 @@ private: SfxBindings* pMyBindings; vcl::Window* pActiveWin; - Timer aTimer; + Idle aIdle; OUString aDocName; // document on which the dialog was opened DECL_LINK( UpdateFocusHdl, void* ); diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 8040866..7ac4181 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -46,7 +46,7 @@ class ScFunctionDockWin : public SfxDockingWindow, public SfxListener { private: - Timer aTimer; + Idle aIdle; ScPrivatSplit aPrivatSplit; ListBox aCatBox; ListBox aFuncList; diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 59387d0..6ea1936 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -767,8 +767,8 @@ ScRefHandler::ScRefHandler( vcl::Window &rWindow, SfxBindings* pB, bool bBindRef { m_aHelper.SetWindow(&m_rWindow); reverseUniqueHelpIdHack(m_rWindow); - aTimer.SetTimeout(200); - aTimer.SetTimeoutHdl(LINK( this, ScRefHandler, UpdateFocusHdl)); + aIdle.SetPriority(VCL_IDLE_PRIORITY_LOWER); + aIdle.SetIdleHdl(LINK( this, ScRefHandler, UpdateFocusHdl)); if( bBindRef ) EnterRefMode(); } @@ -956,7 +956,7 @@ void ScRefHandler::stateChanged(const StateChangedType nStateChange, const bool ScFormulaReferenceHelper::enableInput( false ); m_aHelper.EnableSpreadsheets(); m_aHelper.SetDispatcherLock( true ); - aTimer.Start(); + aIdle.Start(); } else { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits