From 0a08d7714145c5fc355d086ed7d45dd285bd5d59 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 11 Jun 2016 13:51:02 +0200 Subject: fix-bugs #540591 #1287996 and #456503 related to undo in path parameters of LPE Fixed bugs: - https://launchpad.net/bugs/540591 - https://launchpad.net/bugs/1287996 - https://launchpad.net/bugs/456503 (bzr r14975) --- src/live_effects/effect.cpp | 1 + src/live_effects/parameter/path.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 732c67304..1868ca43b 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -714,6 +714,7 @@ Effect::getParameter(const char * key) { Glib::ustring stringkey(key); + if (param_vector.empty()) return NULL; std::vector::iterator it = param_vector.begin(); while (it != param_vector.end()) { Parameter * param = *it; diff --git a/src/live_effects/parameter/path.cpp b/src/live_effects/parameter/path.cpp index 7ea1d465c..bed191e83 100644 --- a/src/live_effects/parameter/path.cpp +++ b/src/live_effects/parameter/path.cpp @@ -73,7 +73,21 @@ PathParam::PathParam( const Glib::ustring& label, const Glib::ustring& tip, PathParam::~PathParam() { remove_link(); - + using namespace Inkscape::UI; + SPDesktop *desktop = SP_ACTIVE_DESKTOP; + if (desktop) { + if (tools_isactive(desktop, TOOLS_NODES)) { + SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); + if (item != NULL) { + Inkscape::UI::Tools::NodeTool *nt = static_cast(desktop->event_context); + std::set shapes; + ShapeRecord r; + r.item = item; + shapes.insert(r); + nt->_multipath->setItems(shapes); + } + } + } g_free(defvalue); } @@ -207,6 +221,9 @@ PathParam::param_newWidget() void PathParam::param_editOncanvas(SPItem *item, SPDesktop * dt) { + SPDocument *document = dt->getDocument(); + bool saved = DocumentUndo::getUndoSensitive(document); + DocumentUndo::setUndoSensitive(document, false); using namespace Inkscape::UI; // TODO remove the tools_switch atrocity. @@ -220,14 +237,20 @@ PathParam::param_editOncanvas(SPItem *item, SPDesktop * dt) r.role = SHAPE_ROLE_LPE_PARAM; r.edit_transform = item->i2dt_affine(); // TODO is it right? + r.edit_transform *= item->transform.inverse(); if (!href) { r.item = reinterpret_cast(param_effect->getLPEObj()); r.lpe_key = param_key; + Geom::PathVector stored_pv = _pathvector; + param_write_to_repr("M0,0 L1,0"); + const char *svgd = sp_svg_write_path(stored_pv); + param_write_to_repr(svgd); } else { r.item = ref.getObject(); } shapes.insert(r); nt->_multipath->setItems(shapes); + DocumentUndo::setUndoSensitive(document, saved); } void @@ -435,7 +458,8 @@ PathParam::paste_param_path(const char *svgd) SPItem * item = SP_ACTIVE_DESKTOP->getSelection()->singleItem(); if (item != NULL) { Geom::PathVector path_clipboard = sp_svg_read_pathv(svgd); - path_clipboard *= item->i2doc_affine().inverse(); + path_clipboard *= item->i2doc_affine().inverse() * item->transform; + path_clipboard *= Geom::Translate(path_clipboard.initialPoint() - _pathvector.initialPoint()).inverse(); svgd = sp_svg_write_path( path_clipboard ); } -- cgit v1.2.3 From 14a7a0151889e00ad60ebf6b613674e0c5f5b27e Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 11 Jun 2016 15:05:53 +0200 Subject: Fix a typo that spawned a lot of "unused parameter" warnings when compiling (bzr r14976) --- src/style-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/style-internal.h b/src/style-internal.h index 767552784..6cc8c6c4e 100644 --- a/src/style-internal.h +++ b/src/style-internal.h @@ -520,7 +520,7 @@ public: {} SPIEnumBits( Glib::ustring const &name, SPStyleEnum const *enums, unsigned value = 0, bool inherits = true ) : - SPIEnum( name, enums, value, inherit ) + SPIEnum( name, enums, value, inherits ) {} virtual ~SPIEnumBits() -- cgit v1.2.3 From 3b39f6fb0fac1eb0457de170a9af7b7ad629bc71 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 11 Jun 2016 16:25:52 +0200 Subject: A little cleaning up of attributes. (bzr r14977) --- src/attributes-test.h | 105 ++++++++++++++++++++++++++------------------------ src/attributes.cpp | 30 +++++++++------ src/attributes.h | 31 ++++++++------- src/sp-item.cpp | 1 - 4 files changed, 92 insertions(+), 75 deletions(-) (limited to 'src') diff --git a/src/attributes-test.h b/src/attributes-test.h index b8d5d98a5..bfb67064b 100644 --- a/src/attributes-test.h +++ b/src/attributes-test.h @@ -104,21 +104,6 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"end", true}, {"exponent", true}, {"externalResourcesRequired", false}, - {"feBlend", false}, - {"feColorMatrix", false}, - {"feComponentTransfer", false}, - {"feComposite", false}, - {"feConvolveMatrix", false}, - {"feDiffuseLighting", false}, - {"feDisplacementMap", false}, - {"feFlood", false}, - {"feGaussianBlur", false}, - {"feImage", false}, - {"feMerge", false}, - {"feMorphology", false}, - {"feOffset", false}, - {"feSpecularLighting", false}, - {"feTile", false}, {"fill", true}, {"fill-opacity", true}, {"fill-rule", true}, @@ -361,55 +346,33 @@ struct {char const *attr; bool supported;} const all_attrs[] = { /* Extra attributes. */ {"id", true}, + {"sodipodi:docname", true}, + {"sodipodi:insensitive", true}, + {"sodipodi:type", true}, {"inkscape:collect", true}, {"inkscape:document-units", true}, {"inkscape:label", true}, - {"sodipodi:insensitive", true}, - {"sodipodi:nonprintable", true}, {"inkscape:groupmode", true}, - {"sodipodi:version", false}, {"inkscape:version", true}, {"inkscape:object-paths", true}, - {"inkscape:snap-perpendicular", true}, - {"inkscape:snap-tangential", true}, - {"inkscape:snap-path-clip", true}, - {"inkscape:snap-path-mask", true}, - {"inkscape:object-nodes", true}, - {"inkscape:bbox-paths", true}, - {"inkscape:bbox-nodes", true}, - {"inkscape:snap-page", true}, - {"inkscape:snap-global", true}, - {"inkscape:snap-bbox", true}, - {"inkscape:snap-nodes", true}, - {"inkscape:snap-others", true}, - {"inkscape:snap-center", true}, - {"inkscape:snap-smooth-nodes", true}, - {"inkscape:snap-midpoints", true}, - {"inkscape:snap-object-midpoints", true}, - {"inkscape:snap-text-baseline", true}, - {"inkscape:snap-bbox-edge-midpoints", true}, - {"inkscape:snap-bbox-midpoints", true}, - {"inkscape:snap-grids", true}, - {"inkscape:snap-to-guides", true}, - {"inkscape:snap-intersection-paths", true}, + {"inkscape:original-d", true}, {"inkscape:pageopacity", true}, {"inkscape:pageshadow", true}, {"inkscape:path-effect", true}, + // SPItem {"inkscape:transform-center-x", true}, {"inkscape:transform-center-y", true}, {"inkscape:highlight-color", true}, - // Namedview - {"inkscape:zoom", true}, - {"inkscape:cx", true}, - {"inkscape:cy", true}, - {"inkscape:window-width", true}, - {"inkscape:window-height", true}, - {"inkscape:window-x", true}, - {"inkscape:window-y", true}, - {"inkscape:window-maximized", true}, - {"inkscape:current-layer", true}, + + // Measure tool + {"inkscape:measure-start", true}, + {"inkscape:measure-end", true}, + + // Spray tool + {"inkscape:spray-origin", true}, + // Connector tool {"inkscape:connector-type", true}, {"inkscape:connection-start", true}, @@ -420,11 +383,13 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"inkscape:connector-curvature", true}, {"inkscape:connector-avoid", true}, {"inkscape:connector-spacing", true}, + // Ellipse, Spiral, Star {"sodipodi:cx", true}, {"sodipodi:cy", true}, {"sodipodi:rx", true}, {"sodipodi:ry", true}, + // Box tool {"inkscape:perspectiveID", true}, {"inkscape:corner0", true}, @@ -435,6 +400,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"inkscape:vp_y", true}, {"inkscape:vp_z", true}, {"inkscape:persp3d-origin", true}, + // Star tool {"sodipodi:start", true}, {"sodipodi:end", true}, @@ -517,8 +483,47 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"borderopacity", true}, {"pagecolor", true}, + {"inkscape:zoom", true}, + {"inkscape:cx", true}, + {"inkscape:cy", true}, + {"inkscape:window-width", true}, + {"inkscape:window-height", true}, + {"inkscape:window-x", true}, + {"inkscape:window-y", true}, + {"inkscape:window-maximized", true}, + {"inkscape:current-layer", true}, + {"inkscape:pagecheckerboard", true}, + /* SPGuide */ {"position", true}, + {"inkscape:color", true}, + {"inkscape:lockguides", true}, + {"inkscape:locked", true}, + + /* Snapping */ + {"inkscape:snap-perpendicular", true}, + {"inkscape:snap-tangential", true}, + {"inkscape:snap-path-clip", true}, + {"inkscape:snap-path-mask", true}, + {"inkscape:object-nodes", true}, + {"inkscape:bbox-paths", true}, + {"inkscape:bbox-nodes", true}, + {"inkscape:snap-page", true}, + {"inkscape:snap-global", true}, + {"inkscape:snap-bbox", true}, + {"inkscape:snap-nodes", true}, + {"inkscape:snap-others", true}, + {"inkscape:snap-from-guide", true}, + {"inkscape:snap-center", true}, + {"inkscape:snap-smooth-nodes", true}, + {"inkscape:snap-midpoints", true}, + {"inkscape:snap-object-midpoints", true}, + {"inkscape:snap-text-baseline", true}, + {"inkscape:snap-bbox-edge-midpoints", true}, + {"inkscape:snap-bbox-midpoints", true}, + {"inkscape:snap-grids", true}, + {"inkscape:snap-to-guides", true}, + {"inkscape:snap-intersection-paths", true}, /* SPTag */ {"inkscape:expanded", true} diff --git a/src/attributes.cpp b/src/attributes.cpp index 646c2ab0c..24c16d5fc 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -14,6 +14,7 @@ #include // g_assert() #include "attributes.h" +#include typedef struct { gint code; @@ -28,15 +29,24 @@ static SPStyleProp const props[] = { {SP_ATTR_INVALID, NULL}, /* SPObject */ {SP_ATTR_ID, "id"}, + {SP_ATTR_STYLE, "style"}, {SP_ATTR_INKSCAPE_COLLECT, "inkscape:collect"}, {SP_ATTR_INKSCAPE_LABEL, "inkscape:label"}, + /* SPRoot */ + {SP_ATTR_VERSION, "version"}, + {SP_ATTR_INKSCAPE_VERSION, "inkscape:version"}, + {SP_ATTR_WIDTH, "width"}, + {SP_ATTR_HEIGHT, "height"}, + {SP_ATTR_VIEWBOX, "viewBox"}, + {SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"}, + {SP_ATTR_ONLOAD, "onload"}, + {SP_ATTR_SODIPODI_DOCNAME, "sodipodi:docname"}, /* SPItem */ {SP_ATTR_TRANSFORM, "transform"}, + {SP_ATTR_SODIPODI_TYPE, "sodipodi:type"}, {SP_ATTR_SODIPODI_INSENSITIVE, "sodipodi:insensitive"}, - {SP_ATTR_SODIPODI_NONPRINTABLE, "sodipodi:nonprintable"}, {SP_ATTR_CONNECTOR_AVOID, "inkscape:connector-avoid"}, {SP_ATTR_CONNECTION_POINTS, "inkscape:connection-points"}, - {SP_ATTR_STYLE, "style"}, {SP_ATTR_TRANSFORM_CENTER_X, "inkscape:transform-center-x"}, {SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"}, {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"}, @@ -53,14 +63,6 @@ static SPStyleProp const props[] = { {SP_ATTR_TARGET, "target"}, {SP_ATTR_INKSCAPE_GROUPMODE, "inkscape:groupmode"}, {SP_ATTR_INKSCAPE_EXPANDED, "inkscape:expanded"}, - /* SPRoot */ - {SP_ATTR_VERSION, "version"}, - {SP_ATTR_WIDTH, "width"}, - {SP_ATTR_HEIGHT, "height"}, - {SP_ATTR_VIEWBOX, "viewBox"}, - {SP_ATTR_PRESERVEASPECTRATIO, "preserveAspectRatio"}, - {SP_ATTR_INKSCAPE_VERSION, "inkscape:version"}, - {SP_ATTR_ONLOAD, "onload"}, /* SPNamedView */ {SP_ATTR_VIEWONLY, "viewonly"}, {SP_ATTR_SHOWGUIDES, "showguides"}, @@ -99,6 +101,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_BBOX, "inkscape:snap-bbox"}, {SP_ATTR_INKSCAPE_SNAP_NODE, "inkscape:snap-nodes"}, {SP_ATTR_INKSCAPE_SNAP_OTHERS, "inkscape:snap-others"}, + {SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, "inkscape:snap-from-guide"}, {SP_ATTR_INKSCAPE_SNAP_ROTATION_CENTER, "inkscape:snap-center"}, {SP_ATTR_INKSCAPE_SNAP_GRID, "inkscape:snap-grids"}, {SP_ATTR_INKSCAPE_SNAP_GUIDE, "inkscape:snap-to-guides"}, @@ -120,7 +123,6 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG {SP_ATTR_INKSCAPE_LOCKGUIDES, "inkscape:lockguides"}, {SP_ATTR_UNITS, "units"}, - {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, /* SPColorProfile */ {SP_ATTR_LOCAL, "local"}, {SP_ATTR_NAME, "name"}, @@ -130,6 +132,9 @@ static SPStyleProp const props[] = { {SP_ATTR_POSITION, "position"}, {SP_ATTR_INKSCAPE_COLOR, "inkscape:color"}, {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, + /* Measure tool */ + {SP_ATTR_INKSCAPE_MEASURE_START, "inkscape:measure-start"}, + {SP_ATTR_INKSCAPE_MEASURE_END, "inkscape:measure-end"}, /* SPImage */ {SP_ATTR_X, "x"}, {SP_ATTR_Y, "y"}, @@ -139,6 +144,7 @@ static SPStyleProp const props[] = { /* (Note: XML representation of connectors may change in future.) */ {SP_ATTR_CONNECTOR_TYPE, "inkscape:connector-type"}, {SP_ATTR_CONNECTOR_CURVATURE, "inkscape:connector-curvature"}, + {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, {SP_ATTR_CONNECTION_START, "inkscape:connection-start"}, {SP_ATTR_CONNECTION_END, "inkscape:connection-end"}, {SP_ATTR_CONNECTION_START_POINT, "inkscape:connection-start-point"}, @@ -544,6 +550,8 @@ sp_attribute_lookup(gchar const *key) if(g_str_equal(const_cast(static_cast(props[i].name)), key)) return GPOINTER_TO_UINT(GINT_TO_POINTER(props[i].code)); } + // std::cerr << "sp_attribute_lookup: invalid attribute: " + // << (key?key:"Null") << std::endl; return SP_ATTR_INVALID; } diff --git a/src/attributes.h b/src/attributes.h index f5544d0a1..e82db5f2a 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -28,15 +28,24 @@ enum SPAttributeEnum { SP_ATTR_INVALID, ///< Must have value 0. /* SPObject */ SP_ATTR_ID, + SP_ATTR_STYLE, SP_ATTR_INKSCAPE_COLLECT, SP_ATTR_INKSCAPE_LABEL, + /* SPRoot Put these near top as the apply to the entire SVG */ + SP_ATTR_VERSION, + SP_ATTR_INKSCAPE_VERSION, + SP_ATTR_WIDTH, + SP_ATTR_HEIGHT, + SP_ATTR_VIEWBOX, + SP_ATTR_PRESERVEASPECTRATIO, + SP_ATTR_ONLOAD, + SP_ATTR_SODIPODI_DOCNAME, /* SPItem */ SP_ATTR_TRANSFORM, + SP_ATTR_SODIPODI_TYPE, SP_ATTR_SODIPODI_INSENSITIVE, - SP_ATTR_SODIPODI_NONPRINTABLE, SP_ATTR_CONNECTOR_AVOID, SP_ATTR_CONNECTION_POINTS, - SP_ATTR_STYLE, SP_ATTR_TRANSFORM_CENTER_X, SP_ATTR_TRANSFORM_CENTER_Y, SP_ATTR_INKSCAPE_PATH_EFFECT, @@ -54,14 +63,6 @@ enum SPAttributeEnum { /* SPGroup */ SP_ATTR_INKSCAPE_GROUPMODE, SP_ATTR_INKSCAPE_EXPANDED, - /* SPRoot */ - SP_ATTR_VERSION, - SP_ATTR_WIDTH, - SP_ATTR_HEIGHT, - SP_ATTR_VIEWBOX, - SP_ATTR_PRESERVEASPECTRATIO, - SP_ATTR_INKSCAPE_VERSION, - SP_ATTR_ONLOAD, /* SPNamedView */ SP_ATTR_VIEWONLY, SP_ATTR_SHOWGUIDES, @@ -100,7 +101,7 @@ enum SPAttributeEnum { SP_ATTR_INKSCAPE_SNAP_BBOX, SP_ATTR_INKSCAPE_SNAP_NODE, SP_ATTR_INKSCAPE_SNAP_OTHERS, - //SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, + SP_ATTR_INKSCAPE_SNAP_FROM_GUIDE, SP_ATTR_INKSCAPE_SNAP_ROTATION_CENTER, SP_ATTR_INKSCAPE_SNAP_GRID, SP_ATTR_INKSCAPE_SNAP_GUIDE, @@ -122,7 +123,6 @@ enum SPAttributeEnum { SP_ATTR_INKSCAPE_DOCUMENT_UNITS, SP_ATTR_INKSCAPE_LOCKGUIDES, SP_ATTR_UNITS, - SP_ATTR_INKSCAPE_CONNECTOR_SPACING, /* SPColorProfile */ SP_ATTR_LOCAL, SP_ATTR_NAME, @@ -132,7 +132,10 @@ enum SPAttributeEnum { SP_ATTR_POSITION, SP_ATTR_INKSCAPE_COLOR, SP_ATTR_INKSCAPE_LOCKED, - /* SPImage */ + /* Measure tool */ + SP_ATTR_INKSCAPE_MEASURE_START, + SP_ATTR_INKSCAPE_MEASURE_END, + /* SPImage, SPRect, etc. */ SP_ATTR_X, SP_ATTR_Y, /* SPPath */ @@ -140,6 +143,7 @@ enum SPAttributeEnum { SP_ATTR_INKSCAPE_ORIGINAL_D, SP_ATTR_CONNECTOR_TYPE, SP_ATTR_CONNECTOR_CURVATURE, + SP_ATTR_INKSCAPE_CONNECTOR_SPACING, SP_ATTR_CONNECTION_START, SP_ATTR_CONNECTION_END, SP_ATTR_CONNECTION_START_POINT, @@ -334,6 +338,7 @@ enum SPAttributeEnum { SP_ATTR_RESTART, SP_ATTR_REPEATCOUNT, SP_ATTR_REPEATDUR, + /* Interpolating animations */ SP_ATTR_CALCMODE, //SP_ATTR_VALUES, diff --git a/src/sp-item.cpp b/src/sp-item.cpp index af81194c2..9fd6e8ecc 100644 --- a/src/sp-item.cpp +++ b/src/sp-item.cpp @@ -399,7 +399,6 @@ void SPItem::build(SPDocument *document, Inkscape::XML::Node *repr) { object->readAttr( "clip-path" ); object->readAttr( "mask" ); object->readAttr( "sodipodi:insensitive" ); - object->readAttr( "sodipodi:nonprintable" ); object->readAttr( "inkscape:transform-center-x" ); object->readAttr( "inkscape:transform-center-y" ); object->readAttr( "inkscape:connector-avoid" ); -- cgit v1.2.3 From 64b7a2d79f1e160e9e4ee723fd89f8aadd177924 Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 11 Jun 2016 19:20:13 +0200 Subject: Clean up includes after r14955 Fixed bugs: - https://launchpad.net/bugs/1589300 (bzr r14978) --- src/extension/param/bool.cpp | 1 - src/extension/param/float.cpp | 1 - src/extension/param/int.cpp | 1 - src/extension/param/parameter.cpp | 3 ++- 4 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index 87364d80f..d64f798ba 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -19,7 +19,6 @@ #include "../extension.h" #include "bool.h" #include "preferences.h" -#include namespace Inkscape { namespace Extension { diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp index 4e3cbfedc..dff7cbf46 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -20,7 +20,6 @@ #include "extension/extension.h" #include "preferences.h" #include "float.h" -#include namespace Inkscape { namespace Extension { diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp index 605aab5ad..dda801282 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -20,7 +20,6 @@ #include "extension/extension.h" #include "preferences.h" #include "int.h" -#include namespace Inkscape { namespace Extension { diff --git a/src/extension/param/parameter.cpp b/src/extension/param/parameter.cpp index 27d9bdf9b..e4a614667 100644 --- a/src/extension/param/parameter.cpp +++ b/src/extension/param/parameter.cpp @@ -20,7 +20,6 @@ #endif #include -#include #include "ui/widget/color-notebook.h" #include @@ -41,6 +40,8 @@ #include "radiobutton.h" #include "string.h" +#include + namespace Inkscape { namespace Extension { -- cgit v1.2.3 From 381c20f462265052cd320a26fb779b1d07a7dffc Mon Sep 17 00:00:00 2001 From: Eduard Braun Date: Sat, 11 Jun 2016 19:25:23 +0200 Subject: Extensions: Use underscored variants of parameters / attribute names in internal extensions where translation via gettext is desired. Fixed bugs: - https://launchpad.net/bugs/1591230 (bzr r14979) --- .../internal/bitmap/adaptiveThreshold.cpp | 6 +- src/extension/internal/bitmap/addNoise.cpp | 2 +- src/extension/internal/bitmap/blur.cpp | 4 +- src/extension/internal/bitmap/channel.cpp | 2 +- src/extension/internal/bitmap/charcoal.cpp | 4 +- src/extension/internal/bitmap/colorize.cpp | 2 +- src/extension/internal/bitmap/contrast.cpp | 2 +- src/extension/internal/bitmap/crop.cpp | 8 +- src/extension/internal/bitmap/cycleColormap.cpp | 2 +- src/extension/internal/bitmap/edge.cpp | 2 +- src/extension/internal/bitmap/emboss.cpp | 4 +- src/extension/internal/bitmap/gaussianBlur.cpp | 4 +- src/extension/internal/bitmap/implode.cpp | 2 +- src/extension/internal/bitmap/level.cpp | 6 +- src/extension/internal/bitmap/levelChannel.cpp | 8 +- src/extension/internal/bitmap/medianFilter.cpp | 2 +- src/extension/internal/bitmap/modulate.cpp | 6 +- src/extension/internal/bitmap/oilPaint.cpp | 2 +- src/extension/internal/bitmap/opacity.cpp | 2 +- src/extension/internal/bitmap/raise.cpp | 6 +- src/extension/internal/bitmap/reduceNoise.cpp | 2 +- src/extension/internal/bitmap/sample.cpp | 4 +- src/extension/internal/bitmap/shade.cpp | 6 +- src/extension/internal/bitmap/sharpen.cpp | 4 +- src/extension/internal/bitmap/solarize.cpp | 2 +- src/extension/internal/bitmap/spread.cpp | 2 +- src/extension/internal/bitmap/swirl.cpp | 2 +- src/extension/internal/bitmap/threshold.cpp | 2 +- src/extension/internal/bitmap/unsharpmask.cpp | 8 +- src/extension/internal/bitmap/wave.cpp | 4 +- src/extension/internal/bluredge.cpp | 4 +- src/extension/internal/cairo-ps-out.cpp | 40 +++--- src/extension/internal/cairo-renderer-pdf-out.cpp | 20 +-- src/extension/internal/emf-inout.cpp | 22 +-- src/extension/internal/filter/bevels.h | 28 ++-- src/extension/internal/filter/blurs.h | 36 ++--- src/extension/internal/filter/bumps.h | 96 ++++++------- src/extension/internal/filter/color.h | 148 ++++++++++----------- src/extension/internal/filter/distort.h | 36 ++--- src/extension/internal/filter/image.h | 6 +- src/extension/internal/filter/morphology.h | 44 +++--- src/extension/internal/filter/overlays.h | 18 +-- src/extension/internal/filter/paint.h | 148 ++++++++++----------- src/extension/internal/filter/protrusions.h | 2 +- src/extension/internal/filter/shadows.h | 12 +- src/extension/internal/filter/textures.h | 24 ++-- src/extension/internal/filter/transparency.h | 34 ++--- src/extension/internal/gdkpixbuf-input.cpp | 2 +- src/extension/internal/grid.cpp | 10 +- src/extension/internal/wmf-inout.cpp | 18 +-- src/extension/prefdialog.cpp | 2 +- 51 files changed, 431 insertions(+), 431 deletions(-) (limited to 'src') diff --git a/src/extension/internal/bitmap/adaptiveThreshold.cpp b/src/extension/internal/bitmap/adaptiveThreshold.cpp index 9c9d6796b..3d7475cb3 100644 --- a/src/extension/internal/bitmap/adaptiveThreshold.cpp +++ b/src/extension/internal/bitmap/adaptiveThreshold.cpp @@ -38,9 +38,9 @@ AdaptiveThreshold::init(void) "\n" "" N_("Adaptive Threshold") "\n" "org.inkscape.effect.bitmap.adaptiveThreshold\n" - "5\n" - "5\n" - "0\n" + "5\n" + "5\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/addNoise.cpp b/src/extension/internal/bitmap/addNoise.cpp index 0322dec0c..02bb877b7 100644 --- a/src/extension/internal/bitmap/addNoise.cpp +++ b/src/extension/internal/bitmap/addNoise.cpp @@ -44,7 +44,7 @@ AddNoise::init(void) "\n" "" N_("Add Noise") "\n" "org.inkscape.effect.bitmap.addNoise\n" - "\n" + "\n" "<_item value='Uniform Noise'>" N_("Uniform Noise") "\n" "<_item value='Gaussian Noise'>" N_("Gaussian Noise") "\n" "<_item value='Multiplicative Gaussian Noise'>" N_("Multiplicative Gaussian Noise") "\n" diff --git a/src/extension/internal/bitmap/blur.cpp b/src/extension/internal/bitmap/blur.cpp index cc44994ec..37a56b8a9 100644 --- a/src/extension/internal/bitmap/blur.cpp +++ b/src/extension/internal/bitmap/blur.cpp @@ -37,8 +37,8 @@ Blur::init(void) "\n" "" N_("Blur") "\n" "org.inkscape.effect.bitmap.blur\n" - "1\n" - "0.5\n" + "1\n" + "0.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/channel.cpp b/src/extension/internal/bitmap/channel.cpp index 372e7456b..57ef0421b 100644 --- a/src/extension/internal/bitmap/channel.cpp +++ b/src/extension/internal/bitmap/channel.cpp @@ -47,7 +47,7 @@ Channel::init(void) "\n" "" N_("Channel") "\n" "org.inkscape.effect.bitmap.channel\n" - "\n" + "\n" "<_item value='Red Channel'>" N_("Red Channel") "\n" "<_item value='Green Channel'>" N_("Green Channel") "\n" "<_item value='Blue Channel'>" N_("Blue Channel") "\n" diff --git a/src/extension/internal/bitmap/charcoal.cpp b/src/extension/internal/bitmap/charcoal.cpp index f647f8711..2cfd741d1 100644 --- a/src/extension/internal/bitmap/charcoal.cpp +++ b/src/extension/internal/bitmap/charcoal.cpp @@ -37,8 +37,8 @@ Charcoal::init(void) "\n" "" N_("Charcoal") "\n" "org.inkscape.effect.bitmap.charcoal\n" - "1\n" - "0.5\n" + "1\n" + "0.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/colorize.cpp b/src/extension/internal/bitmap/colorize.cpp index 0b3b95420..1c4b8a696 100644 --- a/src/extension/internal/bitmap/colorize.cpp +++ b/src/extension/internal/bitmap/colorize.cpp @@ -49,7 +49,7 @@ Colorize::init(void) "\n" "" N_("Colorize") "\n" "org.inkscape.effect.bitmap.colorize\n" - "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/contrast.cpp b/src/extension/internal/bitmap/contrast.cpp index c527536d9..a3be77808 100644 --- a/src/extension/internal/bitmap/contrast.cpp +++ b/src/extension/internal/bitmap/contrast.cpp @@ -39,7 +39,7 @@ Contrast::init(void) "\n" "" N_("Contrast") "\n" "org.inkscape.effect.bitmap.contrast\n" - "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/crop.cpp b/src/extension/internal/bitmap/crop.cpp index 02d92668b..8f6c503ca 100644 --- a/src/extension/internal/bitmap/crop.cpp +++ b/src/extension/internal/bitmap/crop.cpp @@ -65,10 +65,10 @@ Crop::init(void) "\n" "" N_("Crop") "\n" "org.inkscape.effect.bitmap.crop\n" - "0\n" - "0\n" - "0\n" - "0\n" + "0\n" + "0\n" + "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/cycleColormap.cpp b/src/extension/internal/bitmap/cycleColormap.cpp index 349b6d9f5..8d55087a6 100644 --- a/src/extension/internal/bitmap/cycleColormap.cpp +++ b/src/extension/internal/bitmap/cycleColormap.cpp @@ -36,7 +36,7 @@ CycleColormap::init(void) "\n" "" N_("Cycle Colormap") "\n" "org.inkscape.effect.bitmap.cycleColormap\n" - "180\n" + "180\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/edge.cpp b/src/extension/internal/bitmap/edge.cpp index 2d165331f..486ce0e4e 100644 --- a/src/extension/internal/bitmap/edge.cpp +++ b/src/extension/internal/bitmap/edge.cpp @@ -36,7 +36,7 @@ Edge::init(void) "\n" "" N_("Edge") "\n" "org.inkscape.effect.bitmap.edge\n" - "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/emboss.cpp b/src/extension/internal/bitmap/emboss.cpp index 634c71a98..9518cf320 100644 --- a/src/extension/internal/bitmap/emboss.cpp +++ b/src/extension/internal/bitmap/emboss.cpp @@ -37,8 +37,8 @@ Emboss::init(void) "\n" "" N_("Emboss") "\n" "org.inkscape.effect.bitmap.emboss\n" - "1.0\n" - "0.5\n" + "1.0\n" + "0.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/gaussianBlur.cpp b/src/extension/internal/bitmap/gaussianBlur.cpp index 7d93ef66a..d68cd59bc 100644 --- a/src/extension/internal/bitmap/gaussianBlur.cpp +++ b/src/extension/internal/bitmap/gaussianBlur.cpp @@ -37,8 +37,8 @@ GaussianBlur::init(void) "\n" "" N_("Gaussian Blur") "\n" "org.inkscape.effect.bitmap.gaussianBlur\n" - "5.0\n" - "5.0\n" + "5.0\n" + "5.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/implode.cpp b/src/extension/internal/bitmap/implode.cpp index 15f92f5f6..c24fb7bf5 100644 --- a/src/extension/internal/bitmap/implode.cpp +++ b/src/extension/internal/bitmap/implode.cpp @@ -36,7 +36,7 @@ Implode::init(void) "\n" "" N_("Implode") "\n" "org.inkscape.effect.bitmap.implode\n" - "10\n" + "10\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/level.cpp b/src/extension/internal/bitmap/level.cpp index 9c266eb11..168328e8f 100644 --- a/src/extension/internal/bitmap/level.cpp +++ b/src/extension/internal/bitmap/level.cpp @@ -40,9 +40,9 @@ Level::init(void) "\n" "" N_("Level") "\n" "org.inkscape.effect.bitmap.level\n" - "0\n" - "100\n" - "1\n" + "0\n" + "100\n" + "1\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/levelChannel.cpp b/src/extension/internal/bitmap/levelChannel.cpp index 3e39657c3..d5c636059 100644 --- a/src/extension/internal/bitmap/levelChannel.cpp +++ b/src/extension/internal/bitmap/levelChannel.cpp @@ -51,7 +51,7 @@ LevelChannel::init(void) "\n" "" N_("Level (with Channel)") "\n" "org.inkscape.effect.bitmap.levelChannel\n" - "\n" + "\n" "<_item value='Red Channel'>" N_("Red Channel") "\n" "<_item value='Green Channel'>" N_("Green Channel") "\n" "<_item value='Blue Channel'>" N_("Blue Channel") "\n" @@ -62,9 +62,9 @@ LevelChannel::init(void) "<_item value='Opacity Channel'>" N_("Opacity Channel") "\n" "<_item value='Matte Channel'>" N_("Matte Channel") "\n" "\n" - "0.0\n" - "100.0\n" - "1.0\n" + "0.0\n" + "100.0\n" + "1.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/medianFilter.cpp b/src/extension/internal/bitmap/medianFilter.cpp index 44ff9e543..64837850d 100644 --- a/src/extension/internal/bitmap/medianFilter.cpp +++ b/src/extension/internal/bitmap/medianFilter.cpp @@ -36,7 +36,7 @@ MedianFilter::init(void) "\n" "" N_("Median") "\n" "org.inkscape.effect.bitmap.medianFilter\n" - "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/modulate.cpp b/src/extension/internal/bitmap/modulate.cpp index d123a5c15..3b3a2495c 100644 --- a/src/extension/internal/bitmap/modulate.cpp +++ b/src/extension/internal/bitmap/modulate.cpp @@ -39,9 +39,9 @@ Modulate::init(void) "\n" "" N_("HSB Adjust") "\n" "org.inkscape.effect.bitmap.modulate\n" - "0\n" - "0\n" - "0\n" + "0\n" + "0\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/oilPaint.cpp b/src/extension/internal/bitmap/oilPaint.cpp index 5377ab2b1..88c85a590 100644 --- a/src/extension/internal/bitmap/oilPaint.cpp +++ b/src/extension/internal/bitmap/oilPaint.cpp @@ -36,7 +36,7 @@ OilPaint::init(void) "\n" "" N_("Oil Paint") "\n" "org.inkscape.effect.bitmap.oilPaint\n" - "3\n" + "3\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/opacity.cpp b/src/extension/internal/bitmap/opacity.cpp index f9b4bbc27..a25e99543 100644 --- a/src/extension/internal/bitmap/opacity.cpp +++ b/src/extension/internal/bitmap/opacity.cpp @@ -37,7 +37,7 @@ Opacity::init(void) "\n" "" N_("Opacity") "\n" "org.inkscape.effect.bitmap.opacity\n" - "80.0\n" + "80.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/raise.cpp b/src/extension/internal/bitmap/raise.cpp index 9ca832c30..e85cc747a 100644 --- a/src/extension/internal/bitmap/raise.cpp +++ b/src/extension/internal/bitmap/raise.cpp @@ -39,9 +39,9 @@ Raise::init(void) "\n" "" N_("Raise") "\n" "org.inkscape.effect.bitmap.raise\n" - "6\n" - "6\n" - "0\n" + "6\n" + "6\n" + "0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/reduceNoise.cpp b/src/extension/internal/bitmap/reduceNoise.cpp index db227ec41..b0d8b9c2d 100644 --- a/src/extension/internal/bitmap/reduceNoise.cpp +++ b/src/extension/internal/bitmap/reduceNoise.cpp @@ -39,7 +39,7 @@ ReduceNoise::init(void) "\n" "" N_("Reduce Noise") "\n" "org.inkscape.effect.bitmap.reduceNoise\n" - "-1\n" + "-1\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/sample.cpp b/src/extension/internal/bitmap/sample.cpp index 706ae1d5b..081303b73 100644 --- a/src/extension/internal/bitmap/sample.cpp +++ b/src/extension/internal/bitmap/sample.cpp @@ -38,8 +38,8 @@ Sample::init(void) "\n" "" N_("Resample") "\n" "org.inkscape.effect.bitmap.sample\n" - "100\n" - "100\n" + "100\n" + "100\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/shade.cpp b/src/extension/internal/bitmap/shade.cpp index de7c9d669..927a3a578 100644 --- a/src/extension/internal/bitmap/shade.cpp +++ b/src/extension/internal/bitmap/shade.cpp @@ -39,9 +39,9 @@ Shade::init(void) "\n" "" N_("Shade") "\n" "org.inkscape.effect.bitmap.shade\n" - "30\n" - "30\n" - "false\n" + "30\n" + "30\n" + "false\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/sharpen.cpp b/src/extension/internal/bitmap/sharpen.cpp index 89181abad..d397d46c8 100644 --- a/src/extension/internal/bitmap/sharpen.cpp +++ b/src/extension/internal/bitmap/sharpen.cpp @@ -37,8 +37,8 @@ Sharpen::init(void) "\n" "" N_("Sharpen") "\n" "org.inkscape.effect.bitmap.sharpen\n" - "1.0\n" - "0.5\n" + "1.0\n" + "0.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/solarize.cpp b/src/extension/internal/bitmap/solarize.cpp index d333d2ae8..5f8cdd17c 100644 --- a/src/extension/internal/bitmap/solarize.cpp +++ b/src/extension/internal/bitmap/solarize.cpp @@ -38,7 +38,7 @@ Solarize::init(void) "\n" "" N_("Solarize") "\n" "org.inkscape.effect.bitmap.solarize\n" - "50\n" + "50\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/spread.cpp b/src/extension/internal/bitmap/spread.cpp index 3e9110dd7..e38e2a927 100644 --- a/src/extension/internal/bitmap/spread.cpp +++ b/src/extension/internal/bitmap/spread.cpp @@ -36,7 +36,7 @@ Spread::init(void) "\n" "" N_("Dither") "\n" "org.inkscape.effect.bitmap.spread\n" - "3\n" + "3\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/swirl.cpp b/src/extension/internal/bitmap/swirl.cpp index 1f2776031..98efa6238 100644 --- a/src/extension/internal/bitmap/swirl.cpp +++ b/src/extension/internal/bitmap/swirl.cpp @@ -36,7 +36,7 @@ Swirl::init(void) "\n" "" N_("Swirl") "\n" "org.inkscape.effect.bitmap.swirl\n" - "30\n" + "30\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/threshold.cpp b/src/extension/internal/bitmap/threshold.cpp index 0db0f7749..9f10b2c42 100644 --- a/src/extension/internal/bitmap/threshold.cpp +++ b/src/extension/internal/bitmap/threshold.cpp @@ -37,7 +37,7 @@ Threshold::init(void) // TRANSLATORS: see http://docs.gimp.org/en/gimp-tool-threshold.html "" N_("Threshold") "\n" "org.inkscape.effect.bitmap.threshold\n" - "\n" + "\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/unsharpmask.cpp b/src/extension/internal/bitmap/unsharpmask.cpp index 222feae8d..c5a7e9291 100644 --- a/src/extension/internal/bitmap/unsharpmask.cpp +++ b/src/extension/internal/bitmap/unsharpmask.cpp @@ -40,10 +40,10 @@ Unsharpmask::init(void) "\n" "" N_("Unsharp Mask") "\n" "org.inkscape.effect.bitmap.unsharpmask\n" - "5.0\n" - "5.0\n" - "50.0\n" - "5.0\n" + "5.0\n" + "5.0\n" + "50.0\n" + "5.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bitmap/wave.cpp b/src/extension/internal/bitmap/wave.cpp index 158ae7e64..1ccaa1d5e 100644 --- a/src/extension/internal/bitmap/wave.cpp +++ b/src/extension/internal/bitmap/wave.cpp @@ -37,8 +37,8 @@ Wave::init(void) "\n" "" N_("Wave") "\n" "org.inkscape.effect.bitmap.wave\n" - "25\n" - "150\n" + "25\n" + "150\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 0e3aa98ce..4a04e3c33 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -131,8 +131,8 @@ BlurEdge::init (void) "\n" "" N_("Inset/Outset Halo") "\n" "org.inkscape.effect.bluredge\n" - "1.0\n" - "11\n" + "1.0\n" + "11\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/cairo-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp index 5dc412301..e8f47e79e 100644 --- a/src/extension/internal/cairo-ps-out.cpp +++ b/src/extension/internal/cairo-ps-out.cpp @@ -326,23 +326,23 @@ CairoPsOutput::init (void) "\n" "" N_("PostScript") "\n" "" SP_MODULE_KEY_PRINT_CAIRO_PS "\n" - "\n" + "\n" "<_item value='PS3'>" N_("PostScript level 3") "\n" "<_item value='PS2'>" N_("PostScript level 2") "\n" "\n" - "\n" - "\n" - "\n" - "\n" + "\n" + "<_option value=\"embed\">" N_("Embed fonts") "\n" + "<_option value=\"paths\">" N_("Convert text to paths") "\n" + "<_option value=\"LaTeX\">" N_("Omit text in PDF and create LaTeX file") "\n" "\n" - "true\n" - "96\n" - "\n" + "true\n" + "96\n" + "\n" "<_option value=\"page\">" N_("Use document's page size") "" "<_option value=\"drawing\">" N_("Use exported object's size") "" "" - "0\n" - "\n" + "0\n" + "\n" "\n" ".ps\n" "image/x-postscript\n" @@ -368,23 +368,23 @@ CairoEpsOutput::init (void) "\n" "" N_("Encapsulated PostScript") "\n" "" SP_MODULE_KEY_PRINT_CAIRO_EPS "\n" - "\n" + "\n" "<_item value='PS3'>" N_("PostScript level 3") "\n" "<_item value='PS2'>" N_("PostScript level 2") "\n" "\n" - "\n" - "\n" - "\n" - "\n" + "\n" + "<_option value=\"embed\">" N_("Embed fonts") "\n" + "<_option value=\"paths\">" N_("Convert text to paths") "\n" + "<_option value=\"LaTeX\">" N_("Omit text in PDF and create LaTeX file") "\n" "\n" - "true\n" - "96\n" - "\n" + "true\n" + "96\n" + "\n" "<_option value=\"page\">" N_("Use document's page size") "" "<_option value=\"drawing\">" N_("Use exported object's size") "" "" - "0\n" - "\n" + "0\n" + "\n" "\n" ".eps\n" "image/x-e-postscript\n" diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp index e5c9406c9..5576676b2 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.cpp +++ b/src/extension/internal/cairo-renderer-pdf-out.cpp @@ -241,25 +241,25 @@ CairoRendererPdfOutput::init (void) "\n" "Portable Document Format\n" "org.inkscape.output.pdf.cairorenderer\n" - "\n" + "\n" #if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)) "<_item value='PDF-1.5'>" N_("PDF 1.5") "\n" #endif "<_item value='PDF-1.4'>" N_("PDF 1.4") "\n" "\n" - "\n" - "\n" - "\n" - "\n" + "\n" + "<_option value=\"embed\">" N_("Embed fonts") "\n" + "<_option value=\"paths\">" N_("Convert text to paths") "\n" + "<_option value=\"LaTeX\">" N_("Omit text in PDF and create LaTeX file") "\n" "\n" - "true\n" - "96\n" - "\n" + "true\n" + "96\n" + "\n" "<_option value=\"page\">" N_("Use document's page size") "" "<_option value=\"drawing\">" N_("Use exported object's size") "" "" - "0\n" - "\n" + "0\n" + "\n" "\n" ".pdf\n" "application/pdf\n" diff --git a/src/extension/internal/emf-inout.cpp b/src/extension/internal/emf-inout.cpp index 13520c40b..12751c5ec 100644 --- a/src/extension/internal/emf-inout.cpp +++ b/src/extension/internal/emf-inout.cpp @@ -3614,17 +3614,17 @@ Emf::init (void) "\n" "" N_("EMF Output") "\n" "org.inkscape.output.emf\n" - "true\n" - "true\n" - "true\n" - "true\n" - "false\n" - "false\n" - "false\n" - "false\n" - "false\n" - "false\n" - "false\n" + "true\n" + "true\n" + "true\n" + "true\n" + "false\n" + "false\n" + "false\n" + "false\n" + "false\n" + "false\n" + "false\n" "\n" ".emf\n" "image/x-emf\n" diff --git a/src/extension/internal/filter/bevels.h b/src/extension/internal/filter/bevels.h index ea9d537ad..68e94ad3d 100644 --- a/src/extension/internal/filter/bevels.h +++ b/src/extension/internal/filter/bevels.h @@ -52,10 +52,10 @@ public: "\n" "" N_("Diffuse Light") "\n" "org.inkscape.effect.filter.DiffuseLight\n" - "6\n" - "25\n" - "235\n" - "-1\n" + "6\n" + "25\n" + "235\n" + "-1\n" "\n" "all\n" "\n" @@ -132,11 +132,11 @@ public: "\n" "" N_("Matte Jelly") "\n" "org.inkscape.effect.filter.MatteJelly\n" - "7\n" - "0.9\n" - "60\n" - "225\n" - "-1\n" + "7\n" + "0.9\n" + "60\n" + "225\n" + "-1\n" "\n" "all\n" "\n" @@ -216,11 +216,11 @@ public: "\n" "" N_("Specular Light") "\n" "org.inkscape.effect.filter.SpecularLight\n" - "6\n" - "1\n" - "45\n" - "235\n" - "-1\n" + "6\n" + "1\n" + "45\n" + "235\n" + "-1\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/blurs.h b/src/extension/internal/filter/blurs.h index fe1b9c930..77581ed96 100644 --- a/src/extension/internal/filter/blurs.h +++ b/src/extension/internal/filter/blurs.h @@ -53,9 +53,9 @@ public: "\n" "" N_("Blur") "\n" "org.inkscape.effect.filter.Blur\n" - "2\n" - "2\n" - "False\n" + "2\n" + "2\n" + "False\n" "\n" "all\n" "\n" @@ -124,7 +124,7 @@ public: "\n" "" N_("Clean Edges") "\n" "org.inkscape.effect.filter.CleanEdges\n" - "0.4\n" + "0.4\n" "\n" "all\n" "\n" @@ -184,11 +184,11 @@ public: "\n" "" N_("Cross Blur") "\n" "org.inkscape.effect.filter.CrossBlur\n" - "0\n" - "0\n" - "5\n" - "5\n" - "\n" + "0\n" + "0\n" + "5\n" + "5\n" + "\n" "<_item value=\"darken\">" N_("Darken") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" @@ -259,7 +259,7 @@ public: "\n" "" N_("Feather") "\n" "org.inkscape.effect.filter.Feather\n" - "5\n" + "5\n" "\n" "all\n" "\n" @@ -326,22 +326,22 @@ public: "org.inkscape.effect.filter.ImageBlur\n" "\n" "\n" - "3\n" - "3\n" - "6\n" - "2\n" - "1\n" + "3\n" + "3\n" + "6\n" + "2\n" + "1\n" "\n" "\n" - "-1\n" - "\n" + "-1\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"lighten\">" N_("Lighten") "\n" "\n" - "false\n" + "false\n" "\n" "\n" "\n" diff --git a/src/extension/internal/filter/bumps.h b/src/extension/internal/filter/bumps.h index b59b1ef50..cbda5ea35 100644 --- a/src/extension/internal/filter/bumps.h +++ b/src/extension/internal/filter/bumps.h @@ -81,52 +81,52 @@ public: "org.inkscape.effect.filter.Bump\n" "\n" "\n" - "0.01\n" - "0.01\n" - "0\n" + "0.01\n" + "0.01\n" + "0\n" "<_param name=\"sourceHeader\" type=\"description\" appearance=\"header\">" N_("Bump source") "\n" - "0\n" - "0\n" - "0\n" - "false\n" + "0\n" + "0\n" + "0\n" + "false\n" "\n" "\n" - "\n" + "\n" "<_item value=\"specular\">" N_("Specular") "\n" "<_item value=\"diffuse\">" N_("Diffuse") "\n" "\n" - "5\n" - "1\n" - "15\n" - "-1\n" + "5\n" + "1\n" + "15\n" + "-1\n" "\n" "\n" - "\n" + "\n" "<_item value=\"distant\">" N_("Distant") "\n" "<_item value=\"point\">" N_("Point") "\n" "<_item value=\"spot\">" N_("Spot") "\n" "\n" "<_param name=\"distantHeader\" type=\"description\" appearance=\"header\">" N_("Distant light options") "\n" - "225\n" - "45\n" + "225\n" + "45\n" "<_param name=\"pointHeader\" type=\"description\" appearance=\"header\">" N_("Point light options") "\n" - "526\n" - "372\n" - "150\n" + "526\n" + "372\n" + "150\n" "<_param name=\"spotHeader\" type=\"description\" appearance=\"header\">" N_("Spot light options") "\n" - "526\n" - "372\n" - "150\n" - "0\n" - "0\n" - "-1000\n" - "1\n" - "50\n" + "526\n" + "372\n" + "150\n" + "0\n" + "0\n" + "-1000\n" + "1\n" + "50\n" "\n" "\n" - "-987158017\n" - "false\n" - "\n" + "-987158017\n" + "false\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "<_item value=\"screen\">" N_("Screen") "\n" @@ -310,35 +310,35 @@ public: "org.inkscape.effect.filter.WaxBump\n" "\n" "\n" - "1.5\n" - "1\n" - "1\n" + "1.5\n" + "1\n" + "1\n" "<_param name=\"sourceHeader\" type=\"description\" appearance=\"header\">" N_("Bump source") "\n" - "0\n" - "0\n" - "0\n" - "\n" + "0\n" + "0\n" + "0\n" + "\n" "<_item value=\"flood1\">" N_("Color") "\n" "<_item value=\"SourceGraphic\">" N_("Image") "\n" "<_item value=\"blur1\">" N_("Blurred image") "\n" "\n" - "0\n" + "0\n" "\n" "\n" - "-1\n" - "5\n" - "1.4\n" - "35\n" - "225\n" - "60\n" - "\n" + "-1\n" + "5\n" + "1.4\n" + "35\n" + "225\n" + "60\n" + "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"lighten\">" N_("Lighten") "\n" "\n" - "\n" + "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"darken\">" N_("Darken") "\n" @@ -347,9 +347,9 @@ public: "\n" "\n" "\n" - "-520083713\n" - "false\n" - "\n" + "-520083713\n" + "false\n" + "\n" "<_item value=\"atop\">" N_("Atop") "\n" "<_item value=\"in\">" N_("In") "\n" "\n" diff --git a/src/extension/internal/filter/color.h b/src/extension/internal/filter/color.h index b9c76615c..a6b777d20 100644 --- a/src/extension/internal/filter/color.h +++ b/src/extension/internal/filter/color.h @@ -72,10 +72,10 @@ public: "\n" "" N_("Brilliance") "\n" "org.inkscape.effect.filter.Brilliance\n" - "2\n" - "0.5\n" - "0\n" - "false\n" + "2\n" + "0.5\n" + "0\n" + "false\n" "\n" "all\n" "\n" @@ -154,15 +154,15 @@ public: "org.inkscape.effect.filter.ChannelPaint\n" "\n" "\n" - "1\n" - "-1\n" - "0.5\n" - "0.5\n" - "1\n" - "false\n" + "1\n" + "-1\n" + "0.5\n" + "0.5\n" + "1\n" + "false\n" "\n" "\n" - "16777215\n" + "16777215\n" "\n" "\n" "\n" @@ -255,7 +255,7 @@ public: "org.inkscape.effect.filter.ColorBlindness\n" "\n" "\n" - "\n" + "\n" "<_item value=\"0.618 0.32 0.062 0 0 0.163 0.775 0.062 0 0 0.163 0.32 0.516 0 0 0 0 0 1 0 \">" N_("Rod monochromacy (atypical achromatopsia)") "\n" "<_item value=\"0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0.299 0.587 0.114 0 0 0 0 0 1 0 \">" N_("Cone monochromacy (typical achromatopsia)") "\n" "<_item value=\"0.8 0.2 0 0 0 0.2583 0.74167 0 0 0 0 0.14167 0.85833 0 0 0 0 0 1 0 \">" N_("Green weak (deuteranomaly)") "\n" @@ -328,8 +328,8 @@ public: "\n" "" N_("Color Shift") "\n" "org.inkscape.effect.filter.ColorShift\n" - "330\n" - "0.6\n" + "330\n" + "0.6\n" "\n" "all\n" "\n" @@ -393,17 +393,17 @@ public: "org.inkscape.effect.filter.Colorize\n" "\n" "\n" - "0\n" - "1\n" - "false\n" - "\n" + "0\n" + "1\n" + "false\n" + "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"lighten\">" N_("Lighten") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "\n" - "\n" + "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"normal\">" N_("Normal") "\n" @@ -412,7 +412,7 @@ public: "\n" "\n" "\n" - "-1639776001\n" + "-1639776001\n" "\n" "\n" "\n" @@ -498,7 +498,7 @@ public: "\n" "" N_("Component Transfer") "\n" "org.inkscape.effect.filter.ComponentTransfer\n" - "\n" + "\n" "<_item value=\"identity\">" N_("Identity") "\n" "<_item value=\"table\">" N_("Table") "\n" "<_item value=\"discrete\">" N_("Discrete") "\n" @@ -585,8 +585,8 @@ public: "org.inkscape.effect.filter.Duochrome\n" "\n" "\n" - "0\n" - "\n" + "0\n" + "\n" "<_item value=\"none\">" N_("No swap") "\n" "<_item value=\"full\">" N_("Color and alpha") "\n" "<_item value=\"color\">" N_("Color only") "\n" @@ -594,10 +594,10 @@ public: "\n" "\n" "\n" - "1364325887\n" + "1364325887\n" "\n" "\n" - "-65281\n" + "-65281\n" "\n" "\n" "\n" @@ -708,7 +708,7 @@ public: "\n" "" N_("Extract Channel") "\n" "org.inkscape.effect.filter.ExtractChannel\n" - "\n" + "\n" "<_item value=\"r\">" N_("Red") "\n" "<_item value=\"g\">" N_("Green") "\n" "<_item value=\"b\">" N_("Blue") "\n" @@ -716,12 +716,12 @@ public: "<_item value=\"m\">" N_("Magenta") "\n" "<_item value=\"y\">" N_("Yellow") "\n" "\n" - "\n" + "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "\n" - "false\n" + "false\n" "\n" "all\n" "\n" @@ -814,8 +814,8 @@ public: "\n" "" N_("Fade to Black or White") "\n" "org.inkscape.effect.filter.FadeToBW\n" - "1\n" - "\n" + "1\n" + "\n" "<_item value=\"black\">" N_("Black") "\n" "<_item value=\"white\">" N_("White") "\n" "\n" @@ -893,11 +893,11 @@ public: "\n" "" N_("Greyscale") "\n" "org.inkscape.effect.filter.Greyscale\n" - "0.21\n" - "0.72\n" - "0.072\n" - "0\n" - "false\n" + "0.21\n" + "0.72\n" + "0.072\n" + "0\n" + "false\n" "\n" "all\n" "\n" @@ -979,16 +979,16 @@ public: "\n" "" N_("Invert") "\n" "org.inkscape.effect.filter.Invert\n" - "\n" + "\n" "<_item value=\"0\">" N_("No inversion") "\n" "<_item value=\"1\">" N_("Red and blue") "\n" "<_item value=\"2\">" N_("Red and green") "\n" "<_item value=\"3\">" N_("Green and blue") "\n" "\n" - "0\n" - "false\n" - "false\n" - "false\n" + "0\n" + "false\n" + "false\n" + "false\n" "\n" "all\n" "\n" @@ -1114,9 +1114,9 @@ public: "\n" "" N_("Lighting") "\n" "org.inkscape.effect.filter.Lighting\n" - "1\n" - "1\n" - "0\n" + "1\n" + "1\n" + "0\n" "\n" "all\n" "\n" @@ -1185,8 +1185,8 @@ public: "\n" "" N_("Lightness-Contrast") "\n" "org.inkscape.effect.filter.LightnessContrast\n" - "0\n" - "0\n" + "0\n" + "0\n" "\n" "all\n" "\n" @@ -1267,17 +1267,17 @@ public: "\n" "\n" "<_param name=\"redOffset\" type=\"description\" appearance=\"header\">" N_("Red offset") "\n" - "-6\n" - "-6\n" + "-6\n" + "-6\n" "<_param name=\"greenOffset\" type=\"description\" appearance=\"header\">" N_("Green offset") "\n" - "6\n" - "7\n" + "6\n" + "7\n" "<_param name=\"redOffset\" type=\"description\" appearance=\"header\">" N_("Blue offset") "\n" - "1\n" - "-16\n" + "1\n" + "-16\n" "\n" "\n" - "255\n" + "255\n" "\n" "\n" "\n" @@ -1379,17 +1379,17 @@ public: "\n" "\n" "<_param name=\"cyanOffset\" type=\"description\" appearance=\"header\">" N_("Cyan offset") "\n" - "-6\n" - "-6\n" + "-6\n" + "-6\n" "<_param name=\"magentaOffset\" type=\"description\" appearance=\"header\">" N_("Magenta offset") "\n" - "6\n" - "7\n" + "6\n" + "7\n" "<_param name=\"yellowOffset\" type=\"description\" appearance=\"header\">" N_("Yellow offset") "\n" - "1\n" - "-16\n" + "1\n" + "-16\n" "\n" "\n" - "-1\n" + "-1\n" "\n" "\n" "\n" @@ -1482,15 +1482,15 @@ public: "\n" "" N_("Quadritone fantasy") "\n" "org.inkscape.effect.filter.Quadritone\n" - "280\n" - "100\n" - "\n" + "280\n" + "100\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "\n" - "0\n" - "\n" + "0\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" @@ -1568,8 +1568,8 @@ public: "\n" "" N_("Solarize") "\n" "org.inkscape.effect.filter.Solarize\n" - "0\n" - "\n" + "0\n" + "\n" "<_item value=\"solarize\">" N_("Solarize") "\n" "<_item value=\"moonarize\">" N_("Moonarize") "\n" "\n" @@ -1657,31 +1657,31 @@ public: "org.inkscape.effect.filter.Tritone\n" "\n" "\n" - "\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"enhue\">" N_("Enhance hue") "\n" "<_item value=\"phospho\">" N_("Phosphorescence") "\n" "<_item value=\"phosphoB\">" N_("Colored nights") "\n" "<_item value=\"htb\">" N_("Hue to background") "\n" "\n" - "\n" + "\n" "<_item value=\"lighten\">" N_("Lighten") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "\n" - "0.01\n" - "\n" + "0.01\n" + "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "\n" - "0\n" - "1\n" + "0\n" + "1\n" "\n" "\n" - "0\n" - "-73203457\n" + "0\n" + "-73203457\n" "\n" "\n" "\n" diff --git a/src/extension/internal/filter/distort.h b/src/extension/internal/filter/distort.h index 586d34226..56aab51f5 100644 --- a/src/extension/internal/filter/distort.h +++ b/src/extension/internal/filter/distort.h @@ -66,29 +66,29 @@ public: "\n" "" N_("Felt Feather") "\n" "org.inkscape.effect.filter.FeltFeather\n" - "\n" + "\n" "<_item value=\"in\">" N_("In") "\n" "<_item value=\"out\">" N_("Out") "\n" "\n" - "15\n" - "15\n" - "1\n" - "0\n" - "\n" + "15\n" + "15\n" + "1\n" + "0\n" + "\n" "<_item value=\"atop\">" N_("Normal") "\n" "<_item value=\"over\">" N_("Wide") "\n" "<_item value=\"in\">" N_("Narrow") "\n" "<_item value=\"xor\">" N_("No fill") "\n" "\n" - "\n" + "\n" "<_item value=\"fractalNoise\">" N_("Fractal noise") "\n" "<_item value=\"turbulence\">" N_("Turbulence") "\n" "\n" - "5\n" - "5\n" - "3\n" - "0\n" - "30\n" + "5\n" + "5\n" + "3\n" + "0\n" + "30\n" "\n" "all\n" "\n" @@ -189,15 +189,15 @@ public: "\n" "" N_("Roughen") "\n" "org.inkscape.effect.filter.Roughen\n" - "\n" + "\n" "<_item value=\"fractalNoise\">" N_("Fractal noise") "\n" "<_item value=\"turbulence\">" N_("Turbulence") "\n" "\n" - "1.3\n" - "1.3\n" - "5\n" - "0\n" - "6.6\n" + "1.3\n" + "1.3\n" + "5\n" + "0\n" + "6.6\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/image.h b/src/extension/internal/filter/image.h index 00cd2cf21..868588f80 100644 --- a/src/extension/internal/filter/image.h +++ b/src/extension/internal/filter/image.h @@ -48,13 +48,13 @@ public: "\n" "" N_("Edge Detect") "\n" "org.inkscape.effect.filter.EdgeDetect\n" - "\n" + "\n" "<_item value=\"all\">" N_("All") "\n" "<_item value=\"vertical\">" N_("Vertical lines") "\n" "<_item value=\"horizontal\">" N_("Horizontal lines") "\n" "\n" - "1.0\n" - "false\n" + "1.0\n" + "false\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/morphology.h b/src/extension/internal/filter/morphology.h index 7e10884a1..e1785f7d3 100644 --- a/src/extension/internal/filter/morphology.h +++ b/src/extension/internal/filter/morphology.h @@ -57,17 +57,17 @@ public: "\n" "" N_("Cross-smooth") "\n" "org.inkscape.effect.filter.crosssmooth\n" - "\n" + "\n" "<_item value=\"in\">" N_("Inner") "\n" "<_item value=\"over\">" N_("Outer") "\n" "<_item value=\"xor\">" N_("Open") "\n" "\n" - "10\n" - "1\n" - "10\n" - "1\n" - "1\n" - "false\n" + "10\n" + "1\n" + "10\n" + "1\n" + "1\n" + "false\n" "\n" "all\n" @@ -167,33 +167,33 @@ public: "org.inkscape.effect.filter.Outline\n" "\n" "\n" - "false\n" - "false\n" - "\n" + "false\n" + "false\n" + "\n" "<_item value=\"over\">" N_("Over") "\n" "<_item value=\"in\">" N_("In") "\n" "<_item value=\"out\">" N_("Out") "\n" "<_item value=\"atop\">" N_("Atop") "\n" "<_item value=\"xor\">" N_("XOR") "\n" "\n" - "\n" + "\n" "<_item value=\"inside\">" N_("Inside") "\n" "<_item value=\"outside\">" N_("Outside") "\n" "<_item value=\"overlayed\">" N_("Overlayed") "\n" "\n" - "4\n" - "100\n" - "1\n" - "0.5\n" - "50\n" - "5\n" - "1\n" - "false\n" + "4\n" + "100\n" + "1\n" + "0.5\n" + "50\n" + "5\n" + "1\n" + "false\n" "\n" "\n" - "255\n" - "1\n" - "1\n" + "255\n" + "1\n" + "1\n" "\n" "\n" "\n" diff --git a/src/extension/internal/filter/overlays.h b/src/extension/internal/filter/overlays.h index 1ca745166..f6c0509c8 100644 --- a/src/extension/internal/filter/overlays.h +++ b/src/extension/internal/filter/overlays.h @@ -57,20 +57,20 @@ public: "org.inkscape.effect.filter.NoiseFill\n" "\n" "\n" - "\n" + "\n" "<_item value=\"fractalNoise\">" N_("Fractal noise") "\n" "<_item value=\"turbulence\">" N_("Turbulence") "\n" "\n" - "20\n" - "40\n" - "5\n" - "0\n" - "3\n" - "1\n" - "false\n" + "20\n" + "40\n" + "5\n" + "0\n" + "3\n" + "1\n" + "false\n" "\n" "\n" - "354957823\n" + "354957823\n" "\n" "\n" "\n" diff --git a/src/extension/internal/filter/paint.h b/src/extension/internal/filter/paint.h index 941177f39..43f4b6c90 100644 --- a/src/extension/internal/filter/paint.h +++ b/src/extension/internal/filter/paint.h @@ -72,32 +72,32 @@ public: "org.inkscape.effect.filter.Chromolitho\n" "\n" "\n" - "true\n" - "\n" + "true\n" + "\n" "<_item value=\"darken\">Darken\n" "<_item value=\"normal\">Normal\n" "<_item value=\"multiply\">Multiply\n" "<_item value=\"screen\">Screen\n" "<_item value=\"lighten\">Lighten\n" "\n" - "false\n" - "false\n" - "false\n" - "0\n" - "1\n" - "10\n" - "1\n" + "false\n" + "false\n" + "false\n" + "0\n" + "1\n" + "10\n" + "1\n" "\n" "\n" - "true\n" - "1000\n" - "1000\n" - "1\n" - "0\n" - "1\n" - "0\n" - "true\n" - "\n" + "true\n" + "1000\n" + "1000\n" + "1\n" + "0\n" + "1\n" + "0\n" + "true\n" + "\n" "<_item value=\"normal\">Normal\n" "<_item value=\"multiply\">Multiply\n" "<_item value=\"screen\">Screen\n" @@ -231,12 +231,12 @@ public: "\n" "" N_("Cross Engraving") "\n" "org.inkscape.effect.filter.CrossEngraving\n" - "30\n" - "1\n" - "0\n" - "0.5\n" - "4\n" - "false\n" + "30\n" + "1\n" + "0\n" + "0.5\n" + "4\n" + "false\n" "\n" "all\n" "\n" @@ -333,27 +333,27 @@ public: "\n" "\n" "<_param name=\"simplifyheader\" type=\"description\" appearance=\"header\">" N_("Simplify") "\n" - "0.6\n" - "10\n" - "0\n" - "false\n" + "0.6\n" + "10\n" + "0\n" + "false\n" "<_param name=\"smoothheader\" type=\"description\" appearance=\"header\">" N_("Smoothness") "\n" - "0.6\n" - "6\n" - "2\n" + "0.6\n" + "6\n" + "2\n" "<_param name=\"meltheader\" type=\"description\" appearance=\"header\">" N_("Melt") "\n" - "1\n" - "6\n" - "2\n" + "1\n" + "6\n" + "2\n" "\n" "\n" - "-1515870721\n" - "false\n" + "-1515870721\n" + "false\n" "\n" "\n" - "589505535\n" - "false\n" - "0\n" + "589505535\n" + "false\n" + "0\n" "\n" "\n" "\n" @@ -493,13 +493,13 @@ public: "\n" "" N_("Electrize") "\n" "org.inkscape.effect.filter.Electrize\n" - "2.0\n" - "\n" + "2.0\n" + "\n" "<_item value=\"table\">" N_("Table") "\n" "<_item value=\"discrete\">" N_("Discrete") "\n" "\n" - "3\n" - "false\n" + "3\n" + "false\n" "\n" "all\n" "\n" @@ -583,14 +583,14 @@ public: "\n" "" N_("Neon Draw") "\n" "org.inkscape.effect.filter.NeonDraw\n" - "\n" + "\n" "<_item value=\"table\">" N_("Smoothed") "\n" "<_item value=\"discrete\">" N_("Contrasted") "\n" "\n" - "3\n" - "3\n" - "1\n" - "\n" + "3\n" + "3\n" + "1\n" + "\n" "<_item value=\"normal\">Normal\n" "<_item value=\"multiply\">Multiply\n" "<_item value=\"screen\">Screen\n" @@ -688,34 +688,34 @@ public: "org.inkscape.effect.filter.PointEngraving\n" "\n" "\n" - "\n" + "\n" "<_item value=\"fractalNoise\">" N_("Fractal noise") "\n" "<_item value=\"turbulence\">" N_("Turbulence") "\n" "\n" - "100\n" - "100\n" - "1\n" - "0\n" - "45\n" - "\n" + "100\n" + "100\n" + "1\n" + "0\n" + "45\n" + "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"screen\">" N_("Screen") "\n" "<_item value=\"lighten\">" N_("Lighten") "\n" "<_item value=\"darken\">" N_("Darken") "\n" "\n" - "2.5\n" - "1.3\n" - "0\n" - "0.5\n" + "2.5\n" + "1.3\n" + "0\n" + "0.5\n" "\n" "\n" - "-1\n" - "false\n" + "-1\n" + "false\n" "\n" "\n" - "1666789119\n" - "false\n" + "1666789119\n" + "false\n" "\n" "\n" "\n" @@ -849,27 +849,27 @@ public: "\n" "" N_("Poster Paint") "\n" "org.inkscape.effect.filter.Posterize\n" - "\n" + "\n" "<_item value=\"normal\">Normal\n" "<_item value=\"dented\">Dented\n" "\n" - "\n" + "\n" "<_item value=\"discrete\">" N_("Poster") "\n" "<_item value=\"table\">" N_("Painting") "\n" "\n" - "5\n" - "\n" + "5\n" + "\n" "<_item value=\"lighten\">Lighten\n" "<_item value=\"normal\">Normal\n" "<_item value=\"darken\">Darken\n" "<_item value=\"multiply\">Multiply\n" "<_item value=\"screen\">Screen\n" "\n" - "4.0\n" - "0.5\n" - "1.00\n" - "1.00\n" - "false\n" + "4.0\n" + "0.5\n" + "1.00\n" + "1.00\n" + "false\n" "\n" "all\n" "\n" @@ -972,8 +972,8 @@ public: "\n" "" N_("Posterize Basic") "\n" "org.inkscape.effect.filter.PosterizeBasic\n" - "5\n" - "4.0\n" + "5\n" + "4.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/protrusions.h b/src/extension/internal/filter/protrusions.h index 965a1bdc5..ad75d8896 100644 --- a/src/extension/internal/filter/protrusions.h +++ b/src/extension/internal/filter/protrusions.h @@ -47,7 +47,7 @@ public: "\n" "" N_("Snow crest") "\n" "org.inkscape.effect.filter.snow\n" - "3.5\n" + "3.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/shadows.h b/src/extension/internal/filter/shadows.h index 0d54950bf..e69e05669 100644 --- a/src/extension/internal/filter/shadows.h +++ b/src/extension/internal/filter/shadows.h @@ -58,10 +58,10 @@ public: "org.inkscape.effect.filter.ColorDropShadow\n" "\n" "\n" - "3.0\n" - "6.0\n" - "6.0\n" - "\n" + "3.0\n" + "6.0\n" + "6.0\n" + "\n" "<_item value=\"outer\">" N_("Outer") "\n" "<_item value=\"inner\">" N_("Inner") "\n" "<_item value=\"outercut\">" N_("Outer cutout") "\n" @@ -70,8 +70,8 @@ public: "\n" "\n" "\n" - "127\n" - "false\n" + "127\n" + "false\n" "\n" "\n" "\n" diff --git a/src/extension/internal/filter/textures.h b/src/extension/internal/filter/textures.h index 32eef6054..a2584c627 100644 --- a/src/extension/internal/filter/textures.h +++ b/src/extension/internal/filter/textures.h @@ -61,18 +61,18 @@ public: "\n" "" N_("Ink Blot") "\n" "org.inkscape.effect.filter.InkBlot\n" - "\n" + "\n" "<_item value=\"fractalNoise\">Fractal noise\n" "<_item value=\"turbulence\">Turbulence\n" "\n" - "4\n" - "3\n" - "0\n" - "10\n" - "10\n" - "50\n" - "5\n" - "\n" + "4\n" + "3\n" + "0\n" + "10\n" + "10\n" + "50\n" + "5\n" + "\n" "<_item value=\"over\">" N_("Wide") "\n" "<_item value=\"atop\">" N_("Normal") "\n" "<_item value=\"in\">" N_("Narrow") "\n" @@ -81,9 +81,9 @@ public: "<_item value=\"arithmetic\">" N_("Custom") "\n" "\n" "<_param name=\"customHeader\" type=\"description\" appearance=\"header\">" N_("Custom stroke options") "\n" - "1.5\n" - "-0.25\n" - "0.5\n" + "1.5\n" + "-0.25\n" + "0.5\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/filter/transparency.h b/src/extension/internal/filter/transparency.h index dcbae26b5..da89498bb 100644 --- a/src/extension/internal/filter/transparency.h +++ b/src/extension/internal/filter/transparency.h @@ -52,11 +52,11 @@ public: "\n" "" N_("Blend") "\n" "org.inkscape.effect.filter.Blend\n" - "\n" + "\n" "<_item value=\"BackgroundImage\">" N_("Background") "\n" "<_item value=\"SourceGraphic\">" N_("Image") "\n" "\n" - "\n" + "\n" "<_item value=\"multiply\">" N_("Multiply") "\n" "<_item value=\"normal\">" N_("Normal") "\n" "<_item value=\"screen\">" N_("Screen") "\n" @@ -129,11 +129,11 @@ public: "\n" "" N_("Channel Transparency") "\n" "org.inkscape.effect.filter.ChannelTransparency\n" - "-1\n" - "0.5\n" - "0.5\n" - "1\n" - "false\n" + "-1\n" + "0.5\n" + "0.5\n" + "1\n" + "false\n" "\n" "all\n" "\n" @@ -204,10 +204,10 @@ public: "\n" "" N_("Light Eraser") "\n" "org.inkscape.effect.filter.LightEraser\n" - "50\n" - "100\n" - "1\n" - "false\n" + "50\n" + "100\n" + "1\n" + "false\n" "\n" "all\n" "\n" @@ -278,9 +278,9 @@ public: "\n" "" N_("Opacity") "\n" "org.inkscape.effect.filter.Opacity\n" - "5\n" - "1\n" - "1\n" + "5\n" + "1\n" + "1\n" "\n" "all\n" "\n" @@ -340,9 +340,9 @@ public: "\n" "" N_("Silhouette") "\n" "org.inkscape.effect.filter.Silhouette\n" - "0.01\n" - "false\n" - "255\n" + "0.01\n" + "false\n" + "255\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index c15e28854..b30c67a4d 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -208,7 +208,7 @@ GdkpixbufInput::init(void) "<_option value='optimizeSpeed' >" N_("Blocky (optimizeSpeed)") "\n" "\n" - "false\n" + "false\n" "\n" ".%s\n" "%s\n" diff --git a/src/extension/internal/grid.cpp b/src/extension/internal/grid.cpp index e6938b9e2..c766bd828 100644 --- a/src/extension/internal/grid.cpp +++ b/src/extension/internal/grid.cpp @@ -198,11 +198,11 @@ Grid::init (void) "\n" "" N_("Grid") "\n" "org.inkscape.effect.grid\n" - "1.0\n" - "10.0\n" - "10.0\n" - "0.0\n" - "0.0\n" + "1.0\n" + "10.0\n" + "10.0\n" + "0.0\n" + "0.0\n" "\n" "all\n" "\n" diff --git a/src/extension/internal/wmf-inout.cpp b/src/extension/internal/wmf-inout.cpp index b8b0c73de..c7226a58a 100644 --- a/src/extension/internal/wmf-inout.cpp +++ b/src/extension/internal/wmf-inout.cpp @@ -3193,15 +3193,15 @@ Wmf::init (void) "\n" "" N_("WMF Output") "\n" "org.inkscape.output.wmf\n" - "true\n" - "true\n" - "true\n" - "true\n" - "false\n" - "false\n" - "false\n" - "false\n" - "false\n" + "true\n" + "true\n" + "true\n" + "true\n" + "false\n" + "false\n" + "false\n" + "false\n" + "false\n" "\n" ".wmf\n" "image/x-wmf\n" diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 0ea15a5cd..2521dc1de 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -273,7 +273,7 @@ PrefDialog::on_response (int signal) { #include "internal/clear-n_.h" -const char * PrefDialog::live_param_xml = "false"; +const char * PrefDialog::live_param_xml = "false"; }; }; /* namespace Inkscape, Extension */ -- cgit v1.2.3 From 6ed2673499ca548767bb7d2edb453a228ece86fd Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 12 Jun 2016 10:25:42 +0200 Subject: Optionally sort attributes and properties into a canonical order. Useful for comparing different versions of an SVG file. (bzr r14980) --- src/CMakeLists.txt | 2 + src/Makefile_insert | 1 + src/attribute-sort-util.cpp | 206 ++++++++++++++++++++++++++++++++++++++++++++ src/attribute-sort-util.h | 62 +++++++++++++ src/attributes.cpp | 91 ++++++++++--------- src/attributes.h | 101 ++++++++++++---------- src/preferences-skeleton.h | 3 +- src/xml/repr-io.cpp | 5 ++ 8 files changed, 383 insertions(+), 88 deletions(-) create mode 100644 src/attribute-sort-util.cpp create mode 100644 src/attribute-sort-util.h (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cf5130317..66f16b7fb 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,7 @@ set(sp_SRC attribute-rel-css.cpp attribute-rel-svg.cpp attribute-rel-util.cpp + attribute-sort-util.cpp sp-anchor.cpp sp-clippath.cpp sp-conn-end-pair.cpp @@ -92,6 +93,7 @@ set(sp_SRC attribute-rel-css.h attribute-rel-svg.h attribute-rel-util.h + attribute-sort-util.h sp-anchor.h sp-clippath.h sp-conn-end-pair.h diff --git a/src/Makefile_insert b/src/Makefile_insert index b9723ac42..55fde4dd2 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -8,6 +8,7 @@ ink_common_sources += \ attribute-rel-svg.cpp attribute-rel-svg.h \ attribute-rel-css.cpp attribute-rel-css.h \ attribute-rel-util.cpp attribute-rel-util.h \ + attribute-sort-util.cpp attribute-sort-util.h \ axis-manip.cpp axis-manip.h \ bad-uri-exception.h \ box3d.cpp box3d.h \ diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp new file mode 100644 index 000000000..ef08a142f --- /dev/null +++ b/src/attribute-sort-util.cpp @@ -0,0 +1,206 @@ +/* + * attribute-sort-util.cpp + * + * Created on: Jun 10, 2016 + * Author: Tavmjong Bah + */ + +/** + * Utility functions for sorting attributes by name. + */ + +#include +#include +#include +#include +#include +#include // std::pair +#include // std::sort + +#include "attribute-sort-util.h" + +#include "xml/repr.h" +#include "xml/attribute-record.h" +#include "xml/sp-css-attr.h" + +#include "attributes.h" + +using Inkscape::XML::Node; +using Inkscape::XML::AttributeRecord; +using Inkscape::Util::List; + +/** + * Sort attributes by name. + */ +void sp_attribute_sort_tree(Node *repr) { + + g_return_if_fail (repr != NULL); + + sp_attribute_sort_recursive( repr ); +} + +/** + * Sort recursively over all elements. + */ +void sp_attribute_sort_recursive(Node *repr) { + + g_return_if_fail (repr != NULL); + + if( repr->type() == Inkscape::XML::ELEMENT_NODE ) { + Glib::ustring element = repr->name(); + + // Only sort elements in svg namespace + if( element.substr(0,4) == "svg:" ) { + sp_attribute_sort_element( repr ); + } + } + + for(Node *child=repr->firstChild() ; child ; child = child->next()) { + sp_attribute_sort_recursive( child ); + } +} + +/** + * Compare function + */ +bool cmp(std::pair< Glib::ustring, Glib::ustring > const &a, + std::pair< Glib::ustring, Glib::ustring > const &b) { + unsigned val_b = sp_attribute_lookup(b.first.c_str()); + if (val_b == 0) return true; // Unknown attributes at end. + return sp_attribute_lookup(a.first.c_str()) < val_b; +} + +/** + * Sort attributes on an element + */ +void sp_attribute_sort_element(Node *repr) { + + g_return_if_fail (repr != NULL); + g_return_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE); + + // Glib::ustring element = repr->name(); + // Glib::ustring id = (repr->attribute( "id" )==NULL ? "" : repr->attribute( "id" )); + + sp_attribute_sort_style(repr); + + // Sort attributes: + + // It doesn't seem possible to sort a List directly so we dump the list into + // a std::list and sort that. Not very efficient. Sad. + List attributes = repr->attributeList(); + + std::vector > my_list; + for ( List iter = attributes ; iter ; ++iter ) { + + Glib::ustring attribute = g_quark_to_string(iter->key); + Glib::ustring value = (const char*)iter->value; + + // C++11 my_list.emlace_back(attribute, value); + my_list.push_back(std::make_pair(attribute,value)); + } + std::sort(my_list.begin(), my_list.end(), cmp); + // Delete all attributes. + //for (auto it: my_list) { + for (std::vector >::iterator it = my_list.begin(); + it != my_list.end(); ++it) { + repr->setAttribute( it->first.c_str(), NULL, false ); + } + // Insert all attributes in proper order + for (std::vector >::iterator it = my_list.begin(); + it != my_list.end(); ++it) { + repr->setAttribute( it->first.c_str(), it->second.c_str(), false ); + } +} + + +/** + * Sort CSS style on an element. + */ +void sp_attribute_sort_style(Node *repr) { + + g_return_if_fail (repr != NULL); + g_return_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE); + + // Find element's style + SPCSSAttr *css = sp_repr_css_attr( repr, "style" ); + sp_attribute_sort_style(repr, css); + + // Convert css node's properties data to string and set repr node's attribute "style" to that string. + // sp_repr_css_set( repr, css, "style"); // Don't use as it will cause loop. + Glib::ustring value; + sp_repr_css_write_string(css, value); + if( value.empty() ) { + repr->setAttribute("style", NULL ); + } else { + repr->setAttribute("style", value.c_str()); + } + + sp_repr_css_attr_unref( css ); +} + + +/** + * Sort CSS style on an element. + */ +Glib::ustring sp_attribute_sort_style(Node *repr, gchar const *string) { + + g_return_val_if_fail (repr != NULL, NULL); + g_return_val_if_fail (repr->type() == Inkscape::XML::ELEMENT_NODE, NULL); + + SPCSSAttr *css = sp_repr_css_attr_new(); + sp_repr_css_attr_add_from_string( css, string ); + sp_attribute_sort_style(repr, css); + Glib::ustring string_cleaned; + sp_repr_css_write_string (css, string_cleaned); + + sp_repr_css_attr_unref( css ); + + return string_cleaned; +} + + +/** + * Sort CSS style on an element. + */ +void sp_attribute_sort_style(Node* repr, SPCSSAttr *css) { + + g_return_if_fail (repr != NULL); + g_return_if_fail (css != NULL); + + Glib::ustring element = repr->name(); + Glib::ustring id = (repr->attribute( "id" )==NULL ? "" : repr->attribute( "id" )); + + // Loop over all properties in "style" node. + std::vector > my_list; + for ( List iter = css->attributeList() ; iter ; ++iter ) { + + Glib::ustring property = g_quark_to_string(iter->key); + Glib::ustring value = (const char*)iter->value; + + // C++11 my_list.emlace_back(property, value); + my_list.push_back(std::make_pair(property,value)); + } + std::sort(my_list.begin(), my_list.end(), cmp); + // Delete all attributes. + //for (auto it: my_list) { + for (std::vector >::iterator it = my_list.begin(); + it != my_list.end(); ++it) { + sp_repr_css_set_property( css, it->first.c_str(), NULL ); + } + // Insert all attributes in proper order + for (std::vector >::iterator it = my_list.begin(); + it != my_list.end(); ++it) { + sp_repr_css_set_property( css, it->first.c_str(), it->second.c_str() ); + } +} + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : diff --git a/src/attribute-sort-util.h b/src/attribute-sort-util.h new file mode 100644 index 000000000..0b2f81ed9 --- /dev/null +++ b/src/attribute-sort-util.h @@ -0,0 +1,62 @@ +#ifndef __SP_ATTRIBUTE_SORT_UTIL_H__ +#define __SP_ATTRIBUTE_SORT_UTIL_H__ + +/* + * attribute-sort-util.h + * + * Created on: Jun 10, 2016 + * Author: Tavmjong Bah + */ + +#include +#include "xml/sp-css-attr.h" + +using Inkscape::XML::Node; + +/** + * Utility functions for sorting attributes. + */ + +/** + * Sort attributes by name. + */ +void sp_attribute_sort_tree(Node *repr); + +/** + * Recursively sort. + * repr: the root node in a document or any other node. + */ +void sp_attribute_sort_recursive(Node *repr); + +/** + * Sort one element (attributes). + */ +void sp_attribute_sort_element(Node *repr); + +/** + * Sort style properties for one element. + */ +void sp_attribute_sort_style(Node *repr); + +/** + * Sort style_property for a style string + */ +Glib::ustring sp_attribute_sort_style(Node *repr, gchar const *string); + +/** + * Sort style properties for one CSS. + */ +void sp_attribute_sort_style(Node* repr, SPCSSAttr *css); + +#endif /* __SP_ATTRIBUTE_SORT_UTIL_H__ */ + +/* + Local Variables: + mode:c++ + c-file-style:"stroustrup" + c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) + indent-tabs-mode:nil + fill-column:99 + End: +*/ +// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/attributes.cpp b/src/attributes.cpp index 24c16d5fc..e281dad65 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -420,11 +420,49 @@ static SPStyleProp const props[] = { {SP_ATTR_TEXT_EXCLUDE,"inkscape:excludeShape"}, {SP_ATTR_LAYOUT_OPTIONS,"inkscape:layoutOptions"}, - /* CSS2 */ - {SP_PROP_INKSCAPE_FONT_SPEC, "-inkscape-font-specification"}, + /* CSS & SVG Properites */ + + /* Paint */ + {SP_PROP_COLOR, "color"}, + {SP_PROP_OPACITY, "opacity"}, + {SP_PROP_FILL, "fill"}, + {SP_PROP_FILL_OPACITY, "fill-opacity"}, + {SP_PROP_FILL_RULE, "fill-rule"}, + {SP_PROP_STROKE, "stroke"}, + {SP_PROP_STROKE_OPACITY, "stroke-opacity"}, + {SP_PROP_STROKE_WIDTH, "stroke-width"}, + {SP_PROP_STROKE_LINECAP, "stroke-linecap"}, + {SP_PROP_STROKE_LINEJOIN, "stroke-linejoin"}, + {SP_PROP_STROKE_MITERLIMIT, "stroke-miterlimit"}, + {SP_PROP_STROKE_DASHARRAY, "stroke-dasharray"}, + {SP_PROP_STROKE_DASHOFFSET, "stroke-dashoffset"}, + {SP_PROP_MARKER, "marker"}, + {SP_PROP_MARKER_END, "marker-end"}, + {SP_PROP_MARKER_MID, "marker-mid"}, + {SP_PROP_MARKER_START, "marker-start"}, + {SP_PROP_PAINT_ORDER, "paint-order" }, + {SP_PROP_SOLID_COLOR, "solid-color"}, + {SP_PROP_SOLID_OPACITY, "solid-opacity"}, + + /* CSS Blending/Compositing */ + {SP_PROP_MIX_BLEND_MODE, "mix-blend-mode"}, + {SP_PROP_ISOLATION, "isolation"}, + + /* Misc. Display */ + {SP_PROP_DISPLAY, "display"}, + {SP_PROP_OVERFLOW, "overflow"}, + {SP_PROP_VISIBILITY, "visibility"}, + + /* Clip/Mask */ + {SP_PROP_CLIP, "clip"}, + {SP_PROP_CLIP_PATH, "clip-path"}, + {SP_PROP_CLIP_RULE, "clip-rule"}, + {SP_PROP_MASK, "mask"}, + /* Font */ {SP_PROP_FONT, "font"}, {SP_PROP_FONT_FAMILY, "font-family"}, + {SP_PROP_INKSCAPE_FONT_SPEC, "-inkscape-font-specification"}, {SP_PROP_FONT_SIZE, "font-size"}, {SP_PROP_FONT_SIZE_ADJUST, "font-size-adjust"}, {SP_PROP_FONT_STRETCH, "font-stretch"}, @@ -449,7 +487,7 @@ static SPStyleProp const props[] = { {SP_PROP_WORD_SPACING, "word-spacing"}, {SP_PROP_TEXT_TRANSFORM, "text-transform"}, - /* Text (css3) */ + /* Text (CSS3) */ {SP_PROP_DIRECTION, "direction"}, {SP_PROP_WRITING_MODE, "writing-mode"}, {SP_PROP_TEXT_ORIENTATION, "text-orientation"}, @@ -470,70 +508,43 @@ static SPStyleProp const props[] = { {SP_PROP_SHAPE_MARGIN, "shape-margin"}, /* Text Decoration */ - {SP_PROP_TEXT_DECORATION, "text-decoration"}, + {SP_PROP_TEXT_DECORATION, "text-decoration"}, // CSS 2/CSS3-Shorthand {SP_PROP_TEXT_DECORATION_LINE, "text-decoration-line"}, {SP_PROP_TEXT_DECORATION_STYLE, "text-decoration-style"}, {SP_PROP_TEXT_DECORATION_COLOR, "text-decoration-color"}, {SP_PROP_TEXT_DECORATION_FILL, "text-decoration-fill"}, {SP_PROP_TEXT_DECORATION_STROKE,"text-decoration-stroke"}, - /* Misc */ - {SP_PROP_CLIP, "clip"}, - {SP_PROP_COLOR, "color"}, - {SP_PROP_CURSOR, "cursor"}, - {SP_PROP_DISPLAY, "display"}, - {SP_PROP_OVERFLOW, "overflow"}, - {SP_PROP_VISIBILITY, "visibility"}, - {SP_PROP_MIX_BLEND_MODE, "mix-blend-mode"}, // CSS Blending and Compositing - {SP_PROP_ISOLATION, "isolation"}, - /* SVG */ - /* Clip/Mask */ - {SP_PROP_CLIP_PATH, "clip-path"}, - {SP_PROP_CLIP_RULE, "clip-rule"}, - {SP_PROP_MASK, "mask"}, - {SP_PROP_OPACITY, "opacity"}, /* Filter */ {SP_PROP_ENABLE_BACKGROUND, "enable-background"}, {SP_PROP_FILTER, "filter"}, {SP_PROP_FLOOD_COLOR, "flood-color"}, {SP_PROP_FLOOD_OPACITY, "flood-opacity"}, {SP_PROP_LIGHTING_COLOR, "lighting-color"}, + /* Gradient */ {SP_PROP_STOP_COLOR, "stop-color"}, {SP_PROP_STOP_OPACITY, "stop-opacity"}, {SP_PROP_STOP_PATH, "path"}, - /* Interactivity */ - {SP_PROP_POINTER_EVENTS, "pointer-events"}, - /* Paint */ + + /* Rendering */ {SP_PROP_COLOR_INTERPOLATION, "color-interpolation"}, {SP_PROP_COLOR_INTERPOLATION_FILTERS, "color-interpolation-filters"}, {SP_PROP_COLOR_PROFILE, "color-profile"}, {SP_PROP_COLOR_RENDERING, "color-rendering"}, - {SP_PROP_FILL, "fill"}, - {SP_PROP_FILL_OPACITY, "fill-opacity"}, - {SP_PROP_FILL_RULE, "fill-rule"}, {SP_PROP_IMAGE_RENDERING, "image-rendering"}, - {SP_PROP_MARKER, "marker"}, - {SP_PROP_MARKER_END, "marker-end"}, - {SP_PROP_MARKER_MID, "marker-mid"}, - {SP_PROP_MARKER_START, "marker-start"}, - {SP_PROP_PAINT_ORDER, "paint-order" }, {SP_PROP_SHAPE_RENDERING, "shape-rendering"}, - {SP_PROP_SOLID_COLOR, "solid-color"}, - {SP_PROP_SOLID_OPACITY, "solid-opacity"}, - {SP_PROP_STROKE, "stroke"}, - {SP_PROP_STROKE_DASHARRAY, "stroke-dasharray"}, - {SP_PROP_STROKE_DASHOFFSET, "stroke-dashoffset"}, - {SP_PROP_STROKE_LINECAP, "stroke-linecap"}, - {SP_PROP_STROKE_LINEJOIN, "stroke-linejoin"}, - {SP_PROP_STROKE_MITERLIMIT, "stroke-miterlimit"}, - {SP_PROP_STROKE_OPACITY, "stroke-opacity"}, - {SP_PROP_STROKE_WIDTH, "stroke-width"}, {SP_PROP_TEXT_RENDERING, "text-rendering"}, + + /* Interactivity */ + {SP_PROP_POINTER_EVENTS, "pointer-events"}, + {SP_PROP_CURSOR, "cursor"}, + /* Conditional */ {SP_PROP_SYSTEM_LANGUAGE, "systemLanguage"}, {SP_PROP_REQUIRED_FEATURES, "requiredFeatures"}, {SP_PROP_REQUIRED_EXTENSIONS, "requiredExtensions"}, + /* LivePathEffect */ {SP_PROP_PATH_EFFECT, "effect"}, }; diff --git a/src/attributes.h b/src/attributes.h index e82db5f2a..ff426e8cf 100644 --- a/src/attributes.h +++ b/src/attributes.h @@ -24,6 +24,13 @@ unsigned char const *sp_attribute_name(unsigned int id); */ #define SP_ATTRIBUTE_IS_CSS(k) (((k) >= SP_PROP_INKSCAPE_FONT_SPEC) && ((k) <= SP_PROP_TEXT_RENDERING)) +/* + * Do not change order of attributes and properties. Attribute and + * order in an SVG file is (optionally) determined by the order here. + * This makes comparing different versions of a drawing easier using + * line-by-line comparison. Also, inorder for proper parsing, some + * properites must be before others (e.g. 'font' before 'font-family'). + */ enum SPAttributeEnum { SP_ATTR_INVALID, ///< Must have value 0. /* SPObject */ @@ -420,14 +427,49 @@ enum SPAttributeEnum { SP_ATTR_TEXT_EXCLUDE, SP_ATTR_LAYOUT_OPTIONS, - /* CSS & SVG Properties */ + /* CSS & SVG Properties KEEP ORDER */ - /* Custom full font name because Font stuff below is inadequate REMOVE ME */ - SP_PROP_INKSCAPE_FONT_SPEC, + /* Paint */ + SP_PROP_COLOR, + SP_PROP_OPACITY, + SP_PROP_FILL, + SP_PROP_FILL_OPACITY, + SP_PROP_FILL_RULE, + SP_PROP_STROKE, + SP_PROP_STROKE_OPACITY, + SP_PROP_STROKE_WIDTH, + SP_PROP_STROKE_LINECAP, + SP_PROP_STROKE_LINEJOIN, + SP_PROP_STROKE_MITERLIMIT, + SP_PROP_STROKE_DASHARRAY, + SP_PROP_STROKE_DASHOFFSET, + SP_PROP_MARKER, + SP_PROP_MARKER_END, + SP_PROP_MARKER_MID, + SP_PROP_MARKER_START, + SP_PROP_PAINT_ORDER, /* SVG2 */ + SP_PROP_SOLID_COLOR, + SP_PROP_SOLID_OPACITY, + + /* CSS Blending/Compositing */ + SP_PROP_MIX_BLEND_MODE, + SP_PROP_ISOLATION, + + /* Misc. Display */ + SP_PROP_DISPLAY, + SP_PROP_OVERFLOW, + SP_PROP_VISIBILITY, - /* Font */ + /* Clip/Mask */ + SP_PROP_CLIP, + SP_PROP_CLIP_PATH, + SP_PROP_CLIP_RULE, + SP_PROP_MASK, + + /* Font: Order is important! */ SP_PROP_FONT, SP_PROP_FONT_FAMILY, + SP_PROP_INKSCAPE_FONT_SPEC, // Remove me SP_PROP_FONT_SIZE, SP_PROP_FONT_SIZE_ADJUST, SP_PROP_FONT_STRETCH, @@ -447,12 +489,12 @@ enum SPAttributeEnum { /* Text Layout */ SP_PROP_TEXT_INDENT, SP_PROP_TEXT_ALIGN, - SP_PROP_LINE_HEIGHT, SP_PROP_LETTER_SPACING, SP_PROP_WORD_SPACING, SP_PROP_TEXT_TRANSFORM, + /* Text (CSS3) */ SP_PROP_DIRECTION, SP_PROP_WRITING_MODE, SP_PROP_TEXT_ORIENTATION, @@ -472,32 +514,14 @@ enum SPAttributeEnum { SP_PROP_SHAPE_PADDING, SP_PROP_SHAPE_MARGIN, - /* Text Decoration CSS 2/CSS 3 Shorthand */ - SP_PROP_TEXT_DECORATION, - /* Text Decoration CSS 3/SVG 2 */ + /* Text Decoration */ + SP_PROP_TEXT_DECORATION, // CSS 2/CSS3-Shorthand SP_PROP_TEXT_DECORATION_LINE, SP_PROP_TEXT_DECORATION_STYLE, SP_PROP_TEXT_DECORATION_COLOR, SP_PROP_TEXT_DECORATION_FILL, SP_PROP_TEXT_DECORATION_STROKE, - /* Misc */ - SP_PROP_CLIP, - SP_PROP_COLOR, - SP_PROP_CURSOR, - SP_PROP_DISPLAY, - SP_PROP_OVERFLOW, - SP_PROP_VISIBILITY, - SP_PROP_MIX_BLEND_MODE, - SP_PROP_ISOLATION, - - /* SVG */ - /* Clip/Mask */ - SP_PROP_CLIP_PATH, - SP_PROP_CLIP_RULE, - SP_PROP_MASK, - SP_PROP_OPACITY, - /* Filter */ SP_PROP_ENABLE_BACKGROUND, SP_PROP_FILTER, @@ -510,36 +534,19 @@ enum SPAttributeEnum { SP_PROP_STOP_OPACITY, SP_PROP_STOP_PATH, - /* Interactivity */ - SP_PROP_POINTER_EVENTS, - - /* Paint */ + /* Rendering */ SP_PROP_COLOR_INTERPOLATION, SP_PROP_COLOR_INTERPOLATION_FILTERS, SP_PROP_COLOR_PROFILE, SP_PROP_COLOR_RENDERING, - SP_PROP_FILL, - SP_PROP_FILL_OPACITY, - SP_PROP_FILL_RULE, SP_PROP_IMAGE_RENDERING, - SP_PROP_MARKER, - SP_PROP_MARKER_END, - SP_PROP_MARKER_MID, - SP_PROP_MARKER_START, - SP_PROP_PAINT_ORDER, /* SVG2 */ SP_PROP_SHAPE_RENDERING, - SP_PROP_SOLID_COLOR, - SP_PROP_SOLID_OPACITY, - SP_PROP_STROKE, - SP_PROP_STROKE_DASHARRAY, - SP_PROP_STROKE_DASHOFFSET, - SP_PROP_STROKE_LINECAP, - SP_PROP_STROKE_LINEJOIN, - SP_PROP_STROKE_MITERLIMIT, - SP_PROP_STROKE_OPACITY, - SP_PROP_STROKE_WIDTH, SP_PROP_TEXT_RENDERING, + /* Interactivity */ + SP_PROP_POINTER_EVENTS, + SP_PROP_CURSOR, + /* Conditional */ SP_PROP_SYSTEM_LANGUAGE, SP_PROP_REQUIRED_FEATURES, diff --git a/src/preferences-skeleton.h b/src/preferences-skeleton.h index 5ccc4d729..38196a58e 100644 --- a/src/preferences-skeleton.h +++ b/src/preferences-skeleton.h @@ -338,7 +338,8 @@ static char const preferences_skeleton[] = " style_defaults_remove=\"0\" " " check_on_reading=\"0\" " " check_on_editing=\"0\" " -" check_on_writing=\"0\"/>\n" +" check_on_writing=\"0\" " +" sort_attributes=\"0\"/>\n" " \n" " \n" diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 4a6f59b43..6977bc1e2 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -34,6 +34,7 @@ #include "extension/extension.h" #include "attribute-rel-util.h" +#include "attribute-sort-util.h" #include "preferences.h" @@ -882,6 +883,10 @@ static void sp_repr_write_stream_root_element(Node *repr, Writer &out, bool clean = prefs->getBool("/options/svgoutput/check_on_writing"); if (clean) sp_attribute_clean_tree( repr ); + // Sort attributes in a canonical order (helps with "diffing" SVG files). + bool sort = prefs->getBool("/options/svgoutput/sort_attributes"); + if (sort) sp_attribute_sort_tree( repr ); + Glib::QueryQuark xml_prefix=g_quark_from_static_string("xml"); NSMap ns_map; -- cgit v1.2.3 From edc19028160caa0d92b943232483ba76fa8ea75b Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sun, 12 Jun 2016 18:27:42 +0200 Subject: Fix bug 'Persistent measure repositions on middle click' Fixed bugs: - https://launchpad.net/bugs/1591662 (bzr r14982) --- src/ui/tools/measure-tool.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/ui/tools/measure-tool.cpp b/src/ui/tools/measure-tool.cpp index 5900a2359..0977729ae 100644 --- a/src/ui/tools/measure-tool.cpp +++ b/src/ui/tools/measure-tool.cpp @@ -565,7 +565,6 @@ bool MeasureTool::root_handler(GdkEvent* event) explicit_base = boost::none; explicit_base_tmp = boost::none; last_end = boost::none; - start_p = desktop->w2d(button_w); if (event->button.button == 1 && !this->space_panning) { // save drag origin -- cgit v1.2.3 From 51cd1dfb720642e51b811558ddead6cd47ceee0f Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sun, 12 Jun 2016 20:08:22 +0200 Subject: Fix faulty comparison function. (bzr r14983) --- src/attribute-sort-util.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp index ef08a142f..d0f45c418 100644 --- a/src/attribute-sort-util.cpp +++ b/src/attribute-sort-util.cpp @@ -65,9 +65,11 @@ void sp_attribute_sort_recursive(Node *repr) { */ bool cmp(std::pair< Glib::ustring, Glib::ustring > const &a, std::pair< Glib::ustring, Glib::ustring > const &b) { + unsigned val_a = sp_attribute_lookup(a.first.c_str()); unsigned val_b = sp_attribute_lookup(b.first.c_str()); - if (val_b == 0) return true; // Unknown attributes at end. - return sp_attribute_lookup(a.first.c_str()) < val_b; + if (val_a == 0) return false; // Unknown attributes at end. + if (val_b == 0) return true; // Unknown attributes at end. + return val_a < val_b; } /** -- cgit v1.2.3