2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2013-10-28 03:46:16 +01:00
|
|
|
#ifndef INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
|
|
|
|
#define INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
|
2009-12-10 19:12:58 +01:00
|
|
|
|
2010-02-26 08:13:29 +01:00
|
|
|
#include <com/sun/star/linguistic2/XThesaurus.hpp>
|
2009-12-10 19:12:58 +01:00
|
|
|
|
2015-01-14 10:21:20 +01:00
|
|
|
#include <vcl/idle.hxx>
|
2019-05-31 16:50:35 +01:00
|
|
|
#include <sfx2/basedlgs.hxx>
|
2009-12-10 19:12:58 +01:00
|
|
|
|
2010-03-05 13:36:31 +01:00
|
|
|
#include <memory>
|
2018-11-12 20:55:41 +01:00
|
|
|
#include <stack>
|
2009-12-10 19:12:58 +01:00
|
|
|
|
2019-05-31 16:50:35 +01:00
|
|
|
class SvxThesaurusDialog : public SfxDialogController
|
2012-10-03 11:41:30 +01:00
|
|
|
{
|
2019-05-31 16:50:35 +01:00
|
|
|
Idle m_aModifyIdle;
|
2012-10-03 11:41:30 +01:00
|
|
|
|
2013-04-27 23:04:15 +02:00
|
|
|
css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus;
|
2012-10-03 11:41:30 +01:00
|
|
|
OUString aLookUpText;
|
|
|
|
LanguageType nLookUpLanguage;
|
|
|
|
std::stack< OUString > aLookUpHistory;
|
|
|
|
bool m_bWordFound;
|
|
|
|
|
2019-05-31 16:50:35 +01:00
|
|
|
std::unique_ptr<weld::Button> m_xLeftBtn;
|
|
|
|
std::unique_ptr<weld::ComboBox> m_xWordCB;
|
|
|
|
std::unique_ptr<weld::TreeView> m_xAlternativesCT;
|
|
|
|
std::unique_ptr<weld::Label> m_xNotFound;
|
|
|
|
std::unique_ptr<weld::Entry> m_xReplaceEdit;
|
|
|
|
std::unique_ptr<weld::ComboBox> m_xLangLB;
|
|
|
|
std::unique_ptr<weld::Button> m_xReplaceBtn;
|
|
|
|
|
2012-10-03 11:41:30 +01:00
|
|
|
public:
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvxThesaurusDialog() override;
|
2015-03-09 14:29:30 +02:00
|
|
|
|
2012-10-03 11:41:30 +01:00
|
|
|
// Handler
|
2019-05-31 16:50:35 +01:00
|
|
|
DECL_LINK( ReplaceBtnHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( LeftBtnHdl_Impl, weld::Button&, void );
|
|
|
|
DECL_LINK( LanguageHdl_Impl, weld::ComboBox&, void );
|
|
|
|
DECL_LINK( WordSelectHdl_Impl, weld::ComboBox&, void );
|
|
|
|
DECL_LINK( AlternativesSelectHdl_Impl, weld::TreeView&, void );
|
2019-10-05 18:36:38 +01:00
|
|
|
DECL_LINK( AlternativesDoubleClickHdl_Impl, weld::TreeView&, bool );
|
2019-05-31 16:50:35 +01:00
|
|
|
DECL_LINK( SelectFirstHdl_Impl, void*, void );
|
|
|
|
DECL_LINK( ReplaceEditHdl_Impl, weld::Entry&, void );
|
|
|
|
DECL_LINK( ModifyTimer_Hdl, Timer *, void );
|
|
|
|
DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
|
2012-10-03 11:41:30 +01:00
|
|
|
|
2017-01-19 17:59:13 +01:00
|
|
|
/// @throws css::lang::IllegalArgumentException
|
|
|
|
/// @throws css::uno::RuntimeException
|
2013-04-27 23:04:15 +02:00
|
|
|
css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > >
|
2017-01-26 12:28:58 +01:00
|
|
|
queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties );
|
2010-02-26 08:13:29 +01:00
|
|
|
|
2012-10-03 11:41:30 +01:00
|
|
|
bool UpdateAlternativesBox_Impl();
|
2013-09-26 08:30:52 +02:00
|
|
|
void LookUp( const OUString &rText );
|
2012-10-03 11:41:30 +01:00
|
|
|
void LookUp_Impl();
|
2009-12-10 19:12:58 +01:00
|
|
|
|
2010-02-26 08:13:29 +01:00
|
|
|
public:
|
2019-05-31 16:50:35 +01:00
|
|
|
SvxThesaurusDialog(weld::Window* pParent,
|
|
|
|
css::uno::Reference< css::linguistic2::XThesaurus > const & xThesaurus,
|
|
|
|
const OUString &rWord, LanguageType nLanguage);
|
2010-03-01 11:14:01 +01:00
|
|
|
void SetWindowTitle( LanguageType nLanguage );
|
2019-09-04 16:07:56 +02:00
|
|
|
OUString GetWord() const;
|
2009-12-10 19:12:58 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|