summaryrefslogtreecommitdiffstats
path: root/src/object/sp-text.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2019-10-05 12:19:04 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2019-10-05 12:19:04 +0000
commit67d61b662f9c7f8cd39ea78335efb709bade4549 (patch)
tree1df7203973194293cb2e338fed03094b746fd502 /src/object/sp-text.cpp
parentMatch default for star tool and star toolbar (diff)
downloadinkscape-67d61b662f9c7f8cd39ea78335efb709bade4549.tar.gz
inkscape-67d61b662f9c7f8cd39ea78335efb709bade4549.zip
Fix various minor code problems
Diffstat (limited to 'src/object/sp-text.cpp')
-rw-r--r--src/object/sp-text.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/object/sp-text.cpp b/src/object/sp-text.cpp
index 7786bf69c..0da5eccf4 100644
--- a/src/object/sp-text.cpp
+++ b/src/object/sp-text.cpp
@@ -392,7 +392,6 @@ void SPText::snappoints(std::vector<Inkscape::SnapCandidatePoint> &p, Inkscape::
void SPText::hide_shape_inside()
{
SPText *text = dynamic_cast<SPText *>(this);
- SPObject *object = dynamic_cast<SPObject *>(this);
SPStyle *item_style = this->style;
if (item_style && text && item_style->shape_inside.set) {
SPCSSAttr *css_unset = sp_css_attr_from_style(item_style, SP_STYLE_FLAG_IFSET);
@@ -408,7 +407,6 @@ void SPText::hide_shape_inside()
void SPText::show_shape_inside()
{
SPText *text = dynamic_cast<SPText *>(this);
- SPObject *object = dynamic_cast<SPObject *>(this);
if (text && css) {
this->changeCSS(css, "style");
}
@@ -569,7 +567,6 @@ void SPText::_buildLayoutInit()
copy->Copy(uncross);
}
layout.appendWrapShape( copy );
- //delete exclusion_shape;
continue;
}
@@ -584,6 +581,7 @@ void SPText::_buildLayoutInit()
}
}
}
+ delete exclusion_shape;
} else if (has_inline_size()) {
@@ -931,6 +929,9 @@ void SPText::_adjustCoordsRecursive(SPItem *item, Geom::Affine const &m, double
SP_TEXTPATH(item)->attributes.transform(m, ex, ex, is_root);
else if (SP_IS_TREF(item)) {
SP_TREF(item)->attributes.transform(m, ex, ex, is_root);
+ } else {
+ g_warning("element is not text");
+ return;
}
for(auto& o: item->children) {
@@ -970,7 +971,7 @@ Geom::OptRect SPText::get_frame()
if (has_inline_size()) {
double inline_size = style->inline_size.computed;
- unsigned mode = style->writing_mode.computed;
+ //unsigned mode = style->writing_mode.computed;
unsigned anchor = style->text_anchor.computed;
unsigned direction = style->direction.computed;
@@ -1099,8 +1100,6 @@ SPItem *create_text_with_inline_size (SPDesktop *desktop, Geom::Point p0, Geom::
text_object->updateRepr();
- SPCSSAttr* css = sp_repr_css_attr (text_repr, "style");
-
Inkscape::GC::release(text_repr);
Inkscape::GC::release(text_node);