svgsvgnode.cxx (4374d266) svgsvgnode.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

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

71 }
72
73 if(bSetInitialValues)
74 {
75 const SvgStyleAttributes* pStyles = getSvgStyleAttributes();
76
77 if(pStyles && pStyles->getParentStyle())
78 {
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

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

71 }
72
73 if(bSetInitialValues)
74 {
75 const SvgStyleAttributes* pStyles = getSvgStyleAttributes();
76
77 if(pStyles && pStyles->getParentStyle())
78 {
79 // #125258# no initial values when SVG has a parent style (probably CssStyle)
80 bSetInitialValues = false;
79 // SVG has a parent style (probably CssStyle), check if fill is set there anywhere
80 // already. If yes, do not set the default fill (black)
81 bool bFillSet(false);
82 const SvgStyleAttributes* pParentStyle = pStyles->getParentStyle();
83
84 while(pParentStyle && !bFillSet)
85 {
86 bFillSet = pParentStyle->isFillSet();
87 pParentStyle = pParentStyle->getParentStyle();
88 }
89
90 if(bFillSet)
91 {
92 // #125258# no initial values when SVG has a parent style at which a fill
93 // is already set
94 bSetInitialValues = false;
95 }
81 }
82 }
83
84 if(bSetInitialValues)
85 {
86 // #125258# only set if not yet initialized (SvgSvgNode::parseAttribute is already done,
87 // just setting may revert an already set valid value)
88 if(!maSvgStyleAttributes.isFillSet())

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

117 // read style attributes
118 maSvgStyleAttributes.parseStyleAttribute(rTokenName, aSVGToken, aContent);
119
120 // parse own
121 switch(aSVGToken)
122 {
123 case SVGTokenStyle:
124 {
96 }
97 }
98
99 if(bSetInitialValues)
100 {
101 // #125258# only set if not yet initialized (SvgSvgNode::parseAttribute is already done,
102 // just setting may revert an already set valid value)
103 if(!maSvgStyleAttributes.isFillSet())

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

132 // read style attributes
133 maSvgStyleAttributes.parseStyleAttribute(rTokenName, aSVGToken, aContent);
134
135 // parse own
136 switch(aSVGToken)
137 {
138 case SVGTokenStyle:
139 {
125 maSvgStyleAttributes.readStyle(aContent);
140 readLocalCssStyle(aContent);
126 break;
127 }
128 case SVGTokenViewBox:
129 {
130 const basegfx::B2DRange aRange(readViewBox(aContent, *this));
131
132 if(!aRange.isEmpty())
133 {

--- 628 unchanged lines hidden ---
141 break;
142 }
143 case SVGTokenViewBox:
144 {
145 const basegfx::B2DRange aRange(readViewBox(aContent, *this));
146
147 if(!aRange.isEmpty())
148 {

--- 628 unchanged lines hidden ---