diff options
author | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:51 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:51 +0100 |
commit | 2fee7963e992089b67eeb2fb60da27054037da32 (patch) | |
tree | 9b6b4df49fd55cef127e587cc4641c00526afd06 /sw/inc/section.hxx | |
parent | 77ca8486db12a970aef9aeafea3ac9a4c297d2b2 (diff) |
swunolocking1: #i105557#: fix locking for SwXTextSection:
replace SwXTextSectionClient with Impl struct, use UnoImplPtr to lock dtor.
move all implementation details out of header, into Impl struct.
remove ugly destruction of SwUnoCrsr via Application::PostUserEvent.
replace broken SwClient iteration with a WeakReference in SwSectionFmt.
add factory function CreateXTextSection.
use new XUnoTunnel and XServiceInfo helpers.
clean up the implementation a little.
Diffstat (limited to 'sw/inc/section.hxx')
-rw-r--r-- | sw/inc/section.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index c530c8280870..3acd8cab16cb 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -41,6 +41,11 @@ #include <svtools/svarray.hxx> #include <frmfmt.hxx> + +namespace com { namespace sun { namespace star { + namespace text { class XTextSection; } +} } } + // Forward Deklaration class SwSectionFmt; class SwDoc; @@ -230,6 +235,13 @@ class SW_DLLPUBLIC SwSectionFmt : public SwFrmFmt { friend class SwDoc; + /** why does this exist in addition to the m_wXObject in SwFrmFmt? + in case of an index, both a SwXDocumentIndex and a SwXTextSection + register at this SwSectionFmt, so we need to have two refs. + */ + ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextSection> m_wXTextSection; + /* SW_DLLPUBLIC */ SwSection* _GetSection() const; SW_DLLPRIVATE void UpdateParent(); // Parent wurde veraendert @@ -271,6 +283,14 @@ public: // ist die Section eine gueltige fuers GlobalDocument? const SwSection* GetGlobalDocSection() const; + + SW_DLLPRIVATE ::com::sun::star::uno::WeakReference< + ::com::sun::star::text::XTextSection> const& GetXTextSection() const + { return m_wXTextSection; } + SW_DLLPRIVATE void SetXTextSection(::com::sun::star::uno::Reference< + ::com::sun::star::text::XTextSection> const& xTextSection) + { m_wXTextSection = xTextSection; } + }; // -------------- inlines --------------------------------- |