You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/10/29 13:18:12 UTC

[Bug 58563] New: XSSFRichTextString does not implement equals, but HSSFRichTextString does

https://bz.apache.org/bugzilla/show_bug.cgi?id=58563

            Bug ID: 58563
           Summary: XSSFRichTextString does not implement equals, but
                    HSSFRichTextString does
           Product: POI
           Version: 3.13-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: adrodoc55@googlemail.com

XSSFRichTextString does not implement equals, but HSSFRichTextString does.
This makes it inconsistent to work with the shared Interface RichTextString.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 58563] XSSFRichTextString does not implement equals, but HSSFRichTextString does

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58563

--- Comment #2 from Adrodoc55 <ad...@googlemail.com> ---
(In reply to David North from comment #1)
> What sort of equality did you have in mind?
> 
> * XSSFRichTextString comparable to other XSSFRichTextString (only)
> * XSSFRichTextString comparable to HSSFRichTextString
> 
> It looks like the HSSF equality is in terms of the string characters
> themselves, and not the fonts. i.e. it's roughly equivalent to comparing
> getString() values.
> 
> Potentially we could make both sorts comparable on the basis of getString().

I had XSSFRichTextString comparable to other XSSFRichTextString (only) in mind.
I am not sure if XSSFRichTextString comparable to HSSFRichTextString would be
usefull.

In my concrete case the problem is, that the following assertion works for HSSF
but not XSSF:
Cell cell = ...
RichTextString richTextString = ...
cell.setCellValue(richTextString)
assert cell.getRichStringCellValue().equals(richTextString)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 58563] XSSFRichTextString does not implement equals, but HSSFRichTextString does

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58563

--- Comment #3 from Javen O'Neal <on...@apache.org> ---
Shouldn't H/XSSFRichTextString equals method be a rich text compare? If the
user wants plain text compare, they can always do
H/XSSFRichTextString.getString().equals.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 58563] XSSFRichTextString does not implement equals, but HSSFRichTextString does

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58563

David North <dt...@corefiling.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 58563] XSSFRichTextString does not implement equals, but HSSFRichTextString does

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58563

David North <dt...@corefiling.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from David North <dt...@corefiling.co.uk> ---
What sort of equality did you have in mind?

* XSSFRichTextString comparable to other XSSFRichTextString (only)
* XSSFRichTextString comparable to HSSFRichTextString

It looks like the HSSF equality is in terms of the string characters
themselves, and not the fonts. i.e. it's roughly equivalent to comparing
getString() values.

Potentially we could make both sorts comparable on the basis of getString().

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org