23#include <rtl/math.hxx>
29#include <frozen/bits/defines.h>
30#include <frozen/bits/elsa_std.h>
31#include <frozen/unordered_map.h>
37 {
u"aliceblue",
Color(240, 248, 255) },
38 {
u"antiquewhite",
Color(250, 235, 215) },
39 {
u"aqua",
Color( 0, 255, 255) },
40 {
u"aquamarine",
Color(127, 255, 212) },
41 {
u"azure",
Color(240, 255, 255) },
42 {
u"beige",
Color(245, 245, 220) },
43 {
u"bisque",
Color(255, 228, 196) },
44 {
u"black",
Color( 0, 0, 0) },
45 {
u"blanchedalmond",
Color(255, 235, 205) },
46 {
u"blue",
Color( 0, 0, 255) },
47 {
u"blueviolet",
Color(138, 43, 226) },
48 {
u"brown",
Color(165, 42, 42) },
49 {
u"burlywood",
Color(222, 184, 135) },
50 {
u"cadetblue",
Color( 95, 158, 160) },
51 {
u"chartreuse",
Color(127, 255, 0) },
52 {
u"chocolate",
Color(210, 105, 30) },
53 {
u"coral",
Color(255, 127, 80) },
54 {
u"cornflowerblue",
Color(100, 149, 237) },
55 {
u"cornsilk",
Color(255, 248, 220) },
56 {
u"crimson",
Color(220, 20, 60) },
57 {
u"cyan",
Color( 0, 255, 255) },
58 {
u"darkblue",
Color( 0, 0, 139) },
59 {
u"darkcyan",
Color( 0, 139, 139) },
60 {
u"darkgoldenrod",
Color(184, 134, 11) },
61 {
u"darkgray",
Color(169, 169, 169) },
62 {
u"darkgreen",
Color( 0, 100, 0) },
63 {
u"darkgrey",
Color(169, 169, 169) },
64 {
u"darkkhaki",
Color(189, 183, 107) },
65 {
u"darkmagenta",
Color(139, 0, 139) },
66 {
u"darkolivegreen",
Color( 85, 107, 47) },
67 {
u"darkorange",
Color(255, 140, 0) },
68 {
u"darkorchid",
Color(153, 50, 204) },
69 {
u"darkred",
Color(139, 0, 0) },
70 {
u"darksalmon",
Color(233, 150, 122) },
71 {
u"darkseagreen",
Color(143, 188, 143) },
72 {
u"darkslateblue",
Color( 72, 61, 139) },
73 {
u"darkslategray",
Color( 47, 79, 79) },
74 {
u"darkslategrey",
Color( 47, 79, 79) },
75 {
u"darkturquoise",
Color( 0, 206, 209) },
76 {
u"darkviolet",
Color(148, 0, 211) },
77 {
u"deeppink",
Color(255, 20, 147) },
78 {
u"deepskyblue",
Color( 0, 191, 255) },
79 {
u"dimgray",
Color(105, 105, 105) },
80 {
u"dimgrey",
Color(105, 105, 105) },
81 {
u"dodgerblue",
Color( 30, 144, 255) },
82 {
u"firebrick",
Color(178, 34, 34) },
83 {
u"floralwhite",
Color(255, 250, 240) },
84 {
u"forestgreen",
Color( 34, 139, 34) },
85 {
u"fuchsia",
Color(255, 0, 255) },
86 {
u"gainsboro",
Color(220, 220, 220) },
87 {
u"ghostwhite",
Color(248, 248, 255) },
88 {
u"gold",
Color(255, 215, 0) },
89 {
u"goldenrod",
Color(218, 165, 32) },
90 {
u"gray",
Color(128, 128, 128) },
91 {
u"grey",
Color(128, 128, 128) },
92 {
u"green",
Color(0, 128, 0) },
93 {
u"greenyellow",
Color(173, 255, 47) },
94 {
u"honeydew",
Color(240, 255, 240) },
95 {
u"hotpink",
Color(255, 105, 180) },
96 {
u"indianred",
Color(205, 92, 92) },
97 {
u"indigo",
Color( 75, 0, 130) },
98 {
u"ivory",
Color(255, 255, 240) },
99 {
u"khaki",
Color(240, 230, 140) },
100 {
u"lavender",
Color(230, 230, 250) },
101 {
u"lavenderblush",
Color(255, 240, 245) },
102 {
u"lawngreen",
Color(124, 252, 0) },
103 {
u"lemonchiffon",
Color(255, 250, 205) },
104 {
u"lightblue",
Color(173, 216, 230) },
105 {
u"lightcoral",
Color(240, 128, 128) },
106 {
u"lightcyan",
Color(224, 255, 255) },
107 {
u"lightgoldenrodyellow",
Color(250, 250, 210) },
108 {
u"lightgray",
Color(211, 211, 211) },
109 {
u"lightgreen",
Color(144, 238, 144) },
110 {
u"lightgrey",
Color(211, 211, 211) },
111 {
u"lightpink",
Color(255, 182, 193) },
112 {
u"lightsalmon",
Color(255, 160, 122) },
113 {
u"lightseagreen",
Color( 32, 178, 170) },
114 {
u"lightskyblue",
Color(135, 206, 250) },
115 {
u"lightslategray",
Color(119, 136, 153) },
116 {
u"lightslategrey",
Color(119, 136, 153) },
117 {
u"lightsteelblue",
Color(176, 196, 222) },
118 {
u"lightyellow",
Color(255, 255, 224) },
119 {
u"lime",
Color( 0, 255, 0) },
120 {
u"limegreen",
Color( 50, 205, 50) },
121 {
u"linen",
Color(250, 240, 230) },
122 {
u"magenta",
Color(255, 0, 255) },
123 {
u"maroon",
Color(128, 0, 0) },
124 {
u"mediumaquamarine",
Color(102, 205, 170) },
125 {
u"mediumblue",
Color( 0, 0, 205) },
126 {
u"mediumorchid",
Color(186, 85, 211) },
127 {
u"mediumpurple",
Color(147, 112, 219) },
128 {
u"mediumseagreen",
Color( 60, 179, 113) },
129 {
u"mediumslateblue",
Color(123, 104, 238) },
130 {
u"mediumspringgreen",
Color( 0, 250, 154) },
131 {
u"mediumturquoise",
Color( 72, 209, 204) },
132 {
u"mediumvioletred",
Color(199, 21, 133) },
133 {
u"midnightblue",
Color( 25, 25, 112) },
134 {
u"mintcream",
Color(245, 255, 250) },
135 {
u"mistyrose",
Color(255, 228, 225) },
136 {
u"moccasin",
Color(255, 228, 181) },
137 {
u"navajowhite",
Color(255, 222, 173) },
138 {
u"navy",
Color( 0, 0, 128) },
139 {
u"oldlace",
Color(253, 245, 230) },
140 {
u"olive",
Color(128, 128, 0) },
141 {
u"olivedrab",
Color(107, 142, 35) },
142 {
u"orange",
Color(255, 165, 0) },
143 {
u"orangered",
Color(255, 69, 0) },
144 {
u"orchid",
Color(218, 112, 214) },
145 {
u"palegoldenrod",
Color(238, 232, 170) },
146 {
u"palegreen",
Color(152, 251, 152) },
147 {
u"paleturquoise",
Color(175, 238, 238) },
148 {
u"palevioletred",
Color(219, 112, 147) },
149 {
u"papayawhip",
Color(255, 239, 213) },
150 {
u"peachpuff",
Color(255, 218, 185) },
151 {
u"peru",
Color(205, 133, 63) },
152 {
u"pink",
Color(255, 192, 203) },
153 {
u"plum",
Color(221, 160, 221) },
154 {
u"powderblue",
Color(176, 224, 230) },
155 {
u"purple",
Color(128, 0, 128) },
156 {
u"red",
Color(255, 0, 0) },
157 {
u"rosybrown",
Color(188, 143, 143) },
158 {
u"royalblue",
Color( 65, 105, 225) },
159 {
u"saddlebrown",
Color(139, 69, 19) },
160 {
u"salmon",
Color(250, 128, 114) },
161 {
u"sandybrown",
Color(244, 164, 96) },
162 {
u"seagreen",
Color( 46, 139, 87) },
163 {
u"seashell",
Color(255, 245, 238) },
164 {
u"sienna",
Color(160, 82, 45) },
165 {
u"silver",
Color(192, 192, 192) },
166 {
u"skyblue",
Color(135, 206, 235) },
167 {
u"slateblue",
Color(106, 90, 205) },
168 {
u"slategray",
Color(112, 128, 144) },
169 {
u"slategrey",
Color(112, 128, 144) },
170 {
u"snow",
Color(255, 250, 250) },
171 {
u"springgreen",
Color( 0, 255, 127) },
172 {
u"steelblue",
Color( 70, 130, 180) },
173 {
u"tan",
Color(210, 180, 140) },
174 {
u"teal",
Color( 0, 128, 128) },
175 {
u"thistle",
Color(216, 191, 216) },
176 {
u"tomato",
Color(255, 99, 71) },
177 {
u"turquoise",
Color( 64, 224, 208) },
178 {
u"violet",
Color(238, 130, 238) },
179 {
u"wheat",
Color(245, 222, 179) },
180 {
u"white",
Color(255, 255, 255) },
181 {
u"whitesmoke",
Color(245, 245, 245) },
182 {
u"yellow",
Color(255, 255, 0) },
183 {
u"yellowgreen",
Color(154, 205, 50) }
189 const double fSWidth(rSource.
getWidth());
190 const double fSHeight(rSource.
getHeight());
197 (bNoSWidth ? 1.0 : 1.0 / fSWidth) *
rTarget.getWidth(),
198 (bNoSHeight ? 1.0 : 1.0 / fSHeight) *
rTarget.getHeight());
218 const double fSWidth(rSource.
getWidth());
219 const double fSHeight(rSource.
getHeight());
222 const double fScaleX((bNoSWidth ? 1.0 : 1.0 / fSWidth) *
rTarget.getWidth());
223 const double fScaleY((bNoSHeight ? 1.0 : 1.0 / fSHeight) *
rTarget.getHeight());
224 const double fScale(
isMeetOrSlice() ? std::min(fScaleX, fScaleY) : std::max(fScaleX, fScaleY));
228 aRetval.
scale(fScale, fScale);
231 const double fNewWidth(fSWidth * fScale);
241 const double fFreeSpace(
rTarget.getWidth() - fNewWidth);
242 fTransX = fFreeSpace * 0.5;
250 const double fFreeSpace(
rTarget.getWidth() - fNewWidth);
251 fTransX = fFreeSpace;
258 const double fNewHeight(fSHeight * fScale);
268 const double fFreeSpace(
rTarget.getHeight() - fNewHeight);
269 fTransY = fFreeSpace * 0.5;
277 const double fFreeSpace(
rTarget.getHeight() - fNewHeight);
278 fTransY = fFreeSpace;
294 while(
nPos < nLen && nChar == rCandidate[
nPos])
302 while(
nPos < nLen && (nCharA == rCandidate[
nPos] || nCharB == rCandidate[
nPos]))
308 void copySign(std::u16string_view rCandidate, sal_Int32& nPos, OUStringBuffer& rTarget,
const sal_Int32 nLen)
314 if(
'+' == aChar ||
'-' == aChar)
322 void copyNumber(std::u16string_view rCandidate, sal_Int32& nPos, OUStringBuffer& rTarget,
const sal_Int32 nLen)
324 bool bOnNumber(
true);
326 while(bOnNumber &&
nPos < nLen)
330 bOnNumber = (
'0' <= aChar &&
'9' >= aChar) ||
'.' == aChar;
340 void copyHex(std::u16string_view rCandidate, sal_Int32& nPos, OUStringBuffer& rTarget,
const sal_Int32 nLen)
344 while(bOnHex &&
nPos < nLen)
348 bOnHex = (
'0' <= aChar &&
'9' >= aChar)
349 || (
'A' <= aChar &&
'F' >= aChar)
350 || (
'a' <= aChar &&
'f' >= aChar);
360 void copyString(std::u16string_view rCandidate, sal_Int32& nPos, OUStringBuffer& rTarget,
const sal_Int32 nLen)
364 while(bOnChar &&
nPos < nLen)
368 bOnChar = (
'a' <= aChar &&
'z' >= aChar)
369 || (
'A' <= aChar &&
'Z' >= aChar)
380 void copyToLimiter(std::u16string_view rCandidate,
sal_Unicode nLimiter, sal_Int32& nPos, OUStringBuffer& rTarget,
const sal_Int32 nLen)
382 while(
nPos < nLen && nLimiter != rCandidate[
nPos])
389 bool readNumber(std::u16string_view rCandidate, sal_Int32& nPos,
double& fNum,
const sal_Int32 nLen)
402 if(
'e' == aChar ||
'E' == aChar)
409 const OUStringBuffer aNum2(aNum);
410 const sal_Int32 nPosAfterE(
nPos);
416 if(nPosAfterE ==
nPos)
428 rtl_math_ConversionStatus eStatus;
430 fNum = rtl::math::stringToDouble(
434 return eStatus == rtl_math_ConversionStatus_Ok;
441 SvgUnit readUnit(std::u16string_view rCandidate, sal_Int32& nPos,
const sal_Int32 nLen)
452 bool bTwoCharValid(
false);
462 bTwoCharValid =
true;
464 else if(
'x' == aCharB)
468 bTwoCharValid =
true;
477 bTwoCharValid =
true;
479 else if(
't' == aCharB)
483 bTwoCharValid =
true;
485 else if(
'c' == aCharB)
489 bTwoCharValid =
true;
499 bTwoCharValid =
true;
509 bTwoCharValid =
true;
519 bTwoCharValid =
true;
559 bool readAngle(std::u16string_view rCandidate, sal_Int32& nPos,
double& fAngle,
const sal_Int32 nLen)
565 enum class DegreeType
570 } aType(DegreeType::deg);
575 static constexpr std::u16string_view aStrGrad =
u"grad";
576 static constexpr std::u16string_view aStrRad =
u"rad";
586 nPos += aStrGrad.size();
587 aType = DegreeType::grad;
597 nPos += aStrRad.size();
598 aType = DegreeType::rad;
606 if (DegreeType::deg == aType)
610 else if (DegreeType::grad == aType)
613 fAngle *= M_PI / 200.0;
624 if(nChar >=
'0' && nChar <=
'9')
628 else if(nChar >=
'A' && nChar <=
'F')
630 return 10 + sal_Int32(nChar -
u'A');
632 else if(nChar >=
'a' && nChar <=
'f')
634 return 10 + sal_Int32(nChar -
u'a');
653 rColor = aResult->second.getBColor();
660 const sal_Int32 nLen(rCandidate.getLength());
665 const double fFactor(1.0 / 255.0);
674 const sal_Int32
nLength(aNum.getLength());
678 const sal_Int32 nR(
read_hex(aNum[0]));
679 const sal_Int32 nG(
read_hex(aNum[1]));
680 const sal_Int32 nB(
read_hex(aNum[2]));
682 rColor.
setRed((nR | (nR << 4)) * fFactor);
683 rColor.
setGreen((nG | (nG << 4)) * fFactor);
684 rColor.
setBlue((nB | (nB << 4)) * fFactor);
690 const sal_Int32 nR1(
read_hex(aNum[0]));
691 const sal_Int32 nR2(
read_hex(aNum[1]));
692 const sal_Int32 nG1(
read_hex(aNum[2]));
693 const sal_Int32 nG2(
read_hex(aNum[3]));
694 const sal_Int32 nB1(
read_hex(aNum[4]));
695 const sal_Int32 nB2(
read_hex(aNum[5]));
697 rColor.
setRed((nR2 | (nR1 << 4)) * fFactor);
698 rColor.
setGreen((nG2 | (nG1 << 4)) * fFactor);
699 rColor.
setBlue((nB2 | (nB1 << 4)) * fFactor);
706 static const char aStrRgb[] =
"rgb";
708 if(rCandidate.matchIgnoreAsciiCase(aStrRgb, 0))
711 sal_Int32
nPos(strlen(aStrRgb));
712 bool bIsRGBA =
false;
714 if(
'a' == rCandidate[
nPos])
731 const bool bIsPercent(
'%' == aPercentChar);
767 const double fFac(bIsPercent ? 0.01 : 1);
781 const double fFac(bIsPercent ? 0.01 : fFactor);
810 const sal_Int32 nLen(rCandidate.size());
851 std::vector<double> aVector;
852 const sal_Int32 nLen(rCandidate.size());
863 aVector.push_back(aVal.
solve(rInfoProvider));
874 const sal_Int32 nLen(rCandidate.size());
884 const sal_Int32 nInitPos(
nPos);
885 static constexpr std::u16string_view aStrMatrix =
u"matrix";
886 static constexpr std::u16string_view aStrTranslate =
u"translate";
887 static constexpr std::u16string_view aStrScale =
u"scale";
888 static constexpr std::u16string_view aStrRotate =
u"rotate";
889 static constexpr std::u16string_view aStrSkewX =
u"skewX";
890 static constexpr std::u16string_view aStrSkewY =
u"skewY";
899 nPos += aStrMatrix.size();
906 aNew.
set(0, 0, aVal.
solve(rInfoProvider));
911 aNew.
set(1, 0, aVal.
solve(rInfoProvider));
916 aNew.
set(0, 1, aVal.
solve(rInfoProvider));
921 aNew.
set(1, 1, aVal.
solve(rInfoProvider));
938 aMatrix = aMatrix * aNew;
953 nPos += aStrTranslate.size();
977 nPos += aStrScale.size();
990 aScaleX.
solve(rInfoProvider),
991 aScaleY.
solve(rInfoProvider));
997 nPos += aStrSkewX.size();
1012 nPos += aStrSkewY.size();
1031 nPos += aStrRotate.size();
1065 if(nInitPos ==
nPos)
1067 SAL_WARN(
"svgio",
"Could not interpret on current position (!)");
1078 const sal_Int32 nLen(rCandidate.size());
1087 const sal_Int32 nLen(rCandidate.size());
1091 if (nLen &&
nPos < nLen &&
'#' == rCandidate[
nPos])
1094 rURL = rCandidate.substr(
nPos);
1104 static const char aStrUrl[] =
"url(";
1106 if(rCandidate.startsWithIgnoreAsciiCase(aStrUrl))
1108 const sal_Int32 nLen(rCandidate.getLength());
1109 sal_Int32
nPos(strlen(aStrUrl));
1114 if(
'"' == rCandidate[
nPos])
1119 else if(
'\'' == rCandidate[
nPos])
1127 OUStringBuffer aTokenValue;
1131 rURL = aTokenValue.makeStringAndClear();
1142 if( !rCandidate.isEmpty() )
1148 rSvgPaint =
SvgPaint(aColor,
true,
true);
1155 rSvgPaint =
SvgPaint(aColor,
true,
false,
false);
1165 rSvgPaint =
SvgPaint(aColor,
true,
true,
true);
1176 const sal_Int32 nLen(rCandidate.size());
1177 rSvgNumberVector.clear();
1187 rSvgNumberVector.push_back(aNum);
1191 return !rSvgNumberVector.empty();
1199 const sal_Int32 nLen(rCandidate.size());
1205 bool bMeetOrSlice(
true);
1206 bool bChanged(
false);
1210 const sal_Int32 nInitPos(
nPos);
1212 OUStringBuffer aTokenName;
1215 if(!aTokenName.isEmpty())
1217 switch(
StrToSVGToken(aTokenName.makeStringAndClear(),
false))
1286 bMeetOrSlice =
true;
1292 bMeetOrSlice =
false;
1303 if(nInitPos ==
nPos)
1305 SAL_WARN(
"svgio",
"Could not interpret on current position (!)");
1321 rSvgStringVector.clear();
1322 const sal_Int32 nLen(rCandidate.size());
1327 OUStringBuffer aTokenValue;
1334 const OUString aString = aTokenValue.makeStringAndClear();
1336 if(!aString.isEmpty())
1338 rSvgStringVector.push_back(aString);
1343 return !rSvgStringVector.empty();
1346 void readImageLink(
const OUString& rCandidate, OUString& rXLink, OUString& rUrl, OUString& rData)
1354 static const char aStrData[] =
"data:";
1356 if(rCandidate.matchIgnoreAsciiCase(aStrData, 0))
1359 sal_Int32
nPos(strlen(aStrData));
1360 sal_Int32 nLen(rCandidate.getLength());
1374 std::u16string_view
aData(rCandidate.subView(
nPos));
1375 static constexpr std::u16string_view aStrBase64 =
u"base64";
1380 nPos = aStrBase64.size();
1381 nLen =
aData.size();
1404 const sal_Int32 nLen(rCandidate.getLength());
1410 bool bChanged(
false);
1411 sal_Int32 nInsideComment(0);
1418 const bool bStart(aCommentSlash == aChar &&
nPos + 1 < nLen && aCommentStar == rCandidate[
nPos + 1]);
1419 const bool bEnd(aCommentStar == aChar &&
nPos + 1 < nLen && aCommentSlash == rCandidate[
nPos + 1]);
1445 return aBuffer.makeStringAndClear();
1454 const sal_Int32 nLen(rCandidate.getLength());
1460 bool bInsideSpace(
false);
1469 bInsideSpace =
true;
1475 bInsideSpace =
false;
1490 if(
aBuffer.getLength() != nLen)
1492 return aBuffer.makeStringAndClear();
1501 ::std::vector< double > aRetval;
1505 const double nCount(rInput.size());
1510 aRetval.push_back(rInput[
a].
solve(rInfoProvider));
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
void translate(double fX, double fY)
void scale(double fX, double fY)
void setBlue(double fNew)
void setGreen(double fNew)
bool isMeetOrSlice() const
basegfx::B2DHomMatrix createMapping(const basegfx::B2DRange &rTarget, const basegfx::B2DRange &rSource) const
SvgAlign getSvgAlign() const
data read access
static basegfx::B2DHomMatrix createLinearMapping(const basegfx::B2DRange &rTarget, const basegfx::B2DRange &rSource)
tooling
double solve(const InfoProvider &rInfoProvider, NumberType aNumberType=NumberType::length) const
bool solve(Matrix &matrix, int rows, int cols, Vector &result, BaseType minPivot)
#define SAL_WARN(area, stream)
constexpr OUStringLiteral aData
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
B2DHomMatrix createShearYB2DHomMatrix(double fShearY)
B2DHomMatrix createScaleB2DHomMatrix(double fScaleX, double fScaleY)
B2DHomMatrix createShearXB2DHomMatrix(double fShearX)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DHomMatrix createRotateB2DHomMatrix(double fRadiant)
constexpr double deg2rad(double v)
std::basic_string_view< charT, traits > trim(std::basic_string_view< charT, traits > str)
bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
bool matchIgnoreAsciiCase(std::u16string_view s1, std::u16string_view s2, sal_Int32 fromIndex=0)
void skip_char(std::u16string_view rCandidate, sal_Unicode nChar, sal_Int32 &nPos, const sal_Int32 nLen)
SVGToken StrToSVGToken(const OUString &rStr, bool bCaseIndependent)
bool readLocalLink(std::u16string_view rCandidate, OUString &rURL)
std::vector< double > readFilterMatrix(std::u16string_view rCandidate, InfoProvider const &rInfoProvider)
::std::vector< double > solveSvgNumberVector(const SvgNumberVector &rInput, const InfoProvider &rInfoProvider)
void copySign(std::u16string_view rCandidate, sal_Int32 &nPos, OUStringBuffer &rTarget, const sal_Int32 nLen)
::std::vector< OUString > SvgStringVector
sal_Int32 read_hex(sal_Unicode nChar)
OUString removeBlockComments(const OUString &rCandidate)
OUString consolidateContiguousSpace(const OUString &rCandidate)
bool readSingleNumber(std::u16string_view rCandidate, SvgNumber &aNum)
void copyToLimiter(std::u16string_view rCandidate, sal_Unicode nLimiter, sal_Int32 &nPos, OUStringBuffer &rTarget, const sal_Int32 nLen)
bool readNumber(std::u16string_view rCandidate, sal_Int32 &nPos, double &fNum, const sal_Int32 nLen)
bool readAngle(std::u16string_view rCandidate, sal_Int32 &nPos, double &fAngle, const sal_Int32 nLen)
std::vector< SvgNumber > SvgNumberVector
bool readSvgNumberVector(std::u16string_view rCandidate, SvgNumberVector &rSvgNumberVector)
bool readSvgPaint(const OUString &rCandidate, SvgPaint &rSvgPaint, OUString &rURL, SvgNumber &rOpacity)
void copyNumber(std::u16string_view rCandidate, sal_Int32 &nPos, OUStringBuffer &rTarget, const sal_Int32 nLen)
bool readLocalUrl(const OUString &rCandidate, OUString &rURL)
basegfx::B2DHomMatrix readTransform(std::u16string_view rCandidate, InfoProvider const &rInfoProvider)
SvgUnit readUnit(std::u16string_view rCandidate, sal_Int32 &nPos, const sal_Int32 nLen)
bool match_colorKeyword(basegfx::BColor &rColor, const OUString &rName)
bool read_color(const OUString &rCandidate, basegfx::BColor &rColor, SvgNumber &rOpacity)
bool readNumberAndUnit(std::u16string_view rCandidate, sal_Int32 &nPos, SvgNumber &aNum, const sal_Int32 nLen)
SvgAspectRatio readSvgAspectRatio(std::u16string_view rCandidate)
void copyHex(std::u16string_view rCandidate, sal_Int32 &nPos, OUStringBuffer &rTarget, const sal_Int32 nLen)
bool readSvgStringVector(std::u16string_view rCandidate, SvgStringVector &rSvgStringVector)
void copyString(std::u16string_view rCandidate, sal_Int32 &nPos, OUStringBuffer &rTarget, const sal_Int32 nLen)
basegfx::B2DRange readViewBox(std::u16string_view rCandidate, InfoProvider const &rInfoProvider)
void readImageLink(const OUString &rCandidate, OUString &rXLink, OUString &rUrl, OUString &rData)
constexpr auto aColorTokenMapperList
const sal_Unicode *const aMimeType[]
std::unique_ptr< char[]> aBuffer