rubyXL 2.3.4 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/rubyXL.rb +2 -0
- data/lib/rubyXL/objects/calculation_chain.rb +6 -1
- data/lib/rubyXL/objects/chartsheet.rb +7 -1
- data/lib/rubyXL/objects/container_nodes.rb +6 -1
- data/lib/rubyXL/objects/content_types.rb +95 -0
- data/lib/rubyXL/objects/document_properties.rb +77 -1
- data/lib/rubyXL/objects/ooxml_object.rb +11 -7
- data/lib/rubyXL/objects/relationships.rb +9 -5
- data/lib/rubyXL/objects/shared_strings.rb +5 -1
- data/lib/rubyXL/objects/simple_types.rb +35 -1
- data/lib/rubyXL/objects/stylesheet.rb +5 -1
- data/lib/rubyXL/objects/theme.rb +471 -6
- data/lib/rubyXL/objects/workbook.rb +52 -1
- data/lib/rubyXL/objects/worksheet.rb +7 -1
- data/lib/rubyXL/parser.rb +9 -14
- data/lib/rubyXL/workbook.rb +11 -13
- data/rdoc/README_rdoc.html +1 -1
- data/rdoc/RubyXL.html +11 -1
- data/rdoc/RubyXL/AExtension.html +225 -0
- data/rdoc/RubyXL/AExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/Alignment.html +1 -1
- data/rdoc/RubyXL/AlternateContent.html +1 -1
- data/rdoc/RubyXL/AutoFilter.html +1 -1
- data/rdoc/RubyXL/AutoFilterColumn.html +1 -1
- data/rdoc/RubyXL/BooleanNode.html +1 -1
- data/rdoc/RubyXL/BooleanValue.html +1 -1
- data/rdoc/RubyXL/Border.html +1 -1
- data/rdoc/RubyXL/BorderEdge.html +1 -1
- data/rdoc/RubyXL/Borders.html +1 -1
- data/rdoc/RubyXL/Break.html +1 -1
- data/rdoc/RubyXL/BreakList.html +1 -1
- data/rdoc/RubyXL/CalculationChain.html +41 -6
- data/rdoc/RubyXL/CalculationChainCell.html +1 -1
- data/rdoc/RubyXL/CalculationProperties.html +1 -1
- data/rdoc/RubyXL/Cell.html +1 -1
- data/rdoc/RubyXL/CellSmartTag.html +1 -1
- data/rdoc/RubyXL/CellSmartTagProperty.html +1 -1
- data/rdoc/RubyXL/CellSmartTags.html +1 -1
- data/rdoc/RubyXL/CellStyle.html +1 -1
- data/rdoc/RubyXL/CellStyleXFs.html +1 -1
- data/rdoc/RubyXL/CellStyles.html +1 -1
- data/rdoc/RubyXL/CellValue.html +1 -1
- data/rdoc/RubyXL/CellWatch.html +1 -1
- data/rdoc/RubyXL/CellWatches.html +1 -1
- data/rdoc/RubyXL/CellXFs.html +1 -1
- data/rdoc/RubyXL/Chartsheet.html +1 -1
- data/rdoc/RubyXL/ChartsheetPageSetup.html +1 -1
- data/rdoc/RubyXL/ChartsheetProperties.html +1 -1
- data/rdoc/RubyXL/ChartsheetProtection.html +1 -1
- data/rdoc/RubyXL/ChartsheetView.html +1 -1
- data/rdoc/RubyXL/ChartsheetViews.html +1 -1
- data/rdoc/RubyXL/Color.html +1 -1
- data/rdoc/RubyXL/ColorFilter.html +1 -1
- data/rdoc/RubyXL/ColorScale.html +1 -1
- data/rdoc/RubyXL/ColorScheme.html +1 -1
- data/rdoc/RubyXL/ColorSet.html +1 -1
- data/rdoc/RubyXL/Colors.html +1 -1
- data/rdoc/RubyXL/ColumnRange.html +1 -1
- data/rdoc/RubyXL/ColumnRanges.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatValue.html +1 -1
- data/rdoc/RubyXL/ConditionalFormatting.html +1 -1
- data/rdoc/RubyXL/ConditionalFormattingRule.html +1 -1
- data/rdoc/RubyXL/ContentTypeDefault.html +105 -0
- data/rdoc/RubyXL/ContentTypeOverride.html +105 -0
- data/rdoc/RubyXL/ContentTypes.html +310 -0
- data/rdoc/RubyXL/CoreProperties.html +105 -0
- data/rdoc/RubyXL/CustomColor.html +105 -0
- data/rdoc/RubyXL/CustomColorList.html +105 -0
- data/rdoc/RubyXL/CustomFilter.html +1 -1
- data/rdoc/RubyXL/CustomFilters.html +1 -1
- data/rdoc/RubyXL/CustomGeometry.html +105 -0
- data/rdoc/RubyXL/CustomProperties.html +1 -1
- data/rdoc/RubyXL/CustomProperty.html +1 -1
- data/rdoc/RubyXL/CustomSheetView.html +1 -1
- data/rdoc/RubyXL/CustomSheetViews.html +1 -1
- data/rdoc/RubyXL/CustomWorkbookView.html +1 -1
- data/rdoc/RubyXL/CustomWorkbookViews.html +1 -1
- data/rdoc/RubyXL/DXF.html +1 -1
- data/rdoc/RubyXL/DXFs.html +1 -1
- data/rdoc/RubyXL/DataBar.html +1 -1
- data/rdoc/RubyXL/DataConsolidate.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReference.html +1 -1
- data/rdoc/RubyXL/DataConsolidationReferences.html +1 -1
- data/rdoc/RubyXL/DataValidation.html +1 -1
- data/rdoc/RubyXL/DataValidations.html +1 -1
- data/rdoc/RubyXL/DateGroupItem.html +1 -1
- data/rdoc/RubyXL/DefinedName.html +1 -1
- data/rdoc/RubyXL/DefinedNames.html +1 -1
- data/rdoc/RubyXL/DocumentProperties.html +41 -6
- data/rdoc/RubyXL/DynamicFilter.html +1 -1
- data/rdoc/RubyXL/EmbeddedControl.html +1 -1
- data/rdoc/RubyXL/EmbeddedControls.html +1 -1
- data/rdoc/RubyXL/Extension.html +1 -121
- data/rdoc/RubyXL/ExtensionStorageArea.html +1 -1
- data/rdoc/RubyXL/Extents.html +105 -0
- data/rdoc/RubyXL/ExternalReference.html +1 -1
- data/rdoc/RubyXL/ExternalReferences.html +1 -1
- data/rdoc/RubyXL/ExtraColorScheme.html +105 -0
- data/rdoc/RubyXL/ExtraColorSchemeList.html +105 -0
- data/rdoc/RubyXL/FieldItem.html +1 -1
- data/rdoc/RubyXL/FileRecoveryProperties.html +1 -1
- data/rdoc/RubyXL/FileSharing.html +1 -1
- data/rdoc/RubyXL/FileVersion.html +1 -1
- data/rdoc/RubyXL/Fill.html +1 -1
- data/rdoc/RubyXL/Fills.html +1 -1
- data/rdoc/RubyXL/FilterContainer.html +1 -1
- data/rdoc/RubyXL/FloatNode.html +1 -1
- data/rdoc/RubyXL/FloatValue.html +1 -1
- data/rdoc/RubyXL/Font.html +1 -1
- data/rdoc/RubyXL/FontScheme.html +1 -1
- data/rdoc/RubyXL/Fonts.html +1 -1
- data/rdoc/RubyXL/FormatScheme.html +1 -1
- data/rdoc/RubyXL/Formula.html +1 -1
- data/rdoc/RubyXL/FunctionGroup.html +1 -1
- data/rdoc/RubyXL/FunctionGroups.html +1 -1
- data/rdoc/RubyXL/GenericStorage.html +1 -1
- data/rdoc/RubyXL/GradientFill.html +1 -1
- data/rdoc/RubyXL/HeaderFooterSettings.html +1 -1
- data/rdoc/RubyXL/Hyperlink.html +1 -1
- data/rdoc/RubyXL/Hyperlinks.html +1 -1
- data/rdoc/RubyXL/IconFilter.html +1 -1
- data/rdoc/RubyXL/IconSet.html +1 -1
- data/rdoc/RubyXL/IgnoredError.html +1 -1
- data/rdoc/RubyXL/IgnoredErrors.html +1 -1
- data/rdoc/RubyXL/IndexedColors.html +1 -1
- data/rdoc/RubyXL/InputCells.html +1 -1
- data/rdoc/RubyXL/IntegerNode.html +1 -1
- data/rdoc/RubyXL/IntegerValue.html +1 -1
- data/rdoc/RubyXL/LegacyCell.html +1 -1
- data/rdoc/RubyXL/LegacyWorkbook.html +33 -55
- data/rdoc/RubyXL/LegacyWorksheet.html +1 -1
- data/rdoc/RubyXL/MRUColors.html +1 -1
- data/rdoc/RubyXL/MergedCell.html +1 -1
- data/rdoc/RubyXL/MergedCells.html +1 -1
- data/rdoc/RubyXL/NumFmt.html +1 -1
- data/rdoc/RubyXL/NumberFormat.html +1 -1
- data/rdoc/RubyXL/NumberFormats.html +1 -1
- data/rdoc/RubyXL/OLEObject.html +1 -1
- data/rdoc/RubyXL/OLEObjects.html +1 -1
- data/rdoc/RubyXL/OLESize.html +1 -1
- data/rdoc/RubyXL/OOXMLContainerObject.html +1 -1
- data/rdoc/RubyXL/OOXMLObject.html +1 -1
- data/rdoc/RubyXL/OOXMLObjectClassMethods.html +1 -1
- data/rdoc/RubyXL/OOXMLObjectInstanceMethods.html +1 -1
- data/rdoc/RubyXL/OOXMLRelationshipsFile.html +36 -1
- data/rdoc/RubyXL/OOXMLTopLevelObject.html +1 -1
- data/rdoc/RubyXL/ObjectDefaults.html +105 -0
- data/rdoc/RubyXL/Offset.html +105 -0
- data/rdoc/RubyXL/OutlineProperties.html +1 -1
- data/rdoc/RubyXL/PageMargins.html +1 -1
- data/rdoc/RubyXL/PageSetup.html +1 -1
- data/rdoc/RubyXL/PageSetupProperties.html +1 -1
- data/rdoc/RubyXL/Pane.html +1 -1
- data/rdoc/RubyXL/Parser.html +9 -14
- data/rdoc/RubyXL/PatternFill.html +1 -1
- data/rdoc/RubyXL/PhoneticProperties.html +1 -1
- data/rdoc/RubyXL/PhoneticRun.html +1 -1
- data/rdoc/RubyXL/PivotArea.html +1 -1
- data/rdoc/RubyXL/PivotCache.html +1 -1
- data/rdoc/RubyXL/PivotCaches.html +1 -1
- data/rdoc/RubyXL/PivotReference.html +1 -1
- data/rdoc/RubyXL/PivotReferences.html +1 -1
- data/rdoc/RubyXL/PivotTableSelection.html +1 -1
- data/rdoc/RubyXL/PresetGeometry.html +105 -0
- data/rdoc/RubyXL/PrintOptions.html +1 -1
- data/rdoc/RubyXL/ProtectedRange.html +1 -1
- data/rdoc/RubyXL/ProtectedRanges.html +1 -1
- data/rdoc/RubyXL/Protection.html +1 -1
- data/rdoc/RubyXL/RID.html +1 -1
- data/rdoc/RubyXL/RawOOXML.html +1 -1
- data/rdoc/RubyXL/Reference.html +1 -1
- data/rdoc/RubyXL/Relationship.html +1 -1
- data/rdoc/RubyXL/RichText.html +1 -1
- data/rdoc/RubyXL/RichTextRun.html +1 -1
- data/rdoc/RubyXL/RootRelationships.html +1 -1
- data/rdoc/RubyXL/Row.html +1 -1
- data/rdoc/RubyXL/RunProperties.html +1 -1
- data/rdoc/RubyXL/Scenario.html +1 -1
- data/rdoc/RubyXL/Scenarios.html +1 -1
- data/rdoc/RubyXL/Selection.html +1 -1
- data/rdoc/RubyXL/ShapeDefault.html +105 -0
- data/rdoc/RubyXL/SharedStringsTable.html +43 -8
- data/rdoc/RubyXL/Sheet.html +1 -1
- data/rdoc/RubyXL/SheetCalculationProperties.html +1 -1
- data/rdoc/RubyXL/SheetData.html +1 -1
- data/rdoc/RubyXL/Sheets.html +1 -1
- data/rdoc/RubyXL/SmartTagProperties.html +1 -1
- data/rdoc/RubyXL/SmartTagType.html +1 -1
- data/rdoc/RubyXL/SmartTagTypes.html +1 -1
- data/rdoc/RubyXL/SmartTags.html +1 -1
- data/rdoc/RubyXL/SortCondition.html +1 -1
- data/rdoc/RubyXL/SortState.html +1 -1
- data/rdoc/RubyXL/Sqref.html +1 -1
- data/rdoc/RubyXL/Stop.html +1 -1
- data/rdoc/RubyXL/StringNode.html +1 -1
- data/rdoc/RubyXL/{Writer.html → StringNodeW3C.html} +13 -6
- data/rdoc/RubyXL/StringValue.html +1 -1
- data/rdoc/RubyXL/Stylesheet.html +1 -1
- data/rdoc/RubyXL/TableParts.html +1 -1
- data/rdoc/RubyXL/TableStyle.html +1 -1
- data/rdoc/RubyXL/TableStyles.html +1 -1
- data/rdoc/RubyXL/Text.html +1 -1
- data/rdoc/RubyXL/Theme.html +2 -2
- data/rdoc/RubyXL/ThemeElements.html +1 -1
- data/rdoc/RubyXL/Top10.html +1 -1
- data/rdoc/RubyXL/TwoDTransform.html +105 -0
- data/rdoc/RubyXL/Variant.html +1 -1
- data/rdoc/RubyXL/Vector.html +1 -1
- data/rdoc/RubyXL/VectorValue.html +1 -1
- data/rdoc/RubyXL/VisualProperties.html +105 -0
- data/rdoc/RubyXL/WebPublishObject.html +1 -1
- data/rdoc/RubyXL/WebPublishObjects.html +1 -1
- data/rdoc/RubyXL/WebPublishingItem.html +1 -1
- data/rdoc/RubyXL/WebPublishingItems.html +1 -1
- data/rdoc/RubyXL/WebPublishingProperties.html +1 -1
- data/rdoc/RubyXL/Workbook.html +1 -1
- data/rdoc/RubyXL/WorkbookProperties.html +1 -1
- data/rdoc/RubyXL/WorkbookProtection.html +1 -1
- data/rdoc/RubyXL/WorkbookRelationships.html +1 -1
- data/rdoc/RubyXL/WorkbookView.html +1 -1
- data/rdoc/RubyXL/WorkbookViews.html +1 -1
- data/rdoc/RubyXL/Worksheet.html +1 -1
- data/rdoc/RubyXL/WorksheetDimensions.html +1 -1
- data/rdoc/RubyXL/WorksheetFormatProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProperties.html +1 -1
- data/rdoc/RubyXL/WorksheetProtection.html +1 -1
- data/rdoc/RubyXL/WorksheetView.html +1 -1
- data/rdoc/RubyXL/WorksheetViews.html +1 -1
- data/rdoc/RubyXL/XF.html +1 -1
- data/rdoc/created.rid +19 -24
- data/rdoc/index.html +12 -16
- data/rdoc/js/search_index.js +1 -1
- data/rdoc/table_of_contents.html +102 -153
- data/rubyXL.gemspec +22 -16
- data/spec/lib/parser_spec.rb +16 -2
- metadata +21 -15
- data/lib/rubyXL/writer/content_types_writer.rb +0 -113
- data/lib/rubyXL/writer/core_writer.rb +0 -34
- data/lib/rubyXL/writer/generic_writer.rb +0 -43
- data/lib/rubyXL/writer/styles_writer.rb +0 -15
- data/lib/rubyXL/writer/theme_writer.rb +0 -337
- data/lib/rubyXL/writer/workbook_writer.rb +0 -73
- data/rdoc/RubyXL/Writer/ContentTypesWriter.html +0 -289
- data/rdoc/RubyXL/Writer/CoreWriter.html +0 -210
- data/rdoc/RubyXL/Writer/GenericWriter.html +0 -348
- data/rdoc/RubyXL/Writer/StylesWriter.html +0 -191
- data/rdoc/RubyXL/Writer/ThemeWriter.html +0 -511
- data/rdoc/RubyXL/Writer/WorkbookWriter.html +0 -249
@@ -1,337 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
|
-
module RubyXL
|
4
|
-
module Writer
|
5
|
-
class ThemeWriter < GenericWriter
|
6
|
-
|
7
|
-
def filepath
|
8
|
-
File.join('xl', 'theme', 'theme1.xml')
|
9
|
-
end
|
10
|
-
|
11
|
-
def write()
|
12
|
-
return @workbook.theme['theme1.xml'] unless @workbook.theme.empty?
|
13
|
-
|
14
|
-
# Fallback theme. Note that this particular theme totall throws colors off. Need to figure it out eventually.
|
15
|
-
contents = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
16
|
-
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme">
|
17
|
-
<a:themeElements>
|
18
|
-
<a:clrScheme name="Office">
|
19
|
-
<a:dk1>
|
20
|
-
<a:sysClr val="windowText" lastClr="000000"/>
|
21
|
-
</a:dk1>
|
22
|
-
<a:lt1>
|
23
|
-
<a:sysClr val="window" lastClr="FFFFFF"/>
|
24
|
-
</a:lt1>
|
25
|
-
<a:dk2>
|
26
|
-
<a:srgbClr val="1F497D"/>
|
27
|
-
</a:dk2>
|
28
|
-
<a:lt2>
|
29
|
-
<a:srgbClr val="EEECE1"/>
|
30
|
-
</a:lt2>
|
31
|
-
<a:accent1>
|
32
|
-
<a:srgbClr val="4F81BD"/>
|
33
|
-
</a:accent1>
|
34
|
-
<a:accent2>
|
35
|
-
<a:srgbClr val="C0504D"/>
|
36
|
-
</a:accent2>
|
37
|
-
<a:accent3>
|
38
|
-
<a:srgbClr val="9BBB59"/>
|
39
|
-
</a:accent3>
|
40
|
-
<a:accent4>
|
41
|
-
<a:srgbClr val="8064A2"/>
|
42
|
-
</a:accent4>
|
43
|
-
<a:accent5>
|
44
|
-
<a:srgbClr val="4BACC6"/>
|
45
|
-
</a:accent5>
|
46
|
-
<a:accent6>
|
47
|
-
<a:srgbClr val="F79646"/>
|
48
|
-
</a:accent6>
|
49
|
-
<a:hlink>
|
50
|
-
<a:srgbClr val="0000FF"/>
|
51
|
-
</a:hlink>
|
52
|
-
<a:folHlink>
|
53
|
-
<a:srgbClr val="800080"/>
|
54
|
-
</a:folHlink>
|
55
|
-
</a:clrScheme>
|
56
|
-
<a:fontScheme name="Office">
|
57
|
-
<a:majorFont>
|
58
|
-
<a:latin typeface="Cambria"/>
|
59
|
-
<a:ea typeface=""/>
|
60
|
-
<a:cs typeface=""/>
|
61
|
-
<a:font script="Jpan" typeface="MS Pゴシック"/>
|
62
|
-
<a:font script="Hang" typeface="맑은 고딕"/>
|
63
|
-
<a:font script="Hans" typeface="宋体"/>
|
64
|
-
<a:font script="Hant" typeface="新細明體"/>
|
65
|
-
<a:font script="Arab" typeface="Times New Roman"/>
|
66
|
-
<a:font script="Hebr" typeface="Times New Roman"/>
|
67
|
-
<a:font script="Thai" typeface="Tahoma"/>
|
68
|
-
<a:font script="Ethi" typeface="Nyala"/>
|
69
|
-
<a:font script="Beng" typeface="Vrinda"/>
|
70
|
-
<a:font script="Gujr" typeface="Shruti"/>
|
71
|
-
<a:font script="Khmr" typeface="MoolBoran"/>
|
72
|
-
<a:font script="Knda" typeface="Tunga"/>
|
73
|
-
<a:font script="Guru" typeface="Raavi"/>
|
74
|
-
<a:font script="Cans" typeface="Euphemia"/>
|
75
|
-
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
|
76
|
-
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
|
77
|
-
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
|
78
|
-
<a:font script="Thaa" typeface="MV Boli"/>
|
79
|
-
<a:font script="Deva" typeface="Mangal"/>
|
80
|
-
<a:font script="Telu" typeface="Gautami"/>
|
81
|
-
<a:font script="Taml" typeface="Latha"/>
|
82
|
-
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
|
83
|
-
<a:font script="Orya" typeface="Kalinga"/>
|
84
|
-
<a:font script="Mlym" typeface="Kartika"/>
|
85
|
-
<a:font script="Laoo" typeface="DokChampa"/>
|
86
|
-
<a:font script="Sinh" typeface="Iskoola Pota"/>
|
87
|
-
<a:font script="Mong" typeface="Mongolian Baiti"/>
|
88
|
-
<a:font script="Viet" typeface="Times New Roman"/>
|
89
|
-
<a:font script="Uigh" typeface="Microsoft Uighur"/>
|
90
|
-
</a:majorFont>
|
91
|
-
<a:minorFont>
|
92
|
-
<a:latin typeface="Calibri"/>
|
93
|
-
<a:ea typeface=""/>
|
94
|
-
<a:cs typeface=""/>
|
95
|
-
<a:font script="Jpan" typeface="MS Pゴシック"/>
|
96
|
-
<a:font script="Hang" typeface="맑은 고딕"/>
|
97
|
-
<a:font script="Hans" typeface="宋体"/>
|
98
|
-
<a:font script="Hant" typeface="新細明體"/>
|
99
|
-
<a:font script="Arab" typeface="Arial"/>
|
100
|
-
<a:font script="Hebr" typeface="Arial"/>
|
101
|
-
<a:font script="Thai" typeface="Tahoma"/>
|
102
|
-
<a:font script="Ethi" typeface="Nyala"/>
|
103
|
-
<a:font script="Beng" typeface="Vrinda"/>
|
104
|
-
<a:font script="Gujr" typeface="Shruti"/>
|
105
|
-
<a:font script="Khmr" typeface="DaunPenh"/>
|
106
|
-
<a:font script="Knda" typeface="Tunga"/>
|
107
|
-
<a:font script="Guru" typeface="Raavi"/>
|
108
|
-
<a:font script="Cans" typeface="Euphemia"/>
|
109
|
-
<a:font script="Cher" typeface="Plantagenet Cherokee"/>
|
110
|
-
<a:font script="Yiii" typeface="Microsoft Yi Baiti"/>
|
111
|
-
<a:font script="Tibt" typeface="Microsoft Himalaya"/>
|
112
|
-
<a:font script="Thaa" typeface="MV Boli"/>
|
113
|
-
<a:font script="Deva" typeface="Mangal"/>
|
114
|
-
<a:font script="Telu" typeface="Gautami"/>
|
115
|
-
<a:font script="Taml" typeface="Latha"/>
|
116
|
-
<a:font script="Syrc" typeface="Estrangelo Edessa"/>
|
117
|
-
<a:font script="Orya" typeface="Kalinga"/>
|
118
|
-
<a:font script="Mlym" typeface="Kartika"/>
|
119
|
-
<a:font script="Laoo" typeface="DokChampa"/>
|
120
|
-
<a:font script="Sinh" typeface="Iskoola Pota"/>
|
121
|
-
<a:font script="Mong" typeface="Mongolian Baiti"/>
|
122
|
-
<a:font script="Viet" typeface="Arial"/>
|
123
|
-
<a:font script="Uigh" typeface="Microsoft Uighur"/>
|
124
|
-
</a:minorFont>
|
125
|
-
</a:fontScheme>
|
126
|
-
<a:fmtScheme name="Office">
|
127
|
-
<a:fillStyleLst>
|
128
|
-
<a:solidFill>
|
129
|
-
<a:schemeClr val="phClr"/>
|
130
|
-
</a:solidFill>
|
131
|
-
<a:gradFill rotWithShape="1">
|
132
|
-
<a:gsLst>
|
133
|
-
<a:gs pos="0">
|
134
|
-
<a:schemeClr val="phClr">
|
135
|
-
<a:tint val="50000"/>
|
136
|
-
<a:satMod val="300000"/>
|
137
|
-
</a:schemeClr>
|
138
|
-
</a:gs>
|
139
|
-
<a:gs pos="35000">
|
140
|
-
<a:schemeClr val="phClr">
|
141
|
-
<a:tint val="37000"/>
|
142
|
-
<a:satMod val="300000"/>
|
143
|
-
</a:schemeClr>
|
144
|
-
</a:gs>
|
145
|
-
<a:gs pos="100000">
|
146
|
-
<a:schemeClr val="phClr">
|
147
|
-
<a:tint val="15000"/>
|
148
|
-
<a:satMod val="350000"/>
|
149
|
-
</a:schemeClr>
|
150
|
-
</a:gs>
|
151
|
-
</a:gsLst>
|
152
|
-
<a:lin ang="16200000" scaled="1"/>
|
153
|
-
</a:gradFill>
|
154
|
-
<a:gradFill rotWithShape="1">
|
155
|
-
<a:gsLst>
|
156
|
-
<a:gs pos="0">
|
157
|
-
<a:schemeClr val="phClr">
|
158
|
-
<a:tint val="100000"/>
|
159
|
-
<a:shade val="100000"/>
|
160
|
-
<a:satMod val="130000"/>
|
161
|
-
</a:schemeClr>
|
162
|
-
</a:gs>
|
163
|
-
<a:gs pos="100000">
|
164
|
-
<a:schemeClr val="phClr">
|
165
|
-
<a:tint val="50000"/>
|
166
|
-
<a:shade val="100000"/>
|
167
|
-
<a:satMod val="350000"/>
|
168
|
-
</a:schemeClr>
|
169
|
-
</a:gs>
|
170
|
-
</a:gsLst>
|
171
|
-
<a:lin ang="16200000" scaled="0"/>
|
172
|
-
</a:gradFill>
|
173
|
-
</a:fillStyleLst>
|
174
|
-
<a:lnStyleLst>
|
175
|
-
<a:ln w="9525" cap="flat" cmpd="sng" algn="ctr">
|
176
|
-
<a:solidFill>
|
177
|
-
<a:schemeClr val="phClr">
|
178
|
-
<a:shade val="95000"/>
|
179
|
-
<a:satMod val="105000"/>
|
180
|
-
</a:schemeClr>
|
181
|
-
</a:solidFill>
|
182
|
-
<a:prstDash val="solid"/>
|
183
|
-
</a:ln>
|
184
|
-
<a:ln w="25400" cap="flat" cmpd="sng" algn="ctr">
|
185
|
-
<a:solidFill>
|
186
|
-
<a:schemeClr val="phClr"/>
|
187
|
-
</a:solidFill>
|
188
|
-
<a:prstDash val="solid"/>
|
189
|
-
</a:ln>
|
190
|
-
<a:ln w="38100" cap="flat" cmpd="sng" algn="ctr">
|
191
|
-
<a:solidFill>
|
192
|
-
<a:schemeClr val="phClr"/>
|
193
|
-
</a:solidFill>
|
194
|
-
<a:prstDash val="solid"/>
|
195
|
-
</a:ln>
|
196
|
-
</a:lnStyleLst>
|
197
|
-
<a:effectStyleLst>
|
198
|
-
<a:effectStyle>
|
199
|
-
<a:effectLst>
|
200
|
-
<a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0">
|
201
|
-
<a:srgbClr val="000000">
|
202
|
-
<a:alpha val="38000"/>
|
203
|
-
</a:srgbClr>
|
204
|
-
</a:outerShdw>
|
205
|
-
</a:effectLst>
|
206
|
-
</a:effectStyle>
|
207
|
-
<a:effectStyle>
|
208
|
-
<a:effectLst>
|
209
|
-
<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
|
210
|
-
<a:srgbClr val="000000">
|
211
|
-
<a:alpha val="35000"/>
|
212
|
-
</a:srgbClr>
|
213
|
-
</a:outerShdw>
|
214
|
-
</a:effectLst>
|
215
|
-
</a:effectStyle>
|
216
|
-
<a:effectStyle>
|
217
|
-
<a:effectLst>
|
218
|
-
<a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0">
|
219
|
-
<a:srgbClr val="000000">
|
220
|
-
<a:alpha val="35000"/>
|
221
|
-
</a:srgbClr>
|
222
|
-
</a:outerShdw>
|
223
|
-
</a:effectLst>
|
224
|
-
<a:scene3d>
|
225
|
-
<a:camera prst="orthographicFront">
|
226
|
-
<a:rot lat="0" lon="0" rev="0"/>
|
227
|
-
</a:camera>
|
228
|
-
<a:lightRig rig="threePt" dir="t">
|
229
|
-
<a:rot lat="0" lon="0" rev="1200000"/>
|
230
|
-
</a:lightRig>
|
231
|
-
</a:scene3d>
|
232
|
-
<a:sp3d>
|
233
|
-
<a:bevelT w="63500" h="25400"/>
|
234
|
-
</a:sp3d>
|
235
|
-
</a:effectStyle>
|
236
|
-
</a:effectStyleLst>
|
237
|
-
<a:bgFillStyleLst>
|
238
|
-
<a:solidFill>
|
239
|
-
<a:schemeClr val="phClr"/>
|
240
|
-
</a:solidFill>
|
241
|
-
<a:gradFill rotWithShape="1">
|
242
|
-
<a:gsLst>
|
243
|
-
<a:gs pos="0">
|
244
|
-
<a:schemeClr val="phClr">
|
245
|
-
<a:tint val="40000"/>
|
246
|
-
<a:satMod val="350000"/>
|
247
|
-
</a:schemeClr>
|
248
|
-
</a:gs>
|
249
|
-
<a:gs pos="40000">
|
250
|
-
<a:schemeClr val="phClr">
|
251
|
-
<a:tint val="45000"/>
|
252
|
-
<a:shade val="99000"/>
|
253
|
-
<a:satMod val="350000"/>
|
254
|
-
</a:schemeClr>
|
255
|
-
</a:gs>
|
256
|
-
<a:gs pos="100000">
|
257
|
-
<a:schemeClr val="phClr">
|
258
|
-
<a:shade val="20000"/>
|
259
|
-
<a:satMod val="255000"/>
|
260
|
-
</a:schemeClr>
|
261
|
-
</a:gs>
|
262
|
-
</a:gsLst>
|
263
|
-
<a:path path="circle">
|
264
|
-
<a:fillToRect l="50000" t="-80000" r="50000" b="180000"/>
|
265
|
-
</a:path>
|
266
|
-
</a:gradFill>
|
267
|
-
<a:gradFill rotWithShape="1">
|
268
|
-
<a:gsLst>
|
269
|
-
<a:gs pos="0">
|
270
|
-
<a:schemeClr val="phClr">
|
271
|
-
<a:tint val="80000"/>
|
272
|
-
<a:satMod val="300000"/>
|
273
|
-
</a:schemeClr>
|
274
|
-
</a:gs>
|
275
|
-
<a:gs pos="100000">
|
276
|
-
<a:schemeClr val="phClr">
|
277
|
-
<a:shade val="30000"/>
|
278
|
-
<a:satMod val="200000"/>
|
279
|
-
</a:schemeClr>
|
280
|
-
</a:gs>
|
281
|
-
</a:gsLst>
|
282
|
-
<a:path path="circle">
|
283
|
-
<a:fillToRect l="50000" t="50000" r="50000" b="50000"/>
|
284
|
-
</a:path>
|
285
|
-
</a:gradFill>
|
286
|
-
</a:bgFillStyleLst>
|
287
|
-
</a:fmtScheme>
|
288
|
-
</a:themeElements>
|
289
|
-
<a:objectDefaults>
|
290
|
-
<a:spDef>
|
291
|
-
<a:spPr/>
|
292
|
-
<a:bodyPr/>
|
293
|
-
<a:lstStyle/>
|
294
|
-
<a:style>
|
295
|
-
<a:lnRef idx="1">
|
296
|
-
<a:schemeClr val="accent1"/>
|
297
|
-
</a:lnRef>
|
298
|
-
<a:fillRef idx="3">
|
299
|
-
<a:schemeClr val="accent1"/>
|
300
|
-
</a:fillRef>
|
301
|
-
<a:effectRef idx="2">
|
302
|
-
<a:schemeClr val="accent1"/>
|
303
|
-
</a:effectRef>
|
304
|
-
<a:fontRef idx="minor">
|
305
|
-
<a:schemeClr val="lt1"/>
|
306
|
-
</a:fontRef>
|
307
|
-
</a:style>
|
308
|
-
</a:spDef>
|
309
|
-
<a:lnDef>
|
310
|
-
<a:spPr/>
|
311
|
-
<a:bodyPr/>
|
312
|
-
<a:lstStyle/>
|
313
|
-
<a:style>
|
314
|
-
<a:lnRef idx="2">
|
315
|
-
<a:schemeClr val="accent1"/>
|
316
|
-
</a:lnRef>
|
317
|
-
<a:fillRef idx="0">
|
318
|
-
<a:schemeClr val="accent1"/>
|
319
|
-
</a:fillRef>
|
320
|
-
<a:effectRef idx="1">
|
321
|
-
<a:schemeClr val="accent1"/>
|
322
|
-
</a:effectRef>
|
323
|
-
<a:fontRef idx="minor">
|
324
|
-
<a:schemeClr val="tx1"/>
|
325
|
-
</a:fontRef>
|
326
|
-
</a:style>
|
327
|
-
</a:lnDef>
|
328
|
-
</a:objectDefaults>
|
329
|
-
<a:extraClrSchemeLst/>
|
330
|
-
</a:theme>'
|
331
|
-
|
332
|
-
contents
|
333
|
-
end
|
334
|
-
|
335
|
-
end
|
336
|
-
end
|
337
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
module RubyXL
|
2
|
-
module Writer
|
3
|
-
class WorkbookWriter < GenericWriter
|
4
|
-
|
5
|
-
def filepath
|
6
|
-
File.join('xl', 'workbook.xml')
|
7
|
-
end
|
8
|
-
|
9
|
-
def write()
|
10
|
-
new_xml = render_xml do |xml|
|
11
|
-
xml << (xml.create_element('workbook',
|
12
|
-
:xmlns => 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',
|
13
|
-
'xmlns:r' => 'http://schemas.openxmlformats.org/officeDocument/2006/relationships') { |root|
|
14
|
-
root << xml.create_element('fileVersion', { :appName => 'xl', :lastEdited => 4,
|
15
|
-
:lowestEdited => 4, :rupBuild => 4505 })
|
16
|
-
|
17
|
-
params = { :showInkAnnotation => 0, :autoCompressPictures => 0 }
|
18
|
-
|
19
|
-
#TODO following line - date 1904? check if mac only
|
20
|
-
params[:date1904] = 1 if @workbook.date1904
|
21
|
-
root << xml.create_element('workbookPr', params)
|
22
|
-
|
23
|
-
root << (xml.create_element('bookViews') { |views|
|
24
|
-
views << xml.create_element('workbookView', { :xWindow => -20, :yWindow => -20,
|
25
|
-
:windowWidth => 21600, :windowHeight => 13340, :tabRatio => 500 })
|
26
|
-
})
|
27
|
-
|
28
|
-
index = 1
|
29
|
-
root << (xml.create_element('sheets') { |sheet_xml|
|
30
|
-
@workbook.worksheets.each_with_index { |sheet, i|
|
31
|
-
sheet_xml << xml.create_element('sheet', { :name => sheet.sheet_name,
|
32
|
-
:sheetId => sheet.sheet_id || index,
|
33
|
-
'r:id'=> "rId#{index}" })
|
34
|
-
index += 1
|
35
|
-
}
|
36
|
-
})
|
37
|
-
|
38
|
-
unless @workbook.external_links.empty?
|
39
|
-
|
40
|
-
root << (xml.create_element('externalReferences') { |refs|
|
41
|
-
# Need to correlate these with WorkbookRelsWriter
|
42
|
-
@workbook.external_links.each_value {
|
43
|
-
refs << xml.create_element('externalReference', { 'r:id' => "rId#{index}" })
|
44
|
-
index += 1
|
45
|
-
}
|
46
|
-
})
|
47
|
-
end
|
48
|
-
|
49
|
-
if @workbook.defined_names && !@workbook.defined_names.empty? then
|
50
|
-
root << xml.create_element('definedNames') { |names|
|
51
|
-
@workbook.defined_names.each { |name| names << name.write_xml(xml) }
|
52
|
-
}
|
53
|
-
end
|
54
|
-
|
55
|
-
#TODO see if this changes with formulas
|
56
|
-
#attributes out of order here
|
57
|
-
root << xml.create_element('calcPr', { :calcId => 130407, :concurrentCalc => 0 } )
|
58
|
-
|
59
|
-
root << (xml.create_element('extLst') { |list|
|
60
|
-
list << (xml.create_element('ext', {
|
61
|
-
'xmlns:mx' => 'http://schemas.microsoft.com/office/mac/excel/2008/main',
|
62
|
-
:uri => 'http://schemas.microsoft.com/office/mac/excel/2008/main'}) { |ext|
|
63
|
-
ext << xml.create_element('mx:ArchID', { :Flags => 2 })
|
64
|
-
|
65
|
-
})
|
66
|
-
})
|
67
|
-
})
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,289 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<html>
|
4
|
-
<head>
|
5
|
-
<meta charset="UTF-8">
|
6
|
-
|
7
|
-
<title>class RubyXL::Writer::ContentTypesWriter - rubyXL 2.3.4</title>
|
8
|
-
|
9
|
-
<link href="../../fonts.css" rel="stylesheet">
|
10
|
-
<link href="../../rdoc.css" rel="stylesheet">
|
11
|
-
|
12
|
-
<script type="text/javascript">
|
13
|
-
var rdoc_rel_prefix = "../../";
|
14
|
-
</script>
|
15
|
-
|
16
|
-
<script src="../../js/jquery.js"></script>
|
17
|
-
<script src="../../js/navigation.js"></script>
|
18
|
-
<script src="../../js/search_index.js"></script>
|
19
|
-
<script src="../../js/search.js"></script>
|
20
|
-
<script src="../../js/searcher.js"></script>
|
21
|
-
<script src="../../js/darkfish.js"></script>
|
22
|
-
|
23
|
-
|
24
|
-
<body id="top" role="document" class="class">
|
25
|
-
<nav role="navigation">
|
26
|
-
<div id="project-navigation">
|
27
|
-
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
-
<h2>
|
29
|
-
<a href="../../index.html" rel="home">Home</a>
|
30
|
-
</h2>
|
31
|
-
|
32
|
-
<div id="table-of-contents-navigation">
|
33
|
-
<a href="../../table_of_contents.html#pages">Pages</a>
|
34
|
-
<a href="../../table_of_contents.html#classes">Classes</a>
|
35
|
-
<a href="../../table_of_contents.html#methods">Methods</a>
|
36
|
-
</div>
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
-
<form action="#" method="get" accept-charset="utf-8">
|
41
|
-
<div id="search-field-wrapper">
|
42
|
-
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
-
aria-autocomplete="list" aria-controls="search-results"
|
44
|
-
type="text" name="search" placeholder="Search" spellcheck="false"
|
45
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<ul id="search-results" aria-label="Search Results"
|
49
|
-
aria-busy="false" aria-expanded="false"
|
50
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
-
</form>
|
52
|
-
</div>
|
53
|
-
|
54
|
-
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
<div id="class-metadata">
|
59
|
-
|
60
|
-
<div id="parent-class-section" class="nav-section">
|
61
|
-
<h3>Parent</h3>
|
62
|
-
|
63
|
-
|
64
|
-
<p class="link">GenericWriter
|
65
|
-
|
66
|
-
</div>
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
<!-- Method Quickref -->
|
71
|
-
<div id="method-list-section" class="nav-section">
|
72
|
-
<h3>Methods</h3>
|
73
|
-
|
74
|
-
<ul class="link-list" role="directory">
|
75
|
-
|
76
|
-
<li ><a href="#method-i-filepath">#filepath</a>
|
77
|
-
|
78
|
-
<li ><a href="#method-i-write">#write</a>
|
79
|
-
|
80
|
-
</ul>
|
81
|
-
</div>
|
82
|
-
|
83
|
-
</div>
|
84
|
-
</nav>
|
85
|
-
|
86
|
-
<main role="main" aria-labelledby="class-RubyXL::Writer::ContentTypesWriter">
|
87
|
-
<h1 id="class-RubyXL::Writer::ContentTypesWriter" class="class">
|
88
|
-
class RubyXL::Writer::ContentTypesWriter
|
89
|
-
</h1>
|
90
|
-
|
91
|
-
<section class="description">
|
92
|
-
|
93
|
-
</section>
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
<section id="5Buntitled-5D" class="documentation-section">
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
109
|
-
<header>
|
110
|
-
<h3>Public Instance Methods</h3>
|
111
|
-
</header>
|
112
|
-
|
113
|
-
|
114
|
-
<div id="method-i-filepath" class="method-detail ">
|
115
|
-
|
116
|
-
<div class="method-heading">
|
117
|
-
<span class="method-name">filepath</span><span
|
118
|
-
class="method-args">()</span>
|
119
|
-
|
120
|
-
<span class="method-click-advice">click to toggle source</span>
|
121
|
-
|
122
|
-
</div>
|
123
|
-
|
124
|
-
|
125
|
-
<div class="method-description">
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
<div class="method-source-code" id="filepath-source">
|
133
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/writer/content_types_writer.rb, line 5</span>
|
134
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">filepath</span>
|
135
|
-
<span class="ruby-string">'[Content_Types].xml'</span>
|
136
|
-
<span class="ruby-keyword">end</span></pre>
|
137
|
-
</div>
|
138
|
-
|
139
|
-
</div>
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
</div>
|
145
|
-
|
146
|
-
|
147
|
-
<div id="method-i-write" class="method-detail ">
|
148
|
-
|
149
|
-
<div class="method-heading">
|
150
|
-
<span class="method-name">write</span><span
|
151
|
-
class="method-args">()</span>
|
152
|
-
|
153
|
-
<span class="method-click-advice">click to toggle source</span>
|
154
|
-
|
155
|
-
</div>
|
156
|
-
|
157
|
-
|
158
|
-
<div class="method-description">
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
<div class="method-source-code" id="write-source">
|
166
|
-
<pre><span class="ruby-comment"># File lib/rubyXL/writer/content_types_writer.rb, line 9</span>
|
167
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier">write</span>()
|
168
|
-
|
169
|
-
<span class="ruby-identifier">render_xml</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">xml</span><span class="ruby-operator">|</span>
|
170
|
-
<span class="ruby-identifier">xml</span> <span class="ruby-operator"><<</span> (<span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Types'</span>,
|
171
|
-
<span class="ruby-value">:xmlns</span> =<span class="ruby-operator">></span> <span class="ruby-string">'http://schemas.openxmlformats.org/package/2006/content-types'</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">root</span><span class="ruby-operator">|</span>
|
172
|
-
|
173
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">printer_settings</span>.<span class="ruby-identifier">empty?</span>
|
174
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Default'</span>, {
|
175
|
-
<span class="ruby-value">:Extension</span> =<span class="ruby-operator">></span> <span class="ruby-string">'bin'</span>,
|
176
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings'</span> })
|
177
|
-
<span class="ruby-keyword">end</span>
|
178
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Default'</span>, {
|
179
|
-
<span class="ruby-value">:Extension</span> =<span class="ruby-operator">></span> <span class="ruby-string">'rels'</span>,
|
180
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-package.relationships+xml'</span> })
|
181
|
-
|
182
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Default'</span>, {
|
183
|
-
<span class="ruby-value">:Extension</span> =<span class="ruby-operator">></span> <span class="ruby-string">'xml'</span>,
|
184
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/xml'</span> })
|
185
|
-
|
186
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Default'</span>, {
|
187
|
-
<span class="ruby-value">:Extension</span> =<span class="ruby-operator">></span> <span class="ruby-string">'jpeg'</span>,
|
188
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'image/jpeg'</span> })
|
189
|
-
|
190
|
-
<span class="ruby-comment"># if @workbook.macros.nil? && @workbook.drawings.empty?</span>
|
191
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
192
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/xl/workbook.xml'</span>,
|
193
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml'</span> })
|
194
|
-
<span class="ruby-comment"># else</span>
|
195
|
-
<span class="ruby-comment"># xml.Override('PartName'=>'/xl/workbook.xml',</span>
|
196
|
-
<span class="ruby-comment"># 'ContentType'=>"application/vnd.ms-excel.sheet.macroEnabled.main+xml")</span>
|
197
|
-
<span class="ruby-comment"># end</span>
|
198
|
-
|
199
|
-
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">worksheets</span>.<span class="ruby-identifier">each_with_index</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">sheet</span>,<span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
200
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
201
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/xl/worksheets/sheet#{i+1}.xml"</span>,
|
202
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml'</span> })
|
203
|
-
}
|
204
|
-
|
205
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
206
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/xl/theme/theme1.xml'</span>,
|
207
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.theme+xml'</span> })
|
208
|
-
|
209
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
210
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/xl/styles.xml'</span>,
|
211
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml'</span> })
|
212
|
-
|
213
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">shared_strings_container</span>.<span class="ruby-identifier">empty?</span>
|
214
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
215
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/xl/sharedStrings.xml'</span>,
|
216
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml'</span> })
|
217
|
-
<span class="ruby-keyword">end</span>
|
218
|
-
|
219
|
-
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">drawings</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
220
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
221
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/#{@workbook.drawings.local_dir_path}/#{k}"</span>,
|
222
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.drawing+xml'</span> })
|
223
|
-
<span class="ruby-comment"># xml.Default('Extension'=>'vml',</span>
|
224
|
-
<span class="ruby-comment"># 'ContentType'=>'application/vnd.openxmlformats-officedocument.vmlDrawing')</span>
|
225
|
-
}
|
226
|
-
|
227
|
-
<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">charts</span>.<span class="ruby-identifier">each_pair</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
228
|
-
<span class="ruby-keyword">case</span> <span class="ruby-identifier">k</span>
|
229
|
-
<span class="ruby-keyword">when</span> <span class="ruby-regexp">/^chart\d*.xml$/</span> <span class="ruby-keyword">then</span>
|
230
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
231
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/#{@workbook.charts.local_dir_path}/#{k}"</span>,
|
232
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.drawingml.chart+xml'</span> })
|
233
|
-
<span class="ruby-keyword">when</span> <span class="ruby-regexp">/^style\d*.xml$/</span> <span class="ruby-keyword">then</span>
|
234
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
235
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/#{@workbook.charts.local_dir_path}/#{k}"</span>,
|
236
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.ms-office.chartstyle+xml'</span> })
|
237
|
-
<span class="ruby-keyword">when</span> <span class="ruby-regexp">/^colors\d*.xml$/</span> <span class="ruby-keyword">then</span>
|
238
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
239
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/#{@workbook.charts.local_dir_path}/#{k}"</span>,
|
240
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.ms-office.chartcolorstyle+xml'</span> })
|
241
|
-
<span class="ruby-keyword">end</span>
|
242
|
-
}
|
243
|
-
|
244
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
245
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/docProps/core.xml'</span>,
|
246
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-package.core-properties+xml'</span> })
|
247
|
-
|
248
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
249
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/docProps/app.xml'</span>,
|
250
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.extended-properties+xml'</span> })
|
251
|
-
|
252
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">external_links</span>.<span class="ruby-identifier">nil?</span>
|
253
|
-
<span class="ruby-value">1</span>.<span class="ruby-identifier">upto</span>(<span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">external_links</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
|
254
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
255
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-node">"/xl/externalLinks/externalLink#{i}.xml"</span>,
|
256
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml'</span> })
|
257
|
-
<span class="ruby-keyword">end</span>
|
258
|
-
<span class="ruby-keyword">end</span>
|
259
|
-
|
260
|
-
<span class="ruby-keyword">unless</span> <span class="ruby-ivar">@workbook</span>.<span class="ruby-identifier">macros</span>.<span class="ruby-identifier">nil?</span>
|
261
|
-
<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">xml</span>.<span class="ruby-identifier">create_element</span>(<span class="ruby-string">'Override'</span>, {
|
262
|
-
<span class="ruby-value">:PartName</span> =<span class="ruby-operator">></span> <span class="ruby-string">'/xl/vbaProject.bin'</span>,
|
263
|
-
<span class="ruby-value">:ContentType</span> =<span class="ruby-operator">></span> <span class="ruby-string">'application/vnd.ms-office.vbaProject'</span> })
|
264
|
-
<span class="ruby-keyword">end</span>
|
265
|
-
})
|
266
|
-
<span class="ruby-keyword">end</span>
|
267
|
-
<span class="ruby-keyword">end</span></pre>
|
268
|
-
</div>
|
269
|
-
|
270
|
-
</div>
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
</div>
|
276
|
-
|
277
|
-
|
278
|
-
</section>
|
279
|
-
|
280
|
-
</section>
|
281
|
-
</main>
|
282
|
-
|
283
|
-
|
284
|
-
<footer id="validator-badges" role="contentinfo">
|
285
|
-
<p><a href="http://validator.w3.org/check/referer">Validate</a>
|
286
|
-
<p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1.
|
287
|
-
<p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
288
|
-
</footer>
|
289
|
-
|