Issue 119478

Summary: [From Symphony]PPT Import:Cell background color in table gets lost while opening a ppt file with AOO
Product: Impress Reporter: liuping <doneyourself>
Component: open-importAssignee: jsc
Status: CLOSED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: awf.aoo, debin.lei, jsc, liushenf, yanji.yj
Version: 3.4.0   
Target Milestone: 4.0.0   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
sample file
none
capture.png
none
tablebg_transparent_sample
none
patch for ppt table background transparent color issue debin.lei: review?

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