Commit graph

1917 commits

Author SHA1 Message Date
Miklos Vajna
f2b3903f95 BUFFER_NESTCELLEND is not necessary 2011-06-22 15:46:49 +02:00
Miklos Vajna
2037021fb8 buffer RTF_PAR in tables 2011-06-22 15:34:29 +02:00
Miklos Vajna
b4b86b7fcc Buffer non-nested table cells as well
This is required as Word writes table properties at the end of a row.
2011-06-22 14:52:07 +02:00
Miklos Vajna
37da7aa99a RTF_CELL should alter the cell definition list outside its current group 2011-06-22 13:12:28 +02:00
Miklos Vajna
61f9a54b21 reset cell definition list on trowd 2011-06-22 13:12:00 +02:00
Miklos Vajna
ec22bf47b1 send table width to dmapper 2011-06-22 11:29:13 +02:00
Miklos Vajna
10493b75a3 RTFDocumentImpl: no longer necessary debug message 2011-06-22 11:17:52 +02:00
Miklos Vajna
639732f50e introduce lcl_Break 2011-06-21 00:15:15 +02:00
Miklos Vajna
18df7b6b5a avoid unnecessary OUString 2011-06-21 00:10:22 +02:00
Miklos Vajna
2b0526cf4f buffering row ends is not necessary 2011-06-20 22:05:56 +02:00
Miklos Vajna
53561d51c7 Nested tables: buffer cell contents till cell definitions
This is necessary as nested cells' RTF_CELLX definition hits the parser
later, than the actual \nestcell cell contents.
2011-06-20 22:02:56 +02:00
Miklos Vajna
944c242048 Initial nested table support
Implement RTF_NESTTABLEPROPS, RTF_NONESTTABLES, RTF_NESTCELL,
RTF_NESTROW and RTF_ITAP.
2011-06-20 16:53:00 +02:00
Miklos Vajna
7d954792ff cell borders are sprms 2011-06-20 13:54:30 +02:00
Miklos Vajna
ac6f0ff1f8 implement RTF_TRRH 2011-06-20 13:46:01 +02:00
Miklos Vajna
9443bff00d implement RTF_TRKEEP 2011-06-20 13:17:59 +02:00
Miklos Vajna
951b737566 Reset cell properties on RTF_CELLX
This fixes import of tables when the first cell has no properties
2011-06-20 12:51:07 +02:00
Miklos Vajna
2ce5dbe263 RTF_CELLX: fix assignment of previous cell abs width 2011-06-20 11:18:26 +02:00
David Tardon
6e7add3703 rhbz#667082 do not crash importing section containing just an empty paragraph 2011-06-18 16:58:08 +02:00
David Tardon
c25e9282ad remove all traces of offuh from makefiles 2011-06-18 11:26:56 +02:00
Miklos Vajna
217b9e6f40 implement RTF_CLVERTAL* 2011-06-17 23:38:15 +02:00
Miklos Vajna
5710898ee7 introduce lcl_putNestedAttribute 2011-06-17 22:12:56 +02:00
Miklos Vajna
4df4955319 implement RTF_CLCBPAT 2011-06-17 21:51:03 +02:00
Miklos Vajna
05dde209b0 implement RTF_CELLX 2011-06-17 18:18:30 +02:00
Miklos Vajna
173f7d10fa implement vertical spans for tables 2011-06-17 17:52:42 +02:00
Miklos Vajna
415be269e8 make RTF_CELL and RTF_ROW dmapper xml dump valid again 2011-06-17 17:17:52 +02:00
Noel Power
cd1c434c4b another partial fix for bnc#693238 2011-06-17 16:00:19 +01:00
Miklos Vajna
ab6ae4b17c introduce lcl_putBorderProperty
also, getBorderTable can be a local function
2011-06-17 12:50:39 +02:00
Miklos Vajna
5a7f31ea53 table cell border types can be handled in one go 2011-06-17 12:40:20 +02:00
Miklos Vajna
1296533305 implement the rest of table cell border properties 2011-06-17 12:36:51 +02:00
Miklos Vajna
de87510261 RTF_BRDRW can be a cell property 2011-06-17 12:25:35 +02:00
Miklos Vajna
b887ab0b85 paragraph border types: can be a cell property
border type as in "hairline, ..." not in "top, left, ..."
2011-06-17 12:14:54 +02:00
Miklos Vajna
512e22f9c3 factor out lcl_getCellBordersSprms 2011-06-17 12:02:27 +02:00
Miklos Vajna
ec34069a00 implement RTF_CLBRDRT 2011-06-17 11:51:23 +02:00
Miklos Vajna
ec5e23267a RTF_CELL: emit table cell sprms/attributes 2011-06-17 11:23:57 +02:00
Miklos Vajna
0d1867d379 dmapper: rtf is not binary doc in DomainMapperTableManager 2011-06-16 17:42:34 +02:00
Miklos Vajna
cb01c918df implement RTF_BRDRHAIR 2011-06-16 17:16:27 +02:00
Miklos Vajna
255fc7d804 RTF_CELLX stub 2011-06-16 17:00:29 +02:00
Miklos Vajna
d0c661ebea implement RTF_TROWD 2011-06-16 16:21:37 +02:00
Miklos Vajna
8854494b31 RTF_ROW: send paragraph properties instead of single NS_sprm::LN_PFInTable 2011-06-16 16:10:08 +02:00
Miklos Vajna
01d2e90b21 resolvePict: avoid code duplication 2011-06-16 16:01:58 +02:00
Miklos Vajna
0b15358916 implement wzDescription property for shapes 2011-06-16 15:56:52 +02:00
Miklos Vajna
5a4ec333d3 implement RTF_ROW, now a trivial table can be imported 2011-06-16 13:11:44 +02:00
Miklos Vajna
07e39ad3e3 implement RTF_INTBL and RTF_CELL 2011-06-16 11:53:43 +02:00
Miklos Vajna
45d50568b9 dispatchFlag: really handle RTF_QL 2011-06-16 11:00:06 +02:00
Miklos Vajna
f7f31d3654 implement RTF_SHPWRK: wrapped anchor pictures 2011-06-16 00:22:45 +02:00
Miklos Vajna
ffdd4d9a5d handle anchored picture properties 2011-06-15 22:45:51 +02:00
Miklos Vajna
a657805801 implement size of anchored pictures 2011-06-15 22:15:18 +02:00
Miklos Vajna
b70163d362 graphic sprm: avoid code duplication 2011-06-15 22:06:56 +02:00
Miklos Vajna
a6766e0207 initial support for anchored pictures 2011-06-15 22:00:47 +02:00
Miklos Vajna
2b6e614cf5 enter RTF_SHP and RTF_SHPINST to display anchored pictures 2011-06-15 18:37:15 +02:00
Miklos Vajna
0b5ae0587a skip RTF_NONSHPPICT, since we understand RTF_SHPPICT 2011-06-15 17:39:52 +02:00
Miklos Vajna
de85b26ac1 initial support for shape properties, wzName is implemented 2011-06-15 17:14:12 +02:00
Miklos Vajna
b373a3f2f2 implement RTF_PICSCALEX and RTF_PICSCALEY 2011-06-15 15:50:28 +02:00
Miklos Vajna
d942e95010 pass XFrame to the implementation to avoid assertion failures 2011-06-15 15:14:45 +02:00
Miklos Vajna
5336ea8f1e implement RTF_PICW and RTF_PICH 2011-06-15 14:45:56 +02:00
Miklos Vajna
0d65034eaf introduce RTFSprms_t 2011-06-15 13:49:30 +02:00
Miklos Vajna
8def2b4dad Change the attribute/sprm list to a vector from a multimap
It turns out that order does matter, for example when dealing with
picture size and data. (Size must arrive first.)
2011-06-15 13:49:29 +02:00
Miklos Vajna
c332db819d add RTFSprm::find that can search for an sprm key in a vector 2011-06-15 13:49:29 +02:00
Julien Nabet
5cfb91df40 Some cppcheck cleaning 2011-06-12 23:01:56 +02:00
Julien Nabet
a6364087da Some cppcheck cleaning 2011-06-12 22:39:06 +02:00
Julien Nabet
88d538c6e3 Some cppcheck cleaning 2011-06-12 17:56:38 +02:00
Miklos Vajna
31e655dbff Pict: send the XShape to the dmapper 2011-06-11 01:28:37 +02:00
Miklos Vajna
6339971bc9 RTFValue: add shape 2011-06-11 00:57:36 +02:00
Miklos Vajna
6839d117d8 pass the destination doc model to RTFDocumentImpl
so that later it can access its modelfactory
2011-06-11 00:40:07 +02:00
Miklos Vajna
cf5d05e1d1 resolvePict: wrap the url in an XShape 2011-06-11 00:40:06 +02:00
Miklos Vajna
328d154015 resolvePict: import the stream as a graphic object 2011-06-10 18:56:08 +02:00
Miklos Vajna
a15e61ec50 pass the component context to RTFDocumentImpl 2011-06-10 18:34:35 +02:00
Miklos Vajna
2bdecc7110 provide picture data as XInputStream 2011-06-10 16:15:51 +02:00
Miklos Vajna
582630888b use asHex() in resolvePict() 2011-06-10 15:31:49 +02:00
Miklos Vajna
8c7eaf10be factor out RTFDocumentImpl::asHex 2011-06-10 15:26:18 +02:00
Miklos Vajna
240d78c022 RTFDocumentImpl::resolvePict skeleton 2011-06-10 14:54:57 +02:00
Miklos Vajna
99089efda0 RTF_ULNONE is a flag 2011-06-10 13:16:15 +02:00
Miklos Vajna
2fb2339e77 enter RTF_SHPPICT and RTF_PICT 2011-06-09 16:50:28 +02:00
Miklos Vajna
558d5c25a0 implement RTF_LTRPAR and RTF_RTLPAR 2011-06-09 14:59:11 +02:00
Miklos Vajna
b13d5a8321 implement RTF_AI 2011-06-09 14:44:09 +02:00
Miklos Vajna
ce53091e03 '1.' (with '2.' prefix omitted) is %2, not %1 2011-06-09 13:31:05 +02:00
Miklos Vajna
abbb7f0c35 implement DESTINATION_LEVELNUMBERS 2011-06-09 12:43:03 +02:00
Miklos Vajna
c78750e10f add RTFValue::setString() 2011-06-09 12:39:23 +02:00
Miklos Vajna
22a8ffcde5 better RTF_LEVELTEXT support
numberings with style "none" are now imported
2011-06-09 11:06:52 +02:00
Miklos Vajna
71a50a9d6c cleanup 2011-06-09 10:14:43 +02:00
Miklos Vajna
517c37b146 introduce aListLevelEntries on the stack
With this, it's possible including the contents of aTableSprms when
adding a new list level entry to aTableSprms, reducing the size of the
XML dump for a simple numbering from ~2MB to ~100KB.
2011-06-08 23:15:34 +02:00
Miklos Vajna
d9f2d1df80 implement RTF_PLAIN 2011-06-08 19:54:43 +02:00
Miklos Vajna
52f51f5728 dmapper: fix NS_sprm::LN_CFDStrike with zero nIntValue 2011-06-08 19:47:31 +02:00
Miklos Vajna
fe485bcf98 styles entries can have character and paragraph properties 2011-06-08 19:38:38 +02:00
Miklos Vajna
819e9a02ac keep table, character and paragraph properties separate for \plain and \pard 2011-06-08 19:13:08 +02:00
Miklos Vajna
f40e4a1422 RTF_LEVELSTARTAT is a trivial sprm 2011-06-08 17:17:05 +02:00
Miklos Vajna
7a1492c0d8 RTF_LEVELNFC is a trivial sprm 2011-06-08 17:11:06 +02:00
Miklos Vajna
1140b98eb4 RTF_LISTTEMPLATEID has the same value as RTF_LISTID 2011-06-08 17:09:11 +02:00
Miklos Vajna
6f820de75e RTF_LISTOVERRIDECOUNT stub 2011-06-08 17:06:59 +02:00
Miklos Vajna
50dd03a71f implement RTF_LEVELJC 2011-06-08 17:05:20 +02:00
Miklos Vajna
0b0b40e2f7 RTF_LEVELFOLLOW stub 2011-06-08 17:02:21 +02:00
Miklos Vajna
4570b2322e implement RTF_LANGFE 2011-06-08 16:51:54 +02:00
Miklos Vajna
6354889a0b fix RTF_LS: NS_rtf::LN_LSID is an attribute 2011-06-08 16:29:57 +02:00
Miklos Vajna
6ae6064b16 RTFSprm: pretty-print sprm names 2011-06-08 15:10:36 +02:00
Miklos Vajna
1dea984cb3 send listlevel index to dmapper 2011-06-08 13:21:26 +02:00
Miklos Vajna
8fa15b751b move RTF_LS under numPr as well 2011-06-08 13:02:17 +02:00
Miklos Vajna
3e1d048d30 RTF_ILVL should live under NS_ooxml::LN_CT_PPrBase_numPr 2011-06-08 12:58:13 +02:00
Miklos Vajna
a658c7e7d5 implement RTF_LEVELNFC 2011-06-08 12:45:03 +02:00
Miklos Vajna
349b8a9cd0 resolveChars: return early on skipping destinations
When we skip a destination and it contained a \'xx, it was confusing to
see xx az a character in the output, even it was never sent to the
dmapper.
2011-06-08 12:04:41 +02:00
Miklos Vajna
0a68f9929b implement RTF_LEVELTEXT destination 2011-06-08 11:48:57 +02:00
Miklos Vajna
4418e8136d implement RTF_U 2011-06-08 11:04:47 +02:00
Miklos Vajna
68caec03df resolveParse: hex a..f is 10..15, not 0..5 2011-06-08 10:39:54 +02:00
Miklos Vajna
be697c876d implement RTF_LANG 2011-06-08 10:39:15 +02:00
Joseph Powers
991fce7134 gcc 4.0 doesn't support the C++0x usage of enum::value 2011-06-07 21:12:25 -07:00
Noel Power
6808d33761 fix for bnc#693386
properly handle relative Uri(s) in Target
2011-06-07 19:06:45 +01:00
Miklos Vajna
ef82c0b9d8 dmapper: ListsManager::lcl_entry: rtf is not binary doc 2011-06-07 00:30:36 +02:00
Miklos Vajna
3a0d0d8c70 implement RTF_ILVL 2011-06-06 22:45:59 +02:00
Miklos Vajna
8d2e2ce96d skip RTF_LISTTEXT 2011-06-06 22:00:57 +02:00
Miklos Vajna
fd1babf0d7 implement RTF_LS inside list override table 2011-06-06 21:57:05 +02:00
Miklos Vajna
6654aa503a RTF_LISTID: use ooxml namespace to avoid assertion failure 2011-06-06 21:49:50 +02:00
Miklos Vajna
a487f8ca13 rtfvalue: reasonable getstring output for int values 2011-06-06 21:47:32 +02:00
Miklos Vajna
25a7d3ee8e fix typo, the collected properties go to the list table 2011-06-06 20:10:32 +02:00
Miklos Vajna
17af0c7fda implement collecting at the end of DESTINATION_LISTOVERRIDEENTRY 2011-06-06 19:56:14 +02:00
Miklos Vajna
e38601fa8f collect property set at the end of DESTINATION_LISTLEVEL 2011-06-06 19:42:08 +02:00
Miklos Vajna
96ed2f8c7f RTF_LEVELSTARTAT 2011-06-06 19:28:18 +02:00
Miklos Vajna
84f27cc4ff clean up RTF_LISTID, this code should scale well 2011-06-06 19:22:47 +02:00
Miklos Vajna
261140e021 RTF_LISTLEVEL 2011-06-06 19:10:10 +02:00
Miklos Vajna
5e366be031 initial RTF_LISTID 2011-06-06 18:52:09 +02:00
Miklos Vajna
81d6557636 implement RTF_LIST and RTF_LISTOVERRIDE 2011-06-06 18:02:54 +02:00
Miklos Vajna
bf2090e673 move m_aListTableEntries to the parser
that table is needed by both the list table and the list override table,
so keeping it on the stack has no benefit.
2011-06-06 17:54:51 +02:00
Miklos Vajna
7d5c9a0c9a this should be still a map, not multimap 2011-06-06 17:37:48 +02:00
Miklos Vajna
2aa0cdfb76 rtftok: std::map -> std::multimap
This is required by for example numberings, where keys are not unique.
2011-06-06 15:51:14 +02:00
Miklos Vajna
737334fd81 Implement RTF_LISTTABLE and RTF_LISTOVERRIDETABLE 2011-06-06 11:08:32 +02:00
Miklos Vajna
3c92fa238a implement RTF_TL* 2011-06-03 21:55:58 +02:00
Miklos Vajna
e89de96f5d send text based on current encoding
tested so far only with the "..." support, not with real accents
2011-06-03 21:42:34 +02:00
Miklos Vajna
14ae17f9a4 add support for reading hex chars in \'xx form 2011-06-03 21:42:07 +02:00
Miklos Vajna
6bcc508438 RTF_FCHARSET: fix typo 2011-06-03 21:28:57 +02:00
Miklos Vajna
f5861fa5bd implement RTF_TQC and RTF_TQDEC 2011-06-03 19:51:58 +02:00
Miklos Vajna
07aa1add10 RTFValue: return references, that reduces code here 2011-06-03 19:40:18 +02:00
Miklos Vajna
24068dcf0e lcl_insertTabsTab to avoid code duplication 2011-06-03 19:26:20 +02:00
Miklos Vajna
76b3985830 implement RTF_TQR 2011-06-03 19:21:36 +02:00
Miklos Vajna
c333eeee90 implement RTF_TX 2011-06-03 19:15:30 +02:00
Miklos Vajna
8873ebc14b rtfvalue: make it able to store sprms as well 2011-06-03 18:23:29 +02:00
Miklos Vajna
49a63a08bf implement RTF_TAB 2011-06-03 18:05:33 +02:00
Miklos Vajna
966e774417 support 14 other border line types 2011-06-03 16:40:37 +02:00
Miklos Vajna
d6839b61a0 implement RTF_BOX
and RTF_BRDRS, RTF_BRDRW, RTF_BRDRCF, RTF_BRSP
2011-06-03 16:24:39 +02:00
Miklos Vajna
d7de3c17dc RTFDocumentImpl::getBorderTable to have border ids at a single place 2011-06-03 16:11:29 +02:00
Miklos Vajna
288a184652 RTFValue::getAttributes to make it possible altering attributes later 2011-06-03 15:48:03 +02:00
Miklos Vajna
daba468cd0 dmapper: rtf is not a binary format 2011-06-03 15:43:16 +02:00
Miklos Vajna
56c1ad7536 dmapper: add IsRTFImport() method
it's not too elegant, but unavoidable at the moment, given the already
existing "if ooxml: ... else: assume binary doc" approach.
2011-06-03 15:22:05 +02:00
Miklos Vajna
33b1129c00 implement RTF_CBPAT 2011-06-03 13:12:23 +02:00
Miklos Vajna
2fe14cbc0b implement RTF_WIDCTLPAR and RTF_NOWIDCTLPAR 2011-06-03 13:01:09 +02:00
Miklos Vajna
0caf2fb51a implement RTF_KEEPN 2011-06-03 12:45:47 +02:00
Miklos Vajna
a833a0cfb8 implement RTF_KEEP 2011-06-03 12:42:01 +02:00
Miklos Vajna
8b94548e28 factor out one-liner value attributes 2011-06-03 11:42:28 +02:00
Miklos Vajna
e11fc90790 implement RTF_SL and RTF_SLMULT 2011-06-03 11:36:32 +02:00
Miklos Vajna
371fa6b230 implement RTF_SB and RTF_SA 2011-06-03 11:32:08 +02:00
Miklos Vajna
b9a7e46255 implement paragraph indentation keywords 2011-06-03 10:49:27 +02:00
Miklos Vajna
d8687aef97 implement RTF_QC, RTF_QJ, RTF_QL, RTF_QR and RTF_QD 2011-06-02 17:34:20 +02:00
Miklos Vajna
653a1e78b9 delay paragraph properties till first text so they can change 2011-06-02 17:22:28 +02:00