LibreOffice Module lingucomponent (master) 1
nthesdta.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <osl/mutex.hxx>
21
22#include "nthesdta.hxx"
23#include <linguistic/misc.hxx>
24#include <utility>
25
26using namespace osl;
27using namespace com::sun::star;
28using namespace com::sun::star::beans;
29using namespace com::sun::star::lang;
30using namespace com::sun::star::uno;
31using namespace com::sun::star::linguistic2;
32
33namespace linguistic
34{
35
36Meaning::Meaning(OUString _aTerm) :
37 aSyn ( Sequence< OUString >(1) ),
38 aTerm (std::move(_aTerm))
39{
40#if 0
41 // this is for future use by a german thesaurus when one exists
42 bIsGermanPreReform = rHelper.IsGermanPreReform;
43#endif
44}
45
47{
48}
49
50OUString SAL_CALL Meaning::getMeaning()
51{
52 MutexGuard aGuard( GetLinguMutex() );
53 return aTerm;
54}
55
57{
58 MutexGuard aGuard( GetLinguMutex() );
59 return aSyn;
60}
61
63{
64 MutexGuard aGuard( GetLinguMutex() );
65 aSyn = rSyn;
66}
67
68void Meaning::SetMeaning( const OUString &rTerm )
69{
70 MutexGuard aGuard( GetLinguMutex() );
71 aTerm = rTerm;
72}
73
74} // namespace linguistic
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Meaning(const Meaning &)=delete
virtual css::uno::Sequence< OUString > SAL_CALL querySynonyms() override
Definition: nthesdta.cxx:56
css::uno::Sequence< OUString > aSyn
Definition: nthesdta.hxx:32
virtual ~Meaning() override
Definition: nthesdta.cxx:46
void SetMeaning(const OUString &rTerm)
Definition: nthesdta.cxx:68
virtual OUString SAL_CALL getMeaning() override
Definition: nthesdta.cxx:50
void SetSynonyms(const css::uno::Sequence< OUString > &rSyn)
Definition: nthesdta.cxx:62
osl::Mutex & GetLinguMutex()