1*449ab281SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*449ab281SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*449ab281SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*449ab281SAndrew Rist * distributed with this work for additional information 6*449ab281SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*449ab281SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*449ab281SAndrew Rist * "License"); you may not use this file except in compliance 9*449ab281SAndrew Rist * with the License. You may obtain a copy of the License at 10*449ab281SAndrew Rist * 11*449ab281SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*449ab281SAndrew Rist * 13*449ab281SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*449ab281SAndrew Rist * software distributed under the License is distributed on an 15*449ab281SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*449ab281SAndrew Rist * KIND, either express or implied. See the License for the 17*449ab281SAndrew Rist * specific language governing permissions and limitations 18*449ab281SAndrew Rist * under the License. 19*449ab281SAndrew Rist * 20*449ab281SAndrew Rist *************************************************************/ 21*449ab281SAndrew Rist 22*449ab281SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_i18npool.hxx" 26cdf0e10cSrcweir #include <assert.h> 27cdf0e10cSrcweir #include <textconversion.hxx> 28cdf0e10cSrcweir #include <com/sun/star/i18n/TextConversionType.hpp> 29cdf0e10cSrcweir #include <com/sun/star/i18n/TextConversionOption.hpp> 30cdf0e10cSrcweir #include <com/sun/star/linguistic2/ConversionDirection.hpp> 31cdf0e10cSrcweir #include <com/sun/star/linguistic2/ConversionDictionaryType.hpp> 32cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 33cdf0e10cSrcweir #include <i18nutil/x_rtl_ustring.h> 34cdf0e10cSrcweir #include <unicode/uchar.h> 35cdf0e10cSrcweir 36cdf0e10cSrcweir using namespace com::sun::star::lang; 37cdf0e10cSrcweir using namespace com::sun::star::i18n; 38cdf0e10cSrcweir using namespace com::sun::star::linguistic2; 39cdf0e10cSrcweir using namespace com::sun::star::uno; 40cdf0e10cSrcweir using namespace rtl; 41cdf0e10cSrcweir 42cdf0e10cSrcweir namespace com { namespace sun { namespace star { namespace i18n { 43cdf0e10cSrcweir 44cdf0e10cSrcweir #define SCRIPT_OTHERS 0 45cdf0e10cSrcweir #define SCRIPT_HANJA 1 46cdf0e10cSrcweir #define SCRIPT_HANGUL 2 47cdf0e10cSrcweir 48cdf0e10cSrcweir TextConversion_ko::TextConversion_ko( const Reference < XMultiServiceFactory >& xMSF ) 49cdf0e10cSrcweir { 50cdf0e10cSrcweir Reference < XInterface > xI; 51cdf0e10cSrcweir 52cdf0e10cSrcweir xI = xMSF->createInstance( 53cdf0e10cSrcweir OUString::createFromAscii("com.sun.star.i18n.ConversionDictionary_ko")); 54cdf0e10cSrcweir 55cdf0e10cSrcweir if ( xI.is() ) 56cdf0e10cSrcweir xI->queryInterface( getCppuType((const Reference< XConversionDictionary>*)0) ) >>= xCD; 57cdf0e10cSrcweir 58cdf0e10cSrcweir xI = xMSF->createInstance( 59cdf0e10cSrcweir OUString::createFromAscii( "com.sun.star.linguistic2.ConversionDictionaryList" )); 60cdf0e10cSrcweir 61cdf0e10cSrcweir if ( xI.is() ) 62cdf0e10cSrcweir xI->queryInterface( getCppuType((const Reference< XConversionDictionaryList>*)0) ) >>= xCDL; 63cdf0e10cSrcweir 64cdf0e10cSrcweir maxLeftLength = maxRightLength = 1; 65cdf0e10cSrcweir 66cdf0e10cSrcweir // get maximum length of word in dictionary 67cdf0e10cSrcweir if (xCDL.is()) { 68cdf0e10cSrcweir Locale loc(OUString::createFromAscii("ko"), 69cdf0e10cSrcweir OUString::createFromAscii("KR"), 70cdf0e10cSrcweir OUString()); 71cdf0e10cSrcweir maxLeftLength = xCDL->queryMaxCharCount(loc, 72cdf0e10cSrcweir ConversionDictionaryType::HANGUL_HANJA, 73cdf0e10cSrcweir ConversionDirection_FROM_LEFT); 74cdf0e10cSrcweir maxRightLength = xCDL->queryMaxCharCount(loc, 75cdf0e10cSrcweir ConversionDictionaryType::HANGUL_HANJA, 76cdf0e10cSrcweir ConversionDirection_FROM_RIGHT); 77cdf0e10cSrcweir if (xCD.is()) { 78cdf0e10cSrcweir sal_Int32 tmp = xCD->getMaxCharCount(ConversionDirection_FROM_LEFT); 79cdf0e10cSrcweir if (tmp > maxLeftLength) 80cdf0e10cSrcweir maxLeftLength = tmp; 81cdf0e10cSrcweir tmp = xCD->getMaxCharCount(ConversionDirection_FROM_RIGHT); 82cdf0e10cSrcweir if (tmp > maxRightLength) 83cdf0e10cSrcweir maxRightLength = tmp; 84cdf0e10cSrcweir } 85cdf0e10cSrcweir } else if (xCD.is()) { 86cdf0e10cSrcweir maxLeftLength = xCD->getMaxCharCount(ConversionDirection_FROM_LEFT); 87cdf0e10cSrcweir maxRightLength = xCD->getMaxCharCount(ConversionDirection_FROM_RIGHT); 88cdf0e10cSrcweir } 89cdf0e10cSrcweir 90cdf0e10cSrcweir implementationName = "com.sun.star.i18n.TextConversion_ko"; 91cdf0e10cSrcweir } 92cdf0e10cSrcweir 93cdf0e10cSrcweir sal_Int16 SAL_CALL checkScriptType(sal_Unicode c) 94cdf0e10cSrcweir { 95cdf0e10cSrcweir typedef struct { 96cdf0e10cSrcweir UBlockCode from; 97cdf0e10cSrcweir UBlockCode to; 98cdf0e10cSrcweir sal_Int16 script; 99cdf0e10cSrcweir } UBlock2Script; 100cdf0e10cSrcweir 101cdf0e10cSrcweir static UBlock2Script scriptList[] = { 102cdf0e10cSrcweir {UBLOCK_HANGUL_JAMO, UBLOCK_HANGUL_JAMO, SCRIPT_HANGUL}, 103cdf0e10cSrcweir {UBLOCK_CJK_RADICALS_SUPPLEMENT, UBLOCK_BOPOMOFO, SCRIPT_HANJA}, 104cdf0e10cSrcweir {UBLOCK_HANGUL_COMPATIBILITY_JAMO, UBLOCK_HANGUL_COMPATIBILITY_JAMO, SCRIPT_HANGUL}, 105cdf0e10cSrcweir {UBLOCK_KANBUN, UBLOCK_YI_RADICALS, SCRIPT_HANJA}, 106cdf0e10cSrcweir {UBLOCK_HANGUL_SYLLABLES, UBLOCK_HANGUL_SYLLABLES, SCRIPT_HANGUL}, 107cdf0e10cSrcweir {UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, UBLOCK_CJK_COMPATIBILITY_IDEOGRAPHS, SCRIPT_HANJA}, 108cdf0e10cSrcweir {UBLOCK_COMBINING_HALF_MARKS, UBLOCK_SMALL_FORM_VARIANTS, SCRIPT_HANJA}, 109cdf0e10cSrcweir {UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, UBLOCK_HALFWIDTH_AND_FULLWIDTH_FORMS, SCRIPT_HANJA}, 110cdf0e10cSrcweir }; 111cdf0e10cSrcweir 112cdf0e10cSrcweir #define scriptListCount sizeof (scriptList) / sizeof (UBlock2Script) 113cdf0e10cSrcweir 114cdf0e10cSrcweir UBlockCode block=ublock_getCode((sal_uInt32) c); 115cdf0e10cSrcweir sal_uInt16 i; 116cdf0e10cSrcweir for ( i = 0; i < scriptListCount; i++) { 117cdf0e10cSrcweir if (block <= scriptList[i].to) break; 118cdf0e10cSrcweir } 119cdf0e10cSrcweir return (i < scriptListCount && block >= scriptList[i].from) ? scriptList[i].script : SCRIPT_OTHERS; 120cdf0e10cSrcweir } 121cdf0e10cSrcweir 122cdf0e10cSrcweir Sequence< OUString > SAL_CALL 123cdf0e10cSrcweir TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, sal_Bool toHanja) 124cdf0e10cSrcweir { 125cdf0e10cSrcweir sal_Unicode ch; 126cdf0e10cSrcweir Sequence< OUString > output; 127cdf0e10cSrcweir const sal_Unicode* (*getHangul2HanjaData)() = (const sal_Unicode* (*)())getFunctionBySymbol("getHangul2HanjaData"); 128cdf0e10cSrcweir const Hangul_Index* (*getHangul2HanjaIndex)() = (const Hangul_Index* (*)()) getFunctionBySymbol("getHangul2HanjaIndex"); 129cdf0e10cSrcweir sal_Int16 (*getHangul2HanjaIndexCount)() = (sal_Int16 (*)()) getFunctionBySymbol("getHangul2HanjaIndexCount"); 130cdf0e10cSrcweir const sal_uInt16* (*getHanja2HangulIndex)() = (const sal_uInt16* (*)()) getFunctionBySymbol("getHanja2HangulIndex"); 131cdf0e10cSrcweir const sal_Unicode* (*getHanja2HangulData)() = (const sal_Unicode* (*)()) getFunctionBySymbol("getHanja2HangulData"); 132cdf0e10cSrcweir if (toHanja && getHangul2HanjaIndex && getHangul2HanjaIndexCount && getHangul2HanjaData) { 133cdf0e10cSrcweir ch = aText[nStartPos]; 134cdf0e10cSrcweir const Hangul_Index *Hangul_ko = getHangul2HanjaIndex(); 135cdf0e10cSrcweir sal_Int16 top = getHangul2HanjaIndexCount(); 136cdf0e10cSrcweir --top; 137cdf0e10cSrcweir sal_Int16 bottom = 0; 138cdf0e10cSrcweir 139cdf0e10cSrcweir while (bottom <= top) { 140cdf0e10cSrcweir sal_Int16 current = (top + bottom) / 2; 141cdf0e10cSrcweir sal_Unicode current_ch = Hangul_ko[current].code; 142cdf0e10cSrcweir if (ch < current_ch) 143cdf0e10cSrcweir top = current - 1; 144cdf0e10cSrcweir else if (ch > current_ch) 145cdf0e10cSrcweir bottom = current + 1; 146cdf0e10cSrcweir else { 147cdf0e10cSrcweir const sal_Unicode *ptr = getHangul2HanjaData() + Hangul_ko[current].address; 148cdf0e10cSrcweir sal_Int16 count = Hangul_ko[current].count; 149cdf0e10cSrcweir output.realloc(count); 150cdf0e10cSrcweir for (sal_Int16 i = 0; i < count; i++) 151cdf0e10cSrcweir output[i] = OUString(ptr + i, 1); 152cdf0e10cSrcweir break; 153cdf0e10cSrcweir } 154cdf0e10cSrcweir } 155cdf0e10cSrcweir } else if (! toHanja && getHanja2HangulIndex && getHanja2HangulData) { 156cdf0e10cSrcweir rtl_uString * newStr = x_rtl_uString_new_WithLength( nLength ); // defined in x_rtl_ustring.h 157cdf0e10cSrcweir sal_Int32 count = 0; 158cdf0e10cSrcweir while (count < nLength) { 159cdf0e10cSrcweir ch = aText[nStartPos + count]; 160cdf0e10cSrcweir sal_Unicode address = getHanja2HangulIndex()[ch>>8]; 161cdf0e10cSrcweir if (address != 0xFFFF) 162cdf0e10cSrcweir address = getHanja2HangulData()[address + (ch & 0xFF)]; 163cdf0e10cSrcweir 164cdf0e10cSrcweir if (address != 0xFFFF) 165cdf0e10cSrcweir newStr->buffer[count++] = address; 166cdf0e10cSrcweir else 167cdf0e10cSrcweir break; 168cdf0e10cSrcweir } 169cdf0e10cSrcweir if (count > 0) { 170cdf0e10cSrcweir output.realloc(1); 171cdf0e10cSrcweir output[0] = OUString( newStr->buffer, count); 172cdf0e10cSrcweir } 173cdf0e10cSrcweir } 174cdf0e10cSrcweir return output; 175cdf0e10cSrcweir } 176cdf0e10cSrcweir 177cdf0e10cSrcweir static Sequence< OUString >& operator += (Sequence< OUString > &rSeq1, Sequence< OUString > &rSeq2 ) 178cdf0e10cSrcweir { 179cdf0e10cSrcweir if (! rSeq1.hasElements() && rSeq2.hasElements()) 180cdf0e10cSrcweir rSeq1 = rSeq2; 181cdf0e10cSrcweir else if (rSeq2.hasElements()) { 182cdf0e10cSrcweir sal_Int32 i, j, k, l; 183cdf0e10cSrcweir k = l = rSeq1.getLength(); 184cdf0e10cSrcweir rSeq1.realloc(l + rSeq2.getLength()); 185cdf0e10cSrcweir 186cdf0e10cSrcweir for (i = 0; i < rSeq2.getLength(); i++) { 187cdf0e10cSrcweir for (j = 0; j < l; j++) 188cdf0e10cSrcweir if (rSeq1[j] == rSeq2[i]) 189cdf0e10cSrcweir break; 190cdf0e10cSrcweir if (j == l) 191cdf0e10cSrcweir rSeq1[k++] = rSeq2[i]; 192cdf0e10cSrcweir } 193cdf0e10cSrcweir if (rSeq1.getLength() > k) 194cdf0e10cSrcweir rSeq1.realloc(k); 195cdf0e10cSrcweir } 196cdf0e10cSrcweir return rSeq1; 197cdf0e10cSrcweir } 198cdf0e10cSrcweir 199cdf0e10cSrcweir TextConversionResult SAL_CALL 200cdf0e10cSrcweir TextConversion_ko::getConversions( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, 201cdf0e10cSrcweir const Locale& aLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions) 202cdf0e10cSrcweir throw( RuntimeException, IllegalArgumentException, NoSupportException ) 203cdf0e10cSrcweir { 204cdf0e10cSrcweir TextConversionResult result; 205cdf0e10cSrcweir Sequence <OUString> candidates; 206cdf0e10cSrcweir result.Boundary.startPos = result.Boundary.endPos = 0; 207cdf0e10cSrcweir 208cdf0e10cSrcweir // do conversion only when there are right conversion type and dictionary services. 209cdf0e10cSrcweir if (nConversionType == TextConversionType::TO_HANGUL || 210cdf0e10cSrcweir nConversionType == TextConversionType::TO_HANJA) { 211cdf0e10cSrcweir sal_Int32 start, end, length = aText.getLength() - nStartPos; 212cdf0e10cSrcweir 213cdf0e10cSrcweir if (length < 0 || nStartPos < 0) 214cdf0e10cSrcweir length = 0; 215cdf0e10cSrcweir else if (length > nLength) 216cdf0e10cSrcweir length = nLength; 217cdf0e10cSrcweir 218cdf0e10cSrcweir sal_Int16 scriptType = SCRIPT_OTHERS; 219cdf0e10cSrcweir sal_Int32 len = 1; 220cdf0e10cSrcweir sal_Bool toHanja = (nConversionType == TextConversionType::TO_HANJA); 221cdf0e10cSrcweir // FROM_LEFT: Hangul -> Hanja 222cdf0e10cSrcweir // FROM_RIGHT: Hanja -> Hangul 223cdf0e10cSrcweir ConversionDirection eDirection = toHanja ? ConversionDirection_FROM_LEFT : ConversionDirection_FROM_RIGHT; 224cdf0e10cSrcweir sal_Int32 maxLength = toHanja ? maxLeftLength : maxRightLength; 225cdf0e10cSrcweir if (maxLength == 0) maxLength = 1; 226cdf0e10cSrcweir 227cdf0e10cSrcweir // search for a max length of convertible text 228cdf0e10cSrcweir for (start = 0, end = 0; start < length; start++) { 229cdf0e10cSrcweir if (end <= start) { 230cdf0e10cSrcweir scriptType = checkScriptType(aText[nStartPos + start]); 231cdf0e10cSrcweir if (nConversionType == TextConversionType::TO_HANJA) { 232cdf0e10cSrcweir if (scriptType != SCRIPT_HANGUL) // skip non-Hangul characters 233cdf0e10cSrcweir continue; 234cdf0e10cSrcweir } else { 235cdf0e10cSrcweir if (scriptType != SCRIPT_HANJA) // skip non-Hanja characters 236cdf0e10cSrcweir continue; 237cdf0e10cSrcweir } 238cdf0e10cSrcweir end = start + 1; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir if (nConversionOptions & TextConversionOption::CHARACTER_BY_CHARACTER) { 241cdf0e10cSrcweir result.Candidates = getCharConversions(aText, nStartPos + start, len, toHanja); // char2char conversion 242cdf0e10cSrcweir } else { 243cdf0e10cSrcweir for (; end < length && end - start < maxLength; end++) 244cdf0e10cSrcweir if (checkScriptType(aText[nStartPos + end]) != scriptType) 245cdf0e10cSrcweir break; 246cdf0e10cSrcweir 247cdf0e10cSrcweir for (len = end - start; len > 0; len--) { 248cdf0e10cSrcweir if (len > 1) { 249cdf0e10cSrcweir try { 250cdf0e10cSrcweir if (xCDL.is()) 251cdf0e10cSrcweir result.Candidates = xCDL->queryConversions(aText, start + nStartPos, len, 252cdf0e10cSrcweir aLocale, ConversionDictionaryType::HANGUL_HANJA, eDirection, nConversionOptions); // user dictionary 253cdf0e10cSrcweir } 254cdf0e10cSrcweir catch ( NoSupportException & ) { 255cdf0e10cSrcweir // clear reference (when there is no user dictionary) in order 256cdf0e10cSrcweir // to not always have to catch this exception again 257cdf0e10cSrcweir // in further calls. (save time) 258cdf0e10cSrcweir xCDL = 0; 259cdf0e10cSrcweir } 260cdf0e10cSrcweir catch (...) { 261cdf0e10cSrcweir // catch all other exceptions to allow 262cdf0e10cSrcweir // querying the system dictionary in the next line 263cdf0e10cSrcweir } 264cdf0e10cSrcweir if (xCD.is() && toHanja) { // System dictionary would not do Hanja_to_Hangul conversion. 265cdf0e10cSrcweir candidates = xCD->getConversions(aText, start + nStartPos, len, eDirection, nConversionOptions); 266cdf0e10cSrcweir result.Candidates += candidates; 267cdf0e10cSrcweir } 268cdf0e10cSrcweir } else if (! toHanja) { // do whole word character 2 character conversion for Hanja to Hangul conversion 269cdf0e10cSrcweir result.Candidates = getCharConversions(aText, nStartPos + start, length - start, toHanja); 270cdf0e10cSrcweir if (result.Candidates.hasElements()) 271cdf0e10cSrcweir len = result.Candidates[0].getLength(); 272cdf0e10cSrcweir } 273cdf0e10cSrcweir if (result.Candidates.hasElements()) 274cdf0e10cSrcweir break; 275cdf0e10cSrcweir } 276cdf0e10cSrcweir } 277cdf0e10cSrcweir // found match 278cdf0e10cSrcweir if (result.Candidates.hasElements()) { 279cdf0e10cSrcweir result.Boundary.startPos = start + nStartPos;; 280cdf0e10cSrcweir result.Boundary.endPos = start + len + nStartPos; 281cdf0e10cSrcweir return result; 282cdf0e10cSrcweir } 283cdf0e10cSrcweir } 284cdf0e10cSrcweir } else 285cdf0e10cSrcweir throw NoSupportException(); // Conversion type is not supported in this service. 286cdf0e10cSrcweir return result; 287cdf0e10cSrcweir } 288cdf0e10cSrcweir 289cdf0e10cSrcweir OUString SAL_CALL 290cdf0e10cSrcweir TextConversion_ko::getConversion( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, 291cdf0e10cSrcweir const Locale& aLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions) 292cdf0e10cSrcweir throw( RuntimeException, IllegalArgumentException, NoSupportException ) 293cdf0e10cSrcweir { 294cdf0e10cSrcweir sal_Int32 length = aText.getLength() - nStartPos; 295cdf0e10cSrcweir 296cdf0e10cSrcweir if (length <= 0 || nStartPos < 0) 297cdf0e10cSrcweir return OUString(); 298cdf0e10cSrcweir else if (length > nLength) 299cdf0e10cSrcweir length = nLength; 300cdf0e10cSrcweir 301cdf0e10cSrcweir OUStringBuffer aBuf(length + 1); 302cdf0e10cSrcweir TextConversionResult result; 303cdf0e10cSrcweir const sal_Unicode *str = aText.getStr(); 304cdf0e10cSrcweir 305cdf0e10cSrcweir for (sal_Int32 start = nStartPos; length + nStartPos > start; start = result.Boundary.endPos) { 306cdf0e10cSrcweir 307cdf0e10cSrcweir result = getConversions(aText, start, length + nStartPos - start, aLocale, nConversionType, nConversionOptions); 308cdf0e10cSrcweir 309cdf0e10cSrcweir if (result.Boundary.endPos > 0) { 310cdf0e10cSrcweir if (result.Boundary.startPos > start) 311cdf0e10cSrcweir aBuf.append(str + start, result.Boundary.startPos - start); // append skip portion 312cdf0e10cSrcweir aBuf.append(result.Candidates[0]); // append converted portion 313cdf0e10cSrcweir } else { 314cdf0e10cSrcweir if (length + nStartPos > start) 315cdf0e10cSrcweir aBuf.append(str + start, length + nStartPos - start); // append last portion 316cdf0e10cSrcweir break; 317cdf0e10cSrcweir } 318cdf0e10cSrcweir } 319cdf0e10cSrcweir 320cdf0e10cSrcweir return aBuf.makeStringAndClear(); 321cdf0e10cSrcweir } 322cdf0e10cSrcweir 323cdf0e10cSrcweir OUString SAL_CALL 324cdf0e10cSrcweir TextConversion_ko::getConversionWithOffset( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength, 325cdf0e10cSrcweir const Locale& rLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions, Sequence<sal_Int32>& offset) 326cdf0e10cSrcweir throw( RuntimeException, IllegalArgumentException, NoSupportException ) 327cdf0e10cSrcweir { 328cdf0e10cSrcweir offset.realloc(0); 329cdf0e10cSrcweir return getConversion(aText, nStartPos, nLength, rLocale, nConversionType, nConversionOptions); 330cdf0e10cSrcweir } 331cdf0e10cSrcweir 332cdf0e10cSrcweir sal_Bool SAL_CALL 333cdf0e10cSrcweir TextConversion_ko::interactiveConversion( const Locale& /*rLocale*/, sal_Int16 /*nTextConversionType*/, sal_Int32 /*nTextConversionOptions*/ ) 334cdf0e10cSrcweir throw( RuntimeException, IllegalArgumentException, NoSupportException ) 335cdf0e10cSrcweir { 336cdf0e10cSrcweir return sal_True; 337cdf0e10cSrcweir } 338cdf0e10cSrcweir 339cdf0e10cSrcweir } } } } 340