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