FieldMergeField.h
1 // Copyright 2001-2021 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.
9 #pragma once
10 
11 #include <system/array.h>
12 #include <cstdint>
13 
14 #include <Aspose.Words.Cpp/Fields/FieldType.h>
15 #include <Aspose.Words.Cpp/Fields/IFieldCodeTokenInfoProvider.h>
16 #include <Aspose.Words.Cpp/Fields/Field.h>
17 #include <Aspose.Words.Cpp/aspose_words_api_defs.h>
18 
19 namespace Aspose { namespace Words { namespace Fields { class FieldStart; } } }
20 namespace Aspose { namespace Words { namespace Fields { class FieldSeparator; } } }
21 namespace Aspose { namespace Words { namespace Fields { class FieldEnd; } } }
22 
23 namespace Aspose { namespace Words { namespace Fields { class FieldUpdateAction; } } }
24 
25 namespace System { namespace IO { class Stream; } }
26 
27 namespace Aspose { namespace Bidi { class IBidiParagraphLevelOverride; } }
28 namespace Aspose { namespace Words { namespace Fields { enum class FieldSwitchType; } } }
29 
30 namespace Aspose {
31 
32 namespace Words {
33 
34 namespace Fields {
35 
37 class ASPOSE_WORDS_SHARED_CLASS FieldMergeField : public Aspose::Words::Fields::Field, public Aspose::Words::Fields::IFieldCodeTokenInfoProvider
38 {
39  typedef FieldMergeField ThisType;
41  typedef Aspose::Words::Fields::IFieldCodeTokenInfoProvider BaseType1;
42 
43  typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
44  ASPOSE_WORDS_SHARED_RTTI_INFO_DECL();
45 
46 protected:
47 
49  enum class MergeFieldType
50  {
51  Common,
52  Image,
53  Barcode,
54  RegionStart,
55  RegionEnd
56  };
57 
58 public:
59 
61  ASPOSE_WORDS_SHARED_API Aspose::Words::Fields::FieldType get_Type() override;
62 
64  ASPOSE_WORDS_SHARED_API System::String get_FieldNameNoPrefix() const;
65 
67  ASPOSE_WORDS_SHARED_API System::String get_FieldName();
68 
70  ASPOSE_WORDS_SHARED_API void set_FieldName(const System::String& value);
71 
73  ASPOSE_WORDS_SHARED_API System::String get_TextBefore();
74 
76  ASPOSE_WORDS_SHARED_API void set_TextBefore(const System::String& value);
77 
79  ASPOSE_WORDS_SHARED_API System::String get_TextAfter();
80 
82  ASPOSE_WORDS_SHARED_API void set_TextAfter(const System::String& value);
83 
85  ASPOSE_WORDS_SHARED_API bool get_IsMapped();
86 
88  ASPOSE_WORDS_SHARED_API void set_IsMapped(bool value);
89 
91  ASPOSE_WORDS_SHARED_API bool get_IsVerticalFormatting();
92 
94  ASPOSE_WORDS_SHARED_API void set_IsVerticalFormatting(bool value);
95 
96 protected:
97 
99  ASPOSE_WORDS_SHARED_API void ParseFieldCode() override;
100 
101  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Fields::FieldUpdateAction> UpdateCore() override;
102  ASPOSE_WORDS_SHARED_API void EndUpdate() override;
103  ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Bidi::IBidiParagraphLevelOverride> GetBidiParagraphLevelOverride() override;
104 
105  virtual ASPOSE_WORDS_SHARED_API ~FieldMergeField();
106 
107 private:
108 
109  System::String mField90;
110 
111  System::String mField91;
112 
113  __TypeStub<1,1,1,1>::type mField92;
114  __TypeStub<4,4,4,4>::type mField93;
117 
118  Aspose::Words::Fields::FieldSwitchType GetSwitchType(System::String ) override;
119 
120 private:
121 
122 };
123 
124 }
125 }
126 }