diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-24 20:40:47 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-25 11:31:34 +0200 |
commit | ed67f7b57131a6c7d5d5ec34acb3955ccf091323 (patch) | |
tree | feca03b92ead1e45ee0f0726c4ba47057319919d /basctl | |
parent | c854d2d32f75e4d47ace970897c336f24f00224d (diff) |
cid#1292911 Big parameter passed by value
Change-Id: I30e17a69ecfa4e1cbaf958f9864b8e2bc9ee99d8
Reviewed-on: https://gerrit.libreoffice.org/78069
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 773738f2bd86..18ed7f1a0796 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -594,7 +594,7 @@ void LibPage::InsertLib() // file URLs Sequence< OUString > aFiles = xFP->getSelectedFiles(); INetURLObject aURLObj( aFiles[0] ); - INetURLObject aModURLObj( aURLObj ); + std::shared_ptr<INetURLObject> xModURLObj(new INetURLObject(aURLObj)); std::shared_ptr<INetURLObject> xDlgURLObj(new INetURLObject(aURLObj)); OUString aBase = aURLObj.getBase(); @@ -603,13 +603,13 @@ void LibPage::InsertLib() if ( aBase == aModBase || aBase == aDlgBase ) { - aModURLObj.setBase( aModBase ); + xModURLObj->setBase( aModBase ); xDlgURLObj->setBase( aDlgBase ); } Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) ); - OUString aModURL( aModURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); + OUString aModURL( xModURLObj->GetMainURL( INetURLObject::DecodeMechanism::NONE ) ); if ( xSFA->exists( aModURL ) ) { xModLibContImport = script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL); @@ -669,7 +669,7 @@ void LibPage::InsertLib() if ( aExtension != aLibExtension && aExtension != aContExtension ) xLibDlg->EnableReference(false); - weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj, aExtension, aLibExtension, aModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult) + weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj, aExtension, aLibExtension, xModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult) { if (!nResult ) return; @@ -779,7 +779,7 @@ void LibPage::InsertLib() if ( bReference ) { // storage URL - INetURLObject aModStorageURLObj( aModURLObj ); + INetURLObject aModStorageURLObj(*xModURLObj); if ( aExtension == aContExtension ) { sal_Int32 nCount = aModStorageURLObj.getSegmentCount(); |