From 83d3e6e371cde7e455bf74890c55d747fac6992c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 28 Mar 2012 16:19:53 +0100 Subject: don't use a global LockListener to avoid startup hit on ctoring --- svx/source/gallery2/galexpl.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'svx') diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 45b7b5ae796e..a2c4f02962a2 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -28,6 +28,7 @@ #include +#include #include #include "svx/gallery1.hxx" #include "svx/galtheme.hxx" @@ -35,11 +36,10 @@ #include "svx/gallery.hxx" #include "galobj.hxx" -// ----------- -// - Statics - -// ----------- - -static SfxListener aLockListener; +namespace +{ + class theLockListener : public rtl::Static< SfxListener, theLockListener > {}; +} // ------------------- // - GalleryExplorer - @@ -371,7 +371,7 @@ sal_Bool GalleryExplorer::BeginLocking( const String& rThemeName ) if( pGal ) { - GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aLockListener ); + GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, theLockListener::get() ); if( pTheme ) { @@ -413,7 +413,7 @@ sal_Bool GalleryExplorer::EndLocking( const String& rThemeName ) if( bReleaseLockedTheme ) { // release locked theme - pGal->ReleaseTheme( pTheme, aLockListener ); + pGal->ReleaseTheme( pTheme, theLockListener::get() ); bRet = sal_True; } } -- cgit