1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: transliteration_body.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef TRANSLITERATION_BODY_H
31 #define TRANSLITERATION_BODY_H
33 #include <transliteration_commonclass.hxx>
34 #include <i18nutil/casefolding.hxx>
36 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
38 class Transliteration_body
: public transliteration_commonclass
41 Transliteration_body();
43 // Methods which are shared.
44 sal_Int16 SAL_CALL
getType() throw(com::sun::star::uno::RuntimeException
);
46 rtl::OUString SAL_CALL
transliterate(const rtl::OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
47 com::sun::star::uno::Sequence
< sal_Int32
>& offset
) throw(com::sun::star::uno::RuntimeException
);
49 rtl::OUString SAL_CALL
50 transliterateChar2String( sal_Unicode inChar
)
51 throw(com::sun::star::uno::RuntimeException
);
53 virtual sal_Unicode SAL_CALL
54 transliterateChar2Char( sal_Unicode inChar
)
55 throw(com::sun::star::uno::RuntimeException
,
56 com::sun::star::i18n::MultipleCharsOutputException
);
58 rtl::OUString SAL_CALL
folding(const rtl::OUString
& inStr
, sal_Int32 startPos
, sal_Int32 nCount
,
59 com::sun::star::uno::Sequence
< sal_Int32
>& offset
) throw(com::sun::star::uno::RuntimeException
);
61 sal_Bool SAL_CALL
equals(
62 const rtl::OUString
& str1
, sal_Int32 pos1
, sal_Int32 nCount1
, sal_Int32
& nMatch1
,
63 const rtl::OUString
& str2
, sal_Int32 pos2
, sal_Int32 nCount2
, sal_Int32
& nMatch2
)
64 throw(com::sun::star::uno::RuntimeException
);
66 com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
transliterateRange( const rtl::OUString
& str1
,
67 const rtl::OUString
& str2
) throw(com::sun::star::uno::RuntimeException
);
70 sal_uInt8 nMappingType
;
73 #if defined( TRANSLITERATION_UPPER_LOWER ) || defined( TRANSLITERATION_ALL )
74 class Transliteration_u2l
: public Transliteration_body
77 Transliteration_u2l();
80 class Transliteration_l2u
: public Transliteration_body
83 Transliteration_l2u();
87 #if defined( TRANSLITERATION_casemapping ) || defined( TRANSLITERATION_ALL )
88 class Transliteration_casemapping
: public Transliteration_body
91 Transliteration_casemapping();
92 void SAL_CALL
setMappingType(const sal_uInt8 rMappingType
, const com::sun::star::lang::Locale
& rLocale
);