1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 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. 14 * 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). 20 * 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. 25 * 26 ************************************************************************/ 27 #ifndef _OPTLOAD_HXX 28 #define _OPTLOAD_HXX 29 30 #include <sfx2/tabdlg.hxx> 31 32 #ifndef _GROUP_HXX 33 #include <vcl/group.hxx> 34 #endif 35 #include <vcl/fixed.hxx> 36 #include <vcl/lstbox.hxx> 37 #include <vcl/field.hxx> 38 #include <svx/strarray.hxx> 39 #include <sfx2/basedlgs.hxx> 40 #include <svx/checklbx.hxx> 41 #include <swlbox.hxx> 42 #include <caption.hxx> 43 44 class SwFldMgr; 45 class SvLBoxEntry; 46 class SwWrtShell; 47 48 /*-----------------31.08.96 10.09------------------- 49 50 --------------------------------------------------*/ 51 52 class SwLoadOptPage : public SfxTabPage 53 { 54 private: 55 FixedLine aUpdateFL; 56 FixedText aLinkFT; 57 RadioButton aAlwaysRB; 58 RadioButton aRequestRB; 59 RadioButton aNeverRB; 60 61 FixedText aFieldFT; 62 CheckBox aAutoUpdateFields; 63 CheckBox aAutoUpdateCharts; 64 65 FixedLine aSettingsFL; 66 FixedText aMetricFT; 67 ListBox aMetricLB; 68 FixedText aTabFT; 69 MetricField aTabMF; 70 CheckBox aUseSquaredPageMode; 71 72 SwWrtShell* pWrtShell; 73 sal_Bool bHTMLMode; 74 sal_uInt16 nLastTab; 75 sal_Int32 nOldLinkMode; 76 77 DECL_LINK(CaptionHdl, PushButton*); 78 DECL_LINK(MetricHdl, ListBox*); 79 80 public: 81 SwLoadOptPage( Window* pParent, const SfxItemSet& rSet ); 82 ~SwLoadOptPage(); 83 84 static SfxTabPage* Create( Window* pParent, 85 const SfxItemSet& rAttrSet); 86 87 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 88 virtual void Reset( const SfxItemSet& rSet ); 89 }; 90 91 /*-------------------------------------------------------------------- 92 Beschreibung: 93 --------------------------------------------------------------------*/ 94 class SwCaptionOptDlg : public SfxSingleTabDialog 95 { 96 public: 97 SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet); 98 ~SwCaptionOptDlg(); 99 }; 100 /* -----------------23.10.98 13:19------------------- 101 * 102 * --------------------------------------------------*/ 103 104 class CaptionComboBox : public SwComboBox 105 { 106 protected: 107 virtual void KeyInput( const KeyEvent& ); 108 109 public: 110 CaptionComboBox( Window* pParent, const ResId& rResId) 111 : SwComboBox(pParent, rResId) 112 {} 113 }; 114 115 /*-----------------31.08.96 10.09------------------- 116 117 --------------------------------------------------*/ 118 119 class SwCaptionPreview : public Window 120 { 121 private: 122 String maText; 123 Point maDrawPos; 124 public: 125 SwCaptionPreview( Window* pParent, const ResId& rResId ); 126 void SetPreviewText( const String& rText ); 127 virtual void Paint( const Rectangle& rRect ); 128 }; 129 130 class SwCaptionOptPage : public SfxTabPage 131 { 132 private: 133 FixedText aCheckFT; 134 SvxCheckListBox aCheckLB; 135 136 FixedText aFtCaptionOrder; 137 ListBox aLbCaptionOrder; 138 139 SwCaptionPreview aPreview; 140 141 FixedLine aSettingsGroupFL; 142 FixedText aCategoryText; 143 CaptionComboBox aCategoryBox; 144 FixedText aFormatText; 145 ListBox aFormatBox; 146 //#i61007# order of captions 147 FixedText aNumberingSeparatorFT; 148 Edit aNumberingSeparatorED; 149 FixedText aTextText; 150 Edit aTextEdit; 151 FixedText aPosText; 152 ListBox aPosBox; 153 154 FixedLine aNumCaptFL; 155 FixedText aFtLevel; 156 ListBox aLbLevel; 157 FixedText aFtDelim; 158 Edit aEdDelim; 159 160 FixedLine aCategoryFL; 161 FixedText aCharStyleFT; 162 ListBox aCharStyleLB; 163 CheckBox aApplyBorderCB; 164 165 String sSWTable; 166 String sSWFrame; 167 String sSWGraphic; 168 String sOLE; 169 170 String sIllustration; 171 String sTable; 172 String sText; 173 String sDrawing; 174 175 String sBegin; 176 String sEnd; 177 String sAbove; 178 String sBelow; 179 180 String sNone; 181 182 SwFldMgr *pMgr; 183 sal_uInt16 eType; 184 sal_Bool bHTMLMode; 185 186 DECL_LINK( SelectHdl, ListBox *pLB = 0 ); 187 DECL_LINK( ModifyHdl, Edit *pEdt = 0 ); 188 DECL_LINK( OrderHdl, ListBox* ); 189 DECL_LINK( ShowEntryHdl, SvxCheckListBox *pLB = 0 ); 190 DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 ); 191 192 void DelUserData(); 193 void SetOptions( const sal_uInt16 nPos, 194 const SwCapObjType eType, 195 const SvGlobalName *pOleId = 0); 196 void SaveEntry( SvLBoxEntry* pEntry ); 197 void DrawSample(); 198 199 public: 200 SwCaptionOptPage( Window* pParent, 201 const SfxItemSet& rSet ); 202 ~SwCaptionOptPage(); 203 204 static SfxTabPage* Create( Window* pParent, 205 const SfxItemSet& rAttrSet); 206 207 virtual sal_Bool FillItemSet( SfxItemSet& rSet ); 208 virtual void Reset( const SfxItemSet& rSet ); 209 }; 210 211 #endif 212 213 214