summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb5a721)
raw | patch | inline | side by side (parent: fb5a721)
author | joncruz <joncruz@users.sourceforge.net> | |
Mon, 29 Oct 2007 06:31:22 +0000 (06:31 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Mon, 29 Oct 2007 06:31:22 +0000 (06:31 +0000) |
src/profile-manager.cpp | patch | blob | history | |
src/profile-manager.h | patch | blob | history |
index c2d3446296ed450f20e41e2526a15fa262922766..19655e0a1b42a54eb7acb5724f40865e20021388 100644 (file)
--- a/src/profile-manager.cpp
+++ b/src/profile-manager.cpp
#include "profile-manager.h"
#include "document.h"
+#include "color-profile.h"
namespace Inkscape {
}
}
+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;
+}
}
diff --git a/src/profile-manager.h b/src/profile-manager.h
index c52101ca3c8b2e88686b33298477064ad5cbaed6..61e22615fd080d270876b40df97d024aa78e8296 100644 (file)
--- a/src/profile-manager.h
+++ b/src/profile-manager.h
class SPDocument;
-
namespace Inkscape {
+class ColorProfile;
+
class ProfileManager : public DocumentSubset,
public GC::Finalized
{
ProfileManager(SPDocument *document);
~ProfileManager();
+ ColorProfile* find(gchar const* name);
+
private:
ProfileManager(ProfileManager const &); // no copy
void operator=(ProfileManager const &); // no assign