Issue 120723 - Table style is lost when import PPTX by AOO
Table style is lost when import PPTX by AOO
Status: CLOSED FIXED
Product: Impress
Classification: Application
Component: open-import
4.0.0-dev
All All
: P3 normal (vote)
: 4.0.0
Assigned To: WangZhe
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-27 08:11 UTC by Ma Bingbing
Modified: 2013-07-12 10:47 UTC (History)
3 users (show)

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


Attachments
sample file1 (404.15 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2012-08-27 08:42 UTC, Ma Bingbing
no flags Details
sample file2 (42.10 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2012-08-27 08:45 UTC, Ma Bingbing
no flags Details
Fix patch for this issue (9.21 KB, patch)
2012-08-30 07:28 UTC, Ma Bingbing
jiazema: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Ma Bingbing 2012-08-27 08:11:30 UTC
1. launch AOO
2. Open the sample files

you will find that the table styles lost
Comment 1 Ma Bingbing 2012-08-27 08:42:45 UTC
Created attachment 79173 [details]
sample file1
Comment 2 Ma Bingbing 2012-08-27 08:45:36 UTC
Created attachment 79174 [details]
sample file2
Comment 3 Ma Bingbing 2012-08-27 08:54:10 UTC
Root casue
  When we create table in MS Office 2007 and use one of the predefined styles from UI, and save as .pptx file, then open in AOO, the table styles' content will be saved in tableStyles.xml in the zip package with the unique id. So AOO can show correctly when import the tables.
  But in this samples, there are no table styles' detailed contents in the tableStyle.xml, but only ID, so we lost the table style information. MS Office 2007 can show the correct table style according to the unique ID only, which is for the predefined table styles in OOXML.
Comment 4 Ma Bingbing 2012-08-27 08:57:08 UTC
Solution:
  The ID of table in tablestyle.xml is unique for PPTX predefined table style, and we can use the ID to map the unique style for table. 
  So When AOO import a table in pptx just have the tableStyleId, we will create a the tablestyle's content and then apply them to the table.
Comment 5 Ma Bingbing 2012-08-27 09:07:55 UTC
  There are about 60 predefined table styles in PPTX, but it will cost too much time to create the content of every tablestyle according to the content in tablestyle.xml. And the sample files just includes 3 table styles(Medium2-Accent1, Medium2-Accent2, Medium4-Accent4). Moreover, this sample files aren't common, so we could just create these 3 styles temporarily.
Comment 6 Ma Bingbing 2012-08-27 09:09:36 UTC
the details of table style, can be seen in following url:
http://wiki.openoffice.org/wiki/Table_Style_in_Writerfilter
Comment 7 liuping 2012-08-28 06:00:32 UTC
confirm on AOO350ml 1377620
Comment 8 Ma Bingbing 2012-08-30 07:28:12 UTC
Created attachment 79230 [details]
Fix patch for this issue
Comment 9 WangZhe 2012-09-07 03:30:41 UTC
I'll take this one
Comment 10 WangZhe 2012-09-07 04:49:53 UTC
Delivered At revision: 1381863
Comment 11 louqle 2012-11-07 01:02:43 UTC
checked the sample files in build 1404513, pass