Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / i18npool / source / transliteration / halfwidthToFullwidth.cxx
blobff55701da5c2518a17497b5109c294b7d2c2d001
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <i18nutil/widthfolding.hxx>
22 #include <transliteration_OneToOne.hxx>
24 using namespace com::sun::star::uno;
27 namespace i18npool {
29 halfwidthToFullwidth::halfwidthToFullwidth()
31 func = nullptr;
32 table = &i18nutil::widthfolding::gethalf2fullTable();
33 transliterationName = "halfwidthToFullwidth";
34 implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTH_FULLWIDTH";
37 OUString
38 halfwidthToFullwidth::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
40 // One to One mapping
41 const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
43 // Composition: KA + voice-mark --> GA
44 return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset );
47 HALFWIDTHKATAKANA_FULLWIDTHKATAKANA::HALFWIDTHKATAKANA_FULLWIDTHKATAKANA()
49 func = nullptr;
50 table = &i18nutil::widthfolding::gethalfKana2fullKanaTable();
51 transliterationName = "halfwidthKatakanaToFullwidthKatakana";
52 implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTHKATAKANA_FULLWIDTHKATAKANA";
55 OUString
56 HALFWIDTHKATAKANA_FULLWIDTHKATAKANA::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
58 // One to One mapping
59 const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
61 // Composition: KA + voice-mark --> GA
62 return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset );
65 HALFWIDTH_FULLWIDTH_LIKE_JIS::HALFWIDTH_FULLWIDTH_LIKE_JIS()
67 func = nullptr;
68 table = &i18nutil::widthfolding::gethalf2fullTableForJIS();
69 transliterationName = "halfwidthToFullwidthLikeJIS";
70 implementationName = "com.sun.star.i18n.Transliteration.HALFWIDTH_FULLWIDTH_LIKE_JIS";
73 OUString
74 HALFWIDTH_FULLWIDTH_LIKE_JIS::transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, Sequence< sal_Int32 >* pOffset )
76 // One to One mapping
77 const OUString newStr = transliteration_OneToOne::transliterateImpl( inStr, startPos, nCount, nullptr);
79 // Composition: KA + voice-mark --> GA
80 return i18nutil::widthfolding::compose_ja_voiced_sound_marks ( newStr, 0, newStr.getLength(), pOffset, WIDTHFOLDING_DONT_USE_COMBINED_VU );
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */