LibreOffice Module i18npool (master)  1
transliteration_body.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #pragma once
20 
22 #include <i18nutil/casefolding.hxx>
23 
24 namespace i18npool {
25 
27 {
28 public:
30 
31  // Methods which are shared.
32  sal_Int16 SAL_CALL getType() override;
33 
34  OUString transliterateImpl(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
35  css::uno::Sequence< sal_Int32 >* pOffset) override;
36 
37  OUString SAL_CALL
38  transliterateChar2String( sal_Unicode inChar) override;
39 
40  virtual sal_Unicode SAL_CALL
41  transliterateChar2Char( sal_Unicode inChar) override;
42 
43  OUString foldingImpl(const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
44  css::uno::Sequence< sal_Int32 >* pOffset) override;
45 
46  sal_Bool SAL_CALL equals(
47  const OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1,
48  const OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) override;
49 
50  css::uno::Sequence< OUString > SAL_CALL transliterateRange( const OUString& str1,
51  const OUString& str2 ) override;
52 
53 protected:
55 };
56 
58 {
59 public:
61 };
62 
64 {
65 public:
67 };
68 
70 {
71 public:
73  void setMappingType( const MappingType rMappingType )
74  {
75  if (nMappingType != rMappingType)
76  nMappingType = rMappingType;
77  }
78  void setLocale( const css::lang::Locale& rLocale )
79  {
80  if (aLocale != rLocale)
81  aLocale = rLocale;
82  }
83 };
84 
86 {
87 public:
89 };
90 
92 {
93 public:
95 
96  virtual OUString transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
97  css::uno::Sequence< sal_Int32 >* pOffset ) override;
98 };
99 
101 {
102 public:
104 
105  virtual OUString transliterateImpl( const OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
106  css::uno::Sequence< sal_Int32 >* pOffset ) override;
107 };
108 
109 }
110 
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Sequence< OUString > SAL_CALL transliterateRange(const OUString &str1, const OUString &str2) override
virtual OUString transliterateImpl(const OUString &inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 > *pOffset) override
MappingType
sal_uInt16 sal_Unicode
int nCount
unsigned char sal_Bool
OUString SAL_CALL transliterateChar2String(sal_Unicode inChar) override
OUString transliterateImpl(const OUString &inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 > *pOffset) override
Constant values shared between i18npool and, for example, the number formatter.
void setMappingType(const MappingType rMappingType)
sal_Bool SAL_CALL 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) override
virtual OUString transliterateImpl(const OUString &inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 > *pOffset) override
sal_Int16 SAL_CALL getType() override
void setLocale(const css::lang::Locale &rLocale)
OUString foldingImpl(const OUString &inStr, sal_Int32 startPos, sal_Int32 nCount, css::uno::Sequence< sal_Int32 > *pOffset) override
virtual sal_Unicode SAL_CALL transliterateChar2Char(sal_Unicode inChar) override