Skip to content

Fix delete and add chart throws exception#990

Merged
tonyqus merged 4 commits into
nissl-lab:masterfrom
jake-codes-at-5-am:fix-delete-and-add-chart-throws-exception
Jan 24, 2023
Merged

Fix delete and add chart throws exception#990
tonyqus merged 4 commits into
nissl-lab:masterfrom
jake-codes-at-5-am:fix-delete-and-add-chart-throws-exception

Conversation

@artemkoloskov-admin
Copy link
Copy Markdown
Contributor

When new chart was created it's number was determined by the number of previously existing charts. This created a bug, when there were charts chart1.xml and chart2.xml, chart1 was deleted and the new chart was created. Since there is a chart already (chart2), the number for a new chart would be 2 (CountOfCharts + 1). This will throw an exception, because chart2.xml already exists.

Also added a RemoveChart method to XSSFDrawing and tests for the fixed bug and for the the RemoveChart method

Artem Koloskov added 4 commits December 29, 2022 11:13
The method checks for existing chat names, and gets the firtst chart number that isnt in use yet.
For ease of chart removal.
Improve TestRemoveOneOfTwoChartsAndAddNewOne test.
@tonyqus
Copy link
Copy Markdown
Member

tonyqus commented Jan 24, 2023

LGTM

@tonyqus tonyqus merged commit e428654 into nissl-lab:master Jan 24, 2023
@tonyqus tonyqus added this to the NPOI 2.6.1 milestone Jan 24, 2023
@artemkoloskov-admin artemkoloskov-admin deleted the fix-delete-and-add-chart-throws-exception branch January 26, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants