summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fd39535)
raw | patch | inline | side by side (parent: fd39535)
author | miklosh <miklosh@users.sourceforge.net> | |
Mon, 30 Jul 2007 12:02:57 +0000 (12:02 +0000) | ||
committer | miklosh <miklosh@users.sourceforge.net> | |
Mon, 30 Jul 2007 12:02:57 +0000 (12:02 +0000) |
src/extension/internal/pdfinput/svg-builder.cpp | patch | blob | history | |
src/extension/internal/pdfinput/svg-builder.h | patch | blob | history |
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 0aa2067d41f51c632dd7f66a02a92c8072d4036b..e52be554c338edc6c989a110b8f7131388f660e3 100644 (file)
}
SvgBuilder::SvgBuilder(SPDocument *document, gchar *docname, XRef *xref) {
+ _is_top_level = true;
_doc = document;
_docname = docname;
_xref = xref;
}
SvgBuilder::SvgBuilder(SvgBuilder *parent, Inkscape::XML::Node *root) {
+ _is_top_level = false;
_doc = parent->_doc;
_docname = parent->_docname;
_xref = parent->_xref;
Inkscape::GC::release(node);
_group_depth.back()++;
// Set as a layer if this is a top-level group
- if ( _container->parent() == _root ) {
+ if ( _container->parent() == _root && _is_top_level ) {
static int layer_count = 1;
if ( layer_count > 1 ) {
gchar *layer_name = g_strdup_printf("%s%d", _docname, layer_count);
diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h
index a329e3020111d67f42ba6f92419aea3ef0b17736..08035e2143e10351cdee8c96bc7d00a5c22e8486 100644 (file)
bool _invalidated_style;
GfxState *_current_state;
+ bool _is_top_level; // Whether this SvgBuilder is the top-level one
SPDocument *_doc;
gchar *_docname; // Basename of the URI from which this document is created
XRef *_xref; // Cross-reference table from the PDF doc we're converting from