summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mst@openoffice.org>2010-01-08 17:13:50 +0100
committerMichael Stahl <mst@openoffice.org>2010-01-08 17:13:50 +0100
commitee9d6d30959b5467fb5f2407ce5aa24fe1043fc5 (patch)
tree1aedb97a7d68051322ce7011b03162422ad458cd /sw/source/core/unocore/unodraw.cxx
parent440e521dad8c97e939460af857c6a851b220c52e (diff)
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.
Diffstat (limited to 'sw/source/core/unocore/unodraw.cxx')
-rw-r--r--sw/source/core/unocore/unodraw.cxx4
1 files changed, 3 insertions, 1 deletions
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<SwDoc*>(pParagraph->GetTxtNode()->GetDoc());
+ }
}