[PATCH] fdo#60641, localise strings
Ádám Király (via_Code_Review)
gerrit at gerrit.libreoffice.org
Wed Apr 17 12:50:05 PDT 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/3441
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/41/3441/1
fdo#60641, localise strings
Uses resource from numberingtypelistbox.src, to localise
"Native Numbering" and the Cyrillic and Greek strings.
Change-Id: I3dfafc90686bea9ddee67262044afa2619b882f8
---
M sw/source/ui/fldui/fldmgr.cxx
1 file changed, 14 insertions(+), 1 deletion(-)
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 @@
{
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 @@
{
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;
--
To view, visit https://gerrit.libreoffice.org/3441
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dfafc90686bea9ddee67262044afa2619b882f8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Ádám Király <kiraly.adam.csaba at gmail.com>
More information about the LibreOffice
mailing list