Commit graph

2072 commits

Author SHA1 Message Date
Miklos Vajna
6353ccd87f couple of null pointer checks for the unit test 2011-08-03 19:02:44 +02:00
Miklos Vajna
735dea2d93 the old filter does not support parsing without a destination document 2011-08-03 16:36:13 +02:00
Miklos Vajna
8560e419af RtfFilter::filter: always do an import, unless a source document is given 2011-08-03 16:27:13 +02:00
Thomas Arnhold
d6aff719e2 fix: qnametostr is no cxx file 2011-08-02 23:14:05 +02:00
Troy Rollo
a197cee991 Import of xrefs to numbered paragraphs from docx
The first part of this patch adds importing of cross-references to numbered
paragraphs from docx file.

The second part provides a fix to imports of bookmarks from docx, which in
the test files I have end up importing with an empty bookmark name. The
problem is that for each bookmark, DomainMapper_Impl::AddBookmark is called
twice - once with an empty string for rBookmarkName, and once for the
string that is in the file. The fix I have used is to ensure the passed in
name is used if the bookmark has presiously been added, and the old one has
an empty string as the name. This works, but I am not sure it is correct -
I have not investigated why it is called with an empty string in the first
place.

Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2011-08-01 17:22:51 +02:00
Troy Rollo
295185572f Fix parent level count in numbering from docx
Before this patch, when importing from docx, if there were no parent
numbering levels in the number formats for outline numbered paragraphs, the
import would include all parent levels back to the second numbering level,
in the third and subsequent numbering levels.

Signed-off-by: Luboš Luňák <l.lunak@suse.cz>
2011-08-01 16:40:03 +02:00
Tor Lillqvist
b9bee88e1b Add consistent Emacs and vim mode lines 2011-07-30 23:01:51 +03:00
Miklos Vajna
fd335cd16a no need to call lcl_RtfToString in product build 2011-07-29 17:40:31 +02:00
Miklos Vajna
74c5553345 Add initial support for the EQ field (fdo#36089) 2011-07-29 17:32:41 +02:00
Miklos Vajna
ec30985a7e handle groups inside fldinst destination 2011-07-29 17:32:41 +02:00
Miklos Vajna
67f442f27f send cell width values in the first row only 2011-07-29 17:32:41 +02:00
Miklos Vajna
f6b6f0b244 RTFSprms::erase: use return value to signal if the call was a noop 2011-07-29 17:32:41 +02:00
Miklos Vajna
2499397cb3 avoid sending duplicated paragraph flags 2011-07-29 17:32:41 +02:00
Miklos Vajna
a42629233f inherit table definition from previous row if it's missing 2011-07-29 17:32:41 +02:00
Miklos Vajna
daca5316d0 Support table definition at the start of the row
Old writers like Word97 output the table definition there, instead of at
the end.
2011-07-29 17:32:41 +02:00
Miklos Vajna
7ae9a0cb2a these are unused 2011-07-29 17:32:40 +02:00
Miklos Vajna
360480425a these static methods are no longer needed 2011-07-29 17:32:40 +02:00
Miklos Vajna
b612a56783 Introduce the RTFSprms class
Instead of hardwiring an ugly list in RTFParserState::Clone(), turn the
RTFSprms_t typedef to a real class with a proper copy constructor.
2011-07-29 17:32:40 +02:00
Miklos Vajna
572bad05f8 Introduce RTFParserState::Clone, closes fdo#36922 2011-07-29 17:32:40 +02:00
Miklos Vajna
6596e6880e Make RTFValue::Clone a deep copy
Otherwise nested attributes/sprms won't be restored when popping the
parser state.
2011-07-29 17:32:40 +02:00
Miklos Vajna
77097a386f RTF_SL: ignore zero parameter, that means auto, which is the default 2011-07-29 17:32:40 +02:00
Miklos Vajna
d2d77fd86e groups inside font/style/revision tables are optional 2011-07-29 17:32:40 +02:00
Miklos Vajna
4864ca3b6a Alter font/style tables earlier
Now that those tables belong to the document, no need to delay the
addition of entries.
2011-07-29 17:32:40 +02:00
Miklos Vajna
3b47c0788e Move font and style table out of rtf parser state
Those tables are global, so they belong to the document, not to the
parser state.
2011-07-29 17:32:40 +02:00
Miklos Vajna
32a8777fd8 implement RTF_ATNAUTHOR 2011-07-29 17:32:40 +02:00
Miklos Vajna
e8b50bde72 dmapper: handle redline authors inside annotation fields 2011-07-29 17:32:40 +02:00
Miklos Vajna
d92d5aea5d implement RTF_ATNDATE 2011-07-29 17:32:40 +02:00
Miklos Vajna
8891e4a4ee dmapper: handle redline dates inside annotation fields 2011-07-29 17:32:39 +02:00
Miklos Vajna
6e1b869de4 don't try to close the last section if it's not started 2011-07-29 17:32:39 +02:00
Miklos Vajna
c67e8d76d2 fixes for CVE-2010-3333-1.rtf 2011-07-29 17:32:39 +02:00
Miklos Vajna
856071a7aa fix for CVE-2005-2972-1.rtf 2011-07-29 17:32:39 +02:00
Miklos Vajna
b96d333787 fixes for CVE-2010-3451-1.rtf 2011-07-29 17:32:39 +02:00
Miklos Vajna
7757cb0a7e don't try to skip the header of an empty stream 2011-07-29 17:32:39 +02:00
Miklos Vajna
027c31207a skip the ole header when sending native data 2011-07-29 17:32:39 +02:00
Miklos Vajna
6c144a4cf0 Initial OLE object support
Size and replacement graphic already works.
2011-07-29 17:32:39 +02:00
Miklos Vajna
9756f6efdc teach RTFValue to deal with io::XInputStream 2011-07-29 17:32:39 +02:00
Miklos Vajna
8aa3f0d155 enter object and result destinations 2011-07-29 17:32:39 +02:00
Miklos Vajna
bdc2e95be6 implement RTF_COMMENT 2011-07-29 17:32:39 +02:00
Miklos Vajna
bd7528d7da implement RTF_COMPANY 2011-07-29 17:32:39 +02:00
Miklos Vajna
23b0f427f2 implement RTF_OPERATOR 2011-07-29 17:32:39 +02:00
Miklos Vajna
9e759b5025 implement RTF_VERSION 2011-07-29 17:32:39 +02:00
Miklos Vajna
21e6699958 implement RTF_NOFCHARSWS 2011-07-29 17:32:39 +02:00
Miklos Vajna
68b86b13ef implement RTF_NOFPAGES, WORDS, CHARS 2011-07-29 17:32:39 +02:00
Miklos Vajna
efef084311 implement RTF_EDMINS 2011-07-29 17:32:39 +02:00
Miklos Vajna
cfe9c5777b implement RTF_AUTHOR 2011-07-29 17:32:38 +02:00
Miklos Vajna
d4ce64b485 rtftokenizer should not know about charsets 2011-07-29 17:32:38 +02:00
Miklos Vajna
9a3392f871 rtfcontrolwords should not know about rtfdocumentimpl 2011-07-29 17:32:38 +02:00
Miklos Vajna
10f3a47b52 implement RTF_PRINTIM 2011-07-29 17:32:38 +02:00
Miklos Vajna
7524ddc126 introduce lcl_getDateTime 2011-07-29 17:32:38 +02:00
Miklos Vajna
9e10670cc9 implement RTF_REVTIM 2011-07-29 17:32:38 +02:00