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: mmlayoutpage.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 ************************************************************************/
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>
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
;
45 class SwOneExampleFrame
;
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
;
61 MetricField m_aLeftMF
;
65 FixedLine m_aGreetingLineFL
;
71 Window m_aExampleContainerWIN
;
77 SwOneExampleFrame
* m_pExampleFrame
;
78 SwWrtShell
* m_pExampleWrtShell
;
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(
97 SwMailMergeConfigItem
& rConfigItem
,
98 const Point
& rDestination
,
101 static void InsertGreeting(SwWrtShell
& rShell
, SwMailMergeConfigItem
& rConfigItem
, bool bExample
);
103 virtual void ActivatePage();
104 virtual sal_Bool
commitPage(CommitPageReason _eReason
);
106 SwMailMergeLayoutPage( SwMailMergeWizard
* _pParent
);
107 ~SwMailMergeLayoutPage();
109 static SwFrmFmt
* InsertAddressAndGreeting(SwView
* pView
,
110 SwMailMergeConfigItem
& rConfigItem
,
111 const Point
& rAddressPos
,