summaryrefslogtreecommitdiffstats
path: root/src/sp-object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-object.cpp')
-rw-r--r--src/sp-object.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/sp-object.cpp b/src/sp-object.cpp
index 4e45eb824..3b09d80e8 100644
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
@@ -1523,6 +1523,22 @@ char* SPObject::textualContent() const
return g_string_free(text, FALSE);
}
+// For debugging: Print SP tree structure.
+void SPObject::recursivePrintTree( unsigned level )
+{
+ if (level == 0) {
+ std::cout << "SP Object Tree" << std::endl;
+ }
+ std::cout << "SP: ";
+ for (unsigned i = 0; i < level; ++i) {
+ std::cout << " ";
+ }
+ std::cout << (getId()?getId():"No object id") << std::endl;
+ for (SPObject *child = children; child; child = child->next) {
+ child->recursivePrintTree( level+1 );
+ }
+}
+
/*
Local Variables:
mode:c++