basctl/source/basicide/moduldl2.cxx | 10 +++++----- i18npool/source/breakiterator/breakiterator_cjk.cxx | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-)
New commits: commit ed67f7b57131a6c7d5d5ec34acb3955ccf091323 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Aug 24 20:40:47 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Aug 25 11:31:34 2019 +0200 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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(); commit c854d2d32f75e4d47ace970897c336f24f00224d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sat Aug 24 21:29:52 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun Aug 25 11:30:52 2019 +0200 cid#1448216 silence Explicit null deferenced false positives Change-Id: If64dd1c384086aa502f01c63a77cc9ca4fbab301 Reviewed-on: https://gerrit.libreoffice.org/78074 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index 2049f3b47f73..baf302e6ef0c 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -145,6 +145,7 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak( BreakIterator_zh::BreakIterator_zh() { m_xDict = std::make_unique<xdictionary>("zh"); + assert(hangingCharacters.pData); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "CN")); cBreakIterator = "com.sun.star.i18n.BreakIterator_zh"; } @@ -155,6 +156,7 @@ BreakIterator_zh::BreakIterator_zh() BreakIterator_zh_TW::BreakIterator_zh_TW() { m_xDict = std::make_unique<xdictionary>("zh"); + assert(hangingCharacters.pData); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "TW")); cBreakIterator = "com.sun.star.i18n.BreakIterator_zh_TW"; } @@ -166,6 +168,7 @@ BreakIterator_ja::BreakIterator_ja() { m_xDict = std::make_unique<xdictionary>("ja"); m_xDict->setJapaneseWordBreak(); + assert(hangingCharacters.pData); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("ja", "JP")); cBreakIterator = "com.sun.star.i18n.BreakIterator_ja"; } @@ -175,6 +178,7 @@ BreakIterator_ja::BreakIterator_ja() // ----------------------------------------------------; BreakIterator_ko::BreakIterator_ko() { + assert(hangingCharacters.pData); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("ko", "KR")); cBreakIterator = "com.sun.star.i18n.BreakIterator_ko"; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits