Format class: add functions to know if XML files set style attributes

Authored by nibags on Sep 1 2019, 8:12 PM.

Description

Format class: add functions to know if XML files set style attributes

Summary:
The functions isBold(), isItalic(), etc. return the resulting format between the combination of the Theme and the XML highlighting file. This one works very well. The problem is that if the Theme is empty, it isn't possible to correctly apply these attributes, especially the turn off of these.

These new functions let you know if the attributes bold, italic, underline, strikeout, color, backgroundColor, selColor & selBackgroundColor are specifically set in the XML files.

For example, if Format::definitionHasBold() is true, the Format::isBold(...) function returns the value of the bold attribute set in the XML file. If Format::definitionHasBold() is false, the bold attribute isn't in the XML file and Format::isBold(...) returns the value defined by the Theme.

Reviewers: Framework: Syntax Highlighting, dhaumann, cullmann, vkrause

Reviewed By: Framework: Syntax Highlighting, dhaumann, cullmann

Subscribers: kwrite-devel, kde-frameworks-devel

Tags: Kate, Frameworks

Differential Revision: https://phabricator.kde.org/D23515