From 7e8ffe9fb3b42470802ed080dc827fdda32165b3 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 27 Jun 2010 20:16:09 -0700 Subject: Partial C++-ification of SPGradient (bzr r9542) --- src/sp-paint-server.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/sp-paint-server.cpp') diff --git a/src/sp-paint-server.cpp b/src/sp-paint-server.cpp index 258323a93..5858f9a0e 100644 --- a/src/sp-paint-server.cpp +++ b/src/sp-paint-server.cpp @@ -160,12 +160,7 @@ bool SPPaintServer::isSwatch() const 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; } @@ -175,7 +170,7 @@ bool SPPaintServer::isSolid() const 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; -- cgit v1.2.3