diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-01 17:52:38 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-01-02 14:54:05 +0100 |
commit | 50993fd6a56a0cf2709259dd384bf1810c68dbed (patch) | |
tree | 20c384dfcfd5041612f18f6329cad9daa8826921 | |
parent | 50c845f60cfd8541a004dbeecc85cb696452b4f4 (diff) |
remove unused GetI18nNumbering variant
Change-Id: Iedf17b5a25bb7c41ebb1f19b06a1d839f7b08ca7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86083
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | include/svx/SvxNumOptionsTabPageHelper.hxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/SvxNumOptionsTabPageHelper.cxx | 54 |
2 files changed, 0 insertions, 56 deletions
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(); |