diff options
Diffstat (limited to 'src/extension')
| -rw-r--r-- | src/extension/implementation/script.cpp | 9 | ||||
| -rw-r--r-- | src/extension/internal/emf-win32-print.cpp | 56 | ||||
| -rw-r--r-- | src/extension/internal/odf.h | 2 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/svg-builder.cpp | 10 | ||||
| -rw-r--r-- | src/extension/internal/pdfinput/svg-builder.h | 3 | ||||
| -rw-r--r-- | src/extension/param/color.cpp | 15 |
6 files changed, 40 insertions, 55 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp index ca9c094db..08624aff0 100644 --- a/src/extension/implementation/script.cpp +++ b/src/extension/implementation/script.cpp @@ -149,7 +149,8 @@ std::string Script::resolveInterpreterExecutable(const Glib::ustring &interpName of memory in the unloaded state. */ Script::Script() : - Implementation() + Implementation(), + _canceled(false) { } @@ -177,8 +178,7 @@ Script::~Script() string. This means that the caller of this function can always free what they are given (and should do it too!). */ -std::string -Script::solve_reldir(Inkscape::XML::Node *reprin) { +std::string Script::solve_reldir(Inkscape::XML::Node *reprin) { gchar const *s = reprin->attribute("reldir"); @@ -361,8 +361,7 @@ void Script::unload(Inkscape::Extension::Extension */*module*/) \param module The Extension in question */ -bool -Script::check(Inkscape::Extension::Extension *module) +bool Script::check(Inkscape::Extension::Extension *module) { int script_count = 0; Inkscape::XML::Node *child_repr = sp_repr_children(module->get_repr()); diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp index 472a11807..f4c36dd92 100644 --- a/src/extension/internal/emf-win32-print.cpp +++ b/src/extension/internal/emf-win32-print.cpp @@ -76,6 +76,8 @@ static float dwDPI = 2540; PrintEmfWin32::PrintEmfWin32 (void): + _width(0), + _height(0), hdc(NULL), hbrush(NULL), hbrushOld(NULL), @@ -105,15 +107,13 @@ PrintEmfWin32::~PrintEmfWin32 (void) } -unsigned int -PrintEmfWin32::setup (Inkscape::Extension::Print * /*mod*/) +unsigned int PrintEmfWin32::setup (Inkscape::Extension::Print * /*mod*/) { return TRUE; } -unsigned int -PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc) +unsigned int PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc) { gchar const *utf8_fn = mod->get_param_string("destination"); @@ -229,8 +229,7 @@ PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument *doc) } -unsigned int -PrintEmfWin32::finish (Inkscape::Extension::Print * /*mod*/) +unsigned int PrintEmfWin32::finish (Inkscape::Extension::Print * /*mod*/) { if (!hdc) return 0; @@ -248,8 +247,7 @@ PrintEmfWin32::finish (Inkscape::Extension::Print * /*mod*/) } -unsigned int -PrintEmfWin32::comment (Inkscape::Extension::Print * /*module*/, +unsigned int PrintEmfWin32::comment (Inkscape::Extension::Print * /*module*/, const char * /*comment*/) { if (!hdc) return 0; @@ -260,8 +258,7 @@ PrintEmfWin32::comment (Inkscape::Extension::Print * /*module*/, } -int -PrintEmfWin32::create_brush(SPStyle const *style) +int PrintEmfWin32::create_brush(SPStyle const *style) { float rgb[3]; @@ -287,8 +284,7 @@ PrintEmfWin32::create_brush(SPStyle const *style) } -void -PrintEmfWin32::destroy_brush() +void PrintEmfWin32::destroy_brush() { SelectObject( hdc, hbrushOld ); if (hbrush) @@ -298,8 +294,7 @@ PrintEmfWin32::destroy_brush() } -void -PrintEmfWin32::create_pen(SPStyle const *style, const Geom::Affine &transform) +void PrintEmfWin32::create_pen(SPStyle const *style, const Geom::Affine &transform) { if (style) { float rgb[3]; @@ -422,8 +417,7 @@ PrintEmfWin32::create_pen(SPStyle const *style, const Geom::Affine &transform) } -void -PrintEmfWin32::destroy_pen() +void PrintEmfWin32::destroy_pen() { SelectObject( hdc, hpenOld ); if (hpen) @@ -432,8 +426,7 @@ PrintEmfWin32::destroy_pen() } -void -PrintEmfWin32::flush_fill() +void PrintEmfWin32::flush_fill() { if (!fill_pathv.empty()) { stroke_and_fill = false; @@ -447,8 +440,7 @@ PrintEmfWin32::flush_fill() } } -unsigned int -PrintEmfWin32::bind(Inkscape::Extension::Print * /*mod*/, Geom::Affine const &transform, float /*opacity*/) +unsigned int PrintEmfWin32::bind(Inkscape::Extension::Print * /*mod*/, Geom::Affine const &transform, float /*opacity*/) { if (!m_tr_stack.empty()) { Geom::Affine tr_top = m_tr_stack.top(); @@ -460,15 +452,13 @@ PrintEmfWin32::bind(Inkscape::Extension::Print * /*mod*/, Geom::Affine const &tr return 1; } -unsigned int -PrintEmfWin32::release(Inkscape::Extension::Print * /*mod*/) +unsigned int PrintEmfWin32::release(Inkscape::Extension::Print * /*mod*/) { m_tr_stack.pop(); return 1; } -unsigned int -PrintEmfWin32::fill(Inkscape::Extension::Print * /*mod*/, +unsigned int PrintEmfWin32::fill(Inkscape::Extension::Print * /*mod*/, Geom::PathVector const &pathv, Geom::Affine const & /*transform*/, SPStyle const *style, Geom::OptRect const &/*pbox*/, Geom::OptRect const &/*dbox*/, Geom::OptRect const &/*bbox*/) { @@ -496,8 +486,7 @@ PrintEmfWin32::fill(Inkscape::Extension::Print * /*mod*/, } -unsigned int -PrintEmfWin32::stroke (Inkscape::Extension::Print * /*mod*/, +unsigned int PrintEmfWin32::stroke (Inkscape::Extension::Print * /*mod*/, Geom::PathVector const &pathv, const Geom::Affine &/*transform*/, const SPStyle *style, Geom::OptRect const &/*pbox*/, Geom::OptRect const &/*dbox*/, Geom::OptRect const &/*bbox*/) { @@ -536,8 +525,7 @@ PrintEmfWin32::stroke (Inkscape::Extension::Print * /*mod*/, } -bool -PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom::Affine &transform) +bool PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom::Affine &transform) { Geom::PathVector pv = pathv_to_linear_and_cubic_beziers( pathv * transform ); @@ -732,8 +720,7 @@ PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom::Aff return done; } -unsigned int -PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geom::Affine &transform) +unsigned int PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geom::Affine &transform) { simple_shape = print_simple_shape(pathv, transform); @@ -837,14 +824,12 @@ PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geom::Affine &tr } -bool -PrintEmfWin32::textToPath(Inkscape::Extension::Print * ext) +bool PrintEmfWin32::textToPath(Inkscape::Extension::Print * ext) { return ext->get_param_bool("textToPath"); } -unsigned int -PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom::Point const &p, +unsigned int PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom::Point const &p, SPStyle const *const style) { if (!hdc) return 0; @@ -935,8 +920,7 @@ PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char const *text, Geom return 0; } -void -PrintEmfWin32::init (void) +void PrintEmfWin32::init (void) { Inkscape::Extension::Extension * ext; diff --git a/src/extension/internal/odf.h b/src/extension/internal/odf.h index a4a13681a..47cd47296 100644 --- a/src/extension/internal/odf.h +++ b/src/extension/internal/odf.h @@ -131,7 +131,7 @@ public: class GradientStop { public: - GradientStop() + GradientStop() : rgb(0), opacity(0) {} GradientStop(unsigned long rgbArg, double opacityArg) { rgb = rgbArg; opacity = opacityArg; } diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 344c3c5d2..e8d6363f0 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -110,12 +110,16 @@ SvgBuilder::~SvgBuilder() { } void SvgBuilder::_init() { - _in_text_object = false; - _need_font_update = true; - _invalidated_style = true; _font_style = NULL; _current_font = NULL; + _font_specification = NULL; + _font_scaling = 1; + _need_font_update = true; + _in_text_object = false; + _invalidated_style = true; _current_state = NULL; + _width = 0; + _height = 0; // Fill _availableFontNames (Bug LP #179589) (code cfr. FontLister) FamilyToStylesMap familyStyleMap; diff --git a/src/extension/internal/pdfinput/svg-builder.h b/src/extension/internal/pdfinput/svg-builder.h index 7a36be806..c289d9b36 100644 --- a/src/extension/internal/pdfinput/svg-builder.h +++ b/src/extension/internal/pdfinput/svg-builder.h @@ -221,7 +221,8 @@ private: Inkscape::XML::Node *_root; // Root node from the point of view of this SvgBuilder Inkscape::XML::Node *_container; // Current container (group/pattern/mask) Inkscape::XML::Node *_preferences; // Preferences container node - double _width, _height; // Document size in px + double _width; // Document size in px + double _height; // Document size in px }; diff --git a/src/extension/param/color.cpp b/src/extension/param/color.cpp index 58db85748..1e5dee51c 100644 --- a/src/extension/param/color.cpp +++ b/src/extension/param/color.cpp @@ -40,8 +40,7 @@ ParamColor::~ParamColor(void) } -guint32 -ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) +guint32 ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/ ) { _value = in; @@ -58,7 +57,8 @@ ParamColor::set( guint32 in, SPDocument * /*doc*/, Inkscape::XML::Node * /*node* /** \brief Initialize the object, to do that, copy the data. */ ParamColor::ParamColor (const gchar * name, const gchar * guitext, const gchar * desc, const Parameter::_scope_t scope, bool gui_hidden, const gchar * gui_tip, Inkscape::Extension::Extension * ext, Inkscape::XML::Node * xml) : - Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, ext) + Parameter(name, guitext, desc, scope, gui_hidden, gui_tip, ext), + _changeSignal(0) { const char * defaulthex = NULL; if (sp_repr_children(xml) != NULL) @@ -77,8 +77,7 @@ ParamColor::ParamColor (const gchar * name, const gchar * guitext, const gchar * return; } -void -ParamColor::string (std::string &string) +void ParamColor::string (std::string &string) { char str[16]; sprintf(str, "%i", _value); @@ -86,8 +85,7 @@ ParamColor::string (std::string &string) return; } -Gtk::Widget * -ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal ) +Gtk::Widget *ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, sigc::signal<void> * changeSignal ) { if (_gui_hidden) return NULL; @@ -112,8 +110,7 @@ ParamColor::get_widget( SPDocument * /*doc*/, Inkscape::XML::Node * /*node*/, si return dynamic_cast<Gtk::Widget *>(hbox); } -void -sp_color_param_changed(SPColorSelector *csel, GObject *obj) +void sp_color_param_changed(SPColorSelector *csel, GObject *obj) { const SPColor color = csel->base->getColor(); float alpha = csel->base->getAlpha(); |
