basctl/source/basicide/moduldl2.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 9369b2d0d01b6c7c406e8dc2f30836a6ca624787 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Jul 26 09:14:15 2019 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Jul 26 16:58:32 2019 +0200 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 <[email protected]> Tested-by: Caolán McNamara <[email protected]> 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
