update dev300-m58
[ooovba.git] / sw / source / ui / inc / mailmergewizard.hxx
bloba34b570d07811b18da3fd58945ff83153fca7be7
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: mailmergewizard.hxx,v $
10 * $Revision: 1.9 $
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 _MAILMERGEWIZARD_HXX
31 #define _MAILMERGEWIZARD_HXX
33 #include <svtools/roadmapwizard.hxx>
35 class SwView;
36 class SwMailMergeConfigItem;
38 #define MM_DOCUMENTSELECTPAGE 0
39 #define MM_OUTPUTTYPETPAGE 1
40 #define MM_ADDRESSBLOCKPAGE 2
41 #define MM_GREETINGSPAGE 3
42 #define MM_LAYOUTPAGE 4
43 #define MM_PREPAREMERGEPAGE 5
44 #define MM_MERGEPAGE 6
45 #define MM_OUTPUTPAGE 7
47 class SwMailMergeWizard : public ::svt::RoadmapWizard
49 SwView* m_pSwView;
50 String sDocumentURL;
51 bool m_bDocumentLoad;
53 SwMailMergeConfigItem& m_rConfigItem;
55 String m_sStarting;
56 String m_sDocumentType;
57 String m_sAddressBlock;
58 String m_sAddressList;
59 String m_sGreetingsLine;
60 String m_sLayout;
61 String m_sPrepareMerge;
62 String m_sMerge;
63 String m_sOutput;
64 String m_sFinish;
66 sal_uInt16 m_nRestartPage;
68 using svt::OWizardMachine::skipUntil;
70 protected:
71 virtual svt::OWizardPage* createPage(WizardState _nState);
72 virtual void enterState( WizardState _nState );
74 // roadmap feature ??
75 // virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
76 virtual String getStateDisplayName( WizardState _nState ) const;
78 public:
79 SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
80 ~SwMailMergeWizard();
82 SwView* GetSwView() {return m_pSwView;}
83 SwMailMergeConfigItem& GetConfigItem() { return m_rConfigItem;}
85 void SetReloadDocument(const String& rURL){sDocumentURL = rURL;}
86 const String& GetReloadDocument() const {return sDocumentURL;}
88 //next step requires loading of document
89 void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
91 void UpdateRoadmap();
92 void CreateTargetDocument();
94 sal_uInt16 GetRestartPage() const {return m_nRestartPage;}
95 void SetRestartPage(sal_uInt16 nPage) { m_nRestartPage = nPage;}
97 sal_Bool skipUntil( sal_uInt16 nPage)
98 {return ::svt::RoadmapWizard::skipUntil(WizardState(nPage));}
100 void updateRoadmapItemLabel( WizardState _nState );
102 virtual short Execute();
103 virtual void StartExecuteModal( const Link& rEndDialogHdl );
105 #endif