summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unodraw.cxx
diff options
context:
space:
mode:
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());
+ }
}