Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : : #ifndef _OPTLOAD_HXX
20 : : #define _OPTLOAD_HXX
21 : :
22 : : #include <sfx2/tabdlg.hxx>
23 : :
24 : : #include <vcl/group.hxx>
25 : : #include <vcl/fixed.hxx>
26 : : #include <vcl/lstbox.hxx>
27 : : #include <vcl/field.hxx>
28 : : #include <svx/strarray.hxx>
29 : : #include <sfx2/basedlgs.hxx>
30 : : #include <svx/checklbx.hxx>
31 : : #include <swlbox.hxx>
32 : : #include <caption.hxx>
33 : :
34 : : class SwFldMgr;
35 : : class SvLBoxEntry;
36 : : class SwWrtShell;
37 : :
38 : : class SwLoadOptPage : public SfxTabPage
39 : : {
40 : : private:
41 : : FixedLine aUpdateFL;
42 : : FixedText aLinkFT;
43 : : RadioButton aAlwaysRB;
44 : : RadioButton aRequestRB;
45 : : RadioButton aNeverRB;
46 : :
47 : : FixedText aFieldFT;
48 : : CheckBox aAutoUpdateFields;
49 : : CheckBox aAutoUpdateCharts;
50 : :
51 : : FixedLine aSettingsFL;
52 : : FixedText aMetricFT;
53 : : ListBox aMetricLB;
54 : : FixedText aTabFT;
55 : : MetricField aTabMF;
56 : : CheckBox aUseSquaredPageMode;
57 : : CheckBox aUseCharUnit;
58 : :
59 : : SwWrtShell* pWrtShell;
60 : : sal_Bool bHTMLMode;
61 : : sal_uInt16 nLastTab;
62 : : sal_Int32 nOldLinkMode;
63 : :
64 : : DECL_LINK(MetricHdl, void *);
65 : :
66 : : public:
67 : : SwLoadOptPage( Window* pParent, const SfxItemSet& rSet );
68 : : ~SwLoadOptPage();
69 : :
70 : : static SfxTabPage* Create( Window* pParent,
71 : : const SfxItemSet& rAttrSet);
72 : :
73 : : virtual sal_Bool FillItemSet( SfxItemSet& rSet );
74 : : virtual void Reset( const SfxItemSet& rSet );
75 : : };
76 : :
77 : : class SwCaptionOptDlg : public SfxSingleTabDialog
78 : : {
79 : : public:
80 : : SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet);
81 : : ~SwCaptionOptDlg();
82 : : };
83 : :
84 : 0 : class CaptionComboBox : public SwComboBox
85 : : {
86 : : protected:
87 : : virtual void KeyInput( const KeyEvent& );
88 : :
89 : : public:
90 : 0 : CaptionComboBox( Window* pParent, const ResId& rResId)
91 : 0 : : SwComboBox(pParent, rResId)
92 : 0 : {}
93 : : };
94 : :
95 : 0 : class SwCaptionPreview : public Window
96 : : {
97 : : private:
98 : : String maText;
99 : : Point maDrawPos;
100 : : public:
101 : : SwCaptionPreview( Window* pParent, const ResId& rResId );
102 : : void SetPreviewText( const String& rText );
103 : : virtual void Paint( const Rectangle& rRect );
104 : : };
105 : :
106 : : class SwCaptionOptPage : public SfxTabPage
107 : : {
108 : : private:
109 : : FixedText aCheckFT;
110 : : SvxCheckListBox aCheckLB;
111 : :
112 : : FixedText aFtCaptionOrder;
113 : : ListBox aLbCaptionOrder;
114 : :
115 : : SwCaptionPreview aPreview;
116 : :
117 : : FixedLine aSettingsGroupFL;
118 : : FixedText aCategoryText;
119 : : CaptionComboBox aCategoryBox;
120 : : FixedText aFormatText;
121 : : ListBox aFormatBox;
122 : : //#i61007# order of captions
123 : : FixedText aNumberingSeparatorFT;
124 : : Edit aNumberingSeparatorED;
125 : : FixedText aTextText;
126 : : Edit aTextEdit;
127 : : FixedText aPosText;
128 : : ListBox aPosBox;
129 : :
130 : : FixedLine aNumCaptFL;
131 : : FixedText aFtLevel;
132 : : ListBox aLbLevel;
133 : : FixedText aFtDelim;
134 : : Edit aEdDelim;
135 : :
136 : : FixedLine aCategoryFL;
137 : : FixedText aCharStyleFT;
138 : : ListBox aCharStyleLB;
139 : : CheckBox aApplyBorderCB;
140 : :
141 : : String sSWTable;
142 : : String sSWFrame;
143 : : String sSWGraphic;
144 : : String sOLE;
145 : :
146 : : String sIllustration;
147 : : String sTable;
148 : : String sText;
149 : : String sDrawing;
150 : :
151 : : String sBegin;
152 : : String sEnd;
153 : : String sAbove;
154 : : String sBelow;
155 : :
156 : : String sNone;
157 : :
158 : : SwFldMgr *pMgr;
159 : : sal_uInt16 eType;
160 : : sal_Bool bHTMLMode;
161 : :
162 : : DECL_LINK(SelectHdl, void *);
163 : : DECL_LINK(ModifyHdl, void * = 0);
164 : : DECL_LINK( OrderHdl, ListBox* );
165 : : DECL_LINK(ShowEntryHdl, void *);
166 : : DECL_LINK(SaveEntryHdl, void *);
167 : :
168 : : void DelUserData();
169 : : void SetOptions( const sal_uInt16 nPos,
170 : : const SwCapObjType eType,
171 : : const SvGlobalName *pOleId = 0);
172 : : void SaveEntry( SvLBoxEntry* pEntry );
173 : : void DrawSample();
174 : :
175 : : public:
176 : : SwCaptionOptPage( Window* pParent,
177 : : const SfxItemSet& rSet );
178 : : ~SwCaptionOptPage();
179 : :
180 : : static SfxTabPage* Create( Window* pParent,
181 : : const SfxItemSet& rAttrSet);
182 : :
183 : : virtual sal_Bool FillItemSet( SfxItemSet& rSet );
184 : : virtual void Reset( const SfxItemSet& rSet );
185 : : };
186 : :
187 : : #endif
188 : :
189 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|