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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +24 -13
- data/.rubocop.yml +124 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +4 -2
- data/README.rdoc +24 -8
- data/VERSION +1 -1
- data/lib/rubyXL/convenience_methods/cell.rb +8 -7
- data/lib/rubyXL/convenience_methods/color.rb +6 -6
- data/lib/rubyXL/convenience_methods/workbook.rb +7 -7
- data/lib/rubyXL/convenience_methods/worksheet.rb +26 -6
- data/lib/rubyXL/objects/border.rb +6 -1
- data/lib/rubyXL/objects/cell_style.rb +1 -0
- data/lib/rubyXL/objects/color.rb +1 -1
- data/lib/rubyXL/objects/column_range.rb +16 -12
- data/lib/rubyXL/objects/document_properties.rb +1 -0
- data/lib/rubyXL/objects/external_links.rb +8 -0
- data/lib/rubyXL/objects/ooxml_object.rb +21 -17
- data/lib/rubyXL/objects/query_table.rb +4 -2
- data/lib/rubyXL/objects/reference.rb +56 -20
- data/lib/rubyXL/objects/relationships.rb +1 -1
- data/lib/rubyXL/objects/root.rb +1 -1
- data/lib/rubyXL/objects/shared_strings.rb +1 -1
- data/lib/rubyXL/objects/sheet_data.rb +11 -6
- data/lib/rubyXL/objects/storage.rb +6 -1
- data/lib/rubyXL/objects/stylesheet.rb +2 -3
- data/lib/rubyXL/objects/text.rb +3 -3
- data/lib/rubyXL/objects/theme.rb +15 -17
- data/lib/rubyXL/objects/workbook.rb +17 -9
- data/lib/rubyXL/objects/worksheet.rb +2 -2
- data/lib/rubyXL/worksheet.rb +11 -3
- data/rdoc/README_rdoc.html +536 -147
- data/rdoc/RubyXL/AExtension.html +605 -85
- data/rdoc/RubyXL/AExtensionStorageArea.html +493 -47
- data/rdoc/RubyXL/ActiveX.html +574 -74
- data/rdoc/RubyXL/ActiveXBinary.html +503 -49
- data/rdoc/RubyXL/AdjustHandleList.html +487 -47
- data/rdoc/RubyXL/Alignment.html +487 -47
- data/rdoc/RubyXL/AlternateContent.html +493 -47
- data/rdoc/RubyXL/AlternateUrls.html +539 -0
- data/rdoc/RubyXL/Authors.html +487 -47
- data/rdoc/RubyXL/AutoFilter.html +487 -47
- data/rdoc/RubyXL/AutoFilterColumn.html +487 -47
- data/rdoc/RubyXL/BinaryImageFile.html +510 -50
- data/rdoc/RubyXL/BodyProperties.html +487 -47
- data/rdoc/RubyXL/BooleanNode.html +493 -47
- data/rdoc/RubyXL/BooleanValue.html +493 -47
- data/rdoc/RubyXL/Border.html +640 -97
- data/rdoc/RubyXL/BorderEdge.html +578 -78
- data/rdoc/RubyXL/Borders.html +540 -68
- data/rdoc/RubyXL/Break.html +487 -47
- data/rdoc/RubyXL/BreakList.html +487 -47
- data/rdoc/RubyXL/CT_AdjPoint2D.html +487 -47
- data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaModulateEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +487 -47
- data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +487 -47
- data/rdoc/RubyXL/CT_Backdrop.html +487 -47
- data/rdoc/RubyXL/CT_Bevel.html +487 -47
- data/rdoc/RubyXL/CT_BiLevelEffect.html +487 -47
- data/rdoc/RubyXL/CT_BlendEffect.html +487 -47
- data/rdoc/RubyXL/CT_Blip.html +487 -47
- data/rdoc/RubyXL/CT_BlipFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_BlurEffect.html +487 -47
- data/rdoc/RubyXL/CT_Camera.html +487 -47
- data/rdoc/RubyXL/CT_Color.html +487 -47
- data/rdoc/RubyXL/CT_ColorChangeEffect.html +487 -47
- data/rdoc/RubyXL/CT_ColorMapping.html +487 -47
- data/rdoc/RubyXL/CT_ColorScheme.html +487 -47
- data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +487 -47
- data/rdoc/RubyXL/CT_ConnectionSite.html +487 -47
- data/rdoc/RubyXL/CT_ConnectionSiteList.html +487 -47
- data/rdoc/RubyXL/CT_DashStop.html +487 -47
- data/rdoc/RubyXL/CT_DashStopList.html +487 -47
- data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +487 -47
- data/rdoc/RubyXL/CT_DuotoneEffect.html +487 -47
- data/rdoc/RubyXL/CT_EffectContainer.html +487 -47
- data/rdoc/RubyXL/CT_EffectList.html +487 -47
- data/rdoc/RubyXL/CT_EffectReference.html +487 -47
- data/rdoc/RubyXL/CT_EffectStyleItem.html +487 -47
- data/rdoc/RubyXL/CT_EffectStyleList.html +487 -47
- data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +487 -47
- data/rdoc/RubyXL/CT_FillEffect.html +487 -47
- data/rdoc/RubyXL/CT_FillOverlayEffect.html +487 -47
- data/rdoc/RubyXL/CT_FillStyleList.html +487 -47
- data/rdoc/RubyXL/CT_FlatText.html +487 -47
- data/rdoc/RubyXL/CT_FontCollection.html +487 -47
- data/rdoc/RubyXL/CT_FontReference.html +487 -47
- data/rdoc/RubyXL/CT_GeomGuideList.html +487 -47
- data/rdoc/RubyXL/CT_GlowEffect.html +487 -47
- data/rdoc/RubyXL/CT_GradientFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_GradientStop.html +487 -47
- data/rdoc/RubyXL/CT_GradientStopList.html +487 -47
- data/rdoc/RubyXL/CT_HSLEffect.html +487 -47
- data/rdoc/RubyXL/CT_HslColor.html +487 -47
- data/rdoc/RubyXL/CT_Hyperlink.html +487 -47
- data/rdoc/RubyXL/CT_InnerShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_LightRig.html +487 -47
- data/rdoc/RubyXL/CT_LineEndProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineProperties.html +487 -47
- data/rdoc/RubyXL/CT_LineStyleList.html +487 -47
- data/rdoc/RubyXL/CT_LinearShadeProperties.html +487 -47
- data/rdoc/RubyXL/CT_LuminanceEffect.html +487 -47
- data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +487 -47
- data/rdoc/RubyXL/CT_OuterShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_Path2D.html +487 -47
- data/rdoc/RubyXL/CT_Path2DArcTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DList.html +487 -47
- data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +487 -47
- data/rdoc/RubyXL/CT_Path2DTo.html +487 -47
- data/rdoc/RubyXL/CT_PathShadeProperties.html +487 -47
- data/rdoc/RubyXL/CT_PatternFillProperties.html +487 -47
- data/rdoc/RubyXL/CT_Point3D.html +487 -47
- data/rdoc/RubyXL/CT_PolarAdjustHandle.html +487 -47
- data/rdoc/RubyXL/CT_PresetColor.html +487 -47
- data/rdoc/RubyXL/CT_PresetLineDashProperties.html +487 -47
- data/rdoc/RubyXL/CT_PresetShadowEffect.html +487 -47
- data/rdoc/RubyXL/CT_PresetTextShape.html +487 -47
- data/rdoc/RubyXL/CT_ReflectionEffect.html +487 -47
- data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +487 -47
- data/rdoc/RubyXL/CT_RelativeRect.html +487 -47
- data/rdoc/RubyXL/CT_SRgbColor.html +487 -47
- data/rdoc/RubyXL/CT_ScRgbColor.html +487 -47
- data/rdoc/RubyXL/CT_Scene3D.html +487 -47
- data/rdoc/RubyXL/CT_SchemeColor.html +487 -47
- data/rdoc/RubyXL/CT_Shape3D.html +487 -47
- data/rdoc/RubyXL/CT_ShapeStyle.html +487 -47
- data/rdoc/RubyXL/CT_SoftEdgesEffect.html +487 -47
- data/rdoc/RubyXL/CT_SphereCoords.html +487 -47
- data/rdoc/RubyXL/CT_StretchInfoProperties.html +487 -47
- data/rdoc/RubyXL/CT_StyleMatrix.html +487 -47
- data/rdoc/RubyXL/CT_StyleMatrixReference.html +487 -47
- data/rdoc/RubyXL/CT_SupplementalFont.html +487 -47
- data/rdoc/RubyXL/CT_SystemColor.html +487 -47
- data/rdoc/RubyXL/CT_TextAutonumberBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextBlipBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextCharBullet.html +487 -47
- data/rdoc/RubyXL/CT_TextCharacterProperties.html +487 -47
- data/rdoc/RubyXL/CT_TextFont.html +487 -47
- data/rdoc/RubyXL/CT_TextListStyle.html +487 -47
- data/rdoc/RubyXL/CT_TextNormalAutofit.html +487 -47
- data/rdoc/RubyXL/CT_TextParagraphProperties.html +487 -47
- data/rdoc/RubyXL/CT_TextSpacing.html +487 -47
- data/rdoc/RubyXL/CT_TextTabStop.html +487 -47
- data/rdoc/RubyXL/CT_TextTabStopList.html +487 -47
- data/rdoc/RubyXL/CT_TileInfoProperties.html +487 -47
- data/rdoc/RubyXL/CT_TintEffect.html +487 -47
- data/rdoc/RubyXL/CT_Transform2D.html +487 -47
- data/rdoc/RubyXL/CT_TransformEffect.html +487 -47
- data/rdoc/RubyXL/CT_Vector3D.html +487 -47
- data/rdoc/RubyXL/CT_XYAdjustHandle.html +487 -47
- data/rdoc/RubyXL/CalculationChain.html +557 -71
- data/rdoc/RubyXL/CalculationChainCell.html +487 -47
- data/rdoc/RubyXL/CalculationProperties.html +487 -47
- data/rdoc/RubyXL/Cell.html +1033 -200
- data/rdoc/RubyXL/CellConvenienceMethods.html +1667 -382
- data/rdoc/RubyXL/CellExt.html +487 -47
- data/rdoc/RubyXL/CellSmartTag.html +487 -47
- data/rdoc/RubyXL/CellSmartTagProperty.html +487 -47
- data/rdoc/RubyXL/CellSmartTags.html +487 -47
- data/rdoc/RubyXL/CellStyle.html +487 -47
- data/rdoc/RubyXL/CellStyleXFs.html +540 -68
- data/rdoc/RubyXL/CellStyles.html +540 -68
- data/rdoc/RubyXL/CellValue.html +540 -68
- data/rdoc/RubyXL/CellWatch.html +487 -47
- data/rdoc/RubyXL/CellWatches.html +487 -47
- data/rdoc/RubyXL/CellXFs.html +542 -71
- data/rdoc/RubyXL/ChartColorsFile.html +510 -50
- data/rdoc/RubyXL/ChartFile.html +581 -75
- data/rdoc/RubyXL/ChartStyleFile.html +510 -50
- data/rdoc/RubyXL/ChartUserShapesFile.html +510 -50
- data/rdoc/RubyXL/Chartsheet.html +624 -92
- data/rdoc/RubyXL/ChartsheetPageSetup.html +487 -47
- data/rdoc/RubyXL/ChartsheetProperties.html +487 -47
- data/rdoc/RubyXL/ChartsheetProtection.html +487 -47
- data/rdoc/RubyXL/ChartsheetView.html +487 -47
- data/rdoc/RubyXL/ChartsheetViews.html +487 -47
- data/rdoc/RubyXL/Color.html +550 -70
- data/rdoc/RubyXL/ColorConvenienceClasses/HlsColor.html +626 -94
- data/rdoc/RubyXL/ColorConvenienceClasses/RgbColor.html +671 -105
- data/rdoc/RubyXL/ColorConvenienceClasses.html +482 -45
- data/rdoc/RubyXL/ColorConvenienceMethods.html +534 -65
- data/rdoc/RubyXL/ColorFilter.html +487 -47
- data/rdoc/RubyXL/ColorScale.html +487 -47
- data/rdoc/RubyXL/ColorSet.html +487 -47
- data/rdoc/RubyXL/Colors.html +487 -47
- data/rdoc/RubyXL/ColumnRange.html +685 -92
- data/rdoc/RubyXL/ColumnRanges.html +646 -102
- data/rdoc/RubyXL/Comment.html +487 -47
- data/rdoc/RubyXL/CommentList.html +487 -47
- data/rdoc/RubyXL/CommentsFile.html +570 -76
- data/rdoc/RubyXL/ConditionalFormatValue.html +487 -47
- data/rdoc/RubyXL/ConditionalFormatting.html +487 -47
- data/rdoc/RubyXL/ConditionalFormattingRule.html +487 -47
- data/rdoc/RubyXL/Connection.html +487 -47
- data/rdoc/RubyXL/ConnectionTable.html +487 -47
- data/rdoc/RubyXL/ConnectionTables.html +487 -47
- data/rdoc/RubyXL/ConnectionTextField.html +487 -47
- data/rdoc/RubyXL/ConnectionTextFields.html +487 -47
- data/rdoc/RubyXL/Connections.html +557 -71
- data/rdoc/RubyXL/ContentTypeDefault.html +493 -47
- data/rdoc/RubyXL/ContentTypeOverride.html +493 -47
- data/rdoc/RubyXL/ContentTypes.html +595 -81
- data/rdoc/RubyXL/ControlPropertiesFile.html +510 -50
- data/rdoc/RubyXL/CorePropertiesFile.html +825 -149
- data/rdoc/RubyXL/CustomColor.html +487 -47
- data/rdoc/RubyXL/CustomColorList.html +487 -47
- data/rdoc/RubyXL/CustomFilter.html +487 -47
- data/rdoc/RubyXL/CustomFilters.html +487 -47
- data/rdoc/RubyXL/CustomGeometry.html +487 -47
- data/rdoc/RubyXL/CustomProperties.html +487 -47
- data/rdoc/RubyXL/CustomPropertiesFile.html +510 -50
- data/rdoc/RubyXL/CustomProperty.html +487 -47
- data/rdoc/RubyXL/CustomPropertyFile.html +510 -50
- data/rdoc/RubyXL/CustomSheetView.html +487 -47
- data/rdoc/RubyXL/CustomSheetViews.html +487 -47
- data/rdoc/RubyXL/CustomWorkbookView.html +487 -47
- data/rdoc/RubyXL/CustomWorkbookViews.html +487 -47
- data/rdoc/RubyXL/CustomXMLFile.html +503 -49
- data/rdoc/RubyXL/DXF.html +487 -47
- data/rdoc/RubyXL/DXFs.html +487 -47
- data/rdoc/RubyXL/DataBar.html +487 -47
- data/rdoc/RubyXL/DataConsolidate.html +487 -47
- data/rdoc/RubyXL/DataConsolidationReference.html +487 -47
- data/rdoc/RubyXL/DataConsolidationReferences.html +487 -47
- data/rdoc/RubyXL/DataType.html +528 -53
- data/rdoc/RubyXL/DataValidation.html +487 -47
- data/rdoc/RubyXL/DataValidations.html +487 -47
- data/rdoc/RubyXL/DateGroupItem.html +487 -47
- data/rdoc/RubyXL/DefinedName.html +487 -47
- data/rdoc/RubyXL/DefinedNameExt.html +487 -47
- data/rdoc/RubyXL/DefinedNames.html +564 -47
- data/rdoc/RubyXL/DefinedNamesExt.html +487 -47
- data/rdoc/RubyXL/DocumentPropertiesFile.html +603 -86
- data/rdoc/RubyXL/DrawingFile.html +581 -75
- data/rdoc/RubyXL/DynamicFilter.html +487 -47
- data/rdoc/RubyXL/EmbeddedControl.html +487 -47
- data/rdoc/RubyXL/EmbeddedControls.html +487 -47
- data/rdoc/RubyXL/Extension.html +487 -47
- data/rdoc/RubyXL/ExtensionStorageArea.html +487 -47
- data/rdoc/RubyXL/Extents.html +487 -47
- data/rdoc/RubyXL/ExternalBook.html +487 -47
- data/rdoc/RubyXL/ExternalLinksFile.html +581 -75
- data/rdoc/RubyXL/ExternalReference.html +487 -47
- data/rdoc/RubyXL/ExternalReferences.html +487 -47
- data/rdoc/RubyXL/ExtraColorSchemeList.html +487 -47
- data/rdoc/RubyXL/FieldItem.html +487 -47
- data/rdoc/RubyXL/FileRecoveryProperties.html +487 -47
- data/rdoc/RubyXL/FileSharing.html +487 -47
- data/rdoc/RubyXL/FileVersion.html +487 -47
- data/rdoc/RubyXL/Fill.html +540 -68
- data/rdoc/RubyXL/Fills.html +540 -68
- data/rdoc/RubyXL/FilterContainer.html +487 -47
- data/rdoc/RubyXL/FloatNode.html +493 -47
- data/rdoc/RubyXL/FloatValue.html +493 -47
- data/rdoc/RubyXL/Font.html +551 -71
- data/rdoc/RubyXL/FontConvenienceMethods.html +938 -183
- data/rdoc/RubyXL/FontScheme.html +487 -47
- data/rdoc/RubyXL/Fonts.html +540 -68
- data/rdoc/RubyXL/Formula.html +487 -47
- data/rdoc/RubyXL/FunctionGroup.html +487 -47
- data/rdoc/RubyXL/FunctionGroups.html +487 -47
- data/rdoc/RubyXL/GenericStorageObject.html +671 -103
- data/rdoc/RubyXL/GradientFill.html +487 -47
- data/rdoc/RubyXL/HeaderFooterSettings.html +487 -47
- data/rdoc/RubyXL/Hyperlink.html +487 -47
- data/rdoc/RubyXL/HyperlinkRelFile.html +503 -49
- data/rdoc/RubyXL/Hyperlinks.html +487 -47
- data/rdoc/RubyXL/IconFilter.html +487 -47
- data/rdoc/RubyXL/IconSet.html +487 -47
- data/rdoc/RubyXL/IgnoredError.html +487 -47
- data/rdoc/RubyXL/IgnoredErrors.html +487 -47
- data/rdoc/RubyXL/IndexedColors.html +487 -47
- data/rdoc/RubyXL/InputCells.html +487 -47
- data/rdoc/RubyXL/IntegerNode.html +493 -47
- data/rdoc/RubyXL/IntegerValue.html +493 -47
- data/rdoc/RubyXL/LegacyCell.html +534 -65
- data/rdoc/RubyXL/LegacyWorksheet.html +727 -114
- data/rdoc/RubyXL/MRUColors.html +487 -47
- data/rdoc/RubyXL/MacrosFile.html +510 -50
- data/rdoc/RubyXL/MergedCell.html +487 -47
- data/rdoc/RubyXL/MergedCells.html +487 -47
- data/rdoc/RubyXL/NumFmt.html +487 -47
- data/rdoc/RubyXL/NumberFormat.html +540 -68
- data/rdoc/RubyXL/NumberFormats.html +551 -71
- data/rdoc/RubyXL/OLEObject.html +487 -47
- data/rdoc/RubyXL/OLEObjectFile.html +510 -50
- data/rdoc/RubyXL/OLEObjects.html +487 -47
- data/rdoc/RubyXL/OLESize.html +487 -47
- data/rdoc/RubyXL/OOXMLContainerObject.html +756 -137
- data/rdoc/RubyXL/OOXMLIgnored.html +598 -80
- data/rdoc/RubyXL/OOXMLObject.html +506 -52
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +741 -151
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +834 -169
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +894 -170
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +735 -131
- data/rdoc/RubyXL/OdbcOleDbProperties.html +487 -47
- data/rdoc/RubyXL/Offset.html +487 -47
- data/rdoc/RubyXL/OlapProperties.html +487 -47
- data/rdoc/RubyXL/OleItem.html +487 -47
- data/rdoc/RubyXL/OleItems.html +487 -47
- data/rdoc/RubyXL/OleLink.html +487 -47
- data/rdoc/RubyXL/OutlineProperties.html +487 -47
- data/rdoc/RubyXL/PageMargins.html +487 -47
- data/rdoc/RubyXL/PageSetup.html +487 -47
- data/rdoc/RubyXL/PageSetupProperties.html +487 -47
- data/rdoc/RubyXL/Pane.html +487 -47
- data/rdoc/RubyXL/Parser.html +578 -78
- data/rdoc/RubyXL/PatternFill.html +487 -47
- data/rdoc/RubyXL/PersonMetadata.html +568 -0
- data/rdoc/RubyXL/PhoneticProperties.html +487 -47
- data/rdoc/RubyXL/PhoneticRun.html +487 -47
- data/rdoc/RubyXL/PivotArea.html +487 -47
- data/rdoc/RubyXL/PivotCache.html +487 -47
- data/rdoc/RubyXL/PivotCacheDefinitionFile.html +529 -55
- data/rdoc/RubyXL/PivotCacheRecordsFile.html +510 -50
- data/rdoc/RubyXL/PivotCaches.html +487 -47
- data/rdoc/RubyXL/PivotReference.html +487 -47
- data/rdoc/RubyXL/PivotReferences.html +487 -47
- data/rdoc/RubyXL/PivotTableFile.html +529 -55
- data/rdoc/RubyXL/PivotTableSelection.html +487 -47
- data/rdoc/RubyXL/PresetGeometry.html +487 -47
- data/rdoc/RubyXL/PrintOptions.html +487 -47
- data/rdoc/RubyXL/PrinterSettingsFile.html +510 -50
- data/rdoc/RubyXL/ProtectedRange.html +487 -47
- data/rdoc/RubyXL/ProtectedRanges.html +487 -47
- data/rdoc/RubyXL/Protection.html +487 -47
- data/rdoc/RubyXL/QueryParameter.html +487 -47
- data/rdoc/RubyXL/QueryParameters.html +487 -47
- data/rdoc/RubyXL/QueryTable.html +575 -75
- data/rdoc/RubyXL/QueryTableDeletedField.html +487 -47
- data/rdoc/RubyXL/QueryTableDeletedFields.html +487 -47
- data/rdoc/RubyXL/QueryTableField.html +487 -47
- data/rdoc/RubyXL/QueryTableFields.html +487 -47
- data/rdoc/RubyXL/QueryTableRefresh.html +487 -47
- data/rdoc/RubyXL/RID.html +493 -47
- data/rdoc/RubyXL/RawOOXML.html +605 -85
- data/rdoc/RubyXL/Reference.html +1109 -207
- data/rdoc/RubyXL/Relationship.html +493 -47
- data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +540 -65
- data/rdoc/RubyXL/RelationshipSupport.html +745 -126
- data/rdoc/RubyXL/RevisionPointer.html +487 -47
- data/rdoc/RubyXL/RichText.html +542 -70
- data/rdoc/RubyXL/RichTextRun.html +540 -68
- data/rdoc/RubyXL/Row.html +812 -148
- data/rdoc/RubyXL/RowExt.html +487 -47
- data/rdoc/RubyXL/RunProperties.html +487 -47
- data/rdoc/RubyXL/Scenario.html +487 -47
- data/rdoc/RubyXL/Scenarios.html +487 -47
- data/rdoc/RubyXL/Selection.html +540 -68
- data/rdoc/RubyXL/ShapeGuide.html +487 -47
- data/rdoc/RubyXL/ShapeTextRectangle.html +487 -47
- data/rdoc/RubyXL/SharedStringsTable.html +775 -137
- data/rdoc/RubyXL/Sheet.html +487 -47
- data/rdoc/RubyXL/SheetCalculationProperties.html +487 -47
- data/rdoc/RubyXL/SheetData.html +572 -78
- data/rdoc/RubyXL/SheetDataExt.html +487 -47
- data/rdoc/RubyXL/SheetDataSet.html +487 -47
- data/rdoc/RubyXL/SheetMetadata.html +510 -50
- data/rdoc/RubyXL/SheetName.html +487 -47
- data/rdoc/RubyXL/SheetNames.html +487 -47
- data/rdoc/RubyXL/Sheets.html +487 -47
- data/rdoc/RubyXL/SlicerCacheFile.html +510 -50
- data/rdoc/RubyXL/SlicerFile.html +510 -50
- data/rdoc/RubyXL/SmartTagProperties.html +487 -47
- data/rdoc/RubyXL/SmartTagType.html +487 -47
- data/rdoc/RubyXL/SmartTagTypes.html +487 -47
- data/rdoc/RubyXL/SmartTags.html +487 -47
- data/rdoc/RubyXL/SortCondition.html +487 -47
- data/rdoc/RubyXL/SortState.html +487 -47
- data/rdoc/RubyXL/Sqref.html +599 -81
- data/rdoc/RubyXL/Stop.html +487 -47
- data/rdoc/RubyXL/StringNode.html +493 -47
- data/rdoc/RubyXL/StringNodeW3C.html +598 -80
- data/rdoc/RubyXL/StringValue.html +493 -47
- data/rdoc/RubyXL/Stylesheet.html +707 -114
- data/rdoc/RubyXL/TableFile.html +510 -50
- data/rdoc/RubyXL/TableParts.html +493 -47
- data/rdoc/RubyXL/TableStyle.html +487 -47
- data/rdoc/RubyXL/TableStyles.html +487 -47
- data/rdoc/RubyXL/Text.html +591 -83
- data/rdoc/RubyXL/TextImportSettings.html +487 -47
- data/rdoc/RubyXL/Theme.html +651 -103
- data/rdoc/RubyXL/ThemeElements.html +487 -47
- data/rdoc/RubyXL/ThumbnailFile.html +510 -50
- data/rdoc/RubyXL/Top10.html +487 -47
- data/rdoc/RubyXL/VMLDrawingFile.html +530 -56
- data/rdoc/RubyXL/Variant.html +487 -47
- data/rdoc/RubyXL/Vector.html +540 -68
- data/rdoc/RubyXL/VectorValue.html +493 -47
- data/rdoc/RubyXL/VisualProperties.html +487 -47
- data/rdoc/RubyXL/WebPublishObject.html +487 -47
- data/rdoc/RubyXL/WebPublishObjects.html +487 -47
- data/rdoc/RubyXL/WebPublishingItem.html +487 -47
- data/rdoc/RubyXL/WebPublishingItems.html +487 -47
- data/rdoc/RubyXL/WebPublishingProperties.html +487 -47
- data/rdoc/RubyXL/WebQueryProperties.html +487 -47
- data/rdoc/RubyXL/Workbook.html +1560 -367
- data/rdoc/RubyXL/WorkbookConvenienceMethods.html +1069 -226
- data/rdoc/RubyXL/WorkbookProperties.html +487 -47
- data/rdoc/RubyXL/WorkbookProtection.html +487 -47
- data/rdoc/RubyXL/WorkbookRoot.html +741 -123
- data/rdoc/RubyXL/WorkbookView.html +487 -47
- data/rdoc/RubyXL/WorkbookViews.html +487 -47
- data/rdoc/RubyXL/Worksheet.html +840 -154
- data/rdoc/RubyXL/WorksheetConvenienceMethods.html +2725 -699
- data/rdoc/RubyXL/WorksheetDimensions.html +487 -47
- data/rdoc/RubyXL/WorksheetFormatProperties.html +493 -47
- data/rdoc/RubyXL/WorksheetProperties.html +487 -47
- data/rdoc/RubyXL/WorksheetProtection.html +487 -47
- data/rdoc/RubyXL/WorksheetView.html +487 -47
- data/rdoc/RubyXL/WorksheetViews.html +487 -47
- data/rdoc/RubyXL/XF.html +487 -47
- data/rdoc/RubyXL.html +1200 -163
- data/rdoc/created.rid +38 -38
- data/rdoc/css/rdoc.css +1670 -354
- data/rdoc/index.html +418 -433
- data/rdoc/js/aliki.js +511 -0
- data/rdoc/js/bash_highlighter.js +167 -0
- data/rdoc/js/c_highlighter.js +299 -0
- data/rdoc/js/{search.js → search_controller.js} +31 -12
- data/rdoc/js/search_data.js +1 -0
- data/rdoc/js/{navigation.js → search_navigation.js} +10 -10
- data/rdoc/js/search_ranker.js +239 -0
- data/rdoc/js/theme-toggle.js +112 -0
- data/rubyXL.gemspec +27 -70
- data/spec/lib/cell_spec.rb +56 -4
- data/spec/lib/color_spec.rb +7 -0
- data/spec/lib/parser_spec.rb +8 -5
- data/spec/lib/reference_spec.rb +69 -6
- data/spec/lib/rgb_color_spec.rb +2 -0
- data/spec/lib/stylesheet_spec.rb +2 -0
- data/spec/lib/text_spec.rb +3 -1
- data/spec/lib/workbook_spec.rb +6 -4
- data/spec/lib/worksheet_spec.rb +29 -17
- metadata +31 -47
- data/Gemfile.lock +0 -124
- data/rdoc/css/fonts.css +0 -167
- data/rdoc/fonts/Lato-Light.ttf +0 -0
- data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
- data/rdoc/fonts/Lato-Regular.ttf +0 -0
- data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/rdoc/images/add.png +0 -0
- data/rdoc/images/arrow_up.png +0 -0
- data/rdoc/images/brick.png +0 -0
- data/rdoc/images/brick_link.png +0 -0
- data/rdoc/images/bug.png +0 -0
- data/rdoc/images/bullet_black.png +0 -0
- data/rdoc/images/bullet_toggle_minus.png +0 -0
- data/rdoc/images/bullet_toggle_plus.png +0 -0
- data/rdoc/images/date.png +0 -0
- data/rdoc/images/delete.png +0 -0
- data/rdoc/images/find.png +0 -0
- data/rdoc/images/loadingAnimation.gif +0 -0
- data/rdoc/images/macFFBgHack.png +0 -0
- data/rdoc/images/package.png +0 -0
- data/rdoc/images/page_green.png +0 -0
- data/rdoc/images/page_white_text.png +0 -0
- data/rdoc/images/page_white_width.png +0 -0
- data/rdoc/images/plugin.png +0 -0
- data/rdoc/images/ruby.png +0 -0
- data/rdoc/images/tag_blue.png +0 -0
- data/rdoc/images/tag_green.png +0 -0
- data/rdoc/images/transparent.png +0 -0
- data/rdoc/images/wrench.png +0 -0
- data/rdoc/images/wrench_orange.png +0 -0
- data/rdoc/images/zoom.png +0 -0
- data/rdoc/js/darkfish.js +0 -84
- data/rdoc/js/navigation.js.gz +0 -0
- data/rdoc/js/search_index.js +0 -1
- data/rdoc/js/search_index.js.gz +0 -0
- data/rdoc/js/searcher.js +0 -229
- data/rdoc/js/searcher.js.gz +0 -0
- data/rdoc/table_of_contents.html +0 -3010
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
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
|
-
|
|
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.
|
|
27
|
-
case
|
|
26
|
+
switch(e.key) {
|
|
27
|
+
case 'ArrowLeft':
|
|
28
28
|
if (this.moveLeft()) e.preventDefault();
|
|
29
29
|
break;
|
|
30
|
-
case
|
|
31
|
-
if (e.
|
|
30
|
+
case 'ArrowUp':
|
|
31
|
+
if (e.key == 'ArrowUp' || e.ctrlKey) {
|
|
32
32
|
if (this.moveUp()) e.preventDefault();
|
|
33
33
|
}
|
|
34
34
|
break;
|
|
35
|
-
case
|
|
35
|
+
case 'ArrowRight':
|
|
36
36
|
if (this.moveRight()) e.preventDefault();
|
|
37
37
|
break;
|
|
38
|
-
case
|
|
39
|
-
if (e.
|
|
38
|
+
case 'ArrowDown':
|
|
39
|
+
if (e.key == 'ArrowDown' || e.ctrlKey) {
|
|
40
40
|
if (this.moveDown()) e.preventDefault();
|
|
41
41
|
}
|
|
42
42
|
break;
|
|
43
|
-
case
|
|
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.
|
|
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.
|
|
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 = "
|
|
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/
|
|
493
|
-
"rdoc/js/
|
|
494
|
-
"rdoc/js/
|
|
495
|
-
"rdoc/js/
|
|
496
|
-
"rdoc/js/
|
|
497
|
-
"rdoc/js/
|
|
498
|
-
"rdoc/js/
|
|
499
|
-
"rdoc/js/
|
|
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.
|
|
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
|
-
|
|
523
|
-
s.specification_version = 4
|
|
524
|
-
end
|
|
492
|
+
s.specification_version = 4
|
|
525
493
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
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
|
|
data/spec/lib/cell_spec.rb
CHANGED
|
@@ -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
|
-
|
|
12
|
-
|
|
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
|
data/spec/lib/color_spec.rb
CHANGED
|
@@ -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
|