bump product version to 7.6.3.2-android
[LibreOffice.git] / include / linguistic / hyphdta.hxx
blob48030b571705be7f2ddff6c53028dab52e2c5e4e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef INCLUDED_LINGUISTIC_HYPHDTA_HXX
21 #define INCLUDED_LINGUISTIC_HYPHDTA_HXX
23 #include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
24 #include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include <linguistic/lngdllapi.h>
27 #include <i18nlangtag/lang.h>
28 #include <config_options.h>
30 namespace linguistic
33 class HyphenatedWord final :
34 public cppu::WeakImplHelper< css::linguistic2::XHyphenatedWord >
36 OUString aWord;
37 OUString aHyphenatedWord;
38 sal_Int16 nHyphPos;
39 sal_Int16 nHyphenationPos;
40 LanguageType nLanguage;
41 bool bIsAltSpelling;
43 HyphenatedWord(const HyphenatedWord &) = delete;
44 HyphenatedWord & operator = (const HyphenatedWord &) = delete;
46 public:
47 HyphenatedWord(const OUString &rWord, LanguageType nLang, sal_Int16 nHyphenationPos,
48 const OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
49 virtual ~HyphenatedWord() override;
51 // XHyphenatedWord
52 virtual OUString SAL_CALL
53 getWord() override;
54 virtual css::lang::Locale SAL_CALL
55 getLocale() override;
56 virtual sal_Int16 SAL_CALL
57 getHyphenationPos() override;
58 virtual OUString SAL_CALL
59 getHyphenatedWord() override;
60 virtual sal_Int16 SAL_CALL
61 getHyphenPos() override;
62 virtual sal_Bool SAL_CALL
63 isAlternativeSpelling() override;
65 static css::uno::Reference <css::linguistic2::XHyphenatedWord> UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreateHyphenatedWord(
66 const OUString &rWord, LanguageType nLang, sal_Int16 nHyphenationPos,
67 const OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
71 class PossibleHyphens final :
72 public cppu::WeakImplHelper
74 css::linguistic2::XPossibleHyphens
77 OUString aWord;
78 OUString aWordWithHyphens;
79 css::uno::Sequence< sal_Int16 > aOrigHyphenPos;
80 LanguageType nLanguage;
82 PossibleHyphens(const PossibleHyphens &) = delete;
83 PossibleHyphens & operator = (const PossibleHyphens &) = delete;
85 public:
86 PossibleHyphens(OUString aWord, LanguageType nLang,
87 OUString aHyphWord,
88 const css::uno::Sequence< sal_Int16 > &rPositions);
89 virtual ~PossibleHyphens() override;
91 // XPossibleHyphens
92 virtual OUString SAL_CALL
93 getWord() override;
94 virtual css::lang::Locale SAL_CALL
95 getLocale() override;
96 virtual OUString SAL_CALL
97 getPossibleHyphens() override;
98 virtual css::uno::Sequence< sal_Int16 > SAL_CALL
99 getHyphenationPositions() override;
101 static css::uno::Reference < css::linguistic2::XPossibleHyphens > UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreatePossibleHyphens
102 (const OUString &rWord, LanguageType nLang,
103 const OUString &rHyphWord,
104 const css::uno::Sequence< sal_Int16 > &rPositions);
106 } // namespace linguistic
108 #endif
110 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */