xref: /trunk/main/sw/source/ui/inc/optload.hxx (revision 914d351e5f5b84e4342a86d6ab8d4aca7308b9bd)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _OPTLOAD_HXX
24cdf0e10cSrcweir #define _OPTLOAD_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
27cdf0e10cSrcweir 
28cdf0e10cSrcweir #ifndef _GROUP_HXX
29cdf0e10cSrcweir #include <vcl/group.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #include <vcl/fixed.hxx>
32cdf0e10cSrcweir #include <vcl/lstbox.hxx>
33cdf0e10cSrcweir #include <vcl/field.hxx>
34cdf0e10cSrcweir #include <svx/strarray.hxx>
35cdf0e10cSrcweir #include <sfx2/basedlgs.hxx>
36cdf0e10cSrcweir #include <svx/checklbx.hxx>
37cdf0e10cSrcweir #include <swlbox.hxx>
38cdf0e10cSrcweir #include <caption.hxx>
39cdf0e10cSrcweir 
40cdf0e10cSrcweir class SwFldMgr;
41cdf0e10cSrcweir class SvLBoxEntry;
42cdf0e10cSrcweir class SwWrtShell;
43cdf0e10cSrcweir 
44cdf0e10cSrcweir /*-----------------31.08.96 10.09-------------------
45cdf0e10cSrcweir 
46cdf0e10cSrcweir --------------------------------------------------*/
47cdf0e10cSrcweir 
48cdf0e10cSrcweir class SwLoadOptPage : public SfxTabPage
49cdf0e10cSrcweir {
50cdf0e10cSrcweir private:
51cdf0e10cSrcweir     FixedLine   aUpdateFL;
52cdf0e10cSrcweir     FixedText   aLinkFT;
53cdf0e10cSrcweir     RadioButton aAlwaysRB;
54cdf0e10cSrcweir     RadioButton aRequestRB;
55cdf0e10cSrcweir     RadioButton aNeverRB;
56cdf0e10cSrcweir 
57cdf0e10cSrcweir     FixedText   aFieldFT;
58cdf0e10cSrcweir     CheckBox    aAutoUpdateFields;
59cdf0e10cSrcweir     CheckBox    aAutoUpdateCharts;
60cdf0e10cSrcweir 
61cdf0e10cSrcweir     FixedLine   aSettingsFL;
62cdf0e10cSrcweir     FixedText   aMetricFT;
63cdf0e10cSrcweir     ListBox     aMetricLB;
64cdf0e10cSrcweir     FixedText   aTabFT;
65cdf0e10cSrcweir     MetricField aTabMF;
66cdf0e10cSrcweir     CheckBox    aUseSquaredPageMode;
67cdf0e10cSrcweir 
68cdf0e10cSrcweir     SwWrtShell* pWrtShell;
69cdf0e10cSrcweir     sal_Bool    bHTMLMode;
70cdf0e10cSrcweir     sal_uInt16      nLastTab;
71cdf0e10cSrcweir     sal_Int32   nOldLinkMode;
72cdf0e10cSrcweir 
73cdf0e10cSrcweir     DECL_LINK(CaptionHdl, PushButton*);
74cdf0e10cSrcweir     DECL_LINK(MetricHdl, ListBox*);
75cdf0e10cSrcweir 
76cdf0e10cSrcweir public:
77cdf0e10cSrcweir     SwLoadOptPage( Window* pParent, const SfxItemSet& rSet );
78cdf0e10cSrcweir     ~SwLoadOptPage();
79cdf0e10cSrcweir 
80cdf0e10cSrcweir     static SfxTabPage*  Create( Window* pParent,
81cdf0e10cSrcweir                                 const SfxItemSet& rAttrSet);
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
84cdf0e10cSrcweir     virtual void        Reset( const SfxItemSet& rSet );
85cdf0e10cSrcweir };
86cdf0e10cSrcweir 
87cdf0e10cSrcweir /*--------------------------------------------------------------------
88cdf0e10cSrcweir     Beschreibung:
89cdf0e10cSrcweir  --------------------------------------------------------------------*/
90cdf0e10cSrcweir class SwCaptionOptDlg : public SfxSingleTabDialog
91cdf0e10cSrcweir {
92cdf0e10cSrcweir public:
93cdf0e10cSrcweir      SwCaptionOptDlg(Window* pParent, const SfxItemSet& rSet);
94cdf0e10cSrcweir     ~SwCaptionOptDlg();
95cdf0e10cSrcweir };
96cdf0e10cSrcweir /* -----------------23.10.98 13:19-------------------
97cdf0e10cSrcweir  *
98cdf0e10cSrcweir  * --------------------------------------------------*/
99cdf0e10cSrcweir 
100cdf0e10cSrcweir class CaptionComboBox : public SwComboBox
101cdf0e10cSrcweir {
102cdf0e10cSrcweir protected:
103cdf0e10cSrcweir     virtual void KeyInput( const KeyEvent& );
104cdf0e10cSrcweir 
105cdf0e10cSrcweir public:
CaptionComboBox(Window * pParent,const ResId & rResId)106cdf0e10cSrcweir     CaptionComboBox( Window* pParent, const ResId& rResId)
107cdf0e10cSrcweir         : SwComboBox(pParent, rResId)
108cdf0e10cSrcweir     {}
109cdf0e10cSrcweir };
110cdf0e10cSrcweir 
111cdf0e10cSrcweir /*-----------------31.08.96 10.09-------------------
112cdf0e10cSrcweir 
113cdf0e10cSrcweir --------------------------------------------------*/
114cdf0e10cSrcweir 
115cdf0e10cSrcweir class SwCaptionPreview : public Window
116cdf0e10cSrcweir {
117cdf0e10cSrcweir private:
118cdf0e10cSrcweir     String          maText;
119cdf0e10cSrcweir     Point           maDrawPos;
120cdf0e10cSrcweir public:
121cdf0e10cSrcweir                     SwCaptionPreview( Window* pParent, const ResId& rResId );
122cdf0e10cSrcweir     void            SetPreviewText( const String& rText );
123cdf0e10cSrcweir     virtual void    Paint( const Rectangle& rRect );
124cdf0e10cSrcweir };
125cdf0e10cSrcweir 
126cdf0e10cSrcweir class SwCaptionOptPage : public SfxTabPage
127cdf0e10cSrcweir {
128cdf0e10cSrcweir private:
129cdf0e10cSrcweir     FixedText       aCheckFT;
130cdf0e10cSrcweir     SvxCheckListBox aCheckLB;
131cdf0e10cSrcweir 
132cdf0e10cSrcweir     FixedText       aFtCaptionOrder;
133cdf0e10cSrcweir     ListBox         aLbCaptionOrder;
134cdf0e10cSrcweir 
135cdf0e10cSrcweir     SwCaptionPreview    aPreview;
136cdf0e10cSrcweir 
137cdf0e10cSrcweir     FixedLine       aSettingsGroupFL;
138cdf0e10cSrcweir     FixedText       aCategoryText;
139cdf0e10cSrcweir     CaptionComboBox aCategoryBox;
140cdf0e10cSrcweir     FixedText       aFormatText;
141cdf0e10cSrcweir     ListBox         aFormatBox;
142cdf0e10cSrcweir     //#i61007# order of captions
143cdf0e10cSrcweir     FixedText       aNumberingSeparatorFT;
144cdf0e10cSrcweir     Edit            aNumberingSeparatorED;
145cdf0e10cSrcweir     FixedText       aTextText;
146cdf0e10cSrcweir     Edit            aTextEdit;
147cdf0e10cSrcweir     FixedText       aPosText;
148cdf0e10cSrcweir     ListBox         aPosBox;
149cdf0e10cSrcweir 
150cdf0e10cSrcweir     FixedLine       aNumCaptFL;
151cdf0e10cSrcweir     FixedText       aFtLevel;
152cdf0e10cSrcweir     ListBox         aLbLevel;
153cdf0e10cSrcweir     FixedText       aFtDelim;
154cdf0e10cSrcweir     Edit            aEdDelim;
155cdf0e10cSrcweir 
156cdf0e10cSrcweir     FixedLine       aCategoryFL;
157cdf0e10cSrcweir     FixedText       aCharStyleFT;
158cdf0e10cSrcweir     ListBox         aCharStyleLB;
159cdf0e10cSrcweir     CheckBox        aApplyBorderCB;
160cdf0e10cSrcweir 
161cdf0e10cSrcweir     String          sSWTable;
162cdf0e10cSrcweir     String          sSWFrame;
163cdf0e10cSrcweir     String          sSWGraphic;
164cdf0e10cSrcweir     String          sOLE;
165cdf0e10cSrcweir 
166cdf0e10cSrcweir     String          sIllustration;
167cdf0e10cSrcweir     String          sTable;
168cdf0e10cSrcweir     String          sText;
169cdf0e10cSrcweir     String          sDrawing;
170cdf0e10cSrcweir 
171cdf0e10cSrcweir     String          sBegin;
172cdf0e10cSrcweir     String          sEnd;
173cdf0e10cSrcweir     String          sAbove;
174cdf0e10cSrcweir     String          sBelow;
175cdf0e10cSrcweir 
176cdf0e10cSrcweir     String          sNone;
177cdf0e10cSrcweir 
178cdf0e10cSrcweir     SwFldMgr        *pMgr;
179cdf0e10cSrcweir     sal_uInt16          eType;
180cdf0e10cSrcweir     sal_Bool            bHTMLMode;
181cdf0e10cSrcweir 
182cdf0e10cSrcweir     DECL_LINK( SelectHdl, ListBox *pLB = 0 );
183cdf0e10cSrcweir     DECL_LINK( ModifyHdl, Edit *pEdt = 0 );
184cdf0e10cSrcweir     DECL_LINK( OrderHdl, ListBox* );
185cdf0e10cSrcweir     DECL_LINK( ShowEntryHdl, SvxCheckListBox *pLB = 0 );
186cdf0e10cSrcweir     DECL_LINK( SaveEntryHdl, SvxCheckListBox *pLB = 0 );
187cdf0e10cSrcweir 
188cdf0e10cSrcweir     void                DelUserData();
189cdf0e10cSrcweir     void                SetOptions( const sal_uInt16 nPos,
190cdf0e10cSrcweir                                     const SwCapObjType eType,
191cdf0e10cSrcweir                                     const SvGlobalName *pOleId = 0);
192cdf0e10cSrcweir     void                SaveEntry( SvLBoxEntry* pEntry );
193cdf0e10cSrcweir     void                DrawSample();
194cdf0e10cSrcweir 
195cdf0e10cSrcweir public:
196cdf0e10cSrcweir                         SwCaptionOptPage( Window* pParent,
197cdf0e10cSrcweir                                          const SfxItemSet& rSet );
198cdf0e10cSrcweir                         ~SwCaptionOptPage();
199cdf0e10cSrcweir 
200cdf0e10cSrcweir     static SfxTabPage*  Create( Window* pParent,
201cdf0e10cSrcweir                                 const SfxItemSet& rAttrSet);
202cdf0e10cSrcweir 
203cdf0e10cSrcweir     virtual sal_Bool        FillItemSet( SfxItemSet& rSet );
204cdf0e10cSrcweir     virtual void        Reset( const SfxItemSet& rSet );
205cdf0e10cSrcweir };
206cdf0e10cSrcweir 
207cdf0e10cSrcweir #endif
208