xref: /AOO41X/main/offapi/com/sun/star/linguistic2/XDictionaryEntry.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_linguistic2_XDictionaryEntry_idl__
24#define __com_sun_star_linguistic2_XDictionaryEntry_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_lang_Locale_idl__
31#include <com/sun/star/lang/Locale.idl>
32#endif
33
34//=============================================================================
35
36module com { module sun { module star { module linguistic2 {
37
38//=============================================================================
39/** This interfaces gives access to a dictionary entry.
40
41    <P>A dictionary entry can supply a word and its hyhenation
42    and indicate if it is a negative word.
43    If it is a negative entry it may supply a replacement text to
44    be used instead of the entry word.</P>
45
46    <P>Hyphenation positions are represented by an '=' in the word.
47    If the '=' is the last character of the word this means it should not
48    be hyphenated. If there is no '=' charcter in the word, hyphenation
49    positions will be determined automatically (i.e., from the hyphenator
50    service alone).</P>
51
52    <P>Entries whose words only differ in hyphenation are considered
53    to be equal. Also a '.' at the end of the word will make no
54    difference.</P>
55
56    @see    <type scope="com::sun::star::linguistic2">XDictionary</type>
57    @see    <type scope="com::sun::star::uno">XInterface</type>
58*/
59published interface XDictionaryEntry : com::sun::star::uno::XInterface
60{
61    //-------------------------------------------------------------------------
62    /**
63        @returns
64            the word defining this entry.
65     */
66    string getDictionaryWord();
67
68    //-------------------------------------------------------------------------
69    /**
70        @returns
71            <TRUE/> if the word (entry) is a negative one and should not be
72            used, <FALSE/> otherwise.
73    */
74    boolean isNegative();
75
76    //-------------------------------------------------------------------------
77    /** is the suggested replacement text for negative words.
78
79        <p>It is undefined if the entry is not negative.</p>
80
81        @returns
82            the replacement text for a negative entry.
83            An empty string indicates that no replacement text is provided.
84     */
85    string getReplacementText();
86
87};
88
89//=============================================================================
90
91}; }; }; };
92
93#endif
94