summaryrefslogtreecommitdiff
path: root/sw/inc/fmtrfmrk.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-08-19 23:29:32 +0200
committerMichael Stahl <mstahl@redhat.com>2014-08-20 16:40:16 +0200
commit14eb485c5c62a4f745b24a3798f313623f283e55 (patch)
treefab271ff05b8bb802a66b714b32171cf6f04099e /sw/inc/fmtrfmrk.hxx
parent1e28d7901dbebf77f75e5770d11a49fef036976c (diff)
i#107771: sw: implement thread-safe instance caching for SwXReferenceMark
Change-Id: I4f3b6789dde053ca913e12233b20d45dfe50c7ec
Diffstat (limited to 'sw/inc/fmtrfmrk.hxx')
-rw-r--r--sw/inc/fmtrfmrk.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/inc/fmtrfmrk.hxx b/sw/inc/fmtrfmrk.hxx
index d8e807d18381..4825699a6fae 100644
--- a/sw/inc/fmtrfmrk.hxx
+++ b/sw/inc/fmtrfmrk.hxx
@@ -20,10 +20,15 @@
#define INCLUDED_SW_INC_FMTRFMRK_HXX
#include <rtl/ustring.hxx>
+#include <cppuhelper/weakref.hxx>
#include <svl/poolitem.hxx>
#include <calbck.hxx>
+namespace com { namespace sun { namespace star {
+ namespace text { class XTextContent; }
+} } }
+
class SwTxtRefMark;
// ATT_REFMARK
@@ -39,6 +44,8 @@ class SwFmtRefMark
SwFmtRefMark& operator=(const SwFmtRefMark& rRefMark);
OUString aRefName;
+ css::uno::WeakReference<css::text::XTextContent> m_wXReferenceMark;
+
public:
SwFmtRefMark( const OUString& rTxt );
SwFmtRefMark( const SwFmtRefMark& rRefMark );
@@ -48,6 +55,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 InvalidateRefMark();
const SwTxtRefMark *GetTxtRefMark() const { return pTxtAttr; }
@@ -55,6 +66,11 @@ public:
inline OUString &GetRefName() { return aRefName; }
inline const OUString &GetRefName() const { return aRefName; }
+
+ css::uno::WeakReference<css::text::XTextContent> const& GetXRefMark() const
+ { return m_wXReferenceMark; }
+ void SetXRefMark(css::uno::Reference<css::text::XTextContent> const& xMark)
+ { m_wXReferenceMark = xMark; }
};
#endif