Skip to content

Commit

Permalink
Fix Presentation.with_data? for shape with preset geometry (#574)
Browse files Browse the repository at this point in the history
Fix #537
  • Loading branch information
ShockwaveNN committed Apr 11, 2019
1 parent 93b8219 commit 0845231
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -80,6 +80,7 @@
* Values of `DocxShapeSize#flip_horizontal` and
`DocxShapeSize#flip_vertical` are Boolean
* Fix crash on gradient stop with unknown SchemeColor ([ooxml_parser#571](https://github.com/ONLYOFFICE/ooxml_parser/issues/571))
* Fix `Presentation.with_data?` for shape with preset geometry ([ooxml_parser#573](https://github.com/ONLYOFFICE/ooxml_parser/issues/573))

## 0.4.1 (2018-03-01)
### Fixes
Expand Down
Expand Up @@ -15,6 +15,7 @@ def with_data?
return true if @text_body.nil?
return true if @text_body.paragraphs.length > 1
return true unless @text_body.paragraphs.first.runs.empty?
return true if properties.preset_geometry

false
end
Expand Down
Binary file not shown.
5 changes: 5 additions & 0 deletions spec/presentation/with_data_spec.rb
Expand Up @@ -41,4 +41,9 @@
pptx.with_data?
expect(pptx).to be_with_data
end

it 'shape_with_preset_geometry' do
pptx = OoxmlParser::Parser.parse('spec/presentation/with_data/shape_with_preset_geometry.pptx')
expect(pptx).to be_with_data
end
end

0 comments on commit 0845231

Please sign in to comment.