diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-01-12 17:12:18 +0100 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-02-07 14:49:28 +0100 |
commit | ea7274259a211170ee9f5a8714a2f9acd8bed6d8 (patch) | |
tree | d0aebf3e014b6538c9d7fc070c24f7ee09191aae /oox | |
parent | 37413f569ad557cc08ea625ce18a6570eb00f075 (diff) |
tdf#114842 Fix comment shape export for Calc
When we have shape definition for commend, eg.:
<v:shape id="_x0000_s1026" type="#_x0000_t202"
the "type" must be specified previously, eg:
<v:shapetype id="shapetype_202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype
Unfortunately here is the problem, "id" of "v:shapetype" is "shapetype_202".
It means that type used by shape type="#_x0000_t202" is not exisiting.
To fix that issue I have changed "v:shapetype" id to be exactly the same as it is used:
<v:shapetype id="_x005F_x0000_t202" coordsize="21600,21600" o:spt="202" path="m,l,21600l21600,21600l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype>
After that fix, comments are displayed correctly.
I also added unit test, to make sure that shape is using already defined "shapetype".
Change-Id: I8faf1befe7573aa33ee8a294eb192e5e255f37a1
Reviewed-on: https://gerrit.libreoffice.org/47821
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/preset-definitions-to-shape-types.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/oox/source/export/preset-definitions-to-shape-types.pl b/oox/source/export/preset-definitions-to-shape-types.pl index b41dd58953e8..e36e97a808a9 100644 --- a/oox/source/export/preset-definitions-to-shape-types.pl +++ b/oox/source/export/preset-definitions-to-shape-types.pl @@ -1187,8 +1187,9 @@ parse( $file ); close( $file ); if ( !defined( $result_shapes{'textBox'} ) ) { + # tdf#114842 shapetype id of the textbox, must be the same as defined $result_shapes{'textBox'} = - "<v:shapetype id=\"shapetype___ID__\" coordsize=\"21600,21600\" " . + "<v:shapetype id=\"_x005F_x0000_t__ID__\" coordsize=\"21600,21600\" " . "o:spt=\"__ID__\" path=\"m,l,21600l21600,21600l21600,xe\">\n" . "<v:stroke joinstyle=\"miter\"/>\n" . "<v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/>\n" . |