Bump version to 6.4.7.2.M8
[LibreOffice.git] / cui / source / inc / optlingu.hxx
blobb389733b165105b7947f5f2757645b0c72936c09
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_OPTLINGU_HXX
20 #define INCLUDED_CUI_SOURCE_INC_OPTLINGU_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <svx/langbox.hxx>
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <com/sun/star/uno/Sequence.hxx>
27 namespace com{namespace sun{namespace star{
28 namespace beans{
29 class XPropertySet;
31 namespace linguistic2{
32 class XDictionary;
33 class XDictionaryList;
34 class XLinguProperties;
35 }}}}
37 class SvTreeListEntry;
38 class SvxLinguData_Impl;
40 // define ----------------------------------------------------------------
42 #define GROUP_MODULES (sal_uInt16(0x0008))
44 // forward ---------------------------------------------------------------
46 class SvxEditModulesDlg : public weld::GenericDialogController
48 OUString sSpell;
49 OUString sHyph;
50 OUString sThes;
51 OUString sGrammar;
53 std::unique_ptr<SvxLinguData_Impl> pDefaultLinguData;
54 SvxLinguData_Impl& rLinguData;
56 std::unique_ptr<weld::TreeView> m_xModulesCLB;
57 std::unique_ptr<weld::Button> m_xPrioUpPB;
58 std::unique_ptr<weld::Button> m_xPrioDownPB;
59 std::unique_ptr<weld::Button> m_xBackPB;
60 std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
61 std::unique_ptr<weld::Button> m_xClosePB;
62 std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
64 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
65 DECL_LINK( UpDownHdl_Impl, weld::Button&, void );
66 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
67 DECL_LINK( BackHdl_Impl, weld::Button&, void );
68 DECL_LINK( LangSelectListBoxHdl_Impl, weld::ComboBox&, void );
69 typedef std::pair<int, int> row_col;
70 DECL_LINK( BoxCheckButtonHdl_Impl, const row_col&, void );
71 void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
73 public:
74 SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& rData);
75 virtual ~SvxEditModulesDlg() override;
78 struct ImplSVEvent;
80 // class SvxLinguTabPage -------------------------------------------------
81 class SvxLinguTabPage : public SfxTabPage
83 private:
84 OUString sCapitalWords;
85 OUString sWordsWithDigits;
86 OUString sSpellSpecial;
87 OUString sSpellAuto;
88 OUString sGrammarAuto;
89 OUString sNumMinWordlen;
90 OUString sNumPreBreak;
91 OUString sNumPostBreak;
92 OUString sHyphAuto;
93 OUString sHyphSpecial;
95 int nUPN_HYPH_MIN_WORD_LENGTH;
96 int nUPN_HYPH_MIN_LEADING;
97 int nUPN_HYPH_MIN_TRAILING;
99 ImplSVEvent* m_nDlbClickEventId;
101 css::uno::Reference<
102 css::linguistic2::XLinguProperties > xProp;
104 css::uno::Reference<
105 css::linguistic2::XDictionaryList > xDicList;
106 css::uno::Sequence<
107 css::uno::Reference<
108 css::linguistic2::XDictionary > > aDics;
110 std::unique_ptr<SvxLinguData_Impl> pLinguData;
112 std::unique_ptr<weld::Label> m_xLinguModulesFT;
113 std::unique_ptr<weld::TreeView> m_xLinguModulesCLB;
114 std::unique_ptr<weld::Button> m_xLinguModulesEditPB;
115 std::unique_ptr<weld::Label> m_xLinguDicsFT;
116 std::unique_ptr<weld::TreeView> m_xLinguDicsCLB;
117 std::unique_ptr<weld::Button> m_xLinguDicsNewPB;
118 std::unique_ptr<weld::Button> m_xLinguDicsEditPB;
119 std::unique_ptr<weld::Button> m_xLinguDicsDelPB;
120 std::unique_ptr<weld::TreeView> m_xLinguOptionsCLB;
121 std::unique_ptr<weld::Button> m_xLinguOptionsEditPB;
122 std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
124 void AddDicBoxEntry( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
125 static sal_uInt32 GetDicUserData( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
127 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
128 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
129 DECL_LINK( BoxDoubleClickHdl_Impl, weld::TreeView&, bool );
130 typedef std::pair<int, int> row_col;
131 DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const row_col&, void );
132 DECL_LINK( DicsBoxCheckButtonHdl_Impl, const row_col&, void );
133 DECL_LINK( PostDblClickHdl_Impl, void *, void);
135 void UpdateModulesBox_Impl();
136 void UpdateDicBox_Impl();
138 public:
139 SvxLinguTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
140 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
141 virtual ~SvxLinguTabPage() override;
143 virtual bool FillItemSet( SfxItemSet* rSet ) override;
144 virtual void Reset( const SfxItemSet* rSet ) override;
146 void HideGroups( sal_uInt16 nGrp );
149 #endif
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */