1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
42 SwMailMergeConfigItem
& m_rConfigItem
;
45 String m_sDocumentType
;
46 String m_sAddressBlock
;
47 String m_sAddressList
;
48 String m_sGreetingsLine
;
50 String m_sPrepareMerge
;
55 sal_uInt16 m_nRestartPage
;
57 using svt::OWizardMachine::skipUntil
;
60 virtual svt::OWizardPage
* createPage(WizardState _nState
);
61 virtual void enterState( WizardState _nState
);
64 // virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
65 virtual String
getStateDisplayName( WizardState _nState
) const;
68 SwMailMergeWizard(SwView
& rView
, SwMailMergeConfigItem
& rConfigItem
);
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
;}
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
);
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */