Commit Graph

213 Commits

Author SHA1 Message Date
23b49f2390 writerfilter: fail on mistyped namespace URL's
And also fix one typo detected by this new check.

Change-Id: Iaa7a4bb0b6dc3f81e5dd0b352584029cfed4ffbb
2014-08-19 08:17:34 +02:00
403fdaba8a oox: sort namespaces in generated header
Otherwise it's next to impossible to reasonably diff the generated code
after a change.

Change-Id: I13f98532535bfe3f4915677cb3346300f25e0cfa
2014-08-15 22:18:33 +02:00
f91b81c24e Add reference to 'DomainMapper' to some DOCX import classes
The reason for adding 'DomainMapper' is to be able to check
during import in these classes whether or not the import is
in a 'styles.xml' file or not.

Also added blank handling for new XML nodes.

Reviewed on:
	https://gerrit.libreoffice.org/10870

Change-Id: Ib2acde736d96f30eda40ee327991dc6ae0ed7f25
2014-08-12 08:34:47 +02:00
d1c1248bee oox: tokenize all attributes from CT_Cnf
Change-Id: Ifceb9c1319208c897a6f018fa0b5f8863b58c3e1
2014-08-05 17:32:28 +02:00
19ef6b3e39 oox: sort tokens.txt
The benefit is that then it's possible to just add new tokens at the end
of the file, have your editor put them to their sorted place and have no
additional noise in the commit diff.

Change-Id: I221b8b10ae588180dd61207a6c9279fe8af7531f
2014-08-05 17:32:27 +02:00
e9876fbe96 oox: tokenize noHBand and noVBand
Change-Id: I43ea6cb2665e17239da61adffd0583b9201bef59
2014-08-04 16:41:07 +02:00
48f31a9242 bnc#885825: OOXML import and export of data label borders. 2014-07-26 16:26:08 -04:00
acd2c90978 fdo#80897: Preservation of text warp properties.
- Generic fix for all warp properties

Change-Id: I77c37759aa49706fc3cd1a80770a85face53f0a2
2014-07-21 16:29:06 +02:00
9c451090df remove no longer needed http://sprm nonsense
Change-Id: I2f8d473ab564c9849963d937690fc48bc04a17b9
2014-07-09 20:24:01 +02:00
af5a6615df Adjust for the splitting of number format properties in chart.
Since 1d38cb365543924f9c50014e6b2227e77de1d0c9, "number format" and
"link number format to source" properties are 2 separate properties.  Adjust
OOXML import code for that split.

Also, always set axis' number format via NumberFormat property even when it's
a percent format.  The axis object doesn't keep a non-percent and percent
number formats separately.

Change-Id: I8667b6f1a78d88cc37d059518919ad1b37f154e1
2014-07-07 19:06:21 -04:00
ca362d6348 remove whitespaces
Change-Id: Ie14ba3dcb97f20479a04538748ef2c1c9e6c5dac
2014-06-25 05:41:11 +02:00
21d4cfe19e oox, writerfilter: add a14 namespace and tokens
Added the artistic effects defined in the MS-ODRAWXML extension. Ref:
http://msdn.microsoft.com/en-us/library/dd905216(v=office.12).aspx

Change-Id: I24c5e5bbe569f160d300a7a7293ca047cb7a1b88.
2014-05-23 10:03:58 +02:00
f0d6137c4e oox: prepare for importing a TextBox property on shapes
Writer's SwXShape doesn't have that property yet, though.

Change-Id: I997eb188574fab93d35595972fdc2eaebabc015b
2014-05-06 17:11:44 +02:00
255194801e fod#77122 DOCX filter: link between textboxes is not being preserved
Added support for linked textboxes for docx interoperability.

Reviewed on:
	https://gerrit.libreoffice.org/9092

Change-Id: I7db4f5a1783afff53c64908d182788b262f5e863
2014-04-22 12:09:40 +02:00
73ecb92437 Use --switch=2 --readonly-tables gperf options
The --switch option saves about one megabyte of code (or data), and the
--readonly-tables seems like a good idea in general.

Change-Id: I19419e2cb9bb76dea4547512572b689883c41d8d
2014-04-13 16:42:36 +03:00
64ad575674 ooxml: preserve checkbox sdt control
Checkbox controls in docx are implemented with a sdt block containing
the property w:14:checkbox, which has several child elements.

To implement the preservation of the field, we had to add several
tags to the ooxml model file. Notice they belong to namespace w14,
that's why we had to add a redundant definitions of CT_STRING,
ST_STRING and their actions. Then, we just used the existing
mechanisms on the importer and the exporter.

Finally, added a unit test.

TODO: the checkbox is preserved on export but it cannot be modified.
We should import it like we do for combo and date boxes.

Change-Id: I40f29b48ec24719c48482b9c8cff10176d1b188d
2014-03-20 10:28:22 +01:00
17d31e6fb3 fdo#76249 DOCX export DML Drawing as lockedCanvas if it's inside DMLTextFrame
The Locked Canvas is imported correctly,
but while exporting the drawing is exported inside a textbox.
However a locked Canvas has to be exported inside a text-box
for the RT file to work in MS Word 2010.
As dml drawing elements are not allowed in the dml textboxes.

Export as Locked Canvas iff the drawing was originally a Locked Canvas
and is now inside a DML Text Frame.
As otherwise the Locked Canvas is exported correctly as a DMLDrawing.

Reviewed on:
	https://gerrit.libreoffice.org/8618

Change-Id: Ifa350d8922a22c4e480411530aa4d953bd3ed2ac
2014-03-18 14:30:20 +01:00
1959431528 oox: handle all w14 text effects at groupshape import
When dealing with groupshapes, the responsibility to process the
w14 text effects elements is in oox. This commit adds the code
to handle all elements and its children elements and attributes and
puts the values into a CharInteropGrabBag.

Change-Id: Iafb8759bd60e0ee831296dc2d9159f4311ad5403
2014-03-10 17:12:26 +01:00
3871223bee add the xml strict namespaces to misc/namespaces.txt
Change-Id: Ie83b5c94f1f002851bff3b39b1d9b676a3e44aa1
2014-03-06 19:17:53 +01:00
7452e530c0 oox & writerfilter: add "anchorId" token and update model.xml
Change-Id: Ibcbf552621b8c6c5c143521a697026cdeac90706
2014-03-05 20:24:00 +01:00
20a7a705b5 in the old design all lists needed to be the same size, fdo75200
We did not crash in the invalid memory access because the lists were
continuous in memory and we would just pick the next id. However it
crashed when trying to map some of the ids to non existant strings. This
commit also removes the need for the earlier fix for this bug that just
hit the problem behind some checks much later in the call chain.

Change-Id: Ic6658987815c4e84ed2449934c310e30dcd0ed4c
2014-03-04 21:17:40 +01:00
09f27e518b fix strict namespace list generation
The two perl scripts were apparently only generating the same order by
luck. It did not work on all systems.

Change-Id: Ib83ee5c6572d3bae2e2ac1846850bd65303e7d43
2014-03-02 17:56:15 +01:00
6ba394e611 handle OOXML strict namespaces
Change-Id: I198862388426161e3f054a5f128639c59f3c9d24
2014-03-01 16:23:09 +01:00
cf28abed08 writerfilter: extend tokens and model.xml for w:compatSettings
Word stores compatibility mode and additional compatibility
settings (like enableOpenTypeFeatures) in w:compatSetting. This
needs to be preserved as well.

Change-Id: I40895cc00952b7c3799edff0bf7f4328106305a1
2014-02-28 20:24:36 +01:00
6654106b71 oox: add "styleSet" to token list
Change-Id: Idf9ca432849e9ca53a533ee6d82267aa9d546423
2014-02-27 17:35:03 +01:00
40961d7bcd Remove visual noise from oox
Change-Id: Ie25838f20f00dc32d9d22959308c118cef688e94
Reviewed-on: https://gerrit.libreoffice.org/8288
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-26 09:37:22 -06:00
c7f6b81646 oox: add some more missing w14 tokens
Change-Id: Ied80a30419ac809c0cb20f8c29427ff0945f5904
2014-02-23 17:40:08 +01:00
d81936f96b Added word 2010 - w14 namespace and w14 elements
Change-Id: I8098cc4bd49c3480bd45875a541d8273b9c7f287
2014-02-20 17:54:46 +01:00
5a99f7cf6a Add tokens for 'table cell' redlines (future patch)
This patch adds 2 tokens for future patche's use of table cell
redline preservation.

Change-Id: Ic0ec4122eeaf66c6f0ebff9251fbc38596877541
Reviewed-on: https://gerrit.libreoffice.org/7869
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-12 09:08:03 +00:00
3ec8d33e46 fdo#74112 Added properties to store chart display unit information in import.
- added display unit properties.
   - added axis display unit converter class.

Change-Id: Iaa1f9a175b1109c8da7321a1567a04fb981568d1
Reviewed-on: https://gerrit.libreoffice.org/7720
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-02-11 23:24:41 +00:00
e1f90846af Add tokens for 'table row' redlines (future patch)
This patch adds 2 tokens for future patche's use of table row
redline preservation.

Change-Id: I20e6d1dd84a07f515076aaa3cd5b32c492ec476d
Reviewed-on: https://gerrit.libreoffice.org/7801
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2014-02-11 13:17:41 +00:00
f5316a3d8c DOCX export: register wp14 namespace
Change-Id: I4ce857bd2e48372da4ed7252a2849ad37c73b6b9
2014-02-06 17:14:27 +01:00
15a0b75550 oox: add wp14 tokens
Change-Id: Iec9cfa1fd12c45cdab5ef97ab4eb2573577c412b
2014-01-24 13:33:53 +01:00
9820a8b2a0 oox: tokenize wp14 namespace
Change-Id: I6562cf7f9f090edf94ede2935233966d9dc4066f
2014-01-24 11:29:06 +01:00
2054af83fe fdo#72520 : Added property to store external data path in chart.
-  added new property entry to store xlsx external data for chart.

Change-Id: I3695865ad7e888359d1048e9bc380cba26108636
Reviewed-on: https://gerrit.libreoffice.org/7212
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2014-01-16 01:46:40 +00:00
ba76bf5c7b fdo#72304 Added properties to store Chart data table information, during import.
Change-Id: I77c458828b86bc31fae533e2e632d57237e44e6f
2013-12-19 03:55:05 +01:00
ae7f8bed4b DOCX Import of 'paragraph formatting track changes'
This patch adds support for the import of 'paragraph formatting
track changes' in the DOCX filter.
It detects the 'pPrChange'->'pPr' node and stores all the properties
that it processes in the redline object.

Change-Id: I3cce83dad4d46c2216ca36393b6572f0fc9d2ed7
Reviewed-on: https://gerrit.libreoffice.org/6992
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2013-12-16 09:59:15 +00:00
ae6b44c325 DOCX export: declare wpg namespace
Change-Id: If204d95142826d4cc194aed8a97c68a121187b8a
2013-12-12 12:09:02 +01:00
d4b2f0df41 oox: allow to declare the wps namespace on export
Change-Id: I278b568d512dfbc34d24c612c1a532315e35e808
2013-12-10 12:53:58 +01:00
83a918016d oox: add support for the wpg namespace
The plan is that once these are here, the writerfilter ooxml tokenizer
can refer to them. And then the writerfilter will call back to oox to do
the real drawingml import.

Change-Id: I00eec562e32df359231d1a170367ab75702f0049
2013-11-27 13:08:45 +01:00
d7280af974 fastparser: Avoid copying all tokens into a sequence. 2013-11-26 17:33:44 +00:00
c86aed38b6 Support regression curve name in OOXML (import & export).
Change-Id: I847e0df4f160e4b5078961a0e77c1e1e3fff9bd4
2013-11-24 19:43:17 +01:00
bb4cbfc139 oox: tokenize wps:txbx
Change-Id: I627d5f151e5bf1ae4604e32763ef5afeb66a0cfa
2013-11-21 18:05:58 +01:00
845893cd81 oox: tokenize wps:cNvCnPr
Change-Id: I4d7a962e01f5a41c3ea629f73433416195f2259c
2013-11-19 17:45:16 +01:00
1d4db60ab3 oox: add support for the wps namespace
The plan is that once these are here, the writerfilter ooxml tokenizer
can refer to them. And then the writerfilter will call back to oox to do
the real drawingml import.

Change-Id: I1f860d1ade21cde767ad259d46b8d38ff167662f
2013-11-13 15:42:35 +01:00
7e77559b6f oox: special-case single-character a-z token mapping.
Change-Id: I58a810cc6062d5b42558dd5c0f37426a8a210f40
2013-10-17 21:38:34 +02:00
728f105768 fdo#66688: fix for crash on exit and opacity issue
Conflicts:
	sw/qa/extras/ooxmlexport/ooxmlexport.cxx

Change-Id: I32db54e2c49b40bf41005baeba380a4f631d615a
Reviewed-on: https://gerrit.libreoffice.org/4780
2013-07-10 09:17:00 +02:00
9e31cf2ae6 -Werror,-Wdeprecated-register (Clang trunk towards 3.4)
...in files generated by gperf; an alternative could be to use -isystem instead
of -I in gb_Library_use_custom_headers.

Change-Id: I316684ab5342977655a5642903b13e127adaf95c
2013-07-08 17:32:25 +02:00
df2b114151 Force intercept support for ooxml.
Change-Id: I065742bbe22f24169a99e33558399fe16c601238
2013-07-03 21:46:43 +02:00
c818e23df3 Import polynomial and moving average for OOXML.
Change-Id: Ie6501ed3b3431e187f8f0b83654e84438566ccd5
2013-07-03 21:46:40 +02:00