rubyXL 3.1.2 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +7 -0
  2. data/VERSION +1 -1
  3. data/lib/rubyXL/cell.rb +1 -1
  4. data/lib/rubyXL/objects/calculation_chain.rb +1 -1
  5. data/lib/rubyXL/objects/chartsheet.rb +1 -2
  6. data/lib/rubyXL/objects/column_range.rb +1 -1
  7. data/lib/rubyXL/objects/comments.rb +1 -1
  8. data/lib/rubyXL/objects/content_types.rb +41 -26
  9. data/lib/rubyXL/objects/document_properties.rb +21 -11
  10. data/lib/rubyXL/objects/filters.rb +2 -2
  11. data/lib/rubyXL/objects/font.rb +1 -1
  12. data/lib/rubyXL/objects/ooxml_object.rb +22 -18
  13. data/lib/rubyXL/objects/reference.rb +3 -3
  14. data/lib/rubyXL/objects/relationships.rb +34 -70
  15. data/lib/rubyXL/objects/root.rb +7 -8
  16. data/lib/rubyXL/objects/shared_strings.rb +4 -4
  17. data/lib/rubyXL/objects/sheet_data.rb +2 -2
  18. data/lib/rubyXL/objects/simple_types.rb +2 -2
  19. data/lib/rubyXL/objects/storage.rb +9 -10
  20. data/lib/rubyXL/objects/stylesheet.rb +3 -3
  21. data/lib/rubyXL/objects/theme.rb +2 -2
  22. data/lib/rubyXL/objects/workbook.rb +2 -4
  23. data/lib/rubyXL/objects/worksheet.rb +6 -6
  24. data/lib/rubyXL/workbook.rb +4 -4
  25. data/lib/rubyXL/worksheet.rb +8 -8
  26. data/rdoc/README_rdoc.html +28 -28
  27. data/rdoc/RubyXL.html +1 -1
  28. data/rdoc/RubyXL/AExtension.html +1 -1
  29. data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
  30. data/rdoc/RubyXL/AdjustHandleList.html +1 -1
  31. data/rdoc/RubyXL/Alignment.html +1 -1
  32. data/rdoc/RubyXL/AlternateContent.html +1 -1
  33. data/rdoc/RubyXL/Authors.html +1 -1
  34. data/rdoc/RubyXL/AutoFilter.html +1 -1
  35. data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
  36. data/rdoc/RubyXL/BinaryImageFile.html +1 -1
  37. data/rdoc/RubyXL/BodyProperties.html +1 -1
  38. data/rdoc/RubyXL/BooleanNode.html +1 -1
  39. data/rdoc/RubyXL/BooleanValue.html +1 -1
  40. data/rdoc/RubyXL/Border.html +1 -1
  41. data/rdoc/RubyXL/BorderEdge.html +1 -1
  42. data/rdoc/RubyXL/Borders.html +1 -1
  43. data/rdoc/RubyXL/Break.html +1 -1
  44. data/rdoc/RubyXL/BreakList.html +1 -1
  45. data/rdoc/RubyXL/CT_AdjPoint2D.html +1 -1
  46. data/rdoc/RubyXL/CT_AlphaBiLevelEffect.html +1 -1
  47. data/rdoc/RubyXL/CT_AlphaModulateEffect.html +1 -1
  48. data/rdoc/RubyXL/CT_AlphaModulateFixedEffect.html +1 -1
  49. data/rdoc/RubyXL/CT_AlphaOutsetEffect.html +1 -1
  50. data/rdoc/RubyXL/CT_AlphaReplaceEffect.html +1 -1
  51. data/rdoc/RubyXL/CT_Backdrop.html +1 -1
  52. data/rdoc/RubyXL/CT_Bevel.html +1 -1
  53. data/rdoc/RubyXL/CT_BiLevelEffect.html +1 -1
  54. data/rdoc/RubyXL/CT_BlendEffect.html +1 -1
  55. data/rdoc/RubyXL/CT_Blip.html +1 -1
  56. data/rdoc/RubyXL/CT_BlipFillProperties.html +1 -1
  57. data/rdoc/RubyXL/CT_BlurEffect.html +1 -1
  58. data/rdoc/RubyXL/CT_Camera.html +1 -1
  59. data/rdoc/RubyXL/CT_Color.html +1 -1
  60. data/rdoc/RubyXL/CT_ColorChangeEffect.html +1 -1
  61. data/rdoc/RubyXL/CT_ColorMapping.html +1 -1
  62. data/rdoc/RubyXL/CT_ColorScheme.html +1 -1
  63. data/rdoc/RubyXL/CT_ColorSchemeAndMapping.html +1 -1
  64. data/rdoc/RubyXL/CT_ConnectionSite.html +1 -1
  65. data/rdoc/RubyXL/CT_ConnectionSiteList.html +1 -1
  66. data/rdoc/RubyXL/CT_DashStop.html +1 -1
  67. data/rdoc/RubyXL/CT_DashStopList.html +1 -1
  68. data/rdoc/RubyXL/CT_DefaultShapeDefinition.html +1 -1
  69. data/rdoc/RubyXL/CT_DuotoneEffect.html +1 -1
  70. data/rdoc/RubyXL/CT_EffectContainer.html +1 -1
  71. data/rdoc/RubyXL/CT_EffectList.html +1 -1
  72. data/rdoc/RubyXL/CT_EffectReference.html +1 -1
  73. data/rdoc/RubyXL/CT_EffectStyleItem.html +1 -1
  74. data/rdoc/RubyXL/CT_EffectStyleList.html +1 -1
  75. data/rdoc/RubyXL/CT_EmbeddedWAVAudioFile.html +1 -1
  76. data/rdoc/RubyXL/CT_FillEffect.html +1 -1
  77. data/rdoc/RubyXL/CT_FillOverlayEffect.html +1 -1
  78. data/rdoc/RubyXL/CT_FillStyleList.html +1 -1
  79. data/rdoc/RubyXL/CT_FlatText.html +1 -1
  80. data/rdoc/RubyXL/CT_FontCollection.html +1 -1
  81. data/rdoc/RubyXL/CT_FontReference.html +1 -1
  82. data/rdoc/RubyXL/CT_GeomGuideList.html +1 -1
  83. data/rdoc/RubyXL/CT_GlowEffect.html +1 -1
  84. data/rdoc/RubyXL/CT_GradientFillProperties.html +1 -1
  85. data/rdoc/RubyXL/CT_GradientStop.html +1 -1
  86. data/rdoc/RubyXL/CT_GradientStopList.html +1 -1
  87. data/rdoc/RubyXL/CT_HSLEffect.html +1 -1
  88. data/rdoc/RubyXL/CT_HslColor.html +1 -1
  89. data/rdoc/RubyXL/CT_Hyperlink.html +1 -1
  90. data/rdoc/RubyXL/CT_InnerShadowEffect.html +1 -1
  91. data/rdoc/RubyXL/CT_LightRig.html +1 -1
  92. data/rdoc/RubyXL/CT_LineEndProperties.html +1 -1
  93. data/rdoc/RubyXL/CT_LineJoinMiterProperties.html +1 -1
  94. data/rdoc/RubyXL/CT_LineProperties.html +1 -1
  95. data/rdoc/RubyXL/CT_LineStyleList.html +1 -1
  96. data/rdoc/RubyXL/CT_LinearShadeProperties.html +1 -1
  97. data/rdoc/RubyXL/CT_LuminanceEffect.html +1 -1
  98. data/rdoc/RubyXL/CT_ObjectStyleDefaults.html +1 -1
  99. data/rdoc/RubyXL/CT_OuterShadowEffect.html +1 -1
  100. data/rdoc/RubyXL/CT_Path2D.html +1 -1
  101. data/rdoc/RubyXL/CT_Path2DArcTo.html +1 -1
  102. data/rdoc/RubyXL/CT_Path2DCubicBezierTo.html +1 -1
  103. data/rdoc/RubyXL/CT_Path2DList.html +1 -1
  104. data/rdoc/RubyXL/CT_Path2DQuadBezierTo.html +1 -1
  105. data/rdoc/RubyXL/CT_Path2DTo.html +1 -1
  106. data/rdoc/RubyXL/CT_PathShadeProperties.html +1 -1
  107. data/rdoc/RubyXL/CT_PatternFillProperties.html +1 -1
  108. data/rdoc/RubyXL/CT_Point3D.html +1 -1
  109. data/rdoc/RubyXL/CT_PolarAdjustHandle.html +1 -1
  110. data/rdoc/RubyXL/CT_PresetColor.html +1 -1
  111. data/rdoc/RubyXL/CT_PresetLineDashProperties.html +1 -1
  112. data/rdoc/RubyXL/CT_PresetShadowEffect.html +1 -1
  113. data/rdoc/RubyXL/CT_PresetTextShape.html +1 -1
  114. data/rdoc/RubyXL/CT_ReflectionEffect.html +1 -1
  115. data/rdoc/RubyXL/CT_RelativeOffsetEffect.html +1 -1
  116. data/rdoc/RubyXL/CT_RelativeRect.html +1 -1
  117. data/rdoc/RubyXL/CT_SRgbColor.html +1 -1
  118. data/rdoc/RubyXL/CT_ScRgbColor.html +1 -1
  119. data/rdoc/RubyXL/CT_Scene3D.html +1 -1
  120. data/rdoc/RubyXL/CT_SchemeColor.html +1 -1
  121. data/rdoc/RubyXL/CT_Shape3D.html +1 -1
  122. data/rdoc/RubyXL/CT_ShapeStyle.html +1 -1
  123. data/rdoc/RubyXL/CT_SoftEdgesEffect.html +1 -1
  124. data/rdoc/RubyXL/CT_SphereCoords.html +1 -1
  125. data/rdoc/RubyXL/CT_StretchInfoProperties.html +1 -1
  126. data/rdoc/RubyXL/CT_StyleMatrix.html +1 -1
  127. data/rdoc/RubyXL/CT_StyleMatrixReference.html +1 -1
  128. data/rdoc/RubyXL/CT_SupplementalFont.html +1 -1
  129. data/rdoc/RubyXL/CT_SystemColor.html +1 -1
  130. data/rdoc/RubyXL/CT_TextAutonumberBullet.html +1 -1
  131. data/rdoc/RubyXL/CT_TextBlipBullet.html +1 -1
  132. data/rdoc/RubyXL/CT_TextCharBullet.html +1 -1
  133. data/rdoc/RubyXL/CT_TextCharacterProperties.html +1 -1
  134. data/rdoc/RubyXL/CT_TextFont.html +1 -1
  135. data/rdoc/RubyXL/CT_TextListStyle.html +1 -1
  136. data/rdoc/RubyXL/CT_TextNormalAutofit.html +1 -1
  137. data/rdoc/RubyXL/CT_TextParagraphProperties.html +1 -1
  138. data/rdoc/RubyXL/CT_TextSpacing.html +1 -1
  139. data/rdoc/RubyXL/CT_TextTabStop.html +1 -1
  140. data/rdoc/RubyXL/CT_TextTabStopList.html +1 -1
  141. data/rdoc/RubyXL/CT_TileInfoProperties.html +1 -1
  142. data/rdoc/RubyXL/CT_TintEffect.html +1 -1
  143. data/rdoc/RubyXL/CT_Transform2D.html +1 -1
  144. data/rdoc/RubyXL/CT_TransformEffect.html +1 -1
  145. data/rdoc/RubyXL/CT_Vector3D.html +1 -1
  146. data/rdoc/RubyXL/CT_XYAdjustHandle.html +1 -1
  147. data/rdoc/RubyXL/CalculationChain.html +2 -2
  148. data/rdoc/RubyXL/CalculationChainCell.html +1 -1
  149. data/rdoc/RubyXL/CalculationProperties.html +1 -1
  150. data/rdoc/RubyXL/Cell.html +2 -2
  151. data/rdoc/RubyXL/CellSmartTag.html +1 -1
  152. data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
  153. data/rdoc/RubyXL/CellSmartTags.html +1 -1
  154. data/rdoc/RubyXL/CellStyle.html +1 -1
  155. data/rdoc/RubyXL/CellStyleXFs.html +1 -1
  156. data/rdoc/RubyXL/CellStyles.html +1 -1
  157. data/rdoc/RubyXL/CellValue.html +2 -2
  158. data/rdoc/RubyXL/CellWatch.html +1 -1
  159. data/rdoc/RubyXL/CellWatches.html +1 -1
  160. data/rdoc/RubyXL/CellXFs.html +1 -1
  161. data/rdoc/RubyXL/ChartColorsFile.html +1 -1
  162. data/rdoc/RubyXL/ChartFile.html +1 -1
  163. data/rdoc/RubyXL/ChartStyleFile.html +1 -1
  164. data/rdoc/RubyXL/ChartUserShapesFile.html +1 -1
  165. data/rdoc/RubyXL/Chartsheet.html +1 -1
  166. data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
  167. data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
  168. data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
  169. data/rdoc/RubyXL/ChartsheetView.html +1 -1
  170. data/rdoc/RubyXL/ChartsheetViews.html +1 -1
  171. data/rdoc/RubyXL/Color.html +3 -3
  172. data/rdoc/RubyXL/ColorFilter.html +1 -1
  173. data/rdoc/RubyXL/ColorScale.html +1 -1
  174. data/rdoc/RubyXL/ColorSet.html +1 -1
  175. data/rdoc/RubyXL/Colors.html +1 -1
  176. data/rdoc/RubyXL/ColumnRange.html +1 -1
  177. data/rdoc/RubyXL/ColumnRanges.html +2 -2
  178. data/rdoc/RubyXL/Comment.html +1 -1
  179. data/rdoc/RubyXL/CommentList.html +1 -1
  180. data/rdoc/RubyXL/CommentsFile.html +1 -1
  181. data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
  182. data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
  183. data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
  184. data/rdoc/RubyXL/ContentTypeDefault.html +1 -1
  185. data/rdoc/RubyXL/ContentTypeOverride.html +1 -1
  186. data/rdoc/RubyXL/ContentTypes.html +42 -76
  187. data/rdoc/RubyXL/ControlPropertiesFile.html +1 -1
  188. data/rdoc/RubyXL/CorePropertiesFile.html +1 -1
  189. data/rdoc/RubyXL/CustomColor.html +1 -1
  190. data/rdoc/RubyXL/CustomColorList.html +1 -1
  191. data/rdoc/RubyXL/CustomFilter.html +1 -1
  192. data/rdoc/RubyXL/CustomFilters.html +1 -1
  193. data/rdoc/RubyXL/CustomGeometry.html +1 -1
  194. data/rdoc/RubyXL/CustomProperties.html +1 -1
  195. data/rdoc/RubyXL/CustomPropertiesFile.html +1 -1
  196. data/rdoc/RubyXL/CustomProperty.html +1 -1
  197. data/rdoc/RubyXL/CustomSheetView.html +1 -1
  198. data/rdoc/RubyXL/CustomSheetViews.html +1 -1
  199. data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
  200. data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
  201. data/rdoc/RubyXL/CustomXMLFile.html +1 -1
  202. data/rdoc/RubyXL/DXF.html +1 -1
  203. data/rdoc/RubyXL/DXFs.html +1 -1
  204. data/rdoc/RubyXL/DataBar.html +1 -1
  205. data/rdoc/RubyXL/DataConsolidate.html +1 -1
  206. data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
  207. data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
  208. data/rdoc/RubyXL/DataType.html +1 -1
  209. data/rdoc/RubyXL/DataValidation.html +1 -1
  210. data/rdoc/RubyXL/DataValidations.html +1 -1
  211. data/rdoc/RubyXL/DateGroupItem.html +1 -1
  212. data/rdoc/RubyXL/DefinedName.html +1 -1
  213. data/rdoc/RubyXL/DefinedNames.html +1 -1
  214. data/rdoc/RubyXL/DocumentPropertiesFile.html +21 -46
  215. data/rdoc/RubyXL/DrawingFile.html +2 -7
  216. data/rdoc/RubyXL/DynamicFilter.html +1 -1
  217. data/rdoc/RubyXL/EmbeddedControl.html +1 -1
  218. data/rdoc/RubyXL/EmbeddedControls.html +1 -1
  219. data/rdoc/RubyXL/Extension.html +1 -1
  220. data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
  221. data/rdoc/RubyXL/Extents.html +1 -1
  222. data/rdoc/RubyXL/ExternalLinksFile.html +1 -1
  223. data/rdoc/RubyXL/ExternalReference.html +1 -1
  224. data/rdoc/RubyXL/ExternalReferences.html +1 -1
  225. data/rdoc/RubyXL/ExtraColorSchemeList.html +1 -1
  226. data/rdoc/RubyXL/FieldItem.html +1 -1
  227. data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
  228. data/rdoc/RubyXL/FileSharing.html +1 -1
  229. data/rdoc/RubyXL/FileVersion.html +1 -1
  230. data/rdoc/RubyXL/Fill.html +1 -1
  231. data/rdoc/RubyXL/Fills.html +1 -1
  232. data/rdoc/RubyXL/FilterContainer.html +1 -1
  233. data/rdoc/RubyXL/FloatNode.html +1 -1
  234. data/rdoc/RubyXL/FloatValue.html +1 -1
  235. data/rdoc/RubyXL/Font.html +3 -3
  236. data/rdoc/RubyXL/FontScheme.html +1 -1
  237. data/rdoc/RubyXL/Fonts.html +1 -1
  238. data/rdoc/RubyXL/Formula.html +1 -1
  239. data/rdoc/RubyXL/FunctionGroup.html +1 -1
  240. data/rdoc/RubyXL/FunctionGroups.html +1 -1
  241. data/rdoc/RubyXL/GenericStorageObject.html +10 -24
  242. data/rdoc/RubyXL/GradientFill.html +1 -1
  243. data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
  244. data/rdoc/RubyXL/Hyperlink.html +1 -1
  245. data/rdoc/RubyXL/HyperlinkRelFile.html +1 -1
  246. data/rdoc/RubyXL/Hyperlinks.html +1 -1
  247. data/rdoc/RubyXL/IconFilter.html +1 -1
  248. data/rdoc/RubyXL/IconSet.html +1 -1
  249. data/rdoc/RubyXL/IgnoredError.html +1 -1
  250. data/rdoc/RubyXL/IgnoredErrors.html +1 -1
  251. data/rdoc/RubyXL/IndexedColors.html +1 -1
  252. data/rdoc/RubyXL/InputCells.html +1 -1
  253. data/rdoc/RubyXL/IntegerNode.html +1 -1
  254. data/rdoc/RubyXL/IntegerValue.html +1 -1
  255. data/rdoc/RubyXL/LegacyCell.html +24 -24
  256. data/rdoc/RubyXL/LegacyWorkbook.html +10 -10
  257. data/rdoc/RubyXL/LegacyWorksheet.html +32 -32
  258. data/rdoc/RubyXL/MRUColors.html +1 -1
  259. data/rdoc/RubyXL/MacrosFile.html +1 -1
  260. data/rdoc/RubyXL/MergedCell.html +1 -1
  261. data/rdoc/RubyXL/MergedCells.html +1 -1
  262. data/rdoc/RubyXL/NumFmt.html +1 -1
  263. data/rdoc/RubyXL/NumberFormat.html +2 -2
  264. data/rdoc/RubyXL/NumberFormats.html +1 -1
  265. data/rdoc/RubyXL/OLEObject.html +1 -1
  266. data/rdoc/RubyXL/OLEObjects.html +1 -1
  267. data/rdoc/RubyXL/OLESize.html +1 -1
  268. data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
  269. data/rdoc/RubyXL/OOXMLObject.html +1 -1
  270. data/rdoc/RubyXL/OOXMLObjectClassMethods.html +18 -18
  271. data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
  272. data/rdoc/RubyXL/OOXMLRelationshipsFile.html +119 -23
  273. data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
  274. data/rdoc/RubyXL/Offset.html +1 -1
  275. data/rdoc/RubyXL/OutlineProperties.html +1 -1
  276. data/rdoc/RubyXL/PageMargins.html +1 -1
  277. data/rdoc/RubyXL/PageSetup.html +1 -1
  278. data/rdoc/RubyXL/PageSetupProperties.html +1 -1
  279. data/rdoc/RubyXL/Pane.html +1 -1
  280. data/rdoc/RubyXL/Parser.html +1 -1
  281. data/rdoc/RubyXL/PatternFill.html +1 -1
  282. data/rdoc/RubyXL/PhoneticProperties.html +1 -1
  283. data/rdoc/RubyXL/PhoneticRun.html +1 -1
  284. data/rdoc/RubyXL/PivotArea.html +1 -1
  285. data/rdoc/RubyXL/PivotCache.html +1 -1
  286. data/rdoc/RubyXL/PivotCacheDefinitionFile.html +1 -1
  287. data/rdoc/RubyXL/PivotCaches.html +1 -1
  288. data/rdoc/RubyXL/PivotReference.html +1 -1
  289. data/rdoc/RubyXL/PivotReferences.html +1 -1
  290. data/rdoc/RubyXL/PivotTableFile.html +1 -1
  291. data/rdoc/RubyXL/PivotTableSelection.html +1 -1
  292. data/rdoc/RubyXL/PresetGeometry.html +1 -1
  293. data/rdoc/RubyXL/PrintOptions.html +1 -1
  294. data/rdoc/RubyXL/PrinterSettingsFile.html +6 -1
  295. data/rdoc/RubyXL/ProtectedRange.html +1 -1
  296. data/rdoc/RubyXL/ProtectedRanges.html +1 -1
  297. data/rdoc/RubyXL/Protection.html +1 -1
  298. data/rdoc/RubyXL/RID.html +1 -1
  299. data/rdoc/RubyXL/RawOOXML.html +1 -1
  300. data/rdoc/RubyXL/Reference.html +7 -7
  301. data/rdoc/RubyXL/Relationship.html +1 -1
  302. data/rdoc/RubyXL/RelationshipSupport.html +1 -1
  303. data/rdoc/RubyXL/RelationshipSupport/ClassMehods.html +1 -1
  304. data/rdoc/RubyXL/RichText.html +1 -1
  305. data/rdoc/RubyXL/RichTextRun.html +1 -1
  306. data/rdoc/RubyXL/Row.html +1 -1
  307. data/rdoc/RubyXL/RunProperties.html +1 -1
  308. data/rdoc/RubyXL/Scenario.html +1 -1
  309. data/rdoc/RubyXL/Scenarios.html +1 -1
  310. data/rdoc/RubyXL/Selection.html +1 -1
  311. data/rdoc/RubyXL/ShapeGuide.html +1 -1
  312. data/rdoc/RubyXL/ShapeTextRectangle.html +1 -1
  313. data/rdoc/RubyXL/SharedStringsTable.html +5 -5
  314. data/rdoc/RubyXL/Sheet.html +1 -1
  315. data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
  316. data/rdoc/RubyXL/SheetData.html +1 -1
  317. data/rdoc/RubyXL/Sheets.html +1 -1
  318. data/rdoc/RubyXL/SlicerCacheFile.html +1 -1
  319. data/rdoc/RubyXL/SlicerFile.html +1 -1
  320. data/rdoc/RubyXL/SmartTagProperties.html +1 -1
  321. data/rdoc/RubyXL/SmartTagType.html +1 -1
  322. data/rdoc/RubyXL/SmartTagTypes.html +1 -1
  323. data/rdoc/RubyXL/SmartTags.html +1 -1
  324. data/rdoc/RubyXL/SortCondition.html +1 -1
  325. data/rdoc/RubyXL/SortState.html +1 -1
  326. data/rdoc/RubyXL/Sqref.html +2 -2
  327. data/rdoc/RubyXL/Stop.html +1 -1
  328. data/rdoc/RubyXL/StringNode.html +1 -1
  329. data/rdoc/RubyXL/StringNodeW3C.html +1 -1
  330. data/rdoc/RubyXL/StringValue.html +1 -1
  331. data/rdoc/RubyXL/Stylesheet.html +1 -1
  332. data/rdoc/RubyXL/TableFile.html +1 -1
  333. data/rdoc/RubyXL/TableParts.html +1 -1
  334. data/rdoc/RubyXL/TableStyle.html +1 -1
  335. data/rdoc/RubyXL/TableStyles.html +1 -1
  336. data/rdoc/RubyXL/Text.html +2 -2
  337. data/rdoc/RubyXL/Theme.html +1 -1
  338. data/rdoc/RubyXL/ThemeElements.html +1 -1
  339. data/rdoc/RubyXL/ThumbnailFile.html +1 -1
  340. data/rdoc/RubyXL/Top10.html +1 -1
  341. data/rdoc/RubyXL/VMLDrawingFile.html +1 -1
  342. data/rdoc/RubyXL/Variant.html +1 -1
  343. data/rdoc/RubyXL/Vector.html +1 -1
  344. data/rdoc/RubyXL/VectorValue.html +1 -1
  345. data/rdoc/RubyXL/VisualProperties.html +1 -1
  346. data/rdoc/RubyXL/WebPublishObject.html +1 -1
  347. data/rdoc/RubyXL/WebPublishObjects.html +1 -1
  348. data/rdoc/RubyXL/WebPublishingItem.html +1 -1
  349. data/rdoc/RubyXL/WebPublishingItems.html +1 -1
  350. data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
  351. data/rdoc/RubyXL/Workbook.html +1 -1
  352. data/rdoc/RubyXL/WorkbookProperties.html +1 -1
  353. data/rdoc/RubyXL/WorkbookProtection.html +1 -1
  354. data/rdoc/RubyXL/WorkbookRoot.html +43 -25
  355. data/rdoc/RubyXL/WorkbookView.html +1 -1
  356. data/rdoc/RubyXL/WorkbookViews.html +1 -1
  357. data/rdoc/RubyXL/Worksheet.html +1 -1
  358. data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
  359. data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
  360. data/rdoc/RubyXL/WorksheetProperties.html +1 -1
  361. data/rdoc/RubyXL/WorksheetProtection.html +1 -1
  362. data/rdoc/RubyXL/WorksheetView.html +1 -1
  363. data/rdoc/RubyXL/WorksheetViews.html +1 -1
  364. data/rdoc/RubyXL/XF.html +1 -1
  365. data/rdoc/created.rid +37 -37
  366. data/rdoc/index.html +2 -2
  367. data/rdoc/js/search_index.js +1 -1
  368. data/rdoc/table_of_contents.html +68 -63
  369. data/rubyXL.gemspec +6 -11
  370. metadata +92 -86
  371. data/rdoc/RubyXL/ChartRelationshipsFile.html +0 -105
  372. data/rdoc/RubyXL/DrawingRelationshipsFile.html +0 -105
  373. data/rdoc/RubyXL/REL_CLASS.html +0 -105
  374. data/rdoc/RubyXL/RootRelationships.html +0 -105
  375. data/rdoc/RubyXL/SheetRelationshipsFile.html +0 -105
  376. data/rdoc/RubyXL/WorkbookRelationships.html +0 -105
@@ -13,8 +13,6 @@ module RubyXL
13
13
  attr_accessor :thumbnail, :core_properties, :document_properties, :custom_properties, :workbook
14
14
  attr_accessor :content_types, :rels_hash
15
15
 
16
- REL_CLASS = RubyXL::RootRelationships
17
-
18
16
  include RubyXL::RelationshipSupport
19
17
 
20
18
  define_relationship(RubyXL::ThumbnailFile, :thumbnail)
@@ -31,7 +29,7 @@ module RubyXL
31
29
  obj = self.new
32
30
  obj.document_properties = RubyXL::DocumentPropertiesFile.new
33
31
  obj.core_properties = RubyXL::CorePropertiesFile.new
34
- obj.relationship_container = RubyXL::RootRelationships.new
32
+ obj.relationship_container = RubyXL::OOXMLRelationshipsFile.new
35
33
  obj.content_types = RubyXL::ContentTypes.new
36
34
  obj
37
35
  end
@@ -40,10 +38,9 @@ module RubyXL
40
38
  stream = Zip::OutputStream.write_buffer { |zipstream|
41
39
  self.rels_hash = {}
42
40
  self.relationship_container.owner = self
43
- self.content_types.overrides = []
44
- self.content_types.owner = self
45
41
  collect_related_objects.compact.each { |obj|
46
42
  puts "<-- DEBUG: adding relationship to #{obj.class}" if @@debug
43
+ obj.root = self if obj.respond_to?(:root=)
47
44
  self.rels_hash[obj.class] ||= []
48
45
  self.rels_hash[obj.class] << obj
49
46
  }
@@ -51,9 +48,7 @@ module RubyXL
51
48
  self.rels_hash.keys.sort_by{ |c| c::SAVE_ORDER }.each { |klass|
52
49
  puts "<-- DEBUG: saving related #{klass} files" if @@debug
53
50
  self.rels_hash[klass].each { |obj|
54
- obj.workbook = workbook if obj.respond_to?(:workbook=)
55
51
  puts "<-- DEBUG: > #{obj.xlsx_path}" if @@debug
56
- self.content_types.add_override(obj)
57
52
  obj.add_to_zip(zipstream)
58
53
  }
59
54
  }
@@ -62,13 +57,17 @@ module RubyXL
62
57
  stream
63
58
  end
64
59
 
60
+ def xlsx_path
61
+ OOXMLTopLevelObject::ROOT
62
+ end
63
+
65
64
  def self.parse_file(xl_file_path, opts)
66
65
  begin
67
66
  ::Zip::File.open(xl_file_path) { |zip_file|
68
67
  root = self.new
69
68
  root.filepath = xl_file_path
70
69
  root.content_types = RubyXL::ContentTypes.parse_file(zip_file)
71
- root.load_relationships(zip_file)
70
+ root.load_relationships(zip_file, OOXMLTopLevelObject::ROOT)
72
71
  root.workbook.root = root
73
72
  root
74
73
  }
@@ -19,8 +19,8 @@ module RubyXL
19
19
 
20
20
  def initialize(*params)
21
21
  super
22
- # So far, going by the structure that the original creator had in mind. However,
23
- # since the actual implementation is now extracted into a separate class,
22
+ # So far, going by the structure that the original creator had in mind. However,
23
+ # since the actual implementation is now extracted into a separate class,
24
24
  # we will be able to transparrently change it later if needs be.
25
25
  @index_by_content = {}
26
26
  end
@@ -48,11 +48,11 @@ module RubyXL
48
48
  def get_index(str, add_if_missing = false)
49
49
  index = @index_by_content[str]
50
50
  index = add(str) if index.nil? && add_if_missing
51
- index
51
+ index
52
52
  end
53
53
 
54
54
  def xlsx_path
55
- File.join('xl', 'sharedStrings.xml')
55
+ ROOT.join('xl', 'sharedStrings.xml')
56
56
  end
57
57
 
58
58
  end
@@ -27,7 +27,7 @@ module RubyXL
27
27
  define_attribute(:vm, :int, :default => 0)
28
28
  define_attribute(:ph, :bool, :default => false)
29
29
  define_child_node(RubyXL::Formula, :accessor => :formula)
30
- define_child_node(RubyXL::CellValue, :accessor => :value_container)
30
+ define_child_node(RubyXL::CellValue, :accessor => :value_container)
31
31
  define_child_node(RubyXL::RichText) # is
32
32
  define_element_name 'c'
33
33
 
@@ -77,7 +77,7 @@ module RubyXL
77
77
  case datatype
78
78
  when RubyXL::DataType::SHARED_STRING then
79
79
  workbook.shared_strings_container[raw_value.to_i].to_s
80
- else
80
+ else
81
81
  if is_date? then workbook.num_to_date(raw_value.to_f)
82
82
  elsif raw_value.is_a?(String) && (raw_value =~ /\A-?\d+(\.\d+(?:e[+-]\d+)?)?\Z/i) # Numeric
83
83
  if $1 then raw_value.to_f
@@ -190,11 +190,11 @@ module RubyXL
190
190
  isometricOffAxis3Left isometricOffAxis3Right isometricOffAxis3Bottom
191
191
  isometricOffAxis4Left isometricOffAxis4Right isometricOffAxis4Bottom
192
192
  obliqueTopLeft obliqueTop obliqueTopRight obliqueLeft obliqueRight obliqueBottomLeft
193
- obliqueBottom obliqueBottomRight perspectiveFront perspectiveLeft perspectiveRight
193
+ obliqueBottom obliqueBottomRight perspectiveFront perspectiveLeft perspectiveRight
194
194
  perspectiveAbove perspectiveBelow perspectiveAboveLeftFacing perspectiveAboveRightFacing
195
195
  perspectiveContrastingLeftFacing perspectiveContrastingRightFacing
196
196
  perspectiveHeroicLeftFacing perspectiveHeroicRightFacing
197
- perspectiveHeroicExtremeLeftFacing perspectiveHeroicExtremeRightFacing
197
+ perspectiveHeroicExtremeLeftFacing perspectiveHeroicExtremeRightFacing
198
198
  perspectiveRelaxed perspectiveRelaxedModerately }
199
199
  ST_LightRigType = %w{ legacyFlat1 legacyFlat2 legacyFlat3 legacyFlat4 legacyNormal1 legacyNormal2
200
200
  legacyNormal3 legacyNormal4 legacyHarsh1 legacyHarsh2 legacyHarsh3 legacyHarsh4
@@ -3,18 +3,17 @@ module RubyXL
3
3
  class GenericStorageObject
4
4
  SAVE_ORDER = 0
5
5
 
6
- attr_accessor :xlsx_path, :data, :workbook, :generic_storage
6
+ attr_accessor :xlsx_path, :data, :generic_storage
7
7
 
8
- def initialize
9
- @workbook = nil
10
- @xlsx_path = nil
8
+ def initialize(file_path)
9
+ @xlsx_path = file_path
11
10
  @data = nil
12
11
  @generic_storage = []
13
12
  end
14
13
 
15
14
  def self.parse_file(dirpath, file_path = nil)
16
15
  file_path ||= self.xlsx_path
17
- obj = self.new
16
+ obj = self.new(file_path)
18
17
 
19
18
  case dirpath
20
19
  when String then
@@ -22,12 +21,12 @@ module RubyXL
22
21
  return nil unless File.exist?(full_path)
23
22
  obj.data = File.open(full_path, 'r') { |f| f.read }
24
23
  when Zip::File then
24
+ file_path = file_path.relative_path_from(::Pathname.new("/")) if file_path.absolute? # Zip doesn't like absolute paths.
25
25
  entry = dirpath.find_entry(file_path)
26
26
  return nil if entry.nil?
27
27
  obj.data = entry.get_input_stream { |f| f.read }
28
28
  end
29
29
 
30
- obj.xlsx_path = file_path
31
30
  obj
32
31
  end
33
32
 
@@ -41,13 +40,13 @@ module RubyXL
41
40
  end
42
41
 
43
42
  class PrinterSettingsFile < GenericStorageObject
43
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings'
44
44
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings'
45
45
  end
46
46
 
47
47
  class DrawingFile < GenericStorageObject
48
48
  CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawing+xml'
49
49
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing'
50
- REL_CLASS = RubyXL::DrawingRelationshipsFile
51
50
 
52
51
  include RubyXL::RelationshipSupport
53
52
 
@@ -64,7 +63,6 @@ module RubyXL
64
63
  class ChartFile < GenericStorageObject
65
64
  CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'
66
65
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart'
67
- REL_CLASS = RubyXL::ChartRelationshipsFile
68
66
 
69
67
  include RubyXL::RelationshipSupport
70
68
 
@@ -80,9 +78,9 @@ module RubyXL
80
78
  end
81
79
 
82
80
  class VMLDrawingFile < GenericStorageObject
81
+ CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.vmlDrawing'
83
82
  # CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'
84
83
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing'
85
-
86
84
  end
87
85
 
88
86
  class ChartColorsFile < GenericStorageObject
@@ -112,7 +110,7 @@ module RubyXL
112
110
  end
113
111
 
114
112
  class BinaryImageFile < GenericStorageObject
115
- # CONTENT_TYPE = 'image/jpeg'
113
+ CONTENT_TYPE = 'image/jpeg'
116
114
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image'
117
115
  end
118
116
 
@@ -122,6 +120,7 @@ module RubyXL
122
120
 
123
121
  class ThumbnailFile < GenericStorageObject
124
122
  REL_TYPE = 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail'
123
+ CONTENT_TYPE = 'image/x-wmf'
125
124
  end
126
125
 
127
126
  class ChartUserShapesFile < GenericStorageObject
@@ -81,7 +81,7 @@ module RubyXL
81
81
  define_element_name 'cellXfs'
82
82
 
83
83
  def self.defaults
84
- self.new(:_ => [
84
+ self.new(:_ => [
85
85
  RubyXL::XF.new(
86
86
  :num_fmt_id => 0, :font_id => 0, :fill_id => 0, :border_id => 0, :xfId => 0
87
87
  )
@@ -187,7 +187,7 @@ module RubyXL
187
187
  end
188
188
 
189
189
  def xlsx_path
190
- File.join('xl', 'styles.xml')
190
+ ROOT.join('xl', 'styles.xml')
191
191
  end
192
192
 
193
193
  def self.default
@@ -201,7 +201,7 @@ module RubyXL
201
201
 
202
202
  def get_number_format_by_id(format_id)
203
203
  @format_hash ||= {}
204
-
204
+
205
205
  if @format_hash[format_id].nil? then
206
206
  @format_hash[format_id] = NumberFormats::DEFAULT_NUMBER_FORMATS.find_by_format_id(format_id) ||
207
207
  (number_formats && number_formats.find_by_format_id(format_id))
@@ -1358,7 +1358,7 @@ module RubyXL
1358
1358
  define_child_node(RubyXL::CT_ColorSchemeAndMapping, :collection => [0..-1])
1359
1359
  define_element_name 'a:extraClrSchemeLst'
1360
1360
  end
1361
-
1361
+
1362
1362
  # http://www.schemacentral.com/sc/ooxml/e-a_custClr-1.html
1363
1363
  class CustomColor < OOXMLObject
1364
1364
  define_child_node(RubyXL::CT_ScRgbColor)
@@ -1394,7 +1394,7 @@ module RubyXL
1394
1394
  set_namespaces('http://schemas.openxmlformats.org/drawingml/2006/main' => 'a')
1395
1395
 
1396
1396
  def xlsx_path
1397
- File.join('xl', 'theme', 'theme1.xml')
1397
+ ROOT.join('xl', 'theme', 'theme1.xml')
1398
1398
  end
1399
1399
 
1400
1400
  def self.defaults
@@ -297,7 +297,6 @@ module RubyXL
297
297
  class Workbook < OOXMLTopLevelObject
298
298
  CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'
299
299
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument'
300
- REL_CLASS = RubyXL::WorkbookRelationships
301
300
 
302
301
  include RubyXL::RelationshipSupport
303
302
 
@@ -345,14 +344,13 @@ module RubyXL
345
344
  'http://schemas.openxmlformats.org/markup-compatibility/2006' => 'mc',
346
345
  'http://schemas.microsoft.com/office/spreadsheetml/2010/11/main' => 'x15')
347
346
 
348
- attr_accessor :root
349
347
  attr_accessor :calculation_chain, :theme, :stylesheet, :shared_strings_container, :worksheets
350
348
 
351
349
  def before_write_xml
352
350
  self.sheets = RubyXL::Sheets.new
353
351
 
354
352
  worksheets.each_with_index { |sheet, i|
355
- rel = relationship_container.find_by_target(sheet.xlsx_path.gsub(/\Axl\//, ''))
353
+ rel = relationship_container.find_by_target(sheet.xlsx_path)
356
354
  sheets << RubyXL::Sheet.new(:name => sheet.sheet_name[0..30], # Max sheet name length is 31 char
357
355
  :sheet_id => sheet.sheet_id || (i + 1),
358
356
  :state => sheet.state, :r_id => rel.id)
@@ -429,7 +427,7 @@ module RubyXL
429
427
  end
430
428
 
431
429
  def xlsx_path
432
- File.join('xl', 'workbook.xml')
430
+ ROOT.join('xl', 'workbook.xml')
433
431
  end
434
432
 
435
433
  include LegacyWorkbook
@@ -323,13 +323,13 @@ module RubyXL
323
323
  define_attribute(:shapeId, :int, :required => true)
324
324
  define_attribute(:'r:id', :string)
325
325
  define_element_name 'oleObject'
326
- end
326
+ end
327
327
 
328
328
  # http://www.schemacentral.com/sc/ooxml/e-ssml_oleObjects-1.html
329
329
  class OLEObjects < OOXMLContainerObject
330
330
  define_child_node(RubyXL::OLEObject, :collection => true)
331
331
  define_element_name 'oleObjects'
332
- end
332
+ end
333
333
 
334
334
  # http://www.schemacentral.com/sc/ooxml/e-ssml_dataRef-1.html
335
335
  class DataConsolidationReference < OOXMLObject
@@ -381,7 +381,7 @@ module RubyXL
381
381
  # But, things can be more complex:
382
382
  # <selection activeCell="E8" activeCellId="2" sqref="A4:B4 C6:D6 E8:F8"/>
383
383
  # Not using .reverse.each here to avoid memory reallocation.
384
- @sqref.each_with_index { |ref, ind| @active_cell_id = ind if ref.cover?(@active_cell) }
384
+ @sqref.each_with_index { |ref, ind| @active_cell_id = ind if ref.cover?(@active_cell) }
385
385
  end
386
386
  true
387
387
  end
@@ -611,7 +611,6 @@ module RubyXL
611
611
  class Worksheet < OOXMLTopLevelObject
612
612
  CONTENT_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'
613
613
  REL_TYPE = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet'
614
- REL_CLASS = RubyXL::SheetRelationshipsFile
615
614
 
616
615
  include RubyXL::RelationshipSupport
617
616
 
@@ -675,7 +674,7 @@ module RubyXL
675
674
  'http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac' => 'x14ac',
676
675
  'urn:schemas-microsoft-com:mac:vml' => 'mv')
677
676
 
678
- attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels, :comments, :printer_settings
677
+ attr_accessor :workbook, :state, :sheet_name, :sheet_id, :rels
679
678
 
680
679
  def before_write_xml # This method may need to be moved higher in the hierarchy
681
680
  first_nonempty_row = nil
@@ -723,8 +722,9 @@ module RubyXL
723
722
  end
724
723
 
725
724
  def xlsx_path
726
- File.join('xl', 'worksheets', "sheet#{file_index}.xml")
725
+ ROOT.join('xl', 'worksheets', "sheet#{file_index}.xml")
727
726
  end
727
+
728
728
  def self.parse(param)
729
729
  sheet_obj = super
730
730
  sheet_obj.sheet_data.rows.each { |r|
@@ -29,7 +29,7 @@ module RubyXL
29
29
  @theme = RubyXL::Theme.defaults
30
30
  @shared_strings_container = RubyXL::SharedStringsTable.new
31
31
  @stylesheet = RubyXL::Stylesheet.default
32
- @relationship_container = RubyXL::WorkbookRelationships.new
32
+ @relationship_container = RubyXL::OOXMLRelationshipsFile.new
33
33
  @root = RubyXL::WorkbookRoot.default
34
34
  @root.workbook = self
35
35
  @root.filepath = filepath
@@ -97,7 +97,7 @@ module RubyXL
97
97
  alias_method :write, :save
98
98
 
99
99
  def base_date
100
- if date1904 then
100
+ if date1904 then
101
101
  DateTime.new(1904, 1, 1)
102
102
  else
103
103
  # Subtracting one day to accomodate for erroneous 1900 leap year compatibility only for 1900 based dates
@@ -155,14 +155,14 @@ module RubyXL
155
155
  def modify_alignment(style_index, is_horizontal, alignment)
156
156
  xf = cell_xfs[style_index].dup
157
157
  xf.apply_alignment = true
158
- xf.alignment = RubyXL::Alignment.new(:horizontal => is_horizontal ? alignment : nil,
158
+ xf.alignment = RubyXL::Alignment.new(:horizontal => is_horizontal ? alignment : nil,
159
159
  :vertical => is_horizontal ? nil : alignment)
160
160
  register_new_xf(xf, style_index)
161
161
  end
162
162
 
163
163
  def modify_fill(style_index, rgb)
164
164
  xf = cell_xfs[style_index].dup
165
- new_fill = RubyXL::Fill.new(:pattern_fill =>
165
+ new_fill = RubyXL::Fill.new(:pattern_fill =>
166
166
  RubyXL::PatternFill.new(:pattern_type => 'solid',
167
167
  :fg_color => RubyXL::Color.new(:rgb => rgb)))
168
168
  new_xf = register_new_fill(new_fill, xf)
@@ -25,7 +25,7 @@ module LegacyWorksheet
25
25
 
26
26
  #returns 2d array of just the cell values (without style or formula information)
27
27
  def extract_data(args = {})
28
- sheet_data.rows.map { |row|
28
+ sheet_data.rows.map { |row|
29
29
  row.cells.map { |c| c && c.value(args) } unless row.nil?
30
30
  }
31
31
  end
@@ -66,7 +66,7 @@ module LegacyWorksheet
66
66
 
67
67
  if cell_test then
68
68
  table_hash[:table][table_index] ||= {}
69
- table_hash[:table][table_index][header] = cell.value
69
+ table_hash[:table][table_index][header] = cell.value
70
70
  end
71
71
 
72
72
  current_row += 1
@@ -369,7 +369,7 @@ module LegacyWorksheet
369
369
  c.raw_value = data
370
370
  c.datatype = RubyXL::DataType::RAW_STRING unless formula || data.is_a?(Numeric)
371
371
  c.formula = RubyXL::Formula.new(:expression => formula) if formula
372
-
372
+
373
373
  range = cols && cols.find(column)
374
374
  c.style_index = sheet_data.rows[row].style_index || (range && range.style_index) || 0
375
375
 
@@ -406,7 +406,7 @@ module LegacyWorksheet
406
406
  if row_index > 0 then
407
407
  old_row = sheet_data.rows[row_index - 1]
408
408
  if old_row then
409
- new_cells = old_row.cells.collect { |c|
409
+ new_cells = old_row.cells.collect { |c|
410
410
  if c.nil? then nil
411
411
  else RubyXL::Cell.new(:style_index => c.style_index)
412
412
  end }
@@ -581,7 +581,7 @@ module LegacyWorksheet
581
581
 
582
582
  def get_row_border_left(row = 0)
583
583
  return get_row_border(row, :left)
584
- end
584
+ end
585
585
 
586
586
  def get_row_border_right(row = 0)
587
587
  return get_row_border(row, :right)
@@ -817,10 +817,10 @@ module LegacyWorksheet
817
817
  # is less than +size+, then +.downto()+ will not execute, and if it equals +size+,
818
818
  # then the block will be invoked exactly once, which takes care of the case when
819
819
  # +row_index+ is greater than the current max index by exactly 1.
820
- row_index.downto(existing_row_count) { |r|
820
+ row_index.downto(existing_row_count) { |r|
821
821
  add_row(r, :cells => Array.new(col_size))
822
- }
823
- end
822
+ }
823
+ end
824
824
 
825
825
  # Helper method to get the style index for a column
826
826
  def get_col_style(column_index)
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <meta charset="UTF-8">
6
6
 
7
- <title>README - rubyXL 3.1.2</title>
7
+ <title>README - rubyXL 3.2.0</title>
8
8
 
9
9
  <link href="./fonts.css" rel="stylesheet">
10
10
  <link href="./rdoc.css" rel="stylesheet">
@@ -128,7 +128,7 @@ src="https://codeclimate.com/github/weshatheleopard/rubyXL.png"></a></p>
128
128
 
129
129
  <h2 id="label-To+Use%3A">To Use:<span><a href="#label-To+Use%3A">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
130
130
 
131
- <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'rubyXL'</span> <span class="ruby-comment"># Assuming rubygems is already required</span>
131
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;rubyXL&#39;</span> <span class="ruby-comment"># Assuming rubygems is already required</span>
132
132
  </pre>
133
133
 
134
134
  <h3 id="label-Parsing+an+existing+workbook">Parsing an existing workbook<span><a href="#label-Parsing+an+existing+workbook">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
@@ -145,7 +145,7 @@ src="https://codeclimate.com/github/weshatheleopard/rubyXL.png"></a></p>
145
145
 
146
146
  <pre>workbook.worksheets[0] # Returns first worksheet
147
147
  workbook[0] # Returns first worksheet
148
- workbook['Sheet1'] # Finds and returns worksheet titled &quot;Sheet1&quot;</pre>
148
+ workbook[&#39;Sheet1&#39;] # Finds and returns worksheet titled &quot;Sheet1&quot;</pre>
149
149
 
150
150
  <h4 id="label-Accessing+just+the+values">Accessing just the values<span><a href="#label-Accessing+just+the+values">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
151
151
 
@@ -229,16 +229,16 @@ worksheet.get_column_border_right(0)</pre>
229
229
 
230
230
  <h4 id="label-Adding+Worksheets">Adding Worksheets<span><a href="#label-Adding+Worksheets">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
231
231
 
232
- <pre>worksheet = workbook.add_worksheet('Sheet2')</pre>
232
+ <pre>worksheet = workbook.add_worksheet(&#39;Sheet2&#39;)</pre>
233
233
 
234
234
  <h4 id="label-Renaming+Worksheets">Renaming Worksheets<span><a href="#label-Renaming+Worksheets">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
235
235
 
236
- <pre>worksheet.sheet_name = 'Cool New Name'</pre>
236
+ <pre>worksheet.sheet_name = &#39;Cool New Name&#39;</pre>
237
237
 
238
238
  <h4 id="label-Adding+Cells">Adding Cells<span><a href="#label-Adding+Cells">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
239
239
 
240
- <pre>worksheet.add_cell(0, 0, 'A1') # Sets cell A1 to string &quot;A1&quot;
241
- worksheet.add_cell(0, 1, '', 'A1') # Sets formula in the cell B1 to '=A1'</pre>
240
+ <pre>worksheet.add_cell(0, 0, &#39;A1&#39;) # Sets cell A1 to string &quot;A1&quot;
241
+ worksheet.add_cell(0, 1, &#39;&#39;, &#39;A1&#39;) # Sets formula in the cell B1 to &#39;=A1&#39;</pre>
242
242
 
243
243
  <h4 id="label-Changing+Cells">Changing Cells<span><a href="#label-Changing+Cells">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
244
244
 
@@ -248,21 +248,21 @@ worksheet.add_cell(0, 1, '', 'A1') # Sets formula in the cell B1 to '=A1'</pre>
248
248
 
249
249
  <pre>worksheet.sheet_data[0][0].change_font_bold(true) # Makes A1 bold
250
250
  worksheet.change_row_italics(0,true) # Makes first row italicized
251
- worksheet.change_column_font_name(0, 'Courier') # Makes first column have font Courier</pre>
251
+ worksheet.change_column_font_name(0, &#39;Courier&#39;) # Makes first column have font Courier</pre>
252
252
 
253
253
  <h4 id="label-Changing+Fills+++++">Changing Fills <span><a href="#label-Changing+Fills+++++">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
254
254
 
255
- <pre>worksheet.sheet_data[0][0].change_fill('0ba53d') # Sets A1 to have fill #0ba53d
256
- worksheet.change_row_fill(0, '0ba53d') # Sets first row to have fill #0ba53d
257
- worksheet.change_column_fill(0, '0ba53d') # Sets first column to have fill #0ba53d</pre>
255
+ <pre>worksheet.sheet_data[0][0].change_fill(&#39;0ba53d&#39;) # Sets A1 to have fill #0ba53d
256
+ worksheet.change_row_fill(0, &#39;0ba53d&#39;) # Sets first row to have fill #0ba53d
257
+ worksheet.change_column_fill(0, &#39;0ba53d&#39;) # Sets first column to have fill #0ba53d</pre>
258
258
 
259
259
  <h4 id="label-Changing+Borders">Changing Borders<span><a href="#label-Changing+Borders">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
260
260
 
261
261
  <pre># Possible weights: hairline, thin, medium, thick
262
262
  # Possible &quot;directions&quot;: top, bottom, left, right, diagonal
263
- worksheet.sheet_data[0][0].change_border(:top, 'thin') # Sets A1 to have a top, thin border
264
- worksheet.change_row_border(0, :left, 'hairline') # Sets first row to have a left, hairline border
265
- worksheet.change_column_border(0, :diagonal, 'medium') # Sets first column to have diagonal, medium border</pre>
263
+ worksheet.sheet_data[0][0].change_border(:top, &#39;thin&#39;) # Sets A1 to have a top, thin border
264
+ worksheet.change_row_border(0, :left, &#39;hairline&#39;) # Sets first row to have a left, hairline border
265
+ worksheet.change_column_border(0, :diagonal, &#39;medium&#39;) # Sets first column to have diagonal, medium border</pre>
266
266
 
267
267
  <h4 id="label-Changing+Alignment">Changing Alignment<span><a href="#label-Changing+Alignment">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
268
268
 
@@ -270,17 +270,17 @@ worksheet.change_column_border(0, :diagonal, 'medium') # Sets first column to h
270
270
 
271
271
  <p>center, distributed, justify, left, right</p>
272
272
 
273
- <pre>worksheet.sheet_data[0][0].change_horizontal_alignment('center') # Sets A1 to be centered
274
- worksheet.change_row_horizontal_alignment(0, 'justify') # Sets first row to be justified
275
- worksheet.change_column_horizontal_alignment(0, 'right') # Sets first column to be right-aligned</pre>
273
+ <pre>worksheet.sheet_data[0][0].change_horizontal_alignment(&#39;center&#39;) # Sets A1 to be centered
274
+ worksheet.change_row_horizontal_alignment(0, &#39;justify&#39;) # Sets first row to be justified
275
+ worksheet.change_column_horizontal_alignment(0, &#39;right&#39;) # Sets first column to be right-aligned</pre>
276
276
 
277
277
  <h5 id="label-Vertical">Vertical<span><a href="#label-Vertical">&para;</a> <a href="#documentation">&uarr;</a></span></h5>
278
278
 
279
279
  <p>bottom, center, distributed, top</p>
280
280
 
281
- <pre>worksheet.sheet_data[0][0].change_vertical_alignment('bottom') # Sets A1 to be bottom aligned
282
- worksheet.change_row_vertical_alignment(0, 'distributed') # Sets first row to be distributed vertically
283
- worksheet.change_column_vertical_alignment(0, 'top') # Sets first column to be top aligned</pre>
281
+ <pre>worksheet.sheet_data[0][0].change_vertical_alignment(&#39;bottom&#39;) # Sets A1 to be bottom aligned
282
+ worksheet.change_row_vertical_alignment(0, &#39;distributed&#39;) # Sets first row to be distributed vertically
283
+ worksheet.change_column_vertical_alignment(0, &#39;top&#39;) # Sets first column to be top aligned</pre>
284
284
 
285
285
  <h4 id="label-Changing+Row+Height">Changing Row Height<span><a href="#label-Changing+Row+Height">&para;</a> <a href="#documentation">&uarr;</a></span></h4>
286
286
 
@@ -367,8 +367,8 @@ worksheet.delete_cell(0, 0) # Deletes A1, does not shift cells</pre>
367
367
 
368
368
  <h3 id="label-Miscellaneous">Miscellaneous<span><a href="#label-Miscellaneous">&para;</a> <a href="#documentation">&uarr;</a></span></h3>
369
369
 
370
- <pre>Reference.ind2ref(0,0) == 'A1' # Converts row and column index to Excel-style cell reference
371
- Reference.ref2ind('A1') == [0, 0] # Converts Excel-style cell reference to row and column index</pre>
370
+ <pre>Reference.ind2ref(0,0) == &#39;A1&#39; # Converts row and column index to Excel-style cell reference
371
+ Reference.ref2ind(&#39;A1&#39;) == [0, 0] # Converts Excel-style cell reference to row and column index</pre>
372
372
 
373
373
  <h2 id="label-For+more+information">For more information<span><a href="#label-For+more+information">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
374
374
 
@@ -376,11 +376,11 @@ Reference.ref2ind('A1') == [0, 0] # Converts Excel-style cell reference to row a
376
376
 
377
377
  <h2 id="label-Contributing+to+rubyXL">Contributing to rubyXL<span><a href="#label-Contributing+to+rubyXL">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
378
378
  <ul><li>
379
- <p>Check out the latest master to make sure the feature hasnt been
380
- implemented or the bug hasnt been fixed yet</p>
379
+ <p>Check out the latest master to make sure the feature hasn&#39;t been
380
+ implemented or the bug hasn&#39;t been fixed yet</p>
381
381
  </li><li>
382
- <p>Check out the issue tracker to make sure someone already hasnt requested
383
- it and/or contributed it</p>
382
+ <p>Check out the issue tracker to make sure someone already hasn&#39;t
383
+ requested it and/or contributed it</p>
384
384
  </li><li>
385
385
  <p>Fork the project</p>
386
386
  </li><li>
@@ -388,8 +388,8 @@ it and/or contributed it</p>
388
388
  </li><li>
389
389
  <p>Commit and push until you are happy with your contribution</p>
390
390
  </li><li>
391
- <p>Make sure to add tests for it. This is important so I dont break it in a
392
- future version unintentionally.</p>
391
+ <p>Make sure to add tests for it. This is important so I don&#39;t break it in
392
+ a future version unintentionally.</p>
393
393
  </li><li>
394
394
  <p>Please try not to mess with the Rakefile, version, or history. If you want
395
395
  to have your own version, or is otherwise necessary, that is fine, but