diff options
author | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:57 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:57 +0100 |
commit | 069dead98a0b185ff521a31ed26dd81d98a91b7c (patch) | |
tree | 99c48e7750526f6b77d7f2a22389dcbe795f3e85 /sw/inc/unotextbodyhf.hxx | |
parent | 3356582b67bb91d6d438cbf356527a928070d7fa (diff) |
swunolocking1: #i105557#: fix locking for SwXHeadFootText:
add Impl struct, and use UnoImplPtr to lock destructor.
move all implementation details out of header, into Impl struct.
replace broken SwClient iteration with a WeakReference in SwFrmFmt.
make constructor protected, and add factory function CreateXHeadFootText.
use new XUnoTunnel and XServiceInfo helpers.
clean up the implementation a little.
Diffstat (limited to 'sw/inc/unotextbodyhf.hxx')
-rw-r--r-- | sw/inc/unotextbodyhf.hxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx index 15c38044e4ff..8fd4e8c2a442 100644 --- a/sw/inc/unotextbodyhf.hxx +++ b/sw/inc/unotextbodyhf.hxx @@ -38,8 +38,6 @@ #include <cppuhelper/implbase2.hxx> -#include <calbck.hxx> -#include <unoevtlstnr.hxx> #include <unotext.hxx> @@ -136,13 +134,12 @@ typedef ::cppu::WeakImplHelper2 class SwXHeadFootText : public SwXHeadFootText_Base , public SwXText - , public SwClient { private: - SwFrmFmt* GetFmt() const { return (SwFrmFmt*)GetRegisteredIn(); } - BOOL bIsHeader; + class Impl; + ::sw::UnoImplPtr<Impl> m_pImpl; protected: @@ -154,14 +151,13 @@ protected: virtual ~SwXHeadFootText(); -public: - - SwXHeadFootText(SwFrmFmt& rHeadFootFmt, BOOL bHeader); + SwXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); - TYPEINFO(); +public: - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + static ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > + CreateXHeadFootText(SwFrmFmt & rHeadFootFmt, const bool bIsHeader); + static bool IsXHeadFootText(SwClient *const pClient); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( |