svx/source/form/filtnav.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
New commits: commit 8f2e93183b22f44a9682ac6644d1626bfb89b516 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jun 24 20:44:26 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jun 25 20:25:44 2020 +0200 nActiveTerm is -1 in an empty filter navigator Change-Id: Ia6eed6291375f136abbe8e50abae51e6f796911f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 3c6c04108ea2..2b6dee83ebd8 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -635,7 +635,6 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<std::unique_ptr<FmFilterData return nullptr; } - void FmFilterModel::SetCurrentController(const Reference< XFormController > & xCurrent) { if ( xCurrent == m_xController ) @@ -651,7 +650,7 @@ void FmFilterModel::SetCurrentController(const Reference< XFormController > & xC { Reference< XFilterController > xFilterController( m_xController, UNO_QUERY_THROW ); const sal_Int32 nActiveTerm( xFilterController->getActiveTerm() ); - if ( pItem->GetChildren().size() > o3tl::make_unsigned(nActiveTerm) ) + if (nActiveTerm != -1 && pItem->GetChildren().size() > o3tl::make_unsigned(nActiveTerm)) { SetCurrentItems( static_cast< FmFilterItems* >( pItem->GetChildren()[ nActiveTerm ].get() ) ); } @@ -662,7 +661,6 @@ void FmFilterModel::SetCurrentController(const Reference< XFormController > & xC } } - void FmFilterModel::AppendFilterItems( FmFormItem& _rFormItem ) { // insert the condition behind the last filter items _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits