index 258323a93d36399baffacada5af08aae80125106..5858f9a0e5c476106c234b06588837efb07322fc 100644 (file)
--- a/src/sp-paint-server.cpp
+++ b/src/sp-paint-server.cpp
bool swatch = false;
if (SP_IS_GRADIENT(this)) {
SPGradient *grad = SP_GRADIENT(this);
- if ( SP_GRADIENT_HAS_STOPS(grad) ) {
- gchar const * attr = repr->attribute("osb:paint");
- if (attr && !strcmp(attr, "solid")) {
- swatch = true;
- }
- }
+ swatch = grad->hasStops() && repr->attribute("osb:paint");
}
return swatch;
}
bool solid = false;
if (SP_IS_GRADIENT(this)) {
SPGradient *grad = SP_GRADIENT(this);
- if ( SP_GRADIENT_HAS_STOPS(grad) && (grad->getStopCount() == 0) ) {
+ if ( grad->hasStops() && (grad->getStopCount() == 0) ) {
gchar const * attr = repr->attribute("osb:paint");
if (attr && !strcmp(attr, "solid")) {
solid = true;