Browse our Products

Aspose.Words for C++ 23.3 Release Notes

Major Features

There are 78 improvements and fixes in this regular monthly release. The most notable are:

  • Extended set of public properties for working with fill colors.
  • Implemented rendering of radial gradients with SkiaSharp native shader for .NET Standard.
  • Added support of InvertIfNegative property for bar chart rendering.
  • Implemented saving progress notifications for MOBI and AZW3 formats.
  • Added an ability to specify whether to adjust sentence and word spacing automatically upon document import.

Full list of changes

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 23.3. It includes not only new and obsoleted public methods, but also a description of any changes in the behavior behind the scenes in Aspose.Words which may affect existing code. Any behavior introduced that could be seen as regression and modifies the existing behavior is especially important and is documented here.

Added new public properties for working with fill colors

A new public properties ForeThemeColor and BackThemeColor has been added to the Fill class:

/// Gets a ThemeColor object that represents the foreground color for the fill.
ASPOSE_WORDS_SHARED_API Aspose::Words::Themes::ThemeColor get_ForeThemeColor();

/// Sets a ThemeColor object that represents the foreground color for the fill.
ASPOSE_WORDS_SHARED_API void set_ForeThemeColor(Aspose::Words::Themes::ThemeColor value);

/// Gets a ThemeColor object that represents the background color for the fill.
ASPOSE_WORDS_SHARED_API Aspose::Words::Themes::ThemeColor get_BackThemeColor();

/// Sets a ThemeColor object that represents the background color for the fill.
ASPOSE_WORDS_SHARED_API void set_BackThemeColor(Aspose::Words::Themes::ThemeColor value);

A new public properties ForeTintAndShade and BackTintAndShade has been added to the Fill class:

/// Gets or sets a double value that lightens or darkens the foreground color.
///
/// The allowed values are within the range from -1 (the darkest) to 1 (the lightest) for this property.
/// Zero (0) is neutral. Attempting to set this property to a value less than -1 or more than 1
/// results in <see cref="System::ArgumentOutOfRangeException">ArgumentOutOfRangeException</see>.
ASPOSE_WORDS_SHARED_API double get_ForeTintAndShade();

/// Setter for Aspose::Words::Drawing::Fill::get_ForeTintAndShade
ASPOSE_WORDS_SHARED_API void set_ForeTintAndShade(double value);

/// Gets or sets a double value that lightens or darkens the background color.
///
/// The allowed values are within the range from -1 (the darkest) to 1 (the lightest) for this property.
/// Zero (0) is neutral. Attempting to set this property to a value less than -1 or more than 1
/// results in <see cref="System::ArgumentOutOfRangeException">ArgumentOutOfRangeException</see>.
ASPOSE_WORDS_SHARED_API double get_BackTintAndShade();

/// Setter for Aspose::Words::Drawing::Fill::get_BackTintAndShade
ASPOSE_WORDS_SHARED_API void set_BackTintAndShade(double value);
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>(u"in.docx");

System::SharedPtr<Aspose::Words::Drawing::Fill> shapeFill = (System::AsCast<Aspose::Words::Drawing::Shape>(doc->GetChild(Aspose::Words::NodeType::Shape, 0, true)))->get_Fill();
// Gets and sets the value of theme colors.
if (shapeFill->get_ForeThemeColor() == Aspose::Words::Themes::ThemeColor::Accent1)
{
    shapeFill->set_ForeThemeColor(Aspose::Words::Themes::ThemeColor::Dark1);
}

if (shapeFill->get_BackThemeColor() == Aspose::Words::Themes::ThemeColor::Accent2)
{
    shapeFill->set_BackThemeColor(Aspose::Words::Themes::ThemeColor::Dark2);
}

System::SharedPtr<Aspose::Words::Drawing::Fill> textFill1 = doc->get_FirstSection()->get_Body()->get_FirstParagraph()->get_Runs()->idx_get(0)->get_Font()->get_Fill();
// Gets and sets the tint value.
if (textFill1->get_ForeTintAndShade() == 0)
{
    textFill1->set_ForeTintAndShade(0.5);
}

System::SharedPtr<Aspose::Words::Drawing::Fill> textFill2 = doc->get_FirstSection()->get_Body()->get_FirstParagraph()->get_Runs()->idx_get(1)->get_Font()->get_Fill();
// Gets and sets the shade value.
if (textFill2->get_ForeTintAndShade() == 0)
{
    textFill2->set_ForeTintAndShade(-0.2);
}

doc->Save(u"out.docx");

Added public properties HasMajorGridlines and HasMinorGridlines to ChartAxis class

The following public properties have been added to the Aspose.Words.Drawing.Charts.ChartAxis class:

/// Gets a flag indicating whether the axis has major gridlines.
ASPOSE_WORDS_SHARED_API bool get_HasMajorGridlines();

/// Sets a flag indicating whether the axis has major gridlines.
ASPOSE_WORDS_SHARED_API void set_HasMajorGridlines(bool value);

/// Gets a flag indicating whether the axis has minor gridlines.
ASPOSE_WORDS_SHARED_API bool get_HasMinorGridlines();

/// Sets a flag indicating whether the axis has minor gridlines.
ASPOSE_WORDS_SHARED_API void set_HasMinorGridlines(bool value);
System::SharedPtr<Aspose::Words::Document> doc = System::MakeObject<Aspose::Words::Document>();
System::SharedPtr<Aspose::Words::DocumentBuilder> builder = System::MakeObject<Aspose::Words::DocumentBuilder>(doc);

// Insert a chart.
System::SharedPtr<Aspose::Words::Drawing::Shape> shape = builder->InsertChart(Aspose::Words::Drawing::Charts::ChartType::Column, 432, 252);
    
System::SharedPtr<Aspose::Words::Drawing::Charts::ChartAxis> xAxis = shape->get_Chart()->get_AxisX();
System::SharedPtr<Aspose::Words::Drawing::Charts::ChartAxis> yAxis = shape->get_Chart()->get_AxisY();
    
// Show gridlines.
xAxis->set_HasMajorGridlines(true);
xAxis->set_HasMinorGridlines(true);
yAxis->set_HasMajorGridlines(true);
yAxis->set_HasMinorGridlines(true);
    
doc->Save(u"Gridlines.docx");

Added public property ImportFormatOptions.AdjustSentenceAndWordSpacing

The following public property was added to the Aspose.Words.ImportFormatOptions class:

/// Gets a boolean value that specifies whether to adjust sentence and word spacing automatically.
/// The default value is <c>%false</c>.
ASPOSE_WORDS_SHARED_API bool get_AdjustSentenceAndWordSpacing() const;

/// Sets a boolean value that specifies whether to adjust sentence and word spacing automatically.
/// The default value is <c>%false</c>.
ASPOSE_WORDS_SHARED_API void set_AdjustSentenceAndWordSpacing(bool value);
System::SharedPtr<Aspose::Words::Document> srcDoc = System::MakeObject<Aspose::Words::Document>();
System::SharedPtr<Aspose::Words::Document> dstDoc = System::MakeObject<Aspose::Words::Document>();

System::SharedPtr<Aspose::Words::DocumentBuilder> builder = System::MakeObject<Aspose::Words::DocumentBuilder>(srcDoc);
builder->Write(u"Dolor sit amet.");
    
builder = System::MakeObject<Aspose::Words::DocumentBuilder>(dstDoc);
builder->Write(u"Lorem ipsum.");
    
System::SharedPtr<Aspose::Words::ImportFormatOptions> options = System::MakeObject<Aspose::Words::ImportFormatOptions>();
options->set_AdjustSentenceAndWordSpacing(true);
builder->InsertDocument(srcDoc, Aspose::Words::ImportFormatMode::UseDestinationStyles, options);
    
System::Console::WriteLine(dstDoc->get_FirstSection()->get_Body()->get_FirstParagraph()->GetText());
    
/* This code produces the following output (please note the additional ' ' space character just before pasted content):
Lorem ipsum. Dolor sit amet.
*/

Added public property TextBox.NoTextRotation

The following public property was added to the Aspose.Words.Drawing.TextBox class:

/// Gets a boolean value indicating either text of the TextBox should not rotate when the shape is rotated.
///
/// The default value is <c>%false</c>
ASPOSE_WORDS_SHARED_API bool get_NoTextRotation();

/// Sets a boolean value indicating either text of the TextBox should not rotate when the shape is rotated.
/// 
/// The default value is <c>%false</c>
ASPOSE_WORDS_SHARED_API void set_NoTextRotation(bool value);
System::SharedPtr<Aspose::Words::DocumentBuilder> builder = System::MakeObject<Aspose::Words::DocumentBuilder>();
System::SharedPtr<Aspose::Words::Drawing::Shape> shape = builder->InsertShape(Aspose::Words::Drawing::ShapeType::Ellipse, 20, 20);
shape->get_TextBox()->set_NoTextRotation(true);

Enabled saving progress notifications for MOBI and AZW3 formats

The SaveOptions.ProgressCallback is now also invoked when saving to Mobi or AZW3.

Limitations and API Differences

Aspose.Words for C++ has some differences as compared to its equivalent .NET version of the API. This section contains information about all such functionality that is not available in the current release. The missing features will be added in future releases.

  • The current release does not support Metered license.
  • The current release does not support LINQ and Reporting features.
  • The current release does not support OpenGL 3D Shapes rendering.
  • The current release does not support loading PDF documents.
  • The current release has limited support for database features - C++ doesn’t have common API for DB like .NET System.Data.
  • The current release supports Microsoft Visual C++ version 2017 or higher.
  • The current release supports GCC 6.3 or higher and Clang 3.9.1 or higher on Linux and only for the x86_x64 platform.
  • The current release supports macOS Big Sur or later (11.5+) for 64-bit Intel Mac platform.