summaryrefslogtreecommitdiff
path: root/sw/inc/unofootnote.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-01-08 17:13:58 +0100
committerMichael Stahl <mst@openoffice.org>2010-01-08 17:13:58 +0100
commit1f70baf3d1eaf363f0fb6281c7877a6ea783a667 (patch)
tree317dde30e40f406c90cb4edb84658b08af3badfa /sw/inc/unofootnote.hxx
parent069dead98a0b185ff521a31ed26dd81d98a91b7c (diff)
swunolocking1: #i105557#: fix locking for SwXFootnote:
add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. disable broken SwClient iteration. make constructor protected, and add factory function CreateXFootnote. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little.
Diffstat (limited to 'sw/inc/unofootnote.hxx')
-rw-r--r--sw/inc/unofootnote.hxx37
1 files changed, 12 insertions, 25 deletions
diff --git a/sw/inc/unofootnote.hxx b/sw/inc/unofootnote.hxx
index 8710f7effa03..8d9a65d963ae 100644
--- a/sw/inc/unofootnote.hxx
+++ b/sw/inc/unofootnote.hxx
@@ -41,14 +41,11 @@
#include <cppuhelper/implbase5.hxx>
-#include <tools/string.hxx>
-
-#include <calbck.hxx>
-#include <unoevtlstnr.hxx>
#include <unotext.hxx>
class SwDoc;
+class SwModify;
class SwFmtFtn;
@@ -66,18 +63,15 @@ typedef ::cppu::WeakImplHelper5
class SwXFootnote
: public SwXFootnote_Base
, public SwXText
- , public SwClient
{
private:
friend class SwXFootnotes;
- SwEventListenerContainer aLstnrCntnr;
- const SwFmtFtn* pFmtFtn;
- BOOL m_bIsDescriptor;
- String m_sLabel;
- BOOL m_bIsEndnote;
+ class Impl;
+ ::sw::UnoImplPtr<Impl> m_pImpl;
+
protected:
@@ -90,24 +84,17 @@ protected:
virtual ~SwXFootnote();
-public:
-
- SwXFootnote(BOOL bEndnote);
- SwXFootnote(SwDoc* pDoc, const SwFmtFtn& rFmt);
-
- void attachToRange(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::text::XTextRange > & xTextRange)
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ SwXFootnote(SwDoc & rDoc, const SwFmtFtn & rFmt);
- const SwFmtFtn* FindFmt() const { return GetDoc() ? pFmtFtn : 0; }
- void Invalidate();
+public:
- TYPEINFO();
+ SwXFootnote(const bool bEndnote);
- // SwClient
- virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
+ static SwXFootnote *
+ CreateXFootnote(SwDoc & rDoc, SwFmtFtn const& rFootnoteFmt);
+ /// may return 0
+ static SwXFootnote *
+ GetXFootnote(SwModify const& rUnoCB, SwFmtFtn const& rFootnoteFmt);
// XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(