inkscape:connect* attributes not removed in Plain SVG

Bug #500440 reported by su_v on 2009-12-25
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Martin Owens

Bug Description

Inkscape 0.47+devel r8905 on OS X 10.5.8

The new connector code in inkscape 0.47+devel adds a 'inkscape:connector-curvature="0"' attribute to every path. When exporting to Plain SVG I would expect this attribute to be removed.

su_v (suv-lp) on 2009-12-25
tags: added: svg
jazzynico (jazzynico) wrote :

Confirmed on Ubuntu 9.10, Inkscape r8911.

Changed in inkscape:
status: New → Confirmed
Jon A. Cruz (jon-joncruz) wrote :

It also appears to be leaving in:

inkscape:connection-start
inkscape:connection-end
inkscape:connector-type

Changed in inkscape:
importance: Undecided → Low
assignee: nobody → Jon A. Cruz (jon-joncruz)
Jon A. Cruz (jon-joncruz) wrote :

Some element objects knew not to add their "inkscape:*" attributes when exporting as plain, but for attributes that could be on more than a single element this will not work. Hence we had many inkscape extensions sneaking into "plain" SVG.

Adding code to remove all "inkscape:*" and "sodipodi:*" attributes from plain SVG as we prep it for writing.

Changed in inkscape:
importance: Low → Medium
status: Confirmed → In Progress
Changed in inkscape:
status: In Progress → Fix Committed
tags: added: saving
jazzynico (jazzynico) on 2010-01-02
Changed in inkscape:
milestone: none → 0.48
jazzynico (jazzynico) on 2010-08-24
Changed in inkscape:
status: Fix Committed → Fix Released
yoochan (yoochan) wrote :

I saw it again in Inkscape 0.48.3.1 r9886 (Jan 29 2013) (the ubuntu 12.10 version) when converting a pdf

su_v (suv-lp) wrote :

Retesting:
- fixed in Inkscape 0.48.0, 0.48.1
- no longer fixed in Inkscape 0.48.2, 0.48.3.1, 0.48.4, 0.48+devel r12982
using sample file from bug #745784:
<https://bugs.launchpad.net/inkscape/+bug/745784/+attachment/1956796/+files/Inkscape%20bug.svg>

0.48.4, not removed in plain SVG:
       inkscape:connection-start
       inkscape:connection-start-point
       inkscape:connection-end
       inkscape:connection-end-point
       inkscape:connector-curvature
       inkscape:connector-type

r12982, not removed in plain SVG:
       inkscape:connection-start
       inkscape:connection-end
       inkscape:connector-curvature
       inkscape:connector-type

Reopening - regression since 0.48.2, still present in trunk.

Changed in inkscape:
assignee: Jon A. Cruz (jon-joncruz) → nobody
milestone: 0.48 → 0.91
status: Fix Released → Confirmed
summary: - inkscape:connector-curvature="0" is not removed in Plain SVG
+ inkscape:connect* attributes not removed in Plain SVG
su_v (suv-lp) on 2014-01-27
tags: added: regression
su_v (suv-lp) wrote :

Correction:

On 2014-01-27 20:10 +0100, ~suv wrote:
> - fixed in Inkscape 0.48.0, 0.48.1
> - no longer fixed in Inkscape 0.48.2, 0.48.3.1, 0.48.4, 0.48+devel r12982

Oddly, the official Inkscape 0.48.2 package for MacOS X still works as expected.
The frist test above was made with a later, local build (patched to compile with newer glib [1]) - possibly the regression is due to this refactoring of the header includes, or to changes in external dependencies (newer versions).

[1] <http://bazaar.launchpad.net/~inkscape.dev/inkscape/RELEASE_0_48_BRANCH/revision/9840>

su_v (suv-lp) wrote :

On 2014-01-27 23:42 +0100, ~suv wrote:
> possibly the regression is due to this refactoring of the header
> includes, or to changes in external dependencies (newer versions).

Wrong again - the difference is whether Plain SVG is saved via GUI or via CLI (--export-plain-svg).

Stable:
- GUI: all connector-related attributes removed
- CLI: none of the connector-related attributes removed

Trunk r10795:
- GUI: all connector-related attributes removed
- CLI: none of the connector-related attributes removed

Trunk r12982:
- GUI: all connector-related attributes removed
- CLI: some of the connector-related attributes removed (4 out of 12)

tags: removed: regression
su_v (suv-lp) wrote :

Related revision (comment #3):
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/8933>

Remaining issue: remove connector-related attributes when exporting via cli (works as expected via GUI).

jazzynico (jazzynico) wrote :

> Wrong again - the difference is whether Plain SVG is saved via GUI or via CLI (--export-plain-svg).

It reminds me of Bug #201614 "command line ODG export option (e.g. -G, --export-odg=FILENAME)" (not committed yet), comment #3.

jazzynico (jazzynico) on 2014-01-29
tags: added: cli
Changed in inkscape:
status: Confirmed → Triaged
Martin Owens (doctormo) wrote :

I think the fix might be something akin to:

- sp_repr_save_file(doc->rdoc, filename, SP_SVG_NS_URI);
+ Inkscape::Extension::save(Inkscape::Extension::db.get("svg"), doc, filename, false,
                            false, false, Inkscape::Extension::FILE_SAVE_METHOD_SAVE_COPY);

@main.cpp:1148

But I'm not sure how to tell the extension system to use plain-svg yet. Investigations continue...

Martin Owens (doctormo) wrote :

I've committed a fix to r13252 which directs the export code through the svg extension and thus does the requires pruning. This cleans up the code a bit too and reduces duplication.

Changed in inkscape:
assignee: nobody → Martin Owens (doctormo)
status: Triaged → Fix Committed
Changed in inkscape:
status: Fix Committed → Fix Released

One related question: I noticed indeed that the connector-curvature attribute is added to every path, but I can't think of a good reason why it is added at all? Even if you don't use any connectors all paths get this unused attribute, shouldn't it be added only when necessary?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers