dbaccess/source/ui/app/AppDetailPageHelper.cxx | 2 +- ucb/source/ucp/cmis/cmis_content.cxx | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-)
New commits: commit 66452607f5cbd81570442e646f76eff343cf0986 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Nov 28 09:54:56 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Nov 29 09:37:46 2023 +0100 cid#1554867 silence Out-of-bounds access Change-Id: I11acf38f1243e1eea180b478055f12839c58f551 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160015 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index a649420a8c00..c4adb2f45935 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -761,7 +761,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType eType, std::unique_ptr<weld::TreeIter> OAppDetailPageHelper::elementAdded(ElementType _eType,const OUString& _rName, const Any& _rObject ) { std::unique_ptr<weld::TreeIter> xRet; - DBTreeViewBase* pTreeView = m_aLists[_eType].get(); + DBTreeViewBase* pTreeView = _eType != E_NONE ? m_aLists[_eType].get() : nullptr; if (!pTreeView) return xRet; weld::TreeView& rTreeView = pTreeView->GetWidget(); commit bbbb509c3e3d2afa12392c521c382fb70c43d0a5 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Nov 28 09:28:59 2023 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed Nov 29 09:37:36 2023 +0100 cid#1557589 Use of auto that causes a copy Change-Id: Ie2c790420ce5fe2e2804f33ff552c2252dc0cc0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160014 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx index 1a499e1bdb3c..d07e389d2b05 100644 --- a/ucb/source/ucp/cmis/cmis_content.cxx +++ b/ucb/source/ucp/cmis/cmis_content.cxx @@ -1087,15 +1087,13 @@ namespace cmis std::vector< std::string > aPaths = pDoc->getPaths( ); if ( !aPaths.empty() ) { - auto sPath = aPaths.front( ); - aCmisUrl.setObjectPath( STD_TO_OUSTR( sPath ) ); + aCmisUrl.setObjectPath(STD_TO_OUSTR(aPaths.front())); } else { // We may have unfiled document depending on the server, those // won't have any path, use their ID instead - auto sId = pDoc->getId( ); - aCmisUrl.setObjectId( STD_TO_OUSTR( sId ) ); + aCmisUrl.setObjectId(STD_TO_OUSTR(pDoc->getId())); } return aCmisUrl.asString( ); }