1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
19 #ifndef INCLUDED_I18NPOOL_INC_TRANSLITERATION_BODY_HXX
20 #define INCLUDED_I18NPOOL_INC_TRANSLITERATION_BODY_HXX
22 #include "transliteration_commonclass.hxx"
23 #include <i18nutil/casefolding.hxx>
27 class Transliteration_body
: public transliteration_commonclass
30 Transliteration_body();
32 // Methods which are shared.
33 sal_Int16 SAL_CALL
getType() override
;
35 OUString
transliterateImpl(const OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
36 css::uno::Sequence
< sal_Int32
>& offset
, bool useOffset
) override
;
39 transliterateChar2String( sal_Unicode inChar
) override
;
41 virtual sal_Unicode SAL_CALL
42 transliterateChar2Char( sal_Unicode inChar
) override
;
44 OUString
foldingImpl(const OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
45 css::uno::Sequence
< sal_Int32
>& offset
, bool useOffset
) override
;
47 sal_Bool SAL_CALL
equals(
48 const OUString
& str1
, sal_Int32 pos1
, sal_Int32 nCount1
, sal_Int32
& nMatch1
,
49 const OUString
& str2
, sal_Int32 pos2
, sal_Int32 nCount2
, sal_Int32
& nMatch2
) override
;
51 css::uno::Sequence
< OUString
> SAL_CALL
transliterateRange( const OUString
& str1
,
52 const OUString
& str2
) override
;
55 MappingType nMappingType
;
58 class Transliteration_u2l
: public Transliteration_body
61 Transliteration_u2l();
64 class Transliteration_l2u
: public Transliteration_body
67 Transliteration_l2u();
70 class Transliteration_casemapping
: public Transliteration_body
73 Transliteration_casemapping();
74 void setMappingType(const MappingType rMappingType
, const css::lang::Locale
& rLocale
);
77 class Transliteration_togglecase
: public Transliteration_body
80 Transliteration_togglecase();
83 class Transliteration_titlecase
: public Transliteration_body
86 Transliteration_titlecase();
88 virtual OUString
transliterateImpl( const OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
89 css::uno::Sequence
< sal_Int32
>& offset
, bool useOffset
) override
;
92 class Transliteration_sentencecase
: public Transliteration_body
95 Transliteration_sentencecase();
97 virtual OUString
transliterateImpl( const OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
98 css::uno::Sequence
< sal_Int32
>& offset
, bool useOffset
) override
;
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */