summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6040e72)
raw | patch | inline | side by side (parent: 6040e72)
author | joncruz <joncruz@users.sourceforge.net> | |
Sat, 12 May 2007 19:15:27 +0000 (19:15 +0000) | ||
committer | joncruz <joncruz@users.sourceforge.net> | |
Sat, 12 May 2007 19:15:27 +0000 (19:15 +0000) |
src/document.cpp | patch | blob | history | |
src/document.h | patch | blob | history | |
src/sp-style-elem.cpp | patch | blob | history | |
src/test-helpers.h | patch | blob | history |
diff --git a/src/document.cpp b/src/document.cpp
index 6ab08ffb62c7b5165bd38baee66bdcb09cd1ae2c..f4ebfb7cb7cf95c823c4a59b6fac86d11da9a032 100644 (file)
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -405,11 +405,6 @@ sp_document_new_from_mem(gchar const *buffer, gint length, unsigned int keepaliv
return doc;
}
-SPDocument *sp_document_new_dummy() {
- SPDocument *document = new SPDocument();
- return document;
-}
-
SPDocument *
sp_document_ref(SPDocument *doc)
{
diff --git a/src/document.h b/src/document.h
index d9acc93fc294b6457b8ef897230baaf1b0f9794e..94b97631438ca070619b715abd2a9d34f3221822 100644 (file)
--- a/src/document.h
+++ b/src/document.h
SPDocument *sp_document_new (const gchar *uri, unsigned int keepalive, bool make_new = false);
SPDocument *sp_document_new_from_mem (const gchar *buffer, gint length, unsigned int keepalive);
-SPDocument *sp_document_new_dummy();
SPDocument *sp_document_ref (SPDocument *doc);
SPDocument *sp_document_unref (SPDocument *doc);
diff --git a/src/sp-style-elem.cpp b/src/sp-style-elem.cpp
index 63a9bae38abdb413d8811fddc74dd7f25d403731..fa756242cab2dc53ba362d438b608dcd509241c0 100644 (file)
--- a/src/sp-style-elem.cpp
+++ b/src/sp-style-elem.cpp
// that uses a style from it. It just forces the parent of <style> to reread its style as soon as the stylesheet
// is fully loaded. Naturally, this won't work if the user of the stylesheet is its grandparent or precedent.
SPObject *parent = SP_OBJECT_PARENT (object);
- sp_style_read_from_object(parent->style, parent);
+ if ( parent ) {
+ sp_style_read_from_object(parent->style, parent);
+ }
}
/**
diff --git a/src/test-helpers.h b/src/test-helpers.h
index 594f4b7ae8185b55f876afbcfb17b365a5f5191a..8dba0c942e23a81d16dfe7350733bbc2bd420602 100644 (file)
--- a/src/test-helpers.h
+++ b/src/test-helpers.h
static_cast<void>(g_object_new(inkscape_get_type(), NULL));
}
- SPDocument* tmp = sp_document_new_dummy();
+ SPDocument* tmp = sp_document_new( NULL, TRUE, true );
if ( tmp ) {
fun( suite );
if ( suite )