Update ooo320-m1
[ooovba.git] / sw / source / ui / dbui / mmlayoutpage.hxx
blob1f53132fbd90a84299cf0ca5531e56276f76a629
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: mmlayoutpage.hxx,v $
10 * $Revision: 1.5 $
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 _MAILMERGELAYOUTPAGE_HXX
31 #define _MAILMERGELAYOUTPAGE_HXX
33 #include <svtools/wizardmachine.hxx>
34 #include <mailmergehelper.hxx>
35 #ifndef _SV_BUTTON_HXX
36 #include <vcl/button.hxx>
37 #endif
38 #include <svtools/stdctrl.hxx>
39 #include <vcl/field.hxx>
40 #include <vcl/lstbox.hxx>
41 #include <com/sun/star/uno/Reference.h>
43 class SwMailMergeWizard;
44 class SwFrmFmt;
45 class SwOneExampleFrame;
46 class SwWrtShell;
47 class SwView;
49 namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}}
50 /*-- 02.04.2004 09:21:06---------------------------------------------------
52 -----------------------------------------------------------------------*/
53 class SwMailMergeLayoutPage : public svt::OWizardPage
55 SwBoldFixedInfo m_aHeaderFI;
57 FixedLine m_aPositionFL;
59 CheckBox m_aAlignToBodyCB;
60 FixedText m_aLeftFT;
61 MetricField m_aLeftMF;
62 FixedText m_aTopFT;
63 MetricField m_aTopMF;
65 FixedLine m_aGreetingLineFL;
66 FixedText m_aUpFT;
67 PushButton m_aUpPB;
68 FixedText m_aDownFT;
69 PushButton m_aDownPB;
71 Window m_aExampleContainerWIN;
72 Window m_aExampleWIN;
74 FixedText m_aZoomFT;
75 ListBox m_aZoomLB;
77 SwOneExampleFrame* m_pExampleFrame;
78 SwWrtShell* m_pExampleWrtShell;
80 String m_sExampleURL;
81 SwFrmFmt* m_pAddressBlockFormat;
83 bool m_bIsGreetingInserted;
85 SwMailMergeWizard* m_pWizard;
87 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties;
89 DECL_LINK(PreviewLoadedHdl_Impl, void*);
90 DECL_LINK(ZoomHdl_Impl, ListBox*);
91 DECL_LINK(ChangeAddressHdl_Impl, MetricField*);
92 DECL_LINK(GreetingsHdl_Impl, PushButton*);
93 DECL_LINK(AlignToTextHdl_Impl, CheckBox*);
95 static SwFrmFmt* InsertAddressFrame(
96 SwWrtShell& rShell,
97 SwMailMergeConfigItem& rConfigItem,
98 const Point& rDestination,
99 bool bAlignToBody,
100 bool bExample);
101 static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample);
103 virtual void ActivatePage();
104 virtual sal_Bool commitPage(CommitPageReason _eReason);
105 public:
106 SwMailMergeLayoutPage( SwMailMergeWizard* _pParent);
107 ~SwMailMergeLayoutPage();
109 static SwFrmFmt* InsertAddressAndGreeting(SwView* pView,
110 SwMailMergeConfigItem& rConfigItem,
111 const Point& rAddressPos,
112 bool bAlignToBody);
115 #endif