summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁdám Csaba Király <kiraly.adam.csaba@gmail.com>2013-04-17 21:37:41 +0200
committerAndras Timar <atimar@suse.com>2013-04-19 11:31:18 +0000
commit04a54e7180c2cf9f4855211055ecbc6a41deff56 (patch)
tree2f9ba161dbd1ab0c7e2b19731f0413354ba97b17
parent8a4e5e55100d396af2ab4a95f70e0fe0b1b8b079 (diff)
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@suse.com> Tested-by: Andras Timar <atimar@suse.com>
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx15
1 files changed, 14 insertions, 1 deletions
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 <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;