summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-10-31 10:18:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-01 06:43:29 +0100
commitd4e96a36d78299794ff4ac86e937fbbb0843c6ed (patch)
treebe5ca239c5273fb672fe91d88d5b9fd792158e86 /svtools
parent2f1a4e0a875ea43f3845c95ea46ed95fd9c2923d (diff)
drop LISTBOX_ERROR
almost nobody checks it, so rather just assert Change-Id: Ic3ad4c04c4f6013db3e8757559d3a773df020a1d Reviewed-on: https://gerrit.libreoffice.org/62684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ctrlbox.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 6346d3284ad2..ca805b44cab5 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -748,15 +748,12 @@ void FontNameBox::Fill( const FontList* pList )
{
const FontMetric& rFontMetric = pList->GetFontName( i );
sal_Int32 nIndex = InsertEntry( rFontMetric.GetFamilyName() );
- if ( nIndex != LISTBOX_ERROR )
- {
- if ( nIndex < static_cast<sal_Int32>(mpFontList->size()) ) {
- ImplFontList::iterator it = mpFontList->begin();
- ::std::advance( it, nIndex );
- mpFontList->insert( it, rFontMetric );
- } else {
- mpFontList->push_back( rFontMetric );
- }
+ if ( nIndex < static_cast<sal_Int32>(mpFontList->size()) ) {
+ ImplFontList::iterator it = mpFontList->begin();
+ ::std::advance( it, nIndex );
+ mpFontList->insert( it, rFontMetric );
+ } else {
+ mpFontList->push_back( rFontMetric );
}
}