Code

Make curvature work again by fixing a minor omission
[inkscape.git] / src / sp-text.cpp
index 325b3b381e3132659c61bdd5ebe9d5705c0062d3..0d3fd791b58f813b10ab94ceb0cedff731276adf 100644 (file)
@@ -62,7 +62,7 @@ static void sp_text_class_init (SPTextClass *classname);
 static void sp_text_init (SPText *text);
 static void sp_text_release (SPObject *object);
 
-static void sp_text_build (SPObject *object, Document *document, Inkscape::XML::Node *repr);
+static void sp_text_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr);
 static void sp_text_set (SPObject *object, unsigned key, gchar const *value);
 static void sp_text_child_added (SPObject *object, Inkscape::XML::Node *rch, Inkscape::XML::Node *ref);
 static void sp_text_remove_child (SPObject *object, Inkscape::XML::Node *rch);
@@ -147,7 +147,7 @@ sp_text_release (SPObject *object)
 }
 
 static void
-sp_text_build (SPObject *object, Document *doc, Inkscape::XML::Node *repr)
+sp_text_build (SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr)
 {
     sp_object_read_attr(object, "x");
     sp_object_read_attr(object, "y");
@@ -937,11 +937,11 @@ void TextTagAttributes::addToRotate(unsigned index, double delta)
     SVGLength zero_length;
     zero_length = 0.0;
 
-    if (attributes.rotate.size() < index + 1) {
+    if (attributes.rotate.size() < index + 2) {
         if (attributes.rotate.empty())
-            attributes.rotate.resize(index + 1, zero_length);
+            attributes.rotate.resize(index + 2, zero_length);
         else
-            attributes.rotate.resize(index + 1, attributes.rotate.back());
+            attributes.rotate.resize(index + 2, attributes.rotate.back());
     }
     attributes.rotate[index] = mod360(attributes.rotate[index].computed + delta);
 }