summaryrefslogtreecommitdiff
path: root/svgio/source/svgreader/svgdocumenthandler.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2014-10-10 15:52:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-10-13 17:31:17 +0100
commitc18591107d9c856b15fa884eaed354d021ec4262 (patch)
treee26d7ca4a9d3ff026872fcef3b7805df0d4579e9 /svgio/source/svgreader/svgdocumenthandler.cxx
parent4c31a0be1d8048bf3340acbb59248185e4b93041 (diff)
Resolves: #i125325# added code to handle block comments...
in Css style definitions (cherry picked from commit 7b071b828a5f602cc30c17ddd871a75426a53faf) Conflicts: svgio/source/svgreader/svgtools.cxx Change-Id: I094228ea398686c5b39f5f279a964a2df7b00368
Diffstat (limited to 'svgio/source/svgreader/svgdocumenthandler.cxx')
-rw-r--r--svgio/source/svgreader/svgdocumenthandler.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index 1cb1a54af248..d816f5473263 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -519,7 +519,16 @@ namespace svgio
if(maCssContents.size())
{
// need to interpret css styles and remember them as StyleSheets
- pCssStyle->addCssStyleSheet(*(maCssContents.end() - 1));
+ // #125325# Caution! the Css content may contain block comments
+ // (see http://www.w3.org/wiki/CSS_basics#CSS_comments). These need
+ // to be removed first
+ const OUString aCommentFreeSource(removeBlockComments(*(maCssContents.end() - 1)));
+
+ if(aCommentFreeSource.getLength())
+ {
+ pCssStyle->addCssStyleSheet(aCommentFreeSource);
+ }
+
maCssContents.pop_back();
}
else