Browse our Products

Aspose.Words for C++ 23.10 Release Notes

Major Features

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

  • Added generic type parameter to CompositeNode’s class methods.
  • Implemented various PDF rendering optimizations to reduce output size when utilizing PdfSaveOptions.OptimizeOutput settings.
  • Added the capability to retrieve the foreground color without modifiers in the Fill and Stroke classes.
  • Expanded the functionality of ChartDataPointCollection, ChartSeries, and ChartFormat classes with new options.
  • Introduced a simplified method for inserting one document inside another document inline at the current cursor position.
  • Introduced the ImageData.FitImageToShape() method.
  • Added the ability to access and modify the Locked property of a Style.
  • Implemented a feature to recognize hyperlinks when loading TXT documents.

Full list of changes

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 23.10. 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 ability to get foreground color without modifiers in Fill and Stroke classes

A new public property BaseForeColor has been added to class Fill and Stroke:

//// <summary>
/// Gets a Color object that represents the base foreground color for the fill
/// without any modifiers.
/// </summary>
ASPOSE_WORDS_SHARED_API System::Drawing::Color get_BaseForeColor();

...

/// <summary>
/// Gets the base foreground color of the stroke without any modifiers.
/// </summary>
ASPOSE_WORDS_SHARED_API System::Drawing::Color get_BaseForeColor();

Added generic type parameter to CompositeNode’s class methods

Added generic type parameter to the following CompositeNode’s methods:

    
    /// <summary>
    /// Adds the specified node to the end of the list of child nodes for this node.
    /// </summary>
    template <typename T>
    T AppendChild(T newChild)
    {
    typedef Aspose::Words::Node BaseT_Node;
    assert_is_base_of(BaseT_Node, T);

        return InsertAfter<T>(newChild, get_LastChild());
    }

    /// <summary>
    /// Adds the specified node to the beginning of the list of child nodes for this node.
    /// </summary>
    template <typename T>
    T PrependChild(T newChild)
    {
        typedef Aspose::Words::Node BaseT_Node;
        assert_is_base_of(BaseT_Node, T);
        
        return InsertBefore<T>(newChild, get_FirstChild());
    }
    
    /// <summary>
    /// Inserts the specified node immediately after the specified reference node.
    /// </summary>
    /// <remarks>
    template <typename T>
    T InsertAfter(T newChild, const System::SharedPtr<Aspose::Words::Node>& refChild)
    {
        typedef Aspose::Words::Node BaseT_Node;
        assert_is_base_of(BaseT_Node, T);
        
        return Insert<T>(newChild, refChild, true);
    }
    
    /// <summary>
    /// Inserts the specified node immediately before the specified reference node.
    /// </summary>
    template <typename T>
    T InsertBefore(T newChild, const System::SharedPtr<Aspose::Words::Node>& refChild)
    {
        typedef Aspose::Words::Node BaseT_Node;
        assert_is_base_of(BaseT_Node, T);
        
        return Insert<T>(newChild, refChild, false);
    }
    
    /// <summary>
    /// Removes the specified child node.
    /// </summary>
    template <typename T>
    T RemoveChild(T oldChild)
    {
        typedef Aspose::Words::Node BaseT_Node;
        assert_is_base_of(BaseT_Node, T);
        
        return RemoveChildCore<T>(oldChild, false);
    }

Added new members to ChartDataPointCollection, ChartSeries and ChartFormat classes

The following new methods and property have been added to the ChartDataPointCollection, ChartSeries and ChartFormat classes:

    
    class ASPOSE_WORDS_SHARED_CLASS ChartDataPointCollection
    ...

        /// <summary>
        /// Gets a flag indicating whether the data point at the specified index has default format.
        /// </summary>
        ASPOSE_WORDS_SHARED_API bool HasDefaultFormat(int32_t dataPointIndex);

        /// <summary>
        /// Copies format from the source data point to the destination data point.
        /// </summary>
        ASPOSE_WORDS_SHARED_API void CopyFormat(int32_t sourceIndex, int32_t destinationIndex);
    }

    class ASPOSE_WORDS_SHARED_CLASS ChartSeries
    {
        ...

        /// <summary>
        /// Copies default data point format from the data point with the specified index.
        /// </summary>
        ASPOSE_WORDS_SHARED_API void CopyFormatFrom(int32_t dataPointIndex);
    }

    public class ChartFormat
    {
        ...

        /// <summary>
        /// Resets the fill of the chart element to have the default value.
        /// </summary>
        ASPOSE_WORDS_SHARED_API void SetDefaultFill();

        /// <summary>
        /// Gets a flag indicating whether any format is defined.
        /// </summary>
        ASPOSE_WORDS_SHARED_API bool get_IsDefined();
    }
}

Added new public method ImageData.FitImageToShape()

A new FitImageToShape public method has been added to ImageData class:

    /// <summary>
    /// Fits the image data to Shape frame so that the aspect ratio of the image data matches the aspect ratio of Shape frame.
    /// </summary>
    ASPOSE_WORDS_SHARED_API void FitImageToShape();

Added public method DocumentBuilder.InsertDocumentInline

A new public method InsertDocumentInline has been added to class DocumentBuilder:

    /// <summary>
    /// Inserts a document inline at the cursor position.
    /// </summary>
    /// <remarks>
    /// <para>
    /// This method mimics the MS Word behavior, as if CTRL+'A' (select all content) was pressed,
    /// then CTRL+'C' (copy selected into the buffer) inside one document
    /// and then CTRL+'V' (insert content from the buffer) inside another document.
    /// </para>
    /// <para>As a difference from <see cref="InsertDocument(Aspose.Words.Document,Aspose.Words.ImportFormatMode,Aspose.Words.ImportFormatOptions)"/>
    /// this method moves the content of the paragraph of the destination document,
    /// before which the source document is inserted, into the last
    /// paragraph of the inserted source document. Actually, this means that
    /// paragraph break of the last inserted paragraph is removed.</para>
    /// <para>Note, if the last node of the source document is not a paragraph, then nothing will be done.</para>
    /// </remarks>
    /// <param name="srcDoc">Source document for inserting.</param>
    /// <param name="importFormatMode">Specifies how to merge style formatting that clashes.</param>
    /// <param name="importFormatOptions">Allows to specify options that affect formatting of a result document.</param>
    /// <returns>First node of the inserted content.</returns>
    ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Node> InsertDocumentInline(const System::SharedPtr<Aspose::Words::Document>& srcDoc, 
        Aspose::Words::ImportFormatMode importFormatMode, const System::SharedPtr<Aspose::Words::ImportFormatOptions>& importFormatOptions);

Added public properties ChartTitle.Font and ChartAxisTitle.Font

An ability to set font properties for chart and axis titles has been implemented.

The following new public properties have been added:

    public class ChartTitle
    {
    ...

        /// <summary>
        /// Provides access to the font formatting of the chart title.
        /// </summary>
        ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Font> get_Font();
    }

    public class ChartAxisTitle
    {
        ...

        /// <summary>
        /// Provides access to the font formatting of the axis title.
        /// </summary>
        ASPOSE_WORDS_SHARED_API System::SharedPtr<Aspose::Words::Font> get_Font();
    }
}

Added public property Style.Locked

A new public property Locked has been added to class Style:

    /// <summary>
    /// Specifies whether this style is locked.
    /// </summary>
    ASPOSE_WORDS_SHARED_API bool get_Locked() const;
    ASPOSE_WORDS_SHARED_API void set_Locked(bool value);

A new public property DetectHyperlinks has been added to class TxtLoadOptions:

    /// <summary>
    /// Specifies either to detect hyperlinks in text.
    /// The default value is <c>false</c>.
    /// </summary>
    ASPOSE_WORDS_SHARED_API bool get_DetectHyperlinks() const;
    ASPOSE_WORDS_SHARED_API void set_DetectHyperlinks(bool value);

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