xref: /aoo42x/main/linguistic/inc/thesdta.hxx (revision 63ce064a)
1*63ce064aSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*63ce064aSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*63ce064aSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*63ce064aSAndrew Rist  * distributed with this work for additional information
6*63ce064aSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*63ce064aSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*63ce064aSAndrew Rist  * "License"); you may not use this file except in compliance
9*63ce064aSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*63ce064aSAndrew Rist  *
11*63ce064aSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*63ce064aSAndrew Rist  *
13*63ce064aSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*63ce064aSAndrew Rist  * software distributed under the License is distributed on an
15*63ce064aSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*63ce064aSAndrew Rist  * KIND, either express or implied.  See the License for the
17*63ce064aSAndrew Rist  * specific language governing permissions and limitations
18*63ce064aSAndrew Rist  * under the License.
19*63ce064aSAndrew Rist  *
20*63ce064aSAndrew Rist  *************************************************************/
21*63ce064aSAndrew Rist 
22*63ce064aSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _LINGUISTIC_THESDTA_HXX_
25cdf0e10cSrcweir #define _LINGUISTIC_THESDTA_HXX_
26cdf0e10cSrcweir 
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #include <com/sun/star/linguistic2/XMeaning.hpp>
29cdf0e10cSrcweir 
30cdf0e10cSrcweir #include <uno/lbnames.h>			// CPPU_CURRENT_LANGUAGE_BINDING_NAME macro, which specify the environment type
31cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>	// helper for implementations
32cdf0e10cSrcweir 
33cdf0e10cSrcweir 
34cdf0e10cSrcweir namespace linguistic
35cdf0e10cSrcweir {
36cdf0e10cSrcweir 
37cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////////
38cdf0e10cSrcweir 
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class ThesaurusMeaning :
41cdf0e10cSrcweir 	public cppu::WeakImplHelper1
42cdf0e10cSrcweir 	<
43cdf0e10cSrcweir 		::com::sun::star::linguistic2::XMeaning
44cdf0e10cSrcweir 	>
45cdf0e10cSrcweir {
46cdf0e10cSrcweir 
47cdf0e10cSrcweir protected:
48cdf0e10cSrcweir     ::rtl::OUString aText;              // one of the found 'meanings' for the looked up text
49cdf0e10cSrcweir     ::rtl::OUString aLookUpText;        // text that was looked up in the thesaurus
50cdf0e10cSrcweir     sal_Int16           nLookUpLanguage;    // language of the text that was looked up
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 	// disallow copy-constructor and assignment-operator for now
53cdf0e10cSrcweir     ThesaurusMeaning(const ThesaurusMeaning &);
54cdf0e10cSrcweir     ThesaurusMeaning & operator = (const ThesaurusMeaning &);
55cdf0e10cSrcweir 
56cdf0e10cSrcweir public:
57cdf0e10cSrcweir     ThesaurusMeaning(const ::rtl::OUString &rText,
58cdf0e10cSrcweir             const ::rtl::OUString &rLookUpText, sal_Int16 nLookUpLang );
59cdf0e10cSrcweir     virtual ~ThesaurusMeaning();
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	// XMeaning
62cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL
63cdf0e10cSrcweir 		getMeaning()
64cdf0e10cSrcweir 			throw(::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
66cdf0e10cSrcweir 		querySynonyms()
67cdf0e10cSrcweir             throw(::com::sun::star::uno::RuntimeException) = 0;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 	// non-interface specific functions
getLookUpText() const70cdf0e10cSrcweir 	const ::rtl::OUString &	getLookUpText() const		{ return aLookUpText; }
getLookUpLanguage() const71cdf0e10cSrcweir 	short		 			getLookUpLanguage() const	{ return nLookUpLanguage; }
72cdf0e10cSrcweir };
73cdf0e10cSrcweir 
74cdf0e10cSrcweir 
75cdf0e10cSrcweir ///////////////////////////////////////////////////////////////////////////
76cdf0e10cSrcweir 
77cdf0e10cSrcweir } // namespace linguistic
78cdf0e10cSrcweir 
79cdf0e10cSrcweir #endif
80cdf0e10cSrcweir 
81