summaryrefslogtreecommitdiff
path: root/src/xmlcomposer.cpp
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2005-06-07 17:57:14 +0000
committerStef Walter <stef@memberwebs.com>2005-06-07 17:57:14 +0000
commit8803295019b0fe0b56c08899adf3f8231effb0f5 (patch)
tree0cf83c42731e7d90fcbc6e50eaaa2e2bd65e3c32 /src/xmlcomposer.cpp
parentc386abd496f61f4628446f27b771529699c0ea45 (diff)
Add <highlight> tag for highlighted text.
Diffstat (limited to 'src/xmlcomposer.cpp')
-rw-r--r--src/xmlcomposer.cpp18
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);