Issue 119795 - Table style does not import correctly when open pptx file in AOO.
Summary: Table style does not import correctly when open pptx file in AOO.
Status: CONFIRMED
Alias: None
Product: Impress
Classification: Application
Component: open-import (show other issues)
Version: 3.4.0
Hardware: PC All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 08:57 UTC by binguo
Modified: 2012-08-21 07:57 UTC (History)
3 users (show)

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


Attachments
Sample file created from MS PPT2007 can repro this bug (45.75 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2012-06-05 08:57 UTC, binguo
no flags Details
Patch for this bug (5.89 KB, patch)
2012-08-03 02:25 UTC, liangweike
orw: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description binguo 2012-06-05 08:57:43 UTC
Created attachment 78008 [details]
Sample file created from MS PPT2007 can repro this bug

Steps:
1. Open attached pptx file created in MS PPT2007 via AOO.
2. Check the table style in 2 slides.
3. Open it in MS PPT2007, compare the content with that in AOO.

Defect:
Table style does not import correctly.

Notes:
It does not occur on Symphony301.
Comment 1 liuping 2012-06-12 07:02:44 UTC
reproduce the bug,confirm
Comment 2 liangweike 2012-08-03 02:25:31 UTC
Created attachment 78835 [details]
Patch for this bug
Comment 3 Oliver-Rainer Wittmann 2012-08-03 05:50:44 UTC
Comment on attachment 78835 [details]
Patch for this bug

requesting patch review on behalf of liangweike
Comment 4 Yolanda Zhang Ying 2012-08-15 09:54:40 UTC
I have already checked the code change, but I need to verify the solution on my local environment, will update when ready.
Comment 5 Yolanda Zhang Ying 2012-08-21 07:57:34 UTC
After further review and verify, some problems need to be clarified:

1> We need more information on the problem description on the user scenario to make such file, and also the solution description, and UT coverage;

2> From the solution, it seems that just only fix the fill color for last row and last column, so it's a partial fix, isn't it?

3> Below code has unclear definition, and just for this fix, it does not make sense to put it into base, except it's for whole logic to do it like this:
\oox\source\drawingml\fillproperties.cxx
if( maFillColor.isUsed() )
                {
                                      //This part is specify for this fix, not for correct logic for this part, need to give more explanation for the necessary. And what does bTransformed mean?
					if( bTransformed )
						rPropMap.setProperty( SHAPEPROP_FillColor, maFillColor.getColor( rGraphicHelper, nPhClr ) );
					else
						rPropMap.setProperty( SHAPEPROP_FillColor, maFillColor.getSchemeColor( rGraphicHelper) );

                }

4> The code below is special for fill property set for specific table cells, suggest to consider the logic for this part that, we need to calculate the target styles, which including: font style and table style, in the function, and push it as a result into the PropertyMap:

\oox\source\drawingml\table\tablecell.cxx
if ( rProperties.isLastRow() && ( nRow == nMaxRow -1 ) )
	{
		... ...
                //This part aim to put the cell fill properties into PropertyMap, but I think it should calculate the fill properties according to the cell's characteristic as a result of aFillProperties, and push into PropertyMap at last. So it's more clearly that how could we decide the properties in the whole logic.
		aFillProperties.assignUsed( maFillProperties );
		aFillProperties.pushToPropMap( aPropMap, rFilterBase.getGraphicHelper(), false ); 
		bPropPushed =true;
	}