Commit graph

1895 commits

Author SHA1 Message Date
Miklos Vajna
308df0b438 skip RTF_AFTNRSTCONT and RTF_AFTNRESTART 2011-08-11 12:20:42 +02:00
Miklos Vajna
4ace481210 implement footnote numbering types 2011-08-11 11:09:09 +02:00
Miklos Vajna
5a38c231cc implement RTF_FTNSTART 2011-08-11 10:22:41 +02:00
Miklos Vajna
8d4a0dbc11 it's enough to set these as a default sprm 2011-08-11 10:14:27 +02:00
Miklos Vajna
da8f7be84f implement RTF_AFTNSTART 2011-08-11 10:10:26 +02:00
Miklos Vajna
d7d9d3a744 implement endnote numbering types 2011-08-10 20:14:02 +02:00
Miklos Vajna
53b709286c skip RTF_AENDDOC and RTF_AENDNOTES 2011-08-10 19:12:03 +02:00
Miklos Vajna
7c9156d9c5 implement the RTF_FALT destination 2011-08-10 18:43:08 +02:00
Miklos Vajna
6751324082 Move destination text to RTFParserState
For example a font name may be interrupted by an RTF_FALT destination
anytime.
2011-08-10 18:35:54 +02:00
Miklos Vajna
3721e245b4 RTFDocumentImpl: avoid raw pointers 2011-08-10 17:07:52 +02:00
Miklos Vajna
41430f1026 RTFValue: avoid raw pointers 2011-08-10 16:40:39 +02:00
Miklos Vajna
e20a75a4f3 dmapper: implement PAGEREF field 2011-08-10 16:15:23 +02:00
Miklos Vajna
ed7b24e4d5 Fix page numbers
I broke that in commit 5338fee30b
2011-08-10 11:44:04 +02:00
Miklos Vajna
e7253c562e use RTFSkipDestination instead of skipDestination() 2011-08-08 23:43:55 +02:00
Miklos Vajna
825c6e7190 Add a new RTFSkipDestination class
The idea is that calling skipDestination() all the time before return is
boring: better to just place an RTFSkipDestination and its destructor
will do its job when it goes out of scope.
2011-08-08 23:41:44 +02:00
Miklos Vajna
197fe11da2 RTFDocumentImpl: add set/get methods for SkipUnknown 2011-08-08 23:24:17 +02:00
Miklos Vajna
98158723b2 implement font alignment paragraph sprms 2011-08-08 18:49:31 +02:00
Miklos Vajna
9d4f6c02b1 dmapper: paragraph vertical alignment support 2011-08-08 17:26:28 +02:00
Miklos Vajna
57a189d7f9 DomainMapper_Impl::AddBookmark: missing empty stack check 2011-08-08 16:18:56 +02:00
Miklos Vajna
ea31506b0d fix shape import for the unit test 2011-08-08 16:16:24 +02:00
Miklos Vajna
5338fee30b dmapper: more null pointer checks for the unit test 2011-08-08 16:15:58 +02:00
Miklos Vajna
e077fe6efa Fix paragraph styles in non-debug build
In debug build, StyleSheetEntry::StyleSheetEntry already set the style
type to paragraph.
2011-08-08 13:11:03 +02:00
Miklos Vajna
c6f68eb654 modelfactory may not be available, that's fine 2011-08-08 12:17:08 +02:00
Miklos Vajna
b030c48949 RTFDocumentImpl::dispatchSymbol: warning fix 2011-08-04 12:32:39 +02:00
Miklos Vajna
fe02b4ec17 reject files with unmatched { or } 2011-08-04 00:57:43 +02:00
Miklos Vajna
957a48e650 dmapper: m_xText may be null 2011-08-04 00:57:24 +02:00
Miklos Vajna
0b4df1d83d a control word's name cannot be longer than 32 letters 2011-08-03 20:18:18 +02:00
Miklos Vajna
7a897a329b fixes for CVE-2010-3333-1.rtf 2011-08-03 19:47:22 +02:00
Miklos Vajna
f2c14788dd fixes for CVE-2007-0245-1.rtf 2011-08-03 19:42:07 +02:00
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
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
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