xref: /aoo4110/main/linguistic/inc/thesdta.hxx (revision b1cdbd2c)
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 
24 #ifndef _LINGUISTIC_THESDTA_HXX_
25 #define _LINGUISTIC_THESDTA_HXX_
26 
27 
28 #include <com/sun/star/linguistic2/XMeaning.hpp>
29 
30 #include <uno/lbnames.h>			// CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
31 #include <cppuhelper/implbase1.hxx>	// helper for implementations
32 
33 
34 namespace linguistic
35 {
36 
37 ///////////////////////////////////////////////////////////////////////////
38 
39 
40 class ThesaurusMeaning :
41 	public cppu::WeakImplHelper1
42 	<
43 		::com::sun::star::linguistic2::XMeaning
44 	>
45 {
46 
47 protected:
48     ::rtl::OUString aText;              // one of the found 'meanings' for the looked up text
49     ::rtl::OUString aLookUpText;        // text that was looked up in the thesaurus
50     sal_Int16           nLookUpLanguage;    // language of the text that was looked up
51 
52 	// disallow copy-constructor and assignment-operator for now
53     ThesaurusMeaning(const ThesaurusMeaning &);
54     ThesaurusMeaning & operator = (const ThesaurusMeaning &);
55 
56 public:
57     ThesaurusMeaning(const ::rtl::OUString &rText,
58             const ::rtl::OUString &rLookUpText, sal_Int16 nLookUpLang );
59     virtual ~ThesaurusMeaning();
60 
61 	// XMeaning
62     virtual ::rtl::OUString SAL_CALL
63 		getMeaning()
64 			throw(::com::sun::star::uno::RuntimeException);
65     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
66 		querySynonyms()
67             throw(::com::sun::star::uno::RuntimeException) = 0;
68 
69 	// non-interface specific functions
getLookUpText() const70 	const ::rtl::OUString &	getLookUpText() const		{ return aLookUpText; }
getLookUpLanguage() const71 	short		 			getLookUpLanguage() const	{ return nLookUpLanguage; }
72 };
73 
74 
75 ///////////////////////////////////////////////////////////////////////////
76 
77 } // namespace linguistic
78 
79 #endif
80 
81