rubyXL 3.4.14 → 3.4.33

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 (462) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -1
  3. data/.rubocop.yml +124 -0
  4. data/CHANGELOG.md +12 -0
  5. data/Gemfile +10 -8
  6. data/README.rdoc +32 -13
  7. data/Rakefile +26 -27
  8. data/VERSION +1 -1
  9. data/lib/rubyXL/cell.rb +2 -4
  10. data/lib/rubyXL/convenience_methods/cell.rb +36 -32
  11. data/lib/rubyXL/convenience_methods/color.rb +9 -13
  12. data/lib/rubyXL/convenience_methods/workbook.rb +10 -9
  13. data/lib/rubyXL/convenience_methods/worksheet.rb +103 -7
  14. data/lib/rubyXL/objects/border.rb +0 -3
  15. data/lib/rubyXL/objects/calculation_chain.rb +2 -2
  16. data/lib/rubyXL/objects/cell_style.rb +1 -3
  17. data/lib/rubyXL/objects/chartsheet.rb +6 -10
  18. data/lib/rubyXL/objects/color.rb +2 -4
  19. data/lib/rubyXL/objects/column_range.rb +16 -15
  20. data/lib/rubyXL/objects/comments.rb +1 -4
  21. data/lib/rubyXL/objects/connection.rb +11 -11
  22. data/lib/rubyXL/objects/container_nodes.rb +1 -5
  23. data/lib/rubyXL/objects/content_types.rb +3 -6
  24. data/lib/rubyXL/objects/data_validation.rb +2 -2
  25. data/lib/rubyXL/objects/document_properties.rb +10 -13
  26. data/lib/rubyXL/objects/extensions.rb +0 -2
  27. data/lib/rubyXL/objects/external_links.rb +37 -7
  28. data/lib/rubyXL/objects/fill.rb +2 -5
  29. data/lib/rubyXL/objects/filters.rb +5 -7
  30. data/lib/rubyXL/objects/font.rb +2 -4
  31. data/lib/rubyXL/objects/formula.rb +3 -5
  32. data/lib/rubyXL/objects/ooxml_object.rb +34 -32
  33. data/lib/rubyXL/objects/query_table.rb +7 -5
  34. data/lib/rubyXL/objects/reference.rb +26 -17
  35. data/lib/rubyXL/objects/relationships.rb +7 -12
  36. data/lib/rubyXL/objects/root.rb +0 -2
  37. data/lib/rubyXL/objects/shared_strings.rb +4 -7
  38. data/lib/rubyXL/objects/sheet_common.rb +1 -3
  39. data/lib/rubyXL/objects/sheet_data.rb +12 -14
  40. data/lib/rubyXL/objects/simple_types.rb +3 -1
  41. data/lib/rubyXL/objects/storage.rb +57 -51
  42. data/lib/rubyXL/objects/stylesheet.rb +9 -17
  43. data/lib/rubyXL/objects/text.rb +6 -8
  44. data/lib/rubyXL/objects/theme.rb +19 -24
  45. data/lib/rubyXL/objects/workbook.rb +43 -38
  46. data/lib/rubyXL/objects/worksheet.rb +35 -31
  47. data/lib/rubyXL/parser.rb +1 -3
  48. data/lib/rubyXL/worksheet.rb +86 -79
  49. data/lib/rubyXL.rb +0 -1
  50. data/rdoc/README_rdoc.html +139 -73
  51. data/rdoc/RubyXL/AExtension.html +24 -60
  52. data/rdoc/RubyXL/AExtensionStorageArea.html +6 -13
  53. data/rdoc/RubyXL/ActiveX.html +19 -46
  54. data/rdoc/RubyXL/ActiveXBinary.html +6 -18
  55. data/rdoc/RubyXL/AdjustHandleList.html +6 -13
  56. data/rdoc/RubyXL/Alignment.html +6 -13
  57. data/rdoc/RubyXL/AlternateContent.html +6 -13
  58. data/rdoc/RubyXL/AlternateUrls.html +99 -0
  59. data/rdoc/RubyXL/Authors.html +6 -13
  60. data/rdoc/RubyXL/AutoFilter.html +6 -13
  61. data/rdoc/RubyXL/AutoFilterColumn.html +6 -13
  62. data/rdoc/RubyXL/BinaryImageFile.html +6 -21
  63. data/rdoc/RubyXL/BodyProperties.html +6 -13
  64. data/rdoc/RubyXL/BooleanNode.html +6 -13
  65. data/rdoc/RubyXL/BooleanValue.html +6 -13
  66. data/rdoc/RubyXL/Border.html +37 -89
  67. data/rdoc/RubyXL/BorderEdge.html +23 -53
  68. data/rdoc/RubyXL/Borders.html +16 -35
  69. data/rdoc/RubyXL/Break.html +6 -13
  70. data/rdoc/RubyXL/BreakList.html +6 -13
  71. data/rdoc/RubyXL/CT_AdjPoint2D.html +6 -13
  72. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +6 -13
  73. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +6 -13
  74. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +6 -13
  75. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +6 -13
  76. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +6 -13
  77. data/rdoc/RubyXL/CT_Backdrop.html +6 -13
  78. data/rdoc/RubyXL/CT_Bevel.html +6 -13
  79. data/rdoc/RubyXL/CT_BiLevelEffect.html +6 -13
  80. data/rdoc/RubyXL/CT_BlendEffect.html +6 -13
  81. data/rdoc/RubyXL/CT_Blip.html +6 -13
  82. data/rdoc/RubyXL/CT_BlipFillProperties.html +6 -13
  83. data/rdoc/RubyXL/CT_BlurEffect.html +6 -13
  84. data/rdoc/RubyXL/CT_Camera.html +6 -13
  85. data/rdoc/RubyXL/CT_Color.html +6 -13
  86. data/rdoc/RubyXL/CT_ColorChangeEffect.html +6 -13
  87. data/rdoc/RubyXL/CT_ColorMapping.html +6 -13
  88. data/rdoc/RubyXL/CT_ColorScheme.html +6 -13
  89. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +6 -13
  90. data/rdoc/RubyXL/CT_ConnectionSite.html +6 -13
  91. data/rdoc/RubyXL/CT_ConnectionSiteList.html +6 -13
  92. data/rdoc/RubyXL/CT_DashStop.html +6 -13
  93. data/rdoc/RubyXL/CT_DashStopList.html +6 -13
  94. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +6 -13
  95. data/rdoc/RubyXL/CT_DuotoneEffect.html +6 -13
  96. data/rdoc/RubyXL/CT_EffectContainer.html +6 -13
  97. data/rdoc/RubyXL/CT_EffectList.html +6 -13
  98. data/rdoc/RubyXL/CT_EffectReference.html +6 -13
  99. data/rdoc/RubyXL/CT_EffectStyleItem.html +6 -13
  100. data/rdoc/RubyXL/CT_EffectStyleList.html +6 -13
  101. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +6 -13
  102. data/rdoc/RubyXL/CT_FillEffect.html +6 -13
  103. data/rdoc/RubyXL/CT_FillOverlayEffect.html +6 -13
  104. data/rdoc/RubyXL/CT_FillStyleList.html +6 -13
  105. data/rdoc/RubyXL/CT_FlatText.html +6 -13
  106. data/rdoc/RubyXL/CT_FontCollection.html +6 -13
  107. data/rdoc/RubyXL/CT_FontReference.html +6 -13
  108. data/rdoc/RubyXL/CT_GeomGuideList.html +6 -13
  109. data/rdoc/RubyXL/CT_GlowEffect.html +6 -13
  110. data/rdoc/RubyXL/CT_GradientFillProperties.html +6 -13
  111. data/rdoc/RubyXL/CT_GradientStop.html +6 -13
  112. data/rdoc/RubyXL/CT_GradientStopList.html +6 -13
  113. data/rdoc/RubyXL/CT_HSLEffect.html +6 -13
  114. data/rdoc/RubyXL/CT_HslColor.html +6 -13
  115. data/rdoc/RubyXL/CT_Hyperlink.html +6 -13
  116. data/rdoc/RubyXL/CT_InnerShadowEffect.html +6 -13
  117. data/rdoc/RubyXL/CT_LightRig.html +6 -13
  118. data/rdoc/RubyXL/CT_LineEndProperties.html +6 -13
  119. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +6 -13
  120. data/rdoc/RubyXL/CT_LineProperties.html +6 -13
  121. data/rdoc/RubyXL/CT_LineStyleList.html +6 -13
  122. data/rdoc/RubyXL/CT_LinearShadeProperties.html +6 -13
  123. data/rdoc/RubyXL/CT_LuminanceEffect.html +6 -13
  124. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +6 -13
  125. data/rdoc/RubyXL/CT_OuterShadowEffect.html +6 -13
  126. data/rdoc/RubyXL/CT_Path2D.html +6 -13
  127. data/rdoc/RubyXL/CT_Path2DArcTo.html +6 -13
  128. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +6 -13
  129. data/rdoc/RubyXL/CT_Path2DList.html +6 -13
  130. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +6 -13
  131. data/rdoc/RubyXL/CT_Path2DTo.html +6 -13
  132. data/rdoc/RubyXL/CT_PathShadeProperties.html +6 -13
  133. data/rdoc/RubyXL/CT_PatternFillProperties.html +6 -13
  134. data/rdoc/RubyXL/CT_Point3D.html +6 -13
  135. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +6 -13
  136. data/rdoc/RubyXL/CT_PresetColor.html +6 -13
  137. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +6 -13
  138. data/rdoc/RubyXL/CT_PresetShadowEffect.html +6 -13
  139. data/rdoc/RubyXL/CT_PresetTextShape.html +6 -13
  140. data/rdoc/RubyXL/CT_ReflectionEffect.html +6 -13
  141. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +6 -13
  142. data/rdoc/RubyXL/CT_RelativeRect.html +6 -13
  143. data/rdoc/RubyXL/CT_SRgbColor.html +6 -13
  144. data/rdoc/RubyXL/CT_ScRgbColor.html +6 -13
  145. data/rdoc/RubyXL/CT_Scene3D.html +6 -13
  146. data/rdoc/RubyXL/CT_SchemeColor.html +6 -13
  147. data/rdoc/RubyXL/CT_Shape3D.html +6 -13
  148. data/rdoc/RubyXL/CT_ShapeStyle.html +6 -13
  149. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +6 -13
  150. data/rdoc/RubyXL/CT_SphereCoords.html +6 -13
  151. data/rdoc/RubyXL/CT_StretchInfoProperties.html +6 -13
  152. data/rdoc/RubyXL/CT_StyleMatrix.html +6 -13
  153. data/rdoc/RubyXL/CT_StyleMatrixReference.html +6 -13
  154. data/rdoc/RubyXL/CT_SupplementalFont.html +6 -13
  155. data/rdoc/RubyXL/CT_SystemColor.html +6 -13
  156. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +6 -13
  157. data/rdoc/RubyXL/CT_TextBlipBullet.html +6 -13
  158. data/rdoc/RubyXL/CT_TextCharBullet.html +6 -13
  159. data/rdoc/RubyXL/CT_TextCharacterProperties.html +6 -13
  160. data/rdoc/RubyXL/CT_TextFont.html +6 -13
  161. data/rdoc/RubyXL/CT_TextListStyle.html +6 -13
  162. data/rdoc/RubyXL/CT_TextNormalAutofit.html +6 -13
  163. data/rdoc/RubyXL/CT_TextParagraphProperties.html +6 -13
  164. data/rdoc/RubyXL/CT_TextSpacing.html +6 -13
  165. data/rdoc/RubyXL/CT_TextTabStop.html +6 -13
  166. data/rdoc/RubyXL/CT_TextTabStopList.html +6 -13
  167. data/rdoc/RubyXL/CT_TileInfoProperties.html +6 -13
  168. data/rdoc/RubyXL/CT_TintEffect.html +6 -13
  169. data/rdoc/RubyXL/CT_Transform2D.html +6 -13
  170. data/rdoc/RubyXL/CT_TransformEffect.html +6 -13
  171. data/rdoc/RubyXL/CT_Vector3D.html +6 -13
  172. data/rdoc/RubyXL/CT_XYAdjustHandle.html +6 -13
  173. data/rdoc/RubyXL/CalculationChain.html +15 -42
  174. data/rdoc/RubyXL/CalculationChainCell.html +6 -13
  175. data/rdoc/RubyXL/CalculationProperties.html +6 -13
  176. data/rdoc/RubyXL/Cell.html +116 -290
  177. data/rdoc/RubyXL/CellConvenienceMethods.html +318 -641
  178. data/rdoc/RubyXL/CellExt.html +6 -13
  179. data/rdoc/RubyXL/CellSmartTag.html +6 -13
  180. data/rdoc/RubyXL/CellSmartTagProperty.html +6 -13
  181. data/rdoc/RubyXL/CellSmartTags.html +6 -13
  182. data/rdoc/RubyXL/CellStyle.html +6 -13
  183. data/rdoc/RubyXL/CellStyleXFs.html +16 -35
  184. data/rdoc/RubyXL/CellStyles.html +16 -35
  185. data/rdoc/RubyXL/CellValue.html +16 -35
  186. data/rdoc/RubyXL/CellWatch.html +6 -13
  187. data/rdoc/RubyXL/CellWatches.html +6 -13
  188. data/rdoc/RubyXL/CellXFs.html +18 -40
  189. data/rdoc/RubyXL/ChartColorsFile.html +6 -21
  190. data/rdoc/RubyXL/ChartFile.html +18 -48
  191. data/rdoc/RubyXL/ChartStyleFile.html +6 -21
  192. data/rdoc/RubyXL/ChartUserShapesFile.html +6 -21
  193. data/rdoc/RubyXL/Chartsheet.html +18 -65
  194. data/rdoc/RubyXL/ChartsheetPageSetup.html +6 -13
  195. data/rdoc/RubyXL/ChartsheetProperties.html +6 -13
  196. data/rdoc/RubyXL/ChartsheetProtection.html +6 -13
  197. data/rdoc/RubyXL/ChartsheetView.html +6 -13
  198. data/rdoc/RubyXL/ChartsheetViews.html +6 -13
  199. data/rdoc/RubyXL/Color.html +17 -41
  200. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +25 -69
  201. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +36 -92
  202. data/rdoc/RubyXL/ColorConvenienceClasses.html +4 -10
  203. data/rdoc/RubyXL/ColorConvenienceMethods.html +14 -32
  204. data/rdoc/RubyXL/ColorFilter.html +6 -13
  205. data/rdoc/RubyXL/ColorScale.html +6 -13
  206. data/rdoc/RubyXL/ColorSet.html +6 -13
  207. data/rdoc/RubyXL/Colors.html +6 -13
  208. data/rdoc/RubyXL/ColumnRange.html +66 -81
  209. data/rdoc/RubyXL/ColumnRanges.html +43 -95
  210. data/rdoc/RubyXL/Comment.html +6 -13
  211. data/rdoc/RubyXL/CommentList.html +6 -13
  212. data/rdoc/RubyXL/CommentsFile.html +16 -48
  213. data/rdoc/RubyXL/ConditionalFormatValue.html +6 -13
  214. data/rdoc/RubyXL/ConditionalFormatting.html +6 -13
  215. data/rdoc/RubyXL/ConditionalFormattingRule.html +6 -13
  216. data/rdoc/RubyXL/Connection.html +6 -13
  217. data/rdoc/RubyXL/ConnectionTable.html +6 -13
  218. data/rdoc/RubyXL/ConnectionTables.html +6 -13
  219. data/rdoc/RubyXL/ConnectionTextField.html +6 -13
  220. data/rdoc/RubyXL/ConnectionTextFields.html +6 -13
  221. data/rdoc/RubyXL/Connections.html +15 -42
  222. data/rdoc/RubyXL/ContentTypeDefault.html +6 -13
  223. data/rdoc/RubyXL/ContentTypeOverride.html +6 -13
  224. data/rdoc/RubyXL/ContentTypes.html +25 -63
  225. data/rdoc/RubyXL/ControlPropertiesFile.html +8 -18
  226. data/rdoc/RubyXL/CorePropertiesFile.html +72 -192
  227. data/rdoc/RubyXL/CustomColor.html +6 -13
  228. data/rdoc/RubyXL/CustomColorList.html +6 -13
  229. data/rdoc/RubyXL/CustomFilter.html +6 -13
  230. data/rdoc/RubyXL/CustomFilters.html +6 -13
  231. data/rdoc/RubyXL/CustomGeometry.html +6 -13
  232. data/rdoc/RubyXL/CustomProperties.html +6 -13
  233. data/rdoc/RubyXL/CustomPropertiesFile.html +6 -21
  234. data/rdoc/RubyXL/CustomProperty.html +6 -13
  235. data/rdoc/RubyXL/CustomPropertyFile.html +6 -21
  236. data/rdoc/RubyXL/CustomSheetView.html +6 -13
  237. data/rdoc/RubyXL/CustomSheetViews.html +6 -13
  238. data/rdoc/RubyXL/CustomWorkbookView.html +6 -13
  239. data/rdoc/RubyXL/CustomWorkbookViews.html +6 -13
  240. data/rdoc/RubyXL/CustomXMLFile.html +6 -18
  241. data/rdoc/RubyXL/DXF.html +6 -13
  242. data/rdoc/RubyXL/DXFs.html +6 -13
  243. data/rdoc/RubyXL/DataBar.html +6 -13
  244. data/rdoc/RubyXL/DataConsolidate.html +6 -13
  245. data/rdoc/RubyXL/DataConsolidationReference.html +6 -13
  246. data/rdoc/RubyXL/DataConsolidationReferences.html +6 -13
  247. data/rdoc/RubyXL/DataType.html +4 -33
  248. data/rdoc/RubyXL/DataValidation.html +6 -13
  249. data/rdoc/RubyXL/DataValidations.html +6 -13
  250. data/rdoc/RubyXL/DateGroupItem.html +6 -13
  251. data/rdoc/RubyXL/DefinedName.html +6 -13
  252. data/rdoc/RubyXL/DefinedNameExt.html +6 -13
  253. data/rdoc/RubyXL/DefinedNames.html +6 -13
  254. data/rdoc/RubyXL/DefinedNamesExt.html +6 -13
  255. data/rdoc/RubyXL/DocumentPropertiesFile.html +23 -65
  256. data/rdoc/RubyXL/DrawingFile.html +18 -48
  257. data/rdoc/RubyXL/DynamicFilter.html +6 -13
  258. data/rdoc/RubyXL/EmbeddedControl.html +6 -13
  259. data/rdoc/RubyXL/EmbeddedControls.html +6 -13
  260. data/rdoc/RubyXL/Extension.html +6 -13
  261. data/rdoc/RubyXL/ExtensionStorageArea.html +6 -13
  262. data/rdoc/RubyXL/Extents.html +6 -13
  263. data/rdoc/RubyXL/ExternalBook.html +6 -13
  264. data/rdoc/RubyXL/ExternalLinksFile.html +18 -48
  265. data/rdoc/RubyXL/ExternalReference.html +6 -13
  266. data/rdoc/RubyXL/ExternalReferences.html +6 -13
  267. data/rdoc/RubyXL/ExtraColorSchemeList.html +6 -13
  268. data/rdoc/RubyXL/FieldItem.html +6 -13
  269. data/rdoc/RubyXL/FileRecoveryProperties.html +6 -13
  270. data/rdoc/RubyXL/FileSharing.html +6 -13
  271. data/rdoc/RubyXL/FileVersion.html +6 -13
  272. data/rdoc/RubyXL/Fill.html +16 -35
  273. data/rdoc/RubyXL/Fills.html +16 -35
  274. data/rdoc/RubyXL/FilterContainer.html +6 -13
  275. data/rdoc/RubyXL/FloatNode.html +6 -13
  276. data/rdoc/RubyXL/FloatValue.html +6 -13
  277. data/rdoc/RubyXL/Font.html +18 -42
  278. data/rdoc/RubyXL/FontConvenienceMethods.html +92 -253
  279. data/rdoc/RubyXL/FontScheme.html +6 -13
  280. data/rdoc/RubyXL/Fonts.html +16 -35
  281. data/rdoc/RubyXL/Formula.html +6 -13
  282. data/rdoc/RubyXL/FunctionGroup.html +6 -13
  283. data/rdoc/RubyXL/FunctionGroups.html +6 -13
  284. data/rdoc/RubyXL/GenericStorageObject.html +32 -90
  285. data/rdoc/RubyXL/GradientFill.html +6 -13
  286. data/rdoc/RubyXL/HeaderFooterSettings.html +6 -13
  287. data/rdoc/RubyXL/Hyperlink.html +6 -13
  288. data/rdoc/RubyXL/HyperlinkRelFile.html +6 -18
  289. data/rdoc/RubyXL/Hyperlinks.html +6 -13
  290. data/rdoc/RubyXL/IconFilter.html +6 -13
  291. data/rdoc/RubyXL/IconSet.html +6 -13
  292. data/rdoc/RubyXL/IgnoredError.html +6 -13
  293. data/rdoc/RubyXL/IgnoredErrors.html +6 -13
  294. data/rdoc/RubyXL/IndexedColors.html +6 -13
  295. data/rdoc/RubyXL/InputCells.html +6 -13
  296. data/rdoc/RubyXL/IntegerNode.html +6 -13
  297. data/rdoc/RubyXL/IntegerValue.html +6 -13
  298. data/rdoc/RubyXL/LegacyCell.html +14 -32
  299. data/rdoc/RubyXL/LegacyWorksheet.html +64 -116
  300. data/rdoc/RubyXL/MRUColors.html +6 -13
  301. data/rdoc/RubyXL/MacrosFile.html +6 -21
  302. data/rdoc/RubyXL/MergedCell.html +6 -13
  303. data/rdoc/RubyXL/MergedCells.html +6 -13
  304. data/rdoc/RubyXL/NumFmt.html +6 -13
  305. data/rdoc/RubyXL/NumberFormat.html +17 -36
  306. data/rdoc/RubyXL/NumberFormats.html +16 -40
  307. data/rdoc/RubyXL/OLEObject.html +6 -13
  308. data/rdoc/RubyXL/OLEObjectFile.html +6 -21
  309. data/rdoc/RubyXL/OLEObjects.html +6 -13
  310. data/rdoc/RubyXL/OLESize.html +6 -13
  311. data/rdoc/RubyXL/OOXMLContainerObject.html +57 -140
  312. data/rdoc/RubyXL/OOXMLIgnored.html +24 -55
  313. data/rdoc/RubyXL/OOXMLObject.html +9 -19
  314. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +80 -115
  315. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +79 -185
  316. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +86 -223
  317. data/rdoc/RubyXL/OOXMLTopLevelObject.html +46 -123
  318. data/rdoc/RubyXL/OdbcOleDbProperties.html +6 -13
  319. data/rdoc/RubyXL/Offset.html +6 -13
  320. data/rdoc/RubyXL/OlapProperties.html +6 -13
  321. data/rdoc/RubyXL/OleItem.html +99 -0
  322. data/rdoc/RubyXL/OleItems.html +99 -0
  323. data/rdoc/RubyXL/OleLink.html +99 -0
  324. data/rdoc/RubyXL/OutlineProperties.html +6 -13
  325. data/rdoc/RubyXL/PageMargins.html +6 -13
  326. data/rdoc/RubyXL/PageSetup.html +6 -13
  327. data/rdoc/RubyXL/PageSetupProperties.html +6 -13
  328. data/rdoc/RubyXL/Pane.html +6 -13
  329. data/rdoc/RubyXL/Parser.html +24 -54
  330. data/rdoc/RubyXL/PatternFill.html +6 -13
  331. data/rdoc/RubyXL/PersonMetadata.html +108 -0
  332. data/rdoc/RubyXL/PhoneticProperties.html +6 -13
  333. data/rdoc/RubyXL/PhoneticRun.html +6 -13
  334. data/rdoc/RubyXL/PivotArea.html +6 -13
  335. data/rdoc/RubyXL/PivotCache.html +6 -13
  336. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +8 -26
  337. data/rdoc/RubyXL/PivotCacheRecordsFile.html +6 -21
  338. data/rdoc/RubyXL/PivotCaches.html +6 -13
  339. data/rdoc/RubyXL/PivotReference.html +6 -13
  340. data/rdoc/RubyXL/PivotReferences.html +6 -13
  341. data/rdoc/RubyXL/PivotTableFile.html +8 -26
  342. data/rdoc/RubyXL/PivotTableSelection.html +6 -13
  343. data/rdoc/RubyXL/PresetGeometry.html +6 -13
  344. data/rdoc/RubyXL/PrintOptions.html +6 -13
  345. data/rdoc/RubyXL/PrinterSettingsFile.html +6 -21
  346. data/rdoc/RubyXL/ProtectedRange.html +6 -13
  347. data/rdoc/RubyXL/ProtectedRanges.html +6 -13
  348. data/rdoc/RubyXL/Protection.html +6 -13
  349. data/rdoc/RubyXL/QueryParameter.html +6 -13
  350. data/rdoc/RubyXL/QueryParameters.html +6 -13
  351. data/rdoc/RubyXL/QueryTable.html +18 -48
  352. data/rdoc/RubyXL/QueryTableDeletedField.html +6 -13
  353. data/rdoc/RubyXL/QueryTableDeletedFields.html +6 -13
  354. data/rdoc/RubyXL/QueryTableField.html +6 -13
  355. data/rdoc/RubyXL/QueryTableFields.html +6 -13
  356. data/rdoc/RubyXL/QueryTableRefresh.html +6 -13
  357. data/rdoc/RubyXL/RID.html +6 -13
  358. data/rdoc/RubyXL/RawOOXML.html +24 -60
  359. data/rdoc/RubyXL/Reference.html +137 -263
  360. data/rdoc/RubyXL/Relationship.html +6 -13
  361. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +14 -32
  362. data/rdoc/RubyXL/RelationshipSupport.html +52 -137
  363. data/rdoc/RubyXL/RevisionPointer.html +6 -13
  364. data/rdoc/RubyXL/RichText.html +19 -37
  365. data/rdoc/RubyXL/RichTextRun.html +16 -35
  366. data/rdoc/RubyXL/Row.html +63 -180
  367. data/rdoc/RubyXL/RowExt.html +6 -13
  368. data/rdoc/RubyXL/RunProperties.html +6 -13
  369. data/rdoc/RubyXL/Scenario.html +6 -13
  370. data/rdoc/RubyXL/Scenarios.html +6 -13
  371. data/rdoc/RubyXL/Selection.html +16 -35
  372. data/rdoc/RubyXL/ShapeGuide.html +6 -13
  373. data/rdoc/RubyXL/ShapeTextRectangle.html +6 -13
  374. data/rdoc/RubyXL/SharedStringsTable.html +60 -156
  375. data/rdoc/RubyXL/Sheet.html +6 -13
  376. data/rdoc/RubyXL/SheetCalculationProperties.html +6 -13
  377. data/rdoc/RubyXL/SheetData.html +21 -51
  378. data/rdoc/RubyXL/SheetDataExt.html +6 -13
  379. data/rdoc/RubyXL/SheetDataSet.html +6 -13
  380. data/rdoc/RubyXL/SheetMetadata.html +108 -0
  381. data/rdoc/RubyXL/SheetName.html +6 -13
  382. data/rdoc/RubyXL/SheetNames.html +6 -13
  383. data/rdoc/RubyXL/Sheets.html +6 -13
  384. data/rdoc/RubyXL/SlicerCacheFile.html +6 -21
  385. data/rdoc/RubyXL/SlicerFile.html +6 -21
  386. data/rdoc/RubyXL/SmartTagProperties.html +6 -13
  387. data/rdoc/RubyXL/SmartTagType.html +6 -13
  388. data/rdoc/RubyXL/SmartTagTypes.html +6 -13
  389. data/rdoc/RubyXL/SmartTags.html +6 -13
  390. data/rdoc/RubyXL/SortCondition.html +6 -13
  391. data/rdoc/RubyXL/SortState.html +6 -13
  392. data/rdoc/RubyXL/Sqref.html +25 -56
  393. data/rdoc/RubyXL/Stop.html +6 -13
  394. data/rdoc/RubyXL/StringNode.html +6 -13
  395. data/rdoc/RubyXL/StringNodeW3C.html +24 -55
  396. data/rdoc/RubyXL/StringValue.html +6 -13
  397. data/rdoc/RubyXL/Stylesheet.html +45 -118
  398. data/rdoc/RubyXL/TableFile.html +6 -21
  399. data/rdoc/RubyXL/TableParts.html +6 -13
  400. data/rdoc/RubyXL/TableStyle.html +6 -13
  401. data/rdoc/RubyXL/TableStyles.html +6 -13
  402. data/rdoc/RubyXL/Text.html +25 -63
  403. data/rdoc/RubyXL/TextImportSettings.html +6 -13
  404. data/rdoc/RubyXL/Theme.html +46 -96
  405. data/rdoc/RubyXL/ThemeElements.html +6 -13
  406. data/rdoc/RubyXL/ThumbnailFile.html +6 -21
  407. data/rdoc/RubyXL/Top10.html +6 -13
  408. data/rdoc/RubyXL/VMLDrawingFile.html +9 -27
  409. data/rdoc/RubyXL/Variant.html +6 -13
  410. data/rdoc/RubyXL/Vector.html +16 -35
  411. data/rdoc/RubyXL/VectorValue.html +6 -13
  412. data/rdoc/RubyXL/VisualProperties.html +6 -13
  413. data/rdoc/RubyXL/WebPublishObject.html +6 -13
  414. data/rdoc/RubyXL/WebPublishObjects.html +6 -13
  415. data/rdoc/RubyXL/WebPublishingItem.html +6 -13
  416. data/rdoc/RubyXL/WebPublishingItems.html +6 -13
  417. data/rdoc/RubyXL/WebPublishingProperties.html +6 -13
  418. data/rdoc/RubyXL/WebQueryProperties.html +6 -13
  419. data/rdoc/RubyXL/Workbook.html +222 -583
  420. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +170 -309
  421. data/rdoc/RubyXL/WorkbookProperties.html +6 -13
  422. data/rdoc/RubyXL/WorkbookProtection.html +6 -13
  423. data/rdoc/RubyXL/WorkbookRoot.html +47 -125
  424. data/rdoc/RubyXL/WorkbookView.html +6 -13
  425. data/rdoc/RubyXL/WorkbookViews.html +6 -13
  426. data/rdoc/RubyXL/Worksheet.html +79 -160
  427. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +605 -1269
  428. data/rdoc/RubyXL/WorksheetDimensions.html +6 -13
  429. data/rdoc/RubyXL/WorksheetFormatProperties.html +6 -13
  430. data/rdoc/RubyXL/WorksheetProperties.html +6 -13
  431. data/rdoc/RubyXL/WorksheetProtection.html +6 -13
  432. data/rdoc/RubyXL/WorksheetView.html +6 -13
  433. data/rdoc/RubyXL/WorksheetViews.html +6 -13
  434. data/rdoc/RubyXL/XF.html +6 -13
  435. data/rdoc/RubyXL.html +15 -324
  436. data/rdoc/created.rid +44 -44
  437. data/rdoc/css/rdoc.css +76 -8
  438. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  439. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  440. data/rdoc/index.html +397 -769
  441. data/rdoc/js/darkfish.js +14 -1
  442. data/rdoc/js/navigation.js +8 -8
  443. data/rdoc/js/navigation.js.gz +0 -0
  444. data/rdoc/js/search.js +4 -4
  445. data/rdoc/js/search_index.js +1 -1
  446. data/rdoc/js/search_index.js.gz +0 -0
  447. data/rdoc/js/searcher.js.gz +0 -0
  448. data/rdoc/table_of_contents.html +68 -5
  449. data/rubyXL.gemspec +28 -29
  450. data/spec/lib/cell_spec.rb +67 -9
  451. data/spec/lib/color_spec.rb +8 -1
  452. data/spec/lib/parser_spec.rb +28 -28
  453. data/spec/lib/reference_spec.rb +41 -5
  454. data/spec/lib/rgb_color_spec.rb +16 -3
  455. data/spec/lib/stylesheet_spec.rb +10 -11
  456. data/spec/lib/text_spec.rb +4 -6
  457. data/spec/lib/workbook_spec.rb +20 -8
  458. data/spec/lib/worksheet_spec.rb +815 -460
  459. data/spec/spec_helper.rb +2 -0
  460. data/test/test_parse_write.rb +3 -3
  461. metadata +26 -6
  462. data/Gemfile.lock +0 -92
@@ -1,6 +1,6 @@
1
1
  module RubyXL
2
2
  class Reference
3
- ROW_MAX = 1024*1024
3
+ ROW_MAX = 1024 * 1024
4
4
  COL_MAX = 16393
5
5
 
6
6
  attr_reader :row_range, :col_range
@@ -8,6 +8,7 @@ module RubyXL
8
8
  # RubyXL::Reference.new(row, col)
9
9
  # RubyXL::Reference.new(row_from, row_to, col_from, col_to)
10
10
  # RubyXL::Reference.new(reference_string)
11
+ # RubyXL::Reference.new(row_from:, row_to:, col_from:, col_to:)
11
12
  def initialize(*params)
12
13
  row_from = row_to = col_from = col_to = nil
13
14
 
@@ -15,10 +16,16 @@ module RubyXL
15
16
  when 4 then row_from, row_to, col_from, col_to = params
16
17
  when 2 then row_from, col_from = params
17
18
  when 1 then
18
- raise ArgumentError.new("invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
19
- from, to = params[0].split(':')
20
- row_from, col_from = self.class.ref2ind(from)
21
- row_to, col_to = self.class.ref2ind(to) unless to.nil?
19
+ case params.first
20
+ when Hash then
21
+ row_from, row_to, col_from, col_to = params.first.fetch_values(:row_from, :row_to, :col_from, :col_to)
22
+ when String then
23
+ from, to = params[0].split(':')
24
+ row_from, col_from = self.class.ref2ind(from)
25
+ row_to, col_to = self.class.ref2ind(to) unless to.nil?
26
+ else
27
+ raise ArgumentError.new("invalid value for #{self.class}: #{params[0].inspect}") unless params[0].is_a?(String)
28
+ end
22
29
  end
23
30
 
24
31
  @row_range = Range.new(row_from || 0, row_to || row_from || ROW_MAX)
@@ -29,6 +36,10 @@ module RubyXL
29
36
  (@row_range.begin == @row_range.end) && (@col_range.begin == @col_range.end)
30
37
  end
31
38
 
39
+ def valid?
40
+ !(row_range.begin.negative? || col_range.begin.negative?)
41
+ end
42
+
32
43
  def first_row
33
44
  @row_range.begin
34
45
  end
@@ -50,15 +61,18 @@ module RubyXL
50
61
  end
51
62
 
52
63
  def cover?(other)
53
- !other.nil? && (@row_range.cover?(other.row_range.begin) && @row_range.cover?(other.row_range.end) &&
54
- @col_range.cover?(other.col_range.begin) && @col_range.cover?(other.col_range.end))
64
+ !other.nil? && (@row_range.cover?(other.row_range.begin) &&
65
+ @row_range.cover?(other.row_range.end) &&
66
+ @col_range.cover?(other.col_range.begin) &&
67
+ @col_range.cover?(other.col_range.end))
55
68
  end
56
69
 
57
70
  def to_s
58
71
  if single_cell? then
59
72
  self.class.ind2ref(@row_range.begin, @col_range.begin)
60
73
  else
61
- self.class.ind2ref(@row_range.begin, @col_range.begin) + ':' + self.class.ind2ref(@row_range.end, @col_range.end)
74
+ self.class.ind2ref(@row_range.begin, @col_range.begin) + ':' +
75
+ self.class.ind2ref(@row_range.end, @col_range.end)
62
76
  end
63
77
  end
64
78
 
@@ -71,7 +85,7 @@ module RubyXL
71
85
  end
72
86
 
73
87
  # Converts +row+ and +col+ zero-based indices to Excel-style cell reference
74
- # (0) A...Z, AA...AZ, BA... ...ZZ, AAA... ...AZZ, BAA... ...XFD (16383)
88
+ # <0> A...Z, AA...AZ, BA... ...ZZ, AAA... ...AZZ, BAA... ...XFD <16383>
75
89
  def self.ind2ref(row = 0, col = 0)
76
90
  str = ''
77
91
 
@@ -88,23 +102,18 @@ module RubyXL
88
102
  # Converts Excel-style cell reference to +row+ and +col+ zero-based indices.
89
103
  def self.ref2ind(str)
90
104
  return [ -1, -1 ] unless str =~ /\A([A-Z]+)(\d+)\Z/
91
-
92
- col = 0
93
- $1.each_byte { |chr| col = col * 26 + (chr - 64) }
94
- [ $2.to_i - 1, col - 1 ]
105
+ [ Regexp.last_match(2).to_i - 1,
106
+ Regexp.last_match(1).each_byte.inject(0) { |col, chr| (col * 26) + (chr - 64) } - 1 ]
95
107
  end
96
-
97
108
  end
98
109
 
99
110
  class Sqref < Array
100
-
101
111
  def initialize(str)
102
112
  str.split.each { |ref_str| self << RubyXL::Reference.new(ref_str) }
103
113
  end
104
114
 
105
115
  def to_s
106
- self.collect{ |ref| ref.to_s }.join(' ')
116
+ self.collect(&:to_s).join(' ')
107
117
  end
108
-
109
118
  end
110
119
  end
@@ -2,9 +2,8 @@ require 'pathname'
2
2
  require 'rubyXL/objects/ooxml_object'
3
3
 
4
4
  module RubyXL
5
-
6
5
  class RID < OOXMLObject
7
- define_attribute(:'r:id', :string, :required => true)
6
+ define_relationship(:required => true)
8
7
  end
9
8
 
10
9
  class Relationship < OOXMLObject
@@ -16,7 +15,7 @@ module RubyXL
16
15
  end
17
16
 
18
17
  class OOXMLRelationshipsFile < OOXMLTopLevelObject
19
- CONTENT_TYPE = 'application/vnd.openxmlformats-package.relationships+xml'
18
+ CONTENT_TYPE = 'application/vnd.openxmlformats-package.relationships+xml'.freeze
20
19
  SAVE_ORDER = 100
21
20
 
22
21
  define_child_node(RubyXL::Relationship, :collection => true, :accessor => :relationships)
@@ -28,8 +27,8 @@ module RubyXL
28
27
  @@debug_indent = ($DEBUG ? 0 : nil)
29
28
 
30
29
  def new_relationship(target, type)
31
- RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}",
32
- :type => type,
30
+ RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}",
31
+ :type => type,
33
32
  :target => target)
34
33
  end
35
34
  protected :new_relationship
@@ -37,8 +36,8 @@ module RubyXL
37
36
  def add_relationship(obj)
38
37
  return if obj.nil? || !defined?(obj.class::REL_TYPE) || (obj.respond_to?(:empty?) && obj.empty?)
39
38
 
40
- relationships << RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}",
41
- :type => obj.class::REL_TYPE,
39
+ relationships << RubyXL::Relationship.new(:id => "rId#{relationships.size + 1}",
40
+ :type => obj.class::REL_TYPE,
42
41
  :target => obj.xlsx_path.relative_path_from(owner.xlsx_path.dirname))
43
42
  end
44
43
  protected :add_relationship
@@ -96,7 +95,7 @@ module RubyXL
96
95
  self.related_files[rel.id] = obj
97
96
  }
98
97
 
99
- @@debug_indent -=2 if @@debug_indent
98
+ @@debug_indent -= 2 if @@debug_indent
100
99
 
101
100
  related_files
102
101
  end
@@ -131,12 +130,10 @@ module RubyXL
131
130
  basename = base_file_path.root? ? '' : base_file_path.basename
132
131
  base_file_path.dirname.join('_rels', "#{basename}.rels").cleanpath
133
132
  end
134
-
135
133
  end
136
134
 
137
135
  # +RelationshipSupport+ module enables automatic loading and saving of _rels for the respective file
138
136
  module RelationshipSupport
139
-
140
137
  module ClassMehods
141
138
  def define_relationship(klass, accessor = nil)
142
139
  class_variable_get(:@@ooxml_relationships)[klass] = accessor
@@ -212,7 +209,5 @@ module RubyXL
212
209
  end
213
210
  self.generic_storage << related_file
214
211
  end
215
-
216
212
  end
217
-
218
213
  end
@@ -5,7 +5,6 @@ require 'rubyXL/objects/content_types'
5
5
  require 'rubyXL/objects/workbook'
6
6
 
7
7
  module RubyXL
8
-
9
8
  class WorkbookRoot
10
9
  @@debug = $DEBUG
11
10
 
@@ -82,5 +81,4 @@ module RubyXL
82
81
  root
83
82
  end
84
83
  end
85
-
86
84
  end
@@ -3,15 +3,14 @@ require 'rubyXL/objects/text'
3
3
  require 'rubyXL/objects/extensions'
4
4
 
5
5
  module RubyXL
6
-
7
6
  # http://www.datypic.com/sc/ooxml/e-ssml_sst.html
8
7
  class SharedStringsTable < OOXMLTopLevelObject
9
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'
10
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings'
8
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'.freeze
9
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings'.freeze
11
10
 
12
11
  # According to http://msdn.microsoft.com/en-us/library/office/gg278314.aspx,
13
12
  # +count+ and +uniqueCount+ may be either both missing, or both present. Need to validate.
14
- define_attribute(:uniqueCount, :int)
13
+ define_attribute(:uniqueCount, :int)
15
14
  define_child_node(RubyXL::RichText, :collection => :with_count, :node_name => 'si', :accessor => :strings)
16
15
  define_child_node(RubyXL::ExtensionStorageArea)
17
16
  define_element_name 'sst'
@@ -21,7 +20,7 @@ module RubyXL
21
20
  super
22
21
  # So far, going by the structure that the original creator had in mind. However,
23
22
  # since the actual implementation is now extracted into a separate class,
24
- # we will be able to transparrently change it later if needs be.
23
+ # we will be able to transparently change it later if needs be.
25
24
  @index_by_content = {}
26
25
  end
27
26
 
@@ -64,7 +63,5 @@ module RubyXL
64
63
  def xlsx_path
65
64
  ROOT.join('xl', 'sharedStrings.xml')
66
65
  end
67
-
68
66
  end
69
-
70
67
  end
@@ -2,7 +2,6 @@ require 'rubyXL/objects/ooxml_object'
2
2
  require 'rubyXL/objects/storage'
3
3
 
4
4
  module RubyXL
5
-
6
5
  # http://www.datypic.com/sc/ooxml/e-ssml_webPublishItem-1.html
7
6
  class WebPublishingItem < OOXMLObject
8
7
  define_attribute(:id, :int, :required => true)
@@ -12,7 +11,7 @@ module RubyXL
12
11
  define_attribute(:sourceObject, :string)
13
12
  define_attribute(:destinationFile, :string, :required => true)
14
13
  define_attribute(:title, :string)
15
- define_attribute(:autoRepublish, :bool, :default => false)
14
+ define_attribute(:autoRepublish, :bool, :default => false)
16
15
  define_element_name 'webPublishItem'
17
16
  end
18
17
 
@@ -47,5 +46,4 @@ module RubyXL
47
46
  define_child_node(RubyXL::StringNode, :node_name => :firstFooter)
48
47
  define_element_name 'headerFooter'
49
48
  end
50
-
51
49
  end
@@ -5,7 +5,6 @@ require 'rubyXL/objects/formula'
5
5
  require 'rubyXL/cell'
6
6
 
7
7
  module RubyXL
8
-
9
8
  # http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.cellvalues(v=office.14).aspx
10
9
  module DataType
11
10
  SHARED_STRING = 's'
@@ -14,7 +13,7 @@ module RubyXL
14
13
  ERROR = 'e'
15
14
  BOOLEAN = 'b'
16
15
  NUMBER = 'n'
17
- DATE = 'd' # Only available in Office2010.
16
+ DATE = 'd' # Only available in Office2010.
18
17
  end
19
18
 
20
19
  # http://www.datypic.com/sc/ooxml/e-ssml_v-1.html
@@ -35,13 +34,13 @@ module RubyXL
35
34
 
36
35
  define_attribute(:r, :ref)
37
36
  define_attribute(:s, :int, :default => 0, :accessor => :style_index)
38
- define_attribute(:t, RubyXL::ST_CellType, :accessor => :datatype, :default => 'n' )
37
+ define_attribute(:t, RubyXL::ST_CellType, :accessor => :datatype, :default => 'n')
39
38
  define_attribute(:cm, :int, :default => 0)
40
39
  define_attribute(:vm, :int, :default => 0)
41
40
  define_attribute(:ph, :bool, :default => false)
42
41
  define_child_node(RubyXL::Formula, :accessor => :formula)
43
42
  define_child_node(RubyXL::CellValue, :accessor => :value_container)
44
- define_child_node(RubyXL::RichText) # is
43
+ define_child_node(RubyXL::RichText) # is
45
44
  define_element_name 'c'
46
45
 
47
46
  attr_accessor :worksheet
@@ -51,7 +50,7 @@ module RubyXL
51
50
  end
52
51
 
53
52
  def row
54
- r && r.first_row
53
+ r&.first_row
55
54
  end
56
55
 
57
56
  def row=(v)
@@ -59,7 +58,7 @@ module RubyXL
59
58
  end
60
59
 
61
60
  def column
62
- r && r.first_col
61
+ r&.first_col
63
62
  end
64
63
 
65
64
  def column=(v)
@@ -67,7 +66,7 @@ module RubyXL
67
66
  end
68
67
 
69
68
  def raw_value
70
- value_container && value_container.value
69
+ value_container&.value
71
70
  end
72
71
 
73
72
  def raw_value=(v)
@@ -99,8 +98,7 @@ module RubyXL
99
98
  else false
100
99
  end
101
100
 
102
- num_fmt = self.number_format
103
- num_fmt && num_fmt.is_date_format?
101
+ self.number_format&.is_date_format?
104
102
  end
105
103
 
106
104
  # Gets massaged value of the cell, converting datatypes to those known to Ruby (that includes
@@ -112,10 +110,12 @@ module RubyXL
112
110
  when RubyXL::DataType::SHARED_STRING then workbook.shared_strings_container[r.to_i].to_s
113
111
  when RubyXL::DataType::INLINE_STRING then is.to_s
114
112
  when RubyXL::DataType::RAW_STRING then raw_value
113
+ when RubyXL::DataType::DATE then raw_value && DateTime.parse(raw_value)
115
114
  else
116
- if is_date? then workbook.num_to_date(r.to_f)
115
+ if is then is.to_s
116
+ elsif is_date? then workbook.num_to_date(r.to_f)
117
117
  elsif r.is_a?(String) && (r =~ NUMBER_REGEXP) then # Numeric
118
- if $1 != '' then r.to_f
118
+ if Regexp.last_match(1) != '' then r.to_f
119
119
  else r.to_i
120
120
  end
121
121
  else r
@@ -133,7 +133,7 @@ module RubyXL
133
133
  include LegacyCell
134
134
  end
135
135
 
136
- #TODO#<row r="1" spans="1:1" x14ac:dyDescent="0.25">
136
+ #TODO# <row r="1" spans="1:1" x14ac:dyDescent="0.25">
137
137
 
138
138
  # http://www.datypic.com/sc/ooxml/e-ssml_row-1.html
139
139
  class Row < OOXMLObject
@@ -215,7 +215,5 @@ module RubyXL
215
215
  def size
216
216
  rows.size
217
217
  end
218
-
219
218
  end
220
-
221
219
  end
@@ -140,7 +140,7 @@ module RubyXL
140
140
  ST_TextHorzOverflowType = %w{ overflow clip }
141
141
  ST_TextVerticalType = %w{ horz vert vert270 wordArtVert eaVert mongolianVert wordArtVertRtl }
142
142
  ST_TextWrappingType = %w{ none square }
143
- ST_TextAnchoringType = %w{ t ctr b just dist }
143
+ ST_TextAnchoringType = %w{ t ctr b just dist }
144
144
  ST_TextShapeType = %w{ textNoShape textPlain textStop textTriangle textTriangleInverted textChevron
145
145
  textChevronInverted textRingInside textRingOutside textArchUp textArchDown
146
146
  textCircle textButton textArchUpPour textArchDownPour textCirclePour textButtonPour
@@ -223,6 +223,8 @@ module RubyXL
223
223
 
224
224
  ST_TextUnderlineType = %w{ none words sng dbl heavy dotted dottedHeavy dash dashHeavy dashLong dashLongHeavy
225
225
  dotDash dotDashHeavy dotDotDash dotDotDashHeavy wavy wavyHeavy wavyDbl }
226
+ ST_UnderlineValues = %w{ single double singleAccounting doubleAccounting none }
227
+
226
228
  ST_TextStrikeType = %w{ noStrike sngStrike dblStrike }
227
229
  ST_TextCapsType = %w{ none small all }
228
230
 
@@ -1,5 +1,4 @@
1
1
  module RubyXL
2
-
3
2
  class GenericStorageObject
4
3
  SAVE_ORDER = 0
5
4
 
@@ -12,7 +11,7 @@ module RubyXL
12
11
  end
13
12
 
14
13
  def self.parse_file(zip_file, file_path)
15
- (entry = zip_file.find_entry(RubyXL::from_root(file_path))) && self.new(file_path, entry.get_input_stream { |f| f.read })
14
+ (entry = zip_file.find_entry(RubyXL::from_root(file_path))) && self.new(file_path, entry.get_input_stream(&:read))
16
15
  end
17
16
 
18
17
  def add_to_zip(zip_stream)
@@ -24,18 +23,18 @@ module RubyXL
24
23
  end
25
24
 
26
25
  class PrinterSettingsFile < GenericStorageObject
27
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings'
28
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'
26
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings'.freeze
27
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'.freeze
29
28
  end
30
29
 
31
30
  class CustomPropertyFile < GenericStorageObject
32
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty'
33
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customProperty'
31
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty'.freeze
32
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customProperty'.freeze
34
33
  end
35
34
 
36
35
  class DrawingFile < GenericStorageObject
37
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawing+xml'
38
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing'
36
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawing+xml'.freeze
37
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing'.freeze
39
38
 
40
39
  include RubyXL::RelationshipSupport
41
40
 
@@ -46,12 +45,11 @@ module RubyXL
46
45
  else store_relationship(rf, :unknown)
47
46
  end
48
47
  end
49
-
50
48
  end
51
49
 
52
50
  class ChartFile < GenericStorageObject
53
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'
54
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart'
51
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'.freeze
52
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart'.freeze
55
53
 
56
54
  include RubyXL::RelationshipSupport
57
55
 
@@ -63,18 +61,17 @@ module RubyXL
63
61
  else store_relationship(rf, :unknown)
64
62
  end
65
63
  end
66
-
67
64
  end
68
65
 
69
66
  class BinaryImageFile < GenericStorageObject
70
- CONTENT_TYPE = 'image/jpeg'
71
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'
67
+ CONTENT_TYPE = 'image/jpeg'.freeze
68
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'.freeze
72
69
  end
73
70
 
74
71
  class VMLDrawingFile < GenericStorageObject
75
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.vmlDrawing'
76
- # CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'
77
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'
72
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.vmlDrawing'.freeze
73
+ # CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'.freeze
74
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'.freeze
78
75
 
79
76
  include RubyXL::RelationshipSupport
80
77
 
@@ -82,32 +79,33 @@ module RubyXL
82
79
  end
83
80
 
84
81
  class ChartColorsFile < GenericStorageObject
85
- CONTENT_TYPE = 'application/vnd.ms-office.chartcolorstyle+xml'
86
- REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartColorStyle'
82
+ CONTENT_TYPE = 'application/vnd.ms-office.chartcolorstyle+xml'.freeze
83
+ REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartColorStyle'.freeze
87
84
  end
88
85
 
89
86
  class ChartStyleFile < GenericStorageObject
90
- CONTENT_TYPE = 'application/vnd.ms-office.chartstyle+xml'
91
- REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartStyle'
87
+ CONTENT_TYPE = 'application/vnd.ms-office.chartstyle+xml'.freeze
88
+ REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartStyle'.freeze
92
89
  end
93
90
 
94
91
  class TableFile < GenericStorageObject
95
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'
96
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table'
92
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'.freeze
93
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table'.freeze
97
94
  end
98
95
 
99
96
  class ControlPropertiesFile < GenericStorageObject
100
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'
97
+ CONTENT_TYPE = 'application/vnd.ms-excel.controlproperties+xml'.freeze
98
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'.freeze
101
99
  end
102
100
 
103
101
  class PivotCacheRecordsFile < GenericStorageObject
104
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml'
105
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords'
102
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml'.freeze
103
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords'.freeze
106
104
  end
107
105
 
108
106
  class PivotCacheDefinitionFile < GenericStorageObject
109
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml'
110
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition'
107
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml'.freeze
108
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition'.freeze
111
109
 
112
110
  include RubyXL::RelationshipSupport
113
111
 
@@ -115,8 +113,8 @@ module RubyXL
115
113
  end
116
114
 
117
115
  class PivotTableFile < GenericStorageObject
118
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml'
119
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable'
116
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml'.freeze
117
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable'.freeze
120
118
 
121
119
  include RubyXL::RelationshipSupport
122
120
 
@@ -124,64 +122,72 @@ module RubyXL
124
122
  end
125
123
 
126
124
  class HyperlinkRelFile < GenericStorageObject
127
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink'
125
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink'.freeze
128
126
  end
129
127
 
130
128
  class ThumbnailFile < GenericStorageObject
131
- REL_TYPE = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail'
132
- CONTENT_TYPE = 'image/x-wmf'
129
+ REL_TYPE = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail'.freeze
130
+ CONTENT_TYPE = 'image/x-wmf'.freeze
133
131
  end
134
132
 
135
133
  class ChartUserShapesFile < GenericStorageObject
136
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml'
137
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes'
134
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml'.freeze
135
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes'.freeze
138
136
  end
139
137
 
140
138
  class CustomPropertiesFile < GenericStorageObject
141
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.custom-properties+xml'
142
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties'
139
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.custom-properties+xml'.freeze
140
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties'.freeze
143
141
  end
144
142
 
145
143
  class MacrosFile < GenericStorageObject
146
- CONTENT_TYPE = 'application/vnd.ms-office.vbaProject'
147
- REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/vbaProject'
144
+ CONTENT_TYPE = 'application/vnd.ms-office.vbaProject'.freeze
145
+ REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/vbaProject'.freeze
148
146
  end
149
147
 
150
148
  class CustomXMLFile < GenericStorageObject
151
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml'
149
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml'.freeze
152
150
  end
153
151
 
154
152
  class SlicerFile < GenericStorageObject
155
- CONTENT_TYPE = 'application/vnd.ms-excel.slicer+xml'
156
- REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicer'
153
+ CONTENT_TYPE = 'application/vnd.ms-excel.slicer+xml'.freeze
154
+ REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicer'.freeze
157
155
  end
158
156
 
159
157
  class SlicerCacheFile < GenericStorageObject
160
- CONTENT_TYPE = 'application/vnd.ms-excel.slicerCache+xml'
161
- REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicerCache'
158
+ CONTENT_TYPE = 'application/vnd.ms-excel.slicerCache+xml'.freeze
159
+ REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicerCache'.freeze
162
160
  end
163
161
 
164
162
  class OLEObjectFile < GenericStorageObject
165
- CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.oleObject'
166
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject'
163
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.oleObject'.freeze
164
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject'.freeze
165
+ end
166
+
167
+ class SheetMetadata < GenericStorageObject
168
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml'.freeze
169
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata'.freeze
170
+ end
171
+
172
+ class PersonMetadata < GenericStorageObject
173
+ CONTENT_TYPE = 'application/vnd.ms-excel.person+xml'.freeze
174
+ REL_TYPE = 'http://schemas.microsoft.com/office/2017/10/relationships/person'.freeze
167
175
  end
168
176
 
169
177
  class ActiveX < GenericStorageObject
170
- REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/control'
178
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/control'.freeze
171
179
 
172
180
  include RubyXL::RelationshipSupport
173
181
 
174
182
  def attach_relationship(rid, rf)
175
183
  case rf
176
- when RubyXL::ChartFile then store_relationship(rf) # TODO
184
+ when RubyXL::ChartFile then store_relationship(rf) # TODO
177
185
  else store_relationship(rf, :unknown)
178
186
  end
179
187
  end
180
-
181
188
  end
182
189
 
183
190
  class ActiveXBinary < GenericStorageObject
184
- REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary'
191
+ REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary'.freeze
185
192
  end
186
-
187
193
  end