svgstyleattributes.cxx (4374d266) | svgstyleattributes.cxx (9d01bcde) |
---|---|
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 --- 185 unchanged lines hidden (view full) --- 194 195 if(aTokenName.getLength()) 196 { 197 skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(':'), nPos, nLen); 198 rtl::OUStringBuffer aTokenValue; 199 copyToLimiter(rCandidate, sal_Unicode(';'), nPos, aTokenValue, nLen); 200 skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(';'), nPos, nLen); 201 const rtl::OUString aOUTokenName(aTokenName.makeStringAndClear()); | 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 --- 185 unchanged lines hidden (view full) --- 194 195 if(aTokenName.getLength()) 196 { 197 skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(':'), nPos, nLen); 198 rtl::OUStringBuffer aTokenValue; 199 copyToLimiter(rCandidate, sal_Unicode(';'), nPos, aTokenValue, nLen); 200 skip_char(rCandidate, sal_Unicode(' '), sal_Unicode(';'), nPos, nLen); 201 const rtl::OUString aOUTokenName(aTokenName.makeStringAndClear()); |
202 const rtl::OUString aOUTokenValue(aTokenValue.makeStringAndClear()); 203 | 202 rtl::OUString aOUTokenValue(aTokenValue.makeStringAndClear()); 203 204 // check for '!important' CssStyle mark, currently not supported 205 // but neds to be extracted for correct parsing 206 static rtl::OUString aTokenImportant(RTL_CONSTASCII_USTRINGPARAM("!important")); 207 const sal_Int32 nIndexTokenImportant(aOUTokenValue.indexOf(aTokenImportant)); 208 209 if(-1 != nIndexTokenImportant) 210 { 211 // if there currently just remove it and remove spaces to have the value only 212 rtl::OUString aNewOUTokenValue; 213 214 if(nIndexTokenImportant > 0) 215 { 216 // copy content before token 217 aNewOUTokenValue += aOUTokenValue.copy(0, nIndexTokenImportant); 218 } 219 220 if(aOUTokenValue.getLength() > nIndexTokenImportant + aTokenImportant.getLength()) 221 { 222 // copy content after token 223 aNewOUTokenValue += aOUTokenValue.copy(nIndexTokenImportant + aTokenImportant.getLength()); 224 } 225 226 // remove spaces 227 aOUTokenValue = aNewOUTokenValue.trim(); 228 } 229 |
204 parseStyleAttribute(aOUTokenName, StrToSVGToken(aOUTokenName), aOUTokenValue); 205 } 206 207 if(nInitPos == nPos) 208 { 209 OSL_ENSURE(false, "Could not interpret on current position (!)"); 210 nPos++; 211 } --- 2391 unchanged lines hidden --- | 230 parseStyleAttribute(aOUTokenName, StrToSVGToken(aOUTokenName), aOUTokenValue); 231 } 232 233 if(nInitPos == nPos) 234 { 235 OSL_ENSURE(false, "Could not interpret on current position (!)"); 236 nPos++; 237 } --- 2391 unchanged lines hidden --- |