merge the formfield patch from ooo-build
[ooovba.git] / i18npool / inc / breakiterator_cjk.hxx
blob3611586dcf26ced1b5abbed5e051246b6e069151
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: breakiterator_cjk.hxx,v $
10 * $Revision: 1.6.16.1 $
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 _I18N_BREAKITERATOR_CJK_HXX_
31 #define _I18N_BREAKITERATOR_CJK_HXX_
33 #include <breakiterator_unicode.hxx>
34 #include <xdictionary.hxx>
36 namespace com { namespace sun { namespace star { namespace i18n {
37 // ----------------------------------------------------
38 // class BreakIterator_CJK
39 // ----------------------------------------------------
40 class BreakIterator_CJK : public BreakIterator_Unicode
42 public:
43 BreakIterator_CJK();
45 Boundary SAL_CALL nextWord( const rtl::OUString& Text, sal_Int32 nStartPos,
46 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
47 throw(com::sun::star::uno::RuntimeException);
48 Boundary SAL_CALL previousWord( const rtl::OUString& Text, sal_Int32 nStartPos,
49 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
50 throw(com::sun::star::uno::RuntimeException);
51 Boundary SAL_CALL getWordBoundary( const rtl::OUString& Text, sal_Int32 nPos,
52 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection )
53 throw(com::sun::star::uno::RuntimeException);
54 LineBreakResults SAL_CALL getLineBreak( const rtl::OUString& Text, sal_Int32 nStartPos,
55 const com::sun::star::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
56 const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions )
57 throw(com::sun::star::uno::RuntimeException);
59 protected:
60 xdictionary *dict;
61 rtl::OUString hangingCharacters;
64 #define BREAKITERATOR_CJK( lang ) \
65 class BreakIterator_##lang : public BreakIterator_CJK {\
66 public:\
67 BreakIterator_##lang (); \
68 ~BreakIterator_##lang (); \
71 #ifdef BREAKITERATOR_ALL
72 BREAKITERATOR_CJK( zh )
73 BREAKITERATOR_CJK( zh_TW )
74 BREAKITERATOR_CJK( ja )
75 BREAKITERATOR_CJK( ko )
76 #endif
77 #undef BREAKITERATOR__CJK
79 } } } }
81 #endif // _I18N_BREAKITERATOR_CJK_HXX_