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_FONT_SUBSTITUTION_HXX 24cdf0e10cSrcweir #define _SVX_FONT_SUBSTITUTION_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include <sfx2/tabdlg.hxx> 27cdf0e10cSrcweir #include <vcl/fixed.hxx> 28cdf0e10cSrcweir #include <svx/simptabl.hxx> 29cdf0e10cSrcweir #include <vcl/toolbox.hxx> 30cdf0e10cSrcweir #include <svtools/ctrlbox.hxx> 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace utl 33cdf0e10cSrcweir { 34cdf0e10cSrcweir class SourceViewConfig; 35cdf0e10cSrcweir } 36cdf0e10cSrcweir 37cdf0e10cSrcweir // class SvxFontSubstCheckListBox ------------------------------------------ 38cdf0e10cSrcweir 39cdf0e10cSrcweir class SvxFontSubstCheckListBox : public SvxSimpleTable 40cdf0e10cSrcweir { 41cdf0e10cSrcweir friend class SvxFontSubstTabPage; 42cdf0e10cSrcweir using SvxSimpleTable::SetTabs; 43cdf0e10cSrcweir using SvTreeListBox::GetCheckButtonState; 44cdf0e10cSrcweir using SvTreeListBox::SetCheckButtonState; 45cdf0e10cSrcweir 46cdf0e10cSrcweir protected: 47cdf0e10cSrcweir virtual void SetTabs(); 48cdf0e10cSrcweir virtual void KeyInput( const KeyEvent& rKEvt ); 49cdf0e10cSrcweir 50cdf0e10cSrcweir public: SvxFontSubstCheckListBox(Window * pParent,const ResId & rResId)51cdf0e10cSrcweir SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) : 52cdf0e10cSrcweir SvxSimpleTable( pParent, rResId ){} 53cdf0e10cSrcweir GetUserData(sal_uLong nPos)54cdf0e10cSrcweir inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); } SetUserData(sal_uLong nPos,void * pData)55cdf0e10cSrcweir inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); } 56cdf0e10cSrcweir 57cdf0e10cSrcweir sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0); 58cdf0e10cSrcweir sal_Bool IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol = 0); 59cdf0e10cSrcweir void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked); 60cdf0e10cSrcweir void CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked); 61cdf0e10cSrcweir SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const; 62cdf0e10cSrcweir void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState ); 63cdf0e10cSrcweir }; 64cdf0e10cSrcweir 65cdf0e10cSrcweir // class SvxFontSubstTabPage ---------------------------------------------------- 66cdf0e10cSrcweir class SvtFontSubstConfig; 67cdf0e10cSrcweir namespace svt {class SourceViewConfig;} 68cdf0e10cSrcweir class SvxFontSubstTabPage : public SfxTabPage 69cdf0e10cSrcweir { 70cdf0e10cSrcweir CheckBox aUseTableCB; 71cdf0e10cSrcweir FixedText aFont1FT; 72cdf0e10cSrcweir FontNameBox aFont1CB; 73cdf0e10cSrcweir FixedText aFont2FT; 74cdf0e10cSrcweir FontNameBox aFont2CB; 75cdf0e10cSrcweir ToolBox aNewDelTBX; 76cdf0e10cSrcweir SvxFontSubstCheckListBox aCheckLB; 77cdf0e10cSrcweir 78cdf0e10cSrcweir FixedLine aSourceViewFontsFL; 79cdf0e10cSrcweir FixedText aFontNameFT; 80cdf0e10cSrcweir ListBox aFontNameLB; 81cdf0e10cSrcweir CheckBox aNonPropFontsOnlyCB; 82cdf0e10cSrcweir FixedText aFontHeightFT; 83cdf0e10cSrcweir ListBox aFontHeightLB; 84cdf0e10cSrcweir 85cdf0e10cSrcweir ImageList aImageList; 86cdf0e10cSrcweir String sAutomatic; 87cdf0e10cSrcweir 88cdf0e10cSrcweir SvtFontSubstConfig* pConfig; 89cdf0e10cSrcweir utl::SourceViewConfig* pSourceViewConfig; 90cdf0e10cSrcweir 91cdf0e10cSrcweir String sHeader1; 92cdf0e10cSrcweir String sHeader2; 93cdf0e10cSrcweir String sHeader3; 94cdf0e10cSrcweir String sHeader4; 95cdf0e10cSrcweir 96cdf0e10cSrcweir Color aTextColor; 97cdf0e10cSrcweir ByteString sFontGroup; 98cdf0e10cSrcweir 99cdf0e10cSrcweir SvLBoxButtonData* pCheckButtonData; 100cdf0e10cSrcweir 101cdf0e10cSrcweir DECL_LINK(SelectHdl, Window *pWin = 0); 102cdf0e10cSrcweir DECL_LINK(NonPropFontsHdl, CheckBox* pBox); 103cdf0e10cSrcweir 104cdf0e10cSrcweir SvLBoxEntry* CreateEntry(String& rFont1, String& rFont2); 105cdf0e10cSrcweir void CheckEnable(); 106cdf0e10cSrcweir 107cdf0e10cSrcweir 108cdf0e10cSrcweir SvxFontSubstTabPage( Window* pParent, const SfxItemSet& rSet ); 109cdf0e10cSrcweir ~SvxFontSubstTabPage(); 110cdf0e10cSrcweir 111cdf0e10cSrcweir public: 112cdf0e10cSrcweir static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet); 113cdf0e10cSrcweir virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 114cdf0e10cSrcweir virtual void Reset( const SfxItemSet& rSet ); 115cdf0e10cSrcweir }; 116cdf0e10cSrcweir 117cdf0e10cSrcweir 118cdf0e10cSrcweir #endif // _SVX_FONT_SUBSTITUTION_HXX 119cdf0e10cSrcweir 120cdf0e10cSrcweir 121cdf0e10cSrcweir 122cdf0e10cSrcweir 123cdf0e10cSrcweir 124cdf0e10cSrcweir 125cdf0e10cSrcweir 126cdf0e10cSrcweir 127cdf0e10cSrcweir 128cdf0e10cSrcweir 129cdf0e10cSrcweir 130cdf0e10cSrcweir 131