summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/eehtml.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-07-27 23:12:22 -0400
committerKohei Yoshida <kohei.yoshida@suse.com>2011-08-03 21:17:46 -0400
commit7b812c921afcafabe0ff5e0c19143a6930b486cd (patch)
tree286ffeaf5eb7e61d7c15690d8dc92bceafc82fe4 /editeng/source/editeng/eehtml.cxx
parent98e3b6e9e7d2a866a60b1273ee247165455f5178 (diff)
Store the content of <style> element, and pass it to the handler.
Diffstat (limited to 'editeng/source/editeng/eehtml.cxx')
-rw-r--r--editeng/source/editeng/eehtml.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index ed290b5236b0..cd14ddd1e7f9 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -188,6 +188,14 @@ void EditHTMLParser::NextToken( int nToken )
}
}
break;
+ case HTML_RAWDATA:
+ if (IsReadStyle() && aToken.Len())
+ {
+ // Each token represents a single line.
+ maStyleSource.append(aToken);
+ maStyleSource.append(sal_Unicode('\n'));
+ }
+ break;
case HTML_TEXTTOKEN:
{
// #i110937# for <title> content, call aImportHdl (no SkipGroup), but don't insert the text into the EditEngine
@@ -361,6 +369,8 @@ void EditHTMLParser::NextToken( int nToken )
// globals
case HTML_HTML_ON:
case HTML_HTML_OFF:
+ case HTML_STYLE_ON:
+ case HTML_STYLE_OFF:
case HTML_BODY_ON:
case HTML_BODY_OFF:
case HTML_HEAD_ON:
@@ -510,6 +520,8 @@ void EditHTMLParser::NextToken( int nToken )
aImportInfo.nTokenValue = (short)nTokenValue;
if ( nToken == HTML_TEXTTOKEN )
aImportInfo.aText = aToken;
+ else if (nToken == HTML_STYLE_OFF)
+ aImportInfo.aText = maStyleSource.makeStringAndClear();
pImpEditEngine->aImportHdl.Call( &aImportInfo );
}