diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-07-22 15:05:24 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-07-22 16:32:36 +0200 |
commit | 82e17dbb2a16c7653a163139f0eea51faa4d46b8 (patch) | |
tree | 7dda49d5d83cdb129ae785a830e8bb3c256e07d8 /writerfilter/source/rtftok/rtfdocumentimpl.hxx | |
parent | 78234837352b9417573a4bd1efa8cfe68902e24b (diff) |
fdo#77996: writerfilter: RTF import: re-work destination text buffering
The problem in the bugdoc is that the ';' style terminator is encoded as
{\uc1 \u59 ?}, i.e. inside a group, so when reading the ';' the
aDestinationText of the top group is empty and the style name is lost.
Or since the style name characters are encoded in the same way, every
character is lost once the group closes.
The same problem affects some of the document properties.
Introduce an abstraction of RTFParserState::aDestinationText so that for
every destination only one of these buffers is used, regardless of
nested group structures; the aDestinationText buffer is only switched
when entering a new destination.
Also, the \revtbl and \stylesheet destinations do not contain entries
directly, i.e., every entry must be in a sub-group, so remove some
special-casing for these; however, for \fonttbl the entries may be in
groups or not.
Change-Id: Ica276a8b730e4a707530471ba27bfdd1582b8890
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.hxx')
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index 39a665469b18..94f43bf0f622 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -270,6 +270,8 @@ public: /// Text from special destinations. OUStringBuffer aDestinationText; + /// point to the buffer of the current destination + OUStringBuffer * pDestinationText; /// Index of the current style. int nCurrentStyleIndex; |