Aspose.Tasks for C++
MPPSaveOptions.h
1 #pragma once
2 //-----------------------------------------------------------------------
3 // <copyright file="MPPSaveOptions.cs" company="Aspose Pty Ltd">
4 // Copyright (c) 2002-2025 Aspose Pty Ltd. All Rights Reserved.
5 // </copyright>
6 //-----------------------------------------------------------------------
7 
8 #include <system/string.h>
9 
10 #include "aspose.tasks.cpp/Saving/SimpleSaveOptions.h"
11 #include "aspose.tasks.cpp/aspose_tasks_api_defs.h"
12 
13 namespace Aspose
14 {
15 namespace Tasks
16 {
17 class IWriter;
18 class Project;
19 } // namespace Tasks
20 } // namespace Aspose
21 
22 namespace Aspose {
23 
24 namespace Tasks {
25 
26 namespace Saving {
27 
28 /// <summary>
29 /// Allows to specify additional options when saving project data to MPP.
30 /// </summary>
31 class ASPOSE_TASKS_SHARED_CLASS MPPSaveOptions : public Aspose::Tasks::Saving::SimpleSaveOptions
32 {
33  typedef MPPSaveOptions ThisType;
35 
36  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37  ASPOSE_TASKS_SHARED_RTTI_INFO_DECL();
38 
39 public:
40 
41  /// <summary>
42  /// Gets a value indicating whether to remove invalid resource assignments when saving to MPP.
43  /// <remarks>MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save.</remarks>
44  /// </summary>
45  ASPOSE_TASKS_SHARED_API bool get_RemoveInvalidAssignments() const;
46  /// <summary>
47  /// Sets a value indicating whether to remove invalid resource assignments when saving to MPP.
48  /// <remarks>MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save.</remarks>
49  /// </summary>
50  ASPOSE_TASKS_SHARED_API void set_RemoveInvalidAssignments(bool value);
51  /// <summary>
52  /// Gets a value indicating whether to write view data when saving a project to MPP format.
53  /// <remarks>View data includes Project.Views, Filters and Tables collections.</remarks>
54  /// </summary>
55  ASPOSE_TASKS_SHARED_API bool get_WriteViewData() const;
56  /// <summary>
57  /// Sets a value indicating whether to write view data when saving a project to MPP format.
58  /// <remarks>View data includes Project.Views, Filters and Tables collections.</remarks>
59  /// </summary>
60  ASPOSE_TASKS_SHARED_API void set_WriteViewData(bool value);
61  /// <summary>
62  /// Gets a value indicating whether to write filter data when saving a project to MPP for format.
63  /// <remarks>Filter data includes Project.TaskFilters and Project.ResourceFilters collections.</remarks>
64  /// </summary>
65  /// <remarks>Currently supported for MSP 2010 or newer formats.</remarks>
66  ASPOSE_TASKS_SHARED_API bool get_WriteFilters() const;
67  /// <summary>
68  /// Sets a value indicating whether to write filter data when saving a project to MPP for format.
69  /// <remarks>Filter data includes Project.TaskFilters and Project.ResourceFilters collections.</remarks>
70  /// </summary>
71  /// <remarks>Currently supported for MSP 2010 or newer formats.</remarks>
72  ASPOSE_TASKS_SHARED_API void set_WriteFilters(bool value);
73  /// <summary>
74  /// Gets a value indicating whether to write groups data when saving a project to MPP for format.
75  /// <remarks>Group data includes Project.TaskGroups and Project.ResourceGroups collections.</remarks>
76  /// </summary>
77  ASPOSE_TASKS_SHARED_API bool get_WriteGroups() const;
78  /// <summary>
79  /// Sets a value indicating whether to write groups data when saving a project to MPP for format.
80  /// <remarks>Group data includes Project.TaskGroups and Project.ResourceGroups collections.</remarks>
81  /// </summary>
82  ASPOSE_TASKS_SHARED_API void set_WriteGroups(bool value);
83  /// <summary>
84  /// Gets a value indicating whether to remove existing VBA macros data when saving a project to MPP format.
85  /// </summary>
86  ASPOSE_TASKS_SHARED_API bool get_ClearVba() const;
87  /// <summary>
88  /// Sets a value indicating whether to remove existing VBA macros data when saving a project to MPP format.
89  /// </summary>
90  ASPOSE_TASKS_SHARED_API void set_ClearVba(bool value);
91  /// <summary>
92  /// Gets a value indicating whether to update existing VBA macros data in MPP file.
93  /// Currently writing of VbaModule.SourceCode is supported.
94  /// </summary>
95  ASPOSE_TASKS_SHARED_API bool get_WriteVba() const;
96  /// <summary>
97  /// Sets a value indicating whether to update existing VBA macros data in MPP file.
98  /// Currently writing of VbaModule.SourceCode is supported.
99  /// </summary>
100  ASPOSE_TASKS_SHARED_API void set_WriteVba(bool value);
101  /// <summary>
102  /// Gets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
103  /// <remarks>Null value indicates that the project file is not protected.</remarks>
104  /// </summary>
105  ASPOSE_TASKS_SHARED_API System::String get_ProtectionPassword() const;
106  /// <summary>
107  /// Sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
108  /// <remarks>Null value indicates that the project file is not protected.</remarks>
109  /// </summary>
110  ASPOSE_TASKS_SHARED_API void set_ProtectionPassword(const System::String& value);
111 
112  /// <summary>
113  /// Initializes a new instance of the <see cref="MPPSaveOptions"></see> class.
114  /// </summary>
115  ASPOSE_TASKS_SHARED_API MPPSaveOptions();
116 
117 protected:
118 
119  ASPOSE_TASKS_SHARED_API System::SharedPtr<IWriter> GetWriter() override;
120 
121  virtual ASPOSE_TASKS_SHARED_API ~MPPSaveOptions();
122 
123 private:
124 
125  bool pr_RemoveInvalidAssignments;
126  bool pr_WriteViewData;
127  bool pr_WriteFilters;
128  bool pr_WriteGroups;
129  bool pr_ClearVba;
130  bool pr_WriteVba;
131  System::String pr_ProtectionPassword;
132 
133  System::SharedPtr<IWriter> GetWriter(const System::SharedPtr<Aspose::Tasks::Project>& project);
134  void UpdateProjectFileSystem();
135 
136 };
137 
138 } // namespace Saving
139 } // namespace Tasks
140 } // namespace Aspose
141 
142 
This is an abstract base class that allow the user to specify basic options when saving a project int...
Definition: SimpleSaveOptions.h:51
Definition: Asn.h:12
Allows to specify additional options when saving project data to MPP.
Definition: MPPSaveOptions.h:31