LibreOffice Module linguistic (master) 1
hyphdta.hxx
Go to the documentation of this file.
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
20#ifndef INCLUDED_LINGUISTIC_HYPHDTA_HXX
21#define INCLUDED_LINGUISTIC_HYPHDTA_HXX
22
23#include <com/sun/star/linguistic2/XHyphenatedWord.hpp>
24#include <com/sun/star/linguistic2/XPossibleHyphens.hpp>
27#include <i18nlangtag/lang.h>
28#include <config_options.h>
29
30namespace linguistic
31{
32
33class HyphenatedWord final :
34 public cppu::WeakImplHelper< css::linguistic2::XHyphenatedWord >
35{
36 OUString aWord;
38 sal_Int16 nHyphPos;
39 sal_Int16 nHyphenationPos;
42
43 HyphenatedWord(const HyphenatedWord &) = delete;
45
46public:
47 HyphenatedWord(const OUString &rWord, LanguageType nLang, sal_Int16 nHyphenationPos,
48 const OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
49 virtual ~HyphenatedWord() override;
50
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;
64
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 );
68};
69
70
71class PossibleHyphens final :
72 public cppu::WeakImplHelper
73 <
74 css::linguistic2::XPossibleHyphens
75 >
76{
77 OUString aWord;
79 css::uno::Sequence< sal_Int16 > aOrigHyphenPos;
81
84
85public:
87 OUString aHyphWord,
88 const css::uno::Sequence< sal_Int16 > &rPositions);
89 virtual ~PossibleHyphens() override;
90
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;
100
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);
105};
106} // namespace linguistic
107
108#endif
109
110/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::lang::Locale SAL_CALL getLocale() override
Definition: hyphdta.cxx:77
virtual ~HyphenatedWord() override
Definition: hyphdta.cxx:66
LanguageType nLanguage
Definition: hyphdta.hxx:40
static css::uno::Reference< css::linguistic2::XHyphenatedWord > UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreateHyphenatedWord(const OUString &rWord
static css::uno::Reference< css::linguistic2::XHyphenatedWord > LanguageType sal_Int16 const OUString sal_Int16 nHyphenPos
Definition: hyphdta.hxx:67
virtual sal_Bool SAL_CALL isAlternativeSpelling() override
Definition: hyphdta.cxx:101
virtual sal_Int16 SAL_CALL getHyphenationPos() override
Definition: hyphdta.cxx:83
virtual OUString SAL_CALL getWord() override
Definition: hyphdta.cxx:71
static css::uno::Reference< css::linguistic2::XHyphenatedWord > LanguageType nLang
Definition: hyphdta.hxx:66
virtual OUString SAL_CALL getHyphenatedWord() override
Definition: hyphdta.cxx:89
HyphenatedWord & operator=(const HyphenatedWord &)=delete
HyphenatedWord(const HyphenatedWord &)=delete
static css::uno::Reference< css::linguistic2::XHyphenatedWord > LanguageType sal_Int16 const OUString & rHyphenatedWord
Definition: hyphdta.hxx:67
virtual sal_Int16 SAL_CALL getHyphenPos() override
Definition: hyphdta.cxx:95
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getHyphenationPositions() override
Definition: hyphdta.cxx:141
virtual ~PossibleHyphens() override
Definition: hyphdta.cxx:118
static css::uno::Reference< css::linguistic2::XPossibleHyphens > LanguageType const OUString const css::uno::Sequence< sal_Int16 > & rPositions
Definition: hyphdta.hxx:104
PossibleHyphens(const PossibleHyphens &)=delete
css::uno::Sequence< sal_Int16 > aOrigHyphenPos
Definition: hyphdta.hxx:79
PossibleHyphens & operator=(const PossibleHyphens &)=delete
static css::uno::Reference< css::linguistic2::XPossibleHyphens > LanguageType const OUString & rHyphWord
Definition: hyphdta.hxx:103
static css::uno::Reference< css::linguistic2::XPossibleHyphens > UNLESS_MERGELIBS(LNG_DLLPUBLIC) CreatePossibleHyphens(const OUString &rWord
PossibleHyphens(OUString aWord, LanguageType nLang, OUString aHyphWord, const css::uno::Sequence< sal_Int16 > &rPositions)
virtual OUString SAL_CALL getPossibleHyphens() override
Definition: hyphdta.cxx:135
virtual css::lang::Locale SAL_CALL getLocale() override
Definition: hyphdta.cxx:129
static css::uno::Reference< css::linguistic2::XPossibleHyphens > LanguageType nLang
Definition: hyphdta.hxx:102
virtual OUString SAL_CALL getWord() override
Definition: hyphdta.cxx:123
#define LNG_DLLPUBLIC
Definition: lngdllapi.h:29
unsigned char sal_Bool