diff options
| author | Randy Morgan <[email protected]> | 2012-05-20 15:19:23 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-05-20 15:19:23 +0900 |
| commit | 1da5af8828973a9ce126fe8e3b31be20aaf6947a (patch) | |
| tree | 08e0745f634395ea751c7e6da6aa9087f50a170b | |
| parent | 494a5bd5f1eb519c192686c88f6447378d2d9f06 (diff) | |
| download | caxlsx-1da5af8828973a9ce126fe8e3b31be20aaf6947a.tar.gz caxlsx-1da5af8828973a9ce126fe8e3b31be20aaf6947a.zip | |
enable sheet protection by default when it is initialized in the worksheet.
| -rw-r--r-- | lib/axlsx/workbook/worksheet/sheet_protection.rb | 10 | ||||
| -rw-r--r-- | test/workbook/worksheet/tc_sheet_protection.rb | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/axlsx/workbook/worksheet/sheet_protection.rb b/lib/axlsx/workbook/worksheet/sheet_protection.rb index 620ec91b..cc1eaf2b 100644 --- a/lib/axlsx/workbook/worksheet/sheet_protection.rb +++ b/lib/axlsx/workbook/worksheet/sheet_protection.rb @@ -89,31 +89,31 @@ module Axlsx # If 1 or true then Scenarios should not be edited when the sheet is protected. # If 0 or false then Scenarios are allowed to be edited when the sheet is protected. # @return [Boolean] - # default false + # @default false attr_reader :scenarios # If 1 or true then selection of locked cells should not be allowed when the sheet is protected. # If 0 or false then selection of locked cells should be allowed when the sheet is protected. # @return [Boolean] - # default false + # @default false attr_reader :select_locked_cells # If 1 or true then selection of unlocked cells should not be allowed when the sheet is protected. # If 0 or false then selection of unlocked cells should be allowed when the sheet is protected. # @return [Boolean] - # default false + # @default false attr_reader :select_unlocked_cells # If 1 or true then the sheet is protected. # If 0 or false then the sheet is not protected. # @return [Boolean] - # default true + # @default true attr_reader :sheet # If 1 or true then sorting should not be allowed when the sheet is protected. # If 0 or false then sorting should be allowed when the sheet is protected. # @return [Boolean] - # default true + # @default true attr_reader :sort # Specifies the number of times the hashing function shall be iteratively run diff --git a/test/workbook/worksheet/tc_sheet_protection.rb b/test/workbook/worksheet/tc_sheet_protection.rb index b29e2d32..d6b16534 100644 --- a/test/workbook/worksheet/tc_sheet_protection.rb +++ b/test/workbook/worksheet/tc_sheet_protection.rb @@ -27,7 +27,7 @@ require 'tc_helper.rb' class TestSheetProtection < Test::Unit::TestCase def setup #inverse defaults - @options = { :sheet => true, :objects => true, :scenarios => true, :format_cells => false, + @options = { :sheet => false, :objects => true, :scenarios => true, :format_cells => false, :format_columns => false, :format_rows => false, :insert_columns => false, :insert_rows => false, :insert_hyperlinks => false, :delete_columns => false, :delete_rows => false, :select_locked_cells => true, :sort => false, :auto_filter => false, :pivot_tables => false, :select_unlocked_cells => true } |
