Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gnumeric
Commits
8933a113
Commit
8933a113
authored
Sep 23, 1998
by
Daniel Veillard
Browse files
Set-up compression of output, Daniel.
parent
beff1ee5
Changes
5
Hide whitespace changes
Inline
Side-by-side
ChangeLog-1999-07-09
View file @
8933a113
Tue Sep 22 20:50:11 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: set-up for compression of output. Should be tunable
from the interface.
1998-09-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/xml-io.c (writeXmlStyle): Save colors. Save pattern.
...
...
ChangeLog-2000-02-23
View file @
8933a113
Tue Sep 22 20:50:11 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: set-up for compression of output. Should be tunable
from the interface.
1998-09-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/xml-io.c (writeXmlStyle): Save colors. Save pattern.
...
...
OChangeLog-1999-07-09
View file @
8933a113
Tue Sep 22 20:50:11 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: set-up for compression of output. Should be tunable
from the interface.
1998-09-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/xml-io.c (writeXmlStyle): Save colors. Save pattern.
...
...
OChangeLog-2000-02-23
View file @
8933a113
Tue Sep 22 20:50:11 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* src/xml-io.c: set-up for compression of output. Should be tunable
from the interface.
1998-09-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/xml-io.c (writeXmlStyle): Save colors. Save pattern.
...
...
src/xml-io.c
View file @
8933a113
...
...
@@ -552,31 +552,20 @@ Sheet *gnumericReadXmlSheet(const char *filename) {
*/
int
gnumericWriteXmlSheet
(
Sheet
*
sheet
,
const
char
*
filename
)
{
FILE
*
output
;
xmlDocPtr
xml
;
xmlNsPtr
gmr
;
parseXmlContext
ctxt
;
int
ret
;
g_return_val_if_fail
(
sheet
!=
NULL
,
-
1
);
g_return_val_if_fail
(
IS_SHEET
(
sheet
),
-
1
);
g_return_val_if_fail
(
filename
!=
NULL
,
-
1
);
/*
* Open in write mode, !!! Save a bak ?
*/
output
=
fopen
(
filename
,
"w"
);
if
(
output
==
NULL
)
{
perror
(
"fopen"
);
fprintf
(
stderr
,
"gnumericWriteXmlSheet: couldn't save to file %s
\n
"
,
filename
);
return
(
-
1
);
}
/*
* Create the tree
*/
xml
=
xmlNewDoc
(
"1.0"
);
if
(
xml
==
NULL
)
{
fclose
(
output
);
return
(
-
1
);
}
gmr
=
xmlNewGlobalNs
(
xml
,
"http://www.gnome.org/gnumeric/"
,
"gmr"
);
...
...
@@ -591,9 +580,10 @@ int gnumericWriteXmlSheet(Sheet *sheet, const char *filename) {
/*
* Dump it.
*/
xmlDocDump
(
output
,
xml
);
/* !!! Should add a return code and check */
xmlSetCompressMode
(
9
);
ret
=
xmlSaveFile
(
filename
,
xml
);
xmlFreeDoc
(
xml
);
fclose
(
output
);
if
(
ret
<
0
)
return
(
-
1
);
return
(
0
);
}
...
...
@@ -653,31 +643,19 @@ Workbook *gnumericReadXmlWorkbook(const char *filename) {
*/
int
gnumericWriteXmlWorkbook
(
Workbook
*
wb
,
const
char
*
filename
)
{
FILE
*
output
;
xmlDocPtr
xml
;
xmlNsPtr
gmr
;
parseXmlContext
ctxt
;
int
ret
;
g_return_val_if_fail
(
wb
!=
NULL
,
-
1
);
g_return_val_if_fail
(
filename
!=
NULL
,
-
1
);
/*
* Open in write mode, !!! Save a bak ?
*/
output
=
fopen
(
filename
,
"w"
);
if
(
output
==
NULL
)
{
perror
(
"fopen"
);
fprintf
(
stderr
,
"gnumericWriteXmlWorkbook: couldn't save to file %s
\n
"
,
filename
);
return
(
-
1
);
}
/*
* Create the tree
*/
xml
=
xmlNewDoc
(
"1.0"
);
if
(
xml
==
NULL
)
{
fclose
(
output
);
return
(
-
1
);
}
gmr
=
xmlNewGlobalNs
(
xml
,
"http://www.gnome.org/gnumeric/"
,
"gmr"
);
...
...
@@ -692,9 +670,10 @@ int gnumericWriteXmlWorkbook(Workbook *wb, const char *filename) {
/*
* Dump it.
*/
xmlDocDump
(
output
,
xml
);
/* !!! Should add a return code and check */
xmlSetCompressMode
(
9
);
ret
=
xmlSaveFile
(
filename
,
xml
);
xmlFreeDoc
(
xml
);
fclose
(
output
);
if
(
ret
<
0
)
return
(
-
1
);
return
(
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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