Bump version to 6.4.7.2.M8
[LibreOffice.git] / cui / source / inc / thesdlg.hxx
blob65c4050cc4d330a1559fb080b46a1d8adaafd94e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
20 #define INCLUDED_CUI_SOURCE_INC_THESDLG_HXX
22 #include <com/sun/star/linguistic2/XThesaurus.hpp>
24 #include <vcl/idle.hxx>
25 #include <sfx2/basedlgs.hxx>
27 #include <memory>
28 #include <stack>
30 class SvxThesaurusDialog : public SfxDialogController
32 Idle m_aModifyIdle;
34 css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus;
35 OUString aLookUpText;
36 LanguageType nLookUpLanguage;
37 std::stack< OUString > aLookUpHistory;
38 bool m_bWordFound;
40 std::unique_ptr<weld::Button> m_xLeftBtn;
41 std::unique_ptr<weld::ComboBox> m_xWordCB;
42 std::unique_ptr<weld::TreeView> m_xAlternativesCT;
43 std::unique_ptr<weld::Label> m_xNotFound;
44 std::unique_ptr<weld::Entry> m_xReplaceEdit;
45 std::unique_ptr<weld::ComboBox> m_xLangLB;
46 std::unique_ptr<weld::Button> m_xReplaceBtn;
48 public:
49 virtual ~SvxThesaurusDialog() override;
51 // Handler
52 DECL_LINK( ReplaceBtnHdl_Impl, weld::Button&, void );
53 DECL_LINK( LeftBtnHdl_Impl, weld::Button&, void );
54 DECL_LINK( LanguageHdl_Impl, weld::ComboBox&, void );
55 DECL_LINK( WordSelectHdl_Impl, weld::ComboBox&, void );
56 DECL_LINK( AlternativesSelectHdl_Impl, weld::TreeView&, void );
57 DECL_LINK( AlternativesDoubleClickHdl_Impl, weld::TreeView&, bool );
58 DECL_LINK( SelectFirstHdl_Impl, void*, void );
59 DECL_LINK( ReplaceEditHdl_Impl, weld::Entry&, void );
60 DECL_LINK( ModifyTimer_Hdl, Timer *, void );
61 DECL_LINK( KeyInputHdl, const KeyEvent&, bool );
63 /// @throws css::lang::IllegalArgumentException
64 /// @throws css::uno::RuntimeException
65 css::uno::Sequence< css::uno::Reference< css::linguistic2::XMeaning > >
66 queryMeanings_Impl( OUString& rTerm, const css::lang::Locale& rLocale, const css::beans::PropertyValues& rProperties );
68 bool UpdateAlternativesBox_Impl();
69 void LookUp( const OUString &rText );
70 void LookUp_Impl();
72 public:
73 SvxThesaurusDialog(weld::Window* pParent,
74 css::uno::Reference< css::linguistic2::XThesaurus > const & xThesaurus,
75 const OUString &rWord, LanguageType nLanguage);
76 void SetWindowTitle( LanguageType nLanguage );
77 OUString GetWord() const;
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */