diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-03 11:31:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-06 07:04:50 +0000 |
commit | e9c3583c2cc27fc88ee81047c236ec99dd51e8de (patch) | |
tree | b3e8394ca1ec402a31b227339366fc790124c1f8 /sw/source/core/graphic | |
parent | 89c77994d4638c86635c70535fab6508e2f3d900 (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/core/graphic')
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index 94ffa386e0bb..7f9f7c6cf130 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -686,10 +686,10 @@ bool SwGrfNode::RestorePersistentData() { if( refLink.Is() ) { - IDocumentLinksAdministration* pIDLA = getIDocumentLinksAdministration(); - refLink->SetVisible( pIDLA->IsVisibleLinks() ); - pIDLA->GetLinkManager().InsertDDELink( refLink ); - if( getIDocumentLayoutAccess()->GetCurrentLayout() ) + IDocumentLinksAdministration& rIDLA = getIDocumentLinksAdministration(); + refLink->SetVisible( rIDLA.IsVisibleLinks() ); + rIDLA.GetLinkManager().InsertDDELink( refLink ); + if( getIDocumentLayoutAccess().GetCurrentLayout() ) refLink->Update(); } return true; @@ -699,10 +699,10 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) { refLink = new SwBaseLink( SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::GDIMETAFILE, this ); - IDocumentLinksAdministration* pIDLA = getIDocumentLinksAdministration(); + IDocumentLinksAdministration& rIDLA = getIDocumentLinksAdministration(); if( GetNodes().IsDocNodes() ) { - refLink->SetVisible( pIDLA->IsVisibleLinks() ); + refLink->SetVisible( rIDLA.IsVisibleLinks() ); if( rFltName == "DDE" ) { sal_Int32 nTmp = 0; @@ -710,7 +710,7 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) sApp = rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp ); sTopic = rGrfName.getToken( 0, sfx2::cTokenSeparator, nTmp ); sItem = rGrfName.copy( nTmp ); - pIDLA->GetLinkManager().InsertDDELink( refLink, + rIDLA.GetLinkManager().InsertDDELink( refLink, sApp, sTopic, sItem ); } else @@ -719,7 +719,7 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) refLink->SetSynchron( bSync ); refLink->SetContentType( SotClipboardFormatId::SVXB ); - pIDLA->GetLinkManager().InsertFileLink( *refLink, + rIDLA.GetLinkManager().InsertFileLink( *refLink, OBJECT_CLIENT_GRF, rGrfName, (!bSync && !rFltName.isEmpty() ? &rFltName : 0) ); } @@ -742,7 +742,7 @@ void SwGrfNode::ReleaseLink() bInSwapIn = false; } - getIDocumentLinksAdministration()->GetLinkManager().Remove( refLink ); + getIDocumentLinksAdministration().GetLinkManager().Remove( refLink ); refLink.Clear(); maGrfObj.SetLink(); |