summaryrefslogtreecommitdiffstats
path: root/src/color-profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/color-profile.cpp')
-rw-r--r--src/color-profile.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/color-profile.cpp b/src/color-profile.cpp
index 690a72654..bcefe994a 100644
--- a/src/color-profile.cpp
+++ b/src/color-profile.cpp
@@ -271,6 +271,7 @@ void ColorProfile::build(SPDocument *document, Inkscape::XML::Node *repr) {
SPObject::build(document, repr);
this->readAttr( "xlink:href" );
+ this->readAttr( "id" );
this->readAttr( "local" );
this->readAttr( "name" );
this->readAttr( "rendering-intent" );
@@ -488,18 +489,17 @@ static int getLcmsIntent( guint svgIntent )
static SPObject* bruteFind( SPDocument* document, gchar const* name )
{
SPObject* result = 0;
- const GSList * current = document->getResourceList("iccprofile");
- while ( current && !result ) {
- if ( IS_COLORPROFILE(current->data) ) {
- ColorProfile* prof = COLORPROFILE(current->data);
+ std::set<SPObject *> current = document->getResourceList("iccprofile");
+ for (std::set<SPObject *>::const_iterator it = current.begin(); (!result) && (it != current.end()); ++it) {
+ if ( IS_COLORPROFILE(*it) ) {
+ ColorProfile* prof = COLORPROFILE(*it);
if ( prof ) {
if ( prof->name && (strcmp(prof->name, name) == 0) ) {
- result = SP_OBJECT(current->data);
+ result = SP_OBJECT(*it);
break;
}
}
}
- current = g_slist_next(current);
}
return result;