LibreOffice Module sw (master)  1
mailmergewizard.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_MAILMERGEWIZARD_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_MAILMERGEWIZARD_HXX
21 
22 #include <vcl/roadmapwizard.hxx>
23 #include <rtl/ustring.hxx>
24 
25 class SwView;
27 
28 #define MM_DOCUMENTSELECTPAGE 0
29 #define MM_OUTPUTTYPETPAGE 1
30 #define MM_ADDRESSBLOCKPAGE 2
31 #define MM_GREETINGSPAGE 3
32 #define MM_LAYOUTPAGE 4
33 
35 {
36  SwView* const m_pSwView;
37  OUString sDocumentURL;
39 
40  std::shared_ptr<SwMailMergeConfigItem> m_xConfigItem;
41 
42  OUString const m_sStarting;
43  OUString const m_sDocumentType;
44  OUString const m_sAddressBlock;
45  OUString const m_sAddressList;
46  OUString const m_sGreetingsLine;
47  OUString const m_sLayout;
48 
49  sal_uInt16 m_nRestartPage;
50 
52 
53 protected:
54  virtual VclPtr<TabPage> createPage( WizardState _nState ) override;
55  virtual void enterState( WizardState _nState ) override;
56 
57 // roadmap feature ??
58 // virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason );
59  virtual OUString getStateDisplayName( WizardState _nState ) const override;
60 
61 public:
62  SwMailMergeWizard(SwView& rView, std::shared_ptr<SwMailMergeConfigItem> const & rConfigItem);
63  virtual ~SwMailMergeWizard() override;
64 
65  SwView* GetSwView() {return m_pSwView;}
66  SwMailMergeConfigItem& GetConfigItem() { return *m_xConfigItem.get();}
67 
68  void SetReloadDocument(const OUString& rURL) {sDocumentURL = rURL;}
69  const OUString& GetReloadDocument() const {return sDocumentURL;}
70 
71  //next step requires loading of document
72  void SetDocumentLoad(bool bSet) {m_bDocumentLoad = bSet;}
73 
74  void UpdateRoadmap();
75 
76  sal_uInt16 GetRestartPage() const {return m_nRestartPage;}
77  void SetRestartPage(sal_uInt16 nPage) { m_nRestartPage = nPage;}
78 
79  bool skipUntil( sal_uInt16 nPage)
80  {return ::vcl::RoadmapWizard::skipUntil(WizardState(nPage));}
81 
83 
84  virtual short Execute() override;
85 };
86 #endif
87 
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString const m_sAddressBlock
OUString const m_sGreetingsLine
SwMailMergeConfigItem & GetConfigItem()
bool skipUntil(sal_uInt16 nPage)
OUString const m_sLayout
void updateRoadmapItemLabel(WizardState _nState)
sal_uInt16 GetRestartPage() const
virtual VclPtr< TabPage > createPage(WizardState _nState) override
SwMailMergeWizard(SwView &rView, std::shared_ptr< SwMailMergeConfigItem > const &rConfigItem)
bool skipUntil(WizardState _nTargetState)
virtual OUString getStateDisplayName(WizardState _nState) const override
sal_uInt16 m_nRestartPage
SwView *const m_pSwView
void SetDocumentLoad(bool bSet)
virtual ~SwMailMergeWizard() override
void SetRestartPage(sal_uInt16 nPage)
void SetReloadDocument(const OUString &rURL)
const OUString & GetReloadDocument() const
OUString const m_sDocumentType
sal_Int16 WizardState
virtual void enterState(WizardState _nState) override
OUString const m_sAddressList
OUString const m_sStarting
std::shared_ptr< SwMailMergeConfigItem > m_xConfigItem
Definition: view.hxx:146
virtual short Execute() override