rubyXL 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. data/VERSION +1 -1
  2. data/lib/rubyXL/objects/border.rb +3 -3
  3. data/lib/rubyXL/objects/chartsheet.rb +20 -5
  4. data/lib/rubyXL/objects/fill.rb +3 -3
  5. data/lib/rubyXL/objects/filters.rb +5 -5
  6. data/lib/rubyXL/objects/font.rb +3 -3
  7. data/lib/rubyXL/objects/ooxml_object.rb +209 -138
  8. data/lib/rubyXL/objects/relationships.rb +2 -2
  9. data/lib/rubyXL/objects/sheet_common.rb +2 -2
  10. data/lib/rubyXL/objects/stylesheet.rb +35 -35
  11. data/lib/rubyXL/objects/workbook.rb +26 -27
  12. data/lib/rubyXL/objects/worksheet.rb +59 -51
  13. data/lib/rubyXL/parser.rb +22 -12
  14. data/lib/rubyXL/workbook.rb +5 -6
  15. data/lib/rubyXL/worksheet.rb +3 -3
  16. data/lib/rubyXL/writer/workbook_writer.rb +2 -2
  17. data/rdoc/README_rdoc.html +1 -1
  18. data/rdoc/RubyXL.html +1 -1
  19. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  20. data/rdoc/RubyXL/Alignment.html +1 -1
  21. data/rdoc/RubyXL/AlternateContent.html +1 -1
  22. data/rdoc/RubyXL/AutoFilter.html +1 -1
  23. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  24. data/rdoc/RubyXL/BooleanNode.html +1 -1
  25. data/rdoc/RubyXL/BooleanValue.html +1 -1
  26. data/rdoc/RubyXL/Border.html +1 -1
  27. data/rdoc/RubyXL/BorderEdge.html +1 -1
  28. data/rdoc/RubyXL/{FillContainer.html → Borders.html} +5 -5
  29. data/rdoc/RubyXL/Break.html +1 -1
  30. data/rdoc/RubyXL/BreakList.html +2 -2
  31. data/rdoc/RubyXL/CalculationChain.html +1 -1
  32. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  33. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  34. data/rdoc/RubyXL/Cell.html +1 -1
  35. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  36. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  37. data/rdoc/RubyXL/CellSmartTags.html +105 -0
  38. data/rdoc/RubyXL/CellStyle.html +1 -1
  39. data/rdoc/RubyXL/CellStyleXFs.html +105 -0
  40. data/rdoc/RubyXL/CellStyles.html +105 -0
  41. data/rdoc/RubyXL/CellValue.html +1 -1
  42. data/rdoc/RubyXL/CellWatch.html +1 -1
  43. data/rdoc/RubyXL/{CellXFContainer.html → CellWatches.html} +5 -5
  44. data/rdoc/RubyXL/CellXFs.html +105 -0
  45. data/rdoc/RubyXL/Chartsheet.html +1 -1
  46. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  47. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  48. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  49. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  50. data/rdoc/RubyXL/{BorderContainer.html → ChartsheetViews.html} +4 -4
  51. data/rdoc/RubyXL/Color.html +1 -1
  52. data/rdoc/RubyXL/ColorFilter.html +1 -1
  53. data/rdoc/RubyXL/ColorScale.html +1 -1
  54. data/rdoc/RubyXL/ColorScheme.html +1 -1
  55. data/rdoc/RubyXL/ColorSet.html +1 -1
  56. data/rdoc/RubyXL/Colors.html +1 -1
  57. data/rdoc/RubyXL/ColumnRange.html +1 -1
  58. data/rdoc/RubyXL/ColumnRanges.html +1 -1
  59. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  60. data/rdoc/RubyXL/ConditionalFormatting.html +2 -2
  61. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  62. data/rdoc/RubyXL/CustomFilter.html +1 -1
  63. data/rdoc/RubyXL/{CustomFilterContainer.html → CustomFilters.html} +5 -5
  64. data/rdoc/RubyXL/{CellStyleXFContainer.html → CustomProperties.html} +5 -5
  65. data/rdoc/RubyXL/CustomProperty.html +1 -1
  66. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  67. data/rdoc/RubyXL/CustomSheetViews.html +2 -2
  68. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  69. data/rdoc/RubyXL/{CustomWorkbookViewContainer.html → CustomWorkbookViews.html} +5 -5
  70. data/rdoc/RubyXL/DXF.html +1 -1
  71. data/rdoc/RubyXL/DXFs.html +1 -1
  72. data/rdoc/RubyXL/DataBar.html +1 -1
  73. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  74. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  75. data/rdoc/RubyXL/DataConsolidationReferences.html +2 -2
  76. data/rdoc/RubyXL/DataValidation.html +1 -1
  77. data/rdoc/RubyXL/DataValidations.html +1 -1
  78. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  79. data/rdoc/RubyXL/DefinedName.html +1 -1
  80. data/rdoc/RubyXL/DefinedNames.html +2 -2
  81. data/rdoc/RubyXL/DocumentProperties.html +1 -1
  82. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  83. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  84. data/rdoc/RubyXL/{EmbeddedControlContainer.html → EmbeddedControls.html} +5 -5
  85. data/rdoc/RubyXL/Extension.html +1 -1
  86. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  87. data/rdoc/RubyXL/ExternalReference.html +1 -1
  88. data/rdoc/RubyXL/ExternalReferences.html +2 -2
  89. data/rdoc/RubyXL/FieldItem.html +1 -1
  90. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  91. data/rdoc/RubyXL/FileSharing.html +1 -1
  92. data/rdoc/RubyXL/FileVersion.html +1 -1
  93. data/rdoc/RubyXL/Fill.html +1 -1
  94. data/rdoc/RubyXL/{FontContainer.html → Fills.html} +5 -5
  95. data/rdoc/RubyXL/FilterContainer.html +1 -1
  96. data/rdoc/RubyXL/FloatNode.html +1 -1
  97. data/rdoc/RubyXL/FloatValue.html +1 -1
  98. data/rdoc/RubyXL/Font.html +1 -1
  99. data/rdoc/RubyXL/FontScheme.html +1 -1
  100. data/rdoc/RubyXL/Fonts.html +105 -0
  101. data/rdoc/RubyXL/FormatScheme.html +1 -1
  102. data/rdoc/RubyXL/Formula.html +1 -1
  103. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  104. data/rdoc/RubyXL/{CellWatchContainer.html → FunctionGroups.html} +5 -5
  105. data/rdoc/RubyXL/GenericStorage.html +1 -1
  106. data/rdoc/RubyXL/GradientFill.html +1 -1
  107. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  108. data/rdoc/RubyXL/Hyperlink.html +1 -1
  109. data/rdoc/RubyXL/Hyperlinks.html +105 -0
  110. data/rdoc/RubyXL/IconFilter.html +1 -1
  111. data/rdoc/RubyXL/IconSet.html +1 -1
  112. data/rdoc/RubyXL/IgnoredError.html +1 -1
  113. data/rdoc/RubyXL/IgnoredErrors.html +105 -0
  114. data/rdoc/RubyXL/IndexedColors.html +105 -0
  115. data/rdoc/RubyXL/InputCells.html +1 -1
  116. data/rdoc/RubyXL/IntegerNode.html +1 -1
  117. data/rdoc/RubyXL/IntegerValue.html +1 -1
  118. data/rdoc/RubyXL/LegacyCell.html +1 -1
  119. data/rdoc/RubyXL/LegacyWorkbook.html +25 -25
  120. data/rdoc/RubyXL/LegacyWorksheet.html +3 -29
  121. data/rdoc/RubyXL/{ChartsheetViewContainer.html → MRUColors.html} +5 -5
  122. data/rdoc/RubyXL/MergedCell.html +1 -1
  123. data/rdoc/RubyXL/MergedCells.html +2 -2
  124. data/rdoc/RubyXL/NumFmt.html +1 -1
  125. data/rdoc/RubyXL/NumberFormat.html +1 -1
  126. data/rdoc/RubyXL/{NumberFormatContainer.html → NumberFormats.html} +6 -6
  127. data/rdoc/RubyXL/OLEObject.html +1 -1
  128. data/rdoc/RubyXL/OLEObjects.html +2 -2
  129. data/rdoc/RubyXL/OLESize.html +1 -1
  130. data/rdoc/RubyXL/OOXMLContainerObject.html +105 -0
  131. data/rdoc/RubyXL/OOXMLObject.html +1 -758
  132. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +559 -0
  133. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +98 -0
  134. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  135. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  136. data/rdoc/RubyXL/PageMargins.html +1 -1
  137. data/rdoc/RubyXL/PageSetup.html +1 -1
  138. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  139. data/rdoc/RubyXL/Pane.html +1 -1
  140. data/rdoc/RubyXL/Parser.html +23 -13
  141. data/rdoc/RubyXL/PatternFill.html +1 -1
  142. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  143. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  144. data/rdoc/RubyXL/PivotArea.html +1 -1
  145. data/rdoc/RubyXL/PivotCache.html +1 -1
  146. data/rdoc/RubyXL/PivotCaches.html +2 -2
  147. data/rdoc/RubyXL/PivotReference.html +1 -1
  148. data/rdoc/RubyXL/{CellStyleContainer.html → PivotReferences.html} +5 -5
  149. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  150. data/rdoc/RubyXL/PrintOptions.html +1 -1
  151. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  152. data/rdoc/RubyXL/ProtectedRanges.html +2 -2
  153. data/rdoc/RubyXL/Protection.html +1 -1
  154. data/rdoc/RubyXL/RID.html +1 -1
  155. data/rdoc/RubyXL/RawOOXML.html +1 -1
  156. data/rdoc/RubyXL/Reference.html +1 -1
  157. data/rdoc/RubyXL/Relationship.html +1 -1
  158. data/rdoc/RubyXL/RichText.html +1 -1
  159. data/rdoc/RubyXL/RichTextRun.html +1 -1
  160. data/rdoc/RubyXL/Row.html +1 -1
  161. data/rdoc/RubyXL/RunProperties.html +1 -1
  162. data/rdoc/RubyXL/Scenario.html +1 -1
  163. data/rdoc/RubyXL/Scenarios.html +105 -0
  164. data/rdoc/RubyXL/Selection.html +1 -1
  165. data/rdoc/RubyXL/SharedStringsTable.html +3 -3
  166. data/rdoc/RubyXL/Sheet.html +1 -1
  167. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  168. data/rdoc/RubyXL/SheetData.html +1 -1
  169. data/rdoc/RubyXL/Sheets.html +2 -2
  170. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  171. data/rdoc/RubyXL/SmartTagType.html +1 -1
  172. data/rdoc/RubyXL/SmartTagTypes.html +105 -0
  173. data/rdoc/RubyXL/SmartTags.html +105 -0
  174. data/rdoc/RubyXL/SortCondition.html +1 -1
  175. data/rdoc/RubyXL/SortState.html +1 -1
  176. data/rdoc/RubyXL/Sqref.html +1 -1
  177. data/rdoc/RubyXL/Stop.html +1 -1
  178. data/rdoc/RubyXL/StringNode.html +1 -1
  179. data/rdoc/RubyXL/StringValue.html +1 -1
  180. data/rdoc/RubyXL/Stylesheet.html +1 -1
  181. data/rdoc/RubyXL/TableParts.html +2 -2
  182. data/rdoc/RubyXL/TableStyle.html +1 -1
  183. data/rdoc/RubyXL/TableStyles.html +2 -2
  184. data/rdoc/RubyXL/Text.html +1 -1
  185. data/rdoc/RubyXL/Theme.html +1 -1
  186. data/rdoc/RubyXL/ThemeElements.html +1 -1
  187. data/rdoc/RubyXL/Top10.html +1 -1
  188. data/rdoc/RubyXL/Variant.html +1 -1
  189. data/rdoc/RubyXL/Vector.html +1 -1
  190. data/rdoc/RubyXL/VectorValue.html +1 -1
  191. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  192. data/rdoc/RubyXL/{WebPublishObjectContainer.html → WebPublishObjects.html} +5 -5
  193. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  194. data/rdoc/RubyXL/{WebPublishingItemContainer.html → WebPublishingItems.html} +5 -5
  195. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  196. data/rdoc/RubyXL/Workbook.html +1 -1
  197. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  198. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  199. data/rdoc/RubyXL/WorkbookRelationships.html +3 -3
  200. data/rdoc/RubyXL/WorkbookView.html +1 -1
  201. data/rdoc/RubyXL/WorkbookViews.html +2 -2
  202. data/rdoc/RubyXL/Worksheet.html +1 -1
  203. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  204. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  205. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  206. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  207. data/rdoc/RubyXL/WorksheetView.html +1 -1
  208. data/rdoc/RubyXL/WorksheetViews.html +2 -2
  209. data/rdoc/RubyXL/Writer.html +1 -1
  210. data/rdoc/RubyXL/Writer/ContentTypesWriter.html +1 -1
  211. data/rdoc/RubyXL/Writer/CoreWriter.html +1 -1
  212. data/rdoc/RubyXL/Writer/GenericWriter.html +1 -1
  213. data/rdoc/RubyXL/Writer/RootRelsWriter.html +1 -1
  214. data/rdoc/RubyXL/Writer/StylesWriter.html +1 -1
  215. data/rdoc/RubyXL/Writer/ThemeWriter.html +1 -1
  216. data/rdoc/RubyXL/Writer/WorkbookWriter.html +3 -3
  217. data/rdoc/RubyXL/XF.html +1 -1
  218. data/rdoc/created.rid +19 -20
  219. data/rdoc/index.html +4 -6
  220. data/rdoc/js/search_index.js +1 -1
  221. data/rdoc/table_of_contents.html +89 -132
  222. data/rubyXL.gemspec +30 -29
  223. data/spec/lib/parser_spec.rb +3 -1
  224. data/spec/lib/stylesheet_spec.rb +1 -1
  225. metadata +31 -30
  226. data/lib/rubyXL/writer/worksheet_writer.rb +0 -41
  227. data/rdoc/RubyXL/CellSmartTagContainer.html +0 -105
  228. data/rdoc/RubyXL/CustomPropertyContainer.html +0 -105
  229. data/rdoc/RubyXL/FunctionGroupContainer.html +0 -105
  230. data/rdoc/RubyXL/HyperlinkContainer.html +0 -105
  231. data/rdoc/RubyXL/IgnoredErrorContainer.html +0 -105
  232. data/rdoc/RubyXL/IndexedColorContainer.html +0 -105
  233. data/rdoc/RubyXL/MRUColorContainer.html +0 -105
  234. data/rdoc/RubyXL/PivotReferenceContainer.html +0 -105
  235. data/rdoc/RubyXL/ScenarioContainer.html +0 -105
  236. data/rdoc/RubyXL/SmartTagContainer.html +0 -105
  237. data/rdoc/RubyXL/SmartTagTypeContainer.html +0 -105
  238. data/rdoc/RubyXL/Writer/WorksheetWriter.html +0 -236
@@ -30,8 +30,8 @@ module RubyXL
30
30
  def before_write_xml
31
31
  self.relationships = []
32
32
 
33
- @workbook.worksheets.each_index { |i|
34
- relationships << create_relationship("worksheets/sheet#{i + 1}.xml", 'worksheet')
33
+ @workbook.worksheets.each_with_index { |sheet, i|
34
+ relationships << create_relationship(sheet.filepath.gsub(/^xl\//, ''), sheet.rel_type)
35
35
  }
36
36
 
37
37
  @workbook.external_links.each_key { |k|
@@ -16,8 +16,8 @@ module RubyXL
16
16
  end
17
17
 
18
18
  # http://www.schemacentral.com/sc/ooxml/e-ssml_webPublishItems-1.html
19
- class WebPublishingItemContainer < OOXMLObject
20
- define_child_node(RubyXL::WebPublishingItem, :collection => :with_count, :accessor => :web_items)
19
+ class WebPublishingItems < OOXMLContainerObject
20
+ define_child_node(RubyXL::WebPublishingItem, :collection => :with_count)
21
21
  define_element_name 'webPublishItems'
22
22
  end
23
23
 
@@ -21,11 +21,11 @@ module RubyXL
21
21
  end
22
22
 
23
23
  # http://www.schemacentral.com/sc/ooxml/e-ssml_numFmts-1.html
24
- class NumberFormatContainer < OOXMLObject
25
- define_child_node(RubyXL::NumberFormat, :collection => :with_count, :accessor => :number_formats)
24
+ class NumberFormats < OOXMLContainerObject
25
+ define_child_node(RubyXL::NumberFormat, :collection => :with_count)
26
26
  define_element_name 'numFmts'
27
27
 
28
- DEFAULT_NUMBER_FORMATS = self.new(:number_formats => [
28
+ DEFAULT_NUMBER_FORMATS = self.new(:_ => [
29
29
  RubyXL::NumberFormat.new(:num_fmt_id => 1, :format_code => '0'),
30
30
  RubyXL::NumberFormat.new(:num_fmt_id => 2, :format_code => '0.00'),
31
31
  RubyXL::NumberFormat.new(:num_fmt_id => 3, :format_code => '#, ##0'),
@@ -60,28 +60,28 @@ module RubyXL
60
60
  ])
61
61
 
62
62
  def find_by_format_id(format_id)
63
- number_formats.find { |fmt| fmt.num_fmt_id == format_id }
63
+ self.find { |fmt| fmt.num_fmt_id == format_id }
64
64
  end
65
65
 
66
66
  end
67
67
 
68
68
  # http://www.schemacentral.com/sc/ooxml/e-ssml_cellStyleXfs-1.html
69
- class CellStyleXFContainer < OOXMLObject
70
- define_child_node(RubyXL::XF, :collection => :with_count, :accessor => :cell_style_xfs)
69
+ class CellStyleXFs < OOXMLContainerObject
70
+ define_child_node(RubyXL::XF, :collection => :with_count)
71
71
  define_element_name 'cellStyleXfs'
72
72
 
73
73
  def self.defaults
74
- self.new(:cell_style_xfs => [ RubyXL::XF.new(:num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0) ])
74
+ self.new(:_ => [ RubyXL::XF.new(:num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0) ])
75
75
  end
76
76
  end
77
77
 
78
78
  # http://www.schemacentral.com/sc/ooxml/e-ssml_cellXfs-1.html
79
- class CellXFContainer < OOXMLObject
80
- define_child_node(RubyXL::XF, :collection => :with_count, :accessor => :xfs)
79
+ class CellXFs < OOXMLContainerObject
80
+ define_child_node(RubyXL::XF, :collection => :with_count)
81
81
  define_element_name 'cellXfs'
82
82
 
83
83
  def self.defaults
84
- self.new(:xfs => [
84
+ self.new(:_ => [
85
85
  RubyXL::XF.new(
86
86
  :num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0, :xfId => 0
87
87
  )
@@ -90,12 +90,12 @@ module RubyXL
90
90
  end
91
91
 
92
92
  # http://www.schemacentral.com/sc/ooxml/e-ssml_cellStyles-1.html
93
- class CellStyleContainer < OOXMLObject
94
- define_child_node(RubyXL::CellStyle, :collection => :with_count, :accessor => :cell_styles)
93
+ class CellStyles < OOXMLContainerObject
94
+ define_child_node(RubyXL::CellStyle, :collection => :with_count)
95
95
  define_element_name 'cellStyles'
96
96
 
97
97
  def self.defaults
98
- self.new(:cell_styles => [ RubyXL::CellStyle.new(:builtin_id => 0, :name => 'Normal', :xf_id => 0) ])
98
+ self.new(:_ => [ RubyXL::CellStyle.new(:builtin_id => 0, :name => 'Normal', :xf_id => 0) ])
99
99
  end
100
100
  end
101
101
 
@@ -127,7 +127,7 @@ module RubyXL
127
127
  end
128
128
 
129
129
  # http://www.schemacentral.com/sc/ooxml/e-ssml_tableStyles-1.html
130
- class TableStyles < OOXMLObject
130
+ class TableStyles < OOXMLContainerObject
131
131
  define_attribute(:defaultTableStyle, :string)
132
132
  define_attribute(:defaultPivotStyle, :string)
133
133
  define_child_node(RubyXL::TableStyle, :collection => :with_count)
@@ -140,33 +140,33 @@ module RubyXL
140
140
  end
141
141
 
142
142
  # http://www.schemacentral.com/sc/ooxml/e-ssml_colors-1.html
143
- class IndexedColorContainer < OOXMLObject
144
- define_child_node(RubyXL::Color, :collection => :true, :accessor => :indexed_colors, :node_name => :rgbColor)
143
+ class IndexedColors < OOXMLContainerObject
144
+ define_child_node(RubyXL::Color, :collection => :true, :node_name => :rgbColor)
145
145
  define_element_name 'indexedColors'
146
146
  end
147
147
 
148
148
  # http://www.schemacentral.com/sc/ooxml/e-ssml_mruColors-1.html
149
- class MRUColorContainer < OOXMLObject
150
- define_child_node(RubyXL::Color, :collection => :true, :accessor => :mru_colors)
149
+ class MRUColors < OOXMLContainerObject
150
+ define_child_node(RubyXL::Color, :collection => :true)
151
151
  define_element_name 'mruColors'
152
152
  end
153
153
 
154
154
  # http://www.schemacentral.com/sc/ooxml/e-ssml_colors-1.html
155
155
  class Colors < OOXMLObject
156
- define_child_node(RubyXL::IndexedColorContainer, :accessor => :indexed_color_container)
157
- define_child_node(RubyXL::MRUColorContainer)
156
+ define_child_node(RubyXL::IndexedColors)
157
+ define_child_node(RubyXL::MRUColors)
158
158
  define_element_name 'colors'
159
159
  end
160
160
 
161
161
  # http://www.schemacentral.com/sc/ooxml/e-ssml_styleSheet.html
162
162
  class Stylesheet < OOXMLTopLevelObject
163
- define_child_node(RubyXL::NumberFormatContainer, :accessor => :number_format_container)
164
- define_child_node(RubyXL::FontContainer, :accessor => :font_container)
165
- define_child_node(RubyXL::FillContainer, :accessor => :fill_container)
166
- define_child_node(RubyXL::BorderContainer, :accessor => :border_container)
167
- define_child_node(RubyXL::CellStyleXFContainer, :accessor => :cell_style_xf_container)
168
- define_child_node(RubyXL::CellXFContainer, :accessor => :cell_xf_container)
169
- define_child_node(RubyXL::CellStyleContainer, :accessor => :cell_style_container)
163
+ define_child_node(RubyXL::NumberFormats, :accessor => :number_formats)
164
+ define_child_node(RubyXL::Fonts)
165
+ define_child_node(RubyXL::Fills)
166
+ define_child_node(RubyXL::Borders)
167
+ define_child_node(RubyXL::CellStyleXFs)
168
+ define_child_node(RubyXL::CellXFs)
169
+ define_child_node(RubyXL::CellStyles)
170
170
  define_child_node(RubyXL::DXFs)
171
171
  define_child_node(RubyXL::TableStyles)
172
172
  define_child_node(RubyXL::Colors)
@@ -188,20 +188,20 @@ module RubyXL
188
188
  end
189
189
 
190
190
  def self.default
191
- self.new(:cell_xf_container => RubyXL::CellXFContainer.defaults,
192
- :font_container => RubyXL::FontContainer.defaults,
193
- :fill_container => RubyXL::FillContainer.defaults,
194
- :border_container => RubyXL::BorderContainer.defaults,
195
- :cell_style_container => RubyXL::CellStyleContainer.defaults,
196
- :cell_style_xf_container => RubyXL::CellStyleXFContainer.defaults)
191
+ self.new(:fonts => RubyXL::Fonts.defaults,
192
+ :fills => RubyXL::Fills.defaults,
193
+ :borders => RubyXL::Borders.defaults,
194
+ :cell_xfs => RubyXL::CellXFs.defaults,
195
+ :cell_styles => RubyXL::CellStyles.defaults,
196
+ :cell_style_xfs => RubyXL::CellStyleXFs.defaults)
197
197
  end
198
198
 
199
199
  def get_number_format_by_id(format_id)
200
200
  @format_hash ||= {}
201
201
 
202
202
  if @format_hash[format_id].nil? then
203
- @format_hash[format_id] = NumberFormatContainer::DEFAULT_NUMBER_FORMATS.find_by_format_id(format_id) ||
204
- (number_format_container && number_format_container.find_by_format_id(format_id))
203
+ @format_hash[format_id] = NumberFormats::DEFAULT_NUMBER_FORMATS.find_by_format_id(format_id) ||
204
+ (number_formats && number_formats.find_by_format_id(format_id))
205
205
  end
206
206
 
207
207
  @format_hash[format_id]
@@ -77,7 +77,7 @@ module RubyXL
77
77
  end
78
78
 
79
79
  # http://www.schemacentral.com/sc/ooxml/e-ssml_bookViews-1.html
80
- class WorkbookViews < OOXMLObject
80
+ class WorkbookViews < OOXMLContainerObject
81
81
  define_child_node(RubyXL::WorkbookView, :collection => true)
82
82
  define_element_name 'bookViews'
83
83
  end
@@ -92,8 +92,8 @@ module RubyXL
92
92
  end
93
93
 
94
94
  # http://www.schemacentral.com/sc/ooxml/e-ssml_sheets-1.html
95
- class Sheets < OOXMLObject
96
- define_child_node(RubyXL::Sheet, :collection => true, :accessor => :sheets)
95
+ class Sheets < OOXMLContainerObject
96
+ define_child_node(RubyXL::Sheet, :collection => true)
97
97
  define_element_name 'sheets'
98
98
  end
99
99
 
@@ -104,8 +104,8 @@ module RubyXL
104
104
  end
105
105
 
106
106
  # http://www.schemacentral.com/sc/ooxml/e-ssml_externalReferences-1.html
107
- class ExternalReferences < OOXMLObject
108
- define_child_node(RubyXL::ExternalReference, :collection => true, :accessor => :ext_refs)
107
+ class ExternalReferences < OOXMLContainerObject
108
+ define_child_node(RubyXL::ExternalReference, :collection => true)
109
109
  define_element_name 'externalReferences'
110
110
  end
111
111
 
@@ -134,8 +134,8 @@ module RubyXL
134
134
  end
135
135
 
136
136
  # http://www.schemacentral.com/sc/ooxml/e-ssml_definedName-2.html
137
- class DefinedNames < OOXMLObject
138
- define_child_node(RubyXL::DefinedName, :collection => true, :accessor => :defined_names)
137
+ class DefinedNames < OOXMLContainerObject
138
+ define_child_node(RubyXL::DefinedName, :collection => true)
139
139
  define_element_name 'definedNames'
140
140
  end
141
141
 
@@ -147,8 +147,8 @@ module RubyXL
147
147
  end
148
148
 
149
149
  # http://www.schemacentral.com/sc/ooxml/e-ssml_pivotCaches-1.html
150
- class PivotCaches < OOXMLObject
151
- define_child_node(RubyXL::PivotCache, :collection => true, :accessor => :pivot_caches)
150
+ class PivotCaches < OOXMLContainerObject
151
+ define_child_node(RubyXL::PivotCache, :collection => true)
152
152
  define_element_name 'pivotCaches'
153
153
  end
154
154
 
@@ -210,8 +210,8 @@ module RubyXL
210
210
  end
211
211
 
212
212
  # http://www.schemacentral.com/sc/ooxml/e-ssml_webPublishObjects-1.html
213
- class WebPublishObjectContainer < OOXMLObject
214
- define_child_node(RubyXL::WebPublishObject, :collection => :with_count, :node_name => :web_publish_objects)
213
+ class WebPublishObjects < OOXMLContainerObject
214
+ define_child_node(RubyXL::WebPublishObject, :collection => :with_count)
215
215
  define_element_name 'webPublishObjects'
216
216
  end
217
217
 
@@ -231,8 +231,8 @@ module RubyXL
231
231
  end
232
232
 
233
233
  # http://www.schemacentral.com/sc/ooxml/e-ssml_smartTagTypes-1.html
234
- class SmartTagTypeContainer < OOXMLObject
235
- define_child_node(RubyXL::SmartTagType, :collection => :true, :node_name => :smart_tag_types)
234
+ class SmartTagTypes < OOXMLContainerObject
235
+ define_child_node(RubyXL::SmartTagType, :collection => :true)
236
236
  define_element_name 'smartTagTypes'
237
237
  end
238
238
 
@@ -243,9 +243,9 @@ module RubyXL
243
243
  end
244
244
 
245
245
  # http://www.schemacentral.com/sc/ooxml/e-ssml_functionGroups-1.html
246
- class FunctionGroupContainer < OOXMLObject
246
+ class FunctionGroups < OOXMLContainerObject
247
247
  define_attribute(:builtInGroupCountpi, :int, :default => 16)
248
- define_child_node(RubyXL::FunctionGroup, :collection => :true, :node_name => :function_group)
248
+ define_child_node(RubyXL::FunctionGroup, :collection => :true)
249
249
  define_element_name 'functionGroups'
250
250
  end
251
251
 
@@ -280,12 +280,11 @@ module RubyXL
280
280
  end
281
281
 
282
282
  # http://www.schemacentral.com/sc/ooxml/e-ssml_customWorkbookViews-1.html
283
- class CustomWorkbookViewContainer < OOXMLObject
284
- define_child_node(RubyXL::CustomWorkbookView, :collection => true, :accessor => :custom_views)
283
+ class CustomWorkbookViews < OOXMLContainerObject
284
+ define_child_node(RubyXL::CustomWorkbookView, :collection => true)
285
285
  define_element_name 'customWorkbookView'
286
286
  end
287
-
288
-
287
+
289
288
  # http://www.schemacentral.com/sc/ooxml/e-ssml_workbook.html
290
289
  class Workbook < OOXMLTopLevelObject
291
290
  define_child_node(RubyXL::FileVersion)
@@ -293,19 +292,19 @@ module RubyXL
293
292
  define_child_node(RubyXL::WorkbookProperties, :accessor => :workbook_properties)
294
293
  define_child_node(RubyXL::WorkbookProtection)
295
294
  define_child_node(RubyXL::WorkbookViews)
296
- define_child_node(RubyXL::Sheets, :accessor => :worksheet_container)
297
- define_child_node(RubyXL::FunctionGroupContainer, :accessor => :function_group_container)
298
- define_child_node(RubyXL::ExternalReferences, :accessor => :ext_ref_container)
299
- define_child_node(RubyXL::DefinedNames, :accessor => :defined_name_container)
295
+ define_child_node(RubyXL::Sheets)
296
+ define_child_node(RubyXL::FunctionGroups)
297
+ define_child_node(RubyXL::ExternalReferences)
298
+ define_child_node(RubyXL::DefinedNames)
300
299
  define_child_node(RubyXL::CalculationProperties)
301
300
  define_child_node(RubyXL::OLESize)
302
- define_child_node(RubyXL::CustomWorkbookViewContainer, :accessor => :custom_view_container)
303
- define_child_node(RubyXL::PivotCaches, :accessor => :pivot_cache_container)
301
+ define_child_node(RubyXL::CustomWorkbookViews)
302
+ define_child_node(RubyXL::PivotCaches)
304
303
  define_child_node(RubyXL::SmartTagProperties)
305
- define_child_node(RubyXL::SmartTagTypeContainer)
304
+ define_child_node(RubyXL::SmartTagTypes)
306
305
  define_child_node(RubyXL::WebPublishingProperties)
307
306
  define_child_node(RubyXL::FileRecoveryProperties)
308
- define_child_node(RubyXL::WebPublishObjectContainer)
307
+ define_child_node(RubyXL::WebPublishObjects)
309
308
  define_child_node(RubyXL::ExtensionStorageArea)
310
309
  define_child_node(RubyXL::AlternateContent)
311
310
 
@@ -87,7 +87,7 @@ module RubyXL
87
87
  define_element_name 'pageSetup'
88
88
  end
89
89
 
90
- class TableParts < OOXMLObject
90
+ class TableParts < OOXMLContainerObject
91
91
  define_child_node(RubyXL::RID, :collection => :with_count, :node_name => :table_part)
92
92
  define_element_name 'tableParts'
93
93
  end
@@ -99,7 +99,7 @@ module RubyXL
99
99
  end
100
100
 
101
101
  # http://www.schemacentral.com/sc/ooxml/e-ssml_mergeCells-1.html
102
- class MergedCells < OOXMLObject
102
+ class MergedCells < OOXMLContainerObject
103
103
  define_child_node(RubyXL::MergedCell, :collection => :with_count)
104
104
  define_element_name 'mergeCells'
105
105
  end
@@ -130,7 +130,7 @@ module RubyXL
130
130
  end
131
131
 
132
132
  # http://www.schemacentral.com/sc/ooxml/e-ssml_protectedRanges-1.html
133
- class ProtectedRanges < OOXMLObject
133
+ class ProtectedRanges < OOXMLContainerObject
134
134
  define_child_node(RubyXL::ProtectedRange, :collection => true)
135
135
  define_element_name 'protectedRanges'
136
136
  end
@@ -227,16 +227,16 @@ module RubyXL
227
227
  end
228
228
 
229
229
  # http://www.schemacentral.com/sc/ooxml/e-ssml_rowBreaks-1.html
230
- class BreakList < OOXMLObject
230
+ class BreakList < OOXMLContainerObject
231
231
  define_attribute(:manualBreakCount, :int, :default => 0)
232
232
  define_child_node(RubyXL::Break, :collection => :with_count)
233
233
  end
234
234
 
235
235
  # http://www.schemacentral.com/sc/ooxml/e-ssml_conditionalFormatting-1.html
236
- class ConditionalFormatting < OOXMLObject
236
+ class ConditionalFormatting < OOXMLContainerObject
237
237
  define_attribute(:pivot, :bool, :default => false)
238
238
  define_attribute(:sqref, :sqref)
239
- define_child_node(RubyXL::ConditionalFormattingRule, :collection => true, :accessor => :cf_rules)
239
+ define_child_node(RubyXL::ConditionalFormattingRule, :collection => true)
240
240
  define_child_node(RubyXL::ExtensionStorageArea)
241
241
  define_element_name 'conditionalFormatting'
242
242
  end
@@ -263,11 +263,11 @@ module RubyXL
263
263
  end
264
264
 
265
265
  # http://www.schemacentral.com/sc/ooxml/e-ssml_scenarios-1.html
266
- class ScenarioContainer < OOXMLObject
266
+ class Scenarios < OOXMLContainerObject
267
267
  define_attribute(:current, :int)
268
268
  define_attribute(:show, :int)
269
269
  define_attribute(:sqref, :sqref)
270
- define_child_node(RubyXL::Scenario, :collection => true, :accessor => :scenarios)
270
+ define_child_node(RubyXL::Scenario, :collection => true)
271
271
  define_element_name 'scenarios'
272
272
  end
273
273
 
@@ -288,8 +288,8 @@ module RubyXL
288
288
  end
289
289
 
290
290
  # http://www.schemacentral.com/sc/ooxml/e-ssml_ignoredErrors-1.html
291
- class IgnoredErrorContainer < OOXMLObject
292
- define_child_node(RubyXL::IgnoredError, :collection => true, :accessor => :ignored_errors)
291
+ class IgnoredErrors < OOXMLContainerObject
292
+ define_child_node(RubyXL::IgnoredError, :collection => true)
293
293
  define_child_node(RubyXL::ExtensionStorageArea)
294
294
  define_element_name 'ignoredErrors'
295
295
  end
@@ -305,8 +305,8 @@ module RubyXL
305
305
  end
306
306
 
307
307
  # http://www.schemacentral.com/sc/ooxml/e-ssml_hyperlinks-1.html
308
- class HyperlinkContainer < OOXMLObject
309
- define_child_node(RubyXL::Hyperlink, :colection => true, :accessor => :hyperlinks)
308
+ class Hyperlinks < OOXMLContainerObject
309
+ define_child_node(RubyXL::Hyperlink, :colection => true)
310
310
  define_element_name 'hyperlinks'
311
311
  end
312
312
 
@@ -323,8 +323,8 @@ module RubyXL
323
323
  end
324
324
 
325
325
  # http://www.schemacentral.com/sc/ooxml/e-ssml_oleObjects-1.html
326
- class OLEObjects < OOXMLObject
327
- define_child_node(RubyXL::OLEObject, :colection => true, :accessor => :ole_objects)
326
+ class OLEObjects < OOXMLContainerObject
327
+ define_child_node(RubyXL::OLEObject, :colection => true)
328
328
  define_element_name 'oleObjects'
329
329
  end
330
330
 
@@ -338,8 +338,8 @@ module RubyXL
338
338
  end
339
339
 
340
340
  # http://www.schemacentral.com/sc/ooxml/e-ssml_dataRefs-1.html
341
- class DataConsolidationReferences < OOXMLObject
342
- define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count, :accessor => :data_cons_ref)
341
+ class DataConsolidationReferences < OOXMLContainerObject
342
+ define_child_node(RubyXL::DataConsolidationReference, :collection => :with_count)
343
343
  define_element_name 'dataRefs'
344
344
  end
345
345
 
@@ -349,7 +349,7 @@ module RubyXL
349
349
  define_attribute(:leftLabels, :bool, :default => false)
350
350
  define_attribute(:topLabels, :bool, :default => false)
351
351
  define_attribute(:link, :bool, :default => false)
352
- define_child_node(RubyXL::DataConsolidationReferences, :accessor => :data_cons_ref_container)
352
+ define_child_node(RubyXL::DataConsolidationReferences)
353
353
  define_element_name 'dataConsolidate'
354
354
  end
355
355
 
@@ -420,8 +420,8 @@ module RubyXL
420
420
  end
421
421
 
422
422
  # http://www.schemacentral.com/sc/ooxml/e-ssml_customSheetViews-1.html
423
- class CustomSheetViews < OOXMLObject
424
- define_child_node(RubyXL::CustomSheetView, :collection => true, :accessor => :custom_sheet_view)
423
+ class CustomSheetViews < OOXMLContainerObject
424
+ define_child_node(RubyXL::CustomSheetView, :collection => true)
425
425
  define_element_name 'customSheetViews'
426
426
  end
427
427
 
@@ -434,8 +434,8 @@ module RubyXL
434
434
  end
435
435
 
436
436
  # http://www.schemacentral.com/sc/ooxml/e-ssml_controls-1.html
437
- class EmbeddedControlContainer < OOXMLObject
438
- define_child_node(RubyXL::EmbeddedControl, :collection => true, :accessor => :controls)
437
+ class EmbeddedControls < OOXMLContainerObject
438
+ define_child_node(RubyXL::EmbeddedControl, :collection => true)
439
439
  define_element_name 'controls'
440
440
  end
441
441
 
@@ -446,8 +446,8 @@ module RubyXL
446
446
  end
447
447
 
448
448
  # http://www.schemacentral.com/sc/ooxml/e-ssml_cellWatches-1.html
449
- class CellWatchContainer < OOXMLObject
450
- define_child_node(RubyXL::CellWatch, :collection => true, :accessor => :cell_watches)
449
+ class CellWatches < OOXMLContainerObject
450
+ define_child_node(RubyXL::CellWatch, :collection => true)
451
451
  define_element_name 'cellWatches'
452
452
  end
453
453
 
@@ -468,15 +468,15 @@ module RubyXL
468
468
  end
469
469
 
470
470
  # http://www.schemacentral.com/sc/ooxml/e-ssml_cellSmartTags-1.html
471
- class CellSmartTagContainer < OOXMLObject
471
+ class CellSmartTags < OOXMLContainerObject
472
472
  define_attribute(:r, :ref, :accessor => :ref)
473
- define_child_node(RubyXL::CellSmartTag, :collection => :true, :accessor => :cell_smart_tags)
473
+ define_child_node(RubyXL::CellSmartTag, :collection => :true)
474
474
  define_element_name 'cellSmartTags'
475
475
  end
476
476
 
477
477
  # http://www.schemacentral.com/sc/ooxml/e-ssml_smartTags-1.html
478
- class SmartTagContainer < OOXMLObject
479
- define_child_node(RubyXL::CellSmartTagContainer, :collection => :true, :accessor => :smart_tags)
478
+ class SmartTags < OOXMLContainerObject
479
+ define_child_node(RubyXL::CellSmartTags, :collection => :true)
480
480
  define_element_name 'smartTags'
481
481
  end
482
482
 
@@ -488,8 +488,8 @@ module RubyXL
488
488
  end
489
489
 
490
490
  # http://www.schemacentral.com/sc/ooxml/e-ssml_customProperties-1.html
491
- class CustomPropertyContainer < OOXMLObject
492
- define_child_node(RubyXL::CustomProperty, :collection => :true, :accessor => :custom_props)
491
+ class CustomProperties < OOXMLContainerObject
492
+ define_child_node(RubyXL::CustomProperty, :collection => :true)
493
493
  define_element_name 'customProperties'
494
494
  end
495
495
 
@@ -522,8 +522,8 @@ module RubyXL
522
522
  end
523
523
 
524
524
  # http://www.schemacentral.com/sc/ooxml/e-ssml_references-1.html
525
- class PivotReferenceContainer < OOXMLObject
526
- define_child_node(RubyXL::PivotReference, :collection => :with_count, :accessor => :pivot_references)
525
+ class PivotReferences < OOXMLContainerObject
526
+ define_child_node(RubyXL::PivotReference, :collection => :with_count)
527
527
  define_element_name 'references'
528
528
  end
529
529
 
@@ -541,7 +541,7 @@ module RubyXL
541
541
  define_attribute(:collapsedLevelsAreSubtotals, :bool, :default => false)
542
542
  define_attribute(:axis, RubyXL::ST_Axis)
543
543
  define_attribute(:fieldPosition, :int, :default => 0)
544
- define_child_node(RubyXL::PivotReferenceContainer, :accessor => :pivot_reference_container)
544
+ define_child_node(RubyXL::PivotReferences)
545
545
  define_child_node(RubyXL::ExtensionStorageArea)
546
546
  define_element_name 'pivotArea'
547
547
  end
@@ -591,57 +591,57 @@ module RubyXL
591
591
  define_attribute(:zoomScalePageLayoutView, :bool, :default => 0)
592
592
  define_attribute(:workbookViewId, :int, :required => true, :default => 0 )
593
593
  define_child_node(RubyXL::Pane)
594
- define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections )
594
+ define_child_node(RubyXL::Selection, :collection => true, :accessor => :selections)
595
595
  define_child_node(RubyXL::PivotTableSelection, :collection => true, :accessor => :pivot_table_selections )
596
596
  define_child_node(RubyXL::ExtensionStorageArea)
597
597
  define_element_name 'sheetView'
598
598
  end
599
599
 
600
600
  # http://www.schemacentral.com/sc/ooxml/e-ssml_sheetViews-3.html
601
- class WorksheetViews < OOXMLObject
602
- define_child_node(RubyXL::WorksheetView, :collection => true, :accessor => :sheet_views)
601
+ class WorksheetViews < OOXMLContainerObject
602
+ define_child_node(RubyXL::WorksheetView, :collection => true)
603
603
  define_child_node(RubyXL::ExtensionStorageArea)
604
604
  define_element_name 'sheetViews'
605
605
  end
606
606
 
607
- # http://www.schemacentral.com/sc/ooxml/s-sml-sheet.xsd.html
607
+ # http://www.schemacentral.com/sc/ooxml/e-ssml_worksheet.html
608
608
  class Worksheet < OOXMLTopLevelObject
609
609
  define_child_node(RubyXL::WorksheetProperties)
610
610
  define_child_node(RubyXL::WorksheetDimensions)
611
- define_child_node(RubyXL::WorksheetViews, :accessor => :sheet_view_container)
611
+ define_child_node(RubyXL::WorksheetViews)
612
612
  define_child_node(RubyXL::WorksheetFormatProperties)
613
613
  define_child_node(RubyXL::ColumnRanges)
614
614
  define_child_node(RubyXL::SheetData)
615
615
  define_child_node(RubyXL::SheetCalculationProperties)
616
616
  define_child_node(RubyXL::WorksheetProtection)
617
617
  define_child_node(RubyXL::ProtectedRanges)
618
- define_child_node(RubyXL::ScenarioContainer)
618
+ define_child_node(RubyXL::Scenarios)
619
619
  define_child_node(RubyXL::AutoFilter)
620
620
  define_child_node(RubyXL::SortState)
621
621
  define_child_node(RubyXL::DataConsolidate)
622
- define_child_node(RubyXL::CustomSheetViews, :accessor => :custom_sheet_view_container)
623
- define_child_node(RubyXL::MergedCells, :accessor => :merged_cells_list)
624
- define_child_node(RubyXL::PhoneticProperties, :accessor => :custom_props_container)
622
+ define_child_node(RubyXL::CustomSheetViews)
623
+ define_child_node(RubyXL::MergedCells, :accessor => :merged_cells)
624
+ define_child_node(RubyXL::PhoneticProperties)
625
625
  define_child_node(RubyXL::ConditionalFormatting)
626
626
  define_child_node(RubyXL::DataValidations)
627
- define_child_node(RubyXL::HyperlinkContainer)
627
+ define_child_node(RubyXL::Hyperlinks)
628
628
  define_child_node(RubyXL::PrintOptions)
629
629
  define_child_node(RubyXL::PageMargins)
630
630
  define_child_node(RubyXL::PageSetup)
631
631
  define_child_node(RubyXL::HeaderFooterSettings)
632
632
  define_child_node(RubyXL::BreakList, :node_name => :rowBreaks)
633
633
  define_child_node(RubyXL::BreakList, :node_name => :colBreaks)
634
- define_child_node(RubyXL::CustomPropertyContainer)
635
- define_child_node(RubyXL::CellWatchContainer, :accessor => :cell_watch_container)
636
- define_child_node(RubyXL::IgnoredErrorContainer)
637
- define_child_node(RubyXL::SmartTagContainer, :accessor => :smart_tag_container)
634
+ define_child_node(RubyXL::CustomProperties)
635
+ define_child_node(RubyXL::CellWatches)
636
+ define_child_node(RubyXL::IgnoredErrors)
637
+ define_child_node(RubyXL::SmartTags)
638
638
  define_child_node(RubyXL::RID, :node_name => :drawing)
639
639
  define_child_node(RubyXL::RID, :node_name => :legacyDrawing)
640
640
  define_child_node(RubyXL::RID, :node_name => :legacyDrawingHF)
641
641
  define_child_node(RubyXL::RID, :node_name => :picture)
642
- define_child_node(RubyXL::OLEObjects, :accessor => :ole_object_container)
643
- define_child_node(RubyXL::EmbeddedControlContainer, :accessor => :controls_container)
644
- define_child_node(RubyXL::WebPublishingItemContainer, :accessor => :web_items_container)
642
+ define_child_node(RubyXL::OLEObjects)
643
+ define_child_node(RubyXL::EmbeddedControls)
644
+ define_child_node(RubyXL::WebPublishingItems)
645
645
  define_child_node(RubyXL::TableParts)
646
646
  define_child_node(RubyXL::ExtensionStorageArea)
647
647
  define_element_name 'worksheet'
@@ -696,8 +696,16 @@ module RubyXL
696
696
  true
697
697
  end
698
698
 
699
- def merged_cells
700
- (merged_cells_list && merged_cells_list.merge_cell) || []
699
+ def sheet_index
700
+ @workbook.worksheets.select{ |sheet| sheet.is_a?(self.class) }.index{ |sheet| sheet.equal?(self) }
701
+ end
702
+
703
+ def filepath
704
+ File.join('xl', 'worksheets', "sheet#{sheet_index + 1}.xml")
705
+ end
706
+
707
+ def rel_type
708
+ 'worksheet'
701
709
  end
702
710
 
703
711
  include LegacyWorksheet