diff options
| author | Randy Morgan <[email protected]> | 2012-05-16 08:56:16 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-16 08:56:16 +0900 |
| commit | 2d6ca8e719a158aae83797b6d6f601486d90d48d (patch) | |
| tree | 1888f251334b7779f48775160188fc34a62ff9ed /lib/axlsx/workbook/worksheet/page_setup.rb | |
| parent | ba299f4030dba855277f6b694d12f694b1916167 (diff) | |
| download | caxlsx-2d6ca8e719a158aae83797b6d6f601486d90d48d.tar.gz caxlsx-2d6ca8e719a158aae83797b6d6f601486d90d48d.zip | |
needs to be a dual comparison. Possible to set both values to 0 after initialization.
Diffstat (limited to 'lib/axlsx/workbook/worksheet/page_setup.rb')
| -rw-r--r-- | lib/axlsx/workbook/worksheet/page_setup.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/axlsx/workbook/worksheet/page_setup.rb b/lib/axlsx/workbook/worksheet/page_setup.rb index 14448689..83195b62 100644 --- a/lib/axlsx/workbook/worksheet/page_setup.rb +++ b/lib/axlsx/workbook/worksheet/page_setup.rb @@ -72,9 +72,9 @@ module Axlsx end # @see fit_to_height - def fit_to_height=(v); Axlsx::validate_unsigned_int(v); @fit_to_height = v; @worksheet.fit_to_page = true; end + def fit_to_height=(v); Axlsx::validate_unsigned_int(v); @fit_to_height = v; @worksheet.fit_to_page = (@fit_to_height.to_i + @fit_to_width.to_i > 0); end # @see fit_to_width - def fit_to_width=(v); Axlsx::validate_unsigned_int(v); @fit_to_width = v; @worksheet.fit_to_page = true; end + def fit_to_width=(v); Axlsx::validate_unsigned_int(v); @fit_to_width = v; @worksheet.fit_to_page = (@fit_to_height.to_i + @fit_to_width.to_i > 0); end # @see orientation def orientation=(v); Axlsx::validate_page_orientation(v); @orientation = v; end # @see paper_height |
