diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-02-20 09:50:38 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-02-20 09:50:38 +0000 |
| commit | 774bee47ed685bd666173cb4d1664933217371c9 (patch) | |
| tree | 077955bb8b312b64b308fbd2ab1a32ee5989f605 /src/object | |
| parent | Fix Window centering LPEDialog (diff) | |
| download | inkscape-774bee47ed685bd666173cb4d1664933217371c9.tar.gz inkscape-774bee47ed685bd666173cb4d1664933217371c9.zip | |
Give more descriptive names to document file related variables and functions.
Makes searching through code for them easier.
Diffstat (limited to 'src/object')
| -rw-r--r-- | src/object/color-profile.cpp | 2 | ||||
| -rw-r--r-- | src/object/sp-image.cpp | 4 | ||||
| -rw-r--r-- | src/object/sp-style-elem.cpp | 8 | ||||
| -rw-r--r-- | src/object/uri-references.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/object/color-profile.cpp b/src/object/color-profile.cpp index 9b7d25d98..0e6d5e08d 100644 --- a/src/object/color-profile.cpp +++ b/src/object/color-profile.cpp @@ -350,7 +350,7 @@ void ColorProfile::set(SPAttributeEnum key, gchar const *value) { g_warning("this has no document. using active"); } //# 1. Get complete URI of document - gchar const *docbase = doc->getURI(); + gchar const *docbase = doc->getDocumentURI(); Inkscape::URI docUri(""); if (docbase) { // The file has already been saved diff --git a/src/object/sp-image.cpp b/src/object/sp-image.cpp index 45016bd45..6c3854cb4 100644 --- a/src/object/sp-image.cpp +++ b/src/object/sp-image.cpp @@ -345,7 +345,7 @@ void SPImage::update(SPCtx *ctx, unsigned int flags) { } this->dpi = svgdpi; pixbuf = sp_image_repr_read_image(this->getRepr()->attribute("xlink:href"), - this->getRepr()->attribute("sodipodi:absref"), doc->getBase(), svgdpi); + this->getRepr()->attribute("sodipodi:absref"), doc->getDocumentBase(), svgdpi); if (pixbuf) { #if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2) @@ -557,7 +557,7 @@ gchar* SPImage::description() const { svgdpi = atof(this->getRepr()->attribute("inkscape:svg-dpi")); } pb = sp_image_repr_read_image(this->getRepr()->attribute("xlink:href"), - this->getRepr()->attribute("sodipodi:absref"), this->document->getBase(), svgdpi); + this->getRepr()->attribute("sodipodi:absref"), this->document->getDocumentBase(), svgdpi); if (pb) { ret = g_strdup_printf(_("%d × %d: %s"), diff --git a/src/object/sp-style-elem.cpp b/src/object/sp-style-elem.cpp index a307b110f..dae679bb4 100644 --- a/src/object/sp-style-elem.cpp +++ b/src/object/sp-style-elem.cpp @@ -192,14 +192,14 @@ import_style_cb (CRDocHandler *a_handler, std::cerr << "import_style_cb: No document style sheet!" << std::endl; return; } - if (!document->getURI()) { + if (!document->getDocumentURI()) { std::cerr << "import_style_cb: Document URI is NULL" << std::endl; return; } // Get file Glib::ustring import_file = - Inkscape::IO::Resource::get_filename (document->getURI(), a_uri->stryng->str); + Inkscape::IO::Resource::get_filename (document->getDocumentURI(), a_uri->stryng->str); // Parse file CRStyleSheet *stylesheet = cr_stylesheet_new (nullptr); @@ -332,7 +332,7 @@ end_font_face_cb(CRDocHandler *a_handler) std::cerr << "end_font_face_cb: No document!" << std::endl; return; } - if (!document->getURI()) { + if (!document->getDocumentURI()) { std::cerr << "end_font_face_cb: Document URI is NULL" << std::endl; return; } @@ -357,7 +357,7 @@ end_font_face_cb(CRDocHandler *a_handler) // Get file Glib::ustring ttf_file = - Inkscape::IO::Resource::get_filename (document->getURI(), value); + Inkscape::IO::Resource::get_filename (document->getDocumentURI(), value); if (!ttf_file.empty()) { font_factory *factory = font_factory::Default(); diff --git a/src/object/uri-references.cpp b/src/object/uri-references.cpp index 69ed140e0..d3550d940 100644 --- a/src/object/uri-references.cpp +++ b/src/object/uri-references.cpp @@ -130,7 +130,7 @@ void URIReference::attach(const URI &uri) // The path contains references to separate document files to load. if (document && uri.getPath() && !skip) { - char const *base = document->getBase(); + char const *base = document->getDocumentBase(); auto absuri = URI::from_href_and_basedir(uri.str().c_str(), base); std::string path; |
