From 8803295019b0fe0b56c08899adf3f8231effb0f5 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Tue, 7 Jun 2005 17:57:14 +0000 Subject: Add tag for highlighted text. --- src/xmlcomposer.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/xmlcomposer.cpp') 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); -- cgit v1.2.3