1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef INCLUDED_I18NUTIL_WIDTHFOLDING_HXX
24 #define INCLUDED_I18NUTIL_WIDTHFOLDING_HXX
25 
26 #include <sal/types.h>
27 #include <com/sun/star/uno/Sequence.hxx>
28 #include <i18nutil/oneToOneMapping.hxx>
29 #include "i18nutil/i18nutildllapi.h"
30 
31 namespace com { namespace sun { namespace star { namespace i18n {
32 
33 #define WIDTHFOLDNIG_DONT_USE_COMBINED_VU 0x01
34 
35 class I18NUTIL_DLLPUBLIC widthfolding
36 {
37 public:
38     static oneToOneMapping& getfull2halfTable();
39     static oneToOneMapping& gethalf2fullTable();
40 
41     static oneToOneMapping& getfull2halfTableForASC();
42     static oneToOneMapping& gethalf2fullTableForJIS();
43 
44     static oneToOneMapping& getfullKana2halfKanaTable();
45     static oneToOneMapping& gethalfKana2fullKanaTable();
46 
47     static rtl::OUString decompose_ja_voiced_sound_marks(const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset, sal_Bool useOffset);
48     static sal_Unicode decompose_ja_voiced_sound_marksChar2Char (sal_Unicode inChar);
49     static rtl::OUString compose_ja_voiced_sound_marks(const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset, sal_Bool useOffset, sal_Int32 nFlags = 0 );
50     static sal_Unicode getCompositionChar(sal_Unicode c1, sal_Unicode c2);
51 };
52 
53 
54 } } } }
55 
56 #endif
57