1*c4eee24dSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*c4eee24dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*c4eee24dSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*c4eee24dSAndrew Rist * distributed with this work for additional information 6*c4eee24dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*c4eee24dSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*c4eee24dSAndrew Rist * "License"); you may not use this file except in compliance 9*c4eee24dSAndrew Rist * with the License. You may obtain a copy of the License at 10*c4eee24dSAndrew Rist * 11*c4eee24dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*c4eee24dSAndrew Rist * 13*c4eee24dSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*c4eee24dSAndrew Rist * software distributed under the License is distributed on an 15*c4eee24dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*c4eee24dSAndrew Rist * KIND, either express or implied. See the License for the 17*c4eee24dSAndrew Rist * specific language governing permissions and limitations 18*c4eee24dSAndrew Rist * under the License. 19*c4eee24dSAndrew Rist * 20*c4eee24dSAndrew Rist *************************************************************/ 21*c4eee24dSAndrew Rist 22*c4eee24dSAndrew Rist 23cdf0e10cSrcweir #ifndef _SVX_OPTLINGU_HXX 24cdf0e10cSrcweir #define _SVX_OPTLINGU_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir // include --------------------------------------------------------------- 27cdf0e10cSrcweir 28cdf0e10cSrcweir #include <vcl/group.hxx> 29cdf0e10cSrcweir #include <vcl/fixed.hxx> 30cdf0e10cSrcweir #include <vcl/toolbox.hxx> 31cdf0e10cSrcweir #include <vcl/field.hxx> 32cdf0e10cSrcweir #include <svtools/fixedhyper.hxx> 33cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 34cdf0e10cSrcweir #include <svx/checklbx.hxx> 35cdf0e10cSrcweir #include <svx/langbox.hxx> 36cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 37cdf0e10cSrcweir #include <com/sun/star/uno/Sequence.hxx> 38cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 39cdf0e10cSrcweir 40cdf0e10cSrcweir namespace com{namespace sun{namespace star{ 41cdf0e10cSrcweir namespace beans{ 42cdf0e10cSrcweir class XPropertySet; 43cdf0e10cSrcweir } 44cdf0e10cSrcweir namespace linguistic2{ 45cdf0e10cSrcweir class XDictionary; 46cdf0e10cSrcweir class XDictionaryList; 47cdf0e10cSrcweir class XSpellChecker; 48cdf0e10cSrcweir }}}} 49cdf0e10cSrcweir 50cdf0e10cSrcweir class SvLBoxEntry; 51cdf0e10cSrcweir class SvxLinguData_Impl; 52cdf0e10cSrcweir 53cdf0e10cSrcweir // define ---------------------------------------------------------------- 54cdf0e10cSrcweir 55cdf0e10cSrcweir #define GROUP_MODULES ((sal_uInt16)0x0008) 56cdf0e10cSrcweir 57cdf0e10cSrcweir // forward --------------------------------------------------------------- 58cdf0e10cSrcweir 59cdf0e10cSrcweir class SvxEditModulesDlg : public ModalDialog 60cdf0e10cSrcweir { 61cdf0e10cSrcweir FixedLine aModulesFL; 62cdf0e10cSrcweir FixedText aLanguageFT; 63cdf0e10cSrcweir SvxLanguageBox aLanguageLB; 64cdf0e10cSrcweir 65cdf0e10cSrcweir SvxCheckListBox aModulesCLB; 66cdf0e10cSrcweir PushButton aPrioUpPB; 67cdf0e10cSrcweir PushButton aPrioDownPB; 68cdf0e10cSrcweir PushButton aBackPB; 69cdf0e10cSrcweir svt::FixedHyperlink aMoreDictsLink; 70cdf0e10cSrcweir 71cdf0e10cSrcweir FixedLine aButtonsFL; 72cdf0e10cSrcweir HelpButton aHelpPB; 73cdf0e10cSrcweir OKButton aClosePB; 74cdf0e10cSrcweir 75cdf0e10cSrcweir String sSpell; 76cdf0e10cSrcweir String sHyph; 77cdf0e10cSrcweir String sThes; 78cdf0e10cSrcweir String sGrammar; 79cdf0e10cSrcweir 80cdf0e10cSrcweir SvxLinguData_Impl* pDefaultLinguData; 81cdf0e10cSrcweir SvxLinguData_Impl& rLinguData; 82cdf0e10cSrcweir 83cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 84cdf0e10cSrcweir 85cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 86cdf0e10cSrcweir 87cdf0e10cSrcweir #ifdef _SVX_OPTLINGU_CXX 88cdf0e10cSrcweir DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); 89cdf0e10cSrcweir DECL_LINK( UpDownHdl_Impl, PushButton * ); 90cdf0e10cSrcweir DECL_LINK( ClickHdl_Impl, PushButton * ); 91cdf0e10cSrcweir DECL_LINK( BackHdl_Impl, PushButton * ); 92cdf0e10cSrcweir DECL_LINK( SelectHdlLB_Impl, ListBox * ); 93cdf0e10cSrcweir DECL_LINK( LangSelectHdl_Impl, ListBox* ); 94cdf0e10cSrcweir DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); 95cdf0e10cSrcweir DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); 96cdf0e10cSrcweir #endif 97cdf0e10cSrcweir 98cdf0e10cSrcweir public: 99cdf0e10cSrcweir SvxEditModulesDlg(Window* pParent, SvxLinguData_Impl& rData); 100cdf0e10cSrcweir virtual ~SvxEditModulesDlg(); 101cdf0e10cSrcweir }; 102cdf0e10cSrcweir 103cdf0e10cSrcweir // class SvxLinguTabPage ------------------------------------------------- 104cdf0e10cSrcweir 105cdf0e10cSrcweir class SvxLinguTabPage : public SfxTabPage 106cdf0e10cSrcweir { 107cdf0e10cSrcweir private: 108cdf0e10cSrcweir FixedLine aLinguisticFL; 109cdf0e10cSrcweir FixedText aLinguModulesFT; 110cdf0e10cSrcweir SvxCheckListBox aLinguModulesCLB; 111cdf0e10cSrcweir PushButton aLinguModulesEditPB; 112cdf0e10cSrcweir FixedText aLinguDicsFT; 113cdf0e10cSrcweir SvxCheckListBox aLinguDicsCLB; 114cdf0e10cSrcweir PushButton aLinguDicsNewPB; 115cdf0e10cSrcweir PushButton aLinguDicsEditPB; 116cdf0e10cSrcweir PushButton aLinguDicsDelPB; 117cdf0e10cSrcweir FixedText aLinguOptionsFT; 118cdf0e10cSrcweir SvxCheckListBox aLinguOptionsCLB; 119cdf0e10cSrcweir PushButton aLinguOptionsEditPB; 120cdf0e10cSrcweir svt::FixedHyperlink aMoreDictsLink; 121cdf0e10cSrcweir 122cdf0e10cSrcweir String sCapitalWords; 123cdf0e10cSrcweir String sWordsWithDigits; 124cdf0e10cSrcweir String sCapitalization; 125cdf0e10cSrcweir String sSpellSpecial; 126cdf0e10cSrcweir String sSpellAuto; 127cdf0e10cSrcweir String sGrammarAuto; 128cdf0e10cSrcweir String sNumMinWordlen; 129cdf0e10cSrcweir String sNumPreBreak; 130cdf0e10cSrcweir String sNumPostBreak; 131cdf0e10cSrcweir String sHyphAuto; 132cdf0e10cSrcweir String sHyphSpecial; 133cdf0e10cSrcweir 134cdf0e10cSrcweir com::sun::star::uno::Reference< 135cdf0e10cSrcweir com::sun::star::beans::XPropertySet > xProp; 136cdf0e10cSrcweir 137cdf0e10cSrcweir com::sun::star::uno::Reference< 138cdf0e10cSrcweir com::sun::star::linguistic2::XDictionaryList > xDicList; 139cdf0e10cSrcweir com::sun::star::uno::Sequence< 140cdf0e10cSrcweir com::sun::star::uno::Reference< 141cdf0e10cSrcweir com::sun::star::linguistic2::XDictionary > > aDics; 142cdf0e10cSrcweir 143cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 144cdf0e10cSrcweir 145cdf0e10cSrcweir SvxLinguData_Impl* pLinguData; 146cdf0e10cSrcweir 147cdf0e10cSrcweir SvxLinguTabPage( Window* pParent, const SfxItemSet& rCoreSet ); 148cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rTxt, sal_uInt16 nCol); 149cdf0e10cSrcweir 150cdf0e10cSrcweir void AddDicBoxEntry( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); 151cdf0e10cSrcweir sal_uLong GetDicUserData( const com::sun::star::uno::Reference< com::sun::star::linguistic2::XDictionary > &rxDic, sal_uInt16 nIdx ); 152cdf0e10cSrcweir 153cdf0e10cSrcweir #ifdef _SVX_OPTLINGU_CXX 154cdf0e10cSrcweir DECL_LINK( SelectHdl_Impl, SvxCheckListBox * ); 155cdf0e10cSrcweir DECL_LINK( ClickHdl_Impl, PushButton * ); 156cdf0e10cSrcweir DECL_LINK( BoxDoubleClickHdl_Impl, SvTreeListBox * ); 157cdf0e10cSrcweir DECL_LINK( BoxCheckButtonHdl_Impl, SvTreeListBox * ); 158cdf0e10cSrcweir DECL_LINK( PostDblClickHdl_Impl, SvTreeListBox * ); 159cdf0e10cSrcweir DECL_LINK( OpenURLHdl_Impl, svt::FixedHyperlink* ); 160cdf0e10cSrcweir 161cdf0e10cSrcweir void UpdateModulesBox_Impl(); 162cdf0e10cSrcweir void UpdateDicBox_Impl(); 163cdf0e10cSrcweir #endif 164cdf0e10cSrcweir 165cdf0e10cSrcweir public: 166cdf0e10cSrcweir virtual ~SvxLinguTabPage(); 167cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rSet ); 168cdf0e10cSrcweir static sal_uInt16* GetRanges(); 169cdf0e10cSrcweir 170cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 171cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 172cdf0e10cSrcweir 173cdf0e10cSrcweir void HideGroups( sal_uInt16 nGrp ); 174cdf0e10cSrcweir }; 175cdf0e10cSrcweir 176cdf0e10cSrcweir #endif 177cdf0e10cSrcweir 178