From 17236a45c1368b8e9be8dae0f2b6918a88e7f4f4 Mon Sep 17 00:00:00 2001 From: Vladimir Glazounov Date: Wed, 1 Oct 2008 07:16:40 +0000 Subject: CWS-TOOLING: integrate CWS i18n45 --- i18npool/inc/breakiterator_cjk.hxx | 4 +- i18npool/inc/breakiterator_hi.hxx | 37 ---- i18npool/inc/localedata.hxx | 3 +- .../source/breakiterator/breakiteratorImpl.cxx | 4 +- .../source/breakiterator/breakiterator_cjk.cxx | 25 ++- i18npool/source/breakiterator/breakiterator_hi.cxx | 191 --------------------- .../source/breakiterator/breakiterator_unicode.cxx | 10 +- i18npool/source/breakiterator/data/char_in.txt | 48 ++++++ i18npool/source/breakiterator/data/char_ta.txt | 46 ----- i18npool/source/breakiterator/makefile.mk | 3 +- i18npool/source/localedata/LocaleNode.cxx | 9 +- i18npool/source/localedata/data/bn_BD.xml | 7 + i18npool/source/localedata/data/bn_IN.xml | 7 + i18npool/source/localedata/data/gu_IN.xml | 7 + i18npool/source/localedata/data/hi_IN.xml | 7 + i18npool/source/localedata/data/ja_JP.xml | 1 + i18npool/source/localedata/data/kn_IN.xml | 7 + i18npool/source/localedata/data/ko_KR.xml | 1 + i18npool/source/localedata/data/locale.dtd | 2 +- i18npool/source/localedata/data/ml_IN.xml | 7 + i18npool/source/localedata/data/or_IN.xml | 7 + i18npool/source/localedata/data/pa_IN.xml | 7 + i18npool/source/localedata/data/ta_IN.xml | 7 + i18npool/source/localedata/data/te_IN.xml | 7 + i18npool/source/localedata/data/zh_CN.xml | 1 + i18npool/source/localedata/data/zh_TW.xml | 1 + i18npool/source/localedata/localedata.cxx | 17 +- .../source/registerservices/registerservices.cxx | 11 +- 28 files changed, 190 insertions(+), 294 deletions(-) create mode 100644 i18npool/source/breakiterator/data/char_in.txt diff --git a/i18npool/inc/breakiterator_cjk.hxx b/i18npool/inc/breakiterator_cjk.hxx index f01351103b54..8a1ec419324c 100644 --- a/i18npool/inc/breakiterator_cjk.hxx +++ b/i18npool/inc/breakiterator_cjk.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: breakiterator_cjk.hxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.16.1 $ * * This file is part of OpenOffice.org. * @@ -58,6 +58,7 @@ public: protected: xdictionary *dict; + rtl::OUString hangingCharacters; }; #define BREAKITERATOR_CJK( lang ) \ @@ -69,6 +70,7 @@ public:\ #ifdef BREAKITERATOR_ALL BREAKITERATOR_CJK( zh ) +BREAKITERATOR_CJK( zh_TW ) BREAKITERATOR_CJK( ja ) BREAKITERATOR_CJK( ko ) #endif diff --git a/i18npool/inc/breakiterator_hi.hxx b/i18npool/inc/breakiterator_hi.hxx index 76fa22c354f1..e69de29bb2d1 100644 --- a/i18npool/inc/breakiterator_hi.hxx +++ b/i18npool/inc/breakiterator_hi.hxx @@ -1,37 +0,0 @@ -/************************************************************************* -#* -#* Copyright (c) 2002 Sun Microsystems Inc. -#* -#* Bugs! - Contact Prabhat.Hegde@sun.com -#*************************************************************************/ - -#ifndef _I18N_BREAKITERATOR_HI_HXX_ -#define _I18N_BREAKITERATOR_HI_HXX_ - -#include - -namespace com { -namespace sun { -namespace star { -namespace i18n { - -// ---------------------------------------------------- -// class BreakIterator_hi -// ---------------------------------------------------- -class BreakIterator_hi : public BreakIterator_CTL -{ -public: - BreakIterator_hi(); - ~BreakIterator_hi(); - -protected: - void SAL_CALL makeIndex(const rtl::OUString& text, sal_Int32 pos) - throw(com::sun::star::uno::RuntimeException); -}; - -} -} -} -} - -#endif diff --git a/i18npool/inc/localedata.hxx b/i18npool/inc/localedata.hxx index 41ec2bd12410..37a643cac392 100644 --- a/i18npool/inc/localedata.hxx +++ b/i18npool/inc/localedata.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: localedata.hxx,v $ - * $Revision: 1.20 $ + * $Revision: 1.20.16.1 $ * * This file is part of OpenOffice.org. * @@ -112,6 +112,7 @@ public: virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getFollowPageWords( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL hasPhonetic( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL isPhonetic( const com::sun::star::lang::Locale& rLocale, const rtl::OUString& algorithm ) throw(com::sun::star::uno::RuntimeException); + virtual rtl::OUString SAL_CALL getHangingCharacters( const com::sun::star::lang::Locale& rLocale ) throw(com::sun::star::uno::RuntimeException); //XServiceInfo virtual rtl::OUString SAL_CALL getImplementationName() throw( com::sun::star::uno::RuntimeException ); diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index 122d8835df70..bb08d9e4e6c3 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: breakiteratorImpl.cxx,v $ - * $Revision: 1.28 $ + * $Revision: 1.27.4.2 $ * * This file is part of OpenOffice.org. * @@ -234,6 +234,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::beginOfSentence( const OUString& Text, sal { if (nStartPos < 0 || nStartPos > Text.getLength()) return -1; + if (Text.getLength() == 0) return 0; return LBI->beginOfSentence(Text, nStartPos, rLocale); } @@ -242,6 +243,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::endOfSentence( const OUString& Text, sal_I { if (nStartPos < 0 || nStartPos > Text.getLength()) return -1; + if (Text.getLength() == 0) return 0; return LBI->endOfSentence(Text, nStartPos, rLocale); } diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index d2b15d0be742..3d684b8788df 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: breakiterator_cjk.cxx,v $ - * $Revision: 1.17 $ + * $Revision: 1.17.16.1 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,7 @@ #define BREAKITERATOR_ALL #include +#include #include using namespace ::com::sun::star::uno; @@ -108,7 +109,7 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak( LineBreakResults lbr; if (bOptions.allowPunctuationOutsideMargin && - bOptions.forbiddenBeginCharacters.indexOf(Text[nStartPos]) != -1 && + hangingCharacters.indexOf(Text[nStartPos]) != -1 && ++nStartPos == Text.getLength()) { ; // do nothing } else if (bOptions.applyForbiddenRules && 0 < nStartPos && nStartPos < Text.getLength()) { @@ -122,12 +123,15 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak( lbr.breakType = BreakType::WORDBOUNDARY; return lbr; } + +#define LOCALE(language, country) lang::Locale(OUString::createFromAscii(language), OUString::createFromAscii(country), OUString()) // ---------------------------------------------------- // class BreakIterator_zh // ----------------------------------------------------; BreakIterator_zh::BreakIterator_zh() { dict = new xdictionary("zh"); + hangingCharacters = LocaleData().getHangingCharacters(LOCALE("zh", "CN")); cBreakIterator = "com.sun.star.i18n.BreakIterator_zh"; } @@ -136,6 +140,21 @@ BreakIterator_zh::~BreakIterator_zh() delete dict; } +// ---------------------------------------------------- +// class BreakIterator_zh_TW +// ----------------------------------------------------; +BreakIterator_zh_TW::BreakIterator_zh_TW() +{ + dict = new xdictionary("zh"); + hangingCharacters = LocaleData().getHangingCharacters(LOCALE("zh", "TW")); + cBreakIterator = "com.sun.star.i18n.BreakIterator_zh_TW"; +} + +BreakIterator_zh_TW::~BreakIterator_zh_TW() +{ + delete dict; +} + // ---------------------------------------------------- // class BreakIterator_ja // ----------------------------------------------------; @@ -143,6 +162,7 @@ BreakIterator_ja::BreakIterator_ja() { dict = new xdictionary("ja"); dict->setJapaneseWordBreak(); + hangingCharacters = LocaleData().getHangingCharacters(LOCALE("ja", "JP")); cBreakIterator = "com.sun.star.i18n.BreakIterator_ja"; } @@ -156,6 +176,7 @@ BreakIterator_ja::~BreakIterator_ja() // ----------------------------------------------------; BreakIterator_ko::BreakIterator_ko() { + hangingCharacters = LocaleData().getHangingCharacters(LOCALE("ko", "KR")); cBreakIterator = "com.sun.star.i18n.BreakIterator_ko"; } diff --git a/i18npool/source/breakiterator/breakiterator_hi.cxx b/i18npool/source/breakiterator/breakiterator_hi.cxx index d3002a6f3d80..e69de29bb2d1 100644 --- a/i18npool/source/breakiterator/breakiterator_hi.cxx +++ b/i18npool/source/breakiterator/breakiterator_hi.cxx @@ -1,191 +0,0 @@ -/************************************************************************* -#* -#* Copyright (c) 2002 Sun Microsystems Inc. -#* -#* Bugs! - Contact Prabhat.Hegde@sun.com -#************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_i18npool.hxx" - -#include - -#include // for memset - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::rtl; - -namespace com { namespace sun { namespace star { namespace i18n { - -// ---------------------------------------------------- -// class Breakiterator_hi -// ----------------------------------------------------; -BreakIterator_hi::BreakIterator_hi() -{ - cBreakIterator = "com.sun.star.i18n.BreakIterator_hi"; -} - -BreakIterator_hi::~BreakIterator_hi() -{ -} - -/* - * Devanagari character class Definitions - */ -#define _NP 1L -#define _UP (1L<<1) -#define _IV (1L<<2) -#define _CN (1L<<3) -#define _CK (1L<<4) -#define _RC (1L<<5) -#define _NM (1L<<6) -#define _IM (1L<<7) -#define _HL (1L<<8) -#define _NK (1L<<9) -#define _VD (1L<<10) -#define _HD (1L<<11) -#define _II_M (1L<<12) -#define _EY_M (1L<<13) -#define _AI_M (1L<<14) -#define _OW1_M (1L<<15) -#define _OW2_M (1L<<16) -#define _MS (1L<<17) -#define _AYE_M (1L<<18) -#define _EE_M (1L<<19) -#define _AWE_M (1L<<20) -#define _O_M (1L<<21) -#define _RM (_II_M|_EY_M|_AI_M|_OW1_M|_OW2_M|_AYE_M|_EE_M|_AWE_M|_O_M) - -/* Non-Defined Class type */ -#define __ND 0 - -/* - * Devanagari character type definitions - */ -#define __UP 1 // ChandraBindu & Anuswar -#define __NP 2 // Visarg -#define __IV 3 // Independant Vowels -#define __CN 4 // Consonants except _CK & _RC -#define __CK 5 // Consonants that can be followed by Nukta -#define __RC 6 // Ra -#define __NM 7 // Matra -#define __RM 8 // Ra + HAL -#define __IM 9 // Choti I Matra -#define __HL 10 // HAL -#define __NK 11 // Nukta -#define __VD 12 // Vedic -#define __HD 13 // Hindu Numerals - -/* - * Devanagari character type table - */ -static const sal_uInt16 devaCT[128] = { -/* 0, 1, 2, 3, 4, 5, 6, 7, - 8, 9, A, B, C, D, E, F, */ -/* 0900 */ __ND, __UP, __UP, __NP, __ND, __IV, __IV, __IV, - __IV, __IV, __IV, __IV, __IV, __IV, __IV, __IV, -/* 0910 */ __IV, __IV, __IV, __IV, __IV, __CK, __CK, __CK, - __CN, __CN, __CN, __CN, __CK, __CN, __CN, __CN, -/* 0920 */ __CN, __CK, __CK, __CN, __CN, __CN, __CN, __CN, - __CN, __CN, __CN, __CK, __CN, __CN, __CN, __CN, -/* 0930 */ __RC, __CN, __CN, __CN, __CN, __CN, __CN, __CN, - __CN, __CN, __ND, __ND, __NK, __VD, __NM, __IM, -/* 0940 */ __RM, __NM, __NM, __NM, __NM, __RM, __RM, __RM, - __RM, __RM, __RM, __RM, __RM, __HL, __ND, __ND, -/* 0950 */ __ND, __VD, __VD, __VD, __VD, __ND, __ND, __ND, - __CN, __CN, __CN, __CN, __CN, __CN, __CN, __CN, -/* 0960 */ __IV, __IV, __NM, __NM, __ND, __ND, __HD, __HD, - __HD, __HD, __HD, __HD, __HD, __HD, __HD, __HD, -/* 0970 */ __ND, __ND, __ND, __ND, __ND, __ND, __ND, __ND, - __ND, __ND, __ND, __ND, __ND, __ND, __ND, __ND, -}; - - -#define getCharType(x) \ - ((x >= 0x0900 && x < 0x097f) ? devaCT[x - 0x0900] : __ND) - -/* - * Devanagari character composition table - */ -static const sal_uInt16 devaCompRel[14][14] = { - /* ND, UP, NP, IV, CN, CK, RC, NM, RM, IM, HL, NK, VD, HD, */ - /* 0 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* ND */ - /* 1 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* UP */ - /* 2 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* NP */ - /* 3 */ { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* IV */ - /* 4 */ { 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 }, /* CN */ - /* 5 */ { 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0 }, /* CK */ - /* 6 */ { 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 }, /* RC */ - /* 7 */ { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* NM */ - /* 8 */ { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* RM */ - /* 9 */ { 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* IM */ - /* 10 */ { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, /* HL */ - /* 11 */ { 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 }, /* NK */ - /* 12 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* VD */ - /* 13 */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* HD */ -}; - -static sal_uInt16 SAL_CALL -getCombState(const sal_Unicode *text, sal_Int32 pos) -{ - sal_uInt16 ch1 = getCharType(text[pos]); - sal_uInt16 ch2 = getCharType(text[pos+1]); - - return devaCompRel[ch1][ch2]; -} - -static sal_uInt32 SAL_CALL -getACell(const sal_Unicode *text, sal_Int32 pos, sal_Int32 len) -{ - sal_uInt32 curr = 1; - for (; pos + 1 < len && getCombState(text, pos) == 1; curr++, pos++) {} - return curr; -} - -#define is_Hindi(x) ((x >= 0x0900 && x < 0x097f) || (x >= 0x0905 && x < 0x0940) || \ - (x >= 0x093c && x < 0x094e) || (x >= 0x0950 && x < 0x0954) || \ - (x >= 0x0958 && x < 0x0971)) - -void SAL_CALL -i18n::BreakIterator_hi::makeIndex(const OUString& Text, sal_Int32 nStartPos) - throw(uno::RuntimeException) -{ - if (Text != cachedText) { - cachedText = Text; - if (cellIndexSize < cachedText.getLength()) { - cellIndexSize = cachedText.getLength(); - free(nextCellIndex); - free(previousCellIndex); - nextCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); - previousCellIndex = (sal_Int32*) calloc(cellIndexSize, sizeof(sal_Int32)); - } - // reset nextCell for new Text - memset(nextCellIndex, 0, cellIndexSize * sizeof(sal_Int32)); - } - else if (nextCellIndex[nStartPos] > 0 || ! is_Hindi(Text[nStartPos])) - return; - - const sal_Unicode* str = cachedText.getStr(); - sal_Int32 len = cachedText.getLength(), startPos, endPos; - - startPos = nStartPos; - while (startPos > 0 && is_Hindi(str[startPos-1])) startPos--; - endPos = nStartPos+1; - while (endPos < len && is_Hindi(str[endPos])) endPos++; - - sal_Int32 start, end, pos; - pos = start = end = startPos; - - while (pos < endPos) { - end += getACell(str, start, endPos); - while (pos < end) { - nextCellIndex[pos] = end; - previousCellIndex[pos] = start; - pos++; - } - start = end; - } -} - -} } } } diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 33244844f1c6..9dbecd813b49 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: breakiterator_unicode.cxx,v $ - * $Revision: 1.36 $ + * $Revision: 1.36.2.1 $ * * This file is part of OpenOffice.org. * @@ -363,11 +363,17 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( { LineBreakResults lbr; + if (nStartPos >= Text.getLength()) { + lbr.breakIndex = Text.getLength(); + lbr.breakType = BreakType::WORDBOUNDARY; + return lbr; + } + loadICUBreakIterator(rLocale, LOAD_LINE_BREAKITERATOR, 0, lineRule, Text); sal_Bool GlueSpace=sal_True; while (GlueSpace) { - if (line.aBreakIterator->isBoundary(nStartPos)) { //Line boundary break + if (line.aBreakIterator->preceding(nStartPos + 1) == nStartPos) { //Line boundary break lbr.breakIndex = nStartPos; lbr.breakType = BreakType::WORDBOUNDARY; } else if (hOptions.rHyphenator.is()) { //Hyphenation break diff --git a/i18npool/source/breakiterator/data/char_in.txt b/i18npool/source/breakiterator/data/char_in.txt new file mode 100644 index 000000000000..72c4a44720cd --- /dev/null +++ b/i18npool/source/breakiterator/data/char_in.txt @@ -0,0 +1,48 @@ +# +# Copyright (C) 2002-2003, 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 Version 4.0.0 +# + +# +# Character Class Definitions. +# The names are those from TR29. +# +$CR = \r; +$LF = \n; +$Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:]]; + +# add Japanese Half Width voicing marks to $Extend +$VoiceMarks = [\uff9e\uff9f]; +$cmcextend = [ \u0903 \u093e-\u0940 \u0949-\u094C \u09bf-\u09c0 \u09c7-\u09c8 \u09cb-\u09cc \u0bc1-\u0bc2 \u0bc6-\u0bc8 \u0bca-\u0bcc \u0c01-\u0c03 \u0c41-\u0c44]; +$Extend = [[:Grapheme_Extend = TRUE:] $VoiceMarks $cmcextend]; + +# +# Korean Syllable Definitions +# +$L = [:Hangul_Syllable_Type = L:]; +$V = [:Hangul_Syllable_Type = V:]; +$T = [:Hangul_Syllable_Type = T:]; + +$LV = [:Hangul_Syllable_Type = LV:]; +$LVT = [:Hangul_Syllable_Type = LVT:]; + +$HangulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+; + +# +# Forward Break Rules +# +$CR $LF; +([^$Control] | $HangulSyllable) $Extend*; +.; + + +# +# Reverse Rule, back up to the beginning of some preceding grapheme cluster. +# +! ($Extend | $V | $T )* ($LF $CR | ($LV | $LVT)?$L* | .); diff --git a/i18npool/source/breakiterator/data/char_ta.txt b/i18npool/source/breakiterator/data/char_ta.txt index 5c9c702356a6..e69de29bb2d1 100644 --- a/i18npool/source/breakiterator/data/char_ta.txt +++ b/i18npool/source/breakiterator/data/char_ta.txt @@ -1,46 +0,0 @@ -# -# Copyright (C) 2002-2003, 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 Version 4.0.0 -# - -# -# Character Class Definitions. -# The names are those from TR29. -# -$CR = \r; -$LF = \n; -$Control = [[:Zl:] [:Zp:] [:Cc:] [:Cf:]]; - -$TAMIL = [ \u0bc1-\u0bc2 \u0bc6-\u0bc8 \u0bca-\u0bcc ]; -$Extend = [[:Grapheme_Extend = TRUE:] $TAMIL]; - -# -# Korean Syllable Definitions -# -$L = [:Hangul_Syllable_Type = L:]; -$V = [:Hangul_Syllable_Type = V:]; -$T = [:Hangul_Syllable_Type = T:]; - -$LV = [:Hangul_Syllable_Type = LV:]; -$LVT = [:Hangul_Syllable_Type = LVT:]; - -$HangulSyllable = $L+ | ($L* ($LV? $V+ | $LV | $LVT) $T*) | $T+; - -# -# Forward Break Rules -# -$CR $LF; -([^$Control] | $HangulSyllable) $Extend*; -.; - - -# -# Reverse Rule, back up to the beginning of some preceding grapheme cluster. -# -! ($Extend | $V | $T )* ($LF $CR | ($LV | $LVT)?$L* | .); diff --git a/i18npool/source/breakiterator/makefile.mk b/i18npool/source/breakiterator/makefile.mk index 425806f6134e..2db7d3c7d73b 100644 --- a/i18npool/source/breakiterator/makefile.mk +++ b/i18npool/source/breakiterator/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.17 $ +# $Revision: 1.17.16.1 $ # # This file is part of OpenOffice.org. # @@ -57,7 +57,6 @@ SLOFILES= \ $(SLO)$/breakiterator_cjk.obj \ $(SLO)$/breakiterator_ctl.obj \ $(SLO)$/breakiterator_th.obj \ - $(SLO)$/breakiterator_hi.obj \ $(SLO)$/breakiterator_unicode.obj \ $(SLO)$/xdictionary.obj \ $(subst,$(MISC)$/,$(SLO)$/ $(MY_MISC_CXXFILES:s/.c/.obj/)) diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 725033b929f8..0835746ba55c 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: LocaleNode.cxx,v $ - * $Revision: 1.29 $ + * $Revision: 1.29.16.1 $ * * This file is part of OpenOffice.org. * @@ -1449,15 +1449,18 @@ void LCMiscNode::generateCode (const OFileWriter &of) const if (forbidNode) { of.writeParameter( "forbiddenBegin", forbidNode -> getChildAt(0)->getValue()); of.writeParameter( "forbiddenEnd", forbidNode -> getChildAt(1)->getValue()); + of.writeParameter( "hangingChars", forbidNode -> getChildAt(2)->getValue()); } else { of.writeParameter( "forbiddenBegin", ::rtl::OUString()); of.writeParameter( "forbiddenEnd", ::rtl::OUString()); + of.writeParameter( "hangingChars", ::rtl::OUString()); } of.writeAsciiString("\nstatic const sal_Unicode* LCForbiddenCharactersArray[] = {\n"); of.writeAsciiString("\tforbiddenBegin,\n"); - of.writeAsciiString("\tforbiddenEnd\n"); + of.writeAsciiString("\tforbiddenEnd,\n"); + of.writeAsciiString("\thangingChars\n"); of.writeAsciiString("};\n\n"); - of.writeFunction("getForbiddenCharacters_", "2", "LCForbiddenCharactersArray"); + of.writeFunction("getForbiddenCharacters_", "3", "LCForbiddenCharactersArray"); if (breakNode) { of.writeParameter( "EditMode", breakNode -> getChildAt(0)->getValue()); diff --git a/i18npool/source/localedata/data/bn_BD.xml b/i18npool/source/localedata/data/bn_BD.xml index 95f54ecadf08..a89bb1b6a1c2 100644 --- a/i18npool/source/localedata/data/bn_BD.xml +++ b/i18npool/source/localedata/data/bn_BD.xml @@ -151,6 +151,13 @@ + + + + + char_in + + সত্য মিথ্যা diff --git a/i18npool/source/localedata/data/bn_IN.xml b/i18npool/source/localedata/data/bn_IN.xml index d28990dd8df2..1dc7992f9ffd 100644 --- a/i18npool/source/localedata/data/bn_IN.xml +++ b/i18npool/source/localedata/data/bn_IN.xml @@ -316,6 +316,13 @@ + + + + + char_in + + সত্য মিথ্যা diff --git a/i18npool/source/localedata/data/gu_IN.xml b/i18npool/source/localedata/data/gu_IN.xml index 70842a35f94c..f5923a70f9a9 100644 --- a/i18npool/source/localedata/data/gu_IN.xml +++ b/i18npool/source/localedata/data/gu_IN.xml @@ -146,6 +146,13 @@ + + + + +char_in + + સહી ગલત diff --git a/i18npool/source/localedata/data/hi_IN.xml b/i18npool/source/localedata/data/hi_IN.xml index 80a0da791cac..cfca665ad46c 100644 --- a/i18npool/source/localedata/data/hi_IN.xml +++ b/i18npool/source/localedata/data/hi_IN.xml @@ -358,6 +358,13 @@ + + + + +char_in + + सही गलत diff --git a/i18npool/source/localedata/data/ja_JP.xml b/i18npool/source/localedata/data/ja_JP.xml index f0e9dad78e75..d09dd5302749 100644 --- a/i18npool/source/localedata/data/ja_JP.xml +++ b/i18npool/source/localedata/data/ja_JP.xml @@ -503,6 +503,7 @@ !%),.:;?]}¢°’”‰′″℃、。々〉》」』】〕ぁぃぅぇぉっゃゅょゎ゛゜ゝゞァィゥェォッャュョヮヵヶ・ーヽヾ!%),.:;?]}。」、・ァィゥェォャュョッー゙゚¢ $([¥{£¥‘“〈《「『【〔$([{「£¥ + 、。,. true diff --git a/i18npool/source/localedata/data/kn_IN.xml b/i18npool/source/localedata/data/kn_IN.xml index 60ad028677d1..00d5dcff7639 100644 --- a/i18npool/source/localedata/data/kn_IN.xml +++ b/i18npool/source/localedata/data/kn_IN.xml @@ -146,6 +146,13 @@ + + + + +char_in + + ಸಹೀ ಗಲತ್ diff --git a/i18npool/source/localedata/data/ko_KR.xml b/i18npool/source/localedata/data/ko_KR.xml index 4a5f4f63d7bb..bbd5b0ded2be 100644 --- a/i18npool/source/localedata/data/ko_KR.xml +++ b/i18npool/source/localedata/data/ko_KR.xml @@ -580,6 +580,7 @@ !%),.:;?]}¢¢?'"′″℃>〉>》」』】〕!%),.:;?]}。」、・ ゙゚ $(¥£[\{£¥'"<<《「『【〔$([{₩「 + !,.:;?、。!,.:;? diff --git a/i18npool/source/localedata/data/locale.dtd b/i18npool/source/localedata/data/locale.dtd index fb2cc54c7260..5e9f82dc36d2 100644 --- a/i18npool/source/localedata/data/locale.dtd +++ b/i18npool/source/localedata/data/locale.dtd @@ -403,7 +403,7 @@ - + diff --git a/i18npool/source/localedata/data/ml_IN.xml b/i18npool/source/localedata/data/ml_IN.xml index eb3fc4a342cd..813e523aa9aa 100644 --- a/i18npool/source/localedata/data/ml_IN.xml +++ b/i18npool/source/localedata/data/ml_IN.xml @@ -314,6 +314,13 @@ + + + + + char_in + + അതെ അല്ല diff --git a/i18npool/source/localedata/data/or_IN.xml b/i18npool/source/localedata/data/or_IN.xml index c0ea95fefc33..168b542f1894 100644 --- a/i18npool/source/localedata/data/or_IN.xml +++ b/i18npool/source/localedata/data/or_IN.xml @@ -327,6 +327,13 @@ + + + + + char_in + + ସତ ମିଛ diff --git a/i18npool/source/localedata/data/pa_IN.xml b/i18npool/source/localedata/data/pa_IN.xml index e411eeb9ae77..8ca94443e161 100644 --- a/i18npool/source/localedata/data/pa_IN.xml +++ b/i18npool/source/localedata/data/pa_IN.xml @@ -168,6 +168,13 @@ + + + + + char_in + + ਸਹੀ ਗਲਤ diff --git a/i18npool/source/localedata/data/ta_IN.xml b/i18npool/source/localedata/data/ta_IN.xml index 298cb218b46d..a06e3743f06e 100644 --- a/i18npool/source/localedata/data/ta_IN.xml +++ b/i18npool/source/localedata/data/ta_IN.xml @@ -146,6 +146,13 @@ + + + + +char_in + + ஸரி தப்ப diff --git a/i18npool/source/localedata/data/te_IN.xml b/i18npool/source/localedata/data/te_IN.xml index 492240ae835f..b753b34ff68c 100644 --- a/i18npool/source/localedata/data/te_IN.xml +++ b/i18npool/source/localedata/data/te_IN.xml @@ -145,6 +145,13 @@ + + + + +char_in + + నిజము అపాదము diff --git a/i18npool/source/localedata/data/zh_CN.xml b/i18npool/source/localedata/data/zh_CN.xml index 081e0866f39b..3409144ae95a 100644 --- a/i18npool/source/localedata/data/zh_CN.xml +++ b/i18npool/source/localedata/data/zh_CN.xml @@ -430,6 +430,7 @@ :!),.:;?]}¢'"、。〉》」』】〕〗〞︰︱︳﹐、﹒﹔﹕﹖﹗﹚﹜﹞!),.:;?|}︴︶︸︺︼︾﹀﹂﹄﹏、~¢々‖•·ˇˉ―--′ ([{£¥'"‵〈《「『【〔〖([{£¥〝︵︷︹︻︽︿﹁﹃﹙﹛﹝({ +!,.:;?、。!,.:;? diff --git a/i18npool/source/localedata/data/zh_TW.xml b/i18npool/source/localedata/data/zh_TW.xml index 57882119ef0c..1d1e476b7771 100644 --- a/i18npool/source/localedata/data/zh_TW.xml +++ b/i18npool/source/localedata/data/zh_TW.xml @@ -359,6 +359,7 @@ !),.:;?]}¢·--'"¨•′、。〉》」』】〕〞︰︱︳︴︶︸︺︼︾﹀﹂﹄﹏﹐、﹒﹔﹕﹖﹗﹚﹜﹞!),.:;?|}、 ([{£¥'"‵〈《「『【〔〝︵︷︹︻︽︿﹁﹃﹙﹛﹝({ +!,.:;?、。!,.:;? diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 1cfdce7b185e..e8001913e048 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: localedata.cxx,v $ - * $Revision: 1.59 $ + * $Revision: 1.59.16.1 $ * * This file is part of OpenOffice.org. * @@ -999,6 +999,21 @@ 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 ) { + LCForbiddenCharactersArray = func(LCForbiddenCharactersCount); + return OUString(LCForbiddenCharactersArray[2]); + } + + return OUString(); +} Sequence< OUString > SAL_CALL LocaleData::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException) diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index 54a5ecc67209..870c49939648 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: registerservices.cxx,v $ - * $Revision: 1.44 $ + * $Revision: 1.44.16.2 $ * * This file is part of OpenOffice.org. * @@ -65,7 +65,6 @@ #include #include #include -#include #include #include @@ -152,9 +151,9 @@ IMPL_CREATEINSTANCE_MSF( BreakIteratorImpl ) IMPL_CREATEINSTANCE( BreakIterator_Unicode ) IMPL_CREATEINSTANCE( BreakIterator_ja ) IMPL_CREATEINSTANCE( BreakIterator_zh ) +IMPL_CREATEINSTANCE( BreakIterator_zh_TW ) IMPL_CREATEINSTANCE( BreakIterator_ko ) IMPL_CREATEINSTANCE( BreakIterator_th ) -IMPL_CREATEINSTANCE( BreakIterator_hi ) IMPL_CREATEINSTANCE_MSF( ChapterCollator ) IMPL_CREATEINSTANCE_MSF( CollatorImpl ) IMPL_CREATEINSTANCE( Collator_Unicode ) @@ -369,15 +368,15 @@ static const struct InstancesArray { { "com.sun.star.i18n.BreakIterator_zh", "com.sun.star.i18n.BreakIterator_zh", &BreakIterator_zh_CreateInstance }, + { "com.sun.star.i18n.BreakIterator_zh_TW", + "com.sun.star.i18n.BreakIterator_zh_TW", + &BreakIterator_zh_TW_CreateInstance }, { "com.sun.star.i18n.BreakIterator_ko", "com.sun.star.i18n.BreakIterator_ko", &BreakIterator_ko_CreateInstance }, { "com.sun.star.i18n.BreakIterator_th", "com.sun.star.i18n.BreakIterator_th", &BreakIterator_th_CreateInstance }, - { "com.sun.star.i18n.BreakIterator_hi", - "com.sun.star.i18n.BreakIterator_hi", - &BreakIterator_hi_CreateInstance }, { "com.sun.star.i18n.Collator", "com.sun.star.i18n.Collator", &CollatorImpl_CreateInstance }, -- cgit v1.2.3