puredocx 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/puredocx.rb +43 -0
- data/lib/puredocx/constructors/image_size.rb +49 -0
- data/lib/puredocx/constructors/rels.rb +57 -0
- data/lib/puredocx/constructors/table_column.rb +45 -0
- data/lib/puredocx/doc_archive.rb +106 -0
- data/lib/puredocx/document.rb +49 -0
- data/lib/puredocx/exceptions.rb +7 -0
- data/lib/puredocx/xml_generators/base.rb +24 -0
- data/lib/puredocx/xml_generators/cell.rb +23 -0
- data/lib/puredocx/xml_generators/image.rb +89 -0
- data/lib/puredocx/xml_generators/row.rb +28 -0
- data/lib/puredocx/xml_generators/table.rb +94 -0
- data/lib/puredocx/xml_generators/text.rb +34 -0
- data/lib/template/[Content_Types].xml +2 -0
- data/lib/template/brake.xml +1 -0
- data/lib/template/docProps/app.xml +2 -0
- data/lib/template/docProps/core.xml +2 -0
- data/lib/template/float_image.xml +1 -0
- data/lib/template/image.xml +1 -0
- data/lib/template/new_page.xml +1 -0
- data/lib/template/paragraph.xml +1 -0
- data/lib/template/table/cells.xml +1 -0
- data/lib/template/table/rows.xml +1 -0
- data/lib/template/table/table.xml +1 -0
- data/lib/template/word/document.xml +2 -0
- data/lib/template/word/endnotes.xml +2 -0
- data/lib/template/word/fontTable.xml +2 -0
- data/lib/template/word/footer1.xml +2 -0
- data/lib/template/word/footnotes.xml +2 -0
- data/lib/template/word/header1.xml +2 -0
- data/lib/template/word/settings.xml +2 -0
- data/lib/template/word/styles.xml +2 -0
- data/lib/template/word/theme/theme1.xml +2 -0
- data/lib/template/word/webSettings.xml +2 -0
- metadata +135 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: aeba1f5235a529c2476286d7febe4abf9b8bc518
|
4
|
+
data.tar.gz: f37e4e62ef885058218ff47761d6f67b0ea42a44
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0e54b76f1b656f5115a6b64c79ace96e92bfc342e67283f411ad5a4ad97f7bd0fba51d87ceef0e8e3aa065f0474736e57534f44258901b3b41187b25ba50aa31
|
7
|
+
data.tar.gz: 4a5671c02709f64676d495befcafbd9d229613ccc984fab85acb867a82e521797e7a58271c97f1d48361c02868328d6cd3230369bddcc58764d7148452298d22
|
data/lib/puredocx.rb
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'securerandom'
|
3
|
+
require 'fastimage'
|
4
|
+
require 'zip'
|
5
|
+
|
6
|
+
module PureDocx
|
7
|
+
def self.included(base)
|
8
|
+
base.extend ClassMethods
|
9
|
+
end
|
10
|
+
|
11
|
+
module ClassMethods
|
12
|
+
def create(file_path, options = {})
|
13
|
+
doc = Document.new(file_path, options)
|
14
|
+
|
15
|
+
yield doc if block_given?
|
16
|
+
|
17
|
+
doc.save!
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class Basement
|
22
|
+
include PureDocx
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.create(*args, &block)
|
26
|
+
Basement.create(*args, &block)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
require_relative 'puredocx/document'
|
31
|
+
require_relative 'puredocx/doc_archive'
|
32
|
+
require_relative 'puredocx/exceptions'
|
33
|
+
|
34
|
+
require_relative 'puredocx/constructors/rels'
|
35
|
+
require_relative 'puredocx/constructors/image_size'
|
36
|
+
require_relative 'puredocx/constructors/table_column'
|
37
|
+
|
38
|
+
require_relative 'puredocx/xml_generators/base'
|
39
|
+
require_relative 'puredocx/xml_generators/image'
|
40
|
+
require_relative 'puredocx/xml_generators/text'
|
41
|
+
require_relative 'puredocx/xml_generators/table'
|
42
|
+
require_relative 'puredocx/xml_generators/row'
|
43
|
+
require_relative 'puredocx/xml_generators/cell'
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module Constructors
|
3
|
+
class ImageSize
|
4
|
+
MAX_IMAGE_WIDTH = 650
|
5
|
+
PX_EMU = 8625
|
6
|
+
|
7
|
+
attr_reader :width, :height, :real_width, :real_height
|
8
|
+
|
9
|
+
def initialize(arguments = {})
|
10
|
+
@width, @height = arguments[:user_params]
|
11
|
+
@real_width, @real_height = arguments[:real_params]
|
12
|
+
end
|
13
|
+
|
14
|
+
def prepare_size
|
15
|
+
new_width, new_height = set_new_size_params
|
16
|
+
new_width, new_height = scaled_params(new_width, new_height) if new_width > MAX_IMAGE_WIDTH
|
17
|
+
{ width: new_width, height: new_height }.map { |key, value| [key, (value * PX_EMU)] }.to_h
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def set_new_size_params
|
23
|
+
return [real_width, real_height] if image_size_params_nil?
|
24
|
+
return [width, height] if image_size_params_present?
|
25
|
+
calculate_params
|
26
|
+
end
|
27
|
+
|
28
|
+
def image_size_params_nil?
|
29
|
+
[height, width].all?(&:nil?)
|
30
|
+
end
|
31
|
+
|
32
|
+
def image_size_params_present?
|
33
|
+
[height, width].none?(&:nil?)
|
34
|
+
end
|
35
|
+
|
36
|
+
def calculate_params
|
37
|
+
[
|
38
|
+
(width || height * real_width / real_height),
|
39
|
+
(height || width * real_height / real_width)
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
def scaled_params(width, height)
|
44
|
+
size_factor = width.to_f / MAX_IMAGE_WIDTH
|
45
|
+
[width, height].map { |value| size_factor > 1 ? (value / size_factor).to_i : value }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module Constructors
|
3
|
+
class Rels
|
4
|
+
DOCUMENT_RELATIONSHIPS = 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/'.freeze
|
5
|
+
PACKAGE__RELATIONSHIPS = 'http://schemas.openxmlformats.org/package/2006/relationships/'.freeze
|
6
|
+
BASIC_RELS = {
|
7
|
+
'docProps/core.xml' => "#{PACKAGE__RELATIONSHIPS}metadata/core-properties",
|
8
|
+
'docProps/app.xml' => "#{DOCUMENT_RELATIONSHIPS}extended-properties"
|
9
|
+
}.freeze
|
10
|
+
WORD_RELS = {
|
11
|
+
'endnotes.xml' => "#{DOCUMENT_RELATIONSHIPS}endnotes",
|
12
|
+
'footnotes.xml' => "#{DOCUMENT_RELATIONSHIPS}footnotes",
|
13
|
+
'header1.xml' => "#{DOCUMENT_RELATIONSHIPS}header",
|
14
|
+
'footer1.xml' => "#{DOCUMENT_RELATIONSHIPS}footer",
|
15
|
+
'styles.xml' => "#{DOCUMENT_RELATIONSHIPS}styles",
|
16
|
+
'settings.xml' => "#{DOCUMENT_RELATIONSHIPS}settings",
|
17
|
+
'webSettings.xml' => "#{DOCUMENT_RELATIONSHIPS}webSettings",
|
18
|
+
'fontTable.xml' => "#{DOCUMENT_RELATIONSHIPS}fontTable",
|
19
|
+
'theme/theme1.xml' => "#{DOCUMENT_RELATIONSHIPS}theme"
|
20
|
+
}.freeze
|
21
|
+
|
22
|
+
attr_accessor :basic_rels, :word_rels, :header_rels
|
23
|
+
|
24
|
+
def initialize
|
25
|
+
@basic_rels = BASIC_RELS.dup
|
26
|
+
@word_rels = WORD_RELS.dup
|
27
|
+
@header_rels = {}
|
28
|
+
end
|
29
|
+
|
30
|
+
def rels
|
31
|
+
{
|
32
|
+
basic_rels: basic_rels,
|
33
|
+
word_rels: word_rels,
|
34
|
+
header_rels: header_rels
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
def prepare_basic_rels!
|
39
|
+
basic_rels.merge!('word/document.xml' => "#{DOCUMENT_RELATIONSHIPS}officeDocument")
|
40
|
+
end
|
41
|
+
|
42
|
+
def prepare_word_rels!(file_path, file_name)
|
43
|
+
word_rels.merge! prepare_rels_for_attached_image(file_path, file_name)
|
44
|
+
end
|
45
|
+
|
46
|
+
def prepare_header_rels!(file_path, file_name)
|
47
|
+
header_rels.merge! prepare_rels_for_attached_image(file_path, file_name)
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
|
52
|
+
def prepare_rels_for_attached_image(file_path, file_name)
|
53
|
+
{ "media/#{file_name}" => ["#{DOCUMENT_RELATIONSHIPS}image", file_path] }
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module Constructors
|
3
|
+
class TableColumn
|
4
|
+
MAX_TABLE_WIDTH = 9_355
|
5
|
+
|
6
|
+
attr_reader :client_columns_width, :columns_count
|
7
|
+
|
8
|
+
def initialize(client_table_width, client_columns_width, columns_count)
|
9
|
+
@client_table_width = client_table_width
|
10
|
+
@client_columns_width = client_columns_width
|
11
|
+
@columns_count = columns_count
|
12
|
+
end
|
13
|
+
|
14
|
+
def columns_width
|
15
|
+
default_width = calculate_default_width
|
16
|
+
ensure_correct_table_max_width! unless total_params_width.nil?
|
17
|
+
|
18
|
+
return [default_width] * columns_count if client_columns_width.nil?
|
19
|
+
client_columns_width.map { |item| item.nil? ? default_width : item }
|
20
|
+
end
|
21
|
+
|
22
|
+
def table_width
|
23
|
+
@client_table_width || MAX_TABLE_WIDTH
|
24
|
+
end
|
25
|
+
|
26
|
+
def total_params_width
|
27
|
+
@total_params_width ||= client_columns_width&.compact&.inject(:+)
|
28
|
+
end
|
29
|
+
|
30
|
+
def calculate_default_width
|
31
|
+
return (table_width / columns_count) if client_columns_width.nil?
|
32
|
+
return (table_width - total_params_width / 1) if client_columns_width.none?(&:nil?)
|
33
|
+
((table_width - total_params_width) / client_columns_width.select(&:nil?).size)
|
34
|
+
end
|
35
|
+
|
36
|
+
private
|
37
|
+
|
38
|
+
def ensure_correct_table_max_width!
|
39
|
+
return unless total_params_width > MAX_TABLE_WIDTH
|
40
|
+
msg = %(Wrong table width: #{total_params_width}, please change it! Table width should be 10000.)
|
41
|
+
raise TableColumnsWidthError, msg
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
module PureDocx
|
2
|
+
class DocArchive
|
3
|
+
HEADER_TEMPLATE_PATH = 'word/header1.xml'.freeze
|
4
|
+
FOOTER_TEMPLATE_PATH = 'word/footer1.xml'.freeze
|
5
|
+
DOCUMENT_TEMPLATE_PATH = 'word/document.xml'.freeze
|
6
|
+
|
7
|
+
attr_reader :io, :basic_rels, :word_rels, :header_rels
|
8
|
+
|
9
|
+
def initialize(io, rels)
|
10
|
+
@io = io
|
11
|
+
@basic_rels = rels[:basic_rels]
|
12
|
+
@word_rels = rels[:word_rels]
|
13
|
+
@header_rels = rels[:header_rels]
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.open(file_path, rels)
|
17
|
+
Zip::File.open(file_path, Zip::File::CREATE) do |zip_file|
|
18
|
+
file = new(zip_file, rels)
|
19
|
+
yield file
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def add(file, path)
|
24
|
+
io.add(file, path)
|
25
|
+
end
|
26
|
+
|
27
|
+
def save_document_content(content, header, pagination_position)
|
28
|
+
document_colontitle!(header, HEADER_TEMPLATE_PATH)
|
29
|
+
document_colontitle!(pagination_position, FOOTER_TEMPLATE_PATH)
|
30
|
+
|
31
|
+
io.get_output_stream(DOCUMENT_TEMPLATE_PATH) do |os|
|
32
|
+
os.write document_content(content, header, pagination_position)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def save_rels
|
37
|
+
add_rels!('_rels/.rels', basic_rels)
|
38
|
+
add_rels!('_rels/document.xml.rels', word_rels, 'word/') unless word_rels.empty?
|
39
|
+
add_rels!('_rels/header1.xml.rels', header_rels, 'word/') unless header_rels.empty?
|
40
|
+
end
|
41
|
+
|
42
|
+
def add_rels!(file_name, rels, path = '')
|
43
|
+
generate_template_files!(rels, path)
|
44
|
+
generate_files_with_rels_extension!(file_name, rels, path)
|
45
|
+
end
|
46
|
+
|
47
|
+
def generate_template_files!(rels, path)
|
48
|
+
rels.each do |target_path, (_, image_path)|
|
49
|
+
pathfile = image_path || self.class.template_path(File.join(path, target_path))
|
50
|
+
io.add("#{path}#{target_path}", pathfile)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def generate_files_with_rels_extension!(file_name, rels, path)
|
55
|
+
io.get_output_stream("#{path}#{file_name}") do |os|
|
56
|
+
os.write(
|
57
|
+
<<~HEREDOC.gsub(/\s+/, ' ').strip
|
58
|
+
<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n
|
59
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
|
60
|
+
#{rels_content(rels)}
|
61
|
+
</Relationships>
|
62
|
+
HEREDOC
|
63
|
+
)
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def document_content(content, header, pagination_position)
|
68
|
+
header_reference = colontitle_reference_xml('headerReference', 'header1.xml') unless header.empty?
|
69
|
+
footer_reference = colontitle_reference_xml('footerReference', 'footer1.xml') if pagination_position
|
70
|
+
|
71
|
+
File.read(self.class.template_path(DOCUMENT_TEMPLATE_PATH)).tap do |document_content|
|
72
|
+
document_content.gsub!('{HEADER}', header_reference || '')
|
73
|
+
document_content.gsub!('{CONTENT}', content)
|
74
|
+
document_content.gsub!('{FOOTER}', footer_reference || '')
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def document_colontitle!(content, content_path)
|
79
|
+
content_xml = File.read(self.class.template_path(content_path))
|
80
|
+
content_xml.gsub!('{CONTENT}', content || '')
|
81
|
+
io.get_output_stream(content_path) { |os| os.write content_xml }
|
82
|
+
end
|
83
|
+
|
84
|
+
def colontitle_reference_xml(reference_name, file_name)
|
85
|
+
<<-HEREDOC.gsub(/\s+/, ' ').strip
|
86
|
+
<w:#{reference_name}
|
87
|
+
r:id="rId#{word_rels.keys.index(file_name)}"
|
88
|
+
w:type="default"/>
|
89
|
+
HEREDOC
|
90
|
+
end
|
91
|
+
|
92
|
+
def rels_content(rels)
|
93
|
+
rels.map.with_index do |(target_path, (target_type, _)), index|
|
94
|
+
%(<Relationship Id="rId#{index}" Type="#{target_type}" Target="#{target_path}"/>)
|
95
|
+
end.join
|
96
|
+
end
|
97
|
+
|
98
|
+
def self.template_path(file_name)
|
99
|
+
File.join(dir_path, 'template', file_name)
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.dir_path
|
103
|
+
Pathname.new(__FILE__).expand_path.parent.dirname
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module PureDocx
|
2
|
+
class Document
|
3
|
+
attr_accessor :body_content, :header_content
|
4
|
+
attr_reader :file_path, :file_name, :brake, :new_page, :rels_constructor, :pagination_position
|
5
|
+
|
6
|
+
def initialize(file_path, arguments = {})
|
7
|
+
@file_path = file_path
|
8
|
+
ensure_file!
|
9
|
+
@file_name = File.basename(file_path)
|
10
|
+
@pagination_position = arguments[:pagination_position]
|
11
|
+
@rels_constructor = PureDocx::Constructors::Rels.new
|
12
|
+
@brake = File.read(DocArchive.template_path('brake.xml'))
|
13
|
+
@new_page = File.read(DocArchive.template_path('new_page.xml'))
|
14
|
+
@header_content = ''
|
15
|
+
@body_content = ''
|
16
|
+
(class << self; self; end).class_eval do
|
17
|
+
[:text, :table, :image].each do |method_name|
|
18
|
+
define_method method_name do |content, options = {}|
|
19
|
+
Object.const_get(
|
20
|
+
"PureDocx::XmlGenerators::#{method_name.to_s.capitalize}"
|
21
|
+
).new(content, rels_constructor, options).xml
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def header(items)
|
28
|
+
self.header_content += items.join
|
29
|
+
end
|
30
|
+
|
31
|
+
def content(items)
|
32
|
+
self.body_content += items.join
|
33
|
+
end
|
34
|
+
|
35
|
+
def ensure_file!
|
36
|
+
return unless File.exist?(file_path)
|
37
|
+
raise FileCreatingError, 'File already exists in this directory. Please change the file name!'
|
38
|
+
end
|
39
|
+
|
40
|
+
def save!
|
41
|
+
rels_constructor.prepare_basic_rels!
|
42
|
+
DocArchive.open(file_path, rels_constructor.rels) do |file|
|
43
|
+
file.add('[Content_Types].xml', DocArchive.template_path('[Content_Types].xml'))
|
44
|
+
file.save_rels
|
45
|
+
file.save_document_content(body_content, header_content, pagination_position)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
module PureDocx
|
2
|
+
FileCreatingError = Class.new(StandardError)
|
3
|
+
ImageReadingError = Class.new(StandardError)
|
4
|
+
NoImageDirectoryPathError = Class.new(StandardError)
|
5
|
+
TableColumnsWidthError = Class.new(StandardError)
|
6
|
+
TableColumnsCountError = Class.new(StandardError)
|
7
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module XmlGenerators
|
3
|
+
class Base
|
4
|
+
attr_reader :content, :rels_constructor
|
5
|
+
|
6
|
+
def initialize(content, rels_constructor)
|
7
|
+
@content = content
|
8
|
+
@rels_constructor = rels_constructor
|
9
|
+
end
|
10
|
+
|
11
|
+
def xml
|
12
|
+
params.each_with_object(template.clone) { |(param, value), memo| memo.gsub!(param, value.to_s) }
|
13
|
+
end
|
14
|
+
|
15
|
+
def template
|
16
|
+
raise NotImplementedError, "#{__method__} is not implemented."
|
17
|
+
end
|
18
|
+
|
19
|
+
def params
|
20
|
+
{}
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module XmlGenerators
|
3
|
+
class Cell < Base
|
4
|
+
attr_reader :width
|
5
|
+
|
6
|
+
def initialize(content, rels_constructor, arguments = {})
|
7
|
+
super(content, rels_constructor)
|
8
|
+
@width = arguments[:width]
|
9
|
+
end
|
10
|
+
|
11
|
+
def template
|
12
|
+
File.read(DocArchive.template_path('table/cells.xml'))
|
13
|
+
end
|
14
|
+
|
15
|
+
def params
|
16
|
+
{
|
17
|
+
'{CONTENT}' => content[:column].map(&:chomp).join,
|
18
|
+
'{WIDTH}' => width
|
19
|
+
}
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module XmlGenerators
|
3
|
+
class Image < Base
|
4
|
+
attr_reader :width,
|
5
|
+
:height,
|
6
|
+
:image_path,
|
7
|
+
:image_name,
|
8
|
+
:in_header,
|
9
|
+
:align,
|
10
|
+
:rels_id,
|
11
|
+
:size_constructor
|
12
|
+
|
13
|
+
def initialize(image_path, rels_constructor, arguments = {})
|
14
|
+
super(nil, rels_constructor)
|
15
|
+
@image_path = image_path
|
16
|
+
@image_name = File.basename(image_path)
|
17
|
+
ensure_file!
|
18
|
+
@width = arguments[:width]
|
19
|
+
@height = arguments[:height]
|
20
|
+
@in_header = arguments[:in_header]
|
21
|
+
@align = arguments[:align]
|
22
|
+
@rels_id = "rId#{appropriated_rels_size}"
|
23
|
+
@size_constructor = PureDocx::Constructors::ImageSize.new(
|
24
|
+
user_params: [width, height],
|
25
|
+
real_params: FastImage.size(image_path)
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def xml
|
30
|
+
add_image_rels
|
31
|
+
super
|
32
|
+
end
|
33
|
+
|
34
|
+
def params
|
35
|
+
align_params = { horizontal: '', vertical: '' }
|
36
|
+
align_params.merge! prepare_align_params(align) if align
|
37
|
+
{
|
38
|
+
'{WIDTH}' => size_constructor.prepare_size[:width],
|
39
|
+
'{HEIGHT}' => size_constructor.prepare_size[:height],
|
40
|
+
'{RID}' => rels_id,
|
41
|
+
'{NAME}' => image_name,
|
42
|
+
'{UNIQUE_NAME}' => uniq_name(image_name),
|
43
|
+
'{HORIZONTAL_ALIGN}' => align_params[:horizontal],
|
44
|
+
'{VERTICAL_ALIGN}' => align_params[:vertical]
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
def template
|
49
|
+
return File.read(DocArchive.template_path('float_image.xml')) if align&.any?
|
50
|
+
File.read(DocArchive.template_path('image.xml'))
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def uniq_name(image_name)
|
56
|
+
"image_#{SecureRandom.uuid}#{File.extname(image_name)}"
|
57
|
+
end
|
58
|
+
|
59
|
+
def ensure_file!
|
60
|
+
raise ImageReadingError, "The #{image_name} not found!" unless File.exist?(image_path)
|
61
|
+
end
|
62
|
+
|
63
|
+
def add_image_rels
|
64
|
+
return rels_constructor.prepare_header_rels!(image_path, uniq_name(image_name)) if in_header?
|
65
|
+
rels_constructor.prepare_word_rels!(image_path, uniq_name(image_name))
|
66
|
+
end
|
67
|
+
|
68
|
+
def in_header?
|
69
|
+
in_header
|
70
|
+
end
|
71
|
+
|
72
|
+
def appropriated_rels_size
|
73
|
+
rels_constructor.rels[(in_header? && :header_rels) || :word_rels].size
|
74
|
+
end
|
75
|
+
|
76
|
+
def prepare_align_params(align_params)
|
77
|
+
align = {
|
78
|
+
horizontal: :left,
|
79
|
+
vertical: :top
|
80
|
+
}
|
81
|
+
align_params.each do |item|
|
82
|
+
align[:horizontal] = item if item == :right || item == :left
|
83
|
+
align[:vertical] = item if item == :bottom || item == :top
|
84
|
+
end
|
85
|
+
align
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module XmlGenerators
|
3
|
+
class Row < Base
|
4
|
+
attr_reader :cells_width
|
5
|
+
|
6
|
+
def initialize(content, rels_constructor, arguments = {})
|
7
|
+
super(content, rels_constructor)
|
8
|
+
@cells_width = arguments[:cells_width]
|
9
|
+
end
|
10
|
+
|
11
|
+
def template
|
12
|
+
File.read(DocArchive.template_path('table/rows.xml'))
|
13
|
+
end
|
14
|
+
|
15
|
+
def params
|
16
|
+
{ '{CELLS}' => cells }
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def cells
|
22
|
+
content.each_with_index.map do |cell_content, index|
|
23
|
+
PureDocx::XmlGenerators::Cell.new(cell_content, nil, width: cells_width[index]).xml
|
24
|
+
end.join
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
module PureDocx
|
2
|
+
module XmlGenerators
|
3
|
+
class Table < Base
|
4
|
+
WITHOUT_BORDER_VALUES = { value: '', default_value: 'single' }.freeze
|
5
|
+
BOLD_BORDER_VALUES = { value: '18', default_value: '4' }.freeze
|
6
|
+
attr_reader :table_content,
|
7
|
+
:columns_count,
|
8
|
+
:columns_width,
|
9
|
+
:sides_without_border,
|
10
|
+
:bold_sides,
|
11
|
+
:received_table_width,
|
12
|
+
:received_col_width
|
13
|
+
|
14
|
+
def initialize(table_content, _rels_constructor, arguments = {})
|
15
|
+
@table_content = table_content || []
|
16
|
+
@columns_count = table_content[0].size
|
17
|
+
@received_table_width = arguments[:table_width]
|
18
|
+
@received_col_width = arguments[:col_width]
|
19
|
+
@columns_width = columns_width
|
20
|
+
ensure_columns_count!
|
21
|
+
@sides_without_border = prepare_sides(WITHOUT_BORDER_VALUES, arguments[:sides_without_border])
|
22
|
+
@bold_sides = prepare_sides(BOLD_BORDER_VALUES, arguments[:bold_sides])
|
23
|
+
@paddings = arguments[:paddings] || {}
|
24
|
+
end
|
25
|
+
|
26
|
+
def template
|
27
|
+
File.read(DocArchive.template_path('table/table.xml'))
|
28
|
+
end
|
29
|
+
|
30
|
+
def params
|
31
|
+
{
|
32
|
+
'{TABLE_WIDTH}' => table_width,
|
33
|
+
'{PADDING_TOP}' => @paddings.fetch(:top, 0),
|
34
|
+
'{PADDING_BOTTOM}' => @paddings.fetch(:bottom, 0),
|
35
|
+
'{PADDING_LEFT}' => @paddings.fetch(:left, 0),
|
36
|
+
'{PADDING_RIGHT}' => @paddings.fetch(:right, 0),
|
37
|
+
'{BORDER_TOP}' => sides_without_border[:top],
|
38
|
+
'{BORDER_BOTTOM}' => sides_without_border[:bottom],
|
39
|
+
'{BORDER_LEFT}' => sides_without_border[:left],
|
40
|
+
'{BORDER_RIGHT}' => sides_without_border[:right],
|
41
|
+
'{BORDER_INSIDE_H}' => sides_without_border[:inside_h],
|
42
|
+
'{BORDER_INSIDE_V}' => sides_without_border[:inside_v],
|
43
|
+
'{BORDER_TOP_SIZE}' => bold_sides[:top],
|
44
|
+
'{BORDER_BOTTOM_SIZE}' => bold_sides[:bottom],
|
45
|
+
'{BORDER_LEFT_SIZE}' => bold_sides[:left],
|
46
|
+
'{BORDER_RIGHT_SIZE}' => bold_sides[:right],
|
47
|
+
'{BORDER_INSIDE_H_SIZE}' => bold_sides[:inside_h],
|
48
|
+
'{BORDER_INSIDE_V_SIZE}' => bold_sides[:inside_v],
|
49
|
+
'{GRID_OPTIONS}' => table_grid,
|
50
|
+
'{ROWS}' => rows
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def rows
|
57
|
+
table_content.map do |row_content|
|
58
|
+
PureDocx::XmlGenerators::Row.new(row_content, nil, cells_width: columns_width).xml
|
59
|
+
end.join
|
60
|
+
end
|
61
|
+
|
62
|
+
def table_builder
|
63
|
+
@table_builder ||= PureDocx::Constructors::TableColumn.new(
|
64
|
+
received_table_width,
|
65
|
+
received_col_width,
|
66
|
+
columns_count
|
67
|
+
)
|
68
|
+
end
|
69
|
+
|
70
|
+
def columns_width
|
71
|
+
table_builder.columns_width
|
72
|
+
end
|
73
|
+
|
74
|
+
def table_width
|
75
|
+
table_builder.table_width
|
76
|
+
end
|
77
|
+
|
78
|
+
def ensure_columns_count!
|
79
|
+
return unless table_content.any? { |row| row.size != columns_count } || columns_width.size != columns_count
|
80
|
+
raise TableColumnsCountError, 'Wrong table columns count!'
|
81
|
+
end
|
82
|
+
|
83
|
+
def table_grid
|
84
|
+
columns_width.map { |column_width| %(<w:gridCol w:w="#{column_width}"/>) }.join
|
85
|
+
end
|
86
|
+
|
87
|
+
def prepare_sides(border_type_value, params = [])
|
88
|
+
[:right, :left, :top, :bottom, :inside_h, :inside_v].map do |item|
|
89
|
+
[item, params&.include?(item) ? border_type_value[:value] : border_type_value[:default_value]]
|
90
|
+
end.to_h
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module PureDocx
|
4
|
+
module XmlGenerators
|
5
|
+
class Text < Base
|
6
|
+
DEFAULT_TEXT_SIZE = 28
|
7
|
+
DEFAULT_TEXT_ALIGN = 'left'.freeze
|
8
|
+
attr_reader :bold_enable, :italic_enable, :align, :size
|
9
|
+
|
10
|
+
def initialize(content, rels_constructor, arguments = {})
|
11
|
+
super(nil, rels_constructor)
|
12
|
+
@content = CGI.escapeHTML(content)
|
13
|
+
@bold_enable = [*arguments[:style]].include?(:bold)
|
14
|
+
@italic_enable = [*arguments[:style]].include?(:italic)
|
15
|
+
@align = arguments[:align] || DEFAULT_TEXT_ALIGN
|
16
|
+
@size = arguments[:size] || DEFAULT_TEXT_SIZE
|
17
|
+
end
|
18
|
+
|
19
|
+
def params
|
20
|
+
{
|
21
|
+
'{TEXT}' => content,
|
22
|
+
'{ALIGN}' => align,
|
23
|
+
'{BOLD_ENABLE}' => bold_enable,
|
24
|
+
'{ITALIC_ENABLE}' => italic_enable,
|
25
|
+
'{SIZE}' => size
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
def template
|
30
|
+
File.read(DocArchive.template_path('paragraph.xml'))
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="jpeg" ContentType="image/jpeg"/><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Default Extension="jpg" ContentType="image/jpeg"/><Override PartName="/word/document.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/><Override PartName="/word/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/><Override PartName="/word/settings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/><Override PartName="/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/><Override PartName="/word/footnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/><Override PartName="/word/endnotes.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/><Override PartName="/word/header1.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"/><Override PartName="/word/footer1.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"/><Override PartName="/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/><Override PartName="/word/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:p w:rsidR="00C05B10" w:rsidDefault="00C05B10"/>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Template>Normal.dotm</Template><TotalTime>0</TotalTime><Pages>1</Pages><Words>0</Words><Characters>0</Characters><Application>Microsoft Office Word</Application><DocSecurity>0</DocSecurity><Lines>0</Lines><Paragraphs>0</Paragraphs><ScaleCrop>false</ScaleCrop><Company></Company><LinksUpToDate>false</LinksUpToDate><CharactersWithSpaces>0</CharactersWithSpaces><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>14.0000</AppVersion></Properties>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:title></dc:title><dc:subject></dc:subject><dc:creator>Asus</dc:creator><cp:keywords></cp:keywords><dc:description></dc:description><cp:lastModifiedBy>Asus</cp:lastModifiedBy><cp:revision>3</cp:revision><dcterms:created xsi:type="dcterms:W3CDTF">2012-02-21T13:15:00Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2012-02-21T13:15:00Z</dcterms:modified></cp:coreProperties>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:p w:rsidR="000E3348" w:rsidRDefault="00CD6FED"><w:r><w:rPr><w:noProof/><w:lang w:eastAsia="en-US"/></w:rPr><w:drawing><wp:anchor behindDoc="0" distT="0" distB="0" distL="38100" distR="0" simplePos="0" locked="0" layoutInCell="1" allowOverlap="1" relativeHeight="2"><wp:simplePos x="0" y="0"/><wp:positionH relativeFrom="column"><wp:align>{HORIZONTAL_ALIGN}</wp:align></wp:positionH><wp:positionV relativeFrom="page"><wp:align>{VERTICAL_ALIGN}</wp:align></wp:positionV><wp:extent cx="{WIDTH}" cy="{HEIGHT}"/><wp:effectExtent l="0" t="0" r="0" b="0"/><wp:wrapSquare wrapText="largest"/><wp:docPr id="2" name="{NAME}"/><wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="0" name="{UNIQUE_NAME}"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="{RID}"><a:extLst><a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}"><a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0"/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="{WIDTH}" cy="{HEIGHT}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/><a:ln><a:noFill/></a:ln></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:anchor></w:drawing></w:r></w:p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:p w:rsidR="000E3348" w:rsidRDefault="00CD6FED"><w:r><w:rPr><w:noProof/><w:lang w:eastAsia="en-US"/></w:rPr><w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><wp:extent cx="{WIDTH}" cy="{HEIGHT}"/><wp:effectExtent l="19050" t="0" r="0" b="0"/><wp:docPr id="2" name="{NAME}"/><wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" noChangeAspect="1"/></wp:cNvGraphicFramePr><a:graphic xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"><a:graphicData uri="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:pic xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture"><pic:nvPicPr><pic:cNvPr id="0" name="{UNIQUE_NAME}"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed="{RID}"><a:extLst><a:ext uri="{28A0092B-C50C-407E-A947-70E740481C1C}"><a14:useLocalDpi xmlns:a14="http://schemas.microsoft.com/office/drawing/2010/main" val="0"/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x="0" y="0"/><a:ext cx="{WIDTH}" cy="{HEIGHT}"/></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/><a:ln><a:noFill/></a:ln></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:inline></w:drawing></w:r></w:p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:p><w:pPr><w:pStyle w:val="TextBody"/><w:rPr/></w:pPr><w:r><w:rPr/></w:r><w:r><w:br w:type="page"/></w:r></w:p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:p><w:pPr><w:pStyle w:val="Normal"/><w:jc w:val="{ALIGN}"/><w:rPr/></w:pPr><w:r><w:rPr><w:b w:val="{BOLD_ENABLE}"/><w:bCs w:val="{BOLD_ENABLE}"/><w:i w:val="{ITALIC_ENABLE}"/><w:iCs w:val="{ITALIC_ENABLE}"/><w:sz w:val="{SIZE}"/><w:lang w:val="en-US"/></w:rPr><w:t>{TEXT}</w:t></w:r></w:p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:tc><w:tcPr><w:tcW w:w="{WIDTH}" w:type="dxa"/><w:shd w:fill="auto" w:val="clear"/></w:tcPr>{CONTENT}</w:tc>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:tr w:rsidR="00E806FD" w:rsidTr="00E806FD">{CELLS}</w:tr>
|
@@ -0,0 +1 @@
|
|
1
|
+
<w:tbl><w:tblPr><w:tblW w:w="{TABLE_WIDTH}" w:type="dxa"/><w:tblInd w:w="0" w:type="dxa"/><w:tblBorders><w:top w:val="{BORDER_TOP}" w:sz="{BORDER_TOP_SIZE}" w:space="0" w:color="auto"/><w:left w:val="{BORDER_LEFT}" w:sz="{BORDER_LEFT_SIZE}" w:space="0" w:color="auto"/><w:right w:val="{BORDER_RIGHT}" w:sz="{BORDER_RIGHT_SIZE}" w:space="0" w:color="auto"/><w:bottom w:val="{BORDER_BOTTOM}" w:sz="{BORDER_BOTTOM_SIZE}" w:space="0" w:color="auto"/><w:insideH w:val="{BORDER_INSIDE_H}" w:sz="{BORDER_INSIDE_H_SIZE}" w:space="0" w:color="auto"/><w:insideV w:val="{BORDER_INSIDE_V}" w:sz="{BORDER_INSIDE_V_SIZE}" w:space="0" w:color="auto"/></w:tblBorders><w:tblCellMar><w:top w:w="{PADDING_TOP}" w:type="dxa"/><w:left w:w="{PADDING_LEFT}" w:type="dxa"/><w:bottom w:w="{PADDING_BOTTOM}" w:type="dxa"/><w:right w:w="{PADDING_RIGHT}" w:type="dxa"/></w:tblCellMar><w:tblLook w:noVBand="1" w:noHBand="0" w:lastColumn="0" w:firstColumn="1" w:lastRow='0' w:firstRow='1' w:val="04A0"/></w:tblPr><w:tblGrid>{GRID_OPTIONS}</w:tblGrid>{ROWS}</w:tbl><w:p><w:pPr><w:pStyle w:val="Normal"/><w:rPr/></w:pPr><w:r><w:rPr/></w:r></w:p>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" 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" mc:Ignorable="w14 w15 w16se wp14"><w:body>{CONTENT}<w:p w:rsidR="00D72138" w:rsidRDefault="00D72138"><w:bookmarkStart w:id="0" w:name="_GoBack"/><w:bookmarkEnd w:id="0"/></w:p><w:sectPr w:rsidR="000E3348">{HEADER}{FOOTER}<w:pgSz w:w="11906" w:h="16838"/><w:pgMar w:top="1134" w:right="850" w:bottom="1134" w:left="1701" w:header="708" w:footer="708" w:gutter="0"/><w:cols w:space="708"/><w:docGrid w:linePitch="360"/></w:sectPr></w:body></w:document>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:endnotes xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" 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" mc:Ignorable="w14 w15 w16se wp14"><w:endnote w:type="separator" w:id="-1"><w:p w:rsidR="005440CB" w:rsidRDefault="005440CB" w:rsidP="00A91642"><w:pPr><w:spacing w:line="240" w:lineRule="auto"/></w:pPr><w:r><w:separator/></w:r></w:p></w:endnote><w:endnote w:type="continuationSeparator" w:id="0"><w:p w:rsidR="005440CB" w:rsidRDefault="005440CB" w:rsidP="00A91642"><w:pPr><w:spacing w:line="240" w:lineRule="auto"/></w:pPr><w:r><w:continuationSeparator/></w:r></w:p></w:endnote></w:endnotes>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:fonts xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14"><w:font w:name="Calibri"><w:panose1 w:val="020F0502020204030204"/><w:charset w:val="CC"/><w:family w:val="swiss"/><w:pitch w:val="variable"/><w:sig w:usb0="E10002FF" w:usb1="4000ACFF" w:usb2="00000009" w:usb3="00000000" w:csb0="0000019F" w:csb1="00000000"/></w:font><w:font w:name="Times New Roman"><w:panose1 w:val="02020603050405020304"/><w:charset w:val="CC"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="E0002AFF" w:usb1="C0007841" w:usb2="00000009" w:usb3="00000000" w:csb0="000001FF" w:csb1="00000000"/></w:font><w:font w:name="Cambria"><w:panose1 w:val="02040503050406030204"/><w:charset w:val="CC"/><w:family w:val="roman"/><w:pitch w:val="variable"/><w:sig w:usb0="E00002FF" w:usb1="400004FF" w:usb2="00000000" w:usb3="00000000" w:csb0="0000019F" w:csb1="00000000"/></w:font></w:fonts>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:ftr xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14 wp14"><w:p><w:pPr><w:pStyle w:val="Footer"/><w:rPr></w:rPr></w:pPr><w:r><w:rPr></w:rPr></w:r></w:p><w:p><w:pPr><w:pStyle w:val="Footer"/><w:jc w:val="{CONTENT}"/><w:rPr></w:rPr></w:pPr><w:r><w:rPr></w:rPr><w:fldChar w:fldCharType="begin"></w:fldChar></w:r><w:r><w:instrText> PAGE </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r><w:t>5</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p></w:ftr>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:footnotes xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" 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" mc:Ignorable="w14 w15 w16se wp14"><w:footnote w:type="separator" w:id="-1"><w:p w:rsidR="005440CB" w:rsidRDefault="005440CB" w:rsidP="00A91642"><w:pPr><w:spacing w:line="240" w:lineRule="auto"/></w:pPr><w:r><w:separator/></w:r></w:p></w:footnote><w:footnote w:type="continuationSeparator" w:id="0"><w:p w:rsidR="005440CB" w:rsidRDefault="005440CB" w:rsidP="00A91642"><w:pPr><w:spacing w:line="240" w:lineRule="auto"/></w:pPr><w:r><w:continuationSeparator/></w:r></w:p></w:footnote></w:footnotes>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:hdr xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:cx="http://schemas.microsoft.com/office/drawing/2014/chartex" xmlns:cx1="http://schemas.microsoft.com/office/drawing/2015/9/8/chartex" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:w16se="http://schemas.microsoft.com/office/word/2015/wordml/symex" 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" mc:Ignorable="w14 w15 w16se wp14">{CONTENT}</w:hdr>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:settings xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 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:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main" mc:Ignorable="w14"><w:zoom w:percent="110"/><w:proofState w:grammar="clean"/><w:defaultTabStop w:val="708"/><w:characterSpacingControl w:val="doNotCompress"/><w:compat><w:compatSetting w:name="compatibilityMode" w:uri="http://schemas.microsoft.com/office/word" w:val="14"/><w:compatSetting w:name="overrideTableStyleFontSizeAndJustification" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="enableOpenTypeFeatures" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/><w:compatSetting w:name="doNotFlipMirrorIndents" w:uri="http://schemas.microsoft.com/office/word" w:val="1"/></w:compat><w:rsids><w:rsidRoot w:val="00AE4894"/><w:rsid w:val="00075C38"/><w:rsid w:val="00902263"/><w:rsid w:val="00AE4894"/><w:rsid w:val="00DE25AB"/></w:rsids><m:mathPr><m:mathFont m:val="Cambria Math"/><m:brkBin m:val="before"/><m:brkBinSub m:val="--"/><m:smallFrac m:val="0"/><m:dispDef/><m:lMargin m:val="0"/><m:rMargin m:val="0"/><m:defJc m:val="centerGroup"/><m:wrapIndent m:val="1440"/><m:intLim m:val="subSup"/><m:naryLim m:val="undOvr"/></m:mathPr><w:themeFontLang w:val="ru-RU"/><w:clrSchemeMapping w:bg1="light1" w:t1="dark1" w:bg2="light2" w:t2="dark2" w:accent1="accent1" w:accent2="accent2" w:accent3="accent3" w:accent4="accent4" w:accent5="accent5" w:accent6="accent6" w:hyperlink="hyperlink" w:followedHyperlink="followedHyperlink"/><w:shapeDefaults><o:shapedefaults v:ext="edit" spidmax="1026"/><o:shapelayout v:ext="edit"><o:idmap v:ext="edit" data="1"/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val=","/><w:listSeparator w:val=";"/></w:settings>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:styles xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14"><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:asciiTheme="minorHAnsi" w:eastAsiaTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi" w:cstheme="minorBidi"/><w:sz w:val="22"/><w:szCs w:val="22"/><w:lang w:val="en-US" w:bidi="ar-SA"/></w:rPr></w:rPrDefault><w:pPrDefault><w:pPr><w:spacing w:after="200" w:line="276" w:lineRule="auto"/></w:pPr></w:pPrDefault></w:docDefaults><w:latentStyles w:defLockedState="0" w:defUIPriority="99" w:defSemiHidden="1" w:defUnhideWhenUsed="1" w:defQFormat="0" w:count="267"><w:lsdException w:name="Normal" w:semiHidden="0" w:uiPriority="0" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="heading 1" w:semiHidden="0" w:uiPriority="9" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="heading 2" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 3" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 4" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 5" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 6" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 7" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 8" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="heading 9" w:uiPriority="9" w:qFormat="1"/><w:lsdException w:name="toc 1" w:uiPriority="39"/><w:lsdException w:name="toc 2" w:uiPriority="39"/><w:lsdException w:name="toc 3" w:uiPriority="39"/><w:lsdException w:name="toc 4" w:uiPriority="39"/><w:lsdException w:name="toc 5" w:uiPriority="39"/><w:lsdException w:name="toc 6" w:uiPriority="39"/><w:lsdException w:name="toc 7" w:uiPriority="39"/><w:lsdException w:name="toc 8" w:uiPriority="39"/><w:lsdException w:name="toc 9" w:uiPriority="39"/><w:lsdException w:name="caption" w:uiPriority="35" w:qFormat="1"/><w:lsdException w:name="Title" w:semiHidden="0" w:uiPriority="10" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Default Paragraph Font" w:uiPriority="1"/><w:lsdException w:name="Subtitle" w:semiHidden="0" w:uiPriority="11" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Strong" w:semiHidden="0" w:uiPriority="22" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Emphasis" w:semiHidden="0" w:uiPriority="20" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Table Grid" w:semiHidden="0" w:uiPriority="59" w:unhideWhenUsed="0"/><w:lsdException w:name="Placeholder Text" w:unhideWhenUsed="0"/><w:lsdException w:name="No Spacing" w:semiHidden="0" w:uiPriority="1" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Light Shading" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 1" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 1" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 1" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 1" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 1" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 1" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Revision" w:unhideWhenUsed="0"/><w:lsdException w:name="List Paragraph" w:semiHidden="0" w:uiPriority="34" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Quote" w:semiHidden="0" w:uiPriority="29" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Intense Quote" w:semiHidden="0" w:uiPriority="30" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Medium List 2 Accent 1" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 1" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 1" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 1" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 1" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 1" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 1" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 1" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 2" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 2" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 2" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 2" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 2" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 2" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 Accent 2" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 2" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 2" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 2" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 2" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 2" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 2" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 2" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 3" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 3" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 3" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 3" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 3" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 3" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 Accent 3" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 3" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 3" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 3" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 3" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 3" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 3" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 3" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 4" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 4" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 4" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 4" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 4" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 4" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 Accent 4" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 4" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 4" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 4" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 4" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 4" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 4" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 4" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 5" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 5" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 5" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 5" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 5" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 5" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 Accent 5" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 5" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 5" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 5" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 5" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 5" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 5" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 5" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Shading Accent 6" w:semiHidden="0" w:uiPriority="60" w:unhideWhenUsed="0"/><w:lsdException w:name="Light List Accent 6" w:semiHidden="0" w:uiPriority="61" w:unhideWhenUsed="0"/><w:lsdException w:name="Light Grid Accent 6" w:semiHidden="0" w:uiPriority="62" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 1 Accent 6" w:semiHidden="0" w:uiPriority="63" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Shading 2 Accent 6" w:semiHidden="0" w:uiPriority="64" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 1 Accent 6" w:semiHidden="0" w:uiPriority="65" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium List 2 Accent 6" w:semiHidden="0" w:uiPriority="66" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 1 Accent 6" w:semiHidden="0" w:uiPriority="67" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 2 Accent 6" w:semiHidden="0" w:uiPriority="68" w:unhideWhenUsed="0"/><w:lsdException w:name="Medium Grid 3 Accent 6" w:semiHidden="0" w:uiPriority="69" w:unhideWhenUsed="0"/><w:lsdException w:name="Dark List Accent 6" w:semiHidden="0" w:uiPriority="70" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Shading Accent 6" w:semiHidden="0" w:uiPriority="71" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful List Accent 6" w:semiHidden="0" w:uiPriority="72" w:unhideWhenUsed="0"/><w:lsdException w:name="Colorful Grid Accent 6" w:semiHidden="0" w:uiPriority="73" w:unhideWhenUsed="0"/><w:lsdException w:name="Subtle Emphasis" w:semiHidden="0" w:uiPriority="19" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Intense Emphasis" w:semiHidden="0" w:uiPriority="21" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Subtle Reference" w:semiHidden="0" w:uiPriority="31" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Intense Reference" w:semiHidden="0" w:uiPriority="32" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Book Title" w:semiHidden="0" w:uiPriority="33" w:unhideWhenUsed="0" w:qFormat="1"/><w:lsdException w:name="Bibliography" w:uiPriority="37"/><w:lsdException w:name="TOC Heading" w:uiPriority="39" w:qFormat="1"/></w:latentStyles><w:style w:type="paragraph" w:default="1" w:styleId="a"><w:name w:val="Normal"/><w:qFormat/><w:pPr><w:widowControl/><w:bidi w:val="0"/><w:spacing w:lineRule="auto" w:line="276" w:before="0" w:after="0"/><w:jc w:val="left"/></w:pPr><w:rPr><w:rFonts w:ascii="minorHAnsi" w:hAnsi="minorHAnsi" w:eastAsia="minorHAnsi" w:cs="" w:asciiTheme="minorHAnsi" w:cstheme="minorBidi" w:eastAsiaTheme="minorHAnsi" w:hAnsiTheme="minorHAnsi"/><w:color w:val="auto"/><w:sz w:val="22"/><w:szCs w:val="22"/><w:lang w:val="en-US" w:eastAsia="en-US" w:bidi="ar-SA"/></w:rPr></w:style><w:style w:type="character" w:default="1" w:styleId="a0"><w:name w:val="Default Paragraph Font"/><w:uiPriority w:val="1"/><w:semiHidden/><w:unhideWhenUsed/></w:style><w:style w:type="table" w:default="1" w:styleId="a1"><w:name w:val="Normal Table"/><w:uiPriority w:val="99"/><w:semiHidden/><w:unhideWhenUsed/><w:tblPr><w:tblInd w:w="0" w:type="dxa"/><w:tblCellMar><w:top w:w="0" w:type="dxa"/><w:left w:w="108" w:type="dxa"/><w:bottom w:w="0" w:type="dxa"/><w:right w:w="108" w:type="dxa"/></w:tblCellMar></w:tblPr></w:style><w:style w:type="numbering" w:default="1" w:styleId="a2"><w:name w:val="No List"/><w:uiPriority w:val="99"/><w:semiHidden/><w:unhideWhenUsed/></w:style></w:styles>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Тема Office"><a:themeElements><a:clrScheme name="Стандартная"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="1F497D"/></a:dk2><a:lt2><a:srgbClr val="EEECE1"/></a:lt2><a:accent1><a:srgbClr val="4F81BD"/></a:accent1><a:accent2><a:srgbClr val="C0504D"/></a:accent2><a:accent3><a:srgbClr val="9BBB59"/></a:accent3><a:accent4><a:srgbClr val="8064A2"/></a:accent4><a:accent5><a:srgbClr val="4BACC6"/></a:accent5><a:accent6><a:srgbClr val="F79646"/></a:accent6><a:hlink><a:srgbClr val="0000FF"/></a:hlink><a:folHlink><a:srgbClr val="800080"/></a:folHlink></a:clrScheme><a:fontScheme name="Стандартная"><a:majorFont><a:latin typeface="Cambria"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Angsana New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:majorFont><a:minorFont><a:latin typeface="Calibri"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="MS 明朝"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="宋体"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Cordia New"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/></a:minorFont></a:fontScheme><a:fmtScheme name="Стандартная"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="50000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="35000"><a:schemeClr val="phClr"><a:tint val="37000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:tint val="15000"/><a:satMod val="350000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="1"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:shade val="51000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="80000"><a:schemeClr val="phClr"><a:shade val="93000"/><a:satMod val="130000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="94000"/><a:satMod val="135000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="16200000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"><a:shade val="95000"/><a:satMod val="105000"/></a:schemeClr></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln><a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="38000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="35000"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst="orthographicFront"><a:rot lat="0" lon="0" rev="0"/></a:camera><a:lightRig rig="threePt" dir="t"><a:rot lat="0" lon="0" rev="1200000"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w="63500" h="25400"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="40000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="40000"><a:schemeClr val="phClr"><a:tint val="45000"/><a:shade val="99000"/><a:satMod val="350000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="20000"/><a:satMod val="255000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="-80000" r="50000" b="180000"/></a:path></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="80000"/><a:satMod val="300000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="30000"/><a:satMod val="200000"/></a:schemeClr></a:gs></a:gsLst><a:path path="circle"><a:fillToRect l="50000" t="50000" r="50000" b="50000"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults/><a:extraClrSchemeLst/></a:theme>
|
@@ -0,0 +1,2 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
2
|
+
<w:webSettings xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14"><w:optimizeForBrowser/><w:allowPNG/></w:webSettings>
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: puredocx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- JetRuby
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fastimage
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubyzip
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.13'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.13'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.5'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.5'
|
69
|
+
description: It allows you to create docx document and to put formatted text, insert
|
70
|
+
images and tables to it
|
71
|
+
email: engineering@jetruby.com
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/puredocx.rb
|
77
|
+
- lib/puredocx/constructors/image_size.rb
|
78
|
+
- lib/puredocx/constructors/rels.rb
|
79
|
+
- lib/puredocx/constructors/table_column.rb
|
80
|
+
- lib/puredocx/doc_archive.rb
|
81
|
+
- lib/puredocx/document.rb
|
82
|
+
- lib/puredocx/exceptions.rb
|
83
|
+
- lib/puredocx/xml_generators/base.rb
|
84
|
+
- lib/puredocx/xml_generators/cell.rb
|
85
|
+
- lib/puredocx/xml_generators/image.rb
|
86
|
+
- lib/puredocx/xml_generators/row.rb
|
87
|
+
- lib/puredocx/xml_generators/table.rb
|
88
|
+
- lib/puredocx/xml_generators/text.rb
|
89
|
+
- lib/template/[Content_Types].xml
|
90
|
+
- lib/template/brake.xml
|
91
|
+
- lib/template/docProps/app.xml
|
92
|
+
- lib/template/docProps/core.xml
|
93
|
+
- lib/template/float_image.xml
|
94
|
+
- lib/template/image.xml
|
95
|
+
- lib/template/new_page.xml
|
96
|
+
- lib/template/paragraph.xml
|
97
|
+
- lib/template/table/cells.xml
|
98
|
+
- lib/template/table/rows.xml
|
99
|
+
- lib/template/table/table.xml
|
100
|
+
- lib/template/word/document.xml
|
101
|
+
- lib/template/word/endnotes.xml
|
102
|
+
- lib/template/word/fontTable.xml
|
103
|
+
- lib/template/word/footer1.xml
|
104
|
+
- lib/template/word/footnotes.xml
|
105
|
+
- lib/template/word/header1.xml
|
106
|
+
- lib/template/word/settings.xml
|
107
|
+
- lib/template/word/styles.xml
|
108
|
+
- lib/template/word/theme/theme1.xml
|
109
|
+
- lib/template/word/webSettings.xml
|
110
|
+
homepage: http://jetruby.com/
|
111
|
+
licenses:
|
112
|
+
- MIT
|
113
|
+
metadata: {}
|
114
|
+
post_install_message:
|
115
|
+
rdoc_options: []
|
116
|
+
require_paths:
|
117
|
+
- lib
|
118
|
+
- template
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: 2.3.1
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
requirements: []
|
130
|
+
rubyforge_project:
|
131
|
+
rubygems_version: 2.5.1
|
132
|
+
signing_key:
|
133
|
+
specification_version: 4
|
134
|
+
summary: A simple gem for creating docx documents
|
135
|
+
test_files: []
|