[Libreoffice-commits] core.git: include/vcl sd/source vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Tue Jan 21 07:39:20 PST 2014
include/vcl/svapp.hxx | 21 +++++++++++++++------
sd/source/ui/slideshow/slideshowimpl.cxx | 8 ++++----
vcl/source/app/svapp.cxx | 10 ++++++++--
3 files changed, 27 insertions(+), 12 deletions(-)
New commits:
commit 1d621d363cf966648fc5ed551dbc95de3e70e89c
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Sun Jan 19 13:13:07 2014 +1100
Change EnableNoYieldMode(bool) to better names
It makes no sense to disable something via an Enable function.
I have split the function into Enable and Disable functions, and
update the code accordingly.
Conflicts:
include/vcl/svapp.hxx
Change-Id: Ic05d69796f43e802a4a2a16aaca44433b6eaa018
Reviewed-on: https://gerrit.libreoffice.org/7525
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 0432a17..8e7b053 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -469,17 +469,26 @@ public:
"No yield" mode prevents @Yield from waiting for events.
@remarks This was originally implemented in OOo bug 98792 to improve
- Impress slideshows. For some reason, to \em disable no yield mode, you
- call on EnableNoYieldMode
+ Impress slideshows.
- @param i_bNoYield If set to false, then "no yield" mode is turned off.
- If set to true, then "no yield" mode is turned on.
+ @see DisableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex,
+ GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
+ AddPostYieldListener, RemovePostYieldListener
+ */
+ static void EnableNoYieldMode();
- @see Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex,
+ /** @Brief Disables "no yield" mode
+
+ "No yield" mode prevents @Yield from waiting for events.
+
+ @remarks This was originally implemented in OOo bug 98792 to improve
+ Impress slideshows.
+
+ @see EnableNoYieldMode, Execute, Quit, Reschedule, Yield, EndYield, GetSolarMutex,
GetMainThreadIdentifier, ReleaseSolarMutex, AcquireSolarMutex,
AddPostYieldListener, RemovePostYieldListener
*/
- static void EnableNoYieldMode( bool i_bNoYield );
+ static void DisableNoYieldMode();
/** Add a listener for yield events
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 87e6435..2bc4d72 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -760,7 +760,7 @@ void SAL_CALL SlideshowImpl::disposing()
setActiveXToolbarsVisible( sal_True );
- Application::EnableNoYieldMode(false);
+ Application::DisableNoYieldMode();
Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
mbDisposed = true;
@@ -1855,7 +1855,7 @@ IMPL_LINK_NOARG(SlideshowImpl, PostYieldListener)
// prevent me from deletion when recursing (App::Reschedule does)
const rtl::Reference<SlideshowImpl> this_(this);
- Application::EnableNoYieldMode(false);
+ Application::DisableNoYieldMode();
Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
Application::Reschedule(true); // fix for fdo#32861 - process
// *all* outstanding events after
@@ -1896,7 +1896,7 @@ sal_Int32 SlideshowImpl::updateSlideShow (void)
if (::basegfx::fTools::equalZero(fUpdate))
{
// Use post yield listener for short update intervalls.
- Application::EnableNoYieldMode(true);
+ Application::EnableNoYieldMode();
Application::AddPostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
}
else
@@ -1917,7 +1917,7 @@ sal_Int32 SlideshowImpl::updateSlideShow (void)
// integer may lead to zero value.)
OSL_ASSERT(static_cast<sal_uLong>(fUpdate * 1000.0) > 0);
- Application::EnableNoYieldMode(false);
+ Application::DisableNoYieldMode();
Application::RemovePostYieldListener(LINK(this, SlideshowImpl, PostYieldListener));
// Use a timer for the asynchronous callback.
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 6d345f3..a754856 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -986,10 +986,16 @@ void Application::RemoveIdleHdl( const Link& rLink )
pSVData->maAppData.mpIdleMgr->RemoveIdleHdl( rLink );
}
-void Application::EnableNoYieldMode( bool i_bNoYield )
+void Application::EnableNoYieldMode()
{
ImplSVData* pSVData = ImplGetSVData();
- pSVData->maAppData.mbNoYield = i_bNoYield;
+ pSVData->maAppData.mbNoYield = true;
+}
+
+void Application::DisableNoYieldMode()
+{
+ ImplSVData* pSVData = ImplGetSVData();
+ pSVData->maAppData.mbNoYield = false;
}
void Application::AddPostYieldListener( const Link& i_rListener )
More information about the Libreoffice-commits
mailing list