diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-08-15 20:55:21 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-08-15 20:55:21 +0000 |
| commit | 7f779f28e67eac1653e0f7751bb3f224b67894c7 (patch) | |
| tree | ed872536d8fe377caf2ba22181f8dbfc6a82cf35 /src | |
| parent | Fix bug reported in http://www.viva64.com/en/b/0419/ (diff) | |
| download | inkscape-7f779f28e67eac1653e0f7751bb3f224b67894c7.tar.gz inkscape-7f779f28e67eac1653e0f7751bb3f224b67894c7.zip | |
Fix a bunch of errors as reported at http://www.viva64.com/en/b/0419/
(bzr r15059)
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/drawing-text.cpp | 2 | ||||
| -rw-r--r-- | src/filters/blend.cpp | 4 | ||||
| -rw-r--r-- | src/inkscape.cpp | 2 | ||||
| -rw-r--r-- | src/libnrtype/FontFactory.cpp | 4 | ||||
| -rw-r--r-- | src/livarot/PathOutline.cpp | 2 | ||||
| -rw-r--r-- | src/sp-lpe-item.cpp | 3 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/svg-fonts-dialog.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/font-variants.cpp | 2 | ||||
| -rw-r--r-- | src/verbs.cpp | 2 |
10 files changed, 11 insertions, 16 deletions
diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index f0d83abfd..a0918e9f5 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -269,7 +269,7 @@ void DrawingText::decorateStyle(DrawingContext &dc, double vextent, double xphas int dashes[16]={ 8, 7, 6, 5, 4, 3, 2, 1, - -8, -7, -6, -5 + -8, -7, -6, -5, -4, -3, -2, -1 }; int dots[16]={ diff --git a/src/filters/blend.cpp b/src/filters/blend.cpp index 0c7f87542..9ef544828 100644 --- a/src/filters/blend.cpp +++ b/src/filters/blend.cpp @@ -78,7 +78,7 @@ static Inkscape::Filters::FilterBlendMode sp_feBlend_readmode(gchar const *value case 's': if (strncmp(value, "screen", 6) == 0) return Inkscape::Filters::BLEND_SCREEN; - if (strncmp(value, "saturation", 6) == 0) + if (strncmp(value, "saturation", 10) == 0) return Inkscape::Filters::BLEND_SATURATION; break; case 'd': @@ -106,7 +106,7 @@ static Inkscape::Filters::FilterBlendMode sp_feBlend_readmode(gchar const *value return Inkscape::Filters::BLEND_COLOR; break; case 'h': - if (strncmp(value, "hard-light", 7) == 0) + if (strncmp(value, "hard-light", 10) == 0) return Inkscape::Filters::BLEND_HARDLIGHT; if (strncmp(value, "hue", 3) == 0) return Inkscape::Filters::BLEND_HUE; diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 48b921752..6f8ea4324 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -656,6 +656,7 @@ Application::crash_handler (int /*signum*/) repr = doc->getReprRoot(); if (doc->isModifiedSinceSave()) { const gchar *docname; + char n[64]; /* originally, the document name was retrieved from * the sodipod:docname attribute */ @@ -671,7 +672,6 @@ Application::crash_handler (int /*signum*/) if (*d=='.') dots++; } if (*d=='.' && d>docname && dots==2) { - char n[64]; size_t len = MIN (d - docname, 63); memcpy (n, docname, len); n[len] = '\0'; diff --git a/src/libnrtype/FontFactory.cpp b/src/libnrtype/FontFactory.cpp index 65eb62dda..35d584840 100644 --- a/src/libnrtype/FontFactory.cpp +++ b/src/libnrtype/FontFactory.cpp @@ -702,8 +702,8 @@ font_instance *font_factory::Face(PangoFontDescription *descr, bool canFail) PangoOTTag* features = pango_ot_info_list_features( info, PANGO_OT_TABLE_GSUB, 0, i, j ); - if( features[0] != 0 ) - // std::cout << " features: " << std::endl; + // if( features[0] != 0 ) + // std::cout << " features: " << std::endl; for( unsigned k = 0; features[k] != 0; ++k ) { // dump_tag( &features[k], " feature: "); diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index 1c42301da..0683d8ae8 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -1195,7 +1195,7 @@ Path::OutlineJoin (Path * dest, Geom::Point pos, Geom::Point stNor, Geom::Point if ((dest->descr_cmd[dest->descr_cmd.size() - 1]->getType() == descr_lineto) && (nType == descr_lineto)) { Geom::Point const biss = unit_vector(Geom::rot90( stNor - enNor )); double c2 = Geom::dot (biss, enNor); - if (fabs(c2) > 0.707107) { // apply only to obtuse angles + if (fabs(c2) > M_SQRT1_2) { // apply only to obtuse angles double l = width / c2; PathDescrLineTo* nLine = dynamic_cast<PathDescrLineTo*>(dest->descr_cmd[dest->descr_cmd.size() - 1]); nLine->p = pos + l*biss; // relocate to bisector diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index d9e53fbc5..44dc684c9 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -201,9 +201,6 @@ Inkscape::XML::Node* SPLPEItem::write(Inkscape::XML::Document *xml_doc, Inkscape * returns true when LPE was successful. */ bool SPLPEItem::performPathEffect(SPCurve *curve, bool is_clip_or_mask) { - if (!this) { - return false; - } if (!curve) { return false; diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index 4574e93fe..9a95c3d8c 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1307,7 +1307,7 @@ void InkscapePreferences::initPageBehavior() _steps_rot_relative.init ( _("Relative snapping of guideline angles"), "/options/relativeguiderotationsnap/value", false); _page_steps.add_line( false, "", _steps_rot_relative, "", _("When on, the snap angles when rotating a guideline will be relative to the original angle")); - _steps_zoom.init ( "/options/zoomincrement/value", 101.0, 500.0, 1.0, 1.0, 1.414213562, true, true); + _steps_zoom.init ( "/options/zoomincrement/value", 101.0, 500.0, 1.0, 1.0, M_SQRT2, true, true); _page_steps.add_line( false, _("_Zoom in/out by:"), _steps_zoom, _("%"), _("Zoom tool click, +/- keys, and middle click zoom in and out by this multiplier"), false); this->AddPage(_page_steps, _("Steps"), iter_behavior, PREFS_PAGE_BEHAVIOR_STEPS); diff --git a/src/ui/dialog/svg-fonts-dialog.cpp b/src/ui/dialog/svg-fonts-dialog.cpp index 6a87f3714..0203d9778 100644 --- a/src/ui/dialog/svg-fonts-dialog.cpp +++ b/src/ui/dialog/svg-fonts-dialog.cpp @@ -162,10 +162,8 @@ GlyphComboBox::GlyphComboBox(){ } void GlyphComboBox::update(SPFont* spfont){ - if (!spfont) return -//TODO: figure out why do we need to append("") before clearing items properly... + if (!spfont) return; - this->append(""); //Gtk is refusing to clear the combobox when I comment out this line this->remove_all(); for (auto& node: spfont->children) { diff --git a/src/ui/widget/font-variants.cpp b/src/ui/widget/font-variants.cpp index aca85f246..b386051a6 100644 --- a/src/ui/widget/font-variants.cpp +++ b/src/ui/widget/font-variants.cpp @@ -629,7 +629,7 @@ namespace Widget { } else if( _caps_all_small.get_active() ) { css_string = "all-small-caps"; caps_new = SP_CSS_FONT_VARIANT_CAPS_ALL_SMALL; - } else if( _caps_all_petite.get_active() ) { + } else if( _caps_petite.get_active() ) { css_string = "petite"; caps_new = SP_CSS_FONT_VARIANT_CAPS_PETITE; } else if( _caps_all_petite.get_active() ) { diff --git a/src/verbs.cpp b/src/verbs.cpp index 59ad06fa1..5130f1701 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -1842,7 +1842,7 @@ void ZoomVerb::perform(SPAction *action, void *data) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); gdouble zoom_inc = - prefs->getDoubleLimited( "/options/zoomincrement/value", 1.414213562, 1.01, 10 ); + prefs->getDoubleLimited( "/options/zoomincrement/value", M_SQRT2, 1.01, 10 ); double zcorr = 1.0; Glib::ustring abbr = prefs->getString("/options/zoomcorrection/unit"); |
