1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _MAILMERGELAYOUTPAGE_HXX 28 #define _MAILMERGELAYOUTPAGE_HXX 29 30 #include <svtools/wizardmachine.hxx> 31 #include <mailmergehelper.hxx> 32 #ifndef _SV_BUTTON_HXX 33 #include <vcl/button.hxx> 34 #endif 35 #include <svtools/stdctrl.hxx> 36 #include <vcl/field.hxx> 37 #include <vcl/lstbox.hxx> 38 #include <com/sun/star/uno/Reference.h> 39 40 class SwMailMergeWizard; 41 class SwFrmFmt; 42 class SwOneExampleFrame; 43 class SwWrtShell; 44 class SwView; 45 46 namespace com{ namespace sun{ namespace star{ namespace beans{ class XPropertySet;}}}} 47 /*-- 02.04.2004 09:21:06--------------------------------------------------- 48 49 -----------------------------------------------------------------------*/ 50 class SwMailMergeLayoutPage : public svt::OWizardPage 51 { 52 SwBoldFixedInfo m_aHeaderFI; 53 54 FixedLine m_aPositionFL; 55 56 CheckBox m_aAlignToBodyCB; 57 FixedText m_aLeftFT; 58 MetricField m_aLeftMF; 59 FixedText m_aTopFT; 60 MetricField m_aTopMF; 61 62 FixedLine m_aGreetingLineFL; 63 FixedText m_aUpFT; 64 PushButton m_aUpPB; 65 FixedText m_aDownFT; 66 PushButton m_aDownPB; 67 68 Window m_aExampleContainerWIN; 69 Window m_aExampleWIN; 70 71 FixedText m_aZoomFT; 72 ListBox m_aZoomLB; 73 74 SwOneExampleFrame* m_pExampleFrame; 75 SwWrtShell* m_pExampleWrtShell; 76 77 String m_sExampleURL; 78 SwFrmFmt* m_pAddressBlockFormat; 79 80 bool m_bIsGreetingInserted; 81 82 SwMailMergeWizard* m_pWizard; 83 84 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xViewProperties; 85 86 DECL_LINK(PreviewLoadedHdl_Impl, void*); 87 DECL_LINK(ZoomHdl_Impl, ListBox*); 88 DECL_LINK(ChangeAddressHdl_Impl, MetricField*); 89 DECL_LINK(GreetingsHdl_Impl, PushButton*); 90 DECL_LINK(AlignToTextHdl_Impl, CheckBox*); 91 92 static SwFrmFmt* InsertAddressFrame( 93 SwWrtShell& rShell, 94 SwMailMergeConfigItem& rConfigItem, 95 const Point& rDestination, 96 bool bAlignToBody, 97 bool bExample); 98 static void InsertGreeting(SwWrtShell& rShell, SwMailMergeConfigItem& rConfigItem, bool bExample); 99 100 virtual void ActivatePage(); 101 virtual sal_Bool commitPage(::svt::WizardTypes::CommitPageReason _eReason); 102 public: 103 SwMailMergeLayoutPage( SwMailMergeWizard* _pParent); 104 ~SwMailMergeLayoutPage(); 105 106 static SwFrmFmt* InsertAddressAndGreeting(SwView* pView, 107 SwMailMergeConfigItem& rConfigItem, 108 const Point& rAddressPos, 109 bool bAlignToBody); 110 }; 111 112 #endif 113 114 115