rubyXL 1.2.10 → 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 (518) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +60 -0
  3. data/.codeclimate.yml +3 -0
  4. data/.rubocop.yml +124 -0
  5. data/CHANGELOG.md +12 -0
  6. data/Gemfile +18 -14
  7. data/LICENSE.txt +1 -1
  8. data/README.rdoc +170 -100
  9. data/Rakefile +76 -26
  10. data/VERSION +1 -1
  11. data/lib/rubyXL/cell.rb +13 -447
  12. data/lib/rubyXL/convenience_methods/cell.rb +276 -0
  13. data/lib/rubyXL/convenience_methods/color.rb +156 -0
  14. data/lib/rubyXL/convenience_methods/font.rb +63 -0
  15. data/lib/rubyXL/convenience_methods/workbook.rb +137 -0
  16. data/lib/rubyXL/convenience_methods/worksheet.rb +734 -0
  17. data/lib/rubyXL/convenience_methods.rb +5 -0
  18. data/lib/rubyXL/objects/border.rb +71 -0
  19. data/lib/rubyXL/objects/calculation_chain.rb +31 -0
  20. data/lib/rubyXL/objects/cell_style.rb +63 -0
  21. data/lib/rubyXL/objects/chartsheet.rb +88 -0
  22. data/lib/rubyXL/objects/color.rb +25 -0
  23. data/lib/rubyXL/objects/column_range.rb +93 -0
  24. data/lib/rubyXL/objects/comments.rb +44 -0
  25. data/lib/rubyXL/objects/connection.rb +175 -0
  26. data/lib/rubyXL/objects/container_nodes.rb +131 -0
  27. data/lib/rubyXL/objects/content_types.rb +74 -0
  28. data/lib/rubyXL/objects/data_validation.rb +37 -0
  29. data/lib/rubyXL/objects/document_properties.rb +156 -0
  30. data/lib/rubyXL/objects/extensions.rb +51 -0
  31. data/lib/rubyXL/objects/external_links.rb +115 -0
  32. data/lib/rubyXL/objects/fill.rb +52 -0
  33. data/lib/rubyXL/objects/filters.rb +118 -0
  34. data/lib/rubyXL/objects/font.rb +43 -0
  35. data/lib/rubyXL/objects/formula.rb +22 -0
  36. data/lib/rubyXL/objects/ooxml_object.rb +469 -0
  37. data/lib/rubyXL/objects/query_table.rb +106 -0
  38. data/lib/rubyXL/objects/reference.rb +119 -0
  39. data/lib/rubyXL/objects/relationships.rb +213 -0
  40. data/lib/rubyXL/objects/root.rb +84 -0
  41. data/lib/rubyXL/objects/shared_strings.rb +67 -0
  42. data/lib/rubyXL/objects/sheet_common.rb +49 -0
  43. data/lib/rubyXL/objects/sheet_data.rb +219 -0
  44. data/lib/rubyXL/objects/simple_types.rb +249 -0
  45. data/lib/rubyXL/objects/storage.rb +193 -0
  46. data/lib/rubyXL/objects/stylesheet.rb +224 -0
  47. data/lib/rubyXL/objects/text.rb +92 -0
  48. data/lib/rubyXL/objects/theme.rb +1730 -0
  49. data/lib/rubyXL/objects/workbook.rb +572 -0
  50. data/lib/rubyXL/objects/worksheet.rb +762 -0
  51. data/lib/rubyXL/parser.rb +18 -459
  52. data/lib/rubyXL/worksheet.rb +73 -1461
  53. data/lib/rubyXL.rb +9 -7
  54. data/rdoc/README_rdoc.html +534 -0
  55. data/rdoc/RubyXL/AExtension.html +187 -0
  56. data/rdoc/RubyXL/AExtensionStorageArea.html +97 -0
  57. data/rdoc/RubyXL/ActiveX.html +156 -0
  58. data/rdoc/RubyXL/ActiveXBinary.html +106 -0
  59. data/rdoc/RubyXL/AdjustHandleList.html +99 -0
  60. data/rdoc/RubyXL/Alignment.html +99 -0
  61. data/rdoc/RubyXL/AlternateContent.html +97 -0
  62. data/rdoc/RubyXL/AlternateUrls.html +99 -0
  63. data/rdoc/RubyXL/Authors.html +99 -0
  64. data/rdoc/RubyXL/AutoFilter.html +99 -0
  65. data/rdoc/RubyXL/AutoFilterColumn.html +99 -0
  66. data/rdoc/RubyXL/BinaryImageFile.html +108 -0
  67. data/rdoc/RubyXL/BodyProperties.html +99 -0
  68. data/rdoc/RubyXL/BooleanNode.html +97 -0
  69. data/rdoc/RubyXL/BooleanValue.html +97 -0
  70. data/rdoc/RubyXL/Border.html +223 -0
  71. data/rdoc/RubyXL/BorderEdge.html +160 -0
  72. data/rdoc/RubyXL/Borders.html +138 -0
  73. data/rdoc/RubyXL/Break.html +99 -0
  74. data/rdoc/RubyXL/BreakList.html +99 -0
  75. data/rdoc/RubyXL/CT_AdjPoint2D.html +99 -0
  76. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +99 -0
  77. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +99 -0
  78. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +99 -0
  79. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +99 -0
  80. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +99 -0
  81. data/rdoc/RubyXL/CT_Backdrop.html +99 -0
  82. data/rdoc/RubyXL/CT_Bevel.html +99 -0
  83. data/rdoc/RubyXL/CT_BiLevelEffect.html +99 -0
  84. data/rdoc/RubyXL/CT_BlendEffect.html +99 -0
  85. data/rdoc/RubyXL/CT_Blip.html +99 -0
  86. data/rdoc/RubyXL/CT_BlipFillProperties.html +99 -0
  87. data/rdoc/RubyXL/CT_BlurEffect.html +99 -0
  88. data/rdoc/RubyXL/CT_Camera.html +99 -0
  89. data/rdoc/RubyXL/CT_Color.html +99 -0
  90. data/rdoc/RubyXL/CT_ColorChangeEffect.html +99 -0
  91. data/rdoc/RubyXL/CT_ColorMapping.html +99 -0
  92. data/rdoc/RubyXL/CT_ColorScheme.html +99 -0
  93. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +99 -0
  94. data/rdoc/RubyXL/CT_ConnectionSite.html +99 -0
  95. data/rdoc/RubyXL/CT_ConnectionSiteList.html +99 -0
  96. data/rdoc/RubyXL/CT_DashStop.html +99 -0
  97. data/rdoc/RubyXL/CT_DashStopList.html +99 -0
  98. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +99 -0
  99. data/rdoc/RubyXL/CT_DuotoneEffect.html +99 -0
  100. data/rdoc/RubyXL/CT_EffectContainer.html +99 -0
  101. data/rdoc/RubyXL/CT_EffectList.html +99 -0
  102. data/rdoc/RubyXL/CT_EffectReference.html +99 -0
  103. data/rdoc/RubyXL/CT_EffectStyleItem.html +99 -0
  104. data/rdoc/RubyXL/CT_EffectStyleList.html +99 -0
  105. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +99 -0
  106. data/rdoc/RubyXL/CT_FillEffect.html +99 -0
  107. data/rdoc/RubyXL/CT_FillOverlayEffect.html +99 -0
  108. data/rdoc/RubyXL/CT_FillStyleList.html +99 -0
  109. data/rdoc/RubyXL/CT_FlatText.html +99 -0
  110. data/rdoc/RubyXL/CT_FontCollection.html +99 -0
  111. data/rdoc/RubyXL/CT_FontReference.html +99 -0
  112. data/rdoc/RubyXL/CT_GeomGuideList.html +99 -0
  113. data/rdoc/RubyXL/CT_GlowEffect.html +99 -0
  114. data/rdoc/RubyXL/CT_GradientFillProperties.html +99 -0
  115. data/rdoc/RubyXL/CT_GradientStop.html +99 -0
  116. data/rdoc/RubyXL/CT_GradientStopList.html +99 -0
  117. data/rdoc/RubyXL/CT_HSLEffect.html +99 -0
  118. data/rdoc/RubyXL/CT_HslColor.html +99 -0
  119. data/rdoc/RubyXL/CT_Hyperlink.html +99 -0
  120. data/rdoc/RubyXL/CT_InnerShadowEffect.html +99 -0
  121. data/rdoc/RubyXL/CT_LightRig.html +99 -0
  122. data/rdoc/RubyXL/CT_LineEndProperties.html +99 -0
  123. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +99 -0
  124. data/rdoc/RubyXL/CT_LineProperties.html +99 -0
  125. data/rdoc/RubyXL/CT_LineStyleList.html +99 -0
  126. data/rdoc/RubyXL/CT_LinearShadeProperties.html +99 -0
  127. data/rdoc/RubyXL/CT_LuminanceEffect.html +99 -0
  128. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +99 -0
  129. data/rdoc/RubyXL/CT_OuterShadowEffect.html +99 -0
  130. data/rdoc/RubyXL/CT_Path2D.html +99 -0
  131. data/rdoc/RubyXL/CT_Path2DArcTo.html +99 -0
  132. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +99 -0
  133. data/rdoc/RubyXL/CT_Path2DList.html +99 -0
  134. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +99 -0
  135. data/rdoc/RubyXL/CT_Path2DTo.html +99 -0
  136. data/rdoc/RubyXL/CT_PathShadeProperties.html +99 -0
  137. data/rdoc/RubyXL/CT_PatternFillProperties.html +99 -0
  138. data/rdoc/RubyXL/CT_Point3D.html +99 -0
  139. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +99 -0
  140. data/rdoc/RubyXL/CT_PresetColor.html +99 -0
  141. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +99 -0
  142. data/rdoc/RubyXL/CT_PresetShadowEffect.html +99 -0
  143. data/rdoc/RubyXL/CT_PresetTextShape.html +99 -0
  144. data/rdoc/RubyXL/CT_ReflectionEffect.html +99 -0
  145. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +99 -0
  146. data/rdoc/RubyXL/CT_RelativeRect.html +99 -0
  147. data/rdoc/RubyXL/CT_SRgbColor.html +99 -0
  148. data/rdoc/RubyXL/CT_ScRgbColor.html +99 -0
  149. data/rdoc/RubyXL/CT_Scene3D.html +99 -0
  150. data/rdoc/RubyXL/CT_SchemeColor.html +99 -0
  151. data/rdoc/RubyXL/CT_Shape3D.html +99 -0
  152. data/rdoc/RubyXL/CT_ShapeStyle.html +99 -0
  153. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +99 -0
  154. data/rdoc/RubyXL/CT_SphereCoords.html +99 -0
  155. data/rdoc/RubyXL/CT_StretchInfoProperties.html +99 -0
  156. data/rdoc/RubyXL/CT_StyleMatrix.html +99 -0
  157. data/rdoc/RubyXL/CT_StyleMatrixReference.html +99 -0
  158. data/rdoc/RubyXL/CT_SupplementalFont.html +99 -0
  159. data/rdoc/RubyXL/CT_SystemColor.html +99 -0
  160. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +99 -0
  161. data/rdoc/RubyXL/CT_TextBlipBullet.html +99 -0
  162. data/rdoc/RubyXL/CT_TextCharBullet.html +99 -0
  163. data/rdoc/RubyXL/CT_TextCharacterProperties.html +99 -0
  164. data/rdoc/RubyXL/CT_TextFont.html +99 -0
  165. data/rdoc/RubyXL/CT_TextListStyle.html +99 -0
  166. data/rdoc/RubyXL/CT_TextNormalAutofit.html +99 -0
  167. data/rdoc/RubyXL/CT_TextParagraphProperties.html +99 -0
  168. data/rdoc/RubyXL/CT_TextSpacing.html +99 -0
  169. data/rdoc/RubyXL/CT_TextTabStop.html +99 -0
  170. data/rdoc/RubyXL/CT_TextTabStopList.html +99 -0
  171. data/rdoc/RubyXL/CT_TileInfoProperties.html +99 -0
  172. data/rdoc/RubyXL/CT_TintEffect.html +99 -0
  173. data/rdoc/RubyXL/CT_Transform2D.html +99 -0
  174. data/rdoc/RubyXL/CT_TransformEffect.html +99 -0
  175. data/rdoc/RubyXL/CT_Vector3D.html +99 -0
  176. data/rdoc/RubyXL/CT_XYAdjustHandle.html +99 -0
  177. data/rdoc/RubyXL/CalculationChain.html +149 -0
  178. data/rdoc/RubyXL/CalculationChainCell.html +99 -0
  179. data/rdoc/RubyXL/CalculationProperties.html +99 -0
  180. data/rdoc/RubyXL/Cell.html +510 -0
  181. data/rdoc/RubyXL/CellConvenienceMethods.html +1077 -0
  182. data/rdoc/RubyXL/CellExt.html +99 -0
  183. data/rdoc/RubyXL/CellSmartTag.html +99 -0
  184. data/rdoc/RubyXL/CellSmartTagProperty.html +99 -0
  185. data/rdoc/RubyXL/CellSmartTags.html +99 -0
  186. data/rdoc/RubyXL/CellStyle.html +99 -0
  187. data/rdoc/RubyXL/CellStyleXFs.html +138 -0
  188. data/rdoc/RubyXL/CellStyles.html +138 -0
  189. data/rdoc/RubyXL/CellValue.html +139 -0
  190. data/rdoc/RubyXL/CellWatch.html +99 -0
  191. data/rdoc/RubyXL/CellWatches.html +99 -0
  192. data/rdoc/RubyXL/CellXFs.html +139 -0
  193. data/rdoc/RubyXL/ChartColorsFile.html +108 -0
  194. data/rdoc/RubyXL/ChartFile.html +160 -0
  195. data/rdoc/RubyXL/ChartStyleFile.html +108 -0
  196. data/rdoc/RubyXL/ChartUserShapesFile.html +108 -0
  197. data/rdoc/RubyXL/Chartsheet.html +213 -0
  198. data/rdoc/RubyXL/ChartsheetPageSetup.html +99 -0
  199. data/rdoc/RubyXL/ChartsheetProperties.html +99 -0
  200. data/rdoc/RubyXL/ChartsheetProtection.html +99 -0
  201. data/rdoc/RubyXL/ChartsheetView.html +99 -0
  202. data/rdoc/RubyXL/ChartsheetViews.html +99 -0
  203. data/rdoc/RubyXL/Color.html +151 -0
  204. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +246 -0
  205. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +285 -0
  206. data/rdoc/RubyXL/ColorConvenienceClasses.html +91 -0
  207. data/rdoc/RubyXL/ColorConvenienceMethods.html +139 -0
  208. data/rdoc/RubyXL/ColorFilter.html +99 -0
  209. data/rdoc/RubyXL/ColorScale.html +99 -0
  210. data/rdoc/RubyXL/ColorSet.html +99 -0
  211. data/rdoc/RubyXL/Colors.html +99 -0
  212. data/rdoc/RubyXL/ColumnRange.html +230 -0
  213. data/rdoc/RubyXL/ColumnRanges.html +237 -0
  214. data/rdoc/RubyXL/Comment.html +99 -0
  215. data/rdoc/RubyXL/CommentList.html +99 -0
  216. data/rdoc/RubyXL/CommentsFile.html +165 -0
  217. data/rdoc/RubyXL/ConditionalFormatValue.html +99 -0
  218. data/rdoc/RubyXL/ConditionalFormatting.html +99 -0
  219. data/rdoc/RubyXL/ConditionalFormattingRule.html +99 -0
  220. data/rdoc/RubyXL/Connection.html +99 -0
  221. data/rdoc/RubyXL/ConnectionTable.html +99 -0
  222. data/rdoc/RubyXL/ConnectionTables.html +99 -0
  223. data/rdoc/RubyXL/ConnectionTextField.html +99 -0
  224. data/rdoc/RubyXL/ConnectionTextFields.html +99 -0
  225. data/rdoc/RubyXL/Connections.html +149 -0
  226. data/rdoc/RubyXL/ContentTypeDefault.html +97 -0
  227. data/rdoc/RubyXL/ContentTypeOverride.html +97 -0
  228. data/rdoc/RubyXL/ContentTypes.html +211 -0
  229. data/rdoc/RubyXL/ControlPropertiesFile.html +108 -0
  230. data/rdoc/RubyXL/CorePropertiesFile.html +355 -0
  231. data/rdoc/RubyXL/CustomColor.html +99 -0
  232. data/rdoc/RubyXL/CustomColorList.html +99 -0
  233. data/rdoc/RubyXL/CustomFilter.html +99 -0
  234. data/rdoc/RubyXL/CustomFilters.html +99 -0
  235. data/rdoc/RubyXL/CustomGeometry.html +99 -0
  236. data/rdoc/RubyXL/CustomProperties.html +99 -0
  237. data/rdoc/RubyXL/CustomPropertiesFile.html +108 -0
  238. data/rdoc/RubyXL/CustomProperty.html +99 -0
  239. data/rdoc/RubyXL/CustomPropertyFile.html +108 -0
  240. data/rdoc/RubyXL/CustomSheetView.html +99 -0
  241. data/rdoc/RubyXL/CustomSheetViews.html +99 -0
  242. data/rdoc/RubyXL/CustomWorkbookView.html +99 -0
  243. data/rdoc/RubyXL/CustomWorkbookViews.html +99 -0
  244. data/rdoc/RubyXL/CustomXMLFile.html +106 -0
  245. data/rdoc/RubyXL/DXF.html +99 -0
  246. data/rdoc/RubyXL/DXFs.html +99 -0
  247. data/rdoc/RubyXL/DataBar.html +99 -0
  248. data/rdoc/RubyXL/DataConsolidate.html +99 -0
  249. data/rdoc/RubyXL/DataConsolidationReference.html +99 -0
  250. data/rdoc/RubyXL/DataConsolidationReferences.html +99 -0
  251. data/rdoc/RubyXL/DataType.html +114 -0
  252. data/rdoc/RubyXL/DataValidation.html +99 -0
  253. data/rdoc/RubyXL/DataValidations.html +99 -0
  254. data/rdoc/RubyXL/DateGroupItem.html +99 -0
  255. data/rdoc/RubyXL/DefinedName.html +99 -0
  256. data/rdoc/RubyXL/DefinedNameExt.html +99 -0
  257. data/rdoc/RubyXL/DefinedNames.html +99 -0
  258. data/rdoc/RubyXL/DefinedNamesExt.html +99 -0
  259. data/rdoc/RubyXL/DocumentPropertiesFile.html +213 -0
  260. data/rdoc/RubyXL/DrawingFile.html +159 -0
  261. data/rdoc/RubyXL/DynamicFilter.html +99 -0
  262. data/rdoc/RubyXL/EmbeddedControl.html +99 -0
  263. data/rdoc/RubyXL/EmbeddedControls.html +99 -0
  264. data/rdoc/RubyXL/Extension.html +99 -0
  265. data/rdoc/RubyXL/ExtensionStorageArea.html +99 -0
  266. data/rdoc/RubyXL/Extents.html +99 -0
  267. data/rdoc/RubyXL/ExternalBook.html +99 -0
  268. data/rdoc/RubyXL/ExternalLinksFile.html +155 -0
  269. data/rdoc/RubyXL/ExternalReference.html +99 -0
  270. data/rdoc/RubyXL/ExternalReferences.html +99 -0
  271. data/rdoc/RubyXL/ExtraColorSchemeList.html +99 -0
  272. data/rdoc/RubyXL/FieldItem.html +99 -0
  273. data/rdoc/RubyXL/FileRecoveryProperties.html +99 -0
  274. data/rdoc/RubyXL/FileSharing.html +99 -0
  275. data/rdoc/RubyXL/FileVersion.html +99 -0
  276. data/rdoc/RubyXL/Fill.html +138 -0
  277. data/rdoc/RubyXL/Fills.html +138 -0
  278. data/rdoc/RubyXL/FilterContainer.html +99 -0
  279. data/rdoc/RubyXL/FloatNode.html +97 -0
  280. data/rdoc/RubyXL/FloatValue.html +97 -0
  281. data/rdoc/RubyXL/Font.html +148 -0
  282. data/rdoc/RubyXL/FontConvenienceMethods.html +442 -0
  283. data/rdoc/RubyXL/FontScheme.html +99 -0
  284. data/rdoc/RubyXL/Fonts.html +138 -0
  285. data/rdoc/RubyXL/Formula.html +99 -0
  286. data/rdoc/RubyXL/FunctionGroup.html +99 -0
  287. data/rdoc/RubyXL/FunctionGroups.html +99 -0
  288. data/rdoc/RubyXL/GenericStorageObject.html +241 -0
  289. data/rdoc/RubyXL/GradientFill.html +99 -0
  290. data/rdoc/RubyXL/HeaderFooterSettings.html +99 -0
  291. data/rdoc/RubyXL/Hyperlink.html +99 -0
  292. data/rdoc/RubyXL/HyperlinkRelFile.html +106 -0
  293. data/rdoc/RubyXL/Hyperlinks.html +99 -0
  294. data/rdoc/RubyXL/IconFilter.html +99 -0
  295. data/rdoc/RubyXL/IconSet.html +99 -0
  296. data/rdoc/RubyXL/IgnoredError.html +99 -0
  297. data/rdoc/RubyXL/IgnoredErrors.html +99 -0
  298. data/rdoc/RubyXL/IndexedColors.html +99 -0
  299. data/rdoc/RubyXL/InputCells.html +99 -0
  300. data/rdoc/RubyXL/IntegerNode.html +97 -0
  301. data/rdoc/RubyXL/IntegerValue.html +97 -0
  302. data/rdoc/RubyXL/LegacyCell.html +130 -0
  303. data/rdoc/RubyXL/LegacyWorksheet.html +306 -0
  304. data/rdoc/RubyXL/MRUColors.html +99 -0
  305. data/rdoc/RubyXL/MacrosFile.html +108 -0
  306. data/rdoc/RubyXL/MergedCell.html +99 -0
  307. data/rdoc/RubyXL/MergedCells.html +99 -0
  308. data/rdoc/RubyXL/NumFmt.html +99 -0
  309. data/rdoc/RubyXL/NumberFormat.html +139 -0
  310. data/rdoc/RubyXL/NumberFormats.html +147 -0
  311. data/rdoc/RubyXL/OLEObject.html +99 -0
  312. data/rdoc/RubyXL/OLEObjectFile.html +108 -0
  313. data/rdoc/RubyXL/OLEObjects.html +99 -0
  314. data/rdoc/RubyXL/OLESize.html +99 -0
  315. data/rdoc/RubyXL/OOXMLContainerObject.html +309 -0
  316. data/rdoc/RubyXL/OOXMLIgnored.html +167 -0
  317. data/rdoc/RubyXL/OOXMLObject.html +107 -0
  318. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +455 -0
  319. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +442 -0
  320. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +470 -0
  321. data/rdoc/RubyXL/OOXMLTopLevelObject.html +297 -0
  322. data/rdoc/RubyXL/OdbcOleDbProperties.html +99 -0
  323. data/rdoc/RubyXL/Offset.html +99 -0
  324. data/rdoc/RubyXL/OlapProperties.html +99 -0
  325. data/rdoc/RubyXL/OleItem.html +99 -0
  326. data/rdoc/RubyXL/OleItems.html +99 -0
  327. data/rdoc/RubyXL/OleLink.html +99 -0
  328. data/rdoc/RubyXL/OutlineProperties.html +99 -0
  329. data/rdoc/RubyXL/PageMargins.html +99 -0
  330. data/rdoc/RubyXL/PageSetup.html +99 -0
  331. data/rdoc/RubyXL/PageSetupProperties.html +99 -0
  332. data/rdoc/RubyXL/Pane.html +99 -0
  333. data/rdoc/RubyXL/Parser.html +174 -0
  334. data/rdoc/RubyXL/PatternFill.html +99 -0
  335. data/rdoc/RubyXL/PersonMetadata.html +108 -0
  336. data/rdoc/RubyXL/PhoneticProperties.html +99 -0
  337. data/rdoc/RubyXL/PhoneticRun.html +99 -0
  338. data/rdoc/RubyXL/PivotArea.html +99 -0
  339. data/rdoc/RubyXL/PivotCache.html +99 -0
  340. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +116 -0
  341. data/rdoc/RubyXL/PivotCacheRecordsFile.html +108 -0
  342. data/rdoc/RubyXL/PivotCaches.html +99 -0
  343. data/rdoc/RubyXL/PivotReference.html +99 -0
  344. data/rdoc/RubyXL/PivotReferences.html +99 -0
  345. data/rdoc/RubyXL/PivotTableFile.html +116 -0
  346. data/rdoc/RubyXL/PivotTableSelection.html +99 -0
  347. data/rdoc/RubyXL/PresetGeometry.html +99 -0
  348. data/rdoc/RubyXL/PrintOptions.html +99 -0
  349. data/rdoc/RubyXL/PrinterSettingsFile.html +108 -0
  350. data/rdoc/RubyXL/ProtectedRange.html +99 -0
  351. data/rdoc/RubyXL/ProtectedRanges.html +99 -0
  352. data/rdoc/RubyXL/Protection.html +99 -0
  353. data/rdoc/RubyXL/QueryParameter.html +99 -0
  354. data/rdoc/RubyXL/QueryParameters.html +99 -0
  355. data/rdoc/RubyXL/QueryTable.html +157 -0
  356. data/rdoc/RubyXL/QueryTableDeletedField.html +99 -0
  357. data/rdoc/RubyXL/QueryTableDeletedFields.html +99 -0
  358. data/rdoc/RubyXL/QueryTableField.html +99 -0
  359. data/rdoc/RubyXL/QueryTableFields.html +99 -0
  360. data/rdoc/RubyXL/QueryTableRefresh.html +99 -0
  361. data/rdoc/RubyXL/RID.html +97 -0
  362. data/rdoc/RubyXL/RawOOXML.html +187 -0
  363. data/rdoc/RubyXL/Reference.html +510 -0
  364. data/rdoc/RubyXL/Relationship.html +97 -0
  365. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +131 -0
  366. data/rdoc/RubyXL/RelationshipSupport.html +336 -0
  367. data/rdoc/RubyXL/RevisionPointer.html +99 -0
  368. data/rdoc/RubyXL/RichText.html +141 -0
  369. data/rdoc/RubyXL/RichTextRun.html +138 -0
  370. data/rdoc/RubyXL/Row.html +357 -0
  371. data/rdoc/RubyXL/RowExt.html +99 -0
  372. data/rdoc/RubyXL/RunProperties.html +99 -0
  373. data/rdoc/RubyXL/Scenario.html +99 -0
  374. data/rdoc/RubyXL/Scenarios.html +99 -0
  375. data/rdoc/RubyXL/Selection.html +146 -0
  376. data/rdoc/RubyXL/ShapeGuide.html +99 -0
  377. data/rdoc/RubyXL/ShapeTextRectangle.html +99 -0
  378. data/rdoc/RubyXL/SharedStringsTable.html +328 -0
  379. data/rdoc/RubyXL/Sheet.html +99 -0
  380. data/rdoc/RubyXL/SheetCalculationProperties.html +99 -0
  381. data/rdoc/RubyXL/SheetData.html +162 -0
  382. data/rdoc/RubyXL/SheetDataExt.html +99 -0
  383. data/rdoc/RubyXL/SheetDataSet.html +99 -0
  384. data/rdoc/RubyXL/SheetMetadata.html +108 -0
  385. data/rdoc/RubyXL/SheetName.html +99 -0
  386. data/rdoc/RubyXL/SheetNames.html +99 -0
  387. data/rdoc/RubyXL/Sheets.html +99 -0
  388. data/rdoc/RubyXL/SlicerCacheFile.html +108 -0
  389. data/rdoc/RubyXL/SlicerFile.html +108 -0
  390. data/rdoc/RubyXL/SmartTagProperties.html +99 -0
  391. data/rdoc/RubyXL/SmartTagType.html +99 -0
  392. data/rdoc/RubyXL/SmartTagTypes.html +99 -0
  393. data/rdoc/RubyXL/SmartTags.html +99 -0
  394. data/rdoc/RubyXL/SortCondition.html +99 -0
  395. data/rdoc/RubyXL/SortState.html +99 -0
  396. data/rdoc/RubyXL/Sqref.html +167 -0
  397. data/rdoc/RubyXL/Stop.html +99 -0
  398. data/rdoc/RubyXL/StringNode.html +97 -0
  399. data/rdoc/RubyXL/StringNodeW3C.html +167 -0
  400. data/rdoc/RubyXL/StringValue.html +97 -0
  401. data/rdoc/RubyXL/Stylesheet.html +281 -0
  402. data/rdoc/RubyXL/TableFile.html +108 -0
  403. data/rdoc/RubyXL/TableParts.html +97 -0
  404. data/rdoc/RubyXL/TableStyle.html +99 -0
  405. data/rdoc/RubyXL/TableStyles.html +99 -0
  406. data/rdoc/RubyXL/Text.html +175 -0
  407. data/rdoc/RubyXL/TextImportSettings.html +99 -0
  408. data/rdoc/RubyXL/Theme.html +535 -0
  409. data/rdoc/RubyXL/ThemeElements.html +99 -0
  410. data/rdoc/RubyXL/ThumbnailFile.html +108 -0
  411. data/rdoc/RubyXL/Top10.html +99 -0
  412. data/rdoc/RubyXL/VMLDrawingFile.html +116 -0
  413. data/rdoc/RubyXL/Variant.html +99 -0
  414. data/rdoc/RubyXL/Vector.html +142 -0
  415. data/rdoc/RubyXL/VectorValue.html +97 -0
  416. data/rdoc/RubyXL/VisualProperties.html +99 -0
  417. data/rdoc/RubyXL/WebPublishObject.html +99 -0
  418. data/rdoc/RubyXL/WebPublishObjects.html +99 -0
  419. data/rdoc/RubyXL/WebPublishingItem.html +99 -0
  420. data/rdoc/RubyXL/WebPublishingItems.html +99 -0
  421. data/rdoc/RubyXL/WebPublishingProperties.html +99 -0
  422. data/rdoc/RubyXL/WebQueryProperties.html +99 -0
  423. data/rdoc/RubyXL/Workbook.html +948 -0
  424. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +596 -0
  425. data/rdoc/RubyXL/WorkbookProperties.html +99 -0
  426. data/rdoc/RubyXL/WorkbookProtection.html +99 -0
  427. data/rdoc/RubyXL/WorkbookRoot.html +325 -0
  428. data/rdoc/RubyXL/WorkbookView.html +99 -0
  429. data/rdoc/RubyXL/WorkbookViews.html +99 -0
  430. data/rdoc/RubyXL/Worksheet.html +418 -0
  431. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2205 -0
  432. data/rdoc/RubyXL/WorksheetDimensions.html +99 -0
  433. data/rdoc/RubyXL/WorksheetFormatProperties.html +97 -0
  434. data/rdoc/RubyXL/WorksheetProperties.html +99 -0
  435. data/rdoc/RubyXL/WorksheetProtection.html +99 -0
  436. data/rdoc/RubyXL/WorksheetView.html +99 -0
  437. data/rdoc/RubyXL/WorksheetViews.html +99 -0
  438. data/rdoc/RubyXL/XF.html +99 -0
  439. data/rdoc/RubyXL.html +338 -0
  440. data/rdoc/created.rid +45 -0
  441. data/rdoc/css/fonts.css +167 -0
  442. data/rdoc/css/rdoc.css +687 -0
  443. data/rdoc/fonts/Lato-Light.ttf +0 -0
  444. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  445. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  446. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  447. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  448. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  449. data/rdoc/images/add.png +0 -0
  450. data/rdoc/images/arrow_up.png +0 -0
  451. data/rdoc/images/brick.png +0 -0
  452. data/rdoc/images/brick_link.png +0 -0
  453. data/rdoc/images/bug.png +0 -0
  454. data/rdoc/images/bullet_black.png +0 -0
  455. data/rdoc/images/bullet_toggle_minus.png +0 -0
  456. data/rdoc/images/bullet_toggle_plus.png +0 -0
  457. data/rdoc/images/date.png +0 -0
  458. data/rdoc/images/delete.png +0 -0
  459. data/rdoc/images/find.png +0 -0
  460. data/rdoc/images/loadingAnimation.gif +0 -0
  461. data/rdoc/images/macFFBgHack.png +0 -0
  462. data/rdoc/images/package.png +0 -0
  463. data/rdoc/images/page_green.png +0 -0
  464. data/rdoc/images/page_white_text.png +0 -0
  465. data/rdoc/images/page_white_width.png +0 -0
  466. data/rdoc/images/plugin.png +0 -0
  467. data/rdoc/images/ruby.png +0 -0
  468. data/rdoc/images/tag_blue.png +0 -0
  469. data/rdoc/images/tag_green.png +0 -0
  470. data/rdoc/images/transparent.png +0 -0
  471. data/rdoc/images/wrench.png +0 -0
  472. data/rdoc/images/wrench_orange.png +0 -0
  473. data/rdoc/images/zoom.png +0 -0
  474. data/rdoc/index.html +477 -0
  475. data/rdoc/js/darkfish.js +97 -0
  476. data/rdoc/js/navigation.js +105 -0
  477. data/rdoc/js/navigation.js.gz +0 -0
  478. data/rdoc/js/search.js +110 -0
  479. data/rdoc/js/search_index.js +1 -0
  480. data/rdoc/js/search_index.js.gz +0 -0
  481. data/rdoc/js/searcher.js +229 -0
  482. data/rdoc/js/searcher.js.gz +0 -0
  483. data/rdoc/table_of_contents.html +3021 -0
  484. data/rubyXL.gemspec +521 -60
  485. data/spec/lib/cell_spec.rb +386 -143
  486. data/spec/lib/color_spec.rb +11 -4
  487. data/spec/lib/parser_spec.rb +90 -38
  488. data/spec/lib/reference_spec.rb +64 -0
  489. data/spec/lib/rgb_color_spec.rb +29 -0
  490. data/spec/lib/stylesheet_spec.rb +27 -0
  491. data/spec/lib/text_spec.rb +27 -0
  492. data/spec/lib/workbook_spec.rb +168 -22
  493. data/spec/lib/worksheet_spec.rb +1207 -1220
  494. data/spec/spec_helper.rb +13 -0
  495. data/test/input/.gitkeep +0 -0
  496. data/test/output/.gitkeep +0 -0
  497. data/test/test_parse_write.rb +15 -0
  498. data/tmp/.gitignore +1 -0
  499. metadata +634 -168
  500. data/Gemfile.lock +0 -34
  501. data/lib/.DS_Store +0 -0
  502. data/lib/rubyXL/Hash.rb +0 -60
  503. data/lib/rubyXL/color.rb +0 -14
  504. data/lib/rubyXL/private_class.rb +0 -265
  505. data/lib/rubyXL/workbook.rb +0 -450
  506. data/lib/rubyXL/writer/app_writer.rb +0 -62
  507. data/lib/rubyXL/writer/calc_chain_writer.rb +0 -33
  508. data/lib/rubyXL/writer/content_types_writer.rb +0 -77
  509. data/lib/rubyXL/writer/core_writer.rb +0 -51
  510. data/lib/rubyXL/writer/root_rels_writer.rb +0 -25
  511. data/lib/rubyXL/writer/shared_strings_writer.rb +0 -30
  512. data/lib/rubyXL/writer/styles_writer.rb +0 -407
  513. data/lib/rubyXL/writer/theme_writer.rb +0 -343
  514. data/lib/rubyXL/writer/workbook_rels_writer.rb +0 -59
  515. data/lib/rubyXL/writer/workbook_writer.rb +0 -77
  516. data/lib/rubyXL/writer/worksheet_writer.rb +0 -230
  517. data/lib/rubyXL/zip.rb +0 -20
  518. data/spec/lib/hash_spec.rb +0 -28
@@ -0,0 +1,219 @@
1
+ require 'rubyXL/objects/ooxml_object'
2
+ require 'rubyXL/objects/simple_types'
3
+ require 'rubyXL/objects/text'
4
+ require 'rubyXL/objects/formula'
5
+ require 'rubyXL/cell'
6
+
7
+ module RubyXL
8
+ # http://msdn.microsoft.com/en-us/library/documentformat.openxml.spreadsheet.cellvalues(v=office.14).aspx
9
+ module DataType
10
+ SHARED_STRING = 's'
11
+ RAW_STRING = 'str'
12
+ INLINE_STRING = 'inlineStr'
13
+ ERROR = 'e'
14
+ BOOLEAN = 'b'
15
+ NUMBER = 'n'
16
+ DATE = 'd' # Only available in Office2010.
17
+ end
18
+
19
+ # http://www.datypic.com/sc/ooxml/e-ssml_v-1.html
20
+ class CellValue < OOXMLObject
21
+ define_attribute(:_, :string, :accessor => :value)
22
+ define_attribute(:'xml:space', %w{ preserve })
23
+ define_element_name 'v'
24
+
25
+ def before_write_xml
26
+ preserve_whitespace
27
+ true
28
+ end
29
+ end
30
+
31
+ # http://www.datypic.com/sc/ooxml/e-ssml_c-2.html
32
+ class Cell < OOXMLObject
33
+ NUMBER_REGEXP = /\A-?\d+((?:\.\d+)?(?:e[+-]?\d+)?)?\Z/i
34
+
35
+ define_attribute(:r, :ref)
36
+ define_attribute(:s, :int, :default => 0, :accessor => :style_index)
37
+ define_attribute(:t, RubyXL::ST_CellType, :accessor => :datatype, :default => 'n')
38
+ define_attribute(:cm, :int, :default => 0)
39
+ define_attribute(:vm, :int, :default => 0)
40
+ define_attribute(:ph, :bool, :default => false)
41
+ define_child_node(RubyXL::Formula, :accessor => :formula)
42
+ define_child_node(RubyXL::CellValue, :accessor => :value_container)
43
+ define_child_node(RubyXL::RichText) # is
44
+ define_element_name 'c'
45
+
46
+ attr_accessor :worksheet
47
+
48
+ def index_in_collection
49
+ r.col_range.begin
50
+ end
51
+
52
+ def row
53
+ r&.first_row
54
+ end
55
+
56
+ def row=(v)
57
+ self.r = RubyXL::Reference.new(v, column || 0)
58
+ end
59
+
60
+ def column
61
+ r&.first_col
62
+ end
63
+
64
+ def column=(v)
65
+ self.r = RubyXL::Reference.new(row || 0, v)
66
+ end
67
+
68
+ def raw_value
69
+ value_container&.value
70
+ end
71
+
72
+ def raw_value=(v)
73
+ self.value_container ||= RubyXL::CellValue.new
74
+ value_container.value = v
75
+ end
76
+
77
+ def get_cell_xf
78
+ workbook.stylesheet.cell_xfs[self.style_index || 0]
79
+ end
80
+
81
+ def get_cell_font
82
+ workbook.stylesheet.fonts[get_cell_xf.font_id]
83
+ end
84
+
85
+ def get_cell_border
86
+ workbook.stylesheet.borders[get_cell_xf.border_id]
87
+ end
88
+
89
+ def number_format
90
+ workbook.stylesheet.get_number_format_by_id(get_cell_xf.num_fmt_id)
91
+ end
92
+
93
+ def is_date?
94
+ return false unless # Only fully numeric values can be dates
95
+ case raw_value
96
+ when Numeric then true
97
+ when String then raw_value =~ NUMBER_REGEXP
98
+ else false
99
+ end
100
+
101
+ self.number_format&.is_date_format?
102
+ end
103
+
104
+ # Gets massaged value of the cell, converting datatypes to those known to Ruby (that includes
105
+ # stripping any special formatting from RichText).
106
+ def value(args = {})
107
+ r = self.raw_value
108
+
109
+ case datatype
110
+ when RubyXL::DataType::SHARED_STRING then workbook.shared_strings_container[r.to_i].to_s
111
+ when RubyXL::DataType::INLINE_STRING then is.to_s
112
+ when RubyXL::DataType::RAW_STRING then raw_value
113
+ when RubyXL::DataType::DATE then raw_value && DateTime.parse(raw_value)
114
+ else
115
+ if is then is.to_s
116
+ elsif is_date? then workbook.num_to_date(r.to_f)
117
+ elsif r.is_a?(String) && (r =~ NUMBER_REGEXP) then # Numeric
118
+ if Regexp.last_match(1) != '' then r.to_f
119
+ else r.to_i
120
+ end
121
+ else r
122
+ end
123
+ end
124
+ end
125
+
126
+ def inspect
127
+ str = "#<#{self.class}(#{row},#{column}): #{raw_value.inspect}"
128
+ str << " =#{self.formula.expression}" if self.formula
129
+ str << ", datatype=#{self.datatype.inspect}, style_index=#{self.style_index.inspect}>"
130
+ return str
131
+ end
132
+
133
+ include LegacyCell
134
+ end
135
+
136
+ #TODO# <row r="1" spans="1:1" x14ac:dyDescent="0.25">
137
+
138
+ # http://www.datypic.com/sc/ooxml/e-ssml_row-1.html
139
+ class Row < OOXMLObject
140
+ define_attribute(:r, :int)
141
+ define_attribute(:spans, :string)
142
+ define_attribute(:s, :int, :default => 0, :accessor => :style_index)
143
+ define_attribute(:customFormat, :bool, :default => false)
144
+ define_attribute(:ht, :double)
145
+ define_attribute(:hidden, :bool, :default => false)
146
+ define_attribute(:customHeight, :bool, :default => false)
147
+ define_attribute(:outlineLevel, :int, :default => 0)
148
+ define_attribute(:collapsed, :bool, :default => false)
149
+ define_attribute(:thickTop, :bool, :default => false)
150
+ define_attribute(:thickBot, :bool, :default => false)
151
+ define_attribute(:ph, :bool, :default => false)
152
+ define_child_node(RubyXL::Cell, :collection => true, :accessor => :cells)
153
+ define_element_name 'row'
154
+
155
+ attr_accessor :worksheet
156
+
157
+ def before_write_xml
158
+ !(cells.nil? || cells.empty?)
159
+ end
160
+
161
+ def index_in_collection
162
+ r - 1
163
+ end
164
+
165
+ def [](ind)
166
+ cells[ind]
167
+ end
168
+
169
+ def size
170
+ cells.size
171
+ end
172
+
173
+ def insert_cell_shift_right(c, col_index)
174
+ cells.insert(col_index, c)
175
+ update_cell_coords(col_index)
176
+ end
177
+
178
+ def delete_cell_shift_left(col_index)
179
+ cells.delete_at(col_index)
180
+ update_cell_coords(col_index)
181
+ end
182
+
183
+ def update_cell_coords(start_from_index)
184
+ cells.drop(start_from_index).each_with_index { |cell, i|
185
+ next if cell.nil?
186
+ cell.column = start_from_index + i
187
+ }
188
+ end
189
+ private :update_cell_coords
190
+
191
+ def xf
192
+ @worksheet.workbook.cell_xfs[self.style_index || 0]
193
+ end
194
+
195
+ def get_fill_color
196
+ @worksheet.workbook.get_fill_color(xf)
197
+ end
198
+
199
+ def get_font
200
+ @worksheet.workbook.fonts[xf.font_id]
201
+ end
202
+
203
+ DEFAULT_HEIGHT = 13
204
+ end
205
+
206
+ # http://www.datypic.com/sc/ooxml/e-ssml_sheetData-1.html
207
+ class SheetData < OOXMLObject
208
+ define_child_node(RubyXL::Row, :collection => true, :accessor => :rows)
209
+ define_element_name 'sheetData'
210
+
211
+ def [](ind)
212
+ rows[ind]
213
+ end
214
+
215
+ def size
216
+ rows.size
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,249 @@
1
+ module RubyXL
2
+ ST_PageOrder = %w{ downThenOver overThenDown }
3
+ ST_Orientation = %w{ default portrait landscape }
4
+ ST_CellComments = %w{ none asDisplayed atEnd }
5
+ ST_PrintError = %w{ displayed blank dash NA }
6
+ ST_CfvoType = %w{ num percent max min formula percentile }
7
+ ST_SheetViewType = %w{ normal pageBreakPreview pageLayout }
8
+ ST_PivotAreaType = %w{ none normal data all origin button topRight }
9
+ ST_Axis = %w{ axisRow axisCol axisPage axisValues }
10
+ ST_BorderStyle = %w{ none thin medium dashed dotted thick double hair
11
+ mediumDashed dashDot mediumDashDot dashDotDot slantDashDot }
12
+ ST_HorizontalAlignment = %w{ general left center right fill justify centerContinuous distributed }
13
+ ST_VerticalAlignment = %w{ top center bottom justify distributed }
14
+ ST_VectorBaseType = %w{ variant i1 i2 i4 i8 ui1 ui2 ui4 ui8 r4 r8
15
+ lpstr lpwstr bstr date filetime bool cy error clsid cf }
16
+ ST_PhoneticType = %w{ halfwidthKatakana fullwidthKatakana Hiragana noConversion }
17
+ ST_PhoneticAlignment = %w{ noControl left center distributed }
18
+ ST_WebSourceType = %w{ sheet printArea autoFilter range chart pivotTable query label }
19
+ ST_CellType = %w{ b n e s str inlineStr }
20
+ ST_GradientType = %w{ linear path }
21
+ ST_PatternType = %w{ none solid mediumGray darkGray lightGray
22
+ darkHorizontal darkVertical darkDown darkUp darkGrid darkTrellis
23
+ lightHorizontal lightVertical lightDown lightUp lightGrid lightTrellis
24
+ gray125 gray0625 }
25
+ ST_Objects = %w{ all placeholders none }
26
+ ST_UpdateLinks = %w{ userSet never always }
27
+ ST_Visibility = %w{ visible hidden veryHidden }
28
+
29
+ ST_DateTimeGrouping = %w{ year month day hour minute second }
30
+ ST_CalendarType = %w{ none gregorian gregorianUs japan taiwan korea hijri thai hebrew
31
+ gregorianMeFrench gregorianArabic gregorianXlitEnglish gregorianXlitFrench }
32
+ ST_FilterOperator = %w{ equal lessThan lessThanOrEqual notEqual greaterThanOrEqual greaterThan }
33
+ ST_DynamicFilterType = %w{ null aboveAverage belowAverage tomorrow today yesterday
34
+ nextWeek thisWeek lastWeek nextMonth thisMonth lastMonth
35
+ nextQuarter thisQuarter lastQuarter nextYear thisYear lastYear
36
+ yearToDate Q1 Q2 Q3 Q4 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 M12 }
37
+ ST_IconSetType = %w{ 3Arrows 3ArrowsGray 3Flags 3TrafficLights1 3TrafficLights2
38
+ 3Signs 3Symbols 3Symbols2 4Arrows 4ArrowsGray 4RedToBlack
39
+ 4Rating 4TrafficLights 5Arrows 5ArrowsGray 5Rating 5Quarters }
40
+ ST_SortMethod = %w{ stroke pinYin none }
41
+ ST_SortBy = %w{ value cellColor fontColor icon }
42
+
43
+ ST_CellFormulaType = %w{ normal array dataTable shared }
44
+ ST_TargetScreenSize = %w{ 544x376 640x480 720x512 800x600 1024x768 1152x882
45
+ 1152x900 1280x1024 1600x1200 1800x1440 1920x1200 }
46
+ ST_SmartTagShow = %w{ all none noIndicator }
47
+
48
+ ST_CfType = %w{ expression cellIs colorScale dataBar iconSet top10 uniqueValues
49
+ duplicateValues containsText notContainsText beginsWith
50
+ endsWith containsBlanks notContainsBlanks containsErrors
51
+ notContainsErrors timePeriod aboveAverage }
52
+ ST_TimePeriod = %w{ today yesterday tomorrow last7Days thisMonth
53
+ lastMonth nextMonth thisWeek lastWeek nextWeek }
54
+ ST_CalcMode = %w{ manual auto autoNoTable }
55
+ ST_RefMode = %w{ A1 R1C1 }
56
+
57
+ ST_DvAspect = %w{ DVASPECT_CONTENT DVASPECT_ICON }
58
+ ST_OleUpdate = %w{ OLEUPDATE_ALWAYS OLEUPDATE_ONCALL }
59
+
60
+ ST_Pane = %w{ bottomRight topRight bottomLeft topLeft }
61
+ ST_PaneState = %w{ split frozen frozenSplit }
62
+
63
+ ST_Comments = %w{ commNone commIndicator commIndAndComment }
64
+
65
+ ST_DataValidationType = %w{ none whole decimal list date time textLength custom }
66
+ ST_DataValidationErrorStyle = %w{ stop warning information }
67
+ ST_DataValidationImeMode = %w{ noControl off on disabled hiragana fullKatakana halfKatakana
68
+ fullAlpha halfAlpha fullHangul halfHangul }
69
+ ST_DataValidationOperator = %w{ between notBetween equal notEqual lessThan lessThanOrEqual
70
+ greaterThan greaterThanOrEqual }
71
+
72
+ ST_DataConsolidateFunction = %w{ average count countNums max min
73
+ product stdDev stdDevp sum var varp }
74
+
75
+ ST_ConditionalFormattingOperator = %w{ lessThan lessThanOrEqual equal notEqual greaterThanOrEqual greaterThan
76
+ between notBetween containsText notContains beginsWith endsWith }
77
+ ST_BlackWhiteMode = %w{ clr auto gray ltGray invGray grayWhite blackGray blackWhite black white hidden }
78
+ ST_ShapeType = %w{ line lineInv triangle rtTriangle rect diamond parallelogram trapezoid
79
+ nonIsoscelesTrapezoid pentagon hexagon heptagon octagon decagon dodecagon
80
+ star4 star5 star6 star7 star8 star10 star12 star16 star24 star32
81
+ roundRect round1Rect round2SameRect round2DiagRect snipRoundRect
82
+ snip1Rect snip2SameRect snip2DiagRect plaque ellipse teardrop homePlate chevron
83
+ pieWedge pie blockArc donut noSmoking rightArrow leftArrow upArrow downArrow
84
+ stripedRightArrow notchedRightArrow bentUpArrow
85
+ leftRightArrow upDownArrow leftUpArrow leftRightUpArrow quadArrow
86
+ leftArrowCallout rightArrowCallout upArrowCallout downArrowCallout
87
+ leftRightArrowCallout upDownArrowCallout quadArrowCallout bentArrow uturnArrow circularArrow
88
+ leftCircularArrow leftRightCircularArrow curvedRightArrow
89
+ curvedLeftArrow curvedUpArrow curvedDownArrow swooshArrow
90
+ cube can lightningBolt heart sun moon smileyFace irregularSeal1 irregularSeal2 foldedCorner
91
+ bevel frame halfFrame corner diagStripe chord arc leftBracket rightBracket leftBrace rightBrace
92
+ bracketPair bracePair straightConnector1 bentConnector2
93
+ bentConnector3 bentConnector4 bentConnector5 curvedConnector2 curvedConnector3
94
+ curvedConnector4 curvedConnector5 callout1 callout2 callout3
95
+ accentCallout1 accentCallout2 accentCallout3 borderCallout1 borderCallout2 borderCallout3
96
+ accentBorderCallout1 accentBorderCallout2 accentBorderCallout3
97
+ wedgeRectCallout wedgeRoundRectCallout wedgeEllipseCallout cloudCallout
98
+ cloud ribbon ribbon2 ellipseRibbon ellipseRibbon2 leftRightRibbon
99
+ verticalScroll horizontalScroll wave doubleWave plus
100
+ flowChartProcess flowChartDecision flowChartInputOutput flowChartPredefinedProcess
101
+ flowChartInternalStorage flowChartDocument flowChartMultidocument flowChartTerminator
102
+ flowChartPreparation flowChartManualInput flowChartManualOperation flowChartConnector
103
+ flowChartPunchedCard flowChartPunchedTape flowChartSummingJunction flowChartOr flowChartCollate
104
+ flowChartSort flowChartExtract flowChartMerge flowChartOfflineStorage flowChartOnlineStorage
105
+ flowChartMagneticTape flowChartMagneticDisk flowChartMagneticDrum flowChartDisplay
106
+ flowChartDelay flowChartAlternateProcess flowChartOffpageConnector actionButtonBlank
107
+ actionButtonHome actionButtonHelp actionButtonInformation actionButtonForwardNext
108
+ actionButtonBackPrevious actionButtonEnd actionButtonBeginning actionButtonReturn
109
+ actionButtonDocument actionButtonSound actionButtonMovie gear6 gear9 funnel
110
+ mathPlus mathMinus mathMultiply mathDivide mathEqual mathNotEqual
111
+ cornerTabs squareTabs plaqueTabs chartX chartStar chartPlus }
112
+
113
+ ST_SystemColorVal = %w{ scrollBar background activeCaption inactiveCaption menu window windowFrame menuText
114
+ windowText captionText activeBorder inactiveBorder appWorkspace highlight highlightText
115
+ btnFace btnShadow grayText btnText inactiveCaptionText btnHighlight 3dDkShadow 3dLight
116
+ infoText infoBk hotLight gradientActiveCaption gradientInactiveCaption menuHighlight menuBar }
117
+
118
+ ST_SchemeColorVal = %w{ bg1 tx1 bg2 tx2 accent1 accent2 accent3 accent4 accent5 accent6
119
+ hlink folHlink phClr dk1 lt1 dk2 lt2 }
120
+
121
+ ST_PresetColorVal = %w{ aliceBlue antiqueWhite aqua aquamarine azure beige bisque black blanchedAlmond blue blueViolet
122
+ brown burlyWood cadetBlue chartreuse chocolate coral cornflowerBlue cornsilk crimson cyan
123
+ dkBlue dkCyan dkGoldenrod dkGray dkGreen dkKhaki dkMagenta dkOliveGreen dkOrange
124
+ dkOrchid dkRed dkSalmon dkSeaGreen dkSlateBlue dkSlateGray dkTurquoise dkViolet
125
+ deepPink deepSkyBlue dimGray dodgerBlue firebrick floralWhite forestGreen fuchsia
126
+ gainsboro ghostWhite gold goldenrod gray green greenYellow honeydew hotPink indianRed
127
+ indigo ivory khaki lavender lavenderBlush lawnGreen lemonChiffon ltBlue ltCoral
128
+ ltCyan ltGoldenrodYellow ltGray ltGreen ltPink ltSalmon ltSeaGreen ltSkyBlue
129
+ ltSlateGray ltSteelBlue ltYellow lime limeGreen linen magenta maroon
130
+ medAquamarine medBlue medOrchid medPurple medSeaGreen medSlateBlue medSpringGreen
131
+ medTurquoise medVioletRed midnightBlue mintCream mistyRose moccasin navajoWhite
132
+ navy oldLace olive oliveDrab orange orangeRed orchid paleGoldenrod paleGreen
133
+ paleTurquoise paleVioletRed papayaWhip peachPuff peru pink plum powderBlue purple
134
+ red rosyBrown royalBlue saddleBrown salmon sandyBrown seaGreen seaShell sienna
135
+ silver skyBlue slateBlue slateGray snow springGreen steelBlue tan teal thistle
136
+ tomato turquoise violet wheat white whiteSmoke yellow yellowGreen }
137
+
138
+ ST_PathFillMode = %w{ none norm lighten lightenLess darken darkenLess }
139
+ ST_TextVertOverflowType = %w{ overflow ellipsis clip }
140
+ ST_TextHorzOverflowType = %w{ overflow clip }
141
+ ST_TextVerticalType = %w{ horz vert vert270 wordArtVert eaVert mongolianVert wordArtVertRtl }
142
+ ST_TextWrappingType = %w{ none square }
143
+ ST_TextAnchoringType = %w{ t ctr b just dist }
144
+ ST_TextShapeType = %w{ textNoShape textPlain textStop textTriangle textTriangleInverted textChevron
145
+ textChevronInverted textRingInside textRingOutside textArchUp textArchDown
146
+ textCircle textButton textArchUpPour textArchDownPour textCirclePour textButtonPour
147
+ textCurveUp textCurveDown textCanUp textCanDown textWave1 textWave2 textDoubleWave1
148
+ textWave4 textInflate textDeflate textInflateBottom textDeflateBottom textInflateTop
149
+ textDeflateTop textDeflateInflate textDeflateInflateDeflate textFadeRight
150
+ textFadeLeft textFadeUp textFadeDown textSlantUp textSlantDown
151
+ textCascadeUp textCascadeDown }
152
+
153
+ ST_PresetMaterialType = %w{ legacyMatte legacyPlastic legacyMetal legacyWireframe matte plastic metal
154
+ warmMatte translucentPowder powder dkEdge softEdge clear flat softmetal }
155
+
156
+ ST_BevelPresetType = %w{ relaxedInset circle slope cross angle softRound convex
157
+ coolSlant divot riblet hardEdge artDeco }
158
+
159
+
160
+ ST_LineEndType = %w{ none triangle stealth diamond oval arrow }
161
+ ST_LineEndWidth = %w{ sm med lg }
162
+ ST_LineEndLength = %w{ sm med lg }
163
+
164
+ ST_PresetLineDashVal = %w{ solid dot dash lgDash dashDot lgDashDot lgDashDotDot
165
+ sysDash sysDot sysDashDot sysDashDotDot }
166
+
167
+ ST_TileFlipMode = %w{ none x y xy }
168
+ ST_PathShadeType = %w{ shape circle rect }
169
+
170
+ ST_PresetPatternVal = %w{ pct5 pct10 pct20 pct25 pct30 pct40 pct50 pct60 pct70 pct75 pct80 pct90
171
+ horz vert ltHorz ltVert dkHorz dkVert narHorz narVert dashHorz dashVert
172
+ cross dnDiag upDiag ltDnDiag ltUpDiag dkDnDiag dkUpDiag
173
+ wdDnDiag wdUpDiag dashDnDiag dashUpDiag diagCross smCheck lgCheck
174
+ smGrid lgGrid dotGrid smConfetti lgConfetti horzBrick diagBrick
175
+ solidDmnd openDmnd dotDmnd plaid sphere weave divot shingle wave trellis zigZag }
176
+ ST_RectAlignment = %w{ tl t tr l ctr r bl b br }
177
+ ST_BlipCompression = %w{ email screen print hqprint none }
178
+ ST_ColorSchemeIndex = %w{ dk1 lt1 dk2 lt2 accent1 accent2 accent3 accent4 accent5 accent6 hlink folHlink }
179
+ ST_FontCollectionIndex = %w{ major minor none }
180
+ ST_BlendMode = %w{ over mult screen darken lighten }
181
+ ST_PresetCameraType = %w{ legacyObliqueTopLeft legacyObliqueTop legacyObliqueTopRight legacyObliqueLeft
182
+ legacyObliqueFront legacyObliqueRight legacyObliqueBottomLeft legacyObliqueBottom
183
+ legacyObliqueBottomRight legacyPerspectiveTopLeft legacyPerspectiveTop
184
+ legacyPerspectiveTopRight legacyPerspectiveLeft legacyPerspectiveFront
185
+ legacyPerspectiveRight legacyPerspectiveBottomLeft legacyPerspectiveBottom
186
+ legacyPerspectiveBottomRight orthographicFront isometricTopUp isometricTopDown
187
+ isometricBottomUp isometricBottomDown isometricLeftUp isometricLeftDown
188
+ isometricRightUp isometricRightDown isometricOffAxis1Left isometricOffAxis1Right
189
+ isometricOffAxis1Top isometricOffAxis2Left isometricOffAxis2Right isometricOffAxis2Top
190
+ isometricOffAxis3Left isometricOffAxis3Right isometricOffAxis3Bottom
191
+ isometricOffAxis4Left isometricOffAxis4Right isometricOffAxis4Bottom
192
+ obliqueTopLeft obliqueTop obliqueTopRight obliqueLeft obliqueRight obliqueBottomLeft
193
+ obliqueBottom obliqueBottomRight perspectiveFront perspectiveLeft perspectiveRight
194
+ perspectiveAbove perspectiveBelow perspectiveAboveLeftFacing perspectiveAboveRightFacing
195
+ perspectiveContrastingLeftFacing perspectiveContrastingRightFacing
196
+ perspectiveHeroicLeftFacing perspectiveHeroicRightFacing
197
+ perspectiveHeroicExtremeLeftFacing perspectiveHeroicExtremeRightFacing
198
+ perspectiveRelaxed perspectiveRelaxedModerately }
199
+ ST_LightRigType = %w{ legacyFlat1 legacyFlat2 legacyFlat3 legacyFlat4 legacyNormal1 legacyNormal2
200
+ legacyNormal3 legacyNormal4 legacyHarsh1 legacyHarsh2 legacyHarsh3 legacyHarsh4
201
+ threePt balanced soft harsh flood contrasting morning sunrise sunset chilly
202
+ freezing flat twoPt glow brightRoom }
203
+ ST_LightRigDirection = %w{ tl t tr l ctr r bl b br }
204
+ ST_EffectContainerType = %w{ sib tree }
205
+ ST_PresetShadowVal = %w{ shdw1 shdw2 shdw3 shdw4 shdw5 shdw6 shdw7 shdw8 shdw9 shdw10
206
+ shdw11 shdw12 shdw13 shdw14 shdw15 shdw16 shdw17 shdw18 shdw19 shdw20 }
207
+ ST_TextTabAlignType = %w{ l ctr r dec }
208
+ ST_TextAutonumberScheme = %w{ alphaLcParenBoth alphaUcParenBoth alphaLcParenR alphaUcParenR
209
+ alphaLcPeriod alphaUcPeriod arabicParenBoth arabicParenR arabicPeriod arabicPlain
210
+ romanLcParenBoth romanUcParenBoth romanLcParenR romanUcParenR
211
+ romanLcPeriod romanUcPeriod circleNumDbPlain circleNumWdBlackPlain
212
+ circleNumWdWhitePlain arabicDbPeriod arabicDbPlain ea1ChsPeriod ea1ChsPlain
213
+ ea1ChtPeriod ea1ChtPlain ea1JpnChsDbPeriod ea1JpnKorPlain ea1JpnKorPeriod
214
+ arabic1Minus arabic2Minus hebrew2Minus thaiAlphaPeriod thaiAlphaParenR
215
+ thaiAlphaParenBoth thaiNumPeriod thaiNumParenR thaiNumParenBoth hindiAlphaPeriod
216
+ hindiNumPeriod hindiNumParenR hindiAlpha1Period }
217
+
218
+ ST_TextAlignType = %w{ l ctr r just justLow dist thaiDist }
219
+ ST_TextFontAlignType = %w{ auto t ctr base b }
220
+ ST_LineCap = %w{ rnd sq flat }
221
+ ST_CompoundLine = %w{ sng dbl thickThin thinThick tri }
222
+ ST_PenAlignment = %w{ ctr in }
223
+
224
+ ST_TextUnderlineType = %w{ none words sng dbl heavy dotted dottedHeavy dash dashHeavy dashLong dashLongHeavy
225
+ dotDash dotDashHeavy dotDotDash dotDotDashHeavy wavy wavyHeavy wavyDbl }
226
+ ST_UnderlineValues = %w{ single double singleAccounting doubleAccounting none }
227
+
228
+ ST_TextStrikeType = %w{ noStrike sngStrike dblStrike }
229
+ ST_TextCapsType = %w{ none small all }
230
+
231
+ # TODO: http://www.datypic.com/sc/ooxml/t-ssml_ST_UnsignedIntHex.html
232
+ ST_UnsignedIntHex = :string # length = 4
233
+ # TODO: http://www.datypic.com/sc/ooxml/t-ssml_ST_UnsignedShortHex.html
234
+ ST_UnsignedShortHex = :string # length = 2
235
+
236
+ ST_Xstring = :string
237
+
238
+ # Query Tables
239
+ ST_GrowShrinkType = %w{ insertDelete insertClear overwriteClear }
240
+
241
+ # Connections
242
+ ST_CredMethod = %w{ integrated none stored prompt }
243
+ ST_ParameterType = %w{ prompt value cell }
244
+ ST_FileType = %w{ mac win dos }
245
+ ST_Qualifier = %w{ doubleQuote singleQuote none }
246
+ ST_ExternalConnectionType = %w{ general text MDY DMY YMD MYD DYM YDM skip EMD }
247
+
248
+ ST_HtmlFmt = %w{ none rtf all }
249
+ end
@@ -0,0 +1,193 @@
1
+ module RubyXL
2
+ class GenericStorageObject
3
+ SAVE_ORDER = 0
4
+
5
+ attr_accessor :xlsx_path, :data, :generic_storage
6
+
7
+ def initialize(file_path, data)
8
+ @xlsx_path = file_path
9
+ @data = data
10
+ @generic_storage = []
11
+ end
12
+
13
+ def self.parse_file(zip_file, file_path)
14
+ (entry = zip_file.find_entry(RubyXL::from_root(file_path))) && self.new(file_path, entry.get_input_stream(&:read))
15
+ end
16
+
17
+ def add_to_zip(zip_stream)
18
+ return false if @data.nil?
19
+ zip_stream.put_next_entry(RubyXL::from_root(self.xlsx_path))
20
+ zip_stream.write(@data)
21
+ true
22
+ end
23
+ end
24
+
25
+ class PrinterSettingsFile < GenericStorageObject
26
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings'.freeze
27
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'.freeze
28
+ end
29
+
30
+ class CustomPropertyFile < GenericStorageObject
31
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.customProperty'.freeze
32
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customProperty'.freeze
33
+ end
34
+
35
+ class DrawingFile < GenericStorageObject
36
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawing+xml'.freeze
37
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing'.freeze
38
+
39
+ include RubyXL::RelationshipSupport
40
+
41
+ def attach_relationship(rid, rf)
42
+ case rf
43
+ when RubyXL::ChartFile then store_relationship(rf) # TODO
44
+ when RubyXL::BinaryImageFile then store_relationship(rf) # TODO
45
+ else store_relationship(rf, :unknown)
46
+ end
47
+ end
48
+ end
49
+
50
+ class ChartFile < GenericStorageObject
51
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'.freeze
52
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart'.freeze
53
+
54
+ include RubyXL::RelationshipSupport
55
+
56
+ def attach_relationship(rid, rf)
57
+ case rf
58
+ when RubyXL::ChartColorsFile then store_relationship(rf) # TODO
59
+ when RubyXL::ChartStyleFile then store_relationship(rf) # TODO
60
+ when RubyXL::ChartUserShapesFile then store_relationship(rf) # TODO
61
+ else store_relationship(rf, :unknown)
62
+ end
63
+ end
64
+ end
65
+
66
+ class BinaryImageFile < GenericStorageObject
67
+ CONTENT_TYPE = 'image/jpeg'.freeze
68
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'.freeze
69
+ end
70
+
71
+ class VMLDrawingFile < GenericStorageObject
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
75
+
76
+ include RubyXL::RelationshipSupport
77
+
78
+ define_relationship(RubyXL::BinaryImageFile)
79
+ end
80
+
81
+ class ChartColorsFile < GenericStorageObject
82
+ CONTENT_TYPE = 'application/vnd.ms-office.chartcolorstyle+xml'.freeze
83
+ REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartColorStyle'.freeze
84
+ end
85
+
86
+ class ChartStyleFile < GenericStorageObject
87
+ CONTENT_TYPE = 'application/vnd.ms-office.chartstyle+xml'.freeze
88
+ REL_TYPE = 'http://schemas.microsoft.com/office/2011/relationships/chartStyle'.freeze
89
+ end
90
+
91
+ class TableFile < GenericStorageObject
92
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml'.freeze
93
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/table'.freeze
94
+ end
95
+
96
+ class ControlPropertiesFile < GenericStorageObject
97
+ CONTENT_TYPE = 'application/vnd.ms-excel.controlproperties+xml'.freeze
98
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/ctrlProp'.freeze
99
+ end
100
+
101
+ class PivotCacheRecordsFile < GenericStorageObject
102
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml'.freeze
103
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords'.freeze
104
+ end
105
+
106
+ class PivotCacheDefinitionFile < GenericStorageObject
107
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml'.freeze
108
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheDefinition'.freeze
109
+
110
+ include RubyXL::RelationshipSupport
111
+
112
+ define_relationship(RubyXL::PivotCacheRecordsFile)
113
+ end
114
+
115
+ class PivotTableFile < GenericStorageObject
116
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml'.freeze
117
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotTable'.freeze
118
+
119
+ include RubyXL::RelationshipSupport
120
+
121
+ define_relationship(RubyXL::PivotCacheDefinitionFile)
122
+ end
123
+
124
+ class HyperlinkRelFile < GenericStorageObject
125
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink'.freeze
126
+ end
127
+
128
+ class ThumbnailFile < GenericStorageObject
129
+ REL_TYPE = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail'.freeze
130
+ CONTENT_TYPE = 'image/x-wmf'.freeze
131
+ end
132
+
133
+ class ChartUserShapesFile < GenericStorageObject
134
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml'.freeze
135
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chartUserShapes'.freeze
136
+ end
137
+
138
+ class CustomPropertiesFile < GenericStorageObject
139
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.custom-properties+xml'.freeze
140
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties'.freeze
141
+ end
142
+
143
+ class MacrosFile < GenericStorageObject
144
+ CONTENT_TYPE = 'application/vnd.ms-office.vbaProject'.freeze
145
+ REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/vbaProject'.freeze
146
+ end
147
+
148
+ class CustomXMLFile < GenericStorageObject
149
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml'.freeze
150
+ end
151
+
152
+ class SlicerFile < GenericStorageObject
153
+ CONTENT_TYPE = 'application/vnd.ms-excel.slicer+xml'.freeze
154
+ REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicer'.freeze
155
+ end
156
+
157
+ class SlicerCacheFile < GenericStorageObject
158
+ CONTENT_TYPE = 'application/vnd.ms-excel.slicerCache+xml'.freeze
159
+ REL_TYPE = 'http://schemas.microsoft.com/office/2007/relationships/slicerCache'.freeze
160
+ end
161
+
162
+ class OLEObjectFile < GenericStorageObject
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
175
+ end
176
+
177
+ class ActiveX < GenericStorageObject
178
+ REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/control'.freeze
179
+
180
+ include RubyXL::RelationshipSupport
181
+
182
+ def attach_relationship(rid, rf)
183
+ case rf
184
+ when RubyXL::ChartFile then store_relationship(rf) # TODO
185
+ else store_relationship(rf, :unknown)
186
+ end
187
+ end
188
+ end
189
+
190
+ class ActiveXBinary < GenericStorageObject
191
+ REL_TYPE = 'http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary'.freeze
192
+ end
193
+ end