summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2017-06-04 22:12:50 +0000
committerMartin Owens <doctormo@gmail.com>2017-06-04 22:12:50 +0000
commit33f79b9653a737c534acd45eff6da806b68c276d (patch)
tree2c588631313ac6078c1a047eea4e0fbcc2df3fd4 /src/document.cpp
parentMerge bugfixes for xverbs (diff)
downloadinkscape-33f79b9653a737c534acd45eff6da806b68c276d.tar.gz
inkscape-33f79b9653a737c534acd45eff6da806b68c276d.zip
Add very raw page loading using links
(bzr r15703.1.24)
Diffstat (limited to '')
-rw-r--r--src/document.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/document.cpp b/src/document.cpp
index c7115f906..4fcc2b098 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -481,7 +481,7 @@ SPDocument *SPDocument::createChildDoc(std::string const &uri)
SPDocument *document = NULL;
while(parent != NULL && parent->getURI() != NULL && document == NULL) {
- // Check myself and any parents int he chain
+ // Check myself and any parents in the chain
if(uri == parent->getURI()) {
document = parent;
break;
@@ -500,8 +500,14 @@ SPDocument *SPDocument::createChildDoc(std::string const &uri)
// Load a fresh document from the svg source.
if(!document) {
- const char *path = uri.c_str();
- document = createNewDoc(path, false, false, this);
+ std::string path;
+ if(uri.find('/') == -1) {
+ path = this->getBase() + uri;
+ } else {
+ path = uri;
+ }
+ std::cout << "Added base: '" << path << "'\n";
+ document = createNewDoc(path.c_str(), false, false, this);
}
return document;
}