Browse our Products

Aspose.Words for Java 24.1 Release Notes

Major Features

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

  • Introduced the capability to modify the text of the TextBox OLE control.
  • Included new public properties to manage stroke colors.
  • Implemented the Bibliography Sources public API.
  • Provided an API to limit access to type members using template syntax for the LINQ Reporting Engine.

Full List of Issues Covering all Changes in this Release

Public API and Backward Incompatible Changes

This section lists public API changes that were introduced in Aspose.Words 24.1. 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 an ability to change text of TextBox OLE control

Related issue: WORDSNET-26336

Implemented new public classes:

/// <summary>
/// The MorphDataControl structure is an aggregate of six controls: CheckBox, ComboBox, ListBox, OptionButton, TextBox, and ToggleButton.
/// </summary>
public abstract class MorphDataControl : Forms2OleControl
...
/// <summary>
/// The TextBox control displays text from an organized set of data or user input.
/// </summary>
public class TextBoxControl : MorphDataControl

A new public property Text has been added to the class TextBoxControl:

/// <summary>
/// Gets or sets a text of the control.
/// </summary>
public string Text {get; set;}

Added new public properties for working with stroke colors

Related issue: WORDSNET-24976

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

/// <summary>
/// Gets or sets a ThemeColor object that represents the stroke foreground color.
/// </summary>
public ThemeColor ForeThemeColor { get; set; }

/// <summary>
/// Gets or sets a ThemeColor object that represents the stroke background color.
/// </summary>
public ThemeColor BackThemeColor { get; set; }

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

/// <summary>
/// Gets or sets a double value that lightens or darkens the stroke foreground color.
/// </summary>
public double ForeTintAndShade { get; set; }

/// <summary>
/// Gets or sets a double value that lightens or darkens the stroke background color.
/// </summary>
public double BackTintAndShade { get; set; }

Behavior of HtmlSaveOptions.ExportListLabels save option is changed

Related issue: WORDSNET-25650 and WORDSNET-16553

Previously, when ExportListLabels.ByHtmlTags value was specified for HtmlSaveOptions.ExportListLabels save option, some lists could nevertheless be exported as inline text using ‘p’ tags.

Now, when ExportListLabels.ByHtmlTags value is specified for HtmlSaveOptions.ExportListLabels save option, all lists are exported as HTML native elements using ‘ul’, ‘ol’ and ’li’ tags.

Some moments worth mentioning regarding new behavior when ExportListLabels.ByHtmlTags value is specified for HtmlSaveOptions.ExportListLabels save option:

Previously lists with Heading styles were exported as inline text using ‘h1’, ‘h2’, ‘h3’, ‘h4’, ‘h5’ and ‘h6’ tags. Now they are exported as HTML native elements using ‘ul’, ‘ol’ and ’li’ tags and their styles won’t be preserved after DOCX->HTML->DOCX round-trip.

Previously lists with delete revision were exported as inline text using ‘p’ tags. Now they are exported as HTML native elements using ‘ul’, ‘ol’ and ’li’ tags and some decrease in the quality of such lists is possible.

When a document is exported to MHTML, strikethrough and underline formatting is no longer applied to list markers. If these changes in behavior are critical, you can use ExportListLabels.Auto value instead of ExportListLabels.ByHtmlTags value for HtmlSaveOptions.ExportListLabels save option, because previously their behavior was quite the same.

Implemented Bibliography Sources public API

Related issue: WORDSNET-26307

New public Bibliography property has been added to the Document class:

public class Document
{
    /// <summary>
    /// Gets the <see cref="Bibliography"/> object that represents the list of sources available in the document.
    /// </summary>
    public Bibliography Bibliography { get; }
}

New public Bibliography, Source, ContributorCollection, Contributor, Corporate, PersonCollection and Person classes and SourceType enumeration have been introduced:

/// <summary>
/// Represents the list of bibliography sources available in the document.
/// </summary>
public sealed class Bibliography
{
    /// <summary>
    /// Gets a string that represents the name of the active style to use for a bibliography.
    /// </summary>
    public string BibliographyStyle { get; }

    /// <summary>
    /// Gets a collection that represents all the sources contained in a bibliography.
    /// </summary>
    public ICollection<Source> Sources { get; }
}

/// <summary>
/// Represents an individual source, such as a book, journal article, or interview.
/// </summary>
public sealed class Source
{
    /// <summary>
    /// Gets the locale ID of a source.
    /// </summary>
    public string Lcid { get; }

    /// <summary>
    /// Gets contributors list (author, editor, writer etc) of a source.
    /// </summary>
    public ContributorCollection Contributors { get; }

    /// <summary>
    /// Gets the source type of a source.
    /// </summary>
    public SourceType SourceType { get; }

    /// <summary>
    /// Gets the abbreviated case number of a source.
    /// </summary>
    public string AbbreviatedCaseNumber { get; }

    /// <summary>
    /// Gets the album title of a source.
    /// </summary>
    public string AlbumTitle { get; }

    /// <summary>
    /// Gets the book title of a source.
    /// </summary>
    public string BookTitle { get; }

    /// <summary>
    /// Gets the broadcaster of a source.
    /// </summary>
    public string Broadcaster { get; }

    /// <summary>
    /// Gets the broadcast title of a source.
    /// </summary>
    public string BroadcastTitle { get; }

    /// <summary>
    /// Gets the case number of a source.
    /// </summary>
    public string CaseNumber { get; }

    /// <summary>
    /// Gets the chapter number of a source.
    /// </summary>
    public string ChapterNumber { get; }

    /// <summary>
    /// Gets the city of a source.
    /// </summary>
    public string City { get; }

    /// <summary>
    /// Gets the comments of a source.
    /// </summary>
    public string Comments { get; }

    /// <summary>
    /// Gets the conference or proceedings name of a source.
    /// </summary>
    public string ConferenceName { get; }

    /// <summary>
    /// Gets the country or region of a source.
    /// </summary>
    public string CountryOrRegion { get; }

    /// <summary>
    /// Gets the court of a source.
    /// </summary>
    public string Court { get; }

    /// <summary>
    /// Gets the day of a source.
    /// </summary>
    public string Day { get; }

    /// <summary>
    /// Gets the day accessed of a source.
    /// </summary>
    public string DayAccessed { get; }

    /// <summary>
    /// Gets the department of a source.
    /// </summary>
    public string Department { get; }

    /// <summary>
    /// Gets the distributor of a source.
    /// </summary>
    public string Distributor { get; }

    /// <summary>
    /// Gets the editor of a source.
    /// </summary>
    public string Edition { get; }

    /// <summary>
    /// Gets the guid of a source.
    /// </summary>
    public string Guid { get; }

    /// <summary>
    /// Gets the institution of a source.
    /// </summary>
    public string Institution { get; }

    /// <summary>
    /// Gets the internet site title of a source.
    /// </summary>
    public string InternetSiteTitle { get; }

    /// <summary>
    /// Gets the issue of a source.
    /// </summary>
    public string Issue { get; }

    /// <summary>
    /// Gets the journal name of a source.
    /// </summary>
    public string JournalName { get; }

    /// <summary>
    /// Gets the medium of a source.
    /// </summary>
    public string Medium { get; }

    /// <summary>
    /// Gets the month of a source.
    /// </summary>
    public string Month { get; }

    /// <summary>
    /// Gets the month accessed of a source.
    /// </summary>
    public string MonthAccessed { get; }

    /// <summary>
    /// Gets the number of volumes of a source.
    /// </summary>
    public string NumberVolumes { get; }

    /// <summary>
    /// Gets the pages of a source.
    /// </summary>
    public string Pages { get; }

    /// <summary>
    /// Gets the patent number of a source.
    /// </summary>
    public string PatentNumber { get; }

    /// <summary>
    /// Gets the periodical title of a source.
    /// </summary>
    public string PeriodicalTitle { get; }

    /// <summary>
    /// Gets the production company of a source.
    /// </summary>
    public string ProductionCompany { get; }

    /// <summary>
    /// Gets the publication title of a source.
    /// </summary>
    public string PublicationTitle { get; }

    /// <summary>
    /// Gets the publisher of a source.
    /// </summary>
    public string Publisher { get; }

    /// <summary>
    /// Gets the recording number of a source.
    /// </summary>
    public string RecordingNumber { get; }

    /// <summary>
    /// Gets the reference order of a source.
    /// </summary>
    public string RefOrder { get; }

    /// <summary>
    /// Gets the reporter of a source.
    /// </summary>
    public string Reporter { get; }

    /// <summary>
    /// Gets the short title of a source.
    /// </summary>
    public string ShortTitle { get; }

    /// <summary>
    /// Gets the standard number of a source.
    /// </summary>
    public string StandardNumber { get; }

    /// <summary>
    /// Gets the state or province of a source.
    /// </summary>
    public string StateOrProvince { get; }

    /// <summary>
    /// Gets the station of a source.
    /// </summary>
    public string Station { get; }

    /// <summary>
    /// Gets the identifying tag name of a source.
    /// </summary>
    public string Tag { get; }

    /// <summary>
    /// Gets the theater of a source.
    /// </summary>
    public string Theater { get; }

    /// <summary>
    /// Gets the thesis type of a source.
    /// </summary>
    public string ThesisType { get; }

    /// <summary>
    /// Gets the title of a source.
    /// </summary>
    public string Title { get; }

    /// <summary>
    /// Gets the type of a source.
    /// </summary>
    public string Type { get; }

    /// <summary>
    /// Gets the url of a source.
    /// </summary>
    public string Url { get; }

    /// <summary>
    /// Gets the version of a source.
    /// </summary>
    public string Version { get; }

    /// <summary>
    /// Gets the volume of a source.
    /// </summary>
    public string Volume { get; }

    /// <summary>
    /// Gets the year of a source.
    /// </summary>
    public string Year { get; }

    /// <summary>
    /// Gets the year accessed of a source.
    /// </summary>
    public string YearAccessed { get; }
}
/// <summary>
/// Represents bibliography source contributors.
/// </summary>
public sealed class ContributorCollection : IEnumerable<Contributor>
{
    /// <summary>
    /// Gets the artist of a source.
    /// </summary>
    public Contributor Artist { get; }

    /// <summary>
    /// Gets the author of a source.
    /// </summary>
    public Contributor Author { get; }

    /// <summary>
    /// Gets the book author of a source.
    /// </summary>
    public Contributor BookAuthor { get; }

    /// <summary>
    /// Gets the compiler of a source.
    /// </summary>
    public Contributor Compiler { get; }

    /// <summary>
    /// Gets the composer of a source.
    /// </summary>
    public Contributor Composer { get; }

    /// <summary>
    /// Gets the conductor of a source.
    /// </summary>
    public Contributor Conductor { get; }

    /// <summary>
    /// Gets the counsel of a source.
    /// </summary>
    public Contributor Counsel { get; }

    /// <summary>
    /// Gets the director of a source.
    /// </summary>
    public Contributor Director { get; }

    /// <summary>
    /// Gets the editor of a source.
    /// </summary>
    public Contributor Editor { get; }

    /// <summary>
    /// Gets the interviewee of a source.
    /// </summary>
    public Contributor Interviewee { get; }

    /// <summary>
    /// Gets the interviewer of a source.
    /// </summary>
    public Contributor Interviewer { get; }

    /// <summary>
    /// Gets the inventor of a source.
    /// </summary>
    public Contributor Inventor { get; }

    /// <summary>
    /// Gets the performer of a source.
    /// </summary>
    public Contributor Performer { get; }

    /// <summary>
    /// Gets the producer of a source.
    /// </summary>
    public Contributor Producer { get; }

    /// <summary>
    /// Gets the translator of a source.
    /// </summary>
    public Contributor Translator { get; }

    /// <summary>
    /// Gets the writer of a source.
    /// </summary>
    public Contributor Writer { get; }

    IEnumerator<Contributor> IEnumerable<Contributor>.GetEnumerator();

    IEnumerator IEnumerable.GetEnumerator();
}
/// <summary>
/// Represents a bibliography source contributor. Can be either an corporate (an organization) or a list of persons.
/// </summary>
public abstract class Contributor
{
    internal Contributor()
    {
    }
}
/// <summary>
/// Represents a corporate (an organization) bibliography source contributor.
/// </summary>
public sealed class Corporate : Contributor
{
    /// <summary>
    /// Gets the name of a organization.
    /// </summary>
    public string Name { get; }
}
/// <summary>
/// Represents a list of persons who are bibliography source contributors.
/// </summary>
public sealed class PersonCollection : Contributor, IEnumerable<Person>
{
    IEnumerator<Person> IEnumerable<Person>.GetEnumerator();

    IEnumerator IEnumerable.GetEnumerator();
}
/// <summary>
/// Represents individual (a person) bibliography source contributor.
/// </summary>
public sealed class Person
{
    /// <summary>
    /// Gets the last name of a person.
    /// </summary>
    public string Last { get; }

    /// <summary>
    /// Gets the first name of a person.
    /// </summary>
    public string First { get; }

    /// <summary>
    /// Gets the middle name of a person.
    /// </summary>
    public string Middle { get; }
}
/// <summary>
/// Represents bibliography source types.
/// </summary>
public enum SourceType
{
    /// <summary>
    /// Specifies the article in a periodical source.
    /// </summary>
    ArticleInAPeriodical,

    /// <summary>
    /// Specifies the book source.
    /// </summary>
    Book,

    /// <summary>
    /// Specifies the book section source.
    /// </summary>
    BookSection,

    /// <summary>
    /// Specifies the journal article source.
    /// </summary>
    JournalArticle,

    /// <summary>
    /// Specifies the conference proceedings source.
    /// </summary>
    ConferenceProceedings,

    /// <summary>
    /// Specifies the reporter source.
    /// </summary>
    Report,

    /// <summary>
    /// Specifies the sound recording source.
    /// </summary>
    SoundRecording,

    /// <summary>
    /// Specifies the performance source.
    /// </summary>
    Performance,

    /// <summary>
    /// Specifies the art source.
    /// </summary>
    Art,

    /// <summary>
    /// Specifies the document from internet site source.
    /// </summary>
    DocumentFromInternetSite,

    /// <summary>
    /// Specifies the internet site source.
    /// </summary>
    InternetSite,

    /// <summary>
    /// Specifies the film source.
    /// </summary>
    Film,

    /// <summary>
    /// Specifies the interview source.
    /// </summary>
    Interview,

    /// <summary>
    /// Specifies the patent source.
    /// </summary>
    Patent,

    /// <summary>
    /// Specifies the electronic source.
    /// </summary>
    Electronic,

    /// <summary>
    /// Specifies the case source.
    /// </summary>
    Case,

    /// <summary>
    /// Specifies the miscellaneous source.
    /// </summary>
    Misc
}

Implemented new public property MarkdownSaveOptions.ExportUnderlineFormatting

Related issue: WORDSNET-25997

A new public property ExportUnderlineFormatting has been added to class MarkdownSaveOptions:

/// <summary>
/// Gets or sets a boolean value indicating either to export underline
/// text formatting as sequence of two plus characters "++".
/// The default value is <c>false</c>.
/// </summary>
public bool ExportUnderlineFormatting { get; set; }

Provided API to restrict access to type members through template syntax for LINQ Reporting Engine

Related issues: WORDSNET-25949, WORDSNET-23863

Starting from Aspose.Words 24.1, you can restrict access to members of particular types through template syntax for LINQ Reporting Engine as follows:

[C#]
ReportingEngine.SetRestrictedTypes(typeof(SomeClass1), typeof(SomeClass2));

[Java]
ReportingEngine.setRestrictedTypes(SomeClass1.class, SomeClass2.class);

This feature is intended to improve security of the engine by forbidding access to members of types considered insecure.

For more information on the feature, please refer to ReportingEngine API reference and LINQ Reporting Engine documentation.