From 6f844ef457690c841b0be91d70b1e54b61c04812 Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Wed, 26 Feb 2014 10:31:28 -0500 Subject: Remove DOM directory and reduce size of inkscape. Use Inkscape::URI and save ziptool to utils. (bzr r13047.1.5) --- src/color-profile.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/color-profile.cpp') diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 2736b9a3b..09eaa36e5 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -46,7 +46,7 @@ #include "document.h" #include "preferences.h" -#include "dom/uri.h" +#include "uri.h" #ifdef WIN32 #include @@ -331,13 +331,17 @@ void ColorProfile::set(unsigned key, gchar const *value) { gchar* escaped = g_uri_escape_string(this->href, "!*'();:@=+$,/?#[]", TRUE); //g_message("docbase:%s\n", docbase); - org::w3c::dom::URI docUri(docbase); + //org::w3c::dom::URI docUri(docbase); + Inkscape::URI docUri(docbase); + //# 2. Get href of icc file. we don't care if it's rel or abs - org::w3c::dom::URI hrefUri(escaped); + //org::w3c::dom::URI hrefUri(escaped); + Inkscape::URI hrefUri(escaped); //# 3. Resolve the href according the docBase. This follows // the w3c specs. All absolute and relative issues are considered - org::w3c::dom::URI cprofUri = docUri.resolve(hrefUri); - gchar* fullname = g_uri_unescape_string(cprofUri.getNativePath().c_str(), ""); + std::string fullpath = docUri.getFullPath(hrefUri.getFullPath("")); + + gchar* fullname = g_uri_unescape_string(fullpath.c_str(), ""); this->impl->_clearProfile(); this->impl->_profHandle = cmsOpenProfileFromFile( fullname, "r" ); if ( this->impl->_profHandle ) { -- cgit v1.2.3