search/mag_sel search/close
Aspose::Words::Layout::RevisionOptions Class Reference

Allows to control how document revisions are handled during layout process.

Examples

Shows how to alter the appearance of revisions in a rendered output document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a revision, then change the color of all revisions to green.
builder->Writeln(u"This is not a revision.");
doc->StartTrackRevisions(u"John Doe", System::DateTime::get_Now());
builder->Writeln(u"This is a revision.");
doc->StopTrackRevisions();
builder->Writeln(u"This is not a revision.");
// Remove the bar that appears to the left of every revised line.
doc->get_LayoutOptions()->get_RevisionOptions()->set_InsertedTextColor(RevisionColor::BrightGreen);
doc->get_LayoutOptions()->get_RevisionOptions()->set_ShowRevisionBars(false);
doc->Save(ArtifactsDir + u"Document.LayoutOptionsRevisions.pdf");

#include <Aspose.Words.Cpp/Layout/RevisionOptions.h>

+ Inheritance diagram for Aspose::Words::Layout::RevisionOptions:

Public Member Functions

RevisionColor get_CommentColor () const
 Allows to specify the color to be used for comments. Default value is Red. More...
 
RevisionColor get_DeletedTextColor ()
 Allows to specify the color to be used for deleted content Deletion. Default value is ByAuthor. More...
 
RevisionTextEffect get_DeletedTextEffect ()
 Allows to specify the effect to be applied to the deleted content Deletion. Default value is StrikeThrough More...
 
RevisionColor get_InsertedTextColor ()
 Allows to specify the color to be used for inserted content Insertion. Default value is ByAuthor. More...
 
RevisionTextEffect get_InsertedTextEffect ()
 Allows to specify the effect to be applied to the inserted content Insertion. Default value is Underline. More...
 
MeasurementUnits get_MeasurementUnit () const
 Allows to specify the measurement units for revision comments. Default value is Centimeters More...
 
RevisionColor get_MovedFromTextColor ()
 Allows to specify the color to be used for areas where content was moved from Moving. Default value is ByAuthor. More...
 
RevisionTextEffect get_MovedFromTextEffect ()
 Allows to specify the effect to be applied to the areas where content was moved from Moving. Default value is DoubleStrikeThrough More...
 
RevisionColor get_MovedToTextColor ()
 Allows to specify the color to be used for areas where content was moved to Moving. Default value is ByAuthor. More...
 
RevisionTextEffect get_MovedToTextEffect ()
 Allows to specify the effect to be applied to the areas where content was moved to Moving. Default value is DoubleUnderline More...
 
RevisionColor get_RevisedPropertiesColor ()
 Allows to specify the color to be used for content with changes of formatting properties FormatChange Default value is NoHighlight. More...
 
RevisionTextEffect get_RevisedPropertiesEffect ()
 Allows to specify the effect for content areas with changes of formatting properties FormatChange Default value is None More...
 
RevisionColor get_RevisionBarsColor () const
 Allows to specify the color to be used for side bars that identify document lines containing revised information. Default value is Red. More...
 
HorizontalAlignment get_RevisionBarsPosition () const
 Gets rendering position of revision bars. Default value is Outside. More...
 
float get_RevisionBarsWidth () const
 Gets or sets width of revision bars, points. More...
 
ShowInBalloons get_ShowInBalloons () const
 Allows to specify whether the revisions are rendered in the balloons. Default value is None. More...
 
bool get_ShowOriginalRevision () const
 Allows to specify whether the original text should be shown instead of revised one. Default value is False. More...
 
bool get_ShowRevisionBars () const
 Allows to specify whether revision bars should be rendered near lines containing revised content. Default value is True. More...
 
bool get_ShowRevisionMarks () const
 Allow to specify whether revision text should be marked with special formatting markup. Default value is True. More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void set_CommentColor (RevisionColor value)
 Setter for get_CommentColor. More...
 
void set_DeletedTextColor (RevisionColor value)
 Setter for get_DeletedTextColor. More...
 
void set_DeletedTextEffect (RevisionTextEffect value)
 Setter for get_DeletedTextEffect. More...
 
void set_InsertedTextColor (RevisionColor value)
 Setter for get_InsertedTextColor. More...
 
void set_InsertedTextEffect (RevisionTextEffect value)
 Setter for get_InsertedTextEffect. More...
 
void set_MeasurementUnit (MeasurementUnits value)
 Allows to specify the measurement units for revision comments. Default value is Centimeters More...
 
void set_MovedFromTextColor (RevisionColor value)
 Setter for get_MovedFromTextColor. More...
 
void set_MovedFromTextEffect (RevisionTextEffect value)
 Setter for get_MovedFromTextEffect. More...
 
void set_MovedToTextColor (RevisionColor value)
 Setter for get_MovedToTextColor. More...
 
void set_MovedToTextEffect (RevisionTextEffect value)
 Setter for get_MovedToTextEffect. More...
 
void set_RevisedPropertiesColor (RevisionColor value)
 Setter for get_RevisedPropertiesColor. More...
 
void set_RevisedPropertiesEffect (RevisionTextEffect value)
 Setter for get_RevisedPropertiesEffect. More...
 
void set_RevisionBarsColor (RevisionColor value)
 Setter for get_RevisionBarsColor. More...
 
void set_RevisionBarsPosition (HorizontalAlignment value)
 Sets rendering position of revision bars. Default value is Outside. More...
 
void set_RevisionBarsWidth (float value)
 Setter for get_RevisionBarsWidth. More...
 
void set_ShowInBalloons (ShowInBalloons value)
 Setter for get_ShowInBalloons. More...
 
void set_ShowOriginalRevision (bool value)
 Setter for get_ShowOriginalRevision. More...
 
void set_ShowRevisionBars (bool value)
 Setter for get_ShowRevisionBars. More...
 
void set_ShowRevisionMarks (bool value)
 Setter for get_ShowRevisionMarks. More...
 

Static Public Member Functions

static const TypeInfoType ()
 

Member Function Documentation

◆ get_CommentColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_CommentColor ( ) const

Allows to specify the color to be used for comments. Default value is Red.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_DeletedTextColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_DeletedTextColor ( )

Allows to specify the color to be used for deleted content Deletion. Default value is ByAuthor.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_DeletedTextEffect()

Aspose::Words::Layout::RevisionTextEffect Aspose::Words::Layout::RevisionOptions::get_DeletedTextEffect ( )

Allows to specify the effect to be applied to the deleted content Deletion. Default value is StrikeThrough

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_InsertedTextColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_InsertedTextColor ( )

Allows to specify the color to be used for inserted content Insertion. Default value is ByAuthor.

Examples

Shows how to alter the appearance of revisions in a rendered output document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a revision, then change the color of all revisions to green.
builder->Writeln(u"This is not a revision.");
doc->StartTrackRevisions(u"John Doe", System::DateTime::get_Now());
builder->Writeln(u"This is a revision.");
doc->StopTrackRevisions();
builder->Writeln(u"This is not a revision.");
// Remove the bar that appears to the left of every revised line.
doc->get_LayoutOptions()->get_RevisionOptions()->set_InsertedTextColor(RevisionColor::BrightGreen);
doc->get_LayoutOptions()->get_RevisionOptions()->set_ShowRevisionBars(false);
doc->Save(ArtifactsDir + u"Document.LayoutOptionsRevisions.pdf");

◆ get_InsertedTextEffect()

Aspose::Words::Layout::RevisionTextEffect Aspose::Words::Layout::RevisionOptions::get_InsertedTextEffect ( )

Allows to specify the effect to be applied to the inserted content Insertion. Default value is Underline.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_MeasurementUnit()

Aspose::Words::MeasurementUnits Aspose::Words::Layout::RevisionOptions::get_MeasurementUnit ( ) const

Allows to specify the measurement units for revision comments. Default value is Centimeters

◆ get_MovedFromTextColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_MovedFromTextColor ( )

Allows to specify the color to be used for areas where content was moved from Moving. Default value is ByAuthor.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_MovedFromTextEffect()

Aspose::Words::Layout::RevisionTextEffect Aspose::Words::Layout::RevisionOptions::get_MovedFromTextEffect ( )

Allows to specify the effect to be applied to the areas where content was moved from Moving. Default value is DoubleStrikeThrough

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_MovedToTextColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_MovedToTextColor ( )

Allows to specify the color to be used for areas where content was moved to Moving. Default value is ByAuthor.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_MovedToTextEffect()

Aspose::Words::Layout::RevisionTextEffect Aspose::Words::Layout::RevisionOptions::get_MovedToTextEffect ( )

Allows to specify the effect to be applied to the areas where content was moved to Moving. Default value is DoubleUnderline

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_RevisedPropertiesColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_RevisedPropertiesColor ( )

Allows to specify the color to be used for content with changes of formatting properties FormatChange Default value is NoHighlight.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_RevisedPropertiesEffect()

Aspose::Words::Layout::RevisionTextEffect Aspose::Words::Layout::RevisionOptions::get_RevisedPropertiesEffect ( )

Allows to specify the effect for content areas with changes of formatting properties FormatChange Default value is None

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_RevisionBarsColor()

Aspose::Words::Layout::RevisionColor Aspose::Words::Layout::RevisionOptions::get_RevisionBarsColor ( ) const

Allows to specify the color to be used for side bars that identify document lines containing revised information. Default value is Red.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_RevisionBarsPosition()

Aspose::Words::Drawing::HorizontalAlignment Aspose::Words::Layout::RevisionOptions::get_RevisionBarsPosition ( ) const

Gets rendering position of revision bars. Default value is Outside.

◆ get_RevisionBarsWidth()

float Aspose::Words::Layout::RevisionOptions::get_RevisionBarsWidth ( ) const

Gets or sets width of revision bars, points.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_ShowInBalloons()

Aspose::Words::Layout::ShowInBalloons Aspose::Words::Layout::RevisionOptions::get_ShowInBalloons ( ) const

Allows to specify whether the revisions are rendered in the balloons. Default value is None.

Examples

Shows how to display revisions in balloons.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// By default, text that is a revision has a different color to differentiate it from the other non-revision text.
// Set a revision option to show more details about each revision in a balloon on the page's right margin.
doc->get_LayoutOptions()->get_RevisionOptions()->set_ShowInBalloons(ShowInBalloons::FormatAndDelete);
doc->Save(ArtifactsDir + u"Revision.ShowRevisionBalloons.pdf");

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_ShowOriginalRevision()

bool Aspose::Words::Layout::RevisionOptions::get_ShowOriginalRevision ( ) const

Allows to specify whether the original text should be shown instead of revised one. Default value is False.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ get_ShowRevisionBars()

bool Aspose::Words::Layout::RevisionOptions::get_ShowRevisionBars ( ) const

Allows to specify whether revision bars should be rendered near lines containing revised content. Default value is True.

Examples

Shows how to alter the appearance of revisions in a rendered output document.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a revision, then change the color of all revisions to green.
builder->Writeln(u"This is not a revision.");
doc->StartTrackRevisions(u"John Doe", System::DateTime::get_Now());
builder->Writeln(u"This is a revision.");
doc->StopTrackRevisions();
builder->Writeln(u"This is not a revision.");
// Remove the bar that appears to the left of every revised line.
doc->get_LayoutOptions()->get_RevisionOptions()->set_InsertedTextColor(RevisionColor::BrightGreen);
doc->get_LayoutOptions()->get_RevisionOptions()->set_ShowRevisionBars(false);
doc->Save(ArtifactsDir + u"Document.LayoutOptionsRevisions.pdf");

◆ get_ShowRevisionMarks()

bool Aspose::Words::Layout::RevisionOptions::get_ShowRevisionMarks ( ) const

Allow to specify whether revision text should be marked with special formatting markup. Default value is True.

Examples

Shows how to modify the appearance of revisions.

auto doc = MakeObject<Document>(MyDir + u"Revisions.docx");
// Get the RevisionOptions object that controls the appearance of revisions.
SharedPtr<RevisionOptions> revisionOptions = doc->get_LayoutOptions()->get_RevisionOptions();
// Render insertion revisions in green and italic.
revisionOptions->set_InsertedTextColor(RevisionColor::Green);
revisionOptions->set_InsertedTextEffect(RevisionTextEffect::Italic);
// Render deletion revisions in red and bold.
revisionOptions->set_DeletedTextColor(RevisionColor::Red);
revisionOptions->set_DeletedTextEffect(RevisionTextEffect::Bold);
// The same text will appear twice in a movement revision:
// once at the departure point and once at the arrival destination.
// Render the text at the moved-from revision yellow with a double strike through
// and double-underlined blue at the moved-to revision.
revisionOptions->set_MovedFromTextColor(RevisionColor::Yellow);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleStrikeThrough);
revisionOptions->set_MovedToTextColor(RevisionColor::Blue);
revisionOptions->set_MovedFromTextEffect(RevisionTextEffect::DoubleUnderline);
// Render format revisions in dark red and bold.
revisionOptions->set_RevisedPropertiesColor(RevisionColor::DarkRed);
revisionOptions->set_RevisedPropertiesEffect(RevisionTextEffect::Bold);
// Place a thick dark blue bar on the left side of the page next to lines affected by revisions.
revisionOptions->set_RevisionBarsColor(RevisionColor::DarkBlue);
revisionOptions->set_RevisionBarsWidth(15.0f);
// Show revision marks and original text.
revisionOptions->set_ShowOriginalRevision(true);
revisionOptions->set_ShowRevisionMarks(true);
// Get movement, deletion, formatting revisions, and comments to show up in green balloons
// on the right side of the page.
revisionOptions->set_ShowInBalloons(ShowInBalloons::Format);
revisionOptions->set_CommentColor(RevisionColor::BrightGreen);
// These features are only applicable to formats such as .pdf or .jpg.
doc->Save(ArtifactsDir + u"Revision.RevisionOptions.pdf");

◆ GetType()

virtual const System::TypeInfo& Aspose::Words::Layout::RevisionOptions::GetType ( ) const
overridevirtual

Reimplemented from System::Object.

◆ Is()

virtual bool Aspose::Words::Layout::RevisionOptions::Is ( const System::TypeInfo target) const
overridevirtual

Reimplemented from System::Object.

◆ set_CommentColor()

void Aspose::Words::Layout::RevisionOptions::set_CommentColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_DeletedTextColor()

void Aspose::Words::Layout::RevisionOptions::set_DeletedTextColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_DeletedTextEffect()

void Aspose::Words::Layout::RevisionOptions::set_DeletedTextEffect ( Aspose::Words::Layout::RevisionTextEffect  value)

◆ set_InsertedTextColor()

void Aspose::Words::Layout::RevisionOptions::set_InsertedTextColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_InsertedTextEffect()

void Aspose::Words::Layout::RevisionOptions::set_InsertedTextEffect ( Aspose::Words::Layout::RevisionTextEffect  value)

◆ set_MeasurementUnit()

void Aspose::Words::Layout::RevisionOptions::set_MeasurementUnit ( Aspose::Words::MeasurementUnits  value)

Allows to specify the measurement units for revision comments. Default value is Centimeters

◆ set_MovedFromTextColor()

void Aspose::Words::Layout::RevisionOptions::set_MovedFromTextColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_MovedFromTextEffect()

void Aspose::Words::Layout::RevisionOptions::set_MovedFromTextEffect ( Aspose::Words::Layout::RevisionTextEffect  value)

◆ set_MovedToTextColor()

void Aspose::Words::Layout::RevisionOptions::set_MovedToTextColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_MovedToTextEffect()

void Aspose::Words::Layout::RevisionOptions::set_MovedToTextEffect ( Aspose::Words::Layout::RevisionTextEffect  value)

◆ set_RevisedPropertiesColor()

void Aspose::Words::Layout::RevisionOptions::set_RevisedPropertiesColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_RevisedPropertiesEffect()

void Aspose::Words::Layout::RevisionOptions::set_RevisedPropertiesEffect ( Aspose::Words::Layout::RevisionTextEffect  value)

◆ set_RevisionBarsColor()

void Aspose::Words::Layout::RevisionOptions::set_RevisionBarsColor ( Aspose::Words::Layout::RevisionColor  value)

◆ set_RevisionBarsPosition()

void Aspose::Words::Layout::RevisionOptions::set_RevisionBarsPosition ( Aspose::Words::Drawing::HorizontalAlignment  value)

Sets rendering position of revision bars. Default value is Outside.

◆ set_RevisionBarsWidth()

void Aspose::Words::Layout::RevisionOptions::set_RevisionBarsWidth ( float  value)

◆ set_ShowInBalloons()

void Aspose::Words::Layout::RevisionOptions::set_ShowInBalloons ( Aspose::Words::Layout::ShowInBalloons  value)

◆ set_ShowOriginalRevision()

void Aspose::Words::Layout::RevisionOptions::set_ShowOriginalRevision ( bool  value)

◆ set_ShowRevisionBars()

void Aspose::Words::Layout::RevisionOptions::set_ShowRevisionBars ( bool  value)

◆ set_ShowRevisionMarks()

void Aspose::Words::Layout::RevisionOptions::set_ShowRevisionMarks ( bool  value)

◆ Type()

static const System::TypeInfo& Aspose::Words::Layout::RevisionOptions::Type ( )
static