DocumentBuilder.h
1 //////////////////////////////////////////////////////////////////////////
2 // Copyright 2001-2020 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 /// \file Aspose.Words.Cpp/Model/Document/DocumentBuilder.h
9 #pragma once
10 
11 #include <system/string.h>
12 #include <system/shared_ptr.h>
13 #include <system/object.h>
14 #include <system/io/stream.h>
15 #include <system/collections/stack.h>
16 #include <system/array.h>
17 #include <drawing/image.h>
18 #include <cstdint>
19 
20 #include "Aspose.Words.Cpp/Model/Text/Underline.h"
21 #include "Aspose.Words.Cpp/Model/Sections/HeaderFooterType.h"
22 #include "Aspose.Words.Cpp/Model/Importing/ImportFormatMode.h"
23 #include "Aspose.Words.Cpp/Model/Formatting/IRunAttrSource.h"
24 #include "Aspose.Words.Cpp/Model/Formatting/IRowAttrSource.h"
25 #include "Aspose.Words.Cpp/Model/Formatting/ICellAttrSource.h"
26 #include "Aspose.Words.Cpp/Model/Footnotes/FootnoteType.h"
27 #include "Aspose.Words.Cpp/Model/Fields/FormFields/TextFormFieldType.h"
28 #include "Aspose.Words.Cpp/Model/Fields/FieldType.h"
29 #include "Aspose.Words.Cpp/Model/Drawing/WrapType.h"
30 #include "Aspose.Words.Cpp/Model/Drawing/ShapeType.h"
31 #include "Aspose.Words.Cpp/Model/Drawing/RelativeVerticalPosition.h"
32 #include "Aspose.Words.Cpp/Model/Drawing/RelativeHorizontalPosition.h"
33 #include "Aspose.Words.Cpp/Model/Drawing/Charts/ChartType.h"
34 #include "Aspose.Words.Cpp/Model/Document/BreakType.h"
35 #include "Aspose.Words.Cpp/aspose_words_api_defs.h"
36 
37 namespace Aspose { namespace Words { namespace Drawing { namespace Core { namespace Dml { class DmlShapeInserter; } } } } }
38 namespace Aspose { namespace Words { namespace RW { namespace Docx { namespace Reader { class ChartInserter; } } } } }
39 namespace Aspose { namespace Words { class DocumentInserter; } }
40 namespace Aspose { namespace Words { class VideoInserter; } }
41 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlControlReader; } } } } }
42 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlParagraphArranger; } } } } }
43 namespace Aspose { namespace Words { namespace RW { namespace Mhtml { namespace Reader { class MhtmlReader; } } } } }
44 namespace Aspose { namespace Words { namespace Fields { class FieldIndex; } } }
45 namespace Aspose { namespace Words { namespace Fields { class FieldTextHelper; } } }
46 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlRubyReader; } } } } }
47 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlBidiTextArranger; } } } } }
48 namespace Aspose { namespace Words { namespace Fields { class FieldToc; } } }
49 namespace Aspose { namespace Words { namespace MailMerging { class TagReplacer; } } }
50 namespace Aspose { namespace Words { class NodeCopier; } }
51 namespace Aspose { namespace Words { class Bookmark; } }
52 namespace Aspose { namespace Words { namespace Fields { class TextResultApplier; } } }
53 namespace Aspose { namespace Words { class TableBuilder; } }
54 namespace Aspose { namespace Words { namespace RW { namespace Txt { namespace Reader { class TxtReader; } } } } }
55 namespace Aspose { namespace Words { namespace RW { namespace Html { namespace Reader { class HtmlReader; } } } } }
56 namespace Aspose { namespace Words { enum class ParagraphBreakCharReplacement; } }
57 namespace Aspose { namespace Words { class Document; } }
58 namespace Aspose { namespace Words { class Font; } }
59 namespace Aspose { namespace Words { class ParagraphFormat; } }
60 namespace Aspose { namespace Words { class ListFormat; } }
61 namespace Aspose { namespace Words { class PageSetup; } }
62 namespace Aspose { namespace Words { namespace Tables { class RowFormat; } } }
63 namespace Aspose { namespace Words { namespace Tables { class CellFormat; } } }
64 namespace Aspose { namespace Words { class Node; } }
65 namespace Aspose { namespace Words { class Paragraph; } }
66 namespace Aspose { namespace Words { class Story; } }
67 namespace Aspose { namespace Words { class Section; } }
68 namespace Aspose { namespace Words { namespace Tables { class Cell; } } }
69 namespace Aspose { namespace Words { class RunPr; } }
70 namespace Aspose { namespace Words { namespace Tables { class TablePr; } } }
71 namespace Aspose { namespace Words { namespace Tables { class CellPr; } } }
72 namespace Aspose { namespace Words { enum class StoryType; } }
73 namespace Aspose { namespace Words { namespace Fields { class Field; } } }
74 namespace Aspose { namespace Words { namespace Tables { class Row; } } }
75 namespace Aspose { namespace Words { namespace Fields { class FormField; } } }
76 namespace Aspose { namespace Words { class Footnote; } }
77 namespace Aspose { namespace Words { namespace Drawing { class Shape; } } }
78 namespace Aspose { namespace Words { namespace Drawing { namespace Ole { namespace Core { class HtmlOleControl; } } } } }
79 namespace Aspose { namespace Words { class SignatureLineOptions; } }
80 namespace Aspose { namespace Words { class HtmlInsertionOptions; } }
81 namespace Aspose { namespace Words { namespace Tables { class Table; } } }
82 namespace Aspose { namespace Words { class BookmarkStart; } }
83 namespace Aspose { namespace Words { class BookmarkEnd; } }
84 namespace Aspose { namespace Words { class EditableRangeStart; } }
85 namespace Aspose { namespace Words { class EditableRangeEnd; } }
86 namespace Aspose { namespace Words { class ImportFormatOptions; } }
87 namespace Aspose { namespace Words { namespace Fields { class FieldBundle; } } }
88 namespace Aspose { namespace Words { namespace Fields { class FieldEnd; } } }
89 namespace Aspose { namespace Words { class ParaPr; } }
90 namespace Aspose { namespace Words { class Run; } }
91 namespace Aspose { namespace Words { enum class SectionStart; } }
92 namespace Aspose { namespace Words { namespace Fields { class FieldStart; } } }
93 namespace Aspose { namespace Words { namespace Fields { class FieldSeparator; } } }
94 namespace Aspose { namespace Words { namespace RW { namespace Ole { class OleRegistryInfo; } } } }
95 namespace Aspose { namespace Words { namespace Drawing { namespace Core { class OleObject; } } } }
96 
97 namespace Aspose {
98 
99 namespace Words {
100 
101 /// <summary>
102 /// Provides methods to insert text, images and other content, specify font, paragraph and section formatting.
103 /// </summary>
104 /// <remarks>
105 /// <para><b>DocumentBuilder</b> makes the process of building a <b>Document</b> easier.
106 /// <b>Document</b> is a composite object consisting of a tree of nodes and while inserting content
107 /// nodes directly into the tree is possible, it requires good understanding of the tree structure.
108 /// <b>DocumentBuilder</b> is a "facade" for the complex structure of <b>Document</b> and allows
109 /// to insert content and formatting quickly and easily.</para>
110 ///
111 /// <para>Create a <b>DocumentBuilder</b> and associate it with a <see cref="Aspose::Words::DocumentBuilder::get_Document" />.</para>
112 ///
113 /// <para>The <b>DocumentBuilder</b> has an internal cursor where the text will be inserted
114 /// when you call <see cref="Aspose::Words::DocumentBuilder::Write(System::String)" />, <see cref="Aspose::Words::DocumentBuilder::Writeln(System::String)" />, <see cref="Aspose::Words::DocumentBuilder::InsertBreak(Aspose::Words::BreakType)" />
115 /// and other methods. You can navigate the <b>DocumentBuilder</b> cursor to a different location
116 /// in a document using various MoveToXXX methods.</para>
117 ///
118 /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_Font" /> property to specify character formatting that will apply to
119 /// all text inserted from the current position in the document onwards.</para>
120 ///
121 /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_ParagraphFormat" /> property to specify paragraph formatting for the current
122 /// and all paragraphs that will be inserted.</para>
123 ///
124 /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_PageSetup" /> property to specify page and section properties for the current
125 /// section and all section that will be inserted.</para>
126 ///
127 /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_CellFormat" /> and <see cref="Aspose::Words::DocumentBuilder::get_RowFormat" /> properties to specify
128 /// formatting properties for table cells and rows. User the <see cref="Aspose::Words::DocumentBuilder::InsertCell" /> and
129 /// <see cref="Aspose::Words::DocumentBuilder::EndRow" /> methods to build a table.</para>
130 ///
131 /// <para>Note that <b>Font</b>, <b>ParagraphFormat</b> and <b>PageSetup</b> properties are updated whenever
132 /// you navigate to a different place in the document to reflect formatting properties available at the new location.</para>
133 ///
134 /// </remarks>
135 class DocumentBuilder : public Aspose::Words::IRunAttrSource, public Aspose::Words::IRowAttrSource, public Aspose::Words::ICellAttrSource
136 {
137  typedef DocumentBuilder ThisType;
138  typedef Aspose::Words::IRunAttrSource BaseType;
139  typedef Aspose::Words::IRowAttrSource BaseType1;
140  typedef Aspose::Words::ICellAttrSource BaseType2;
141 
142  typedef ::System::BaseTypesInfo<BaseType, BaseType1, BaseType2> ThisTypeBaseTypesInfo;
144 
145  friend class Aspose::Words::Drawing::Core::Dml::DmlShapeInserter;
146  friend class Aspose::Words::RW::Docx::Reader::ChartInserter;
147  friend class Aspose::Words::DocumentInserter;
148  friend class Aspose::Words::VideoInserter;
149  friend class Aspose::Words::RW::Html::Reader::HtmlControlReader;
150  friend class Aspose::Words::RW::Html::Reader::HtmlParagraphArranger;
151  friend class Aspose::Words::RW::Mhtml::Reader::MhtmlReader;
152  friend class Aspose::Words::Fields::FieldIndex;
153  friend class Aspose::Words::Fields::FieldTextHelper;
154  friend class Aspose::Words::Fields::FieldTextHelper;
155  friend class Aspose::Words::RW::Html::Reader::HtmlRubyReader;
156  friend class Aspose::Words::RW::Html::Reader::HtmlBidiTextArranger;
157  friend class Aspose::Words::Fields::FieldToc;
158  friend class Aspose::Words::MailMerging::TagReplacer;
159  friend class Aspose::Words::NodeCopier;
160  friend class Aspose::Words::Bookmark;
161  friend class Aspose::Words::Fields::TextResultApplier;
162  friend class Aspose::Words::TableBuilder;
163  friend class Aspose::Words::RW::Txt::Reader::TxtReader;
164  friend class Aspose::Words::RW::Html::Reader::HtmlReader;
165 
166 private:
167 
168  class FontPr : public System::Object
169  {
170  typedef FontPr ThisType;
171  typedef System::Object BaseType;
172 
173  typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
174  RTTI_INFO_DECL();
175 
176  public:
177 
178  System::SharedPtr<Aspose::Words::RunPr> get_RunPr() const;
179  System::SharedPtr<Aspose::Words::RunPr> get_ParaBreakRunPr() const;
180 
181  FontPr(System::SharedPtr<Aspose::Words::RunPr> runPr, System::SharedPtr<Aspose::Words::RunPr> paraBreakRunPr);
182 
183  protected:
184 
185  System::Object::shared_members_type GetSharedMembers() override;
186 
187  private:
188 
189  System::SharedPtr<Aspose::Words::RunPr> mRunPr;
190  System::SharedPtr<Aspose::Words::RunPr> mParaBreakRunPr;
191 
192  };
193 
194 public:
195 
196  /// <summary>
197  /// Gets or sets the <see cref="Aspose::Words::DocumentBuilder::get_Document" /> object that this object is attached to.
198  /// </summary>
199  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Document> get_Document() const;
200 
201  /// Setter for Aspose::Words::DocumentBuilder::get_Document
202  ASPOSE_WORDS_SHARED_API void set_Document(System::SharedPtr<Aspose::Words::Document> value);
203 
204  /// <summary>
205  /// Returns an object that represents current font formatting properties.
206  /// </summary>
207  /// <remarks>
208  /// <para>Use <b>Font</b> to access and modify font formatting properties.</para>
209  /// <para>Specify font formatting before inserting text.</para>
210  /// </remarks>
211  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Font> get_Font();
212 
213  /// <summary>
214  /// True if the font is formatted as bold.
215  /// </summary>
216  ASPOSE_WORDS_SHARED_API bool get_Bold();
217 
218  /// Setter for Aspose::Words::DocumentBuilder::get_Bold
219  ASPOSE_WORDS_SHARED_API void set_Bold(bool value);
220 
221  /// <summary>
222  /// True if the font is formatted as italic.
223  /// </summary>
224  ASPOSE_WORDS_SHARED_API bool get_Italic();
225 
226  /// Setter for Aspose::Words::DocumentBuilder::get_Italic
227  ASPOSE_WORDS_SHARED_API void set_Italic(bool value);
228 
229  /// <summary>
230  /// Gets/sets underline type for the current font.
231  /// </summary>
232  ASPOSE_WORDS_SHARED_API Aspose::Words::Underline get_Underline();
233 
234  /// Setter for Aspose::Words::DocumentBuilder::get_Underline
235  ASPOSE_WORDS_SHARED_API void set_Underline(Aspose::Words::Underline value);
236 
237  /// <summary>
238  /// Returns an object that represents current paragraph formatting properties.
239  /// </summary>
240  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::ParagraphFormat> get_ParagraphFormat();
241 
242  /// <summary>
243  /// Returns an object that represents current list formatting properties.
244  /// </summary>
245  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::ListFormat> get_ListFormat();
246 
247  /// <summary>
248  /// Returns an object that represents current page setup and section properties.
249  /// </summary>
250  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::PageSetup> get_PageSetup();
251 
252  /// <summary>
253  /// Returns an object that represents current table row formatting properties.
254  /// </summary>
255  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::RowFormat> get_RowFormat();
256 
257  /// <summary>
258  /// Returns an object that represents current table cell formatting properties.
259  /// </summary>
260  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::CellFormat> get_CellFormat();
261 
262  /// <summary>
263  /// Returns true if the cursor is at the beginning of the current paragraph (no text before the cursor).
264  /// </summary>
265  ASPOSE_WORDS_SHARED_API bool get_IsAtStartOfParagraph();
266 
267  /// <summary>
268  /// Returns true if the cursor is at the end of the current paragraph.
269  /// </summary>
270  ASPOSE_WORDS_SHARED_API bool get_IsAtEndOfParagraph();
271 
272  /// <summary>
273  /// Gets the node that is currently selected in this DocumentBuilder.
274  /// </summary>
275  /// <remarks>
276  /// <para><b>CurrentNode</b> is a cursor of <b>DocumentBuilder</b> and points to a <b>Node</b>
277  /// that is a direct child of a <b>Paragraph</b>. Any insert operations you perform using
278  /// <b>DocumentBuilder</b> will insert before the <b>CurrentNode</b>.</para>
279  /// <para>When the current paragraph is empty or the cursor is positioned just
280  /// before the end of the paragraph, <b>CurrentNode</b> returns null.</para>
281  /// <seealso cref="Aspose::Words::DocumentBuilder::get_CurrentParagraph" />
282  /// </remarks>
283  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> get_CurrentNode();
284 
285  /// <summary>
286  /// Gets the paragraph that is currently selected in this DocumentBuilder.
287  /// </summary>
288  /// <remarks>
289  /// <see cref="Aspose::Words::DocumentBuilder::get_CurrentNode" />
290  /// </remarks>
291  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Paragraph> get_CurrentParagraph();
292 
293  /// <summary>
294  /// Gets the story that is currently selected in this DocumentBuilder.
295  /// </summary>
296  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Story> get_CurrentStory();
297 
298  /// <summary>
299  /// Gets the section that is currently selected in this DocumentBuilder.
300  /// </summary>
301  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Section> get_CurrentSection();
302 
303  /// <summary>
304  /// Initializes a new instance of this class.
305  /// </summary>
306  /// <remarks>
307  /// Creates a new <b>DocumentBuilder</b> object and attaches it to a new <see cref="Aspose::Words::DocumentBuilder::get_Document" /> object.
308  /// </remarks>
309  ASPOSE_WORDS_SHARED_API DocumentBuilder();
310 
311  /// <summary>
312  /// Initializes a new instance of this class.
313  /// </summary>
314  /// <remarks>
315  /// Creates a new <b>DocumentBuilder</b> object, attaches to the specified <see cref="Aspose::Words::DocumentBuilder::get_Document" /> object.
316  /// The cursor is positioned at the beginning of the document.
317  /// </remarks>
318  /// <param name="doc">The Document object to attach to.</param>
319  ASPOSE_WORDS_SHARED_API DocumentBuilder(System::SharedPtr<Aspose::Words::Document> doc);
320 
321  /// <summary>
322  /// Moves the cursor to the beginning of the document.
323  /// </summary>
324  ASPOSE_WORDS_SHARED_API void MoveToDocumentStart();
325 
326  /// <summary>
327  /// Moves the cursor to the end of the document.
328  /// </summary>
329  ASPOSE_WORDS_SHARED_API void MoveToDocumentEnd();
330 
331  /// <summary>
332  /// Moves the cursor to the beginning of the body in a specified section.
333  /// </summary>
334  /// <remarks>
335  /// <para>When sectionIndex is greater than or equal to 0, it specifies an index from
336  /// the beginning of the document with 0 being the first section. When sectionIndex is less than 0,
337  /// it specified an index from the end of the document with -1 being the last section.</para>
338  /// <para>The cursor is moved to the first paragraph in the <b>Body</b> of the specified section.</para>
339  /// </remarks>
340  /// <param name="sectionIndex">The index of the section to move to.</param>
341  ASPOSE_WORDS_SHARED_API void MoveToSection(int32_t sectionIndex);
342 
343  /// <summary>
344  /// Moves the cursor to the beginning of a header or footer in the current section.
345  /// </summary>
346  /// <remarks>
347  /// <para>After you moved the cursor into a header or footer, you can use the rest of DocumentBuilder
348  /// methods to modify the contents of the header or footer.</para>
349  /// <para>If you want to create headers and footers different for the first page, you need
350  /// to set <see cref="Aspose::Words::PageSetup::get_DifferentFirstPageHeaderFooter" />.</para>
351  /// <para>If you want to create headers and footers different for even and odd pages, you need
352  /// to set <see cref="Aspose::Words::PageSetup::get_OddAndEvenPagesHeaderFooter" />.</para>
353  /// <para>Use <see cref="Aspose::Words::DocumentBuilder::MoveToSection(int32_t)" /> to move out of the header into the main text.</para>
354  /// </remarks>
355  /// <param name="headerFooterType">Specifies the header or footer to move to.</param>
356  ASPOSE_WORDS_SHARED_API void MoveToHeaderFooter(Aspose::Words::HeaderFooterType headerFooterType);
357 
358  ///
359  /// <summary>
360  /// Moves the cursor to a position just beyond the specified merge field and removes the merge field.
361  /// </summary>
362  /// <remarks>
363  /// <para>Note that this method deletes the merge field from the document after moving the cursor.</para>
364  /// </remarks>
365  /// <param name="fieldName">The case-insensitive name of the mail merge field.</param>
366  /// <returns>True if the merge field was found and the cursor was moved; false otherwise.</returns>
367  ASPOSE_WORDS_SHARED_API bool MoveToMergeField(System::String fieldName);
368 
369  /// <summary>
370  /// Moves the merge field to the specified merge field.
371  /// </summary>
372  /// <param name="fieldName">The case-insensitive name of the mail merge field.</param>
373  /// <param name="isAfter">When true, moves the cursor to be after the field end.
374  /// When false, moves the cursor to be before the field start. </param>
375  /// <param name="isDeleteField">When true, deletes the merge field.</param>
376  /// <returns>True if the merge field was found and the cursor was moved; false otherwise.</returns>
377  ASPOSE_WORDS_SHARED_API bool MoveToMergeField(System::String fieldName, bool isAfter, bool isDeleteField);
378 
379  /// <summary>
380  /// Moves the cursor to a field in the document.
381  /// </summary>
382  /// <param name="field">The field to move the cursor to.</param>
383  /// <param name="isAfter">When true, moves the cursor to be after the field end.
384  /// When false, moves the cursor to be before the field start. </param>
385  ASPOSE_WORDS_SHARED_API void MoveToField(System::SharedPtr<Aspose::Words::Fields::Field> field, bool isAfter);
386 
387  /// <summary>
388  /// Moves the cursor to a bookmark.
389  /// </summary>
390  /// <remarks>
391  /// <para>Moves the cursor to a position just after the start of the bookmark with the
392  /// specified name.</para>
393  /// <para>The comparison is not case-sensitive. If the bookmark was not found, false is
394  /// returned and the cursor is not moved.</para>
395  /// <para>Inserting new text does not replace existing text of the bookmark.</para>
396  /// <para>Note that some bookmarks in the document are assigned to form fields.
397  /// Moving to such a bookmark and inserting text there inserts the text into the
398  /// form field code. Although this will not invalidate the form field, the inserted
399  /// text will not be visible because it becomes part of the field code.</para>
400  /// </remarks>
401  /// <param name="bookmarkName">The name of the bookmark to move the cursor to.</param>
402  /// <returns>True if the bookmark was found; false otherwise.</returns>
403  ASPOSE_WORDS_SHARED_API bool MoveToBookmark(System::String bookmarkName);
404 
405  /// <summary>
406  /// Moves the cursor to a bookmark with greater precision.
407  /// </summary>
408  /// <remarks>
409  /// <para>Moves the cursor to a position before or after the bookmark start or end.</para>
410  /// <para>If desired position is not at inline level, moves to the next paragraph.</para>
411  /// <para>The comparison is not case-sensitive. If the bookmark was not found, false is
412  /// returned and the cursor is not moved.</para>
413  /// </remarks>
414  /// <param name="bookmarkName">The name of the bookmark to move the cursor to.</param>
415  /// <param name="isStart">When true, moves the cursor to the beginning of the bookmark.
416  /// When false, moves the cursor to the end of the bookmark.</param>
417  /// <param name="isAfter">When true, moves the cursor to be after the bookmark
418  /// start or end position. When false, moves the cursor to be before the bookmark
419  /// start or end position.</param>
420  /// <returns>True if the bookmark was found; false otherwise.</returns>
421  ASPOSE_WORDS_SHARED_API bool MoveToBookmark(System::String bookmarkName, bool isStart, bool isAfter);
422 
423  /// <summary>
424  /// Moves the cursor to a paragraph in the current section.
425  /// </summary>
426  /// <remarks>
427  /// <para>The navigation is performed inside the current story of the current section.
428  /// That is, if you moved the cursor to the primary header of the first section,
429  /// then paragraphIndex specified the index of the paragraph inside that header
430  /// of that section.</para>
431  /// <para>When paragraphIndex is greater than or equal to 0, it specifies an index from
432  /// the beginning of the section with 0 being the first paragraph. When paragraphIndex is less than 0,
433  /// it specified an index from the end of the section with -1 being the last paragraph.</para>
434  /// </remarks>
435  /// <param name="paragraphIndex">The index of the paragraph to move to.</param>
436  /// <param name="characterIndex">The index of the character inside the paragraph.
437  /// Currently can only specify 0 to move to the beginning of the paragraph or -1 to
438  /// move to the end of the paragraph.
439  /// </param>
440  ASPOSE_WORDS_SHARED_API void MoveToParagraph(int32_t paragraphIndex, int32_t characterIndex);
441 
442  /// <summary>
443  /// Moves the cursor to a table cell in the current section.
444  /// </summary>
445  /// <remarks>
446  /// <para>The navigation is performed inside the current story of the current section.</para>
447  /// <para>For the index parameters, when index is greater than or equal to 0, it specifies an index from
448  /// the beginning with 0 being the first element. When index is less than 0, it specified an index from
449  /// the end with -1 being the last element.</para>
450  /// </remarks>
451  /// <param name="tableIndex">The index of the table to move to.</param>
452  /// <param name="rowIndex">The index of the row in the table.</param>
453  /// <param name="columnIndex">The index of the column in the table.</param>
454  /// <param name="characterIndex">The index of the character inside the cell.
455  /// Currently can only specify 0 to move to the beginning of the cell or -1 to
456  /// move to the end of the cell.</param>
457  ASPOSE_WORDS_SHARED_API void MoveToCell(int32_t tableIndex, int32_t rowIndex, int32_t columnIndex, int32_t characterIndex);
458 
459  /// <summary>
460  /// Moves the cursor to an inline node or to the end of a paragraph.
461  /// </summary>
462  /// <remarks>
463  /// <para>When <i>node</i> is an inline-level node, the cursor is moved to this node
464  /// and further content will be inserted before that node.</para>
465  /// <para>When <i>node</i> is a <b>Paragraph</b>, the cursor is moved to the end of the paragraph
466  /// and further content will be inserted just before the paragraph break.</para>
467  /// <para>When <i>node</i> is a block-level node but not a Paragraph, the cursor is moved to the end of the first paragraph into block-level node
468  /// and further content will be inserted just before the paragraph break.</para>
469  /// </remarks>
470  /// <param name="node">The node must be a paragraph or a direct child of a paragraph.</param>
471  ASPOSE_WORDS_SHARED_API void MoveTo(System::SharedPtr<Aspose::Words::Node> node);
472 
473  /// <summary>
474  /// Deletes a row from a table.
475  /// </summary>
476  /// <remarks>
477  /// <para>If the cursor is inside the row that is being deleted, the cursor is moved
478  /// out to the next row or to the next paragraph after the table.</para>
479  /// <para>If you delete a row from a table that contains only one row, the whole
480  /// table is deleted.</para>
481  /// <para>For the index parameters, when index is greater than or equal to 0, it specifies an index from
482  /// the beginning with 0 being the first element. When index is less than 0, it specified an index from
483  /// the end with -1 being the last element.</para>
484  /// </remarks>
485  /// <param name="tableIndex">The index of the table.</param>
486  /// <param name="rowIndex">The index of the row in the table.</param>
487  /// <returns>The row node that was just removed.</returns>
488  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::Row> DeleteRow(int32_t tableIndex, int32_t rowIndex);
489 
490  /// <summary>
491  /// Inserts a string into the document at the current insert position.
492  /// </summary>
493  /// <remarks>
494  /// Current font formatting specified by the <see cref="Aspose::Words::DocumentBuilder::get_Font" /> property is used.
495  /// </remarks>
496  /// <param name="text">The string to insert into the document.</param>
497  ASPOSE_WORDS_SHARED_API void Write(System::String text);
498 
499  /// <summary>
500  /// Inserts a string and a paragraph break into the document.
501  /// </summary>
502  /// <remarks>
503  /// Current font and paragraph formatting specified by the <see cref="Aspose::Words::DocumentBuilder::get_Font" /> and <see cref="Aspose::Words::DocumentBuilder::get_ParagraphFormat" /> properties are used.
504  /// </remarks>
505  /// <param name="text">The string to insert into the document.</param>
506  ASPOSE_WORDS_SHARED_API void Writeln(System::String text);
507 
508  /// <summary>
509  /// Inserts a paragraph break into the document.
510  /// </summary>
511  /// <remarks>
512  /// <para>Calls <see cref="Aspose::Words::DocumentBuilder::InsertParagraph" />.</para>
513  /// </remarks>
514  ASPOSE_WORDS_SHARED_API void Writeln();
515 
516  /// <summary>
517  /// Inserts a paragraph break into the document.
518  /// </summary>
519  /// <remarks>
520  /// <para>Current paragraph formatting specified by the <see cref="Aspose::Words::DocumentBuilder::get_ParagraphFormat" /> property is used.</para>
521  /// <para>Breaks the current paragraph in two. After inserting the paragraph, the cursor is placed at the beginning of the new paragraph.</para>
522  /// </remarks>
523  /// <returns>The paragraph node that was just inserted. It is the same node as <see cref="Aspose::Words::DocumentBuilder::get_CurrentParagraph" />.</returns>
524  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Paragraph> InsertParagraph();
525 
526  /// <summary>
527  /// Inserts style separator into the document.
528  /// </summary>
529  /// <remarks>
530  /// This method allows to apply different paragraph styles to two different parts of a text line.
531  /// </remarks>
532  ASPOSE_WORDS_SHARED_API void InsertStyleSeparator();
533 
534  /// <summary>
535  /// Inserts a break of the specified type into the document.
536  /// </summary>
537  /// <remarks>
538  /// Use this method to insert paragraph, page, column, section or line break into the document.
539  /// </remarks>
540  /// <param name="breakType">Specifies the type of the break to insert.</param>
541  ASPOSE_WORDS_SHARED_API void InsertBreak(Aspose::Words::BreakType breakType);
542 
543  /// <summary>
544  /// Inserts a TOC (table of contents) field into the document.
545  /// </summary>
546  /// <remarks>
547  /// <para>This method inserts a TOC (table of contents) field into the document at
548  /// the current position.</para>
549  /// <para>A table of contents in a Word document can be built in a number of ways
550  /// and formatted using a variety of options. The way the table is built and
551  /// displayed by Microsoft Word is controlled by the field switches.</para>
552  /// <para>The easiest way to specify the switches is to insert and configure a table of
553  /// contents into a Word document using the Insert-&gt;Reference-&gt;Index and Tables menu,
554  /// then switch display of field codes on to see the switches. You can press Alt+F9 in
555  /// Microsoft Word to toggle display of field codes on or off.</para>
556  /// <para>For example, after creating a table of contents, the following field is inserted
557  /// into the document: <b>{ TOC \\o "1-3" \\h \\z \\u }</b>.
558  /// You can copy <b>\\o "1-3" \\h \\z \\u</b> and use it as the switches parameter.</para>
559  /// <para>Note that <b>InsertTableOfContents</b> will only insert a TOC field, but
560  /// will not actually build the table of contents. The table of contents is built by
561  /// Microsoft Word when the field is updated.</para>
562  /// <para>If you insert a table of contents using this method and then open the file
563  /// in Microsoft Word, you will not see the table of contents because the TOC field
564  /// has not yet been updated.</para>
565  /// <para>In Microsoft Word, fields are not automatically updated when a document is opened,
566  /// but you can update fields in a document at any time by pressing F9.</para>
567  /// </remarks>
568  /// <param name="switches">The TOC field switches.</param>
569  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::Field> InsertTableOfContents(System::String switches);
570 
571  ///
572  /// <summary>
573  /// Inserts a Word field into a document and optionally updates the field result.
574  /// </summary>
575  /// <remarks>
576  /// <para>This method inserts a field into a document.
577  /// Aspose.Words can update fields of most types, but not all. For more details see the
578  /// <see cref="Aspose::Words::DocumentBuilder::InsertField(System::String, System::String)" /> overload.</para>
579  ///
580  /// <seealso cref="Aspose::Words::Fields::Field" />
581  /// </remarks>
582  /// <param name="fieldType">The type of the field to append.</param>
583  /// <param name="updateField">Specifies whether to update the field immediately.</param>
584  /// <returns>A <see cref="Aspose::Words::Fields::Field" /> object that represents the inserted field.</returns>
585  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::Field> InsertField(Aspose::Words::Fields::FieldType fieldType, bool updateField);
586 
587  ///
588  /// <summary>
589  /// Inserts a Word field into a document and updates the field result.
590  /// </summary>
591  /// <remarks>
592  /// <para>This method inserts a field into a document and updates the field result immediately.
593  /// Aspose.Words can update fields of most types, but not all. For more details see the
594  /// <see cref="Aspose::Words::DocumentBuilder::InsertField(System::String, System::String)" /> overload.</para>
595  ///
596  /// <seealso cref="Aspose::Words::Fields::Field" />
597  /// </remarks>
598  /// <param name="fieldCode">The field code to insert (without curly braces).</param>
599  /// <returns>A <see cref="Aspose::Words::Fields::Field" /> object that represents the inserted field.</returns>
600  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::Field> InsertField(System::String fieldCode);
601 
602  /// <summary>
603  /// Inserts a Word field into a document without updating the field result.
604  /// </summary>
605  /// <remarks>
606  /// <para>Fields in Microsoft Word documents consist of a field code and a field result.
607  /// The field code is like a formula and the field result is like the value that
608  /// the formula produces. The field code may also contain field switches
609  /// that are like additional instructions to perform a specific action.</para>
610  ///
611  /// <para>You can switch between displaying field codes and results in your document in
612  /// Microsoft Word using the keyboard shortcut Alt+F9. Field codes appear between curly braces ( { } ).</para>
613  ///
614  /// <para>To create a field, you need to specify a field type, field code and a "placeholder" field value.
615  /// If you are not sure about a particular field code syntax, create the field in Microsoft Word first
616  /// and switch to see its field code.</para>
617  ///
618  /// <para>Aspose.Words can calculate field results for most of the field types, but this method
619  /// does not update the field result automatically. Because the field result is not calculated automatically,
620  /// you are expected to pass some string value (or even an empty string) that will be inserted into the field result.
621  /// This value will remain in the field result as a placeholder until the field is updated.
622  /// To update the field result you can call <see cref="Aspose::Words::Fields::Field::Update" /> on the field object returned
623  /// to you or <see cref="Aspose::Words::Document::UpdateFields" /> to update fields in the whole document.</para>
624  ///
625  /// <seealso cref="Aspose::Words::Fields::Field" />
626  /// </remarks>
627  /// <param name="fieldCode">The field code to insert (without curly braces).</param>
628  /// <param name="fieldValue">The field value to insert. Pass null for fields that do not have a value.</param>
629  /// <returns>A <see cref="Aspose::Words::Fields::Field" /> object that represents the inserted field.</returns>
630  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::Field> InsertField(System::String fieldCode, System::String fieldValue);
631 
632  /// <summary>
633  /// Inserts a hyperlink into the document.
634  /// </summary>
635  /// <remarks>
636  /// <para>Note that you need to specify font formatting for the hyperlink display text explicitly
637  /// using the <see cref="Aspose::Words::DocumentBuilder::get_Font" /> property.</para>
638  /// <para>This methods internally calls <see cref="Aspose::Words::DocumentBuilder::InsertField(System::String)" /> to insert an MS Word HYPERLINK field
639  /// into the document.</para>
640  /// </remarks>
641  /// <param name="displayText">Text of the link to be displayed in the document.</param>
642  /// <param name="urlOrBookmark">Link destination. Can be a url or a name of a bookmark inside the document.
643  /// This method always adds apostrophes at the beginning and end of the url.</param>
644  /// <param name="isBookmark">True if the previous parameter is a name of a bookmark inside the document;
645  /// false is the previous parameter is a URL.</param>
646  /// <returns>A <see cref="Aspose::Words::Fields::Field" /> object that represents the inserted field.</returns>
647  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::Field> InsertHyperlink(System::String displayText, System::String urlOrBookmark, bool isBookmark);
648 
649  /// <summary>
650  /// Inserts a text form field at the current position.
651  /// </summary>
652  /// <remarks>
653  /// <para>If you specify a name for the form field, then a bookmark is automatically created with the same name.</para>
654  /// </remarks>
655  /// <param name="name">The name of the form field. Can be an empty string.</param>
656  /// <param name="type">Specifies the type of the text form field.</param>
657  /// <param name="format">Format string used to format the value of the form field.</param>
658  /// <param name="fieldValue">Text that will be shown in the field.</param>
659  /// <param name="maxLength">Maximum length the user can enter into the form field. Set to zero for unlimited length.</param>
660  /// <returns>The form field node that was just inserted.</returns>
661  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FormField> InsertTextInput(System::String name, Aspose::Words::Fields::TextFormFieldType type, System::String format, System::String fieldValue, int32_t maxLength);
662 
663  /// <summary>
664  /// Inserts a checkbox form field at the current position.
665  /// </summary>
666  /// <remarks>
667  /// <para>If you specify a name for the form field, then a bookmark is automatically created with the same name.</para>
668  /// </remarks>
669  /// <param name="name">The name of the form field. Can be an empty string. The value longer than 20 characters will be truncated.</param>
670  /// <param name="checkedValue">Checked status of the checkbox form field.</param>
671  /// <param name="size">Specifies the size of the checkbox in points. Specify 0 for MS Word
672  /// to calculate the size of the checkbox automatically.</param>
673  /// <returns>The form field node that was just inserted.</returns>
674  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FormField> InsertCheckBox(System::String name, bool checkedValue, int32_t size);
675 
676  /// <summary>
677  /// Inserts a checkbox form field at the current position.
678  /// </summary>
679  /// <remarks>
680  /// <para>If you specify a name for the form field, then a bookmark is automatically created with the same name.</para>
681  /// </remarks>
682  /// <param name="name">The name of the form field. Can be an empty string. The value longer than 20 characters will be truncated.</param>
683  /// <param name="defaultValue">Default value of the checkbox form field.</param>
684  /// <param name="checkedValue">Current checked status of the checkbox form field.</param>
685  /// <param name="size">Specifies the size of the checkbox in points. Specify 0 for MS Word
686  /// to calculate the size of the checkbox automatically.</param>
687  /// <returns>The form field node that was just inserted.</returns>
688  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FormField> InsertCheckBox(System::String name, bool defaultValue, bool checkedValue, int32_t size);
689 
690  /// <summary>
691  /// Inserts a combobox form field at the current position.
692  /// </summary>
693  /// <remarks>
694  /// <para>If you specify a name for the form field, then a bookmark is automatically created with the same name.</para>
695  /// </remarks>
696  /// <param name="name">The name of the form field. Can be an empty string. The value longer than 20 characters will be truncated.</param>
697  /// <param name="items">The items of the ComboBox. Maximum is 25 items.</param>
698  /// <param name="selectedIndex">The index of the selected item in the ComboBox.</param>
699  /// <returns>The form field node that was just inserted.</returns>
700  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FormField> InsertComboBox(System::String name, System::ArrayPtr<System::String> items, int32_t selectedIndex);
701 
702  /// <summary>
703  /// Inserts a footnote or endnote into the document.
704  /// </summary>
705  /// <param name="footnoteType">Specifies whether to insert a footnote or an endnote.</param>
706  /// <param name="footnoteText">Specifies the text of the footnote.</param>
707  /// <returns>Returns a footnote object that was just created.</returns>
708  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Footnote> InsertFootnote(Aspose::Words::FootnoteType footnoteType, System::String footnoteText);
709 
710  /// <summary>
711  /// Inserts a footnote or endnote into the document.
712  /// </summary>
713  /// <param name="footnoteType">Specifies whether to insert a footnote or an endnote.</param>
714  /// <param name="footnoteText">Specifies the text of the footnote.</param>
715  /// <param name="referenceMark">Specifies the custom reference mark of the footnote.</param>
716  /// <returns>Returns a footnote object that was just created.</returns>
717  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Footnote> InsertFootnote(Aspose::Words::FootnoteType footnoteType, System::String footnoteText, System::String referenceMark);
718 
719  ///
720  /// <summary>
721  /// Inserts an image from a .NET <see cref="System::Drawing::Image" />
722  /// object into the document. The image is inserted inline and at 100% scale.
723  /// </summary>
724  /// <param name="image">The image to insert into the document.</param>
725  /// <returns>The image node that was just inserted.</returns>
726  /// <remarks>
727  /// <para>You can change the image size, location, positioning method and other settings using the
728  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
729  ///
730  /// </remarks>
731  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::Drawing::Image> image);
732 
733  /// <summary>
734  /// Inserts an image from a file or URL into the document. The image is inserted inline and at 100% scale.
735  /// </summary>
736  /// <param name="fileName">The file with the image. Can be any valid local or remote URI.</param>
737  /// <returns>The image node that was just inserted.</returns>
738  /// <remarks>
739  /// <para>This overload will automatically download the image before inserting into the document
740  /// if you specify a remote URI.</para>
741  /// <para>You can change the image size, location, positioning method and other settings using the
742  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
743  /// </remarks>
744  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::String fileName);
745 
746  /// <summary>
747  /// Inserts an image from a stream into the document. The image is inserted inline and at 100% scale.
748  /// </summary>
749  /// <param name="stream">The stream that contains the image.
750  ///
751  /// </param>
752  /// <returns>The image node that was just inserted.</returns>
753  /// <remarks>
754  /// <para>You can change the image size, location, positioning method and other settings using the
755  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
756  /// </remarks>
757  ///
758  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::IO::Stream> stream);
759 
760  /// <summary>
761  /// Inserts an image from a byte array into the document. The image is inserted inline and at 100% scale.
762  /// </summary>
763  /// <param name="imageBytes">The byte array that contains the image.</param>
764  /// <returns>The image node that was just inserted.</returns>
765  /// <remarks>
766  /// <para>You can change the image size, location, positioning method and other settings using the
767  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
768  /// </remarks>
769  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::ArrayPtr<uint8_t> imageBytes);
770 
771  /// <summary>
772  /// Inserts an inline image from a .NET <see cref="System::Drawing::Image" />
773  /// object into the document and scales it to the specified size.
774  /// </summary>
775  /// <param name="image">The image to insert into the document.</param>
776  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
777  /// <remarks>
778  /// <para>You can change the image size, location, positioning method and other settings using the
779  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
780  ///
781  /// </remarks>
782  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::Drawing::Image> image, double width, double height);
783 
784  /// <summary>
785  /// Inserts an inline image from a file or URL into the document and scales it to the specified size.
786  /// </summary>
787  /// <param name="fileName">The file that contains the image.</param>
788  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
789  /// <remarks>
790  /// <para>You can change the image size, location, positioning method and other settings using the
791  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
792  /// </remarks>
793  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::String fileName, double width, double height);
794 
795  /// <summary>
796  /// Inserts an inline image from a stream into the document and scales it to the specified size.
797  /// </summary>
798  /// <param name="stream">The stream that contains the image.</param>
799  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
800  /// <remarks>
801  /// <para>You can change the image size, location, positioning method and other settings using the
802  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
803  /// </remarks>
804  ///
805  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::IO::Stream> stream, double width, double height);
806 
807  /// <summary>
808  /// Inserts an inline image from a byte array into the document and scales it to the specified size.
809  /// </summary>
810  /// <param name="imageBytes">The byte array that contains the image.</param>
811  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
812  /// <remarks>
813  /// <para>You can change the image size, location, positioning method and other settings using the
814  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
815  /// </remarks>
816  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::ArrayPtr<uint8_t> imageBytes, double width, double height);
817 
818  /// <summary>
819  /// Inserts an image from a .NET <see cref="System::Drawing::Image" />
820  /// object at the specified position and size.
821  /// </summary>
822  /// <param name="image">The image to insert into the document.</param>
823  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
824  /// <remarks>
825  /// <para>You can change the image size, location, positioning method and other settings using the
826  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
827  ///
828  /// </remarks>
829  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::Drawing::Image> image, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
830 
831  /// <summary>
832  /// Inserts an image from a file or URL at the specified position and size.
833  /// </summary>
834  /// <param name="fileName">The file that contains the image.</param>
835  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
836  /// <remarks>
837  /// <para>You can change the image size, location, positioning method and other settings using the
838  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
839  /// </remarks>
840  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::String fileName, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
841 
842  /// <summary>
843  /// Inserts an image from a stream at the specified position and size.
844  /// </summary>
845  /// <param name="stream">The stream that contains the image.</param>
846  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
847  ///
848  /// <remarks>
849  /// <para>You can change the image size, location, positioning method and other settings using the
850  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
851  /// </remarks>
852  ///
853  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::SharedPtr<System::IO::Stream> stream, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
854 
855  /// <summary>
856  /// Inserts an image from a byte array at the specified position and size.
857  /// </summary>
858  /// <param name="imageBytes">The byte array that contains the image.</param>
859  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
860  ///
861  /// <remarks>
862  /// <para>You can change the image size, location, positioning method and other settings using the
863  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
864  /// </remarks>
865  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertImage(System::ArrayPtr<uint8_t> imageBytes, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
866 
867  /// <summary>
868  /// Inserts an embedded OLE object from a stream into the document.
869  /// </summary>
870  /// <param name="stream">Stream containing application data.</param>
871  /// <param name="progId">Programmatic Identifier of OLE object.</param>
872  /// <param name="asIcon">Specifies either Iconic or Normal mode of OLE object being inserted.</param>
873  /// <param name="presentation">Image presentation of OLE object. If value is null Aspose.Words will use one of the predefined images.</param>
874  /// <returns>Shape node containing Ole object and inserted at the current Builder position.</returns>
875  ///
876  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObject(System::SharedPtr<System::IO::Stream> stream, System::String progId, bool asIcon, System::SharedPtr<System::Drawing::Image> presentation);
877 
878  /// <summary>
879  /// Inserts an embedded or linked OLE object from a file into the document. Detects OLE object type using file extension.
880  /// </summary>
881  /// <param name="fileName">Full path to the file.</param>
882  /// <param name="isLinked">If true then linked OLE object is inserted otherwise embedded OLE object is inserted.</param>
883  /// <param name="asIcon">Specifies either Iconic or Normal mode of OLE object being inserted.</param>
884  /// <param name="presentation">Image presentation of OLE object. If value is null Aspose.Words will use one of the predefined images.</param>
885  /// <returns>Shape node containing Ole object and inserted at the current Builder position.</returns>
886  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObject(System::String fileName, bool isLinked, bool asIcon, System::SharedPtr<System::Drawing::Image> presentation);
887 
888  /// <summary>
889  /// Inserts an embedded or linked OLE object from a file into the document. Detects OLE object type using given progID parameter.
890  /// </summary>
891  /// <param name="fileName">Full path to the file.</param>
892  /// <param name="progId">ProgId of OLE object.</param>
893  /// <param name="isLinked">If true then linked OLE object is inserted otherwise embedded OLE object is inserted.</param>
894  /// <param name="asIcon">Specifies either Iconic or Normal mode of OLE object being inserted.</param>
895  /// <param name="presentation">Image presentation of OLE object. If value is null Aspose.Words will use one of the predefined images.</param>
896  /// <returns>Shape node containing Ole object and inserted at the current Builder position.</returns>
897  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObject(System::String fileName, System::String progId, bool isLinked, bool asIcon, System::SharedPtr<System::Drawing::Image> presentation);
898 
899  /// <summary>
900  /// Inserts an embedded or linked OLE object as icon into the document.
901  /// Allows to specify icon file and caption. Detects OLE object type using file extension.
902  /// </summary>
903  /// <param name="fileName">Full path to the file.</param>
904  /// <param name="isLinked">
905  /// If true then linked OLE object is inserted otherwise embedded OLE object is inserted.
906  /// </param>
907  /// <param name="iconFile">
908  /// Full path to the ICO file. If the value is null, Aspose.Words will use a predefined image.
909  /// </param>
910  /// <param name="iconCaption">Icon caption.</param>
911  /// <returns>Shape node containing Ole object and inserted at the current Builder position.</returns>
912  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObjectAsIcon(System::String fileName, bool isLinked, System::String iconFile, System::String iconCaption);
913 
914  /// <summary>
915  /// Inserts an HTML string into the document.
916  /// </summary>
917  /// <remarks>
918  /// <para>You can use InsertHtml to insert an HTML fragment or whole HTML document.</para>
919  /// </remarks>
920  /// <param name="html">An HTML string to insert into the document.</param>
921  ASPOSE_WORDS_SHARED_API void InsertHtml(System::String html);
922 
923  /// <summary>
924  /// Inserts an HTML string into the document.
925  /// </summary>
926  /// <remarks>
927  /// <para>You can use InsertHtml to insert an HTML fragment or whole HTML document.</para>
928  /// </remarks>
929  /// <param name="html">An HTML string to insert into the document.</param>
930  /// <param name="useBuilderFormatting">
931  /// A value indicating whether formatting specified in <see cref="Aspose::Words::DocumentBuilder" />
932  /// is used as base formatting for text imported from HTML.
933  /// </param>
934  /// <remarks>
935  /// <para>
936  /// When <paramref name="useBuilderFormatting" /> is <c>false</c>,
937  /// <see cref="Aspose::Words::DocumentBuilder" /> formating is ignored and formatting of inserted text
938  /// is based on default HTML formatting. As a result, the text looks as it is rendered in browsers.
939  /// </para>
940  /// <para>
941  /// When <paramref name="useBuilderFormatting" /> is <c>true</c>,
942  /// formatting of inserted text is based on <see cref="Aspose::Words::DocumentBuilder" /> formatting,
943  /// and the text looks as if it were inserted with <see cref="Aspose::Words::DocumentBuilder::Write(System::String)" />.
944  /// </para>
945  /// </remarks>
946  ASPOSE_WORDS_SHARED_API void InsertHtml(System::String html, bool useBuilderFormatting);
947 
948  /// <summary>
949  /// Inserts inline shape with specified type and size.
950  /// </summary>
951  /// <param name="shapeType">The shape type to insert into the document.</param>
952  /// <param name="width">The width of the shape in points.</param>
953  /// <param name="height">The height of the shape in points.</param>
954  /// <returns>The shape node that was inserted.</returns>
955  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertShape(Aspose::Words::Drawing::ShapeType shapeType, double width, double height);
956 
957  /// <summary>
958  /// Inserts free-floating shape with specified position, size and text wrap type.
959  /// </summary>
960  /// <param name="shapeType">The shape type to insert into the document</param>
961  /// <param name="horzPos">Specifies where the horizontal distance to the shape is measured from.</param>
962  /// <param name="left">Distance in points from the origin to the left side of the shape.</param>
963  /// <param name="vertPos">Specifies where the vertical distance to the shape is measured from.</param>
964  /// <param name="top">Distance in points from the origin to the top side of the shape.</param>
965  /// <param name="width">The width of the shape in points.</param>
966  /// <param name="height">The width of the shape in points.</param>
967  /// <param name="wrapType">Specifies how to wrap text around the shape.</param>
968  /// <returns>The shape node that was inserted.</returns>
969  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertShape(Aspose::Words::Drawing::ShapeType shapeType, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
970 
971  /// <summary>
972  /// Inserts an chart object into the document and scales it to the specified size.
973  /// </summary>
974  /// <param name="chartType">The chart type to insert into the document.</param>
975  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
976  /// <remarks>
977  /// <para>You can change the image size, location, positioning method and other settings using the
978  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
979  /// </remarks>
980  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertChart(Aspose::Words::Drawing::Charts::ChartType chartType, double width, double height);
981 
982  /// <summary>
983  /// Inserts an chart object into the document and scales it to the specified size.
984  /// </summary>
985  /// <param name="chartType">The chart type to insert into the document.</param>
986  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
987  /// <remarks>
988  /// <para>You can change the image size, location, positioning method and other settings using the
989  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
990  /// </remarks>
991  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertChart(Aspose::Words::Drawing::Charts::ChartType chartType, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
992 
993  /// <summary>
994  /// Inserts an online video object into the document and scales it to the specified size.
995  /// </summary>
996  /// <param name="videoUrl">The URL to the video.</param>
997  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
998  /// <remarks>
999  /// <para>You can change the image size, location, positioning method and other settings using the
1000  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
1001  /// <para>Insertion of online video from the following resources is supported:</para>
1002  /// <list type="bullet">
1003  /// <item>
1004  /// <description>https://www.youtube.com/</description>
1005  /// </item>
1006  /// <item>
1007  /// <description>https://vimeo.com/</description>
1008  /// </item>
1009  /// </list>
1010  /// <para>If your online video is not displaying correctly, use <see cref="Aspose::Words::DocumentBuilder::InsertOnlineVideo(System::String, System::String, System::ArrayPtr&lt;uint8_t&gt;, double, double)" />, which accepts custom embedded html code.</para>
1011  /// <para>The code for embedding video can vary between providers, consult your corresponding provider of choice for details.</para>
1012  /// </remarks>
1013  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOnlineVideo(System::String videoUrl, double width, double height);
1014 
1015  /// <summary>
1016  /// Inserts an online video object into the document and scales it to the specified size.
1017  /// </summary>
1018  /// <param name="videoUrl">The URL to the video.</param>
1019  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
1020  /// <remarks>
1021  /// <para>You can change the image size, location, positioning method and other settings using the
1022  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
1023  /// <para>Insertion of online video from the following resources is supported:</para>
1024  /// <list type="bullet">
1025  /// <item>
1026  /// <description>https://www.youtube.com/</description>
1027  /// </item>
1028  /// <item>
1029  /// <description>https://vimeo.com/</description>
1030  /// </item>
1031  /// </list>
1032  /// <para>If your online video is not displaying correctly, use <see cref="Aspose::Words::DocumentBuilder::InsertOnlineVideo(System::String, System::String, System::ArrayPtr&lt;uint8_t&gt;, double, double)" />, which accepts custom embedded html code.</para>
1033  /// <para>The code for embedding video can vary between providers, consult your corresponding provider of choice for details.</para>
1034  /// </remarks>
1035  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOnlineVideo(System::String videoUrl, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
1036 
1037  /// <summary>
1038  /// Inserts an online video object into the document and scales it to the specified size.
1039  /// </summary>
1040  /// <param name="videoUrl">The URL to the video.</param>
1041  /// <param name="videoEmbedCode">The embed code for the video.</param>
1042  /// <param name="thumbnailImageBytes">The thumbnail image bytes.</param>
1043  /// <param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><returns>The image node that was just inserted.</returns>
1044  /// <remarks>
1045  /// <para>You can change the image size, location, positioning method and other settings using the
1046  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
1047  /// </remarks>
1048  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOnlineVideo(System::String videoUrl, System::String videoEmbedCode, System::ArrayPtr<uint8_t> thumbnailImageBytes, double width, double height);
1049 
1050  /// <summary>
1051  /// Inserts an online video object into the document and scales it to the specified size.
1052  /// </summary>
1053  /// <param name="videoUrl">The URL to the video.</param>
1054  /// <param name="videoEmbedCode">The embed code for the video.</param>
1055  /// <param name="thumbnailImageBytes">The thumbnail image bytes.</param>
1056  /// <param name="horzPos">Specifies where the distance to the image is measured from.</param><param name="left">Distance in points from the origin to the left side of the image.</param><param name="vertPos">Specifies where the distance to the image measured from.</param><param name="top">Distance in points from the origin to the top side of the image.</param><param name="width">The width of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="height">The height of the image in points. Can be a negative or zero value to request 100% scale.</param><param name="wrapType">Specifies how to wrap text around the image.</param><returns>The image node that was just inserted.</returns>
1057  /// <remarks>
1058  /// <para>You can change the image size, location, positioning method and other settings using the
1059  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
1060  /// </remarks>
1061  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOnlineVideo(System::String videoUrl, System::String videoEmbedCode, System::ArrayPtr<uint8_t> thumbnailImageBytes, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, double width, double height, Aspose::Words::Drawing::WrapType wrapType);
1062 
1063  /// <summary>
1064  /// Inserts a signature line at the current position.
1065  /// </summary>
1066  /// <param name="signatureLineOptions">The object that stores parameters of creating signature line.</param>
1067  /// <returns>The signature line node that was just inserted.</returns>
1068  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertSignatureLine(System::SharedPtr<Aspose::Words::SignatureLineOptions> signatureLineOptions);
1069 
1070  /// <summary>
1071  /// Inserts a signature line at the specified position.
1072  /// </summary>
1073  /// <param name="signatureLineOptions">The object that stores parameters of creating signature line.</param>
1074  /// <param name="horzPos">Specifies where the distance to the signature line is measured from.</param>
1075  /// <param name="left">Distance in points from the origin to the left side of the signature line.</param>
1076  /// <param name="vertPos">Specifies where the distance to the signature line measured from.</param>
1077  /// <param name="top">Distance in points from the origin to the top side of the signature line.</param>
1078  /// <param name="wrapType">Specifies how to wrap text around the signature line.</param>
1079  /// <returns>The signature line node that was just inserted.</returns>
1080  /// <remarks>
1081  /// <para>You can change the image size, location, positioning method and other settings using the
1082  /// <see cref="Aspose::Words::Drawing::Shape" /> object returned by this method.</para>
1083  ///
1084  /// </remarks>
1085  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertSignatureLine(System::SharedPtr<Aspose::Words::SignatureLineOptions> signatureLineOptions, Aspose::Words::Drawing::RelativeHorizontalPosition horzPos, double left, Aspose::Words::Drawing::RelativeVerticalPosition vertPos, double top, Aspose::Words::Drawing::WrapType wrapType);
1086 
1087  /// <summary>
1088  /// Inserts a horizontal rule shape into the document.
1089  /// </summary>
1090  /// <returns>The shape that is a horizontal rule.</returns>
1091  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Drawing::Shape> InsertHorizontalRule();
1092 
1093  /// <summary>
1094  /// Inserts a table cell into the document.
1095  /// </summary>
1096  /// <remarks>
1097  /// <para>To start a table, just call <b>InsertCell</b>. After this, any content you add using
1098  /// other methods of the <see cref="Aspose::Words::DocumentBuilder" /> class will be added to the current cell.</para>
1099  /// <para>To start a new cell in the same row, call <b>InsertCell</b> again.</para>
1100  /// <para>To end a table row call <see cref="Aspose::Words::DocumentBuilder::EndRow" />.</para>
1101  /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_CellFormat" /> property to specify cell formatting.</para>
1102  /// </remarks>
1103  /// <returns>The cell node that was just inserted.</returns>
1104  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::Cell> InsertCell();
1105 
1106  /// <summary>
1107  /// Starts a table in the document.
1108  /// </summary>
1109  /// <remarks>
1110  /// <para>The next method to call is <see cref="Aspose::Words::DocumentBuilder::InsertCell" />.</para>
1111  /// <para>This method starts a nested table when called inside a cell.</para>
1112  /// </remarks>
1113  /// <returns>The table node that was just created.</returns>
1114  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::Table> StartTable();
1115 
1116  /// <summary>
1117  /// Ends a table in the document.
1118  /// </summary>
1119  /// <remarks>
1120  /// <para>This method should be called only once after <see cref="Aspose::Words::DocumentBuilder::EndRow" /> was called. When called,
1121  /// <b>EndTable</b> moves the cursor out of the current cell to point just after the table.</para>
1122  /// </remarks>
1123  /// <returns>The table node that was just finished.</returns>
1124  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::Table> EndTable();
1125 
1126  /// <summary>
1127  /// Ends a table row in the document.
1128  /// </summary>
1129  /// <remarks>
1130  /// <para>Call <b>EndRow</b> to end a table row. If you call <see cref="Aspose::Words::DocumentBuilder::InsertCell" /> immediately
1131  /// after that, then the table continues on a new row.</para>
1132  /// <para>Use the <see cref="Aspose::Words::DocumentBuilder::get_RowFormat" /> property to specify row formatting.</para>
1133  /// </remarks>
1134  /// <returns>The row node that was just finished.</returns>
1135  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Tables::Row> EndRow();
1136 
1137  /// <summary>
1138  /// Marks the current position in the document as a bookmark start.
1139  /// </summary>
1140  /// <remarks>
1141  /// <para>Bookmarks in a document can overlap and span any range. To create a valid bookmark you need to
1142  /// call both <see cref="Aspose::Words::DocumentBuilder::StartBookmark(System::String)" /> and <see cref="Aspose::Words::DocumentBuilder::EndBookmark(System::String)" /> with the same <b>bookmarkName</b>
1143  /// parameter.</para>
1144  /// <para>Badly formed bookmarks or bookmarks with duplicate names will be ignored when the document is saved.</para>
1145  /// </remarks>
1146  /// <param name="bookmarkName">Name of the bookmark.</param>
1147  /// <returns>The bookmark start node that was just created.</returns>
1148  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::BookmarkStart> StartBookmark(System::String bookmarkName);
1149 
1150  /// <summary>
1151  /// Marks the current position in the document as a bookmark end.
1152  /// </summary>
1153  /// <remarks>
1154  /// <para>Bookmarks in a document can overlap and span any range. To create a valid bookmark you need to
1155  /// call both <see cref="Aspose::Words::DocumentBuilder::StartBookmark(System::String)" /> and <see cref="Aspose::Words::DocumentBuilder::EndBookmark(System::String)" /> with the same <b>bookmarkName</b>
1156  /// parameter.</para>
1157  /// <para>Badly formed bookmarks or bookmarks with duplicate names will be ignored when the document is saved.</para>
1158  /// </remarks>
1159  /// <param name="bookmarkName">Name of the bookmark.</param>
1160  /// <returns>The bookmark end node that was just created.</returns>
1161  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::BookmarkEnd> EndBookmark(System::String bookmarkName);
1162 
1163  /// <summary>
1164  /// Marks the current position in the document as an editable range start.
1165  /// </summary>
1166  /// <remarks>
1167  /// <para>Editable range in a document can overlap and span any range. To create a valid editable range you need to
1168  /// call both <see cref="Aspose::Words::DocumentBuilder::StartEditableRange" /> and <see cref="Aspose::Words::DocumentBuilder::EndEditableRange" />
1169  /// or <see cref="Aspose::Words::DocumentBuilder::EndEditableRange(System::SharedPtr&lt;Aspose::Words::EditableRangeStart&gt;)" /> methods.</para>
1170  /// <para>Badly formed editable range will be ignored when the document is saved.</para>
1171  /// </remarks>
1172  /// <returns>The editable range start node that was just created.</returns>
1173  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::EditableRangeStart> StartEditableRange();
1174 
1175  /// <summary>
1176  /// Marks the current position in the document as an editable range end.
1177  /// </summary>
1178  /// <remarks>
1179  /// <para>Editable range in a document can overlap and span any range. To create a valid editable range you need to
1180  /// call both <see cref="Aspose::Words::DocumentBuilder::StartEditableRange" /> and <see cref="Aspose::Words::DocumentBuilder::EndEditableRange" />
1181  /// or <see cref="Aspose::Words::DocumentBuilder::EndEditableRange(System::SharedPtr&lt;Aspose::Words::EditableRangeStart&gt;)" /> methods.</para>
1182  /// <para>Badly formed editable range will be ignored when the document is saved.</para>
1183  /// </remarks>
1184  /// <returns>The editable range end node that was just created.</returns>
1185  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::EditableRangeEnd> EndEditableRange();
1186 
1187  /// <summary>
1188  /// Marks the current position in the document as an editable range end.
1189  /// </summary>
1190  /// <remarks>
1191  /// <para>Use this overload during creating nested editable ranges.</para>
1192  /// <para>Editable range in a document can overlap and span any range. To create a valid editable range you need to
1193  /// call both <see cref="Aspose::Words::DocumentBuilder::StartEditableRange" /> and <see cref="Aspose::Words::DocumentBuilder::EndEditableRange" />
1194  /// or <see cref="Aspose::Words::DocumentBuilder::EndEditableRange(System::SharedPtr&lt;Aspose::Words::EditableRangeStart&gt;)" /> methods.</para>
1195  /// <para>Badly formed editable range will be ignored when the document is saved.</para>
1196  /// </remarks>
1197  /// <param name="start">This editable range start.</param>
1198  /// <returns>The editable range end node that was just created.</returns>
1199  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::EditableRangeEnd> EndEditableRange(System::SharedPtr<Aspose::Words::EditableRangeStart> start);
1200 
1201  /// <summary>
1202  /// Inserts a document at the cursor position.
1203  /// </summary>
1204  /// <remarks>
1205  /// This method mimics the MS Word behavior, as if CTRL+'A' (select all content) was pressed,
1206  /// then CTRL+'C' (copy selected into the buffer) inside one document
1207  /// and then CTRL+'V' (insert content from the buffer) inside another document.
1208  /// </remarks>
1209  /// <param name="srcDoc">Source document for inserting.</param>
1210  /// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
1211  /// <returns>First node of the inserted content.</returns>
1212  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> InsertDocument(System::SharedPtr<Aspose::Words::Document> srcDoc, Aspose::Words::ImportFormatMode importFormatMode);
1213 
1214  /// <summary>
1215  /// Inserts a document at the cursor position.
1216  /// </summary>
1217  /// <remarks>
1218  /// This method mimics the MS Word behavior, as if CTRL+'A' (select all content) was pressed,
1219  /// then CTRL+'C' (copy selected into the buffer) inside one document
1220  /// and then CTRL+'V' (insert content from the buffer) inside another document.
1221  /// </remarks>
1222  /// <param name="srcDoc">Source document for inserting.</param>
1223  /// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
1224  /// <param name="importFormatOptions">Allows to specify options that affect formatting of a result document.</param>
1225  /// <returns>First node of the inserted content.</returns>
1226  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> InsertDocument(System::SharedPtr<Aspose::Words::Document> srcDoc, Aspose::Words::ImportFormatMode importFormatMode, System::SharedPtr<Aspose::Words::ImportFormatOptions> importFormatOptions);
1227 
1228  /// <summary>
1229  /// Saves current character formatting onto the stack.
1230  /// </summary>
1231  /// <remarks>
1232  /// <seealso cref="Aspose::Words::DocumentBuilder::get_Font" />
1233  /// <seealso cref="Aspose::Words::DocumentBuilder::PopFont" />
1234  /// </remarks>
1235  ASPOSE_WORDS_SHARED_API void PushFont();
1236 
1237  /// <summary>
1238  /// Retrieves character formatting previously saved on the stack.
1239  /// </summary>
1240  /// <remarks>
1241  /// <seealso cref="Aspose::Words::DocumentBuilder::get_Font" />
1242  /// <seealso cref="Aspose::Words::DocumentBuilder::PushFont" />
1243  /// </remarks>
1244  ASPOSE_WORDS_SHARED_API void PopFont();
1245 
1246  /// <summary>
1247  /// Inserts a text level node inside the current paragraph before the cursor.
1248  /// </summary>
1249  ASPOSE_WORDS_SHARED_API void InsertNode(System::SharedPtr<Aspose::Words::Node> node);
1250  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> GetDirectRunAttr(int32_t fontAttr);
1251  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedRunAttr(int32_t fontAttr);
1252  ASPOSE_WORDS_SHARED_API void SetRunAttr(int32_t fontAttr, System::SharedPtr<System::Object> value);
1253  ASPOSE_WORDS_SHARED_API void RemoveRunAttr(int32_t key);
1254  ASPOSE_WORDS_SHARED_API void ClearRunAttrs();
1255  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> GetDirectRowAttr(int32_t key);
1256  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchRowAttr(int32_t key);
1257  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedRowAttr(int32_t key);
1258  ASPOSE_WORDS_SHARED_API void SetRowAttr(int32_t key, System::SharedPtr<System::Object> value);
1259  ASPOSE_WORDS_SHARED_API void ClearRowAttrs();
1260  ASPOSE_WORDS_SHARED_API void ResetToDefaultAttrs();
1261  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> GetDirectCellAttr(int32_t key);
1262  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchCellAttr(int32_t key);
1263  ASPOSE_WORDS_SHARED_API System::SharedPtr<System::Object> FetchInheritedCellAttr(int32_t key);
1264  ASPOSE_WORDS_SHARED_API void SetCellAttr(int32_t key, System::SharedPtr<System::Object> value);
1265  ASPOSE_WORDS_SHARED_API void ClearCellAttrs();
1266 
1267 protected:
1268 
1269  bool get_IsInGroupShape();
1270  Aspose::Words::ParagraphBreakCharReplacement get_ParagraphBreakCharReplacement() const;
1271  void set_ParagraphBreakCharReplacement(Aspose::Words::ParagraphBreakCharReplacement value);
1272 
1273  void MoveTo(System::SharedPtr<Aspose::Words::Paragraph> para, int32_t charIdx);
1274  void MoveTo(System::SharedPtr<Aspose::Words::Paragraph> para, System::SharedPtr<Aspose::Words::Node> inline_);
1275  System::SharedPtr<Aspose::Words::Paragraph> InsertParagraphAsWord();
1276  void InsertBreakCore(Aspose::Words::BreakType breakType, bool throwOnError);
1277  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertHtmlOleControl(System::SharedPtr<Aspose::Words::Drawing::Ole::Core::HtmlOleControl> htmlOleControl, System::SharedPtr<System::Drawing::Image> presentation);
1278  void InsertHtml(System::String html, System::SharedPtr<Aspose::Words::HtmlInsertionOptions> options);
1279  void InsertBeforeCurPara(System::SharedPtr<Aspose::Words::Node> node);
1280  void PushRunPr();
1281  void PopRunPr();
1282  Aspose::Words::Fields::FieldBundle StartHyperlink(System::String urlOrBookmark, bool isBookmark, System::String target, System::String screenTip);
1283  Aspose::Words::Fields::FieldBundle StartHyperlink(System::String href, System::String target, System::String screenTip);
1284  System::SharedPtr<Aspose::Words::Fields::FieldEnd> EndHyperlink();
1285  System::SharedPtr<Aspose::Words::RunPr> GetRunPrCopy();
1286  System::SharedPtr<Aspose::Words::ParaPr> GetParaPrCopy();
1287  System::SharedPtr<Aspose::Words::Tables::TablePr> GetTablePrCopy();
1288  System::SharedPtr<Aspose::Words::Tables::CellPr> GetCellPrCopy();
1289  void InsertSection(Aspose::Words::SectionStart sectionStart);
1290  void InsertSectionCore(Aspose::Words::SectionStart sectionStart);
1291  System::SharedPtr<Aspose::Words::Fields::FieldStart> InsertFieldStart(Aspose::Words::Fields::FieldType fieldType);
1292  System::SharedPtr<Aspose::Words::Run> InsertFieldCode(System::String fieldCode);
1293  System::SharedPtr<Aspose::Words::Fields::FieldEnd> InsertFieldEnd(Aspose::Words::Fields::FieldType fieldType, bool hasSeparator);
1294  System::SharedPtr<Aspose::Words::Fields::FieldSeparator> InsertFieldSeparator(Aspose::Words::Fields::FieldType fieldType);
1295  void SetFont(System::SharedPtr<Aspose::Words::RunPr> runPr, bool isNeedClone);
1296  void ClearFont();
1297  void SaveCurCellFormatting();
1298 
1299  virtual ASPOSE_WORDS_SHARED_API ~DocumentBuilder();
1300 
1301  ASPOSE_WORDS_SHARED_API System::Object::shared_members_type GetSharedMembers() override;
1302 
1303 private:
1304 
1305  System::SharedPtr<Aspose::Words::TableBuilder> get_CurTableBuilder();
1306  System::SharedPtr<Aspose::Words::Tables::Cell> get_CurrentCell();
1307  System::SharedPtr<System::Collections::Generic::Stack<System::SharedPtr<Aspose::Words::RunPr>>> get_RunPrStack();
1308  System::SharedPtr<System::Collections::Generic::Stack<System::SharedPtr<Aspose::Words::DocumentBuilder::FontPr>>> get_FontPrs();
1309  System::SharedPtr<Aspose::Words::Node> get_Cursor();
1310  void set_Cursor(System::SharedPtr<Aspose::Words::Node> value);
1311  System::SharedPtr<Aspose::Words::Tables::TablePr> get_TablePr();
1312  System::SharedPtr<Aspose::Words::Tables::CellPr> get_CellPr();
1313 
1314  System::SharedPtr<Aspose::Words::Document> mDoc;
1315  System::SharedPtr<Aspose::Words::Node> mCursor;
1316  System::SharedPtr<Aspose::Words::Node> mCursorParentBackup;
1317  System::SharedPtr<Aspose::Words::RunPr> mRunPr;
1318  System::SharedPtr<Aspose::Words::Font> mFont;
1319  System::SharedPtr<System::Collections::Generic::Stack<System::SharedPtr<Aspose::Words::RunPr>>> mRunPrStack;
1320  System::SharedPtr<System::Collections::Generic::Stack<System::SharedPtr<Aspose::Words::DocumentBuilder::FontPr>>> mFontPrs;
1321  System::SharedPtr<Aspose::Words::Tables::TablePr> mTablePr;
1322  System::SharedPtr<Aspose::Words::Tables::CellPr> mCellPr;
1323  System::SharedPtr<Aspose::Words::Tables::RowFormat> mRowFormat;
1324  System::SharedPtr<Aspose::Words::Tables::CellFormat> mCellFormat;
1325  System::SharedPtr<System::Collections::Generic::Stack<System::SharedPtr<Aspose::Words::TableBuilder>>> mTableBuilders;
1326  Aspose::Words::ParagraphBreakCharReplacement mParagraphBreakCharReplacement;
1327  int32_t mLastEditableRangeId;
1328  static const int32_t Uninitialized;
1329 
1330  void MoveTo(int32_t sectionIdx, Aspose::Words::StoryType storyType, int32_t paraIdx, int32_t charIdx);
1331  void MoveTo(System::SharedPtr<Aspose::Words::Section> section, Aspose::Words::StoryType storyType, int32_t paraIdx, int32_t charIdx);
1332  void MoveTo(System::SharedPtr<Aspose::Words::Story> story, int32_t paraIdx, int32_t charIdx);
1333  bool MoveToField(System::SharedPtr<Aspose::Words::Fields::Field> field, bool isAfter, bool isDeleteField);
1334  bool AttachFontToInline();
1335  void AttachFontToParagraph();
1336  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleImage(System::SharedPtr<System::Drawing::Image> image);
1337  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleImage(System::ArrayPtr<uint8_t> imageBytes);
1338  bool IsStripFormatting();
1339  static System::String StripControlChars(System::String plaintext);
1340  void WriteCore(System::String text, bool isWriteln);
1341  System::SharedPtr<Aspose::Words::Run> InsertRun(System::String text);
1342  System::SharedPtr<Aspose::Words::Fields::FormField> InsertFormFieldNode(System::SharedPtr<Aspose::Words::Node> insertBefore);
1343  bool CheckCanSeriousBreak(bool throwOnError);
1344  System::SharedPtr<Aspose::Words::Tables::Row> FetchRow(int32_t tableIndex, int32_t rowIndex);
1345  void InsertBidiAwareRun(System::String text);
1346  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleImage(System::SharedPtr<System::Drawing::Image> presentation, bool asIcon, System::SharedPtr<Aspose::Words::RW::Ole::OleRegistryInfo> oleInfo);
1347  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObject(System::String fileName, bool isLinked, bool asIcon, System::SharedPtr<System::Drawing::Image> presentation, System::SharedPtr<Aspose::Words::RW::Ole::OleRegistryInfo> oleInfo);
1348  System::SharedPtr<Aspose::Words::Drawing::Shape> InsertOleObjectCore(System::String fileName, bool isLinked, System::SharedPtr<Aspose::Words::Drawing::Shape> insertedOleImage, System::String progId, System::SharedPtr<Aspose::Words::Drawing::Core::OleObject> oleObject);
1349  bool IsNeedBidiExplicitly(System::String text);
1350 
1351 };
1352 
1353 }
1354 }
#define ASPOSE_WORDS_SHARED_RTTI_INFO_DECL()
Definition: aspose_words_api_defs.h:13
#define RTTI_INFO_DECL()
Definition: reflection_seprt.h:81
#define ASPOSE_WORDS_SHARED_API
Definition: aspose_words_api_defs.h:11