From e9c3583c2cc27fc88ee81047c236ec99dd51e8de Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 3 Jul 2015 11:31:14 +0200 Subject: improve the returnbyref loplugin Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb Reviewed-on: https://gerrit.libreoffice.org/16731 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/uibase/uno/unoatxt.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw/source/uibase/uno/unoatxt.cxx') diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 26e29830af18..15d6f2619509 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -312,7 +312,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe bool bRet = false; pInsDoc->getIDocumentFieldsAccess().LockExpFields(); { - SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : pxRange->GetDoc()); + SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : &pxRange->GetDoc()); SwPaM aPam(pDoc->GetNodes()); SwPaM * pPam(0); if(pxCursor) @@ -923,7 +923,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR SwDoc* pDoc = 0; if (pRange) - pDoc = pRange->GetDoc(); + pDoc = &pRange->GetDoc(); else if ( pCursor ) pDoc = pCursor->GetDoc(); else if ( pText && pText->GetDoc() ) -- cgit