dev/null |binary sc/source/core/inc/cellkeytranslator.hxx | 1 sc/source/core/tool/cellkeytranslator.cxx | 90 +++++++++++-- sc/source/core/tool/cellkeywords.inl | 199 ----------------------------- sc/workben/celltrans/parse.py | 202 ------------------------------ 5 files changed, 76 insertions(+), 416 deletions(-)
New commits: commit f329c6da61d8b48b6b3e37557df0e7aebcfa7282 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 2 19:10:30 2025 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Feb 2 17:27:47 2025 +0100 Inline cellkeywords.inl, and drop its generating machinery Now that we have UTF-8-encoded CXX, we can simplify the initialization of ScCellKeywordTranslator, by inlining all the translation pairs. Change-Id: I5dedf71d5694c919f09c8c538bd4dba6cce391ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181010 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/core/inc/cellkeytranslator.hxx b/sc/source/core/inc/cellkeytranslator.hxx index 953e0c99ed59..06dbee933f75 100644 --- a/sc/source/core/inc/cellkeytranslator.hxx +++ b/sc/source/core/inc/cellkeytranslator.hxx @@ -72,7 +72,6 @@ private: void addToMap(const OUString& rKey, const char* pName, const css::lang::Locale& rLocale, OpCode eOpCode); - void addToMap(const TransItem* pItems, const css::lang::Locale& rLocale); static ::std::unique_ptr<ScCellKeywordTranslator> spInstance; ScCellKeywordHashMap maStringNameMap; diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx index 4f4a1dd4179d..30f46444eff3 100644 --- a/sc/source/core/tool/cellkeytranslator.cxx +++ b/sc/source/core/tool/cellkeytranslator.cxx @@ -182,17 +182,85 @@ ScCellKeywordTranslator::ScCellKeywordTranslator() : maTransWrapper( ::comphelper::getProcessComponentContext(), TransliterationFlags::LOWERCASE_UPPERCASE ) { - // The file below has been autogenerated by sc/workben/celltrans/parse.py. - // To add new locale keywords, edit sc/workben/celltrans/keywords_utf16.txt - // and re-run the parse.py script. - // // All keywords must be uppercase, and the mapping must be from the // localized keyword to the English keyword. - // - // Make sure that the original keyword file (keywords_utf16.txt) is - // encoded in UCS-2/UTF-16! - #include "cellkeywords.inl" + // French language locale + + static const lang::Locale aFr(u"fr"_ustr, u""_ustr, u""_ustr); + + static const TransItem pFr[] = { + { u"ADRESSE", "ADDRESS", ocCell }, + { u"COLONNE", "COL", ocCell }, + { u"CONTENU", "CONTENTS", ocCell }, + { u"COULEUR", "COLOR", ocCell }, + { u"LARGEUR", "WIDTH", ocCell }, + { u"LIGNE", "ROW", ocCell }, + { u"NOMFICHIER", "FILENAME", ocCell }, + { u"PREFIXE", "PREFIX", ocCell }, + { u"PROTEGE", "PROTECT", ocCell }, + { u"NBFICH", "NUMFILE", ocInfo }, + { u"RECALCUL", "RECALC", ocInfo }, + { u"SYSTEXPL", "SYSTEM", ocInfo }, + { u"VERSION", "RELEASE", ocInfo }, + { u"VERSIONSE", "OSVERSION", ocInfo }, + }; + + for (const auto& element : pFr) + addToMap(OUString(element.from), element.to, aFr, element.func); + + // Hungarian language locale + + static const lang::Locale aHu(u"hu"_ustr, u""_ustr, u""_ustr); + + static const TransItem pHu[] = { + { u"CÍM", "ADDRESS", ocCell }, + { u"OSZLOP", "COL", ocCell }, + { u"SZÍN", "COLOR", ocCell }, + { u"TARTALOM", "CONTENTS", ocCell }, + { u"SZÉLES", "WIDTH", ocCell }, + { u"SOR", "ROW", ocCell }, + { u"FILENÉV", "FILENAME", ocCell }, + { u"PREFIX", "PREFIX", ocCell }, + { u"VÉDETT", "PROTECT", ocCell }, + { u"KOORD", "COORD", ocCell }, + { u"FORMA", "FORMAT", ocCell }, + { u"ZÁRÓJELEK", "PARENTHESES", ocCell }, + { u"LAP", "SHEET", ocCell }, + { u"TÍPUS", "TYPE", ocCell }, + { u"FILESZÁM", "NUMFILE", ocInfo }, + { u"SZÁMOLÁS", "RECALC", ocInfo }, + { u"RENDSZER", "SYSTEM", ocInfo }, + { u"VERZIÓ", "RELEASE", ocInfo }, + { u"OPRENDSZER", "OSVERSION", ocInfo }, + }; + + for (const auto& element : pHu) + addToMap(OUString(element.from), element.to, aHu, element.func); + + // German language locale + + static const lang::Locale aDe(u"de"_ustr, u""_ustr, u""_ustr); + + static const TransItem pDe[] = { + { u"ZEILE", "ROW", ocCell }, + { u"SPALTE", "COL", ocCell }, + { u"BREITE", "WIDTH", ocCell }, + { u"ADRESSE", "ADDRESS", ocCell }, + { u"DATEINAME", "FILENAME", ocCell }, + { u"FARBE", "COLOR", ocCell }, + { u"FORMAT", "FORMAT", ocCell }, + { u"INHALT", "CONTENTS", ocCell }, + { u"KLAMMERN", "PARENTHESES", ocCell }, + { u"SCHUTZ", "PROTECT", ocCell }, + { u"TYP", "TYPE", ocCell }, + { u"PRÄFIX", "PREFIX", ocCell }, + { u"BLATT", "SHEET", ocCell }, + { u"KOORD", "COORD", ocCell }, + }; + + for (const auto& element : pDe) + addToMap(OUString(element.from), element.to, aDe, element.func); } ScCellKeywordTranslator::~ScCellKeywordTranslator() @@ -216,10 +284,4 @@ void ScCellKeywordTranslator::addToMap(const OUString& rKey, const char* pName, itr->second.push_back(aKeyItem); } -void ScCellKeywordTranslator::addToMap(const TransItem* pItems, const lang::Locale& rLocale) -{ - for (sal_uInt16 i = 0; pItems[i].from != nullptr; ++i) - addToMap(OUString(pItems[i].from), pItems[i].to, rLocale, pItems[i].func); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/tool/cellkeywords.inl b/sc/source/core/tool/cellkeywords.inl deleted file mode 100644 index e72f9e1f79ae..000000000000 --- a/sc/source/core/tool/cellkeywords.inl +++ /dev/null @@ -1,99 +0,0 @@ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -// This file has been automatically generated. Do not hand-edit this! - - -// French language locale (automatically generated) - -static const lang::Locale aFr(u"fr"_ustr, u""_ustr, u""_ustr); - -static const TransItem pFr[] = { - {u"ADRESSE", "ADDRESS", ocCell}, - {u"COLONNE", "COL", ocCell}, - {u"CONTENU", "CONTENTS", ocCell}, - {u"COULEUR", "COLOR", ocCell}, - {u"LARGEUR", "WIDTH", ocCell}, - {u"LIGNE", "ROW", ocCell}, - {u"NOMFICHIER", "FILENAME", ocCell}, - {u"PREFIXE", "PREFIX", ocCell}, - {u"PROTEGE", "PROTECT", ocCell}, - {u"NBFICH", "NUMFILE", ocInfo}, - {u"RECALCUL", "RECALC", ocInfo}, - {u"SYSTEXPL", "SYSTEM", ocInfo}, - {u"VERSION", "RELEASE", ocInfo}, - {u"VERSIONSE", "OSVERSION", ocInfo}, - {nullptr, nullptr, ocNone} -}; - -addToMap(pFr, aFr); - - -// Hungarian language locale (automatically generated) - -static const lang::Locale aHu(u"hu"_ustr, u""_ustr, u""_ustr); - -static const TransItem pHu[] = { - {u"CÍM", "ADDRESS", ocCell}, - {u"OSZLOP", "COL", ocCell}, - {u"SZÍN", "COLOR", ocCell}, - {u"TARTALOM", "CONTENTS", ocCell}, - {u"SZÉLES", "WIDTH", ocCell}, - {u"SOR", "ROW", ocCell}, - {u"FILENÉV", "FILENAME", ocCell}, - {u"PREFIX", "PREFIX", ocCell}, - {u"VÉDETT", "PROTECT", ocCell}, - {u"KOORD", "COORD", ocCell}, - {u"FORMA", "FORMAT", ocCell}, - {u"ZÁRÓJELEK", "PARENTHESES", ocCell}, - {u"LAP", "SHEET", ocCell}, - {u"TÍPUS", "TYPE", ocCell}, - {u"FILESZÁM", "NUMFILE", ocInfo}, - {u"SZÁMOLÁS", "RECALC", ocInfo}, - {u"RENDSZER", "SYSTEM", ocInfo}, - {u"VERZIÓ", "RELEASE", ocInfo}, - {u"OPRENDSZER", "OSVERSION", ocInfo}, - {nullptr, nullptr, ocNone} -}; - -addToMap(pHu, aHu); - - -// German language locale (automatically generated) - -static const lang::Locale aDe(u"de"_ustr, u""_ustr, u""_ustr); - -static const TransItem pDe[] = { - {u"ZEILE", "ROW", ocCell}, - {u"SPALTE", "COL", ocCell}, - {u"BREITE", "WIDTH", ocCell}, - {u"ADRESSE", "ADDRESS", ocCell}, - {u"DATEINAME", "FILENAME", ocCell}, - {u"FARBE", "COLOR", ocCell}, - {u"FORMAT", "FORMAT", ocCell}, - {u"INHALT", "CONTENTS", ocCell}, - {u"KLAMMERN", "PARENTHESES", ocCell}, - {u"SCHUTZ", "PROTECT", ocCell}, - {u"TYP", "TYPE", ocCell}, - {u"PRÄFIX", "PREFIX", ocCell}, - {u"BLATT", "SHEET", ocCell}, - {u"KOORD", "COORD", ocCell}, - {nullptr, nullptr, ocNone} -}; - -addToMap(pDe, aDe); diff --git a/sc/workben/celltrans/keywords_utf16.txt b/sc/workben/celltrans/keywords_utf16.txt deleted file mode 100644 index 3c9b12d0d112..000000000000 Binary files a/sc/workben/celltrans/keywords_utf16.txt and /dev/null differ diff --git a/sc/workben/celltrans/parse.py b/sc/workben/celltrans/parse.py deleted file mode 100644 index 4b604cbe9ab3..000000000000 --- a/sc/workben/celltrans/parse.py +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/env python -# -# This file is part of the LibreOffice project. -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -import sys - -localeNames = {'fr': 'French', 'hu': 'Hungarian', 'de': 'German'} -def getLocaleName (code): - global localeNames - if code in localeNames: - return localeNames[code] - else: - return "(unknown locale)" - -def getAscii (ords): - ascii = '' - for c in ords: - ascii += chr(c) - return ascii - -class LocaleData(object): - def __init__ (self, locale): - self.locale = locale - self.funcList = {} - - def addKeywordMap (self, funcName, localeName, engName): - if funcName not in self.funcList: - self.funcList[funcName] = [] - - self.funcList[funcName].append([localeName, engName]) - - def getLocaleFuncVarName (self, func, pair): - return func.lower() + "_" + getAscii(pair[1]).lower() + "_" + self.locale - - def dumpCode (self): - chars = "" - - # locale output - chars += "// " + "-"*75 + " " - chars += "// %s language locale (automatically generated) "%getLocaleName(self.locale) - chars += "// " + "-"*75 + " " - chars += "static const Locale a" + self.locale.capitalize() + "(OUString(\"" - chars += self.locale - chars += "\"), OUString(), OUString()); " - - # pre instantiations of localized function names. - funcs = sorted(self.funcList.keys()) - chars += "// pre instantiations of localized function names " - for func in funcs: - for item in self.funcList[func]: - chars += "static const sal_Unicode " + self.getLocaleFuncVarName(func, item) + "[] = { " - chars += " " - isFirst = True - # Dump the UTF-16 bytes. - for uval in item[0]: - if isFirst: - isFirst = False - else: - chars += ", " - chars += "0x%.4X"%uval - - # Don't forget to null-terminate the string. - if not isFirst: - chars += ", " - chars += "0x0000" - - chars += "}; " - - # map item instantiations - chars += " " - chars += "static const TransItem p" + self.locale.capitalize() + "[] = { " - for func in funcs: - for item in self.funcList[func]: - chars += " " - chars += "{%s, \"%s\", %s}, "%(self.getLocaleFuncVarName(func, item), - getAscii(item[1]), - "oc"+func.capitalize()) - - chars += " {NULL, NULL, ocNone} " - chars += "}; " - - # addToMap call - chars += "addToMap(%s, %s); "%( - "p"+self.locale.capitalize(), "a"+self.locale.capitalize()) - - return chars - -class Parser(object): - - def __init__ (self, args): - # default input & output files. - self.infile = "./keywords_utf16.txt" - self.outfile = "../../source/core/tool/cellkeywords.inl" - - if len(args) >= 2: - self.infile = args[1] - if len(args) >= 3: - self.outfile = args[2] - - def getDByte (self): - # Assume little endian. - bh = self.bytes[self.i] - bl = self.bytes[self.i+1] - try: - dbyte = ord(bl)*256 + ord(bh) - except Exception: - dbyte = bl*256 + bh - self.i += 2 - return dbyte - - def parseLine (self): - buf = [] - while self.i < self.size: - dbyte = self.getDByte() - if dbyte == 0x000A: - break - buf.append(dbyte) - return buf - - def dumpBuf (self, buf, linefeed=True): - for item in buf: - sys.stdout.write(chr(item)) - if linefeed: - print ('') - - def parse (self): - - file = open(self.infile, 'rb') - self.bytes = file.read() - file.close() - - self.size = len(self.bytes) - self.i = 0 - - localeList = [] # stores an array of locale data objects. - funcName = None - word = [] - wordPair = [] - - while self.i < self.size: - dbyte = self.getDByte() - if dbyte == 0xFEFF and self.i == 2: - # unicode signature - ignore it. - pass - elif dbyte == 0x0024: - # $ - locale name - buf = self.parseLine() - locale = getAscii(buf) - localeList.append(LocaleData(locale)) - - elif dbyte == 0x0040: - # @ - function name - buf = self.parseLine() - funcName = getAscii(buf) - - elif dbyte == 0x002C: - # , - comma separator - if len(word) > 0: - wordPair.append(word) - word = [] - elif dbyte == 0x000A: - # linefeed - if len(word) > 0: - wordPair.append(word) - word = [] - if len(wordPair) >= 2: - localeList[-1].addKeywordMap(funcName, wordPair[0], wordPair[1]) - wordPair = [] - elif dbyte in [0x0009, 0x0020]: - # whitespace - ignore it. - pass - else: - word.append(dbyte) - - chars = "// This file has been automatically generated. Do not hand-edit this! " - for obj in localeList: - chars += " " + obj.dumpCode() - - # Write to output file. - file = open(self.outfile, 'w') - file.write(chars) - file.close() - -if __name__=='__main__': - parser = Parser(sys.argv) - parser.parse() - commit c87b9950f01b29a9720f7acaba2d654b03f12ecc Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Feb 2 18:41:18 2025 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Feb 2 17:27:40 2025 +0100 Simplify cellkeywords.inl It was autogenerated once; likely, it was needed when the encoding of all CXX files was undefined. These days, the encoding is fixed to UTF-8, so no meed to encode the literals like this. Change-Id: I0a181075360a28e79c1a2e67548eebc970832a85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181009 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/core/tool/cellkeywords.inl b/sc/source/core/tool/cellkeywords.inl index 364e16042f46..e72f9e1f79ae 100644 --- a/sc/source/core/tool/cellkeywords.inl +++ b/sc/source/core/tool/cellkeywords.inl @@ -23,51 +23,21 @@ static const lang::Locale aFr(u"fr"_ustr, u""_ustr, u""_ustr); -// pre instantiations of localized function names -static const sal_Unicode cell_address_fr[] = { - 0x0041, 0x0044, 0x0052, 0x0045, 0x0053, 0x0053, 0x0045, 0x0000}; -static const sal_Unicode cell_col_fr[] = { - 0x0043, 0x004F, 0x004C, 0x004F, 0x004E, 0x004E, 0x0045, 0x0000}; -static const sal_Unicode cell_contents_fr[] = { - 0x0043, 0x004F, 0x004E, 0x0054, 0x0045, 0x004E, 0x0055, 0x0000}; -static const sal_Unicode cell_color_fr[] = { - 0x0043, 0x004F, 0x0055, 0x004C, 0x0045, 0x0055, 0x0052, 0x0000}; -static const sal_Unicode cell_width_fr[] = { - 0x004C, 0x0041, 0x0052, 0x0047, 0x0045, 0x0055, 0x0052, 0x0000}; -static const sal_Unicode cell_row_fr[] = { - 0x004C, 0x0049, 0x0047, 0x004E, 0x0045, 0x0000}; -static const sal_Unicode cell_filename_fr[] = { - 0x004E, 0x004F, 0x004D, 0x0046, 0x0049, 0x0043, 0x0048, 0x0049, 0x0045, 0x0052, 0x0000}; -static const sal_Unicode cell_prefix_fr[] = { - 0x0050, 0x0052, 0x0045, 0x0046, 0x0049, 0x0058, 0x0045, 0x0000}; -static const sal_Unicode cell_protect_fr[] = { - 0x0050, 0x0052, 0x004F, 0x0054, 0x0045, 0x0047, 0x0045, 0x0000}; -static const sal_Unicode info_numfile_fr[] = { - 0x004E, 0x0042, 0x0046, 0x0049, 0x0043, 0x0048, 0x0000}; -static const sal_Unicode info_recalc_fr[] = { - 0x0052, 0x0045, 0x0043, 0x0041, 0x004C, 0x0043, 0x0055, 0x004C, 0x0000}; -static const sal_Unicode info_system_fr[] = { - 0x0053, 0x0059, 0x0053, 0x0054, 0x0045, 0x0058, 0x0050, 0x004C, 0x0000}; -static const sal_Unicode info_release_fr[] = { - 0x0056, 0x0045, 0x0052, 0x0053, 0x0049, 0x004F, 0x004E, 0x0000}; -static const sal_Unicode info_osversion_fr[] = { - 0x0056, 0x0045, 0x0052, 0x0053, 0x0049, 0x004F, 0x004E, 0x0053, 0x0045, 0x0000}; - static const TransItem pFr[] = { - {cell_address_fr, "ADDRESS", ocCell}, - {cell_col_fr, "COL", ocCell}, - {cell_contents_fr, "CONTENTS", ocCell}, - {cell_color_fr, "COLOR", ocCell}, - {cell_width_fr, "WIDTH", ocCell}, - {cell_row_fr, "ROW", ocCell}, - {cell_filename_fr, "FILENAME", ocCell}, - {cell_prefix_fr, "PREFIX", ocCell}, - {cell_protect_fr, "PROTECT", ocCell}, - {info_numfile_fr, "NUMFILE", ocInfo}, - {info_recalc_fr, "RECALC", ocInfo}, - {info_system_fr, "SYSTEM", ocInfo}, - {info_release_fr, "RELEASE", ocInfo}, - {info_osversion_fr, "OSVERSION", ocInfo}, + {u"ADRESSE", "ADDRESS", ocCell}, + {u"COLONNE", "COL", ocCell}, + {u"CONTENU", "CONTENTS", ocCell}, + {u"COULEUR", "COLOR", ocCell}, + {u"LARGEUR", "WIDTH", ocCell}, + {u"LIGNE", "ROW", ocCell}, + {u"NOMFICHIER", "FILENAME", ocCell}, + {u"PREFIXE", "PREFIX", ocCell}, + {u"PROTEGE", "PROTECT", ocCell}, + {u"NBFICH", "NUMFILE", ocInfo}, + {u"RECALCUL", "RECALC", ocInfo}, + {u"SYSTEXPL", "SYSTEM", ocInfo}, + {u"VERSION", "RELEASE", ocInfo}, + {u"VERSIONSE", "OSVERSION", ocInfo}, {nullptr, nullptr, ocNone} }; @@ -78,66 +48,26 @@ addToMap(pFr, aFr); static const lang::Locale aHu(u"hu"_ustr, u""_ustr, u""_ustr); -// pre instantiations of localized function names -static const sal_Unicode cell_address_hu[] = { - 0x0043, 0x00CD, 0x004D, 0x0000}; -static const sal_Unicode cell_col_hu[] = { - 0x004F, 0x0053, 0x005A, 0x004C, 0x004F, 0x0050, 0x0000}; -static const sal_Unicode cell_color_hu[] = { - 0x0053, 0x005A, 0x00CD, 0x004E, 0x0000}; -static const sal_Unicode cell_contents_hu[] = { - 0x0054, 0x0041, 0x0052, 0x0054, 0x0041, 0x004C, 0x004F, 0x004D, 0x0000}; -static const sal_Unicode cell_width_hu[] = { - 0x0053, 0x005A, 0x00C9, 0x004C, 0x0045, 0x0053, 0x0000}; -static const sal_Unicode cell_row_hu[] = { - 0x0053, 0x004F, 0x0052, 0x0000}; -static const sal_Unicode cell_filename_hu[] = { - 0x0046, 0x0049, 0x004C, 0x0045, 0x004E, 0x00C9, 0x0056, 0x0000}; -static const sal_Unicode cell_prefix_hu[] = { - 0x0050, 0x0052, 0x0045, 0x0046, 0x0049, 0x0058, 0x0000}; -static const sal_Unicode cell_protect_hu[] = { - 0x0056, 0x00C9, 0x0044, 0x0045, 0x0054, 0x0054, 0x0000}; -static const sal_Unicode cell_coord_hu[] = { - 0x004B, 0x004F, 0x004F, 0x0052, 0x0044, 0x0000}; -static const sal_Unicode cell_format_hu[] = { - 0x0046, 0x004F, 0x0052, 0x004D, 0x0041, 0x0000}; -static const sal_Unicode cell_parentheses_hu[] = { - 0x005A, 0x00C1, 0x0052, 0x00D3, 0x004A, 0x0045, 0x004C, 0x0045, 0x004B, 0x0000}; -static const sal_Unicode cell_sheet_hu[] = { - 0x004C, 0x0041, 0x0050, 0x0000}; -static const sal_Unicode cell_type_hu[] = { - 0x0054, 0x00CD, 0x0050, 0x0055, 0x0053, 0x0000}; -static const sal_Unicode info_numfile_hu[] = { - 0x0046, 0x0049, 0x004C, 0x0045, 0x0053, 0x005A, 0x00C1, 0x004D, 0x0000}; -static const sal_Unicode info_recalc_hu[] = { - 0x0053, 0x005A, 0x00C1, 0x004D, 0x004F, 0x004C, 0x00C1, 0x0053, 0x0000}; -static const sal_Unicode info_system_hu[] = { - 0x0052, 0x0045, 0x004E, 0x0044, 0x0053, 0x005A, 0x0045, 0x0052, 0x0000}; -static const sal_Unicode info_release_hu[] = { - 0x0056, 0x0045, 0x0052, 0x005A, 0x0049, 0x00D3, 0x0000}; -static const sal_Unicode info_osversion_hu[] = { - 0x004F, 0x0050, 0x0052, 0x0045, 0x004E, 0x0044, 0x0053, 0x005A, 0x0045, 0x0052, 0x0000}; - static const TransItem pHu[] = { - {cell_address_hu, "ADDRESS", ocCell}, - {cell_col_hu, "COL", ocCell}, - {cell_color_hu, "COLOR", ocCell}, - {cell_contents_hu, "CONTENTS", ocCell}, - {cell_width_hu, "WIDTH", ocCell}, - {cell_row_hu, "ROW", ocCell}, - {cell_filename_hu, "FILENAME", ocCell}, - {cell_prefix_hu, "PREFIX", ocCell}, - {cell_protect_hu, "PROTECT", ocCell}, - {cell_coord_hu, "COORD", ocCell}, - {cell_format_hu, "FORMAT", ocCell}, - {cell_parentheses_hu, "PARENTHESES", ocCell}, - {cell_sheet_hu, "SHEET", ocCell}, - {cell_type_hu, "TYPE", ocCell}, - {info_numfile_hu, "NUMFILE", ocInfo}, - {info_recalc_hu, "RECALC", ocInfo}, - {info_system_hu, "SYSTEM", ocInfo}, - {info_release_hu, "RELEASE", ocInfo}, - {info_osversion_hu, "OSVERSION", ocInfo}, + {u"CÍM", "ADDRESS", ocCell}, + {u"OSZLOP", "COL", ocCell}, + {u"SZÍN", "COLOR", ocCell}, + {u"TARTALOM", "CONTENTS", ocCell}, + {u"SZÉLES", "WIDTH", ocCell}, + {u"SOR", "ROW", ocCell}, + {u"FILENÉV", "FILENAME", ocCell}, + {u"PREFIX", "PREFIX", ocCell}, + {u"VÉDETT", "PROTECT", ocCell}, + {u"KOORD", "COORD", ocCell}, + {u"FORMA", "FORMAT", ocCell}, + {u"ZÁRÓJELEK", "PARENTHESES", ocCell}, + {u"LAP", "SHEET", ocCell}, + {u"TÍPUS", "TYPE", ocCell}, + {u"FILESZÁM", "NUMFILE", ocInfo}, + {u"SZÁMOLÁS", "RECALC", ocInfo}, + {u"RENDSZER", "SYSTEM", ocInfo}, + {u"VERZIÓ", "RELEASE", ocInfo}, + {u"OPRENDSZER", "OSVERSION", ocInfo}, {nullptr, nullptr, ocNone} }; @@ -148,51 +78,21 @@ addToMap(pHu, aHu); static const lang::Locale aDe(u"de"_ustr, u""_ustr, u""_ustr); -// pre instantiations of localized function names -static const sal_Unicode cell_row_de[] = { - 0x005A, 0x0045, 0x0049, 0x004C, 0x0045, 0x0000}; -static const sal_Unicode cell_col_de[] = { - 0x0053, 0x0050, 0x0041, 0x004C, 0x0054, 0x0045, 0x0000}; -static const sal_Unicode cell_width_de[] = { - 0x0042, 0x0052, 0x0045, 0x0049, 0x0054, 0x0045, 0x0000}; -static const sal_Unicode cell_address_de[] = { - 0x0041, 0x0044, 0x0052, 0x0045, 0x0053, 0x0053, 0x0045, 0x0000}; -static const sal_Unicode cell_filename_de[] = { - 0x0044, 0x0041, 0x0054, 0x0045, 0x0049, 0x004E, 0x0041, 0x004D, 0x0045, 0x0000}; -static const sal_Unicode cell_color_de[] = { - 0x0046, 0x0041, 0x0052, 0x0042, 0x0045, 0x0000}; -static const sal_Unicode cell_format_de[] = { - 0x0046, 0x004F, 0x0052, 0x004D, 0x0041, 0x0054, 0x0000}; -static const sal_Unicode cell_contents_de[] = { - 0x0049, 0x004E, 0x0048, 0x0041, 0x004C, 0x0054, 0x0000}; -static const sal_Unicode cell_parentheses_de[] = { - 0x004B, 0x004C, 0x0041, 0x004D, 0x004D, 0x0045, 0x0052, 0x004E, 0x0000}; -static const sal_Unicode cell_protect_de[] = { - 0x0053, 0x0043, 0x0048, 0x0055, 0x0054, 0x005A, 0x0000}; -static const sal_Unicode cell_type_de[] = { - 0x0054, 0x0059, 0x0050, 0x0000}; -static const sal_Unicode cell_prefix_de[] = { - 0x0050, 0x0052, 0x00C4, 0x0046, 0x0049, 0x0058, 0x0000}; -static const sal_Unicode cell_sheet_de[] = { - 0x0042, 0x004C, 0x0041, 0x0054, 0x0054, 0x0000}; -static const sal_Unicode cell_coord_de[] = { - 0x004B, 0x004F, 0x004F, 0x0052, 0x0044, 0x0000}; - static const TransItem pDe[] = { - {cell_row_de, "ROW", ocCell}, - {cell_col_de, "COL", ocCell}, - {cell_width_de, "WIDTH", ocCell}, - {cell_address_de, "ADDRESS", ocCell}, - {cell_filename_de, "FILENAME", ocCell}, - {cell_color_de, "COLOR", ocCell}, - {cell_format_de, "FORMAT", ocCell}, - {cell_contents_de, "CONTENTS", ocCell}, - {cell_parentheses_de, "PARENTHESES", ocCell}, - {cell_protect_de, "PROTECT", ocCell}, - {cell_type_de, "TYPE", ocCell}, - {cell_prefix_de, "PREFIX", ocCell}, - {cell_sheet_de, "SHEET", ocCell}, - {cell_coord_de, "COORD", ocCell}, + {u"ZEILE", "ROW", ocCell}, + {u"SPALTE", "COL", ocCell}, + {u"BREITE", "WIDTH", ocCell}, + {u"ADRESSE", "ADDRESS", ocCell}, + {u"DATEINAME", "FILENAME", ocCell}, + {u"FARBE", "COLOR", ocCell}, + {u"FORMAT", "FORMAT", ocCell}, + {u"INHALT", "CONTENTS", ocCell}, + {u"KLAMMERN", "PARENTHESES", ocCell}, + {u"SCHUTZ", "PROTECT", ocCell}, + {u"TYP", "TYPE", ocCell}, + {u"PRÄFIX", "PREFIX", ocCell}, + {u"BLATT", "SHEET", ocCell}, + {u"KOORD", "COORD", ocCell}, {nullptr, nullptr, ocNone} };