Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef _I18N_BREAKITERATOR_CJK_HXX_
20 : #define _I18N_BREAKITERATOR_CJK_HXX_
21 :
22 : #include <breakiterator_unicode.hxx>
23 : #include <xdictionary.hxx>
24 :
25 : namespace com { namespace sun { namespace star { namespace i18n {
26 :
27 : // class BreakIterator_CJK
28 :
29 0 : class BreakIterator_CJK : public BreakIterator_Unicode
30 : {
31 : public:
32 : BreakIterator_CJK();
33 :
34 : Boundary SAL_CALL nextWord( const OUString& Text, sal_Int32 nStartPos,
35 : const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
36 : throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
37 : Boundary SAL_CALL previousWord( const OUString& Text, sal_Int32 nStartPos,
38 : const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType)
39 : throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
40 : Boundary SAL_CALL getWordBoundary( const OUString& Text, sal_Int32 nPos,
41 : const com::sun::star::lang::Locale& nLocale, sal_Int16 WordType, sal_Bool bDirection )
42 : throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
43 : LineBreakResults SAL_CALL getLineBreak( const OUString& Text, sal_Int32 nStartPos,
44 : const com::sun::star::lang::Locale& nLocale, sal_Int32 nMinBreakPos,
45 : const LineBreakHyphenationOptions& hOptions, const LineBreakUserOptions& bOptions )
46 : throw(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
47 :
48 : protected:
49 : xdictionary *dict;
50 : OUString hangingCharacters;
51 : };
52 :
53 : #define BREAKITERATOR_CJK( lang ) \
54 : class BreakIterator_##lang : public BreakIterator_CJK {\
55 : public:\
56 : BreakIterator_##lang (); \
57 : virtual ~BreakIterator_##lang (); \
58 : };
59 :
60 : #ifdef BREAKITERATOR_ALL
61 : BREAKITERATOR_CJK( zh )
62 : BREAKITERATOR_CJK( zh_TW )
63 : BREAKITERATOR_CJK( ja )
64 : BREAKITERATOR_CJK( ko )
65 : #endif
66 : #undef BREAKITERATOR__CJK
67 :
68 : } } } }
69 :
70 : #endif // _I18N_BREAKITERATOR_CJK_HXX_
71 :
72 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|