Issue 120143 - [From Symphony]the text in textbox display paritially when opening .ppt file
Summary: [From Symphony]the text in textbox display paritially when opening .ppt file
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-02 08:30 UTC by liuping
Modified: 2017-05-20 10:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
capture.png (272.40 KB, image/png)
2012-07-02 08:30 UTC, liuping
no flags Details
sample file (73.50 KB, application/vnd.ms-powerpoint)
2012-07-04 02:09 UTC, SunYing
no flags Details
screenshot about details in AOO and MS (94.82 KB, image/png)
2012-07-04 02:11 UTC, SunYing
no flags Details
patch for ppt import bullet size error (674 bytes, patch)
2012-07-04 14:28 UTC, SunYing
hdu: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description liuping 2012-07-02 08:30:09 UTC
Created attachment 78542 [details]
capture.png

Build: AOO3.4 rev 1327774


Description:

1. open the  sample file in AOO and MS
2. go to slide 3 ,compare the text in textbox between in AOO and MS

Defect:
the text in textbox display paritially
the detail infomation please refer the capture.png
Comment 1 liuping 2012-07-02 08:31:38 UTC
the bug reproduce in AOO version 1351960
Comment 2 SunYing 2012-07-04 02:09:48 UTC
Created attachment 78568 [details]
sample file
Comment 3 SunYing 2012-07-04 02:11:44 UTC
Created attachment 78569 [details]
screenshot about details in AOO and MS
Comment 4 SunYing 2012-07-04 02:12:13 UTC
I'm checking this defect
Comment 5 SunYing 2012-07-04 06:31:25 UTC
root cause:
the attr of bullet size imported wrong.
Comment 6 SunYing 2012-07-04 14:27:59 UTC
solution:
in line 5119-5125  at file "\main\filter\source\msfilter\svdfppt.cxx",
 if ( nMask & 0x0040 )	// buSize
 {
        rIn >> aSet.mpArry[ PPT_ParaAttr_BulletHeight ];
        if ( ! ( ( nMask & ( 1 << PPT_ParaAttr_BuHardHeight ) )
                     && ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) ) )
             aSet.mnAttrSet ^= 0x40;
 }

PPT_ParaAttr_BulletHeight =3
the seventh of aSet.mnAttrSet use to indicate weather bullet has size.

the fourth of nMask used to indicate  bulletHasSize (1 bit): A bit that specifies whether the bulletFlags field of the TextPFException structure that contains this PFMasks exists and whether bulletFlags.fBulletHasSize is valid.
 
the fourth of nBulFla used to indicate  fBulletHasSize (1 bit): A bit that specifies whether the bullet has a size.

the logic included if block:
only and only if  both the fourth of nMask and the fourth of nBulFla is 1, aSet.mnAttrSet is true, otherwise should be set to false.

in sample file, the fourth of nBulFla is 0,and the fourth of nMask is 1, in this situation,the seventh of aSet.mnAttrSet should be set  false,
however the logic  ( nBulFlg && ( 1 << PPT_ParaAttr_BuHardHeight ) ) is true, attr have not been set to false, next read bullet size is invalid,so error occur.
the right logic should be ( nBulFlg & ( 1 << PPT_ParaAttr_BuHardHeight ) ), check weather the fourth of nBulFlg is 1.
Comment 7 SunYing 2012-07-04 14:28:43 UTC
Created attachment 78579 [details]
patch for ppt import bullet size error
Comment 8 hdu@apache.org 2012-07-04 15:21:41 UTC
A great find, thank you very much! Applied as revision 1357304.
Comment 9 liuping 2012-08-23 02:51:08 UTC
Verified on Windows7-64bit &Ubuntu10.04 &Mac10.7 &Redhat &Ubuntu-64bit with AOO trunk r1374181 ,Pass