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_lnth.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 {
78 MutexGuard aGuard( GetLinguMutex() );
79 return aTerm;
80 }
81
82
querySynonyms()83 Sequence< OUString > SAL_CALL Meaning::querySynonyms()
84 {
85 MutexGuard aGuard( GetLinguMutex() );
86 return aSyn;
87 }
88
89
SetSynonyms(const Sequence<OUString> & rSyn)90 void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
91 {
92 MutexGuard aGuard( GetLinguMutex() );
93 aSyn = rSyn;
94 }
95
SetMeaning(const OUString & rTerm)96 void Meaning::SetMeaning( const OUString &rTerm )
97 {
98 MutexGuard aGuard( GetLinguMutex() );
99 aTerm = rTerm;
100 }
101
102 ///////////////////////////////////////////////////////////////////////////
103
104 } // namespace linguistic
105