Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / i18npool / inc / breakiterator_cjk.hxx
blobfa0726ac1c530618dde96722dffb322bfd8f0e09
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _I18N_BREAKITERATOR_CJK_HXX_
29 #define _I18N_BREAKITERATOR_CJK_HXX_
31 #include <breakiterator_unicode.hxx>
32 #include <xdictionary.hxx>
34 namespace com { namespace sun { namespace star { namespace i18n {
35 // ----------------------------------------------------
36 // class BreakIterator_CJK
37 // ----------------------------------------------------
38 class BreakIterator_CJK : public BreakIterator_Unicode
40 public:
41 BreakIterator_CJK();
43 Boundary SAL_CALL nextWord( const rtl::OUString& Text, sal_Int32 nStartPos,
44 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
45 throw(com::sun::star::uno::RuntimeException);
46 Boundary SAL_CALL previousWord( const rtl::OUString& Text, sal_Int32 nStartPos,
47 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
48 throw(com::sun::star::uno::RuntimeException);
49 Boundary SAL_CALL getWordBoundary( const rtl::OUString& Text, sal_Int32 nPos,
50 const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection )
51 throw(com::sun::star::uno::RuntimeException);
52 LineBreakResults SAL_CALL getLineBreak( const rtl::OUString& Text, sal_Int32 nStartPos,
53 const com::sun::star::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
54 const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions )
55 throw(com::sun::star::uno::RuntimeException);
57 protected:
58 xdictionary *dict;
59 rtl::OUString hangingCharacters;
62 #define BREAKITERATOR_CJK( lang ) \
63 class BreakIterator_##lang : public BreakIterator_CJK {\
64 public:\
65 BreakIterator_##lang (); \
66 ~BreakIterator_##lang (); \
69 #ifdef BREAKITERATOR_ALL
70 BREAKITERATOR_CJK( zh )
71 BREAKITERATOR_CJK( zh_TW )
72 BREAKITERATOR_CJK( ja )
73 BREAKITERATOR_CJK( ko )
74 #endif
75 #undef BREAKITERATOR__CJK
77 } } } }
79 #endif // _I18N_BREAKITERATOR_CJK_HXX_
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */