From ee9d6d30959b5467fb5f2407ce5aa24fe1043fc5 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 8 Jan 2010 17:13:50 +0100 Subject: swunolocking1: #i105557#: fix locking for SwXParagraph: add Impl struct, and use UnoImplPtr to lock destructor. move all implementation details out of header, into Impl struct. make SwXParagraph instances reusable with a WeakReference in SwTxtNode. make constructor private, and add factory function CreateXParagraph. use new XUnoTunnel and XServiceInfo helpers. clean up the implementation a little. --- sw/source/core/unocore/unodraw.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw/source/core/unocore/unodraw.cxx') diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index b967f59f4899..9a2eb1dfae45 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2158,7 +2158,9 @@ void SwXShape::attach(const uno::Reference< text::XTextRange > & xTextRange) pDoc = pPortion->GetCursor()->GetDoc(); } else if ( !pDoc && pParagraph && pParagraph->GetTxtNode( ) ) - pDoc = pParagraph->GetTxtNode( )->GetDoc( ); + { + pDoc = const_cast(pParagraph->GetTxtNode()->GetDoc()); + } } -- cgit v1.2.3