rubyXL 3.4.25 → 3.4.38

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 (479) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +24 -13
  3. data/.rubocop.yml +124 -0
  4. data/CHANGELOG.md +12 -0
  5. data/Gemfile +4 -2
  6. data/README.rdoc +24 -8
  7. data/VERSION +1 -1
  8. data/lib/rubyXL/convenience_methods/cell.rb +8 -7
  9. data/lib/rubyXL/convenience_methods/color.rb +6 -6
  10. data/lib/rubyXL/convenience_methods/workbook.rb +7 -7
  11. data/lib/rubyXL/convenience_methods/worksheet.rb +26 -6
  12. data/lib/rubyXL/objects/border.rb +6 -1
  13. data/lib/rubyXL/objects/cell_style.rb +1 -0
  14. data/lib/rubyXL/objects/color.rb +1 -1
  15. data/lib/rubyXL/objects/column_range.rb +16 -12
  16. data/lib/rubyXL/objects/document_properties.rb +1 -0
  17. data/lib/rubyXL/objects/external_links.rb +8 -0
  18. data/lib/rubyXL/objects/ooxml_object.rb +21 -17
  19. data/lib/rubyXL/objects/query_table.rb +4 -2
  20. data/lib/rubyXL/objects/reference.rb +56 -20
  21. data/lib/rubyXL/objects/relationships.rb +1 -1
  22. data/lib/rubyXL/objects/root.rb +1 -1
  23. data/lib/rubyXL/objects/shared_strings.rb +1 -1
  24. data/lib/rubyXL/objects/sheet_data.rb +11 -6
  25. data/lib/rubyXL/objects/storage.rb +6 -1
  26. data/lib/rubyXL/objects/stylesheet.rb +2 -3
  27. data/lib/rubyXL/objects/text.rb +3 -3
  28. data/lib/rubyXL/objects/theme.rb +15 -17
  29. data/lib/rubyXL/objects/workbook.rb +17 -9
  30. data/lib/rubyXL/objects/worksheet.rb +2 -2
  31. data/lib/rubyXL/worksheet.rb +11 -3
  32. data/rdoc/README_rdoc.html +536 -147
  33. data/rdoc/RubyXL/AExtension.html +605 -85
  34. data/rdoc/RubyXL/AExtensionStorageArea.html +493 -47
  35. data/rdoc/RubyXL/ActiveX.html +574 -74
  36. data/rdoc/RubyXL/ActiveXBinary.html +503 -49
  37. data/rdoc/RubyXL/AdjustHandleList.html +487 -47
  38. data/rdoc/RubyXL/Alignment.html +487 -47
  39. data/rdoc/RubyXL/AlternateContent.html +493 -47
  40. data/rdoc/RubyXL/AlternateUrls.html +539 -0
  41. data/rdoc/RubyXL/Authors.html +487 -47
  42. data/rdoc/RubyXL/AutoFilter.html +487 -47
  43. data/rdoc/RubyXL/AutoFilterColumn.html +487 -47
  44. data/rdoc/RubyXL/BinaryImageFile.html +510 -50
  45. data/rdoc/RubyXL/BodyProperties.html +487 -47
  46. data/rdoc/RubyXL/BooleanNode.html +493 -47
  47. data/rdoc/RubyXL/BooleanValue.html +493 -47
  48. data/rdoc/RubyXL/Border.html +640 -97
  49. data/rdoc/RubyXL/BorderEdge.html +578 -78
  50. data/rdoc/RubyXL/Borders.html +540 -68
  51. data/rdoc/RubyXL/Break.html +487 -47
  52. data/rdoc/RubyXL/BreakList.html +487 -47
  53. data/rdoc/RubyXL/CT_AdjPoint2D.html +487 -47
  54. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +487 -47
  55. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +487 -47
  56. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +487 -47
  57. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +487 -47
  58. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +487 -47
  59. data/rdoc/RubyXL/CT_Backdrop.html +487 -47
  60. data/rdoc/RubyXL/CT_Bevel.html +487 -47
  61. data/rdoc/RubyXL/CT_BiLevelEffect.html +487 -47
  62. data/rdoc/RubyXL/CT_BlendEffect.html +487 -47
  63. data/rdoc/RubyXL/CT_Blip.html +487 -47
  64. data/rdoc/RubyXL/CT_BlipFillProperties.html +487 -47
  65. data/rdoc/RubyXL/CT_BlurEffect.html +487 -47
  66. data/rdoc/RubyXL/CT_Camera.html +487 -47
  67. data/rdoc/RubyXL/CT_Color.html +487 -47
  68. data/rdoc/RubyXL/CT_ColorChangeEffect.html +487 -47
  69. data/rdoc/RubyXL/CT_ColorMapping.html +487 -47
  70. data/rdoc/RubyXL/CT_ColorScheme.html +487 -47
  71. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +487 -47
  72. data/rdoc/RubyXL/CT_ConnectionSite.html +487 -47
  73. data/rdoc/RubyXL/CT_ConnectionSiteList.html +487 -47
  74. data/rdoc/RubyXL/CT_DashStop.html +487 -47
  75. data/rdoc/RubyXL/CT_DashStopList.html +487 -47
  76. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +487 -47
  77. data/rdoc/RubyXL/CT_DuotoneEffect.html +487 -47
  78. data/rdoc/RubyXL/CT_EffectContainer.html +487 -47
  79. data/rdoc/RubyXL/CT_EffectList.html +487 -47
  80. data/rdoc/RubyXL/CT_EffectReference.html +487 -47
  81. data/rdoc/RubyXL/CT_EffectStyleItem.html +487 -47
  82. data/rdoc/RubyXL/CT_EffectStyleList.html +487 -47
  83. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +487 -47
  84. data/rdoc/RubyXL/CT_FillEffect.html +487 -47
  85. data/rdoc/RubyXL/CT_FillOverlayEffect.html +487 -47
  86. data/rdoc/RubyXL/CT_FillStyleList.html +487 -47
  87. data/rdoc/RubyXL/CT_FlatText.html +487 -47
  88. data/rdoc/RubyXL/CT_FontCollection.html +487 -47
  89. data/rdoc/RubyXL/CT_FontReference.html +487 -47
  90. data/rdoc/RubyXL/CT_GeomGuideList.html +487 -47
  91. data/rdoc/RubyXL/CT_GlowEffect.html +487 -47
  92. data/rdoc/RubyXL/CT_GradientFillProperties.html +487 -47
  93. data/rdoc/RubyXL/CT_GradientStop.html +487 -47
  94. data/rdoc/RubyXL/CT_GradientStopList.html +487 -47
  95. data/rdoc/RubyXL/CT_HSLEffect.html +487 -47
  96. data/rdoc/RubyXL/CT_HslColor.html +487 -47
  97. data/rdoc/RubyXL/CT_Hyperlink.html +487 -47
  98. data/rdoc/RubyXL/CT_InnerShadowEffect.html +487 -47
  99. data/rdoc/RubyXL/CT_LightRig.html +487 -47
  100. data/rdoc/RubyXL/CT_LineEndProperties.html +487 -47
  101. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +487 -47
  102. data/rdoc/RubyXL/CT_LineProperties.html +487 -47
  103. data/rdoc/RubyXL/CT_LineStyleList.html +487 -47
  104. data/rdoc/RubyXL/CT_LinearShadeProperties.html +487 -47
  105. data/rdoc/RubyXL/CT_LuminanceEffect.html +487 -47
  106. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +487 -47
  107. data/rdoc/RubyXL/CT_OuterShadowEffect.html +487 -47
  108. data/rdoc/RubyXL/CT_Path2D.html +487 -47
  109. data/rdoc/RubyXL/CT_Path2DArcTo.html +487 -47
  110. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +487 -47
  111. data/rdoc/RubyXL/CT_Path2DList.html +487 -47
  112. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +487 -47
  113. data/rdoc/RubyXL/CT_Path2DTo.html +487 -47
  114. data/rdoc/RubyXL/CT_PathShadeProperties.html +487 -47
  115. data/rdoc/RubyXL/CT_PatternFillProperties.html +487 -47
  116. data/rdoc/RubyXL/CT_Point3D.html +487 -47
  117. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +487 -47
  118. data/rdoc/RubyXL/CT_PresetColor.html +487 -47
  119. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +487 -47
  120. data/rdoc/RubyXL/CT_PresetShadowEffect.html +487 -47
  121. data/rdoc/RubyXL/CT_PresetTextShape.html +487 -47
  122. data/rdoc/RubyXL/CT_ReflectionEffect.html +487 -47
  123. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +487 -47
  124. data/rdoc/RubyXL/CT_RelativeRect.html +487 -47
  125. data/rdoc/RubyXL/CT_SRgbColor.html +487 -47
  126. data/rdoc/RubyXL/CT_ScRgbColor.html +487 -47
  127. data/rdoc/RubyXL/CT_Scene3D.html +487 -47
  128. data/rdoc/RubyXL/CT_SchemeColor.html +487 -47
  129. data/rdoc/RubyXL/CT_Shape3D.html +487 -47
  130. data/rdoc/RubyXL/CT_ShapeStyle.html +487 -47
  131. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +487 -47
  132. data/rdoc/RubyXL/CT_SphereCoords.html +487 -47
  133. data/rdoc/RubyXL/CT_StretchInfoProperties.html +487 -47
  134. data/rdoc/RubyXL/CT_StyleMatrix.html +487 -47
  135. data/rdoc/RubyXL/CT_StyleMatrixReference.html +487 -47
  136. data/rdoc/RubyXL/CT_SupplementalFont.html +487 -47
  137. data/rdoc/RubyXL/CT_SystemColor.html +487 -47
  138. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +487 -47
  139. data/rdoc/RubyXL/CT_TextBlipBullet.html +487 -47
  140. data/rdoc/RubyXL/CT_TextCharBullet.html +487 -47
  141. data/rdoc/RubyXL/CT_TextCharacterProperties.html +487 -47
  142. data/rdoc/RubyXL/CT_TextFont.html +487 -47
  143. data/rdoc/RubyXL/CT_TextListStyle.html +487 -47
  144. data/rdoc/RubyXL/CT_TextNormalAutofit.html +487 -47
  145. data/rdoc/RubyXL/CT_TextParagraphProperties.html +487 -47
  146. data/rdoc/RubyXL/CT_TextSpacing.html +487 -47
  147. data/rdoc/RubyXL/CT_TextTabStop.html +487 -47
  148. data/rdoc/RubyXL/CT_TextTabStopList.html +487 -47
  149. data/rdoc/RubyXL/CT_TileInfoProperties.html +487 -47
  150. data/rdoc/RubyXL/CT_TintEffect.html +487 -47
  151. data/rdoc/RubyXL/CT_Transform2D.html +487 -47
  152. data/rdoc/RubyXL/CT_TransformEffect.html +487 -47
  153. data/rdoc/RubyXL/CT_Vector3D.html +487 -47
  154. data/rdoc/RubyXL/CT_XYAdjustHandle.html +487 -47
  155. data/rdoc/RubyXL/CalculationChain.html +557 -71
  156. data/rdoc/RubyXL/CalculationChainCell.html +487 -47
  157. data/rdoc/RubyXL/CalculationProperties.html +487 -47
  158. data/rdoc/RubyXL/Cell.html +1033 -200
  159. data/rdoc/RubyXL/CellConvenienceMethods.html +1667 -382
  160. data/rdoc/RubyXL/CellExt.html +487 -47
  161. data/rdoc/RubyXL/CellSmartTag.html +487 -47
  162. data/rdoc/RubyXL/CellSmartTagProperty.html +487 -47
  163. data/rdoc/RubyXL/CellSmartTags.html +487 -47
  164. data/rdoc/RubyXL/CellStyle.html +487 -47
  165. data/rdoc/RubyXL/CellStyleXFs.html +540 -68
  166. data/rdoc/RubyXL/CellStyles.html +540 -68
  167. data/rdoc/RubyXL/CellValue.html +540 -68
  168. data/rdoc/RubyXL/CellWatch.html +487 -47
  169. data/rdoc/RubyXL/CellWatches.html +487 -47
  170. data/rdoc/RubyXL/CellXFs.html +542 -71
  171. data/rdoc/RubyXL/ChartColorsFile.html +510 -50
  172. data/rdoc/RubyXL/ChartFile.html +581 -75
  173. data/rdoc/RubyXL/ChartStyleFile.html +510 -50
  174. data/rdoc/RubyXL/ChartUserShapesFile.html +510 -50
  175. data/rdoc/RubyXL/Chartsheet.html +624 -92
  176. data/rdoc/RubyXL/ChartsheetPageSetup.html +487 -47
  177. data/rdoc/RubyXL/ChartsheetProperties.html +487 -47
  178. data/rdoc/RubyXL/ChartsheetProtection.html +487 -47
  179. data/rdoc/RubyXL/ChartsheetView.html +487 -47
  180. data/rdoc/RubyXL/ChartsheetViews.html +487 -47
  181. data/rdoc/RubyXL/Color.html +550 -70
  182. data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +626 -94
  183. data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +671 -105
  184. data/rdoc/RubyXL/ColorConvenienceClasses.html +482 -45
  185. data/rdoc/RubyXL/ColorConvenienceMethods.html +534 -65
  186. data/rdoc/RubyXL/ColorFilter.html +487 -47
  187. data/rdoc/RubyXL/ColorScale.html +487 -47
  188. data/rdoc/RubyXL/ColorSet.html +487 -47
  189. data/rdoc/RubyXL/Colors.html +487 -47
  190. data/rdoc/RubyXL/ColumnRange.html +685 -92
  191. data/rdoc/RubyXL/ColumnRanges.html +646 -102
  192. data/rdoc/RubyXL/Comment.html +487 -47
  193. data/rdoc/RubyXL/CommentList.html +487 -47
  194. data/rdoc/RubyXL/CommentsFile.html +570 -76
  195. data/rdoc/RubyXL/ConditionalFormatValue.html +487 -47
  196. data/rdoc/RubyXL/ConditionalFormatting.html +487 -47
  197. data/rdoc/RubyXL/ConditionalFormattingRule.html +487 -47
  198. data/rdoc/RubyXL/Connection.html +487 -47
  199. data/rdoc/RubyXL/ConnectionTable.html +487 -47
  200. data/rdoc/RubyXL/ConnectionTables.html +487 -47
  201. data/rdoc/RubyXL/ConnectionTextField.html +487 -47
  202. data/rdoc/RubyXL/ConnectionTextFields.html +487 -47
  203. data/rdoc/RubyXL/Connections.html +557 -71
  204. data/rdoc/RubyXL/ContentTypeDefault.html +493 -47
  205. data/rdoc/RubyXL/ContentTypeOverride.html +493 -47
  206. data/rdoc/RubyXL/ContentTypes.html +595 -81
  207. data/rdoc/RubyXL/ControlPropertiesFile.html +510 -50
  208. data/rdoc/RubyXL/CorePropertiesFile.html +825 -149
  209. data/rdoc/RubyXL/CustomColor.html +487 -47
  210. data/rdoc/RubyXL/CustomColorList.html +487 -47
  211. data/rdoc/RubyXL/CustomFilter.html +487 -47
  212. data/rdoc/RubyXL/CustomFilters.html +487 -47
  213. data/rdoc/RubyXL/CustomGeometry.html +487 -47
  214. data/rdoc/RubyXL/CustomProperties.html +487 -47
  215. data/rdoc/RubyXL/CustomPropertiesFile.html +510 -50
  216. data/rdoc/RubyXL/CustomProperty.html +487 -47
  217. data/rdoc/RubyXL/CustomPropertyFile.html +510 -50
  218. data/rdoc/RubyXL/CustomSheetView.html +487 -47
  219. data/rdoc/RubyXL/CustomSheetViews.html +487 -47
  220. data/rdoc/RubyXL/CustomWorkbookView.html +487 -47
  221. data/rdoc/RubyXL/CustomWorkbookViews.html +487 -47
  222. data/rdoc/RubyXL/CustomXMLFile.html +503 -49
  223. data/rdoc/RubyXL/DXF.html +487 -47
  224. data/rdoc/RubyXL/DXFs.html +487 -47
  225. data/rdoc/RubyXL/DataBar.html +487 -47
  226. data/rdoc/RubyXL/DataConsolidate.html +487 -47
  227. data/rdoc/RubyXL/DataConsolidationReference.html +487 -47
  228. data/rdoc/RubyXL/DataConsolidationReferences.html +487 -47
  229. data/rdoc/RubyXL/DataType.html +528 -53
  230. data/rdoc/RubyXL/DataValidation.html +487 -47
  231. data/rdoc/RubyXL/DataValidations.html +487 -47
  232. data/rdoc/RubyXL/DateGroupItem.html +487 -47
  233. data/rdoc/RubyXL/DefinedName.html +487 -47
  234. data/rdoc/RubyXL/DefinedNameExt.html +487 -47
  235. data/rdoc/RubyXL/DefinedNames.html +564 -47
  236. data/rdoc/RubyXL/DefinedNamesExt.html +487 -47
  237. data/rdoc/RubyXL/DocumentPropertiesFile.html +603 -86
  238. data/rdoc/RubyXL/DrawingFile.html +581 -75
  239. data/rdoc/RubyXL/DynamicFilter.html +487 -47
  240. data/rdoc/RubyXL/EmbeddedControl.html +487 -47
  241. data/rdoc/RubyXL/EmbeddedControls.html +487 -47
  242. data/rdoc/RubyXL/Extension.html +487 -47
  243. data/rdoc/RubyXL/ExtensionStorageArea.html +487 -47
  244. data/rdoc/RubyXL/Extents.html +487 -47
  245. data/rdoc/RubyXL/ExternalBook.html +487 -47
  246. data/rdoc/RubyXL/ExternalLinksFile.html +581 -75
  247. data/rdoc/RubyXL/ExternalReference.html +487 -47
  248. data/rdoc/RubyXL/ExternalReferences.html +487 -47
  249. data/rdoc/RubyXL/ExtraColorSchemeList.html +487 -47
  250. data/rdoc/RubyXL/FieldItem.html +487 -47
  251. data/rdoc/RubyXL/FileRecoveryProperties.html +487 -47
  252. data/rdoc/RubyXL/FileSharing.html +487 -47
  253. data/rdoc/RubyXL/FileVersion.html +487 -47
  254. data/rdoc/RubyXL/Fill.html +540 -68
  255. data/rdoc/RubyXL/Fills.html +540 -68
  256. data/rdoc/RubyXL/FilterContainer.html +487 -47
  257. data/rdoc/RubyXL/FloatNode.html +493 -47
  258. data/rdoc/RubyXL/FloatValue.html +493 -47
  259. data/rdoc/RubyXL/Font.html +551 -71
  260. data/rdoc/RubyXL/FontConvenienceMethods.html +938 -183
  261. data/rdoc/RubyXL/FontScheme.html +487 -47
  262. data/rdoc/RubyXL/Fonts.html +540 -68
  263. data/rdoc/RubyXL/Formula.html +487 -47
  264. data/rdoc/RubyXL/FunctionGroup.html +487 -47
  265. data/rdoc/RubyXL/FunctionGroups.html +487 -47
  266. data/rdoc/RubyXL/GenericStorageObject.html +671 -103
  267. data/rdoc/RubyXL/GradientFill.html +487 -47
  268. data/rdoc/RubyXL/HeaderFooterSettings.html +487 -47
  269. data/rdoc/RubyXL/Hyperlink.html +487 -47
  270. data/rdoc/RubyXL/HyperlinkRelFile.html +503 -49
  271. data/rdoc/RubyXL/Hyperlinks.html +487 -47
  272. data/rdoc/RubyXL/IconFilter.html +487 -47
  273. data/rdoc/RubyXL/IconSet.html +487 -47
  274. data/rdoc/RubyXL/IgnoredError.html +487 -47
  275. data/rdoc/RubyXL/IgnoredErrors.html +487 -47
  276. data/rdoc/RubyXL/IndexedColors.html +487 -47
  277. data/rdoc/RubyXL/InputCells.html +487 -47
  278. data/rdoc/RubyXL/IntegerNode.html +493 -47
  279. data/rdoc/RubyXL/IntegerValue.html +493 -47
  280. data/rdoc/RubyXL/LegacyCell.html +534 -65
  281. data/rdoc/RubyXL/LegacyWorksheet.html +727 -114
  282. data/rdoc/RubyXL/MRUColors.html +487 -47
  283. data/rdoc/RubyXL/MacrosFile.html +510 -50
  284. data/rdoc/RubyXL/MergedCell.html +487 -47
  285. data/rdoc/RubyXL/MergedCells.html +487 -47
  286. data/rdoc/RubyXL/NumFmt.html +487 -47
  287. data/rdoc/RubyXL/NumberFormat.html +540 -68
  288. data/rdoc/RubyXL/NumberFormats.html +551 -71
  289. data/rdoc/RubyXL/OLEObject.html +487 -47
  290. data/rdoc/RubyXL/OLEObjectFile.html +510 -50
  291. data/rdoc/RubyXL/OLEObjects.html +487 -47
  292. data/rdoc/RubyXL/OLESize.html +487 -47
  293. data/rdoc/RubyXL/OOXMLContainerObject.html +756 -137
  294. data/rdoc/RubyXL/OOXMLIgnored.html +598 -80
  295. data/rdoc/RubyXL/OOXMLObject.html +506 -52
  296. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +741 -151
  297. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +834 -169
  298. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +894 -170
  299. data/rdoc/RubyXL/OOXMLTopLevelObject.html +735 -131
  300. data/rdoc/RubyXL/OdbcOleDbProperties.html +487 -47
  301. data/rdoc/RubyXL/Offset.html +487 -47
  302. data/rdoc/RubyXL/OlapProperties.html +487 -47
  303. data/rdoc/RubyXL/OleItem.html +487 -47
  304. data/rdoc/RubyXL/OleItems.html +487 -47
  305. data/rdoc/RubyXL/OleLink.html +487 -47
  306. data/rdoc/RubyXL/OutlineProperties.html +487 -47
  307. data/rdoc/RubyXL/PageMargins.html +487 -47
  308. data/rdoc/RubyXL/PageSetup.html +487 -47
  309. data/rdoc/RubyXL/PageSetupProperties.html +487 -47
  310. data/rdoc/RubyXL/Pane.html +487 -47
  311. data/rdoc/RubyXL/Parser.html +578 -78
  312. data/rdoc/RubyXL/PatternFill.html +487 -47
  313. data/rdoc/RubyXL/PersonMetadata.html +568 -0
  314. data/rdoc/RubyXL/PhoneticProperties.html +487 -47
  315. data/rdoc/RubyXL/PhoneticRun.html +487 -47
  316. data/rdoc/RubyXL/PivotArea.html +487 -47
  317. data/rdoc/RubyXL/PivotCache.html +487 -47
  318. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +529 -55
  319. data/rdoc/RubyXL/PivotCacheRecordsFile.html +510 -50
  320. data/rdoc/RubyXL/PivotCaches.html +487 -47
  321. data/rdoc/RubyXL/PivotReference.html +487 -47
  322. data/rdoc/RubyXL/PivotReferences.html +487 -47
  323. data/rdoc/RubyXL/PivotTableFile.html +529 -55
  324. data/rdoc/RubyXL/PivotTableSelection.html +487 -47
  325. data/rdoc/RubyXL/PresetGeometry.html +487 -47
  326. data/rdoc/RubyXL/PrintOptions.html +487 -47
  327. data/rdoc/RubyXL/PrinterSettingsFile.html +510 -50
  328. data/rdoc/RubyXL/ProtectedRange.html +487 -47
  329. data/rdoc/RubyXL/ProtectedRanges.html +487 -47
  330. data/rdoc/RubyXL/Protection.html +487 -47
  331. data/rdoc/RubyXL/QueryParameter.html +487 -47
  332. data/rdoc/RubyXL/QueryParameters.html +487 -47
  333. data/rdoc/RubyXL/QueryTable.html +575 -75
  334. data/rdoc/RubyXL/QueryTableDeletedField.html +487 -47
  335. data/rdoc/RubyXL/QueryTableDeletedFields.html +487 -47
  336. data/rdoc/RubyXL/QueryTableField.html +487 -47
  337. data/rdoc/RubyXL/QueryTableFields.html +487 -47
  338. data/rdoc/RubyXL/QueryTableRefresh.html +487 -47
  339. data/rdoc/RubyXL/RID.html +493 -47
  340. data/rdoc/RubyXL/RawOOXML.html +605 -85
  341. data/rdoc/RubyXL/Reference.html +1109 -207
  342. data/rdoc/RubyXL/Relationship.html +493 -47
  343. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +540 -65
  344. data/rdoc/RubyXL/RelationshipSupport.html +745 -126
  345. data/rdoc/RubyXL/RevisionPointer.html +487 -47
  346. data/rdoc/RubyXL/RichText.html +542 -70
  347. data/rdoc/RubyXL/RichTextRun.html +540 -68
  348. data/rdoc/RubyXL/Row.html +812 -148
  349. data/rdoc/RubyXL/RowExt.html +487 -47
  350. data/rdoc/RubyXL/RunProperties.html +487 -47
  351. data/rdoc/RubyXL/Scenario.html +487 -47
  352. data/rdoc/RubyXL/Scenarios.html +487 -47
  353. data/rdoc/RubyXL/Selection.html +540 -68
  354. data/rdoc/RubyXL/ShapeGuide.html +487 -47
  355. data/rdoc/RubyXL/ShapeTextRectangle.html +487 -47
  356. data/rdoc/RubyXL/SharedStringsTable.html +775 -137
  357. data/rdoc/RubyXL/Sheet.html +487 -47
  358. data/rdoc/RubyXL/SheetCalculationProperties.html +487 -47
  359. data/rdoc/RubyXL/SheetData.html +572 -78
  360. data/rdoc/RubyXL/SheetDataExt.html +487 -47
  361. data/rdoc/RubyXL/SheetDataSet.html +487 -47
  362. data/rdoc/RubyXL/SheetMetadata.html +510 -50
  363. data/rdoc/RubyXL/SheetName.html +487 -47
  364. data/rdoc/RubyXL/SheetNames.html +487 -47
  365. data/rdoc/RubyXL/Sheets.html +487 -47
  366. data/rdoc/RubyXL/SlicerCacheFile.html +510 -50
  367. data/rdoc/RubyXL/SlicerFile.html +510 -50
  368. data/rdoc/RubyXL/SmartTagProperties.html +487 -47
  369. data/rdoc/RubyXL/SmartTagType.html +487 -47
  370. data/rdoc/RubyXL/SmartTagTypes.html +487 -47
  371. data/rdoc/RubyXL/SmartTags.html +487 -47
  372. data/rdoc/RubyXL/SortCondition.html +487 -47
  373. data/rdoc/RubyXL/SortState.html +487 -47
  374. data/rdoc/RubyXL/Sqref.html +599 -81
  375. data/rdoc/RubyXL/Stop.html +487 -47
  376. data/rdoc/RubyXL/StringNode.html +493 -47
  377. data/rdoc/RubyXL/StringNodeW3C.html +598 -80
  378. data/rdoc/RubyXL/StringValue.html +493 -47
  379. data/rdoc/RubyXL/Stylesheet.html +707 -114
  380. data/rdoc/RubyXL/TableFile.html +510 -50
  381. data/rdoc/RubyXL/TableParts.html +493 -47
  382. data/rdoc/RubyXL/TableStyle.html +487 -47
  383. data/rdoc/RubyXL/TableStyles.html +487 -47
  384. data/rdoc/RubyXL/Text.html +591 -83
  385. data/rdoc/RubyXL/TextImportSettings.html +487 -47
  386. data/rdoc/RubyXL/Theme.html +651 -103
  387. data/rdoc/RubyXL/ThemeElements.html +487 -47
  388. data/rdoc/RubyXL/ThumbnailFile.html +510 -50
  389. data/rdoc/RubyXL/Top10.html +487 -47
  390. data/rdoc/RubyXL/VMLDrawingFile.html +530 -56
  391. data/rdoc/RubyXL/Variant.html +487 -47
  392. data/rdoc/RubyXL/Vector.html +540 -68
  393. data/rdoc/RubyXL/VectorValue.html +493 -47
  394. data/rdoc/RubyXL/VisualProperties.html +487 -47
  395. data/rdoc/RubyXL/WebPublishObject.html +487 -47
  396. data/rdoc/RubyXL/WebPublishObjects.html +487 -47
  397. data/rdoc/RubyXL/WebPublishingItem.html +487 -47
  398. data/rdoc/RubyXL/WebPublishingItems.html +487 -47
  399. data/rdoc/RubyXL/WebPublishingProperties.html +487 -47
  400. data/rdoc/RubyXL/WebQueryProperties.html +487 -47
  401. data/rdoc/RubyXL/Workbook.html +1560 -367
  402. data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1069 -226
  403. data/rdoc/RubyXL/WorkbookProperties.html +487 -47
  404. data/rdoc/RubyXL/WorkbookProtection.html +487 -47
  405. data/rdoc/RubyXL/WorkbookRoot.html +741 -123
  406. data/rdoc/RubyXL/WorkbookView.html +487 -47
  407. data/rdoc/RubyXL/WorkbookViews.html +487 -47
  408. data/rdoc/RubyXL/Worksheet.html +840 -154
  409. data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2725 -699
  410. data/rdoc/RubyXL/WorksheetDimensions.html +487 -47
  411. data/rdoc/RubyXL/WorksheetFormatProperties.html +493 -47
  412. data/rdoc/RubyXL/WorksheetProperties.html +487 -47
  413. data/rdoc/RubyXL/WorksheetProtection.html +487 -47
  414. data/rdoc/RubyXL/WorksheetView.html +487 -47
  415. data/rdoc/RubyXL/WorksheetViews.html +487 -47
  416. data/rdoc/RubyXL/XF.html +487 -47
  417. data/rdoc/RubyXL.html +1200 -163
  418. data/rdoc/created.rid +38 -38
  419. data/rdoc/css/rdoc.css +1670 -354
  420. data/rdoc/index.html +418 -433
  421. data/rdoc/js/aliki.js +511 -0
  422. data/rdoc/js/bash_highlighter.js +167 -0
  423. data/rdoc/js/c_highlighter.js +299 -0
  424. data/rdoc/js/{search.js → search_controller.js} +31 -12
  425. data/rdoc/js/search_data.js +1 -0
  426. data/rdoc/js/{navigation.js → search_navigation.js} +10 -10
  427. data/rdoc/js/search_ranker.js +239 -0
  428. data/rdoc/js/theme-toggle.js +112 -0
  429. data/rubyXL.gemspec +27 -70
  430. data/spec/lib/cell_spec.rb +56 -4
  431. data/spec/lib/color_spec.rb +7 -0
  432. data/spec/lib/parser_spec.rb +8 -5
  433. data/spec/lib/reference_spec.rb +69 -6
  434. data/spec/lib/rgb_color_spec.rb +2 -0
  435. data/spec/lib/stylesheet_spec.rb +2 -0
  436. data/spec/lib/text_spec.rb +3 -1
  437. data/spec/lib/workbook_spec.rb +6 -4
  438. data/spec/lib/worksheet_spec.rb +29 -17
  439. metadata +31 -47
  440. data/Gemfile.lock +0 -124
  441. data/rdoc/css/fonts.css +0 -167
  442. data/rdoc/fonts/Lato-Light.ttf +0 -0
  443. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  444. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  445. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  446. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  447. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  448. data/rdoc/images/add.png +0 -0
  449. data/rdoc/images/arrow_up.png +0 -0
  450. data/rdoc/images/brick.png +0 -0
  451. data/rdoc/images/brick_link.png +0 -0
  452. data/rdoc/images/bug.png +0 -0
  453. data/rdoc/images/bullet_black.png +0 -0
  454. data/rdoc/images/bullet_toggle_minus.png +0 -0
  455. data/rdoc/images/bullet_toggle_plus.png +0 -0
  456. data/rdoc/images/date.png +0 -0
  457. data/rdoc/images/delete.png +0 -0
  458. data/rdoc/images/find.png +0 -0
  459. data/rdoc/images/loadingAnimation.gif +0 -0
  460. data/rdoc/images/macFFBgHack.png +0 -0
  461. data/rdoc/images/package.png +0 -0
  462. data/rdoc/images/page_green.png +0 -0
  463. data/rdoc/images/page_white_text.png +0 -0
  464. data/rdoc/images/page_white_width.png +0 -0
  465. data/rdoc/images/plugin.png +0 -0
  466. data/rdoc/images/ruby.png +0 -0
  467. data/rdoc/images/tag_blue.png +0 -0
  468. data/rdoc/images/tag_green.png +0 -0
  469. data/rdoc/images/transparent.png +0 -0
  470. data/rdoc/images/wrench.png +0 -0
  471. data/rdoc/images/wrench_orange.png +0 -0
  472. data/rdoc/images/zoom.png +0 -0
  473. data/rdoc/js/darkfish.js +0 -84
  474. data/rdoc/js/navigation.js.gz +0 -0
  475. data/rdoc/js/search_index.js +0 -1
  476. data/rdoc/js/search_index.js.gz +0 -0
  477. data/rdoc/js/searcher.js +0 -229
  478. data/rdoc/js/searcher.js.gz +0 -0
  479. data/rdoc/table_of_contents.html +0 -3010
@@ -1,12 +1,12 @@
1
1
  /*
2
- * Navigation allows movement using the arrow keys through the search results.
2
+ * SearchNavigation allows movement using the arrow keys through the search results.
3
3
  *
4
4
  * When using this library you will need to set scrollIntoView to the
5
5
  * appropriate function for your layout. Use scrollInWindow if the container
6
6
  * is not scrollable and scrollInElement if the container is a separate
7
7
  * scrolling region.
8
8
  */
9
- Navigation = new function() {
9
+ SearchNavigation = new function() {
10
10
  this.initNavigation = function() {
11
11
  var _this = this;
12
12
 
@@ -23,24 +23,24 @@ Navigation = new function() {
23
23
 
24
24
  this.onkeydown = function(e) {
25
25
  if (!this.navigationActive) return;
26
- switch(e.keyCode) {
27
- case 37: //Event.KEY_LEFT:
26
+ switch(e.key) {
27
+ case 'ArrowLeft':
28
28
  if (this.moveLeft()) e.preventDefault();
29
29
  break;
30
- case 38: //Event.KEY_UP:
31
- if (e.keyCode == 38 || e.ctrlKey) {
30
+ case 'ArrowUp':
31
+ if (e.key == 'ArrowUp' || e.ctrlKey) {
32
32
  if (this.moveUp()) e.preventDefault();
33
33
  }
34
34
  break;
35
- case 39: //Event.KEY_RIGHT:
35
+ case 'ArrowRight':
36
36
  if (this.moveRight()) e.preventDefault();
37
37
  break;
38
- case 40: //Event.KEY_DOWN:
39
- if (e.keyCode == 40 || e.ctrlKey) {
38
+ case 'ArrowDown':
39
+ if (e.key == 'ArrowDown' || e.ctrlKey) {
40
40
  if (this.moveDown()) e.preventDefault();
41
41
  }
42
42
  break;
43
- case 13: //Event.KEY_RETURN:
43
+ case 'Enter':
44
44
  if (this.current) e.preventDefault();
45
45
  this.select(this.current);
46
46
  break;
@@ -0,0 +1,239 @@
1
+ /**
2
+ * Aliki Search Implementation
3
+ *
4
+ * Search algorithm with the following priorities:
5
+ * 1. Exact full_name match always wins (for namespace/method queries)
6
+ * 2. Exact name match gets high priority
7
+ * 3. Match types:
8
+ * - Namespace queries (::) and method queries (# or .) match against full_name
9
+ * - Regular queries match against unqualified name
10
+ * - Prefix (10000) > substring (5000) > fuzzy (1000)
11
+ * 4. First character determines type priority:
12
+ * - Starts with lowercase: methods first
13
+ * - Starts with uppercase: classes/modules/constants first
14
+ * 5. Within same type priority:
15
+ * - Unqualified match > qualified match
16
+ * - Shorter name > longer name
17
+ * 6. Class methods > instance methods
18
+ * 7. Result limit: 30
19
+ * 8. Minimum query length: 1 character
20
+ */
21
+
22
+ var MAX_RESULTS = 30;
23
+ var MIN_QUERY_LENGTH = 1;
24
+
25
+ /*
26
+ * Scoring constants - organized in tiers where each tier dominates lower tiers.
27
+ * This ensures match type always beats type priority, etc.
28
+ *
29
+ * Tier 0: Exact matches (immediate return)
30
+ * Tier 1: Match type (prefix > substring > fuzzy)
31
+ * Tier 2: Exact name bonus
32
+ * Tier 3: Type priority (method vs class based on query case)
33
+ * Tier 4: Minor bonuses (top-level, class method, name length)
34
+ */
35
+ var SCORE_EXACT_FULL_NAME = 1000000; // Tier 0: Query exactly matches full_name
36
+ var SCORE_MATCH_PREFIX = 10000; // Tier 1: Query is prefix of name
37
+ var SCORE_MATCH_SUBSTRING = 5000; // Tier 1: Query is substring of name
38
+ var SCORE_MATCH_FUZZY = 1000; // Tier 1: Query chars appear in order
39
+ var SCORE_EXACT_NAME = 500; // Tier 2: Name exactly equals query
40
+ var SCORE_TYPE_PRIORITY = 100; // Tier 3: Preferred type (method/class)
41
+ var SCORE_TOP_LEVEL = 50; // Tier 4: Top-level over namespaced
42
+ var SCORE_CLASS_METHOD = 10; // Tier 4: Class method over instance method
43
+
44
+ /**
45
+ * Check if all characters in query appear in order in target
46
+ * e.g., "addalias" fuzzy matches "add_foo_alias"
47
+ */
48
+ function fuzzyMatch(target, query) {
49
+ var ti = 0;
50
+ for (var qi = 0; qi < query.length; qi++) {
51
+ ti = target.indexOf(query[qi], ti);
52
+ if (ti === -1) return false;
53
+ ti++;
54
+ }
55
+ return true;
56
+ }
57
+
58
+ /**
59
+ * Parse and normalize a search query
60
+ * @param {string} query - The raw search query
61
+ * @returns {Object} Parsed query with normalized form and flags
62
+ */
63
+ function parseQuery(query) {
64
+ // Lowercase for case-insensitive matching (so "hash" finds both Hash class and #hash methods)
65
+ var normalized = query.toLowerCase();
66
+ var isNamespaceQuery = query.includes('::');
67
+ var isMethodQuery = query.includes('#') || query.includes('.');
68
+
69
+ // Normalize . to :: (RDoc uses :: for class methods in full_name)
70
+ if (query.includes('.')) {
71
+ normalized = normalized.replace(/\./g, '::');
72
+ }
73
+
74
+ return {
75
+ original: query,
76
+ normalized: normalized,
77
+ isNamespaceQuery: isNamespaceQuery,
78
+ isMethodQuery: isMethodQuery,
79
+ // Namespace and method queries match against full_name instead of name
80
+ matchesFullName: isNamespaceQuery || isMethodQuery,
81
+ // If query starts with lowercase, prioritize methods; otherwise prioritize classes/modules/constants
82
+ prioritizeMethod: !/^[A-Z]/.test(query)
83
+ };
84
+ }
85
+
86
+ /**
87
+ * Main search function
88
+ * @param {string} query - The search query
89
+ * @param {Array} index - The search index to search in
90
+ * @returns {Array} Array of matching entries, sorted by relevance
91
+ */
92
+ function search(query, index) {
93
+ if (!query || query.length < MIN_QUERY_LENGTH) {
94
+ return [];
95
+ }
96
+
97
+ var q = parseQuery(query);
98
+ var results = [];
99
+
100
+ for (var i = 0; i < index.length; i++) {
101
+ var entry = index[i];
102
+ var score = computeScore(entry, q);
103
+
104
+ if (score !== null) {
105
+ results.push({ entry: entry, score: score });
106
+ }
107
+ }
108
+
109
+ results.sort(function(a, b) {
110
+ return b.score - a.score;
111
+ });
112
+
113
+ return results.slice(0, MAX_RESULTS).map(function(r) {
114
+ return r.entry;
115
+ });
116
+ }
117
+
118
+ /**
119
+ * Compute the relevance score for an entry
120
+ * @param {Object} entry - The search index entry
121
+ * @param {Object} q - Parsed query from parseQuery()
122
+ * @returns {number|null} Score or null if no match
123
+ */
124
+ function computeScore(entry, q) {
125
+ var name = entry.name;
126
+ var fullName = entry.full_name;
127
+ var type = entry.type;
128
+
129
+ var nameLower = name.toLowerCase();
130
+ var fullNameLower = fullName.toLowerCase();
131
+
132
+ // Exact full_name match (e.g., "Array#filter" matches Array#filter)
133
+ if (q.matchesFullName && fullNameLower === q.normalized) {
134
+ return SCORE_EXACT_FULL_NAME;
135
+ }
136
+
137
+ var matchScore = 0;
138
+ var target = q.matchesFullName ? fullNameLower : nameLower;
139
+
140
+ if (target.startsWith(q.normalized)) {
141
+ matchScore = SCORE_MATCH_PREFIX; // Prefix (e.g., "Arr" matches "Array")
142
+ } else if (target.includes(q.normalized)) {
143
+ matchScore = SCORE_MATCH_SUBSTRING; // Substring (e.g., "ray" matches "Array")
144
+ } else if (fuzzyMatch(target, q.normalized)) {
145
+ matchScore = SCORE_MATCH_FUZZY; // Fuzzy (e.g., "addalias" matches "add_foo_alias")
146
+ } else {
147
+ return null;
148
+ }
149
+
150
+ var score = matchScore;
151
+ var isMethod = (type === 'instance_method' || type === 'class_method');
152
+
153
+ if (q.prioritizeMethod ? isMethod : !isMethod) {
154
+ score += SCORE_TYPE_PRIORITY;
155
+ }
156
+
157
+ if (type === 'class_method') score += SCORE_CLASS_METHOD;
158
+ if (name === fullName) score += SCORE_TOP_LEVEL; // Top-level (Hash) > namespaced (Foo::Hash)
159
+ if (nameLower === q.normalized) score += SCORE_EXACT_NAME; // Exact name match
160
+ score -= name.length;
161
+
162
+ return score;
163
+ }
164
+
165
+ /**
166
+ * SearchRanker class for compatibility with the Search UI
167
+ * Provides ready() and find() interface
168
+ */
169
+ function SearchRanker(index) {
170
+ this.index = index;
171
+ this.handlers = [];
172
+ }
173
+
174
+ SearchRanker.prototype.ready = function(fn) {
175
+ this.handlers.push(fn);
176
+ };
177
+
178
+ SearchRanker.prototype.find = function(query) {
179
+ var q = parseQuery(query);
180
+ var rawResults = search(query, this.index);
181
+ var results = rawResults.map(function(entry) {
182
+ return formatResult(entry, q);
183
+ });
184
+
185
+ var _this = this;
186
+ this.handlers.forEach(function(fn) {
187
+ fn.call(_this, results, true);
188
+ });
189
+ };
190
+
191
+ /**
192
+ * Format a search result entry for display
193
+ */
194
+ function formatResult(entry, q) {
195
+ var result = {
196
+ title: highlightMatch(entry.full_name, q),
197
+ path: entry.path,
198
+ type: entry.type
199
+ };
200
+
201
+ if (entry.snippet) {
202
+ result.snippet = entry.snippet;
203
+ }
204
+
205
+ return result;
206
+ }
207
+
208
+ /**
209
+ * Add highlight markers (\u0001 and \u0002) to matching portions of text
210
+ * @param {string} text - The text to highlight
211
+ * @param {Object} q - Parsed query from parseQuery()
212
+ */
213
+ function highlightMatch(text, q) {
214
+ if (!text || !q) return text;
215
+
216
+ var textLower = text.toLowerCase();
217
+ var query = q.normalized;
218
+
219
+ // Try contiguous match first (prefix or substring)
220
+ var matchIndex = textLower.indexOf(query);
221
+ if (matchIndex !== -1) {
222
+ return text.substring(0, matchIndex) +
223
+ '\u0001' + text.substring(matchIndex, matchIndex + query.length) + '\u0002' +
224
+ text.substring(matchIndex + query.length);
225
+ }
226
+
227
+ // Fall back to fuzzy highlight (highlight each matched character)
228
+ var result = '';
229
+ var ti = 0;
230
+ for (var qi = 0; qi < query.length; qi++) {
231
+ var charIndex = textLower.indexOf(query[qi], ti);
232
+ if (charIndex === -1) return text;
233
+ result += text.substring(ti, charIndex);
234
+ result += '\u0001' + text[charIndex] + '\u0002';
235
+ ti = charIndex + 1;
236
+ }
237
+ result += text.substring(ti);
238
+ return result;
239
+ }
@@ -0,0 +1,112 @@
1
+ (function() {
2
+ 'use strict';
3
+
4
+ const STORAGE_KEY = 'rdoc-theme';
5
+ const THEME_LIGHT = 'light';
6
+ const THEME_DARK = 'dark';
7
+
8
+ /**
9
+ * Get the user's theme preference
10
+ * Priority: localStorage > system preference > light (default)
11
+ */
12
+ function getThemePreference() {
13
+ // Check localStorage first
14
+ const stored = localStorage.getItem(STORAGE_KEY);
15
+ if (stored === THEME_LIGHT || stored === THEME_DARK) {
16
+ return stored;
17
+ }
18
+
19
+ // Check system preference
20
+ if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
21
+ return THEME_DARK;
22
+ }
23
+
24
+ return THEME_LIGHT;
25
+ }
26
+
27
+ /**
28
+ * Apply theme to document
29
+ */
30
+ function applyTheme(theme) {
31
+ document.documentElement.setAttribute('data-theme', theme);
32
+ localStorage.setItem(STORAGE_KEY, theme);
33
+
34
+ // Update toggle button icon
35
+ const toggleBtn = document.getElementById('theme-toggle');
36
+ if (toggleBtn) {
37
+ const icon = toggleBtn.querySelector('.theme-toggle-icon');
38
+ if (icon) {
39
+ icon.textContent = theme === THEME_DARK ? '☀️' : '🌙';
40
+ }
41
+ toggleBtn.setAttribute('aria-label',
42
+ theme === THEME_DARK ? 'Switch to light mode' : 'Switch to dark mode'
43
+ );
44
+ }
45
+ }
46
+
47
+ /**
48
+ * Toggle between light and dark themes
49
+ */
50
+ function toggleTheme() {
51
+ const currentTheme = document.documentElement.getAttribute('data-theme') || THEME_LIGHT;
52
+ const newTheme = currentTheme === THEME_LIGHT ? THEME_DARK : THEME_LIGHT;
53
+ applyTheme(newTheme);
54
+
55
+ // Announce to screen readers
56
+ announceThemeChange(newTheme);
57
+ }
58
+
59
+ /**
60
+ * Announce theme change to screen readers
61
+ */
62
+ function announceThemeChange(theme) {
63
+ const announcement = document.createElement('div');
64
+ announcement.setAttribute('role', 'status');
65
+ announcement.setAttribute('aria-live', 'polite');
66
+ announcement.className = 'sr-only';
67
+ announcement.textContent = `Switched to ${theme} mode`;
68
+ document.body.appendChild(announcement);
69
+
70
+ // Remove after announcement
71
+ setTimeout(() => {
72
+ document.body.removeChild(announcement);
73
+ }, 1000);
74
+ }
75
+
76
+ /**
77
+ * Initialize theme on page load
78
+ */
79
+ function initTheme() {
80
+ // Apply theme immediately to prevent flash
81
+ const theme = getThemePreference();
82
+ applyTheme(theme);
83
+
84
+ // Set up toggle button listener
85
+ const toggleBtn = document.getElementById('theme-toggle');
86
+ if (toggleBtn) {
87
+ toggleBtn.addEventListener('click', toggleTheme);
88
+ }
89
+
90
+ // Listen for system theme changes
91
+ if (window.matchMedia) {
92
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
93
+ // Only auto-switch if user hasn't manually set a preference
94
+ const stored = localStorage.getItem(STORAGE_KEY);
95
+ if (!stored) {
96
+ applyTheme(e.matches ? THEME_DARK : THEME_LIGHT);
97
+ }
98
+ });
99
+ }
100
+ }
101
+
102
+ // Initialize immediately (before DOMContentLoaded to prevent flash)
103
+ if (document.readyState === 'loading') {
104
+ // Apply theme as early as possible
105
+ const theme = getThemePreference();
106
+ document.documentElement.setAttribute('data-theme', theme);
107
+
108
+ document.addEventListener('DOMContentLoaded', initTheme);
109
+ } else {
110
+ initTheme();
111
+ }
112
+ })();
data/rubyXL.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: rubyXL 3.4.25 ruby lib
5
+ # stub: rubyXL 3.4.38 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "rubyXL".freeze
9
- s.version = "3.4.25"
9
+ s.version = "3.4.38".freeze
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Vivek Bhagwat".freeze, "Wesha".freeze]
14
- s.date = "2022-05-19"
14
+ s.date = "2026-06-15"
15
15
  s.description = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents".freeze
16
16
  s.email = "bhagwat.vivek@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
@@ -21,8 +21,9 @@ Gem::Specification.new do |s|
21
21
  s.files = [
22
22
  ".circleci/config.yml",
23
23
  ".codeclimate.yml",
24
+ ".rubocop.yml",
25
+ "CHANGELOG.md",
24
26
  "Gemfile",
25
- "Gemfile.lock",
26
27
  "LICENSE.txt",
27
28
  "README.rdoc",
28
29
  "Rakefile",
@@ -79,6 +80,7 @@ Gem::Specification.new do |s|
79
80
  "rdoc/RubyXL/AdjustHandleList.html",
80
81
  "rdoc/RubyXL/Alignment.html",
81
82
  "rdoc/RubyXL/AlternateContent.html",
83
+ "rdoc/RubyXL/AlternateUrls.html",
82
84
  "rdoc/RubyXL/Authors.html",
83
85
  "rdoc/RubyXL/AutoFilter.html",
84
86
  "rdoc/RubyXL/AutoFilterColumn.html",
@@ -351,6 +353,7 @@ Gem::Specification.new do |s|
351
353
  "rdoc/RubyXL/Pane.html",
352
354
  "rdoc/RubyXL/Parser.html",
353
355
  "rdoc/RubyXL/PatternFill.html",
356
+ "rdoc/RubyXL/PersonMetadata.html",
354
357
  "rdoc/RubyXL/PhoneticProperties.html",
355
358
  "rdoc/RubyXL/PhoneticRun.html",
356
359
  "rdoc/RubyXL/PivotArea.html",
@@ -455,49 +458,16 @@ Gem::Specification.new do |s|
455
458
  "rdoc/RubyXL/WorksheetViews.html",
456
459
  "rdoc/RubyXL/XF.html",
457
460
  "rdoc/created.rid",
458
- "rdoc/css/fonts.css",
459
461
  "rdoc/css/rdoc.css",
460
- "rdoc/fonts/Lato-Light.ttf",
461
- "rdoc/fonts/Lato-LightItalic.ttf",
462
- "rdoc/fonts/Lato-Regular.ttf",
463
- "rdoc/fonts/Lato-RegularItalic.ttf",
464
- "rdoc/fonts/SourceCodePro-Bold.ttf",
465
- "rdoc/fonts/SourceCodePro-Regular.ttf",
466
- "rdoc/images/add.png",
467
- "rdoc/images/arrow_up.png",
468
- "rdoc/images/brick.png",
469
- "rdoc/images/brick_link.png",
470
- "rdoc/images/bug.png",
471
- "rdoc/images/bullet_black.png",
472
- "rdoc/images/bullet_toggle_minus.png",
473
- "rdoc/images/bullet_toggle_plus.png",
474
- "rdoc/images/date.png",
475
- "rdoc/images/delete.png",
476
- "rdoc/images/find.png",
477
- "rdoc/images/loadingAnimation.gif",
478
- "rdoc/images/macFFBgHack.png",
479
- "rdoc/images/package.png",
480
- "rdoc/images/page_green.png",
481
- "rdoc/images/page_white_text.png",
482
- "rdoc/images/page_white_width.png",
483
- "rdoc/images/plugin.png",
484
- "rdoc/images/ruby.png",
485
- "rdoc/images/tag_blue.png",
486
- "rdoc/images/tag_green.png",
487
- "rdoc/images/transparent.png",
488
- "rdoc/images/wrench.png",
489
- "rdoc/images/wrench_orange.png",
490
- "rdoc/images/zoom.png",
491
462
  "rdoc/index.html",
492
- "rdoc/js/darkfish.js",
493
- "rdoc/js/navigation.js",
494
- "rdoc/js/navigation.js.gz",
495
- "rdoc/js/search.js",
496
- "rdoc/js/search_index.js",
497
- "rdoc/js/search_index.js.gz",
498
- "rdoc/js/searcher.js",
499
- "rdoc/js/searcher.js.gz",
500
- "rdoc/table_of_contents.html",
463
+ "rdoc/js/aliki.js",
464
+ "rdoc/js/bash_highlighter.js",
465
+ "rdoc/js/c_highlighter.js",
466
+ "rdoc/js/search_controller.js",
467
+ "rdoc/js/search_data.js",
468
+ "rdoc/js/search_navigation.js",
469
+ "rdoc/js/search_ranker.js",
470
+ "rdoc/js/theme-toggle.js",
501
471
  "rubyXL.gemspec",
502
472
  "spec/lib/cell_spec.rb",
503
473
  "spec/lib/color_spec.rb",
@@ -516,33 +486,20 @@ Gem::Specification.new do |s|
516
486
  ]
517
487
  s.homepage = "http://github.com/gilt/rubyXL".freeze
518
488
  s.licenses = ["MIT".freeze]
519
- s.rubygems_version = "3.3.12".freeze
489
+ s.rubygems_version = "3.5.22".freeze
520
490
  s.summary = "rubyXL is a gem which allows the parsing, creation, and manipulation of Microsoft Excel (.xlsx/.xlsm) Documents".freeze
521
491
 
522
- if s.respond_to? :specification_version then
523
- s.specification_version = 4
524
- end
492
+ s.specification_version = 4
525
493
 
526
- if s.respond_to? :add_runtime_dependency then
527
- s.add_runtime_dependency(%q<nokogiri>.freeze, [">= 1.10.8"])
528
- s.add_runtime_dependency(%q<rubyzip>.freeze, [">= 1.3.0"])
529
- s.add_development_dependency(%q<bundler>.freeze, [">= 0"])
530
- s.add_development_dependency(%q<rake>.freeze, [">= 0"])
531
- s.add_development_dependency(%q<juwelier>.freeze, [">= 0"])
532
- s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
533
- s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
534
- s.add_development_dependency(%q<ruby-prof>.freeze, [">= 0"])
535
- s.add_development_dependency(%q<rspec_junit_formatter>.freeze, [">= 0"])
536
- else
537
- s.add_dependency(%q<nokogiri>.freeze, [">= 1.10.8"])
538
- s.add_dependency(%q<rubyzip>.freeze, [">= 1.3.0"])
539
- s.add_dependency(%q<bundler>.freeze, [">= 0"])
540
- s.add_dependency(%q<rake>.freeze, [">= 0"])
541
- s.add_dependency(%q<juwelier>.freeze, [">= 0"])
542
- s.add_dependency(%q<rspec>.freeze, [">= 0"])
543
- s.add_dependency(%q<simplecov>.freeze, [">= 0"])
544
- s.add_dependency(%q<ruby-prof>.freeze, [">= 0"])
545
- s.add_dependency(%q<rspec_junit_formatter>.freeze, [">= 0"])
546
- end
494
+ s.add_runtime_dependency(%q<nokogiri>.freeze, [">= 1.10.8".freeze])
495
+ s.add_runtime_dependency(%q<rubyzip>.freeze, [">= 3.2.2".freeze])
496
+ s.add_development_dependency(%q<bundler>.freeze, [">= 0".freeze])
497
+ s.add_development_dependency(%q<rake>.freeze, [">= 0".freeze])
498
+ s.add_development_dependency(%q<juwelier>.freeze, [">= 0".freeze])
499
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0".freeze])
500
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0".freeze])
501
+ s.add_development_dependency(%q<ruby-prof>.freeze, [">= 0".freeze])
502
+ s.add_development_dependency(%q<rspec_junit_formatter>.freeze, [">= 0".freeze])
503
+ s.add_development_dependency(%q<rubocop>.freeze, [">= 0".freeze])
547
504
  end
548
505
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'bigdecimal'
3
5
  require 'rubyXL/convenience_methods/font'
@@ -8,8 +10,8 @@ describe RubyXL::Cell do
8
10
  @workbook = RubyXL::Workbook.new
9
11
  @worksheet = @workbook.add_worksheet('Test Worksheet')
10
12
  @workbook.worksheets << @worksheet
11
- (0..10).each do |i|
12
- (0..10).each do |j|
13
+ 11.times do |i|
14
+ 11.times do |j|
13
15
  @worksheet.add_cell(i, j, "#{i}:#{j}")
14
16
  end
15
17
  end
@@ -45,14 +47,14 @@ describe RubyXL::Cell do
45
47
  cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
46
48
 
47
49
  # Due to rounding errors, we allow microsecond precision on DateTime.
48
- expect((cell.value - tm).to_f).to be_within(1.0/86400e6).of(0)
50
+ expect((cell.value - tm).to_f).to be_within(1.0 / 86400e6).of(0)
49
51
 
50
52
  tm = Time.now
51
53
  cell = @worksheet.add_cell(r, c, tm)
52
54
  cell.set_number_format('ddd mmm dd, yyyy HH:MM:SS')
53
55
 
54
56
  # Due to rounding errors, we allow microsecond precision on Time.
55
- expect(cell.value - tm.to_datetime).to be_within(1.0/86400e6).of(0)
57
+ expect(cell.value - tm.to_datetime).to be_within(1.0 / 86400e6).of(0)
56
58
 
57
59
  expected_date = '2020-10-15T14:00:00Z'
58
60
  expected_datetime = Time.parse(expected_date).utc
@@ -66,6 +68,30 @@ describe RubyXL::Cell do
66
68
  # We expect exactly the same date
67
69
  expect(cell.value.to_time.utc.iso8601).to eq(expected_datetime.iso8601)
68
70
  end
71
+
72
+ it 'should raise against too long String' do
73
+ ok_data = 'A' * 32767 # The limit is 32767
74
+
75
+ expect {
76
+ @worksheet.add_cell(0, 1, ok_data) # 32767 -> OK
77
+ }.not_to raise_error
78
+ expect {
79
+ # 1 longer than the limit, so an exception must be thrown.
80
+ @worksheet.add_cell(0, 2, "#{ok_data}x")
81
+ }.to raise_error(ArgumentError)
82
+ end
83
+
84
+ it 'should raise against too long RichText' do
85
+ ok_data = 'A' * 32767 # The limit is 32767
86
+
87
+ expect {
88
+ @worksheet.add_cell(0, 1, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => ok_data))) # 32767 -> OK
89
+ }.not_to raise_error
90
+ expect {
91
+ # 1 longer than the limit, so an exception must be thrown.
92
+ @worksheet.add_cell(0, 2, RubyXL::RichText.new(:t => RubyXL::Text.new(:value => "#{ok_data}x")))
93
+ }.to raise_error(ArgumentError)
94
+ end
69
95
  end
70
96
 
71
97
  describe '.change_fill' do
@@ -237,6 +263,16 @@ describe RubyXL::Cell do
237
263
  expect(@cell.get_border_color(:top)).to eq('FF0000')
238
264
  expect(@cell.get_border(:top)).to eq('thin')
239
265
  end
266
+
267
+ it 'should not change the border color of another cell with the same style' do
268
+ another_cell = @worksheet[0][1]
269
+ @cell.change_border(:right, 'medium')
270
+ another_cell.change_border(:right, 'medium')
271
+ @cell.change_border_color(:right, 'FF0000')
272
+ another_cell.change_border_color(:right, '008000')
273
+ expect(@cell.get_border_color(:right)).to eq('FF0000')
274
+ expect(another_cell.get_border_color(:right)).to eq('008000')
275
+ end
240
276
  end
241
277
 
242
278
  describe '.change_border' do
@@ -599,4 +635,20 @@ describe RubyXL::Cell do
599
635
  expect(@cell.text_rotation).to eq(45)
600
636
  end
601
637
  end
638
+
639
+ describe '.add_shared_string' do
640
+ let(:add_shared_string) { Article.create(title: 'test', description: 'test') }
641
+
642
+ it 'should correctly add a new shared string to the list' do
643
+ @cell = @worksheet.add_cell(7, 0, 1)
644
+ expect(@cell.datatype).to be_nil
645
+
646
+ prior_strings = @workbook.shared_strings_container.strings.dup
647
+ @cell.add_shared_string('testTEST')
648
+ expect(@workbook.shared_strings_container.strings.size).to eq(prior_strings.size + 1)
649
+ expect(@cell.datatype).to eq(RubyXL::DataType::SHARED_STRING)
650
+ expect(@cell.value).to eq('testTEST')
651
+ end
652
+ end
653
+
602
654
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'spec_helper'
2
4
  require 'rubyXL/convenience_methods/color'
3
5
 
@@ -7,8 +9,13 @@ describe RubyXL::Color do
7
9
  expect(RubyXL::Color.validate_color('0fbCAd')).to eq(true)
8
10
  end
9
11
 
12
+ it 'should return true if a valid hex color with alpha is passed' do
13
+ expect(RubyXL::Color.validate_color('01AbCdeF')).to eq(true)
14
+ end
15
+
10
16
  it 'should cause an error if an invalid hex color code or one with a # is passed' do
11
17
  expect { RubyXL::Color.validate_color('#G') }.to raise_error(RuntimeError)
18
+ expect { RubyXL::Color.validate_color('1234567') }.to raise_error(RuntimeError)
12
19
  end
13
20
  end
14
21
  end