45 Commits

Author SHA1 Message Date
Tom Weber
b746aceced Image from data (#251)
* ability to create image from in-memory data

* gitignore: vim swap files
2019-03-29 16:26:51 +00:00
Todd
4f678e9952 spreadsheet: add a RemoveCalcChain function
This allows removing the cached calculation change which
can contain bad data if rows are inserted/removed.

Fixes #215
2018-10-17 17:11:41 -05:00
Todd
70dbd44232 common: handle unordered relationships correctly
Continued part of #198 after @JasonFromSpace pointed out
an error with the original fix.
2018-09-17 17:58:35 -05:00
Todd
781c94bde4 common: generate unique relationship IDs
We were relying on ordered relationship IDs to be generated
by other applications when we open their files, but it's not
required which broke an assumption we made.  Fix this by ensuring
that generated relationship IDs don't occur in the file already.

Fixes #198
2018-09-14 14:48:38 -05:00
Todd
75f877dbab document: Google docs writes out incorrect floating point values
Relax our parsing somewhat so we can read these documents,
truncating at the decimal point back to an integer.

Fixes #196
2018-09-11 20:28:33 -05:00
Evgeniy Kulikov
1f94b99711 document: add footer image support
Add support for adding images to footers.
2018-07-16 16:35:15 -05:00
Todd
fd26e4bbcf document: support for embedding images in headers
Fixes #150
2018-01-24 20:05:00 -05:00
Todd
33a8645f66 common: fix app version
Our app version wasn't correct per MS's spec.  Modify it
to match the XX.YYYY format.
2018-01-18 17:30:07 -05:00
Todd
01883a5e87 common: support more app/core properties
Support language, links up to date, and document security
flag and update unit test golden files.
2018-01-18 10:53:35 -06:00
Todd
2e895a8dad document: when adding an image, ensure content-types exist for it
Fixes #142
2017-12-27 16:48:14 -06:00
Todd
f5a8df0deb presentation: initial work for presentations 2017-11-18 11:52:13 -06:00
Todd
e74c739f40 common: fix some lint issues 2017-10-10 20:07:57 -04:00
Todd
f8b73698a6 gooxml: don't put a 'v' in version number metadata
OSX Word requires that this be only numbers, or it will
display an error indicating a corrupted file.
2017-10-03 07:40:50 -05:00
Todd
d0820f1553 gooxml: add release info to metadata in generated files 2017-10-01 11:45:06 -05:00
Todd
801388a119 gooxml: clean up some old TODOs 2017-09-30 07:09:26 -05:00
Todd
5bfa034ef9 gooxml: add and use a Log function
This allows redirecting or discarding any
logs produced by the library.
2017-09-30 07:09:26 -05:00
Todd
89b1416b8f gooxml: rework how filenames are calculated
This is needed for pivot tables, split out from that branch
so any further changes to filename handling will be easier in
master.
2017-09-28 18:20:56 -05:00
Todd
427f7b1e45 schema: rename officeDocument to ofc 2017-09-23 10:01:17 -04:00
Todd
599631208a schema: rename drawingml to dml 2017-09-23 10:01:17 -04:00
Todd
e880adfc5b schema: rename package to pkg 2017-09-23 10:01:17 -04:00
Todd
09825ac816 schema: rework schema namespaces to work around Windows issues
The go command on Windows doesn't like long path name. To
work around this, this is the first in a series of changes to
shorten the schema disk path structure in a few places.

Fixes #89
2017-09-23 10:01:17 -04:00
Todd
20e8ecd685 format: add package doc 2017-09-19 19:45:41 -04:00
Todd
558e5ee274 spreadsheet: add image support and example 2017-09-11 20:17:06 -05:00
Todd
c863154dc0 common: move images to doc base 2017-09-11 20:17:06 -05:00
Todd
2498814f67 spreadsheet: add support for hyperlinks 2017-09-07 06:12:41 -04:00
Todd
cd10a33f30 spreadsheet: improve Excel compatibility
Mac Excel apparently doesn't like empty drawing
relationships file.
2017-09-05 10:01:28 -05:00
Todd
e83404616d Revert "schema: apply more default values"
This caused problems with Libre.

This reverts commit 59b2711e1b87be534c9cd3d155710d13cfe7743b.
2017-09-05 06:33:38 -05:00
Todd
59b2711e1b schema: apply more default values
These are implied values as they are the defaults in the XSD
for optional attributes/elements. However I've noticed that
I keep running into issues where Mac Excel/Word fail to open
a file unless an optional default is provided.

I'll just add them all to hopefully increase compatibility and
save painful file format debugging sessions later.
2017-09-04 17:14:06 -05:00
Todd
ba68d59d67 schema: serialize booleans as 1/0 instead of true/false
This matches what the MS products and LibreOffice do.
2017-09-04 11:08:29 -05:00
Todd
28e4b68715 common: add warning for using urls instead of mime type 2017-09-04 11:08:29 -05:00
Todd
9090e4f93c meta: move filename information out of packages
This seems like the better choice, a lot of the logic is shared
between the document types, and it allows generating filenames in
a single place.

The only downside is that you must pass in the document type as
some content types have different typical names depending on the
document type (e.g. an 'office document' is the main document.xml,
workbook.xml and presentation.xml
2017-09-04 11:08:29 -05:00
Todd
f07c57cae7 gooxml: move content types to base package 2017-09-04 11:08:29 -05:00
Todd
6164089457 zippkg: start breaking out decoding
Decoding was getting fairly complicated, it seems cleaner
to have something handle the relationships file and traversal
and the document just be notified via callback when new
files have been found.
2017-09-04 11:08:29 -05:00
Todd
ef0d194ae2 spreadsheet: fix issue loading spreadsheets with non-standard naming 2017-09-02 17:50:38 -05:00
Todd
8f45ea019b spreadsheet: add thumbnail support 2017-09-02 17:50:38 -05:00
Todd
a54e7275e4 common: add core properties tests 2017-09-02 14:23:54 -05:00
Todd
cb06f7b80a common: add AppProperties unit tests 2017-09-02 14:23:54 -05:00
Todd
180c0f958d common: flesh out core properties wrapper and add an example 2017-09-01 21:38:55 -05:00
Todd
ec7c4ce013 document: add support for extracting/saving document thumbnail 2017-09-01 17:13:33 -05:00
Todd
59d34fa7a0 schema: handle xsd:any differently
Instead of accumulating tokens, parse it using Go 1.8's
attr/element collection tags.
2017-08-31 18:27:34 -05:00
Todd
9237920cf3 meta: add more documentation 2017-08-29 23:12:33 -05:00
Todd
0da5ce4a82 schema: rework xsd:any type 2017-08-29 22:40:44 -05:00
Todd
105ef6916e document: read/restore all contents of a Word 2016 file
Adds support for serializing/deserializing of:

- webSettings
- fontTable
- endnotes
- footnotes
- themes
- optional numbering
2017-08-29 22:40:44 -05:00
Todd
366c3b51ec schema: rework xsd:any handling 2017-08-29 16:55:03 -05:00
Todd
4bd04dd2e5 initial commit 2017-08-29 15:06:08 -05:00