diff options
| author | Dustin Smith <[email protected]> | 2014-01-23 10:25:02 -0600 |
|---|---|---|
| committer | Dustin Smith <[email protected]> | 2014-01-23 10:25:02 -0600 |
| commit | 19dd9ed99ea0aae07f85f149097b6e79a03e7bd0 (patch) | |
| tree | 64f84160ed67c61b9748d3c42854bcf394a9d2fa | |
| parent | 89a39ae3ab64cd4b556af862df702e92a2d3ae19 (diff) | |
| download | caxlsx-19dd9ed99ea0aae07f85f149097b6e79a03e7bd0.tar.gz caxlsx-19dd9ed99ea0aae07f85f149097b6e79a03e7bd0.zip | |
fixing comments for 2010 starter edition
| -rw-r--r-- | lib/axlsx/workbook/worksheet/comments.rb | 3 | ||||
| -rw-r--r-- | test/workbook/worksheet/tc_worksheet.rb | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/axlsx/workbook/worksheet/comments.rb b/lib/axlsx/workbook/worksheet/comments.rb index 03cce339..4023c4b8 100644 --- a/lib/axlsx/workbook/worksheet/comments.rb +++ b/lib/axlsx/workbook/worksheet/comments.rb @@ -57,8 +57,7 @@ module Axlsx # @return [Array] def relationships [Relationship.new(self, VML_DRAWING_R, "../#{vml_drawing.pn}"), - Relationship.new(self, COMMENT_R, "../#{pn}"), - Relationship.new(self, COMMENT_R_NULL, "NULL")] + Relationship.new(self, COMMENT_R, "../#{pn}")] end # serialize the object diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index b83613b4..8b8ec430 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -434,11 +434,11 @@ class TestWorksheet < Test::Unit::TestCase c = @ws.add_chart Axlsx::Pie3DChart assert_equal(@ws.relationships.size, 1, "multiple charts still only result in one relationship") c = @ws.add_comment :text => 'builder', :author => 'bob', :ref => @ws.rows.last.cells.last - assert_equal(@ws.relationships.size, 4, "adding a comment adds 3 relationships") + assert_equal(@ws.relationships.size, 3, "adding a comment adds 2 relationships") c = @ws.add_comment :text => 'not that is a comment!', :author => 'travis', :ref => "A1" - assert_equal(@ws.relationships.size, 4, "adding multiple comments in the same worksheet should not add any additional comment relationships") + assert_equal(@ws.relationships.size, 3, "adding multiple comments in the same worksheet should not add any additional comment relationships") c = @ws.add_pivot_table 'G5:G6', 'A1:D10' - assert_equal(@ws.relationships.size, 5, "adding a pivot table adds 1 relationship") + assert_equal(@ws.relationships.size, 4, "adding a pivot table adds 1 relationship") end |
