diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-06-19 12:47:44 +0200 |
commit | 941020379b1ea1ec7c564c21e68ea1674cda7683 (patch) | |
tree | 40fcaf109d6d585bcdc0faf7ea6c0812b3cc9a39 /i18npool/source | |
parent | 0692507dcc62e94c7af88388961db1d7d12d6dbd (diff) | |
parent | 0d2916e03ea51529e15995830a1a8c36bd72e442 (diff) |
Merge branch 'master' into feature/gnumake4
Conflicts:
basebmp/prj/d.lst
basebmp/test/basictest.cxx
basebmp/test/makefile.mk
basegfx/inc/basegfx/basegfxdllapi.h
basegfx/inc/basegfx/tools/debugplotter.hxx
basegfx/inc/basegfx/tuple/b2ituple.hxx
basegfx/prj/d.lst
basegfx/source/numeric/makefile.mk
basegfx/source/polygon/makefile.mk
basegfx/source/range/makefile.mk
basegfx/source/raster/makefile.mk
basegfx/source/tuple/makefile.mk
basegfx/source/vector/makefile.mk
basegfx/test/basegfx1d.cxx
basegfx/test/makefile.mk
basegfx/util/makefile.mk
canvas/Library_canvasfactory.mk
canvas/Module_canvas.mk
canvas/prj/build.lst
canvas/prj/d.lst
canvas/source/cairo/cairo_canvashelper_texturefill.cxx
canvas/source/cairo/makefile.mk
canvas/source/tools/makefile.mk
comphelper/qa/string/makefile.mk
cppcanvas/Module_cppcanvas.mk
cppcanvas/inc/cppcanvas/cppcanvasdllapi.h
cppcanvas/prj/build.lst
cppcanvas/prj/d.lst
cppcanvas/source/mtfrenderer/makefile.mk
cppcanvas/util/makefile.mk
i18npool/source/search/makefile.mk
regexp/Library_regexp.mk
regexp/prj/d.lst
sax/CppunitTest_sax.mk
sax/Library_sax.mk
sax/prj/d.lst
sax/qa/cppunit/test_converter.cxx
sax/source/expatwrap/attrlistimpl.hxx
sax/util/makefile.mk
svtools/Library_svt.mk
tools/Executable_sspretty.mk
ucbhelper/prj/d.lst
ucbhelper/source/provider/configureucb.cxx
ucbhelper/source/provider/provconf.cxx
ucbhelper/util/makefile.mk
unotools/Library_utl.mk
unotools/Module_unotools.mk
unotools/Package_inc.mk
unotools/prj/build.lst
vcl/Library_desktop_detector.mk
vcl/Library_vcl.mk
vcl/Library_vclplug_gtk.mk
vcl/aqua/source/gdi/salprn.cxx
vcl/inc/aqua/saldata.hxx
vcl/unx/generic/gdi/salgdi3.cxx
Diffstat (limited to 'i18npool/source')
119 files changed, 2175 insertions, 1427 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index 19b175d4bd83..3cc974870c3d 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -132,7 +133,7 @@ Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 n } static inline sal_Bool SAL_CALL isCJK( const Locale& rLocale ) { - return rLocale.Language.equalsAscii("zh") || rLocale.Language.equalsAscii("ja") || rLocale.Language.equalsAscii("ko"); + return rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) || rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")) || rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")); } Boundary SAL_CALL BreakIteratorImpl::previousWord( const OUString& Text, sal_Int32 nStartPos, @@ -442,38 +443,49 @@ sal_Int16 SAL_CALL BreakIteratorImpl::getWordType( const OUString& /*Text*/, return 0; } -typedef struct { - UBlockCode from; - UBlockCode to; - sal_Int16 script; -} UBlock2Script; - -// for a list of the UBLOCK_... values see: -// http://icu-project.org/apiref/icu4c/uchar_8h.html -// where enum UBlockCode is defined. -// See also http://www.unicode.org/charts/ for general reference -static UBlock2Script scriptList[] = { - {UBLOCK_NO_BLOCK, UBLOCK_NO_BLOCK, ScriptType::WEAK}, - {UBLOCK_BASIC_LATIN, UBLOCK_ARMENIAN, ScriptType::LATIN}, - {UBLOCK_HEBREW, UBLOCK_MYANMAR, ScriptType::COMPLEX}, - {UBLOCK_GEORGIAN, UBLOCK_GEORGIAN, ScriptType::LATIN}, - {UBLOCK_HANGUL_JAMO, UBLOCK_HANGUL_JAMO, ScriptType::ASIAN}, - {UBLOCK_ETHIOPIC, UBLOCK_ETHIOPIC, ScriptType::COMPLEX}, - {UBLOCK_CHEROKEE, UBLOCK_RUNIC, ScriptType::LATIN}, - {UBLOCK_KHMER, UBLOCK_MONGOLIAN, ScriptType::COMPLEX}, - {UBLOCK_LATIN_EXTENDED_ADDITIONAL, UBLOCK_GREEK_EXTENDED, ScriptType::LATIN}, - {UBLOCK_CJK_RADICALS_SUPPLEMENT, UBLOCK_HANGUL_SYLLABLES, ScriptType::ASIAN}, - {UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, ScriptType::ASIAN}, - {UBLOCK_ARABIC_PRESENTATION_FORMS_A, UBLOCK_ARABIC_PRESENTATION_FORMS_A, ScriptType::COMPLEX}, - {UBLOCK_CJK_COMPATIBILITY_FORMS, UBLOCK_CJK_COMPATIBILITY_FORMS, ScriptType::ASIAN}, - {UBLOCK_ARABIC_PRESENTATION_FORMS_B, UBLOCK_ARABIC_PRESENTATION_FORMS_B, ScriptType::COMPLEX}, - {UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, ScriptType::ASIAN}, - {UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B, UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT, ScriptType::ASIAN}, - {UBLOCK_CJK_STROKES, UBLOCK_CJK_STROKES, ScriptType::ASIAN}, - {UBLOCK_LATIN_EXTENDED_C, UBLOCK_LATIN_EXTENDED_D, ScriptType::LATIN} -}; - -#define scriptListCount sizeof (scriptList) / sizeof (UBlock2Script) +static sal_Int16 scriptTypes[] = { + ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, + ScriptType::ASIAN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::LATIN, +// 15 + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN, ScriptType::COMPLEX, + ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, +// 30 + ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::LATIN, ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, +// 45 + ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, + ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, +// 60 + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, ScriptType::ASIAN, +// 75 + ScriptType::COMPLEX, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::LATIN, ScriptType::LATIN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, +// 90 + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK, ScriptType::COMPLEX, +// 105 + ScriptType::ASIAN, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::ASIAN, +// 120 + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::WEAK, ScriptType::WEAK, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, +// 135 + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, ScriptType::COMPLEX, + ScriptType::COMPLEX, + ScriptType::WEAK}; + +#define scriptListCount SAL_N_ELEMENTS(scriptTypes) sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) { @@ -483,27 +495,13 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) if (currentChar != lastChar) { lastChar = currentChar; - //JP 21.9.2001: handle specific characters - always as weak - // definition of 1 - this breaks a word - // 2 - this can be inside a word - // 0x20 & 0xA0 - Bug 102975, declare western space and non-break space as WEAK char. - if( 1 == currentChar || 2 == currentChar || 0x20 == currentChar || 0xA0 == currentChar) + int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); + if (script < 0) nRet = ScriptType::WEAK; - // workaround for Coptic - else if ( 0x2C80 <= currentChar && 0x2CE3 >= currentChar) - nRet = ScriptType::LATIN; - // work-around for ligatures (see http://www.unicode.org/charts/PDF/UFB00.pdf) - else if ((0xFB00 <= currentChar && currentChar <= 0xFB06) || - (0xFB13 <= currentChar && currentChar <= 0xFB17)) - nRet = ScriptType::LATIN; - else { - UBlockCode block=ublock_getCode(currentChar); - sal_uInt16 i; - for ( i = 0; i < scriptListCount; i++) { - if (block <= scriptList[i].to) break; - } - nRet=(i < scriptListCount && block >= scriptList[i].from) ? scriptList[i].script : ScriptType::WEAK; - } + else if (static_cast<size_t>(script) >= SAL_N_ELEMENTS(scriptTypes)) + nRet = ScriptType::COMPLEX; // anything new is going to be pretty wild + else + nRet = scriptTypes[script]; } return nRet; } @@ -524,7 +522,7 @@ sal_Bool SAL_CALL BreakIteratorImpl::createLocaleSpecificBreakIterator(const OUS } Reference < uno::XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.BreakIterator_") + aLocaleName); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator_")) + aLocaleName); if ( xI.is() ) { xI->queryInterface( getCppuType((const Reference< XBreakIterator>*)0) ) >>= xBI; @@ -575,7 +573,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw ( // load service with name <base>_<lang> createLocaleSpecificBreakIterator(rLocale.Language)) || // load default service with name <base>_Unicode - createLocaleSpecificBreakIterator(OUString::createFromAscii("Unicode"))) { + createLocaleSpecificBreakIterator(OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode")))) { lookupTable.push_back( new lookupTableItem(aLocale, xBI) ); return xBI; } @@ -607,3 +605,4 @@ BreakIteratorImpl::getSupportedServiceNames(void) throw( RuntimeException ) } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index 16d7d1337538..ce7170c2a411 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -184,3 +185,5 @@ BreakIterator_ko::~BreakIterator_ko() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx b/i18npool/source/breakiterator/breakiterator_ctl.cxx index cc174084198e..6d6b3f9b9cd7 100644 --- a/i18npool/source/breakiterator/breakiterator_ctl.cxx +++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,3 +144,5 @@ LineBreakResults SAL_CALL BreakIterator_CTL::getLineBreak( } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx index cbbcd510379b..ad3c619d0979 100644 --- a/i18npool/source/breakiterator/breakiterator_th.cxx +++ b/i18npool/source/breakiterator/breakiterator_th.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -155,3 +156,5 @@ void SAL_CALL BreakIterator_th::makeIndex(const OUString& Text, sal_Int32 nStart } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index d7242d180d85..ad934db2db11 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -443,3 +444,5 @@ BreakIterator_Unicode::getSupportedServiceNames(void) throw( uno::RuntimeExcepti } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/data/char.txt b/i18npool/source/breakiterator/data/char.txt new file mode 100644 index 000000000000..8e49a565ed8c --- /dev/null +++ b/i18npool/source/breakiterator/data/char.txt @@ -0,0 +1,118 @@ +# +# Copyright (C) 2002-2009, International Business Machines Corporation and others. +# All Rights Reserved. +# +# file: char.txt +# +# ICU Character Break Rules, also known as Grapheme Cluster Boundaries +# See Unicode Standard Annex #29. +# These rules are based on TR29 Revision 13, for Unicode Version 5.1 +# Modifications to SpacingMark and Prepend by M. Hosken. +# + +# +# Character Class Definitions. +# +$CR = [\p{Grapheme_Cluster_Break = CR}]; +$LF = [\p{Grapheme_Cluster_Break = LF}]; +$Control = [\p{Grapheme_Cluster_Break = Control}]; +$Prepend = [\p{Grapheme_Cluster_Break = Prepend}]; +$Extend = [\p{Grapheme_Cluster_Break = Extend}]; +$SpacingMark = [\p{Grapheme_Cluster_Break = SpacingMark}]; +# True Indic wants to move by syllables. Break up SpacingMark. This based on Unicode 6.0 data +# In effect it is [\p{Grapheme_Cluster_Break = SpacingMark} - \u0E30 \u0E32 \u0E45 \u0EB0 \u0EB2 \u102B \u102C \u1038 +# \u1062-\u1064 \u1067-\u106D \u1083 \u1087-\u108C \u108F \u109A-\u109C \u19B0-\u19B4 \u19B8-\u19C0 \u19C8 \u19C9 +# \u1A61 \u1A63 \u1A64 \u1BE7 \u1BEA-\u1BEC \u1BEE \u1BF2 \u1BF3 \uAA7B +$IndicSpacing = [\u0903 \u093B \u093E-\u0940 \u0949-\u094C \u094E \u094F \u0982 \u0983 \u09BF \u09C0 \u09C7 \u09C8 \u09CB \u09CC \u0A03 \u0A3E-\u0A40 \u0A83 \u0ABE-\u0AC0 \u0AC9 \u0ACB \u0ACC \u0B02 \u0B03 \u0B40 \u0B47 \u0B48 \u0B4B-\u0B4C \u0BBF \u0BC1 \u0BC2 \u0BC6-\u0BC8 \u0BCA-\u0BCC \u0C01-\u0C03 \u0C41-\u0C44 \u0C82 \u0C83 \u0CBE \u0CC0 \u0CC1 \u0CC3 \u0CC4 \u0CC7 \u0CC8 \u0CCA \u0CCB \u0D02 \u0D03 \u0D3F \u0D40 \u0D46-\u0D48 \u0D4A-\u0D4C \u0D82 \u0D83 \u0DD0 \u0DD1 \u0DD8-\u0DDE \u0F3E \u0F3F \u0F7F \u1923-\u1926 \u1929-\u192B \u1930 \u1931 \u1933-\u1938 \u1A19-\u1A1B \u1B04 \u1B35 \u1B3B \u1B3D-\u1B41 \u1B43 \u1B44 \u1B82 \u1BA1 \u1BA6 \u1BA7 \u1BAA \u1C24-\u1C2B \u1C34 \u1C35 \u1CE1 \u1CF2 \uA880 \uA881 \uA8B4-\uA8C3 \uA952 \uA953 \uA983 \uA9B4 \uA9B5 \uA9BA \uA9BB \uA9BD-\uA9C0 \uAA2F \uAA30 \uAA33 \uAA34 \uABE3 \uABE4 \uABE6 \uABE7 \uABE9 \uABEA \uABEC \U00011000 \U00011002 \U00011082 \U000110B0-\U000110B2 \U000110B7 \U000100B8 \U0001D166 \U0001D16D]; +# SEAsian (Thai, Lao, Burmese, Tai Lue, Tai Tham, Batak) are cluster based not syllable based +$SEASpacing = [\u0E33 \u0EB3 \u1031 \u103B \u103C \u1056 \u1057 \u1084 \u17B6 \u17BE-\u17C5 \u17C7 \u17C8 \u19B5-\u19B7 \u19BA \u1A55 \u1A57 \u1A6D-\u1A72 \uA823 \uA824 \uA827 \uAA4D]; +$BengaliLetter = [\u0985-\u09B9 \u09CE \u09DC-\u09E1 \u09F0-\u09F1]; +$BengaliSignVirama = \u09CD; +$GujaratiLetter = [\u0A85-\u0A8C \u0A8F-\u0A90 \u0A93-\u0AB9 \u0AE0-\u0AE1]; +$GujaratiSignVirama = \u0ACD; +$DevanagariLetter = [\u0904-\u0939 \u0958-\u0961 \u0972-\u097F]; +$DevanagariSignVirama = \u094D; +$KannadaLetter = [\u0C85-\u0CB9 \u0CDE-\u0CE1]; +$KannadaSignVirama = \u0CCD; +$MalayalamLetter = [\u0D05-\u0D39 \u0D60-\u0D61 \u0D7A-\u0D7F]; +$MalayalamSignVirama = \u0D4D; +$OriyaLetter = [\u0B05-\u0B39 \u0B5C-\u0B61 \u0B71]; +$OriyaSignVirama = \u0B4D; +$GurmukhiLetter = [\u0A05-\u0A39 \u0A59-\u0A5E]; +$GurmukhiSignVirama = \u0A4D; +$TamilLetter = [\u0B85-\u0BB9]; +$TamilSignVirama = \u0BCD; +$TeluguLetter = [\u0C05-\u0C39 \u0C58-\u0C61]; +$TeluguSignVirama = \u0C4D; + +# +# Korean Syllable Definitions +# +$L = [\p{Grapheme_Cluster_Break = L}]; +$V = [\p{Grapheme_Cluster_Break = V}]; +$T = [\p{Grapheme_Cluster_Break = T}]; + +$LV = [\p{Grapheme_Cluster_Break = LV}]; +$LVT = [\p{Grapheme_Cluster_Break = LVT}]; + + +## ------------------------------------------------- +!!chain; + +!!forward; + +$CR $LF; + +$BengaliLetter ($BengaliSignVirama $BengaliLetter?)+; +$GujaratiLetter ($GujaratiSignVirama $GujaratiLetter?)+; +$DevanagariLetter ($DevanagariSignVirama $DevanagariLetter?)+; +$KannadaLetter ($KannadaSignVirama $KannadaLetter?)+; +$MalayalamLetter ($MalayalamSignVirama $MalayalamLetter?)+; +$OriyaLetter ($OriyaSignVirama $OriyaLetter?)+; +$GurmukhiLetter ($GurmukhiSignVirama $GurmukhiLetter?)+; +$TamilLetter ($TamilSignVirama $TamilLetter?)+; +$TeluguLetter ($TeluguSignVirama $TeluguLetter?)+; + +$L ($L | $V | $LV | $LVT); +($LV | $V) ($V | $T); +($LVT | $T) $T; + +[^$Control $CR $LF] $Extend; + +[^$Control $CR $LF] ($IndicSpacing | $SEASpacing); +#[^$Control $CR $LF] $SpacingMark; +# $Prepend [^$Control $CR $LF]; + + +## ------------------------------------------------- + +!!reverse; +$LF $CR; +($BengaliLetter? $BengaliSignVirama)+ $BengaliLetter; +($GujaratiLetter? $GujaratiSignVirama)+ $GujaratiLetter; +($DevanagariLetter? $DevanagariSignVirama)+ $DevanagariLetter; +($KannadaLetter? $KannadaSignVirama)+ $KannadaLetter; +($MalayalamLetter? $MalayalamSignVirama)+ $MalayalamLetter; +($OriyaLetter? $OriyaSignVirama)+ $OriyaLetter; +($GurmukhiLetter? $GurmukhiSignVirama)+ $GurmukhiLetter; +($TamilLetter? $TamilSignVirama)+ $TamilLetter; +($TeluguLetter? $TeluguSignVirama)+ $TeluguLetter; +($L | $V | $LV | $LVT) $L; +($V | $T) ($LV | $V); +$T ($LVT | $T); + +$Extend [^$Control $CR $LF]; +($IndicSpacing | $SEASpacing) [^$Control $CR $LF]; +#$SpacingMark [^$Control $CR $LF]; +# [^$Control $CR $LF] $Prepend; + + +## ------------------------------------------------- + +!!safe_reverse; + + +## ------------------------------------------------- + +!!safe_forward; + diff --git a/i18npool/source/breakiterator/data/makefile.mk b/i18npool/source/breakiterator/data/makefile.mk index cb37c5132f67..81bbbbd280e1 100644 --- a/i18npool/source/breakiterator/data/makefile.mk +++ b/i18npool/source/breakiterator/data/makefile.mk @@ -24,7 +24,7 @@ # for a copy of the LGPLv3 License. # #************************************************************************ -PRJ=..$/..$/.. +PRJ=../../.. PRJNAME=i18npool TARGET=dict @@ -46,13 +46,13 @@ SHL1TARGET=dict_ja SHL1IMPLIB=i$(SHL1TARGET) SHL1VERSIONMAP=$(TARGET).map -SHL1DEF=$(MISC)$/$(SHL1TARGET).def +SHL1DEF=$(MISC)/$(SHL1TARGET).def DEF1NAME=$(SHL1TARGET) SHL1OBJS= \ - $(SLO)$/dict_ja.obj + $(SLO)/dict_ja.obj -LIB1TARGET= $(SLB)$/$(SHL1TARGET).lib +LIB1TARGET= $(SLB)/$(SHL1TARGET).lib LIB1OBJFILES=$(SHL1OBJS) # Chinese dictionary @@ -60,13 +60,13 @@ SHL2TARGET=dict_zh SHL2IMPLIB=i$(SHL2TARGET) SHL2VERSIONMAP=$(TARGET).map -SHL2DEF=$(MISC)$/$(SHL2TARGET).def +SHL2DEF=$(MISC)/$(SHL2TARGET).def DEF2NAME=$(SHL2TARGET) SHL2OBJS= \ - $(SLO)$/dict_zh.obj + $(SLO)/dict_zh.obj -LIB2TARGET= $(SLB)$/$(SHL2TARGET).lib +LIB2TARGET= $(SLB)/$(SHL2TARGET).lib LIB2OBJFILES=$(SHL2OBJS) DEPOBJFILES= \ @@ -76,9 +76,5 @@ DEPOBJFILES= \ # --- Targets ------------------------------------------------------ .INCLUDE : target.mk -$(MISC)$/dict_%.cxx : %.dic - $(AUGMENT_LIBRARY_PATH) $(BIN)$/gendict $< $@ - -# ugly - is this dependency really required here? -$(foreach,i,$(shell @$(FIND) . -name "*.dic") $(MISC)$/dict_$(i:b).cxx) : $(BIN)$/gendict$(EXECPOST) - +$(MISC)/dict_%.cxx : %.dic + $(AUGMENT_LIBRARY_PATH) $(OUT_FOR_BUILD)/bin/gendict $< $@ diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx index fe2758602ee4..ab181be73836 100644 --- a/i18npool/source/breakiterator/gendict.cxx +++ b/i18npool/source/breakiterator/gendict.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,171 +36,213 @@ #include <sal/types.h> #include <rtl/strbuf.hxx> #include <rtl/ustring.hxx> +#include <osl/diagnose.h> +#include <vector> +using std::vector; using namespace ::rtl; -/* Main Procedure */ +/* Utility gendict: -SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) -{ - FILE *sfp, *cfp; + "BreakIterator_CJK provides input string caching and dictionary searching for + longest matching. You can provide a sorted dictionary (the encoding must be + UTF-8) by creating the following file: + i18npool/source/breakiterator/data/<language>.dict. - if (argc < 3) exit(-1); + The utility gendict will convert the file to C code, which will be compiled + into a shared library for dynamic loading. - sfp = fopen(argv[1], "rb"); // open the source file for read; - if (sfp == NULL) - { - printf("Open the dictionary source file failed."); - return -1; - } + All dictionary searching and loading is performed in the xdictionary class. + The only thing you need to do is to derive your class from BreakIterator_CJK + and create an instance of the xdictionary with the language name and + pass it to the parent class." (from http://wiki.services.openoffice.org/wiki/ + /Documentation/DevGuide/OfficeDev/Implementing_a_New_Locale - 27/01/2011) +*/ - // create the C source file to write - cfp = fopen(argv[2], "wb"); - if (cfp == NULL) { - fclose(sfp); - printf("Can't create the C source file."); - return -1; - } +// C-standard garantees that static variables are automatically initialized to 0 +static sal_uInt8 exists[0x2000]; +static sal_uInt32 charArray[0x10000]; - fprintf(cfp, "/*\n"); - fprintf(cfp, " * Copyright(c) 1999 - 2000, Sun Microsystems, Inc.\n"); - fprintf(cfp, " * All Rights Reserved.\n"); - fprintf(cfp, " */\n\n"); - fprintf(cfp, "/* !!!The file is generated automatically. DONOT edit the file manually!!! */\n\n"); - fprintf(cfp, "#include <sal/types.h>\n\n"); - fprintf(cfp, "extern \"C\" {\n"); - - sal_Int32 count, i, j; - sal_Int32 lenArrayCurr = 0, lenArrayCount = 0, lenArrayLen = 0, *lenArray = NULL, charArray[0x10000]; - sal_Bool exist[0x10000]; - for (i = 0; i < 0x10000; i++) { - exist[i] = sal_False; - charArray[i] = 0; - } +static inline void set_exists(sal_uInt32 index) +{ + exists[index>>3] |= 1 << (index & 0x07); +} + +static inline void printIncludes(FILE* source_fp) +{ + fputs("/* !!!The file is generated automatically. DO NOT edit the file manually!!! */\n\n", source_fp); + fputs("#include <sal/types.h>\n\n", source_fp); +} +static inline void printFunctions(FILE* source_fp) +{ + fputs ("\tconst sal_uInt8* getExistMark() { return existMark; }\n", source_fp); + fputs ("\tconst sal_Int16* getIndex1() { return index1; }\n", source_fp); + fputs ("\tconst sal_Int32* getIndex2() { return index2; }\n", source_fp); + fputs ("\tconst sal_Int32* getLenArray() { return lenArray; }\n", source_fp); + fputs ("\tconst sal_Unicode* getDataArea() { return dataArea; }\n", source_fp); +} + +static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sal_uInt32>& lenArray) +{ // generate main dict. data array - fprintf(cfp, "static const sal_Unicode dataArea[] = {"); + fputs("static const sal_Unicode dataArea[] = {\n\t", source_fp); sal_Char str[1024]; + sal_uInt32 lenArrayCurr = 0; sal_Unicode current = 0; - count = 0; - while (fgets(str, 1024, sfp)) { + + while (fgets(str, 1024, dictionary_fp)) { // input file is in UTF-8 encoding // don't convert last new line character to Ostr. OUString Ostr((const sal_Char *)str, strlen(str) - 1, RTL_TEXTENCODING_UTF8); const sal_Unicode *u = Ostr.getStr(); - sal_Int32 len = Ostr.getLength(); + const sal_Int32 len = Ostr.getLength(); - i=0; + sal_Int32 i=0; Ostr.iterateCodePoints(&i, 1); - if (len == i) continue; // skip one character word - - if (*u != current) { - if (*u < current) - printf("u %x, current %x, count %d, lenArrayCount %d\n", *u, current, - sal::static_int_cast<int>(count), sal::static_int_cast<int>(lenArrayCount)); - current = *u; - charArray[current] = lenArrayCount; + if (len == i) + continue; // skip one character word + + if (u[0] != current) { + OSL_ENSURE( (u[0] > current), "Dictionary file should be sorted"); + current = u[0]; + charArray[current] = lenArray.size(); } - if (lenArrayLen <= lenArrayCount+1) - lenArray = (sal_Int32*) realloc(lenArray, (lenArrayLen += 1000) * sizeof(sal_Int32)); - lenArray[lenArrayCount++] = lenArrayCurr; - - exist[u[0]] = sal_True; - for (i = 1; i < len; i++) { // start from second character, - exist[u[i]] = sal_True; // since the first character is captured in charArray. - lenArrayCurr++; - if ((count++) % 0x10 == 0) - fprintf(cfp, "\n\t"); - fprintf(cfp, "0x%04x, ", u[i]); + lenArray.push_back(lenArrayCurr); + + set_exists(u[0]); + // first character is stored in charArray, so start from second + for (i = 1; i < len; i++, lenArrayCurr++) { + set_exists(u[i]); + fprintf(source_fp, "0x%04x, ", u[i]); + if ((lenArrayCurr & 0x0f) == 0x0f) + fputs("\n\t", source_fp); } } - lenArray[lenArrayCount++] = lenArrayCurr; // store last ending pointer - charArray[current+1] = lenArrayCount; - fprintf(cfp, "\n};\n"); - - // generate lenArray - fprintf(cfp, "static const sal_Int32 lenArray[] = {\n\t"); - count = 1; - fprintf(cfp, "0x%x, ", 0); // insert one slat for skipping 0 in index2 array. - for (i = 0; i < lenArrayCount; i++) { - fprintf(cfp, "0x%lx, ", static_cast<long unsigned int>(lenArray[i])); - if (count == 0xf) { - count = 0; - fprintf(cfp, "\n\t"); - } else count++; - } - fprintf(cfp, "\n};\n"); + lenArray.push_back( lenArrayCurr ); // store last ending pointer + charArray[current+1] = lenArray.size(); + fputs("\n};\n", source_fp); +} - free(lenArray); +static inline void printLenArray(FILE* source_fp, const vector<sal_uInt32>& lenArray) +{ + fprintf(source_fp, "static const sal_Int32 lenArray[] = {\n\t"); + fprintf(source_fp, "0x%x, ", 0); // insert one slat for skipping 0 in index2 array. + for (size_t k = 0; k < lenArray.size(); k++) + { + if( !(k & 0xf) ) + fputs("\n\t", source_fp); - // generate index1 array - fprintf (cfp, "static const sal_Int16 index1[] = {\n\t"); - sal_Int16 set[0x100]; - count = 0; - for (i = 0; i < 0x100; i++) { - for (j = 0; j < 0x100; j++) - if (charArray[(i*0x100) + j] != 0) - break; - - fprintf(cfp, "0x%02x, ", set[i] = (j < 0x100 ? sal::static_int_cast<sal_Int16>(count++) : 0xff)); - if ((i+1) % 0x10 == 0) - fprintf (cfp, "\n\t"); + fprintf(source_fp, "0x%lx, ", static_cast<long unsigned int>(lenArray[k])); + } + fputs("\n};\n", source_fp ); +} + +/* FIXME?: what happens if in every range i there is at least one charArray != 0 + => this will make index1[] = {0x00, 0x01, 0x02,... 0xfe, 0xff } + => then in index2, the last range will be ignored incorrectly */ +static inline void printIndex1(FILE *source_fp, sal_Int16 *set) +{ + fprintf (source_fp, "static const sal_Int16 index1[] = {\n\t"); + sal_Int16 count = 0; + for (sal_Int32 i = 0; i < 0x100; i++) { + sal_Int32 j = 0; + while( j < 0x100 && charArray[(i<<8) + j] == 0) + j++; + + fprintf(source_fp, "0x%02x, ", set[i] = (j < 0x100 ? count++ : 0xff)); + if ((i & 0x0f) == 0x0f) + fputs ("\n\t", source_fp); } - fprintf (cfp, "};\n"); + fputs("};\n", source_fp); +} - // generate index2 array - fprintf (cfp, "static const sal_Int32 index2[] = {\n\t"); +static inline void printIndex2(FILE *source_fp, sal_Int16 *set) +{ + fputs ("static const sal_Int32 index2[] = {\n\t", source_fp); sal_Int32 prev = 0; - for (i = 0; i < 0x100; i++) { + for (sal_Int32 i = 0; i < 0x100; i++) { if (set[i] != 0xff) { - for (j = 0; j < 0x100; j++) { - sal_Int32 k = (i*0x100) + j; - if (prev != 0 && charArray[k] == 0) { - for (k++; k < 0x10000; k++) - if (charArray[k] != 0) - break; + for (sal_Int32 j = 0; j < 0x100; j++) { + sal_Int32 k = (i<<8) + j; + if (prev != 0 ) + while( charArray[k] == 0 && k < 0x10000 ) + k++; + + prev = charArray[(i<<8) + j]; + fprintf(source_fp, "0x%lx, ", static_cast<long unsigned int>(k < 0x10000 ? charArray[k] + 1 : 0)); + if ((j & 0x0f) == 0x0f) + fputs ("\n\t", source_fp); } - prev = charArray[(i*0x100) + j]; - fprintf( - cfp, "0x%lx, ", - sal::static_int_cast< unsigned long >( - k < 0x10000 ? charArray[k] + 1 : 0)); - if ((j+1) % 0x10 == 0) - fprintf (cfp, "\n\t"); - } - fprintf (cfp, "\n\t"); + fputs ("\n\t", source_fp); } } - fprintf (cfp, "\n};\n"); - - // generate existMark array - count = 0; - fprintf (cfp, "static const sal_uInt8 existMark[] = {\n\t"); - for (i = 0; i < 0x1FFF; i++) { - sal_uInt8 bit = 0; - for (j = 0; j < 8; j++) - if (exist[i * 8 + j]) - bit |= 1 << j; - fprintf(cfp, "0x%02x, ", bit); - if (count == 0xf) { - count = 0; - fprintf(cfp, "\n\t"); - } else count++; + fputs ("\n};\n", source_fp); +} + +/* Generates a bitmask for the existance of sal_Unicode values in dictionary; + it packs 8 sal_Bool values in 1 sal_uInt8 */ +static inline void printExistsMask(FILE *source_fp) +{ + fprintf (source_fp, "static const sal_uInt8 existMark[] = {\n\t"); + for (unsigned int i = 0; i < 0x2000; i++) + { + fprintf(source_fp, "0x%02x, ", exists[i]); + if ( (i & 0xf) == 0xf ) + fputs("\n\t", source_fp); } - fprintf (cfp, "\n};\n"); + fputs("\n};\n", source_fp); +} - // create function to return arrays - fprintf (cfp, "\tconst sal_uInt8* getExistMark() { return existMark; }\n"); - fprintf (cfp, "\tconst sal_Int16* getIndex1() { return index1; }\n"); - fprintf (cfp, "\tconst sal_Int32* getIndex2() { return index2; }\n"); - fprintf (cfp, "\tconst sal_Int32* getLenArray() { return lenArray; }\n"); - fprintf (cfp, "\tconst sal_Unicode* getDataArea() { return dataArea; }\n"); - fprintf (cfp, "}\n"); +SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) +{ + FILE *dictionary_fp, *source_fp; - fclose(sfp); - fclose(cfp); + if (argc == 1 || argc > 3) + { + fputs("2 arguments required: dictionary_file_name source_file_name", stderr); + exit(-1); + } + + dictionary_fp = fopen(argv[1], "rb"); // open the source file for read; + if (dictionary_fp == NULL) + { + printf("Open the dictionary source file failed."); + return -1; + } + + if(argc == 2) + source_fp = stdout; + else + { + // create the C source file to write + source_fp = fopen(argv[2], "wb"); + if (source_fp == NULL) { + fclose(dictionary_fp); + printf("Can't create the C source file."); + return -1; + } + } + + vector<sal_uInt32> lenArray; // stores the word boundaries in DataArea + sal_Int16 set[0x100]; + + printIncludes(source_fp); + fputs("extern \"C\" {\n", source_fp); + printDataArea(dictionary_fp, source_fp, lenArray); + printLenArray(source_fp, lenArray); + printIndex1(source_fp, set); + printIndex2(source_fp, set); + printExistsMask(source_fp); + printFunctions(source_fp); + fputs("}\n", source_fp); + + fclose(dictionary_fp); + fclose(source_fp); return 0; -} // End of main +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/makefile.mk b/i18npool/source/breakiterator/makefile.mk index fc6561c3e0aa..434fdc9f5d88 100644 --- a/i18npool/source/breakiterator/makefile.mk +++ b/i18npool/source/breakiterator/makefile.mk @@ -24,7 +24,7 @@ # for a copy of the LGPLv3 License. # #************************************************************************/ -PRJ=..$/.. +PRJ=../.. PRJNAME=i18npool TARGET=breakiterator @@ -41,28 +41,28 @@ ENABLE_EXCEPTIONS=TRUE MY_BRK_TXTFILES:=$(shell @ls data/*.txt) # insert "OpenOffice" as icu package name in front of the name of each rule file for searching on application provided data -MY_BRK_BRKFILES:=$(subst,data/,$(MISC)$/ $(MY_BRK_TXTFILES:s/.txt/.brk/)) +MY_BRK_BRKFILES:=$(subst,data/,$(MISC)/ $(MY_BRK_TXTFILES:s/.txt/.brk/)) # OpenOffice_dat.c is a generated file from the rule file list by gencmn MY_MISC_CXXFILES := \ - $(MISC)$/OpenOffice_dat.c \ + $(MISC)/OpenOffice_dat.c \ $(MY_BRK_BRKFILES:s/.brk/_brk.c/) SLOFILES= \ - $(SLO)$/breakiteratorImpl.obj \ - $(SLO)$/breakiterator_cjk.obj \ - $(SLO)$/breakiterator_ctl.obj \ - $(SLO)$/breakiterator_th.obj \ - $(SLO)$/breakiterator_unicode.obj \ - $(SLO)$/xdictionary.obj \ - $(subst,$(MISC)$/,$(SLO)$/ $(MY_MISC_CXXFILES:s/.c/.obj/)) + $(SLO)/breakiteratorImpl.obj \ + $(SLO)/breakiterator_cjk.obj \ + $(SLO)/breakiterator_ctl.obj \ + $(SLO)/breakiterator_th.obj \ + $(SLO)/breakiterator_unicode.obj \ + $(SLO)/xdictionary.obj \ + $(subst,$(MISC)/,$(SLO)/ $(MY_MISC_CXXFILES:s/.c/.obj/)) -OBJFILES = $(OBJ)$/gendict.obj +OBJFILES = $(OBJ)/gendict.obj APP1TARGET = gendict APP1RPATH = NONE -DEPOBJFILES = $(OBJ)$/gendict.obj +DEPOBJFILES = $(OBJ)/gendict.obj APP1OBJS = $(DEPOBJFILES) APP1STDLIBS = $(SALLIB) @@ -74,37 +74,36 @@ GENCMN:=$(SYSTEM_GENCMN) GENBRK:=$(SYSTEM_GENBRK) GENCCODE:=$(SYSTEM_GENCCODE) .ELSE -GENCMN:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/gencmn -GENBRK:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genbrk -GENCCODE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)$/genccode +GENCMN:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/gencmn +GENBRK:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/genbrk +GENCCODE:=$(AUGMENT_LIBRARY_PATH) $(SOLARBINDIR)/genccode .ENDIF .INCLUDE .IGNORE : icuversion.mk -$(MISC)$/%.txt : data/%.txt +.INCLUDE : target.mk + +$(MISC)/%.txt : data/%.txt # fdo#31271 ")" reclassified in more recent ICU/Unicode Standards .IF "$(ICU_MAJOR)" >= "5" || ("$(ICU_MAJOR)" == "4" && "$(ICU_MINOR)" >= "4") - $(SED) "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@ + $(SED) "s#\[:LineBreak = Close_Punctuation:\]#\[\[:LineBreak = Close_Punctuation:\] \[:LineBreak = Close_Parenthesis:\]\]#" $< > $@ .ELSE - $(COPY) $< $@ + $(COPY) $< $@ .ENDIF -$(MISC)$/%.brk : $(MISC)/%.txt - $(WRAPCMD) $(GENBRK) -r $< -o $(MISC)$/$*.brk +$(MISC)/%.brk : $(MISC)/%.txt + $(GENBRK) -r $< -o $(MISC)/$*.brk -$(MISC)$/%_brk.c : $(MISC)$/%.brk - $(WRAPCMD) $(GENCCODE) -n OpenOffice -d $(MISC)$ $(MISC)$/$*.brk +$(MISC)/%_brk.c : $(MISC)/%.brk + $(GENCCODE) -n OpenOffice -d $(MISC)$ $(MISC)/$*.brk # 'gencmn', 'genbrk' and 'genccode' are tools generated and delivered by icu project to process icu breakiterator rules. # The output of gencmn generates warnings under Windows. We want to minimize the patches to external tools, -# so the output (OpenOffice_icu_dat.c) is changed here to include a pragma to disable the warnings. +# so the output (OpenOffice_dat.c) is changed here to include a pragma to disable the warnings. # Output of gencmn is redirected to OpenOffice_icu_tmp.c with the -t switch. -$(MISC)$/OpenOffice_%.c : $(MY_BRK_BRKFILES:s/.brk/_brk.c/) - $(WRAPCMD) $(GENCMN) -n OpenOffice -t tmp -S -d $(MISC) O $(mktmp $(subst,$(MISC)$/, $(MY_BRK_BRKFILES:t"\n"))) - echo $(USQ)#ifdef _MSC_VER$(USQ) > $@ - echo $(USQ)#pragma warning( disable : 4229 4668 )$(USQ) >> $@ - echo $(USQ)#endif$(USQ) >> $@ - $(TYPE) $(@:s/_dat/_tmp/) >> $@ - -.INCLUDE : target.mk - +$(MISC)/OpenOffice_dat.c : $(MY_BRK_BRKFILES:s/.brk/_brk.c/) + $(GENCMN) -n OpenOffice -t tmp -S -d $(MISC) O $(mktmp $(subst,$(MISC)/, $(MY_BRK_BRKFILES:t"\n"))) + echo $(USQ)#ifdef _MSC_VER$(USQ) > $@ + echo $(USQ)#pragma warning( disable : 4229 4668 )$(USQ) >> $@ + echo $(USQ)#endif$(USQ) >> $@ + $(TYPE) $(@:s/_dat/_tmp/) >> $@ diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index aba69b5e9a21..0bff3d0b174c 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,7 +46,8 @@ // Construction/Destruction ////////////////////////////////////////////////////////////////////// -using namespace rtl; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { @@ -60,12 +62,6 @@ xdictionary::xdictionary(const sal_Char *lang) : hModule( NULL ), boundary(), japaneseWordBreak( sal_False ) -#if USE_CELL_BOUNDARY_CODE - // For CTL breakiterator, where the word boundary should not be inside cell. - , - useCellBoundary( sal_False ), - cellBoundary( NULL ) -#endif { index1 = 0; #ifdef SAL_DLLPREFIX @@ -78,15 +74,15 @@ xdictionary::xdictionary(const sal_Char *lang) : hModule = osl_loadModuleRelative( &thisModule, aBuf.makeStringAndClear().pData, SAL_LOADMODULE_DEFAULT ); if( hModule ) { sal_IntPtr (*func)(); - func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString::createFromAscii("getExistMark").pData ); + func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString(RTL_CONSTASCII_USTRINGPARAM("getExistMark")).pData ); existMark = (sal_uInt8*) (*func)(); - func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString::createFromAscii("getIndex1").pData ); + func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString(RTL_CONSTASCII_USTRINGPARAM("getIndex1")).pData ); index1 = (sal_Int16*) (*func)(); - func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString::createFromAscii("getIndex2").pData ); + func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString(RTL_CONSTASCII_USTRINGPARAM("getIndex2")).pData ); index2 = (sal_Int32*) (*func)(); - func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString::createFromAscii("getLenArray").pData ); + func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString(RTL_CONSTASCII_USTRINGPARAM("getLenArray")).pData ); lenArray = (sal_Int32*) (*func)(); - func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString::createFromAscii("getDataArea").pData ); + func = (sal_IntPtr(*)()) osl_getFunctionSymbol( hModule, OUString(RTL_CONSTASCII_USTRINGPARAM("getDataArea")).pData ); dataArea = (sal_Unicode*) (*func)(); } else @@ -101,10 +97,6 @@ xdictionary::xdictionary(const sal_Char *lang) : for (sal_Int32 i = 0; i < CACHE_MAX; i++) cache[i].size = 0; -#if USE_CELL_BOUNDARY_CODE - useCellBoundary = sal_False; - cellBoundary = NULL; -#endif japaneseWordBreak = sal_False; } @@ -112,8 +104,8 @@ xdictionary::~xdictionary() { osl_unloadModule(hModule); for (sal_Int32 i = 0; i < CACHE_MAX; i++) { if (cache[i].size > 0) { - delete cache[i].contents; - delete cache[i].wordboundary; + delete [] cache[i].contents; + delete [] cache[i].wordboundary; } } } @@ -241,86 +233,70 @@ static sal_Int16 JapaneseCharType(sal_Unicode c) WordBreakCache& xdictionary::getCache(const sal_Unicode *text, Boundary& wordBoundary) { + WordBreakCache& rCache = cache[text[0] & 0x1f]; - WordBreakCache& aCache = cache[text[0] & 0x1f]; - - if (aCache.size != 0 && aCache.equals(text, wordBoundary)) - return aCache; + if (rCache.size != 0 && rCache.equals(text, wordBoundary)) + return rCache; - sal_Int32 len = wordBoundary.endPos - wordBoundary.startPos; + sal_Int32 len = wordBoundary.endPos - wordBoundary.startPos; - if (aCache.size == 0 || len > aCache.size) { - if (aCache.size != 0) { - delete aCache.contents; - delete aCache.wordboundary; - aCache.size = len; - } - else - aCache.size = len > DEFAULT_SIZE ? len : DEFAULT_SIZE; - aCache.contents = new sal_Unicode[aCache.size + 1]; - aCache.wordboundary = new sal_Int32[aCache.size + 2]; + if (rCache.size == 0 || len > rCache.size) { + if (rCache.size != 0) { + delete rCache.contents; + delete rCache.wordboundary; + rCache.size = len; } - aCache.length = len; - memcpy(aCache.contents, text + wordBoundary.startPos, len * sizeof(sal_Unicode)); - *(aCache.contents + len) = 0x0000; - // reset the wordboundary in cache - memset(aCache.wordboundary, '\0', sizeof(sal_Int32)*(len + 2)); - - sal_Int32 i = 0; // loop variable - while (aCache.wordboundary[i] < aCache.length) { - len = 0; - // look the continuous white space as one word and cashe it - while (u_isWhitespace((sal_uInt32)text[wordBoundary.startPos + aCache.wordboundary[i] + len])) - len ++; - - if (len == 0) { - const sal_Unicode *str = text + wordBoundary.startPos + aCache.wordboundary[i]; - sal_Int32 slen = aCache.length - aCache.wordboundary[i]; - sal_Int16 type = 0, count = 0; - for (;len == 0 && slen > 0; str++, slen--) { - len = getLongestMatch(str, slen); - if (len == 0) { - if (!japaneseWordBreak) { - len = 1; - } else { - if (count == 0) - type = JapaneseCharType(*str); - else if (type != JapaneseCharType(*str)) - break; - count++; - } - } - } - if (count) { - aCache.wordboundary[i+1] = aCache.wordboundary[i] + count; - i++; - -#if USE_CELL_BOUNDARY_CODE - if (useCellBoundary) { - sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1]; - if (cBoundary > 0) - aCache.wordboundary[i] = cBoundary - wordBoundary.startPos; + else + rCache.size = len > DEFAULT_SIZE ? len : DEFAULT_SIZE; + rCache.contents = new sal_Unicode[rCache.size + 1]; + rCache.wordboundary = new sal_Int32[rCache.size + 2]; + } + rCache.length = len; + memcpy(rCache.contents, text + wordBoundary.startPos, len * sizeof(sal_Unicode)); + *(rCache.contents + len) = 0x0000; + // reset the wordboundary in cache + memset(rCache.wordboundary, '\0', sizeof(sal_Int32)*(len + 2)); + + sal_Int32 i = 0; // loop variable + while (rCache.wordboundary[i] < rCache.length) { + len = 0; + // look the continuous white space as one word and cashe it + while (u_isWhitespace((sal_uInt32)text[wordBoundary.startPos + rCache.wordboundary[i] + len])) + len ++; + + if (len == 0) { + const sal_Unicode *str = text + wordBoundary.startPos + rCache.wordboundary[i]; + sal_Int32 slen = rCache.length - rCache.wordboundary[i]; + sal_Int16 type = 0, count = 0; + for (;len == 0 && slen > 0; str++, slen--) { + len = getLongestMatch(str, slen); + if (len == 0) { + if (!japaneseWordBreak) { + len = 1; + } else { + if (count == 0) + type = JapaneseCharType(*str); + else if (type != JapaneseCharType(*str)) + break; + count++; } -#endif } } - - if (len) { - aCache.wordboundary[i+1] = aCache.wordboundary[i] + len; + if (count) + { + rCache.wordboundary[i+1] = rCache.wordboundary[i] + count; i++; - -#if USE_CELL_BOUNDARY_CODE - if (useCellBoundary) { - sal_Int32 cBoundary = cellBoundary[aCache.wordboundary[i] + wordBoundary.startPos - 1]; - if (cBoundary > 0) - aCache.wordboundary[i] = cBoundary - wordBoundary.startPos; - } -#endif } } - aCache.wordboundary[i + 1] = aCache.length + 1; - return aCache; + if (len) { + rCache.wordboundary[i+1] = rCache.wordboundary[i] + len; + i++; + } + } + rCache.wordboundary[i + 1] = rCache.length + 1; + + return rCache; } Boundary xdictionary::previousWord(const OUString& rText, sal_Int32 anyPos, sal_Int16 wordType) @@ -391,12 +367,6 @@ Boundary xdictionary::getWordBoundary(const OUString& rText, sal_Int32 anyPos, s return boundary; } -#if USE_CELL_BOUNDARY_CODE -void xdictionary::setCellBoundary(sal_Int32* cellArray) -{ - useCellBoundary = sal_True; - cellBoundary = cellArray; -} -#endif - } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index 2d09d047c7cb..787f0ae150cc 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,8 +35,9 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::i18n; -using namespace ::rtl; +using ::rtl::OUString; + +namespace com { namespace sun { namespace star { namespace i18n { #define ERROR RuntimeException() @@ -81,7 +83,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr if (i >= sal::static_int_cast<sal_Int32>(lookupTable.size())) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.Calendar_") + uniqueID); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Calendar_")) + uniqueID); if ( ! xI.is() ) { // check if the calendar is defined in localedata, load gregorian calendar service. @@ -89,7 +91,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr for (i = 0; i < xC.getLength(); i++) { if (uniqueID == xC[i].Name) { xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.Calendar_gregorian")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Calendar_gregorian"))); break; } } @@ -303,7 +305,7 @@ CalendarImpl::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativ OUString SAL_CALL CalendarImpl::getImplementationName(void) throw( RuntimeException ) { - return OUString::createFromAscii("com.sun.star.i18n.CalendarImpl"); + return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CalendarImpl")); } const sal_Char cCalendar[] = "com.sun.star.i18n.LocaleCalendar"; @@ -322,3 +324,6 @@ CalendarImpl::getSupportedServiceNames(void) throw( RuntimeException ) return aRet; } +}}}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 0ba91c0587d8..5cd86d7857db 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,8 +129,9 @@ static void debug_i18n_cal_dump( const ::icu::Calendar & r ) using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::i18n; -using namespace ::rtl; +using ::rtl::OUString; + +namespace com { namespace sun { namespace star { namespace i18n { #define ERROR RuntimeException() @@ -170,17 +172,6 @@ Calendar_gregorian::init(Era *_eraArray) UErrorCode status; body = icu::Calendar::createInstance( aIcuLocale, status = U_ZERO_ERROR); if (!body || !U_SUCCESS(status)) throw ERROR; - -#if 0 - { - icu::Locale loc; - loc = body->getLocale( ULOC_ACTUAL_LOCALE, status = U_ZERO_ERROR); - fprintf( stderr, "\nICU calendar actual locale: %s\n", loc.getName()); - loc = body->getLocale( ULOC_VALID_LOCALE, status = U_ZERO_ERROR); - fprintf( stderr, "ICU calendar valid locale: %s\n", loc.getName()); - } -#endif - eraArray=_eraArray; } @@ -200,7 +191,7 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 if ( displayIndex == CalendarDisplayIndex::AM_PM ) { // Am/Pm string for Korean Hanja calendar will refer to Japanese locale com::sun::star::lang::Locale jaLocale = - com::sun::star::lang::Locale(OUString::createFromAscii("ja"), OUString(), OUString()); + com::sun::star::lang::Locale(OUString(RTL_CONSTASCII_USTRINGPARAM("ja")), OUString(), OUString()); if (idx == 0) return LocaleData().getLocaleItem(jaLocale).timeAM; else if (idx == 1) return LocaleData().getLocaleItem(jaLocale).timePM; else throw ERROR; @@ -214,7 +205,7 @@ Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const com::sun::star { // Since this class could be called by service name 'hanja_yoil', we have to // rename uniqueID to get right calendar defined in locale data. - Calendar_gregorian::loadCalendar(OUString::createFromAscii("hanja"), rLocale); + Calendar_gregorian::loadCalendar(OUString(RTL_CONSTASCII_USTRINGPARAM("hanja")), rLocale); } static Era gengou_eraArray[] = { @@ -805,9 +796,9 @@ static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR) && value >= 100) || nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER || nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER; - sal_Bool isChinese = aLocale.Language.equalsAscii("zh"); - sal_Bool isJapanese = aLocale.Language.equalsAscii("ja"); - sal_Bool isKorean = aLocale.Language.equalsAscii("ko"); + sal_Bool isChinese = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")); + sal_Bool isJapanese = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")); + sal_Bool isKorean = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")); if (isChinese || isJapanese || isKorean) { switch (nNativeNumberMode) { @@ -993,7 +984,7 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 sprintf(aStr, "%d", value); // #100211# - checked break; case CalendarDisplayCode::LONG_YEAR: - if (aCalendar.Name.equalsAscii("gengou")) + if (aCalendar.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gengou"))) sprintf(aStr, "%02d", value); // #100211# - checked else sprintf(aStr, "%d", value); // #100211# - checked @@ -1098,3 +1089,6 @@ Calendar_gregorian::getSupportedServiceNames(void) throw( RuntimeException ) return aRet; } +}}}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index dcf651098574..ec0e86baf24e 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,13 +36,13 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::i18n; -using namespace ::rtl; #define ERROR RuntimeException() #define GREGORIAN_CROSSOVER 2299161 +namespace com { namespace sun { namespace star { namespace i18n { + // not used //static UErrorCode status; // status is shared in all calls to Calendar, it has to be reset for each call. @@ -268,12 +269,11 @@ Calendar_hijri::getGregorianDay(sal_Int32 lJulianDay, sal_Int32 *pnDay, sal_Int3 { /* working variables */ long lFactorA, lFactorB, lFactorC, lFactorD, lFactorE; - long lAdjust; /* test whether to adjust for the Gregorian calendar crossover */ if (lJulianDay >= GREGORIAN_CROSSOVER) { /* calculate a small adjustment */ - lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25); + long lAdjust = (long) (((float) (lJulianDay - 1867216) - 0.25) / 36524.25); lFactorA = lJulianDay + 1 + lAdjust - ((long) (0.25 * lAdjust)); @@ -339,3 +339,7 @@ Calendar_hijri::getJulianDay(sal_Int32 day, sal_Int32 month, sal_Int32 year) return (double) intgr; } + +}}}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx index 34ad13f1d384..24011d10a779 100644 --- a/i18npool/source/calendar/calendar_jewish.cxx +++ b/i18npool/source/calendar/calendar_jewish.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,11 +36,12 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::i18n; -using namespace ::rtl; +using ::rtl::OUString; #define ERROR RuntimeException() +namespace com { namespace sun { namespace star { namespace i18n { + // not used //static UErrorCode status; // status is shared in all calls to Calendar, it has to be reset for each call. @@ -191,9 +193,9 @@ public: + HebrewEpoch)); // Days elapsed before absolute date 1. } - sal_Int32 GetMonth() { return month; } - sal_Int32 GetDay() { return day; } - sal_Int32 GetYear() { return year; } + sal_Int32 GetMonth() const { return month; } + sal_Int32 GetDay() const { return day; } + sal_Int32 GetYear() const { return year; } }; @@ -250,9 +252,9 @@ public: + (year - 1)/400); // ...plus prior years divisible by 400 } - int GetMonth() { return month; } - int GetDay() { return day; } - int GetYear() { return year; } + int GetMonth() const { return month; } + int GetDay() const { return day; } + int GetYear() const { return year; } }; @@ -304,3 +306,7 @@ Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNa else return Calendar_gregorian::getDisplayString(nCalendarDisplayCode, nNativeNumberMode ); } + +}}}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 045512e61258..2db8575785f1 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -286,3 +287,4 @@ Sequence< OUString > SAL_CALL cclass_Unicode::getSupportedServiceNames() throw( } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 2abd7eb90539..616943bf9009 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1065,3 +1066,5 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx index 5665bf654194..59b051b190ee 100644 --- a/i18npool/source/characterclassification/characterclassificationImpl.cxx +++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,14 +34,16 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { CharacterClassificationImpl::CharacterClassificationImpl( const Reference < lang::XMultiServiceFactory >& rxMSF ) : xMSF( rxMSF ) { - if (createLocaleSpecificCharacterClassification(OUString::createFromAscii("Unicode"), Locale())) + if (createLocaleSpecificCharacterClassification(OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode")), Locale())) xUCI = cachedItem->xCI; } @@ -149,7 +152,7 @@ sal_Bool SAL_CALL CharacterClassificationImpl::createLocaleSpecificCharacterClas } Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.CharacterClassification_") + serviceName); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CharacterClassification_")) + serviceName); Reference < XCharacterClassification > xCI; if ( xI.is() ) { @@ -177,7 +180,7 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca } static sal_Unicode under = (sal_Unicode)'_'; - static OUString tw(OUString::createFromAscii("TW")); + static OUString tw(RTL_CONSTASCII_USTRINGPARAM("TW")); sal_Int32 l = rLocale.Language.getLength(); sal_Int32 c = rLocale.Country.getLength(); sal_Int32 v = rLocale.Variant.getLength(); @@ -202,7 +205,7 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca createLocaleSpecificCharacterClassification(rLocale.Language, rLocale))) { return cachedItem->xCI; } else if (xUCI.is()) { - lookupTable.push_back( cachedItem = new lookupTableItem(rLocale, OUString::createFromAscii("Unicode"), xUCI) ); + lookupTable.push_back( cachedItem = new lookupTableItem(rLocale, OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode")), xUCI) ); return cachedItem->xCI; } } @@ -234,3 +237,5 @@ CharacterClassificationImpl::getSupportedServiceNames(void) throw( RuntimeExcept } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/characterclassification/scripttypedetector.cxx b/i18npool/source/characterclassification/scripttypedetector.cxx index cb90e99075e1..1248635b68c2 100644 --- a/i18npool/source/characterclassification/scripttypedetector.cxx +++ b/i18npool/source/characterclassification/scripttypedetector.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -180,3 +181,4 @@ ScriptTypeDetector::getSupportedServiceNames() throw( ::com::sun::star::uno::Run return aRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index 946053c1adee..ed9fc1585bd6 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,7 +45,7 @@ ChapterCollator::ChapterCollator( const Reference < XMultiServiceFactory >& rxMS { if ( rxMSF.is()) { Reference < XInterface > xI = - rxMSF->createInstance( OUString::createFromAscii("com.sun.star.i18n.CharacterClassification")); + rxMSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CharacterClassification"))); if ( xI.is() ) xI->queryInterface(::getCppuType((const Reference< XCharacterClassification>*)0)) >>= cclass; } @@ -77,9 +78,9 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int if( ans != 0 ) return ans; - const OUString &aAddAllowed = OUString::createFromAscii("?"); + const OUString aAddAllowed(RTL_CONSTASCII_USTRINGPARAM("?")); ParseResult res1, res2; - // Bug #100323#, since parseAnyToken does not take length as parameter, we have to copy + // since parseAnyToken does not take length as parameter, we have to copy // it to a temp. string. OUString s1 = str1.copy(off1+i1, len1-i1), s2 = str2.copy(off2+i2, len2-i2); res1 = cclass->parseAnyToken( s1, 0, nLocale, DIGIT, aAddAllowed, DIGIT, aAddAllowed ); @@ -109,3 +110,5 @@ ChapterCollator::getSupportedServiceNames() throw( RuntimeException ) aRet[0] = OUString::createFromAscii(cChapCollator); return aRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index bdd28a255d07..e14587cf19e0 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,9 @@ using namespace com::sun::star; using namespace com::sun::star::lang; using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { @@ -43,7 +46,7 @@ CollatorImpl::CollatorImpl( const Reference < XMultiServiceFactory >& rxMSF ) : { if ( rxMSF.is()) { Reference < XInterface > xI = - xMSF->createInstance( OUString::createFromAscii("com.sun.star.i18n.LocaleData")); + xMSF->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.LocaleData"))); if ( xI.is() ) xI->queryInterface(::getCppuType((const Reference< XLocaleData>*)0)) >>= localedata; } @@ -147,9 +150,9 @@ CollatorImpl::listCollatorOptions( const OUString& /*collatorAlgorithmName*/ ) t for (sal_Int32 i = 0; i < option_str.getLength(); i++) option_int[i] = - option_str[i].equalsAscii("IGNORE_CASE") ? CollatorOptions::CollatorOptions_IGNORE_CASE : - option_str[i].equalsAscii("IGNORE_KANA") ? CollatorOptions::CollatorOptions_IGNORE_KANA : - option_str[i].equalsAscii("IGNORE_WIDTH") ? CollatorOptions::CollatorOptions_IGNORE_WIDTH : 0; + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_CASE")) ? CollatorOptions::CollatorOptions_IGNORE_CASE : + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_KANA")) ? CollatorOptions::CollatorOptions_IGNORE_KANA : + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_WIDTH")) ? CollatorOptions::CollatorOptions_IGNORE_WIDTH : 0; return option_int; } @@ -167,7 +170,7 @@ CollatorImpl::createCollator(const lang::Locale& rLocale, const OUString& servic } if (xMSF.is()) { Reference < XInterface > xI = - xMSF->createInstance(OUString::createFromAscii("com.sun.star.i18n.Collator_") + serviceName); + xMSF->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator_")) + serviceName); if (xI.is()) { Reference < XCollator > xC; @@ -194,8 +197,8 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS } static sal_Unicode under = (sal_Unicode) '_'; - static OUString tw(OUString::createFromAscii("TW")); - static OUString unicode(OUString::createFromAscii("Unicode")); + static OUString tw(RTL_CONSTASCII_USTRINGPARAM("TW")); + static OUString unicode(RTL_CONSTASCII_USTRINGPARAM("Unicode")); sal_Int32 l = rLocale.Language.getLength(); sal_Int32 c = rLocale.Country.getLength(); @@ -212,9 +215,9 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS // load service with name <base>_<lang>_<country>_<algorithm> createCollator(rLocale, aBuf.append(rLocale.Language).append(under).append(rLocale.Country).append( under).append(rSortAlgorithm).makeStringAndClear(), rSortAlgorithm)) || - (l > 0 && c > 0 && a > 0 && rLocale.Language.equalsAscii("zh") && - (rLocale.Country.equalsAscii("HK") || - rLocale.Country.equalsAscii("MO")) && + (l > 0 && c > 0 && a > 0 && rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && + (rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HK")) || + rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MO"))) && // if the country code is HK or MO, one more step to try TW. createCollator(rLocale, aBuf.append(rLocale.Language).append(under).append(tw).append(under).append( rSortAlgorithm).makeStringAndClear(), rSortAlgorithm)) || @@ -258,3 +261,5 @@ CollatorImpl::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 2494829968d6..cc87d9ad677e 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -94,19 +95,19 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: if (hModule) { const sal_uInt8* (*func)() = NULL; aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_"); - if (rLocale.Language.equalsAscii("zh")) { + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) { OUString func_base = aBuf.makeStringAndClear(); - if (OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0) + if (OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, - (func_base + OUString::createFromAscii("TW_") + rAlgorithm).pData); + (func_base + OUString(RTL_CONSTASCII_USTRINGPARAM("TW_")) + rAlgorithm).pData); if (!func) func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, (func_base + rAlgorithm).pData); } else { - if (rLocale.Language.equalsAscii("ja")) { + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja"))) { // replace algrithm name to implementation name. - if (rAlgorithm.equalsAscii("phonetic (alphanumeric first)") ) + if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric first)")) ) aBuf.appendAscii("phonetic_alphanumeric_first"); - else if (rAlgorithm.equalsAscii("phonetic (alphanumeric last)")) + else if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric last)"))) aBuf.appendAscii("phonetic_alphanumeric_last"); else aBuf.append(rAlgorithm); @@ -174,3 +175,4 @@ Collator_Unicode::getSupportedServiceNames() throw( RuntimeException ) } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/collator/data/ca_charset.txt b/i18npool/source/collator/data/ca_charset.txt new file mode 100755 index 000000000000..1cd90a1ae5e6 --- /dev/null +++ b/i18npool/source/collator/data/ca_charset.txt @@ -0,0 +1,4 @@ +# +# Collation of Catalan letters +# +& L << ŀ = l· <<< Ŀ = L· diff --git a/i18npool/source/collator/data/collator_data.map b/i18npool/source/collator/data/collator_data.map index 412635f19eed..86b874ee09bb 100644 --- a/i18npool/source/collator/data/collator_data.map +++ b/i18npool/source/collator/data/collator_data.map @@ -19,6 +19,7 @@ global: get_hu_charset; get_ln_charset; get_my_dictionary; + get_ca_charset; local: *; diff --git a/i18npool/source/collator/data/makefile.mk b/i18npool/source/collator/data/makefile.mk index 2dd7623bd38d..59eb1a55f807 100644 --- a/i18npool/source/collator/data/makefile.mk +++ b/i18npool/source/collator/data/makefile.mk @@ -57,7 +57,7 @@ SHL1OBJS=$(SLOFILES) .INCLUDE : target.mk $(MISC)$/collator_%.cxx : %.txt - $(AUGMENT_LIBRARY_PATH) $(BIN)$/gencoll_rule $< $@ $* + $(AUGMENT_LIBRARY_PATH) $(OUT_FOR_BUILD)$/bin$/gencoll_rule $< $@ $* # ugly - is this dependency really required here? $(foreach,i,$(shell @$(FIND) . -name "*.txt") $(MISC)$/dict_$(i:b).cxx) : $(BIN)$/gencoll_rule$(EXECPOST) diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx index 09c1da0729ec..c678230b0f1d 100644 --- a/i18npool/source/collator/gencoll_rule.cxx +++ b/i18npool/source/collator/gencoll_rule.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -138,3 +139,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return U_SUCCESS(status) ? 0 : 1; } // End of main + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 751116160ebe..c152ea8547c8 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,15 @@ #define S_CYR_A "\xD0\xB0" #define S_CYR_B "\xD0\xB1" +//Greek upper case +#define C_GR_A "\xCE\x91" +#define C_GR_B "\xCE\x92" +//Greek lower case +#define S_GR_A "\xCE\xB1" +#define S_GR_B "\xCE\xB2" + #include <math.h> +#include <sal/macros.h> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/i18n/XTransliteration.hpp> @@ -168,6 +177,18 @@ static sal_Unicode table_CyrillicLowerLetter_sr[] = { 0x0444, 0x0445, 0x0446, 0x0447, 0x045F, 0x0448 }; +static sal_Unicode table_GreekUpperLetter[] = { + 0x0391, 0x0392, 0x0393, 0x0394, 0x0395, 0x03DB, 0x0396, 0x0397, 0x0398, + 0x0399, 0x039A, 0x039B, 0x039C, 0x039D, 0x039E, 0x039F, 0x03A0, 0x03DF, + 0x03A1, 0x03A3, 0x03A4, 0x03A5, 0x03A6, 0x03A7, 0x03A8, 0x03A9, 0x03E0 +}; + +static sal_Unicode table_GreekLowerLetter[] = { + 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03DB, 0x03B6, 0x03B7, 0x03B8, + 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, 0x03DF, + 0x03C1, 0x03C3, 0x03C4, 0x03C5, 0x03C6, 0x03C7, 0x03C8, 0x03C9, 0x03E1 +}; + static sal_Unicode table_Alphabet_fa[] = { 0x0622, 0x0628, 0x067E, 0x062A, 0x062B, 0x062C, 0x0686, 0x062D, 0x062E, 0x062F, 0x0630, 0x0631, 0x0632, 0x0698, 0x0633, 0x0634, @@ -259,35 +280,6 @@ OUString toRoman( sal_Int32 n ) } // not used: -#if 0 - -static -const char* expected_name( int i, int last ) -{ - if(0); - else if( i==0 ) return "Prefix"; - else if( i==1 ) return "NumberingType"; - else if( i==2 ) return "Suffix"; - else if( i==last ) return "Value"; - else { OSL_ASSERT(0); return ""; } -} -static -const char* expected_type( int i, int last ) -{ - if(0); - else if( i==0 ) return "OUString"; - else if( i==1 ) return "sal_Int16"; - else if( i==2 ) return "OUString"; - else if( i==last ) return "sal_Int32"; - else { OSL_ASSERT(0); return ""; } -} -static -void failedToConvert( int i, int last ) -{ - throw IllegalArgumentException(); -} - -#endif static void lcl_formatChars( sal_Unicode table[], int tableSize, int n, OUString& s ) @@ -341,6 +333,82 @@ void lcl_formatChars3( sal_Unicode table_capital[], sal_Unicode table_small[], i s += OUString::valueOf( table_small[ n%tableSize ] ); } +// Greek Letter Numbering + +// KERAIA separates numerals from other text +#define STIGMA (sal_Unicode) 0x03DB +#define LEFT_KERAIA (sal_Unicode) 0x0375 +#define MYRIAD_SYM (sal_Unicode) 0x039C +#define DOT_SYM (sal_Unicode) 0x002E +#define SIGMA_OFFSET 19 +#define TAU_OFFSET 20 +#define MYRIAD 10000 + +/* +* Return the 1-999999 number's representation in the Greek numbering system. +* Adding a "left keraia" to represent numbers in the range 10000 ... 999999 is +* not orthodox, so it's better to use the myriad notation and call this method +* only for numbers up to 9999. +*/ +static +OUStringBuffer gr_smallNum(sal_Unicode table[], int n) +{ + if (n > 9999) + throw IllegalArgumentException(); + + int i = 0; + OUStringBuffer sb; + for (int v = n; v > 0; v /= 10, i++) { + int digit = v % 10; + if (digit == 0) + continue; + + sal_Unicode sign = table[(digit - 1) + 9 * (i % 3)]; + if (sign == STIGMA) { + sb.insert(0, table[TAU_OFFSET]); + sb.insert(0, table[SIGMA_OFFSET]); + } else { + sb.insert(0, sign); + } + + if (i > 2) + sb.insert(0, LEFT_KERAIA); + } + + return sb; +} + +static +void lcl_formatCharsGR( sal_Unicode table[], int n, OUString& s ) +{ + OUStringBuffer sb; + int myriadPower = 2; + + for (int divisor = MYRIAD * MYRIAD; divisor > 1; divisor /= MYRIAD, myriadPower--) { + if (n > divisor - 1) { + /* + * Follow the Diophantus representation of: + * A myriad sign, M(10000) as many times as the power + * followed by the multiplier for the myriad + * followed by a dot + * followed by the rest + * This is enough for 32-bit integers + */ + for (int i = 0; i < myriadPower; i++) + sb.append(MYRIAD_SYM); + + sb.append(gr_smallNum(table, n/divisor)); + n %= divisor; + + if (n > 0) + sb.append(DOT_SYM); + } + } + sb.append(gr_smallNum(table,n)); + + s += sb.makeStringAndClear(); +} + static int should_ignore( OUString s ) { @@ -447,10 +515,10 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal result += OUString::valueOf( number ); break; case NUMBER_NONE: - return OUString::createFromAscii(""); // ignore prefix and suffix + return OUString(RTL_CONSTASCII_USTRINGPARAM("")); // ignore prefix and suffix case CHAR_SPECIAL: // apparently, we're supposed to return an empty string in this case... - return OUString::createFromAscii(""); // ignore prefix and suffix + return OUString(RTL_CONSTASCII_USTRINGPARAM("")); // ignore prefix and suffix case PAGE_DESCRIPTOR: case BITMAP: OSL_ASSERT(0); @@ -486,25 +554,25 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal break; case NUMBER_LOWER_ZH: natNum = NativeNumberMode::NATNUM7; - locale.Language = OUString::createFromAscii("zh"); + locale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("zh")); break; case NUMBER_UPPER_ZH_TW: - locale.Country = OUString::createFromAscii("TW"); + locale.Country = OUString(RTL_CONSTASCII_USTRINGPARAM("TW")); case NUMBER_UPPER_ZH: natNum = NativeNumberMode::NATNUM8; - locale.Language = OUString::createFromAscii("zh"); + locale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("zh")); break; case NUMBER_TRADITIONAL_JA: natNum = NativeNumberMode::NATNUM8; - locale.Language = OUString::createFromAscii("ja"); + locale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("ja")); break; case NUMBER_UPPER_KO: natNum = NativeNumberMode::NATNUM8; - locale.Language = OUString::createFromAscii("ko"); + locale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("ko")); break; case NUMBER_HANGUL_KO: natNum = NativeNumberMode::NATNUM11; - locale.Language = OUString::createFromAscii("ko"); + locale.Language = OUString(RTL_CONSTASCII_USTRINGPARAM("ko")); break; case CIRCLE_NUMBER: @@ -586,81 +654,78 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal case CHARS_CYRILLIC_UPPER_LETTER_BG: lcl_formatChars2( table_CyrillicUpperLetter_bg, table_CyrillicLowerLetter_bg, - sizeof(table_CyrillicLowerLetter_bg) / - sizeof(table_CyrillicLowerLetter_bg[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_bg), number-1, result); // 1=>a, 2=>b, ..., 28=>z, 29=>Aa, 30=>Ab, ... break; case CHARS_CYRILLIC_LOWER_LETTER_BG: lcl_formatChars( table_CyrillicLowerLetter_bg, - sizeof(table_CyrillicLowerLetter_bg) / - sizeof(table_CyrillicLowerLetter_bg[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_bg), number-1, result); // 1=>a, 2=>b, ..., 28=>z, 29=>aa, 30=>ab, ... break; case CHARS_CYRILLIC_UPPER_LETTER_N_BG: lcl_formatChars3( table_CyrillicUpperLetter_bg, table_CyrillicLowerLetter_bg, - sizeof(table_CyrillicLowerLetter_bg) / - sizeof(table_CyrillicLowerLetter_bg[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_bg), number-1, result); // 1=>a, 2=>b, ..., 28=>z, 29=>Aa, 30=>Bb, ... break; case CHARS_CYRILLIC_LOWER_LETTER_N_BG: lcl_formatChars1( table_CyrillicLowerLetter_bg, - sizeof(table_CyrillicLowerLetter_bg) / - sizeof(table_CyrillicLowerLetter_bg[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_bg), number-1, result); // 1=>a, 2=>b, ..., 28=>z, 29=>aa, 30=>bb, ... break; case CHARS_CYRILLIC_UPPER_LETTER_RU: lcl_formatChars2( table_CyrillicUpperLetter_ru, table_CyrillicLowerLetter_ru, - sizeof(table_CyrillicLowerLetter_ru) / - sizeof(table_CyrillicLowerLetter_ru[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_ru), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Ab, ... break; case CHARS_CYRILLIC_LOWER_LETTER_RU: lcl_formatChars( table_CyrillicLowerLetter_ru, - sizeof(table_CyrillicLowerLetter_ru) / - sizeof(table_CyrillicLowerLetter_ru[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_ru), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>ab, ... break; case CHARS_CYRILLIC_UPPER_LETTER_N_RU: lcl_formatChars3( table_CyrillicUpperLetter_ru, table_CyrillicLowerLetter_ru, - sizeof(table_CyrillicLowerLetter_ru) / - sizeof(table_CyrillicLowerLetter_ru[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_ru), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Bb, ... break; case CHARS_CYRILLIC_LOWER_LETTER_N_RU: lcl_formatChars1( table_CyrillicLowerLetter_ru, - sizeof(table_CyrillicLowerLetter_ru) / - sizeof(table_CyrillicLowerLetter_ru[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_ru), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>bb, ... break; case CHARS_CYRILLIC_UPPER_LETTER_SR: lcl_formatChars2( table_CyrillicUpperLetter_sr, table_CyrillicLowerLetter_sr, - sizeof(table_CyrillicLowerLetter_sr) / - sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_sr), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Ab, ... break; case CHARS_CYRILLIC_LOWER_LETTER_SR: lcl_formatChars( table_CyrillicLowerLetter_sr, - sizeof(table_CyrillicLowerLetter_sr) / - sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_sr), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>ab, ... break; case CHARS_CYRILLIC_UPPER_LETTER_N_SR: lcl_formatChars3( table_CyrillicUpperLetter_sr, table_CyrillicLowerLetter_sr, - sizeof(table_CyrillicLowerLetter_sr) / - sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_sr), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>Aa, 29=>Bb, ... break; case CHARS_CYRILLIC_LOWER_LETTER_N_SR: lcl_formatChars1( table_CyrillicLowerLetter_sr, - sizeof(table_CyrillicLowerLetter_sr) / - sizeof(table_CyrillicLowerLetter_sr[0]), number-1, + SAL_N_ELEMENTS(table_CyrillicLowerLetter_sr), number-1, result); // 1=>a, 2=>b, ..., 27=>z, 28=>aa, 29=>bb, ... break; + + case CHARS_GREEK_LOWER_LETTER: + lcl_formatCharsGR( table_GreekLowerLetter, number, result); + break; + + case CHARS_GREEK_UPPER_LETTER: + lcl_formatCharsGR( table_GreekUpperLetter, number, result); + break; + case CHARS_PERSIAN: lcl_formatChars(table_Alphabet_fa, sizeof(table_Alphabet_fa) / sizeof(sal_Unicode), number - 1, result); break; @@ -685,9 +750,6 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal return result; } -/* -----------------------------21.02.01 15:57-------------------------------- - - ---------------------------------------------------------------------------*/ #define LANG_ALL (1 << 0) #define LANG_CJK (1 << 1) @@ -752,11 +814,10 @@ static const Supported_NumberingType aSupportedTypes[] = {style::NumberingType::CHARS_CYRILLIC_UPPER_LETTER_N_SR, C_CYR_A ", " C_CYR_B ", .., " C_CYR_A S_CYR_A ", " C_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, {style::NumberingType::CHARS_CYRILLIC_LOWER_LETTER_N_SR, S_CYR_A ", " S_CYR_B ", .., " S_CYR_A S_CYR_A ", " S_CYR_B S_CYR_B ", ... (sr)", LANG_ALL}, {style::NumberingType::CHARS_PERSIAN, NULL, LANG_CTL}, + {style::NumberingType::CHARS_GREEK_LOWER_LETTER, C_GR_A ", " C_GR_B ", ... (gr)", LANG_ALL}, + {style::NumberingType::CHARS_GREEK_UPPER_LETTER, S_GR_A ", " S_GR_B ", ... (gr)", LANG_ALL}, }; static const sal_Int32 nSupported_NumberingTypes = sizeof(aSupportedTypes) / sizeof(Supported_NumberingType); -/* -----------------------------21.02.01 15:57-------------------------------- - - ---------------------------------------------------------------------------*/ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) throw(RuntimeException) @@ -766,17 +827,17 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index) // return OUString::createFromAscii(aSupportedTypes[index].cSymbol); else { OUString result; - Locale aLocale(OUString::createFromAscii("en"), OUString(), OUString()); + Locale aLocale(OUString(RTL_CONSTASCII_USTRINGPARAM("en")), OUString(), OUString()); Sequence<beans::PropertyValue> aProperties(2); - aProperties[0].Name = OUString::createFromAscii("NumberingType"); + aProperties[0].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("NumberingType")); aProperties[0].Value <<= aSupportedTypes[index].nType; - aProperties[1].Name = OUString::createFromAscii("Value"); + aProperties[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Value")); for (sal_Int32 j = 1; j <= 3; j++) { aProperties[1].Value <<= j; result += makeNumberingString( aProperties, aLocale ); - result += OUString::createFromAscii(", "); + result += OUString(RTL_CONSTASCII_USTRINGPARAM(", ")); } - result += OUString::createFromAscii("..."); + result += OUString(RTL_CONSTASCII_USTRINGPARAM("...")); return result; } } @@ -787,7 +848,7 @@ DefaultNumberingProvider::isScriptFlagEnabled(const OUString& aName) throw(Runti if (! xHierarchicalNameAccess.is()) { Reference< XInterface > xInterface; - xInterface = xSMgr->createInstance(OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")); + xInterface = xSMgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))); Reference< XMultiServiceFactory > xConfigProvider = Reference< XMultiServiceFactory >(xInterface, UNO_QUERY ); @@ -796,12 +857,12 @@ DefaultNumberingProvider::isScriptFlagEnabled(const OUString& aName) throw(Runti Sequence< Any > aArgs(1); beans::PropertyValue aPath; - aPath.Name = OUString::createFromAscii("nodepath"); - aPath.Value <<= OUString::createFromAscii("/org.openoffice.Office.Common/I18N"), + aPath.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")); + aPath.Value <<= OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/I18N")), aArgs[0] <<= aPath; xInterface = xConfigProvider->createInstanceWithArguments( - OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess"), aArgs); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), aArgs); xHierarchicalNameAccess.set(xInterface, UNO_QUERY); @@ -824,8 +885,8 @@ Sequence< sal_Int16 > DefaultNumberingProvider::getSupportedNumberingTypes( ) Sequence< sal_Int16 > aRet(nSupported_NumberingTypes ); sal_Int16* pArray = aRet.getArray(); - sal_Bool cjkEnabled = isScriptFlagEnabled(OUString::createFromAscii("CJK/CJKFont")); - sal_Bool ctlEnabled = isScriptFlagEnabled(OUString::createFromAscii("CTL/CTLFont")); + sal_Bool cjkEnabled = isScriptFlagEnabled(OUString(RTL_CONSTASCII_USTRINGPARAM("CJK/CJKFont"))); + sal_Bool ctlEnabled = isScriptFlagEnabled(OUString(RTL_CONSTASCII_USTRINGPARAM("CTL/CTLFont"))); for(sal_Int16 i = 0; i < nSupported_NumberingTypes; i++) { if ( (aSupportedTypes[i].langOption & LANG_ALL) || @@ -835,9 +896,7 @@ Sequence< sal_Int16 > DefaultNumberingProvider::getSupportedNumberingTypes( ) } return aRet; } -/* -----------------------------21.02.01 15:57-------------------------------- - ---------------------------------------------------------------------------*/ sal_Int16 DefaultNumberingProvider::getNumberingType( const OUString& rNumberingIdentifier ) throw(RuntimeException) { @@ -846,9 +905,7 @@ sal_Int16 DefaultNumberingProvider::getNumberingType( const OUString& rNumbering return aSupportedTypes[i].nType; throw RuntimeException(); } -/* -----------------------------21.02.01 15:57-------------------------------- - ---------------------------------------------------------------------------*/ sal_Bool DefaultNumberingProvider::hasNumberingType( const OUString& rNumberingIdentifier ) throw(RuntimeException) { @@ -857,9 +914,7 @@ sal_Bool DefaultNumberingProvider::hasNumberingType( const OUString& rNumberingI return sal_True; return sal_False; } -/* -----------------------------21.02.01 15:57-------------------------------- - ---------------------------------------------------------------------------*/ OUString DefaultNumberingProvider::getNumberingIdentifier( sal_Int16 nNumberingType ) throw(RuntimeException) { @@ -868,26 +923,20 @@ OUString DefaultNumberingProvider::getNumberingIdentifier( sal_Int16 nNumberingT return makeNumberingIdentifier(i); return OUString(); } -/* -----------------------------05.07.01 13:34-------------------------------- - ---------------------------------------------------------------------------*/ const sal_Char cDefaultNumberingProvider[] = "com.sun.star.text.DefaultNumberingProvider"; OUString DefaultNumberingProvider::getImplementationName(void) throw( RuntimeException ) { return OUString::createFromAscii(cDefaultNumberingProvider); } -/* -----------------------------05.07.01 13:34-------------------------------- - ---------------------------------------------------------------------------*/ sal_Bool DefaultNumberingProvider::supportsService(const rtl::OUString& rServiceName) throw( RuntimeException ) { return rServiceName.equalsAscii(cDefaultNumberingProvider); } -/* -----------------------------05.07.01 13:34-------------------------------- - ---------------------------------------------------------------------------*/ Sequence< OUString > DefaultNumberingProvider::getSupportedServiceNames(void) throw( RuntimeException ) { @@ -897,3 +946,5 @@ Sequence< OUString > DefaultNumberingProvider::getSupportedServiceNames(void) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/data/indexdata_alphanumeric.h b/i18npool/source/indexentry/data/indexdata_alphanumeric.h index db3979d84ca4..284863a4b6d1 100644 --- a/i18npool/source/indexentry/data/indexdata_alphanumeric.h +++ b/i18npool/source/indexentry/data/indexdata_alphanumeric.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,3 +46,5 @@ static sal_Unicode idxStr[] = { 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x00, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x59, 0x54, 0x59, // F0-FF }; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/data/indexdata_ja_phonetic.h b/i18npool/source/indexentry/data/indexdata_ja_phonetic.h index a09a35ec1478..71da906738d4 100644 --- a/i18npool/source/indexentry/data/indexdata_ja_phonetic.h +++ b/i18npool/source/indexentry/data/indexdata_ja_phonetic.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -118,3 +119,4 @@ static sal_Unicode consonant[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 // FFF0 }; +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/data/makefile.mk b/i18npool/source/indexentry/data/makefile.mk index 8f698e3dbe2d..42378dab25bc 100644 --- a/i18npool/source/indexentry/data/makefile.mk +++ b/i18npool/source/indexentry/data/makefile.mk @@ -60,7 +60,7 @@ LIB1OBJFILES=$(SHL1OBJS) .INCLUDE : target.mk $(MISC)$/%.cxx : %.txt - $(AUGMENT_LIBRARY_PATH) $(BIN)$/genindex_data $< $@ $* + $(AUGMENT_LIBRARY_PATH) $(OUT_FOR_BUILD)$/bin$/genindex_data $< $@ $* # ugly - is this dependency really required here? $(foreach,i,$(shell @$(FIND) . -name "*.txt") $(MISC)$/dict_$(i:b).cxx) : $(BIN)$/genindex_data$(EXECPOST) diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx index 91f9725f493f..48ae02576a87 100644 --- a/i18npool/source/indexentry/genindex_data.cxx +++ b/i18npool/source/indexentry/genindex_data.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -78,7 +79,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) sal_Int32 nPos=0; sal_uInt32 nChar = Ostr.iterateCodePoints(&nPos, 2); - if (nChar > MAX_ADDRESS) { + if (nChar >= MAX_ADDRESS) { printf("Code point 0x%lx exceeds MAX_ADDRESS 0x%x, Please increase MAX_ADDRESS", static_cast<long unsigned int>(nChar), MAX_ADDRESS); exit(1); } @@ -164,3 +165,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) fclose(fp); return 0; } // End of main + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx index 3321559e478f..583e8053b5ee 100644 --- a/i18npool/source/indexentry/indexentrysupplier.cxx +++ b/i18npool/source/indexentry/indexentrysupplier.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,7 +113,7 @@ OUString SAL_CALL IndexEntrySupplier::getIndexCharacter( const OUString& rIndexE sal_Bool SAL_CALL IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(const OUString& name) throw( RuntimeException ) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.IndexEntrySupplier_") + name); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.IndexEntrySupplier_")) + name); if ( xI.is() ) { xI->queryInterface( ::getCppuType((const Reference< com::sun::star::i18n::XExtendedIndexEntrySupplier>*)0) ) >>= xIES; @@ -167,7 +168,7 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c // load service with name <base>_<algorithm> (a > 0 && createLocaleSpecificIndexEntrySupplier(aSortAlgorithm)) || // load default service with name <base>_Unicode - createLocaleSpecificIndexEntrySupplier(OUString::createFromAscii("Unicode"))) { + createLocaleSpecificIndexEntrySupplier(OUString(RTL_CONSTASCII_USTRINGPARAM("Unicode")))) { return xIES; } } @@ -207,3 +208,5 @@ IndexEntrySupplier::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index cbe55a9832e0..644277e24156 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -45,9 +46,9 @@ IndexEntrySupplier_asian::IndexEntrySupplier_asian( { implementationName = "com.sun.star.i18n.IndexEntrySupplier_asian"; #ifdef SAL_DLLPREFIX - OUString lib=OUString::createFromAscii(SAL_DLLPREFIX"index_data"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX"index_data"SAL_DLLEXTENSION)); #else - OUString lib=OUString::createFromAscii("index_data"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM("index_data"SAL_DLLEXTENSION)); #endif hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); @@ -65,10 +66,10 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, sal_Int32 i=0; sal_uInt32 ch = rIndexEntry.iterateCodePoints(&i, 0); if (hModule) { - OUString get=OUString::createFromAscii("get_indexdata_"); + OUString get(RTL_CONSTASCII_USTRINGPARAM("get_indexdata_")); sal_uInt16** (*func)(sal_Int16*)=NULL; - if (rLocale.Language.equalsAscii("zh") && OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0) - func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString::createFromAscii("_TW_")+rAlgorithm).pData); + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) + func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString(RTL_CONSTASCII_USTRINGPARAM("_TW_"))+rAlgorithm).pData); if (!func) func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString('_')+rAlgorithm).pData); if (func) { @@ -119,9 +120,9 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, if (hModule) { sal_uInt16 **(*func)(sal_Int16*)=NULL; const sal_Char *func_name=NULL; - if (rLocale.Language.equalsAscii("zh")) - func_name=(OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0) ? "get_zh_zhuyin" : "get_zh_pinyin"; - else if (rLocale.Language.equalsAscii("ko")) + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) + func_name=(OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) ? "get_zh_zhuyin" : "get_zh_pinyin"; + else if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko"))) func_name="get_ko_phonetic"; if (func_name) func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData); @@ -136,7 +137,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, sal_uInt16 address = idx[0][ch>>8]; if (address != 0xFFFF) { address = idx[1][address + (ch & 0xFF)]; - if (i > 0 && rLocale.Language.equalsAscii("zh")) + if (i > 0 && rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) candidate.appendAscii(" "); if (idx[2]) candidate.append(&idx[2][address]); @@ -152,3 +153,5 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, return OUString(); } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx index 24964906c18b..682f5086d02c 100644 --- a/i18npool/source/indexentry/indexentrysupplier_common.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,5 @@ IndexEntrySupplier_Common::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 7de3f540eaa7..6d6ceb6e1aee 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -169,7 +170,7 @@ OUString Index::getIndexDescription(const OUString& rIndexEntry) return OUString(&indexChar, 1); } -#define LOCALE_EN lang::Locale(OUString::createFromAscii("en"), OUString(), OUString()) +#define LOCALE_EN lang::Locale(OUString(RTL_CONSTASCII_USTRINGPARAM("en")), OUString(), OUString()) void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm) throw (RuntimeException) { @@ -288,3 +289,5 @@ void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw ( } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx index bfc23d100ea3..daa5d612f8ef 100644 --- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_consonant: } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx index 946cdd07064d..610308e3e053 100644 --- a/i18npool/source/inputchecker/inputsequencechecker.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -128,7 +129,7 @@ InputSequenceCheckerImpl::getInputSequenceChecker(sal_Char* rLanguage) throw (Ru } Reference < uno::XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.InputSequenceChecker_") + + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.InputSequenceChecker_")) + OUString::createFromAscii(rLanguage)); if ( xI.is() ) { @@ -164,3 +165,5 @@ InputSequenceCheckerImpl::getSupportedServiceNames(void) throw( RuntimeException } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx index a265ef0a651e..dd84f0098b3a 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <inputsequencechecker_hi.hxx> -using namespace rtl; +using ::rtl::OUString; namespace com { namespace sun { @@ -146,3 +147,5 @@ InputSequenceChecker_hi::correctInputSequence(OUString& Text, return nStartPos; } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx index d4956c9758ea..2848101c5681 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,7 +32,7 @@ #include <inputsequencechecker_th.hxx> #include <wtt.h> -using namespace rtl; +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -152,3 +153,5 @@ http://www.openoffice.org/issues/show_bug.cgi?id=42661 } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/isolang/insys.cxx b/i18npool/source/isolang/insys.cxx index 65d78ef8efe4..fac39e1f2689 100644 --- a/i18npool/source/isolang/insys.cxx +++ b/i18npool/source/isolang/insys.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,7 @@ #include "inwnt.cxx" -#elif defined( UNX ) || defined( OS2 ) +#elif defined( UNX ) #include "inunx.cxx" @@ -41,3 +42,5 @@ #error unknown platform #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/isolang/inunx.cxx b/i18npool/source/isolang/inunx.cxx index 5450f8b24c66..521f2ea6e8e0 100644 --- a/i18npool/source/isolang/inunx.cxx +++ b/i18npool/source/isolang/inunx.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,5 @@ LanguageType MsLangId::getPlatformSystemUILanguage() getPlatformSystemLanguageImpl( nImplSystemUILanguage, &getUILangFromEnvironment); return nImplSystemUILanguage; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/isolang/inwnt.cxx b/i18npool/source/isolang/inwnt.cxx index 2e07e8ea1322..db1b25218844 100644 --- a/i18npool/source/isolang/inwnt.cxx +++ b/i18npool/source/isolang/inwnt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,6 +30,8 @@ #include <sal/config.h> +#define WINVER 0x0500 + #ifdef _MSC_VER #pragma warning(push,1) // disable warnings within system headers #endif @@ -105,3 +108,5 @@ LanguageType MsLangId::getPlatformSystemUILanguage() &GetUserDefaultUILanguage, &GetSystemDefaultUILanguage); return nImplSystemUILanguage; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 78a66c1cc79e..a96f80719357 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -384,7 +385,9 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_ENGLISH_PHILIPPINES, "en", "PH" }, // { LANGUAGE_IBIBIO_NIGERIA, "nic", "NG" }, // ISO "nic" is only a collective language code { LANGUAGE_YI, "ii", "CN" }, -// { LANGUAGE_TAMAZIGHT_LATIN, "ber", "" }, // ISO "ber" only collective! + { LANGUAGE_TAMAZIGHT_LATIN, "kab", "DZ" }, // In practice Kabyle is the language used for this + { LANGUAGE_TAMAZIGHT_LATIN, "ber", "DZ" }, // In practice Algeria has standardized on Kabyle as the member of the "ber" collective which gets used there. + { LANGUAGE_TAMAZIGHT_TIFINAGH, "ber", "MA" }, // Morocco is officially using Tifinagh for its Berber languages so store it to distinguish explicitly from LANGUAGE_TAMAZIGHT_LATIN, even though as a collective language its not of much use // { LANGUAGE_TAMAZIGHT_ARABIC, "ber", "" }, // ISO "ber" only collective! { LANGUAGE_LATIN, "la", "VA" }, { LANGUAGE_OBSOLETE_USER_LATIN, "la", "VA" }, @@ -457,6 +460,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_BUSHI, "buc", "YT" }, { LANGUAGE_USER_TAHITIAN, "ty", "PF" }, { LANGUAGE_USER_MALAGASY_PLATEAU, "plt", "MG" }, + { LANGUAGE_USER_MALAGASY_PLATEAU, "mg", "MG" }, { LANGUAGE_USER_BAFIA, "ksf", "CM" }, { LANGUAGE_USER_GIKUYU, "ki", "KE" }, { LANGUAGE_USER_RUSYN_UKRAINE, "rue", "UA" }, @@ -466,6 +470,17 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_KABYLE, "kab", "DZ" }, { LANGUAGE_USER_HAITIAN, "ht", "HT" }, { LANGUAGE_FRENCH_HAITI, "fr", "HT" }, + { LANGUAGE_USER_BEEMBE, "beq", "CG" }, + { LANGUAGE_USER_BEKWEL, "bkw", "CG" }, + { LANGUAGE_USER_KITUBA, "mkw", "CG" }, + { LANGUAGE_USER_LARI, "ldi", "CG" }, + { LANGUAGE_USER_MBOCHI, "mdw", "CG" }, + { LANGUAGE_USER_TEKE_EBOO, "ebo", "CG" }, + { LANGUAGE_USER_TEKE_IBALI, "tek", "CG" }, + { LANGUAGE_USER_TEKE_TYEE, "tyx", "CG" }, + { LANGUAGE_USER_VILI, "vif", "CG" }, + { LANGUAGE_USER_PORTUGUESE_ANGOLA, "pt", "AO" }, + { LANGUAGE_USER_MANX, "gv", "GB" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW, "", "" } // marks end of table }; @@ -893,7 +908,7 @@ LanguageType MsLangId::convertIsoNamesToLanguage( const rtl::OUString& rLang, while ( pEntry->mnLang != LANGUAGE_DONTKNOW ); // some eng countries should be mapped to a specific english language - if ( aLowerLang.equalsAscii( "en" ) ) + if ( aLowerLang.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "en" ) ) ) { const IsoLangEngEntry* pEngEntry = aImplIsoLangEngEntries; do @@ -1110,3 +1125,5 @@ const MsLangId::IsoLangEntry* MsLangId::getIsoLangEntry( size_t nIndex ) return &aImplIsoLangEntries[ nIndex]; return 0; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/isolang/langid.pl b/i18npool/source/isolang/langid.pl index 8035178b7bb5..9787309e20d9 100755 --- a/i18npool/source/isolang/langid.pl +++ b/i18npool/source/isolang/langid.pl @@ -53,13 +53,13 @@ sub Usage() "langtab.src, a generic string match of the listbox entries will be tried.\n\n", "Numeric values of LangID,primarylanguage,sublanguage can be given\n", - "decimal, hexagesimal (leading 0x), octal (leading 0) or binary (leading 0b).\n", + "decimal, hexadecimal (leading 0x), octal (leading 0) or binary (leading 0b).\n", "The exact language_define of an exact match will be used in remaining lookups.\n\n", "A language-country pair will lookup a xx-YY mapping from isolang.cxx,\n", "for example: 'en-US' or 'de-' or '-CH',\n", "xx and YY can be given case insensitive, will be lowered-uppered internally,\n", - "and xx and YY themselfs may be regular expressions.\n", + "and xx and YY themselves may be regular expressions.\n", "Also here a list of matches will be processed.\n\n", "If option --single is given, only the first match will be processed.\n\n"; diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 599299951164..c11d4d6d1387 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -467,3 +468,5 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) } return nLang; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 275fdf006d9f..05f6156489a6 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,6 +35,7 @@ #include <set> #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> #include "LocaleNode.hxx" #include <com/sun/star/i18n/NumberFormatIndex.hpp> @@ -48,7 +50,7 @@ namespace cssi = ::com::sun::star::i18n; LocaleNode::LocaleNode (const OUString& name, const Reference< XAttributeList > & attr) : aName(name) - , xAttribs(new Attr(attr)) + , aAttribs(attr) , parent(0) , children(0) , nChildren(0) @@ -83,11 +85,10 @@ void LocaleNode::printR () const { void LocaleNode::addChild ( LocaleNode * node) { if (childArrSize <= nChildren) { - LocaleNode ** arrN = (LocaleNode **)malloc( sizeof (LocaleNode *)*(childArrSize+10) ) ; - for (sal_Int32 i = 0; i<childArrSize ; i++) + LocaleNode ** arrN = new LocaleNode*[childArrSize+10]; + for (sal_Int32 i = 0; i<childArrSize; ++i) arrN[i] = children[i]; - if ( childArrSize > 0 ) - free(children); + delete [] children; childArrSize += 10; children = arrN; } @@ -119,38 +120,40 @@ const LocaleNode * LocaleNode::findNode ( const sal_Char *name) const { return 0; } - LocaleNode::~LocaleNode() { - for (sal_Int32 i=0; i<nChildren;i++) - delete (children[i]); +LocaleNode::~LocaleNode() +{ + for (sal_Int32 i=0; i < nChildren; ++i) + delete children[i]; + delete [] children; } LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttributeList > & attr) { - if (name.equalsAscii("LC_INFO")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INFO"))) return new LCInfoNode (name,attr); - if (name.equalsAscii("LC_CTYPE")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CTYPE"))) return new LCCTYPENode (name,attr); - if (name.equalsAscii("LC_FORMAT")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_FORMAT_1")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT_1"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_CALENDAR")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CALENDAR"))) return new LCCalendarNode (name,attr); - if (name.equalsAscii("LC_CURRENCY")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CURRENCY"))) return new LCCurrencyNode (name,attr); - if (name.equalsAscii("LC_TRANSLITERATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_TRANSLITERATION"))) return new LCTransliterationNode (name,attr); - if (name.equalsAscii("LC_COLLATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_COLLATION"))) return new LCCollationNode (name,attr); - if (name.equalsAscii("LC_INDEX")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INDEX"))) return new LCIndexNode (name,attr); - if (name.equalsAscii("LC_SEARCH")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_SEARCH"))) return new LCSearchNode (name,attr); - if (name.equalsAscii("LC_MISC")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_MISC"))) return new LCMiscNode (name,attr); - if (name.equalsAscii("LC_NumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_NumberingLevel"))) return new LCNumberingLevelNode (name, attr); - if (name.equalsAscii("LC_OutLineNumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_OutLineNumberingLevel"))) return new LCOutlineNumberingLevelNode (name, attr); return new LocaleNode(name,attr); @@ -167,7 +170,7 @@ void print_OUString( const OUString& s ) printf( "%s", OSTR(s)); } -bool is_empty( const OUString& s ) +bool is_empty_string( const OUString& s ) { return (s.getLength()==0) || (s.getLength()==1 && s[0]=='\n'); } @@ -191,26 +194,23 @@ void print_node( const LocaleNode* p, int depth=0 ) print_color(36); print_OUString( p->getName() ); print_color(0); - const Attr* q = p->getAttr(); - if( q ) + const Attr& q = p->getAttr(); + for( sal_Int32 j = 0; j < q.getLength(); ++j ) { - for( sal_Int32 j=0; j<q->getLength(); j++ ) - { - printf(" "); - print_color(33); - print_OUString( q->getTypeByIndex(j) ); - print_color(0); - printf("="); - print_color(31); - printf("'"); - print_OUString( q->getValueByIndex(j) ); - printf("'"); - print_color(0); - } + printf(" "); + print_color(33); + print_OUString( q.getTypeByIndex(j) ); + print_color(0); + printf("="); + print_color(31); + printf("'"); + print_OUString( q.getValueByIndex(j) ); + printf("'"); + print_color(0); } printf(">"); printf("\n"); - if( !is_empty( p->getValue() ) ) + if( !is_empty_string( p->getValue() ) ) { print_indent( depth+1 ); printf("value: "); @@ -234,8 +234,8 @@ void print_node( const LocaleNode* p, int depth=0 ) void LocaleNode :: generateCode (const OFileWriter &of) const { - ::rtl::OUString aDTD = getAttr()->getValueByName("versionDTD"); - if (!aDTD.equalsAscii( LOCALE_VERSION_DTD)) + ::rtl::OUString aDTD = getAttr().getValueByName("versionDTD"); + if (!aDTD.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(LOCALE_VERSION_DTD))) { ++nError; fprintf( stderr, "Error: Locale versionDTD is not %s, see comment in locale.dtd\n", LOCALE_VERSION_DTD); @@ -379,12 +379,12 @@ void LCInfoNode::generateCode (const OFileWriter &of) const void LCCTYPENode::generateCode (const OFileWriter &of) const { const LocaleNode * sepNode = 0; - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getLocaleItem_", useLocale); return; } - ::rtl::OUString str = getAttr() -> getValueByName("unoid"); + ::rtl::OUString str = getAttr().getValueByName("unoid"); of.writeAsciiString("\n\n"); of.writeParameter("LC_CTYPE_Unoid", str);; @@ -438,7 +438,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const incError( "DateSeparator equals TimeSeparator."); if (aDecSep == aThoSep) incError( "DecimalSeparator equals ThousandSeparator."); - if (aThoSep.equalsAscii( " ")) + if (aThoSep.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( " "))) incError( "ThousandSeparator is an ' ' ordinary space, this should be a non-breaking space U+00A0 instead."); if (aListSep == aDecSep) fprintf( stderr, "Warning: %s\n", @@ -598,13 +598,13 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString str; if (mnSection >= 2) incError("more than 2 LC_FORMAT sections"); - of.writeParameter("replaceFrom", getAttr() -> getValueByName("replaceFrom"), mnSection); - str = getAttr() -> getValueByName("replaceTo"); + of.writeParameter("replaceFrom", getAttr().getValueByName("replaceFrom"), mnSection); + str = getAttr().getValueByName("replaceTo"); // Locale data generator inserts FFFF for LangID, we need to adapt that. if (str.endsWithIgnoreAsciiCaseAsciiL( "-FFFF]", 6)) incErrorStr("replaceTo=\"%s\" needs FFFF to be adapted to the real LangID value.", str); of.writeParameter("replaceTo", str, mnSection); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { switch (mnSection) { @@ -629,25 +629,25 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString aType; OUString aFormatIndex; // currNode -> print(); - const Attr * currNodeAttr = currNode->getAttr(); - //printf ("getLen() = %d\n", currNode->getAttr()->getLength()); + const Attr &currNodeAttr = currNode->getAttr(); + //printf ("getLen() = %d\n", currNode->getAttr().getLength()); - str = currNodeAttr -> getValueByName("msgid"); + str = currNodeAttr.getValueByName("msgid"); if (!aMsgIdSet.insert( str).second) incErrorStr( "Duplicated msgid=\"%s\" in FormatElement.", str); of.writeParameter("FormatKey", str, formatCount); - str = currNodeAttr -> getValueByName("default"); - bool bDefault = str.equalsAscii( "true"); + str = currNodeAttr.getValueByName("default"); + bool bDefault = str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "true")); of.writeDefaultParameter("FormatElement", str, formatCount); - aType = currNodeAttr -> getValueByName("type"); + aType = currNodeAttr.getValueByName("type"); of.writeParameter("FormatType", aType, formatCount); - aUsage = currNodeAttr -> getValueByName("usage"); + aUsage = currNodeAttr.getValueByName("usage"); of.writeParameter("FormatUsage", aUsage, formatCount); - aFormatIndex = currNodeAttr -> getValueByName("formatindex"); + aFormatIndex = currNodeAttr.getValueByName("formatindex"); sal_Int16 formatindex = (sal_Int16)aFormatIndex.toInt32(); if (!aFormatIndexSet.insert( formatindex).second) incErrorInt( "Duplicated formatindex=\"%d\" in FormatElement.", formatindex); @@ -692,7 +692,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const incError( "No LC_CTYPE found for FormatCode."); else { - OUString aRef( pCtype->getAttr()->getValueByName("ref")); + OUString aRef( pCtype->getAttr().getValueByName("ref")); if (aRef.getLength() > 0) { if (!bCtypeIsRef) @@ -920,7 +920,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const void LCCollationNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getCollatorImplementation_", useLocale); of.writeRefFunction("getCollationOptions_", useLocale); @@ -935,11 +935,11 @@ void LCCollationNode::generateCode (const OFileWriter &of) const if( currNode->getName().compareToAscii("Collator") == 0 ) { ::rtl::OUString str; - str = currNode->getAttr() -> getValueByName("unoid"); + str = currNode->getAttr().getValueByName("unoid"); of.writeParameter("CollatorID", str, j); str = currNode->getValue(); of.writeParameter("CollatorRule", str, j); - str = currNode -> getAttr() -> getValueByName("default"); + str = currNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Collator", str, j); of.writeAsciiString("\n"); @@ -993,7 +993,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const void LCSearchNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getSearchOptions_", useLocale); return; @@ -1031,7 +1031,7 @@ void LCSearchNode::generateCode (const OFileWriter &of) const void LCIndexNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getIndexAlgorithm_", useLocale); of.writeRefFunction("getUnicodeScripts_", useLocale); @@ -1047,15 +1047,15 @@ void LCIndexNode::generateCode (const OFileWriter &of) const if( currNode->getName().compareToAscii("IndexKey") == 0 ) { ::rtl::OUString str; - str = currNode->getAttr() -> getValueByName("unoid"); + str = currNode->getAttr().getValueByName("unoid"); of.writeParameter("IndexID", str, nbOfIndexs); - str = currNode->getAttr() -> getValueByName("module"); + str = currNode->getAttr().getValueByName("module"); of.writeParameter("IndexModule", str, nbOfIndexs); str = currNode->getValue(); of.writeParameter("IndexKey", str, nbOfIndexs); - str = currNode -> getAttr() -> getValueByName("default"); + str = currNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Index", str, nbOfIndexs); - str = currNode -> getAttr() -> getValueByName("phonetic"); + str = currNode -> getAttr().getValueByName("phonetic"); of.writeDefaultParameter("Phonetic", str, nbOfIndexs); of.writeAsciiString("\n"); @@ -1133,7 +1133,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const void LCCalendarNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getAllCalendars_", useLocale); return; @@ -1150,27 +1150,27 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const for ( i = 0; i < nbOfCalendars; i++) { LocaleNode * calNode = getChildAt (i); - OUString calendarID = calNode -> getAttr() -> getValueByName("unoid"); + OUString calendarID = calNode -> getAttr().getValueByName("unoid"); of.writeParameter( "calendarID", calendarID, i); - bool bGregorian = calendarID.equalsAscii( "gregorian"); + bool bGregorian = calendarID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "gregorian")); if (!bHasGregorian) bHasGregorian = bGregorian; - str = calNode -> getAttr() -> getValueByName("default"); + str = calNode -> getAttr().getValueByName("default"); of.writeDefaultParameter("Calendar", str, i); // Generate Days of Week const sal_Char *elementTag; LocaleNode * daysNode = NULL; - ::rtl::OUString ref_name = calNode->getChildAt(0)->getAttr()->getValueByName("ref"); + ::rtl::OUString ref_name = calNode->getChildAt(0)->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) daysNode = getChildAt(j)->getChildAt(0); } } if (ref_name.getLength() > 0 && daysNode == NULL) { - of.writeParameter("dayRef", OUString::createFromAscii("ref"), i); + of.writeParameter("dayRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("dayRefName", ref_name, i); nbOfDays[i] = 0; } else { @@ -1184,7 +1184,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = daysNode -> getChildAt(j); OUString dayID( currNode->getChildAt(0)->getValue()); of.writeParameter("dayID", dayID, i, j); - if (j == 0 && bGregorian && !dayID.equalsAscii( "sun")) + if (j == 0 && bGregorian && !dayID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "sun"))) incError( "First day of a week of a Gregorian calendar must be <DayID>sun</DayID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1193,16 +1193,16 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Months of Year LocaleNode * monthsNode = NULL; - ref_name = calNode->getChildAt(1)->getAttr()->getValueByName("ref"); + ref_name = calNode->getChildAt(1)->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) monthsNode = getChildAt(j)->getChildAt(1); } } if (ref_name.getLength() > 0 && monthsNode == NULL) { - of.writeParameter("monthRef", OUString::createFromAscii("ref"), i); + of.writeParameter("monthRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("monthRefName", ref_name, i); nbOfMonths[i] = 0; } else { @@ -1216,7 +1216,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = monthsNode -> getChildAt(j); OUString monthID( currNode->getChildAt(0)->getValue()); of.writeParameter("monthID", monthID, i, j); - if (j == 0 && bGregorian && !monthID.equalsAscii( "jan")) + if (j == 0 && bGregorian && !monthID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "jan"))) incError( "First month of a year of a Gregorian calendar must be <MonthID>jan</MonthID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1225,16 +1225,16 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const // Generate Era name LocaleNode * erasNode = NULL; - ref_name = calNode -> getChildAt(2) ->getAttr()->getValueByName("ref"); + ref_name = calNode -> getChildAt(2) ->getAttr().getValueByName("ref"); if (ref_name.getLength() > 0 && i > 0) { for (j = 0; j < i; j++) { - str = getChildAt(j)->getAttr()->getValueByName("unoid"); + str = getChildAt(j)->getAttr().getValueByName("unoid"); if (str.equals(ref_name)) erasNode = getChildAt(j)->getChildAt(2); } } if (ref_name.getLength() > 0 && erasNode == NULL) { - of.writeParameter("eraRef", OUString::createFromAscii("ref"), i); + of.writeParameter("eraRef", OUString(RTL_CONSTASCII_USTRINGPARAM("ref")), i); of.writeParameter("eraRefName", ref_name, i); nbOfEras[i] = 0; } else { @@ -1248,9 +1248,9 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = erasNode -> getChildAt(j); OUString eraID( currNode->getChildAt(0)->getValue()); of.writeParameter("eraID", eraID, i, j); - if (j == 0 && bGregorian && !eraID.equalsAscii( "bc")) + if (j == 0 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "bc"))) incError( "First era of a Gregorian calendar must be <EraID>bc</EraID>"); - if (j == 1 && bGregorian && !eraID.equalsAscii( "ad")) + if (j == 1 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "ad"))) incError( "Second era of a Gregorian calendar must be <EraID>ad</EraID>"); of.writeAsciiString("\n"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); @@ -1382,7 +1382,7 @@ bool isIso4217( const OUString& rStr ) void LCCurrencyNode :: generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getAllCurrencies_", useLocale); return; @@ -1395,11 +1395,11 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const bool bTheCompatible = false; for ( i = 0; i < getNumberOfChildren(); i++,nbOfCurrencies++) { LocaleNode * calNode = getChildAt (i); - str = calNode->getAttr() -> getValueByName("default"); + str = calNode->getAttr().getValueByName("default"); bool bDefault = of.writeDefaultParameter("Currency", str, nbOfCurrencies); - str = calNode->getAttr() -> getValueByName("usedInCompatibleFormatCodes"); + str = calNode->getAttr().getValueByName("usedInCompatibleFormatCodes"); bool bCompatible = of.writeDefaultParameter("CurrencyUsedInCompatibleFormatCodes", str, nbOfCurrencies); - str = calNode->getAttr() -> getValueByName("legacyOnly"); + str = calNode->getAttr().getValueByName("legacyOnly"); bool bLegacy = of.writeDefaultParameter("CurrencyLegacyOnly", str, nbOfCurrencies); if (bLegacy && (bDefault || bCompatible)) incError( "Currency: if legacyOnly==true, both 'default' and 'usedInCompatibleFormatCodes' must be false."); @@ -1477,7 +1477,7 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const void LCTransliterationNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getTransliterations_", useLocale); return; @@ -1488,7 +1488,7 @@ void LCTransliterationNode::generateCode (const OFileWriter &of) const for ( i = 0; i < getNumberOfChildren(); i++,nbOfModules++) { LocaleNode * calNode = getChildAt (i); - str = calNode->getAttr() -> getValueByIndex(0); + str = calNode->getAttr().getValueByIndex(0); of.writeParameter("Transliteration", str, nbOfModules); } of.writeAsciiString("static const sal_Int16 nbOfTransliterations = "); @@ -1526,7 +1526,7 @@ static NameValuePair ReserveWord[] = { void LCMiscNode::generateCode (const OFileWriter &of) const { - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction("getForbiddenCharacters_", useLocale); of.writeRefFunction("getBreakIteratorRules_", useLocale); @@ -1545,7 +1545,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const ::rtl::OUString str; sal_Int16 i; - for ( i = 0; i < sal_Int16(sizeof(ReserveWord)/sizeof(ReserveWord[0])); i++,nbOfWords++) { + for ( i = 0; i < sal_Int16(SAL_N_ELEMENTS(ReserveWord)); i++,nbOfWords++) { const LocaleNode * curNode = (reserveNode ? reserveNode->findNode( ReserveWord[i].name) : 0); if (!curNode) @@ -1623,7 +1623,7 @@ void LCMiscNode::generateCode (const OFileWriter &of) const void LCNumberingLevelNode::generateCode (const OFileWriter &of) const { of.writeAsciiString("// ---> ContinuousNumbering\n"); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction2("getContinuousNumberingLevels_", useLocale); return; @@ -1638,13 +1638,13 @@ void LCNumberingLevelNode::generateCode (const OFileWriter &of) const sal_Int32 nStyles = getNumberOfChildren(); sal_Int32 i; - for( i = 0; i < nStyles; i++ ) + for( i = 0; i < nStyles; ++i ) { - const Attr* q = getChildAt( i )->getAttr(); - for( sal_Int32 j=0; j<nAttributes; j++ ) + const Attr &q = getChildAt( i )->getAttr(); + for( sal_Int32 j=0; j<nAttributes; ++j ) { const char* name = attr[j]; - OUString value = q->getValueByName( name ); + OUString value = q.getValueByName( name ); of.writeParameter("continuous", name, value, sal::static_int_cast<sal_Int16>(i) ); } } @@ -1693,7 +1693,7 @@ void LCNumberingLevelNode::generateCode (const OFileWriter &of) const void LCOutlineNumberingLevelNode::generateCode (const OFileWriter &of) const { of.writeAsciiString("// ---> OutlineNumbering\n"); - ::rtl::OUString useLocale = getAttr() -> getValueByName("ref"); + ::rtl::OUString useLocale = getAttr().getValueByName("ref"); if (useLocale.getLength() > 0) { of.writeRefFunction3("getOutlineNumberingLevels_", useLocale); return; @@ -1726,11 +1726,11 @@ void LCOutlineNumberingLevelNode::generateCode (const OFileWriter &of) const nLevels.push_back( p->getNumberOfChildren() ); for( sal_Int32 j=0; j<nLevels.back(); j++ ) { - const Attr* q = p->getChildAt( j )->getAttr(); - for( sal_Int32 k=0; k<nAttributes; k++ ) + const Attr& q = p->getChildAt( j )->getAttr(); + for( sal_Int32 k=0; k<nAttributes; ++k ) { const char* name = attr[k]; - OUString value = q->getValueByName( name ); + OUString value = q.getValueByName( name ); of.writeParameter("outline", name, value, sal::static_int_cast<sal_Int16>(i), sal::static_int_cast<sal_Int16>(j) ); @@ -1857,3 +1857,5 @@ const OUString& Attr::getValueByIndex (sal_Int32 idx) const { return value[idx]; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index bf1bd1a9c4ab..fb3506389ac4 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -107,7 +108,7 @@ class LocaleNode { OUString aName; OUString aValue; - Attr * xAttribs; + Attr aAttribs; LocaleNode * parent; LocaleNode* * children; sal_Int32 nChildren; @@ -123,7 +124,7 @@ public: inline void setValue(const OUString &oValue) { aValue += oValue; }; inline const OUString& getName() const { return aName; }; inline const OUString& getValue() const { return aValue; }; - inline const Attr* getAttr() const { return xAttribs; }; + inline const Attr& getAttr() const { return aAttribs; }; inline sal_Int32 getNumberOfChildren () const { return nChildren; }; inline LocaleNode * getChildAt (sal_Int32 idx) const { return children[idx] ; }; const LocaleNode * findNode ( const sal_Char *name) const; @@ -257,3 +258,5 @@ public: }; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/data/ca_ES.xml b/i18npool/source/localedata/data/ca_ES.xml index 42fd55fe779a..b73579ab35cf 100644 --- a/i18npool/source/localedata/data/ca_ES.xml +++ b/i18npool/source/localedata/data/ca_ES.xml @@ -176,7 +176,12 @@ <FormatCode>DD/MM/YYYY HH:MM:SS</FormatCode> </FormatElement> </LC_FORMAT> - <LC_COLLATION ref="en_US" /> + <LC_COLLATION> + <Collator unoid="charset" default="true"/> + <CollationOptions> + <TransliterationModules>IGNORE_CASE</TransliterationModules> + </CollationOptions> + </LC_COLLATION> <LC_SEARCH ref="en_US"/> <LC_INDEX ref="en_US"/> <LC_CALENDAR> diff --git a/i18npool/source/localedata/data/en_AU.xml b/i18npool/source/localedata/data/en_AU.xml index 6206988562c3..806915e07336 100644 --- a/i18npool/source/localedata/data/en_AU.xml +++ b/i18npool/source/localedata/data/en_AU.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_CA.xml b/i18npool/source/localedata/data/en_CA.xml index 121de11814a7..c654cf789c58 100644 --- a/i18npool/source/localedata/data/en_CA.xml +++ b/i18npool/source/localedata/data/en_CA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_GB.xml b/i18npool/source/localedata/data/en_GB.xml index f920af80285d..326ac348cbc5 100644 --- a/i18npool/source/localedata/data/en_GB.xml +++ b/i18npool/source/localedata/data/en_GB.xml @@ -179,6 +179,14 @@ <FormatCode>#,###.00</FormatCode> <DefaultName></DefaultName> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + <DefaultName></DefaultName> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + <DefaultName></DefaultName> + </FormatElement> <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> <FormatCode>[CURRENCY]#,##0;-[CURRENCY]#,##0</FormatCode> <DefaultName></DefaultName> diff --git a/i18npool/source/localedata/data/en_GH.xml b/i18npool/source/localedata/data/en_GH.xml index 37437468a651..8f1f6eab1643 100644 --- a/i18npool/source/localedata/data/en_GH.xml +++ b/i18npool/source/localedata/data/en_GH.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+00</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_JM.xml b/i18npool/source/localedata/data/en_JM.xml index 186f8d494be0..780b20ddf26f 100644 --- a/i18npool/source/localedata/data/en_JM.xml +++ b/i18npool/source/localedata/data/en_JM.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_NA.xml b/i18npool/source/localedata/data/en_NA.xml index bec705934342..255dcbf5e79d 100644 --- a/i18npool/source/localedata/data/en_NA.xml +++ b/i18npool/source/localedata/data/en_NA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_US.xml b/i18npool/source/localedata/data/en_US.xml index 7029b7cc5b30..f6b771b5f736 100644 --- a/i18npool/source/localedata/data/en_US.xml +++ b/i18npool/source/localedata/data/en_US.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/en_ZA.xml b/i18npool/source/localedata/data/en_ZA.xml index 4b3be48225fd..c44810bf3eee 100644 --- a/i18npool/source/localedata/data/en_ZA.xml +++ b/i18npool/source/localedata/data/en_ZA.xml @@ -53,6 +53,12 @@ <FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> <FormatCode>#,###.00</FormatCode> </FormatElement> + <FormatElement msgid="FixedFormatskey7" default="false" type="short" usage="FIXED_NUMBER" formatindex="70"> + <FormatCode>#,##0_);(#,##0)</FormatCode> + </FormatElement> + <FormatElement msgid="FixedFormatskey8" default="false" type="medium" usage="FIXED_NUMBER" formatindex="71"> + <FormatCode>#,##0.00_);(#,##0.00)</FormatCode> + </FormatElement> <FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> <FormatCode>0.00E+000</FormatCode> </FormatElement> diff --git a/i18npool/source/localedata/data/et_EE.xml b/i18npool/source/localedata/data/et_EE.xml index 2509c52840bd..6b215affbfb6 100644 --- a/i18npool/source/localedata/data/et_EE.xml +++ b/i18npool/source/localedata/data/et_EE.xml @@ -311,7 +311,14 @@ </Calendar> </LC_CALENDAR> <LC_CURRENCY> - <Currency default="true" usedInCompatibleFormatCodes="true"> + <Currency default="true" usedInCompatibleFormatCodes="false"> + <CurrencyID>EUR</CurrencyID> + <CurrencySymbol>€</CurrencySymbol> + <BankSymbol>EUR</BankSymbol> + <CurrencyName>Euro</CurrencyName> + <DecimalPlaces>2</DecimalPlaces> + </Currency> + <Currency default="false" usedInCompatibleFormatCodes="true"> <CurrencyID>EEK</CurrencyID> <CurrencySymbol>kr</CurrencySymbol> <BankSymbol>EEK</BankSymbol> diff --git a/i18npool/source/localedata/data/hu_HU.xml b/i18npool/source/localedata/data/hu_HU.xml index f8ddd785567d..2f52515cd305 100644 --- a/i18npool/source/localedata/data/hu_HU.xml +++ b/i18npool/source/localedata/data/hu_HU.xml @@ -329,8 +329,8 @@ <quarter2Word>II. negyedév</quarter2Word> <quarter3Word>III. negyedév</quarter3Word> <quarter4Word>IV. negyedév</quarter4Word> - <aboveWord>felett</aboveWord> - <belowWord>alatt</belowWord> + <aboveWord>fentebb</aboveWord> + <belowWord>alább</belowWord> <quarter1Abbreviation>N1</quarter1Abbreviation> <quarter2Abbreviation>N2</quarter2Abbreviation> <quarter3Abbreviation>N3</quarter3Abbreviation> diff --git a/i18npool/source/localedata/data/kab_DZ.xml b/i18npool/source/localedata/data/kab_DZ.xml new file mode 100644 index 000000000000..41e3ab270518 --- /dev/null +++ b/i18npool/source/localedata/data/kab_DZ.xml @@ -0,0 +1,358 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE Locale SYSTEM 'locale.dtd'> +<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.0"> +<LC_INFO> +<Language> +<LangID>kab</LangID> +<DefaultName>Kabyle</DefaultName> +</Language> +<Country> +<CountryID>DZ</CountryID> +<DefaultName>Algeria</DefaultName> +</Country> +</LC_INFO> +<LC_CTYPE unoid="generic"> +<Separators> +<DateSeparator>/</DateSeparator> +<ThousandSeparator>.</ThousandSeparator> +<DecimalSeparator>,</DecimalSeparator> +<TimeSeparator>:</TimeSeparator> +<Time100SecSeparator>,</Time100SecSeparator> +<ListSeparator>;</ListSeparator> +<LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator> +<LongDateDaySeparator>, </LongDateDaySeparator> +<LongDateMonthSeparator> </LongDateMonthSeparator> +<LongDateYearSeparator> </LongDateYearSeparator> +</Separators> +<Markers> +<QuotationStart>‘</QuotationStart> +<QuotationEnd>’</QuotationEnd> +<DoubleQuotationStart>“</DoubleQuotationStart> +<DoubleQuotationEnd>”</DoubleQuotationEnd> +</Markers> +<TimeAM>n tufat</TimeAM> +<TimePM>n tmeddit</TimePM> +<MeasurementSystem>metric</MeasurementSystem> +</LC_CTYPE> +<LC_FORMAT replaceFrom="[CURRENCY]" replaceTo=""> +<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0"> +<FormatCode>General</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1"> +<FormatCode>0</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2"> +<FormatCode>0,00</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3"> +<FormatCode>#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4"> +<FormatCode>#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> +<FormatCode>#.###,00</FormatCode> +</FormatElement> +<FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> +<FormatCode>0,00E+00</FormatCode> +</FormatElement> +<FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> +<FormatCode>0,00E+000</FormatCode> +</FormatElement> +<FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> +<FormatCode>0%</FormatCode> +</FormatElement> +<FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9"> +<FormatCode>0,00%</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> +<FormatCode>[CURRENCY]#.##0;-[CURRENCY]#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13"> +<FormatCode>[CURRENCY]#.##0,00;-[CURRENCY]#,##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14"> +<FormatCode>[CURRENCY]#.##0;[RED]-[CURRENCY]#.##0</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15"> +<FormatCode>[CURRENCY]#.##0,00;[RED]-[CURRENCY]#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16"> +<FormatCode>CCC#.##0,00</FormatCode> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17"> +<FormatCode>[CURRENCY]#.##0,--;[RED]-[CURRENCY]#.##0,--</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey11" default="true" type="short" usage="DATE" formatindex="18"> +<FormatCode>D/MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey14" default="true" type="long" usage="DATE" formatindex="19"> +<FormatCode>NNNNDD, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey6" default="true" type="medium" usage="DATE" formatindex="20"> +<FormatCode>DD/MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="21"> +<FormatCode>DD/MM/YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="22"> +<FormatCode>D, MMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="23"> +<FormatCode>D, MMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey21" default="false" type="long" usage="DATE" formatindex="24"> +<FormatCode>D, MMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="25"> +<FormatCode>D, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey22" default="false" type="long" usage="DATE" formatindex="26"> +<FormatCode>D, MMMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey10" default="false" type="medium" usage="DATE" formatindex="27"> +<FormatCode>NN, DD/MMM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey18" default="false" type="long" usage="DATE" formatindex="28"> +<FormatCode>NN, D, MMM YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey19" default="false" type="long" usage="DATE" formatindex="29"> +<FormatCode>NN, D, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey20" default="false" type="long" usage="DATE" formatindex="30"> +<FormatCode>NNNND, MMMM YYYY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey12" default="false" type="short" usage="DATE" formatindex="31"> +<FormatCode>MM/DD</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="32"> +<FormatCode>YY-MM-DD</FormatCode> +<DefaultName>ISO 8601</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey8" default="false" type="medium" usage="DATE" formatindex="33"> +<FormatCode>YYYY-MM-DD</FormatCode> +<DefaultName>ISO 8601</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey1" default="false" type="medium" usage="DATE" formatindex="34"> +<FormatCode>MM/YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="35"> +<FormatCode>MMM/DD</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="36"> +<FormatCode>MMMM</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="37"> +<FormatCode>QQ YY</FormatCode> +</FormatElement> +<FormatElement msgid="DateFormatskey9" default="false" type="medium" usage="DATE" formatindex="38"> +<FormatCode>WW</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39"> +<FormatCode>HH:MM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey2" default="false" type="medium" usage="TIME" formatindex="40"> +<FormatCode>HH:MM:SS</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey3" default="true" type="short" usage="TIME" formatindex="41"> +<FormatCode>HH:MM AM/PM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey4" default="true" type="medium" usage="TIME" formatindex="42"> +<FormatCode>HH:MM:SS AM/PM</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43"> +<FormatCode>[HH]:MM:SS</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44"> +<FormatCode>MM:SS,00</FormatCode> +</FormatElement> +<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45"> +<FormatCode>[HH]:MM:SS,00</FormatCode> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46"> +<FormatCode>DD/MM/YY HH:MM</FormatCode> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47"> +<FormatCode>DD/MM/YYYY HH:MM:SS AM/PM</FormatCode> +</FormatElement> +</LC_FORMAT> +<LC_COLLATION> +<Collator default="true" unoid="alphanumeric"/> +<CollationOptions> +<TransliterationModules>IGNORE_CASE</TransliterationModules> +</CollationOptions> +</LC_COLLATION> +<LC_SEARCH> +<SearchOptions> +<TransliterationModules>IGNORE_CASE</TransliterationModules> +</SearchOptions> +</LC_SEARCH> +<LC_INDEX> +<IndexKey phonetic="false" default="true" unoid="alphanumeric">[A B C Č D Ḍ E F G Ǧ H Ḥ I J K L M N P Q Γ R Ṛ S Ṣ T Ṭ U W X Y Z Ẓ Σ]</IndexKey> +<UnicodeScript>0</UnicodeScript> +<UnicodeScript>1</UnicodeScript> +<FollowPageWord>sb.dw</FollowPageWord> +<FollowPageWord>ib.dw</FollowPageWord> +</LC_INDEX> +<LC_CALENDAR> +<Calendar unoid="gregorian" default="true"> +<DaysOfWeek> +<Day> +<DayID>sun</DayID> +<DefaultAbbrvName>Yan</DefaultAbbrvName> +<DefaultFullName>Yanass</DefaultFullName> +</Day> +<Day> +<DayID>mon</DayID> +<DefaultAbbrvName>San</DefaultAbbrvName> +<DefaultFullName>Sanass</DefaultFullName> +</Day> +<Day> +<DayID>tue</DayID> +<DefaultAbbrvName>Kraḍ</DefaultAbbrvName> +<DefaultFullName>Kraḍass</DefaultFullName> +</Day> +<Day> +<DayID>wed</DayID> +<DefaultAbbrvName>Kuẓ</DefaultAbbrvName> +<DefaultFullName>Kuẓass</DefaultFullName> +</Day> +<Day> +<DayID>thu</DayID> +<DefaultAbbrvName>Sam</DefaultAbbrvName> +<DefaultFullName>Samass</DefaultFullName> +</Day> +<Day> +<DayID>fri</DayID> +<DefaultAbbrvName>Sḍis</DefaultAbbrvName> +<DefaultFullName>Sḍisass</DefaultFullName> +</Day> +<Day> +<DayID>sat</DayID> +<DefaultAbbrvName>Say</DefaultAbbrvName> +<DefaultFullName>Sayass</DefaultFullName> +</Day> +</DaysOfWeek> +<MonthsOfYear> +<Month> +<MonthID>jan</MonthID> +<DefaultAbbrvName>Yen</DefaultAbbrvName> +<DefaultFullName>Yennayer</DefaultFullName> +</Month> +<Month> +<MonthID>feb</MonthID> +<DefaultAbbrvName>Fur</DefaultAbbrvName> +<DefaultFullName>Fuṛar</DefaultFullName> +</Month> +<Month> +<MonthID>mar</MonthID> +<DefaultAbbrvName>Meɣ</DefaultAbbrvName> +<DefaultFullName>Meɣres</DefaultFullName> +</Month> +<Month> +<MonthID>apr</MonthID> +<DefaultAbbrvName>Yeb</DefaultAbbrvName> +<DefaultFullName>Yebrir</DefaultFullName> +</Month> +<Month> +<MonthID>may</MonthID> +<DefaultAbbrvName>May</DefaultAbbrvName> +<DefaultFullName>Mayyu</DefaultFullName> +</Month> +<Month> +<MonthID>jun</MonthID> +<DefaultAbbrvName>Yun</DefaultAbbrvName> +<DefaultFullName>Yunyu</DefaultFullName> +</Month> +<Month> +<MonthID>jul</MonthID> +<DefaultAbbrvName>Yul</DefaultAbbrvName> +<DefaultFullName>Yulyu</DefaultFullName> +</Month> +<Month> +<MonthID>aug</MonthID> +<DefaultAbbrvName>Ɣuc</DefaultAbbrvName> +<DefaultFullName>Ɣuct</DefaultFullName> +</Month> +<Month> +<MonthID>sep</MonthID> +<DefaultAbbrvName>Cte</DefaultAbbrvName> +<DefaultFullName>Ctembeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>oct</MonthID> +<DefaultAbbrvName>Tub</DefaultAbbrvName> +<DefaultFullName>Tubeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>nov</MonthID> +<DefaultAbbrvName>Nun</DefaultAbbrvName> +<DefaultFullName>Nunembeṛ</DefaultFullName> +</Month> +<Month> +<MonthID>dec</MonthID> +<DefaultAbbrvName>Duǧ</DefaultAbbrvName> +<DefaultFullName>Duǧembeṛ</DefaultFullName> +</Month> +</MonthsOfYear> +<Eras> +<Era> +<EraID>bc</EraID> +<DefaultAbbrvName>Snd.Σ</DefaultAbbrvName> +<DefaultFullName>Send Ɛisa</DefaultFullName> +</Era> +<Era> +<EraID>ad</EraID> +<DefaultAbbrvName>sld.Σ</DefaultAbbrvName> +<DefaultFullName>Seld Σisa</DefaultFullName> +</Era> +</Eras> +<StartDayOfWeek> +<DayID>sun</DayID> +</StartDayOfWeek> +<MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek> +</Calendar> +</LC_CALENDAR> +<LC_CURRENCY> +<Currency default="true" usedInCompatibleFormatCodes="true"> +<CurrencyID>DZD</CurrencyID> +<CurrencySymbol>DA</CurrencySymbol> +<BankSymbol>DZD</BankSymbol> +<CurrencyName>Adinar Azzayri</CurrencyName> +<DecimalPlaces>2</DecimalPlaces> +</Currency> +</LC_CURRENCY> +<LC_TRANSLITERATION> +<Transliteration unoid="LOWERCASE_UPPERCASE"/> +<Transliteration unoid="UPPERCASE_LOWERCASE"/> +<Transliteration unoid="IGNORE_CASE"/> +</LC_TRANSLITERATION> +<LC_MISC> +<ReservedWords> +<trueWord>ih</trueWord> +<falseWord>ala</falseWord> +<quarter1Word>akraḍaggur amenzu</quarter1Word> +<quarter2Word>akraḍaggur wis-sin</quarter2Word> +<quarter3Word>akraḍaggur wis-kraḍ</quarter3Word> +<quarter4Word>akraḍaggur wis-kuẓ</quarter4Word> +<aboveWord>Nnig</aboveWord> +<belowWord>Ddaw</belowWord> +<quarter1Abbreviation>Kḍg1</quarter1Abbreviation> +<quarter2Abbreviation>Kḍg2</quarter2Abbreviation> +<quarter3Abbreviation>Kḍg3</quarter3Abbreviation> +<quarter4Abbreviation>Kḍg4</quarter4Abbreviation> +</ReservedWords> +</LC_MISC> +<LC_NumberingLevel> +<NumberingLevel NumType="4" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="4" Prefix=" " Suffix="."/> +<NumberingLevel NumType="4" Prefix="(" Suffix=")"/> +<NumberingLevel NumType="2" Prefix=" " Suffix="."/> +<NumberingLevel NumType="0" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="1" Prefix=" " Suffix=")"/> +<NumberingLevel NumType="1" Prefix="(" Suffix=")"/> +<NumberingLevel NumType="3" Prefix=" " Suffix="."/> +</LC_NumberingLevel> +<LC_OutLineNumberingLevel ref="en_US"/> +</Locale> +<!--Version 1.0 --> diff --git a/i18npool/source/localedata/data/localedata_others.map b/i18npool/source/localedata/data/localedata_others.map index 46f4c4f74aea..de7a2312bfb9 100644 --- a/i18npool/source/localedata/data/localedata_others.map +++ b/i18npool/source/localedata/data/localedata_others.map @@ -33,6 +33,7 @@ getAllCalendars_ia; getAllCalendars_id_ID; getAllCalendars_ja_JP; getAllCalendars_jbo; +getAllCalendars_kab_DZ; getAllCalendars_kk_KZ; getAllCalendars_km_KH; getAllCalendars_kn_IN; @@ -56,6 +57,7 @@ getAllCalendars_om_ET; getAllCalendars_or_IN; getAllCalendars_pa_IN; getAllCalendars_plt_MG; +getAllCalendars_pt_AO; getAllCalendars_rw_RW; getAllCalendars_sg_CF; getAllCalendars_shs_CA; @@ -117,6 +119,7 @@ getAllCurrencies_ia; getAllCurrencies_id_ID; getAllCurrencies_ja_JP; getAllCurrencies_jbo; +getAllCurrencies_kab_DZ; getAllCurrencies_kk_KZ; getAllCurrencies_km_KH; getAllCurrencies_kn_IN; @@ -140,6 +143,7 @@ getAllCurrencies_om_ET; getAllCurrencies_or_IN; getAllCurrencies_pa_IN; getAllCurrencies_plt_MG; +getAllCurrencies_pt_AO; getAllCurrencies_rw_RW; getAllCurrencies_sg_CF; getAllCurrencies_shs_CA; @@ -201,6 +205,7 @@ getAllFormats0_ia; getAllFormats0_id_ID; getAllFormats0_ja_JP; getAllFormats0_jbo; +getAllFormats0_kab_DZ; getAllFormats0_kk_KZ; getAllFormats0_km_KH; getAllFormats0_kn_IN; @@ -224,6 +229,7 @@ getAllFormats0_om_ET; getAllFormats0_or_IN; getAllFormats0_pa_IN; getAllFormats0_plt_MG; +getAllFormats0_pt_AO; getAllFormats0_rw_RW; getAllFormats0_sg_CF; getAllFormats0_shs_CA; @@ -285,6 +291,7 @@ getBreakIteratorRules_ia; getBreakIteratorRules_id_ID; getBreakIteratorRules_ja_JP; getBreakIteratorRules_jbo; +getBreakIteratorRules_kab_DZ; getBreakIteratorRules_kk_KZ; getBreakIteratorRules_km_KH; getBreakIteratorRules_kn_IN; @@ -308,6 +315,7 @@ getBreakIteratorRules_om_ET; getBreakIteratorRules_or_IN; getBreakIteratorRules_pa_IN; getBreakIteratorRules_plt_MG; +getBreakIteratorRules_pt_AO; getBreakIteratorRules_rw_RW; getBreakIteratorRules_sg_CF; getBreakIteratorRules_shs_CA; @@ -369,6 +377,7 @@ getCollationOptions_ia; getCollationOptions_id_ID; getCollationOptions_ja_JP; getCollationOptions_jbo; +getCollationOptions_kab_DZ; getCollationOptions_kk_KZ; getCollationOptions_km_KH; getCollationOptions_kn_IN; @@ -392,6 +401,7 @@ getCollationOptions_om_ET; getCollationOptions_or_IN; getCollationOptions_pa_IN; getCollationOptions_plt_MG; +getCollationOptions_pt_AO; getCollationOptions_rw_RW; getCollationOptions_sg_CF; getCollationOptions_shs_CA; @@ -453,6 +463,7 @@ getCollatorImplementation_ia; getCollatorImplementation_id_ID; getCollatorImplementation_ja_JP; getCollatorImplementation_jbo; +getCollatorImplementation_kab_DZ; getCollatorImplementation_kk_KZ; getCollatorImplementation_km_KH; getCollatorImplementation_kn_IN; @@ -476,6 +487,7 @@ getCollatorImplementation_om_ET; getCollatorImplementation_or_IN; getCollatorImplementation_pa_IN; getCollatorImplementation_plt_MG; +getCollatorImplementation_pt_AO; getCollatorImplementation_rw_RW; getCollatorImplementation_sg_CF; getCollatorImplementation_shs_CA; @@ -537,6 +549,7 @@ getContinuousNumberingLevels_ia; getContinuousNumberingLevels_id_ID; getContinuousNumberingLevels_ja_JP; getContinuousNumberingLevels_jbo; +getContinuousNumberingLevels_kab_DZ; getContinuousNumberingLevels_kk_KZ; getContinuousNumberingLevels_km_KH; getContinuousNumberingLevels_kn_IN; @@ -560,6 +573,7 @@ getContinuousNumberingLevels_om_ET; getContinuousNumberingLevels_or_IN; getContinuousNumberingLevels_pa_IN; getContinuousNumberingLevels_plt_MG; +getContinuousNumberingLevels_pt_AO; getContinuousNumberingLevels_rw_RW; getContinuousNumberingLevels_sg_CF; getContinuousNumberingLevels_shs_CA; @@ -621,6 +635,7 @@ getFollowPageWords_ia; getFollowPageWords_id_ID; getFollowPageWords_ja_JP; getFollowPageWords_jbo; +getFollowPageWords_kab_DZ; getFollowPageWords_kk_KZ; getFollowPageWords_km_KH; getFollowPageWords_kn_IN; @@ -644,6 +659,7 @@ getFollowPageWords_om_ET; getFollowPageWords_or_IN; getFollowPageWords_pa_IN; getFollowPageWords_plt_MG; +getFollowPageWords_pt_AO; getFollowPageWords_rw_RW; getFollowPageWords_sg_CF; getFollowPageWords_shs_CA; @@ -705,6 +721,7 @@ getForbiddenCharacters_ia; getForbiddenCharacters_id_ID; getForbiddenCharacters_ja_JP; getForbiddenCharacters_jbo; +getForbiddenCharacters_kab_DZ; getForbiddenCharacters_kk_KZ; getForbiddenCharacters_km_KH; getForbiddenCharacters_kn_IN; @@ -728,6 +745,7 @@ getForbiddenCharacters_om_ET; getForbiddenCharacters_or_IN; getForbiddenCharacters_pa_IN; getForbiddenCharacters_plt_MG; +getForbiddenCharacters_pt_AO; getForbiddenCharacters_rw_RW; getForbiddenCharacters_sg_CF; getForbiddenCharacters_shs_CA; @@ -789,6 +807,7 @@ getIndexAlgorithm_ia; getIndexAlgorithm_id_ID; getIndexAlgorithm_ja_JP; getIndexAlgorithm_jbo; +getIndexAlgorithm_kab_DZ; getIndexAlgorithm_kk_KZ; getIndexAlgorithm_km_KH; getIndexAlgorithm_kn_IN; @@ -812,6 +831,7 @@ getIndexAlgorithm_om_ET; getIndexAlgorithm_or_IN; getIndexAlgorithm_pa_IN; getIndexAlgorithm_plt_MG; +getIndexAlgorithm_pt_AO; getIndexAlgorithm_rw_RW; getIndexAlgorithm_sg_CF; getIndexAlgorithm_shs_CA; @@ -873,6 +893,7 @@ getLCInfo_ia; getLCInfo_id_ID; getLCInfo_ja_JP; getLCInfo_jbo; +getLCInfo_kab_DZ; getLCInfo_kk_KZ; getLCInfo_km_KH; getLCInfo_kn_IN; @@ -896,6 +917,7 @@ getLCInfo_om_ET; getLCInfo_or_IN; getLCInfo_pa_IN; getLCInfo_plt_MG; +getLCInfo_pt_AO; getLCInfo_rw_RW; getLCInfo_sg_CF; getLCInfo_shs_CA; @@ -957,6 +979,7 @@ getLocaleItem_ia; getLocaleItem_id_ID; getLocaleItem_ja_JP; getLocaleItem_jbo; +getLocaleItem_kab_DZ; getLocaleItem_kk_KZ; getLocaleItem_km_KH; getLocaleItem_kn_IN; @@ -980,6 +1003,7 @@ getLocaleItem_om_ET; getLocaleItem_or_IN; getLocaleItem_pa_IN; getLocaleItem_plt_MG; +getLocaleItem_pt_AO; getLocaleItem_rw_RW; getLocaleItem_sg_CF; getLocaleItem_shs_CA; @@ -1041,6 +1065,7 @@ getOutlineNumberingLevels_ia; getOutlineNumberingLevels_id_ID; getOutlineNumberingLevels_ja_JP; getOutlineNumberingLevels_jbo; +getOutlineNumberingLevels_kab_DZ; getOutlineNumberingLevels_kk_KZ; getOutlineNumberingLevels_km_KH; getOutlineNumberingLevels_kn_IN; @@ -1064,6 +1089,7 @@ getOutlineNumberingLevels_om_ET; getOutlineNumberingLevels_or_IN; getOutlineNumberingLevels_pa_IN; getOutlineNumberingLevels_plt_MG; +getOutlineNumberingLevels_pt_AO; getOutlineNumberingLevels_rw_RW; getOutlineNumberingLevels_sg_CF; getOutlineNumberingLevels_shs_CA; @@ -1125,6 +1151,7 @@ getReservedWords_ia; getReservedWords_id_ID; getReservedWords_ja_JP; getReservedWords_jbo; +getReservedWords_kab_DZ; getReservedWords_kk_KZ; getReservedWords_km_KH; getReservedWords_kn_IN; @@ -1148,6 +1175,7 @@ getReservedWords_om_ET; getReservedWords_or_IN; getReservedWords_pa_IN; getReservedWords_plt_MG; +getReservedWords_pt_AO; getReservedWords_rw_RW; getReservedWords_sg_CF; getReservedWords_shs_CA; @@ -1209,6 +1237,7 @@ getSearchOptions_ia; getSearchOptions_id_ID; getSearchOptions_ja_JP; getSearchOptions_jbo; +getSearchOptions_kab_DZ; getSearchOptions_kk_KZ; getSearchOptions_km_KH; getSearchOptions_kn_IN; @@ -1232,6 +1261,7 @@ getSearchOptions_om_ET; getSearchOptions_or_IN; getSearchOptions_pa_IN; getSearchOptions_plt_MG; +getSearchOptions_pt_AO; getSearchOptions_rw_RW; getSearchOptions_sg_CF; getSearchOptions_shs_CA; @@ -1293,6 +1323,7 @@ getTransliterations_ia; getTransliterations_id_ID; getTransliterations_ja_JP; getTransliterations_jbo; +getTransliterations_kab_DZ; getTransliterations_kk_KZ; getTransliterations_km_KH; getTransliterations_kn_IN; @@ -1316,6 +1347,7 @@ getTransliterations_om_ET; getTransliterations_or_IN; getTransliterations_pa_IN; getTransliterations_plt_MG; +getTransliterations_pt_AO; getTransliterations_rw_RW; getTransliterations_sg_CF; getTransliterations_shs_CA; @@ -1377,6 +1409,7 @@ getUnicodeScripts_ia; getUnicodeScripts_id_ID; getUnicodeScripts_ja_JP; getUnicodeScripts_jbo; +getUnicodeScripts_kab_DZ; getUnicodeScripts_kk_KZ; getUnicodeScripts_km_KH; getUnicodeScripts_kn_IN; @@ -1400,6 +1433,7 @@ getUnicodeScripts_om_ET; getUnicodeScripts_or_IN; getUnicodeScripts_pa_IN; getUnicodeScripts_plt_MG; +getUnicodeScripts_pt_AO; getUnicodeScripts_rw_RW; getUnicodeScripts_sg_CF; getUnicodeScripts_shs_CA; diff --git a/i18npool/source/localedata/data/makefile.mk b/i18npool/source/localedata/data/makefile.mk index 66a1fade3a9f..38595ee538e8 100644 --- a/i18npool/source/localedata/data/makefile.mk +++ b/i18npool/source/localedata/data/makefile.mk @@ -29,9 +29,6 @@ PRJ=..$/..$/.. PRJNAME=i18npool TARGET=localedata -.IF "$(GUI)" == "OS2" -TARGET=ld -.ENDIF LIBTARGET=NO # Disable debugging on MSC compilers, due linker bug @@ -60,9 +57,6 @@ LINK_LOCALEDATA_ES_LIB=-l$(SHL2TARGET) LINK_LOCALEDATA_EN_LIB=$(LB)$/i$(SHL1TARGET).lib LINK_LOCALEDATA_ES_LIB=$(LB)$/i$(SHL2TARGET).lib .ENDIF -.ELIF "$(GUI)" == "OS2" -LINK_LOCALEDATA_EN_LIB=$(LB)$/i$(SHL1TARGET).lib -LINK_LOCALEDATA_ES_LIB=$(LB)$/i$(SHL2TARGET).lib .ELSE LINK_LOCALEDATA_EN_LIB=-l$(SHL1TARGET) LINK_LOCALEDATA_ES_LIB=-l$(SHL2TARGET) @@ -72,9 +66,6 @@ LINK_LOCALEDATA_ES_LIB=-l$(SHL2TARGET) # English Locales SHL1TARGET=localedata_en -.IF "$(GUI)" == "OS2" -SHL1TARGET=ld_en -.ENDIF SHL1IMPLIB=i$(SHL1TARGET) SHL1VERSIONMAP=localedata_en.map @@ -102,9 +93,6 @@ LIB1OBJFILES=$(SHL1OBJS) # Spanish Locales SHL2TARGET=localedata_es -.IF "$(GUI)" == "OS2" -SHL2TARGET=ld_es -.ENDIF SHL2IMPLIB=i$(SHL2TARGET) SHL2VERSIONMAP=localedata_es.map @@ -140,9 +128,6 @@ LIB2OBJFILES=$(SHL2OBJS) # European Locales SHL3TARGET=localedata_euro -.IF "$(GUI)" == "OS2" -SHL3TARGET=ld_eur -.ENDIF SHL3IMPLIB=i$(SHL3TARGET) SHL3VERSIONMAP=localedata_euro.map @@ -229,9 +214,6 @@ LIB3OBJFILES=$(SHL3OBJS) # Other Locales SHL4TARGET=localedata_others -.IF "$(GUI)" == "OS2" -SHL4TARGET=ld_oth -.ENDIF SHL4IMPLIB=i$(SHL4TARGET) SHL4VERSIONMAP=localedata_others.map @@ -273,6 +255,7 @@ SHL4OBJS= \ $(SLO)$/localedata_id_ID.obj \ $(SLO)$/localedata_ja_JP.obj \ $(SLO)$/localedata_jbo.obj \ + $(SLO)$/localedata_kab_DZ.obj \ $(SLO)$/localedata_kk_KZ.obj \ $(SLO)$/localedata_km_KH.obj \ $(SLO)$/localedata_kn_IN.obj \ @@ -296,6 +279,7 @@ SHL4OBJS= \ $(SLO)$/localedata_or_IN.obj \ $(SLO)$/localedata_pa_IN.obj \ $(SLO)$/localedata_plt_MG.obj \ + $(SLO)$/localedata_pt_AO.obj \ $(SLO)$/localedata_rw_RW.obj \ $(SLO)$/localedata_sg_CF.obj \ $(SLO)$/localedata_shs_CA.obj \ @@ -342,11 +326,11 @@ MY_MISC_CXXFILES := $(foreach,i,$(DEPOBJFILES) $(MISC)/$(i:b).cxx) .INCLUDE : target.mk -$(MY_MISC_CXXFILES) : $(BIN)$/saxparser$(EXECPOST) $(MISC)/saxparser.rdb +$(MY_MISC_CXXFILES) : $(OUT_FOR_BUILD)$/bin$/saxparser$(EXECPOST) $(MISC)/saxparser.rdb $(MISC)$/localedata_%.cxx : %.xml - $(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(BIN)$/saxparser $* $< $@ \ - $(my_file)$(PWD)/$(MISC)/saxparser.rdb $(SOLARBINDIR)$/types.rdb \ + $(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(OUT_FOR_BUILD)$/bin$/saxparser $* $< $@ \ + $(my_file)$(PWD)/$(MISC_FOR_BUILD)/saxparser.rdb $(SOLARBINDIR)$/types.rdb \ -env:OOO_INBUILD_SHAREDLIB_DIR=$(my_file)$(SOLARSHAREDBIN) $(RM) $(BIN)$/$(@:b).rdb diff --git a/i18npool/source/localedata/data/mr_IN.xml b/i18npool/source/localedata/data/mr_IN.xml index efc238f04a2a..efc238f04a2a 100755..100644 --- a/i18npool/source/localedata/data/mr_IN.xml +++ b/i18npool/source/localedata/data/mr_IN.xml diff --git a/i18npool/source/localedata/data/pt_AO.xml b/i18npool/source/localedata/data/pt_AO.xml new file mode 100644 index 000000000000..f1bb92becf05 --- /dev/null +++ b/i18npool/source/localedata/data/pt_AO.xml @@ -0,0 +1,373 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE Locale SYSTEM 'locale.dtd'> +<Locale versionDTD="2.0.3" allowUpdateFromCLDR="no" version="1.2"> +<LC_INFO> +<Language> +<LangID>pt</LangID> +<DefaultName>Portuguese</DefaultName> +</Language> +<Country> +<CountryID>AO</CountryID> +<DefaultName>Angola</DefaultName> +</Country> +</LC_INFO> +<LC_CTYPE unoid="generic"> +<Separators> +<DateSeparator>-</DateSeparator> +<ThousandSeparator>.</ThousandSeparator> +<DecimalSeparator>,</DecimalSeparator> +<TimeSeparator>:</TimeSeparator> +<Time100SecSeparator>,</Time100SecSeparator> +<ListSeparator>;</ListSeparator> +<LongDateDayOfWeekSeparator>, </LongDateDayOfWeekSeparator> +<LongDateDaySeparator> de </LongDateDaySeparator> +<LongDateMonthSeparator> de </LongDateMonthSeparator> +<LongDateYearSeparator> </LongDateYearSeparator> +</Separators> +<Markers> +<QuotationStart>‘</QuotationStart> +<QuotationEnd>’</QuotationEnd> +<DoubleQuotationStart>“</DoubleQuotationStart> +<DoubleQuotationEnd>”</DoubleQuotationEnd> +</Markers> +<TimeAM>AM</TimeAM> +<TimePM>PM</TimePM> +<MeasurementSystem>Metric</MeasurementSystem> +</LC_CTYPE> +<LC_FORMAT> +<FormatElement msgid="DateFormatskey1" default="true" type="short" usage="DATE" formatindex="18"> +<FormatCode>DD-MM-AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey2" default="false" type="medium" usage="DATE" formatindex="28"> +<FormatCode>NN DD-MMM AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey3" default="false" type="medium" usage="DATE" formatindex="34"> +<FormatCode>MM-AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey4" default="false" type="medium" usage="DATE" formatindex="35"> +<FormatCode>DD-MMM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey5" default="false" type="medium" usage="DATE" formatindex="36"> +<FormatCode>MMMM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey6" default="false" type="medium" usage="DATE" formatindex="37"> +<FormatCode>QQ AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="21"> +<FormatCode>DD-MM-AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey8" default="true" type="medium" usage="DATE" formatindex="20"> +<FormatCode>DD-MM-AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey9" default="true" type="long" usage="DATE" formatindex="19"> +<FormatCode>NNNND "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey10" default="false" type="long" usage="DATE" formatindex="22"> +<FormatCode>D "de" MMM "de" AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey11" default="false" type="long" usage="DATE" formatindex="23"> +<FormatCode>D "de" MMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="25"> +<FormatCode>D "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="27"> +<FormatCode>NN, D "de" MMM "de" AA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey14" default="false" type="long" usage="DATE" formatindex="29"> +<FormatCode>NN, D "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey15" default="false" type="long" usage="DATE" formatindex="30"> +<FormatCode>NNNND "de" MMMM "de" AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey16" default="false" type="long" usage="DATE" formatindex="24"> +<FormatCode>D. MMM. AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey17" default="false" type="long" usage="DATE" formatindex="26"> +<FormatCode>D. MMMM AAAA</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey18" default="false" type="short" usage="DATE" formatindex="31"> +<FormatCode>MM-DD</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey19" default="false" type="medium" usage="DATE" formatindex="32"> +<FormatCode>AA-MM-DD</FormatCode> +<DefaultName>ISO 8601 (EN 28601)</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="33"> +<FormatCode>AAAA-MM-DD</FormatCode> +<DefaultName>ISO 8601 (EN 28601)</DefaultName> +</FormatElement> +<FormatElement msgid="DateFormatskey21" default="false" type="medium" usage="DATE" formatindex="38"> +<FormatCode>WW</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey1" default="true" type="short" usage="TIME" formatindex="39"> +<FormatCode>HH:MM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey2" default="true" type="medium" usage="TIME" formatindex="40"> +<FormatCode>HH:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey3" default="false" type="short" usage="TIME" formatindex="41"> +<FormatCode>HH:MM AM/PM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey4" default="false" type="medium" usage="TIME" formatindex="42"> +<FormatCode>HH:MM:SS AM/PM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey5" default="false" type="medium" usage="TIME" formatindex="43"> +<FormatCode>[HH]:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey6" default="false" type="short" usage="TIME" formatindex="44"> +<FormatCode>MM:SS,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="TimeFormatskey7" default="false" type="medium" usage="TIME" formatindex="45"> +<FormatCode>[HH]:MM:SS,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey1" default="true" type="medium" usage="DATE_TIME" formatindex="46"> +<FormatCode>DD-MM-AA HH:MM</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="DateTimeFormatskey2" default="false" type="medium" usage="DATE_TIME" formatindex="47"> +<FormatCode>DD-MM-AAAA HH:MM:SS</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey1" default="true" type="medium" usage="FIXED_NUMBER" formatindex="0"> +<FormatCode>Estandar</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey2" default="true" type="short" usage="FIXED_NUMBER" formatindex="1"> +<FormatCode>0</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey3" default="false" type="medium" usage="FIXED_NUMBER" formatindex="2"> +<FormatCode>0,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey4" default="false" type="short" usage="FIXED_NUMBER" formatindex="3"> +<FormatCode>#.##0</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey5" default="false" type="medium" usage="FIXED_NUMBER" formatindex="4"> +<FormatCode>#.##0,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="FixedFormatskey6" default="false" type="medium" usage="FIXED_NUMBER" formatindex="5"> +<FormatCode>#.###,00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> +<FormatCode>#.##0 [$Kz-816];-#.##0 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13"> +<FormatCode>#.##0,00 [$Kz-816];-#.##0,00 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14"> +<FormatCode>#.##0 [$Kz-816];[RED]-#.##0 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15"> +<FormatCode>#.##0,00 [$Kz-816];[RED]-#.##0,00 [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16"> +<FormatCode>#.##0,00 CCC</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17"> +<FormatCode>#.##0,-- [$Kz-816];[RED]-#.##0,-- [$Kz-816]</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> +<FormatCode>0%</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="PercentFormatskey2" default="true" type="long" usage="PERCENT_NUMBER" formatindex="9"> +<FormatCode>0,00%</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="ScientificFormatskey1" default="true" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="6"> +<FormatCode>0,00E+000</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +<FormatElement msgid="ScientificFormatskey2" default="false" type="medium" usage="SCIENTIFIC_NUMBER" formatindex="7"> +<FormatCode>0,00E+00</FormatCode> +<DefaultName></DefaultName> +</FormatElement> +</LC_FORMAT> +<LC_COLLATION ref="en_US"/> +<LC_SEARCH ref="en_US"/> +<LC_INDEX ref="en_US"/> +<LC_CALENDAR> +<Calendar unoid="gregorian" default="true"> +<DaysOfWeek> +<Day> +<DayID>sun</DayID> +<DefaultAbbrvName>Dom</DefaultAbbrvName> +<DefaultFullName>Domingo</DefaultFullName> +</Day> +<Day> +<DayID>mon</DayID> +<DefaultAbbrvName>Seg</DefaultAbbrvName> +<DefaultFullName>Segunda-feira</DefaultFullName> +</Day> +<Day> +<DayID>tue</DayID> +<DefaultAbbrvName>Ter</DefaultAbbrvName> +<DefaultFullName>Terça-feira</DefaultFullName> +</Day> +<Day> +<DayID>wed</DayID> +<DefaultAbbrvName>Qua</DefaultAbbrvName> +<DefaultFullName>Quarta-feira</DefaultFullName> +</Day> +<Day> +<DayID>thu</DayID> +<DefaultAbbrvName>Qui</DefaultAbbrvName> +<DefaultFullName>Quinta-feira</DefaultFullName> +</Day> +<Day> +<DayID>fri</DayID> +<DefaultAbbrvName>Sex</DefaultAbbrvName> +<DefaultFullName>Sexta-feira</DefaultFullName> +</Day> +<Day> +<DayID>sat</DayID> +<DefaultAbbrvName>Sáb</DefaultAbbrvName> +<DefaultFullName>Sábado</DefaultFullName> +</Day> +</DaysOfWeek> +<MonthsOfYear> +<Month> +<MonthID>jan</MonthID> +<DefaultAbbrvName>Jan</DefaultAbbrvName> +<DefaultFullName>Janeiro</DefaultFullName> +</Month> +<Month> +<MonthID>feb</MonthID> +<DefaultAbbrvName>Fev</DefaultAbbrvName> +<DefaultFullName>Fevereiro</DefaultFullName> +</Month> +<Month> +<MonthID>mar</MonthID> +<DefaultAbbrvName>Mar</DefaultAbbrvName> +<DefaultFullName>Março</DefaultFullName> +</Month> +<Month> +<MonthID>apr</MonthID> +<DefaultAbbrvName>Abr</DefaultAbbrvName> +<DefaultFullName>Abril</DefaultFullName> +</Month> +<Month> +<MonthID>may</MonthID> +<DefaultAbbrvName>Mai</DefaultAbbrvName> +<DefaultFullName>Maio</DefaultFullName> +</Month> +<Month> +<MonthID>jun</MonthID> +<DefaultAbbrvName>Jun</DefaultAbbrvName> +<DefaultFullName>Junho</DefaultFullName> +</Month> +<Month> +<MonthID>jul</MonthID> +<DefaultAbbrvName>Jul</DefaultAbbrvName> +<DefaultFullName>Julho</DefaultFullName> +</Month> +<Month> +<MonthID>aug</MonthID> +<DefaultAbbrvName>Ago</DefaultAbbrvName> +<DefaultFullName>Agosto</DefaultFullName> +</Month> +<Month> +<MonthID>sep</MonthID> +<DefaultAbbrvName>Set</DefaultAbbrvName> +<DefaultFullName>Setembro</DefaultFullName> +</Month> +<Month> +<MonthID>oct</MonthID> +<DefaultAbbrvName>Out</DefaultAbbrvName> +<DefaultFullName>Outubro</DefaultFullName> +</Month> +<Month> +<MonthID>nov</MonthID> +<DefaultAbbrvName>Nov</DefaultAbbrvName> +<DefaultFullName>Novembro</DefaultFullName> +</Month> +<Month> +<MonthID>dec</MonthID> +<DefaultAbbrvName>Dez</DefaultAbbrvName> +<DefaultFullName>Dezembro</DefaultFullName> +</Month> +</MonthsOfYear> +<Eras> +<Era> +<EraID>bc</EraID> +<DefaultAbbrvName>BC</DefaultAbbrvName> +<DefaultFullName>BC</DefaultFullName> +</Era> +<Era> +<EraID>ad</EraID> +<DefaultAbbrvName>AD</DefaultAbbrvName> +<DefaultFullName>AD</DefaultFullName> +</Era> +</Eras> +<StartDayOfWeek> +<DayID>mon</DayID> +</StartDayOfWeek> +<MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek> +</Calendar> +</LC_CALENDAR> +<LC_CURRENCY> +<Currency default="true" usedInCompatibleFormatCodes="true"> +<CurrencyID>AOA</CurrencyID> +<CurrencySymbol>Kz</CurrencySymbol> +<BankSymbol>AOA</BankSymbol> +<CurrencyName>Kwanza</CurrencyName> +<DecimalPlaces>2</DecimalPlaces> +</Currency> +</LC_CURRENCY> +<LC_TRANSLITERATION ref="en_US"/> +<LC_MISC> +<ReservedWords> +<trueWord>verdadeiro</trueWord> +<falseWord>falso</falseWord> +<quarter1Word>1º trimestre</quarter1Word> +<quarter2Word>2º trimestre</quarter2Word> +<quarter3Word>3º trimestre</quarter3Word> +<quarter4Word>4º trimestre</quarter4Word> +<aboveWord>acima</aboveWord> +<belowWord>abaixo</belowWord> +<quarter1Abbreviation>T1</quarter1Abbreviation> +<quarter2Abbreviation>T2</quarter2Abbreviation> +<quarter3Abbreviation>T3</quarter3Abbreviation> +<quarter4Abbreviation>T4</quarter4Abbreviation> +</ReservedWords> +</LC_MISC> +<LC_NumberingLevel ref="en_US"/> +<LC_OutLineNumberingLevel ref="en_US"/> +</Locale> diff --git a/i18npool/source/localedata/data/zh_TW.xml b/i18npool/source/localedata/data/zh_TW.xml index aa53647057f8..3d997136b73c 100644 --- a/i18npool/source/localedata/data/zh_TW.xml +++ b/i18npool/source/localedata/data/zh_TW.xml @@ -129,11 +129,11 @@ <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey7" default="false" type="medium" usage="DATE" formatindex="24"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey8" default="false" type="long" usage="DATE" formatindex="25"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey9" default="false" type="long" usage="DATE" formatindex="26"> @@ -149,11 +149,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey12" default="false" type="long" usage="DATE" formatindex="29"> -<FormatCode>GGE"年"M"月"D"日" NNNN</FormatCode> +<FormatCode>GGEE"年"M"月"D"日" NNNN</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey13" default="false" type="long" usage="DATE" formatindex="30"> -<FormatCode>GGGE"年"M"月"D"日" NNNN</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日" NNNN</FormatCode> <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="DateFormatskey14" default="true" type="short" usage="DATE" formatindex="31"> @@ -161,11 +161,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey15" default="false" type="medium" usage="DATE" formatindex="32"> -<FormatCode>E"年"M"月"D"日"</FormatCode> +<FormatCode>EE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey16" default="false" type="medium" usage="DATE" formatindex="33"> -<FormatCode>GGGE"年"M"月"D"日"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey17" default="false" type="short" usage="DATE" formatindex="34"> @@ -181,7 +181,7 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey20" default="false" type="medium" usage="DATE" formatindex="37"> -<FormatCode>GGE"年度"QQ</FormatCode> +<FormatCode>GGEE"年度"QQ</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateFormatskey21" default="false" type="short" usage="DATE" formatindex="38"> @@ -251,7 +251,7 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey3" default="true" type="long" usage="DATE_TIME" formatindex="56"> -<FormatCode>E"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>EE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey4" default="false" type="long" usage="DATE_TIME" formatindex="57"> @@ -259,11 +259,11 @@ <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey5" default="false" type="long" usage="DATE_TIME" formatindex="58"> -<FormatCode>GGE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>GGEE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey6" default="false" type="long" usage="DATE_TIME" formatindex="59"> -<FormatCode>GGGE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> +<FormatCode>GGGEE"年"M"月"D"日" HH"時"MM"分"SS"秒"</FormatCode> <DefaultName/> </FormatElement> <FormatElement msgid="DateTimeFormatskey7" default="false" type="long" usage="DATE_TIME" formatindex="60"> diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index 04af1e091954..9b81e3383d63 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -143,14 +144,14 @@ void OFileWriter::writeIntParameter(const sal_Char* pAsciiStr, const sal_Int16 c bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str, sal_Int16 count) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s%d[] = {%d};\n", pAsciiStr, count, bBool); return bBool; } bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s[] = {%d};\n", pAsciiStr, bBool); return bBool; } @@ -211,3 +212,4 @@ void OFileWriter::closeOutput(void) const } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 8906a3433bea..d011865a7e35 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,12 +35,15 @@ #include <string.h> #include <stdio.h> #include "rtl/instance.hxx" +#include <sal/macros.h> using namespace com::sun::star::i18n; using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; static const sal_Char clocaledata[] = "com.sun.star.i18n.LocaleData"; @@ -48,17 +52,10 @@ typedef sal_Unicode*** (SAL_CALL * MyFunc_Type2)( sal_Int16&, sal_Int16& ); typedef sal_Unicode**** (SAL_CALL * MyFunc_Type3)( sal_Int16&, sal_Int16&, sal_Int16& ); typedef sal_Unicode const * const * (SAL_CALL * MyFunc_FormatCode)( sal_Int16&, sal_Unicode const *&, sal_Unicode const *& ); -#ifdef OS2 // YD 8.3!! -static const char *lcl_DATA_EN = "ld_en"; -static const char *lcl_DATA_ES = "ld_es"; -static const char *lcl_DATA_EURO = "ld_eur"; -static const char *lcl_DATA_OTHERS = "ld_oth"; -#else static const char *lcl_DATA_EN = "localedata_en"; static const char *lcl_DATA_ES = "localedata_es"; static const char *lcl_DATA_EURO = "localedata_euro"; static const char *lcl_DATA_OTHERS = "localedata_others"; -#endif static const struct { const char* pLocale; @@ -257,12 +254,14 @@ static const struct { { "lif_NP", lcl_DATA_OTHERS }, { "ur_PK", lcl_DATA_OTHERS }, { "ht_HT", lcl_DATA_OTHERS }, - { "jbo", lcl_DATA_OTHERS } + { "jbo", lcl_DATA_OTHERS }, + { "kab_DZ", lcl_DATA_OTHERS }, + { "pt_AO", lcl_DATA_OTHERS } }; static const sal_Unicode under = sal_Unicode('_'); -static const sal_Int16 nbOfLocales = sizeof(aLibTable) / sizeof(aLibTable[0]); +static const sal_Int16 nbOfLocales = SAL_N_ELEMENTS(aLibTable); struct LocaleDataLookupTableItem { @@ -291,12 +290,12 @@ LocaleData::~LocaleData() LocaleDataItem SAL_CALL LocaleData::getLocaleItem( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 dataItemCount = 0; sal_Unicode **dataItem = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLocaleItem" ); if ( func ) { + sal_Int16 dataItemCount = 0; dataItem = func(dataItemCount); LocaleDataItem item( @@ -436,8 +435,8 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( if ( module->loadRelative(&thisModule, aBuf.makeStringAndClear()) ) { ::osl::MutexGuard aGuard( maMutex ); - LocaleDataLookupTableItem* pNewItem = 0; - maLookupTable.push_back(pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale )); + LocaleDataLookupTableItem* pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale); + maLookupTable.push_back(pNewItem); OSL_ASSERT( pOutCachedItem ); if( pOutCachedItem ) { @@ -463,7 +462,7 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( #define REF_ERAS 2 Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name, - const Locale& rLocale, const Sequence< Calendar >& calendarsSeq, sal_Int16 len, sal_Int16 item) + const Locale& rLocale, const Sequence< Calendar >& calendarsSeq, sal_Int16 item) throw(RuntimeException) { if (!ref_name.equals(name)) { @@ -476,7 +475,6 @@ Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name cals = calendarsSeq; } else { cals = getAllCalendars(loc); - len = sal::static_int_cast<sal_Int16>( cals.getLength() ); } const OUString& id = name.getToken(0, under, index); for (index = 0; index < cals.getLength(); index++) { @@ -488,7 +486,7 @@ Sequence< CalendarItem > &LocaleData::getCalendarItemByName(const OUString& name // Refered locale does not found, return name for en_US locale. if (index == cals.getLength()) { cals = getAllCalendars( - Locale(OUString::createFromAscii("en"), OUString::createFromAscii("US"), OUString())); + Locale(OUString(RTL_CONSTASCII_USTRINGPARAM("en")), OUString(RTL_CONSTASCII_USTRINGPARAM("US")), OUString())); if (cals.getLength() > 0) ref_cal = cals[0]; else @@ -504,12 +502,12 @@ Sequence< Calendar > SAL_CALL LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 calendarsCount = 0; sal_Unicode **allCalendars = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCalendars" ); if ( func ) { + sal_Int16 calendarsCount = 0; allCalendars = func(calendarsCount); Sequence< Calendar > calendarsSeq(calendarsCount); @@ -523,8 +521,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset++; sal_Bool defaultCalendar = sal::static_int_cast<sal_Bool>( allCalendars[offset][0] ); offset++; - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - days = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_DAYS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + days = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_DAYS); offset += 2; } else { for(j = 0; j < allCalendars[0][i]; j++) { @@ -534,8 +532,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - months = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_MONTHS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + months = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_MONTHS); offset += 2; } else { for(j = 0; j < allCalendars[1][i]; j++) { @@ -545,8 +543,8 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { - eras = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_ERAS); + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { + eras = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, REF_ERAS); offset += 2; } else { for(j = 0; j < allCalendars[2][i]; j++) { @@ -576,13 +574,12 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) Sequence< Currency2 > SAL_CALL LocaleData::getAllCurrencies2( const Locale& rLocale ) throw(RuntimeException) { - - sal_Int16 currencyCount = 0; sal_Unicode **allCurrencies = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCurrencies" ); if ( func ) { + sal_Int16 currencyCount = 0; allCurrencies = func(currencyCount); Sequence< Currency2 > seq(currencyCount); @@ -680,14 +677,9 @@ LocaleData::getAllFormats( const Locale& rLocale ) throw(RuntimeException) } } section[SECTIONS]; -#if 0 -// #i79398# wntmsci10 MSVC doesn't get this right with optimization. - const sal_Int32 formatCount = section[0].getFunc( *this, rLocale, "getAllFormats0") - + section[1].getFunc( *this, rLocale, "getAllFormats1"); -#else sal_Int32 formatCount = section[0].getFunc( *this, rLocale, "getAllFormats0"); formatCount += section[1].getFunc( *this, rLocale, "getAllFormats1"); -#endif + Sequence< FormatElement > seq(formatCount); sal_Int32 f = 0; for (int s = 0; s < SECTIONS; ++s) @@ -735,12 +727,12 @@ LocaleData::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString& a Sequence< Implementation > SAL_CALL LocaleData::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 collatorCount = 0; sal_Unicode **collatorArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollatorImplementation" ); if ( func ) { + sal_Int16 collatorCount = 0; collatorArray = func(collatorCount); Sequence< Implementation > seq(collatorCount); for(sal_Int16 i = 0; i < collatorCount; i++) { @@ -760,12 +752,12 @@ LocaleData::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeExc Sequence< OUString > SAL_CALL LocaleData::getCollationOptions( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 optionsCount = 0; sal_Unicode **optionsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollationOptions" ); if ( func ) { + sal_Int16 optionsCount = 0; optionsArray = func(optionsCount); Sequence< OUString > seq(optionsCount); for(sal_Int16 i = 0; i < optionsCount; i++) { @@ -782,12 +774,12 @@ LocaleData::getCollationOptions( const Locale& rLocale ) throw(RuntimeException) Sequence< OUString > SAL_CALL LocaleData::getSearchOptions( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 optionsCount = 0; sal_Unicode **optionsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getSearchOptions" ); if ( func ) { + sal_Int16 optionsCount = 0; optionsArray = func(optionsCount); Sequence< OUString > seq(optionsCount); for(sal_Int16 i = 0; i < optionsCount; i++) { @@ -885,7 +877,7 @@ OUString SAL_CALL LocaleData::getIndexKeysByAlgorithm( const Locale& rLocale, const OUString& algorithm ) throw(RuntimeException) { sal_Unicode **indexArray = getIndexArrayForAlgorithm(rLocale, algorithm); - return indexArray ? OUString::createFromAscii("0-9")+OUString(indexArray[2]) : OUString(); + return indexArray ? OUString(RTL_CONSTASCII_USTRINGPARAM("0-9"))+OUString(indexArray[2]) : OUString(); } OUString SAL_CALL @@ -898,12 +890,12 @@ LocaleData::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString& al Sequence< UnicodeScript > SAL_CALL LocaleData::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 scriptCount = 0; sal_Unicode **scriptArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getUnicodeScripts" ); if ( func ) { + sal_Int16 scriptCount = 0; scriptArray = func(scriptCount); Sequence< UnicodeScript > seq(scriptCount); for(sal_Int16 i = 0; i < scriptCount; i++) { @@ -920,12 +912,12 @@ LocaleData::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException) Sequence< OUString > SAL_CALL LocaleData::getFollowPageWords( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 wordCount = 0; sal_Unicode **wordArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getFollowPageWords" ); if ( func ) { + sal_Int16 wordCount = 0; wordArray = func(wordCount); Sequence< OUString > seq(wordCount); for(sal_Int16 i = 0; i < wordCount; i++) { @@ -943,12 +935,12 @@ Sequence< OUString > SAL_CALL LocaleData::getTransliterations( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 transliterationsCount = 0; sal_Unicode **transliterationsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getTransliterations" ); if ( func ) { + sal_Int16 transliterationsCount = 0; transliterationsArray = func(transliterationsCount); Sequence< OUString > seq(transliterationsCount); @@ -970,12 +962,13 @@ LocaleData::getTransliterations( const Locale& rLocale ) throw(RuntimeException) LanguageCountryInfo SAL_CALL LocaleData::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCInfoCount = 0; + sal_Unicode **LCInfoArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLCInfo" ); if ( func ) { + sal_Int16 LCInfoCount = 0; LCInfoArray = func(LCInfoCount); LanguageCountryInfo info(LCInfoArray[0], LCInfoArray[1], @@ -995,12 +988,12 @@ LocaleData::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeExcepti ForbiddenCharacters SAL_CALL LocaleData::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCForbiddenCharactersCount = 0; sal_Unicode **LCForbiddenCharactersArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" ); if ( func ) { + sal_Int16 LCForbiddenCharactersCount = 0; LCForbiddenCharactersArray = func(LCForbiddenCharactersCount); ForbiddenCharacters chars(LCForbiddenCharactersArray[0], LCForbiddenCharactersArray[1]); return chars; @@ -1014,12 +1007,12 @@ LocaleData::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeExcepti OUString SAL_CALL LocaleData::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCForbiddenCharactersCount = 0; sal_Unicode **LCForbiddenCharactersArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" ); if ( func ) { + sal_Int16 LCForbiddenCharactersCount = 0; LCForbiddenCharactersArray = func(LCForbiddenCharactersCount); return OUString(LCForbiddenCharactersArray[2]); } @@ -1030,12 +1023,12 @@ LocaleData::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException Sequence< OUString > SAL_CALL LocaleData::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCBreakIteratorRuleCount = 0; sal_Unicode **LCBreakIteratorRulesArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getBreakIteratorRules" ); if ( func ) { + sal_Int16 LCBreakIteratorRuleCount = 0; LCBreakIteratorRulesArray = func(LCBreakIteratorRuleCount); Sequence< OUString > seq(LCBreakIteratorRuleCount); for(int i = 0; i < (LCBreakIteratorRuleCount); i++) { @@ -1054,12 +1047,12 @@ LocaleData::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeExcepti Sequence< OUString > SAL_CALL LocaleData::getReservedWord( const Locale& rLocale ) throw(RuntimeException) { - sal_Int16 LCReservedWordsCount = 0; sal_Unicode **LCReservedWordsArray = NULL; MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getReservedWords" ); if ( func ) { + sal_Int16 LCReservedWordsCount = 0; LCReservedWordsArray = func(LCReservedWordsCount); Sequence< OUString > seq(LCReservedWordsCount); for(int i = 0; i < (LCReservedWordsCount); i++) { @@ -1084,13 +1077,12 @@ OUString C2U( const char* s ) Sequence< Sequence<beans::PropertyValue> > SAL_CALL LocaleData::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) { - int i; - // load symbol MyFunc_Type2 func = (MyFunc_Type2) getFunctionSymbol( rLocale, "getContinuousNumberingLevels" ); if ( func ) { + int i; // invoke function sal_Int16 nStyles; sal_Int16 nAttributes; @@ -1150,9 +1142,8 @@ LocaleData::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(Ru return seq1; } -// ============================================================================ -// \/ OutlineNumbering helper class \/ -// +// OutlineNumbering helper class + #include <com/sun/star/container/XIndexAccess.hpp> #include <cppuhelper/implbase1.hxx> @@ -1174,13 +1165,14 @@ struct OutlineNumberingLevel_Impl OUString sTransliteration; sal_Int32 nNatNum; }; -//----------------------------------------------------------------------------- + class OutlineNumbering : public cppu::WeakImplHelper1 < container::XIndexAccess > { + // OutlineNumbering helper class + const OutlineNumberingLevel_Impl* m_pOutlineLevels; sal_Int16 m_nCount; public: -// OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlineLevels); OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlineLevels, int nLevels); ~OutlineNumbering(); @@ -1194,10 +1186,6 @@ public: virtual sal_Bool SAL_CALL hasElements( ) throw(RuntimeException); }; -// -// OutlineNumbering helper class -// ============================================================================ - static sal_Char* U2C( OUString str ) { @@ -1213,13 +1201,12 @@ sal_Char* U2C( OUString str ) Sequence< Reference<container::XIndexAccess> > SAL_CALL LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) { - int i; - // load symbol MyFunc_Type3 func = (MyFunc_Type3) getFunctionSymbol( rLocale, "getOutlineNumberingLevels" ); if ( func ) { + int i; // invoke function sal_Int16 nStyles; sal_Int16 nLevels; @@ -1248,18 +1235,13 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti case 0: level[j].sPrefix = tmp; break; case 1: level[j].nNumType = sal::static_int_cast<sal_Int16>(tmp.toInt32()); break; case 2: level[j].sSuffix = tmp; break; - //case 3: level[j].cBulletChar = tmp.toChar(); break; case 3: level[j].cBulletChar = sal::static_int_cast<sal_Unicode>(tmp.toInt32(16)); break; // base 16 case 4: level[j].sBulletFontName = U2C( tmp ); break; case 5: level[j].nParentNumbering = sal::static_int_cast<sal_Int16>(tmp.toInt32()); break; case 6: level[j].nLeftMargin = tmp.toInt32(); break; case 7: level[j].nSymbolTextDistance = tmp.toInt32(); break; case 8: level[j].nFirstLineOffset = tmp.toInt32(); break; - case 9: // Adjust - // these values seem to be hard-coded elsewhere: - // level[j].Value <<= (sal_Int16) text::HoriOrientation::LEFT; - // level[j].Value <<= (sal_Int16) style::HorizontalAlignment::LEFT; - break; + case 9: break; case 10: level[j].sTransliteration = tmp; break; case 11: level[j].nNatNum = tmp.toInt32(); break; default: @@ -1288,60 +1270,81 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti } } -///////////////////////////////////////////////////////////////////////////////////////////// -//////////////////////////////////helper functions/////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////// +// helper functions oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale, const sal_Char* pFunction ) throw(RuntimeException) { - lcl_LookupTableHelper & rLookupTable = lcl_LookupTableStatic::get(); + lcl_LookupTableHelper & rLookupTable = lcl_LookupTableStatic::get(); - OUStringBuffer aBuf(1); - if (cachedItem.get() && cachedItem->equals(rLocale)) { - aBuf.ensureCapacity(strlen(pFunction) + 1 + strlen(cachedItem->localeName)); - return cachedItem->module->getFunctionSymbol(aBuf.appendAscii(pFunction).append(under). - appendAscii(cachedItem->localeName).makeStringAndClear()); - } + OUStringBuffer aBuf(1); + if (cachedItem.get() && cachedItem->equals(rLocale)) + { + aBuf.ensureCapacity(strlen(pFunction) + 1 + strlen(cachedItem->localeName)); + return cachedItem->module->getFunctionSymbol(aBuf.appendAscii(pFunction).append(under). + appendAscii(cachedItem->localeName).makeStringAndClear()); + } - oslGenericFunction pSymbol = 0; - static OUString tw(OUString::createFromAscii("TW")); - static OUString en_US(OUString::createFromAscii("en_US")); - - sal_Int32 l = rLocale.Language.getLength(); - sal_Int32 c = rLocale.Country.getLength(); - sal_Int32 v = rLocale.Variant.getLength(); - aBuf.ensureCapacity(l+c+v+3); - - LocaleDataLookupTableItem *pCachedItem = 0; - - if ((l > 0 && c > 0 && v > 0 && - // load function with name <func>_<lang>_<country>_<varian> - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append( - rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || - (l > 0 && c > 0 && - // load function with name <ase>_<lang>_<country> - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append( - rLocale.Country).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || - (l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") && - (rLocale.Country.equalsAscii("HK") || - rLocale.Country.equalsAscii("MO")) && - // if the country code is HK or MO, one more step to try TW. - (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append(tw).makeStringAndClear(), - pFunction, &pCachedItem)) != 0) || - (l > 0 && - // load function with name <func>_<lang> - (pSymbol = rLookupTable.getFunctionSymbolByName(rLocale.Language, pFunction, &pCachedItem)) != 0) || - // load default function with name <func>_en_US - (pSymbol = rLookupTable.getFunctionSymbolByName(en_US, pFunction, &pCachedItem)) != 0) - { - if( pCachedItem ) - cachedItem.reset( pCachedItem ); - if( cachedItem.get()) - cachedItem->aLocale = rLocale; - return pSymbol; - } + oslGenericFunction pSymbol = 0; + static OUString tw(RTL_CONSTASCII_USTRINGPARAM("TW")); + static OUString en_US(RTL_CONSTASCII_USTRINGPARAM("en_US")); + + sal_Int32 l = rLocale.Language.getLength(); + sal_Int32 c = rLocale.Country.getLength(); + sal_Int32 v = rLocale.Variant.getLength(); + aBuf.ensureCapacity(l+c+v+3); + + LocaleDataLookupTableItem *pCachedItem = 0; + + if (l > 0 && c > 0 && v > 0) + { + // load function with name <func>_<lang>_<country>_<variant> + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol && l > 0 && c > 0) + { + // load function with name <ase>_<lang>_<country> + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(rLocale.Country).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol && l > 0 && c > 0 && + rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && + (rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HK")) || + rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MO")))) + { + // if the country code is HK or MO, one more step to try TW. + pSymbol = rLookupTable.getFunctionSymbolByName( + aBuf.append(rLocale.Language).append(under).append(tw).makeStringAndClear(), + pFunction, &pCachedItem); + } + + if (!pSymbol) + { + // load function with name <func>_<lang> + pSymbol = rLookupTable.getFunctionSymbolByName(rLocale.Language, pFunction, &pCachedItem); + } + + if (!pSymbol) + { + // load default function with name <func>_en_US + pSymbol = rLookupTable.getFunctionSymbolByName(en_US, pFunction, &pCachedItem); + } + + if (!pSymbol) + // Appropriate symbol could not be found. Give up. throw RuntimeException(); + + if (pCachedItem) + cachedItem.reset(pCachedItem); + if (cachedItem.get()) + cachedItem->aLocale = rLocale; + + return pSymbol; } Sequence< Locale > SAL_CALL @@ -1376,23 +1379,11 @@ LocaleData::getAllInstalledLocaleNames() throw(RuntimeException) return seq; } -// ============================================================================ - using namespace ::com::sun::star::container; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::style; using namespace ::com::sun::star::text; -// // bad: can't have empty prefix ... -// OutlineNumbering::OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlnLevels) : -// m_pOutlineLevels(pOutlnLevels), -// m_nCount(0) -// { -// const OutlineNumberingLevel_Impl* pTemp = m_pOutlineLevels; -// while((pTemp++)->sPrefix) -// m_nCount++; -// } - OutlineNumbering::OutlineNumbering(const OutlineNumberingLevel_Impl* pOutlnLevels, int nLevels) : m_pOutlineLevels(pOutlnLevels), m_nCount(sal::static_int_cast<sal_Int16>(nLevels)) @@ -1478,3 +1469,5 @@ LocaleData::getSupportedServiceNames() throw( RuntimeException ) aRet[0] = OUString::createFromAscii(clocaledata); return aRet; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx index 5118a827b260..1b6ddf47bd1f 100644 --- a/i18npool/source/localedata/saxparser.cxx +++ b/i18npool/source/localedata/saxparser.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,7 +48,7 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase3.hxx> -#include <vos/diagnose.hxx> +#include <osl/diagnose.h> #include "LocaleNode.hxx" @@ -142,11 +143,10 @@ class TestDocumentHandler : public WeakImplHelper3< XExtendedDocumentHandler , XEntityResolver , XErrorHandler > { public: - TestDocumentHandler(const char* locale, const char* outFile ) : - rootNode(0), nError(0), nbOfCurrencies(0), nbOfCalendars(0), nbOfFormatElements(0), - nbOfTransliterations(0), nbOfCollations(0), nbOfDays(50), nbOfMonths(50), nbOfEras(10), - flag(-1), of(outFile, locale), isStartDayOfWeek(false), foundDefaultName(false), - foundVariant(false), openElement(false) + TestDocumentHandler(const char* locale, const char* outFile ) + : rootNode(0) + , nError(0) + , of(outFile, locale) { strncpy( theLocale, locale, sizeof(theLocale) ); theLocale[sizeof(theLocale)-1] = 0; @@ -155,6 +155,7 @@ public: ~TestDocumentHandler( ) { of.closeOutput(); + delete rootNode; } @@ -225,29 +226,25 @@ public: // ExtendedDocumentHandler LocaleNode * l = LocaleNode::createNode (aName, xAttribs); if (!currentNode.empty() ) { - LocaleNode * ln = (LocaleNode *) currentNode . top(); + LocaleNode * ln = (LocaleNode *) currentNode.top(); ln->addChild(l); } else { rootNode = l; } - currentNode . push (l); + currentNode.push (l); } virtual void SAL_CALL endElement(const OUString& /*aName*/) throw (SAXException,RuntimeException) { - currentNode . pop(); + currentNode.pop(); } virtual void SAL_CALL characters(const OUString& aChars) throw (SAXException,RuntimeException) { - LocaleNode * l = currentNode . top(); + LocaleNode * l = currentNode.top(); l->setValue (aChars); - ::rtl::OUString str(aChars); - sal_Unicode nonBreakSPace[2]= {0xa, 0x0}; - if(!openElement || str.equals(nonBreakSPace)) - return; } virtual void SAL_CALL ignorableWhitespace(const OUString& /*aWhitespaces*/) throw (SAXException,RuntimeException) @@ -300,23 +297,8 @@ public: // ExtendedDocumentHandler public: int nError; - ::rtl::OUString currentElement; - sal_Int16 nbOfCurrencies; - sal_Int16 nbOfCalendars; - sal_Int16 nbOfFormatElements; - sal_Int16 nbOfTransliterations; - sal_Int16 nbOfCollations; - Sequence<sal_Int16> nbOfDays; - Sequence<sal_Int16> nbOfMonths; - Sequence<sal_Int16> nbOfEras; - sal_Char *elementTag; sal_Char theLocale[50]; - sal_Int16 flag; OFileWriter of; - sal_Bool isStartDayOfWeek; - sal_Bool foundDefaultName; - sal_Bool foundVariant; - sal_Bool openElement; }; @@ -340,9 +322,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) ::rtl::OUString::createFromAscii(argv[4]), ::rtl::OUString::createFromAscii(argv[5]), true ); } - catch ( Exception& ) + catch ( Exception &e ) { - printf( "Exception on createRegistryServiceFactory\n" ); + printf( "Exception on createRegistryServiceFactory %s\n", + OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).getStr() ); exit(1); } @@ -351,7 +334,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) // read xml from a file and count elements //-------------------------------- Reference< XInterface > x = xSMgr->createInstance( - OUString::createFromAscii( "com.sun.star.xml.sax.Parser" ) ); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ); int nError = 0; if( x.is() ) { @@ -393,3 +376,5 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) return nError; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/nativenumber/data/numberchar.h b/i18npool/source/nativenumber/data/numberchar.h index 542bf8a81b85..5472ad15ed08 100644 --- a/i18npool/source/nativenumber/data/numberchar.h +++ b/i18npool/source/nativenumber/data/numberchar.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -275,3 +276,5 @@ typedef struct { } } } } #endif // _L10N_TRANSLITERATION_NUMTOCHAR_H_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 53d6e037b0f9..cb170b6e1fd1 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,6 +30,7 @@ #include "precompiled_i18npool.hxx" #include <rtl/ustrbuf.hxx> +#include <sal/macros.h> #include <nativenumbersupplier.hxx> #include <localedata.hxx> #include <data/numberchar.h> @@ -465,7 +467,7 @@ static const sal_Char *natnum1Locales[] = { "dz", "fa" }; -static sal_Int16 nbOfLocale = sizeof(natnum1Locales)/sizeof(natnum1Locales[0]); +static sal_Int16 nbOfLocale = SAL_N_ELEMENTS(natnum1Locales); //! ATTENTION: Do not change order of elements! //! Number and order must match elements of natnum1Locales! @@ -496,7 +498,7 @@ static sal_Int16 natnum1[] = { NumberChar_dz, NumberChar_EastIndic_ar }; -static sal_Int16 sizeof_natnum1 = sizeof(natnum1)/sizeof(natnum1[0]); +static sal_Int16 sizeof_natnum1 = SAL_N_ELEMENTS(natnum1); //! ATTENTION: Do not change order of elements! //! Order must match first elements of natnum1Locales! @@ -507,7 +509,7 @@ static sal_Int16 natnum2[] = { NumberChar_Upper_ko, NumberChar_he }; -static sal_Int16 sizeof_natnum2 = sizeof(natnum2)/sizeof(natnum2[0]); +static sal_Int16 sizeof_natnum2 = SAL_N_ELEMENTS(natnum2); #define isLang(lang) rLocale.Language.equalsAsciiL(lang, 2) #define isCtry(ctry) rLocale.Country.equalsAsciiL(ctry, 2) @@ -755,7 +757,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN sal_Int16 num = sal::static_int_cast<sal_Int16>( number.indexOf(aAttr.Format) ); - if (aAttr.Style.equalsAscii("short")) { + if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("short"))) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM3; else if (num == NumberChar_Hangul_ko) @@ -764,7 +766,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN return NativeNumberMode::NATNUM1; else if (natNumIn(num, natnum2, sizeof_natnum2)) return NativeNumberMode::NATNUM2; - } else if (aAttr.Style.equalsAscii("medium")) { + } else if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("medium"))) { if (num == NumberChar_Hangul_ko) return NativeNumberMode::NATNUM11; else if (num == NumberChar_he) @@ -773,7 +775,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN return NativeNumberMode::NATNUM7; else if (natNumIn(num, natnum2, sizeof_natnum2)) return NativeNumberMode::NATNUM8; - } else if (aAttr.Style.equalsAscii("long")) { + } else if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("long"))) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM6; else if (num == NumberChar_Hangul_ko) @@ -865,7 +867,6 @@ OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, sal sal_Int64 value = 0; sal_Int32 i, count = 0, len = aNumberString.getLength(); const sal_Unicode *src = aNumberString.getStr(); - sal_Bool neg = sal_False; for (i = 0; i < len; i++) { sal_Unicode ch = src[i]; @@ -875,7 +876,7 @@ OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, sal value = value * 10 + (ch - NUMBER_ZERO); } else if (isSeparator(ch) && count > 0) continue; - else if (isMinus(ch) && count == 0) neg = sal_True; + else if (isMinus(ch) && count == 0) continue; else break; } @@ -915,3 +916,5 @@ NativeNumberSupplier::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx index 8f5f926cc728..441a8e5c06ab 100644 --- a/i18npool/source/numberformatcode/numberformatcode.cxx +++ b/i18npool/source/numberformatcode/numberformatcode.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -282,7 +283,7 @@ NumberFormatCodeMapper::createLocaleDataObject() { NumberFormatCodeMapper::getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ) { - return ::rtl::OUString::createFromAscii("com.sun.star.i18n.NumberFormatCodeMapper"); + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.NumberFormatCodeMapper")); } const sal_Char cNumFormat[] = "com.sun.star.i18n.NumberFormatMapper"; @@ -302,3 +303,4 @@ NumberFormatCodeMapper::getSupportedServiceNames(void) throw( ::com::sun::star:: return aRet; } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx index b577d72c5d0e..3e8158cd8209 100644 --- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx +++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -31,10 +32,14 @@ #include <string.h> #include "ordinalsuffix.hxx" +#include <unicode/rbnf.h> +#include <unicode/normlzr.h> + +#define CSTR( ouStr ) rtl::OUStringToOString( ouStr, RTL_TEXTENCODING_UTF8 ).getStr( ) using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; +using namespace ::com::sun::star; using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -51,50 +56,61 @@ OrdinalSuffix::~OrdinalSuffix() } -static OUString getOrdinalSuffixEn( sal_Int32 nNumber ) +/* + * For this method to properly return the ordinal suffix for other locales + * than english ones, ICU 4.2+ has to be used. + */ +uno::Sequence< OUString > SAL_CALL OrdinalSuffix::getOrdinalSuffix( sal_Int32 nNumber, + const lang::Locale &aLocale ) throw( RuntimeException ) { - OUString retValue; - - switch( labs( nNumber ) % 100 ) + uno::Sequence< OUString > retValue; + + // Get the value from ICU + UErrorCode nCode = U_ZERO_ERROR; + const icu::Locale rIcuLocale( + CSTR( aLocale.Language ), + CSTR( aLocale.Country ), + CSTR( aLocale.Variant ) ); + icu::RuleBasedNumberFormat formatter( + icu::URBNF_ORDINAL, rIcuLocale, nCode ); + + if ( U_SUCCESS( nCode ) ) { - case 11: case 12: case 13: - retValue = OUString::createFromAscii( "th" ); - break; - default: - switch( nNumber % 10 ) + int32_t nRuleSets = formatter.getNumberOfRuleSetNames( ); + for ( int32_t i = 0; i < nRuleSets; i++ ) + { + icu::UnicodeString ruleSet = formatter.getRuleSetName( i ); + // format the string + icu::UnicodeString icuRet; + icu::FieldPosition icuPos; + formatter.format( (int32_t)nNumber, ruleSet, icuRet, icuPos, nCode ); + + if ( U_SUCCESS( nCode ) ) { - case 1: - retValue = OUString::createFromAscii( "st" ); - break; - case 2: - retValue = OUString::createFromAscii( "nd" ); - break; - case 3: - retValue = OUString::createFromAscii( "rd" ); - break; - default: - retValue = OUString::createFromAscii( "th" ); - break; + // Apply NFKC normalization to get normal letters + icu::UnicodeString normalized; + nCode = U_ZERO_ERROR; + icu::Normalizer::normalize( icuRet, UNORM_NFKC, 0, normalized, nCode ); + if ( U_SUCCESS( nCode ) && ( normalized != icuRet ) ) + { + // Convert the normalized UnicodeString to OUString + OUString sValue( reinterpret_cast<const sal_Unicode *>( normalized.getBuffer( ) ), normalized.length() ); + + // Remove the number to get the prefix + sal_Int32 len = OUString::valueOf( nNumber ).getLength( ); + + sal_Int32 newLength = retValue.getLength() + 1; + retValue.realloc( newLength ); + retValue[ newLength - 1 ] = sValue.copy( len ); + } } - break; + } } return retValue; } -OUString SAL_CALL OrdinalSuffix::getOrdinalSuffix( sal_Int32 nNumber, - const Locale &aLocale ) throw( RuntimeException ) -{ - OUString retValue; - - if (aLocale.Language.equalsAsciiL("en",2)) - retValue = getOrdinalSuffixEn( nNumber ); - - return retValue; -} - - const sal_Char cOrdinalSuffix[] = "com.sun.star.i18n.OrdinalSuffix"; OUString SAL_CALL OrdinalSuffix::getImplementationName(void) throw( RuntimeException ) @@ -115,3 +131,5 @@ Sequence< OUString > SAL_CALL OrdinalSuffix::getSupportedServiceNames(void) thro } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx index aaac0e83a4eb..913cc7d834ed 100644 --- a/i18npool/source/paper/paper.cxx +++ b/i18npool/source/paper/paper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,6 +31,7 @@ #include <osl/diagnose.h> #include <sal/config.h> +#include <sal/macros.h> #include <rtl/ustring.hxx> #include <rtl/string.hxx> #include <comphelper/processfactory.hxx> @@ -47,8 +49,10 @@ #include <stdio.h> #include <string.h> #include <locale.h> +#if defined(LC_PAPER) && defined(_GNU_SOURCE) #include <langinfo.h> #endif +#endif struct PageDesc { @@ -157,7 +161,7 @@ static PageDesc aDinTab[] = { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", NULL } }; -static const size_t nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]); +static const size_t nTabSize = SAL_N_ELEMENTS(aDinTab); #define MAXSLOPPY 21 @@ -226,21 +230,26 @@ PaperInfo PaperInfo::getSystemDefaultPaper() rtl::OUString aLocaleStr; - Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); - Reference< XMultiServiceFactory > xConfigProv( - xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationProvider" ) ), - UNO_QUERY_THROW ); - + Reference< XMultiServiceFactory > xConfigProv; + Reference< XNameAccess > xConfigNA; Sequence< Any > aArgs( 1 ); - aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.Setup/L10N/" ); - Reference< XNameAccess > xConfigNA( xConfigProv->createInstanceWithArguments( - CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationAccess" ), aArgs ), UNO_QUERY_THROW ); try { + Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory(); + xConfigProv = Reference< XMultiServiceFactory >( + xFactory->createInstance( CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationProvider" ) ), + UNO_QUERY_THROW); + + aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.Setup/L10N/" ); + xConfigNA = Reference< XNameAccess >(xConfigProv->createInstanceWithArguments( + CREATE_OUSTRING( "com.sun.star.configuration.ConfigurationAccess" ), aArgs ), UNO_QUERY_THROW); + // try user-defined locale setting xConfigNA->getByName( CREATE_OUSTRING( "ooSetupSystemLocale" ) ) >>= aLocaleStr; } - catch( Exception& ) {} + catch( Exception& ) + { + } #ifdef UNX // if set to "use system", get papersize from system @@ -288,7 +297,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper() bool bHalve = false; - size_t nExtraTabSize = sizeof(aCustoms) / sizeof(aCustoms[0]); + size_t nExtraTabSize = SAL_N_ELEMENTS(aCustoms); for (size_t i = 0; i < nExtraTabSize; ++i) { if (rtl_str_compareIgnoreAsciiCase(aCustoms[i].pName, aPaper.getStr()) == 0) @@ -359,7 +368,7 @@ PaperInfo PaperInfo::getSystemDefaultPaper() try { // if set to "use system", try to get locale from system - if( aLocaleStr.getLength() == 0 ) + if (aLocaleStr.getLength() == 0 && xConfigProv.is()) { aArgs[ 0 ] <<= CREATE_OUSTRING( "org.openoffice.System/L10N/" ); xConfigNA.set( xConfigProv->createInstanceWithArguments( @@ -511,4 +520,4 @@ PaperInfo PaperInfo::getDefaultPaperForLocale( return eType; } -/* vi:set tabstop=4 shiftwidth=4 expandtab: */ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 0671e5669956..fd08933af2fa 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -575,12 +576,12 @@ static const struct InstancesArray { extern "C" { -void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ ) +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* /*_pRegistryKey*/ ) +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* /*_pRegistryKey*/ ) { void* pRet = NULL; @@ -614,3 +615,5 @@ void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* } } // "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index aa889a6d3581..fe1d1833e944 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -75,13 +76,6 @@ #include "levdis.hxx" - -#ifdef erTEST -#include <stdlib.h> -#include <stdio.h> -#include <iostream.h> -#endif - #ifdef SOLARIS #undef min #endif @@ -126,25 +120,12 @@ static sal_Int32 Impl_WLD_StringLen( const sal_Unicode* pStr ) return (sal_Int32)(pTempStr-pStr); } -#ifdef erTESTMAT -#define erTESTMATMAX 180 -static int npMatrix[erTESTMATMAX][erTESTMATMAX]; // nearly 64K -#endif - // Distanz von String zu Pattern int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) { int nSPMin = 0; // StrafPunkteMinimum int nRepS = 0; // fuer SplitCount -#ifdef erTESTMAT -{ - for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ ) - for ( sal_Int32 c=0; c<=nPatternLen && c < erTESTMATMAX; c++ ) - npMatrix[r][c] = 99; // Matrix initialisieren, nur visuell -} -#endif - // Laengendifferenz von Pattern und String int nLenDiff = nPatternLen - nStars - nStringLen; // mehr Einfuegungen oder Loeschungen noetig als Limit? => raus hier @@ -163,13 +144,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) else nArrayLen = nStringLen + 1; npDistance = aDisMem.NewMem( nArrayLen ); -#ifdef erTEST - if ( !npDistance ) - { - cerr << "DOOM! (Damned, Out Of Memory)" << endl; - exit(1); - } -#endif } // Anfangswerte der zweiten Spalte (erstes Pattern-Zeichen) berechnen @@ -214,9 +188,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) { // diese Stelle wird ersetzt nRepS++; nReplacePos = i; -#ifdef erTESTMAT - npMatrix[i][1] = -npDistance[i]; -#endif } else if ( nReplacePos > 0 && !nP ) { @@ -225,9 +196,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) if ( !nBalance ) { // einer wurde ersetzt, der ein Insert war nRepS--; -#ifdef erTESTMAT - npMatrix[nReplacePos][1] = npDistance[nReplacePos]; -#endif nReplacePos = 0; } } @@ -235,16 +203,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) } nSPMin = Min3( npDistance[0], npDistance[1], npDistance[2] ); } -#ifdef erTESTMAT -{ - for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ ) - { - npMatrix[r][0] = r * nInsQ0; - if ( npMatrix[r][1] >= 0) - npMatrix[r][1] = npDistance[r]; - } -} -#endif // Distanzmatrix berechnen sal_Int32 j = 0; // fuer alle Spalten des Pattern, solange nicht Limit @@ -305,9 +263,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) { // diese Stelle wird ersetzt nRepS++; nReplacePos = i; -#ifdef erTESTMAT - npMatrix[i][j+1] = -npDistance[i]; -#endif } else if ( nReplacePos > 0 && !nPij ) { // Zeichen in String und Pattern gleich. @@ -322,25 +277,12 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) if ( !nBalance ) { // einer wurde ersetzt, der ein Insert war nRepS--; -#ifdef erTESTMAT - npMatrix[nReplacePos][j+1] = npDistance[nReplacePos]; -#endif nReplacePos = 0; } } } } -#ifdef erTESTMAT -{ - for ( sal_Int32 r=0; r<=nStringLen && r < erTESTMATMAX; r++ ) - if ( npMatrix[r][j+1] >= 0) - npMatrix[r][j+1] = npDistance[r]; -} -#endif } -#ifdef erTESTSPLIT - printf(" nRepS: %d ", nRepS ); -#endif if ( (nSPMin <= nLimit) && (npDistance[nStringLen] <= nLimit) ) return(npDistance[nStringLen]); else @@ -349,9 +291,6 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) { if ( nRepS && nLenDiff > 0 ) nRepS -= nLenDiff; // Inserts wurden mitgezaehlt -#ifdef erTESTSPLIT - printf(" nRepSdiff: %d ", nRepS ); -#endif if ( (nSPMin <= 2 * nLimit) && (npDistance[nStringLen] <= 2 * nLimit) && (nRepS * nRepP0 <= nLimit) ) @@ -368,12 +307,12 @@ int WLevDistance::WLD( const sal_Unicode* cString, sal_Int32 nStringLen ) // aus Userwerten nOtherX, nShorterY, nLongerZ, bRelaxed int WLevDistance::CalcLPQR( int nX, int nY, int nZ, bool bRelaxed ) { - int nMin, nMid, nMax; if ( nX < 0 ) nX = 0; // nur positive Werte if ( nY < 0 ) nY = 0; if ( nZ < 0 ) nZ = 0; - if ( 0 == (nMin = Min3( nX, nY, nZ )) ) // mindestens einer 0 + if (0 == Min3( nX, nY, nZ )) // mindestens einer 0 { + int nMid, nMax; nMax = Max3( nX, nY, nZ ); // entweder 0 bei drei 0 oder Max if ( 0 == (nMid = Mid3( nX, nY, nZ )) ) // sogar zwei 0 nLimit = nMax; // entweder 0 oder einziger >0 @@ -493,27 +432,6 @@ void WLevDistance::InitData( const sal_Unicode* cPattern ) } -// CTor - -#ifdef erTEST - -WLevDistance::WLevDistance( const ::rtl::OUString& rPattern ) : - nPatternLen( rPattern.getLength() ), - aPatMem( nPatternLen + 1 ), - nArrayLen( nPatternLen + 1 ), - aDisMem( nArrayLen ), - nLimit( LEVDISDEFAULTLIMIT ), - nRepP0( LEVDISDEFAULT_P0 ), - nInsQ0( LEVDISDEFAULT_Q0 ), - nDelR0( LEVDISDEFAULT_R0 ), - bSplitCount( false ) -{ - InitData( rPattern.getStr() ); -} - -#endif // erTEST - - WLevDistance::WLevDistance( const sal_Unicode* cPattern, int nOtherX, int nShorterY, int nLongerZ, bool bRelaxed ) : @@ -558,222 +476,4 @@ WLevDistance::~WLevDistance() { } -/************************************************************************* - * Test - *************************************************************************/ - -#ifdef erTEST - -#define LINESIZE 1000 -typedef char MAXSTRING [LINESIZE+1]; - -#ifdef erTESTMAT - -void WLevDistance::ShowMatrix( const sal_Unicode* cString ) -{ - sal_Int32 r, c, l = Impl_WLD_StringLen(cString); - printf(" | "); - for ( c=0; c<nPatternLen; c++ ) -#error Error: conversion from sal_Unicode to char needed! - printf( " %c ", cpPattern[c] ); - printf("\n---+---"); - for ( c=0; c<nPatternLen; c++ ) - printf( "---" ); - for ( r=0; r<=l && r < erTESTMATMAX; r++ ) - { -#error Error: conversion from sal_Unicode to char needed! - printf( "\n %c |", ( r==0 ? ' ' : cString[r-1] ) ); - for ( c=0; c<=nPatternLen && c < erTESTMATMAX; c++ ) - printf( "%2d ", npMatrix[r][c] ); - } - printf("\n\n"); -} - -#endif // erTESTMAT - -// Delimiter fuer Token, \t Tab bleibt fuer immer an der ersten Stelle -MAXSTRING cDelim = "\t, ;(){}[]<>&=+-/%!|.\\'\"~"; - -void WLevDistance::ShowTest() -{ - printf(" \n"); -#error Error: conversion from sal_Unicode to char needed! - printf(" a *cpPattern . . . . : %s\n", cpPattern); - printf(" b *bpPatIsWild . . . : "); - for ( sal_Int32 i=0; i<nPatternLen; i++ ) - printf("%d", bpPatIsWild[i]); - printf("\n"); - printf(" c nPatternLen . . . : %d\n", (int)nPatternLen); - printf(" d nStars . . . . . . : %d\n", nStars); - printf(" e nLimit . . . . . . : %d\n", nLimit); - printf(" f nRepP0 (Ersetzen) : %d\n", nRepP0); - printf(" g nInsQ0 (Einfuegen) : %d\n", nInsQ0); - printf(" h nDelR0 (Loeschen) : %d\n", nDelR0); - printf(" i bSplitCount . . . : %d\n", bSplitCount); -#error Error: conversion from sal_Unicode to char needed! - printf(" j cDelim . . . . . . : '%s'\n", cDelim); - printf(" ~\n"); -} - -inline bool IsDelim( char c ) -{ - char* cp = cDelim; - while ( *cp ) - if ( *cp++ == c ) - return( true ); - return( false ); -} - -MAXSTRING cString, cLine, cIgString; - -int main( int argc, char **argv ) -{ - int nLim, nP0, nQ0, nR0, nX, nY, nZ; - int args = 0; - bool IgnoreCase = false, Direct = false, bStrict = false; - WLevDistance* pTest; - if ( argc < 2 ) - { - printf("%s Syntax:\n" - " ... [-i] cPattern [nOtherX, nShorterY, nLongerZ [bStrict [cDelim]]] [<stdin] [>stdout]\n" - " ... -d cPattern [nLimit [nRepP0 nInsQ0 nDelR0 [cDelim]]] [<stdin] [>stdout]\n" - , argv[0]); - exit(1); - } - if ( *argv[1] == '-' ) - { - args++; - argc--; - switch ( *(argv[1]+1) ) - { - case 'i': - { - IgnoreCase = true; - char* cp = argv[args+1]; - while ( (*cp = tolower( *cp )) != 0 ) - cp++; - break; - } - case 'd': - Direct = true; - break; - } - } - if ( Direct ) - { - if ( argc > 2 ) - nLim = atoi(argv[args+2]); - else - nLim = LEVDISDEFAULTLIMIT; - if ( argc > 3 ) - { - nP0 = atoi(argv[args+3]); - nQ0 = atoi(argv[args+4]); - nR0 = atoi(argv[args+5]); - } - else - { - nP0 = LEVDISDEFAULT_P0; - nQ0 = LEVDISDEFAULT_Q0; - nR0 = LEVDISDEFAULT_R0; - } - if ( argc > 6 ) - { - strncpy( cDelim+1, argv[args+6], LINESIZE ); // \t Tab always remains - cDelim[LINESIZE-1] = 0; - } - } - else - { - if ( argc > 2 ) - { - nX = atoi(argv[args+2]); - nY = atoi(argv[args+3]); - nZ = atoi(argv[args+4]); - } - else - { - nX = LEVDISDEFAULT_XOTHER; - nY = LEVDISDEFAULT_YSHORTER; - nZ = LEVDISDEFAULT_ZLONGER; - } - if ( argc > 5 ) - bStrict = atoi(argv[args+5]); - if ( argc > 6 ) - { - strncpy( cDelim+1, argv[args+6], LINESIZE ); // \t Tab always remains - cDelim[LINESIZE-1] = 0; - } - } - if ( Direct ) - { -#error Error: conversion from char to OUString needed! - pTest = new WLevDistance( argv[args+1] ); -#ifdef erTESTDEFAULT - pTest->ShowTest(); -#endif - pTest->SetLimit( nLim ); - pTest->SetReplaceP0( nP0 ); - pTest->SetInsertQ0( nQ0 ); - pTest->SetDeleteR0( nR0 ); - } - else - { -#error Error: conversion from char to sal_Unicode needed! - pTest = new WLevDistance( argv[args+1], nX, nY, nZ, !bStrict ); -#ifdef erTESTCCTOR - WLevDistance aTmp( *pTest ); - aTmp.ShowTest(); -#endif - nLim = pTest->GetLimit(); - } - pTest->ShowTest(); - do - { - char* cp1, *cp2; - static long unsigned int nLine = 0; - cp1 = cLine; - cin.getline( cLine, LINESIZE ) ; - nLine++; - while ( *cp1 ) - { - while ( *cp1 && IsDelim(*cp1) ) - cp1++; - cp2 = cString; - while ( *cp1 && !IsDelim(*cp1) ) - *cp2++ = *cp1++; - *cp2 = '\0'; - while ( *cp1 && IsDelim(*cp1) ) - cp1++; - if ( *cString ) - { - int ret; - if ( IgnoreCase ) - { - char* cpi1 = cString; - char* cpi2 = cIgString; - while ( *cpi1 ) - *cpi2++ = tolower( *cpi1++ ); - *cpi2 = '\0'; -#error Error: conversion from char to OUString / sal_Unicode,length needed! - ret = pTest->WLD( cIgString ); - } - else -#error Error: conversion from char to OUString / sal_Unicode,length needed! - ret = pTest->WLD( cString ); -#ifdef erTESTMAT - printf("\n# %3d : %s\n", ret, cString); -#error Error: conversion from char to sal_Unicode needed! - pTest->ShowMatrix( cString ); -#else - if ( ret <= nLim ) - printf("# %3d : %s\t(line %lu)\t%s\n", ret, cString, nLine, cLine); -#endif - } - } - } while ( !cin.eof() ); - return 0; -} - -#endif // erTEST - +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index b61b731ea664..9efef0ff701c 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -144,13 +145,6 @@ class WLevDistance int KGV( int a, int b ); // Kleinstes Gemeinsames Vielfaches public: - -#ifdef erTEST - // CToren fuer direktes Setzen der Gewichtung mit Set...() - // im CTor werden die Defaultwerte fuer Limit/Rep/Ins/Del gesetzt - explicit WLevDistance( const ::rtl::OUString& rPattern ); -#endif - // CToren mit Userangaben, danach mit GetLimit() Limit holen // interner Aufruf von CalcLPQR() // die mathematisch unkorrekte Berechnung wird als Default genommen! @@ -180,14 +174,6 @@ public: // SetSplit( TRUE ) macht nur mit Werten nach CalcLPQR() Sinn! inline bool IsNormal( sal_Int32 nPos ) const { return( !bpPatIsWild[nPos] ); } - -#ifdef erTEST - void ShowTest(); -#ifdef erTESTMAT - void ShowMatrix( const sal_Unicode* cString ); -#endif -#endif - }; inline int WLevDistance::SetLimit( int nNewLimit ) @@ -227,3 +213,4 @@ inline bool WLevDistance::SetSplit( bool bNewSplit ) #endif // _LEVDIS_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index e71e0fc0cd71..756d6c863ff9 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,8 +114,8 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep if( !xTranslit.is() ) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii( - "com.sun.star.i18n.Transliteration")); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.i18n.Transliteration"))); if ( xI.is() ) xI->queryInterface( ::getCppuType( (const Reference< XExtendedTransliteration >*)0)) @@ -135,8 +136,8 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep if( !xTranslit2.is() ) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii( - "com.sun.star.i18n.Transliteration")); + OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.i18n.Transliteration"))); if ( xI.is() ) xI->queryInterface( ::getCppuType( (const Reference< XExtendedTransliteration >*)0)) @@ -152,7 +153,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep if ( !xBreak.is() ) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii( "com.sun.star.i18n.BreakIterator")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.BreakIterator"))); if( xI.is() ) xI->queryInterface( ::getCppuType( (const Reference< XBreakIterator >*)0)) @@ -412,7 +413,7 @@ bool TextSearch::IsDelimiter( const OUString& rStr, sal_Int32 nPos ) const if ( !xCharClass.is() ) { Reference < XInterface > xI = xMSF->createInstance( - OUString::createFromAscii( "com.sun.star.i18n.CharacterClassification")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.CharacterClassification"))); if( xI.is() ) xI->queryInterface( ::getCppuType( (const Reference< XCharacterClassification >*)0)) @@ -981,13 +982,13 @@ SAL_CALL TextSearch_CreateInstance( extern "C" { -void SAL_CALL component_getImplementationEnvironment( +SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** /*ppEnv*/ ) { *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; } -void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, +SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* /*_pRegistryKey*/ ) { void* pRet = NULL; @@ -1017,3 +1018,5 @@ void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, } } // extern "C" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/search/textsearch.hxx b/i18npool/source/search/textsearch.hxx index 383b78e769b0..32b4d2e5af18 100644 --- a/i18npool/source/search/textsearch.hxx +++ b/i18npool/source/search/textsearch.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -152,3 +153,5 @@ public: #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/data/makefile.mk b/i18npool/source/textconversion/data/makefile.mk index a93a4045af62..967b4f982ea2 100644 --- a/i18npool/source/textconversion/data/makefile.mk +++ b/i18npool/source/textconversion/data/makefile.mk @@ -61,7 +61,7 @@ LIB1OBJFILES=$(SHL1OBJS) APP1TARGET = genconv_dict $(MISC)$/%.cxx : %.dic - $(AUGMENT_LIBRARY_PATH) $(BIN)$/genconv_dict $* $< $@ + $(AUGMENT_LIBRARY_PATH) $(OUT_FOR_BUILD)$/bin$/genconv_dict $* $< $@ # ugly - is this dependency really required here? $(foreach,i,$(shell @$(FIND) . -name "*.dic") $(MISC)$/dict_$(i:b).cxx) : $(BIN)$/genconv_dict$(EXECPOST) diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx index 3b3e5d4e9c0a..50c9fcffbe32 100644 --- a/i18npool/source/textconversion/genconv_dict.cxx +++ b/i18npool/source/textconversion/genconv_dict.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -481,3 +482,4 @@ void make_stc_word(FILE *sfp, FILE *cfp) } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/textconversion.cxx b/i18npool/source/textconversion/textconversion.cxx index 51bd7a4c1bf4..291b8df2f055 100644 --- a/i18npool/source/textconversion/textconversion.cxx +++ b/i18npool/source/textconversion/textconversion.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,7 +33,8 @@ #include <textconversion.hxx> using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -41,9 +43,9 @@ extern "C" { static void SAL_CALL thisModule() {} } TextConversion::TextConversion() { #ifdef SAL_DLLPREFIX - OUString lib=OUString::createFromAscii(SAL_DLLPREFIX"textconv_dict"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX"textconv_dict"SAL_DLLEXTENSION)); #else - OUString lib=OUString::createFromAscii("textconv_dict"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM("textconv_dict"SAL_DLLEXTENSION)); #endif hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); @@ -89,3 +91,5 @@ TextConversion::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index 1e433737efe7..61eabe4199c3 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -98,17 +100,17 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw Reference < XInterface > xI; xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.TextConversion_") + aLocale.Language); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.TextConversion_")) + aLocale.Language); if ( ! xI.is() ) xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.TextConversion_") + aLocale.Language + - OUString::createFromAscii("_") + aLocale.Country); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.TextConversion_")) + aLocale.Language + + OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + aLocale.Country); if ( ! xI.is() ) xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.TextConversion_") + aLocale.Language + - OUString::createFromAscii("_") + aLocale.Country + - OUString::createFromAscii("_") + aLocale.Variant); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.TextConversion_")) + aLocale.Language + + OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + aLocale.Country + + OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + aLocale.Variant); if (xI.is()) xI->queryInterface( getCppuType((const Reference< XTextConversion>*)0) ) >>= xTC; @@ -143,3 +145,5 @@ TextConversionImpl::getSupportedServiceNames() throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx index 862076501153..8ebda8005220 100644 --- a/i18npool/source/textconversion/textconversion_ko.cxx +++ b/i18npool/source/textconversion/textconversion_ko.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -41,7 +42,9 @@ using namespace com::sun::star::lang; using namespace com::sun::star::i18n; using namespace com::sun::star::linguistic2; using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { @@ -54,13 +57,13 @@ TextConversion_ko::TextConversion_ko( const Reference < XMultiServiceFactory >& Reference < XInterface > xI; xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.ConversionDictionary_ko")); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.ConversionDictionary_ko"))); if ( xI.is() ) xI->queryInterface( getCppuType((const Reference< XConversionDictionary>*)0) ) >>= xCD; xI = xMSF->createInstance( - OUString::createFromAscii( "com.sun.star.linguistic2.ConversionDictionaryList" )); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ConversionDictionaryList"))); if ( xI.is() ) xI->queryInterface( getCppuType((const Reference< XConversionDictionaryList>*)0) ) >>= xCDL; @@ -69,8 +72,8 @@ TextConversion_ko::TextConversion_ko( const Reference < XMultiServiceFactory >& // get maximum length of word in dictionary if (xCDL.is()) { - Locale loc(OUString::createFromAscii("ko"), - OUString::createFromAscii("KR"), + Locale loc(OUString(RTL_CONSTASCII_USTRINGPARAM("ko")), + OUString(RTL_CONSTASCII_USTRINGPARAM("KR")), OUString()); maxLeftLength = xCDL->queryMaxCharCount(loc, ConversionDictionaryType::HANGUL_HANJA, @@ -341,3 +344,5 @@ TextConversion_ko::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 / } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx index 2c0682d93205..ddb8a02283fd 100644 --- a/i18npool/source/textconversion/textconversion_zh.cxx +++ b/i18npool/source/textconversion/textconversion_zh.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,8 @@ using namespace com::sun::star::lang; using namespace com::sun::star::i18n; using namespace com::sun::star::linguistic2; using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -48,7 +50,7 @@ TextConversion_zh::TextConversion_zh( const Reference < XMultiServiceFactory >& { Reference < XInterface > xI; xI = xMSF->createInstance( - OUString::createFromAscii( "com.sun.star.linguistic2.ConversionDictionaryList" )); + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.linguistic2.ConversionDictionaryList"))); if ( xI.is() ) xI->queryInterface( getCppuType((const Reference< XConversionDictionaryList>*)0) ) >>= xCDL; @@ -241,7 +243,7 @@ TextConversion_zh::getConversion( const OUString& aText, sal_Int32 nStartPos, sa const Locale& rLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { - if (rLocale.Language.equalsAscii("zh") && + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { @@ -265,7 +267,7 @@ TextConversion_zh::getConversionWithOffset( const OUString& aText, sal_Int32 nSt const Locale& rLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions, Sequence<sal_Int32>& offset) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { - if (rLocale.Language.equalsAscii("zh") && + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { @@ -294,3 +296,5 @@ TextConversion_zh::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 / } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/chartonum.cxx b/i18npool/source/transliteration/chartonum.cxx index 7fced835f289..ac287114674e 100644 --- a/i18npool/source/transliteration/chartonum.cxx +++ b/i18npool/source/transliteration/chartonum.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,6 @@ #include <rtl/ustrbuf.hxx> using namespace com::sun::star::uno; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -62,3 +62,5 @@ TRANSLITERATION_CHARTONUM( _th) #undef TRANSLITERATION_CHARTONUM } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/data/numberchar.h b/i18npool/source/transliteration/data/numberchar.h index 7bc0c50fc35d..73268c71a065 100644 --- a/i18npool/source/transliteration/data/numberchar.h +++ b/i18npool/source/transliteration/data/numberchar.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,46 +64,6 @@ static const sal_Unicode NumberChar[][10] = { { 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59 } // Thai }; -// not used -#if 0 -static sal_Unicode DecimalChar[] = { - 0x002E, // Half Width (Ascii) - 0xFF0E, // Full Width - 0xFF0E, // Chinese Lower - 0x70B9, // S. Chinese Upper - 0x9EDE, // T. Chinese Upper - 0x30FB, // Japanese Modern - 0x30FB, // Japanese Trad. - 0xFF0E, // Korean Lower - 0x9EDE, // Korean Upper - 0xC810, // Korean Hangul - 0x066B, // Arabic Indic - 0x002E, // Est. Arabic Indic - 0x002E, // Indic - 0x002E // Thai -}; -#endif - -// not used -#if 0 -static sal_Unicode MinusChar[] = { - 0x002D, // Half Width (Ascii) - 0xFF0D, // Full Width - 0xFF0D, // Chinese Lower - 0x8D1F, // S. Chinese Upper - 0x5069, // T. Chinese Upper - 0x2212, // Japanese Modern - 0x2212, // Japanese Trad. - 0xFF0D, // Korean Lower - 0x5069, // Korean Upper - 0xFF0D, // Korean Hangul ??? - 0x002D, // Arabic Indic - 0x002D, // Est. Arabic Indic - 0x002D, // Indic - 0x002D, // Thai -}; -#endif - #define NUMBER_ZERO NumberChar[NumberChar_HalfWidth][0] // 0x0030 #define NUMBER_ONE NumberChar[NumberChar_HalfWidth][1] // 0x0031 #define NUMBER_NINE NumberChar[NumberChar_HalfWidth][9] // 0x0039 @@ -123,41 +84,12 @@ const sal_Int16 Multiplier_Count = 7; const sal_Int16 ExponentCount_CJK = 6; -// not used -#if 0 -static sal_Int16 MultiplierExponent_CJK[ExponentCount_CJK] = { - 12, 8, 4, 3, 2, 1 -}; -static sal_Unicode MultiplierChar_CJK[][ExponentCount_CJK] = { - 0x5146, 0x4EBF, 0x4E07, 0x5343, 0x767E, 0x5341, // S. Chinese Lower - 0x5146, 0x4EBF, 0x4E07, 0x4EDF, 0x4F70, 0x62FE, // S. Chinese Upper - 0x5146, 0x5104, 0x842C, 0x5343, 0x767E, 0x5341, // T. Chinese & Korean Lower - 0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE, // T. Chinese & Korean Upper - 0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED, // Korean Hangul - 0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341, // Japanese Modern - 0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE, // Japanese Traditional -}; -#endif const sal_Int16 ExponentCount_short_CJK = 2; -// not used -#if 0 -static sal_Int16 MultiplierExponent_short_CJK[ExponentCount_short_CJK] = { - 8, 4, -}; - -static sal_Unicode MultiplierChar_short_CJK[][ExponentCount_short_CJK] = { - 0x4EBF, 0x4E07, // S. Chinese Lower - 0x4EBF, 0x4E07, // S. Chinese Upper - 0x5104, 0x842C, // T. Chinese & Korean Lower - 0x5104, 0x842C, // T. Chinese & Korean Upper - 0xC5B5, 0xB9CC, // Korean Hangul - 0x5104, 0x4E07, // Japanese Modern - 0x5104, 0x842C, // Japanese Traditional -}; -#endif } } } } #endif // _L10N_TRANSLITERATION_NUMTOCHAR_H_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx index 95cf1ef4a237..a92ff533325a 100644 --- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx +++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -153,3 +155,4 @@ fullwidthToHalfwidthLikeASC::transliterateChar2Char( sal_Unicode inChar ) } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/halfwidthToFullwidth.cxx b/i18npool/source/transliteration/halfwidthToFullwidth.cxx index 7786d269d218..8e1decae447a 100644 --- a/i18npool/source/transliteration/halfwidthToFullwidth.cxx +++ b/i18npool/source/transliteration/halfwidthToFullwidth.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -133,3 +135,5 @@ halfwidthToFullwidthLikeJIS::transliterateChar2Char( sal_Unicode inChar) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/hiraganaToKatakana.cxx b/i18npool/source/transliteration/hiraganaToKatakana.cxx index ef59e1845767..a92a48894586 100644 --- a/i18npool/source/transliteration/hiraganaToKatakana.cxx +++ b/i18npool/source/transliteration/hiraganaToKatakana.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -59,3 +59,5 @@ hiraganaToKatakana::hiraganaToKatakana() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx b/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx index a67841d2e4d6..b6b4581f8be6 100644 --- a/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -35,7 +36,6 @@ #include <transliteration_Ignore.hxx> using namespace com::sun::star::uno; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -57,3 +57,5 @@ ignoreBaFa_ja_JP::ignoreBaFa_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx b/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx index 8e7f03b54d17..2869ce57f63d 100644 --- a/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -58,3 +58,5 @@ ignoreHyuByu_ja_JP::ignoreHyuByu_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx index 833f060be638..4ecfbf00be9f 100644 --- a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -147,3 +149,5 @@ ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPo } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx index f6a11e11229d..59872eb78995 100644 --- a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -155,3 +157,5 @@ ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, s } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreKana.cxx b/i18npool/source/transliteration/ignoreKana.cxx index 103bf9de5e3a..2111de81c1a5 100644 --- a/i18npool/source/transliteration/ignoreKana.cxx +++ b/i18npool/source/transliteration/ignoreKana.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -69,3 +71,5 @@ ignoreKana::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx index 39b2e7a384cc..f8d5cfd07b54 100644 --- a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -104,3 +106,5 @@ ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx b/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx index 818014e2c0c6..a8f16647aed8 100644 --- a/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -58,3 +59,5 @@ ignoreMiddleDot_ja_JP::ignoreMiddleDot_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx b/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx index 2dc8a172223b..730e111f469c 100644 --- a/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,5 @@ ignoreMinusSign_ja_JP::ignoreMinusSign_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx index 86048284d5b7..9689b6b8e0fb 100644 --- a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -363,3 +365,5 @@ ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startP } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx b/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx index 2554e2b672d3..c8c48dc2285d 100644 --- a/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -63,3 +63,5 @@ ignoreSeZe_ja_JP::ignoreSeZe_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx b/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx index 2a4fd0683864..3534cd1aa3d0 100644 --- a/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -124,3 +125,4 @@ ignoreSeparator_ja_JP::ignoreSeparator_ja_JP() } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreSize_ja_JP.cxx b/i18npool/source/transliteration/ignoreSize_ja_JP.cxx index 373a8b32df6e..d2793faea35a 100644 --- a/i18npool/source/transliteration/ignoreSize_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSize_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -70,3 +72,5 @@ ignoreSize_ja_JP::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeExcep } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx b/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx index c0d33e5ac1ef..daffa27a0f1c 100644 --- a/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -65,3 +66,5 @@ ignoreSpace_ja_JP::ignoreSpace_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx b/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx index 58e4cab48a83..b7280a7fc390 100644 --- a/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -36,7 +37,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -68,3 +68,5 @@ ignoreTiJi_ja_JP::ignoreTiJi_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx b/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx index dcbb4d03f437..3bf328d688e0 100644 --- a/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,5 @@ ignoreTraditionalKana_ja_JP::ignoreTraditionalKana_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx b/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx index 2d2a3a1bdf13..2bd2e7cd6ea7 100644 --- a/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -745,3 +746,5 @@ ignoreTraditionalKanji_ja_JP::ignoreTraditionalKanji_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreWidth.cxx b/i18npool/source/transliteration/ignoreWidth.cxx index 494963c39d3f..cdc5d59b0eb6 100644 --- a/i18npool/source/transliteration/ignoreWidth.cxx +++ b/i18npool/source/transliteration/ignoreWidth.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,7 +40,8 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -70,3 +72,5 @@ ignoreWidth::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx b/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx index 42e454e73941..5b833041478d 100644 --- a/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,5 @@ ignoreZiZu_ja_JP::ignoreZiZu_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/katakanaToHiragana.cxx b/i18npool/source/transliteration/katakanaToHiragana.cxx index fd821af5bf5b..9dbbc8eed6b3 100644 --- a/i18npool/source/transliteration/katakanaToHiragana.cxx +++ b/i18npool/source/transliteration/katakanaToHiragana.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,3 +57,5 @@ katakanaToHiragana::katakanaToHiragana() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/largeToSmall_ja_JP.cxx b/i18npool/source/transliteration/largeToSmall_ja_JP.cxx index f53981cca01e..3afec8d7026b 100644 --- a/i18npool/source/transliteration/largeToSmall_ja_JP.cxx +++ b/i18npool/source/transliteration/largeToSmall_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -91,3 +91,5 @@ largeToSmall_ja_JP::largeToSmall_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/numtochar.cxx b/i18npool/source/transliteration/numtochar.cxx index 5742ddf04926..5772ac0de763 100644 --- a/i18npool/source/transliteration/numtochar.cxx +++ b/i18npool/source/transliteration/numtochar.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ TRANSLITERATION_NUMTOCHAR( _th, NATNUM1 ) #undef TRANSLITERATION_NUMTOCHAR } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/numtotext_cjk.cxx b/i18npool/source/transliteration/numtotext_cjk.cxx index af33702ec57a..06965b1835f7 100644 --- a/i18npool/source/transliteration/numtotext_cjk.cxx +++ b/i18npool/source/transliteration/numtotext_cjk.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -90,3 +91,5 @@ TRANSLITERATION_NUMTOTEXT ( HangulCircledSyllable_ko, table_HangulCircledSyllabl #undef TRANSLITERATION_NUMTOTEXT } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/smallToLarge_ja_JP.cxx b/i18npool/source/transliteration/smallToLarge_ja_JP.cxx index 9b054dfb972a..42285b99afe1 100644 --- a/i18npool/source/transliteration/smallToLarge_ja_JP.cxx +++ b/i18npool/source/transliteration/smallToLarge_ja_JP.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -91,3 +91,5 @@ smallToLarge_ja_JP::smallToLarge_ja_JP() } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx index 38c5d75931f2..d854c027016e 100644 --- a/i18npool/source/transliteration/textToPronounce_zh.cxx +++ b/i18npool/source/transliteration/textToPronounce_zh.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,9 @@ #include <textToPronounce_zh.hxx> using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; namespace com { namespace sun { namespace star { namespace i18n { @@ -148,9 +151,9 @@ extern "C" { static void SAL_CALL thisModule() {} } TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name) { #ifdef SAL_DLLPREFIX - OUString lib=OUString::createFromAscii(SAL_DLLPREFIX"index_data"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM(SAL_DLLPREFIX"index_data"SAL_DLLEXTENSION)); #else - OUString lib=OUString::createFromAscii("index_data"SAL_DLLEXTENSION); + OUString lib(RTL_CONSTASCII_USTRINGPARAM("index_data"SAL_DLLEXTENSION)); #endif hModule = osl_loadModuleRelative( &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); @@ -166,3 +169,5 @@ TextToPronounce_zh::~TextToPronounce_zh() if (hModule) osl_unloadModule(hModule); } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/texttonum.cxx b/i18npool/source/transliteration/texttonum.cxx index 1d801bca569a..888c871c1fc3 100644 --- a/i18npool/source/transliteration/texttonum.cxx +++ b/i18npool/source/transliteration/texttonum.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,6 @@ #include <rtl/ustrbuf.hxx> using namespace com::sun::star::uno; -using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { @@ -62,3 +62,5 @@ TRANSLITERATION_TEXTTONUM( KanjiLongModern_ja_JP) #undef TRANSLITERATION_TEXTTONUM } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 7506ec5c15aa..c900f2f3636f 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,9 +52,10 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; -using namespace rtl; using namespace com::sun::star::container; +using ::rtl::OUString; + namespace com { namespace sun { namespace star { namespace i18n { #define ERROR RuntimeException() @@ -159,7 +161,7 @@ TransliterationImpl::TransliterationImpl(const Reference <XMultiServiceFactory>& if ( xMSF.is() ) { Reference < XInterface > xI= - xMSF->createInstance(OUString::createFromAscii("com.sun.star.i18n.LocaleData")); + xMSF->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.LocaleData"))); if ( xI.is() ) { Any x = xI->queryInterface( ::getCppuType( (const uno::Reference< i18n::XLocaleData >*)0) ); x >>= localedata; @@ -181,7 +183,7 @@ TransliterationImpl::getName() throw(RuntimeException) if (numCascade == 1 && bodyCascade[0].is()) return bodyCascade[0]->getName(); if (numCascade < 1) - return ( OUString::createFromAscii("Not Loaded")); + return ( OUString(RTL_CONSTASCII_USTRINGPARAM("Not Loaded"))); throw ERROR; } @@ -606,7 +608,7 @@ void TransliterationImpl::loadBody( OUString &implName, Reference<XExtendedTrans Reference< XContentEnumerationAccess > xEnumAccess( xSMgr, UNO_QUERY ); Reference< XEnumeration > xEnum(xEnumAccess->createContentEnumeration( - OUString::createFromAscii(TRLT_SERVICELNAME_L10N))); + OUString(RTL_CONSTASCII_USTRINGPARAM(TRLT_SERVICELNAME_L10N)))); if (xEnum.is()) { while (xEnum->hasMoreElements()) { Any a = xEnum->nextElement(); @@ -636,7 +638,7 @@ sal_Bool SAL_CALL TransliterationImpl::loadModuleByName( const OUString& implName, Reference<XExtendedTransliteration>& body, const Locale& rLocale) throw(RuntimeException) { - OUString cname = OUString::createFromAscii(TRLT_IMPLNAME_PREFIX) + implName; + OUString cname = OUString(RTL_CONSTASCII_USTRINGPARAM(TRLT_IMPLNAME_PREFIX)) + implName; loadBody(cname, body); if (body.is()) { body->loadModule((TransliterationModules)0, rLocale); // toUpper/toLoad need rLocale @@ -647,7 +649,7 @@ TransliterationImpl::loadModuleByName( const OUString& implName, if (i == 0) // current module is caseignore body->loadModule(TMlist[0].tm, rLocale); // caseingore need to setup module name if (! caseignore.is()) { - OUString bname = OUString::createFromAscii(TRLT_IMPLNAME_PREFIX) + + OUString bname = OUString(RTL_CONSTASCII_USTRINGPARAM(TRLT_IMPLNAME_PREFIX)) + OUString::createFromAscii(TMlist[0].implName); loadBody(bname, caseignore); } @@ -685,3 +687,5 @@ TransliterationImpl::getSupportedServiceNames(void) throw( RuntimeException ) } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_Ignore.cxx b/i18npool/source/transliteration/transliteration_Ignore.cxx index 35e82fc579f7..4c68197b5d87 100644 --- a/i18npool/source/transliteration/transliteration_Ignore.cxx +++ b/i18npool/source/transliteration/transliteration_Ignore.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,7 @@ #include <transliteration_Ignore.hxx> using namespace com::sun::star::uno; -using namespace rtl; +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -218,3 +219,5 @@ transliteration_Ignore::transliterateChar2Char( sal_Unicode inChar) throw(Runtim } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index 95b44200ceac..5a1de0351a9c 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,8 @@ #include <defaultnumberingprovider.hxx> using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -147,3 +149,5 @@ transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) throw(Runt } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_OneToOne.cxx b/i18npool/source/transliteration/transliteration_OneToOne.cxx index 9628286f892d..f22e57a8e219 100644 --- a/i18npool/source/transliteration/transliteration_OneToOne.cxx +++ b/i18npool/source/transliteration/transliteration_OneToOne.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -34,7 +35,8 @@ #include <transliteration_OneToOne.hxx> using namespace com::sun::star::uno; -using namespace rtl; + +using ::rtl::OUString; namespace com { namespace sun { namespace star { namespace i18n { @@ -106,3 +108,4 @@ transliteration_OneToOne::transliterateChar2Char( sal_Unicode inChar) throw(Runt } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 43222b7a41eb..84ae11349a32 100755..100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,8 +48,6 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::rtl; -#define A2OU(x) OUString::createFromAscii(x) - namespace com { namespace sun { namespace star { namespace i18n { @@ -112,64 +111,7 @@ Transliteration_body::transliterate( Sequence< sal_Int32 >& offset) throw(RuntimeException) { -#if 0 -/* Performance optimization: - * The two realloc() consume 48% (32% grow, 16% shrink) runtime of this method! - * getValue() needs about 15%, so there is equal balance if we trade the second - * (shrinking) realloc() for a getValue(). But if the caller initializes the - * sequence to nCount elements there isn't any change in size necessary in most - * cases (one-to-one mapping) and we gain 33%. - * - * Of that constellation the getValue() method takes 20% upon each call, so 40% - * for both. By remembering the first calls' results we could gain some extra - * percentage again, but unfortunately getValue() may return a reference to a - * static buffer, so we can't store the pointer directly but would have to - * copy-construct an array, which doesn't give us any advantage. - * - * Much more is accomplished by working directly on the sequence buffer - * returned by getArray() instead of using operator[] for each and every - * access. - * - * And while we're at it: now that we know the size in advance we don't need to - * copy the buffer anymore, just create the real string buffer and let the - * return value take ownership. - * - * All together these changes result in the new implementation needing only 62% - * of the time of the old implementation (in other words: that one was 1.61 - * times slower ...) - */ - - // Allocate the max possible buffer. Try to use stack instead of heap which - // would have to be reallocated most times anyway. - const sal_Int32 nLocalBuf = 512 * NMAPPINGMAX; - sal_Unicode aLocalBuf[nLocalBuf], *out = aLocalBuf, *aHeapBuf = NULL; - - const sal_Unicode *in = inStr.getStr() + startPos; - - if (nCount > 512) - out = aHeapBuf = (sal_Unicode*) malloc((nCount * NMAPPINGMAX) * sizeof(sal_Unicode)); - - if (useOffset) - offset.realloc(nCount * NMAPPINGMAX); - sal_Int32 j = 0; - for (sal_Int32 i = 0; i < nCount; i++) { - Mapping &map = casefolding::getValue(in, i, nCount, aLocale, nMappingType); - for (sal_Int32 k = 0; k < map.nmap; k++) { - if (useOffset) - offset[j] = i + startPos; - out[j++] = map.map[k]; - } - } - if (useOffset) - offset.realloc(j); - OUString r(out, j); - - if (aHeapBuf) - free(aHeapBuf); - - return r; -#else const sal_Unicode *in = inStr.getStr() + startPos; // Two different blocks to eliminate the if(useOffset) condition inside the @@ -251,7 +193,6 @@ Transliteration_body::transliterate( delete [] pHeapBuf; return aRet; } -#endif } OUString SAL_CALL @@ -331,61 +272,6 @@ Transliteration_titlecase::Transliteration_titlecase() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_titlecase"; } -#if 0 -struct LigatureData -{ - sal_uInt32 cChar; - sal_Char * pUtf8Text; -}; - -// available Unicode ligatures: -// http://www.unicode.org/charts -// http://www.unicode.org/charts/PDF/UFB00.pdf -static LigatureData aLigatures[] = -{ - { 0x0FB00, "ff" }, - { 0x0FB01, "fi" }, - { 0x0FB02, "fl" }, - { 0x0FB03, "ffi" }, - { 0x0FB04, "ffl" }, - { 0x0FB05, "ft" }, - { 0x0FB06, "st" }, - - { 0x0FB13, "\xD5\xB4\xD5\xB6" }, // Armenian small men now - { 0x0FB14, "\xD5\xB4\xD5\xA5" }, // Armenian small men ech - { 0x0FB15, "\xD5\xB4\xD5\xAB" }, // Armenian small men ini - { 0x0FB16, "\xD5\xBE\xD5\xB6" }, // Armenian small vew now - { 0x0FB17, "\xD5\xB4\xD5\xAD" }, // Armenian small men xeh - { 0x00000, "" } -}; - -static inline bool lcl_IsLigature( sal_uInt32 cChar ) -{ - return (0x0FB00 <= cChar && cChar <= 0x0FB06) || (0x0FB13 <= cChar && cChar <= 0x0FB17); -} - -static rtl::OUString lcl_ResolveLigature( sal_uInt32 cChar ) -{ - rtl::OUString aRes; - if (lcl_IsLigature( cChar )) - { - LigatureData *pFound = NULL; - LigatureData *pData = aLigatures; - while (!pFound && pData->cChar != 0) - { - if (pData->cChar == cChar) - pFound = pData; - ++pData; - } - if (pFound) - aRes = rtl::OUString( pFound->pUtf8Text, strlen( pFound->pUtf8Text ), RTL_TEXTENCODING_UTF8 ); - } - else - aRes = rtl::OUString( &cChar, 1 ); - return aRes; -} -#endif // if 0 - static rtl::OUString transliterate_titlecase_Impl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, const Locale &rLocale, @@ -471,3 +357,4 @@ rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( } } } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_caseignore.cxx b/i18npool/source/transliteration/transliteration_caseignore.cxx index ba63127c2d70..3d2432c617f6 100644 --- a/i18npool/source/transliteration/transliteration_caseignore.cxx +++ b/i18npool/source/transliteration/transliteration_caseignore.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,20 +50,6 @@ Transliteration_caseignore::Transliteration_caseignore() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_caseignore"; } -#if 0 -/* NOTE: We had this, derived from Transliteration_caseignore, but it was - * unused code. Deactivated with #i89580# but left for reference in case - * MappingTypeSimpleFolding would be needed at some time. - */ -Transliteration_simplecaseignore::Transliteration_simplecaseignore() -{ - nMappingType = MappingTypeSimpleFolding; - moduleLoaded = (TransliterationModules)0; - transliterationName = "simple case ignore (generic)"; - implementationName = "com.sun.star.i18n.Transliteration.Transliteration_simplecaseignore"; -} -#endif - void SAL_CALL Transliteration_caseignore::loadModule( TransliterationModules modName, const Locale& rLocale ) throw(RuntimeException) @@ -170,3 +157,5 @@ Transliteration_caseignore::compare( } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/transliteration/transliteration_commonclass.cxx b/i18npool/source/transliteration/transliteration_commonclass.cxx index 278336411ce8..366757d0b18e 100644 --- a/i18npool/source/transliteration/transliteration_commonclass.cxx +++ b/i18npool/source/transliteration/transliteration_commonclass.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -129,7 +130,7 @@ transliteration_commonclass::compareString( const OUString& str1, const OUString OUString SAL_CALL transliteration_commonclass::transliterateString2String( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount ) throw(RuntimeException) { - static Sequence < sal_Int32 > dummy_offset; + Sequence < sal_Int32 > dummy_offset; useOffset = sal_False; OUString tmpStr = transliterate(inStr, startPos, nCount, dummy_offset); useOffset = sal_True; @@ -162,3 +163,5 @@ Sequence< OUString > SAL_CALL transliteration_commonclass::getSupportedServiceNa } } } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |