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: envfmt.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 ************************************************************************/
35 #define _SVSTDARR_USHORTS
36 #include <svtools/svstdarr.hxx>
38 #include <svtools/stdctrl.hxx>
39 #ifndef _FIELD_HXX //autogen
40 #include <vcl/field.hxx>
42 #ifndef _MENUBTN_HXX //autogen
43 #include <vcl/menubtn.hxx>
45 #ifndef _GROUP_HXX //autogen
46 #include <vcl/group.hxx>
53 // class SwEnvFmtPage ---------------------------------------------------------
55 class SwEnvFmtPage
: public SfxTabPage
59 FixedInfo aAddrPosInfo
;
60 FixedText aAddrLeftText
;
61 MetricField aAddrLeftField
;
62 FixedText aAddrTopText
;
63 MetricField aAddrTopField
;
64 FixedInfo aAddrFormatInfo
;
65 MenuButton aAddrEditButton
;
67 FixedInfo aSendPosInfo
;
68 FixedText aSendLeftText
;
69 MetricField aSendLeftField
;
70 FixedText aSendTopText
;
71 MetricField aSendTopField
;
72 FixedInfo aSendFormatInfo
;
73 MenuButton aSendEditButton
;
75 FixedText aSizeFormatText
;
76 ListBox aSizeFormatBox
;
77 FixedText aSizeWidthText
;
78 MetricField aSizeWidthField
;
79 FixedText aSizeHeightText
;
80 MetricField aSizeHeightField
;
81 SwEnvPreview aPreview
;
85 SwEnvFmtPage(Window
* pParent
, const SfxItemSet
& rSet
);
88 DECL_LINK( ModifyHdl
, Edit
* );
89 DECL_LINK( EditHdl
, MenuButton
* );
90 DECL_LINK( FormatHdl
, ListBox
* );
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
;
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
);