diff options
author | Tor Lillqvist <tml@collabora.com> | 2017-10-26 23:30:42 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2017-10-26 23:34:04 +0300 |
commit | 8cd958a48e93efa4c21fd7687652ded8f9432c84 (patch) | |
tree | 295b41709ad231af4ed92005961d2dad203833f1 /oox/source | |
parent | 84eb42728a3ceedaac382a8212230e3960732c41 (diff) |
Add a comment in CreateTableStyle() related to the AOO fix for #i120723#
Change-Id: Ic2eadf1942927efb6a6b209db591e869b61362f4
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/drawingml/table/tableproperties.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx index a20191e05633..e5bc4f0cc3d5 100644 --- a/oox/source/drawingml/table/tableproperties.cxx +++ b/oox/source/drawingml/table/tableproperties.cxx @@ -144,6 +144,22 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , sal_Int32 tblFill TableStyle* CreateTableStyle(const OUString& styleId) { TableStyle* pTableStyle = nullptr; + + // It is a bit silly to handle styleIds specifically and separately like this. Also note that + // the first two code blocks below are mostly copy-pasted, modulo the comments and the fact that + // one uses XML_accent1 and the other XML_accent2. Presumably it would be better to use a + // table-based approach, to have a mapping from style ids to the parameters that actually change + // between styles. See + // https://msdn.microsoft.com/en-us/library/office/hh273476(v=office.14).aspx for an unofficial + // list of these ids (that is said on that page to be undocumented, which doesn't sound credible?). + + // But the odd thing is that even if the code here handles only three specific style ids, if I + // edit the bug doc from AOO bug #i120723# (for which this code was added) and choose some other + // style, the table shows up mostly fine in Impress anyway. Thus I wonder whether this whole + // code is actually unnecessary, and the .pptx contains explicit values for all the components + // of a style anyway, and LibreOffice's code (at least now, maybe not when this code was added + // to AOO in 2012) knows to look at that? + if(styleId == "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}") { //Medium Style 2 Accent 1 pTableStyle = new TableStyle(); //first row style |