Subject: | Phonetic hints concatenated in shared string in cell value. |
Date: | Mon, 3 Jul 2017 23:49:17 +0900 |
To: | bug-Spreadsheet-XLSX [...] rt.cpan.org |
From: | 小田 照敬 <k1complete [...] gmail.com> |
Hi. I have a idea.
Distribution-name: Spreadsheet-XLSX-0.15
Perl-version: 5.18.2
OS-version: Darwin air13.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017;\
root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
Request-Type: Enhancement
Description:
In east asian environment, Often XLSX file includes phonetic hint resources.
This case, $cell->[0][0]->{Val} is concatenated <rph><t>…</t></rph> and <t>…</t>.
I make support to rPh and phoneticPr markup for far east asian environment.
Phonetic hint, used in far east asia is supported by 'RPh' and 'PhoneticPr'
key:
<si>
<t>課きく 毛こ</t>
<rPh sb="0" eb="1">
<t>カ</t>
</rPh>
<rPh sb="4" eb="5">
<t>ケ</t>
</rPh>
<phoneticPr fontId="1"/>
</si>
if a cell[0][0]->{Val} is '課きく 毛こ', The
cell[0][0]->{RPh}->[0]->{Val} is 'カ', cell[0][0]->{RPh}->[0]->{Sb} is
0, and cell[0][0]->{RPh}->[0]->{Eb} is 1,
cell[0][0]->{RPh}->[1]->{Val} is 'ケ', cell[0][0]->{RPh}->[1]->{Sb} is
4, and cell[0][0]->{RPh}->[0]->{Eb} is 5,
cell[0][0]->{PhoneticPr}->{FontId} is 1,
cell[0][0]->{PhoneticPr}->{Type} is undef. Phonetic hint keys are
named by capitalizing the first letter from ecma-376 attribute names.
I put a patch on GitHub below:
https://github.com/k1complete/Spreadsheet-XLSX/pull/1/files
Regards.