summaryrefslogtreecommitdiffstats
path: root/src/object/uri.cpp
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-12-13 03:46:07 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-12-13 03:46:07 +0000
commit0b3a8cd8f233ae037ea9e5cee78b710e3e962830 (patch)
tree3d1a1ba03d3fa97d02cbc3392c8df092b30fa14e /src/object/uri.cpp
parentFinish implementation of 'text-decoration-fill' and 'text-decoration-stroke'. (diff)
downloadinkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.tar.gz
inkscape-0b3a8cd8f233ae037ea9e5cee78b710e3e962830.zip
remove Inkscape::URI::fromUtf8
Diffstat (limited to '')
-rw-r--r--src/object/uri.cpp31
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);