don't use a global LockListener to avoid startup hit on ctoring
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include <unotools/pathoptions.hxx>
|
#include <unotools/pathoptions.hxx>
|
||||||
|
#include <rtl/instance.hxx>
|
||||||
#include <sfx2/viewfrm.hxx>
|
#include <sfx2/viewfrm.hxx>
|
||||||
#include "svx/gallery1.hxx"
|
#include "svx/gallery1.hxx"
|
||||||
#include "svx/galtheme.hxx"
|
#include "svx/galtheme.hxx"
|
||||||
@@ -35,11 +36,10 @@
|
|||||||
#include "svx/gallery.hxx"
|
#include "svx/gallery.hxx"
|
||||||
#include "galobj.hxx"
|
#include "galobj.hxx"
|
||||||
|
|
||||||
// -----------
|
namespace
|
||||||
// - Statics -
|
{
|
||||||
// -----------
|
class theLockListener : public rtl::Static< SfxListener, theLockListener > {};
|
||||||
|
}
|
||||||
static SfxListener aLockListener;
|
|
||||||
|
|
||||||
// -------------------
|
// -------------------
|
||||||
// - GalleryExplorer -
|
// - GalleryExplorer -
|
||||||
@@ -371,7 +371,7 @@ sal_Bool GalleryExplorer::BeginLocking( const String& rThemeName )
|
|||||||
|
|
||||||
if( pGal )
|
if( pGal )
|
||||||
{
|
{
|
||||||
GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, aLockListener );
|
GalleryTheme* pTheme = pGal->AcquireTheme( rThemeName, theLockListener::get() );
|
||||||
|
|
||||||
if( pTheme )
|
if( pTheme )
|
||||||
{
|
{
|
||||||
@@ -413,7 +413,7 @@ sal_Bool GalleryExplorer::EndLocking( const String& rThemeName )
|
|||||||
if( bReleaseLockedTheme )
|
if( bReleaseLockedTheme )
|
||||||
{
|
{
|
||||||
// release locked theme
|
// release locked theme
|
||||||
pGal->ReleaseTheme( pTheme, aLockListener );
|
pGal->ReleaseTheme( pTheme, theLockListener::get() );
|
||||||
bRet = sal_True;
|
bRet = sal_True;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user