diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2018-12-13 03:46:07 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2018-12-13 03:46:07 +0000 |
| commit | 0b3a8cd8f233ae037ea9e5cee78b710e3e962830 (patch) | |
| tree | 3d1a1ba03d3fa97d02cbc3392c8df092b30fa14e /src/object/uri.cpp | |
| parent | Finish implementation of 'text-decoration-fill' and 'text-decoration-stroke'. (diff) | |
| download | inkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.tar.gz inkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.zip | |
remove Inkscape::URI::fromUtf8
Diffstat (limited to 'src/object/uri.cpp')
| -rw-r--r-- | src/object/uri.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/object/uri.cpp b/src/object/uri.cpp index f6d044a6e..52fc9dc44 100644 --- a/src/object/uri.cpp +++ b/src/object/uri.cpp @@ -228,37 +228,6 @@ std::string URI::toNativeFilename() const return Glib::filename_from_uri(uristr); } -URI URI::fromUtf8( gchar const* path ) { - if ( !path ) { - throw MalformedURIException(); - } - Glib::ustring tmp; - for ( int i = 0; path[i]; i++ ) - { - gint one = 0x0ff & path[i]; - if ( ('a' <= one && one <= 'z') - || ('A' <= one && one <= 'Z') - || ('0' <= one && one <= '9') - || one == '_' - || one == '-' - || one == '!' - || one == '.' - || one == '~' - || one == '\'' - || one == '(' - || one == ')' - || one == '*' - ) { - tmp += (gunichar)one; - } else { - gchar scratch[4]; - g_snprintf( scratch, 4, "%%%02X", one ); - tmp.append( scratch ); - } - } - return URI( tmp.data() ); -} - /* TODO !!! proper error handling */ URI URI::from_native_filename(gchar const *path) { gchar *uri = g_filename_to_uri(path, nullptr, nullptr); |
