diff options
Diffstat (limited to 'printing/printed_document.cc')
-rw-r--r-- | printing/printed_document.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/printing/printed_document.cc b/printing/printed_document.cc index 333f1d87..ec040d4 100644 --- a/printing/printed_document.cc +++ b/printing/printed_document.cc @@ -72,14 +72,16 @@ void PrintedDocument::SetPage(int page_number, NativeMetafile* metafile, double shrink, const gfx::Size& paper_size, - const gfx::Rect& page_rect) { + const gfx::Rect& page_rect, + bool has_visible_overlays) { // Notice the page_number + 1, the reason is that this is the value that will // be shown. Users dislike 0-based counting. scoped_refptr<PrintedPage> page( new PrintedPage(page_number + 1, metafile, paper_size, - page_rect)); + page_rect, + has_visible_overlays)); { AutoLock lock(lock_); mutable_.pages_[page_number] = page; @@ -184,7 +186,7 @@ void PrintedDocument::PrintHeaderFooter(gfx::NativeDrawingContext context, PageOverlays::VerticalPosition y, const gfx::Font& font) const { const PrintSettings& settings = immutable_.settings_; - if (!settings.use_overlays) { + if (!settings.use_overlays || !page.has_visible_overlays()) { return; } const std::wstring& line = settings.overlays.GetOverlay(x, y); |