Aspose::Words::Settings::HyphenationOptions Class Reference

Detailed Description

Allows to configure document hyphenation options.

Examples

Shows how to configure automatic hyphenation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Size(24);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc->get_HyphenationOptions()->set_AutoHyphenation(true);
doc->get_HyphenationOptions()->set_ConsecutiveHyphenLimit(2);
doc->get_HyphenationOptions()->set_HyphenationZone(720);
doc->get_HyphenationOptions()->set_HyphenateCaps(true);
doc->Save(ArtifactsDir + u"Document.HyphenationOptions.docx");

#include <Aspose.Words.Cpp/Settings/HyphenationOptions.h>

+ Inheritance diagram for Aspose::Words::Settings::HyphenationOptions:

Public Member Functions

 HyphenationOptions ()
 
bool get_AutoHyphenation () const
 Gets or sets value determining whether automatic hyphenation is turned on for the document. Default value for this property is false. More...
 
int32_t get_ConsecutiveHyphenLimit () const
 Gets or sets the maximum number of consecutive lines that can end with hyphens. Default value for this property is 0. More...
 
bool get_HyphenateCaps () const
 Gets or sets value determining whether words written in all capital letters are hyphenated. Default value for this property is true. More...
 
int32_t get_HyphenationZone () const
 Gets or sets the distance in 1/20 of a point from the right margin within which you do not want to hyphenate words. Default value for this property is 360 (0.25 inch). More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void set_AutoHyphenation (bool value)
 Setter for get_AutoHyphenation. More...
 
void set_ConsecutiveHyphenLimit (int32_t value)
 Setter for get_ConsecutiveHyphenLimit. More...
 
void set_HyphenateCaps (bool value)
 Setter for get_HyphenateCaps. More...
 
void set_HyphenationZone (int32_t value)
 Setter for get_HyphenationZone. More...
 

Static Public Member Functions

static const TypeInfoType ()
 

Constructor & Destructor Documentation

◆ HyphenationOptions()

Aspose::Words::Settings::HyphenationOptions::HyphenationOptions ( )

Member Function Documentation

◆ get_AutoHyphenation()

bool Aspose::Words::Settings::HyphenationOptions::get_AutoHyphenation ( ) const

Gets or sets value determining whether automatic hyphenation is turned on for the document. Default value for this property is false.

Examples

Shows how to configure automatic hyphenation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Size(24);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc->get_HyphenationOptions()->set_AutoHyphenation(true);
doc->get_HyphenationOptions()->set_ConsecutiveHyphenLimit(2);
doc->get_HyphenationOptions()->set_HyphenationZone(720);
doc->get_HyphenationOptions()->set_HyphenateCaps(true);
doc->Save(ArtifactsDir + u"Document.HyphenationOptions.docx");

◆ get_ConsecutiveHyphenLimit()

int32_t Aspose::Words::Settings::HyphenationOptions::get_ConsecutiveHyphenLimit ( ) const

Gets or sets the maximum number of consecutive lines that can end with hyphens. Default value for this property is 0.

If value of this property is set to 0, any number of consecutive lines can end with hyphens.

The property does not have effect when saving to fixed page formats e.g. PDF.

Examples

Shows how to configure automatic hyphenation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Size(24);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc->get_HyphenationOptions()->set_AutoHyphenation(true);
doc->get_HyphenationOptions()->set_ConsecutiveHyphenLimit(2);
doc->get_HyphenationOptions()->set_HyphenationZone(720);
doc->get_HyphenationOptions()->set_HyphenateCaps(true);
doc->Save(ArtifactsDir + u"Document.HyphenationOptions.docx");

◆ get_HyphenateCaps()

bool Aspose::Words::Settings::HyphenationOptions::get_HyphenateCaps ( ) const

Gets or sets value determining whether words written in all capital letters are hyphenated. Default value for this property is true.

Examples

Shows how to configure automatic hyphenation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Size(24);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc->get_HyphenationOptions()->set_AutoHyphenation(true);
doc->get_HyphenationOptions()->set_ConsecutiveHyphenLimit(2);
doc->get_HyphenationOptions()->set_HyphenationZone(720);
doc->get_HyphenationOptions()->set_HyphenateCaps(true);
doc->Save(ArtifactsDir + u"Document.HyphenationOptions.docx");

◆ get_HyphenationZone()

int32_t Aspose::Words::Settings::HyphenationOptions::get_HyphenationZone ( ) const

Gets or sets the distance in 1/20 of a point from the right margin within which you do not want to hyphenate words. Default value for this property is 360 (0.25 inch).

Examples

Shows how to configure automatic hyphenation.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
builder->get_Font()->set_Size(24);
builder->Writeln(String(u"Lorem ipsum dolor sit amet, consectetur adipiscing elit, ") +
u"sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.");
doc->get_HyphenationOptions()->set_AutoHyphenation(true);
doc->get_HyphenationOptions()->set_ConsecutiveHyphenLimit(2);
doc->get_HyphenationOptions()->set_HyphenationZone(720);
doc->get_HyphenationOptions()->set_HyphenateCaps(true);
doc->Save(ArtifactsDir + u"Document.HyphenationOptions.docx");

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::Settings::HyphenationOptions::GetType ( ) const
overridevirtual

Reimplemented from System::Object.

◆ Is()

virtual bool Aspose::Words::Settings::HyphenationOptions::Is ( const System::TypeInfo target) const
overridevirtual

Reimplemented from System::Object.

◆ set_AutoHyphenation()

void Aspose::Words::Settings::HyphenationOptions::set_AutoHyphenation ( bool  value)

◆ set_ConsecutiveHyphenLimit()

void Aspose::Words::Settings::HyphenationOptions::set_ConsecutiveHyphenLimit ( int32_t  value)

◆ set_HyphenateCaps()

void Aspose::Words::Settings::HyphenationOptions::set_HyphenateCaps ( bool  value)

◆ set_HyphenationZone()

void Aspose::Words::Settings::HyphenationOptions::set_HyphenationZone ( int32_t  value)

◆ Type()

static const System::TypeInfo& Aspose::Words::Settings::HyphenationOptions::Type ( )
static