1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: optload.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
33 #include <sfx2/tabdlg.hxx>
36 #include <vcl/group.hxx>
38 #include <vcl/fixed.hxx>
39 #include <vcl/lstbox.hxx>
40 #include <vcl/field.hxx>
41 #include <svx/strarray.hxx>
42 #include <sfx2/basedlgs.hxx>
43 #include <svx/checklbx.hxx>
45 #include <caption.hxx>
51 /*-----------------31.08.96 10.09-------------------
53 --------------------------------------------------*/
55 class SwLoadOptPage
: public SfxTabPage
60 RadioButton aAlwaysRB
;
61 RadioButton aRequestRB
;
65 CheckBox aAutoUpdateFields
;
66 CheckBox aAutoUpdateCharts
;
68 FixedLine aSettingsFL
;
73 CheckBox aUseSquaredPageMode
;
74 CheckBox aUseCharUnit
;
76 SwWrtShell
* pWrtShell
;
79 sal_Int32 nOldLinkMode
;
81 DECL_LINK(CaptionHdl
, PushButton
*);
82 DECL_LINK(MetricHdl
, ListBox
*);
85 SwLoadOptPage( Window
* pParent
, const SfxItemSet
& rSet
);
88 static SfxTabPage
* Create( Window
* pParent
,
89 const SfxItemSet
& rAttrSet
);
91 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
92 virtual void Reset( const SfxItemSet
& rSet
);
95 /*--------------------------------------------------------------------
97 --------------------------------------------------------------------*/
98 class SwCaptionOptDlg
: public SfxSingleTabDialog
101 SwCaptionOptDlg(Window
* pParent
, const SfxItemSet
& rSet
);
104 /* -----------------23.10.98 13:19-------------------
106 * --------------------------------------------------*/
108 class CaptionComboBox
: public SwComboBox
111 virtual void KeyInput( const KeyEvent
& );
114 CaptionComboBox( Window
* pParent
, const ResId
& rResId
)
115 : SwComboBox(pParent
, rResId
)
119 /*-----------------31.08.96 10.09-------------------
121 --------------------------------------------------*/
123 class SwCaptionPreview
: public Window
129 SwCaptionPreview( Window
* pParent
, const ResId
& rResId
);
130 void SetPreviewText( const String
& rText
);
131 virtual void Paint( const Rectangle
& rRect
);
134 class SwCaptionOptPage
: public SfxTabPage
138 SvxCheckListBox aCheckLB
;
140 FixedText aFtCaptionOrder
;
141 ListBox aLbCaptionOrder
;
143 SwCaptionPreview aPreview
;
145 FixedLine aSettingsGroupFL
;
146 FixedText aCategoryText
;
147 CaptionComboBox aCategoryBox
;
148 FixedText aFormatText
;
150 //#i61007# order of captions
151 FixedText aNumberingSeparatorFT
;
152 Edit aNumberingSeparatorED
;
158 FixedLine aNumCaptFL
;
164 FixedLine aCategoryFL
;
165 FixedText aCharStyleFT
;
166 ListBox aCharStyleLB
;
167 CheckBox aApplyBorderCB
;
174 String sIllustration
;
190 DECL_LINK( SelectHdl
, ListBox
*pLB
= 0 );
191 DECL_LINK( ModifyHdl
, Edit
*pEdt
= 0 );
192 DECL_LINK( OrderHdl
, ListBox
* );
193 DECL_LINK( ShowEntryHdl
, SvxCheckListBox
*pLB
= 0 );
194 DECL_LINK( SaveEntryHdl
, SvxCheckListBox
*pLB
= 0 );
197 void SetOptions( const USHORT nPos
,
198 const SwCapObjType eType
,
199 const SvGlobalName
*pOleId
= 0);
200 void SaveEntry( SvLBoxEntry
* pEntry
);
204 SwCaptionOptPage( Window
* pParent
,
205 const SfxItemSet
& rSet
);
208 static SfxTabPage
* Create( Window
* pParent
,
209 const SfxItemSet
& rAttrSet
);
211 virtual BOOL
FillItemSet( SfxItemSet
& rSet
);
212 virtual void Reset( const SfxItemSet
& rSet
);