summaryrefslogtreecommitdiff
path: root/sw/inc/fmtmeta.hxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-01-08 17:13:49 +0100
committerMichael Stahl <mst@openoffice.org>2010-01-08 17:13:49 +0100
commitdd567990b4372498dfbe5063082c792f241ee41d (patch)
treea38915d1d0c15fd5a23eafbd850903d7d998a4f0 /sw/inc/fmtmeta.hxx
parente9ca667fa65f946acec102e3932372010b8622bd (diff)
swunolocking1: #i105557#: fix locking for SwXMeta:
move SwClient base to pImpl struct, and use UnoImplPtr to lock destructor. replace broken SwClient iteration with a WeakReference in sw::Meta. make constructor protected, and add factory function CreateXMeta. use new XUnoTunnel and XServiceInfo helpers.
Diffstat (limited to 'sw/inc/fmtmeta.hxx')
-rwxr-xr-xsw/inc/fmtmeta.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 6d3f63ece477..792a7d8374db 100755
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -31,6 +31,8 @@
#ifndef SW_FMTMETA_HXX
#define SW_FMTMETA_HXX
+#include <cppuhelper/weakref.hxx>
+
#include <svtools/poolitem.hxx>
#include <sfx2/Metadatable.hxx>
@@ -141,7 +143,10 @@ class Meta
{
protected:
friend class ::SwFmtMeta; // SetFmtMeta, NotifyChangeTxtNode
- friend class ::SwXMeta; // GetTxtNode, GetTxtAttr
+ friend class ::SwXMeta; // GetTxtNode, GetTxtAttr, Get/SetXMeta
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> m_wXMeta;
SwFmtMeta * m_pFmt;
@@ -153,6 +158,13 @@ protected:
void NotifyChangeTxtNode();
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::rdf::XMetadatable> const& GetXMeta() const
+ { return m_wXMeta; }
+ void SetXMeta(::com::sun::star::uno::Reference<
+ ::com::sun::star::rdf::XMetadatable> const& xMeta)
+ { m_wXMeta = xMeta; }
+
public:
explicit Meta(SwFmtMeta * const i_pFmt = 0);
virtual ~Meta();