svgtoken.cxx (a275c134) svgtoken.cxx (86d02030)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 151 unchanged lines hidden (view full) ---

160 static rtl::OUString aSVGStrStrokeDashoffset(rtl::OUString::createFromAscii("stroke-dashoffset"));
161 static rtl::OUString aSVGStrStrokeLinecap(rtl::OUString::createFromAscii("stroke-linecap"));
162 static rtl::OUString aSVGStrStrokeLinejoin(rtl::OUString::createFromAscii("stroke-linejoin"));
163 static rtl::OUString aSVGStrStrokeMiterlimit(rtl::OUString::createFromAscii("stroke-miterlimit"));
164 static rtl::OUString aSVGStrStrokeOpacity(rtl::OUString::createFromAscii("stroke-opacity"));
165 static rtl::OUString aSVGStrStrokeWidth(rtl::OUString::createFromAscii("stroke-width"));
166
167 static rtl::OUString aSVGStrText(rtl::OUString::createFromAscii("text"));
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 151 unchanged lines hidden (view full) ---

160 static rtl::OUString aSVGStrStrokeDashoffset(rtl::OUString::createFromAscii("stroke-dashoffset"));
161 static rtl::OUString aSVGStrStrokeLinecap(rtl::OUString::createFromAscii("stroke-linecap"));
162 static rtl::OUString aSVGStrStrokeLinejoin(rtl::OUString::createFromAscii("stroke-linejoin"));
163 static rtl::OUString aSVGStrStrokeMiterlimit(rtl::OUString::createFromAscii("stroke-miterlimit"));
164 static rtl::OUString aSVGStrStrokeOpacity(rtl::OUString::createFromAscii("stroke-opacity"));
165 static rtl::OUString aSVGStrStrokeWidth(rtl::OUString::createFromAscii("stroke-width"));
166
167 static rtl::OUString aSVGStrText(rtl::OUString::createFromAscii("text"));
168 static rtl::OUString aSVGStrBaselineShift(rtl::OUString::createFromAscii("baseline-shift"));
168
169 SVGToken StrToSVGToken(const rtl::OUString& rStr)
170 {
171 typedef std::hash_map< rtl::OUString, SVGToken, rtl::OUStringHash > SVGTokenMapper;
172 typedef std::pair< rtl::OUString, SVGToken > SVGTokenValueType;
173 static SVGTokenMapper aSVGTokenMapperList;
174
175 if(aSVGTokenMapperList.empty())

--- 126 unchanged lines hidden (view full) ---

302 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDashoffset, SVGTokenStrokeDashoffset));
303 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinecap, SVGTokenStrokeLinecap));
304 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinejoin, SVGTokenStrokeLinejoin));
305 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit, SVGTokenStrokeMiterlimit));
306 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeOpacity, SVGTokenStrokeOpacity));
307 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth));
308
309 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText));
169
170 SVGToken StrToSVGToken(const rtl::OUString& rStr)
171 {
172 typedef std::hash_map< rtl::OUString, SVGToken, rtl::OUStringHash > SVGTokenMapper;
173 typedef std::pair< rtl::OUString, SVGToken > SVGTokenValueType;
174 static SVGTokenMapper aSVGTokenMapperList;
175
176 if(aSVGTokenMapperList.empty())

--- 126 unchanged lines hidden (view full) ---

303 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeDashoffset, SVGTokenStrokeDashoffset));
304 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinecap, SVGTokenStrokeLinecap));
305 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeLinejoin, SVGTokenStrokeLinejoin));
306 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeMiterlimit, SVGTokenStrokeMiterlimit));
307 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeOpacity, SVGTokenStrokeOpacity));
308 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth));
309
310 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText));
311 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrBaselineShift, SVGTokenBaselineShift));
310 }
311
312 const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr));
313
314 if(aResult == aSVGTokenMapperList.end())
315 {
316 return SVGTokenUnknown;
317 }

--- 20 unchanged lines hidden ---
312 }
313
314 const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr));
315
316 if(aResult == aSVGTokenMapperList.end())
317 {
318 return SVGTokenUnknown;
319 }

--- 20 unchanged lines hidden ---