diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-08-20 14:05:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-08-20 16:40:18 +0200 |
commit | 2c057a59e8241b42c7c44a1b53ffb63dd0e92cea (patch) | |
tree | 9739ab0ee12f69048077c30234688b1ff550b0b1 /sw/inc | |
parent | e54015d06f103e3ce9edc899f0d839ead88add8a (diff) |
i#107771: sw: implement thread-safe instance caching for SwXFootnote
Change-Id: I3fffb321877168dfa9844b4ad75a9a9efc9602a6
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/fmtftn.hxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/inc/fmtftn.hxx b/sw/inc/fmtftn.hxx index fdfaee578d4e..0e2b52cc20e9 100644 --- a/sw/inc/fmtftn.hxx +++ b/sw/inc/fmtftn.hxx @@ -20,11 +20,16 @@ #define INCLUDED_SW_INC_FMTFTN_HXX #include <rtl/ustring.hxx> +#include <cppuhelper/weakref.hxx> #include <svl/poolitem.hxx> #include "swdllapi.h" #include <calbck.hxx> +namespace com { namespace sun { namespace star { + namespace text { class XFootnote; } +} } } + class SwDoc; class SwTxtFtn; @@ -40,6 +45,8 @@ class SW_DLLPUBLIC SwFmtFtn sal_uInt16 m_nNumber; ///< Automatische Nummerierung bool m_bEndNote; ///< Is it an End note? + css::uno::WeakReference<css::text::XFootnote> m_wXFootnote; + /// Protected CopyCtor. SwFmtFtn& operator=(const SwFmtFtn& rFtn); SwFmtFtn( const SwFmtFtn& ); @@ -52,6 +59,10 @@ public: virtual bool operator==( const SfxPoolItem& ) const SAL_OVERRIDE; virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const SAL_OVERRIDE; + // SwClient + virtual void Modify(SfxPoolItem const* pOld, SfxPoolItem const* pNew) + SAL_OVERRIDE; + void InvalidateFootnote(); OUString GetNumStr() const { return m_aNumber; } @@ -75,6 +86,11 @@ public: /// Returns string to be displayed of footnote / endnote. OUString GetViewNumStr( const SwDoc& rDoc, bool bInclStrs = false ) const; + + css::uno::WeakReference<css::text::XFootnote> const& GetXFootnote() const + { return m_wXFootnote; } + void SetXFootnote(css::uno::Reference<css::text::XFootnote> const& xNote) + { m_wXFootnote = xNote; } }; #endif |