Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread Thorsten Behrens
Norbert Thiebaud wrote: > On Mon, Nov 1, 2010 at 6:05 AM, Caolán McNamara wrote: > > Can anyone convince me that its not cargo-cult programming and that the > > mutexes achieve something worth-while ;-) ? > Nope. Looking at other places, there's really no consistent serialization whatsoever. > mu

Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread Norbert Thiebaud
On Mon, Nov 1, 2010 at 6:05 AM, Caolán McNamara wrote: > On Mon, 2010-11-01 at 10:54 +0100, David Tardon wrote: >> Yes, but the situation here is different. The Paint method is actually >> defined in the same class and has nothing in common with VCL's >> Window::Paint. The actual painting is done

Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread Caolán McNamara
On Mon, 2010-11-01 at 10:54 +0100, David Tardon wrote: > Yes, but the situation here is different. The Paint method is actually > defined in the same class and has nothing in common with VCL's > Window::Paint. The actual painting is done through Canvas. Can anyone convince me that its not cargo-cu

Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread Norbert Thiebaud
On Mon, Nov 1, 2010 at 4:54 AM, David Tardon wrote: > On Mon, Nov 01, 2010 at 09:24:09AM +, Caolán McNamara wrote: >> On Sun, 2010-10-31 at 23:04 -0500, Norbert Thiebaud wrote: >> >     ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex()); >> >     Paint(rEvent.UpdateRect); >> >> > I

Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread David Tardon
On Mon, Nov 01, 2010 at 09:24:09AM +, Caolán McNamara wrote: > On Sun, 2010-10-31 at 23:04 -0500, Norbert Thiebaud wrote: > > ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex()); > > Paint(rEvent.UpdateRect); > > > I'm thinking I should change this guard with a SolarMutexGua

Re: [Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-11-01 Thread Caolán McNamara
On Sun, 2010-10-31 at 23:04 -0500, Norbert Thiebaud wrote: > ::osl::MutexGuard aSolarGuard (::osl::Mutex::getGlobalMutex()); > Paint(rEvent.UpdateRect); > I'm thinking I should change this guard with a SolarMutexGuard aSolarGuard; > > Someone has an opinion on this ? Because it's protect

[Libreoffice] suspect code in extentions/sdext/source/presenter/PresenterClock.cxx

2010-10-31 Thread Norbert Thiebaud
the followinf code seems suspect to me: //- XPaintListener void SAL_CALL PresenterClock::windowPaint (const awt::PaintEvent& rEvent) throw (RuntimeException) { (void)rEvent; ThrowIfDisposed(); ::osl::MutexGuard aSolarGu