1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <sfx2/tabdlg.hxx>
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>
32 #include <caption.hxx>
35 class SvTreeListEntry
;
38 class SwLoadOptPage
: public SfxTabPage
43 RadioButton aAlwaysRB
;
44 RadioButton aRequestRB
;
48 CheckBox aAutoUpdateFields
;
49 CheckBox aAutoUpdateCharts
;
51 FixedLine aSettingsFL
;
56 CheckBox aUseSquaredPageMode
;
57 CheckBox aUseCharUnit
;
58 FixedLine aWordCountFL
;
59 FixedText aWordCountFT
;
62 SwWrtShell
* pWrtShell
;
65 sal_Int32 nOldLinkMode
;
67 DECL_LINK(MetricHdl
, void *);
70 SwLoadOptPage( Window
* pParent
, const SfxItemSet
& rSet
);
73 static SfxTabPage
* Create( Window
* pParent
,
74 const SfxItemSet
& rAttrSet
);
76 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
77 virtual void Reset( const SfxItemSet
& rSet
);
80 class SwCaptionOptDlg
: public SfxNoLayoutSingleTabDialog
83 SwCaptionOptDlg(Window
* pParent
, const SfxItemSet
& rSet
);
87 class CaptionComboBox
: public SwComboBox
90 virtual void KeyInput( const KeyEvent
& );
93 CaptionComboBox( Window
* pParent
, const ResId
& rResId
)
94 : SwComboBox(pParent
, rResId
)
98 class SwCaptionPreview
: public Window
104 SwCaptionPreview( Window
* pParent
);
105 SwCaptionPreview( Window
* pParent
, const ResId
& rResId
);
107 void SetPreviewText( const String
& rText
);
108 virtual void Paint( const Rectangle
& rRect
);
111 class SwCaptionOptPage
: public SfxTabPage
115 SvxCheckListBox aCheckLB
;
117 FixedText aFtCaptionOrder
;
118 ListBox aLbCaptionOrder
;
120 SwCaptionPreview aPreview
;
122 FixedLine aSettingsGroupFL
;
123 FixedText aCategoryText
;
124 CaptionComboBox aCategoryBox
;
125 FixedText aFormatText
;
127 //#i61007# order of captions
128 FixedText aNumberingSeparatorFT
;
129 Edit aNumberingSeparatorED
;
135 FixedLine aNumCaptFL
;
141 FixedLine aCategoryFL
;
142 FixedText aCharStyleFT
;
143 ListBox aCharStyleLB
;
144 CheckBox aApplyBorderCB
;
151 String sIllustration
;
166 DECL_LINK(SelectHdl
, void *);
167 DECL_LINK(ModifyHdl
, void * = 0);
168 DECL_LINK( OrderHdl
, ListBox
* );
169 DECL_LINK(ShowEntryHdl
, void *);
170 DECL_LINK(SaveEntryHdl
, void *);
173 void SetOptions( const sal_uInt16 nPos
,
174 const SwCapObjType eType
,
175 const SvGlobalName
*pOleId
= 0);
176 void SaveEntry( SvTreeListEntry
* pEntry
);
180 SwCaptionOptPage( Window
* pParent
,
181 const SfxItemSet
& rSet
);
184 static SfxTabPage
* Create( Window
* pParent
,
185 const SfxItemSet
& rAttrSet
);
187 virtual sal_Bool
FillItemSet( SfxItemSet
& rSet
);
188 virtual void Reset( const SfxItemSet
& rSet
);
193 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */