Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
5d19d9e8
Kaydet (Commit)
5d19d9e8
authored
Nis 22, 2011
tarafından
David Tardon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
make the init. of this static var thread-safe
(and don't leak memory on exit...)
üst
66c11b52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
24 deletions
+30
-24
shell.hxx
sfx2/inc/sfx2/shell.hxx
+30
-24
No files found.
sfx2/inc/sfx2/shell.hxx
Dosyayı görüntüle @
5d19d9e8
...
...
@@ -28,10 +28,13 @@
#ifndef _SFX_SHELL_HXX
#define _SFX_SHELL_HXX
#include <boost/shared_ptr.hpp>
#include "sal/config.h"
#include "sfx2/dllapi.h"
#include "sal/types.h"
#include <com/sun/star/embed/VerbDescriptor.hpp>
#include <rtl/instance.hxx>
#include <tools/debug.hxx>
#include <tools/rtti.hxx>
#include <svl/brdcst.hxx>
...
...
@@ -311,9 +314,6 @@ inline void SfxShell::SetPool
#define SFX_SLOTMAP_ARG(ShellClass) static SfxSlot a##ShellClass##Slots_Impl[] =
#define SFX_DECL_INTERFACE(nId) \
static SfxInterface* pInterface; \
private: \
static void InitInterface_Impl(); \
public: \
static const SfxFormalArgument* pSfxFormalArgs_Impl; \
static SfxInterface* GetStaticInterface(); \
...
...
@@ -323,21 +323,27 @@ inline void SfxShell::SetPool
#define SFX_IMPL_INTERFACE(Class,SuperClass,NameResId) \
\
SfxInterface* Class::pInterface = 0; \
const SfxFormalArgument* Class::pSfxFormalArgs_Impl = a##Class##Args_Impl;\
static void Init##Class##Interface_Impl(boost::shared_ptr<SfxInterface>& pInterface); \
struct Class##Interface_Impl \
: public rtl::StaticWithInit<boost::shared_ptr<SfxInterface>, Class##Interface_Impl> \
{ \
boost::shared_ptr<SfxInterface> operator()() const \
{ \
boost::shared_ptr<SfxInterface> pIface( \
new SfxInterface( \
#Class, NameResId, Class::GetInterfaceId(), \
SuperClass::GetStaticInterface(), \
a##Class##Slots_Impl[0], \
(sal_uInt16) (sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ) ) \
; \
Init##Class##Interface_Impl(pIface); \
return pIface; \
} \
}; \
SfxInterface* Class::GetStaticInterface() \
{ \
if ( !pInterface ) \
{ \
pInterface = \
new SfxInterface( \
#Class, NameResId, GetInterfaceId(), \
SuperClass::GetStaticInterface(), \
a##Class##Slots_Impl[0], \
(sal_uInt16) (sizeof(a##Class##Slots_Impl) / sizeof(SfxSlot) ) ); \
InitInterface_Impl(); \
} \
return pInterface; \
return get_pointer(Class##Interface_Impl::get()); \
} \
\
SfxInterface* Class::GetInterface() const \
...
...
@@ -350,7 +356,7 @@ inline void SfxShell::SetPool
GetStaticInterface()->Register(pMod); \
} \
\
void
Class::InitInterface_Impl(
)
void
Init##Class##Interface_Impl(boost::shared_ptr<SfxInterface>& pInterface
)
#define SFX_POSITION_MASK 0x000F
#define SFX_VISIBILITY_MASK 0xFFF0
...
...
@@ -369,28 +375,28 @@ inline void SfxShell::SetPool
#define SFX_VISIBILITY_NOCONTEXT 0xFFFF // Always visable
#define SFX_OBJECTBAR_REGISTRATION(nPos,rResId) \
GetStaticInterface()
->RegisterObjectBar( nPos, rResId )
pInterface
->RegisterObjectBar( nPos, rResId )
#define SFX_FEATURED_OBJECTBAR_REGISTRATION(nPos,rResId,nFeature) \
GetStaticInterface()
->RegisterObjectBar( nPos, rResId, nFeature )
pInterface
->RegisterObjectBar( nPos, rResId, nFeature )
#define SFX_CHILDWINDOW_REGISTRATION(nId) \
GetStaticInterface()
->RegisterChildWindow( nId, (sal_Bool) sal_False )
pInterface
->RegisterChildWindow( nId, (sal_Bool) sal_False )
#define SFX_FEATURED_CHILDWINDOW_REGISTRATION(nId,nFeature) \
GetStaticInterface()
->RegisterChildWindow( nId, (sal_Bool) sal_False, nFeature )
pInterface
->RegisterChildWindow( nId, (sal_Bool) sal_False, nFeature )
#define SFX_CHILDWINDOW_CONTEXT_REGISTRATION(nId) \
GetStaticInterface()
->RegisterChildWindow( nId, (sal_Bool) sal_True )
pInterface
->RegisterChildWindow( nId, (sal_Bool) sal_True )
#define SFX_POPUPMENU_REGISTRATION(rResId) \
GetStaticInterface()
->RegisterPopupMenu( rResId )
pInterface
->RegisterPopupMenu( rResId )
#define SFX_OBJECTMENU_REGISTRATION(nPos,rResId) \
GetStaticInterface()
->RegisterObjectMenu( nPos, rResId )
pInterface
->RegisterObjectMenu( nPos, rResId )
#define SFX_STATUSBAR_REGISTRATION(rResId) \
GetStaticInterface()
->RegisterStatusBar( rResId )
pInterface
->RegisterStatusBar( rResId )
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment