summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-26 09:14:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-26 16:58:32 +0200
commit9369b2d0d01b6c7c406e8dc2f30836a6ca624787 (patch)
tree30e659cb7916b0bdf11c733dae73dbd9d8b94851 /basctl
parent986e4f94b802f9f603c5e744f69f2dc14b4d91f3 (diff)
cid#1292911 Big parameter passed by value
Change-Id: I3698fc4d8e556f75641cf951da87a9acbf81af78 Reviewed-on: https://gerrit.libreoffice.org/76363 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.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 515cbc55aa67..e999f4622189 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -595,7 +595,7 @@ void LibPage::InsertLib()
Sequence< OUString > aFiles = xFP->getSelectedFiles();
INetURLObject aURLObj( aFiles[0] );
INetURLObject aModURLObj( aURLObj );
- INetURLObject aDlgURLObj( aURLObj );
+ std::shared_ptr<INetURLObject> xDlgURLObj(new INetURLObject(aURLObj));
OUString aBase = aURLObj.getBase();
OUString aModBase( "script" );
@@ -604,7 +604,7 @@ void LibPage::InsertLib()
if ( aBase == aModBase || aBase == aDlgBase )
{
aModURLObj.setBase( aModBase );
- aDlgURLObj.setBase( aDlgBase );
+ xDlgURLObj->setBase( aDlgBase );
}
Reference< XSimpleFileAccess3 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
@@ -615,7 +615,7 @@ void LibPage::InsertLib()
xModLibContImport = script::DocumentScriptLibraryContainer::createWithURL(xContext, aModURL);
}
- OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
+ OUString aDlgURL( xDlgURLObj->GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
if ( xSFA->exists( aDlgURL ) )
{
xDlgLibContImport = script::DocumentDialogLibraryContainer::createWithURL(xContext, aDlgURL);
@@ -669,7 +669,7 @@ void LibPage::InsertLib()
if ( aExtension != aLibExtension && aExtension != aContExtension )
xLibDlg->EnableReference(false);
- weld::DialogController::runAsync(xLibDlg, [aContExtension, aDlgURLObj, aExtension, aLibExtension, aModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult)
+ weld::DialogController::runAsync(xLibDlg, [aContExtension, xDlgURLObj, aExtension, aLibExtension, aModURLObj, xLibDlg, xDlgLibContImport, xModLibContImport, this](sal_Int32 nResult)
{
if (!nResult )
return;
@@ -847,7 +847,7 @@ void LibPage::InsertLib()
if ( bReference )
{
// storage URL
- INetURLObject aDlgStorageURLObj( aDlgURLObj );
+ INetURLObject aDlgStorageURLObj( *xDlgURLObj );
if ( aExtension == aContExtension )
{
sal_Int32 nCount = aDlgStorageURLObj.getSegmentCount();