From b5d7734f32155c5b068a6e34ad4aea8e1655a7ba Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 4 Nov 2006 17:35:19 +0000 Subject: Fix printing of page ranges. 2006-11-04 Christian Persch * embed/mozilla/GeckoPrintService.cpp: Fix printing of page ranges. --- embed/mozilla/GeckoPrintService.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'embed/mozilla/GeckoPrintService.cpp') diff --git a/embed/mozilla/GeckoPrintService.cpp b/embed/mozilla/GeckoPrintService.cpp index d5124636b..5a4ca358f 100644 --- a/embed/mozilla/GeckoPrintService.cpp +++ b/embed/mozilla/GeckoPrintService.cpp @@ -534,8 +534,9 @@ GeckoPrintService::TranslateSettings (GtkPrintSettings *aGtkSettings, if (numRanges > 0) { /* FIXME: We can only support one range, ignore more ranges or raise error? */ aSettings->SetPrintRange (nsIPrintSettings::kRangeSpecifiedPageRange); - aSettings->SetStartPageRange (pageRanges[0].start); - aSettings->SetEndPageRange (pageRanges[1].end); + /* Gecko page numbers start at 1, while gtk page numbers start at 0 */ + aSettings->SetStartPageRange (pageRanges[0].start + 1); + aSettings->SetEndPageRange (pageRanges[0].end + 1); g_free (pageRanges); } -- cgit v1.2.3