bump product version to 5.0.4.1
[LibreOffice.git] / cui / source / inc / optlingu.hxx
blob96a02388f8f40fb91e5acfd934d9969539a98842
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 <vcl/group.hxx>
23 #include <vcl/fixed.hxx>
24 #include <vcl/toolbox.hxx>
25 #include <vcl/field.hxx>
26 #include <vcl/fixedhyper.hxx>
27 #include <sfx2/tabdlg.hxx>
28 #include <svx/checklbx.hxx>
29 #include <svx/langbox.hxx>
30 #include <com/sun/star/uno/Reference.hxx>
31 #include <com/sun/star/uno/Sequence.hxx>
32 #include <com/sun/star/beans/XPropertySet.hpp>
34 namespace com{namespace sun{namespace star{
35 namespace beans{
36 class XPropertySet;
38 namespace linguistic2{
39 class XDictionary;
40 class XDictionaryList;
41 class XLinguProperties;
42 }}}}
44 class SvTreeListEntry;
45 class SvxLinguData_Impl;
47 // define ----------------------------------------------------------------
49 #define GROUP_MODULES ((sal_uInt16)0x0008)
51 // forward ---------------------------------------------------------------
53 class SvxEditModulesDlg : public ModalDialog
55 VclPtr<SvxLanguageBox> m_pLanguageLB;
57 VclPtr<SvxCheckListBox> m_pModulesCLB;
58 VclPtr<PushButton> m_pPrioUpPB;
59 VclPtr<PushButton> m_pPrioDownPB;
60 VclPtr<PushButton> m_pBackPB;
61 VclPtr<FixedHyperlink> m_pMoreDictsLink;
63 VclPtr<CloseButton> m_pClosePB;
65 OUString sSpell;
66 OUString sHyph;
67 OUString sThes;
68 OUString sGrammar;
70 SvxLinguData_Impl* pDefaultLinguData;
71 SvxLinguData_Impl& rLinguData;
73 SvLBoxButtonData* pCheckButtonData;
75 SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
77 DECL_LINK(SelectHdl_Impl, SvxCheckListBox *);
78 DECL_LINK(UpDownHdl_Impl, PushButton *);
79 DECL_LINK(ClickHdl_Impl, void *);
80 DECL_LINK(BackHdl_Impl, void *);
81 DECL_LINK( SelectHdlLB_Impl, ListBox * );
82 DECL_LINK( LangSelectHdl_Impl, ListBox* );
83 DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * );
84 DECL_LINK(OpenURLHdl_Impl, void *);
86 public:
87 SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rData);
88 virtual ~SvxEditModulesDlg();
89 virtual void dispose() SAL_OVERRIDE;
92 // class SvxLinguTabPage -------------------------------------------------
94 class SvxLinguTabPage : public SfxTabPage
96 friend class VclPtr<SvxLinguTabPage>;
97 private:
98 VclPtr<FixedText> m_pLinguModulesFT;
99 VclPtr<SvxCheckListBox> m_pLinguModulesCLB;
100 VclPtr<PushButton> m_pLinguModulesEditPB;
101 VclPtr<FixedText> m_pLinguDicsFT;
102 VclPtr<SvxCheckListBox> m_pLinguDicsCLB;
103 VclPtr<PushButton> m_pLinguDicsNewPB;
104 VclPtr<PushButton> m_pLinguDicsEditPB;
105 VclPtr<PushButton> m_pLinguDicsDelPB;
106 VclPtr<SvxCheckListBox> m_pLinguOptionsCLB;
107 VclPtr<PushButton> m_pLinguOptionsEditPB;
108 VclPtr<FixedHyperlink> m_pMoreDictsLink;
110 OUString sCapitalWords;
111 OUString sWordsWithDigits;
112 OUString sSpellSpecial;
113 OUString sSpellAuto;
114 OUString sGrammarAuto;
115 OUString sNumMinWordlen;
116 OUString sNumPreBreak;
117 OUString sNumPostBreak;
118 OUString sHyphAuto;
119 OUString sHyphSpecial;
121 com::sun::star::uno::Reference<
122 com::sun::star::linguistic2::XLinguProperties > xProp;
124 com::sun::star::uno::Reference<
125 com::sun::star::linguistic2::XDictionaryList > xDicList;
126 com::sun::star::uno::Sequence<
127 com::sun::star::uno::Reference<
128 com::sun::star::linguistic2::XDictionary > > aDics;
130 SvLBoxButtonData* pCheckButtonData;
132 SvxLinguData_Impl* pLinguData;
134 SvxLinguTabPage( vcl::Window* pParent, const SfxItemSet& rCoreSet );
135 SvTreeListEntry* CreateEntry(OUString& rTxt, sal_uInt16 nCol);
137 void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
138 static sal_uLong GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx );
140 DECL_LINK( SelectHdl_Impl, SvxCheckListBox * );
141 DECL_LINK( ClickHdl_Impl, PushButton * );
142 DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * );
143 DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * );
144 DECL_LINK(PostDblClickHdl_Impl, void *);
145 DECL_LINK(OpenURLHdl_Impl, void *);
147 void UpdateModulesBox_Impl();
148 void UpdateDicBox_Impl();
150 public:
151 virtual ~SvxLinguTabPage();
152 virtual void dispose() SAL_OVERRIDE;
153 static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* rSet );
155 virtual bool FillItemSet( SfxItemSet* rSet ) SAL_OVERRIDE;
156 virtual void Reset( const SfxItemSet* rSet ) SAL_OVERRIDE;
158 void HideGroups( sal_uInt16 nGrp );
161 #endif
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */