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 2006/04/17 17:47:39 UTC

DO NOT REPLY [Bug 39324] New: - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324

           Summary: RichTextRun.setBold and RichTextRun.setItalic corrupt
                    the underlying StyleTextPropAtom.
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSLF
        AssignedTo: poi-dev@jakarta.apache.org
        ReportedBy: yegor@dinom.ru


Hi Nick

It seems something is wrong with RichTextRun class.

setBold or setItalic operations corrupt the underlying StyleTextPropAtom.
To see the problem run the attached TestShapes.testTextBoxWrite.

The problems is only with flag values (bold, italic, underline). 
If I set only font size everything is OK. I save the file, read it again and see
the correct font size.
But if I call setBold or setItalic things go wrong and after save font
size = 0.

I did work in the past. I guess you missed something after when
refactored this class lately.

Regards, Yegor Kozlov

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324





------- Additional Comments From yegor@dinom.ru  2006-04-19 15:54 -------
(In reply to comment #3)
> This is odd. I've just run your test, and it passes just fine for me....
> 
> Can you do a svn update, then an ant clean, then try your test again? Quite odd
> that it passes for me but not for you.

this is really odd!
When I run tests  in IntelliJ Idea 4.0 I got errors! When I run them by ant they
pass! Probably something is wrong with my IDE. I need to investigate it in details.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324


nick@torchbox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From nick@torchbox.com  2006-04-21 13:47 -------
OK, I've found two bugs (and a fault in the test....)

Firstly, there was a bug with the flag type TextProps, when created from
scratch, which was biting us. This should be fixed, and should allow everything
to behave properly. Due to a clone, we were seeing different behaviour on the
first call

Then, there was the bug in the test (which has been committed, working)

Finally, after adding new TextBoxes, they weren't being registered with the
PPDrawing, so they weren't always being correctly updated on write out. That's
been fixed.

Hopefully it now all works :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324





------- Additional Comments From nick@torchbox.com  2006-04-19 11:42 -------
This is odd. I've just run your test, and it passes just fine for me....

Can you do a svn update, then an ant clean, then try your test again? Quite odd
that it passes for me but not for you.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324





------- Additional Comments From nick@torchbox.com  2006-04-19 10:00 -------
Bah. There had been a bug in how the mask textprops wrote themselves out. I
guess I didn't quite get it right when I tried to fix it :(

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324


yegor@dinom.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #18113|0                           |1
        is obsolete|                            |




------- Additional Comments From yegor@dinom.ru  2006-04-20 12:44 -------
Created an attachment (id=18146)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18146&action=view)
Test which confirms that the problem exists

Forgot to mention:
 It fails in both cases: under Ant and in IntelliJ Idea.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324


yegor@dinom.ru changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From yegor@dinom.ru  2006-04-20 12:42 -------
Nick,

It seems the order in which tests are running is important. 

Comment all tests in TestShapes but testTextBoxWrite, recompile, run and get
this error!

In our case JUnit first runs testTextBoxRead() and then testTextBoxWrite(). It
looks like
the first test affects the others!
 To make sure I created a standalone program with main() and confirmed that the
error exists.

I attached the new test case.

Look at the line 45:
new SlideShow(new HSLFSlideShow(filename));

With this line test succeeds. Comment it and the test fails! 

I debugged it a little bit. It seems some static initializes are not set properly.
When test fails Variable subPropMasks in BitMaskTextProp.setSubValue
is filled with 0, otherwise there are some values.

Please check it.

Yegor




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324





------- Additional Comments From nick@torchbox.com  2006-04-21 11:33 -------
Oww oww, this bug hurts my head....

You weren't resetting sl after the load, which wasn't helping. However, I've now
got my hands on the real data that gets written out for the StyleTextPropAtom,
now to figure out why it's not correct!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324


nick@torchbox.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From nick@torchbox.com  2006-04-19 16:19 -------
I've had similar problems with Eclipse, when its idea of where to build class
files to differred from ant's

Glad it's all fixed though :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/


DO NOT REPLY [Bug 39324] - RichTextRun.setBold and RichTextRun.setItalic corrupt the underlying StyleTextPropAtom.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39324>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39324





------- Additional Comments From yegor@dinom.ru  2006-04-17 15:48 -------
Created an attachment (id=18113)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=18113&action=view)
test case which demonstrates the bug


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List:    http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/