rubyXL 2.3.4 → 2.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (250) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/rubyXL.rb +2 -0
  4. data/lib/rubyXL/objects/calculation_chain.rb +6 -1
  5. data/lib/rubyXL/objects/chartsheet.rb +7 -1
  6. data/lib/rubyXL/objects/container_nodes.rb +6 -1
  7. data/lib/rubyXL/objects/content_types.rb +95 -0
  8. data/lib/rubyXL/objects/document_properties.rb +77 -1
  9. data/lib/rubyXL/objects/ooxml_object.rb +11 -7
  10. data/lib/rubyXL/objects/relationships.rb +9 -5
  11. data/lib/rubyXL/objects/shared_strings.rb +5 -1
  12. data/lib/rubyXL/objects/simple_types.rb +35 -1
  13. data/lib/rubyXL/objects/stylesheet.rb +5 -1
  14. data/lib/rubyXL/objects/theme.rb +471 -6
  15. data/lib/rubyXL/objects/workbook.rb +52 -1
  16. data/lib/rubyXL/objects/worksheet.rb +7 -1
  17. data/lib/rubyXL/parser.rb +9 -14
  18. data/lib/rubyXL/workbook.rb +11 -13
  19. data/rdoc/README_rdoc.html +1 -1
  20. data/rdoc/RubyXL.html +11 -1
  21. data/rdoc/RubyXL/AExtension.html +225 -0
  22. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  23. data/rdoc/RubyXL/Alignment.html +1 -1
  24. data/rdoc/RubyXL/AlternateContent.html +1 -1
  25. data/rdoc/RubyXL/AutoFilter.html +1 -1
  26. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  27. data/rdoc/RubyXL/BooleanNode.html +1 -1
  28. data/rdoc/RubyXL/BooleanValue.html +1 -1
  29. data/rdoc/RubyXL/Border.html +1 -1
  30. data/rdoc/RubyXL/BorderEdge.html +1 -1
  31. data/rdoc/RubyXL/Borders.html +1 -1
  32. data/rdoc/RubyXL/Break.html +1 -1
  33. data/rdoc/RubyXL/BreakList.html +1 -1
  34. data/rdoc/RubyXL/CalculationChain.html +41 -6
  35. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  36. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  37. data/rdoc/RubyXL/Cell.html +1 -1
  38. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  39. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  40. data/rdoc/RubyXL/CellSmartTags.html +1 -1
  41. data/rdoc/RubyXL/CellStyle.html +1 -1
  42. data/rdoc/RubyXL/CellStyleXFs.html +1 -1
  43. data/rdoc/RubyXL/CellStyles.html +1 -1
  44. data/rdoc/RubyXL/CellValue.html +1 -1
  45. data/rdoc/RubyXL/CellWatch.html +1 -1
  46. data/rdoc/RubyXL/CellWatches.html +1 -1
  47. data/rdoc/RubyXL/CellXFs.html +1 -1
  48. data/rdoc/RubyXL/Chartsheet.html +1 -1
  49. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  50. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  51. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  52. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  53. data/rdoc/RubyXL/ChartsheetViews.html +1 -1
  54. data/rdoc/RubyXL/Color.html +1 -1
  55. data/rdoc/RubyXL/ColorFilter.html +1 -1
  56. data/rdoc/RubyXL/ColorScale.html +1 -1
  57. data/rdoc/RubyXL/ColorScheme.html +1 -1
  58. data/rdoc/RubyXL/ColorSet.html +1 -1
  59. data/rdoc/RubyXL/Colors.html +1 -1
  60. data/rdoc/RubyXL/ColumnRange.html +1 -1
  61. data/rdoc/RubyXL/ColumnRanges.html +1 -1
  62. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  63. data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
  64. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  65. data/rdoc/RubyXL/ContentTypeDefault.html +105 -0
  66. data/rdoc/RubyXL/ContentTypeOverride.html +105 -0
  67. data/rdoc/RubyXL/ContentTypes.html +310 -0
  68. data/rdoc/RubyXL/CoreProperties.html +105 -0
  69. data/rdoc/RubyXL/CustomColor.html +105 -0
  70. data/rdoc/RubyXL/CustomColorList.html +105 -0
  71. data/rdoc/RubyXL/CustomFilter.html +1 -1
  72. data/rdoc/RubyXL/CustomFilters.html +1 -1
  73. data/rdoc/RubyXL/CustomGeometry.html +105 -0
  74. data/rdoc/RubyXL/CustomProperties.html +1 -1
  75. data/rdoc/RubyXL/CustomProperty.html +1 -1
  76. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  77. data/rdoc/RubyXL/CustomSheetViews.html +1 -1
  78. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  79. data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
  80. data/rdoc/RubyXL/DXF.html +1 -1
  81. data/rdoc/RubyXL/DXFs.html +1 -1
  82. data/rdoc/RubyXL/DataBar.html +1 -1
  83. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  84. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  85. data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
  86. data/rdoc/RubyXL/DataValidation.html +1 -1
  87. data/rdoc/RubyXL/DataValidations.html +1 -1
  88. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  89. data/rdoc/RubyXL/DefinedName.html +1 -1
  90. data/rdoc/RubyXL/DefinedNames.html +1 -1
  91. data/rdoc/RubyXL/DocumentProperties.html +41 -6
  92. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  93. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  94. data/rdoc/RubyXL/EmbeddedControls.html +1 -1
  95. data/rdoc/RubyXL/Extension.html +1 -121
  96. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  97. data/rdoc/RubyXL/Extents.html +105 -0
  98. data/rdoc/RubyXL/ExternalReference.html +1 -1
  99. data/rdoc/RubyXL/ExternalReferences.html +1 -1
  100. data/rdoc/RubyXL/ExtraColorScheme.html +105 -0
  101. data/rdoc/RubyXL/ExtraColorSchemeList.html +105 -0
  102. data/rdoc/RubyXL/FieldItem.html +1 -1
  103. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  104. data/rdoc/RubyXL/FileSharing.html +1 -1
  105. data/rdoc/RubyXL/FileVersion.html +1 -1
  106. data/rdoc/RubyXL/Fill.html +1 -1
  107. data/rdoc/RubyXL/Fills.html +1 -1
  108. data/rdoc/RubyXL/FilterContainer.html +1 -1
  109. data/rdoc/RubyXL/FloatNode.html +1 -1
  110. data/rdoc/RubyXL/FloatValue.html +1 -1
  111. data/rdoc/RubyXL/Font.html +1 -1
  112. data/rdoc/RubyXL/FontScheme.html +1 -1
  113. data/rdoc/RubyXL/Fonts.html +1 -1
  114. data/rdoc/RubyXL/FormatScheme.html +1 -1
  115. data/rdoc/RubyXL/Formula.html +1 -1
  116. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  117. data/rdoc/RubyXL/FunctionGroups.html +1 -1
  118. data/rdoc/RubyXL/GenericStorage.html +1 -1
  119. data/rdoc/RubyXL/GradientFill.html +1 -1
  120. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  121. data/rdoc/RubyXL/Hyperlink.html +1 -1
  122. data/rdoc/RubyXL/Hyperlinks.html +1 -1
  123. data/rdoc/RubyXL/IconFilter.html +1 -1
  124. data/rdoc/RubyXL/IconSet.html +1 -1
  125. data/rdoc/RubyXL/IgnoredError.html +1 -1
  126. data/rdoc/RubyXL/IgnoredErrors.html +1 -1
  127. data/rdoc/RubyXL/IndexedColors.html +1 -1
  128. data/rdoc/RubyXL/InputCells.html +1 -1
  129. data/rdoc/RubyXL/IntegerNode.html +1 -1
  130. data/rdoc/RubyXL/IntegerValue.html +1 -1
  131. data/rdoc/RubyXL/LegacyCell.html +1 -1
  132. data/rdoc/RubyXL/LegacyWorkbook.html +33 -55
  133. data/rdoc/RubyXL/LegacyWorksheet.html +1 -1
  134. data/rdoc/RubyXL/MRUColors.html +1 -1
  135. data/rdoc/RubyXL/MergedCell.html +1 -1
  136. data/rdoc/RubyXL/MergedCells.html +1 -1
  137. data/rdoc/RubyXL/NumFmt.html +1 -1
  138. data/rdoc/RubyXL/NumberFormat.html +1 -1
  139. data/rdoc/RubyXL/NumberFormats.html +1 -1
  140. data/rdoc/RubyXL/OLEObject.html +1 -1
  141. data/rdoc/RubyXL/OLEObjects.html +1 -1
  142. data/rdoc/RubyXL/OLESize.html +1 -1
  143. data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
  144. data/rdoc/RubyXL/OOXMLObject.html +1 -1
  145. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +1 -1
  146. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
  147. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +36 -1
  148. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  149. data/rdoc/RubyXL/ObjectDefaults.html +105 -0
  150. data/rdoc/RubyXL/Offset.html +105 -0
  151. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  152. data/rdoc/RubyXL/PageMargins.html +1 -1
  153. data/rdoc/RubyXL/PageSetup.html +1 -1
  154. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  155. data/rdoc/RubyXL/Pane.html +1 -1
  156. data/rdoc/RubyXL/Parser.html +9 -14
  157. data/rdoc/RubyXL/PatternFill.html +1 -1
  158. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  159. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  160. data/rdoc/RubyXL/PivotArea.html +1 -1
  161. data/rdoc/RubyXL/PivotCache.html +1 -1
  162. data/rdoc/RubyXL/PivotCaches.html +1 -1
  163. data/rdoc/RubyXL/PivotReference.html +1 -1
  164. data/rdoc/RubyXL/PivotReferences.html +1 -1
  165. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  166. data/rdoc/RubyXL/PresetGeometry.html +105 -0
  167. data/rdoc/RubyXL/PrintOptions.html +1 -1
  168. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  169. data/rdoc/RubyXL/ProtectedRanges.html +1 -1
  170. data/rdoc/RubyXL/Protection.html +1 -1
  171. data/rdoc/RubyXL/RID.html +1 -1
  172. data/rdoc/RubyXL/RawOOXML.html +1 -1
  173. data/rdoc/RubyXL/Reference.html +1 -1
  174. data/rdoc/RubyXL/Relationship.html +1 -1
  175. data/rdoc/RubyXL/RichText.html +1 -1
  176. data/rdoc/RubyXL/RichTextRun.html +1 -1
  177. data/rdoc/RubyXL/RootRelationships.html +1 -1
  178. data/rdoc/RubyXL/Row.html +1 -1
  179. data/rdoc/RubyXL/RunProperties.html +1 -1
  180. data/rdoc/RubyXL/Scenario.html +1 -1
  181. data/rdoc/RubyXL/Scenarios.html +1 -1
  182. data/rdoc/RubyXL/Selection.html +1 -1
  183. data/rdoc/RubyXL/ShapeDefault.html +105 -0
  184. data/rdoc/RubyXL/SharedStringsTable.html +43 -8
  185. data/rdoc/RubyXL/Sheet.html +1 -1
  186. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  187. data/rdoc/RubyXL/SheetData.html +1 -1
  188. data/rdoc/RubyXL/Sheets.html +1 -1
  189. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  190. data/rdoc/RubyXL/SmartTagType.html +1 -1
  191. data/rdoc/RubyXL/SmartTagTypes.html +1 -1
  192. data/rdoc/RubyXL/SmartTags.html +1 -1
  193. data/rdoc/RubyXL/SortCondition.html +1 -1
  194. data/rdoc/RubyXL/SortState.html +1 -1
  195. data/rdoc/RubyXL/Sqref.html +1 -1
  196. data/rdoc/RubyXL/Stop.html +1 -1
  197. data/rdoc/RubyXL/StringNode.html +1 -1
  198. data/rdoc/RubyXL/{Writer.html → StringNodeW3C.html} +13 -6
  199. data/rdoc/RubyXL/StringValue.html +1 -1
  200. data/rdoc/RubyXL/Stylesheet.html +1 -1
  201. data/rdoc/RubyXL/TableParts.html +1 -1
  202. data/rdoc/RubyXL/TableStyle.html +1 -1
  203. data/rdoc/RubyXL/TableStyles.html +1 -1
  204. data/rdoc/RubyXL/Text.html +1 -1
  205. data/rdoc/RubyXL/Theme.html +2 -2
  206. data/rdoc/RubyXL/ThemeElements.html +1 -1
  207. data/rdoc/RubyXL/Top10.html +1 -1
  208. data/rdoc/RubyXL/TwoDTransform.html +105 -0
  209. data/rdoc/RubyXL/Variant.html +1 -1
  210. data/rdoc/RubyXL/Vector.html +1 -1
  211. data/rdoc/RubyXL/VectorValue.html +1 -1
  212. data/rdoc/RubyXL/VisualProperties.html +105 -0
  213. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  214. data/rdoc/RubyXL/WebPublishObjects.html +1 -1
  215. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  216. data/rdoc/RubyXL/WebPublishingItems.html +1 -1
  217. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  218. data/rdoc/RubyXL/Workbook.html +1 -1
  219. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  220. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  221. data/rdoc/RubyXL/WorkbookRelationships.html +1 -1
  222. data/rdoc/RubyXL/WorkbookView.html +1 -1
  223. data/rdoc/RubyXL/WorkbookViews.html +1 -1
  224. data/rdoc/RubyXL/Worksheet.html +1 -1
  225. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  226. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  227. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  228. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  229. data/rdoc/RubyXL/WorksheetView.html +1 -1
  230. data/rdoc/RubyXL/WorksheetViews.html +1 -1
  231. data/rdoc/RubyXL/XF.html +1 -1
  232. data/rdoc/created.rid +19 -24
  233. data/rdoc/index.html +12 -16
  234. data/rdoc/js/search_index.js +1 -1
  235. data/rdoc/table_of_contents.html +102 -153
  236. data/rubyXL.gemspec +22 -16
  237. data/spec/lib/parser_spec.rb +16 -2
  238. metadata +21 -15
  239. data/lib/rubyXL/writer/content_types_writer.rb +0 -113
  240. data/lib/rubyXL/writer/core_writer.rb +0 -34
  241. data/lib/rubyXL/writer/generic_writer.rb +0 -43
  242. data/lib/rubyXL/writer/styles_writer.rb +0 -15
  243. data/lib/rubyXL/writer/theme_writer.rb +0 -337
  244. data/lib/rubyXL/writer/workbook_writer.rb +0 -73
  245. data/rdoc/RubyXL/Writer/ContentTypesWriter.html +0 -289
  246. data/rdoc/RubyXL/Writer/CoreWriter.html +0 -210
  247. data/rdoc/RubyXL/Writer/GenericWriter.html +0 -348
  248. data/rdoc/RubyXL/Writer/StylesWriter.html +0 -191
  249. data/rdoc/RubyXL/Writer/ThemeWriter.html +0 -511
  250. data/rdoc/RubyXL/Writer/WorkbookWriter.html +0 -249
data/rubyXL.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rubyXL 2.3.4 ruby lib
5
+ # stub: rubyXL 2.4.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rubyXL"
9
- s.version = "2.3.4"
9
+ s.version = "2.4.0"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Vivek Bhagwat"]
14
- s.date = "2014-02-19"
14
+ s.date = "2014-02-20"
15
15
  s.description = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents"
16
16
  s.email = "bhagwat.vivek@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
35
35
  "lib/rubyXL/objects/color.rb",
36
36
  "lib/rubyXL/objects/column_range.rb",
37
37
  "lib/rubyXL/objects/container_nodes.rb",
38
+ "lib/rubyXL/objects/content_types.rb",
38
39
  "lib/rubyXL/objects/data_validation.rb",
39
40
  "lib/rubyXL/objects/document_properties.rb",
40
41
  "lib/rubyXL/objects/extensions.rb",
@@ -57,14 +58,9 @@ Gem::Specification.new do |s|
57
58
  "lib/rubyXL/parser.rb",
58
59
  "lib/rubyXL/workbook.rb",
59
60
  "lib/rubyXL/worksheet.rb",
60
- "lib/rubyXL/writer/content_types_writer.rb",
61
- "lib/rubyXL/writer/core_writer.rb",
62
- "lib/rubyXL/writer/generic_writer.rb",
63
- "lib/rubyXL/writer/styles_writer.rb",
64
- "lib/rubyXL/writer/theme_writer.rb",
65
- "lib/rubyXL/writer/workbook_writer.rb",
66
61
  "rdoc/README_rdoc.html",
67
62
  "rdoc/RubyXL.html",
63
+ "rdoc/RubyXL/AExtension.html",
68
64
  "rdoc/RubyXL/AExtensionStorageArea.html",
69
65
  "rdoc/RubyXL/Alignment.html",
70
66
  "rdoc/RubyXL/AlternateContent.html",
@@ -108,8 +104,15 @@ Gem::Specification.new do |s|
108
104
  "rdoc/RubyXL/ConditionalFormatValue.html",
109
105
  "rdoc/RubyXL/ConditionalFormatting.html",
110
106
  "rdoc/RubyXL/ConditionalFormattingRule.html",
107
+ "rdoc/RubyXL/ContentTypeDefault.html",
108
+ "rdoc/RubyXL/ContentTypeOverride.html",
109
+ "rdoc/RubyXL/ContentTypes.html",
110
+ "rdoc/RubyXL/CoreProperties.html",
111
+ "rdoc/RubyXL/CustomColor.html",
112
+ "rdoc/RubyXL/CustomColorList.html",
111
113
  "rdoc/RubyXL/CustomFilter.html",
112
114
  "rdoc/RubyXL/CustomFilters.html",
115
+ "rdoc/RubyXL/CustomGeometry.html",
113
116
  "rdoc/RubyXL/CustomProperties.html",
114
117
  "rdoc/RubyXL/CustomProperty.html",
115
118
  "rdoc/RubyXL/CustomSheetView.html",
@@ -133,8 +136,11 @@ Gem::Specification.new do |s|
133
136
  "rdoc/RubyXL/EmbeddedControls.html",
134
137
  "rdoc/RubyXL/Extension.html",
135
138
  "rdoc/RubyXL/ExtensionStorageArea.html",
139
+ "rdoc/RubyXL/Extents.html",
136
140
  "rdoc/RubyXL/ExternalReference.html",
137
141
  "rdoc/RubyXL/ExternalReferences.html",
142
+ "rdoc/RubyXL/ExtraColorScheme.html",
143
+ "rdoc/RubyXL/ExtraColorSchemeList.html",
138
144
  "rdoc/RubyXL/FieldItem.html",
139
145
  "rdoc/RubyXL/FileRecoveryProperties.html",
140
146
  "rdoc/RubyXL/FileSharing.html",
@@ -182,6 +188,8 @@ Gem::Specification.new do |s|
182
188
  "rdoc/RubyXL/OOXMLObjectInstanceMethods.html",
183
189
  "rdoc/RubyXL/OOXMLRelationshipsFile.html",
184
190
  "rdoc/RubyXL/OOXMLTopLevelObject.html",
191
+ "rdoc/RubyXL/ObjectDefaults.html",
192
+ "rdoc/RubyXL/Offset.html",
185
193
  "rdoc/RubyXL/OutlineProperties.html",
186
194
  "rdoc/RubyXL/PageMargins.html",
187
195
  "rdoc/RubyXL/PageSetup.html",
@@ -197,6 +205,7 @@ Gem::Specification.new do |s|
197
205
  "rdoc/RubyXL/PivotReference.html",
198
206
  "rdoc/RubyXL/PivotReferences.html",
199
207
  "rdoc/RubyXL/PivotTableSelection.html",
208
+ "rdoc/RubyXL/PresetGeometry.html",
200
209
  "rdoc/RubyXL/PrintOptions.html",
201
210
  "rdoc/RubyXL/ProtectedRange.html",
202
211
  "rdoc/RubyXL/ProtectedRanges.html",
@@ -213,6 +222,7 @@ Gem::Specification.new do |s|
213
222
  "rdoc/RubyXL/Scenario.html",
214
223
  "rdoc/RubyXL/Scenarios.html",
215
224
  "rdoc/RubyXL/Selection.html",
225
+ "rdoc/RubyXL/ShapeDefault.html",
216
226
  "rdoc/RubyXL/SharedStringsTable.html",
217
227
  "rdoc/RubyXL/Sheet.html",
218
228
  "rdoc/RubyXL/SheetCalculationProperties.html",
@@ -227,6 +237,7 @@ Gem::Specification.new do |s|
227
237
  "rdoc/RubyXL/Sqref.html",
228
238
  "rdoc/RubyXL/Stop.html",
229
239
  "rdoc/RubyXL/StringNode.html",
240
+ "rdoc/RubyXL/StringNodeW3C.html",
230
241
  "rdoc/RubyXL/StringValue.html",
231
242
  "rdoc/RubyXL/Stylesheet.html",
232
243
  "rdoc/RubyXL/TableParts.html",
@@ -236,9 +247,11 @@ Gem::Specification.new do |s|
236
247
  "rdoc/RubyXL/Theme.html",
237
248
  "rdoc/RubyXL/ThemeElements.html",
238
249
  "rdoc/RubyXL/Top10.html",
250
+ "rdoc/RubyXL/TwoDTransform.html",
239
251
  "rdoc/RubyXL/Variant.html",
240
252
  "rdoc/RubyXL/Vector.html",
241
253
  "rdoc/RubyXL/VectorValue.html",
254
+ "rdoc/RubyXL/VisualProperties.html",
242
255
  "rdoc/RubyXL/WebPublishObject.html",
243
256
  "rdoc/RubyXL/WebPublishObjects.html",
244
257
  "rdoc/RubyXL/WebPublishingItem.html",
@@ -257,13 +270,6 @@ Gem::Specification.new do |s|
257
270
  "rdoc/RubyXL/WorksheetProtection.html",
258
271
  "rdoc/RubyXL/WorksheetView.html",
259
272
  "rdoc/RubyXL/WorksheetViews.html",
260
- "rdoc/RubyXL/Writer.html",
261
- "rdoc/RubyXL/Writer/ContentTypesWriter.html",
262
- "rdoc/RubyXL/Writer/CoreWriter.html",
263
- "rdoc/RubyXL/Writer/GenericWriter.html",
264
- "rdoc/RubyXL/Writer/StylesWriter.html",
265
- "rdoc/RubyXL/Writer/ThemeWriter.html",
266
- "rdoc/RubyXL/Writer/WorkbookWriter.html",
267
273
  "rdoc/RubyXL/XF.html",
268
274
  "rdoc/created.rid",
269
275
  "rdoc/fonts.css",
@@ -7,6 +7,8 @@ describe RubyXL::Parser do
7
7
  before do
8
8
  @workbook = RubyXL::Workbook.new
9
9
  @workbook.add_worksheet("Test Worksheet")
10
+ @time = Time.at(Time.now.to_i) # Excel only saves times with 1-second precision.
11
+ @time2 = @time + 123456
10
12
 
11
13
  ws = @workbook.add_worksheet("Escape Test")
12
14
  ws.add_cell(0, 0, "&")
@@ -29,8 +31,12 @@ describe RubyXL::Parser do
29
31
  ws.add_cell(3, 2, -123.456e78)
30
32
  ws.add_cell(3, 3, -123.456e-78)
31
33
 
32
- @time_str = Time.now.to_s
34
+ @workbook.creator = "test creator"
35
+ @workbook.modifier = "test modifier"
36
+ @workbook.created_at = @time
37
+ @workbook.modified_at = @time2
33
38
 
39
+ @time_str = Time.now.to_s
34
40
  @file = Dir::Tmpname.make_tmpname(['rubyXL', '.xlsx'], nil)
35
41
  @workbook.write(@file)
36
42
  end
@@ -55,7 +61,7 @@ describe RubyXL::Parser do
55
61
 
56
62
  lambda {@workbook2 = RubyXL::Parser.parse(filename)}.should raise_error
57
63
  lambda {@workbook2 = RubyXL::Parser.parse(filename, :skip_filename_check => true)}.should_not raise_error
58
-
64
+
59
65
  File.delete(filename)
60
66
  end
61
67
 
@@ -86,6 +92,14 @@ describe RubyXL::Parser do
86
92
  @workbook2["Escape Test"][1][2].value.should == ">"
87
93
  end
88
94
 
95
+ it 'should parse Core properties correctly' do
96
+ @workbook2 = RubyXL::Parser.parse(@file)
97
+ @workbook2.creator.should == "test creator"
98
+ @workbook2.modifier.should == "test modifier"
99
+ @workbook2.created_at.should == @time
100
+ @workbook2.modified_at.should == @time2
101
+ end
102
+
89
103
  end
90
104
 
91
105
  after do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyXL
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vivek Bhagwat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-19 00:00:00.000000000 Z
11
+ date: 2014-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -133,6 +133,7 @@ files:
133
133
  - lib/rubyXL/objects/color.rb
134
134
  - lib/rubyXL/objects/column_range.rb
135
135
  - lib/rubyXL/objects/container_nodes.rb
136
+ - lib/rubyXL/objects/content_types.rb
136
137
  - lib/rubyXL/objects/data_validation.rb
137
138
  - lib/rubyXL/objects/document_properties.rb
138
139
  - lib/rubyXL/objects/extensions.rb
@@ -155,14 +156,9 @@ files:
155
156
  - lib/rubyXL/parser.rb
156
157
  - lib/rubyXL/workbook.rb
157
158
  - lib/rubyXL/worksheet.rb
158
- - lib/rubyXL/writer/content_types_writer.rb
159
- - lib/rubyXL/writer/core_writer.rb
160
- - lib/rubyXL/writer/generic_writer.rb
161
- - lib/rubyXL/writer/styles_writer.rb
162
- - lib/rubyXL/writer/theme_writer.rb
163
- - lib/rubyXL/writer/workbook_writer.rb
164
159
  - rdoc/README_rdoc.html
165
160
  - rdoc/RubyXL.html
161
+ - rdoc/RubyXL/AExtension.html
166
162
  - rdoc/RubyXL/AExtensionStorageArea.html
167
163
  - rdoc/RubyXL/Alignment.html
168
164
  - rdoc/RubyXL/AlternateContent.html
@@ -206,8 +202,15 @@ files:
206
202
  - rdoc/RubyXL/ConditionalFormatValue.html
207
203
  - rdoc/RubyXL/ConditionalFormatting.html
208
204
  - rdoc/RubyXL/ConditionalFormattingRule.html
205
+ - rdoc/RubyXL/ContentTypeDefault.html
206
+ - rdoc/RubyXL/ContentTypeOverride.html
207
+ - rdoc/RubyXL/ContentTypes.html
208
+ - rdoc/RubyXL/CoreProperties.html
209
+ - rdoc/RubyXL/CustomColor.html
210
+ - rdoc/RubyXL/CustomColorList.html
209
211
  - rdoc/RubyXL/CustomFilter.html
210
212
  - rdoc/RubyXL/CustomFilters.html
213
+ - rdoc/RubyXL/CustomGeometry.html
211
214
  - rdoc/RubyXL/CustomProperties.html
212
215
  - rdoc/RubyXL/CustomProperty.html
213
216
  - rdoc/RubyXL/CustomSheetView.html
@@ -231,8 +234,11 @@ files:
231
234
  - rdoc/RubyXL/EmbeddedControls.html
232
235
  - rdoc/RubyXL/Extension.html
233
236
  - rdoc/RubyXL/ExtensionStorageArea.html
237
+ - rdoc/RubyXL/Extents.html
234
238
  - rdoc/RubyXL/ExternalReference.html
235
239
  - rdoc/RubyXL/ExternalReferences.html
240
+ - rdoc/RubyXL/ExtraColorScheme.html
241
+ - rdoc/RubyXL/ExtraColorSchemeList.html
236
242
  - rdoc/RubyXL/FieldItem.html
237
243
  - rdoc/RubyXL/FileRecoveryProperties.html
238
244
  - rdoc/RubyXL/FileSharing.html
@@ -280,6 +286,8 @@ files:
280
286
  - rdoc/RubyXL/OOXMLObjectInstanceMethods.html
281
287
  - rdoc/RubyXL/OOXMLRelationshipsFile.html
282
288
  - rdoc/RubyXL/OOXMLTopLevelObject.html
289
+ - rdoc/RubyXL/ObjectDefaults.html
290
+ - rdoc/RubyXL/Offset.html
283
291
  - rdoc/RubyXL/OutlineProperties.html
284
292
  - rdoc/RubyXL/PageMargins.html
285
293
  - rdoc/RubyXL/PageSetup.html
@@ -295,6 +303,7 @@ files:
295
303
  - rdoc/RubyXL/PivotReference.html
296
304
  - rdoc/RubyXL/PivotReferences.html
297
305
  - rdoc/RubyXL/PivotTableSelection.html
306
+ - rdoc/RubyXL/PresetGeometry.html
298
307
  - rdoc/RubyXL/PrintOptions.html
299
308
  - rdoc/RubyXL/ProtectedRange.html
300
309
  - rdoc/RubyXL/ProtectedRanges.html
@@ -311,6 +320,7 @@ files:
311
320
  - rdoc/RubyXL/Scenario.html
312
321
  - rdoc/RubyXL/Scenarios.html
313
322
  - rdoc/RubyXL/Selection.html
323
+ - rdoc/RubyXL/ShapeDefault.html
314
324
  - rdoc/RubyXL/SharedStringsTable.html
315
325
  - rdoc/RubyXL/Sheet.html
316
326
  - rdoc/RubyXL/SheetCalculationProperties.html
@@ -325,6 +335,7 @@ files:
325
335
  - rdoc/RubyXL/Sqref.html
326
336
  - rdoc/RubyXL/Stop.html
327
337
  - rdoc/RubyXL/StringNode.html
338
+ - rdoc/RubyXL/StringNodeW3C.html
328
339
  - rdoc/RubyXL/StringValue.html
329
340
  - rdoc/RubyXL/Stylesheet.html
330
341
  - rdoc/RubyXL/TableParts.html
@@ -334,9 +345,11 @@ files:
334
345
  - rdoc/RubyXL/Theme.html
335
346
  - rdoc/RubyXL/ThemeElements.html
336
347
  - rdoc/RubyXL/Top10.html
348
+ - rdoc/RubyXL/TwoDTransform.html
337
349
  - rdoc/RubyXL/Variant.html
338
350
  - rdoc/RubyXL/Vector.html
339
351
  - rdoc/RubyXL/VectorValue.html
352
+ - rdoc/RubyXL/VisualProperties.html
340
353
  - rdoc/RubyXL/WebPublishObject.html
341
354
  - rdoc/RubyXL/WebPublishObjects.html
342
355
  - rdoc/RubyXL/WebPublishingItem.html
@@ -355,13 +368,6 @@ files:
355
368
  - rdoc/RubyXL/WorksheetProtection.html
356
369
  - rdoc/RubyXL/WorksheetView.html
357
370
  - rdoc/RubyXL/WorksheetViews.html
358
- - rdoc/RubyXL/Writer.html
359
- - rdoc/RubyXL/Writer/ContentTypesWriter.html
360
- - rdoc/RubyXL/Writer/CoreWriter.html
361
- - rdoc/RubyXL/Writer/GenericWriter.html
362
- - rdoc/RubyXL/Writer/StylesWriter.html
363
- - rdoc/RubyXL/Writer/ThemeWriter.html
364
- - rdoc/RubyXL/Writer/WorkbookWriter.html
365
371
  - rdoc/RubyXL/XF.html
366
372
  - rdoc/created.rid
367
373
  - rdoc/fonts.css
@@ -1,113 +0,0 @@
1
- module RubyXL
2
- module Writer
3
- class ContentTypesWriter < GenericWriter
4
-
5
- def filepath
6
- '[Content_Types].xml'
7
- end
8
-
9
- def write()
10
-
11
- render_xml do |xml|
12
- xml << (xml.create_element('Types',
13
- :xmlns => 'http://schemas.openxmlformats.org/package/2006/content-types') { |root|
14
-
15
- unless @workbook.printer_settings.empty?
16
- root << xml.create_element('Default', {
17
- :Extension => 'bin',
18
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings' })
19
- end
20
- root << xml.create_element('Default', {
21
- :Extension => 'rels',
22
- :ContentType => 'application/vnd.openxmlformats-package.relationships+xml' })
23
-
24
- root << xml.create_element('Default', {
25
- :Extension => 'xml',
26
- :ContentType => 'application/xml' })
27
-
28
- root << xml.create_element('Default', {
29
- :Extension => 'jpeg',
30
- :ContentType => 'image/jpeg' })
31
-
32
- # if @workbook.macros.nil? && @workbook.drawings.empty?
33
- root << xml.create_element('Override', {
34
- :PartName => '/xl/workbook.xml',
35
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml' })
36
- # else
37
- # xml.Override('PartName'=>'/xl/workbook.xml',
38
- # 'ContentType'=>"application/vnd.ms-excel.sheet.macroEnabled.main+xml")
39
- # end
40
-
41
- @workbook.worksheets.each_with_index { |sheet,i|
42
- root << xml.create_element('Override', {
43
- :PartName => "/xl/worksheets/sheet#{i+1}.xml",
44
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml' })
45
- }
46
-
47
- root << xml.create_element('Override', {
48
- :PartName => '/xl/theme/theme1.xml',
49
- :ContentType => 'application/vnd.openxmlformats-officedocument.theme+xml' })
50
-
51
- root << xml.create_element('Override', {
52
- :PartName => '/xl/styles.xml',
53
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml' })
54
-
55
- unless @workbook.shared_strings_container.empty?
56
- root << xml.create_element('Override', {
57
- :PartName => '/xl/sharedStrings.xml',
58
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml' })
59
- end
60
-
61
- @workbook.drawings.each_pair { |k, v|
62
- root << xml.create_element('Override', {
63
- :PartName => "/#{@workbook.drawings.local_dir_path}/#{k}",
64
- :ContentType => 'application/vnd.openxmlformats-officedocument.drawing+xml' })
65
- # xml.Default('Extension'=>'vml',
66
- # 'ContentType'=>'application/vnd.openxmlformats-officedocument.vmlDrawing')
67
- }
68
-
69
- @workbook.charts.each_pair { |k, v|
70
- case k
71
- when /^chart\d*.xml$/ then
72
- root << xml.create_element('Override', {
73
- :PartName => "/#{@workbook.charts.local_dir_path}/#{k}",
74
- :ContentType => 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml' })
75
- when /^style\d*.xml$/ then
76
- root << xml.create_element('Override', {
77
- :PartName => "/#{@workbook.charts.local_dir_path}/#{k}",
78
- :ContentType => 'application/vnd.ms-office.chartstyle+xml' })
79
- when /^colors\d*.xml$/ then
80
- root << xml.create_element('Override', {
81
- :PartName => "/#{@workbook.charts.local_dir_path}/#{k}",
82
- :ContentType => 'application/vnd.ms-office.chartcolorstyle+xml' })
83
- end
84
- }
85
-
86
- root << xml.create_element('Override', {
87
- :PartName => '/docProps/core.xml',
88
- :ContentType => 'application/vnd.openxmlformats-package.core-properties+xml' })
89
-
90
- root << xml.create_element('Override', {
91
- :PartName => '/docProps/app.xml',
92
- :ContentType => 'application/vnd.openxmlformats-officedocument.extended-properties+xml' })
93
-
94
- unless @workbook.external_links.nil?
95
- 1.upto(@workbook.external_links.size-1) do |i|
96
- root << xml.create_element('Override', {
97
- :PartName => "/xl/externalLinks/externalLink#{i}.xml",
98
- :ContentType => 'application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml' })
99
- end
100
- end
101
-
102
- unless @workbook.macros.nil?
103
- root << xml.create_element('Override', {
104
- :PartName => '/xl/vbaProject.bin',
105
- :ContentType => 'application/vnd.ms-office.vbaProject' })
106
- end
107
- })
108
- end
109
- end
110
-
111
- end
112
- end
113
- end
@@ -1,34 +0,0 @@
1
- module RubyXL
2
- module Writer
3
- class CoreWriter < GenericWriter
4
-
5
- def filepath
6
- File.join('docProps', 'core.xml')
7
- end
8
-
9
- def write()
10
- render_xml do |xml|
11
- xml << (xml.create_element('cp:coreProperties',
12
- 'xmlns:cp' => 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',
13
- 'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
14
- 'xmlns:dcterms' => 'http://purl.org/dc/terms/',
15
- 'xmlns:dcmitype' => 'http://purl.org/dc/dcmitype/',
16
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance') { |root|
17
-
18
- root << xml.create_element('dc:creator', @workbook.creator)
19
- root << xml.create_element('cp:lastModifiedBy', @workbook.modifier)
20
-
21
- unless @workbook.created_at.to_s.empty?
22
- root << xml.create_element('dcterms:created', { 'xsi:type' => 'dcterms:W3CDTF' }, @workbook.created_at)
23
- end
24
-
25
- unless @workbook.modified_at.to_s.empty?
26
- root << xml.create_element('dcterms:modified', { 'xsi:type' => 'dcterms:W3CDTF' }, @workbook.modified_at)
27
- end
28
- })
29
- end
30
- end
31
-
32
- end
33
- end
34
- end
@@ -1,43 +0,0 @@
1
- require 'rubygems'
2
- require 'nokogiri'
3
-
4
- module RubyXL
5
- module Writer
6
- class GenericWriter
7
-
8
- def initialize(workbook)
9
- @workbook = workbook
10
- # +self.class+ makes sure constant is pulled from descendant class, not from this one.
11
- # self.class::FILEPATH
12
- end
13
-
14
- def filepath
15
- raise 'Subclass responsebility'
16
- end
17
-
18
- def render_xml
19
- seed_xml = Nokogiri::XML('<?xml version = "1.0" standalone ="yes"?>')
20
- seed_xml.encoding = 'UTF-8'
21
-
22
- yield(seed_xml)
23
-
24
- seed_xml.to_xml({ :indent => 0, :save_with => Nokogiri::XML::Node::SaveOptions::AS_XML })
25
- end
26
-
27
- def add_to_zip(zipfile)
28
- output = write
29
- return if output.nil?
30
- zipfile.get_output_stream(filepath) { |f| f << output }
31
- end
32
-
33
- def ooxml_object
34
- raise 'Subclass responsebility'
35
- end
36
-
37
- def write
38
- ooxml_object && ooxml_object.write_xml
39
- end
40
-
41
- end
42
- end
43
- end