merged tag ooo/OOO330_m14
[LibreOffice.git] / i18npool / inc / transliteration_body.hxx
blob3d474a0a53dc5b8ea4e71db7f648b938da822205
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef TRANSLITERATION_BODY_H
28 #define TRANSLITERATION_BODY_H
30 #include <transliteration_commonclass.hxx>
31 #include <i18nutil/casefolding.hxx>
33 namespace com { namespace sun { namespace star { namespace i18n {
35 class Transliteration_body : public transliteration_commonclass
37 public:
38 Transliteration_body();
40 // Methods which are shared.
41 sal_Int16 SAL_CALL getType() throw(com::sun::star::uno::RuntimeException);
43 rtl::OUString SAL_CALL transliterate(const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
44 com::sun::star::uno::Sequence< sal_Int32 >& offset) throw(com::sun::star::uno::RuntimeException);
46 rtl::OUString SAL_CALL
47 transliterateChar2String( sal_Unicode inChar)
48 throw(com::sun::star::uno::RuntimeException);
50 virtual sal_Unicode SAL_CALL
51 transliterateChar2Char( sal_Unicode inChar)
52 throw(com::sun::star::uno::RuntimeException,
53 com::sun::star::i18n::MultipleCharsOutputException);
55 rtl::OUString SAL_CALL folding(const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount,
56 com::sun::star::uno::Sequence< sal_Int32 >& offset) throw(com::sun::star::uno::RuntimeException);
58 sal_Bool SAL_CALL equals(
59 const rtl::OUString& str1, sal_Int32 pos1, sal_Int32 nCount1, sal_Int32& nMatch1,
60 const rtl::OUString& str2, sal_Int32 pos2, sal_Int32 nCount2, sal_Int32& nMatch2 )
61 throw(com::sun::star::uno::RuntimeException);
63 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL transliterateRange( const rtl::OUString& str1,
64 const rtl::OUString& str2 ) throw(com::sun::star::uno::RuntimeException);
66 protected:
67 sal_uInt8 nMappingType;
70 #if defined( TRANSLITERATION_UPPER_LOWER ) || defined( TRANSLITERATION_ALL )
71 class Transliteration_u2l : public Transliteration_body
73 public:
74 Transliteration_u2l();
77 class Transliteration_l2u : public Transliteration_body
79 public:
80 Transliteration_l2u();
82 #endif
84 #if defined( TRANSLITERATION_casemapping ) || defined( TRANSLITERATION_ALL )
85 class Transliteration_casemapping : public Transliteration_body
87 public:
88 Transliteration_casemapping();
89 void SAL_CALL setMappingType(const sal_uInt8 rMappingType, const com::sun::star::lang::Locale& rLocale );
91 #endif
94 #if defined( TRANSLITERATION_ALL )
95 class Transliteration_togglecase : public Transliteration_body
97 public:
98 Transliteration_togglecase();
101 class Transliteration_titlecase : public Transliteration_body
103 public:
104 Transliteration_titlecase();
106 virtual rtl::OUString SAL_CALL transliterate( const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset ) throw(com::sun::star::uno::RuntimeException);
109 class Transliteration_sentencecase : public Transliteration_body
111 public:
112 Transliteration_sentencecase();
114 virtual rtl::OUString SAL_CALL transliterate( const rtl::OUString& inStr, sal_Int32 startPos, sal_Int32 nCount, com::sun::star::uno::Sequence< sal_Int32 >& offset ) throw(com::sun::star::uno::RuntimeException);
116 #endif
118 } } } }
120 #endif