openxml-docx 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/examples/drawing-ml +1 -1
  4. data/examples/image-embedding +141 -0
  5. data/examples/ochanomizu.jpg +0 -0
  6. data/lib/openxml/docx.rb +8 -0
  7. data/lib/openxml/docx/attribute_builder.rb +11 -1
  8. data/lib/openxml/docx/elements/book_fold_printing.rb +12 -0
  9. data/lib/openxml/docx/elements/book_fold_printing_sheets.rb +12 -0
  10. data/lib/openxml/docx/elements/book_fold_reverse_printing.rb +12 -0
  11. data/lib/openxml/docx/elements/drawing.rb +1 -1
  12. data/lib/openxml/docx/elements/embed_system_fonts.rb +14 -0
  13. data/lib/openxml/docx/elements/embed_true_type_fonts.rb +14 -0
  14. data/lib/openxml/docx/elements/font_alternate_name.rb +15 -0
  15. data/lib/openxml/docx/elements/font_character_set.rb +15 -0
  16. data/lib/openxml/docx/elements/font_panose_one.rb +15 -0
  17. data/lib/openxml/docx/elements/font_pitch.rb +15 -0
  18. data/lib/openxml/docx/elements/font_sig.rb +20 -0
  19. data/lib/openxml/docx/elements/save_subset_fonts.rb +14 -0
  20. data/lib/openxml/docx/elements/word_processing_drawing_anchor.rb +13 -11
  21. data/lib/openxml/docx/elements/word_processing_drawing_object_nv_properties.rb +1 -1
  22. data/lib/openxml/docx/elements/word_processing_drawing_position_h.rb +1 -11
  23. data/lib/openxml/docx/elements/word_processing_drawing_position_offset.rb +18 -1
  24. data/lib/openxml/docx/elements/word_processing_drawing_position_v.rb +1 -11
  25. data/lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb +26 -0
  26. data/lib/openxml/docx/elements/word_processing_drawing_wrap_polygon.rb +13 -0
  27. data/lib/openxml/docx/elements/word_processing_drawing_wrap_square.rb +17 -0
  28. data/lib/openxml/docx/elements/word_processing_drawing_wrap_through.rb +15 -0
  29. data/lib/openxml/docx/elements/word_processing_drawing_wrap_tight.rb +15 -0
  30. data/lib/openxml/docx/elements/word_processing_drawing_wrap_top_and_bottom.rb +14 -0
  31. data/lib/openxml/docx/elements/word_processing_groups_group_shape_properties.rb +13 -0
  32. data/lib/openxml/docx/elements/word_processing_groups_nv_shape_drawing_properties.rb +11 -0
  33. data/lib/openxml/docx/elements/word_processing_shapes_nv_drawing_properties.rb +17 -0
  34. data/lib/openxml/docx/package.rb +39 -13
  35. data/lib/openxml/docx/parts/document.rb +3 -2
  36. data/lib/openxml/docx/parts/fonts.rb +2 -1
  37. data/lib/openxml/docx/parts/footer.rb +2 -1
  38. data/lib/openxml/docx/parts/header.rb +2 -1
  39. data/lib/openxml/docx/parts/settings.rb +5 -0
  40. data/lib/openxml/docx/properties/tabs.rb +2 -0
  41. data/lib/openxml/docx/root_namespaces.rb +1 -1
  42. data/lib/openxml/docx/version.rb +1 -1
  43. data/lib/openxml/drawingml/elements/blip.rb +18 -0
  44. data/lib/openxml/drawingml/elements/blip_fill.rb +1 -1
  45. data/lib/openxml/drawingml/elements/fill_rectangle.rb +16 -0
  46. data/lib/openxml/drawingml/elements/graphic_frame_locks.rb +6 -6
  47. data/lib/openxml/drawingml/elements/non_visual_drawing_properties.rb +1 -1
  48. data/lib/openxml/drawingml/elements/picture_locks.rb +23 -0
  49. data/lib/openxml/drawingml/elements/picture_shape_properties.rb +13 -0
  50. data/lib/openxml/drawingml/elements/source_rectangle.rb +16 -0
  51. data/lib/openxml/drawingml/elements/stretch.rb +10 -0
  52. data/spec/elements/book_fold_printing_sheets_spec.rb +27 -0
  53. data/spec/elements/book_fold_printing_spec.rb +19 -0
  54. data/spec/elements/book_fold_reverse_printing_spec.rb +19 -0
  55. data/spec/elements/drawingml/blip_fill_spec.rb +8 -3
  56. data/spec/elements/drawingml/blip_spec.rb +47 -0
  57. data/spec/elements/drawingml/fill_rectangle_spec.rb +76 -0
  58. data/spec/elements/drawingml/graphic_frame_locks_spec.rb +47 -18
  59. data/spec/elements/drawingml/non_visual_drawing_properties_spec.rb +8 -3
  60. data/spec/elements/drawingml/non_visual_picture_drawing_properties_spec.rb +7 -2
  61. data/spec/elements/drawingml/picture_locks_spec.rb +122 -0
  62. data/spec/elements/drawingml/picture_shape_properties_spec.rb +21 -0
  63. data/spec/elements/drawingml/source_rectangle_spec.rb +76 -0
  64. data/spec/elements/drawingml/stretch_spec.rb +8 -0
  65. data/spec/elements/embed_system_fonts_spec.rb +19 -0
  66. data/spec/elements/embed_true_type_fonts_spec.rb +19 -0
  67. data/spec/elements/font_alternate_name_spec.rb +19 -0
  68. data/spec/elements/font_character_set_spec.rb +19 -0
  69. data/spec/elements/font_panose_one_spec.rb +19 -0
  70. data/spec/elements/font_pitch_spec.rb +21 -0
  71. data/spec/elements/font_sig_spec.rb +74 -0
  72. data/spec/elements/save_subset_fonts_spec.rb +19 -0
  73. data/spec/elements/word_processing_drawing_anchor_spec.rb +107 -25
  74. data/spec/elements/word_processing_drawing_object_nv_properties_spec.rb +1 -1
  75. data/spec/elements/word_processing_drawing_position_h_spec.rb +6 -5
  76. data/spec/elements/word_processing_drawing_position_v_spec.rb +6 -5
  77. data/spec/elements/word_processing_drawing_wrap_coordinate_spec.rb +40 -0
  78. data/spec/elements/word_processing_drawing_wrap_polygon_spec.rb +23 -0
  79. data/spec/elements/word_processing_drawing_wrap_square_spec.rb +65 -0
  80. data/spec/elements/word_processing_drawing_wrap_through_spec.rb +43 -0
  81. data/spec/elements/word_processing_drawing_wrap_tight_spec.rb +43 -0
  82. data/spec/elements/word_processing_drawing_wrap_top_and_bottom_spec.rb +30 -0
  83. data/spec/elements/word_processing_groups_group_shape_properties_spec.rb +21 -0
  84. data/spec/elements/word_processing_groups_nv_shape_drawing_properties_spec.rb +8 -0
  85. data/spec/elements/word_processing_shapes_nv_drawing_properties_spec.rb +64 -0
  86. data/spec/package_spec.rb +2 -2
  87. data/spec/parts/settings_spec.rb +6 -0
  88. data/spec/properties/table_border_spec.rb +2 -2
  89. data/spec/properties/table_cell_border_spec.rb +2 -2
  90. data/spec/style_spec.rb +2 -2
  91. data/spec/support/data/parts/document_with_children_part.xml +1 -1
  92. data/spec/support/data/parts/document_with_multiple_sections_part.xml +1 -1
  93. data/spec/support/data/parts/document_with_one_section_part.xml +1 -1
  94. data/spec/support/data/parts/empty_document_part.xml +1 -1
  95. data/spec/support/data/parts/settings_part.xml +1 -1
  96. data/spec/support/property_test_macros.rb +1 -1
  97. metadata +56 -2
@@ -0,0 +1,21 @@
1
+ require "spec_helper"
2
+
3
+ describe OpenXml::Docx::Elements::WordProcessingGroupsGroupShapeProperties do
4
+ include ElementTestMacros
5
+
6
+ it_should_use tag: :grpSpPr, name: "word_processing_groups_group_shape_properties"
7
+
8
+ for_attribute(:bw_mode) do
9
+ %i(auto black blackGray blackWhite clr gray grayWhite hidden invGray ltGray white).each do |good_value|
10
+ with_value(good_value) do
11
+ it_should_assign_successfully
12
+ it_should_output "<wpg:grpSpPr bwMode=\"#{good_value}\"/>"
13
+ end
14
+ end
15
+
16
+ with_value(:no_good) do
17
+ it_should_raise_an_exception
18
+ end
19
+ end
20
+
21
+ end
@@ -0,0 +1,8 @@
1
+ require "spec_helper"
2
+
3
+ describe OpenXml::Docx::Elements::WordProcessingGroupsNvShapeDrawingProperties do
4
+ include ElementTestMacros
5
+
6
+ it_should_use tag: :cNvGrpSpPr, name: "word_processing_groups_nv_shape_drawing_properties"
7
+
8
+ end
@@ -0,0 +1,64 @@
1
+ require "spec_helper"
2
+
3
+ describe OpenXml::Docx::Elements::WordProcessingShapesNvDrawingProperties do
4
+ include ElementTestMacros
5
+
6
+ it_should_use tag: :cNvPr, name: "word_processing_shapes_nv_drawing_properties"
7
+
8
+ for_attribute(:description) do
9
+ with_value("String") do
10
+ it_should_assign_successfully
11
+ it_should_output "<wps:cNvPr descr=\"String\"/>"
12
+ end
13
+
14
+ with_value(:not_a_string) do
15
+ it_should_raise_an_exception
16
+ end
17
+ end
18
+
19
+ for_attribute(:hidden) do
20
+ with_value(true) do
21
+ it_should_assign_successfully
22
+ it_should_output "<wps:cNvPr hidden=\"true\"/>"
23
+ end
24
+
25
+ with_value(:not_a_boolean) do
26
+ it_should_raise_an_exception
27
+ end
28
+ end
29
+
30
+ for_attribute(:id) do
31
+ with_value(1) do
32
+ it_should_assign_successfully
33
+ it_should_output "<wps:cNvPr id=\"1\"/>"
34
+ end
35
+
36
+ with_values([:not_a_number, -1, 1.1]) do
37
+ it_should_raise_an_exception
38
+ end
39
+ end
40
+
41
+ for_attribute(:object_name) do
42
+ with_value("String") do
43
+ it_should_assign_successfully
44
+ it_should_output "<wps:cNvPr name=\"String\"/>"
45
+ end
46
+
47
+ with_value(:not_a_string) do
48
+ it_should_raise_an_exception
49
+ end
50
+ end
51
+
52
+ for_attribute(:title) do
53
+ with_value("String") do
54
+ it_should_assign_successfully
55
+ it_should_output "<wps:cNvPr title=\"String\"/>"
56
+ end
57
+
58
+ with_value(:not_a_string) do
59
+ it_should_raise_an_exception
60
+ end
61
+ end
62
+
63
+
64
+ end
data/spec/package_spec.rb CHANGED
@@ -20,8 +20,8 @@ describe OpenXml::Docx::Package do
20
20
  expect(package.rels).to be_instance_of(OpenXml::Parts::Rels)
21
21
  end
22
22
 
23
- it "should create the _rels part" do
24
- expect(package.doc_rels).to be_instance_of(OpenXml::Parts::Rels)
23
+ it "should create the document's _rels part" do
24
+ expect(package.document.relationships).to be_instance_of(OpenXml::Parts::Rels)
25
25
  end
26
26
 
27
27
  it "should create the settings part" do
@@ -6,6 +6,12 @@ describe OpenXml::Docx::Parts::Settings do
6
6
  context "always" do
7
7
  before(:each) do
8
8
  @doc = described_class.new
9
+ booklet_printing = OpenXml::Docx::Elements::BookFoldPrinting.new
10
+ booklet_printing.value = true
11
+ @doc << booklet_printing
12
+ booklet_pagecount = OpenXml::Docx::Elements::BookFoldPrintingSheets.new
13
+ booklet_pagecount.value = 4
14
+ @doc << booklet_pagecount
9
15
  end
10
16
 
11
17
  it_should_output_correct_xml
@@ -39,7 +39,7 @@ describe OpenXml::Docx::Properties::TableBorder do
39
39
 
40
40
  with_value(false) do
41
41
  it_should_assign_successfully :bottom, :babyPacifier
42
- it_should_output "<w:bottom w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
42
+ it_should_output "<w:bottom w:frame=\"false\" w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
43
43
  end
44
44
 
45
45
  it_should_not_allow_invalid_value
@@ -53,7 +53,7 @@ describe OpenXml::Docx::Properties::TableBorder do
53
53
 
54
54
  with_value(false) do
55
55
  it_should_assign_successfully :bottom, :babyPacifier
56
- it_should_output "<w:bottom w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
56
+ it_should_output "<w:bottom w:shadow=\"false\" w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
57
57
  end
58
58
 
59
59
  it_should_not_allow_invalid_value
@@ -39,7 +39,7 @@ describe OpenXml::Docx::Properties::TableCellBorder do
39
39
 
40
40
  with_value(false) do
41
41
  it_should_assign_successfully :bottom, :babyPacifier
42
- it_should_output "<w:bottom w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
42
+ it_should_output "<w:bottom w:frame=\"false\" w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
43
43
  end
44
44
 
45
45
  it_should_not_allow_invalid_value
@@ -53,7 +53,7 @@ describe OpenXml::Docx::Properties::TableCellBorder do
53
53
 
54
54
  with_value(false) do
55
55
  it_should_assign_successfully :bottom, :babyPacifier
56
- it_should_output "<w:bottom w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
56
+ it_should_output "<w:bottom w:shadow=\"false\" w:val=\"babyPacifier\"/>", :bottom, :babyPacifier
57
57
  end
58
58
 
59
59
  it_should_not_allow_invalid_value
data/spec/style_spec.rb CHANGED
@@ -13,7 +13,7 @@ describe OpenXml::Docx::Style do
13
13
 
14
14
  with_value(false) do
15
15
  it_should_assign_successfully :paragraph
16
- it_should_output "<w:style w:type=\"paragraph\"/>", :paragraph
16
+ it_should_output "<w:style w:customStyle=\"false\" w:type=\"paragraph\"/>", :paragraph
17
17
  end
18
18
 
19
19
  with_value(:maybe) do
@@ -29,7 +29,7 @@ describe OpenXml::Docx::Style do
29
29
 
30
30
  with_value(false) do
31
31
  it_should_assign_successfully :paragraph
32
- it_should_output "<w:style w:type=\"paragraph\"/>", :paragraph
32
+ it_should_output "<w:style w:default=\"false\" w:type=\"paragraph\"/>", :paragraph
33
33
  end
34
34
 
35
35
  with_value(:maybe) do
@@ -1,2 +1,2 @@
1
- <?xml version="1.0" encoding="utf-8"?><w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://purl.oclc.org/ooxml/drawingml/main"><w:body><w:p><w:r><w:t>This is just a test run.</w:t></w:r><w:r><w:t>But this isn&apos;t!</w:t></w:r></w:p></w:body></w:document>
1
+ <?xml version="1.0" encoding="utf-8"?><w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><w:body><w:p><w:r><w:t>This is just a test run.</w:t></w:r><w:r><w:t>But this isn&apos;t!</w:t></w:r></w:p></w:body></w:document>
2
2
 
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://purl.oclc.org/ooxml/drawingml/main">
2
+ <w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
3
3
  <w:body>
4
4
  <w:p>
5
5
  <w:sectPr>
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="utf-8"?>
2
- <w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://purl.oclc.org/ooxml/drawingml/main">
2
+ <w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture">
3
3
  <w:body>
4
4
  <w:p>
5
5
  <w:r>
@@ -1 +1 @@
1
- <?xml version="1.0" encoding="utf-8"?><w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://purl.oclc.org/ooxml/drawingml/main"><w:body/></w:document>
1
+ <?xml version="1.0" encoding="utf-8"?><w:document mc:Ignorable="w14 wp14 a14" xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mo="http://schemas.microsoft.com/office/mac/office/2008/main" xmlns:mv="urn:schemas-microsoft-com:mac:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><w:body/></w:document>
@@ -1 +1 @@
1
- <?xml version="1.0" encoding="utf-8" standalone="yes"?><w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"/>
1
+ <?xml version="1.0" encoding="utf-8" standalone="yes"?><w:settings xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"><w:bookFoldPrinting w:val="true"/><w:bookFoldPrintingSheets w:val="4"/></w:settings>
@@ -141,7 +141,7 @@ module PropertyTestMacros
141
141
 
142
142
  with_value(false) do
143
143
  it_should_assign_successfully
144
- it_should_output ""
144
+ it_should_output_expected_xml
145
145
  end
146
146
  end
147
147
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openxml-docx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene Doyel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-15 00:00:00.000000000 Z
11
+ date: 2015-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -138,6 +138,8 @@ files:
138
138
  - Rakefile
139
139
  - examples/base
140
140
  - examples/drawing-ml
141
+ - examples/image-embedding
142
+ - examples/ochanomizu.jpg
141
143
  - examples/table
142
144
  - lib/openxml-docx.rb
143
145
  - lib/openxml/docx.rb
@@ -146,6 +148,9 @@ files:
146
148
  - lib/openxml/docx/elements/absolute_position_tab.rb
147
149
  - lib/openxml/docx/elements/bidi_embed.rb
148
150
  - lib/openxml/docx/elements/bidi_override.rb
151
+ - lib/openxml/docx/elements/book_fold_printing.rb
152
+ - lib/openxml/docx/elements/book_fold_printing_sheets.rb
153
+ - lib/openxml/docx/elements/book_fold_reverse_printing.rb
149
154
  - lib/openxml/docx/elements/break.rb
150
155
  - lib/openxml/docx/elements/carriage_return.rb
151
156
  - lib/openxml/docx/elements/container.rb
@@ -159,8 +164,15 @@ files:
159
164
  - lib/openxml/docx/elements/embed_bold_italic.rb
160
165
  - lib/openxml/docx/elements/embed_italic.rb
161
166
  - lib/openxml/docx/elements/embed_regular.rb
167
+ - lib/openxml/docx/elements/embed_system_fonts.rb
168
+ - lib/openxml/docx/elements/embed_true_type_fonts.rb
162
169
  - lib/openxml/docx/elements/family.rb
163
170
  - lib/openxml/docx/elements/font.rb
171
+ - lib/openxml/docx/elements/font_alternate_name.rb
172
+ - lib/openxml/docx/elements/font_character_set.rb
173
+ - lib/openxml/docx/elements/font_panose_one.rb
174
+ - lib/openxml/docx/elements/font_pitch.rb
175
+ - lib/openxml/docx/elements/font_sig.rb
164
176
  - lib/openxml/docx/elements/grid_column.rb
165
177
  - lib/openxml/docx/elements/group_shape.rb
166
178
  - lib/openxml/docx/elements/last_rendered_page_break.rb
@@ -177,6 +189,7 @@ files:
177
189
  - lib/openxml/docx/elements/paragraph.rb
178
190
  - lib/openxml/docx/elements/ruby.rb
179
191
  - lib/openxml/docx/elements/run.rb
192
+ - lib/openxml/docx/elements/save_subset_fonts.rb
180
193
  - lib/openxml/docx/elements/section_properties.rb
181
194
  - lib/openxml/docx/elements/short_day.rb
182
195
  - lib/openxml/docx/elements/short_month.rb
@@ -198,8 +211,17 @@ files:
198
211
  - lib/openxml/docx/elements/word_processing_drawing_position_offset.rb
199
212
  - lib/openxml/docx/elements/word_processing_drawing_position_v.rb
200
213
  - lib/openxml/docx/elements/word_processing_drawing_simple_position.rb
214
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_coordinate.rb
201
215
  - lib/openxml/docx/elements/word_processing_drawing_wrap_none.rb
216
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_polygon.rb
217
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_square.rb
218
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_through.rb
219
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_tight.rb
220
+ - lib/openxml/docx/elements/word_processing_drawing_wrap_top_and_bottom.rb
221
+ - lib/openxml/docx/elements/word_processing_groups_group_shape_properties.rb
222
+ - lib/openxml/docx/elements/word_processing_groups_nv_shape_drawing_properties.rb
202
223
  - lib/openxml/docx/elements/word_processing_shapes_body_properties.rb
224
+ - lib/openxml/docx/elements/word_processing_shapes_nv_drawing_properties.rb
203
225
  - lib/openxml/docx/elements/word_processing_shapes_shape.rb
204
226
  - lib/openxml/docx/elements/word_processing_shapes_shape_properties.rb
205
227
  - lib/openxml/docx/package.rb
@@ -370,10 +392,12 @@ files:
370
392
  - lib/openxml/drawingml.rb
371
393
  - lib/openxml/drawingml/elements.rb
372
394
  - lib/openxml/drawingml/elements/adjust_values_list.rb
395
+ - lib/openxml/drawingml/elements/blip.rb
373
396
  - lib/openxml/drawingml/elements/blip_fill.rb
374
397
  - lib/openxml/drawingml/elements/extension.rb
375
398
  - lib/openxml/drawingml/elements/extension_list.rb
376
399
  - lib/openxml/drawingml/elements/extents.rb
400
+ - lib/openxml/drawingml/elements/fill_rectangle.rb
377
401
  - lib/openxml/drawingml/elements/graphic.rb
378
402
  - lib/openxml/drawingml/elements/graphic_data.rb
379
403
  - lib/openxml/drawingml/elements/graphic_frame_locks.rb
@@ -385,11 +409,15 @@ files:
385
409
  - lib/openxml/drawingml/elements/offset.rb
386
410
  - lib/openxml/drawingml/elements/outline.rb
387
411
  - lib/openxml/drawingml/elements/picture.rb
412
+ - lib/openxml/drawingml/elements/picture_locks.rb
413
+ - lib/openxml/drawingml/elements/picture_shape_properties.rb
388
414
  - lib/openxml/drawingml/elements/preset_geometry.rb
389
415
  - lib/openxml/drawingml/elements/round.rb
390
416
  - lib/openxml/drawingml/elements/shape_guide.rb
391
417
  - lib/openxml/drawingml/elements/solid_fill.rb
418
+ - lib/openxml/drawingml/elements/source_rectangle.rb
392
419
  - lib/openxml/drawingml/elements/srgb_color.rb
420
+ - lib/openxml/drawingml/elements/stretch.rb
393
421
  - lib/openxml/drawingml/elements/tail_end.rb
394
422
  - lib/openxml/drawingml/elements/transform_effect.rb
395
423
  - lib/openxml/drawingml/elements/wordprocessing_shape_group.rb
@@ -402,6 +430,9 @@ files:
402
430
  - spec/elements/absolute_position_tab_spec.rb
403
431
  - spec/elements/bidi_embed_spec.rb
404
432
  - spec/elements/bidi_override_spec.rb
433
+ - spec/elements/book_fold_printing_sheets_spec.rb
434
+ - spec/elements/book_fold_printing_spec.rb
435
+ - spec/elements/book_fold_reverse_printing_spec.rb
405
436
  - spec/elements/break_spec.rb
406
437
  - spec/elements/carriage_return_spec.rb
407
438
  - spec/elements/content_part_spec.rb
@@ -411,9 +442,11 @@ files:
411
442
  - spec/elements/drawing_spec.rb
412
443
  - spec/elements/drawingml/adjust_values_list_spec.rb
413
444
  - spec/elements/drawingml/blip_fill_spec.rb
445
+ - spec/elements/drawingml/blip_spec.rb
414
446
  - spec/elements/drawingml/extension_list_spec.rb
415
447
  - spec/elements/drawingml/extension_spec.rb
416
448
  - spec/elements/drawingml/extents_spec.rb
449
+ - spec/elements/drawingml/fill_rectangle_spec.rb
417
450
  - spec/elements/drawingml/graphic_data_spec.rb
418
451
  - spec/elements/drawingml/graphic_frame_locks_spec.rb
419
452
  - spec/elements/drawingml/graphic_spec.rb
@@ -424,15 +457,26 @@ files:
424
457
  - spec/elements/drawingml/non_visual_picture_properties_spec.rb
425
458
  - spec/elements/drawingml/offset_spec.rb
426
459
  - spec/elements/drawingml/outline_spec.rb
460
+ - spec/elements/drawingml/picture_locks_spec.rb
461
+ - spec/elements/drawingml/picture_shape_properties_spec.rb
427
462
  - spec/elements/drawingml/picture_spec.rb
428
463
  - spec/elements/drawingml/preset_geometry_spec.rb
429
464
  - spec/elements/drawingml/round_spec.rb
430
465
  - spec/elements/drawingml/shape_guide_spec.rb
431
466
  - spec/elements/drawingml/solid_fill_spec.rb
467
+ - spec/elements/drawingml/source_rectangle_spec.rb
432
468
  - spec/elements/drawingml/srgb_color_spec.rb
469
+ - spec/elements/drawingml/stretch_spec.rb
433
470
  - spec/elements/drawingml/tail_end_spec.rb
434
471
  - spec/elements/drawingml/transform_effect_spec.rb
435
472
  - spec/elements/drawingml/wordprocessing_shape_group_spec.rb
473
+ - spec/elements/embed_system_fonts_spec.rb
474
+ - spec/elements/embed_true_type_fonts_spec.rb
475
+ - spec/elements/font_alternate_name_spec.rb
476
+ - spec/elements/font_character_set_spec.rb
477
+ - spec/elements/font_panose_one_spec.rb
478
+ - spec/elements/font_pitch_spec.rb
479
+ - spec/elements/font_sig_spec.rb
436
480
  - spec/elements/grid_column_spec.rb
437
481
  - spec/elements/group_shape_spec.rb
438
482
  - spec/elements/last_rendered_page_break_spec.rb
@@ -448,6 +492,7 @@ files:
448
492
  - spec/elements/paragraph_spec.rb
449
493
  - spec/elements/ruby_spec.rb
450
494
  - spec/elements/run_spec.rb
495
+ - spec/elements/save_subset_fonts_spec.rb
451
496
  - spec/elements/section_properties_spec.rb
452
497
  - spec/elements/short_day_spec.rb
453
498
  - spec/elements/short_month_spec.rb
@@ -471,8 +516,17 @@ files:
471
516
  - spec/elements/word_processing_drawing_position_h_spec.rb
472
517
  - spec/elements/word_processing_drawing_position_v_spec.rb
473
518
  - spec/elements/word_processing_drawing_simple_position_spec.rb
519
+ - spec/elements/word_processing_drawing_wrap_coordinate_spec.rb
474
520
  - spec/elements/word_processing_drawing_wrap_none_spec.rb
521
+ - spec/elements/word_processing_drawing_wrap_polygon_spec.rb
522
+ - spec/elements/word_processing_drawing_wrap_square_spec.rb
523
+ - spec/elements/word_processing_drawing_wrap_through_spec.rb
524
+ - spec/elements/word_processing_drawing_wrap_tight_spec.rb
525
+ - spec/elements/word_processing_drawing_wrap_top_and_bottom_spec.rb
526
+ - spec/elements/word_processing_groups_group_shape_properties_spec.rb
527
+ - spec/elements/word_processing_groups_nv_shape_drawing_properties_spec.rb
475
528
  - spec/elements/word_processing_shapes_body_properties_spec.rb
529
+ - spec/elements/word_processing_shapes_nv_drawing_properties_spec.rb
476
530
  - spec/elements/word_processing_shapes_shape_properties_spec.rb
477
531
  - spec/elements/word_processing_shapes_shape_spec.rb
478
532
  - spec/package_spec.rb