diff options
| author | Bob Jamison <ishmalius@gmail.com> | 2006-04-14 22:25:41 +0000 |
|---|---|---|
| committer | ishmal <ishmal@users.sourceforge.net> | 2006-04-14 22:25:41 +0000 |
| commit | c8e5f3e11c2cdd451eb02be83f57c3972480f50a (patch) | |
| tree | 76838f09ce9187a5373fe67754c1ff77467d0800 /src | |
| parent | Attempt to preserve the shape of the path when deleting nodes (diff) | |
| download | inkscape-c8e5f3e11c2cdd451eb02be83f57c3972480f50a.tar.gz inkscape-c8e5f3e11c2cdd451eb02be83f57c3972480f50a.zip | |
Got images working correctly
(bzr r526)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/odf.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 03185b5fc..bfb38656a 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -85,7 +85,7 @@ namespace Internal //#define pxToCm 0.0275 -#define pxToCm 0.0333 +#define pxToCm 0.04 #define piToRad 0.0174532925 #define docHeightCm 22.86 @@ -379,8 +379,8 @@ bool OdfOutput::writeStyle(Writer &outs) { outs.printf("<office:automatic-styles>\n"); outs.printf("<style:style style:name=\"dp1\" style:family=\"drawing-page\"/>\n"); - outs.printf("<style:style style:name=\"grx1\" style:family=\"graphic\" style:parent-style-name=\"standard\">\n"); - outs.printf(" <style:graphic-properties draw:stroke=\"none\" draw:fill=\"solid\"\n"); + outs.printf("<style:style style:name=\"gr1\" style:family=\"graphic\" style:parent-style-name=\"standard\">\n"); + outs.printf(" <style:graphic-properties draw:stroke=\"none\" draw:fill=\"none\"\n"); outs.printf(" draw:textarea-horizontal-align=\"center\"\n"); outs.printf(" draw:textarea-vertical-align=\"middle\" draw:color-mode=\"standard\"\n"); outs.printf(" draw:luminance=\"0%\" draw:contrast=\"0%\" draw:gamma=\"100%\" draw:red=\"0%\"\n"); @@ -546,11 +546,17 @@ bool OdfOutput::writeTree(Writer &outs, Inkscape::XML::Node *node) outs.printf("<draw:frame "); if (id.size() > 0) outs.printf("id=\"%s\" ", id.c_str()); - outs.printf("draw:style-name=\"gr1\" draw:text-style-name=\"P1\" draw:layer=\"layout\""); - outs.printf(" svg:width=\"%.3f\" svg:height=\"%.3f\" svg:x=\"%.3f\" svg:y=\"%.3f\">\n", - x, y, width, height); - - outs.printf(" <draw:image xlink:href=\"%s\"/>\n", newName.c_str()); + outs.printf("draw:style-name=\"gr1\" draw:text-style-name=\"P1\" draw:layer=\"layout\" "); + outs.printf("svg:x=\"%.3fcm\" svg:y=\"%.3fcm\" ", + x, y, width); + outs.printf("svg:width=\"%.3fcm\" svg:height=\"%.3fcm\">\n", + width, height); + + outs.printf(" <draw:image xlink:href=\"%s\" xlink:type=\"simple\"\n", + newName.c_str()); + outs.printf(" xlink:show=\"embed\" xlink:actuate=\"onLoad\">\n"); + outs.printf(" <text:p/>\n"); + outs.printf(" </draw:image>\n"); outs.printf("</draw:frame>\n"); return true; } |
