diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2015-03-05 10:00:36 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2015-03-05 10:00:36 +0000 |
| commit | baeb92c8b275ada9a09187772e11f8b32b7ae6ef (patch) | |
| tree | 55552d9415217267b804c256189c5526b45178d2 /src/ui/dialog/print.cpp | |
| parent | scale spinboxes for rectangle toolbar. (Bug 307656) (diff) | |
| download | inkscape-baeb92c8b275ada9a09187772e11f8b32b7ae6ef.tar.gz inkscape-baeb92c8b275ada9a09187772e11f8b32b7ae6ef.zip | |
Fix for Bug #918319 (Printing offsets page).
Fix for a dead assignment in the printing code (Jenkins warning: http://jenkins.inkscape.org/job/Inkscape_trunk_scan-build/42/clangScanBuildBugs/browse/report-a94344.html#EndPath).
Fixed bugs:
- https://launchpad.net/bugs/918319
(bzr r13965)
Diffstat (limited to 'src/ui/dialog/print.cpp')
| -rw-r--r-- | src/ui/dialog/print.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index a015d28f9..ad979b570 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -126,30 +126,13 @@ static void draw_page( cairo_surface_t *surface = cairo_get_target(cr); cairo_matrix_t ctm; cairo_get_matrix(cr, &ctm); -#ifdef WIN32 - //Gtk+ does not take the non printable area into account - //http://bugzilla.gnome.org/show_bug.cgi?id=381371 - // - // This workaround translates the origin from the top left of the - // printable area to the top left of the page. - GtkPrintSettings *settings = gtk_print_operation_get_print_settings(operation); - const gchar *printerName = gtk_print_settings_get_printer(settings); - HDC hdc = CreateDC("WINSPOOL", printerName, NULL, NULL); - if (hdc) { - cairo_matrix_t mat; - int x_off = GetDeviceCaps (hdc, PHYSICALOFFSETX); - int y_off = GetDeviceCaps (hdc, PHYSICALOFFSETY); - cairo_matrix_init_translate(&mat, -x_off, -y_off); - cairo_matrix_multiply (&ctm, &ctm, &mat); - DeleteDC(hdc); - } -#endif + bool ret = ctx->setSurfaceTarget (surface, true, &ctm); if (ret) { ret = renderer.setupDocument (ctx, junk->_doc, TRUE, 0., NULL); if (ret) { renderer.renderItem(ctx, junk->_base); - ret = ctx->finish(); + ctx->finish(); } else { g_warning("%s", _("Could not set up Document")); |
