bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / mailmergewizard.hxx
blobcb929bbc3d247b6283377c5f2bd7868d086f61f4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _MAILMERGEWIZARD_HXX
20 #define _MAILMERGEWIZARD_HXX
22 #include <svtools/roadmapwizard.hxx>
24 class SwView;
25 class SwMailMergeConfigItem;
27 #define MM_DOCUMENTSELECTPAGE 0
28 #define MM_OUTPUTTYPETPAGE 1
29 #define MM_ADDRESSBLOCKPAGE 2
30 #define MM_GREETINGSPAGE 3
31 #define MM_LAYOUTPAGE 4
32 #define MM_PREPAREMERGEPAGE 5
33 #define MM_MERGEPAGE 6
34 #define MM_OUTPUTPAGE 7
36 class SwMailMergeWizard : public ::svt::RoadmapWizard
38 SwView* m_pSwView;
39 String sDocumentURL;
40 bool m_bDocumentLoad;
42 SwMailMergeConfigItem& m_rConfigItem;
44 String m_sStarting;
45 String m_sDocumentType;
46 String m_sAddressBlock;
47 String m_sAddressList;
48 String m_sGreetingsLine;
49 String m_sLayout;
50 String m_sPrepareMerge;
51 String m_sMerge;
52 String m_sOutput;
53 String m_sFinish;
55 sal_uInt16 m_nRestartPage;
57 using svt::OWizardMachine::skipUntil;
59 protected:
60 virtual svt::OWizardPage* createPage(WizardState _nState);
61 virtual void enterState( WizardState _nState );
63 // roadmap feature ??
64 // virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
65 virtual String getStateDisplayName( WizardState _nState ) const;
67 public:
68 SwMailMergeWizard(SwView& rView, SwMailMergeConfigItem& rConfigItem);
69 ~SwMailMergeWizard();
71 SwView* GetSwView() {return m_pSwView;}
72 SwMailMergeConfigItem& GetConfigItem() { return m_rConfigItem;}
74 void SetReloadDocument(const String& rURL){sDocumentURL = rURL;}
75 const String& GetReloadDocument() const {return sDocumentURL;}
77 //next step requires loading of document
78 void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
80 void UpdateRoadmap();
81 void CreateTargetDocument();
83 sal_uInt16 GetRestartPage() const {return m_nRestartPage;}
84 void SetRestartPage(sal_uInt16 nPage) { m_nRestartPage = nPage;}
86 sal_Bool skipUntil( sal_uInt16 nPage)
87 {return ::svt::RoadmapWizard::skipUntil(WizardState(nPage));}
89 void updateRoadmapItemLabel( WizardState _nState );
91 virtual short Execute();
92 virtual void StartExecuteModal( const Link& rEndDialogHdl );
94 #endif
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */