summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno/unoatxt.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-03 11:31:14 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-07-06 07:04:50 +0000
commite9c3583c2cc27fc88ee81047c236ec99dd51e8de (patch)
treeb3e8394ca1ec402a31b227339366fc790124c1f8 /sw/source/uibase/uno/unoatxt.cxx
parent89c77994d4638c86635c70535fab6508e2f3d900 (diff)
improve the returnbyref loplugin
Change-Id: I1b510a6194282dfa4a9001d473127c5ebc8b44eb Reviewed-on: https://gerrit.libreoffice.org/16731 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw/source/uibase/uno/unoatxt.cxx')
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx4
1 files changed, 2 insertions, 2 deletions
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() )