summaryrefslogtreecommitdiffstats
path: root/src/sp-font-face.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-07-31 23:06:31 +0000
committerMarkus Engel <markus.engel@tum.de>2013-07-31 23:06:31 +0000
commit49c324545e713c1ca375b7e559418e02ebe52945 (patch)
treeb1fa48caaa5446f49c09a1d73d48730893fbf8b0 /src/sp-font-face.cpp
parentRemoved placement news / explicit destructor calls. (diff)
downloadinkscape-49c324545e713c1ca375b7e559418e02ebe52945.tar.gz
inkscape-49c324545e713c1ca375b7e559418e02ebe52945.zip
Replacement of unnecessary variables.
(bzr r11608.1.114)
Diffstat (limited to 'src/sp-font-face.cpp')
-rw-r--r--src/sp-font-face.cpp499
1 files changed, 251 insertions, 248 deletions
diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp
index 39242b870..9782f0c83 100644
--- a/src/sp-font-face.cpp
+++ b/src/sp-font-face.cpp
@@ -327,59 +327,48 @@ SPFontFace::~SPFontFace() {
void SPFontFace::build(SPDocument *document, Inkscape::XML::Node *repr) {
SPObject::build(document, repr);
- SPFontFace* object = this;
-
- object->readAttr( "font-family" );
- object->readAttr( "font-style" );
- object->readAttr( "font-variant" );
- object->readAttr( "font-weight" );
- object->readAttr( "font-stretch" );
- object->readAttr( "font-size" );
- object->readAttr( "unicode-range" );
- object->readAttr( "units-per-em" );
- object->readAttr( "panose-1" );
- object->readAttr( "stem-v" );
- object->readAttr( "stem-h" );
- object->readAttr( "slope" );
- object->readAttr( "cap-height" );
- object->readAttr( "x-height" );
- object->readAttr( "accent-height" );
- object->readAttr( "ascent" );
- object->readAttr( "descent" );
- object->readAttr( "widths" );
- object->readAttr( "bbox" );
- object->readAttr( "ideographic" );
- object->readAttr( "alphabetic" );
- object->readAttr( "mathematical" );
- object->readAttr( "ranging" );
- object->readAttr( "v-ideogaphic" );
- object->readAttr( "v-alphabetic" );
- object->readAttr( "v-mathematical" );
- object->readAttr( "v-hanging" );
- object->readAttr( "underline-position" );
- object->readAttr( "underline-thickness" );
- object->readAttr( "strikethrough-position" );
- object->readAttr( "strikethrough-thickness" );
- object->readAttr( "overline-position" );
- object->readAttr( "overline-thickness" );
-}
-
-static void sp_fontface_children_modified(SPFontFace */*sp_fontface*/)
-{
+ this->readAttr( "font-family" );
+ this->readAttr( "font-style" );
+ this->readAttr( "font-variant" );
+ this->readAttr( "font-weight" );
+ this->readAttr( "font-stretch" );
+ this->readAttr( "font-size" );
+ this->readAttr( "unicode-range" );
+ this->readAttr( "units-per-em" );
+ this->readAttr( "panose-1" );
+ this->readAttr( "stem-v" );
+ this->readAttr( "stem-h" );
+ this->readAttr( "slope" );
+ this->readAttr( "cap-height" );
+ this->readAttr( "x-height" );
+ this->readAttr( "accent-height" );
+ this->readAttr( "ascent" );
+ this->readAttr( "descent" );
+ this->readAttr( "widths" );
+ this->readAttr( "bbox" );
+ this->readAttr( "ideographic" );
+ this->readAttr( "alphabetic" );
+ this->readAttr( "mathematical" );
+ this->readAttr( "ranging" );
+ this->readAttr( "v-ideogaphic" );
+ this->readAttr( "v-alphabetic" );
+ this->readAttr( "v-mathematical" );
+ this->readAttr( "v-hanging" );
+ this->readAttr( "underline-position" );
+ this->readAttr( "underline-thickness" );
+ this->readAttr( "strikethrough-position" );
+ this->readAttr( "strikethrough-thickness" );
+ this->readAttr( "overline-position" );
+ this->readAttr( "overline-thickness" );
}
/**
* Callback for child_added event.
*/
void SPFontFace::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) {
- SPFontFace* object = this;
-
- SPFontFace *f = SP_FONTFACE(object);
-
SPObject::child_added(child, ref);
- sp_fontface_children_modified(f);
- object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ this->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
@@ -387,14 +376,9 @@ void SPFontFace::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *re
* Callback for remove_child event.
*/
void SPFontFace::remove_child(Inkscape::XML::Node *child) {
- SPFontFace* object = this;
-
- SPFontFace *f = SP_FONTFACE(object);
-
SPObject::remove_child(child);
- sp_fontface_children_modified(f);
- object->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ this->parent->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
void SPFontFace::release() {
@@ -402,9 +386,6 @@ void SPFontFace::release() {
}
void SPFontFace::set(unsigned int key, const gchar *value) {
- SPFontFace* object = this;
-
- SPFontFace *face = SP_FONTFACE(object);
std::vector<FontFaceStyleType> style;
std::vector<FontFaceVariantType> variant;
std::vector<FontFaceWeightType> weight;
@@ -412,22 +393,24 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
switch (key) {
case SP_PROP_FONT_FAMILY:
- if (face->font_family) {
- g_free(face->font_family);
+ if (this->font_family) {
+ g_free(this->font_family);
}
- face->font_family = g_strdup(value);
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ this->font_family = g_strdup(value);
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
case SP_PROP_FONT_STYLE:
style = sp_read_fontFaceStyleType(value);
- if (face->font_style.size() != style.size()){
- face->font_style = style;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (this->font_style.size() != style.size()){
+ this->font_style = style;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<style.size();i++){
- if (style[i] != face->font_style[i]){
- face->font_style = style;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ if (style[i] != this->font_style[i]){
+ this->font_style = style;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
}
@@ -435,14 +418,15 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
break;
case SP_PROP_FONT_VARIANT:
variant = sp_read_fontFaceVariantType(value);
- if (face->font_variant.size() != variant.size()){
- face->font_variant = variant;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (this->font_variant.size() != variant.size()){
+ this->font_variant = variant;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<variant.size();i++){
- if (variant[i] != face->font_variant[i]){
- face->font_variant = variant;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ if (variant[i] != this->font_variant[i]){
+ this->font_variant = variant;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
}
@@ -450,14 +434,15 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
break;
case SP_PROP_FONT_WEIGHT:
weight = sp_read_fontFaceWeightType(value);
- if (face->font_weight.size() != weight.size()){
- face->font_weight = weight;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (this->font_weight.size() != weight.size()){
+ this->font_weight = weight;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<weight.size();i++){
- if (weight[i] != face->font_weight[i]){
- face->font_weight = weight;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ if (weight[i] != this->font_weight[i]){
+ this->font_weight = weight;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
}
@@ -465,14 +450,15 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
break;
case SP_PROP_FONT_STRETCH:
stretch = sp_read_fontFaceStretchType(value);
- if (face->font_stretch.size() != stretch.size()){
- face->font_stretch = stretch;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (this->font_stretch.size() != stretch.size()){
+ this->font_stretch = stretch;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
} else {
for (unsigned int i=0;i<stretch.size();i++){
- if (stretch[i] != face->font_stretch[i]){
- face->font_stretch = stretch;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+ if (stretch[i] != this->font_stretch[i]){
+ this->font_stretch = stretch;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
break;
}
}
@@ -481,207 +467,230 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
case SP_ATTR_UNITS_PER_EM:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->units_per_em){
- face->units_per_em = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->units_per_em){
+ this->units_per_em = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_STEMV:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->stemv){
- face->stemv = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->stemv){
+ this->stemv = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_STEMH:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->stemh){
- face->stemh = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->stemh){
+ this->stemh = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_SLOPE:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->slope){
- face->slope = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->slope){
+ this->slope = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_CAP_HEIGHT:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->cap_height){
- face->cap_height = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->cap_height){
+ this->cap_height = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_X_HEIGHT:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->x_height){
- face->x_height = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->x_height){
+ this->x_height = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_ACCENT_HEIGHT:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->accent_height){
- face->accent_height = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->accent_height){
+ this->accent_height = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_ASCENT:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->ascent){
- face->ascent = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->ascent){
+ this->ascent = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_DESCENT:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->descent){
- face->descent = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->descent){
+ this->descent = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_IDEOGRAPHIC:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->ideographic){
- face->ideographic = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->ideographic){
+ this->ideographic = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_ALPHABETIC:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->alphabetic){
- face->alphabetic = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->alphabetic){
+ this->alphabetic = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_MATHEMATICAL:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->mathematical){
- face->mathematical = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->mathematical){
+ this->mathematical = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_HANGING:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->hanging){
- face->hanging = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->hanging){
+ this->hanging = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_V_IDEOGRAPHIC:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->v_ideographic){
- face->v_ideographic = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->v_ideographic){
+ this->v_ideographic = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_V_ALPHABETIC:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->v_alphabetic){
- face->v_alphabetic = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->v_alphabetic){
+ this->v_alphabetic = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_V_MATHEMATICAL:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->v_mathematical){
- face->v_mathematical = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->v_mathematical){
+ this->v_mathematical = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_V_HANGING:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->v_hanging){
- face->v_hanging = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->v_hanging){
+ this->v_hanging = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_UNDERLINE_POSITION:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->underline_position){
- face->underline_position = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->underline_position){
+ this->underline_position = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_UNDERLINE_THICKNESS:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->underline_thickness){
- face->underline_thickness = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->underline_thickness){
+ this->underline_thickness = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_STRIKETHROUGH_POSITION:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->strikethrough_position){
- face->strikethrough_position = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->strikethrough_position){
+ this->strikethrough_position = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_STRIKETHROUGH_THICKNESS:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->strikethrough_thickness){
- face->strikethrough_thickness = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->strikethrough_thickness){
+ this->strikethrough_thickness = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_OVERLINE_POSITION:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->overline_position){
- face->overline_position = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->overline_position){
+ this->overline_position = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
case SP_ATTR_OVERLINE_THICKNESS:
{
double number = value ? g_ascii_strtod(value, 0) : 0;
- if (number != face->overline_thickness){
- face->overline_thickness = number;
- object->requestModified(SP_OBJECT_MODIFIED_FLAG);
+
+ if (number != this->overline_thickness){
+ this->overline_thickness = number;
+ this->requestModified(SP_OBJECT_MODIFIED_FLAG);
}
break;
}
@@ -695,42 +704,40 @@ void SPFontFace::set(unsigned int key, const gchar *value) {
* Receives update notifications.
*/
void SPFontFace::update(SPCtx *ctx, guint flags) {
- SPFontFace* object = this;
-
if (flags & (SP_OBJECT_MODIFIED_FLAG)) {
- object->readAttr( "font-family" );
- object->readAttr( "font-style" );
- object->readAttr( "font-variant" );
- object->readAttr( "font-weight" );
- object->readAttr( "font-stretch" );
- object->readAttr( "font-size" );
- object->readAttr( "unicode-range" );
- object->readAttr( "units-per-em" );
- object->readAttr( "panose-1" );
- object->readAttr( "stemv" );
- object->readAttr( "stemh" );
- object->readAttr( "slope" );
- object->readAttr( "cap-height" );
- object->readAttr( "x-height" );
- object->readAttr( "accent-height" );
- object->readAttr( "ascent" );
- object->readAttr( "descent" );
- object->readAttr( "widths" );
- object->readAttr( "bbox" );
- object->readAttr( "ideographic" );
- object->readAttr( "alphabetic" );
- object->readAttr( "mathematical" );
- object->readAttr( "hanging" );
- object->readAttr( "v-ideographic" );
- object->readAttr( "v-alphabetic" );
- object->readAttr( "v-mathematical" );
- object->readAttr( "v-hanging" );
- object->readAttr( "underline-position" );
- object->readAttr( "underline-thickness" );
- object->readAttr( "strikethrough-position" );
- object->readAttr( "strikethrough-thickness" );
- object->readAttr( "overline-position" );
- object->readAttr( "overline-thickness" );
+ this->readAttr( "font-family" );
+ this->readAttr( "font-style" );
+ this->readAttr( "font-variant" );
+ this->readAttr( "font-weight" );
+ this->readAttr( "font-stretch" );
+ this->readAttr( "font-size" );
+ this->readAttr( "unicode-range" );
+ this->readAttr( "units-per-em" );
+ this->readAttr( "panose-1" );
+ this->readAttr( "stemv" );
+ this->readAttr( "stemh" );
+ this->readAttr( "slope" );
+ this->readAttr( "cap-height" );
+ this->readAttr( "x-height" );
+ this->readAttr( "accent-height" );
+ this->readAttr( "ascent" );
+ this->readAttr( "descent" );
+ this->readAttr( "widths" );
+ this->readAttr( "bbox" );
+ this->readAttr( "ideographic" );
+ this->readAttr( "alphabetic" );
+ this->readAttr( "mathematical" );
+ this->readAttr( "hanging" );
+ this->readAttr( "v-ideographic" );
+ this->readAttr( "v-alphabetic" );
+ this->readAttr( "v-mathematical" );
+ this->readAttr( "v-hanging" );
+ this->readAttr( "underline-position" );
+ this->readAttr( "underline-thickness" );
+ this->readAttr( "strikethrough-position" );
+ this->readAttr( "strikethrough-thickness" );
+ this->readAttr( "overline-position" );
+ this->readAttr( "overline-thickness" );
}
SPObject::update(ctx, flags);
@@ -739,10 +746,6 @@ void SPFontFace::update(SPCtx *ctx, guint flags) {
#define COPY_ATTR(rd,rs,key) (rd)->setAttribute((key), rs->attribute(key));
Inkscape::XML::Node* SPFontFace::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
- SPFontFace* object = this;
-
- SPFontFace *face = SP_FONTFACE(object);
-
if ((flags & SP_OBJECT_WRITE_BUILD) && !repr) {
repr = xml_doc->createElement("svg:font-face");
}
@@ -755,69 +758,69 @@ Inkscape::XML::Node* SPFontFace::write(Inkscape::XML::Document *xml_doc, Inkscap
//sp_repr_set_svg_double(repr, "font-stretch", face->font_stretch);
//sp_repr_set_svg_double(repr, "font-size", face->font_size);
//sp_repr_set_svg_double(repr, "unicode-range", face->unicode_range);
- sp_repr_set_svg_double(repr, "units-per-em", face->units_per_em);
+ sp_repr_set_svg_double(repr, "units-per-em", this->units_per_em);
//sp_repr_set_svg_double(repr, "panose-1", face->panose_1);
- sp_repr_set_svg_double(repr, "stemv", face->stemv);
- sp_repr_set_svg_double(repr, "stemh", face->stemh);
- sp_repr_set_svg_double(repr, "slope", face->slope);
- sp_repr_set_svg_double(repr, "cap-height", face->cap_height);
- sp_repr_set_svg_double(repr, "x-height", face->x_height);
- sp_repr_set_svg_double(repr, "accent-height", face->accent_height);
- sp_repr_set_svg_double(repr, "ascent", face->ascent);
- sp_repr_set_svg_double(repr, "descent", face->descent);
+ sp_repr_set_svg_double(repr, "stemv", this->stemv);
+ sp_repr_set_svg_double(repr, "stemh", this->stemh);
+ sp_repr_set_svg_double(repr, "slope", this->slope);
+ sp_repr_set_svg_double(repr, "cap-height", this->cap_height);
+ sp_repr_set_svg_double(repr, "x-height", this->x_height);
+ sp_repr_set_svg_double(repr, "accent-height", this->accent_height);
+ sp_repr_set_svg_double(repr, "ascent", this->ascent);
+ sp_repr_set_svg_double(repr, "descent", this->descent);
//sp_repr_set_svg_double(repr, "widths", face->widths);
//sp_repr_set_svg_double(repr, "bbox", face->bbox);
- sp_repr_set_svg_double(repr, "ideographic", face->ideographic);
- sp_repr_set_svg_double(repr, "alphabetic", face->alphabetic);
- sp_repr_set_svg_double(repr, "mathematical", face->mathematical);
- sp_repr_set_svg_double(repr, "hanging", face->hanging);
- sp_repr_set_svg_double(repr, "v-ideographic", face->v_ideographic);
- sp_repr_set_svg_double(repr, "v-alphabetic", face->v_alphabetic);
- sp_repr_set_svg_double(repr, "v-mathematical", face->v_mathematical);
- sp_repr_set_svg_double(repr, "v-hanging", face->v_hanging);
- sp_repr_set_svg_double(repr, "underline-position", face->underline_position);
- sp_repr_set_svg_double(repr, "underline-thickness", face->underline_thickness);
- sp_repr_set_svg_double(repr, "strikethrough-position", face->strikethrough_position);
- sp_repr_set_svg_double(repr, "strikethrough-thickness", face->strikethrough_thickness);
- sp_repr_set_svg_double(repr, "overline-position", face->overline_position);
- sp_repr_set_svg_double(repr, "overline-thickness", face->overline_thickness);
-
- if (repr != object->getRepr()) {
+ sp_repr_set_svg_double(repr, "ideographic", this->ideographic);
+ sp_repr_set_svg_double(repr, "alphabetic", this->alphabetic);
+ sp_repr_set_svg_double(repr, "mathematical", this->mathematical);
+ sp_repr_set_svg_double(repr, "hanging", this->hanging);
+ sp_repr_set_svg_double(repr, "v-ideographic", this->v_ideographic);
+ sp_repr_set_svg_double(repr, "v-alphabetic", this->v_alphabetic);
+ sp_repr_set_svg_double(repr, "v-mathematical", this->v_mathematical);
+ sp_repr_set_svg_double(repr, "v-hanging", this->v_hanging);
+ sp_repr_set_svg_double(repr, "underline-position", this->underline_position);
+ sp_repr_set_svg_double(repr, "underline-thickness", this->underline_thickness);
+ sp_repr_set_svg_double(repr, "strikethrough-position", this->strikethrough_position);
+ sp_repr_set_svg_double(repr, "strikethrough-thickness", this->strikethrough_thickness);
+ sp_repr_set_svg_double(repr, "overline-position", this->overline_position);
+ sp_repr_set_svg_double(repr, "overline-thickness", this->overline_thickness);
+
+ if (repr != this->getRepr()) {
// In all COPY_ATTR given below the XML tree is
// being used directly while it shouldn't be.
- COPY_ATTR(repr, object->getRepr(), "font-family");
- COPY_ATTR(repr, object->getRepr(), "font-style");
- COPY_ATTR(repr, object->getRepr(), "font-variant");
- COPY_ATTR(repr, object->getRepr(), "font-weight");
- COPY_ATTR(repr, object->getRepr(), "font-stretch");
- COPY_ATTR(repr, object->getRepr(), "font-size");
- COPY_ATTR(repr, object->getRepr(), "unicode-range");
- COPY_ATTR(repr, object->getRepr(), "units-per-em");
- COPY_ATTR(repr, object->getRepr(), "panose-1");
- COPY_ATTR(repr, object->getRepr(), "stemv");
- COPY_ATTR(repr, object->getRepr(), "stemh");
- COPY_ATTR(repr, object->getRepr(), "slope");
- COPY_ATTR(repr, object->getRepr(), "cap-height");
- COPY_ATTR(repr, object->getRepr(), "x-height");
- COPY_ATTR(repr, object->getRepr(), "accent-height");
- COPY_ATTR(repr, object->getRepr(), "ascent");
- COPY_ATTR(repr, object->getRepr(), "descent");
- COPY_ATTR(repr, object->getRepr(), "widths");
- COPY_ATTR(repr, object->getRepr(), "bbox");
- COPY_ATTR(repr, object->getRepr(), "ideographic");
- COPY_ATTR(repr, object->getRepr(), "alphabetic");
- COPY_ATTR(repr, object->getRepr(), "mathematical");
- COPY_ATTR(repr, object->getRepr(), "hanging");
- COPY_ATTR(repr, object->getRepr(), "v-ideographic");
- COPY_ATTR(repr, object->getRepr(), "v-alphabetic");
- COPY_ATTR(repr, object->getRepr(), "v-mathematical");
- COPY_ATTR(repr, object->getRepr(), "v-hanging");
- COPY_ATTR(repr, object->getRepr(), "underline-position");
- COPY_ATTR(repr, object->getRepr(), "underline-thickness");
- COPY_ATTR(repr, object->getRepr(), "strikethrough-position");
- COPY_ATTR(repr, object->getRepr(), "strikethrough-thickness");
- COPY_ATTR(repr, object->getRepr(), "overline-position");
- COPY_ATTR(repr, object->getRepr(), "overline-thickness");
+ COPY_ATTR(repr, this->getRepr(), "font-family");
+ COPY_ATTR(repr, this->getRepr(), "font-style");
+ COPY_ATTR(repr, this->getRepr(), "font-variant");
+ COPY_ATTR(repr, this->getRepr(), "font-weight");
+ COPY_ATTR(repr, this->getRepr(), "font-stretch");
+ COPY_ATTR(repr, this->getRepr(), "font-size");
+ COPY_ATTR(repr, this->getRepr(), "unicode-range");
+ COPY_ATTR(repr, this->getRepr(), "units-per-em");
+ COPY_ATTR(repr, this->getRepr(), "panose-1");
+ COPY_ATTR(repr, this->getRepr(), "stemv");
+ COPY_ATTR(repr, this->getRepr(), "stemh");
+ COPY_ATTR(repr, this->getRepr(), "slope");
+ COPY_ATTR(repr, this->getRepr(), "cap-height");
+ COPY_ATTR(repr, this->getRepr(), "x-height");
+ COPY_ATTR(repr, this->getRepr(), "accent-height");
+ COPY_ATTR(repr, this->getRepr(), "ascent");
+ COPY_ATTR(repr, this->getRepr(), "descent");
+ COPY_ATTR(repr, this->getRepr(), "widths");
+ COPY_ATTR(repr, this->getRepr(), "bbox");
+ COPY_ATTR(repr, this->getRepr(), "ideographic");
+ COPY_ATTR(repr, this->getRepr(), "alphabetic");
+ COPY_ATTR(repr, this->getRepr(), "mathematical");
+ COPY_ATTR(repr, this->getRepr(), "hanging");
+ COPY_ATTR(repr, this->getRepr(), "v-ideographic");
+ COPY_ATTR(repr, this->getRepr(), "v-alphabetic");
+ COPY_ATTR(repr, this->getRepr(), "v-mathematical");
+ COPY_ATTR(repr, this->getRepr(), "v-hanging");
+ COPY_ATTR(repr, this->getRepr(), "underline-position");
+ COPY_ATTR(repr, this->getRepr(), "underline-thickness");
+ COPY_ATTR(repr, this->getRepr(), "strikethrough-position");
+ COPY_ATTR(repr, this->getRepr(), "strikethrough-thickness");
+ COPY_ATTR(repr, this->getRepr(), "overline-position");
+ COPY_ATTR(repr, this->getRepr(), "overline-thickness");
}
SPObject::write(xml_doc, repr, flags);