masterfix DEV300: #i10000# build fix
[LibreOffice.git] / cui / source / options / fontsubs.hxx
blob91c6f1a738015a633f9f05c123e9a2d733aefe80
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef _SVX_FONT_SUBSTITUTION_HXX
28 #define _SVX_FONT_SUBSTITUTION_HXX
30 #include <sfx2/tabdlg.hxx>
31 #include <vcl/fixed.hxx>
32 #include <svx/simptabl.hxx>
33 #include <vcl/toolbox.hxx>
34 #include <svtools/ctrlbox.hxx>
36 namespace utl
38 class SourceViewConfig;
41 // class SvxFontSubstCheckListBox ------------------------------------------
43 class SvxFontSubstCheckListBox : public SvxSimpleTable
45 friend class SvxFontSubstTabPage;
46 using SvxSimpleTable::SetTabs;
47 using SvTreeListBox::GetCheckButtonState;
48 using SvTreeListBox::SetCheckButtonState;
50 protected:
51 virtual void SetTabs();
52 virtual void KeyInput( const KeyEvent& rKEvt );
54 public:
55 SvxFontSubstCheckListBox(Window* pParent, const ResId& rResId ) :
56 SvxSimpleTable( pParent, rResId ){}
58 inline void *GetUserData(sal_uLong nPos) { return GetEntry(nPos)->GetUserData(); }
59 inline void SetUserData(sal_uLong nPos, void *pData ) { GetEntry(nPos)->SetUserData(pData); }
61 sal_Bool IsChecked(sal_uLong nPos, sal_uInt16 nCol = 0);
62 sal_Bool IsChecked(SvLBoxEntry* pEntry, sal_uInt16 nCol = 0);
63 void CheckEntryPos(sal_uLong nPos, sal_uInt16 nCol, sal_Bool bChecked);
64 void CheckEntry(SvLBoxEntry* pEntry, sal_uInt16 nCol, sal_Bool bChecked);
65 SvButtonState GetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol ) const;
66 void SetCheckButtonState( SvLBoxEntry*, sal_uInt16 nCol, SvButtonState );
69 // class SvxFontSubstTabPage ----------------------------------------------------
70 class SvtFontSubstConfig;
71 namespace svt {class SourceViewConfig;}
72 class SvxFontSubstTabPage : public SfxTabPage
74 CheckBox aUseTableCB;
75 FixedText aFont1FT;
76 FontNameBox aFont1CB;
77 FixedText aFont2FT;
78 FontNameBox aFont2CB;
79 ToolBox aNewDelTBX;
80 SvxFontSubstCheckListBox aCheckLB;
82 FixedLine aSourceViewFontsFL;
83 FixedText aFontNameFT;
84 ListBox aFontNameLB;
85 CheckBox aNonPropFontsOnlyCB;
86 FixedText aFontHeightFT;
87 ListBox aFontHeightLB;
89 ImageList aImageList;
90 String sAutomatic;
92 SvtFontSubstConfig* pConfig;
93 utl::SourceViewConfig* pSourceViewConfig;
95 String sHeader1;
96 String sHeader2;
97 String sHeader3;
98 String sHeader4;
100 Color aTextColor;
101 ByteString sFontGroup;
103 SvLBoxButtonData* pCheckButtonData;
105 DECL_LINK(SelectHdl, Window *pWin = 0);
106 DECL_LINK(NonPropFontsHdl, CheckBox* pBox);
108 SvLBoxEntry* CreateEntry(String& rFont1, String& rFont2);
109 void CheckEnable();
112 SvxFontSubstTabPage( Window* pParent, const SfxItemSet& rSet );
113 ~SvxFontSubstTabPage();
115 public:
116 static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet);
117 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
118 virtual void Reset( const SfxItemSet& rSet );
122 #endif // _SVX_FONT_SUBSTITUTION_HXX