OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "printing/page_setup.h" | 5 #include "printing/page_setup.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
9 namespace printing { | 9 namespace printing { |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 footer == rhs.footer && | 31 footer == rhs.footer && |
32 left == rhs.left && | 32 left == rhs.left && |
33 top == rhs.top && | 33 top == rhs.top && |
34 right == rhs.right && | 34 right == rhs.right && |
35 bottom == rhs.bottom; | 35 bottom == rhs.bottom; |
36 } | 36 } |
37 | 37 |
38 PageSetup::PageSetup() : text_height_(0) { | 38 PageSetup::PageSetup() : text_height_(0) { |
39 } | 39 } |
40 | 40 |
| 41 PageSetup::~PageSetup() {} |
| 42 |
41 void PageSetup::Clear() { | 43 void PageSetup::Clear() { |
42 physical_size_.SetSize(0, 0); | 44 physical_size_.SetSize(0, 0); |
43 printable_area_.SetRect(0, 0, 0, 0); | 45 printable_area_.SetRect(0, 0, 0, 0); |
44 overlay_area_.SetRect(0, 0, 0, 0); | 46 overlay_area_.SetRect(0, 0, 0, 0); |
45 content_area_.SetRect(0, 0, 0, 0); | 47 content_area_.SetRect(0, 0, 0, 0); |
46 effective_margins_.Clear(); | 48 effective_margins_.Clear(); |
47 text_height_ = 0; | 49 text_height_ = 0; |
48 } | 50 } |
49 | 51 |
50 bool PageSetup::Equals(const PageSetup& rhs) const { | 52 bool PageSetup::Equals(const PageSetup& rhs) const { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 content_area_.y())); | 119 content_area_.y())); |
118 } | 120 } |
119 | 121 |
120 void PageSetup::SetRequestedMargins(const PageMargins& requested_margins) { | 122 void PageSetup::SetRequestedMargins(const PageMargins& requested_margins) { |
121 requested_margins_ = requested_margins; | 123 requested_margins_ = requested_margins; |
122 if (physical_size_.width() && physical_size_.height()) | 124 if (physical_size_.width() && physical_size_.height()) |
123 Init(physical_size_, printable_area_, text_height_); | 125 Init(physical_size_, printable_area_, text_height_); |
124 } | 126 } |
125 | 127 |
126 } // namespace printing | 128 } // namespace printing |
OLD | NEW |