1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
20 #define INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
22 #include "breakiterator_unicode.hxx"
23 #include "xdictionary.hxx"
29 // class BreakIterator_CJK
31 class BreakIterator_CJK
: public BreakIterator_Unicode
36 css::i18n::Boundary SAL_CALL
nextWord( const OUString
& Text
, sal_Int32 nStartPos
,
37 const css::lang::Locale
& nLocale
, sal_Int16 WordType
) override
;
38 css::i18n::Boundary SAL_CALL
previousWord( const OUString
& Text
, sal_Int32 nStartPos
,
39 const css::lang::Locale
& nLocale
, sal_Int16 WordType
) override
;
40 css::i18n::Boundary SAL_CALL
getWordBoundary( const OUString
& Text
, sal_Int32 nPos
,
41 const css::lang::Locale
& nLocale
, sal_Int16 WordType
, sal_Bool bDirection
) override
;
42 css::i18n::LineBreakResults SAL_CALL
getLineBreak( const OUString
& Text
, sal_Int32 nStartPos
,
43 const css::lang::Locale
& nLocale
, sal_Int32 nMinBreakPos
,
44 const css::i18n::LineBreakHyphenationOptions
& hOptions
,
45 const css::i18n::LineBreakUserOptions
& bOptions
) override
;
48 std::unique_ptr
<xdictionary
> m_xDict
;
49 OUString hangingCharacters
;
52 #define BREAKITERATOR_CJK( lang ) \
53 class BreakIterator_##lang : public BreakIterator_CJK {\
55 BreakIterator_##lang (); \
58 BREAKITERATOR_CJK( zh
)
59 BREAKITERATOR_CJK( zh_TW
)
60 BREAKITERATOR_CJK( ja
)
61 BREAKITERATOR_CJK( ko
)
63 #undef BREAKITERATOR__CJK
67 #endif // INCLUDED_I18NPOOL_INC_BREAKITERATOR_CJK_HXX
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */