Files
libreoffice/sw/qa/extras/rtfimport/data/rhbz1065629.rtf
Michael Stahl c8f83ce1db rhbz#1065629: RTF import: re-implement nested tables
The previous fix for this bug only fixed a symptom, this a fix for the
real problem; with the real problem fixed the nCellEnds is unnecessary.

Given that top-level table properties may be put either before or after the
table cells, the only way that works to import tables is to buffer a whole
top-level table row, but currently the buffer is replayed already at the
end of a nested table row.

Fortunately the RTF spec guarantees that \nesttableprops must occur
after the nested table cells of the nested row, so it should be
sufficient to remember the cell properties for the current nested table
row only, in addition to the cell properties for the top-level table row.

With this change, skipping a \nesttableprops destination when there is
a table style turns out to mangle ooo98040-1.rtf badly, so stop doing
that workaround.

RTFDocumentImpl::popState() was copying various buffers up the state
stack which is a clear indication that these shouldn't be members of
RTFParserState in the first place, move them to RTFDocumentImpl.

Change-Id: Ic2d8f7b3e00844b224d61605b405ca651239e5f7
2014-02-25 14:06:14 +01:00

102 lines
1.8 KiB
Plaintext

{\rtf1\ansi\ansicpg1252\deff0
{\fonttbl
\f0\froman\fcharset0 Times New Roman;
\f1\fswiss\fcharset0 Arial;
\f2\fmodern\fcharset0 Courier New;
\f3\ftech\fcharset2 Symbol;
\f4\fswiss\fcharset0 Helvetica;
}
{\colortbl
;
\red127\green255\blue212;
\red0\green0\blue0;
\red0\green0\blue255;
\red255\green0\blue255;
\red190\green190\blue190;
\red0\green255\blue0;
\red50\green205\blue50;
\red176\green48\blue96;
\red0\green0\blue128;
\red85\green107\blue47;
\red160\green32\blue240;
\red255\green0\blue0;
\red192\green192\blue192;
\red0\green128\blue128;
\red255\green255\blue255;
\red255\green255\blue0;
\red204\green0\blue0;
}
{\info
{\*\userprops
{\propname creator}\proptype30
{\staticval XMLmind XSL-FO Converter Professional Edition 4.6.1}
}
}
\facingp\fet0\ftnbj
\sectd
\pghsxn16114\pgwsxn12514
\margtsxn720\margbsxn907\marglsxn907\margrsxn1080
\headery720
\footery547
\pgncont\pgndec
\par
\trowd\trleft10
\clvertalt
\clcbpat17
\clbrdrt\brdrs\brdrw20\brdrcf2\clbrdrb\brdrs\brdrw20\brdrcf2\clbrdrl\brdrs\brdrw20\brdrcf2\clbrdrr\brdrs\brdrw20\brdrcf2\cellx10262
\pard\intbl
{\plain\f4\fs19\b\cf15\ulc2
Informations client
}
\cell
\row
\trowd\trleft10
\clvertalt
\clbrdrl\brdrs\brdrw10\brdrcf2\cellx5136
\clvertalt
\clbrdrl\brdrs\brdrw10\brdrcf2\clbrdrr\brdrs\brdrw10\brdrcf2\cellx10262
\pard\intbl\itap2
{\plain\f4\fs18\cf2\ulc2
E-mail:
}
\nestcell
{\*\nesttableprops
\trowd\trleft0
\clvertalt
\cellx5400
\nestrow}
\pard\intbl
\cell
\pard\intbl\itap2
{\plain\f4\fs18\b\cf2\ulc2
Responsable Commercial:
}
\nestcell
{\*\nesttableprops
\trowd\trleft0
\clvertalt
\cellx5400
\nestrow}
\pard\intbl\itap2
{\plain\f4\fs18\cf2\ulc2
\~
}
\par
\pard\intbl\itap2
{\plain\f4\fs18\cf2\ulc2
Nom: John Doe
}
\nestcell
{\*\nesttableprops
\trowd\trleft0
\clvertalt
\cellx5400
\nestrow}
\pard\intbl
\cell
\row
\pard\sect
}