include/svx/SvxNumOptionsTabPageHelper.hxx | 2 svx/source/dialog/SvxNumOptionsTabPageHelper.cxx | 54 ----------------------- 2 files changed, 56 deletions(-)
New commits: commit 50993fd6a56a0cf2709259dd384bf1810c68dbed Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Jan 1 17:52:38 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jan 2 14:54:05 2020 +0100 remove unused GetI18nNumbering variant Change-Id: Iedf17b5a25bb7c41ebb1f19b06a1d839f7b08ca7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86083 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svx/SvxNumOptionsTabPageHelper.hxx b/include/svx/SvxNumOptionsTabPageHelper.hxx index eebb5be9da85..c1ee2274258a 100644 --- a/include/svx/SvxNumOptionsTabPageHelper.hxx +++ b/include/svx/SvxNumOptionsTabPageHelper.hxx @@ -21,7 +21,6 @@ #define INCLUDED_SVX_SVXNUMOPTIONSTABPAGEHELPER_HXX #include <com/sun/star/text/XDefaultNumberingProvider.hpp> -#include <vcl/lstbox.hxx> #include <vcl/weld.hxx> #include <svx/svxdllapi.h> @@ -44,7 +43,6 @@ public: Pass ::std::numeric_limits<sal_uInt16>::max() if there is no such restriction. */ - static void GetI18nNumbering(ListBox& rFmtLB, sal_uInt16 nDoNotRemove); static void GetI18nNumbering(weld::ComboBox& rFmtLB, sal_uInt16 nDoNotRemove); }; diff --git a/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx b/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx index 6f506ae9a7c4..5eb062b176e9 100644 --- a/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx +++ b/svx/source/dialog/SvxNumOptionsTabPageHelper.cxx @@ -35,60 +35,6 @@ Reference<XDefaultNumberingProvider> SvxNumOptionsTabPageHelper::GetNumberingPro return xRet; } -void SvxNumOptionsTabPageHelper::GetI18nNumbering( ListBox& rFmtLB, sal_uInt16 nDoNotRemove ) -{ - Reference<XDefaultNumberingProvider> xDefNum = GetNumberingProvider(); - Reference<XNumberingTypeInfo> xInfo(xDefNum, UNO_QUERY); - - // Extended numbering schemes present in the resource but not offered by - // the i18n framework per configuration must be removed from the listbox. - // Do not remove a special entry matching nDoNotRemove. - const sal_uInt16 nDontRemove = SAL_MAX_UINT16; - ::std::vector< sal_uInt16> aRemove( rFmtLB.GetEntryCount(), nDontRemove); - for (size_t i=0; i<aRemove.size(); ++i) - { - sal_uInt16 nEntryData = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(rFmtLB.GetEntryData( - sal::static_int_cast< sal_Int32 >(i)))); - if (nEntryData > NumberingType::CHARS_LOWER_LETTER_N && nEntryData != nDoNotRemove) - aRemove[i] = nEntryData; - } - if(xInfo.is()) - { - Sequence<sal_Int16> aTypes = xInfo->getSupportedNumberingTypes( ); - for(const sal_Int16 nCurrent : aTypes) - { - if(nCurrent > NumberingType::CHARS_LOWER_LETTER_N) - { - bool bInsert = true; - for(sal_Int32 nEntry = 0; nEntry < rFmtLB.GetEntryCount(); nEntry++) - { - sal_uInt16 nEntryData = static_cast<sal_uInt16>(reinterpret_cast<sal_uLong>(rFmtLB.GetEntryData(nEntry))); - if(nEntryData == static_cast<sal_uInt16>(nCurrent)) - { - bInsert = false; - aRemove[nEntry] = nDontRemove; - break; - } - } - if(bInsert) - { - OUString aIdent = xInfo->getNumberingIdentifier( nCurrent ); - sal_Int32 nPos = rFmtLB.InsertEntry(aIdent); - rFmtLB.SetEntryData(nPos, reinterpret_cast<void*>(static_cast<sal_uLong>(nCurrent))); - } - } - } - } - for (unsigned short i : aRemove) - { - if (i != nDontRemove) - { - sal_Int32 nPos = rFmtLB.GetEntryPos( reinterpret_cast<void*>(static_cast<sal_uLong>(i))); - rFmtLB.RemoveEntry( nPos); - } - } -} - void SvxNumOptionsTabPageHelper::GetI18nNumbering(weld::ComboBox& rFmtLB, sal_uInt16 nDoNotRemove) { Reference<XDefaultNumberingProvider> xDefNum = GetNumberingProvider(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits