Aspose::Words::Saving::OdtSaveOptions Class Reference

Detailed Description

Can be used to specify additional options when saving a document into the Odt or Ott format.

At the moment provides only the SaveFormat property, but in the future will have other options added, such as an encryption password or digital signature settings.

Examples

Shows how to work with units of measure of document content.

auto doc = MakeObject<Document>(MyDir + u"Rendering.docx");
// Open Office uses centimeters, MS Office uses inches
auto saveOptions = MakeObject<OdtSaveOptions>();
saveOptions->set_IsStrictSchema11(doExportToOdt11Specs);
doc->Save(ArtifactsDir + u"OdtSaveOptions.MeasureUnit.odt", saveOptions);

#include <Aspose.Words.Cpp/Model/Saving/OdtSaveOptions.h>

+ Inheritance diagram for Aspose::Words::Saving::OdtSaveOptions:

Public Member Functions

 OdtSaveOptions ()
 Initializes a new instance of this class that can be used to save a document in the Odt format. More...
 
 OdtSaveOptions (SaveFormat saveFormat)
 Initializes a new instance of this class that can be used to save a document in the Odt or Ott format. More...
 
 OdtSaveOptions (String password)
 Initializes a new instance of this class that can be used to save a document in the Odt format encrypted with a password. More...
 
bool get_IsStrictSchema11 () const
 Specifies whether export should correspond to ODT specification 1.1 strictly. OOo 3.0 displays files correctly when they contain elements and attributes of ODT 1.2. Use "false" for this purpose, or "true" for strict conformity of specification 1.1. The default value is false. More...
 
OdtSaveMeasureUnit get_MeasureUnit () const
 Allows to specify units of measure to apply to document content. The default value is Centimeters More...
 
String get_Password () const
 Gets or sets a password to encrypt document. More...
 
SaveFormat get_SaveFormat () override
 Specifies the format in which the document will be saved if this save options object is used. Can be Odt or Ott. More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void set_IsStrictSchema11 (bool value)
 Setter for get_IsStrictSchema11. More...
 
void set_MeasureUnit (OdtSaveMeasureUnit value)
 Setter for get_MeasureUnit. More...
 
void set_Password (String value)
 Setter for get_Password. More...
 
void set_SaveFormat (SaveFormat value) override
 Setter for get_SaveFormat. More...
 
- Public Member Functions inherited from SaveOptions
String get_DefaultTemplate () const
 Gets or sets path to default template (including filename). Default value for this property is empty string (Empty). More...
 
Dml3DEffectsRenderingMode get_Dml3DEffectsRenderingMode () const
 Gets a value determining how 3D effects are rendered. More...
 
virtual DmlEffectsRenderingMode get_DmlEffectsRenderingMode ()
 Gets or sets a value determining how DrawingML effects are rendered. More...
 
DmlRenderingMode get_DmlRenderingMode () const
 Gets or sets a value determining how DrawingML shapes are rendered. More...
 
bool get_MemoryOptimization () const
 Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. More...
 
bool get_PrettyFormat () const
 When true, pretty formats output where applicable. Default value is false. More...
 
String get_TempFolder () const
 Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used. More...
 
bool get_UpdateFields () const
 Gets or sets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true. More...
 
bool get_UpdateLastPrintedProperty () const
 Gets or sets a value determining whether the LastPrinted property is updated before saving. More...
 
bool get_UpdateLastSavedTimeProperty () const
 Gets or sets a value determining whether the LastSavedTime property is updated before saving. More...
 
bool get_UpdateSdtContent () const
 Gets or sets value determining whether content of StructuredDocumentTag is updated before saving. More...
 
bool get_UseAntiAliasing () const
 Gets or sets a value determining whether or not to use anti-aliasing for rendering. More...
 
bool get_UseHighQualityRendering () const
 Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. More...
 
void set_DefaultTemplate (String value)
 Setter for get_DefaultTemplate. More...
 
void set_Dml3DEffectsRenderingMode (Dml3DEffectsRenderingMode value)
 Sets a value determining how 3D effects are rendered. More...
 
virtual void set_DmlEffectsRenderingMode (DmlEffectsRenderingMode value)
 Setter for get_DmlEffectsRenderingMode. More...
 
void set_DmlRenderingMode (DmlRenderingMode value)
 Setter for get_DmlRenderingMode. More...
 
void set_MemoryOptimization (bool value)
 Setter for get_MemoryOptimization. More...
 
void set_PrettyFormat (bool value)
 Setter for get_PrettyFormat. More...
 
void set_TempFolder (String value)
 Setter for get_TempFolder. More...
 
void set_UpdateFields (bool value)
 Setter for get_UpdateFields. More...
 
void set_UpdateLastPrintedProperty (bool value)
 Setter for get_UpdateLastPrintedProperty. More...
 
void set_UpdateLastSavedTimeProperty (bool value)
 Setter for get_UpdateLastSavedTimeProperty. More...
 
void set_UpdateSdtContent (bool value)
 Setter for get_UpdateSdtContent. More...
 
void set_UseAntiAliasing (bool value)
 Setter for get_UseAntiAliasing. More...
 
void set_UseHighQualityRendering (bool value)
 Setter for get_UseHighQualityRendering. More...
 
- Public Member Functions inherited from Object
ASPOSECPP_SHARED_API Object ()
 
ASPOSECPP_SHARED_API Object (Object const &x)
 
virtual ASPOSECPP_SHARED_API ~Object ()
 
virtual ASPOSECPP_SHARED_API bool Equals (ptr obj)
 
Detail::SmartPtrCounter * GetCounter ()
 
virtual ASPOSECPP_SHARED_API int GetHashCode () const
 
ASPOSECPP_SHARED_API void Lock ()
 
virtual ASPOSECPP_SHARED_API ptr MemberwiseClone () const
 
Objectoperator= (Object const &x)
 
bool ReferenceEquals (String const &str, std::nullptr_t)
 
bool ReferenceEquals (String const &str1, String const &str2)
 
int RemovedSharedRefs (int count)
 
virtual ASPOSECPP_SHARED_API void SetTemplateWeakPtr (unsigned int argument)
 
int SharedCount () const
 
ObjectSharedRefAdded ()
 
int SharedRefRemovedSafe ()
 
virtual ASPOSECPP_SHARED_API String ToString () const
 
ASPOSECPP_SHARED_API void Unlock ()
 
Detail::SmartPtrCounter * WeakRefAdded ()
 
void WeakRefRemoved ()
 

Static Public Member Functions

static const TypeInfoType ()
 
- Static Public Member Functions inherited from SaveOptions
static SharedPtr< SaveOptionsCreateSaveOptions (SaveFormat saveFormat)
 Creates a save options object of a class suitable for the specified save format. More...
 
static SharedPtr< SaveOptionsCreateSaveOptions (String fileName)
 Creates a save options object of a class suitable for the file extension specified in the given file name. More...
 
static const TypeInfoType ()
 
- Static Public Member Functions inherited from Object
bool Equals (double const &objA, double const &objB)
 
bool Equals (float const &objA, float const &objB)
 
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 
static const TypeInfoType ()
 

Additional Inherited Members

- Public Types inherited from Object
typedef SmartPtr< Objectptr
 
typedef System::Details::SharedMembersType shared_members_type
 

Constructor & Destructor Documentation

◆ OdtSaveOptions() [1/3]

Aspose::Words::Saving::OdtSaveOptions::OdtSaveOptions ( )

Initializes a new instance of this class that can be used to save a document in the Odt format.

Examples

Shows how to work with units of measure of document content.

auto doc = MakeObject<Document>(MyDir + u"Rendering.docx");
// Open Office uses centimeters, MS Office uses inches
auto saveOptions = MakeObject<OdtSaveOptions>();
saveOptions->set_IsStrictSchema11(doExportToOdt11Specs);
doc->Save(ArtifactsDir + u"OdtSaveOptions.MeasureUnit.odt", saveOptions);

◆ OdtSaveOptions() [2/3]

Aspose::Words::Saving::OdtSaveOptions::OdtSaveOptions ( System::String  password)

Initializes a new instance of this class that can be used to save a document in the Odt format encrypted with a password.

Examples

Shows how to load and change odt/ott encrypted document.

auto doc = MakeObject<Document>(MyDir + u"Encrypted" + FileFormatUtil::SaveFormatToExtension(saveFormat), MakeObject<LoadOptions>(u"@sposeEncrypted_1145"));
auto builder = MakeObject<DocumentBuilder>(doc);
builder->MoveToDocumentEnd();
builder->Writeln(u"Encrypted document after changes.");
// Saving document using new instance of OdtSaveOptions
doc->Save(ArtifactsDir + u"OdtSaveOptions.WorkWithEncryptedDocument" + FileFormatUtil::SaveFormatToExtension(saveFormat), MakeObject<OdtSaveOptions>(u"@sposeEncrypted_1145"));

◆ OdtSaveOptions() [3/3]

Aspose::Words::Saving::OdtSaveOptions::OdtSaveOptions ( Aspose::Words::SaveFormat  saveFormat)

Initializes a new instance of this class that can be used to save a document in the Odt or Ott format.

Parameters
saveFormatCan be Odt or Ott.
Examples

Shows how to encrypted your odt/ott documents with a password.

auto doc = MakeObject<Document>(MyDir + u"Document.docx");
auto saveOptions = MakeObject<OdtSaveOptions>(saveFormat);
saveOptions->set_Password(u"@sposeEncrypted_1145");
// Saving document using password property of OdtSaveOptions
doc->Save(ArtifactsDir + u"OdtSaveOptions.Encrypt" + FileFormatUtil::SaveFormatToExtension(saveFormat), saveOptions);

Member Function Documentation

◆ get_IsStrictSchema11()

bool Aspose::Words::Saving::OdtSaveOptions::get_IsStrictSchema11 ( ) const

Specifies whether export should correspond to ODT specification 1.1 strictly. OOo 3.0 displays files correctly when they contain elements and attributes of ODT 1.2. Use "false" for this purpose, or "true" for strict conformity of specification 1.1. The default value is false.

Examples

Shows how to work with units of measure of document content.

auto doc = MakeObject<Document>(MyDir + u"Rendering.docx");
// Open Office uses centimeters, MS Office uses inches
auto saveOptions = MakeObject<OdtSaveOptions>();
saveOptions->set_IsStrictSchema11(doExportToOdt11Specs);
doc->Save(ArtifactsDir + u"OdtSaveOptions.MeasureUnit.odt", saveOptions);

◆ get_MeasureUnit()

Aspose::Words::Saving::OdtSaveMeasureUnit Aspose::Words::Saving::OdtSaveOptions::get_MeasureUnit ( ) const

Allows to specify units of measure to apply to document content. The default value is Centimeters

Examples

Shows how to work with units of measure of document content.

auto doc = MakeObject<Document>(MyDir + u"Rendering.docx");
// Open Office uses centimeters, MS Office uses inches
auto saveOptions = MakeObject<OdtSaveOptions>();
saveOptions->set_IsStrictSchema11(doExportToOdt11Specs);
doc->Save(ArtifactsDir + u"OdtSaveOptions.MeasureUnit.odt", saveOptions);

◆ get_Password()

System::String Aspose::Words::Saving::OdtSaveOptions::get_Password ( ) const

Gets or sets a password to encrypt document.

In order to save document without encryption this property should be null or empty string.

Examples

Shows how to encrypted your odt/ott documents with a password.

auto doc = MakeObject<Document>(MyDir + u"Document.docx");
auto saveOptions = MakeObject<OdtSaveOptions>(saveFormat);
saveOptions->set_Password(u"@sposeEncrypted_1145");
// Saving document using password property of OdtSaveOptions
doc->Save(ArtifactsDir + u"OdtSaveOptions.Encrypt" + FileFormatUtil::SaveFormatToExtension(saveFormat), saveOptions);

◆ get_SaveFormat()

Aspose::Words::SaveFormat Aspose::Words::Saving::OdtSaveOptions::get_SaveFormat ( )
overridevirtual

Specifies the format in which the document will be saved if this save options object is used. Can be Odt or Ott.

Examples

Shows how to encrypted your odt/ott documents with a password.

auto doc = MakeObject<Document>(MyDir + u"Document.docx");
auto saveOptions = MakeObject<OdtSaveOptions>(saveFormat);
saveOptions->set_Password(u"@sposeEncrypted_1145");
// Saving document using password property of OdtSaveOptions
doc->Save(ArtifactsDir + u"OdtSaveOptions.Encrypt" + FileFormatUtil::SaveFormatToExtension(saveFormat), saveOptions);

Implements Aspose::Words::Saving::SaveOptions.

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::Saving::OdtSaveOptions::GetType ( ) const
overridevirtual

◆ Is()

virtual bool Aspose::Words::Saving::OdtSaveOptions::Is ( const System::TypeInfo target) const
overridevirtual

◆ set_IsStrictSchema11()

void Aspose::Words::Saving::OdtSaveOptions::set_IsStrictSchema11 ( bool  value)

◆ set_MeasureUnit()

void Aspose::Words::Saving::OdtSaveOptions::set_MeasureUnit ( Aspose::Words::Saving::OdtSaveMeasureUnit  value)

◆ set_Password()

void Aspose::Words::Saving::OdtSaveOptions::set_Password ( System::String  value)

◆ set_SaveFormat()

void Aspose::Words::Saving::OdtSaveOptions::set_SaveFormat ( Aspose::Words::SaveFormat  value)
overridevirtual

◆ Type()

static const System::TypeInfo& Aspose::Words::Saving::OdtSaveOptions::Type ( )
static
@ Centimeters
Specifies that the document content is saved using centimeters.
static System::String SaveFormatToExtension(Aspose::Words::SaveFormat saveFormat)
Converts a save format enumerated value into a file extension. The returned extension is a lower-case...