merge the formfield patch from ooo-build
[ooovba.git] / sw / source / ui / envelp / envfmt.hxx
blob7363907e9575b4d3c32f001a574515bab5fb50df
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: envfmt.hxx,v $
10 * $Revision: 1.8 $
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 ************************************************************************/
30 #ifndef _ENVFMT_HXX
31 #define _ENVFMT_HXX
34 #ifndef _SVSTDARR_HXX
35 #define _SVSTDARR_USHORTS
36 #include <svtools/svstdarr.hxx>
37 #endif
38 #include <svtools/stdctrl.hxx>
39 #ifndef _FIELD_HXX //autogen
40 #include <vcl/field.hxx>
41 #endif
42 #ifndef _MENUBTN_HXX //autogen
43 #include <vcl/menubtn.hxx>
44 #endif
45 #ifndef _GROUP_HXX //autogen
46 #include <vcl/group.hxx>
47 #endif
49 #include "envlop.hxx"
51 class SwTxtFmtColl;
53 // class SwEnvFmtPage ---------------------------------------------------------
55 class SwEnvFmtPage : public SfxTabPage
58 FixedLine aAddrFL;
59 FixedInfo aAddrPosInfo;
60 FixedText aAddrLeftText;
61 MetricField aAddrLeftField;
62 FixedText aAddrTopText;
63 MetricField aAddrTopField;
64 FixedInfo aAddrFormatInfo;
65 MenuButton aAddrEditButton;
66 FixedLine aSendFL;
67 FixedInfo aSendPosInfo;
68 FixedText aSendLeftText;
69 MetricField aSendLeftField;
70 FixedText aSendTopText;
71 MetricField aSendTopField;
72 FixedInfo aSendFormatInfo;
73 MenuButton aSendEditButton;
74 FixedLine aSizeFL;
75 FixedText aSizeFormatText;
76 ListBox aSizeFormatBox;
77 FixedText aSizeWidthText;
78 MetricField aSizeWidthField;
79 FixedText aSizeHeightText;
80 MetricField aSizeHeightField;
81 SwEnvPreview aPreview;
83 SvUShorts aIDs;
85 SwEnvFmtPage(Window* pParent, const SfxItemSet& rSet);
86 ~SwEnvFmtPage();
88 DECL_LINK( ModifyHdl, Edit * );
89 DECL_LINK( EditHdl, MenuButton * );
90 DECL_LINK( FormatHdl, ListBox * );
92 void SetMinMax();
94 SfxItemSet *GetCollItemSet(SwTxtFmtColl* pColl, BOOL bSender);
96 using Window::GetParent;
97 SwEnvDlg *GetParent() {return (SwEnvDlg*) SfxTabPage::GetParent()->GetParent();}
99 using TabPage::ActivatePage;
100 using TabPage::DeactivatePage;
102 public:
104 static SfxTabPage* Create(Window* pParent, const SfxItemSet& rSet);
106 virtual void ActivatePage(const SfxItemSet& rSet);
107 virtual int DeactivatePage(SfxItemSet* pSet = 0);
108 void FillItem(SwEnvItem& rItem);
109 virtual BOOL FillItemSet(SfxItemSet& rSet);
110 virtual void Reset(const SfxItemSet& rSet);
113 #endif