From 04a54e7180c2cf9f4855211055ecbc6a41deff56 Mon Sep 17 00:00:00 2001 From: Ádám Csaba Király Date: Wed, 17 Apr 2013 21:37:41 +0200 Subject: fdo#60641, localise strings Uses resource from numberingtypelistbox.src, to localise "Native Numbering" and the Cyrillic and Greek strings. Change-Id: I3dfafc90686bea9ddee67262044afa2619b882f8 Reviewed-on: https://gerrit.libreoffice.org/3441 Reviewed-by: Andras Timar Tested-by: Andras Timar --- sw/source/ui/fldui/fldmgr.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx index 2dbee73a9670..2750a0957788 100644 --- a/sw/source/ui/fldui/fldmgr.cxx +++ b/sw/source/ui/fldui/fldmgr.cxx @@ -75,6 +75,8 @@ #include #include #include +#include +#include using namespace com::sun::star::uno; using namespace com::sun::star::container; @@ -679,6 +681,9 @@ String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const { if(xNumberingInfo.is()) { + SwOLENames aNames(SW_RES(STRRES_NUMTYPES)); + ResStringArray& rNames = aNames.GetNames(); + Sequence aTypes = xNumberingInfo->getSupportedNumberingTypes(); const sal_Int16* pTypes = aTypes.getConstArray(); sal_Int32 nOffset = aSwFlds[nPos].nFmtEnd - nStart; @@ -690,7 +695,15 @@ String SwFldMgr::GetFormatStr(sal_uInt16 nTypeId, sal_uLong nFormatId) const { if(nValidEntry == ((sal_Int32)nFormatId) - nOffset) { - aRet = xNumberingInfo->getNumberingIdentifier( pTypes[nType] ); + sal_uInt32 n = rNames.FindIndex(pTypes[nType]); + if (n != RESARRAY_INDEX_NOTFOUND) + { + aRet = rNames.GetString(n); + } + else + { + aRet = xNumberingInfo->getNumberingIdentifier( pTypes[nType] ); + } break; } ++nValidEntry; -- cgit