[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 25 18:26:37 UTC 2020
svx/source/form/filtnav.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 8e50fedfb390cc6a2759dd755f97f36b23ec1311
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jun 24 20:44:26 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jun 25 20:26:01 2020 +0200
nActiveTerm is -1 in an empty filter navigator
Change-Id: Ia6eed6291375f136abbe8e50abae51e6f796911f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97052
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at 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
More information about the Libreoffice-commits
mailing list