summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2010-03-05 00:15:39 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2010-03-05 00:15:39 +0000
commita9b7c9028767417b2adda38f3dbf99418c73390f (patch)
tree18707d2e45d8093625fc4c7a31b387d9f6e4dc84 /src/selection-chemistry.cpp
parentImprove behavior when pasting, DnDing and importing bitmap images (diff)
downloadinkscape-a9b7c9028767417b2adda38f3dbf99418c73390f.tar.gz
inkscape-a9b7c9028767417b2adda38f3dbf99418c73390f.zip
Always embed bitmap copies created with Alt+B.
Fixed bugs: - https://launchpad.net/bugs/169108 (bzr r9144)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 3bfde6de9..7f8fafea5 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -43,6 +43,7 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
#include "sp-tref.h"
#include "sp-flowtext.h"
#include "sp-flowregion.h"
+#include "sp-image.h"
#include "text-editing.h"
#include "text-context.h"
#include "connector-context.h"
@@ -2770,12 +2771,7 @@ sp_selection_create_bitmap_copy(SPDesktop *desktop)
if (pb) {
// Create the repr for the image
Inkscape::XML::Node * repr = xml_doc->createElement("svg:image");
- {
- repr->setAttribute("sodipodi:absref", filepath);
- gchar *abs_base = Inkscape::XML::calc_abs_doc_base(document->base);
- repr->setAttribute("xlink:href", sp_relative_path_from_path(filepath, abs_base));
- g_free(abs_base);
- }
+ sp_embed_image(repr, pb, "image/png");
if (res == PX_PER_IN) { // for default 90 dpi, snap it to pixel grid
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);