~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/sp-flowdiv.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Ted Gould, Kees Cook
  • Date: 2009-06-24 14:00:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624140043-07stp20mry48hqup
Tags: 0.47~pre0-0ubuntu1
* New upstream release

[ Ted Gould ]
* debian/control: Adding libgsl0 and removing version specifics on boost

[ Kees Cook ]
* debian/watch: updated to run uupdate and mangle pre-release versions.
* Dropped patches that have been taken upstream:
  - 01_mips
  - 02-poppler-0.8.3
  - 03-chinese-inkscape
  - 05_fix_latex_patch
  - 06_gcc-4.4
  - 07_cdr2svg
  - 08_skip-bad-utf-on-pdf-import
  - 09_gtk-clist
  - 10_belarussian
  - 11_libpng
  - 12_desktop
  - 13_slider
  - 100_svg_import_improvements
  - 102_sp_pattern_painter_free
  - 103_bitmap_type_print

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
static void sp_flowdiv_class_init (SPFlowdivClass *klass);
21
21
static void sp_flowdiv_init (SPFlowdiv *group);
22
22
static void sp_flowdiv_release (SPObject *object);
23
 
static Inkscape::XML::Node *sp_flowdiv_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
23
static Inkscape::XML::Node *sp_flowdiv_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
24
24
static void sp_flowdiv_update (SPObject *object, SPCtx *ctx, unsigned int flags);
25
25
static void sp_flowdiv_modified (SPObject *object, guint flags);
26
26
static void sp_flowdiv_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
29
29
static void sp_flowtspan_class_init (SPFlowtspanClass *klass);
30
30
static void sp_flowtspan_init (SPFlowtspan *group);
31
31
static void sp_flowtspan_release (SPObject *object);
32
 
static Inkscape::XML::Node *sp_flowtspan_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
32
static Inkscape::XML::Node *sp_flowtspan_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
33
33
static void sp_flowtspan_update (SPObject *object, SPCtx *ctx, unsigned int flags);
34
34
static void sp_flowtspan_modified (SPObject *object, guint flags);
35
35
static void sp_flowtspan_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
38
38
static void sp_flowpara_class_init (SPFlowparaClass *klass);
39
39
static void sp_flowpara_init (SPFlowpara *group);
40
40
static void sp_flowpara_release (SPObject *object);
41
 
static Inkscape::XML::Node *sp_flowpara_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
41
static Inkscape::XML::Node *sp_flowpara_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
42
42
static void sp_flowpara_update (SPObject *object, SPCtx *ctx, unsigned int flags);
43
43
static void sp_flowpara_modified (SPObject *object, guint flags);
44
44
static void sp_flowpara_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr);
47
47
static void sp_flowline_class_init (SPFlowlineClass *klass);
48
48
static void sp_flowline_release (SPObject *object);
49
49
static void sp_flowline_init (SPFlowline *group);
50
 
static Inkscape::XML::Node *sp_flowline_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
50
static Inkscape::XML::Node *sp_flowline_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
51
51
static void sp_flowline_modified (SPObject *object, guint flags);
52
52
 
53
53
static void sp_flowregionbreak_class_init (SPFlowregionbreakClass *klass);
54
54
static void sp_flowregionbreak_release (SPObject *object);
55
55
static void sp_flowregionbreak_init (SPFlowregionbreak *group);
56
 
static Inkscape::XML::Node *sp_flowregionbreak_write (SPObject *object, Inkscape::XML::Node *repr, guint flags);
 
56
static Inkscape::XML::Node *sp_flowregionbreak_write (SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
57
57
static void sp_flowregionbreak_modified (SPObject *object, guint flags);
58
58
 
59
59
static SPItemClass * flowdiv_parent_class;
193
193
}
194
194
 
195
195
static Inkscape::XML::Node *
196
 
sp_flowdiv_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
196
sp_flowdiv_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
197
197
{
198
198
//      SPFlowdiv *group = SP_FLOWDIV (object);
199
199
 
200
200
        if ( flags&SP_OBJECT_WRITE_BUILD ) {
201
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
202
201
                if ( repr == NULL ) repr = xml_doc->createElement("svg:flowDiv");
203
202
                GSList *l = NULL;
204
203
                for (SPObject* child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
205
204
                        Inkscape::XML::Node* c_repr=NULL;
206
205
                        if ( SP_IS_FLOWTSPAN (child) ) {
207
 
                                c_repr = child->updateRepr(NULL, flags);
 
206
                                c_repr = child->updateRepr(xml_doc, NULL, flags);
208
207
                        } else if ( SP_IS_FLOWPARA(child) ) {
209
 
                                c_repr = child->updateRepr(NULL, flags);
 
208
                                c_repr = child->updateRepr(xml_doc, NULL, flags);
210
209
                        } else if ( SP_IS_STRING(child) ) {
211
210
                                c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
212
211
                        }
230
229
        }
231
230
 
232
231
        if (((SPObjectClass *) (flowdiv_parent_class))->write)
233
 
                ((SPObjectClass *) (flowdiv_parent_class))->write (object, repr, flags);
 
232
                ((SPObjectClass *) (flowdiv_parent_class))->write (object, xml_doc, repr, flags);
234
233
 
235
234
        return repr;
236
235
}
367
366
                (((SPObjectClass *) flowtspan_parent_class)->set) (object, key, value);
368
367
}
369
368
static Inkscape::XML::Node *
370
 
sp_flowtspan_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
369
sp_flowtspan_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
371
370
{
372
371
        if ( flags&SP_OBJECT_WRITE_BUILD ) {
373
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
374
372
                if ( repr == NULL ) repr = xml_doc->createElement("svg:flowSpan");
375
373
                GSList *l = NULL;
376
374
                for (SPObject* child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
377
375
                        Inkscape::XML::Node* c_repr=NULL;
378
376
                        if ( SP_IS_FLOWTSPAN (child) ) {
379
 
                                c_repr = child->updateRepr(NULL, flags);
 
377
                                c_repr = child->updateRepr(xml_doc, NULL, flags);
380
378
                        } else if ( SP_IS_FLOWPARA (child) ) {
381
 
                                        c_repr = child->updateRepr(NULL, flags);
 
379
                                        c_repr = child->updateRepr(xml_doc, NULL, flags);
382
380
                        } else if ( SP_IS_STRING(child) ) {
383
381
                                c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
384
382
                        }
402
400
        }
403
401
 
404
402
        if (((SPObjectClass *) (flowtspan_parent_class))->write)
405
 
                ((SPObjectClass *) (flowtspan_parent_class))->write (object, repr, flags);
 
403
                ((SPObjectClass *) (flowtspan_parent_class))->write (object, xml_doc, repr, flags);
406
404
 
407
405
        return repr;
408
406
}
539
537
                (((SPObjectClass *) flowpara_parent_class)->set) (object, key, value);
540
538
}
541
539
static Inkscape::XML::Node *
542
 
sp_flowpara_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
540
sp_flowpara_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
543
541
{
544
542
        //      SPFlowpara *group = SP_FLOWPARA (object);
545
543
 
546
544
        if ( flags&SP_OBJECT_WRITE_BUILD ) {
547
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
548
545
                if ( repr == NULL ) repr = xml_doc->createElement("svg:flowPara");
549
546
                GSList *l = NULL;
550
547
                for (SPObject* child = sp_object_first_child(object) ; child != NULL ; child = SP_OBJECT_NEXT(child) ) {
551
548
                        Inkscape::XML::Node* c_repr=NULL;
552
549
                        if ( SP_IS_FLOWTSPAN (child) ) {
553
 
                                c_repr = child->updateRepr(NULL, flags);
 
550
                                c_repr = child->updateRepr(xml_doc, NULL, flags);
554
551
                        } else if ( SP_IS_FLOWPARA (child) ) {
555
 
                                c_repr = child->updateRepr(NULL, flags);
 
552
                                c_repr = child->updateRepr(xml_doc, NULL, flags);
556
553
                        } else if ( SP_IS_STRING(child) ) {
557
554
                                c_repr = xml_doc->createTextNode(SP_STRING(child)->string.c_str());
558
555
                        }
576
573
        }
577
574
 
578
575
        if (((SPObjectClass *) (flowpara_parent_class))->write)
579
 
                ((SPObjectClass *) (flowpara_parent_class))->write (object, repr, flags);
 
576
                ((SPObjectClass *) (flowpara_parent_class))->write (object, xml_doc, repr, flags);
580
577
 
581
578
        return repr;
582
579
}
644
641
        flags &= SP_OBJECT_MODIFIED_CASCADE;
645
642
}
646
643
static Inkscape::XML::Node *
647
 
sp_flowline_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
644
sp_flowline_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
648
645
{
649
646
        if ( flags&SP_OBJECT_WRITE_BUILD ) {
650
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
651
647
                if ( repr == NULL ) repr = xml_doc->createElement("svg:flowLine");
652
648
        } else {
653
649
        }
654
650
 
655
651
        if (((SPObjectClass *) (flowline_parent_class))->write)
656
 
                ((SPObjectClass *) (flowline_parent_class))->write (object, repr, flags);
 
652
                ((SPObjectClass *) (flowline_parent_class))->write (object, xml_doc, repr, flags);
657
653
 
658
654
        return repr;
659
655
}
721
717
        flags &= SP_OBJECT_MODIFIED_CASCADE;
722
718
}
723
719
static Inkscape::XML::Node *
724
 
sp_flowregionbreak_write (SPObject *object, Inkscape::XML::Node *repr, guint flags)
 
720
sp_flowregionbreak_write (SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags)
725
721
{
726
722
        if ( flags&SP_OBJECT_WRITE_BUILD ) {
727
 
                Inkscape::XML::Document *xml_doc = sp_document_repr_doc(SP_OBJECT_DOCUMENT(object));
728
723
                if ( repr == NULL ) repr = xml_doc->createElement("svg:flowLine");
729
724
        } else {
730
725
        }
731
726
 
732
727
        if (((SPObjectClass *) (flowregionbreak_parent_class))->write)
733
 
                ((SPObjectClass *) (flowregionbreak_parent_class))->write (object, repr, flags);
 
728
                ((SPObjectClass *) (flowregionbreak_parent_class))->write (object, xml_doc, repr, flags);
734
729
 
735
730
        return repr;
736
731
}