Issue 119478 - [From Symphony]PPT Import:Cell background color in table gets lost while opening a ppt file with AOO
[From Symphony]PPT Import:Cell background color in table gets lost while open...
Status: CLOSED FIXED
Product: Impress
Classification: Application
Component: open-import
3.4.0
PC All
: P3 normal (vote)
: 4.0.0
Assigned To: jsc
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 03:26 UTC by liuping
Modified: 2012-12-26 08:47 UTC (History)
5 users (show)

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


Attachments
sample file (67.00 KB, application/vnd.ms-powerpoint)
2012-05-29 03:26 UTC, liuping
no flags Details
capture.png (159.35 KB, image/png)
2012-05-29 03:28 UTC, liuping
no flags Details
tablebg_transparent_sample (132.00 KB, application/vnd.ms-powerpoint)
2012-06-07 06:52 UTC, Lei Debin
no flags Details
patch for ppt table background transparent color issue (913 bytes, patch)
2012-06-07 07:03 UTC, Lei Debin
debin.lei: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description liuping 2012-05-29 03:26:09 UTC
Created attachment 77671 [details]
sample file

build info: rev: 1327774
Steps:
1. Launch AOO, then open the sample files, 
2. Check the Table in the slide page.
Defect:
1.For the first slide, The background color in the right-bottom cell should be purple, but it gets lost
2.It is the same with the second slide
3.the third slide, the whole table background lost 


pls .see attachment pic
Comment 1 liuping 2012-05-29 03:28:12 UTC
Created attachment 77673 [details]
capture.png
Comment 2 Lei Debin 2012-06-07 01:09:51 UTC
The issue can be reproduced.
Need change the bug status to CONFIRM
Comment 3 Lei Debin 2012-06-07 01:12:02 UTC
A first look, seem the table bg color with transparent had issue.
The transparent value can not be set correctly.
I will dig into the issue.
Comment 4 Yan Ji 2012-06-07 02:09:58 UTC
reproduce the issue
Comment 5 Lei Debin 2012-06-07 06:48:41 UTC
After more investigation, I have found the root cause.
There is a function named as:
void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
in main\filter\source\msfilter\svdfppt.cxx
The function will apply the attributes for the cell of tables in SD application.
Here is the codes for processing the transparent of the background cell color
---------------------------------------------------------------------------
sal_Int16 nFillTransparence( ( (const XFillTransparenceItem&)pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
if ( nFillTransparence != 100 )
{
     nFillTransparence *= 100;
     static const rtl::OUString sFillTransparence(        String(RTL_CONSTASCII_USTRINGPARAM( "FillTransparence" ) ) );
      xPropSet->setPropertyValue( sFillTransparence, Any( nFillTransparence ));
}  
------------------------------------------------------------------------
The var nFillTransparence is ranged from 0(solid) to 100(completed transparent).
So the  nFillTransparence *= 100; is complete wrong. 
It should be removed.

And when nFillTransparence == 100 need to be set the value too, otherwise, the color will be solid, not transparent.
Comment 6 Lei Debin 2012-06-07 06:52:57 UTC
Created attachment 78095 [details]
tablebg_transparent_sample

In the sample file, there is a table with one row and three cell.
The first cell bg color transparent value is 0(solid);
The second one is 100 and last one is 50.
Comment 7 Lei Debin 2012-06-07 07:03:40 UTC
Created attachment 78100 [details]
patch for ppt table background transparent color issue

I have test the patch with tablebg_transparent_sample file.
Open and save to ppt and ods format, then open again with AOO.
It works well.
Comment 8 Andre 2012-06-07 11:43:54 UTC
Reviewed, tested, and applied the patch.

SVN revision is 1347577.
Comment 9 liuping 2012-06-25 02:50:40 UTC
confirm fixing the bug on ver 1351249 onn Win7 ,pass