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 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_lingucomponent.hxx"
26 #include <com/sun/star/uno/Reference.h>
27 #include <tools/debug.hxx>
28 #include <unotools/processfactory.hxx>
29 #include <osl/mutex.hxx>
30 
31 #include "nthesdta.hxx"
32 #include <linguistic/misc.hxx>
33 
34 // #include "lngsvcmgr.hxx"
35 
36 
37 using namespace utl;
38 using namespace osl;
39 using namespace rtl;
40 using namespace com::sun::star;
41 using namespace com::sun::star::beans;
42 using namespace com::sun::star::lang;
43 using namespace com::sun::star::uno;
44 using namespace com::sun::star::linguistic2;
45 
46 namespace linguistic
47 {
48 
49 ///////////////////////////////////////////////////////////////////////////
50 
Meaning(const OUString & rTerm,sal_Int16 nLang)51 Meaning::Meaning(
52 #if 0
53 			const OUString &rTerm, sal_Int16 nLang,
54 			const PropertyHelper_Thes &rHelper ) :
55 #else
56 			const OUString &rTerm, sal_Int16 nLang) :
57 #endif
58 
59     aSyn        ( Sequence< OUString >(1) ),
60     aTerm       (rTerm),
61     nLanguage   (nLang)
62 
63 {
64 #if 0
65     // this is for future use by a german thesaurus when one exists
66     bIsGermanPreReform = rHelper.IsGermanPreReform;
67 #endif
68 }
69 
70 
~Meaning()71 Meaning::~Meaning()
72 {
73 }
74 
75 
getMeaning()76 OUString SAL_CALL Meaning::getMeaning()
77 		throw(RuntimeException)
78 {
79 	MutexGuard	aGuard( GetLinguMutex() );
80 	return aTerm;
81 }
82 
83 
querySynonyms()84 Sequence< OUString > SAL_CALL Meaning::querySynonyms()
85 		throw(RuntimeException)
86 {
87 	MutexGuard	aGuard( GetLinguMutex() );
88         return aSyn;
89 }
90 
91 
SetSynonyms(const Sequence<OUString> & rSyn)92 void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
93 {
94         MutexGuard      aGuard( GetLinguMutex() );
95         aSyn = rSyn;
96 }
97 
SetMeaning(const OUString & rTerm)98 void Meaning::SetMeaning( const OUString &rTerm )
99 {
100         MutexGuard      aGuard( GetLinguMutex() );
101         aTerm = rTerm;
102 }
103 
104 ///////////////////////////////////////////////////////////////////////////
105 
106 }	// namespace linguistic
107 
108 
109 
110 
111 
112 
113