Aspose::Words::Drawing::OleFormat Class Reference

Provides access to the data of an OLE object or ActiveX control. More...

#include "Aspose.Words.Cpp/Model/Drawing/Ole/OleFormat.h"

Inherits System::Object.

Public Member Functions

System::String get_IconCaption ()
 Gets icon caption of OLE object. More...
 
System::String get_SuggestedExtension ()
 Gets the file extension suggested for the current embedded object if you want to save it into a file. More...
 
System::String get_SuggestedFileName ()
 Gets the file name suggested for the current embedded object if you want to save it into a file. More...
 
System::String get_ProgId ()
 Gets or sets the ProgID of the OLE object. More...
 
void set_ProgId (System::String value)
 Setter for Aspose::Words::Drawing::OleFormat::get_ProgId. More...
 
bool get_IsLink ()
 Returns true if the OLE object is linked (when Aspose::Words::Drawing::OleFormat::get_SourceFullName is specified). More...
 
System::String get_SourceFullName ()
 Gets or sets the path and name of the source file for the linked OLE object. More...
 
void set_SourceFullName (System::String value)
 Setter for Aspose::Words::Drawing::OleFormat::get_SourceFullName. More...
 
System::String get_SourceItem ()
 Gets or sets a string that is used to identify the portion of the source file that is being linked. More...
 
void set_SourceItem (System::String value)
 Setter for Aspose::Words::Drawing::OleFormat::get_SourceItem. More...
 
bool get_AutoUpdate ()
 Specifies whether the link to the OLE object is automatically updated or not in Microsoft Word. More...
 
void set_AutoUpdate (bool value)
 Setter for Aspose::Words::Drawing::OleFormat::get_AutoUpdate. More...
 
bool get_OleIcon ()
 Gets the draw aspect of the OLE object. When true, the OLE object is displayed as an icon. When false, the OLE object is displayed as content. More...
 
bool get_IsLocked ()
 Specifies whether the link to the OLE object is locked from updates. More...
 
void set_IsLocked (bool value)
 Setter for Aspose::Words::Drawing::OleFormat::get_IsLocked. More...
 
System::Guid get_Clsid ()
 Gets the CLSID of the OLE object. More...
 
System::SharedPtr< Aspose::Words::Drawing::OlePackageget_OlePackage ()
 Provide access to Aspose::Words::Drawing::OlePackage if OLE object is an OLE Package. Returns null otherwise. More...
 
System::SharedPtr< Aspose::Words::Drawing::Ole::OleControlget_OleControl ()
 Gets Aspose::Words::Drawing::OleFormat::get_OleControl objects if this OLE object is an ActiveX control. Otherwise this property is null. More...
 
void Save (System::SharedPtr< System::IO::Stream > stream)
 Saves the data of the embedded object into the specified stream. More...
 
void Save (System::String fileName)
 Saves the data of the embedded object into a file with the specified name. More...
 
System::SharedPtr< System::IO::MemoryStreamGetOleEntry (System::String oleEntryName)
 Gets OLE object data entry. 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...
 

Additional Inherited Members

- 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...
 
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)
 

Detailed Description

Provides access to the data of an OLE object or ActiveX control.

Use the Aspose::Words::Drawing::Shape::get_OleFormat property to access the data of an OLE object. You do not create instances of the Aspose::Words::Drawing::OleFormat class directly.

See also
Aspose::Words::Drawing::Shape::get_OleFormat

Member Function Documentation

◆ get_AutoUpdate()

bool Aspose::Words::Drawing::OleFormat::get_AutoUpdate ( )

Specifies whether the link to the OLE object is automatically updated or not in Microsoft Word.

The default value is false.

◆ get_Clsid()

System::Guid Aspose::Words::Drawing::OleFormat::get_Clsid ( )

Gets the CLSID of the OLE object.

◆ get_IconCaption()

System::String Aspose::Words::Drawing::OleFormat::get_IconCaption ( )

Gets icon caption of OLE object.

In case of OLE object is not embedded as icon or caption couldn't be retrieved returns empty string.

◆ get_IsLink()

bool Aspose::Words::Drawing::OleFormat::get_IsLink ( )

Returns true if the OLE object is linked (when Aspose::Words::Drawing::OleFormat::get_SourceFullName is specified).

◆ get_IsLocked()

bool Aspose::Words::Drawing::OleFormat::get_IsLocked ( )

Specifies whether the link to the OLE object is locked from updates.

The default value is false.

◆ get_OleControl()

System::SharedPtr<Aspose::Words::Drawing::Ole::OleControl> Aspose::Words::Drawing::OleFormat::get_OleControl ( )

Gets Aspose::Words::Drawing::OleFormat::get_OleControl objects if this OLE object is an ActiveX control. Otherwise this property is null.

◆ get_OleIcon()

bool Aspose::Words::Drawing::OleFormat::get_OleIcon ( )

Gets the draw aspect of the OLE object. When true, the OLE object is displayed as an icon. When false, the OLE object is displayed as content.

Aspose.Words does not allow to set this property to avoid confusion. If you were able to change the draw aspect in Aspose.Words, Microsoft Word would still display the OLE object in its original draw aspect until you edit or update the OLE object in Microsoft Word.

◆ get_OlePackage()

System::SharedPtr<Aspose::Words::Drawing::OlePackage> Aspose::Words::Drawing::OleFormat::get_OlePackage ( )

Provide access to Aspose::Words::Drawing::OlePackage if OLE object is an OLE Package. Returns null otherwise.

OLE Package is a legacy technology that allows to wrap any file format not present in the OLE registry of a Windows system into a generic package allowing to embed almost anything into a document. See Aspose::Words::Drawing::OlePackage type for more info.

◆ get_ProgId()

System::String Aspose::Words::Drawing::OleFormat::get_ProgId ( )

Gets or sets the ProgID of the OLE object.

The ProgID property is not always present in Microsoft Word documents and cannot be relied upon.

Cannot be null.

The default value is an empty string.

◆ get_SourceFullName()

System::String Aspose::Words::Drawing::OleFormat::get_SourceFullName ( )

Gets or sets the path and name of the source file for the linked OLE object.

The default value is an empty string.

If Aspose::Words::Drawing::OleFormat::get_SourceFullName is not an empty string, the OLE object is linked.

◆ get_SourceItem()

System::String Aspose::Words::Drawing::OleFormat::get_SourceItem ( )

Gets or sets a string that is used to identify the portion of the source file that is being linked.

The default value is an empty string.

For example, if the source file is a Microsoft Excel workbook, the Aspose::Words::Drawing::OleFormat::get_SourceItem property might return "Workbook1!R3C1:R4C2" if the OLE object contains only a few cells from the worksheet.

◆ get_SuggestedExtension()

System::String Aspose::Words::Drawing::OleFormat::get_SuggestedExtension ( )

Gets the file extension suggested for the current embedded object if you want to save it into a file.

◆ get_SuggestedFileName()

System::String Aspose::Words::Drawing::OleFormat::get_SuggestedFileName ( )

Gets the file name suggested for the current embedded object if you want to save it into a file.

◆ GetOleEntry()

System::SharedPtr<System::IO::MemoryStream> Aspose::Words::Drawing::OleFormat::GetOleEntry ( System::String  oleEntryName)

Gets OLE object data entry.

Parameters
oleEntryNameCase-sensitive name of the OLE data stream.
Returns
An OLE data stream or null.

◆ Save() [1/2]

void Aspose::Words::Drawing::OleFormat::Save ( System::SharedPtr< System::IO::Stream stream)

Saves the data of the embedded object into the specified stream.

It is the responsibility of the caller to dispose the stream.

Exceptions
T:System.InvalidOperationExceptionThrows if you attempt to save a linked object.
Parameters
streamWhere to save the object data.

◆ Save() [2/2]

void Aspose::Words::Drawing::OleFormat::Save ( System::String  fileName)

Saves the data of the embedded object into a file with the specified name.

Exceptions
T:System.InvalidOperationExceptionThrows if you attempt to save a linked object.
Parameters
fileNameName of the file to save the OLE object data.

◆ set_AutoUpdate()

void Aspose::Words::Drawing::OleFormat::set_AutoUpdate ( bool  value)

◆ set_IsLocked()

void Aspose::Words::Drawing::OleFormat::set_IsLocked ( bool  value)

◆ set_ProgId()

void Aspose::Words::Drawing::OleFormat::set_ProgId ( System::String  value)

◆ set_SourceFullName()

void Aspose::Words::Drawing::OleFormat::set_SourceFullName ( System::String  value)

◆ set_SourceItem()

void Aspose::Words::Drawing::OleFormat::set_SourceItem ( System::String  value)