2004-02-04 05:59:40 -06:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* $RCSfile: nthesdta.cxx,v $
|
|
|
|
* $Revision: 1.6 $
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
2008-04-10 04:02:54 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-02-04 05:59:40 -06:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 10:12:30 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_lingucomponent.hxx"
|
2004-02-04 05:59:40 -06:00
|
|
|
#include <com/sun/star/uno/Reference.h>
|
|
|
|
#include <tools/debug.hxx>
|
|
|
|
#include <unotools/processfactory.hxx>
|
|
|
|
#include <osl/mutex.hxx>
|
|
|
|
|
|
|
|
#include "nthesdta.hxx"
|
|
|
|
#include <linguistic/misc.hxx>
|
|
|
|
|
|
|
|
// #include "lngsvcmgr.hxx"
|
|
|
|
|
|
|
|
|
|
|
|
using namespace utl;
|
|
|
|
using namespace osl;
|
|
|
|
using namespace rtl;
|
|
|
|
using namespace com::sun::star;
|
|
|
|
using namespace com::sun::star::beans;
|
|
|
|
using namespace com::sun::star::lang;
|
|
|
|
using namespace com::sun::star::uno;
|
|
|
|
using namespace com::sun::star::linguistic2;
|
|
|
|
|
|
|
|
namespace linguistic
|
|
|
|
{
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
Meaning::Meaning(
|
|
|
|
#if 0
|
|
|
|
const OUString &rTerm, INT16 nLang,
|
|
|
|
const PropertyHelper_Thes &rHelper ) :
|
|
|
|
#else
|
|
|
|
const OUString &rTerm, INT16 nLang) :
|
|
|
|
#endif
|
|
|
|
|
2006-06-19 17:57:43 -05:00
|
|
|
aSyn ( Sequence< OUString >(1) ),
|
2004-02-04 05:59:40 -06:00
|
|
|
aTerm (rTerm),
|
2006-06-19 17:57:43 -05:00
|
|
|
nLanguage (nLang)
|
2004-02-04 05:59:40 -06:00
|
|
|
|
|
|
|
{
|
|
|
|
#if 0
|
|
|
|
// this is for future use by a german thesaurus when one exists
|
|
|
|
bIsGermanPreReform = rHelper.IsGermanPreReform;
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Meaning::~Meaning()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OUString SAL_CALL Meaning::getMeaning()
|
|
|
|
throw(RuntimeException)
|
|
|
|
{
|
|
|
|
MutexGuard aGuard( GetLinguMutex() );
|
|
|
|
return aTerm;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Sequence< OUString > SAL_CALL Meaning::querySynonyms()
|
|
|
|
throw(RuntimeException)
|
|
|
|
{
|
|
|
|
MutexGuard aGuard( GetLinguMutex() );
|
|
|
|
return aSyn;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
|
|
|
|
{
|
|
|
|
MutexGuard aGuard( GetLinguMutex() );
|
|
|
|
aSyn = rSyn;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Meaning::SetMeaning( const OUString &rTerm )
|
|
|
|
{
|
|
|
|
MutexGuard aGuard( GetLinguMutex() );
|
|
|
|
aTerm = rTerm;
|
|
|
|
}
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
} // namespace linguistic
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|