1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 #ifndef INCLUDED_FILTER_SOURCE_SVG_PARSERFRAGMENTS_HXX
10 #define INCLUDED_FILTER_SOURCE_SVG_PARSERFRAGMENTS_HXX
12 #include <sal/config.h>
26 /// Parse given string for one of the SVG color grammars
27 bool parseColor( const char* sColor
, ARGBColor
& rColor
);
28 bool parseOpacity( const char* sOpacity
, ARGBColor
& rColor
);
30 /// Parse given string for one of the SVG transformation grammars
31 bool parseTransform( const char* sTransform
, basegfx::B2DHomMatrix
& rTransform
);
33 /// Parse given string for the viewBox attribute
34 bool parseViewBox( const char* sViewbox
, basegfx::B2DRange
& rRect
);
36 /// Parse given string for a list of double values, comma-delimited
37 bool parseDashArray( const char* sDashArray
, std::vector
<double>& rOutputVector
);
42 Start and end ptr for uri substring (within
43 [sPaintUri,sPaintUri+strlen(sPaintUri)]
46 The optional paint color to use. if o_rPaintUri is empty,
47 parser sets io_rColor.second to false for color="None", to
48 true and keeps current io_rColor.first entry for
49 "currentColor", and to true and sets io_rColor.first to parsed
53 String to parse. Permitted to contain the optional paint
54 stuff, like fallback color.
56 @return true, if a paint uri was successfully parsed.
58 bool parsePaintUri( std::pair
<const char*,const char*>& o_rPaintUri
,
59 std::pair
<ARGBColor
,bool>& io_rColor
,
60 const char* sPaintUri
);
62 /// Parse given string for the xlink attribute
63 bool parseXlinkHref( const char* xlink
, std::string
& data
);
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */