Document.h
1 //////////////////////////////////////////////////////////////////////////
2 // Copyright 2001-2019 Aspose Pty Ltd. All Rights Reserved.
3 //
4 // This file is part of Aspose.Words. The source code in this file
5 // is only intended as a supplement to the documentation, and is provided
6 // "as is", without warranty of any kind, either expressed or implied.
7 //////////////////////////////////////////////////////////////////////////
8 #pragma once
9 
10 
11 #include <system/io/stream.h>
12 #include <system/io/memory_stream.h>
13 #include <system/dummy_classes.h>
14 #include <system/date_time.h>
15 #include <system/collections/ilist.h>
16 #include <system/collections/idictionary.h>
17 #include <system/collections/dictionary.h>
18 #include <mutex>
19 #include <memory>
20 #include <drawing/size_f.h>
21 #include <drawing/graphics.h>
22 
23 #include "Aspose.Words.Cpp/Model/Saving/OoxmlCompliance.h"
24 #include "Aspose.Words.Cpp/Model/Formatting/ISectionAttrSource.h"
25 #include "Aspose.Words.Cpp/Model/Document/RevisionsView.h"
26 #include "Aspose.Words.Cpp/Model/Document/ProtectionType.h"
27 #include "Aspose.Words.Cpp/Model/Document/LoadFormat.h"
28 #include "Aspose.Words.Cpp/Model/Document/DocumentBase.h"
29 
30 namespace Aspose { namespace Words { namespace Saving { class SaveOutputParameters; } } }
31 namespace Aspose { namespace Words { namespace Rendering { class PageInfo; } } }
32 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Math { class MathContext; } } } }
33 namespace Aspose { namespace Words { namespace Drawing { namespace Core { namespace Dml { class DmlNodeCustomizer; } } } } }
34 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Math { class MathTextElement; } } } }
35 namespace Aspose { namespace Words { namespace Comparison { class ComparerNodeUtil; } } }
36 namespace Aspose { namespace Words { namespace Comparison { class FormattingComparer; } } }
37 namespace Aspose { namespace Words { namespace Themes { class ThemeColorUpdater; } } }
38 namespace Aspose { namespace Words { namespace RW { namespace Dml { namespace Writer { class DmlShapeValidator; } } } } }
39 namespace Aspose { namespace Words { namespace Fields { class ToaEntryExtractor; } } }
40 namespace Aspose { namespace Words { namespace Validation { class CustomXmlValidator; } } }
41 namespace Aspose { namespace Words { namespace RW { namespace Html { class HtmlFontNameResolver; } } } }
42 namespace Aspose { namespace Words { namespace RW { namespace Svg { namespace Reader { class SvgToEmfConverter; } } } } }
43 namespace Aspose { namespace Words { namespace Validation { namespace VmlToDml { class VmlShapeToDmlShapeConverter; } } } }
44 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class OpenXmlDocumentReader; } } } } }
45 namespace Aspose { namespace Words { namespace RW { namespace Wml { namespace Reader { class WmlEquationXmlConverter; } } } } }
46 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class DocumentFormatter; } } } } } }
47 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Css { namespace New { class StyleFormatterHtmlRules; } } } } } }
48 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlIFrameWriter; } } } } }
49 namespace Aspose { namespace Words { namespace RW { namespace Mhtml { namespace Reader { class MhtmlReader; } } } } }
50 namespace Aspose { namespace Words { namespace Fonts { class EmbeddedFontCollector; } } }
51 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxDocumentReader; } } } } }
52 namespace Aspose { namespace Words { namespace MailMerging { class MailMergeRegion; } } }
53 namespace Aspose { namespace Words { namespace Revisions { class RevisionUtil; } } }
54 namespace Aspose { namespace Words { namespace Saving { class PclSaveOptions; } } }
55 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Dml { class DmlPictureRenderer; } } } }
56 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class BackgroundShapeApsBuilder; } } } }
57 namespace Aspose { namespace Words { namespace Layout { namespace Core { class SpanFieldContextMainText; } } } }
58 namespace Aspose { namespace Words { namespace Layout { namespace Core { class DocumentLayout; } } } }
59 namespace Aspose { namespace Words { namespace Layout { class LayoutCollector; } } }
60 namespace Aspose { namespace Words { namespace Layout { class LayoutEnumerator; } } }
61 namespace Aspose { namespace Words { class OoxmlComplianceInfo; } }
62 namespace Aspose { namespace Words { class XmlNamespace; } }
63 namespace Aspose { namespace Words { namespace Fields { class FieldIndexAndTablesUtil; } } }
64 namespace Aspose { namespace Words { namespace Fields { class IndexEntryPageNumberInfo; } } }
65 namespace Aspose { namespace Words { namespace Fonts { class DocumentFontProvider; } } }
66 namespace Aspose { namespace Words { namespace Saving { class PsSaveOptions; } } }
67 namespace Aspose { namespace Words { namespace Saving { class HtmlFixedSaveOptions; } } }
68 namespace Aspose { namespace Words { namespace Validation { namespace DmlToVml { class DmlUtil; } } } }
69 namespace Aspose { namespace Words { namespace RW { namespace Html { class HtmlShapeLayout; } } } }
70 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlFramesetReader; } } } } }
71 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlVmlShapeReaderContext; } } } } }
72 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlFramesetWriter; } } } } }
73 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlStylesheet; } } } } }
74 namespace Aspose { namespace Words { namespace Saving { class MetafileRenderingOptions; } } }
75 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxAltChunkReader; } } } } }
76 namespace Aspose { namespace Words { namespace Drawing { namespace Core { class ImageDataCore; } } } }
77 namespace Aspose { namespace Words { namespace Drawing { namespace Core { class ImageDataUtil; } } } }
78 namespace Aspose { namespace Words { namespace Fields { class FieldFileName; } } }
79 namespace Aspose { namespace Words { namespace Fields { class FieldDate; } } }
80 namespace Aspose { namespace Words { namespace Fields { class FieldPageRef; } } }
81 namespace Aspose { namespace Words { namespace Fields { class FieldTime; } } }
82 namespace Aspose { namespace Words { namespace Fields { class FieldToc; } } }
83 namespace Aspose { namespace Words { namespace Fields { class FieldXE; } } }
84 namespace Aspose { namespace Words { namespace Fields { class ExternalActionUpdateLayout; } } }
85 namespace Aspose { namespace Words { class NodeUtil; } }
86 namespace Aspose { namespace Words { namespace Layout { class AttributeConverter; } } }
87 namespace Aspose { namespace Words { namespace Layout { class DocumentSpanConverter; } } }
88 namespace Aspose { namespace Words { namespace Layout { class LayoutOptionsCore; } } }
89 namespace Aspose { namespace Words { namespace Layout { namespace PreAps { class LayoutSpanPicture; } } } }
90 namespace Aspose { namespace Words { namespace BuildingBlocks { class GlossaryDocument; } } }
91 namespace Aspose { namespace Words { namespace Fields { class FieldUpdater; } } }
92 namespace Aspose { namespace Words { namespace Saving { class SvgSaveOptions; } } }
93 namespace Aspose { namespace Words { namespace Validation { class ListValidator; } } }
94 namespace Aspose { namespace Words { namespace Saving { class XamlFixedSaveOptions; } } }
95 namespace Aspose { namespace Words { namespace Saving { class PdfSaveOptions; } } }
96 namespace Aspose { namespace Words { namespace Saving { class XpsSaveOptions; } } }
97 namespace Aspose { namespace Words { namespace Themes { class Theme; } } }
98 namespace Aspose { namespace Words { class DocumentBuilder; } }
99 namespace Aspose { namespace Words { namespace Validation { class DocumentPostLoader; } } }
100 namespace Aspose { namespace Words { namespace Validation { class DocumentValidator; } } }
101 namespace Aspose { namespace Words { class SaveInfo; } }
102 namespace Aspose { namespace Words { namespace Drawing { class Shape; } } }
103 namespace Aspose { namespace Words { namespace ApsBuilder { class LayoutApsBuilder; } } }
104 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class DmlShapeApsBuilder; } } } }
105 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class ShapeApsBuilder; } } } }
106 namespace Aspose { namespace Words { namespace RW { class FixedPageWriterBase; } } }
107 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Writer { class HtmlCoreWriter; } } } } }
108 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Writer { class OdtOleWriter; } } } } }
109 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxCustomizationsReader; } } } } }
110 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxThemeReader; } } } } }
111 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxVbaReader; } } } } }
112 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxCustomizationsWriter; } } } } }
113 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxVbaWriter; } } } } }
114 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Customizations { class TcgReader; } } } } }
115 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Customizations { class TcgWriter; } } } } }
116 namespace Aspose { namespace Words { namespace RW { namespace Nrx { namespace Writer { class NrxFramesetWriter; } } } } }
117 namespace Aspose { namespace Words { namespace Fields { class FieldNumListLabelUpdater; } } }
118 namespace Aspose { namespace Words { namespace Fields { class FieldNumUtil; } } }
119 namespace Aspose { namespace Words { class NodeImporter; } }
120 namespace Aspose { namespace Words { class StyleCollection; } }
121 namespace Aspose { namespace Words { namespace TableLayout { class ParagraphMeasurer; } } }
122 namespace Aspose { namespace Words { class Run; } }
123 namespace Aspose { namespace Words { namespace Rendering { class AsposeWordsPrintDocument; } } }
124 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxDocumentWriterBase; } } } } }
125 namespace Aspose { namespace Words { namespace RW { namespace Imaging { namespace Writer { class ImagingWriter; } } } } }
126 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtBinaryObjectReader; } } } } }
127 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Writer { class OdtImageWriter; } } } } }
128 namespace Aspose { namespace Words { namespace RW { namespace Svg { namespace Writer { class SvgWriter; } } } } }
129 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Writer { class RtfLtrRtlGroupWriter; } } } } }
130 namespace Aspose { namespace Words { namespace RW { namespace Txt { namespace Reader { class TxtReader; } } } } }
131 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Reader { class OdtSettingsReader; } } } } }
132 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Writer { class OdtFieldWriter; } } } } }
133 namespace Aspose { namespace Words { class WordUtil; } }
134 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxReader; } } } } }
135 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class DocxWebSettingsReader; } } } } }
136 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxDocumentWriter; } } } } }
137 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Writer { class DocxWriter; } } } } }
138 namespace Aspose { namespace Words { namespace RW { namespace Doc { class DocPrFiler; } } } }
139 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Reader { class DocReader; } } } } }
140 namespace Aspose { namespace Words { namespace RW { namespace Doc { class VarFiler; } } } }
141 namespace Aspose { namespace Words { namespace RW { namespace Doc { namespace Writer { class DocWriter; } } } } }
142 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlListReader; } } } } }
143 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlReader; } } } } }
144 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Writer { class OdtTextPropertiesWriter; } } } } }
145 namespace Aspose { namespace Words { namespace RW { namespace Odt { namespace Writer { class OdtSettingsWriter; } } } } }
146 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfModelBuilder; } } } } }
147 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfReader; } } } } }
148 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfReaderContext; } } } } }
149 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Reader { class RtfRunPrReader; } } } } }
150 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Writer { class RtfRunPrWriter; } } } } }
151 namespace Aspose { namespace Words { namespace RW { namespace Rtf { namespace Writer { class RtfWriterContext; } } } } }
152 namespace Aspose { namespace Words { namespace RW { namespace Wml { namespace Reader { class WmlReader; } } } } }
153 namespace Aspose { namespace Words { namespace RW { namespace Wml { namespace Writer { class WmlFontsWriter; } } } } }
154 namespace Aspose { namespace Words { namespace RW { namespace Wml { namespace Writer { class WmlWriter; } } } } }
155 namespace Aspose { namespace Words { namespace RW { namespace Xaml { namespace Writer { class XamlRunWriter; } } } } }
156 namespace Aspose { namespace Words { namespace RW { namespace Xaml { namespace Writer { class XamlWriter; } } } } }
157 namespace Aspose { namespace Words { enum class VbaDocumentEvents; } }
158 namespace Aspose { namespace Words { namespace Properties { class BuiltInDocumentProperties; } } }
159 namespace Aspose { namespace Words { namespace WebExtensions { class TaskPaneCollection; } } }
160 namespace Aspose { namespace Words { namespace Properties { class CustomDocumentProperties; } } }
161 namespace Aspose { namespace Words { namespace MailMerging { class MailMerge; } } }
162 namespace Aspose { namespace Words { namespace Settings { class DocumentProtection; } } }
163 namespace Aspose { namespace Words { class SectionCollection; } }
164 namespace Aspose { namespace Words { class Section; } }
165 namespace Aspose { namespace Words { namespace Settings { class ViewOptions; } } }
166 namespace Aspose { namespace Words { namespace Settings { class WriteProtection; } } }
167 namespace Aspose { namespace Words { namespace Settings { class CompatibilityOptions; } } }
168 namespace Aspose { namespace Words { namespace Settings { class MailMergeSettings; } } }
169 namespace Aspose { namespace Words { namespace Settings { class HyphenationOptions; } } }
170 namespace Aspose { namespace Words { namespace Markup { class CustomXmlPartCollection; } } }
171 namespace Aspose { namespace Words { namespace Markup { class CustomPartCollection; } } }
172 namespace Aspose { namespace Words { class AllocatedCommand; } }
173 namespace Aspose { namespace Words { class KeyMap; } }
174 namespace Aspose { namespace Words { class VariableCollection; } }
175 namespace Aspose { namespace Words { namespace Fonts { class FontSettings; } } }
176 namespace Aspose { namespace Words { namespace Frames { class FrameSet; } } }
177 namespace Aspose { namespace Words { namespace RW { namespace Doc { class RouteSlip; } } } }
178 namespace Aspose { namespace Words { class XmlNamespaceCollection; } }
179 namespace Aspose { namespace Words { class XmlSchemaReferenceCollection; } }
180 namespace Aspose { namespace Words { namespace Revisions { class EditSession; } } }
181 namespace Aspose { namespace Words { namespace Licensing { class VentureLicense; } } }
182 namespace Aspose { namespace Words { namespace Layout { namespace PreAps { class PageLayout; } } } }
183 namespace Aspose { namespace Words { namespace Drawing { class ShapeBase; } } }
184 namespace Aspose { namespace Words { namespace ApsBuilder { namespace Shapes { class CanvasInfo; } } } }
185 namespace Aspose { namespace Words { class RevisionCollection; } }
186 namespace Aspose { namespace Words { namespace Layout { class LayoutOptions; } } }
187 namespace Aspose { namespace Words { class FootnoteOptions; } }
188 namespace Aspose { namespace Words { class EndnoteOptions; } }
189 namespace Aspose { namespace Words { namespace Fields { class FieldOptions; } } }
190 namespace Aspose { namespace Words { class VbaProject; } }
191 namespace Aspose { namespace Words { namespace Fields { class FieldStart; } } }
192 namespace Aspose { namespace Words { namespace Fields { class FieldNumListLabel; } } }
193 namespace Aspose { namespace Words { class LoadOptions; } }
194 namespace Aspose { namespace Words { class Node; } }
195 namespace Aspose { namespace Words { class INodeCloningListener; } }
196 namespace Aspose { namespace Words { class DocumentVisitor; } }
197 namespace Aspose { namespace Words { enum class VisitorAction; } }
198 namespace Aspose { namespace Words { class ImportFormatOptions; } }
199 namespace Aspose { namespace Words { namespace Saving { class SaveOptions; } } }
200 namespace Aspose { namespace Words { class CleanupOptions; } }
201 namespace Aspose { namespace Words { class CompareOptions; } }
202 namespace Aspose { namespace Words { namespace Layout { namespace Core { class BookletSignature; } } } }
203 namespace Aspose { namespace Rendering { namespace Aps { class ApsPage; } } }
204 namespace Aspose { namespace Words { namespace Rendering { class ThumbnailGeneratingOptions; } } }
205 namespace Aspose { namespace Ss { class MemoryStorage; } }
206 
207 namespace Aspose {
208 
209 namespace Words {
210 
211 
212 /// <summary>
213 /// Represents a Word document.
214 /// </summary>
215 /// <remarks>
216 /// <p>The <b>Document</b> is a central object in the Aspose.Words library.</p>
217 /// <p>To load an existing document in any of the <see cref="Aspose::Words::LoadFormat" /> formats, pass a file name
218 /// or a stream into one of the <b>Document</b> constructors. To create a blank document, call the
219 /// constructor without parameters.</p>
220 /// <p>Use one of the Save method overloads to save the document in any of the
221 /// <see cref="Aspose::Words::SaveFormat" /> formats.</p>
222 /// <para>To draw document pages directly onto a <b>Graphics</b> object use
223 /// <see cref="Aspose::Words::Document::RenderToScale(int32_t, System::SharedPtr&lt;$System::Drawing::Graphics&gt;, float, float, float)" /> or <see cref="Aspose::Words::Document::RenderToSize(int32_t, System::SharedPtr&lt;$System::Drawing::Graphics&gt;, float, float, float, float)" /> method.</para>
224 /// <para>To print the document, use one of the <see cref="Aspose::Words::Document::Print(System::String)" /> methods.</para>
225 /// <p>
226 /// <see cref="Aspose::Words::Document::get_MailMerge" /> is the Aspose.Words's reporting engine that allows to populate
227 /// reports designed in Microsoft Word with data from various data sources quickly and easily.
228 /// The data can be from a DataSet, DataTable, DataView, IDataReader or an array of values.
229 /// <b>MailMerge</b> will go through the records found in the data source and insert them into
230 /// mail merge fields in the document growing it as necessary.</p>
231 /// <p>
232 /// <b>Document</b> stores document-wide information such as <see cref="Aspose::Words::DocumentBase::get_Styles" />,
233 /// <see cref="Aspose::Words::Document::get_BuiltInDocumentProperties" />, <see cref="Aspose::Words::Document::get_CustomDocumentProperties" />, lists and macros.
234 /// Most of these objects are accessible via the corresponding properties of the <b>Document</b>.</p>
235 /// <p>The <b>Document</b> is a root node of a tree that contains all other nodes of the document.
236 /// The tree is a Composite design pattern and in many ways similar to XmlDocument.
237 /// The content of the document can be manipulated freely programmatically:</p>
238 /// <list type="bullet">
239 /// <item>The nodes of the document can be accessed via typed collections, for example <see cref="Aspose::Words::Document::get_Sections" />,
240 /// <see cref="Aspose::Words::ParagraphCollection" /> etc.</item>
241 /// <item>The nodes of the document can be selected by their node type using
242 /// <see cref="Aspose::Words::CompositeNode::GetChildNodes(Aspose::Words::NodeType, bool)" />
243 /// or using an XPath query with <see cref="Aspose::Words::CompositeNode::SelectNodes(System::String)" /> or <see cref="Aspose::Words::CompositeNode::SelectSingleNode(System::String)" />.</item>
244 /// <item>Content nodes can be added or removed from anywhere in the document using
245 /// <see cref="Aspose::Words::CompositeNode::InsertBefore(System::SharedPtr&lt;Aspose::Words::Node&gt;, System::SharedPtr&lt;Aspose::Words::Node&gt;)" />, <see cref="Aspose::Words::CompositeNode::InsertAfter(System::SharedPtr&lt;Aspose::Words::Node&gt;, System::SharedPtr&lt;Aspose::Words::Node&gt;)" />,
246 /// <see cref="Aspose::Words::CompositeNode::RemoveChild(System::SharedPtr&lt;Aspose::Words::Node&gt;)" /> and other
247 /// methods provided by the base class <see cref="Aspose::Words::CompositeNode" />.</item>
248 /// <item>The formatting attributes of each node can be changed via the properties of that node.</item>
249 /// </list>
250 /// <p>Consider using <see cref="Aspose::Words::DocumentBuilder" /> that simplifies the task of programmatically creating
251 /// or populating the document tree.</p>
252 /// <p>The <b>Document</b> can contain only <see cref="Aspose::Words::Section" /> objects.</p>
253 /// <p>In Microsoft Word, a valid document needs to have at least one section.</p>
254 /// </remarks>
255 class Document : public Aspose::Words::DocumentBase, public Aspose::Words::ISectionAttrSource
256 {
257  typedef Document ThisType;
258  typedef Aspose::Words::DocumentBase BaseType;
259  typedef Aspose::Words::ISectionAttrSource BaseType1;
260 
261  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
262  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
263 
265  friend class Aspose::Words::ApsBuilder::Math::MathContext;
266  friend class Aspose::Words::Drawing::Core::Dml::DmlNodeCustomizer;
267  friend class Aspose::Words::ApsBuilder::Math::MathTextElement;
268  friend class Aspose::Words::Comparison::ComparerNodeUtil;
269  friend class Aspose::Words::Comparison::FormattingComparer;
270  friend class Aspose::Words::Themes::ThemeColorUpdater;
271  friend class Aspose::Words::RW::Dml::Writer::DmlShapeValidator;
272  friend class Aspose::Words::Fields::ToaEntryExtractor;
273  friend class Aspose::Words::Validation::CustomXmlValidator;
274  friend class Aspose::Words::RW::Html::HtmlFontNameResolver;
275  friend class Aspose::Words::RW::Svg::Reader::SvgToEmfConverter;
276  friend class Aspose::Words::Validation::VmlToDml::VmlShapeToDmlShapeConverter;
277  friend class Aspose::Words::RW::Docx::Reader::OpenXmlDocumentReader;
278  friend class Aspose::Words::RW::Wml::Reader::WmlEquationXmlConverter;
279  friend class Aspose::Words::RW::Html::Css::New::DocumentFormatter;
280  friend class Aspose::Words::RW::Html::Css::New::StyleFormatterHtmlRules;
281  friend class Aspose::Words::RW::Html::Writer::HtmlIFrameWriter;
282  friend class Aspose::Words::RW::Mhtml::Reader::MhtmlReader;
283  friend class Aspose::Words::Fonts::EmbeddedFontCollector;
284  friend class Aspose::Words::RW::Docx::Reader::DocxDocumentReader;
285  friend class Aspose::Words::MailMerging::MailMergeRegion;
286  friend class Aspose::Words::Revisions::RevisionUtil;
287  friend class Aspose::Words::Saving::PclSaveOptions;
288  friend class Aspose::Words::ApsBuilder::Dml::DmlPictureRenderer;
289  friend class Aspose::Words::ApsBuilder::Shapes::BackgroundShapeApsBuilder;
290  friend class Aspose::Words::Layout::Core::SpanFieldContextMainText;
291  friend class Aspose::Words::Layout::Core::DocumentLayout;
292  friend class Aspose::Words::Layout::LayoutCollector;
293  friend class Aspose::Words::Layout::LayoutEnumerator;
294  friend class Aspose::Words::OoxmlComplianceInfo;
295  friend class Aspose::Words::XmlNamespace;
296  friend class Aspose::Words::Fields::FieldIndexAndTablesUtil;
297  friend class Aspose::Words::Fields::IndexEntryPageNumberInfo;
298  friend class Aspose::Words::Fonts::DocumentFontProvider;
299  friend class Aspose::Words::Saving::PsSaveOptions;
300  friend class Aspose::Words::Saving::HtmlFixedSaveOptions;
301  friend class Aspose::Words::Validation::DmlToVml::DmlUtil;
302  friend class Aspose::Words::RW::Html::HtmlShapeLayout;
303  friend class Aspose::Words::RW::Html::Reader::HtmlFramesetReader;
304  friend class Aspose::Words::RW::Html::Reader::HtmlVmlShapeReaderContext;
305  friend class Aspose::Words::RW::Html::Writer::HtmlFramesetWriter;
306  friend class Aspose::Words::RW::Html::Writer::HtmlStylesheet;
307  friend class Aspose::Words::Saving::MetafileRenderingOptions;
308  friend class Aspose::Words::RW::Docx::Reader::DocxAltChunkReader;
309  friend class Aspose::Words::Drawing::Core::ImageDataCore;
310  friend class Aspose::Words::Drawing::Core::ImageDataUtil;
311  friend class Aspose::Words::Fields::FieldFileName;
312  friend class Aspose::Words::Fields::FieldDate;
313  friend class Aspose::Words::Fields::FieldPageRef;
314  friend class Aspose::Words::Fields::FieldTime;
315  friend class Aspose::Words::Fields::FieldToc;
316  friend class Aspose::Words::Fields::FieldXE;
317  friend class Aspose::Words::Fields::ExternalActionUpdateLayout;
318  friend class Aspose::Words::NodeUtil;
319  friend class Aspose::Words::Layout::AttributeConverter;
320  friend class Aspose::Words::Layout::DocumentSpanConverter;
321  friend class Aspose::Words::Layout::LayoutOptionsCore;
322  friend class Aspose::Words::Layout::PreAps::LayoutSpanPicture;
323  friend class Aspose::Words::BuildingBlocks::GlossaryDocument;
324  friend class Aspose::Words::DocumentBase;
325  friend class Aspose::Words::Fields::FieldUpdater;
326  friend class Aspose::Words::Saving::SvgSaveOptions;
327  friend class Aspose::Words::Validation::ListValidator;
328  friend class Aspose::Words::Saving::XamlFixedSaveOptions;
329  friend class Aspose::Words::Saving::PdfSaveOptions;
330  friend class Aspose::Words::Saving::XpsSaveOptions;
331  friend class Aspose::Words::Themes::Theme;
332  friend class Aspose::Words::DocumentBuilder;
333  friend class Aspose::Words::Validation::DocumentPostLoader;
334  friend class Aspose::Words::Validation::DocumentValidator;
335  friend class Aspose::Words::SaveInfo;
336  friend class Aspose::Words::Drawing::Shape;
337  friend class Aspose::Words::ApsBuilder::LayoutApsBuilder;
338  friend class Aspose::Words::ApsBuilder::Shapes::DmlShapeApsBuilder;
339  friend class Aspose::Words::ApsBuilder::Shapes::ShapeApsBuilder;
340  friend class Aspose::Words::RW::FixedPageWriterBase;
341  friend class Aspose::Words::RW::Html::Writer::HtmlCoreWriter;
342  friend class Aspose::Words::RW::Odt::Writer::OdtOleWriter;
343  friend class Aspose::Words::RW::Docx::Reader::DocxCustomizationsReader;
344  friend class Aspose::Words::RW::Docx::Reader::DocxThemeReader;
345  friend class Aspose::Words::RW::Docx::Reader::DocxVbaReader;
346  friend class Aspose::Words::RW::Docx::Writer::DocxCustomizationsWriter;
347  friend class Aspose::Words::RW::Docx::Writer::DocxVbaWriter;
348  friend class Aspose::Words::RW::Doc::Customizations::TcgReader;
349  friend class Aspose::Words::RW::Doc::Customizations::TcgWriter;
350  friend class Aspose::Words::RW::Nrx::Writer::NrxFramesetWriter;
351  friend class Aspose::Words::Fields::FieldNumListLabelUpdater;
352  friend class Aspose::Words::Fields::FieldNumUtil;
353  friend class Aspose::Words::NodeImporter;
354  friend class Aspose::Words::StyleCollection;
355  friend class Aspose::Words::TableLayout::ParagraphMeasurer;
356  friend class Aspose::Words::Run;
357  friend class Aspose::Words::Rendering::AsposeWordsPrintDocument;
358  friend class Aspose::Words::RW::Docx::Writer::DocxDocumentWriterBase;
359  friend class Aspose::Words::RW::Imaging::Writer::ImagingWriter;
360  friend class Aspose::Words::RW::Odt::Reader::OdtBinaryObjectReader;
361  friend class Aspose::Words::RW::Odt::Writer::OdtImageWriter;
362  friend class Aspose::Words::RW::Svg::Writer::SvgWriter;
363  friend class Aspose::Words::RW::Rtf::Writer::RtfLtrRtlGroupWriter;
364  friend class Aspose::Words::RW::Txt::Reader::TxtReader;
365  friend class Aspose::Words::RW::Odt::Reader::OdtSettingsReader;
366  friend class Aspose::Words::RW::Odt::Writer::OdtFieldWriter;
367  friend class Aspose::Words::WordUtil;
368  friend class Aspose::Words::RW::Docx::Reader::DocxReader;
369  friend class Aspose::Words::RW::Docx::Reader::DocxWebSettingsReader;
370  friend class Aspose::Words::RW::Docx::Writer::DocxDocumentWriter;
371  friend class Aspose::Words::RW::Docx::Writer::DocxWriter;
372  friend class Aspose::Words::RW::Doc::DocPrFiler;
373  friend class Aspose::Words::RW::Doc::Reader::DocReader;
374  friend class Aspose::Words::RW::Doc::VarFiler;
375  friend class Aspose::Words::RW::Doc::Writer::DocWriter;
376  friend class Aspose::Words::RW::Html::Reader::HtmlListReader;
377  friend class Aspose::Words::RW::Html::Reader::HtmlReader;
378  friend class Aspose::Words::RW::Odt::Writer::OdtTextPropertiesWriter;
379  friend class Aspose::Words::RW::Odt::Writer::OdtSettingsWriter;
380  friend class Aspose::Words::RW::Rtf::Reader::RtfModelBuilder;
381  friend class Aspose::Words::RW::Rtf::Reader::RtfReader;
382  friend class Aspose::Words::RW::Rtf::Reader::RtfReaderContext;
383  friend class Aspose::Words::RW::Rtf::Reader::RtfRunPrReader;
384  friend class Aspose::Words::RW::Rtf::Writer::RtfRunPrWriter;
385  friend class Aspose::Words::RW::Rtf::Writer::RtfWriterContext;
386  friend class Aspose::Words::RW::Wml::Reader::WmlReader;
387  friend class Aspose::Words::RW::Wml::Writer::WmlFontsWriter;
388  friend class Aspose::Words::RW::Wml::Writer::WmlWriter;
389  friend class Aspose::Words::RW::Xaml::Writer::XamlRunWriter;
390  friend class Aspose::Words::RW::Xaml::Writer::XamlWriter;
391 
392 public:
393  using Aspose::Words::DocumentBase::Clone;
394 
395 public:
396 
397  /// <summary>
398  /// Gets or sets the full path of the template attached to the document.
399  /// </summary>
400  /// <remarks>
401  /// <p>Empty string means the document is attached to the Normal template.</p>
402  /// <seealso cref="Aspose::Words::Properties::BuiltInDocumentProperties::get_Template" />
403  /// </remarks>
404  /// <exception cref="T:System.ArgumentNullException">Throws if you attempt to set to a null value.</exception>
405  ASPOSE_WORDS_SHARED_API System::String get_AttachedTemplate();
406  /// Setter for Aspose::Words::Document::get_AttachedTemplate
407  ASPOSE_WORDS_SHARED_API void set_AttachedTemplate(System::String value);
408  /// <summary>
409  /// Gets or sets a flag indicating whether the styles in the document are updated to match the styles in the
410  /// attached template each time the document is opened in MS Word.
411  /// </summary>
412  ASPOSE_WORDS_SHARED_API bool get_AutomaticallyUpdateSyles();
413  /// Setter for Aspose::Words::Document::get_AutomaticallyUpdateSyles
414  ASPOSE_WORDS_SHARED_API void set_AutomaticallyUpdateSyles(bool value);
415  /// <summary>
416  /// Specifies whether to turn on the gray shading on form fields.
417  /// </summary>
418  ASPOSE_WORDS_SHARED_API bool get_ShadeFormData();
419  /// Setter for Aspose::Words::Document::get_ShadeFormData
420  ASPOSE_WORDS_SHARED_API void set_ShadeFormData(bool value);
421  /// <summary>
422  /// <b>True</b> if changes are tracked when this document is edited in Microsoft Word.
423  /// </summary>
424  /// <remarks>
425  /// <p>Setting this option only instructs Microsoft Word whether the track changes
426  /// is turned on or off. This property has no effect on changes to the document that you make
427  /// programmatically via Aspose.Words.</p>
428  /// <p>If you want to automatically track changes as they are made programmatically by Aspose.Words
429  /// to this document use the <see cref="Aspose::Words::Document::StartTrackRevisions(System::String, System::DateTime)" /> method.</p>
430  /// </remarks>
431  ASPOSE_WORDS_SHARED_API bool get_TrackRevisions();
432  /// Setter for Aspose::Words::Document::get_TrackRevisions
433  ASPOSE_WORDS_SHARED_API void set_TrackRevisions(bool value);
434  /// <summary>
435  /// Returns <b>NodeType.Document</b>.
436  /// </summary>
437  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::NodeType get_NodeType() const;
438  /// <summary>
439  /// Returns a collection that represents all the built-in document properties of the document.
440  /// </summary>
441  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Properties::BuiltInDocumentProperties> get_BuiltInDocumentProperties() const;
442  /// <summary>
443  /// Returns a collection that represents a list of task pane add-ins.
444  /// </summary>
445  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::WebExtensions::TaskPaneCollection> get_WebExtensionTaskPanes() const;
446  /// <summary>
447  /// Returns a collection that represents all the custom document properties of the document.
448  /// </summary>
449  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Properties::CustomDocumentProperties> get_CustomDocumentProperties();
450  /// <summary>
451  /// Returns a <b>MailMerge</b> object that represents the mail merge functionality for the document.
452  /// </summary>
453  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::MailMerging::MailMerge> get_MailMerge();
454  /// <summary>
455  /// Gets the currently active document protection type.
456  /// </summary>
457  /// <remarks>
458  /// <p>This property allows to retrieve the currently set document protection type.
459  /// To change the document protection type use the <see cref="Aspose::Words::Document::Protect(Aspose::Words::ProtectionType, System::String)" />
460  /// and <see cref="Aspose::Words::Document::Unprotect" /> methods.</p>
461  /// <p>When a document is protected, the user can make only limited changes,
462  /// such as adding annotations, making revisions, or completing a form.</p>
463  /// <para>Note that document protection is different from write protection.
464  /// Write protection is specified using the <see cref="Aspose::Words::Document::get_WriteProtection" /></para>
465  /// <seealso cref="Aspose::Words::Document::Protect(Aspose::Words::ProtectionType, System::String)" />
466  /// <seealso cref="Aspose::Words::Document::Unprotect" />
467  /// <seealso cref="Aspose::Words::Document::get_WriteProtection" />
468  /// </remarks>
469  ASPOSE_WORDS_SHARED_API Aspose::Words::ProtectionType get_ProtectionType();
470  /// <summary>
471  /// Returns a collection that represents all sections in the document.
472  /// </summary>
473  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::SectionCollection> get_Sections();
474  /// <summary>
475  /// Gets the first section in the document.
476  /// </summary>
477  /// <remarks>
478  /// Returns <c>null</c> if there are no sections.
479  /// </remarks>
480  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Section> get_FirstSection();
481  /// <summary>
482  /// Gets the last section in the document.
483  /// </summary>
484  /// <remarks>
485  /// Returns <c>null</c> if there are no sections.
486  /// </remarks>
487  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Section> get_LastSection();
488  /// <summary>
489  /// Provides options to control how the document is displayed in Microsoft Word.
490  /// </summary>
491  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Settings::ViewOptions> get_ViewOptions();
492  /// <summary>
493  /// Provides access to the document write protection options.
494  /// </summary>
495  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Settings::WriteProtection> get_WriteProtection();
496  /// <summary>
497  /// Provides access to document compatibility options (that is, the user preferences entered on the <b>Compatibility</b>
498  /// tab of the <b>Options</b> dialog in Word).
499  /// </summary>
500  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Settings::CompatibilityOptions> get_CompatibilityOptions();
501  /// <summary>
502  /// Gets or sets the object that contains all of the mail merge information for a document.
503  /// </summary>
504  /// <remarks>
505  /// <para>You can use this object to specify a mail merge data source for a document and this information
506  /// (along with the available data fields) will appear in Microsoft Word when the user opens this document.
507  /// Or you can use this object to query mail merge settings that the user has specified in Microsoft Word
508  /// for this document.</para>
509  /// <para>This object is never null.</para>
510  /// </remarks>
511  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Settings::MailMergeSettings> get_MailMergeSettings();
512  /// Setter for Aspose::Words::Document::get_MailMergeSettings
513  ASPOSE_WORDS_SHARED_API void set_MailMergeSettings(System::SharedPtr<Aspose::Words::Settings::MailMergeSettings> value);
514  /// <summary>
515  /// Provides access to document hyphenation options.
516  /// </summary>
517  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Settings::HyphenationOptions> get_HyphenationOptions();
518  /// <summary>
519  /// Returns <b>true</b> if the document has any tracked changes.
520  /// </summary>
521  /// <remarks>
522  /// This property is a shortcut for comparing <see cref="Aspose::Words::RevisionCollection::get_Count" /> to zero.
523  /// </remarks>
524  ASPOSE_WORDS_SHARED_API bool get_HasRevisions();
525  /// <summary>
526  /// Returns <b>true</b> if the document has a VBA project (macros).
527  /// </summary>
528  /// <remarks>
529  /// <seealso cref="Aspose::Words::Document::RemoveMacros" />
530  /// </remarks>
531  ASPOSE_WORDS_SHARED_API bool get_HasMacros();
532  /// <summary>
533  /// Gets the number of document versions that was stored in the DOC document.
534  /// </summary>
535  /// <remarks>
536  /// <p>Versions in Microsoft Word are accessed via the File/Versions menu. Microsoft Word supports
537  /// versions only for DOC files.</p>
538  /// <p>This property allows to detect if there were document versions stored in this document
539  /// before it was opened in Aspose.Words. Aspose.Words provides no other support for document versions.
540  /// If you save this document using Aspose.Words, the document will be saved without versions.</p>
541  /// </remarks>
542  ASPOSE_WORDS_SHARED_API int32_t get_VersionsCount();
543  /// <summary>
544  /// Gets or sets the interval (in points) between the default tab stops.
545  /// </summary>
546  /// <remarks>
547  /// <seealso cref="Aspose::Words::TabStopCollection" />
548  /// <seealso cref="Aspose::Words::TabStop" />
549  /// </remarks>
550  ASPOSE_WORDS_SHARED_API double get_DefaultTabStop();
551  /// Setter for Aspose::Words::Document::get_DefaultTabStop
552  ASPOSE_WORDS_SHARED_API void set_DefaultTabStop(double value);
553  /// <summary>
554  /// Gets the <see cref="Aspose::Words::Document::get_Theme" /> object for this document.
555  /// </summary>
556  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Themes::Theme> get_Theme();
557  /// <summary>
558  /// Gets or sets the collection of Custom XML Data Storage Parts.
559  /// </summary>
560  /// <remarks>
561  /// <para>Aspose.Words loads and saves Custom XML Parts into OOXML and DOC documents only.</para>
562  /// <para>This property cannot be <c>null</c>.</para>
563  /// <seealso cref="Aspose::Words::Markup::CustomXmlPart" />
564  /// </remarks>
565  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Markup::CustomXmlPartCollection> get_CustomXmlParts() const;
566  /// Setter for Aspose::Words::Document::get_CustomXmlParts
567  ASPOSE_WORDS_SHARED_API void set_CustomXmlParts(System::SharedPtr<Aspose::Words::Markup::CustomXmlPartCollection> value);
568  /// <summary>
569  /// Gets or sets the collection of custom parts (arbitrary content) that are linked to the OOXML package using "unknown relationships".
570  /// </summary>
571  /// <remarks>
572  /// <para>Do not confuse these custom parts with Custom XML Data. If you need to access Custom XML parts,
573  /// use the <see cref="Aspose::Words::Document::get_CustomXmlParts" /> property.</para>
574  /// <para>This collection contains OOXML parts whose parent is the OOXML package and they targets are of an "unknown relationship".
575  /// For more information see <see cref="Aspose::Words::Markup::CustomPart" />.</para>
576  /// <para>Aspose.Words loads and saves custom parts into OOXML documents only.</para>
577  /// <para>This property cannot be <c>null</c>.</para>
578  /// <seealso cref="Aspose::Words::Markup::CustomPart" />
579  /// </remarks>
580  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Markup::CustomPartCollection> get_PackageCustomParts() const;
581  /// Setter for Aspose::Words::Document::get_PackageCustomParts
582  ASPOSE_WORDS_SHARED_API void set_PackageCustomParts(System::SharedPtr<Aspose::Words::Markup::CustomPartCollection> value);
583  /// <summary>
584  /// Returns the collection of variables added to a document or template.
585  /// </summary>
586  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::VariableCollection> get_Variables();
587  /// <summary>
588  /// Gets or sets the glossary document within this document or template. A glossary document is a storage
589  /// for AutoText, AutoCorrect and Building Block entries defined in a document.
590  /// </summary>
591  /// <remarks>
592  /// <para>This property returns <c>null</c> if the document does not have a glossary document.</para>
593  /// <para>You can add a glossary document to a document by creating a
594  /// <see cref="Aspose::Words::BuildingBlocks::GlossaryDocument" /> object and assigning to this property.</para>
595  /// <seealso cref="Aspose::Words::BuildingBlocks::GlossaryDocument" />
596  /// </remarks>
597  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> get_GlossaryDocument() const;
598  /// Setter for Aspose::Words::Document::get_GlossaryDocument
599  ASPOSE_WORDS_SHARED_API void set_GlossaryDocument(System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> value);
600  /// <summary>
601  /// Gets the original file name of the document.
602  /// </summary>
603  /// <remarks>
604  /// <p>Returns null if the document was loaded from a stream or created blank.</p>
605  /// </remarks>
606  ASPOSE_WORDS_SHARED_API System::String get_OriginalFileName() const;
607  /// <summary>
608  /// Gets the format of the original document that was loaded into this object.
609  /// </summary>
610  /// <remarks>
611  /// <para>If you created a new blank document, returns the <see cref="Aspose::Words::LoadFormat::Doc" /> value.</para>
612  /// </remarks>
613  ASPOSE_WORDS_SHARED_API Aspose::Words::LoadFormat get_OriginalLoadFormat() const;
614  /// <summary>
615  /// Gets the OOXML compliance version determined from the loaded document content.
616  /// Makes sense only for OOXML documents.
617  /// </summary>
618  /// <remarks>
619  /// <para>If you created a new blank document or load non OOXML document
620  /// returns the <see cref="Aspose::Words::Saving::OoxmlCompliance::Ecma376_2006" /> value.</para>
621  /// </remarks>
622  ASPOSE_WORDS_SHARED_API Aspose::Words::Saving::OoxmlCompliance get_Compliance();
623  /// <summary>
624  /// Gets or sets document font settings.
625  /// </summary>
626  /// <remarks>
627  /// <para>This property allows to specify font settings per document. If set to null, default static font settings
628  /// <see cref="Aspose::Words::Fonts::FontSettings::get_DefaultInstance" /> will be used.</para>
629  /// <para>The default value is null.</para>
630  /// </remarks>
631  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fonts::FontSettings> get_FontSettings() const;
632  /// Setter for Aspose::Words::Document::get_FontSettings
633  ASPOSE_WORDS_SHARED_API void set_FontSettings(System::SharedPtr<Aspose::Words::Fonts::FontSettings> value);
634  /// <summary>
635  /// Gets the number of pages in the document as calculated by the most recent page layout operation.
636  /// </summary>
637  /// <remarks>
638  /// <seealso cref="Aspose::Words::Document::UpdatePageLayout" />
639  /// </remarks>
640  ASPOSE_WORDS_SHARED_API int32_t get_PageCount();
641  /// <summary>
642  /// Gets a collection of revisions (tracked changes) that exist in this document.
643  /// </summary>
644  /// <remarks>
645  /// <para>The returned collection is a "live" collection, which means if you remove parts of a document that contain
646  /// revisions, the deleted revisions will automatically disappear from this collection.</para>
647  /// </remarks>
648  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::RevisionCollection> get_Revisions();
649  /// <summary>
650  /// Gets a <b>LayoutOptions</b> object that represents options to control the layout process of this document.
651  /// </summary>
652  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Layout::LayoutOptions> get_LayoutOptions() const;
653  /// <summary>
654  /// Gets or sets a value indicating whether to work with the original or revised version of a document.
655  /// </summary>
656  /// <remarks>
657  /// The default value is <b><see cref="Aspose::Words::RevisionsView::Original" /></b>.
658  /// </remarks>
659  ///
660  ASPOSE_WORDS_SHARED_API Aspose::Words::RevisionsView get_RevisionsView() const;
661  /// Setter for Aspose::Words::Document::get_RevisionsView
662  ASPOSE_WORDS_SHARED_API void set_RevisionsView(Aspose::Words::RevisionsView value);
663  /// <summary>
664  /// Provides options that control numbering and positioning of footnotes in this document.
665  /// </summary>
666  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::FootnoteOptions> get_FootnoteOptions();
667  /// <summary>
668  /// Provides options that control numbering and positioning of endnotes in this document.
669  /// </summary>
670  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::EndnoteOptions> get_EndnoteOptions();
671  /// <summary>
672  /// Gets a <b>FieldOptions</b> object that represents options to control field handling in the document.
673  /// </summary>
674  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FieldOptions> get_FieldOptions();
675  /// <summary>
676  /// Gets or sets a flag indicating that Microsoft Word will remove all user information from comments, revisions and
677  /// document properties upon saving the document.
678  /// </summary>
679  ASPOSE_WORDS_SHARED_API bool get_RemovePersonalInformation();
680  /// Setter for Aspose::Words::Document::get_RemovePersonalInformation
681  ASPOSE_WORDS_SHARED_API void set_RemovePersonalInformation(bool value);
682  /// <summary>
683  /// Gets or sets a <see cref="Aspose::Words::Document::get_VbaProject" />.
684  /// </summary>
685  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::VbaProject> get_VbaProject() const;
686  /// Setter for Aspose::Words::Document::get_VbaProject
687  ASPOSE_WORDS_SHARED_API void set_VbaProject(System::SharedPtr<Aspose::Words::VbaProject> value);
688 
689  ///
690  /// <summary>
691  /// Creates a blank Word document.
692  /// </summary>
693  /// <remarks>
694  /// <p>The document paper size is Letter by default. If you want to change page setup, use
695  /// <see cref="Aspose::Words::Section::get_PageSetup">Section.PageSetup</see>.</p>
696  /// <p>After creation, you can use <see cref="Aspose::Words::DocumentBuilder" /> to add document content easily.</p>
697  /// </remarks>
698  ASPOSE_WORDS_SHARED_API Document();
699  /// <summary>
700  /// Opens an existing document from a file. Automatically detects the file format.
701  /// </summary>
702  /// <param name="fileName">File name of the document to open.</param>
703  /// <exception cref="T:Aspose.Words.UnsupportedFileFormatException">The document format is not recognized or not supported.</exception>
704  /// <exception cref="T:Aspose.Words.FileCorruptedException">The document appears to be corrupted and cannot be loaded.</exception>
705  /// <exception cref="T:System.Exception">There is a problem with the document and it should be reported to Aspose.Words developers.</exception>
706  /// <exception cref="T:System.IO.IOException">There is an input/output exception.</exception>
707  /// <exception cref="T:Aspose.Words.IncorrectPasswordException">The document is encrypted and requires a password to open, but you supplied an incorrect password.</exception>
708  /// <exception cref="T:System.ArgumentException">The name of the file cannot be null or empty string.</exception>
709  ASPOSE_WORDS_SHARED_API Document(System::String fileName);
710  /// <summary>
711  /// Opens an existing document from a file. Allows to specify additional options such as an encryption password.
712  /// </summary>
713  /// <remarks>
714  /// </remarks>
715  /// <param name="fileName">File name of the document to open.</param>
716  /// <param name="loadOptions">Additional options to use when loading a document. Can be null.</param>
717  /// <exception cref="T:Aspose.Words.UnsupportedFileFormatException">The document format is not recognized or not supported.</exception>
718  /// <exception cref="T:Aspose.Words.FileCorruptedException">The document appears to be corrupted and cannot be loaded.</exception>
719  /// <exception cref="T:System.Exception">There is a problem with the document and it should be reported to Aspose.Words developers.</exception>
720  /// <exception cref="T:System.IO.IOException">There is an input/output exception.</exception>
721  /// <exception cref="T:Aspose.Words.IncorrectPasswordException">The document is encrypted and requires a password to open, but you supplied an incorrect password.</exception>
722  /// <exception cref="T:System.ArgumentException">The name of the file cannot be null or empty string.</exception>
723  ASPOSE_WORDS_SHARED_API Document(System::String fileName, System::SharedPtr<Aspose::Words::LoadOptions> loadOptions);
724  /// <summary>
725  /// Opens an existing document from a stream. Automatically detects the file format.
726  /// </summary>
727  /// <remarks>
728  /// <remarks>
729  /// <p>
730  /// The document must be stored at the beginning of the stream. The stream must support random positioning.</p>
731  /// </remarks>
732  /// </remarks>
733  /// <param name="stream">Stream where to load the document from.</param>
734  /// <exception cref="T:Aspose.Words.UnsupportedFileFormatException">The document format is not recognized or not supported.</exception>
735  /// <exception cref="T:Aspose.Words.FileCorruptedException">The document appears to be corrupted and cannot be loaded.</exception>
736  /// <exception cref="T:System.Exception">There is a problem with the document and it should be reported to Aspose.Words developers.</exception>
737  /// <exception cref="T:System.IO.IOException">There is an input/output exception.</exception>
738  /// <exception cref="T:Aspose.Words.IncorrectPasswordException">The document is encrypted and requires a password to open, but you supplied an incorrect password.</exception>
739  /// <exception cref="T:System.ArgumentNullException">The stream cannot be null.</exception>
740  /// <exception cref="T:System.NotSupportedException">The stream does not support reading or seeking.</exception>
741  /// <exception cref="T:System.ObjectDisposedException">The stream is a disposed object.</exception>
742  ///
743  ASPOSE_WORDS_SHARED_API Document(System::SharedPtr<System::IO::Stream> stream);
744  /// <summary>
745  /// Opens an existing document from a stream. Allows to specify additional options such as an encryption password.
746  /// </summary>
747  /// <remarks>
748  /// <remarks>
749  /// <p>
750  /// The document must be stored at the beginning of the stream. The stream must support random positioning.</p>
751  /// </remarks>
752  /// </remarks>
753  /// <param name="stream">The stream where to load the document from.</param>
754  /// <param name="loadOptions">Additional options to use when loading a document. Can be null.</param>
755  /// <exception cref="T:Aspose.Words.UnsupportedFileFormatException">The document format is not recognized or not supported.</exception>
756  /// <exception cref="T:Aspose.Words.FileCorruptedException">The document appears to be corrupted and cannot be loaded.</exception>
757  /// <exception cref="T:System.Exception">There is a problem with the document and it should be reported to Aspose.Words developers.</exception>
758  /// <exception cref="T:System.IO.IOException">There is an input/output exception.</exception>
759  /// <exception cref="T:Aspose.Words.IncorrectPasswordException">The document is encrypted and requires a password to open, but you supplied an incorrect password.</exception>
760  /// <exception cref="T:System.ArgumentNullException">The stream cannot be null.</exception>
761  /// <exception cref="T:System.NotSupportedException">The stream does not support reading or seeking.</exception>
762  /// <exception cref="T:System.ObjectDisposedException">The stream is a disposed object.</exception>
763  ///
764  ASPOSE_WORDS_SHARED_API Document(System::SharedPtr<System::IO::Stream> stream, System::SharedPtr<Aspose::Words::LoadOptions> loadOptions);
765 
766  /// <summary>
767  /// Performs a deep copy of the <see cref="Aspose::Words::Document" />.
768  /// </summary>
769  /// <returns>The cloned document.</returns>
770  ///
771  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Document> Clone();
772  /// <summary>
773  /// Accepts a visitor.
774  /// </summary>
775  /// <remarks>
776  /// <p>Enumerates over this node and all of its children. Each node calls a corresponding method on DocumentVisitor.</p>
777  /// <p>For more info see the Visitor design pattern.</p>
778  /// </remarks>
779  /// <param name="visitor">The visitor that will visit the nodes.</param>
780  /// <returns>True if all nodes were visited; false if DocumentVisitor stopped the operation before visiting all nodes.</returns>
781  /// <remarks>
782  /// Calls DocumentVisitor.VisitDocumentStart, then calls Accept for all child nodes of the document
783  /// and calls DocumentVisitor.VisitDocumentEnd at the end.
784  /// </remarks>
785  virtual ASPOSE_WORDS_SHARED_API bool Accept(System::SharedPtr<Aspose::Words::DocumentVisitor> visitor);
786  /// <summary>
787  /// Appends the specified document to the end of this document.
788  /// </summary>
789  /// <param name="srcDoc">The document to append.</param>
790  /// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
791  ASPOSE_WORDS_SHARED_API void AppendDocument(System::SharedPtr<Aspose::Words::Document> srcDoc, Aspose::Words::ImportFormatMode importFormatMode);
792  /// <summary>
793  /// Appends the specified document to the end of this document.
794  /// </summary>
795  /// <param name="srcDoc">The document to append.</param>
796  /// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
797  /// <param name="importFormatOptions">Allows to specify options that affect formatting of a result document.</param>
798  ASPOSE_WORDS_SHARED_API void AppendDocument(System::SharedPtr<Aspose::Words::Document> srcDoc, Aspose::Words::ImportFormatMode importFormatMode, System::SharedPtr<Aspose::Words::ImportFormatOptions> importFormatOptions);
799  ///
800  /// <summary>
801  /// Saves the document to a file. Automatically determines the save format from the extension.
802  /// </summary>
803  /// <param name="fileName">The name for the document. If a document with the
804  /// specified file name already exists, the existing document is overwritten.</param>
805  /// <returns>Additional information that you can optionally use.</returns>
806  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::String fileName);
807  /// <summary>
808  /// Saves the document to a file in the specified format.
809  /// </summary>
810  /// <param name="fileName">The name for the document. If a document with the
811  /// specified file name already exists, the existing document is overwritten.</param>
812  /// <param name="saveFormat">The format in which to save the document.</param>
813  /// <returns>Additional information that you can optionally use.</returns>
814  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::String fileName, Aspose::Words::SaveFormat saveFormat);
815  /// <summary>
816  /// Saves the document to a file using the specified save options.
817  /// </summary>
818  /// <param name="fileName">The name for the document. If a document with the
819  /// specified file name already exists, the existing document is overwritten.</param>
820  /// <param name="saveOptions">Specifies the options that control how the document is saved. Can be null.</param>
821  /// <returns>Additional information that you can optionally use.</returns>
822  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::String fileName, System::SharedPtr<Aspose::Words::Saving::SaveOptions> saveOptions);
823  /// <summary>
824  /// Saves the document to a stream using the specified format.
825  /// </summary>
826  /// <param name="stream">Stream where to save the document.</param>
827  /// <param name="saveFormat">The format in which to save the document.</param>
828  /// <returns>Additional information that you can optionally use.</returns>
829  ///
830  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::SharedPtr<System::IO::Stream> stream, Aspose::Words::SaveFormat saveFormat);
831  /// <summary>
832  /// Saves the document to a stream using the specified save options.
833  /// </summary>
834  /// <param name="stream">Stream where to save the document.</param>
835  /// <param name="saveOptions">Specifies the options that control how the document is saved. Can be null.
836  /// If this is null, the document will be saved in the binary DOC format.</param>
837  /// <returns>Additional information that you can optionally use.</returns>
838  ///
839  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::SharedPtr<System::IO::Stream> stream, System::SharedPtr<Aspose::Words::Saving::SaveOptions> saveOptions);
840  /// <summary>
841  /// If the document contains no sections, creates one section with one paragraph.
842  /// </summary>
843  ASPOSE_WORDS_SHARED_API void EnsureMinimum();
844  /// <summary>
845  /// Accepts all tracked changes in the document.
846  /// </summary>
847  /// <remarks>This method is a shortcut for <see cref="Aspose::Words::RevisionCollection::AcceptAll" />.</remarks>
848  ASPOSE_WORDS_SHARED_API void AcceptAllRevisions();
849  ///
850  /// <summary>
851  /// Protects the document from changes without changing the existing password or assigns a random password.
852  /// </summary>
853  /// <remarks>
854  /// <p>When a document is protected, the user can make only limited changes,
855  /// such as adding annotations, making revisions, or completing a form.</p>
856  /// <p>When you protect a document, and the document already has a protection password,
857  /// the existing protection password is not changed.</p>
858  /// <p>When you protect a document, and the document does not have a protection password,
859  /// this method assigns a random password that makes it impossible to unprotect the document
860  /// in Microsoft Word, but you still can unprotect the document in Aspose.Words as it does not
861  /// require a password when unprotecting.</p>
862  /// </remarks>
863  /// <param name="type">Specifies the protection type for the document.</param>
864  ASPOSE_WORDS_SHARED_API void Protect(Aspose::Words::ProtectionType type);
865  /// <summary>
866  /// Protects the document from changes and optionally sets a protection password.
867  /// </summary>
868  /// <remarks>
869  /// <p>When a document is protected, the user can make only limited changes,
870  /// such as adding annotations, making revisions, or completing a form.</p>
871  /// <para>Note that document protection is different from write protection.
872  /// Write protection is specified using the <see cref="Aspose::Words::Document::get_WriteProtection" />.</para>
873  /// </remarks>
874  /// <param name="type">Specifies the protection type for the document.</param>
875  /// <param name="password">The password to protect the document with.
876  /// Specify null or empty string if you want to protect the document without a password.</param>
877  ASPOSE_WORDS_SHARED_API void Protect(Aspose::Words::ProtectionType type, System::String password);
878  ///
879  /// <summary>
880  /// Removes protection from the document regardless of the password.
881  /// </summary>
882  /// <remarks>
883  /// <para>This method unprotects the document even if it has a protection password.</para>
884  /// <para>Note that document protection is different from write protection.
885  /// Write protection is specified using the <see cref="Aspose::Words::Document::get_WriteProtection" />.</para>
886  /// </remarks>
887  ASPOSE_WORDS_SHARED_API void Unprotect();
888  /// <summary>
889  /// Removes protection from the document if a correct password is specified.
890  /// </summary>
891  /// <remarks>
892  /// <para>This method unprotects the document only if a correct password is specified.</para>
893  /// <para>Note that document protection is different from write protection.
894  /// Write protection is specified using the <see cref="Aspose::Words::Document::get_WriteProtection" />.</para>
895  /// </remarks>
896  /// <param name="password">The password to unprotect the document with.</param>
897  /// <returns>True if a correct password was specified and the document was unprotected.</returns>
898  ASPOSE_WORDS_SHARED_API bool Unprotect(System::String password);
899  /// <summary>
900  /// Updates word count properties of the document.
901  /// </summary>
902  /// <remarks>
903  /// <p>
904  /// <b>UpdateWordCount</b> recalculates and updates Characters, Words and Paragraphs
905  /// properties in the <see cref="Aspose::Words::Document::get_BuiltInDocumentProperties" /> collection of the <b>Document</b>.</p>
906  /// <p>Note that <b>UpdateWordCount</b> does not update number of lines and pages properties.
907  /// Use the <see cref="Aspose::Words::Document::UpdateWordCount" /> overload and pass True value as a parameter to do that.</p>
908  /// <p>When you use an evaluation version, the evaluation watermark will also be included
909  /// in the word count.</p>
910  /// </remarks>
911  ASPOSE_WORDS_SHARED_API void UpdateWordCount();
912  /// <summary>
913  /// Updates word count properties of the document, optionally updates <see cref="Aspose::Words::Properties::BuiltInDocumentProperties::get_Lines" /> property.
914  /// </summary>
915  /// <remarks>
916  /// This method will rebuild page layout of the document.
917  /// </remarks>
918  /// <param name="updateLinesCount">True if number of lines in the document shall be calculated.</param>
919  ASPOSE_WORDS_SHARED_API void UpdateWordCount(bool updateLinesCount);
920  /// <summary>
921  /// Updates widths of cells and tables in the document according to their preferred widths and content.
922  /// You do not need to call this method if the tables appear correct in the output document.
923  /// </summary>
924  /// <remarks>
925  /// <p>You do not normally need to call this method as cell and table widths are maintained automatically.
926  /// You can call this method before exporting to PDF (or any other fixed-page format), only in rare cases
927  /// where you confirmed that tables appear incorrectly laid out in the output document. Calling this method
928  /// might help to correct the output.</p>
929  /// </remarks>
930  ASPOSE_WORDS_SHARED_API void UpdateTableLayout();
931  /// <summary>
932  /// Updates list labels for all list items in the document.
933  /// </summary>
934  /// <remarks>
935  /// <para>This method updates list label properties such as <see cref="Aspose::Words::Lists::ListLabel::get_LabelValue" /> and
936  /// <see cref="Aspose::Words::Lists::ListLabel::get_LabelString" /> for each <see cref="Aspose::Words::Paragraph::get_ListLabel" /> object in the document.</para>
937  /// <para>Also, this method is sometimes implicitly called when updating fields in the document. This is required
938  /// because some fields that may reference list numbers (such as TOC or REF) need them be up-to-date.</para>
939  /// </remarks>
940  ASPOSE_WORDS_SHARED_API void UpdateListLabels();
941  /// <summary>
942  /// Removes all macros (the VBA project) as well as toolbars and command customizations from the document.
943  /// </summary>
944  /// <remarks>
945  /// <p>By removing all macros from a document you can ensure the document contains no macro viruses.</p>
946  /// </remarks>
947  ASPOSE_WORDS_SHARED_API void RemoveMacros();
948  /// <summary>
949  /// Updates the values of fields in the whole document.
950  /// </summary>
951  /// <remarks>
952  /// <para>When you open, modify and then save a document, Aspose.Words does not update fields automatically, it keeps them intact.
953  /// Therefore, you would usually want to call this method before saving if you have modified the document
954  /// programmatically and want to make sure the proper (calculated) field values appear in the saved document.</para>
955  /// <para>There is no need to update fields after executing a mail merge because mail merge is a kind of field update
956  /// and automatically updates all fields in the document.</para>
957  /// <p>This method does not update all field types. For the detailed list of supported field types, see the Programmers Guide.</p>
958  /// <para>This method does not update fields that are related to the page layout algorithms (e.g. PAGE, PAGES, PAGEREF).
959  /// The page layout-related fields are updated when you render a document or call <see cref="Aspose::Words::Document::UpdatePageLayout" />.</para>
960  /// <para>Use the <see cref="Aspose::Words::Document::NormalizeFieldTypes" /> method before fields updating if there were document changes that affected field types.</para>
961  /// <para>To update fields in a specific part of the document use <see cref="Aspose::Words::Range::UpdateFields" />.</para>
962  /// </remarks>
963  ASPOSE_WORDS_SHARED_API void UpdateFields();
964  /// <summary>
965  /// Unlinks fields in the whole document.
966  /// </summary>
967  /// <remarks>
968  /// <para>Replaces all the fields in the whole document with their most recent results.</para>
969  /// <para>To unlink fields in a specific part of the document use <see cref="Aspose::Words::Range::UnlinkFields" />.</para>
970  /// </remarks>
971  ASPOSE_WORDS_SHARED_API void UnlinkFields();
972  /// <summary>
973  /// Changes field type values <see cref="Aspose::Words::Fields::FieldChar::get_FieldType" /> of <see cref="Aspose::Words::Fields::FieldStart" />, <see cref="Aspose::Words::Fields::FieldSeparator" />, <see cref="Aspose::Words::Fields::FieldEnd" />
974  /// in the whole document so that they correspond to the field types contained in the field codes.
975  /// </summary>
976  /// <remarks>
977  /// <para>Use this method after document changes that affect field types.</para>
978  /// <para>To change field type values in a specific part of the document use <see cref="Aspose::Words::Range::NormalizeFieldTypes" />.</para>
979  /// </remarks>
980  ASPOSE_WORDS_SHARED_API void NormalizeFieldTypes();
981  /// <summary>
982  /// Joins runs with same formatting in all paragraphs of the document.
983  /// </summary>
984  /// <remarks>
985  /// <p>This is an optimization method. Some documents contain adjacent runs with same formatting.
986  /// Usually this occurs if a document was intensively edited manually.
987  /// You can reduce the document size and speed up further processing by joining these runs.</p>
988  /// <p>The operation checks every <see cref="Aspose::Words::Paragraph" /> node in the document for adjacent <see cref="Aspose::Words::Run" />
989  /// nodes having identical properties. It ignores unique identifiers used to track editing sessions of run
990  /// creation and modification. First run in every joining sequence accumulates all text. Remaining
991  /// runs are deleted from the document.</p>
992  /// </remarks>
993  /// <returns>Number of joins performed. When <b>N</b> adjacent runs are being joined they count as <b>N - 1</b> joins.</returns>
994  ASPOSE_WORDS_SHARED_API int32_t JoinRunsWithSameFormatting();
995  /// <summary>
996  /// Converts formatting specified in table styles into direct formatting on tables in the document.
997  /// </summary>
998  /// <remarks>
999  /// <para>This method exists because this version of Aspose.Words provides only limited support for
1000  /// table styles (see below). This method might be useful when you load a DOCX or WordprocessingML
1001  /// document that contains tables formatted with table styles and you need to query formatting of
1002  /// tables, cells, paragraphs or text.</para>
1003  /// <para>This version of Aspose.Words provides limited support for table styles as follows:</para>
1004  /// <list type="bullet">
1005  /// <item>Table styles defined in DOCX or WordprocessingML documents are preserved as table styles
1006  /// when saving the document as DOCX or WordprocessingML.</item>
1007  /// <item>Table styles defined in DOCX or WordprocessingML documents are automatically converted
1008  /// to direct formatting on tables when saving the document into any other format,
1009  /// rendering or printing.</item>
1010  /// <item>Table styles defined in DOC documents are preserved as table styles when
1011  /// saving the document as DOC only.</item>
1012  /// </list>
1013  /// </remarks>
1014  ASPOSE_WORDS_SHARED_API void ExpandTableStylesToDirectFormatting();
1015  /// <summary>
1016  /// Cleans unused styles and lists from the document.
1017  /// </summary>
1018  ASPOSE_WORDS_SHARED_API void Cleanup();
1019  /// <summary>
1020  /// Cleans unused styles and lists from the document depending on given <see cref="Aspose::Words::CleanupOptions" />.
1021  /// </summary>
1022  ASPOSE_WORDS_SHARED_API void Cleanup(System::SharedPtr<Aspose::Words::CleanupOptions> options);
1023  /// <summary>
1024  /// Removes external XML schema references from this document.
1025  /// </summary>
1026  ASPOSE_WORDS_SHARED_API void RemoveExternalSchemaReferences();
1027  /// <summary>
1028  /// Starts automatically marking all further changes you make to the document programmatically as revision changes.
1029  /// </summary>
1030  /// <remarks>
1031  /// <p>If you call this method and then make some changes to the document programmatically,
1032  /// save the document and later open the document in MS Word you will see these changes as revisions.</p>
1033  /// <p>Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not
1034  /// recorded as revisions.</p>
1035  /// <p>Automatic tracking of changes is supported both when modifying this document through node manipulations
1036  /// as well as when using <see cref="Aspose::Words::DocumentBuilder" /></p>
1037  /// <p>This method does not change the <see cref="Aspose::Words::Document::get_TrackRevisions" /> option and does not use its value
1038  /// for the purposes of revision tracking.</p>
1039  /// </remarks>
1040  /// <param name="author">Initials of the author to use for revisions.</param>
1041  /// <param name="dateTime">The date and time to use for revisions.</param>
1042  /// <seealso cref="Aspose::Words::Document::StopTrackRevisions" />
1043  ASPOSE_WORDS_SHARED_API void StartTrackRevisions(System::String author, System::DateTime dateTime);
1044  /// <summary>
1045  /// Starts automatically marking all further changes you make to the document programmatically as revision changes.
1046  /// </summary>
1047  /// <remarks>
1048  /// <p>If you call this method and then make some changes to the document programmatically,
1049  /// save the document and later open the document in MS Word you will see these changes as revisions.</p>
1050  /// <p>Currently Aspose.Words supports tracking of node insertions and deletions only. Formatting changes are not
1051  /// recorded as revisions.</p>
1052  /// <p>Automatic tracking of changes is supported both when modifying this document through node manipulations
1053  /// as well as when using <see cref="Aspose::Words::DocumentBuilder" /></p>
1054  /// <p>This method does not change the <see cref="Aspose::Words::Document::get_TrackRevisions" /> option and does not use its value
1055  /// for the purposes of revision tracking.</p>
1056  /// </remarks>
1057  /// <param name="author">Initials of the author to use for revisions.</param>
1058  /// <seealso cref="Aspose::Words::Document::StopTrackRevisions" />
1059  ASPOSE_WORDS_SHARED_API void StartTrackRevisions(System::String author);
1060  /// <summary>
1061  /// Stops automatic marking of document changes as revisions.
1062  /// </summary>
1063  /// <seealso cref="Aspose::Words::Document::StartTrackRevisions(System::String, System::DateTime)" />
1064  ASPOSE_WORDS_SHARED_API void StopTrackRevisions();
1065  /// <summary>
1066  /// Compares this document with another document producing changes as number of edit and format revisions <see cref="Aspose::Words::Revision" />.
1067  /// </summary>
1068  /// <param name="document">Document to compare.</param>
1069  /// <param name="author">Initials of the author to use for revisions.</param>
1070  /// <param name="dateTime">The date and time to use for revisions.</param>
1071  /// <remarks>The following document nodes are not compared at the moment:
1072  /// <list type="bullet"><item><see cref="Aspose::Words::Markup::StructuredDocumentTag" /></item><item>Item3</item></list>\note
1073  /// Documents must not have revisions before comparison.
1074  /// </remarks>
1075  ASPOSE_WORDS_SHARED_API void Compare(System::SharedPtr<Aspose::Words::Document> document, System::String author, System::DateTime dateTime);
1076  /// <summary>
1077  /// Compares this document with another document producing changes as a number of edit and format revisions <see cref="Aspose::Words::Revision" />.
1078  /// Allows to specify comparison options using <see cref="Aspose::Words::CompareOptions" />.
1079  /// </summary>
1080  ASPOSE_WORDS_SHARED_API void Compare(System::SharedPtr<Aspose::Words::Document> document, System::String author, System::DateTime dateTime, System::SharedPtr<Aspose::Words::CompareOptions> options);
1081  /// <summary>
1082  /// Copies styles from the specified template to a document.
1083  /// </summary>
1084  /// <remarks>
1085  /// When styles are copied from a template to a document,
1086  /// like-named styles in the document are redefined to match the style descriptions in the template.
1087  /// Unique styles from the template are copied to the document. Unique styles in the document remain intact.
1088  /// </remarks>
1089  ///
1090  ASPOSE_WORDS_SHARED_API void CopyStylesFromTemplate(System::String template_);
1091  /// <summary>
1092  /// Copies styles from the specified template to a document.
1093  /// </summary>
1094  /// <remarks>
1095  /// When styles are copied from a template to a document,
1096  /// like-named styles in the document are redefined to match the style descriptions in the template.
1097  /// Unique styles from the template are copied to the document. Unique styles in the document remain intact.
1098  /// </remarks>
1099  ASPOSE_WORDS_SHARED_API void CopyStylesFromTemplate(System::SharedPtr<Aspose::Words::Document> template_);
1100  /// <summary>
1101  /// Rebuilds the page layout of the document.
1102  /// </summary>
1103  /// <remarks>
1104  /// <para>This method formats a document into pages and updates the page number related fields in the document such
1105  /// as PAGE, PAGES, PAGEREF and REF. The up-to-date page layout information is required for a correct rendering of the document
1106  /// to fixed-page formats.</para>
1107  /// <para>This method is automatically invoked when you first convert a document to PDF, XPS, image or print it.
1108  /// However, if you modify the document after rendering and then attempt to render it again - Aspose.Words will not
1109  /// update the page layout automatically. In this case you should call <see cref="Aspose::Words::Document::UpdatePageLayout" /> before
1110  /// rendering again.</para>
1111  /// </remarks>
1112  ASPOSE_WORDS_SHARED_API void UpdatePageLayout();
1113  /// <summary>
1114  /// Renders a document page into a <see cref="System::Drawing::Graphics" /> object to a specified scale.
1115  /// </summary>
1116  /// <param name="pageIndex">The 0-based page index.</param>
1117  /// <param name="graphics">The object where to render to.</param>
1118  /// <param name="x">The X coordinate (in world units) of the top left corner of the rendered page.</param>
1119  /// <param name="y">The Y coordinate (in world units) of the top left corner of the rendered page.</param>
1120  /// <param name="scale">The scale for rendering the page (1.0 is 100%).</param>
1121  /// <returns>The width and height (in world units) of the rendered page.</returns>
1122  ///
1123  ASPOSE_WORDS_SHARED_API System::Drawing::SizeF RenderToScale(int32_t pageIndex, System::SharedPtr<System::Drawing::Graphics> graphics, float x, float y, float scale);
1124  /// Renders a document page into a <see cref="System::Drawing::Graphics" /> object to a specified size.
1125  /// <param name="pageIndex">The 0-based page index.</param><param name="graphics">The object where to render to.</param><param name="x">The X coordinate (in world units) of the top left corner of the rendered page.</param><param name="y">The Y coordinate (in world units) of the top left corner of the rendered page.</param><param name="width">The maximum width (in world units) that can be occupied by the rendered page.</param><param name="height">The maximum height (in world units) that can be occupied by the rendered page.</param><returns>The scale that was automatically calculated for the rendered page to fit the specified size.</returns>
1126  ASPOSE_WORDS_SHARED_API float RenderToSize(int32_t pageIndex, System::SharedPtr<System::Drawing::Graphics> graphics, float x, float y, float width, float height);
1127  /// <summary>
1128  /// Gets the page size, orientation and other information about a page that might be useful for printing or rendering.
1129  /// </summary>
1130  /// <param name="pageIndex">The 0-based page index.</param>
1131  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Rendering::PageInfo> GetPageInfo(int32_t pageIndex);
1132  /// <summary>
1133  /// Updates <see cref="Aspose::Words::Properties::BuiltInDocumentProperties::get_Thumbnail" /> of the document according to the specified options.
1134  /// </summary>
1135  /// <remarks>
1136  /// The <see cref="Aspose::Words::Rendering::ThumbnailGeneratingOptions" /> allows you to specify the source of thumbnail, size and other options.
1137  /// If attempt to generate thumbnail fails, doesn't change one.
1138  /// </remarks>
1139  /// <param name="options">The generating options to use.</param>
1140  ASPOSE_WORDS_SHARED_API void UpdateThumbnail(System::SharedPtr<Aspose::Words::Rendering::ThumbnailGeneratingOptions> options);
1141  /// <summary>
1142  /// Updates <see cref="Aspose::Words::Properties::BuiltInDocumentProperties::get_Thumbnail" /> of the document using default options.
1143  /// </summary>
1144  ASPOSE_WORDS_SHARED_API void UpdateThumbnail();
1145  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> GetDirectSectionAttr(int32_t key);
1146  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedSectionAttr(int32_t key);
1147  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchSectionAttr(int32_t key);
1148  ASPOSE_WORDS_SHARED_API void SetSectionAttr(int32_t key, System::SharedPtr<System::Object> value);
1149  ASPOSE_WORDS_SHARED_API void ClearSectionAttrs();
1150 
1151 protected:
1152 
1153  System::SharedPtr<Aspose::Words::Settings::DocumentProtection> get_DocumentProtection();
1154  bool get_HasCustomizations();
1155  bool get_HasAttachedToolbars();
1156  bool get_HasAllocatedCommands();
1157  bool get_HasKeyMaps();
1158  System::ArrayPtr<uint8_t> get_DropdownStrings() const;
1159  void set_DropdownStrings(System::ArrayPtr<uint8_t> value);
1160  System::SharedPtr<System::IO::MemoryStream> get_CompObj() const;
1161  void set_CompObj(System::SharedPtr<System::IO::MemoryStream> value);
1162  System::ArrayPtr<uint8_t> get_MsoEnvelope() const;
1163  void set_MsoEnvelope(System::ArrayPtr<uint8_t> value);
1164  System::ArrayPtr<uint8_t> get_AttachedToolbars() const;
1165  void set_AttachedToolbars(System::ArrayPtr<uint8_t> value);
1166  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::AllocatedCommand>>> get_AllocatedCommands() const;
1167  void set_AllocatedCommands(System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::AllocatedCommand>>> value);
1168  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::KeyMap>>> get_KeyMaps() const;
1169  void set_KeyMaps(System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::KeyMap>>> value);
1170  System::ArrayPtr<uint8_t> get_VbaSignature() const;
1171  void set_VbaSignature(System::ArrayPtr<uint8_t> value);
1172  System::SharedPtr<System::Collections::Generic::IList<System::String>> get_VbaMacroNames() const;
1173  void set_VbaMacroNames(System::SharedPtr<System::Collections::Generic::IList<System::String>> value);
1174  Aspose::Words::VbaDocumentEvents get_VbaDocumentEvents() const;
1175  void set_VbaDocumentEvents(Aspose::Words::VbaDocumentEvents value);
1176  System::String get_BaseUri() const;
1177  void set_BaseUri(System::String value);
1178  System::String get_SavedFileName() const;
1179  System::SharedPtr<Aspose::Words::Fonts::FontSettings> get_EffectiveFontSettings();
1180  virtual ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fonts::DocumentFontProvider> get_FontProvider();
1181  System::SharedPtr<Aspose::Words::Frames::FrameSet> get_FrameSet() const;
1182  void set_FrameSet(System::SharedPtr<Aspose::Words::Frames::FrameSet> value);
1183  System::SharedPtr<Aspose::Words::RW::Doc::RouteSlip> get_RouteSlip() const;
1184  void set_RouteSlip(System::SharedPtr<Aspose::Words::RW::Doc::RouteSlip> value);
1185  System::SharedPtr<Aspose::Words::XmlNamespaceCollection> get_XmlNamespaces();
1186  System::SharedPtr<Aspose::Words::XmlSchemaReferenceCollection> get_XmlSchemaReferences();
1187  System::SharedPtr<Aspose::Words::Revisions::EditSession> get_EditSession() const;
1188  void set_EditSession(System::SharedPtr<Aspose::Words::Revisions::EditSession> value);
1189  System::SharedPtr<Aspose::Words::Licensing::VentureLicense> get_VentureLicense() const;
1190  void set_VentureLicense(System::SharedPtr<Aspose::Words::Licensing::VentureLicense> value);
1191  virtual ASPOSE_WORDS_SHARED_API bool get_IsTrackRevisionsEnabled();
1192  System::SharedPtr<Aspose::Words::OoxmlComplianceInfo> get_ComplianceInfo() const;
1193  void set_ComplianceInfo(System::SharedPtr<Aspose::Words::OoxmlComplianceInfo> value);
1194  bool get_HasPageLayout();
1195  System::SharedPtr<Aspose::Words::Layout::PreAps::PageLayout> get_PageLayout();
1196  System::SharedPtr<Aspose::Words::Layout::LayoutOptionsCore> get_LayoutOptionsCore() const;
1197  System::SharedPtr<System::Collections::Generic::IDictionary<System::SharedPtr<Aspose::Words::Drawing::ShapeBase>, System::SharedPtr<Aspose::Words::ApsBuilder::Shapes::CanvasInfo>>> get_CanvasCache();
1198  bool get_AnnotationsAtBlockLevel() const;
1199  void set_AnnotationsAtBlockLevel(bool value);
1200  System::DateTime get_CurrentDateTimeCache();
1201 
1202  static const int32_t VbaSignaturePrefixLength;
1203  int64_t FixedPageFormatStoringMilliseconds;
1204 
1205  virtual ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Themes::Theme> GetThemeInternal();
1206  void SetThemeInternal(System::SharedPtr<Aspose::Words::Themes::Theme> theme);
1207  int32_t GetNextTocEntryBookmarkIndex();
1208  virtual ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> Clone(bool isCloneChildren, System::SharedPtr<Aspose::Words::INodeCloningListener> cloningListener);
1209  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction AcceptStart(System::SharedPtr<Aspose::Words::DocumentVisitor> visitor);
1210  virtual ASPOSE_WORDS_SHARED_API Aspose::Words::VisitorAction AcceptEnd(System::SharedPtr<Aspose::Words::DocumentVisitor> visitor);
1211  virtual ASPOSE_WORDS_SHARED_API void WriteDocToHttResponse(System::SharedPtr<System::Web::HttpResponse> response, System::ArrayPtr<uint8_t> docData, int32_t dataLength, System::String headerName, System::String headerValue);
1212  System::String MapFileName(System::String fileName);
1213  virtual ASPOSE_WORDS_SHARED_API bool CanInsert(System::SharedPtr<Aspose::Words::Node> newChild);
1214  void Load(System::SharedPtr<System::IO::Stream> stream, System::SharedPtr<Aspose::Words::LoadOptions> loadOptions);
1215  void LoadBlank();
1216  virtual ASPOSE_WORDS_SHARED_API void SuspendTrackRevisions();
1217  virtual ASPOSE_WORDS_SHARED_API void ResumeTrackRevisions();
1218  void UpdateStyles(System::SharedPtr<Aspose::Words::Saving::SaveOptions> so);
1219  System::SharedPtr<Aspose::Words::Node> GetNodeById(System::String id);
1220  System::SharedPtr<Aspose::Words::Layout::PreAps::PageLayout> GetPageLayout(bool build);
1221  void InvalidateLayoutDocument();
1222  System::Drawing::SizeF RenderBookletSignatureToScale(System::SharedPtr<Aspose::Words::Layout::Core::BookletSignature> bookletSignature, System::Drawing::SizeF bookletPageSize, int32_t paperTray, System::SharedPtr<System::Drawing::Graphics> graphics, float x, float y, float scale);
1223  float RenderBookletSignatureToSize(System::SharedPtr<Aspose::Words::Layout::Core::BookletSignature> bookletSignature, System::Drawing::SizeF bookletPageSize, int32_t paperTray, System::SharedPtr<System::Drawing::Graphics> graphics, float x, float y, float width, float height);
1224  System::SharedPtr<Aspose::Rendering::Aps::ApsPage> LayoutPageToAps(int32_t pageIndex);
1225  System::SharedPtr<Aspose::Rendering::Aps::ApsPage> LayoutPageToAps(int32_t pageIndex, System::SharedPtr<Aspose::Words::ApsBuilder::LayoutApsBuilder> apsBuilder);
1226  System::SharedPtr<Aspose::Rendering::Aps::ApsPage> GetBookletPageAps(System::SharedPtr<Aspose::Words::Layout::Core::BookletSignature> bookletSheet, System::Drawing::SizeF bookletPageSize, int32_t paperTray);
1227  System::SharedPtr<Aspose::Rendering::Aps::ApsPage> GetBookletPageAps(System::SharedPtr<Aspose::Words::Layout::Core::BookletSignature> bookletSheet, System::Drawing::SizeF bookletPageSize, int32_t paperTray, System::SharedPtr<Aspose::Words::ApsBuilder::LayoutApsBuilder> apsBuilder);
1228  void CheckPageIndexAndCount(int32_t pageIndex, int32_t pageCount);
1229  void ReadVbaProject(System::SharedPtr<Aspose::Ss::MemoryStorage> storage);
1230  System::SharedPtr<Aspose::Words::Fields::FieldNumListLabel> GetFieldNumListLabel(System::SharedPtr<Aspose::Words::Fields::FieldStart> fieldStart);
1231  void SetFieldNumListLabel(System::SharedPtr<Aspose::Words::Fields::FieldStart> fieldStart, System::SharedPtr<Aspose::Words::Fields::FieldNumListLabel> label);
1232  void ClearFieldNumListLabels();
1233  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
1234 
1235 private:
1236 
1237  static System::ArrayPtr<char16_t>& gDirectoryDelimiters();
1238 
1239  System::SharedPtr<Aspose::Words::Properties::BuiltInDocumentProperties> mBuiltInDocumentProperties;
1240  System::SharedPtr<Aspose::Words::Properties::CustomDocumentProperties> mCustomDocumentProperties;
1241  System::SharedPtr<Aspose::Words::BuildingBlocks::GlossaryDocument> mGlossary;
1242  System::SharedPtr<Aspose::Words::Themes::Theme> mTheme;
1243  System::SharedPtr<Aspose::Words::Markup::CustomXmlPartCollection> mCustomXmlParts;
1244  System::SharedPtr<Aspose::Words::Markup::CustomPartCollection> mPackageCustomParts;
1245  System::SharedPtr<Aspose::Words::Frames::FrameSet> mFrame;
1246  System::ArrayPtr<uint8_t> mDropdownStrings;
1247  System::SharedPtr<System::IO::MemoryStream> mCompObj;
1248  System::ArrayPtr<uint8_t> mMsoEnvelope;
1249  System::ArrayPtr<uint8_t> mAttachedToolbars;
1250  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::AllocatedCommand>>> mAllocatedCommands;
1251  System::SharedPtr<System::Collections::Generic::IList<System::SharedPtr<Aspose::Words::KeyMap>>> mKeyMaps;
1252  System::ArrayPtr<uint8_t> mVbaSignature;
1253  System::SharedPtr<System::Collections::Generic::IList<System::String>> mVbaMacroNames;
1254  Aspose::Words::VbaDocumentEvents mVbaDocumentEvents;
1255  System::SharedPtr<Aspose::Words::VbaProject> mVbaProject;
1256  System::String mOriginalFileName;
1257  System::String mSavedFileName;
1258  Aspose::Words::LoadFormat mOriginalLoadFormat;
1259  System::String mBaseUri;
1260  System::SharedPtr<Aspose::Words::Licensing::VentureLicense> mVentureLicense;
1261  System::SharedPtr<Aspose::Words::Layout::LayoutOptionsCore> mLayoutOptionsCore;
1262  System::SharedPtr<Aspose::Words::SectionCollection> mSectionsCache;
1263  System::SharedPtr<Aspose::Words::MailMerging::MailMerge> mMailMergeCache;
1264  System::SharedPtr<Aspose::Words::Layout::PreAps::PageLayout> mLayoutCache;
1265  System::SharedPtr<System::Collections::Generic::IDictionary<System::SharedPtr<Aspose::Words::Drawing::ShapeBase>, System::SharedPtr<Aspose::Words::ApsBuilder::Shapes::CanvasInfo>>> mCanvasCache;
1266  System::SharedPtr<Aspose::Words::FootnoteOptions> mFootnoteOptionsCache;
1267  System::SharedPtr<Aspose::Words::EndnoteOptions> mEndnoteOptionsCache;
1268  System::SharedPtr<Aspose::Words::RevisionCollection> mRevisionsCache;
1269  System::SharedPtr<System::Collections::Generic::Dictionary<System::SharedPtr<Aspose::Words::Fields::FieldStart>, System::SharedPtr<Aspose::Words::Fields::FieldNumListLabel>>> mFieldNumListLabels;
1270  int32_t mTocEntryBookmarkIndex;
1271  System::SharedPtr<Aspose::Words::Fields::FieldOptions> mFieldOptionsCache;
1272  System::SharedPtr<Aspose::Words::RW::Doc::RouteSlip> mRouteSlip;
1273  System::SharedPtr<Aspose::Words::OoxmlComplianceInfo> mComplianceInfo;
1274  System::SharedPtr<Aspose::Words::Layout::LayoutOptions> mLayoutOptions;
1275  bool mTrackRevisionsEnabled;
1276  int32_t mIsTrackRevisionsLockCount;
1277  System::SharedPtr<Aspose::Words::Revisions::EditSession> mEditSession;
1278  System::DateTime mCurrentDateTimeCache;
1279  System::SharedPtr<Aspose::Words::Fonts::FontSettings> mFontSettings;
1280  System::SharedPtr<Aspose::Words::Fonts::DocumentFontProvider> mFontProvider;
1281  bool mAnnotationsAtBlockLevel;
1282  Aspose::Words::RevisionsView mRevisionsView;
1283  System::SharedPtr<Aspose::Words::WebExtensions::TaskPaneCollection> mWebExtensionTaskPanes;
1284 
1285  static void __StaticConstructor__();
1286 
1287  void ResolveSdtXmlMapping();
1288  System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> Save(System::SharedPtr<System::IO::Stream> stream, System::String fileName, System::SharedPtr<Aspose::Words::Saving::SaveOptions> saveOptions);
1289  void SetupLoadWarningCallback(System::SharedPtr<Aspose::Words::LoadOptions> loadOptions);
1290  void AutoUpdateTrackRevisions();
1291  void LoadCore(System::SharedPtr<System::IO::Stream> stream, System::SharedPtr<Aspose::Words::LoadOptions> loadOptions);
1292  System::SharedPtr<Aspose::Words::Saving::SaveOutputParameters> SaveCore(System::SharedPtr<Aspose::Words::SaveInfo> saveInfo, System::SharedPtr<Aspose::Words::Saving::SaveOptions> saveOptions);
1293  void UpdateFieldsBeforeSave();
1294  void SetLocaleDefaultsForNewDocument();
1295  void RemoveSectionUnlock(Aspose::Words::ProtectionType type);
1296  ThisType* CppMemberwiseClone() ASPOSE_CONST override { return new ThisType(*this); }
1297 
1298 };
1299 
1300 }
1301 }
Specifies a list of persisted task pane objects.
Definition: TaskPaneCollection.h:27
PsSaveOptions()
ImportFormatOptions()
Definition: IFontData.h:19
CleanupOptions()
Definition: CompareOptions.h:16
Definition: Hyphenation.h:18
Represents a collection of Aspose::Words::Markup::CustomPart objects.
Definition: CustomPartCollection.h:35
A collection of Aspose::Words::Revision objects that represent revisions in the document.
Definition: RevisionCollection.h:44
Definition: Document.h:30
A collection of Style objects that represent both the built-in and user-defined styles in a document.
Definition: StyleCollection.h:121
Insert line breaks after every 76th character.
Definition: Document.h:31
virtual System::String GetText()
Gets the text of the run.
#define ASPOSE_CONST
Makes methods labelled as ASPOSE_CONST const.
Definition: defines.h:43
Represents a collection of Custom XML Parts. The items are Aspose::Words::Markup::CustomXmlPart objec...
Definition: CustomXmlPartCollection.h:37
Definition: Border.h:65
Definition: BuildingBlock.h:27
System::ArrayPtr< System::SharedPtr< Aspose::Words::Section > > ToArray()
Copies all sections from the collection to a new array of sections.
Aspose::Words::Fields::FieldSwitchType GetSwitchType(System::String switchName)
System::String get_ContentType() const
Returns the Content-Type string (Internet Media Type) that identifies the type of the saved document.
#define FRIEND_FUNCTION_System_MakeObject
Macro to befriend MakeObject function.
Definition: smart_ptr.h:1366
Definition: Document.h:52
VisitorAction
Allows the visitor to control the enumeration of nodes.
Definition: VisitorAction.h:23
HyphenationOptions()