Date: prev next · Thread: first prev next last
2010 Archives by date, by thread · List index


the followinf code seems suspect to me:


//----- XPaintListener --------------------------------------------------------

void SAL_CALL PresenterClock::windowPaint (const awt::PaintEvent& rEvent)
    throw (RuntimeException)
{
    (void)rEvent;
    ThrowIfDisposed();
    ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex());
    Paint(rEvent.UpdateRect);
}

getGlobalMutex() is not the solarmutex. this is a mutex instanciated
by the osl library.
The fact that the guard is named SoalrGuard, lead me to believe that
the original author meant to take a guard on the solarMutex.

I'm thinking I should change this guard with a SolarMutexGuard aSolarGuard;

Someone has an opinion on this ?

Note: similar code exist in PresentedNotesView.cxx and PresenterTimer.cxx

Norbert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.