ydocx 1.0.6 → 1.0.7

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.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 1.0.7 / 04.05.2012
2
+
3
+ * Updated chapter list style for fachinfo/patinfo
4
+ * Fixed error at parse_image
5
+
1
6
  === 1.0.6 / 03.05.2012
2
7
 
3
8
  * Removed RMagick dependency (as optional feature)
data/lib/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  module Docx2html
5
- VERSION = "1.0.6"
5
+ VERSION = "1.0.7"
6
6
  end
data/lib/ydocx/parser.rb CHANGED
@@ -153,8 +153,8 @@ module YDocx
153
153
  def parse_image(r)
154
154
  if pict = r.xpath('w:pict') and
155
155
  shape = pict.xpath('v:shape') and
156
- image = shape.xpath('v:imagedata')
157
- id = image.first['id'] # r:id
156
+ image = shape.xpath('v:imagedata').first
157
+ if image and id = image['id'] # r:id
158
158
  @rel.xpath('/').children.each do |element|
159
159
  element.children.each do |rel|
160
160
  if rel['Id'] == id and rel['Target']
@@ -174,6 +174,7 @@ module YDocx
174
174
  end
175
175
  end
176
176
  end
177
+ end
177
178
  end
178
179
  nil
179
180
  end
@@ -74,7 +74,7 @@ module YDocx
74
74
  indices << markup(:li, link)
75
75
  end
76
76
  end
77
- markup(:div, markup(:ul, indices), {:id => 'indecies'})
77
+ markup(:div, markup(:ol, indices), {:id => 'indecies'})
78
78
  end
79
79
  end
80
80
  def style
@@ -101,17 +101,17 @@ div#indecies {
101
101
  padding: 0px;
102
102
  margin: 0px;
103
103
  float: left;
104
- width: 200px;
104
+ width: 215px;
105
105
  }
106
- div#indecies ul {
106
+ div#indecies ol {
107
107
  margin: 0;
108
- padding: 25px 0 0 25px;
108
+ padding: 25px 0 0 40px;
109
109
  }
110
110
  div#container {
111
111
  position: relative;
112
- padding: 5px 0 0 0;
112
+ padding: 5px;
113
113
  float: top left;
114
- margin: 0 0 0 200px;
114
+ margin: 0 0 0 215px;
115
115
  }
116
116
  CSS
117
117
  if @style == :frame
@@ -130,14 +130,14 @@ body{
130
130
  }
131
131
  div#indecies {
132
132
  position: absolute;
133
- padding: 0;
133
+ padding: 0 0 0 5px;
134
134
  height: 100%;
135
135
  left: 0;
136
136
  top: 0;
137
137
  }
138
138
  div#container {
139
139
  position: absolute;
140
- padding: 0;
140
+ padding: 0 20px 0 5px;
141
141
  height: 100%;
142
142
  overflow: auto;
143
143
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ydocx
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-03 00:00:00.000000000 Z
12
+ date: 2012-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc
16
- requirement: &16602400 !ruby/object:Gem::Requirement
16
+ requirement: &23032560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.10'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *16602400
24
+ version_requirements: *23032560
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: hoe
27
- requirement: &16601980 !ruby/object:Gem::Requirement
27
+ requirement: &23032140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '2.13'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *16601980
35
+ version_requirements: *23032140
36
36
  description: ''
37
37
  email:
38
38
  - yasaka@ywesee.com, zdavatz@ywesee.com