Bug 62018 - RichTextString.numFormattingRuns not work on pasted cell contains styled text.
Summary: RichTextString.numFormattingRuns not work on pasted cell contains styled text.
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.17-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-19 02:36 UTC by Hanbyul Lee
Modified: 2018-01-23 05:49 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hanbyul Lee 2018-01-19 02:36:22 UTC
There is a method numFormattingRuns() in RichTextString class(interface).

I have been using that method to get font and style of a rich text.

However, there is a bug that numFormattingRuns() always return 0(zero) when processing cell was pasted from other cell with string-level style(it means partial text was styled, not entire cell).

So I cannot get same returned value of numFormattingRuns() and rich string with style.

In a case I made change cell string or style on pasted cell, then numFormattingRuns() returns value that I expected.

I report this bug.
Comment 1 Nick Burch 2018-01-19 06:26:50 UTC
Could you please upload a very small file that demonstrates the problem? A junit test using it that shows it would be amazing too, but file and details to trigger should be enough
Comment 2 Hanbyul Lee 2018-01-23 05:49:11 UTC
(In reply to Nick Burch from comment #1)
> Could you please upload a very small file that demonstrates the problem? A
> junit test using it that shows it would be amazing too, but file and details
> to trigger should be enough

Hello, Nick. Thanks for your response.

I have made a test code and found there was no bug on common cells.

Sorry for my mistake.

But I should found a bug on my program from a former work colleague.

Thank you anyway!