Represents a collection of a paragraphs. More...

Inherits Aspose::Slides::IParagraphCollection, Aspose::Slides::Patterns::IObserver, and Aspose::Slides::IDOMObject.

Public Member Functions

int32_t get_Count ()
 Gets the number of elements actually contained in the collection. Read-only int32_t. More...
 
bool get_IsReadOnly ()
 Gets a value indicating whether the T:System::Collections::Generic::ICollection`1 is read-only. Read-only bool. More...
 
System::SharedPtr< IDOMObjectget_Parent_Immediate ()
 Returns Parent_Immediate object. Read-only IDOMObject. More...
 
System::SharedPtr< IPresentationget_Presentation ()
 Returns the parent presentation of a paragraphs collection. Read-only IPresentation. More...
 
System::SharedPtr< IParagraphidx_get (int32_t index)
 Gets the element at the specified index. More...
 
void Add (System::SharedPtr< IParagraph > value)
 Adds a Paragraph to the end of collection. More...
 
int32_t Add (System::SharedPtr< IParagraphCollection > value)
 Adds a content of ParagraphCollection to the end of collection. More...
 
int32_t IndexOf (System::SharedPtr< IParagraph > item)
 Determines the index of a specific item in the T:System::Collections::Generic::IList`1. More...
 
void Insert (int32_t index, System::SharedPtr< IParagraph > value)
 Inserts a Paragraph into the collection at the specified index. More...
 
void Insert (int32_t index, System::SharedPtr< IParagraphCollection > value)
 Inserts a content of ParagraphCollection into the collection at the specified index. More...
 
void Clear ()
 Removes all elements from the collection. More...
 
bool Contains (System::SharedPtr< IParagraph > item)
 Determines whether the T:System::Collections::Generic::ICollection`1 contains a specific value. More...
 
void CopyTo (System::ArrayPtr< System::SharedPtr< IParagraph >> array, int32_t arrayIndex)
 Copies the elements of the T:System::Collections::Generic::ICollection`1 to an System::Array, starting at a particular System::Array index. More...
 
void RemoveAt (int32_t index)
 Removes the element at the specified index of the collection. More...
 
bool Remove (System::SharedPtr< IParagraph > item)
 Removes the first occurrence of a specific object from the T:System::Collections::Generic::ICollection`1. More...
 
System::SharedPtr< System::Collections::Generic::IEnumerator< System::SharedPtr< IParagraph > > > GetEnumerator ()
 Returns an enumerator that iterates through the collection. More...
 
void Notify (System::SharedPtr< System::Object > sender)
 
void AddFromHtml (System::String text)
 Adds text from specified html string to the collection. More...
 
void AddFromHtml (System::String text, System::SharedPtr< Import::IExternalResourceResolver > resolver, System::String uri)
 Adds text from specified html string to the collection. More...
 
System::String ExportToHtml (int32_t firstParagraphIndex, int32_t paragraphsCount, System::SharedPtr< Export::ITextToHtmlConversionOptions > options)
 Converts specifying paragraphs to the HTML and returns it as String object. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Protected Member Functions

System::SharedPtr< TextFrameget_ParentTextFrame ()
 
uint32_t get_Version_OldMode ()
 Used to check if the Paragraphs object has been changed from the last checkout More...
 
System::String get_Text ()
 
void set_Text (System::String value)
 
System::SharedPtr< IBaseSlideget_Slide ()
 Returns the base slide. Read-only IBaseSlide. More...
 
System::SharedPtr< IParagraphAdd ()
 Adds a new empty Paragraph to the end of collection. More...
 
int32_t GetParagraphIndex (System::SharedPtr< Paragraph > paragraph)
 Return index of the paragraph in the collection. More...
 
void Changed_OldMode ()
 
void ParagraphChanged_OldMode (System::SharedPtr< Paragraph > whichParagraph)
 
 ParagraphCollection (System::SharedPtr< TextFrame > parentImmediate)
 

Protected Attributes

System::EventHandler< System::SharedPtr< ParagraphEventArgs > > ParagraphRemoved
 This event is fired when a paragraph is just about to be removed from the collection. More...
 

Static Protected Attributes

static System::ArrayPtr< char16_t > NewLineChars
 

Additional Inherited Members

- Public Types inherited from System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Slides::IParagraph > >
typedef IEnumerator< System::SharedPtr< Aspose::Slides::IParagraph > > IEnumeratorType
 Enumerator type. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Detailed Description

Represents a collection of a paragraphs.

Constructor & Destructor Documentation

◆ ParagraphCollection()

Aspose::Slides::ParagraphCollection::ParagraphCollection ( System::SharedPtr< TextFrame parentImmediate)
protected

Member Function Documentation

◆ Add() [1/3]

void Aspose::Slides::ParagraphCollection::Add ( System::SharedPtr< IParagraph value)
virtual

Adds a Paragraph to the end of collection.

Parameters
valueThe Paragraph to be added to the end of the collection.

Implements Aspose::Slides::IParagraphCollection.

◆ Add() [2/3]

int32_t Aspose::Slides::ParagraphCollection::Add ( System::SharedPtr< IParagraphCollection value)
virtual

Adds a content of ParagraphCollection to the end of collection.

Parameters
valueThe ParagraphCollection to be added to the end of the collection.
Returns
The index at which the Paragraph has been added or -1 if there are nothing to add.

Implements Aspose::Slides::IParagraphCollection.

◆ Add() [3/3]

System::SharedPtr<IParagraph> Aspose::Slides::ParagraphCollection::Add ( )
protected

Adds a new empty Paragraph to the end of collection.

Returns
The new Paragraph which has been added.

◆ AddFromHtml() [1/2]

void Aspose::Slides::ParagraphCollection::AddFromHtml ( System::String  text)
virtual

Adds text from specified html string to the collection.

Parameters
textHTML text.

Implements Aspose::Slides::IParagraphCollection.

◆ AddFromHtml() [2/2]

void Aspose::Slides::ParagraphCollection::AddFromHtml ( System::String  text,
System::SharedPtr< Import::IExternalResourceResolver resolver,
System::String  uri 
)
virtual

Adds text from specified html string to the collection.

Parameters
textHTML text.
resolverResolver callback object which resolves URIs and fetches referrenced objects.
uriURI for adding HTML document. Used for resolving relative links.

Specifying resolver can potentially introduce a vulnurability. Use with caution.

Implements Aspose::Slides::IParagraphCollection.

◆ Changed_OldMode()

void Aspose::Slides::ParagraphCollection::Changed_OldMode ( )
protected

◆ Clear()

void Aspose::Slides::ParagraphCollection::Clear ( )
virtual

Removes all elements from the collection.

Implements Aspose::Slides::IParagraphCollection.

◆ Contains()

bool Aspose::Slides::ParagraphCollection::Contains ( System::SharedPtr< IParagraph item)

Determines whether the T:System::Collections::Generic::ICollection`1 contains a specific value.

Returns
true if item is found in the T:System::Collections::Generic::ICollection`1; otherwise, false.
Parameters
itemThe object to locate in the T:System::Collections::Generic::ICollection`1.

◆ CopyTo()

void Aspose::Slides::ParagraphCollection::CopyTo ( System::ArrayPtr< System::SharedPtr< IParagraph >>  array,
int32_t  arrayIndex 
)

Copies the elements of the T:System::Collections::Generic::ICollection`1 to an System::Array, starting at a particular System::Array index.

Parameters
arrayThe one-dimensional System::Array that is the destination of the elements copied from T:System::Collections::Generic::ICollection`1. The System::Array must have zero-based indexing.
arrayIndexThe zero-based index in array at which copying begins.
Exceptions
System::ArgumentNullExceptionarray is null.
System::ArgumentOutOfRangeExceptionarrayIndex is less than 0.
System::ArgumentExceptionThe number of elements in the source T:System::Collections::Generic::ICollection`1 is greater than the available space from arrayIndex to the end of the destination array .

◆ ExportToHtml()

System::String Aspose::Slides::ParagraphCollection::ExportToHtml ( int32_t  firstParagraphIndex,
int32_t  paragraphsCount,
System::SharedPtr< Export::ITextToHtmlConversionOptions options 
)
virtual

Converts specifying paragraphs to the HTML and returns it as String object.

Parameters
firstParagraphIndex
paragraphsCount
options
Returns
Generated HTML.

Implements Aspose::Slides::IParagraphCollection.

◆ get_Count()

int32_t Aspose::Slides::ParagraphCollection::get_Count ( )
virtual

Gets the number of elements actually contained in the collection. Read-only int32_t.

Implements Aspose::Slides::IParagraphCollection.

◆ get_IsReadOnly()

bool Aspose::Slides::ParagraphCollection::get_IsReadOnly ( )

Gets a value indicating whether the T:System::Collections::Generic::ICollection`1 is read-only. Read-only bool.

Returns
true if the T:System::Collections::Generic::ICollection`1 is read-only; otherwise, false.

◆ get_Parent_Immediate()

System::SharedPtr<IDOMObject> Aspose::Slides::ParagraphCollection::get_Parent_Immediate ( )
virtual

Returns Parent_Immediate object. Read-only IDOMObject.

Implements Aspose::Slides::IDOMObject.

◆ get_ParentTextFrame()

System::SharedPtr<TextFrame> Aspose::Slides::ParagraphCollection::get_ParentTextFrame ( )
protected

◆ get_Presentation()

System::SharedPtr<IPresentation> Aspose::Slides::ParagraphCollection::get_Presentation ( )
virtual

Returns the parent presentation of a paragraphs collection. Read-only IPresentation.

Implements Aspose::Slides::IPresentationComponent.

◆ get_Slide()

System::SharedPtr<IBaseSlide> Aspose::Slides::ParagraphCollection::get_Slide ( )
protectedvirtual

Returns the base slide. Read-only IBaseSlide.

Implements Aspose::Slides::ISlideComponent.

◆ get_Text()

System::String Aspose::Slides::ParagraphCollection::get_Text ( )
protected

◆ get_Version_OldMode()

uint32_t Aspose::Slides::ParagraphCollection::get_Version_OldMode ( )
protected

Used to check if the Paragraphs object has been changed from the last checkout

◆ GetEnumerator()

System::SharedPtr<System::Collections::Generic::IEnumerator<System::SharedPtr<IParagraph> > > Aspose::Slides::ParagraphCollection::GetEnumerator ( )
virtual

Returns an enumerator that iterates through the collection.

Returns
A T:System::Collections::Generic::IEnumerator`1 that can be used to iterate through the collection.

Implements System::Collections::Generic::IEnumerable< System::SharedPtr< Aspose::Slides::IParagraph > >.

◆ GetParagraphIndex()

int32_t Aspose::Slides::ParagraphCollection::GetParagraphIndex ( System::SharedPtr< Paragraph paragraph)
protected

Return index of the paragraph in the collection.

Parameters
paragraphThe paragraph to serach for.
Returns
Index of the paragraph in the collection or -1 if the paragraph is not contained in the collection.

◆ idx_get()

System::SharedPtr<IParagraph> Aspose::Slides::ParagraphCollection::idx_get ( int32_t  index)
virtual

Gets the element at the specified index.

Implements Aspose::Slides::IParagraphCollection.

◆ IndexOf()

int32_t Aspose::Slides::ParagraphCollection::IndexOf ( System::SharedPtr< IParagraph item)

Determines the index of a specific item in the T:System::Collections::Generic::IList`1.

Returns
The index of item if found in the list; otherwise, -1.
Parameters
itemThe object to locate in the T:System::Collections::Generic::IList`1.

◆ Insert() [1/2]

void Aspose::Slides::ParagraphCollection::Insert ( int32_t  index,
System::SharedPtr< IParagraph value 
)
virtual

Inserts a Paragraph into the collection at the specified index.

Parameters
indexThe zero-based index at which Paragraph should be inserted.
valueThe Paragraph to insert.

Implements Aspose::Slides::IParagraphCollection.

◆ Insert() [2/2]

void Aspose::Slides::ParagraphCollection::Insert ( int32_t  index,
System::SharedPtr< IParagraphCollection value 
)
virtual

Inserts a content of ParagraphCollection into the collection at the specified index.

Parameters
indexThe zero-based index at which paragraphs should be inserted.
valueThe paragraphs to insert.

Implements Aspose::Slides::IParagraphCollection.

◆ Notify()

void Aspose::Slides::ParagraphCollection::Notify ( System::SharedPtr< System::Object sender)
virtual

◆ ParagraphChanged_OldMode()

void Aspose::Slides::ParagraphCollection::ParagraphChanged_OldMode ( System::SharedPtr< Paragraph whichParagraph)
protected

◆ Remove()

bool Aspose::Slides::ParagraphCollection::Remove ( System::SharedPtr< IParagraph item)
virtual

Removes the first occurrence of a specific object from the T:System::Collections::Generic::ICollection`1.

Returns
true if item was successfully removed from the T:System::Collections::Generic::ICollection`1; otherwise, false. This method also returns false if item is not found in the original T:System::Collections::Generic::ICollection`1.
Parameters
itemThe object to remove from the T:System::Collections::Generic::ICollection`1.
Exceptions
System::NotSupportedExceptionThe T:System::Collections::Generic::ICollection`1 is read-only.

Implements Aspose::Slides::IParagraphCollection.

◆ RemoveAt()

void Aspose::Slides::ParagraphCollection::RemoveAt ( int32_t  index)
virtual

Removes the element at the specified index of the collection.

Parameters
indexThe zero-based index of the element to remove.

Implements Aspose::Slides::IParagraphCollection.

◆ set_Text()

void Aspose::Slides::ParagraphCollection::set_Text ( System::String  value)
protected

Member Data Documentation

◆ NewLineChars

System::ArrayPtr<char16_t> Aspose::Slides::ParagraphCollection::NewLineChars
staticprotected

◆ ParagraphRemoved

System::EventHandler<System::SharedPtr<ParagraphEventArgs> > Aspose::Slides::ParagraphCollection::ParagraphRemoved
protected

This event is fired when a paragraph is just about to be removed from the collection.

At the moment of firing the paragraph is contained in the collection but it's parent is already unassigned.