From: ishmal Date: Thu, 20 Apr 2006 22:24:13 +0000 (+0000) Subject: remove duplicate styles, add placeholders for opacities X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=01aa3ce656995c9043b5155ef0cbb687ae29c157;p=inkscape.git remove duplicate styles, add placeholders for opacities --- diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 704d388fd..ff2946af0 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -204,6 +204,9 @@ OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) snprintf(buf, 15, "#%02x%02x%02x", r, g, b); si.fillColor = buf; si.fill = "solid"; + double opacityPercent = 100.0; + snprintf(buf, 15, "%.2f%%", opacityPercent); + si.fillOpacity = buf; } if (style->stroke.type == SP_PAINT_TYPE_COLOR) { @@ -218,6 +221,9 @@ OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) snprintf(buf, 15, "%.2fpt", style->stroke_width.value); si.strokeWidth = buf; si.stroke = "solid"; + double opacityPercent = 100.0; + snprintf(buf, 15, "%.2f%%", opacityPercent); + si.strokeOpacity = buf; } //Look for existing identical style; @@ -229,7 +235,7 @@ OdfOutput::preprocess(ZipFile &zf, Inkscape::XML::Node *node) { //map to existing styleTable entry std::string styleName = iter->first; - g_message("found duplicate style:%s", styleName.c_str()); + //g_message("found duplicate style:%s", styleName.c_str()); styleLookupTable[id] = styleName; styleMatch = true; break; @@ -439,12 +445,16 @@ bool OdfOutput::writeStyle(Writer &outs) outs.printf(" \n"); outs.printf("\n");