1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 // MARKER(update_precomp.py): autogen include statement, do not remove 29 #include "precompiled_lingucomponent.hxx" 30 #include <com/sun/star/uno/Reference.h> 31 #include <tools/debug.hxx> 32 #include <unotools/processfactory.hxx> 33 #include <osl/mutex.hxx> 34 35 #include "nthesdta.hxx" 36 #include <linguistic/misc.hxx> 37 38 // #include "lngsvcmgr.hxx" 39 40 41 using namespace utl; 42 using namespace osl; 43 using namespace rtl; 44 using namespace com::sun::star; 45 using namespace com::sun::star::beans; 46 using namespace com::sun::star::lang; 47 using namespace com::sun::star::uno; 48 using namespace com::sun::star::linguistic2; 49 50 namespace linguistic 51 { 52 53 /////////////////////////////////////////////////////////////////////////// 54 55 Meaning::Meaning( 56 #if 0 57 const OUString &rTerm, sal_Int16 nLang, 58 const PropertyHelper_Thes &rHelper ) : 59 #else 60 const OUString &rTerm, sal_Int16 nLang) : 61 #endif 62 63 aSyn ( Sequence< OUString >(1) ), 64 aTerm (rTerm), 65 nLanguage (nLang) 66 67 { 68 #if 0 69 // this is for future use by a german thesaurus when one exists 70 bIsGermanPreReform = rHelper.IsGermanPreReform; 71 #endif 72 } 73 74 75 Meaning::~Meaning() 76 { 77 } 78 79 80 OUString SAL_CALL Meaning::getMeaning() 81 throw(RuntimeException) 82 { 83 MutexGuard aGuard( GetLinguMutex() ); 84 return aTerm; 85 } 86 87 88 Sequence< OUString > SAL_CALL Meaning::querySynonyms() 89 throw(RuntimeException) 90 { 91 MutexGuard aGuard( GetLinguMutex() ); 92 return aSyn; 93 } 94 95 96 void Meaning::SetSynonyms( const Sequence< OUString > &rSyn ) 97 { 98 MutexGuard aGuard( GetLinguMutex() ); 99 aSyn = rSyn; 100 } 101 102 void Meaning::SetMeaning( const OUString &rTerm ) 103 { 104 MutexGuard aGuard( GetLinguMutex() ); 105 aTerm = rTerm; 106 } 107 108 /////////////////////////////////////////////////////////////////////////// 109 110 } // namespace linguistic 111 112 113 114 115 116 117