diff options
Diffstat (limited to 'src/xmlcomposer.cpp')
-rw-r--r-- | src/xmlcomposer.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp index 10b476f..0bcfbcc 100644 --- a/src/xmlcomposer.cpp +++ b/src/xmlcomposer.cpp @@ -519,13 +519,15 @@ bool XmlComposer::BaseAnalyser::processTextFormatting(const string& cw, int flag format.textSetSuScript(RtfFormatting::SUPERSCRIPT); else if(cw == "sub") format.textSetSuScript(RtfFormatting::SUBSCRIPT); - else if(cw == "cf" && HAS_PARAM) - format.textSetColor(param); - else if(cw == "f" && HAS_PARAM) + else if(cw == "cf" && (flags & HAS_PARAM)) + format.textSetColor(param); + else if(cw == "highlight" && (flags & HAS_PARAM)) + format.textSetHighlight(param); + else if(cw == "f" && (flags & HAS_PARAM)) format.textSetFont(param); - else if(cw == "fs" && HAS_PARAM) + else if(cw == "fs" && (flags & HAS_PARAM)) format.textSetFontSize(param); - else if(cw == "cs" && HAS_PARAM) + else if(cw == "cs" && (flags & HAS_PARAM)) format.textSetStyle(param); else return false; @@ -1131,6 +1133,12 @@ ON_CHARDATA(Content) elements++; } + if(format.textHighlight() != -1) + { + AN_ELEMENT(kElHighlight); + elements++; + } + if(format.textSuScript() == RtfFormatting::SUPERSCRIPT) { AN_ELEMENT(kElSuper); |