/ msSLDParseTextSymbolizer */ / Parse text symbolizer. */ / */ */ */ */ <xs:element
| 2318 | /* </xs:element> */ |
| 2319 | /************************************************************************/ |
| 2320 | int msSLDParseTextSymbolizer(CPLXMLNode *psRoot, layerObj *psLayer, |
| 2321 | int bOtherSymboliser) |
| 2322 | { |
| 2323 | int nStyleId=0, nClassId=0; |
| 2324 | |
| 2325 | if (!psRoot || !psLayer) |
| 2326 | return MS_FAILURE; |
| 2327 | |
| 2328 | if (!bOtherSymboliser) |
| 2329 | { |
| 2330 | if (msGrowLayerClasses(psLayer) == NULL) |
| 2331 | return MS_FAILURE; |
| 2332 | initClass(psLayer->class[psLayer->numclasses]); |
| 2333 | nClassId = psLayer->numclasses; |
| 2334 | psLayer->numclasses++; |
| 2335 | msMaybeAllocateClassStyle(psLayer->class[nClassId], 0); |
| 2336 | nStyleId = 0; |
| 2337 | } |
| 2338 | else |
| 2339 | { |
| 2340 | nClassId = psLayer->numclasses - 1; |
| 2341 | if (nClassId >= 0)/* should always be true */ |
| 2342 | nStyleId = psLayer->class[nClassId]->numstyles -1; |
| 2343 | } |
| 2344 | |
| 2345 | if (nStyleId >= 0 && nClassId >= 0) /* should always be true */ |
| 2346 | msSLDParseTextParams(psRoot, psLayer, |
| 2347 | psLayer->class[nClassId]); |
| 2348 | |
| 2349 | return MS_SUCCESS; |
| 2350 | } |
| 2351 | |
| 2352 | |
| 2353 |
no test coverage detected