tdf#43257 SVG: Id value can contain other characters than alphanumerics

Ie: "graph-1", "graph_1", "graph.1", etc...

Besides, modify !( str_p("'") | str_p("\"") ) condition as the 'fill' attribute  can be defined as fill="url('#graph1')" but not as fill="url("#graph1")"

Change-Id: I7fb2c5b61487214ab02b207ad64d29bb2a1e107a
Reviewed-on: https://gerrit.libreoffice.org/19961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Xisco Fauli 2015-11-14 01:55:03 +01:00 committed by Caolán McNamara
parent ac8d599c21
commit 179f693ee0

View file

@ -556,9 +556,9 @@ bool parsePaintUri( std::pair<const char*,const char*>& o_rPaintUri,
const bool bRes = parse(sPaintUri,
// Begin grammar
(
str_p("url(") >> !( str_p("'") | str_p("\"") ) >> ("#") >>
(+alnum_p)[assign_a(o_rPaintUri)] >>
!( str_p("'") | str_p("\"") ) >> str_p(")") >>
str_p("url(") >> !( str_p("'") ) >> ("#") >>
(+(anychar_p - (str_p("'") | str_p(")"))))[assign_a(o_rPaintUri)] >>
!( str_p("'") ) >> str_p(")") >>
*( str_p("none")[assign_a(io_rColor.second,false)] |
str_p("currentColor")[assign_a(io_rColor.second,true)] |
ColorGrammar(io_rColor.first)