Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gnumeric
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
355
Issues
355
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GNOME
gnumeric
Commits
160a62a8
Commit
160a62a8
authored
Mar 10, 2014
by
Morten Welinder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xlsx: import super/subscript font information.
parent
562b0c90
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
NEWS
NEWS
+1
-1
plugins/excel/ChangeLog
plugins/excel/ChangeLog
+2
-0
plugins/excel/xlsx-read.c
plugins/excel/xlsx-read.c
+18
-0
test/t6502-styles.pl
test/t6502-styles.pl
+1
-2
No files found.
NEWS
View file @
160a62a8
...
...
@@ -9,7 +9,7 @@ Andreas:
Morten:
* Support volatile functions. [#305798]
* Improve testing.
* Export super/subscript fonts to xlsx. [Part of #726035]
*
Import/
Export super/subscript fonts to xlsx. [Part of #726035]
--------------------------------------------------------------------------
Gnumeric 1.12.12
...
...
plugins/excel/ChangeLog
View file @
160a62a8
2014-03-10 Morten Welinder <terra@gnome.org>
* xlsx-read.c (xlsx_CT_vertAlign): Read super/subscript.
* xlsx-write.c (xlsx_write_fonts): Save super/sub attribute.
2014-03-05 Morten Welinder <terra@gnome.org>
...
...
plugins/excel/xlsx-read.c
View file @
160a62a8
...
...
@@ -4109,6 +4109,23 @@ xlsx_CT_FontSize (GsfXMLIn *xin, xmlChar const **attrs)
gnm_style_set_font_size
(
state
->
style_accum
,
val
);
}
static
void
xlsx_CT_vertAlign
(
GsfXMLIn
*
xin
,
xmlChar
const
**
attrs
)
{
XLSXReadState
*
state
=
(
XLSXReadState
*
)
xin
->
user_state
;
static
EnumVal
const
types
[]
=
{
{
"subscript"
,
GO_FONT_SCRIPT_SUB
},
{
"superscript"
,
GO_FONT_SCRIPT_SUPER
},
{
NULL
,
0
}
};
int
val
=
GO_FONT_SCRIPT_STANDARD
;
for
(;
attrs
!=
NULL
&&
attrs
[
0
]
&&
attrs
[
1
]
;
attrs
+=
2
)
if
(
attr_enum
(
xin
,
attrs
,
"val"
,
types
,
&
val
))
;
/* Nothing */
gnm_style_set_font_script
(
state
->
style_accum
,
val
);
}
static
void
xlsx_font_uline
(
GsfXMLIn
*
xin
,
xmlChar
const
**
attrs
)
{
static
EnumVal
const
types
[]
=
{
...
...
@@ -4515,6 +4532,7 @@ GSF_XML_IN_NODE_FULL (START, STYLE_INFO, XL_NS_SS, "styleSheet", GSF_XML_NO_CONT
GSF_XML_IN_NODE
(
FONT
,
FONT_EXTEND
,
XL_NS_SS
,
"extend"
,
GSF_XML_NO_CONTENT
,
NULL
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_COLOR
,
XL_NS_SS
,
"color"
,
GSF_XML_NO_CONTENT
,
&
xlsx_font_color
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_SZ
,
XL_NS_SS
,
"sz"
,
GSF_XML_NO_CONTENT
,
&
xlsx_CT_FontSize
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_SCRIPT
,
XL_NS_SS
,
"vertAlign"
,
GSF_XML_NO_CONTENT
,
&
xlsx_CT_vertAlign
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_ULINE
,
XL_NS_SS
,
"u"
,
GSF_XML_NO_CONTENT
,
&
xlsx_font_uline
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_VERTALIGN
,
XL_NS_SS
,
"vertAlign"
,
GSF_XML_NO_CONTENT
,
&
xlsx_font_valign
,
NULL
),
GSF_XML_IN_NODE
(
FONT
,
FONT_SCHEME
,
XL_NS_SS
,
"scheme"
,
GSF_XML_NO_CONTENT
,
NULL
,
NULL
),
...
...
test/t6502-styles.pl
View file @
160a62a8
...
...
@@ -50,5 +50,4 @@ my $xls_pattern_filter = "$PERL -p -e 'use English; my \%m=(19,14,20,7,21,4,22,4
'
format
'
=>
'
Gnumeric_Excel:xlsx
',
'
ext
'
=>
"
xlsx
",
'
resize
'
=>
'
1048576x16384
',
'
filter1
'
=>
$xls_pattern_filter
,
'
ignore_failure
'
=>
1
);
'
filter1
'
=>
$xls_pattern_filter
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment