[Libreoffice-commits] core.git: sw/source
Ãdám Csaba Király
kiraly.adam.csaba at gmail.com
Fri Apr 19 04:31:37 PDT 2013
sw/source/ui/fldui/fldmgr.cxx | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
New commits:
commit 04a54e7180c2cf9f4855211055ecbc6a41deff56
Author: Ãdám Csaba Király <kiraly.adam.csaba at gmail.com>
Date: Wed Apr 17 21:37:41 2013 +0200
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 <atimar at suse.com>
Tested-by: Andras Timar <atimar at suse.com>
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 2dbee73..2750a09 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -75,6 +75,8 @@
#include <flddropdown.hxx>
#include <fldui.hrc>
#include <tox.hxx>
+#include <misc.hrc>
+#include <cnttab.hxx>
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<sal_Int16> 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;
More information about the Libreoffice-commits
mailing list