1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef _SVX_OPTLINGU_HXX 28*cdf0e10cSrcweir #define _SVX_OPTLINGU_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir // include --------------------------------------------------------------- 31*cdf0e10cSrcweir 32*cdf0e10cSrcweir #include <vcl/group.hxx> 33*cdf0e10cSrcweir #include <vcl/fixed.hxx> 34*cdf0e10cSrcweir #include <vcl/toolbox.hxx> 35*cdf0e10cSrcweir #include <vcl/field.hxx> 36*cdf0e10cSrcweir #include <svtools/fixedhyper.hxx> 37*cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 38*cdf0e10cSrcweir #include <svx/checklbx.hxx> 39*cdf0e10cSrcweir #include <svx/langbox.hxx> 40*cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 41*cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 42*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir namespace com{namespace sun{namespace star{ 45*cdf0e10cSrcweir namespace beans{ 46*cdf0e10cSrcweir class XPropertySet; 47*cdf0e10cSrcweir } 48*cdf0e10cSrcweir namespace linguistic2{ 49*cdf0e10cSrcweir class XDictionary; 50*cdf0e10cSrcweir class XDictionaryList; 51*cdf0e10cSrcweir class XSpellChecker; 52*cdf0e10cSrcweir }}}} 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir class SvLBoxEntry; 55*cdf0e10cSrcweir class SvxLinguData_Impl; 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir // define ---------------------------------------------------------------- 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir #define GROUP_MODULES ((sal_uInt16)0x0008) 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir // forward --------------------------------------------------------------- 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir class SvxEditModulesDlg : public ModalDialog 64*cdf0e10cSrcweir { 65*cdf0e10cSrcweir FixedLine aModulesFL; 66*cdf0e10cSrcweir FixedText aLanguageFT; 67*cdf0e10cSrcweir SvxLanguageBox aLanguageLB; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir SvxCheckListBox aModulesCLB; 70*cdf0e10cSrcweir PushButton aPrioUpPB; 71*cdf0e10cSrcweir PushButton aPrioDownPB; 72*cdf0e10cSrcweir PushButton aBackPB; 73*cdf0e10cSrcweir svt::FixedHyperlink aMoreDictsLink; 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir FixedLine aButtonsFL; 76*cdf0e10cSrcweir HelpButton aHelpPB; 77*cdf0e10cSrcweir OKButton aClosePB; 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir String sSpell; 80*cdf0e10cSrcweir String sHyph; 81*cdf0e10cSrcweir String sThes; 82*cdf0e10cSrcweir String sGrammar; 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir SvxLinguData_Impl* pDefaultLinguData; 85*cdf0e10cSrcweir SvxLinguData_Impl& rLinguData; 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 88*cdf0e10cSrcweir 89*cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 90*cdf0e10cSrcweir 91*cdf0e10cSrcweir #ifdef _SVX_OPTLINGU_CXX 92*cdf0e10cSrcweir DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); 93*cdf0e10cSrcweir DECL_LINK( UpDownHdl_Impl, PushButton * ); 94*cdf0e10cSrcweir DECL_LINK( ClickHdl_Impl, PushButton * ); 95*cdf0e10cSrcweir DECL_LINK( BackHdl_Impl, PushButton * ); 96*cdf0e10cSrcweir DECL_LINK( SelectHdlLB_Impl, ListBox * ); 97*cdf0e10cSrcweir DECL_LINK( LangSelectHdl_Impl, ListBox* ); 98*cdf0e10cSrcweir DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); 99*cdf0e10cSrcweir DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); 100*cdf0e10cSrcweir #endif 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir public: 103*cdf0e10cSrcweir SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData); 104*cdf0e10cSrcweir virtual ~SvxEditModulesDlg(); 105*cdf0e10cSrcweir }; 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir // class SvxLinguTabPage ------------------------------------------------- 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir class SvxLinguTabPage : public SfxTabPage 110*cdf0e10cSrcweir { 111*cdf0e10cSrcweir private: 112*cdf0e10cSrcweir FixedLine aLinguisticFL; 113*cdf0e10cSrcweir FixedText aLinguModulesFT; 114*cdf0e10cSrcweir SvxCheckListBox aLinguModulesCLB; 115*cdf0e10cSrcweir PushButton aLinguModulesEditPB; 116*cdf0e10cSrcweir FixedText aLinguDicsFT; 117*cdf0e10cSrcweir SvxCheckListBox aLinguDicsCLB; 118*cdf0e10cSrcweir PushButton aLinguDicsNewPB; 119*cdf0e10cSrcweir PushButton aLinguDicsEditPB; 120*cdf0e10cSrcweir PushButton aLinguDicsDelPB; 121*cdf0e10cSrcweir FixedText aLinguOptionsFT; 122*cdf0e10cSrcweir SvxCheckListBox aLinguOptionsCLB; 123*cdf0e10cSrcweir PushButton aLinguOptionsEditPB; 124*cdf0e10cSrcweir svt::FixedHyperlink aMoreDictsLink; 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir String sCapitalWords; 127*cdf0e10cSrcweir String sWordsWithDigits; 128*cdf0e10cSrcweir String sCapitalization; 129*cdf0e10cSrcweir String sSpellSpecial; 130*cdf0e10cSrcweir String sSpellAuto; 131*cdf0e10cSrcweir String sGrammarAuto; 132*cdf0e10cSrcweir String sNumMinWordlen; 133*cdf0e10cSrcweir String sNumPreBreak; 134*cdf0e10cSrcweir String sNumPostBreak; 135*cdf0e10cSrcweir String sHyphAuto; 136*cdf0e10cSrcweir String sHyphSpecial; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir com::sun::star::uno::Reference< 139*cdf0e10cSrcweir com::sun::star::beans::XPropertySet > xProp; 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir com::sun::star::uno::Reference< 142*cdf0e10cSrcweir com::sun::star::linguistic2::XDictionaryList > xDicList; 143*cdf0e10cSrcweir com::sun::star::uno::Sequence< 144*cdf0e10cSrcweir com::sun::star::uno::Reference< 145*cdf0e10cSrcweir com::sun::star::linguistic2::XDictionary > > aDics; 146*cdf0e10cSrcweir 147*cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 148*cdf0e10cSrcweir 149*cdf0e10cSrcweir SvxLinguData_Impl* pLinguData; 150*cdf0e10cSrcweir 151*cdf0e10cSrcweir SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); 152*cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); 155*cdf0e10cSrcweir sal_uLong GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir #ifdef _SVX_OPTLINGU_CXX 158*cdf0e10cSrcweir DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); 159*cdf0e10cSrcweir DECL_LINK( ClickHdl_Impl, PushButton * ); 160*cdf0e10cSrcweir DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * ); 161*cdf0e10cSrcweir DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); 162*cdf0e10cSrcweir DECL_LINK( PostDblClickHdl_Impl, SvTreeListBox * ); 163*cdf0e10cSrcweir DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); 164*cdf0e10cSrcweir 165*cdf0e10cSrcweir void UpdateModulesBox_Impl(); 166*cdf0e10cSrcweir void UpdateDicBox_Impl(); 167*cdf0e10cSrcweir #endif 168*cdf0e10cSrcweir 169*cdf0e10cSrcweir public: 170*cdf0e10cSrcweir virtual ~SvxLinguTabPage(); 171*cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 172*cdf0e10cSrcweir static sal_uInt16* GetRanges(); 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 175*cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 176*cdf0e10cSrcweir 177*cdf0e10cSrcweir void HideGroups( sal_uInt16 nGrp ); 178*cdf0e10cSrcweir }; 179*cdf0e10cSrcweir 180*cdf0e10cSrcweir #endif 181*cdf0e10cSrcweir 182