diff options
Diffstat (limited to 'i18npool/source')
96 files changed, 922 insertions, 922 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index e36cd4df1773..ec2129907fc5 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -66,7 +66,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextCharacters( const OUString& Text, sal_ return LBI->nextCharacters( Text, nStartPos, rLocale, nCharacterIteratorMode, nCount, nDone); } -sal_Int32 SAL_CALL BreakIteratorImpl::previousCharacters( const OUString& Text, sal_Int32 nStartPos, +sal_Int32 SAL_CALL BreakIteratorImpl::previousCharacters( const OUString& Text, sal_Int32 nStartPos, const Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone ) throw(RuntimeException) { @@ -271,14 +271,14 @@ static sal_Int32 SAL_CALL iterateCodePoints(const OUString& Text, sal_Int32 &nSt } else { ch = Text.iterateCodePoints(&nStartPos, inc); // Fix for #i80436#. - // erAck: 2009-06-30T21:52+0200 This logic looks somewhat - // suspicious as if it cures a symptom.. anyway, had to add - // nStartPos < Text.getLength() to silence the (correct) assertion - // in rtl_uString_iterateCodePoints() if Text was one character + // erAck: 2009-06-30T21:52+0200 This logic looks somewhat + // suspicious as if it cures a symptom.. anyway, had to add + // nStartPos < Text.getLength() to silence the (correct) assertion + // in rtl_uString_iterateCodePoints() if Text was one character // (codepoint) only, made up of a surrogate pair. //if (inc > 0 && nStartPos < Text.getLength()) // ch = Text.iterateCodePoints(&nStartPos, 0); - // With surrogates, nStartPos may actually point behind string + // With surrogates, nStartPos may actually point behind string // now, even if inc is only +1 if (inc > 0) ch = (nStartPos < nLen ? Text.iterateCodePoints(&nStartPos, 0) : 0); @@ -341,7 +341,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::previousScript( const OUString& Text, else if (nStartPos == 0) { if (numberOfChange > 0) numberOfChange--; - if (nStartPos > 0) + if (nStartPos > 0) Text.iterateCodePoints(&nStartPos, -1); else return -1; @@ -488,7 +488,7 @@ sal_Int16 BreakIteratorImpl::getScriptClass(sal_uInt32 currentChar) nRet = ScriptType::WEAK; // workaround for Coptic else if ( 0x2C80 <= currentChar && 0x2CE3 >= currentChar) - nRet = ScriptType::LATIN; + nRet = ScriptType::LATIN; else { UBlockCode block=ublock_getCode(currentChar); sal_uInt16 i; @@ -550,7 +550,7 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw ( sal_Int32 v = rLocale.Variant.getLength(); OUStringBuffer aBuf(l+c+v+3); - if ((l > 0 && c > 0 && v > 0 && + if ((l > 0 && c > 0 && v > 0 && // load service with name <base>_<lang>_<country>_<varian> createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear())) || @@ -558,13 +558,13 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw ( // load service with name <base>_<lang>_<country> createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).makeStringAndClear())) || - (l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 && + (l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 && (rLocale.Country.compareToAscii("HK") == 0 || rLocale.Country.compareToAscii("MO") == 0) && // if the country code is HK or MO, one more step to try TW. createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).appendAscii( "TW").makeStringAndClear())) || - (l > 0 && + (l > 0 && // load service with name <base>_<lang> createLocaleSpecificBreakIterator(rLocale.Language)) || // load default service with name <base>_Unicode diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index ce7170c2a411..83f6f12a826c 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,38 +44,38 @@ namespace com { namespace sun { namespace star { namespace i18n { // class BreakIterator_CJK // ----------------------------------------------------; -BreakIterator_CJK::BreakIterator_CJK() : +BreakIterator_CJK::BreakIterator_CJK() : dict( NULL ), hangingCharacters() { cBreakIterator = "com.sun.star.i18n.BreakIterator_CJK"; } -Boundary SAL_CALL -BreakIterator_CJK::previousWord(const OUString& text, sal_Int32 anyPos, +Boundary SAL_CALL +BreakIterator_CJK::previousWord(const OUString& text, sal_Int32 anyPos, const lang::Locale& nLocale, sal_Int16 wordType) throw(RuntimeException) { if (dict) { result = dict->previousWord(text, anyPos, wordType); // #109813# for non-CJK, single character word, fallback to ICU breakiterator. - if (result.endPos - result.startPos != 1 || + if (result.endPos - result.startPos != 1 || getScriptType(text, result.startPos) == ScriptType::ASIAN) return result; result = BreakIterator_Unicode::getWordBoundary(text, result.startPos, nLocale, wordType, true); - if (result.endPos < anyPos) + if (result.endPos < anyPos) return result; } return BreakIterator_Unicode::previousWord(text, anyPos, nLocale, wordType); } -Boundary SAL_CALL -BreakIterator_CJK::nextWord(const OUString& text, sal_Int32 anyPos, +Boundary SAL_CALL +BreakIterator_CJK::nextWord(const OUString& text, sal_Int32 anyPos, const lang::Locale& nLocale, sal_Int16 wordType) throw(RuntimeException) { if (dict) { result = dict->nextWord(text, anyPos, wordType); // #109813# for non-CJK, single character word, fallback to ICU breakiterator. - if (result.endPos - result.startPos != 1 || + if (result.endPos - result.startPos != 1 || getScriptType(text, result.startPos) == ScriptType::ASIAN) return result; result = BreakIterator_Unicode::getWordBoundary(text, result.startPos, nLocale, wordType, true); @@ -85,15 +85,15 @@ BreakIterator_CJK::nextWord(const OUString& text, sal_Int32 anyPos, return BreakIterator_Unicode::nextWord(text, anyPos, nLocale, wordType); } -Boundary SAL_CALL -BreakIterator_CJK::getWordBoundary( const OUString& text, sal_Int32 anyPos, - const lang::Locale& nLocale, sal_Int16 wordType, sal_Bool bDirection ) +Boundary SAL_CALL +BreakIterator_CJK::getWordBoundary( const OUString& text, sal_Int32 anyPos, + const lang::Locale& nLocale, sal_Int16 wordType, sal_Bool bDirection ) throw(RuntimeException) { if (dict) { result = dict->getWordBoundary(text, anyPos, wordType, bDirection); // #109813# for non-CJK, single character word, fallback to ICU breakiterator. - if (result.endPos - result.startPos != 1 || + if (result.endPos - result.startPos != 1 || getScriptType(text, result.startPos) == ScriptType::ASIAN) return result; } diff --git a/i18npool/source/breakiterator/breakiterator_ctl.cxx b/i18npool/source/breakiterator/breakiterator_ctl.cxx index 6d6b3f9b9cd7..b780a7bfffcf 100644 --- a/i18npool/source/breakiterator/breakiterator_ctl.cxx +++ b/i18npool/source/breakiterator/breakiterator_ctl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ #include <com/sun/star/i18n/CharacterIteratorMode.hpp> #include <breakiterator_ctl.hxx> -#include <string.h> // for memset +#include <string.h> // for memset using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -72,7 +72,7 @@ sal_Int32 SAL_CALL BreakIterator_CTL::previousCharacters( const OUString& Text, { if (nCharacterIteratorMode == CharacterIteratorMode::SKIPCELL ) { nDone = 0; - if (nStartPos > 0) { // for others to skip cell. + if (nStartPos > 0) { // for others to skip cell. makeIndex(Text, nStartPos); if (nextCellIndex[nStartPos-1] == 0) // not a CTL character @@ -82,7 +82,7 @@ sal_Int32 SAL_CALL BreakIterator_CTL::previousCharacters( const OUString& Text, nCount--; nDone++; nStartPos = previousCellIndex[nStartPos - 1]; } - } else + } else nStartPos = 0; } else { // for BS to delete one char. nDone = (nStartPos > nCount) ? nCount : nStartPos; @@ -92,7 +92,7 @@ sal_Int32 SAL_CALL BreakIterator_CTL::previousCharacters( const OUString& Text, return nStartPos; } -sal_Int32 SAL_CALL BreakIterator_CTL::nextCharacters(const OUString& Text, +sal_Int32 SAL_CALL BreakIterator_CTL::nextCharacters(const OUString& Text, sal_Int32 nStartPos, const lang::Locale& rLocale, sal_Int16 nCharacterIteratorMode, sal_Int32 nCount, sal_Int32& nDone) throw(RuntimeException) diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx index ad3c619d0979..a1d3ea8c228c 100644 --- a/i18npool/source/breakiterator/breakiterator_th.cxx +++ b/i18npool/source/breakiterator/breakiterator_th.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -31,7 +31,7 @@ #include <breakiterator_th.hxx> #include <wtt.h> -#include <string.h> // for memset +#include <string.h> // for memset using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -39,9 +39,9 @@ using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { -// ---------------------------------------------------- -// class Breakiterator_th -// ----------------------------------------------------; +// ---------------------------------------------------- +// class Breakiterator_th +// ----------------------------------------------------; BreakIterator_th::BreakIterator_th() { cBreakIterator = "com.sun.star.i18n.BreakIterator_th"; @@ -58,9 +58,9 @@ BreakIterator_th::~BreakIterator_th() * cell composition states */ -#define ST_COM 1 // Compose the following character with leading char and display in the same cell -#define ST_NXT 2 // display the following character in the next cell -#define ST_NDP 3 // non-display +#define ST_COM 1 // Compose the following character with leading char and display in the same cell +#define ST_NXT 2 // display the following character in the next cell +#define ST_NDP 3 // non-display static const sal_Int16 thaiCompRel[MAX_CT][MAX_CT] = { // C N C L F F F B B B T A A A A A A @@ -113,7 +113,7 @@ static sal_Int32 SAL_CALL getACell(const sal_Unicode *text, sal_Int32 pos, sal_I return curr; } -#define is_Thai(c) (0x0e00 <= c && c <= 0x0e7f) // Unicode definition for Thai +#define is_Thai(c) (0x0e00 <= c && c <= 0x0e7f) // Unicode definition for Thai void SAL_CALL BreakIterator_th::makeIndex(const OUString& Text, sal_Int32 nStartPos) throw(RuntimeException) diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index ad934db2db11..74ba089b9aa0 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -91,7 +91,7 @@ class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator { setBreakType(type); }; OOoRuleBasedBreakIterator(UDataMemory* image, - UErrorCode &status) : + UErrorCode &status) : RuleBasedBreakIterator(image, status) { }; }; @@ -105,7 +105,7 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star:: sal_Int16 breakType = 0; switch (rBreakType) { case LOAD_CHARACTER_BREAKITERATOR: icuBI=&character; breakType = 3; break; - case LOAD_WORD_BREAKITERATOR: icuBI=&word; + case LOAD_WORD_BREAKITERATOR: icuBI=&word; switch (rWordType) { case WordType::ANYWORD_IGNOREWHITESPACES: breakType = 0; rule=wordRule = "edit_word"; break; case WordType::DICTIONARY_WORD: breakType = 1; rule=wordRule = "dict_word"; break; @@ -132,7 +132,7 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star:: OOoRuleBasedBreakIterator *rbi = NULL; if (breakRules.getLength() > breakType && breakRules[breakType].getLength() > 0) { - rbi = new OOoRuleBasedBreakIterator(udata_open("OpenOffice", "brk", + rbi = new OOoRuleBasedBreakIterator(udata_open("OpenOffice", "brk", OUStringToOString(breakRules[breakType], RTL_TEXTENCODING_ASCII_US).getStr(), &status), status); } else { status = U_ZERO_ERROR; @@ -198,7 +198,7 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star:: } } - if (newBreak || icuBI->aICUText.compare(UnicodeString(reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength()))) { // UChar != sal_Unicode in MinGW + if (newBreak || icuBI->aICUText.compare(UnicodeString(reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength()))) { // UChar != sal_Unicode in MinGW icuBI->aICUText=UnicodeString(reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength()); icuBI->aBreakIterator->setText(icuBI->aICUText); } @@ -381,8 +381,8 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( Boundary wBoundary = getWordBoundary( Text, nStartPos, rLocale, WordType::DICTIONARY_WORD, false); uno::Reference< linguistic2::XHyphenatedWord > aHyphenatedWord; - aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, - wBoundary.endPos - wBoundary.startPos), rLocale, + aHyphenatedWord = hOptions.rHyphenator->hyphenate(Text.copy(wBoundary.startPos, + wBoundary.endPos - wBoundary.startPos), rLocale, (sal_Int16) (hOptions.hyphenIndex - wBoundary.startPos), hOptions.aHyphenationOptions); if (aHyphenatedWord.is()) { lbr.rHyphenatedWord = aHyphenatedWord; diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx index 9e8185850543..31aaeaa83e60 100644 --- a/i18npool/source/breakiterator/gendict.cxx +++ b/i18npool/source/breakiterator/gendict.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,8 +47,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if (argc < 3) exit(-1); - sfp = fopen(argv[1], "rb"); // open the source file for read; - if (sfp == NULL) + sfp = fopen(argv[1], "rb"); // open the source file for read; + if (sfp == NULL) { printf("Open the dictionary source file failed."); return -1; @@ -93,7 +93,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) i=0; Ostr.iterateCodePoints(&i, 1); - if (len == i) continue; // skip one character word + if (len == i) continue; // skip one character word if (*u != current) { if (*u < current) @@ -108,8 +108,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) 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. + 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"); @@ -120,7 +120,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) charArray[current+1] = lenArrayCount; fprintf(cfp, "\n};\n"); - // generate lenArray + // 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. @@ -203,6 +203,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) fclose(cfp); return 0; -} // End of main +} // End of main /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx index 7a0f563a0a96..f63262b9adcd 100644 --- a/i18npool/source/breakiterator/xdictionary.cxx +++ b/i18npool/source/breakiterator/xdictionary.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -112,7 +112,7 @@ xdictionary::xdictionary(const sal_Char *lang) : xdictionary::~xdictionary() { osl_unloadModule(hModule); for (sal_Int32 i = 0; i < CACHE_MAX; i++) { - if (cache[i].size > 0) { + if (cache[i].size > 0) { delete cache[i].contents; delete cache[i].wordboundary; } @@ -174,7 +174,7 @@ WordBreakCache::WordBreakCache() : wordboundary( NULL ), size( 0 ) { -} +} /* * Compare two unicode string, @@ -196,7 +196,7 @@ sal_Bool WordBreakCache::equals(const sal_Unicode* str, Boundary& boundary) { * @param pos : Position of the given character. * @return true if CJK. */ -sal_Bool xdictionary::seekSegment(const rtl::OUString &rText, sal_Int32 pos, +sal_Bool xdictionary::seekSegment(const rtl::OUString &rText, sal_Int32 pos, Boundary& segBoundary) { sal_Int32 indexUtf16; @@ -228,7 +228,7 @@ sal_Bool xdictionary::seekSegment(const rtl::OUString &rText, sal_Int32 pos, } #define KANJA 1 -#define KATAKANA 2 +#define KATAKANA 2 #define HIRAKANA 3 static sal_Int16 JapaneseCharType(sal_Unicode c) @@ -256,7 +256,7 @@ WordBreakCache& xdictionary::getCache(const sal_Unicode *text, Boundary& wordBou delete aCache.wordboundary; aCache.size = len; } - else + 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]; diff --git a/i18npool/source/calendar/calendarImpl.cxx b/i18npool/source/calendar/calendarImpl.cxx index be3802ee9062..0999b6e4a6a5 100644 --- a/i18npool/source/calendar/calendarImpl.cxx +++ b/i18npool/source/calendar/calendarImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -71,7 +71,7 @@ CalendarImpl::loadCalendar(const OUString& uniqueID, const Locale& rLocale ) thr { Reference < XExtendedCalendar > xOldCalendar( xCalendar ); // backup sal_Int32 i; - + for (i = 0; i < sal::static_int_cast<sal_Int32>(lookupTable.size()); i++) { lookupTableItem *listItem = lookupTable[i]; if (uniqueID == listItem->uniqueID) { @@ -291,7 +291,7 @@ CalendarImpl::isValid() throw(RuntimeException) throw ERROR ; } -OUString SAL_CALL +OUString SAL_CALL CalendarImpl::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) throw (RuntimeException) { diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 51180b01d058..abdda185506e 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -147,24 +147,24 @@ Calendar_gregorian::init(Era *_eraArray) { cCalendar = "com.sun.star.i18n.Calendar_gregorian"; - // #i102356# With icu::Calendar::createInstance(UErrorCode) in a Thai - // th_TH system locale we accidentally used a Buddhist calendar. Though - // the ICU documentation says that should be the case only for - // th_TH_TRADITIONAL (and ja_JP_TRADITIONAL Gengou), a plain th_TH - // already triggers that behavior, ja_JP does not. Strange enough, - // passing a th_TH locale to the calendar creation doesn't trigger + // #i102356# With icu::Calendar::createInstance(UErrorCode) in a Thai + // th_TH system locale we accidentally used a Buddhist calendar. Though + // the ICU documentation says that should be the case only for + // th_TH_TRADITIONAL (and ja_JP_TRADITIONAL Gengou), a plain th_TH + // already triggers that behavior, ja_JP does not. Strange enough, + // passing a th_TH locale to the calendar creation doesn't trigger // this. // See also http://userguide.icu-project.org/datetime/calendar - // Whatever ICU offers as the default calendar for a locale, ensure we + // Whatever ICU offers as the default calendar for a locale, ensure we // have a Gregorian calendar as requested. - /* XXX: with the current implementation the aLocale member variable is + /* XXX: with the current implementation the aLocale member variable is * not set prior to loading a calendar from locale data. This - * creates an empty (root) locale for ICU, but at least the correct - * calendar is used. The language part must not be NULL (respectively - * not all, language and country and variant), otherwise the current - * default locale would be used again and the calendar keyword ignored. + * creates an empty (root) locale for ICU, but at least the correct + * calendar is used. The language part must not be NULL (respectively + * not all, language and country and variant), otherwise the current + * default locale would be used again and the calendar keyword ignored. * */ icu::Locale aIcuLocale( "", NULL, NULL, "calendar=gregorian"); @@ -202,7 +202,7 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16 void SAL_CALL Calendar_hanja::loadCalendar( const OUString& /*uniqueID*/, const com::sun::star::lang::Locale& rLocale ) throw(RuntimeException) { - // Since this class could be called by service name 'hanja_yoil', we have to + // 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); } @@ -419,7 +419,7 @@ bool Calendar_gregorian::getDSTOffset( sal_Int32 & o_nOffset ) const void Calendar_gregorian::submitFields() throw(com::sun::star::uno::RuntimeException) { for (sal_Int16 fieldIndex = 0; fieldIndex < FIELD_INDEX_COUNT; fieldIndex++) - { + { if (fieldSet & (1 << fieldIndex)) { switch (fieldIndex) @@ -592,7 +592,7 @@ void Calendar_gregorian::setValue() throw(RuntimeException) nDST1 = 0; } - // The original submission, may lead to a different zone/DST and + // The original submission, may lead to a different zone/DST and // different date. submitFields(); DUMP_ICU_CAL_MSG(("%s\n","setValue() after original submission")); @@ -615,11 +615,11 @@ void Calendar_gregorian::setValue() throw(RuntimeException) // is not what we want. // Resubmit all values, this time including DST => date 01:00 // Similar for zone differences. - // If already the first full submission with nZone0 and nDST0 - // lead to date-1 23:00, the original submission was based on - // that date if it wasn't a full date (nDST0 set, nDST1 not - // set, nDST2==nDST1). If it was January 1st without year we're - // even off by one year now. Resubmit all values including new + // If already the first full submission with nZone0 and nDST0 + // lead to date-1 23:00, the original submission was based on + // that date if it wasn't a full date (nDST0 set, nDST1 not + // set, nDST2==nDST1). If it was January 1st without year we're + // even off by one year now. Resubmit all values including new // DST => date 00:00. // Set field values accordingly in case they were used. @@ -788,7 +788,7 @@ Calendar_gregorian::isValid() throw(RuntimeException) // NatNum3 NatNum3/3/3/3 NatNum3/3/3/3 NatNum3/3/3/3 NatNum3/3/3/3 // NatNum4 NatNum9/9/11/11 -static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& aLocale, +static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& aLocale, sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode, sal_Int16 value ) { sal_Bool isShort = ((nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR || @@ -801,7 +801,7 @@ static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& if (isChinese || isJapanese || isKorean) { switch (nNativeNumberMode) { - case NativeNumberMode::NATNUM1: + case NativeNumberMode::NATNUM1: if (!isShort) nNativeNumberMode = isJapanese ? NativeNumberMode::NATNUM4 : NativeNumberMode::NATNUM7; break; @@ -824,27 +824,27 @@ static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& static sal_Int32 SAL_CALL DisplayCode2FieldIndex(sal_Int32 nCalendarDisplayCode) { switch( nCalendarDisplayCode ) { - case CalendarDisplayCode::SHORT_DAY: - case CalendarDisplayCode::LONG_DAY: + case CalendarDisplayCode::SHORT_DAY: + case CalendarDisplayCode::LONG_DAY: return CalendarFieldIndex::DAY_OF_MONTH; - case CalendarDisplayCode::SHORT_DAY_NAME: - case CalendarDisplayCode::LONG_DAY_NAME: + case CalendarDisplayCode::SHORT_DAY_NAME: + case CalendarDisplayCode::LONG_DAY_NAME: return CalendarFieldIndex::DAY_OF_WEEK; - case CalendarDisplayCode::SHORT_QUARTER: - case CalendarDisplayCode::LONG_QUARTER: - case CalendarDisplayCode::SHORT_MONTH: - case CalendarDisplayCode::LONG_MONTH: - case CalendarDisplayCode::SHORT_MONTH_NAME: - case CalendarDisplayCode::LONG_MONTH_NAME: + case CalendarDisplayCode::SHORT_QUARTER: + case CalendarDisplayCode::LONG_QUARTER: + case CalendarDisplayCode::SHORT_MONTH: + case CalendarDisplayCode::LONG_MONTH: + case CalendarDisplayCode::SHORT_MONTH_NAME: + case CalendarDisplayCode::LONG_MONTH_NAME: return CalendarFieldIndex::MONTH; - case CalendarDisplayCode::SHORT_YEAR: - case CalendarDisplayCode::LONG_YEAR: + case CalendarDisplayCode::SHORT_YEAR: + case CalendarDisplayCode::LONG_YEAR: return CalendarFieldIndex::YEAR; - case CalendarDisplayCode::SHORT_ERA: - case CalendarDisplayCode::LONG_ERA: + case CalendarDisplayCode::SHORT_ERA: + case CalendarDisplayCode::LONG_ERA: return CalendarFieldIndex::ERA; - case CalendarDisplayCode::SHORT_YEAR_AND_ERA: - case CalendarDisplayCode::LONG_YEAR_AND_ERA: + case CalendarDisplayCode::SHORT_YEAR_AND_ERA: + case CalendarDisplayCode::LONG_YEAR_AND_ERA: return CalendarFieldIndex::YEAR; default: return 0; @@ -947,7 +947,7 @@ Calendar_gregorian::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_I } // Methods in XExtendedCalendar -OUString SAL_CALL +OUString SAL_CALL Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) throw (RuntimeException) { @@ -965,7 +965,7 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 // number of months, divide by 4 and then use that result to divide the // actual month value. if ( quarter > 3 ) - quarter = 3; + quarter = 3; quarter = sal::static_int_cast<sal_Int16>( quarter + ((nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER) ? reservedWords::QUARTER1_ABBREVIATION : reservedWords::QUARTER1_WORD) ); @@ -976,23 +976,23 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 // having that comment triggers alarm ;-) sal_Char aStr[10]; switch( nCalendarDisplayCode ) { - case CalendarDisplayCode::SHORT_MONTH: + case CalendarDisplayCode::SHORT_MONTH: value += 1; // month is zero based // fall thru - case CalendarDisplayCode::SHORT_DAY: + case CalendarDisplayCode::SHORT_DAY: sprintf(aStr, "%d", value); // #100211# - checked break; - case CalendarDisplayCode::LONG_YEAR: + case CalendarDisplayCode::LONG_YEAR: if (aCalendar.Name.equalsAscii("gengou")) sprintf(aStr, "%02d", value); // #100211# - checked else sprintf(aStr, "%d", value); // #100211# - checked break; - case CalendarDisplayCode::LONG_MONTH: + case CalendarDisplayCode::LONG_MONTH: value += 1; // month is zero based sprintf(aStr, "%02d", value); // #100211# - checked break; - case CalendarDisplayCode::SHORT_YEAR: + case CalendarDisplayCode::SHORT_YEAR: // Take last 2 digits, or only one if vallue<10, for example, // in case of the Gengou calendar. if (value < 100) @@ -1000,28 +1000,28 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 else sprintf(aStr, "%02d", value % 100); // #100211# - checked break; - case CalendarDisplayCode::LONG_DAY: + case CalendarDisplayCode::LONG_DAY: sprintf(aStr, "%02d", value); // #100211# - checked break; - case CalendarDisplayCode::SHORT_DAY_NAME: + case CalendarDisplayCode::SHORT_DAY_NAME: return getDisplayName(CalendarDisplayIndex::DAY, value, 0); - case CalendarDisplayCode::LONG_DAY_NAME: + case CalendarDisplayCode::LONG_DAY_NAME: return getDisplayName(CalendarDisplayIndex::DAY, value, 1); - case CalendarDisplayCode::SHORT_MONTH_NAME: + case CalendarDisplayCode::SHORT_MONTH_NAME: return getDisplayName(CalendarDisplayIndex::MONTH, value, 0); - case CalendarDisplayCode::LONG_MONTH_NAME: + case CalendarDisplayCode::LONG_MONTH_NAME: return getDisplayName(CalendarDisplayIndex::MONTH, value, 1); - case CalendarDisplayCode::SHORT_ERA: + case CalendarDisplayCode::SHORT_ERA: return getDisplayName(CalendarDisplayIndex::ERA, value, 0); - case CalendarDisplayCode::LONG_ERA: + case CalendarDisplayCode::LONG_ERA: return getDisplayName(CalendarDisplayIndex::ERA, value, 1); - case CalendarDisplayCode::SHORT_YEAR_AND_ERA: + case CalendarDisplayCode::SHORT_YEAR_AND_ERA: return getDisplayString( CalendarDisplayCode::SHORT_ERA, nNativeNumberMode ) + getDisplayString( CalendarDisplayCode::SHORT_YEAR, nNativeNumberMode ); - case CalendarDisplayCode::LONG_YEAR_AND_ERA: + case CalendarDisplayCode::LONG_YEAR_AND_ERA: return getDisplayString( CalendarDisplayCode::LONG_ERA, nNativeNumberMode ) + getDisplayString( CalendarDisplayCode::LONG_YEAR, nNativeNumberMode ); @@ -1048,12 +1048,12 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 } // Methods in XExtendedCalendar -OUString SAL_CALL +OUString SAL_CALL Calendar_buddhist::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) throw (RuntimeException) { // make year and era in different order for year before and after 0. - if ((nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA || + if ((nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA || nCalendarDisplayCode == CalendarDisplayCode::SHORT_YEAR_AND_ERA) && getValue(CalendarFieldIndex::ERA) == 0) { if (nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR_AND_ERA) diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx index 5d14946b3688..60601fec3e8b 100644 --- a/i18npool/source/calendar/calendar_hijri.cxx +++ b/i18npool/source/calendar/calendar_hijri.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,23 +47,23 @@ using namespace ::rtl; //static UErrorCode status; // status is shared in all calls to Calendar, it has to be reset for each call. // radians per degree (pi/180) -const double Calendar_hijri::RadPerDeg = 0.01745329251994329577; +const double Calendar_hijri::RadPerDeg = 0.01745329251994329577; // Synodic Period (mean time between 2 successive new moon: 29d, 12 hr, 44min, 3sec -const double Calendar_hijri::SynPeriod = 29.53058868; -const double Calendar_hijri::SynMonth = 365.25/29.53058868; // Solar days in a year/SynPeriod +const double Calendar_hijri::SynPeriod = 29.53058868; +const double Calendar_hijri::SynMonth = 365.25/29.53058868; // Solar days in a year/SynPeriod // Julian day on Jan 1, 1900 -const double Calendar_hijri::jd1900 = 2415020.75933; +const double Calendar_hijri::jd1900 = 2415020.75933; // Reference point: March 26, 2001 == 1422 Hijri == 1252 Synodial month from 1900 -const sal_Int32 Calendar_hijri::SynRef = 1252; -const sal_Int32 Calendar_hijri::GregRef = 1422; +const sal_Int32 Calendar_hijri::SynRef = 1252; +const sal_Int32 Calendar_hijri::GregRef = 1422; // Local time specific to Saudi Arabia -const double Calendar_hijri::SA_TimeZone = 3.0; +const double Calendar_hijri::SA_TimeZone = 3.0; -const double Calendar_hijri::EveningPeriod = 6.0; +const double Calendar_hijri::EveningPeriod = 6.0; const sal_Int32 Calendar_hijri::LeapYear[] = { 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 @@ -74,7 +74,7 @@ Calendar_hijri::Calendar_hijri() cCalendar = "com.sun.star.i18n.Calendar_hijri"; } -#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) +#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) // map field value from hijri calendar to gregorian calendar void Calendar_hijri::mapToGregorian() throw(RuntimeException) @@ -120,7 +120,7 @@ void Calendar_hijri::mapFromGregorian() throw(RuntimeException) // This function returns the Julian date/time of the Nth new moon since // January 1900. The synodic month is passed as parameter. // -// Adapted from "Astronomical Formulae for Calculators" by +// Adapted from "Astronomical Formulae for Calculators" by // Jean Meeus, Third Edition, Willmann-Bell, 1985. // double @@ -128,7 +128,7 @@ Calendar_hijri::NewMoon(sal_Int32 n) { double jd, t, t2, t3, k, ma, sa, tf, xtra; k = n; - t = k/1236.85; // Time in Julian centuries from 1900 January 0.5 + t = k/1236.85; // Time in Julian centuries from 1900 January 0.5 t2 = t * t; t3 = t2 * t; @@ -136,17 +136,17 @@ Calendar_hijri::NewMoon(sal_Int32 n) jd = jd1900 + SynPeriod * k - 0.0001178 * t2 - - 0.000000155 * t3 + - 0.000000155 * t3 + 0.00033 * sin(RadPerDeg * (166.56 + 132.87 * t - 0.009173 * t2)); // Sun's mean anomaly in radian sa = RadPerDeg * (359.2242 - + 29.10535608 * k + + 29.10535608 * k - 0.0000333 * t2 - 0.00000347 * t3); // Moon's mean anomaly - ma = RadPerDeg * (306.0253 + ma = RadPerDeg * (306.0253 + 385.81691806 * k + 0.0107306 * t2 + 0.00001236 * t3); @@ -184,7 +184,7 @@ void Calendar_hijri::getHijri(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year) { double prevday; -// double dayfraction; +// double dayfraction; sal_Int32 syndiff; sal_Int32 newsyn; double newjd; @@ -213,7 +213,7 @@ Calendar_hijri::getHijri(sal_Int32 *day, sal_Int32 *month, sal_Int32 *year) // Round up the day *day = (sal_Int32)(((sal_Int32)julday) - newjd + 0.5); - *month = (syndiff % 12) + 1; + *month = (syndiff % 12) + 1; // currently not supported //dayOfYear = (sal_Int32)(month * SynPeriod + day); diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx index f7eb64061a1a..e0cecaeedc10 100644 --- a/i18npool/source/calendar/calendar_jewish.cxx +++ b/i18npool/source/calendar/calendar_jewish.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -138,17 +138,17 @@ sal_Int32 LastDayOfHebrewMonth(sal_Int32 month, sal_Int32 year) { else return 30; } - + class HebrewDate { private: sal_Int32 year; // 1... sal_Int32 month; // 1..LastMonthOfHebrewYear(year) sal_Int32 day; // 1..LastDayOfHebrewMonth(month, year) - + public: HebrewDate(sal_Int32 m, sal_Int32 d, sal_Int32 y) { month = m; day = d; year = y; } - + HebrewDate(sal_Int32 d) { // Computes the Hebrew date from the absolute date. year = (d + HebrewEpoch) / 366; // Approximation from below. // Search forward for year from the approximation. @@ -164,7 +164,7 @@ public: // Calculate the day by subtraction. day = d - HebrewDate(month, 1, year) + 1; } - + operator int() { // Computes the absolute date of Hebrew date. sal_Int32 DayInYear = day; // Days so far this month. if (month < 7) { // Before Tishri, so add days in prior months @@ -191,13 +191,13 @@ public: (HebrewCalendarElapsedDays(year)// Days in prior years. + HebrewEpoch)); // Days elapsed before absolute date 1. } - + sal_Int32 GetMonth() { return month; } sal_Int32 GetDay() { return day; } sal_Int32 GetYear() { return year; } - + }; - + // Gregorian dates int LastDayOfGregorianMonth(int month, int year) { @@ -223,7 +223,7 @@ private: int year; // 1... int month; // 1 == January, ..., 12 == December int day; // 1..LastDayOfGregorianMonth(month, year) - + public: GregorianDate(int m, int d, int y) { month = m; day = d; year = y; } @@ -272,8 +272,8 @@ void Calendar_jewish::mapFromGregorian() throw(RuntimeException) fieldValue[CalendarFieldIndex::YEAR] = (sal_Int16)(hd.GetYear() <= 0 ? 1 - hd.GetYear() : hd.GetYear()); } -#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) -// map field value from other calendar to gregorian calendar, it should be implemented. +#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH)) +// map field value from other calendar to gregorian calendar, it should be implemented. void Calendar_jewish::mapToGregorian() throw(RuntimeException) { if (fieldSet & FIELDS) { @@ -292,7 +292,7 @@ void Calendar_jewish::mapToGregorian() throw(RuntimeException) } // Methods in XExtendedCalendar -OUString SAL_CALL +OUString SAL_CALL Calendar_jewish::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) throw (RuntimeException) { diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 2db8575785f1..576936e416bf 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,9 +42,9 @@ using namespace ::com::sun::star::lang; using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { -// ---------------------------------------------------- -// class cclass_Unicode -// ----------------------------------------------------; +// ---------------------------------------------------- +// class cclass_Unicode +// ----------------------------------------------------; cclass_Unicode::cclass_Unicode( uno::Reference < XMultiServiceFactory > xSMgr ) : xMSF( xSMgr ), pTable( NULL ), @@ -93,7 +93,7 @@ cclass_Unicode::toLower( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, OUString SAL_CALL cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException) { sal_Int32 len = Text.getLength(); - if (nPos >= len) + if (nPos >= len) return OUString(); if (nCount + nPos > len) nCount = len - nPos; @@ -102,11 +102,11 @@ cclass_Unicode::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, rtl_uString* pStr = x_rtl_uString_new_WithLength( nCount, 1 ); sal_Unicode* out = pStr->buffer; BreakIteratorImpl brk(xMSF); - Boundary bdy = brk.getWordBoundary(Text, nPos, rLocale, + Boundary bdy = brk.getWordBoundary(Text, nPos, rLocale, WordType::ANYWORD_IGNOREWHITESPACES, sal_True); for (sal_Int32 i = nPos; i < nCount + nPos; i++, out++) { if (i >= bdy.endPos) - bdy = brk.nextWord(Text, bdy.endPos, rLocale, + bdy = brk.nextWord(Text, bdy.endPos, rLocale, WordType::ANYWORD_IGNOREWHITESPACES); *out = (i == bdy.startPos) ? trans->transliterateChar2Char(Text[i]) : Text[i]; @@ -138,7 +138,7 @@ cclass_Unicode::getScript( const OUString& Text, sal_Int32 nPos ) throw(RuntimeE } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL cclass_Unicode::getCharType( const OUString& Text, sal_Int32* nPos, sal_Int32 increment) { using namespace ::com::sun::star::i18n::KCharacterType; diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 616943bf9009..d38c72bdfa75 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ #include <com/sun/star/i18n/XLocaleData.hpp> #include <com/sun/star/i18n/NativeNumberMode.hpp> -#include <string.h> // memcpy() +#include <string.h> // memcpy() using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; @@ -47,25 +47,25 @@ using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_ILLEGAL = 0x00000000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR = 0x00000001; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_BOOL = 0x00000002; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_WORD = 0x00000004; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_VALUE = 0x00000008; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_STRING = 0x00000010; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_ILLEGAL = 0x00000000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR = 0x00000001; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_BOOL = 0x00000002; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_WORD = 0x00000004; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_VALUE = 0x00000008; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_STRING = 0x00000010; const UPT_FLAG_TYPE cclass_Unicode::TOKEN_CHAR_DONTCARE= 0x00000020; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_BOOL = 0x00000040; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_WORD = 0x00000080; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_WORD_SEP = 0x00000100; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE = 0x00000200; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_SEP = 0x00000400; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_EXP = 0x00000800; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_SIGN = 0x00001000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_EXP_VALUE = 0x00002000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_DIGIT = 0x00004000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_NAME_SEP = 0x20000000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_STRING_SEP = 0x40000000; -const UPT_FLAG_TYPE cclass_Unicode::TOKEN_EXCLUDED = 0x80000000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_BOOL = 0x00000040; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_WORD = 0x00000080; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_WORD_SEP = 0x00000100; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE = 0x00000200; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_SEP = 0x00000400; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_EXP = 0x00000800; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_SIGN = 0x00001000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_EXP_VALUE = 0x00002000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_VALUE_DIGIT = 0x00004000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_NAME_SEP = 0x20000000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_STRING_SEP = 0x40000000; +const UPT_FLAG_TYPE cclass_Unicode::TOKEN_EXCLUDED = 0x80000000; #define TOKEN_DIGIT_FLAGS (TOKEN_CHAR_VALUE | TOKEN_VALUE | TOKEN_VALUE_EXP | TOKEN_VALUE_EXP_VALUE | TOKEN_VALUE_DIGIT) @@ -76,7 +76,7 @@ const UPT_FLAG_TYPE cclass_Unicode::pDefaultParserTable[ nDefCnt ] = { // (...) == Calc formula compiler specific, commented out and modified - /* \0 */ TOKEN_EXCLUDED, + /* \0 */ TOKEN_EXCLUDED, TOKEN_ILLEGAL, TOKEN_ILLEGAL, TOKEN_ILLEGAL, @@ -85,9 +85,9 @@ const UPT_FLAG_TYPE cclass_Unicode::pDefaultParserTable[ nDefCnt ] = TOKEN_ILLEGAL, TOKEN_ILLEGAL, TOKEN_ILLEGAL, - /* 9 \t */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL) + /* 9 \t */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL) TOKEN_ILLEGAL, - /* 11 \v */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL) + /* 11 \v */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL) TOKEN_ILLEGAL, TOKEN_ILLEGAL, TOKEN_ILLEGAL, @@ -108,111 +108,111 @@ const UPT_FLAG_TYPE cclass_Unicode::pDefaultParserTable[ nDefCnt ] = TOKEN_ILLEGAL, TOKEN_ILLEGAL, TOKEN_ILLEGAL, - /* 32 */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 33 ! */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 34 " */ TOKEN_CHAR_STRING | TOKEN_STRING_SEP, - /* 35 # */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD_SEP) - /* 36 $ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_WORD | TOKEN_WORD) - /* 37 % */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_VALUE) - /* 38 & */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 39 ' */ TOKEN_NAME_SEP, - /* 40 ( */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 41 ) */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 42 * */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 43 + */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP | TOKEN_VALUE_EXP | TOKEN_VALUE_SIGN, - /* 44 , */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_VALUE | TOKEN_VALUE) - /* 45 - */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP | TOKEN_VALUE_EXP | TOKEN_VALUE_SIGN, - /* 46 . */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD | TOKEN_CHAR_VALUE | TOKEN_VALUE) - /* 47 / */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 32 */ TOKEN_CHAR_DONTCARE | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 33 ! */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 34 " */ TOKEN_CHAR_STRING | TOKEN_STRING_SEP, + /* 35 # */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD_SEP) + /* 36 $ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_WORD | TOKEN_WORD) + /* 37 % */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_VALUE) + /* 38 & */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 39 ' */ TOKEN_NAME_SEP, + /* 40 ( */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 41 ) */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 42 * */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 43 + */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP | TOKEN_VALUE_EXP | TOKEN_VALUE_SIGN, + /* 44 , */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_VALUE | TOKEN_VALUE) + /* 45 - */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP | TOKEN_VALUE_EXP | TOKEN_VALUE_SIGN, + /* 46 . */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD | TOKEN_CHAR_VALUE | TOKEN_VALUE) + /* 47 / */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, //for ( i = 48; i < 58; i++ ) - /* 48 0 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 49 1 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 50 2 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 51 3 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 52 4 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 53 5 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 54 6 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 55 7 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 56 8 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 57 9 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, - /* 58 : */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD) - /* 59 ; */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 60 < */ TOKEN_CHAR_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 61 = */ TOKEN_CHAR | TOKEN_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 62 > */ TOKEN_CHAR_BOOL | TOKEN_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 63 ? */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_WORD | TOKEN_WORD) - /* 64 @ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 48 0 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 49 1 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 50 2 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 51 3 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 52 4 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 53 5 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 54 6 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 55 7 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 56 8 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 57 9 */ TOKEN_DIGIT_FLAGS | TOKEN_WORD, + /* 58 : */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_WORD) + /* 59 ; */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 60 < */ TOKEN_CHAR_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 61 = */ TOKEN_CHAR | TOKEN_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 62 > */ TOKEN_CHAR_BOOL | TOKEN_BOOL | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 63 ? */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_CHAR_WORD | TOKEN_WORD) + /* 64 @ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) //for ( i = 65; i < 91; i++ ) - /* 65 A */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 66 B */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 67 C */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 68 D */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 69 E */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 70 F */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 71 G */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 72 H */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 73 I */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 74 J */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 75 K */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 76 L */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 77 M */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 78 N */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 79 O */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 80 P */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 81 Q */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 82 R */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 83 S */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 84 T */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 85 U */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 86 V */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 87 W */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 88 X */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 89 Y */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 90 Z */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 91 [ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 92 \ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 93 ] */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 94 ^ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, - /* 95 _ */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 96 ` */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 65 A */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 66 B */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 67 C */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 68 D */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 69 E */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 70 F */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 71 G */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 72 H */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 73 I */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 74 J */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 75 K */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 76 L */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 77 M */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 78 N */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 79 O */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 80 P */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 81 Q */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 82 R */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 83 S */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 84 T */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 85 U */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 86 V */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 87 W */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 88 X */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 89 Y */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 90 Z */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 91 [ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 92 \ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 93 ] */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 94 ^ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, + /* 95 _ */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 96 ` */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) //for ( i = 97; i < 123; i++ ) - /* 97 a */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 98 b */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 99 c */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 100 d */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 101 e */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 102 f */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 103 g */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 104 h */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 105 i */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 106 j */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 107 k */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 108 l */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 109 m */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 110 n */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 111 o */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 112 p */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 113 q */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 114 r */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 115 s */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 116 t */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 117 u */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 118 v */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 119 w */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 120 x */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 121 y */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 122 z */ TOKEN_CHAR_WORD | TOKEN_WORD, - /* 123 { */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 124 | */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 125 } */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 126 ~ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) - /* 127 */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP // (TOKEN_ILLEGAL // UNUSED) + /* 97 a */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 98 b */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 99 c */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 100 d */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 101 e */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 102 f */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 103 g */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 104 h */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 105 i */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 106 j */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 107 k */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 108 l */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 109 m */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 110 n */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 111 o */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 112 p */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 113 q */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 114 r */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 115 s */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 116 t */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 117 u */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 118 v */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 119 w */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 120 x */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 121 y */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 122 z */ TOKEN_CHAR_WORD | TOKEN_WORD, + /* 123 { */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 124 | */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 125 } */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 126 ~ */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP, // (TOKEN_ILLEGAL // UNUSED) + /* 127 */ TOKEN_CHAR | TOKEN_WORD_SEP | TOKEN_VALUE_SEP // (TOKEN_ILLEGAL // UNUSED) }; const sal_Int32 cclass_Unicode::pParseTokensType[ nDefCnt ] = { - /* \0 */ KParseTokens::ASC_OTHER, + /* \0 */ KParseTokens::ASC_OTHER, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, @@ -221,9 +221,9 @@ const sal_Int32 cclass_Unicode::pParseTokensType[ nDefCnt ] = KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, - /* 9 \t */ KParseTokens::ASC_CONTROL, + /* 9 \t */ KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, - /* 11 \v */ KParseTokens::ASC_CONTROL, + /* 11 \v */ KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, @@ -244,105 +244,105 @@ const sal_Int32 cclass_Unicode::pParseTokensType[ nDefCnt ] = KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, KParseTokens::ASC_CONTROL, - /* 32 */ KParseTokens::ASC_OTHER, - /* 33 ! */ KParseTokens::ASC_OTHER, - /* 34 " */ KParseTokens::ASC_OTHER, - /* 35 # */ KParseTokens::ASC_OTHER, - /* 36 $ */ KParseTokens::ASC_DOLLAR, - /* 37 % */ KParseTokens::ASC_OTHER, - /* 38 & */ KParseTokens::ASC_OTHER, - /* 39 ' */ KParseTokens::ASC_OTHER, - /* 40 ( */ KParseTokens::ASC_OTHER, - /* 41 ) */ KParseTokens::ASC_OTHER, - /* 42 * */ KParseTokens::ASC_OTHER, - /* 43 + */ KParseTokens::ASC_OTHER, - /* 44 , */ KParseTokens::ASC_OTHER, - /* 45 - */ KParseTokens::ASC_OTHER, - /* 46 . */ KParseTokens::ASC_DOT, - /* 47 / */ KParseTokens::ASC_OTHER, + /* 32 */ KParseTokens::ASC_OTHER, + /* 33 ! */ KParseTokens::ASC_OTHER, + /* 34 " */ KParseTokens::ASC_OTHER, + /* 35 # */ KParseTokens::ASC_OTHER, + /* 36 $ */ KParseTokens::ASC_DOLLAR, + /* 37 % */ KParseTokens::ASC_OTHER, + /* 38 & */ KParseTokens::ASC_OTHER, + /* 39 ' */ KParseTokens::ASC_OTHER, + /* 40 ( */ KParseTokens::ASC_OTHER, + /* 41 ) */ KParseTokens::ASC_OTHER, + /* 42 * */ KParseTokens::ASC_OTHER, + /* 43 + */ KParseTokens::ASC_OTHER, + /* 44 , */ KParseTokens::ASC_OTHER, + /* 45 - */ KParseTokens::ASC_OTHER, + /* 46 . */ KParseTokens::ASC_DOT, + /* 47 / */ KParseTokens::ASC_OTHER, //for ( i = 48; i < 58; i++ ) - /* 48 0 */ KParseTokens::ASC_DIGIT, - /* 49 1 */ KParseTokens::ASC_DIGIT, - /* 50 2 */ KParseTokens::ASC_DIGIT, - /* 51 3 */ KParseTokens::ASC_DIGIT, - /* 52 4 */ KParseTokens::ASC_DIGIT, - /* 53 5 */ KParseTokens::ASC_DIGIT, - /* 54 6 */ KParseTokens::ASC_DIGIT, - /* 55 7 */ KParseTokens::ASC_DIGIT, - /* 56 8 */ KParseTokens::ASC_DIGIT, - /* 57 9 */ KParseTokens::ASC_DIGIT, - /* 58 : */ KParseTokens::ASC_COLON, - /* 59 ; */ KParseTokens::ASC_OTHER, - /* 60 < */ KParseTokens::ASC_OTHER, - /* 61 = */ KParseTokens::ASC_OTHER, - /* 62 > */ KParseTokens::ASC_OTHER, - /* 63 ? */ KParseTokens::ASC_OTHER, - /* 64 @ */ KParseTokens::ASC_OTHER, + /* 48 0 */ KParseTokens::ASC_DIGIT, + /* 49 1 */ KParseTokens::ASC_DIGIT, + /* 50 2 */ KParseTokens::ASC_DIGIT, + /* 51 3 */ KParseTokens::ASC_DIGIT, + /* 52 4 */ KParseTokens::ASC_DIGIT, + /* 53 5 */ KParseTokens::ASC_DIGIT, + /* 54 6 */ KParseTokens::ASC_DIGIT, + /* 55 7 */ KParseTokens::ASC_DIGIT, + /* 56 8 */ KParseTokens::ASC_DIGIT, + /* 57 9 */ KParseTokens::ASC_DIGIT, + /* 58 : */ KParseTokens::ASC_COLON, + /* 59 ; */ KParseTokens::ASC_OTHER, + /* 60 < */ KParseTokens::ASC_OTHER, + /* 61 = */ KParseTokens::ASC_OTHER, + /* 62 > */ KParseTokens::ASC_OTHER, + /* 63 ? */ KParseTokens::ASC_OTHER, + /* 64 @ */ KParseTokens::ASC_OTHER, //for ( i = 65; i < 91; i++ ) - /* 65 A */ KParseTokens::ASC_UPALPHA, - /* 66 B */ KParseTokens::ASC_UPALPHA, - /* 67 C */ KParseTokens::ASC_UPALPHA, - /* 68 D */ KParseTokens::ASC_UPALPHA, - /* 69 E */ KParseTokens::ASC_UPALPHA, - /* 70 F */ KParseTokens::ASC_UPALPHA, - /* 71 G */ KParseTokens::ASC_UPALPHA, - /* 72 H */ KParseTokens::ASC_UPALPHA, - /* 73 I */ KParseTokens::ASC_UPALPHA, - /* 74 J */ KParseTokens::ASC_UPALPHA, - /* 75 K */ KParseTokens::ASC_UPALPHA, - /* 76 L */ KParseTokens::ASC_UPALPHA, - /* 77 M */ KParseTokens::ASC_UPALPHA, - /* 78 N */ KParseTokens::ASC_UPALPHA, - /* 79 O */ KParseTokens::ASC_UPALPHA, - /* 80 P */ KParseTokens::ASC_UPALPHA, - /* 81 Q */ KParseTokens::ASC_UPALPHA, - /* 82 R */ KParseTokens::ASC_UPALPHA, - /* 83 S */ KParseTokens::ASC_UPALPHA, - /* 84 T */ KParseTokens::ASC_UPALPHA, - /* 85 U */ KParseTokens::ASC_UPALPHA, - /* 86 V */ KParseTokens::ASC_UPALPHA, - /* 87 W */ KParseTokens::ASC_UPALPHA, - /* 88 X */ KParseTokens::ASC_UPALPHA, - /* 89 Y */ KParseTokens::ASC_UPALPHA, - /* 90 Z */ KParseTokens::ASC_UPALPHA, - /* 91 [ */ KParseTokens::ASC_OTHER, - /* 92 \ */ KParseTokens::ASC_OTHER, - /* 93 ] */ KParseTokens::ASC_OTHER, - /* 94 ^ */ KParseTokens::ASC_OTHER, - /* 95 _ */ KParseTokens::ASC_UNDERSCORE, - /* 96 ` */ KParseTokens::ASC_OTHER, + /* 65 A */ KParseTokens::ASC_UPALPHA, + /* 66 B */ KParseTokens::ASC_UPALPHA, + /* 67 C */ KParseTokens::ASC_UPALPHA, + /* 68 D */ KParseTokens::ASC_UPALPHA, + /* 69 E */ KParseTokens::ASC_UPALPHA, + /* 70 F */ KParseTokens::ASC_UPALPHA, + /* 71 G */ KParseTokens::ASC_UPALPHA, + /* 72 H */ KParseTokens::ASC_UPALPHA, + /* 73 I */ KParseTokens::ASC_UPALPHA, + /* 74 J */ KParseTokens::ASC_UPALPHA, + /* 75 K */ KParseTokens::ASC_UPALPHA, + /* 76 L */ KParseTokens::ASC_UPALPHA, + /* 77 M */ KParseTokens::ASC_UPALPHA, + /* 78 N */ KParseTokens::ASC_UPALPHA, + /* 79 O */ KParseTokens::ASC_UPALPHA, + /* 80 P */ KParseTokens::ASC_UPALPHA, + /* 81 Q */ KParseTokens::ASC_UPALPHA, + /* 82 R */ KParseTokens::ASC_UPALPHA, + /* 83 S */ KParseTokens::ASC_UPALPHA, + /* 84 T */ KParseTokens::ASC_UPALPHA, + /* 85 U */ KParseTokens::ASC_UPALPHA, + /* 86 V */ KParseTokens::ASC_UPALPHA, + /* 87 W */ KParseTokens::ASC_UPALPHA, + /* 88 X */ KParseTokens::ASC_UPALPHA, + /* 89 Y */ KParseTokens::ASC_UPALPHA, + /* 90 Z */ KParseTokens::ASC_UPALPHA, + /* 91 [ */ KParseTokens::ASC_OTHER, + /* 92 \ */ KParseTokens::ASC_OTHER, + /* 93 ] */ KParseTokens::ASC_OTHER, + /* 94 ^ */ KParseTokens::ASC_OTHER, + /* 95 _ */ KParseTokens::ASC_UNDERSCORE, + /* 96 ` */ KParseTokens::ASC_OTHER, //for ( i = 97; i < 123; i++ ) - /* 97 a */ KParseTokens::ASC_LOALPHA, - /* 98 b */ KParseTokens::ASC_LOALPHA, - /* 99 c */ KParseTokens::ASC_LOALPHA, - /* 100 d */ KParseTokens::ASC_LOALPHA, - /* 101 e */ KParseTokens::ASC_LOALPHA, - /* 102 f */ KParseTokens::ASC_LOALPHA, - /* 103 g */ KParseTokens::ASC_LOALPHA, - /* 104 h */ KParseTokens::ASC_LOALPHA, - /* 105 i */ KParseTokens::ASC_LOALPHA, - /* 106 j */ KParseTokens::ASC_LOALPHA, - /* 107 k */ KParseTokens::ASC_LOALPHA, - /* 108 l */ KParseTokens::ASC_LOALPHA, - /* 109 m */ KParseTokens::ASC_LOALPHA, - /* 110 n */ KParseTokens::ASC_LOALPHA, - /* 111 o */ KParseTokens::ASC_LOALPHA, - /* 112 p */ KParseTokens::ASC_LOALPHA, - /* 113 q */ KParseTokens::ASC_LOALPHA, - /* 114 r */ KParseTokens::ASC_LOALPHA, - /* 115 s */ KParseTokens::ASC_LOALPHA, - /* 116 t */ KParseTokens::ASC_LOALPHA, - /* 117 u */ KParseTokens::ASC_LOALPHA, - /* 118 v */ KParseTokens::ASC_LOALPHA, - /* 119 w */ KParseTokens::ASC_LOALPHA, - /* 120 x */ KParseTokens::ASC_LOALPHA, - /* 121 y */ KParseTokens::ASC_LOALPHA, - /* 122 z */ KParseTokens::ASC_LOALPHA, - /* 123 { */ KParseTokens::ASC_OTHER, - /* 124 | */ KParseTokens::ASC_OTHER, - /* 125 } */ KParseTokens::ASC_OTHER, - /* 126 ~ */ KParseTokens::ASC_OTHER, - /* 127 */ KParseTokens::ASC_OTHER + /* 97 a */ KParseTokens::ASC_LOALPHA, + /* 98 b */ KParseTokens::ASC_LOALPHA, + /* 99 c */ KParseTokens::ASC_LOALPHA, + /* 100 d */ KParseTokens::ASC_LOALPHA, + /* 101 e */ KParseTokens::ASC_LOALPHA, + /* 102 f */ KParseTokens::ASC_LOALPHA, + /* 103 g */ KParseTokens::ASC_LOALPHA, + /* 104 h */ KParseTokens::ASC_LOALPHA, + /* 105 i */ KParseTokens::ASC_LOALPHA, + /* 106 j */ KParseTokens::ASC_LOALPHA, + /* 107 k */ KParseTokens::ASC_LOALPHA, + /* 108 l */ KParseTokens::ASC_LOALPHA, + /* 109 m */ KParseTokens::ASC_LOALPHA, + /* 110 n */ KParseTokens::ASC_LOALPHA, + /* 111 o */ KParseTokens::ASC_LOALPHA, + /* 112 p */ KParseTokens::ASC_LOALPHA, + /* 113 q */ KParseTokens::ASC_LOALPHA, + /* 114 r */ KParseTokens::ASC_LOALPHA, + /* 115 s */ KParseTokens::ASC_LOALPHA, + /* 116 t */ KParseTokens::ASC_LOALPHA, + /* 117 u */ KParseTokens::ASC_LOALPHA, + /* 118 v */ KParseTokens::ASC_LOALPHA, + /* 119 w */ KParseTokens::ASC_LOALPHA, + /* 120 x */ KParseTokens::ASC_LOALPHA, + /* 121 y */ KParseTokens::ASC_LOALPHA, + /* 122 z */ KParseTokens::ASC_LOALPHA, + /* 123 { */ KParseTokens::ASC_OTHER, + /* 124 | */ KParseTokens::ASC_OTHER, + /* 125 } */ KParseTokens::ASC_OTHER, + /* 126 ~ */ KParseTokens::ASC_OTHER, + /* 127 */ KParseTokens::ASC_OTHER }; @@ -491,58 +491,58 @@ void cclass_Unicode::initParserTable( const Locale& rLocale, sal_Int32 startChar if ( !(nStartTypes & ASC_UPALPHA) ) for ( i = 65; i < 91; i++ ) - pTable[i] &= ~TOKEN_CHAR_WORD; // not allowed as start character + pTable[i] &= ~TOKEN_CHAR_WORD; // not allowed as start character if ( !(nContTypes & ASC_UPALPHA) ) for ( i = 65; i < 91; i++ ) - pTable[i] &= ~TOKEN_WORD; // not allowed as cont character + pTable[i] &= ~TOKEN_WORD; // not allowed as cont character if ( !(nStartTypes & ASC_LOALPHA) ) for ( i = 97; i < 123; i++ ) - pTable[i] &= ~TOKEN_CHAR_WORD; // not allowed as start character + pTable[i] &= ~TOKEN_CHAR_WORD; // not allowed as start character if ( !(nContTypes & ASC_LOALPHA) ) for ( i = 97; i < 123; i++ ) - pTable[i] &= ~TOKEN_WORD; // not allowed as cont character + pTable[i] &= ~TOKEN_WORD; // not allowed as cont character if ( nStartTypes & ASC_DIGIT ) for ( i = 48; i < 58; i++ ) - pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character if ( !(nContTypes & ASC_DIGIT) ) for ( i = 48; i < 58; i++ ) - pTable[i] &= ~TOKEN_WORD; // not allowed as cont character + pTable[i] &= ~TOKEN_WORD; // not allowed as cont character if ( !(nStartTypes & ASC_UNDERSCORE) ) - pTable[95] &= ~TOKEN_CHAR_WORD; // not allowed as start character + pTable[95] &= ~TOKEN_CHAR_WORD; // not allowed as start character if ( !(nContTypes & ASC_UNDERSCORE) ) - pTable[95] &= ~TOKEN_WORD; // not allowed as cont character + pTable[95] &= ~TOKEN_WORD; // not allowed as cont character if ( nStartTypes & ASC_DOLLAR ) - pTable[36] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[36] |= TOKEN_CHAR_WORD; // allowed as start character if ( nContTypes & ASC_DOLLAR ) - pTable[36] |= TOKEN_WORD; // allowed as cont character + pTable[36] |= TOKEN_WORD; // allowed as cont character if ( nStartTypes & ASC_DOT ) - pTable[46] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[46] |= TOKEN_CHAR_WORD; // allowed as start character if ( nContTypes & ASC_DOT ) - pTable[46] |= TOKEN_WORD; // allowed as cont character + pTable[46] |= TOKEN_WORD; // allowed as cont character if ( nStartTypes & ASC_COLON ) - pTable[58] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[58] |= TOKEN_CHAR_WORD; // allowed as start character if ( nContTypes & ASC_COLON ) - pTable[58] |= TOKEN_WORD; // allowed as cont character + pTable[58] |= TOKEN_WORD; // allowed as cont character if ( nStartTypes & ASC_CONTROL ) for ( i = 1; i < 32; i++ ) - pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character if ( nContTypes & ASC_CONTROL ) for ( i = 1; i < 32; i++ ) - pTable[i] |= TOKEN_WORD; // allowed as cont character + pTable[i] |= TOKEN_WORD; // allowed as cont character if ( nStartTypes & ASC_ANY_BUT_CONTROL ) for ( i = 32; i < nDefCnt; i++ ) - pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character + pTable[i] |= TOKEN_CHAR_WORD; // allowed as start character if ( nContTypes & ASC_ANY_BUT_CONTROL ) for ( i = 32; i < nDefCnt; i++ ) - pTable[i] |= TOKEN_WORD; // allowed as cont character + pTable[i] |= TOKEN_WORD; // allowed as cont character } @@ -739,7 +739,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 if ( nMask & TOKEN_EXCLUDED ) eState = ssBounce; if ( bMightBeWord ) - { // only relevant for ssGetValue fall back + { // only relevant for ssGetValue fall back if ( eState == ssGetChar || eState == ssRewindFromValue || eState == ssIgnoreLeadingInRewind ) bMightBeWord = ((nMask & TOKEN_CHAR_WORD) != 0); @@ -756,7 +756,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( (nMask & TOKEN_CHAR_VALUE) && eState != ssRewindFromValue && eState != ssIgnoreLeadingInRewind ) - { //! must be first, may fall back to ssGetWord via bMightBeWord + { //! must be first, may fall back to ssGetWord via bMightBeWord eState = ssGetValue; if ( nMask & TOKEN_VALUE_DIGIT ) { @@ -784,14 +784,14 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssGetWordFirstChar; bQuote = true; pSym++; - nParseTokensType = 0; // will be taken of first real character + nParseTokensType = 0; // will be taken of first real character r.TokenType = KParseType::SINGLE_QUOTE_NAME; } else if ( nMask & TOKEN_CHAR_STRING ) { eState = ssGetString; pSym++; - nParseTokensType = 0; // will be taken of first real character + nParseTokensType = 0; // will be taken of first real character r.TokenType = KParseType::DOUBLE_QUOTE_STRING; } else if ( nMask & TOKEN_CHAR_DONTCARE ) @@ -802,7 +802,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssIgnoreLeadingInRewind; r.LeadingWhiteSpace++; pSym++; - nParseTokensType = 0; // wait until real character + nParseTokensType = 0; // wait until real character bMightBeWord = true; } else @@ -814,12 +814,12 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 r.TokenType = KParseType::BOOLEAN; } else if ( nMask & TOKEN_CHAR ) - { //! must be last + { //! must be last eState = ssStop; r.TokenType = KParseType::ONE_SINGLE_CHAR; } else - eState = ssBounce; // not known + eState = ssBounce; // not known } break; case ssGetValue : @@ -847,9 +847,9 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { UPT_FLAG_TYPE nNext = getFlags( pTextStart, pSrc - pTextStart ); if ( nNext & TOKEN_VALUE_EXP ) - ; // keep it going + ; // keep it going else if ( bMightBeWord && ((nNext & TOKEN_WORD) || !*pSrc) ) - { // might be a numerical name (1.2efg) + { // might be a numerical name (1.2efg) eState = ssGetWord; r.TokenType = KParseType::IDENTNAME; } @@ -862,9 +862,9 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { UPT_FLAG_TYPE nNext = getFlags( pTextStart, pSrc - pTextStart ); if ( nNext & TOKEN_VALUE_EXP_VALUE ) - ; // keep it going + ; // keep it going else if ( bMightBeWord && ((nNext & TOKEN_WORD) || !*pSrc) ) - { // might be a numerical name (1.2e+fg) + { // might be a numerical name (1.2e+fg) eState = ssGetWord; r.TokenType = KParseType::IDENTNAME; } @@ -872,7 +872,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssStopBack; } else if ( bMightBeWord ) - { // might be a numerical name (1.2+fg) + { // might be a numerical name (1.2+fg) eState = ssGetWord; r.TokenType = KParseType::IDENTNAME; } @@ -880,7 +880,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssStopBack; } else if ( bMightBeWord && (nMask & TOKEN_WORD) ) - { // might be a numerical name (1995.A1) + { // might be a numerical name (1995.A1) eState = ssGetWord; r.TokenType = KParseType::IDENTNAME; } @@ -894,13 +894,13 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 case ssGetWord : { if ( nMask & TOKEN_WORD ) - ; // keep it going + ; // keep it going else if ( nMask & TOKEN_NAME_SEP ) { if ( bQuote ) { if ( cLast == '\\' ) - { // escaped + { // escaped aSymbol += OUString( pSym, pSrc - pSym - 2 ); aSymbol += OUString( &c, 1); } @@ -915,7 +915,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssStopBack; } else if ( bQuote ) - ; // keep it going + ; // keep it going else eState = ssStopBack; } @@ -925,13 +925,13 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 if ( nMask & TOKEN_STRING_SEP ) { if ( cLast == '\\' ) - { // escaped + { // escaped aSymbol += OUString( pSym, pSrc - pSym - 2 ); aSymbol += OUString( &c, 1); } else if ( c == *pSrc && !(nContTypes & KParseTokens::TWO_DOUBLE_QUOTES_BREAK_STRING) ) - { // "" => literal " escaped + { // "" => literal " escaped aSymbol += OUString( pSym, pSrc - pSym ); pSrc++; } @@ -947,7 +947,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 case ssGetBool : { if ( (nMask & TOKEN_BOOL) ) - eState = ssStop; // maximum 2: <, >, <>, <=, >= + eState = ssStop; // maximum 2: <, >, <>, <=, >= else eState = ssStopBack; } @@ -977,9 +977,9 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( (r.TokenType & (KParseType::ASC_NUMBER | KParseType::UNI_NUMBER)) && (nTokenType & KParseType::IDENTNAME) && bMightBeWord ) - ; // keep a number that might be a word + ; // keep a number that might be a word else if ( r.LeadingWhiteSpace == (pSrc - pTextStart) ) - ; // keep ignored white space + ; // keep ignored white space else if ( !r.TokenType && eState == ssGetValue && (nMask & TOKEN_VALUE_SEP) ) ; // keep uncertain value else @@ -991,7 +991,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 eState = ssStopBack; } if ( eState == ssStopBack ) - { // put back + { // put back pSrc--; bMightBeWord = bMightBeWordLast; eState = ssStop; @@ -1057,7 +1057,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 else if ( r.TokenType & (KParseType::SINGLE_QUOTE_NAME | KParseType::DOUBLE_QUOTE_STRING) ) { if ( pSym < pSrc ) - { //! open quote + { //! open quote aSymbol += OUString( pSym, pSrc - pSym ); r.TokenType |= KParseType::MISSING_QUOTE; } diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx index 0539bd7e46ab..0cf35e38102c 100644 --- a/i18npool/source/characterclassification/characterclassificationImpl.cxx +++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ CharacterClassificationImpl::~CharacterClassificationImpl() { OUString SAL_CALL -CharacterClassificationImpl::toUpper( const OUString& Text, sal_Int32 nPos, +CharacterClassificationImpl::toUpper( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException) { return getLocaleSpecificCharacterClassification(rLocale)->toUpper(Text, nPos, nCount, rLocale); @@ -68,14 +68,14 @@ CharacterClassificationImpl::toLower( const OUString& Text, sal_Int32 nPos, } OUString SAL_CALL -CharacterClassificationImpl::toTitle( const OUString& Text, sal_Int32 nPos, +CharacterClassificationImpl::toTitle( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException) { return getLocaleSpecificCharacterClassification(rLocale)->toTitle(Text, nPos, nCount, rLocale); } sal_Int16 SAL_CALL -CharacterClassificationImpl::getType( const OUString& Text, sal_Int32 nPos ) +CharacterClassificationImpl::getType( const OUString& Text, sal_Int32 nPos ) throw(RuntimeException) { if (xUCI.is()) @@ -109,7 +109,7 @@ CharacterClassificationImpl::getCharacterType( const OUString& Text, sal_Int32 n } sal_Int32 SAL_CALL -CharacterClassificationImpl::getStringType( const OUString& Text, sal_Int32 nPos, +CharacterClassificationImpl::getStringType( const OUString& Text, sal_Int32 nPos, sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException) { return getLocaleSpecificCharacterClassification(rLocale)->getStringType(Text, nPos, nCount, rLocale); @@ -179,8 +179,8 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca static sal_Unicode under = (sal_Unicode)'_'; static OUString tw(OUString::createFromAscii("TW")); - sal_Int32 l = rLocale.Language.getLength(); - sal_Int32 c = rLocale.Country.getLength(); + sal_Int32 l = rLocale.Language.getLength(); + sal_Int32 c = rLocale.Country.getLength(); sal_Int32 v = rLocale.Variant.getLength(); OUStringBuffer aBuf(l+c+v+3); @@ -189,16 +189,16 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca createLocaleSpecificCharacterClassification(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).append(under).append(rLocale.Variant).makeStringAndClear(), rLocale)) || // load service with name <base>_<lang>_<country> - (l > 0 && c > 0 && + (l > 0 && c > 0 && createLocaleSpecificCharacterClassification(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).makeStringAndClear(), rLocale)) || - (l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 && + (l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 && (rLocale.Country.compareToAscii("HK") == 0 || rLocale.Country.compareToAscii("MO") == 0) && // if the country code is HK or MO, one more step to try TW. createLocaleSpecificCharacterClassification(aBuf.append(rLocale.Language).append(under).append( tw).makeStringAndClear(), rLocale)) || - (l > 0 && + (l > 0 && // load service with name <base>_<lang> createLocaleSpecificCharacterClassification(rLocale.Language, rLocale))) { return cachedItem->xCI; diff --git a/i18npool/source/characterclassification/scripttypedetector.cxx b/i18npool/source/characterclassification/scripttypedetector.cxx index 1248635b68c2..8085b3cc86c1 100644 --- a/i18npool/source/characterclassification/scripttypedetector.cxx +++ b/i18npool/source/characterclassification/scripttypedetector.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index 6b337c6cd75e..842d81f9ecbc 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 9903df6fd00e..c315d8929d1a 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 2afdd401123f..6d0ed67151e5 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -63,13 +63,13 @@ sal_Int32 SAL_CALL Collator_Unicode::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1, const OUString& str2, sal_Int32 off2, sal_Int32 len2) throw(RuntimeException) { - return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW + return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW } sal_Int32 SAL_CALL Collator_Unicode::compareString( const OUString& str1, const OUString& str2) throw(RuntimeException) { - return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW + return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW } extern "C" { static void SAL_CALL thisModule() {} } @@ -82,7 +82,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: UErrorCode status = U_ZERO_ERROR; OUString rule = LocaleData().getCollatorRuleByAlgorithm(rLocale, rAlgorithm); if (rule.getLength() > 0) { - collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW + collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW if (! U_SUCCESS(status)) throw RuntimeException(); } if (!collator && OUString::createFromAscii(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) { @@ -98,9 +98,9 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: if (rLocale.Language.equalsAscii("zh")) { OUString func_base = aBuf.makeStringAndClear(); if (OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0) - func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, + func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, (func_base + OUString::createFromAscii("TW_") + rAlgorithm).pData); - if (!func) + if (!func) func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, (func_base + rAlgorithm).pData); } else { if (rLocale.Language.equalsAscii("ja")) { diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx index c678230b0f1d..b53b73a4f5a5 100644 --- a/i18npool/source/collator/gencoll_rule.cxx +++ b/i18npool/source/collator/gencoll_rule.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -86,8 +86,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if (argc < 4) exit(-1); - fp = fopen(argv[1], "rb"); // open the source file for read; - if (fp == NULL) + fp = fopen(argv[1], "rb"); // open the source file for read; + if (fp == NULL) printf("Open the rule source file failed."); @@ -113,10 +113,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) UErrorCode status = U_ZERO_ERROR; //UParseError parseError; - //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF, + //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF, // UCOL_DEFAULT_STRENGTH, &parseError, &status); - RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW + RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW if (U_SUCCESS(status)) { @@ -138,6 +138,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) delete coll; return U_SUCCESS(status) ? 0 : 1; -} // End of main +} // 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 264117fe16a6..91e098fd50bc 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -70,17 +70,17 @@ static sal_Unicode table_Alphabet_ar[] = { }; static sal_Unicode table_Alphabet_th[] = { - 0x0E01, 0x0E02, 0x0E04, 0x0E07, + 0x0E01, 0x0E02, 0x0E04, 0x0E07, 0x0E08, 0x0E09, 0x0E0A, 0x0E0B, 0x0E0C, 0x0E0D, 0x0E0E, 0x0E0F, - 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, + 0x0E10, 0x0E11, 0x0E12, 0x0E13, 0x0E14, 0x0E15, 0x0E16, 0x0E17, 0x0E18, 0x0E19, 0x0E1A, 0x0E1B, 0x0E1C, 0x0E1D, 0x0E1E, 0x0E1F, - 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, + 0x0E20, 0x0E21, 0x0E22, 0x0E23, 0x0E24, 0x0E25, 0x0E26, 0x0E27, 0x0E28, 0x0E29, 0x0E2A, 0x0E2B, 0x0E2C, 0x0E2D, 0x0E2E }; static sal_Unicode table_Alphabet_he[] = { 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7, - 0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE, 0x05E0, 0x05E1, 0x05E2, + 0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE, 0x05E0, 0x05E1, 0x05E2, 0x05E4, 0x05E6, 0x05E7, 0x05E8, 0x05E9, 0x05EA }; @@ -123,23 +123,23 @@ static sal_Unicode table_Alphabet_my[] = { }; // Bulgarian Cyrillic upper case letters -static sal_Unicode table_CyrillicUpperLetter_bg[] = { +static sal_Unicode table_CyrillicUpperLetter_bg[] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042E, - 0x042F + 0x042F }; // Bulgarian cyrillic lower case letters -static sal_Unicode table_CyrillicLowerLetter_bg[] = { +static sal_Unicode table_CyrillicLowerLetter_bg[] = { 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044E, - 0x044F + 0x044F }; // Russian Cyrillic upper letters -static sal_Unicode table_CyrillicUpperLetter_ru[] = { +static sal_Unicode table_CyrillicUpperLetter_ru[] = { 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, @@ -147,7 +147,7 @@ static sal_Unicode table_CyrillicUpperLetter_ru[] = { }; // Russian cyrillic lower letters -static sal_Unicode table_CyrillicLowerLetter_ru[] = { +static sal_Unicode table_CyrillicLowerLetter_ru[] = { 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, @@ -155,17 +155,17 @@ static sal_Unicode table_CyrillicLowerLetter_ru[] = { }; // Serbian Cyrillic upper letters -static sal_Unicode table_CyrillicUpperLetter_sr[] = { - 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0402, 0x0415, 0x0416, - 0x0417, 0x0418, 0x0408, 0x041A, 0x041B, 0x0409, 0x041C, 0x041D, +static sal_Unicode table_CyrillicUpperLetter_sr[] = { + 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0402, 0x0415, 0x0416, + 0x0417, 0x0418, 0x0408, 0x041A, 0x041B, 0x0409, 0x041C, 0x041D, 0x040A, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x040B, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x040F, 0x0428 }; // Serbian cyrillic lower letters -static sal_Unicode table_CyrillicLowerLetter_sr[] = { +static sal_Unicode table_CyrillicLowerLetter_sr[] = { 0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0452, 0x0435, 0x0436, - 0x0437, 0x0438, 0x0458, 0x043A, 0x043B, 0x0459, 0x043C, 0x043D, + 0x0437, 0x0438, 0x0458, 0x043A, 0x043B, 0x0459, 0x043C, 0x043D, 0x045A, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x045B, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x045F, 0x0448 }; @@ -186,12 +186,12 @@ static sal_Unicode upperLetter[] = { static sal_Unicode lowerLetter[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, - 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A + 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A }; DefaultNumberingProvider::DefaultNumberingProvider( const Reference < XMultiServiceFactory >& xMSF ) : xSMgr(xMSF),translit(NULL) { - + } DefaultNumberingProvider::~DefaultNumberingProvider() @@ -293,11 +293,11 @@ void lcl_formatChars2( sal_Unicode table_capital[], sal_Unicode table_small[], i // string representation of n is appended to s. // if A=='A' then 0=>A, 1=>B, ..., 25=>Z, 26=>Aa, 27=>Ab, ... - if( n>=tableSize ) + if( n>=tableSize ) { lcl_formatChars2( table_capital, table_small, tableSize, (n-tableSize)/tableSize, s ); s += OUString::valueOf( table_small[ n % tableSize ] ); - } else + } else s += OUString::valueOf( table_capital[ n % tableSize ] ); } diff --git a/i18npool/source/indexentry/data/indexdata_alphanumeric.h b/i18npool/source/indexentry/data/indexdata_alphanumeric.h index 284863a4b6d1..3e0b31ec15df 100644 --- a/i18npool/source/indexentry/data/indexdata_alphanumeric.h +++ b/i18npool/source/indexentry/data/indexdata_alphanumeric.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ static sal_Unicode idxStr[] = { 0x44, 0x4E, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x00, 0x4F, 0x55, 0x55, 0x55, 0x55, 0x59, 0x54, 0x53, // D0-DF 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x43, 0x45, 0x45, 0x45, 0x45, 0x49, 0x49, 0x49, 0x49, // E0-EF 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 71da906738d4..2d6ae15ae176 100644 --- a/i18npool/source/indexentry/data/indexdata_ja_phonetic.h +++ b/i18npool/source/indexentry/data/indexdata_ja_phonetic.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx index fcd16a6f4d7f..13a723fa066f 100644 --- a/i18npool/source/indexentry/genindex_data.cxx +++ b/i18npool/source/indexentry/genindex_data.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -49,7 +49,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if (argc < 4) exit(-1); - fp = fopen(argv[1], "rb"); // open the source file for read; + fp = fopen(argv[1], "rb"); // open the source file for read; if (fp == NULL) { printf("Open the rule source file failed."); return 1; @@ -164,6 +164,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) fclose(fp); return 0; -} // End of main +} // 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 e3b682656fa2..603a4a6ef891 100644 --- a/i18npool/source/indexentry/indexentrysupplier.cxx +++ b/i18npool/source/indexentry/indexentrysupplier.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -125,7 +125,7 @@ sal_Bool SAL_CALL IndexEntrySupplier::createLocaleSpecificIndexEntrySupplier(con Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > SAL_CALL IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, const OUString& rSortAlgorithm) throw (RuntimeException) { - if (xIES.is() && rSortAlgorithm == aSortAlgorithm && rLocale.Language == aLocale.Language && + if (xIES.is() && rSortAlgorithm == aSortAlgorithm && rLocale.Language == aLocale.Language && rLocale.Country == aLocale.Country && rLocale.Variant == aLocale.Variant) return xIES; else if (xMSF.is()) { @@ -181,7 +181,7 @@ OUString SAL_CALL IndexEntrySupplier::getIndexFollowPageWord( sal_Bool bMorePage Sequence< OUString > aFollowPageWords = LocaleData().getFollowPageWords(rLocale); return (bMorePages && aFollowPageWords.getLength() > 1) ? - aFollowPageWords[1] : (aFollowPageWords.getLength() > 0 ? + aFollowPageWords[1] : (aFollowPageWords.getLength() > 0 ? aFollowPageWords[0] : OUString()); } diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index 1590b59c0913..769ed69018a7 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -59,7 +59,7 @@ IndexEntrySupplier_asian::~IndexEntrySupplier_asian() if (hModule) osl_unloadModule(hModule); } -OUString SAL_CALL +OUString SAL_CALL IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, const Locale& rLocale, const OUString& rAlgorithm ) throw (RuntimeException) { @@ -70,7 +70,7 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, 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 (!func) + if (!func) func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString('_')+rAlgorithm).pData); if (func) { sal_Int16 max_index; @@ -82,20 +82,20 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, return idx[2] ? OUString(&idx[2][address]) : OUString(address); } } - } + } } // using alphanumeric index for non-define stirng return OUString(&idxStr[(ch & 0xFFFFFF00) ? 0 : ch], 1); } -OUString SAL_CALL -IndexEntrySupplier_asian::getIndexKey( const OUString& rIndexEntry, +OUString SAL_CALL +IndexEntrySupplier_asian::getIndexKey( const OUString& rIndexEntry, const OUString& rPhoneticEntry, const Locale& rLocale) throw (RuntimeException) { return getIndexCharacter(getEntry(rIndexEntry, rPhoneticEntry, rLocale), rLocale, aAlgorithm); } -sal_Int16 SAL_CALL +sal_Int16 SAL_CALL IndexEntrySupplier_asian::compareIndexEntry( const OUString& rIndexEntry1, const OUString& rPhoneticEntry1, const Locale& rLocale1, const OUString& rIndexEntry2, const OUString& rPhoneticEntry2, const Locale& rLocale2 ) @@ -113,7 +113,7 @@ IndexEntrySupplier_asian::compareIndexEntry( return sal::static_int_cast< sal_Int16 >(result); // result in { -1, 0, 1 } } -OUString SAL_CALL +OUString SAL_CALL IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, const Locale& rLocale ) throw (RuntimeException) { @@ -124,7 +124,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, func_name=(OUString::createFromAscii("TW HK MO").indexOf(rLocale.Country) >= 0) ? "get_zh_zhuyin" : "get_zh_pinyin"; else if (rLocale.Language.equalsAscii("ko")) func_name="get_ko_phonetic"; - if (func_name) + if (func_name) func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData); if (func) { OUStringBuffer candidate; @@ -139,9 +139,9 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, address = idx[1][address + (ch & 0xFF)]; if (i > 0 && rLocale.Language.equalsAscii("zh")) candidate.appendAscii(" "); - if (idx[2]) + if (idx[2]) candidate.append(&idx[2][address]); - else + else candidate.append(address); } else candidate.appendAscii(" "); diff --git a/i18npool/source/indexentry/indexentrysupplier_common.cxx b/i18npool/source/indexentry/indexentrysupplier_common.cxx index 682f5086d02c..c2b21f8081ff 100644 --- a/i18npool/source/indexentry/indexentrysupplier_common.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_common.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -112,7 +112,7 @@ OUString SAL_CALL IndexEntrySupplier_Common::getIndexFollowPageWord( sal_Bool, throw RuntimeException(); } -const OUString& SAL_CALL +const OUString& SAL_CALL IndexEntrySupplier_Common::getEntry( const OUString& IndexEntry, const OUString& PhoneticEntry, const lang::Locale& rLocale ) throw (RuntimeException) { diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 5057eb91559d..e6f8695cfdc1 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,7 +75,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_Unicode::compareIndexEntry( index->getIndexWeight(getEntry(rIndexEntry2, rPhoneticEntry2, rLocale2)); if (result == 0) return IndexEntrySupplier_Common::compareIndexEntry( - rIndexEntry1, rPhoneticEntry1, rLocale1, + rIndexEntry1, rPhoneticEntry1, rLocale1, rIndexEntry2, rPhoneticEntry2, rLocale2); return result > 0 ? 1 : -1; } @@ -135,14 +135,14 @@ sal_Int16 Index::compare(sal_Unicode c1, sal_Unicode c2) sal_Int16 Index::getIndexWeight(const OUString& rIndexEntry) { sal_Int32 startPos=0; - if (skipping_chars.getLength() > 0) + if (skipping_chars.getLength() > 0) while (skipping_chars.indexOf(rIndexEntry[startPos]) >= 0) startPos++; if (mkey_count > 0) { for (sal_Int16 i = 0; i < mkey_count; i++) { sal_Int32 len = keys[mkeys[i]].mkey.getLength(); if (collator->compareSubstring(rIndexEntry, startPos, len, - keys[mkeys[i]].mkey, 0, len) == 0) + keys[mkeys[i]].mkey, 0, len) == 0) return mkeys[i]; } } @@ -177,7 +177,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm OUString keyStr = LocaleData().getIndexKeysByAlgorithm(rLocale, algorithm); if (!keyStr.getLength()) { - keyStr = LocaleData().getIndexKeysByAlgorithm(LOCALE_EN, + keyStr = LocaleData().getIndexKeysByAlgorithm(LOCALE_EN, LocaleData().getDefaultIndexAlgorithm(LOCALE_EN)); if (!keyStr) throw RuntimeException(); @@ -264,7 +264,7 @@ void Index::init(const lang::Locale &rLocale, const OUString& algorithm) throw ( Sequence< UnicodeScript > scriptList = LocaleData().getUnicodeScripts( rLocale ); if (scriptList.getLength() == 0) { - scriptList = LocaleData().getUnicodeScripts(LOCALE_EN); + scriptList = LocaleData().getUnicodeScripts(LOCALE_EN); if (scriptList.getLength() == 0) throw RuntimeException(); } diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx index daa5d612f8ef..c0c84d9c3c16 100644 --- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -39,7 +39,7 @@ using namespace ::rtl; namespace com { namespace sun { namespace star { namespace i18n { OUString SAL_CALL IndexEntrySupplier_ja_phonetic::getIndexCharacter( const OUString& rIndexEntry, - const lang::Locale& /*rLocale*/, const OUString& /*rSortAlgorithm*/ ) + const lang::Locale& /*rLocale*/, const OUString& /*rSortAlgorithm*/ ) throw (com::sun::star::uno::RuntimeException) { sal_Unicode ch=rIndexEntry.toChar(); @@ -54,13 +54,13 @@ OUString SAL_CALL IndexEntrySupplier_ja_phonetic::getIndexCharacter( const OUStr } OUString SAL_CALL IndexEntrySupplier_ja_phonetic::getIndexKey( const OUString& IndexEntry, - const OUString& PhoneticEntry, const lang::Locale& rLocale ) + const OUString& PhoneticEntry, const lang::Locale& rLocale ) throw (com::sun::star::uno::RuntimeException) { return getIndexCharacter( PhoneticEntry.getLength() > 0 ? PhoneticEntry : IndexEntry, rLocale, OUString()); } -sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry( +sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry( const OUString& IndexEntry1, const OUString& PhoneticEntry1, const lang::Locale& rLocale1, const OUString& IndexEntry2, const OUString& PhoneticEntry2, const lang::Locale& rLocale2 ) throw (com::sun::star::uno::RuntimeException) @@ -71,7 +71,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry( if (result == 0) return IndexEntrySupplier_Common::compareIndexEntry( - IndexEntry1, PhoneticEntry1, rLocale1, + IndexEntry1, PhoneticEntry1, rLocale1, IndexEntry2, PhoneticEntry2, rLocale2); return result; } diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx index 6ddc168b1ca9..ccc4eebc5994 100644 --- a/i18npool/source/inputchecker/inputsequencechecker.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,7 @@ InputSequenceCheckerImpl::~InputSequenceCheckerImpl() lookupTable.clear(); } -sal_Bool SAL_CALL +sal_Bool SAL_CALL InputSequenceCheckerImpl::checkInputSequence(const OUString& Text, sal_Int32 nStartPos, sal_Unicode inputChar, sal_Int16 inputCheckMode) throw(RuntimeException) { @@ -75,7 +75,7 @@ InputSequenceCheckerImpl::checkInputSequence(const OUString& Text, sal_Int32 nSt return sal_True; // not a checkable languages. } -sal_Int32 SAL_CALL +sal_Int32 SAL_CALL InputSequenceCheckerImpl::correctInputSequence(OUString& Text, sal_Int32 nStartPos, sal_Unicode inputChar, sal_Int16 inputCheckMode) throw(RuntimeException) { @@ -103,7 +103,7 @@ InputSequenceCheckerImpl::getLanguageByScripType(sal_Unicode cChar, sal_Unicode { sal_Int16 type = unicode::getUnicodeScriptType( cChar, typeList, UnicodeScript_kScriptCount ); - if (type != UnicodeScript_kScriptCount && + if (type != UnicodeScript_kScriptCount && type == unicode::getUnicodeScriptType( nChar, typeList, UnicodeScript_kScriptCount )) { switch(type) { case UnicodeScript_kThai: return (sal_Char*)"th"; @@ -129,7 +129,7 @@ InputSequenceCheckerImpl::getInputSequenceChecker(sal_Char* rLanguage) throw (Ru } Reference < uno::XInterface > xI = xMSF->createInstance( - OUString::createFromAscii("com.sun.star.i18n.InputSequenceChecker_") + + OUString::createFromAscii("com.sun.star.i18n.InputSequenceChecker_") + OUString::createFromAscii(rLanguage)); if ( xI.is() ) { diff --git a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx index 0d85e027ebc3..d7139dc57743 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,9 +33,9 @@ using namespace rtl; -namespace com { -namespace sun { -namespace star { +namespace com { +namespace sun { +namespace star { namespace i18n { InputSequenceChecker_hi::InputSequenceChecker_hi() @@ -47,24 +47,24 @@ InputSequenceChecker_hi::~InputSequenceChecker_hi() { } /* Non-Defined Class type */ -#define __ND 0 +#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 +#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 @@ -119,11 +119,11 @@ sal_Bool _DEV_Composible[2][2] = { #define getCharType(x) \ ((x >= 0x0900 && x < 0x097f) ? devaCT[x - 0x0900] : __ND) -sal_Bool SAL_CALL -InputSequenceChecker_hi::checkInputSequence(const OUString& Text, +sal_Bool SAL_CALL +InputSequenceChecker_hi::checkInputSequence(const OUString& Text, sal_Int32 nStartPos, - sal_Unicode inputChar, - sal_Int16 inputCheckMode) + sal_Unicode inputChar, + sal_Int16 inputCheckMode) throw(com::sun::star::uno::RuntimeException) { sal_Unicode currentChar = Text[nStartPos]; @@ -133,16 +133,16 @@ InputSequenceChecker_hi::checkInputSequence(const OUString& Text, return (_DEV_Composible[inputCheckMode][dev_cell_check[ch2][ch1]]); } -sal_Int32 SAL_CALL -InputSequenceChecker_hi::correctInputSequence(OUString& Text, +sal_Int32 SAL_CALL +InputSequenceChecker_hi::correctInputSequence(OUString& Text, sal_Int32 nStartPos, - sal_Unicode inputChar, - sal_Int16 inputCheckMode) + sal_Unicode inputChar, + sal_Int16 inputCheckMode) throw(com::sun::star::uno::RuntimeException) { if (checkInputSequence(Text, nStartPos, inputChar, inputCheckMode)) Text = Text.replaceAt(++nStartPos, 0, OUString(inputChar)); - else + else nStartPos=Text.getLength(); return nStartPos; } diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx index 24a2ad536cb1..55db45e9dd87 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,34 +47,34 @@ InputSequenceChecker_th::~InputSequenceChecker_th() /* Table for Thai Cell Manipulation */ sal_Char _TAC_celltype_inputcheck[17][17] = { -/* Cn */ /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F */ -/* Cn-1 00 */{ 'X', 'A', 'A', 'A', 'A', 'A', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 10 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 20 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C' }, - /* 30 */{ 'X', 'S', 'A', 'S', 'S', 'S', 'S', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 40 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 50 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 60 */{ 'X', 'A', 'A', 'A', 'S', 'A', 'S', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 70 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'R', 'R' }, - /* 80 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* 90 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* A0 */{ 'X', 'A', 'A', 'A', 'A', 'A', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* B0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* C0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* D0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, - /* E0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'R', 'R' }, - /* F0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'R', 'R', 'R', 'R', 'R', 'R' }, +/* Cn */ /* 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F */ +/* Cn-1 00 */{ 'X', 'A', 'A', 'A', 'A', 'A', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 10 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 20 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C' }, + /* 30 */{ 'X', 'S', 'A', 'S', 'S', 'S', 'S', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 40 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 50 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 60 */{ 'X', 'A', 'A', 'A', 'S', 'A', 'S', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 70 */{ 'X', 'A', 'A', 'A', 'A', 'S', 'A', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'R', 'R' }, + /* 80 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* 90 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* A0 */{ 'X', 'A', 'A', 'A', 'A', 'A', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* B0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* C0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* D0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R' }, + /* E0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'C', 'R', 'R', 'R', 'R', 'R' }, + /* F0 */{ 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'R', 'R', 'R', 'R', 'R', 'R' }, { 'X', 'A', 'A', 'A', 'S', 'S', 'A', 'R', 'R', 'R', 'C', 'R', 'C', 'R', 'R', 'R', 'R' } }; sal_Bool _TAC_Composible[3][5] = { - /* 'A', 'C', 'S', 'R', 'X' */ -/* Mode 0 */ {sal_True, sal_True, sal_True, sal_True, sal_True}, // PASSTHROUGH = 0 -/* Mode 1 */ {sal_True, sal_True, sal_True, sal_False, sal_True}, // BASIC = 1 -/* Mode 2 */ {sal_True, sal_True, sal_False, sal_False, sal_True} // STRICT = 2 + /* 'A', 'C', 'S', 'R', 'X' */ +/* Mode 0 */ {sal_True, sal_True, sal_True, sal_True, sal_True}, // PASSTHROUGH = 0 +/* Mode 1 */ {sal_True, sal_True, sal_True, sal_False, sal_True}, // BASIC = 1 +/* Mode 2 */ {sal_True, sal_True, sal_False, sal_False, sal_True} // STRICT = 2 }; -static sal_Bool SAL_CALL check(sal_Unicode ch1, sal_Unicode ch2, sal_Int16 inputCheckMode) +static sal_Bool SAL_CALL check(sal_Unicode ch1, sal_Unicode ch2, sal_Int16 inputCheckMode) { sal_Int16 composible_class; switch (_TAC_celltype_inputcheck[getCharType(ch1)][getCharType(ch2)]) { @@ -88,18 +88,18 @@ static sal_Bool SAL_CALL check(sal_Unicode ch1, sal_Unicode ch2, sal_Int16 input return (_TAC_Composible[inputCheckMode][composible_class]); } -sal_Bool SAL_CALL +sal_Bool SAL_CALL InputSequenceChecker_th::checkInputSequence(const OUString& Text, sal_Int32 nStartPos, sal_Unicode inputChar, sal_Int16 inputCheckMode) throw(com::sun::star::uno::RuntimeException) { return check(Text[nStartPos], inputChar, inputCheckMode); } -sal_Int32 SAL_CALL -InputSequenceChecker_th::correctInputSequence(OUString& Text, +sal_Int32 SAL_CALL +InputSequenceChecker_th::correctInputSequence(OUString& Text, sal_Int32 nStartPos, - sal_Unicode inputChar, - sal_Int16 inputCheckMode) + sal_Unicode inputChar, + sal_Int16 inputCheckMode) throw(com::sun::star::uno::RuntimeException) { /* 9 rules for input sequence correction, see issue i42661 for detail, @@ -128,10 +128,10 @@ http://www.openoffice.org/issues/show_bug.cgi?id=42661 else if (nStartPos > 0 && getCharType(Text[nStartPos-1]) == CT_CONS) { sal_uInt16 t1=getCharType(Text[nStartPos]), t2=getCharType(inputChar); if ( (CT_ABV(t1) && CT_ABV(t2)) || // 1. - (t1==CT_TONE && t2==CT_TONE) )// 2. + (t1==CT_TONE && t2==CT_TONE) )// 2. Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if ( (t1==CT_TONE && CT_ABV(t2)) || // 5. - (t1==CT_FV1 && t2==CT_TONE) || // 6. + else if ( (t1==CT_TONE && CT_ABV(t2)) || // 5. + (t1==CT_FV1 && t2==CT_TONE) || // 6. (Text[nStartPos]==0x0E4C && CT_ABV1(t2)) ) // 8. Text = Text.replaceAt(nStartPos++, 0, OUString(inputChar)); else @@ -140,8 +140,8 @@ http://www.openoffice.org/issues/show_bug.cgi?id=42661 sal_uInt16 t1=getCharType(Text[nStartPos-1]), t2=getCharType(Text[nStartPos]), t3=getCharType(inputChar); if (CT_ABV(t1) && t2==CT_TONE && t3==CT_TONE) // 3. Text = Text.replaceAt(nStartPos, 1, OUString(inputChar)); - else if ( (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3)) || // 4. - (t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE) || // 7. + else if ( (CT_ABV(t1) && t2==CT_TONE && CT_ABV(t3)) || // 4. + (t1==CT_TONE && t2==CT_FV1 && t3==CT_TONE) || // 7. (CT_ABV1(t1) && Text[nStartPos]==0x0E4C && CT_ABV1(t3)) ) // 9. Text = Text.replaceAt(nStartPos-1, 1, OUString(inputChar)); else diff --git a/i18npool/source/isolang/insys.cxx b/i18npool/source/isolang/insys.cxx index 4432a0923a0d..1ff1d8f7eed3 100644 --- a/i18npool/source/isolang/insys.cxx +++ b/i18npool/source/isolang/insys.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/isolang/inunx.cxx b/i18npool/source/isolang/inunx.cxx index 521f2ea6e8e0..c96b6f6f71f1 100644 --- a/i18npool/source/isolang/inunx.cxx +++ b/i18npool/source/isolang/inunx.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/isolang/inwnt.cxx b/i18npool/source/isolang/inwnt.cxx index db1b25218844..aa33a13ebac8 100644 --- a/i18npool/source/isolang/inwnt.cxx +++ b/i18npool/source/isolang/inwnt.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 520e0cd3e8c0..473ae68cb78a 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/isolang/langid.pl b/i18npool/source/isolang/langid.pl index 8035178b7bb5..354e18d7eb1f 100755 --- a/i18npool/source/isolang/langid.pl +++ b/i18npool/source/isolang/langid.pl @@ -4,7 +4,7 @@ if 0; #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# +# # Copyright 2000, 2010 Oracle and/or its affiliates. # # OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 5000e2981b96..3632e66efbce 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -444,7 +444,7 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) nLang = LANGUAGE_LUXEMBOURGISH_LUXEMBOURG; break; - // The following are not strictly obsolete but should be mapped to a + // The following are not strictly obsolete but should be mapped to a // replacement locale when encountered. // no_NO is an alias for nb_NO @@ -452,7 +452,7 @@ LanguageType MsLangId::getReplacementForObsoleteLanguage( LanguageType nLang ) nLang = LANGUAGE_NORWEGIAN_BOKMAL; break; - // #i94435# A Spanish variant that differs only in collation details we + // #i94435# A Spanish variant that differs only in collation details we // do not support. case LANGUAGE_SPANISH_DATED: nLang = LANGUAGE_SPANISH_MODERN; diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 7b8cceb09bd3..77c5acbbce8e 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -258,7 +258,7 @@ void LocaleNode :: generateCode (const OFileWriter &of) const pParameterName); } // write empty data if error - of.writeParameter( pParameterName, aVal); + of.writeParameter( pParameterName, aVal); sal_Int32 nLen = aVal.getLength(); if (nLen < nMinLen) { @@ -293,7 +293,7 @@ void LocaleNode :: generateCode (const OFileWriter &of) const ++nError; fprintf( stderr, "Error: node %s not found.\n", pNodeName); // write empty data if error - of.writeParameter( pParameterName, aVal); + of.writeParameter( pParameterName, aVal); } return aVal; } @@ -493,7 +493,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const if (aDoubleQuoteStart == aDoubleQuoteEnd) fprintf( stderr, "Warning: %s\n", "DoubleQuotationStart equals DoubleQuotationEnd. Not necessarily an error, but unusual."); - /* TODO: should equalness of single and double quotes be an error? Would + /* TODO: should equalness of single and double quotes be an error? Would * need to adapt quite some locales' data. */ if (aQuoteStart == aDoubleQuoteStart) fprintf( stderr, "Warning: %s\n", @@ -569,7 +569,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const OUString aUsage; OUString aType; OUString aFormatIndex; - // currNode -> print(); + // currNode -> print(); const Attr &currNodeAttr = currNode->getAttr(); //printf ("getLen() = %d\n", currNode->getAttr().getLength()); @@ -651,11 +651,11 @@ void LCFormatNode::generateCode (const OFileWriter &of) const // Currency formats should be something like [C]###0;-[C]###0 // and not parenthesized [C]###0;([C]###0) if not en_US. case cssi::NumberFormatIndex::CURRENCY_1000INT : - case cssi::NumberFormatIndex::CURRENCY_1000INT_RED : - case cssi::NumberFormatIndex::CURRENCY_1000DEC2 : - case cssi::NumberFormatIndex::CURRENCY_1000DEC2_RED : - case cssi::NumberFormatIndex::CURRENCY_1000DEC2_CCC : - case cssi::NumberFormatIndex::CURRENCY_1000DEC2_DASHED : + case cssi::NumberFormatIndex::CURRENCY_1000INT_RED : + case cssi::NumberFormatIndex::CURRENCY_1000DEC2 : + case cssi::NumberFormatIndex::CURRENCY_1000DEC2_RED : + case cssi::NumberFormatIndex::CURRENCY_1000DEC2_CCC : + case cssi::NumberFormatIndex::CURRENCY_1000DEC2_DASHED : if (strcmp( of.getLocale(), "en_US") != 0) { OUString aCode( n->getValue()); @@ -1269,10 +1269,10 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const } else { for(j = 0; j < nbOfDays[i]; j++) { of.writeAsciiString("\tdayID"); - of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); + of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); of.writeAsciiString("\tdayDefaultAbbrvName"); - of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); - of.writeAsciiString("\tdayDefaultFullName");of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); + of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); + of.writeAsciiString("\tdayDefaultFullName");of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); } } if (nbOfMonths[i] == 0) { @@ -1294,13 +1294,13 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const of.writeInt(i); of.writeAsciiString(",\n"); } else { for(j = 0; j < nbOfEras[i]; j++) { - of.writeAsciiString("\teraID"); of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); + of.writeAsciiString("\teraID"); of.writeInt(i); of.writeInt(j); of.writeAsciiString(",\n"); of.writeAsciiString("\teraDefaultAbbrvName");of.writeInt(i);of.writeInt(j);of.writeAsciiString(",\n"); of.writeAsciiString("\teraDefaultFullName");of.writeInt(i);of.writeInt(j);of.writeAsciiString(",\n"); } } - of.writeAsciiString("\tstartDayOfWeek");of.writeInt(i); of.writeAsciiString(",\n"); - of.writeAsciiString("\tminimalDaysInFirstWeek");of.writeInt(i); of.writeAsciiString(",\n"); + of.writeAsciiString("\tstartDayOfWeek");of.writeInt(i); of.writeAsciiString(",\n"); + of.writeAsciiString("\tminimalDaysInFirstWeek");of.writeInt(i); of.writeAsciiString(",\n"); } of.writeAsciiString("};\n\n"); @@ -1365,7 +1365,7 @@ void LCCurrencyNode :: generateCode (const OFileWriter &of) const of.writeParameter("currencySymbol", str, nbOfCurrencies); str = calNode -> findNode ("BankSymbol") -> getValue(); of.writeParameter("bankSymbol", str, nbOfCurrencies); - // BankSymbol currently must be ISO 4217. May change later if + // BankSymbol currently must be ISO 4217. May change later if // application always uses CurrencyID instead of BankSymbol. if (!bLegacy && !isIso4217(str)) incError( "BankSymbol is not ISO 4217"); diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx index fb3506389ac4..3cacc4163ba8 100644 --- a/i18npool/source/localedata/LocaleNode.hxx +++ b/i18npool/source/localedata/LocaleNode.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/localedata/data/dz_BT.xml b/i18npool/source/localedata/data/dz_BT.xml index 6bb1d8951064..7b21b633d5fe 100644 --- a/i18npool/source/localedata/data/dz_BT.xml +++ b/i18npool/source/localedata/data/dz_BT.xml @@ -118,7 +118,7 @@ <FormatCode>[NatNum1]"སྤྱི་ལོ" YYYY "ཟླ་" M "ཚེས་" DD</FormatCode> <DefaultName></DefaultName> </FormatElement> - <!-- Time format was originally "ཆུ་ཚོད་" HH "སà¾à½¢à¼‹à½˜à¼‹" MM "སà¾à½¢à¼‹à½†à¼‹à¼‹" SS --> + <!-- Time format was originally "ཆུ་ཚོད་" HH "སà¾à½¢à¼‹à½˜à¼‹" MM "སà¾à½¢à¼‹à½†à¼‹à¼‹" SS --> <!-- Replaced with HH:MM:SS until more information is available --> <FormatElement msgid="TimeFormatskey1" default="false" type="short" usage="TIME" formatindex="39"> <FormatCode>HH:MM</FormatCode> @@ -249,7 +249,7 @@ <DefaultName></DefaultName> </FormatElement> <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> - <!-- Percentage formats other than % sign are not possible in 2.0 0 "བརྒྱ་ཆ་་" is replaced by % --> + <!-- Percentage formats other than % sign are not possible in 2.0 0 "བརྒྱ་ཆ་་" is replaced by % --> <FormatCode>[NatNum1]0%</FormatCode> <DefaultName></DefaultName> </FormatElement> @@ -297,7 +297,7 @@ <DaysOfWeek> <Day> <DayID>sun</DayID> - <DefaultAbbrvName>ཟླ་ </DefaultAbbrvName> + <DefaultAbbrvName>ཟླ་ </DefaultAbbrvName> <DefaultFullName>གཟའ་ཟླ་བ་</DefaultFullName> </Day> <Day> @@ -449,7 +449,7 @@ </LC_NumberingLevel> <LC_OutLineNumberingLevel> <OutlineStyle> - <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" /> + <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="0" LeftMargin="0" SymbolTextDistance="50" FirstLineOffset="0" /> <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="1" LeftMargin="50" SymbolTextDistance="50" FirstLineOffset="0" /> <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="2" LeftMargin="100" SymbolTextDistance="50" FirstLineOffset="0" /> <OutLineNumberingLevel Prefix=" " NumType="4" Suffix=" " BulletChar="0020" BulletFontName="" ParentNumbering="3" LeftMargin="150" SymbolTextDistance="50" FirstLineOffset="0" /> diff --git a/i18npool/source/localedata/data/fa_IR.xml b/i18npool/source/localedata/data/fa_IR.xml index 95a64f392c4d..b5e7380e4a34 100644 --- a/i18npool/source/localedata/data/fa_IR.xml +++ b/i18npool/source/localedata/data/fa_IR.xml @@ -307,7 +307,7 @@ </StartDayOfWeek> <MinimalDaysInFirstWeek>1</MinimalDaysInFirstWeek> </Calendar> - + <Calendar unoid="gregorian" default="false"> <DaysOfWeek> <Day> diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index abc24d10e857..cd782acfae60 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 9fe8234d48f6..42ebf76cee03 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -432,13 +432,13 @@ oslGenericFunction SAL_CALL lcl_LookupTableHelper::getFunctionSymbolByName( if ( module->loadRelative(&thisModule, aBuf.makeStringAndClear()) ) { ::osl::MutexGuard aGuard( maMutex ); - LocaleDataLookupTableItem* pNewItem = 0; + LocaleDataLookupTableItem* pNewItem = 0; maLookupTable.push_back(pNewItem = new LocaleDataLookupTableItem(aLibTable[i].pLib, module, aLibTable[i].pLocale )); OSL_ASSERT( pOutCachedItem ); if( pOutCachedItem ) { (*pOutCachedItem) = new LocaleDataLookupTableItem( *pNewItem ); - return module->getFunctionSymbol( + return module->getFunctionSymbol( aBuf.appendAscii(pFunction).append(under). appendAscii((*pOutCachedItem)->localeName).makeStringAndClear()); } @@ -851,7 +851,7 @@ LocaleData::hasPhonetic( const Locale& rLocale ) throw(RuntimeException) return sal_False; } -sal_Unicode ** SAL_CALL +sal_Unicode ** SAL_CALL LocaleData::getIndexArrayForAlgorithm(const Locale& rLocale, const OUString& algorithm) { sal_Int16 indexCount = 0; diff --git a/i18npool/source/localedata/saxparser.cxx b/i18npool/source/localedata/saxparser.cxx index dd6c02225cef..bd7b5e5edcbb 100644 --- a/i18npool/source/localedata/saxparser.cxx +++ b/i18npool/source/localedata/saxparser.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -145,7 +145,7 @@ class TestDocumentHandler : { public: TestDocumentHandler(const char* locale, const char* outFile ) : - rootNode(0), nError(0), nbOfCurrencies(0), nbOfCalendars(0), nbOfFormatElements(0), + 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) @@ -395,7 +395,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) // create and connect the document handler to the parser TestDocumentHandler *pDocHandler = new TestDocumentHandler( argv[1], argv[3]); - Reference < XDocumentHandler > rDocHandler( (XDocumentHandler *) pDocHandler ); + Reference < XDocumentHandler > rDocHandler( (XDocumentHandler *) pDocHandler ); Reference< XEntityResolver > rEntityResolver( (XEntityResolver *) pDocHandler ); rParser->setDocumentHandler( rDocHandler ); @@ -404,7 +404,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) // create the input stream InputSource source; source.aInputStream = createStreamFromFile( argv[2] ); - source.sSystemId = OUString::createFromAscii( argv[2] ); + source.sSystemId = OUString::createFromAscii( argv[2] ); try { diff --git a/i18npool/source/nativenumber/data/numberchar.h b/i18npool/source/nativenumber/data/numberchar.h index 5472ad15ed08..91224585f3b7 100644 --- a/i18npool/source/nativenumber/data/numberchar.h +++ b/i18npool/source/nativenumber/data/numberchar.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,41 +30,41 @@ namespace com { namespace sun { namespace star { namespace i18n { -static const sal_Int16 NumberChar_HalfWidth = 0; -static const sal_Int16 NumberChar_FullWidth = 1; -static const sal_Int16 NumberChar_Lower_zh = 2; -static const sal_Int16 NumberChar_Upper_zh = 3; -static const sal_Int16 NumberChar_Upper_zh_TW = 4; -static const sal_Int16 NumberChar_Modern_ja = 5; +static const sal_Int16 NumberChar_HalfWidth = 0; +static const sal_Int16 NumberChar_FullWidth = 1; +static const sal_Int16 NumberChar_Lower_zh = 2; +static const sal_Int16 NumberChar_Upper_zh = 3; +static const sal_Int16 NumberChar_Upper_zh_TW = 4; +static const sal_Int16 NumberChar_Modern_ja = 5; static const sal_Int16 NumberChar_Traditional_ja= 6; -static const sal_Int16 NumberChar_Lower_ko = 7; -static const sal_Int16 NumberChar_Upper_ko = 8; -static const sal_Int16 NumberChar_Hangul_ko = 9; -static const sal_Int16 NumberChar_Indic_ar = 10; +static const sal_Int16 NumberChar_Lower_ko = 7; +static const sal_Int16 NumberChar_Upper_ko = 8; +static const sal_Int16 NumberChar_Hangul_ko = 9; +static const sal_Int16 NumberChar_Indic_ar = 10; static const sal_Int16 NumberChar_EastIndic_ar = 11; -static const sal_Int16 NumberChar_hi = 12; -static const sal_Int16 NumberChar_th = 13; -static const sal_Int16 NumberChar_or = 14; -static const sal_Int16 NumberChar_mr = 15; -static const sal_Int16 NumberChar_bn = 16; -static const sal_Int16 NumberChar_pa = 17; -static const sal_Int16 NumberChar_gu = 18; -static const sal_Int16 NumberChar_ta = 19; -static const sal_Int16 NumberChar_te = 20; -static const sal_Int16 NumberChar_kn = 21; -static const sal_Int16 NumberChar_ml = 22; -static const sal_Int16 NumberChar_lo = 23; -static const sal_Int16 NumberChar_bo = 24; -static const sal_Int16 NumberChar_my = 25; -static const sal_Int16 NumberChar_km = 26; -static const sal_Int16 NumberChar_mn = 27; -static const sal_Int16 NumberChar_he = 28; -static const sal_Int16 NumberChar_ne = 29; -static const sal_Int16 NumberChar_dz = 30; -static const sal_Int16 NumberChar_Count = 31; +static const sal_Int16 NumberChar_hi = 12; +static const sal_Int16 NumberChar_th = 13; +static const sal_Int16 NumberChar_or = 14; +static const sal_Int16 NumberChar_mr = 15; +static const sal_Int16 NumberChar_bn = 16; +static const sal_Int16 NumberChar_pa = 17; +static const sal_Int16 NumberChar_gu = 18; +static const sal_Int16 NumberChar_ta = 19; +static const sal_Int16 NumberChar_te = 20; +static const sal_Int16 NumberChar_kn = 21; +static const sal_Int16 NumberChar_ml = 22; +static const sal_Int16 NumberChar_lo = 23; +static const sal_Int16 NumberChar_bo = 24; +static const sal_Int16 NumberChar_my = 25; +static const sal_Int16 NumberChar_km = 26; +static const sal_Int16 NumberChar_mn = 27; +static const sal_Int16 NumberChar_he = 28; +static const sal_Int16 NumberChar_ne = 29; +static const sal_Int16 NumberChar_dz = 30; +static const sal_Int16 NumberChar_Count = 31; static sal_Unicode NumberChar[][10] = { -// 0 1 2 3 4 5 6 7 8 9 +// 0 1 2 3 4 5 6 7 8 9 { 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039 }, // Half Width (Ascii) { 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18, 0xFF19 }, // Full Width { 0x3007, 0x4E00, 0x4E8c, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D }, // Chinese Lower @@ -147,7 +147,7 @@ static sal_Unicode MinusChar[] = { 0x2212, // Est. Arabic Indic 0x0000, // Indic 0x0000, // Thai - 0x0000, // Oriya + 0x0000, // Oriya 0x0000, // Marathi 0x0000, // Bengali 0x0000, // Punjabi @@ -181,7 +181,7 @@ static sal_uInt16 SeparatorChar[] = { 0x066C, // Est. Arabic Indic 0x0000, // Indic 0x0000, // Thai - 0x0000, // Oriya + 0x0000, // Oriya 0x0000, // Marathi 0x0000, // Bengali 0x0000, // Punjabi @@ -200,44 +200,44 @@ static sal_uInt16 SeparatorChar[] = { 0x0000, // Dzongkha }; -#define NUMBER_ZERO NumberChar[NumberChar_HalfWidth][0] // 0x0030 -#define NUMBER_ONE NumberChar[NumberChar_HalfWidth][1] // 0x0031 -#define NUMBER_NINE NumberChar[NumberChar_HalfWidth][9] // 0x0039 -#define isNumber(n) ( NUMBER_ZERO <= n && n <= NUMBER_NINE ) -#define isDecimal(n) ( n == DecimalChar[NumberChar_HalfWidth] ) -#define isMinus(n) ( n == MinusChar[NumberChar_HalfWidth] ) +#define NUMBER_ZERO NumberChar[NumberChar_HalfWidth][0] // 0x0030 +#define NUMBER_ONE NumberChar[NumberChar_HalfWidth][1] // 0x0031 +#define NUMBER_NINE NumberChar[NumberChar_HalfWidth][9] // 0x0039 +#define isNumber(n) ( NUMBER_ZERO <= n && n <= NUMBER_NINE ) +#define isDecimal(n) ( n == DecimalChar[NumberChar_HalfWidth] ) +#define isMinus(n) ( n == MinusChar[NumberChar_HalfWidth] ) #define isSeparator(n) ( n == SeparatorChar[NumberChar_HalfWidth] ) -const sal_Int16 Multiplier_Lower_zh = 0; -const sal_Int16 Multiplier_Upper_zh = 1; -const sal_Int16 Multiplier_Lower_zh_TW = 2; -const sal_Int16 Multiplier_Upper_zh_TW = 3; -const sal_Int16 Multiplier_Lower_ko = 4; -const sal_Int16 Multiplier_Hangul_ko = 5; -const sal_Int16 Multiplier_Modern_ja = 6; +const sal_Int16 Multiplier_Lower_zh = 0; +const sal_Int16 Multiplier_Upper_zh = 1; +const sal_Int16 Multiplier_Lower_zh_TW = 2; +const sal_Int16 Multiplier_Upper_zh_TW = 3; +const sal_Int16 Multiplier_Lower_ko = 4; +const sal_Int16 Multiplier_Hangul_ko = 5; +const sal_Int16 Multiplier_Modern_ja = 6; const sal_Int16 Multiplier_Traditional_ja = 7; -const sal_Int16 Multiplier_Count = 8; +const sal_Int16 Multiplier_Count = 8; -const sal_Int16 ExponentCount_6_CJK = 6; +const sal_Int16 ExponentCount_6_CJK = 6; static sal_Int16 MultiplierExponent_6_CJK[ExponentCount_6_CJK] = { - 12, 8, 4, 3, 2, 1 + 12, 8, 4, 3, 2, 1 }; static sal_Unicode MultiplierChar_6_CJK[][ExponentCount_6_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 Lower - {0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE}, // T. Chinese & Korean Upper - {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Korean Lower - {0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED}, // Korean Hangul - {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Japanese Modern - {0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE} // Japanese Traditional + {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 Lower + {0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE}, // T. Chinese & Korean Upper + {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Korean Lower + {0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED}, // Korean Hangul + {0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Japanese Modern + {0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE} // Japanese Traditional }; -const sal_Int16 ExponentCount_2_CJK = 2; +const sal_Int16 ExponentCount_2_CJK = 2; static sal_Int16 MultiplierExponent_2_CJK[ExponentCount_2_CJK] = { - 8, 4, + 8, 4, }; static sal_Unicode MultiplierChar_2_CJK[][ExponentCount_2_CJK] = { @@ -251,20 +251,20 @@ static sal_Unicode MultiplierChar_2_CJK[][ExponentCount_2_CJK] = { {0x5104, 0x842C} // Japanese Traditional }; -const sal_Int16 ExponentCount_7_CJK = 7; +const sal_Int16 ExponentCount_7_CJK = 7; static sal_Int16 MultiplierExponent_7_CJK[ExponentCount_7_CJK] = { - 16, 12, 8, 4, 3, 2, 1 + 16, 12, 8, 4, 3, 2, 1 }; static sal_Unicode MultiplierChar_7_CJK[][ExponentCount_7_CJK] = { - {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x5343, 0x767E, 0x5341}, // S. Chinese Lower - {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x4EDF, 0x4F70, 0x62FE}, // S. Chinese Upper - {0x4EAC, 0x5146, 0x5104, 0x842C, 0x5343, 0x767E, 0x5341}, // T. Chinese Lower - {0x4EAC, 0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE}, // T. Chinese & Korean Upper - {0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Korean Lower - {0x4EAC, 0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED}, // Korean Hangul - {0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Japanese Modern - {0x4EAC, 0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE} // Japanese Traditional + {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x5343, 0x767E, 0x5341}, // S. Chinese Lower + {0x4EAC, 0x5146, 0x4EBF, 0x4E07, 0x4EDF, 0x4F70, 0x62FE}, // S. Chinese Upper + {0x4EAC, 0x5146, 0x5104, 0x842C, 0x5343, 0x767E, 0x5341}, // T. Chinese Lower + {0x4EAC, 0x5146, 0x5104, 0x842C, 0x4EDF, 0x4F70, 0x62FE}, // T. Chinese & Korean Upper + {0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Korean Lower + {0x4EAC, 0xC870, 0xC5B5, 0xB9CC, 0xCC9C, 0xBC31, 0xC2ED}, // Korean Hangul + {0x4EAC, 0x5146, 0x5104, 0x4E07, 0x5343, 0x767E, 0x5341}, // Japanese Modern + {0x4EAC, 0x5146, 0x5104, 0x842C, 0x9621, 0x767E, 0x62FE} // Japanese Traditional }; typedef struct { diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 5044b6cc1e2f..a3382290ff4d 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -75,7 +75,7 @@ namespace com { namespace sun { namespace star { namespace i18n { OUString SAL_CALL getHebrewNativeNumberString(const OUString& aNumberString, sal_Bool useGeresh); -OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, +OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset, sal_Bool useOffset, sal_Int16 number ) throw(RuntimeException) { const sal_Unicode *src = inStr.getStr() + startPos; @@ -91,7 +91,7 @@ OUString SAL_CALL AsciiToNativeChar( const OUString& inStr, sal_Int32 startPos, if (i > 0 && isNumber(src[i-1]) && isSeparator(ch)) newStr->buffer[i] = SeparatorChar[number] ? SeparatorChar[number] : ch; else - newStr->buffer[i] = isDecimal(ch) ? (DecimalChar[number] ? DecimalChar[number] : ch) : + newStr->buffer[i] = isDecimal(ch) ? (DecimalChar[number] ? DecimalChar[number] : ch) : isMinus(ch) ? (MinusChar[number] ? MinusChar[number] : ch) : ch; } else @@ -153,7 +153,7 @@ sal_Bool SAL_CALL AsciiToNative_numberMaker(const sal_Unicode *str, sal_Int32 be for (sal_Int16 i = 1; i <= number->exponentCount; i++) { sal_Int32 tmp = len - (i == number->exponentCount ? 0 : number->multiplierExponent[i]); if (tmp > 0) { - printPower |= AsciiToNative_numberMaker(str, begin, tmp, dst, count, + printPower |= AsciiToNative_numberMaker(str, begin, tmp, dst, count, (i == number->exponentCount ? -1 : i), offset, useOffset, startPos, number, numberChar); begin += tmp; len -= tmp; @@ -180,10 +180,10 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ sal_Int32 strLen = inStr.getLength() - startPos; sal_Unicode *numberChar = NumberChar[number->number]; - if (nCount > strLen) + if (nCount > strLen) nCount = strLen; - if (nCount > 0) { + if (nCount > 0) { const sal_Unicode *str = inStr.getStr() + startPos; rtl_uString *newStr = x_rtl_uString_new_WithLength(nCount * 2); rtl_uString *srcStr = x_rtl_uString_new_WithLength(nCount); // for keeping number without comma @@ -272,7 +272,7 @@ static void SAL_CALL NativeToAscii_numberMaker(sal_Int16 max, sal_Int16 prev, co shift = end = 0; if (curr >= max) max = curr; - else if (curr > prev) + else if (curr > prev) shift = max - curr; else end = curr; @@ -291,7 +291,7 @@ static void SAL_CALL NativeToAscii_numberMaker(sal_Int16 max, sal_Int16 prev, co } max = curr; } - NativeToAscii_numberMaker(max, curr, str, i, nCount, dst, + NativeToAscii_numberMaker(max, curr, str, i, nCount, dst, count, offset, useOffset, numberChar, multiplierChar); return; } else @@ -305,15 +305,15 @@ static void SAL_CALL NativeToAscii_numberMaker(sal_Int16 max, sal_Int16 prev, co } } -static OUString SAL_CALL NativeToAscii(const OUString& inStr, +static OUString SAL_CALL NativeToAscii(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset, sal_Bool useOffset ) throw(RuntimeException) { sal_Int32 strLen = inStr.getLength() - startPos; - if (nCount > strLen) + if (nCount > strLen) nCount = strLen; - if (nCount > 0) { + if (nCount > 0) { const sal_Unicode *str = inStr.getStr() + startPos; rtl_uString *newStr = x_rtl_uString_new_WithLength(nCount * MultiplierExponent_7_CJK[0] + 1); if (useOffset) @@ -344,20 +344,20 @@ static OUString SAL_CALL NativeToAscii(const OUString& inStr, } else { if ((index = numberChar.indexOf(str[i])) >= 0) newStr->buffer[count] = sal::static_int_cast<sal_Unicode>( (index % 10) + NUMBER_ZERO ); - else if ((index = separatorChar.indexOf(str[i])) >= 0 && + else if ((index = separatorChar.indexOf(str[i])) >= 0 && (i < nCount-1 && (numberChar.indexOf(str[i+1]) >= 0 || multiplierChar.indexOf(str[i+1]) >= 0))) newStr->buffer[count] = SeparatorChar[NumberChar_HalfWidth]; else if ((index = decimalChar.indexOf(str[i])) >= 0 && (i < nCount-1 && (numberChar.indexOf(str[i+1]) >= 0 || multiplierChar.indexOf(str[i+1]) >= 0))) - // Only when decimal point is followed by numbers, + // Only when decimal point is followed by numbers, // it will be convert to ASCII decimal point newStr->buffer[count] = DecimalChar[NumberChar_HalfWidth]; else if ((index = minusChar.indexOf(str[i])) >= 0 && (i < nCount-1 && (numberChar.indexOf(str[i+1]) >= 0 || multiplierChar.indexOf(str[i+1]) >= 0))) - // Only when minus is followed by numbers, + // Only when minus is followed by numbers, // it will be convert to ASCII minus sign newStr->buffer[count] = MinusChar[NumberChar_HalfWidth]; else @@ -576,8 +576,8 @@ OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aN } if (number || num >= 0) { - if (!aLocale.Language.equals(rLocale.Language) || - !aLocale.Country.equals(rLocale.Country) || + if (!aLocale.Language.equals(rLocale.Language) || + !aLocale.Country.equals(rLocale.Country) || !aLocale.Variant.equals(rLocale.Variant)) { LocaleDataItem item = LocaleData().getLocaleItem( rLocale ); aLocale = rLocale; @@ -595,7 +595,7 @@ OUString SAL_CALL NativeNumberSupplier::getNativeNumberString(const OUString& aN if (number) return AsciiToNative( aNumberString, 0, aNumberString.getLength(), offset, useOffset, number ); else if (num == NumberChar_he) - return getHebrewNativeNumberString(aNumberString, + return getHebrewNativeNumberString(aNumberString, nNativeNumberMode == NativeNumberMode::NATNUM2); else return AsciiToNativeChar(aNumberString, 0, aNumberString.getLength(), offset, useOffset, num); @@ -856,7 +856,7 @@ void makeHebrewNumber(sal_Int64 value, OUStringBuffer& output, sal_Bool isLast, if (useGeresh) { if (nbOfChar > 1) // a number is written as more than one character output.insert(output.getLength() - 1, gershayim); - else if (nbOfChar == 1) // a number is written as a single character + else if (nbOfChar == 1) // a number is written as a single character output.append(geresh); } } diff --git a/i18npool/source/numberformatcode/numberformatcode.cxx b/i18npool/source/numberformatcode/numberformatcode.cxx index 8a080ea214d6..a868bc063b95 100644 --- a/i18npool/source/numberformatcode/numberformatcode.cxx +++ b/i18npool/source/numberformatcode/numberformatcode.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,7 +54,7 @@ NumberFormatCodeMapper::~NumberFormatCodeMapper() NumberFormatCodeMapper::getDefault( sal_Int16 formatType, sal_Int16 formatUsage, const ::com::sun::star::lang::Locale& rLocale ) throw(::com::sun::star::uno::RuntimeException) { - ::rtl::OUString elementType = mapElementTypeShortToString(formatType); + ::rtl::OUString elementType = mapElementTypeShortToString(formatType); ::rtl::OUString elementUsage = mapElementUsageShortToString(formatUsage); getFormats( rLocale ); @@ -159,9 +159,9 @@ NumberFormatCodeMapper::getAllFormatCodes( const ::com::sun::star::lang::Locale& void NumberFormatCodeMapper::setupLocale( const ::com::sun::star::lang::Locale& rLocale ) { - if ( aLocale.Country != rLocale.Country - || aLocale.Language != rLocale.Language - || aLocale.Variant != rLocale.Variant ) + if ( aLocale.Country != rLocale.Country + || aLocale.Language != rLocale.Language + || aLocale.Variant != rLocale.Variant ) { bFormatsValid = sal_False; aLocale = rLocale; diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx index b5f30058da2e..1d4944634cf2 100644 --- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx +++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx index dc588a36b515..c04f981f7c56 100644 --- a/i18npool/source/paper/paper.cxx +++ b/i18npool/source/paper/paper.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -188,7 +188,7 @@ bool PaperInfo::doSloppyFit() bool PaperInfo::sloppyEqual(const PaperInfo &rOther) const { - return + return ( (labs(m_nPaperWidth - rOther.m_nPaperWidth) < MAXSLOPPY) && (labs(m_nPaperHeight - rOther.m_nPaperHeight) < MAXSLOPPY) @@ -335,13 +335,13 @@ PaperInfo PaperInfo::getSystemDefaultPaper() for ( size_t i = 0; i < nTabSize; ++i ) { if (i == PAPER_USER) continue; - + //glibc stores sizes as integer mm units, and so is inaccurate. To //find a standard paper size we calculate the standard paper sizes //into equally inaccurate mm and compare long width = (aDinTab[i].m_nWidth + 50) / 100; long height = (aDinTab[i].m_nHeight + 50) / 100; - + if (width == w.word/100 && height == h.word/100) { w.word = aDinTab[i].m_nWidth; @@ -398,7 +398,7 @@ PaperInfo::PaperInfo(long nPaperWidth, long nPaperHeight) { for ( size_t i = 0; i < nTabSize; ++i ) { - if ( + if ( (nPaperWidth == aDinTab[i].m_nWidth) && (nPaperHeight == aDinTab[i].m_nHeight) ) @@ -422,7 +422,7 @@ Paper PaperInfo::fromPSName(const rtl::OString &rName) for ( size_t i = 0; i < nTabSize; ++i ) { - if (aDinTab[i].m_pPSName && + if (aDinTab[i].m_pPSName && !rtl_str_compareIgnoreAsciiCase(aDinTab[i].m_pPSName, rName.getStr())) { return static_cast<Paper>(i); diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx index cf73d0961bd6..3be4a9467eb6 100644 --- a/i18npool/source/registerservices/registerservices.cxx +++ b/i18npool/source/registerservices/registerservices.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -405,16 +405,16 @@ static const struct InstancesArray { &InputSequenceChecker_th_CreateInstance }, { "com.sun.star.i18n.InputSequenceChecker_hi", "com.sun.star.i18n.InputSequenceChecker_hi", - &InputSequenceChecker_hi_CreateInstance }, + &InputSequenceChecker_hi_CreateInstance }, { "com.sun.star.i18n.TextConversion", "com.sun.star.i18n.TextConversion", - &TextConversionImpl_CreateInstance }, + &TextConversionImpl_CreateInstance }, { "com.sun.star.i18n.TextConversion_ko", "com.sun.star.i18n.TextConversion_ko", - &TextConversion_ko_CreateInstance }, + &TextConversion_ko_CreateInstance }, { "com.sun.star.i18n.TextConversion_zh", "com.sun.star.i18n.TextConversion_zh", - &TextConversion_zh_CreateInstance }, + &TextConversion_zh_CreateInstance }, { TRLT_SERVICELNAME, TRLT_IMPLNAME , &TransliterationImpl_CreateInstance }, @@ -555,7 +555,7 @@ static const struct InstancesArray { { "com.sun.star.i18n.OrdinalSuffix", "com.sun.star.i18n.OrdinalSuffix", & OrdinalSuffix_CreateInstance }, - + { TRLT_SERVICELNAME_L10N, TRLT_IMPLNAME_PREFIX "FULLWIDTHKATAKANA_HALFWIDTHKATAKANA", &fullwidthKatakanaToHalfwidthKatakana_CreateInstance }, diff --git a/i18npool/source/search/levdis.cxx b/i18npool/source/search/levdis.cxx index 417d4a5fe243..177fe791994a 100644 --- a/i18npool/source/search/levdis.cxx +++ b/i18npool/source/search/levdis.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/search/levdis.hxx b/i18npool/source/search/levdis.hxx index dbae91068cac..d34b7b8c3148 100644 --- a/i18npool/source/search/levdis.hxx +++ b/i18npool/source/search/levdis.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index ecf236f5cdde..bd65bea8c8fd 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -128,7 +128,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep aSrchPara.Locale); } else if( xTranslit.is() ) - xTranslit = 0; + xTranslit = 0; // Create Transliteration for 2<->1, 2<->2 transliteration if ( aSrchPara.transliterateFlags & COMPLEX_TRANS_MASK ) @@ -173,7 +173,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep sSrchStr2 = xTranslit2->transliterateString2String( aSrchPara.searchString, 0, aSrchPara.searchString.getLength()); - // When start or end of search string is a complex script type, we need to + // When start or end of search string is a complex script type, we need to // make sure the result boundary is not located in the middle of cell. checkCTLStart = (xBreak.is() && (xBreak->getScriptType(sSrchStr, 0) == ScriptType::COMPLEX)); @@ -187,7 +187,7 @@ void TextSearch::setOptions( const SearchOptions& rOptions ) throw( RuntimeExcep pRegExp = new Regexpr( aSrchPara, xTranslit ); } - else + else { if ( aSrchPara.algorithmType == SearchAlgorithms_APPROXIMATE ) { @@ -544,7 +544,7 @@ sal_Int32 TextSearch::GetDiff( const sal_Unicode cChr ) const { TextSearchJumpTable *pJump; OUString sSearchKey; - + if ( bUsePrimarySrchStr ) { pJump = pJumpTable; sSearchKey = sSrchStr; diff --git a/i18npool/source/search/textsearch.hxx b/i18npool/source/search/textsearch.hxx index 32b4d2e5af18..32f768282beb 100644 --- a/i18npool/source/search/textsearch.hxx +++ b/i18npool/source/search/textsearch.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -32,7 +32,7 @@ #include <com/sun/star/util/XTextSearch.hpp> #include <com/sun/star/i18n/XBreakIterator.hpp> -#include <cppuhelper/implbase2.hxx> // helper for implementations +#include <cppuhelper/implbase2.hxx> // helper for implementations #include <com/sun/star/i18n/XExtendedTransliteration.hpp> #include <com/sun/star/i18n/XCharacterClassification.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -43,9 +43,9 @@ class Regexpr; class WLevDistance; typedef ::std::map< sal_Unicode, sal_Int32 > TextSearchJumpTable; -// ---------------------------------------------------- -// class SearchClass -// ---------------------------------------------------- +// ---------------------------------------------------- +// class SearchClass +// ---------------------------------------------------- class TextSearch: public cppu::WeakImplHelper2 < ::com::sun::star::util::XTextSearch, @@ -78,7 +78,7 @@ class TextSearch: public cppu::WeakImplHelper2 TextSearchJumpTable* pJumpTable; TextSearchJumpTable* pJumpTable2; bool bIsForwardTab; - bool bUsePrimarySrchStr; + bool bUsePrimarySrchStr; void MakeForwardTab(); void MakeForwardTab2(); void MakeBackwardTab(); @@ -151,7 +151,7 @@ public: throw( ::com::sun::star::uno::RuntimeException ); }; - + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx index 50c9fcffbe32..02e7523c8904 100644 --- a/i18npool/source/textconversion/genconv_dict.cxx +++ b/i18npool/source/textconversion/genconv_dict.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -54,8 +54,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) if (argc < 4) exit(-1); - sfp = fopen(argv[2], "rb"); // open the source file for read; - if (sfp == NULL) + sfp = fopen(argv[2], "rb"); // open the source file for read; + if (sfp == NULL) { printf("Open the dictionary source file failed."); return -1; @@ -132,7 +132,7 @@ void make_hhc_char(FILE *sfp, FILE *cfp) fprintf(cfp, "\nstatic const com::sun::star::i18n::Hangul_Index Hangul2HanjaIndex[] = {\n"); for (i = 0; i < count; i++) - fprintf(cfp, "\t{ 0x%04x, 0x%04x, 0x%02x },\n", + fprintf(cfp, "\t{ 0x%04x, 0x%04x, 0x%02x },\n", Hangul2HanjaData[i][0], Hangul2HanjaData[i][1], Hangul2HanjaData[i][2]); diff --git a/i18npool/source/textconversion/textconversion.cxx b/i18npool/source/textconversion/textconversion.cxx index 0ece5709d1eb..aea9f5534987 100644 --- a/i18npool/source/textconversion/textconversion.cxx +++ b/i18npool/source/textconversion/textconversion.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -61,9 +61,9 @@ static void* nullFunc() } oslGenericFunction SAL_CALL -TextConversion::getFunctionBySymbol(const sal_Char* func) +TextConversion::getFunctionBySymbol(const sal_Char* func) { - if (hModule) + if (hModule) return osl_getFunctionSymbol(hModule, OUString::createFromAscii(func).pData); else return reinterpret_cast< oslGenericFunction >(nullFunc); diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx index 9bc191ac71b5..3a7a1ebd1e63 100644 --- a/i18npool/source/textconversion/textconversionImpl.cxx +++ b/i18npool/source/textconversion/textconversionImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -77,8 +77,8 @@ TextConversionImpl::getConversionWithOffset( const OUString& aText, sal_Int32 nS return xTC->getConversionWithOffset(aText, nStartPos, nLength, rLocale, nConversionType, nConversionOptions, offset); } -sal_Bool SAL_CALL -TextConversionImpl::interactiveConversion( const Locale& rLocale, sal_Int16 nTextConversionType, sal_Int32 nTextConversionOptions ) +sal_Bool SAL_CALL +TextConversionImpl::interactiveConversion( const Locale& rLocale, sal_Int16 nTextConversionType, sal_Int32 nTextConversionOptions ) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { getLocaleSpecificTextConversion(rLocale); @@ -97,7 +97,7 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw aLocale = rLocale; Reference < XInterface > xI; - + xI = xMSF->createInstance( OUString::createFromAscii("com.sun.star.i18n.TextConversion_") + aLocale.Language); @@ -110,7 +110,7 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale) throw OUString::createFromAscii("com.sun.star.i18n.TextConversion_") + aLocale.Language + OUString::createFromAscii("_") + aLocale.Country + OUString::createFromAscii("_") + aLocale.Variant); - + if (xI.is()) xI->queryInterface( getCppuType((const Reference< XTextConversion>*)0) ) >>= xTC; else if (xTC.is()) diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx index 9d5570efd6a2..a3dadea7bba8 100644 --- a/i18npool/source/textconversion/textconversion_ko.cxx +++ b/i18npool/source/textconversion/textconversion_ko.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -47,13 +47,13 @@ using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { #define SCRIPT_OTHERS 0 -#define SCRIPT_HANJA 1 +#define SCRIPT_HANJA 1 #define SCRIPT_HANGUL 2 TextConversion_ko::TextConversion_ko( const Reference < XMultiServiceFactory >& xMSF ) { Reference < XInterface > xI; - + xI = xMSF->createInstance( OUString::createFromAscii("com.sun.star.i18n.ConversionDictionary_ko")); @@ -65,13 +65,13 @@ TextConversion_ko::TextConversion_ko( const Reference < XMultiServiceFactory >& if ( xI.is() ) xI->queryInterface( getCppuType((const Reference< XConversionDictionaryList>*)0) ) >>= xCDL; - + maxLeftLength = maxRightLength = 1; // get maximum length of word in dictionary if (xCDL.is()) { - Locale loc(OUString::createFromAscii("ko"), - OUString::createFromAscii("KR"), + Locale loc(OUString::createFromAscii("ko"), + OUString::createFromAscii("KR"), OUString()); maxLeftLength = xCDL->queryMaxCharCount(loc, ConversionDictionaryType::HANGUL_HANJA, @@ -124,7 +124,7 @@ sal_Int16 SAL_CALL checkScriptType(sal_Unicode c) return (i < scriptListCount && block >= scriptList[i].from) ? scriptList[i].script : SCRIPT_OTHERS; } -Sequence< OUString > SAL_CALL +Sequence< OUString > SAL_CALL TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toHanja) { sal_Unicode ch; @@ -168,7 +168,7 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos if (address != 0xFFFF) newStr->buffer[count++] = address; - else + else break; } if (count > 0) { @@ -253,25 +253,25 @@ TextConversion_ko::getConversions( const OUString& aText, sal_Int32 nStartPos, s if (len > 1) { try { if (xCDL.is()) - result.Candidates = xCDL->queryConversions(aText, start + nStartPos, len, + result.Candidates = xCDL->queryConversions(aText, start + nStartPos, len, aLocale, ConversionDictionaryType::HANGUL_HANJA, eDirection, nConversionOptions); // user dictionary } catch ( NoSupportException & ) { - // clear reference (when there is no user dictionary) in order - // to not always have to catch this exception again + // clear reference (when there is no user dictionary) in order + // to not always have to catch this exception again // in further calls. (save time) xCDL = 0; } catch (...) { - // catch all other exceptions to allow + // catch all other exceptions to allow // querying the system dictionary in the next line } - if (xCD.is() && toHanja) { // System dictionary would not do Hanja_to_Hangul conversion. + if (xCD.is() && toHanja) { // System dictionary would not do Hanja_to_Hangul conversion. candidates = xCD->getConversions(aText, start + nStartPos, len, eDirection, nConversionOptions); result.Candidates += candidates; } } else if (! toHanja) { // do whole word character 2 character conversion for Hanja to Hangul conversion - result.Candidates = getCharConversions(aText, nStartPos + start, length - start, toHanja); + result.Candidates = getCharConversions(aText, nStartPos + start, length - start, toHanja); if (result.Candidates.hasElements()) len = result.Candidates[0].getLength(); } @@ -334,8 +334,8 @@ TextConversion_ko::getConversionWithOffset( const OUString& aText, sal_Int32 nSt return getConversion(aText, nStartPos, nLength, rLocale, nConversionType, nConversionOptions); } -sal_Bool SAL_CALL -TextConversion_ko::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ ) +sal_Bool SAL_CALL +TextConversion_ko::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ ) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { return sal_True; diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx index 71fee17ff342..03c27c428426 100644 --- a/i18npool/source/textconversion/textconversion_zh.cxx +++ b/i18npool/source/textconversion/textconversion_zh.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -68,7 +68,7 @@ sal_Unicode SAL_CALL getOneCharConversion(sal_Unicode ch, const sal_Unicode* Dat } } -OUString SAL_CALL +OUString SAL_CALL TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toSChinese, sal_Int32 nConversionOptions) { const sal_Unicode *Data; @@ -87,12 +87,12 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos, rtl_uString * newStr = x_rtl_uString_new_WithLength( nLength ); // defined in x_rtl_ustring.h for (sal_Int32 i = 0; i < nLength; i++) - newStr->buffer[i] = + newStr->buffer[i] = getOneCharConversion(aText[nStartPos+i], Data, Index); return OUString( newStr->buffer, nLength); } -OUString SAL_CALL +OUString SAL_CALL TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toSChinese, sal_Int32 nConversionOptions, Sequence<sal_Int32>& offset) { sal_Int32 dictLen = 0; @@ -134,23 +134,23 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos, for (; len > 0 && ! found; len--) { OUString word = aText.copy(nStartPos + currPos, len); sal_Int32 current = 0; - // user dictionary + // user dictionary if (xCDL.is()) { Sequence < OUString > conversions; try { - conversions = xCDL->queryConversions(word, 0, len, - aLocale, ConversionDictionaryType::SCHINESE_TCHINESE, + conversions = xCDL->queryConversions(word, 0, len, + aLocale, ConversionDictionaryType::SCHINESE_TCHINESE, /*toSChinese ?*/ ConversionDirection_FROM_LEFT /*: ConversionDirection_FROM_RIGHT*/, - nConversionOptions); + nConversionOptions); } catch ( NoSupportException & ) { - // clear reference (when there is no user dictionary) in order - // to not always have to catch this exception again + // clear reference (when there is no user dictionary) in order + // to not always have to catch this exception again // in further calls. (save time) xCDL = 0; } catch (...) { - // catch all other exceptions to allow + // catch all other exceptions to allow // querying the system dictionary in the next line } if (conversions.getLength() > 0) { @@ -158,7 +158,7 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos, if (word.getLength() != conversions[0].getLength()) one2one=sal_False; while (current < conversions[0].getLength()) { - offset[count] = nStartPos + currPos + (current * + offset[count] = nStartPos + currPos + (current * word.getLength() / conversions[0].getLength()); newStr->buffer[count++] = conversions[0][current++]; } @@ -242,7 +242,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.equalsAscii("zh") && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { @@ -251,13 +251,13 @@ TextConversion_zh::getConversion( const OUString& aText, sal_Int32 nStartPos, sa if (nConversionOptions & TextConversionOption::CHARACTER_BY_CHARACTER) // char to char dictionary - return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions); + return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions); else { Sequence <sal_Int32> offset; // word to word dictionary return getWordConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions, offset); } - } else + } else throw NoSupportException(); // Conversion type is not supported in this service. } @@ -266,7 +266,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.equalsAscii("zh") && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { @@ -276,19 +276,19 @@ TextConversion_zh::getConversionWithOffset( const OUString& aText, sal_Int32 nSt if (nConversionOptions & TextConversionOption::CHARACTER_BY_CHARACTER) { offset.realloc(0); // char to char dictionary - return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions); + return getCharConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions); } else { if (offset.getLength() < 2*nLength) offset.realloc(2*nLength); // word to word dictionary return getWordConversion(aText, nStartPos, nLength, toSChinese, nConversionOptions, offset); } - } else + } else throw NoSupportException(); // Conversion type is not supported in this service. } -sal_Bool SAL_CALL -TextConversion_zh::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ ) +sal_Bool SAL_CALL +TextConversion_zh::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ ) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { return sal_False; diff --git a/i18npool/source/transliteration/chartonum.cxx b/i18npool/source/transliteration/chartonum.cxx index 714c9da825e7..38580270355b 100644 --- a/i18npool/source/transliteration/chartonum.cxx +++ b/i18npool/source/transliteration/chartonum.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/data/numberchar.h b/i18npool/source/transliteration/data/numberchar.h index 73268c71a065..b71cb5dd9d0d 100644 --- a/i18npool/source/transliteration/data/numberchar.h +++ b/i18npool/source/transliteration/data/numberchar.h @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,24 +30,24 @@ namespace com { namespace sun { namespace star { namespace i18n { -static const sal_Int16 NumberChar_HalfWidth = 0; -static const sal_Int16 NumberChar_FullWidth = 1; -static const sal_Int16 NumberChar_Lower_zh = 2; -static const sal_Int16 NumberChar_Upper_zh = 3; -static const sal_Int16 NumberChar_Upper_zh_TW = 4; -static const sal_Int16 NumberChar_Modern_ja = 5; +static const sal_Int16 NumberChar_HalfWidth = 0; +static const sal_Int16 NumberChar_FullWidth = 1; +static const sal_Int16 NumberChar_Lower_zh = 2; +static const sal_Int16 NumberChar_Upper_zh = 3; +static const sal_Int16 NumberChar_Upper_zh_TW = 4; +static const sal_Int16 NumberChar_Modern_ja = 5; static const sal_Int16 NumberChar_Traditional_ja= 6; -static const sal_Int16 NumberChar_Lower_ko = 7; -static const sal_Int16 NumberChar_Upper_ko = 8; -static const sal_Int16 NumberChar_Hangul_ko = 9; -static const sal_Int16 NumberChar_Indic_ar = 10; +static const sal_Int16 NumberChar_Lower_ko = 7; +static const sal_Int16 NumberChar_Upper_ko = 8; +static const sal_Int16 NumberChar_Hangul_ko = 9; +static const sal_Int16 NumberChar_Indic_ar = 10; static const sal_Int16 NumberChar_EastIndic_ar = 11; -static const sal_Int16 NumberChar_Indic_hi = 12; -static const sal_Int16 NumberChar_th = 13; -static const sal_Int16 NumberChar_Count = 14; +static const sal_Int16 NumberChar_Indic_hi = 12; +static const sal_Int16 NumberChar_th = 13; +static const sal_Int16 NumberChar_Count = 14; static const sal_Unicode NumberChar[][10] = { -// 0 1 2 3 4 5 6 7 8 9 +// 0 1 2 3 4 5 6 7 8 9 { 0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039 }, // Half Width (Ascii) { 0xFF10, 0xFF11, 0xFF12, 0xFF13, 0xFF14, 0xFF15, 0xFF16, 0xFF17, 0xFF18, 0xFF19 }, // Full Width { 0x3007, 0x4E00, 0x4E8c, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D }, // Chinese Lower @@ -64,28 +64,28 @@ static const sal_Unicode NumberChar[][10] = { { 0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59 } // Thai }; -#define NUMBER_ZERO NumberChar[NumberChar_HalfWidth][0] // 0x0030 -#define NUMBER_ONE NumberChar[NumberChar_HalfWidth][1] // 0x0031 -#define NUMBER_NINE NumberChar[NumberChar_HalfWidth][9] // 0x0039 +#define NUMBER_ZERO NumberChar[NumberChar_HalfWidth][0] // 0x0030 +#define NUMBER_ONE NumberChar[NumberChar_HalfWidth][1] // 0x0031 +#define NUMBER_NINE NumberChar[NumberChar_HalfWidth][9] // 0x0039 #define NUMBER_DECIMAL DecimalChar[0] -#define NUMBER_MINUS MinusChar[0] -#define isNumber(n) ( NUMBER_ZERO <= n && n <= NUMBER_NINE ) -#define isDecimal(n) ( n == NUMBER_DECIMAL ) -#define isMinus(n) ( n == NUMBER_MINUS ) +#define NUMBER_MINUS MinusChar[0] +#define isNumber(n) ( NUMBER_ZERO <= n && n <= NUMBER_NINE ) +#define isDecimal(n) ( n == NUMBER_DECIMAL ) +#define isMinus(n) ( n == NUMBER_MINUS ) -const sal_Int16 Multiplier_Lower_zh = 0; -const sal_Int16 Multiplier_Upper_zh = 1; -const sal_Int16 Multiplier_Lower_zh_TW = 2; -const sal_Int16 Multiplier_Upper_zh_TW = 3; -const sal_Int16 Multiplier_Hangul_ko = 4; -const sal_Int16 Multiplier_Modern_ja = 5; +const sal_Int16 Multiplier_Lower_zh = 0; +const sal_Int16 Multiplier_Upper_zh = 1; +const sal_Int16 Multiplier_Lower_zh_TW = 2; +const sal_Int16 Multiplier_Upper_zh_TW = 3; +const sal_Int16 Multiplier_Hangul_ko = 4; +const sal_Int16 Multiplier_Modern_ja = 5; const sal_Int16 Multiplier_Traditional_ja = 6; -const sal_Int16 Multiplier_Count = 7; +const sal_Int16 Multiplier_Count = 7; -const sal_Int16 ExponentCount_CJK = 6; +const sal_Int16 ExponentCount_CJK = 6; -const sal_Int16 ExponentCount_short_CJK = 2; +const sal_Int16 ExponentCount_short_CJK = 2; } } } } diff --git a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx index c7c2fa74e9d6..9169e0682150 100644 --- a/i18npool/source/transliteration/fullwidthToHalfwidth.cxx +++ b/i18npool/source/transliteration/fullwidthToHalfwidth.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ fullwidthToHalfwidth::fullwidthToHalfwidth() * The output is a reference of OUString. You MUST delete this object when you do not need to use it any more * The output string contains a transliterated string only, not whole string. */ -OUString SAL_CALL +OUString SAL_CALL fullwidthToHalfwidth::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -71,7 +71,7 @@ fullwidthToHalfwidth::transliterate( const OUString& inStr, sal_Int32 startPos, return tmp; } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL fullwidthToHalfwidth::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { @@ -92,7 +92,7 @@ fullwidthKatakanaToHalfwidthKatakana::fullwidthKatakanaToHalfwidthKatakana() /** * Transliterate fullwidth katakana to halfwidth katakana. */ -OUString SAL_CALL +OUString SAL_CALL fullwidthKatakanaToHalfwidthKatakana::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -106,7 +106,7 @@ fullwidthKatakanaToHalfwidthKatakana::transliterate( const OUString& inStr, sal_ return tmp; } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL fullwidthKatakanaToHalfwidthKatakana::transliterateChar2Char( sal_Unicode inChar ) throw(RuntimeException, MultipleCharsOutputException) { @@ -127,7 +127,7 @@ fullwidthToHalfwidthLikeASC::fullwidthToHalfwidthLikeASC() /** * Transliterate fullwidth to halfwidth like Excel's ASC function. */ -OUString SAL_CALL +OUString SAL_CALL fullwidthToHalfwidthLikeASC::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -142,7 +142,7 @@ fullwidthToHalfwidthLikeASC::transliterate( const OUString& inStr, sal_Int32 sta return tmp; } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL fullwidthToHalfwidthLikeASC::transliterateChar2Char( sal_Unicode inChar ) throw(RuntimeException, MultipleCharsOutputException) { diff --git a/i18npool/source/transliteration/halfwidthToFullwidth.cxx b/i18npool/source/transliteration/halfwidthToFullwidth.cxx index 8709ce01c723..d8a3c711b190 100644 --- a/i18npool/source/transliteration/halfwidthToFullwidth.cxx +++ b/i18npool/source/transliteration/halfwidthToFullwidth.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -52,7 +52,7 @@ halfwidthToFullwidth::halfwidthToFullwidth() implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTH_FULLWIDTH"; } -OUString SAL_CALL +OUString SAL_CALL halfwidthToFullwidth::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -66,7 +66,7 @@ halfwidthToFullwidth::transliterate( const OUString& inStr, sal_Int32 startPos, return widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), offset, _useOffset ); } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL halfwidthToFullwidth::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { @@ -82,7 +82,7 @@ halfwidthKatakanaToFullwidthKatakana::halfwidthKatakanaToFullwidthKatakana() implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTHKATAKANA_FULLWIDTHKATAKANA"; } -OUString SAL_CALL +OUString SAL_CALL halfwidthKatakanaToFullwidthKatakana::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -96,7 +96,7 @@ halfwidthKatakanaToFullwidthKatakana::transliterate( const OUString& inStr, sal_ return widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), offset, _useOffset ); } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL halfwidthKatakanaToFullwidthKatakana::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { @@ -112,7 +112,7 @@ halfwidthToFullwidthLikeJIS::halfwidthToFullwidthLikeJIS() implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTH_FULLWIDTH_LIKE_JIS"; } -OUString SAL_CALL +OUString SAL_CALL halfwidthToFullwidthLikeJIS::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -126,7 +126,7 @@ halfwidthToFullwidthLikeJIS::transliterate( const OUString& inStr, sal_Int32 sta return widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), offset, _useOffset, WIDTHFOLDNIG_DONT_USE_COMBINED_VU ); } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL halfwidthToFullwidthLikeJIS::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { diff --git a/i18npool/source/transliteration/hiraganaToKatakana.cxx b/i18npool/source/transliteration/hiraganaToKatakana.cxx index 3dcba485a452..d1461297fffb 100644 --- a/i18npool/source/transliteration/hiraganaToKatakana.cxx +++ b/i18npool/source/transliteration/hiraganaToKatakana.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx b/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx index 818701f89c69..77cd1fadedc6 100644 --- a/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreBaFa_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx b/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx index 87ec53cc0f35..bdc8b714288b 100644 --- a/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreHyuByu_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx index 7789c0e021f5..7327efa60239 100644 --- a/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -42,7 +42,7 @@ using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { -OneToOneMappingTable_t IandE[] = { +OneToOneMappingTable_t IandE[] = { MAKE_PAIR( 0x30A3, 0x0000 ), // KATAKANA LETTER SMALL I MAKE_PAIR( 0x30A4, 0x0000 ), // KATAKANA LETTER I MAKE_PAIR( 0x30A7, 0x0000 ), // KATAKANA LETTER SMALL E @@ -81,13 +81,13 @@ OneToOneMappingTable_t IandE[] = { -OUString SAL_CALL +OUString SAL_CALL ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -100,7 +100,7 @@ ignoreIandEfollowedByYa_ja_JP::folding( const OUString& inStr, sal_Int32 startPo position = startPos; } - // + // sal_Unicode previousChar = *src ++; sal_Unicode currentChar; diff --git a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx index a424d9c2f4ae..3228af2710fc 100644 --- a/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -94,7 +94,7 @@ OneToOneMappingTable_t ignoreIterationMark_ja_JP_mappingTable[] = { }; -OUString SAL_CALL +OUString SAL_CALL ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -102,7 +102,7 @@ ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, s // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -115,7 +115,7 @@ ignoreIterationMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, s position = startPos; } - // + // sal_Unicode previousChar = *src ++; sal_Unicode currentChar; diff --git a/i18npool/source/transliteration/ignoreKana.cxx b/i18npool/source/transliteration/ignoreKana.cxx index c95592b45fea..d627e659ba2c 100644 --- a/i18npool/source/transliteration/ignoreKana.cxx +++ b/i18npool/source/transliteration/ignoreKana.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx index 30f797f62e19..74cb499b7d8d 100644 --- a/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -41,13 +41,13 @@ using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { -OUString SAL_CALL +OUString SAL_CALL ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -60,7 +60,7 @@ ignoreKiKuFollowedBySa_ja_JP::folding( const OUString& inStr, sal_Int32 startPos position = startPos; } - // + // sal_Unicode previousChar = *src ++; sal_Unicode currentChar; diff --git a/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx b/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx index a8f16647aed8..32a22790fc9c 100644 --- a/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreMiddleDot_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -sal_Unicode +sal_Unicode ignoreMiddleDot_ja_JP_translator (const sal_Unicode c) { switch (c) { diff --git a/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx b/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx index 730e111f469c..503f0b77e468 100644 --- a/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreMinusSign_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -sal_Unicode +sal_Unicode ignoreMinusSign_ja_JP_translator (const sal_Unicode c) { switch (c) { diff --git a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx index 12b5ef9b2ff1..be9ff9bc6c5a 100644 --- a/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -233,7 +233,7 @@ static sal_Unicode table_normalwidth[] = { // 0x0000, // 0x30fc KATAKANA-HIRAGANA PROLONGED SOUND MARK // 0x0000, // 0x30fd KATAKANA ITERATION MARK // 0x0000, // 0x30fe KATAKANA VOICED ITERATION MARK - // 0x0000 // 0x30ff + // 0x0000 // 0x30ff }; static sal_Unicode table_halfwidth[] = { @@ -303,13 +303,13 @@ static sal_Unicode table_halfwidth[] = { }; -OUString SAL_CALL +OUString SAL_CALL ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -323,7 +323,7 @@ ignoreProlongedSoundMark_ja_JP::folding( const OUString& inStr, sal_Int32 startP position = startPos; } - // + // sal_Unicode previousChar = *src ++; sal_Unicode currentChar; diff --git a/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx b/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx index 09a514140dbf..27e4fa4188df 100644 --- a/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSeZe_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx b/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx index 3534cd1aa3d0..e80b75059e17 100644 --- a/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSeparator_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -OneToOneMappingTable_t ignoreSeparatorTable[] = { +OneToOneMappingTable_t ignoreSeparatorTable[] = { MAKE_PAIR( 0x0021, 0xFFFF ), // EXCLAMATION MARK MAKE_PAIR( 0x0023, 0xFFFF ), // NUMBER SIGN MAKE_PAIR( 0x0024, 0xFFFF ), // DOLLAR SIGN @@ -85,7 +85,7 @@ OneToOneMappingTable_t ignoreSeparatorTable[] = { MAKE_PAIR( 0x301D, 0xFFFF ), // REVERSED DOUBLE PRIME MAKE_PAIR( 0x301E, 0xFFFF ), // DOUBLE PRIME QUOTATION MARK MAKE_PAIR( 0x301F, 0xFFFF ), // LOW DOUBLE PRIME QUOTATION MARK - MAKE_PAIR( 0x3030, 0xFFFF ), // WAVY DASH + MAKE_PAIR( 0x3030, 0xFFFF ), // WAVY DASH MAKE_PAIR( 0x30FB, 0xFFFF ), // KATAKANA MIDDLE DOT MAKE_PAIR( 0x30FC, 0xFFFF ), // KATAKANA-HIRAHANA PROLONGED SOUND MARK MAKE_PAIR( 0xFF01, 0xFFFF ), // FULLWIDTH EXCLAMATION MARK diff --git a/i18npool/source/transliteration/ignoreSize_ja_JP.cxx b/i18npool/source/transliteration/ignoreSize_ja_JP.cxx index 07e15cdd4302..d72f03ffeed6 100644 --- a/i18npool/source/transliteration/ignoreSize_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSize_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -44,7 +44,7 @@ using namespace rtl; namespace com { namespace sun { namespace star { namespace i18n { -OUString SAL_CALL +OUString SAL_CALL ignoreSize_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -53,7 +53,7 @@ ignoreSize_ja_JP::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 } -Sequence< OUString > SAL_CALL +Sequence< OUString > SAL_CALL ignoreSize_ja_JP::transliterateRange( const OUString& str1, const OUString& str2 ) throw(RuntimeException) { diff --git a/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx b/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx index daffa27a0f1c..471066395be5 100644 --- a/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreSpace_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx b/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx index 19d62ab52b3a..449568f6a8f2 100644 --- a/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTiJi_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx b/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx index 3bf328d688e0..fe6edbb382c2 100644 --- a/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTraditionalKana_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -sal_Unicode +sal_Unicode ignoreTraditionalKana_ja_JP_translator (const sal_Unicode c) { diff --git a/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx b/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx index 2bd2e7cd6ea7..677de601f9c7 100644 --- a/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreTraditionalKanji_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreWidth.cxx b/i18npool/source/transliteration/ignoreWidth.cxx index deca2164584f..cf75e444ad97 100644 --- a/i18npool/source/transliteration/ignoreWidth.cxx +++ b/i18npool/source/transliteration/ignoreWidth.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx b/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx index 5b833041478d..b96b3db2a734 100644 --- a/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx +++ b/i18npool/source/transliteration/ignoreZiZu_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -37,7 +37,7 @@ namespace com { namespace sun { namespace star { namespace i18n { -sal_Unicode +sal_Unicode ignoreZiZu_ja_JP_translator (const sal_Unicode c) { diff --git a/i18npool/source/transliteration/katakanaToHiragana.cxx b/i18npool/source/transliteration/katakanaToHiragana.cxx index 9dbbc8eed6b3..01325655d93f 100644 --- a/i18npool/source/transliteration/katakanaToHiragana.cxx +++ b/i18npool/source/transliteration/katakanaToHiragana.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/largeToSmall_ja_JP.cxx b/i18npool/source/transliteration/largeToSmall_ja_JP.cxx index b2c86f1cb043..ccc64cb583f4 100644 --- a/i18npool/source/transliteration/largeToSmall_ja_JP.cxx +++ b/i18npool/source/transliteration/largeToSmall_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,9 +46,9 @@ namespace com { namespace sun { namespace star { namespace i18n { // ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html // http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F) // http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) -// http://charts.unicode.org/Web/UFF00.html +// http://charts.unicode.org/Web/UFF00.html -OneToOneMappingTable_t large2small[] = { +OneToOneMappingTable_t large2small[] = { MAKE_PAIR( 0x3041, 0x3042 ), // HIRAGANA LETTER SMALL A --> HIRAGANA LETTER A MAKE_PAIR( 0x3043, 0x3044 ), // HIRAGANA LETTER SMALL I --> HIRAGANA LETTER I MAKE_PAIR( 0x3045, 0x3046 ), // HIRAGANA LETTER SMALL U --> HIRAGANA LETTER U diff --git a/i18npool/source/transliteration/numtochar.cxx b/i18npool/source/transliteration/numtochar.cxx index 5772ac0de763..d8ca51e5dae2 100644 --- a/i18npool/source/transliteration/numtochar.cxx +++ b/i18npool/source/transliteration/numtochar.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/numtotext_cjk.cxx b/i18npool/source/transliteration/numtotext_cjk.cxx index 06965b1835f7..fab5478efffb 100644 --- a/i18npool/source/transliteration/numtotext_cjk.cxx +++ b/i18npool/source/transliteration/numtotext_cjk.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/smallToLarge_ja_JP.cxx b/i18npool/source/transliteration/smallToLarge_ja_JP.cxx index ba6735c8db2c..6c4da6a3aa2c 100644 --- a/i18npool/source/transliteration/smallToLarge_ja_JP.cxx +++ b/i18npool/source/transliteration/smallToLarge_ja_JP.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,9 +46,9 @@ namespace com { namespace sun { namespace star { namespace i18n { // ftp://ftp.unicode.org/Public/3.0-Update/UnicodeData-3.0.0.html // http://charts.unicode.org/Web/U3040.html Hiragana (U+3040..U+309F) // http://charts.unicode.org/Web/U30A0.html Katakana (U+30A0..U+30FF) -// http://charts.unicode.org/Web/UFF00.html +// http://charts.unicode.org/Web/UFF00.html -OneToOneMappingTable_t small2large[] = { +OneToOneMappingTable_t small2large[] = { MAKE_PAIR( 0x3041, 0x3042 ), // HIRAGANA LETTER SMALL A --> HIRAGANA LETTER A MAKE_PAIR( 0x3043, 0x3044 ), // HIRAGANA LETTER SMALL I --> HIRAGANA LETTER I MAKE_PAIR( 0x3045, 0x3046 ), // HIRAGANA LETTER SMALL U --> HIRAGANA LETTER U diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx index 8444f4dd79d8..3f68df5c2518 100644 --- a/i18npool/source/transliteration/textToPronounce_zh.cxx +++ b/i18npool/source/transliteration/textToPronounce_zh.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -103,7 +103,7 @@ TextToPronounce_zh::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeExc sal_Bool SAL_CALL TextToPronounce_zh::equals( const OUString & str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32 & nMatch1, const OUString & str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32 & nMatch2) - throw (RuntimeException) + throw (RuntimeException) { sal_Int32 realCount; int i; // loop variable diff --git a/i18npool/source/transliteration/texttonum.cxx b/i18npool/source/transliteration/texttonum.cxx index 6dfdfbd0ccf3..cbf22c42567a 100644 --- a/i18npool/source/transliteration/texttonum.cxx +++ b/i18npool/source/transliteration/texttonum.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/i18npool/source/transliteration/transliterationImpl.cxx b/i18npool/source/transliteration/transliterationImpl.cxx index 2209ef9eb68b..3e1456628b90 100644 --- a/i18npool/source/transliteration/transliterationImpl.cxx +++ b/i18npool/source/transliteration/transliterationImpl.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -205,7 +205,7 @@ TransliterationImpl::loadModule( TransliterationModules modType, const Locale& r #define TransliterationModules_IGNORE_CASE_MASK (TransliterationModules_IGNORE_CASE | \ TransliterationModules_IGNORE_WIDTH | \ TransliterationModules_IGNORE_KANA) - sal_Int32 mask = ((modType&TransliterationModules_IGNORE_CASE_MASK) == modType) ? + sal_Int32 mask = ((modType&TransliterationModules_IGNORE_CASE_MASK) == modType) ? TransliterationModules_IGNORE_CASE_MASK : TransliterationModules_IGNORE_MASK; for (sal_Int16 i = 0; TMlist[i].tm & mask; i++) { if (modType & TMlist[i].tm) @@ -236,9 +236,9 @@ TransliterationImpl::loadModuleNew( const Sequence < TransliterationModulesNew > for (sal_Int16 j = 0; TMlist[j].tmn; j++) { if (TMlist[j].tmn == modType[i]) { if (mask == 0) - mask = TMlist[i].tm && (TMlist[i].tm&TransliterationModules_IGNORE_MASK) ? + mask = TMlist[i].tm && (TMlist[i].tm&TransliterationModules_IGNORE_MASK) ? TransliterationModules_IGNORE_MASK : TransliterationModules_NON_IGNORE_MASK; - else if (mask == TransliterationModules_IGNORE_MASK && + else if (mask == TransliterationModules_IGNORE_MASK && (TMlist[i].tm&TransliterationModules_IGNORE_MASK) == 0) throw ERROR; // could not mess up ignore trans. with non_ignore trans. if (loadModuleByName(OUString::createFromAscii(TMlist[j].implName), bodyCascade[numCascade], rLocale)) @@ -293,7 +293,7 @@ TransliterationImpl::getAvailableModules( const Locale& rLocale, sal_Int16 sType OUString SAL_CALL -TransliterationImpl::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, +TransliterationImpl::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { if (numCascade == 0) @@ -478,7 +478,7 @@ TransliterationImpl::equals( const sal_Unicode *p1 = tmpStr1.getStr(); const sal_Unicode *p2 = tmpStr2.getStr(); - sal_Int32 i, nLen = (tmpStr1.getLength() < tmpStr1.getLength() ? + sal_Int32 i, nLen = (tmpStr1.getLength() < tmpStr1.getLength() ? tmpStr1.getLength() : tmpStr2.getLength()); for (i = 0; i < nLen; ++i, ++p1, ++p2 ) { if (*p1 != *p2) { @@ -489,7 +489,7 @@ TransliterationImpl::equals( } } // i==nLen - if ( tmpStr1.getLength() != tmpStr2.getLength() ) { + if ( tmpStr1.getLength() != tmpStr2.getLength() ) { // return number of matched code points so far nMatch1 = offset1[i-1] + 1; nMatch2 = offset2[i-1] + 1; @@ -590,7 +590,7 @@ TransliterationImpl::clear() caseignoreOnly = sal_True; } -void TransliterationImpl::loadBody( OUString &implName, Reference<XExtendedTransliteration>& body ) +void TransliterationImpl::loadBody( OUString &implName, Reference<XExtendedTransliteration>& body ) throw (RuntimeException) { ::osl::MutexGuard guard(lastTransBody.mutex); @@ -631,7 +631,7 @@ void TransliterationImpl::loadBody( OUString &implName, Reference<XExtendedTrans } sal_Bool SAL_CALL -TransliterationImpl::loadModuleByName( const OUString& implName, +TransliterationImpl::loadModuleByName( const OUString& implName, Reference<XExtendedTransliteration>& body, const Locale& rLocale) throw(RuntimeException) { OUString cname = OUString::createFromAscii(TRLT_IMPLNAME_PREFIX) + implName; diff --git a/i18npool/source/transliteration/transliteration_Ignore.cxx b/i18npool/source/transliteration/transliteration_Ignore.cxx index 253979a804cf..070cd1072c2f 100644 --- a/i18npool/source/transliteration/transliteration_Ignore.cxx +++ b/i18npool/source/transliteration/transliteration_Ignore.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -104,7 +104,7 @@ transliteration_Ignore::transliterate( const OUString& inStr, sal_Int32 startPos } Sequence< OUString > SAL_CALL -transliteration_Ignore::transliterateRange( const OUString& str1, const OUString& str2, +transliteration_Ignore::transliterateRange( const OUString& str1, const OUString& str2, XTransliteration& t1, XTransliteration& t2 ) throw(RuntimeException) { if (str1.getLength() < 1 || str2.getLength() < 1) @@ -131,14 +131,14 @@ transliteration_Ignore::transliterateRange( const OUString& str1, const OUString return r; } -OUString SAL_CALL -transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos, - sal_Int32 nCount, Sequence< sal_Int32 >& offset) +OUString SAL_CALL +transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos, + sal_Int32 nCount, Sequence< sal_Int32 >& offset) throw(RuntimeException) { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -212,7 +212,7 @@ transliteration_Ignore::folding( const OUString& inStr, sal_Int32 startPos, return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL transliteration_Ignore::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { return func ? func( inChar) : table ? (*table)[ inChar ] : inChar; diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index ead3335d7bf1..294e73581857 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ transliteration_Numeric::equals( const OUString& /*str1*/, sal_Int32 /*pos1*/, s throw (new RuntimeException()); } -Sequence< OUString > SAL_CALL +Sequence< OUString > SAL_CALL transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ ) throw(RuntimeException) { @@ -68,7 +68,7 @@ transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUS #define isNumber(c) ((c) >= 0x30 && (c) <= 0x39) #define NUMBER_ZERO 0x30 -OUString SAL_CALL +OUString SAL_CALL transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -122,7 +122,7 @@ transliteration_Numeric::transliterateBullet( const OUString& inStr, sal_Int32 s return OUString( pStr, SAL_NO_ACQUIRE ); } -OUString SAL_CALL +OUString SAL_CALL transliteration_Numeric::transliterate( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { @@ -132,7 +132,7 @@ transliteration_Numeric::transliterate( const OUString& inStr, sal_Int32 startPo return NativeNumberSupplier(useOffset).getNativeNumberString( inStr.copy(startPos, nCount), aLocale, nNativeNumberMode, offset ); } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) throw(RuntimeException, MultipleCharsOutputException) { if (tableSize) { diff --git a/i18npool/source/transliteration/transliteration_OneToOne.cxx b/i18npool/source/transliteration/transliteration_OneToOne.cxx index 76292fc3834e..68709d3aef68 100644 --- a/i18npool/source/transliteration/transliteration_OneToOne.cxx +++ b/i18npool/source/transliteration/transliteration_OneToOne.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -46,35 +46,35 @@ sal_Int16 SAL_CALL transliteration_OneToOne::getType() throw(RuntimeException) } OUString SAL_CALL -transliteration_OneToOne::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, +transliteration_OneToOne::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, sal_Int32 /*nCount*/, Sequence< sal_Int32 >& /*offset*/) throw(RuntimeException) { throw RuntimeException(); } sal_Bool SAL_CALL -transliteration_OneToOne::equals( const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, +transliteration_OneToOne::equals( const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, sal_Int32& /*nMatch1*/, const OUString& /*str2*/, sal_Int32 /*pos2*/, sal_Int32 /*nCount2*/, sal_Int32& /*nMatch2*/ ) throw(RuntimeException) { throw RuntimeException(); } -Sequence< OUString > SAL_CALL -transliteration_OneToOne::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ ) +Sequence< OUString > SAL_CALL +transliteration_OneToOne::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ ) throw(RuntimeException) { throw RuntimeException(); } -OUString SAL_CALL -transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startPos, - sal_Int32 nCount, Sequence< sal_Int32 >& offset) +OUString SAL_CALL +transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startPos, + sal_Int32 nCount, Sequence< sal_Int32 >& offset) throw(RuntimeException) { // Create a string buffer which can hold nCount + 1 characters. // The reference count is 0 now. - rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h + rtl_uString * newStr = x_rtl_uString_new_WithLength( nCount ); // defined in x_rtl_ustring.h sal_Unicode * dst = newStr->buffer; const sal_Unicode * src = inStr.getStr() + startPos; @@ -99,7 +99,7 @@ transliteration_OneToOne::transliterate( const OUString& inStr, sal_Int32 startP return OUString( newStr ); // defined in rtl/usrting. The reference count is increased from 0 to 1. } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL transliteration_OneToOne::transliterateChar2Char( sal_Unicode inChar) throw(RuntimeException, MultipleCharsOutputException) { return func ? func( inChar) : (*table)[ inChar ]; diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index 27c66866eb9d..491932d114b0 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -73,8 +73,8 @@ sal_Bool SAL_CALL Transliteration_body::equals( throw RuntimeException(); } -Sequence< OUString > SAL_CALL -Transliteration_body::transliterateRange( const OUString& str1, const OUString& str2 ) +Sequence< OUString > SAL_CALL +Transliteration_body::transliterateRange( const OUString& str1, const OUString& str2 ) throw( RuntimeException) { Sequence< OUString > ostr(2); @@ -96,7 +96,7 @@ static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Un const sal_Int16 nType = unicode::getUnicodeType( cChar ); if (nType & 0x02 /* lower case*/) nRes = MappingTypeLowerToUpper; - else + else { // should also work properly for non-upper characters like white spacs, numbers, ... nRes = MappingTypeUpperToLower; @@ -107,10 +107,10 @@ static sal_uInt8 lcl_getMappingTypeForToggleCase( sal_uInt8 nMappingType, sal_Un } -OUString SAL_CALL -Transliteration_body::transliterate( - const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >& offset) +OUString SAL_CALL +Transliteration_body::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& offset) throw(RuntimeException) { @@ -197,7 +197,7 @@ Transliteration_body::transliterate( } } -OUString SAL_CALL +OUString SAL_CALL Transliteration_body::transliterateChar2String( sal_Unicode inChar ) throw(RuntimeException) { const Mapping &map = casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType); @@ -212,7 +212,7 @@ Transliteration_body::transliterateChar2String( sal_Unicode inChar ) throw(Runti return OUString( pStr, SAL_NO_ACQUIRE ); } -sal_Unicode SAL_CALL +sal_Unicode SAL_CALL Transliteration_body::transliterateChar2Char( sal_Unicode inChar ) throw(MultipleCharsOutputException, RuntimeException) { const Mapping &map = casefolding::getValue(&inChar, 0, 1, aLocale, nMappingType); @@ -222,7 +222,7 @@ Transliteration_body::transliterateChar2Char( sal_Unicode inChar ) throw(Multipl } OUString SAL_CALL -Transliteration_body::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, +Transliteration_body::folding( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset) throw(RuntimeException) { return this->transliterate(inStr, startPos, nCount, offset); @@ -275,9 +275,9 @@ Transliteration_titlecase::Transliteration_titlecase() } static rtl::OUString transliterate_titlecase_Impl( - const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, const Locale &rLocale, - Sequence< sal_Int32 >& offset ) + Sequence< sal_Int32 >& offset ) throw(RuntimeException) { const OUString aText( inStr.copy( startPos, nCount ) ); @@ -288,7 +288,7 @@ static rtl::OUString transliterate_titlecase_Impl( Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory(); CharacterClassificationImpl aCharClassImpl( xMSF ); - // because aCharClassImpl.toTitle does not handle ligatures or ß but will raise + // because aCharClassImpl.toTitle does not handle ligatures or ß but will raise // an exception we need to handle the first chara manually... // we don't want to change surrogates by accident, thuse we use proper code point iteration @@ -329,9 +329,9 @@ static rtl::OUString transliterate_titlecase_Impl( // this function expects to be called on a word-by-word basis, // namely that startPos points to the first char of the word -rtl::OUString SAL_CALL Transliteration_titlecase::transliterate( - const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, - Sequence< sal_Int32 >& offset ) +rtl::OUString SAL_CALL Transliteration_titlecase::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, + Sequence< sal_Int32 >& offset ) throw(RuntimeException) { return transliterate_titlecase_Impl( inStr, startPos, nCount, aLocale, offset ); @@ -348,8 +348,8 @@ Transliteration_sentencecase::Transliteration_sentencecase() // this function expects to be called on a sentence-by-sentence basis, // namely that startPos points to the first word (NOT first char!) in the sentence -rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( - const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, +rtl::OUString SAL_CALL Transliteration_sentencecase::transliterate( + const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >& offset ) throw(RuntimeException) { diff --git a/i18npool/source/transliteration/transliteration_caseignore.cxx b/i18npool/source/transliteration/transliteration_caseignore.cxx index 3d2432c617f6..29e3364e33da 100644 --- a/i18npool/source/transliteration/transliteration_caseignore.cxx +++ b/i18npool/source/transliteration/transliteration_caseignore.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -50,7 +50,7 @@ Transliteration_caseignore::Transliteration_caseignore() implementationName = "com.sun.star.i18n.Transliteration.Transliteration_caseignore"; } -void SAL_CALL +void SAL_CALL Transliteration_caseignore::loadModule( TransliterationModules modName, const Locale& rLocale ) throw(RuntimeException) { @@ -66,7 +66,7 @@ sal_Int16 SAL_CALL Transliteration_caseignore::getType() throw(RuntimeException) Sequence< OUString > SAL_CALL -Transliteration_caseignore::transliterateRange( const OUString& str1, const OUString& str2 ) +Transliteration_caseignore::transliterateRange( const OUString& str1, const OUString& str2 ) throw( RuntimeException) { if (str1.getLength() != 1 || str2.getLength() != 1) diff --git a/i18npool/source/transliteration/transliteration_commonclass.cxx b/i18npool/source/transliteration/transliteration_commonclass.cxx index e9b75bfcffa4..4dd5cf452f0a 100644 --- a/i18npool/source/transliteration/transliteration_commonclass.cxx +++ b/i18npool/source/transliteration/transliteration_commonclass.cxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,7 @@ void SAL_CALL transliteration_commonclass::loadModule( TransliterationModules /* } -void SAL_CALL +void SAL_CALL transliteration_commonclass::loadModuleNew( const Sequence < TransliterationModulesNew >& /*modName*/, const Locale& /*rLocale*/ ) throw(RuntimeException) { @@ -72,14 +72,14 @@ transliteration_commonclass::loadModuleByImplName( const OUString& /*implName*/, throw RuntimeException(); } -void SAL_CALL +void SAL_CALL transliteration_commonclass::loadModulesByImplNames(const Sequence< OUString >& /*modNamelist*/, const Locale& /*rLocale*/) throw(RuntimeException) { throw RuntimeException(); } -Sequence< OUString > SAL_CALL +Sequence< OUString > SAL_CALL transliteration_commonclass::getAvailableModules( const Locale& /*rLocale*/, sal_Int16 /*sType*/ ) throw(RuntimeException) { |