diff options
Diffstat (limited to 'src/profile-manager.cpp')
| -rw-r--r-- | src/profile-manager.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/profile-manager.cpp b/src/profile-manager.cpp index c2d344629..19655e0a1 100644 --- a/src/profile-manager.cpp +++ b/src/profile-manager.cpp @@ -10,6 +10,7 @@ #include "profile-manager.h" #include "document.h" +#include "color-profile.h" namespace Inkscape { @@ -62,6 +63,22 @@ void ProfileManager::_resourcesChanged() } } +ColorProfile* ProfileManager::find(gchar const* name) +{ + ColorProfile* match = 0; + if ( name ) { + unsigned int howMany = childCount(NULL); + for ( unsigned int index = 0; index < howMany; index++ ) { + SPObject *obj = nthChildOf(NULL, index); + ColorProfile* prof = reinterpret_cast<ColorProfile*>(obj); + if ( prof && prof->name && !strcmp(name, prof->name) ) { + match = prof; + break; + } + } + } + return match; +} } |
