LibreOffice Module cui (master) 1
optlingu.hxx
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#pragma once
20
21#include <sfx2/tabdlg.hxx>
22#include <svx/langbox.hxx>
23#include <com/sun/star/uno/Reference.hxx>
24#include <com/sun/star/uno/Sequence.hxx>
25
26namespace com::sun::star{
27 namespace beans{
28 class XPropertySet;
29 }
30 namespace linguistic2{
31 class XDictionary;
32 class XDictionaryList;
33 class XLinguProperties;
34 }
35}
36
38
39// define ----------------------------------------------------------------
40
41#define GROUP_MODULES (sal_uInt16(0x0008))
42
43// forward ---------------------------------------------------------------
44
46{
47 OUString sSpell;
48 OUString sHyph;
49 OUString sThes;
50 OUString sGrammar;
51
52 std::unique_ptr<SvxLinguData_Impl> pDefaultLinguData;
54
55 std::unique_ptr<weld::TreeView> m_xModulesCLB;
56 std::unique_ptr<weld::Button> m_xPrioUpPB;
57 std::unique_ptr<weld::Button> m_xPrioDownPB;
58 std::unique_ptr<weld::Button> m_xBackPB;
59 std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
60 std::unique_ptr<weld::Button> m_xClosePB;
61 std::unique_ptr<SvxLanguageBox> m_xLanguageLB;
62
63 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
64 DECL_LINK( UpDownHdl_Impl, weld::Button&, void );
65 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
66 DECL_LINK( BackHdl_Impl, weld::Button&, void );
67 DECL_LINK( LangSelectListBoxHdl_Impl, weld::ComboBox&, void );
68 DECL_LINK( BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
70 void LangSelectHdl_Impl(const SvxLanguageBox* pBox);
71
72public:
74 virtual ~SvxEditModulesDlg() override;
75};
76
77struct ImplSVEvent;
78
79// class SvxLinguTabPage -------------------------------------------------
81{
82private:
83 OUString sCapitalWords;
85 OUString sSpellSpecial;
86 OUString sSpellAuto;
89 OUString sGrammarAuto;
91 OUString sNumPreBreak;
92 OUString sNumPostBreak;
93 OUString sHyphAuto;
94 OUString sHyphSpecial;
95
99
101
102 css::uno::Reference<
103 css::linguistic2::XLinguProperties > xProp;
104
105 css::uno::Reference<
106 css::linguistic2::XDictionaryList > xDicList;
107 css::uno::Sequence<
108 css::uno::Reference<
109 css::linguistic2::XDictionary > > aDics;
110
111 std::unique_ptr<SvxLinguData_Impl> pLinguData;
112
113 std::unique_ptr<weld::Label> m_xLinguModulesFT;
114 std::unique_ptr<weld::TreeView> m_xLinguModulesCLB;
115 std::unique_ptr<weld::Button> m_xLinguModulesEditPB;
116 std::unique_ptr<weld::Label> m_xLinguDicsFT;
117 std::unique_ptr<weld::TreeView> m_xLinguDicsCLB;
118 std::unique_ptr<weld::Button> m_xLinguDicsNewPB;
119 std::unique_ptr<weld::Button> m_xLinguDicsEditPB;
120 std::unique_ptr<weld::Button> m_xLinguDicsDelPB;
121 std::unique_ptr<weld::TreeView> m_xLinguOptionsCLB;
122 std::unique_ptr<weld::Button> m_xLinguOptionsEditPB;
123 std::unique_ptr<weld::Box> m_xMoreDictsBox;
124 std::unique_ptr<weld::LinkButton> m_xMoreDictsLink;
125
126 void AddDicBoxEntry( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
127 static sal_uInt32 GetDicUserData( const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
128
129 DECL_LINK( SelectHdl_Impl, weld::TreeView&, void );
130 DECL_LINK( ClickHdl_Impl, weld::Button&, void );
131 DECL_LINK( BoxDoubleClickHdl_Impl, weld::TreeView&, bool );
132 DECL_LINK( ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
133 DECL_LINK( DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col&, void );
134 DECL_LINK( PostDblClickHdl_Impl, void *, void);
136
138 void UpdateDicBox_Impl();
139
140public:
141 SvxLinguTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet);
142 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
143 virtual ~SvxLinguTabPage() override;
144
145 virtual bool FillItemSet( SfxItemSet* rSet ) override;
146 virtual void Reset( const SfxItemSet* rSet ) override;
147
148 void HideGroups( sal_uInt16 nGrp );
149};
150
151/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Button > m_xClosePB
Definition: optlingu.hxx:60
OUString sThes
Definition: optlingu.hxx:49
DECL_LINK(SelectHdl_Impl, weld::TreeView &, void)
DECL_STATIC_LINK(SvxEditModulesDlg, OnLinkClick, weld::LinkButton &, bool)
DECL_LINK(BackHdl_Impl, weld::Button &, void)
DECL_LINK(ClickHdl_Impl, weld::Button &, void)
DECL_LINK(UpDownHdl_Impl, weld::Button &, void)
std::unique_ptr< weld::Button > m_xBackPB
Definition: optlingu.hxx:58
OUString sGrammar
Definition: optlingu.hxx:50
std::unique_ptr< SvxLanguageBox > m_xLanguageLB
Definition: optlingu.hxx:61
SvxLinguData_Impl & rLinguData
Definition: optlingu.hxx:53
std::unique_ptr< weld::Button > m_xPrioUpPB
Definition: optlingu.hxx:56
std::unique_ptr< weld::Button > m_xPrioDownPB
Definition: optlingu.hxx:57
DECL_LINK(LangSelectListBoxHdl_Impl, weld::ComboBox &, void)
std::unique_ptr< weld::LinkButton > m_xMoreDictsLink
Definition: optlingu.hxx:59
OUString sSpell
Definition: optlingu.hxx:47
std::unique_ptr< weld::TreeView > m_xModulesCLB
Definition: optlingu.hxx:55
void LangSelectHdl_Impl(const SvxLanguageBox *pBox)
Definition: optlingu.cxx:1674
SvxEditModulesDlg(weld::Window *pParent, SvxLinguData_Impl &rData)
Definition: optlingu.cxx:1564
DECL_LINK(BoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, void)
OUString sHyph
Definition: optlingu.hxx:48
virtual ~SvxEditModulesDlg() override
Definition: optlingu.cxx:1620
std::unique_ptr< SvxLinguData_Impl > pDefaultLinguData
Definition: optlingu.hxx:52
std::unique_ptr< weld::TreeView > m_xLinguOptionsCLB
Definition: optlingu.hxx:121
std::unique_ptr< weld::Label > m_xLinguDicsFT
Definition: optlingu.hxx:116
int nUPN_HYPH_MIN_TRAILING
Definition: optlingu.hxx:98
DECL_LINK(ModulesBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, void)
int nUPN_HYPH_MIN_WORD_LENGTH
Definition: optlingu.hxx:96
DECL_STATIC_LINK(SvxLinguTabPage, OnLinkClick, weld::LinkButton &, bool)
std::unique_ptr< weld::TreeView > m_xLinguDicsCLB
Definition: optlingu.hxx:117
OUString sWordsWithDigits
Definition: optlingu.hxx:84
std::unique_ptr< weld::Label > m_xLinguModulesFT
Definition: optlingu.hxx:113
OUString sNumMinWordlen
Definition: optlingu.hxx:90
OUString sSpellClosedCompound
Definition: optlingu.hxx:87
std::unique_ptr< weld::Button > m_xLinguDicsNewPB
Definition: optlingu.hxx:118
std::unique_ptr< weld::LinkButton > m_xMoreDictsLink
Definition: optlingu.hxx:124
std::unique_ptr< weld::Button > m_xLinguModulesEditPB
Definition: optlingu.hxx:115
css::uno::Reference< css::linguistic2::XLinguProperties > xProp
Definition: optlingu.hxx:103
std::unique_ptr< weld::Button > m_xLinguDicsEditPB
Definition: optlingu.hxx:119
void UpdateDicBox_Impl()
Definition: optlingu.cxx:1107
OUString sNumPostBreak
Definition: optlingu.hxx:92
OUString sNumPreBreak
Definition: optlingu.hxx:91
DECL_LINK(DicsBoxCheckButtonHdl_Impl, const weld::TreeView::iter_col &, void)
std::unique_ptr< weld::Box > m_xMoreDictsBox
Definition: optlingu.hxx:123
css::uno::Sequence< css::uno::Reference< css::linguistic2::XDictionary > > aDics
Definition: optlingu.hxx:109
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: optlingu.cxx:918
SvxLinguTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rCoreSet)
Definition: optlingu.cxx:818
OUString sSpellHyphenatedCompound
Definition: optlingu.hxx:88
std::unique_ptr< weld::TreeView > m_xLinguModulesCLB
Definition: optlingu.hxx:114
css::uno::Reference< css::linguistic2::XDictionaryList > xDicList
Definition: optlingu.hxx:106
OUString sHyphAuto
Definition: optlingu.hxx:93
static sal_uInt32 GetDicUserData(const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx)
Definition: optlingu.cxx:1069
std::unique_ptr< weld::Button > m_xLinguOptionsEditPB
Definition: optlingu.hxx:122
ImplSVEvent * m_nDlbClickEventId
Definition: optlingu.hxx:100
int nUPN_HYPH_MIN_LEADING
Definition: optlingu.hxx:97
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optlingu.cxx:924
DECL_LINK(SelectHdl_Impl, weld::TreeView &, void)
std::unique_ptr< weld::Button > m_xLinguDicsDelPB
Definition: optlingu.hxx:120
OUString sSpellAuto
Definition: optlingu.hxx:86
void HideGroups(sal_uInt16 nGrp)
Definition: optlingu.cxx:1542
DECL_LINK(ClickHdl_Impl, weld::Button &, void)
OUString sCapitalWords
Definition: optlingu.hxx:83
virtual void Reset(const SfxItemSet *rSet) override
Definition: optlingu.cxx:1155
DECL_LINK(PostDblClickHdl_Impl, void *, void)
void UpdateModulesBox_Impl()
Definition: optlingu.cxx:1129
std::unique_ptr< SvxLinguData_Impl > pLinguData
Definition: optlingu.hxx:111
OUString sHyphSpecial
Definition: optlingu.hxx:94
void AddDicBoxEntry(const css::uno::Reference< css::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx)
Definition: optlingu.cxx:1088
virtual ~SvxLinguTabPage() override
Definition: optlingu.cxx:908
OUString sGrammarAuto
Definition: optlingu.hxx:89
DECL_LINK(BoxDoubleClickHdl_Impl, weld::TreeView &, bool)
OUString sSpellSpecial
Definition: optlingu.hxx:85
std::pair< const TreeIter &, int > iter_col
class SAL_NO_VTABLE XPropertySet