These describe an explicit horizontal merge, that is not something Word
itself creates, but it turns out the Calc RTF export does.
Change-Id: I1b6ec10bb8e8bd40e24791ccc96f2f066dd0d5d5
Word wants this, so it's added by the exporter to the document, but on
import we should ignore it.
Change-Id: Idcb669ba624bf462a50a85eb4aacf397afb6efe6
Updated 3 testcases, in all cases first checked that the new behavior
matches what Word does.
Also added a new test, to check that empty para at footnote end is now
kept.
Change-Id: I96b8788feb4d730b5a64ba3a743311a0180ab41f
Pictures typically have a single RTF group, so we imported them at the
end of that group. Though multiple inner groups are also allowed, so
make sure we only do the import at the very end, instead of at the end
of all inner groups as well, resulting in multiple (fake) pictures.
Regression from 13c00ce322e78eb4e0f50ab84ded19cd6aae1ded (Enable the
writerfilter-based RTF import in non-experimental mode, 2011-08-18).
Change-Id: Id895b2c6d3b824d09d89bfa01ce59aba76c55d42
Regression from 2ade07126971b79c92f729fae5709f2e2e2b495c (fdo#62044 RTF
import: don't overwrite existing styles when pasting, 2013-06-04),
during paste, if existing style was found, then the intention was to
skip that style, but instead we tried to create one.
Change-Id: I83adaf9fe6b8a578fa60c21b9463fabde7707d7e
In general, paste should not deal with page styles. In this case, it
even caused an additional page break.
Change-Id: Ia7c5a9ad844821b6622babfbd94469ec3c04cf0a
Commit 4a507f732d82c188ad81b022cbe3037951e58ac3 added an exception to
RTF_PARD (reset paragraph properties) handling: when we're inside a
table, it should not reset the fact that we're inside a table (which is
a paragraph property).
However, instead of just re-adding that property, it disabled resetting
for all properties, and we had a growing list of exceptions since then.
The next thing to add there would be the paragraph attributes, which
contains the style information. Instead of growing that ad-hoc list,
reset everything again and just re-add the "in table" SPRM.
This makes the second and later paragraphs in the A1 cell of the bugdoc
have proper font size.
Change-Id: I2de80894fcd5da3bf45d221af9a04a307c70a29b
There were multiple problems here:
- xFoo->createTextCursorByRange() got a text range argument,
where the text range wasn't from the xFoo text
- it was assumed that all XText implements text::XParagraphCursor as
well, but this is not true for e.g. comment text
- commented text ranges were pasted as normal comments (once again, the
insert position wasn't passed around)
Change-Id: I9a975a08b08a7f32b1ee71e42f58736cc0dbb09d
The document had 3 sections, separated by continuous section breaks.
Previously only margins from the last section were imported, this way
the first page had default margins.
Now margins are also applied when we hit continuous section breaks. This
way margin values from the last section break affecting the page wins. A
later commit could improve this further by setting the minimum of these
and setting a section margin for each non-minimal sections.
Change-Id: I4d9a4585e795220533909bd1d467d933caaa0d71
MSVC misinterprets UTF-8 source code without BOM as ANSI/OEM codepage.
For that reason if local codepage is unfriendly to UTF-8, it sometimes
causes compilation error.
Change-Id: I8acd5500e581e020fd60b5a2ec20629f92fdf87c
This is the RTF equivalent of f5b7acac624f07fa95835b6054b8d295901bb1dd,
which avoided TO_PAGE-anchored shapes in the VML importer.
Change-Id: I58a5cdb311ac43ddba00bc441005fb37a4899cee
Instead of unconditionally calling addProperty(), first check the
existence with hasPropertyByName() and call setPropertyValue() instead,
if necessary.
Change-Id: Ie0a075bbfe6eaa1f66726c456105dcdef9001d30
Both Word and Writer typically write all paragraph properties before the
first text in each paragraph, but at least for paragraph alignment, it's
valid to write them at the end.
Change-Id: I0337e63678ad45c662a204ab2fc59378607abe74
This crashed because for a single listoverride entry 2 SPRMs were sent
to the domain-mapper, and the second one was empty.
Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63
In case we have a table of a given width and the second (or later) row
has fewer cells, we have to add a fake cell to such a row. However, it
doesn't make sense to do this when the difference is only a few twips:
we can't create such a small frame inside the cell later anyway.
Regression from c3b0f13546b30e5db3aecd311c7178e4e0933208.
Change-Id: Ibc0f02d4184b58bd423c3405e786e1ec25b9dd13
The bugfix was just for the special case when we must create textframes
due to the contained tables, this one add support for the default case
when we want a real group shape.
Change-Id: I74b77b233235959266a24660c970a79e41d8b272
In case we have a \sect, there was no \sbknone (so it counts as a page
break as well) and there is nothing after it, we should not make extra
efforts to make that have some effect, but adding at least one empty
paragraph to that new page.
Change-Id: Ibcbecabcb590ed34ef96a97698e4ab8f638d3483
There were multiple problems here:
- \f had a special handler for the listlevel destination, \af had not
- in case of multiple \f or \af, the first one is used for the bullet
font
- in case only \af is used for the bullet font, its value should be used
for \f as well
Change-Id: I6631504c1aa9f2e0792a3469a5fdce5b7bd49518
There are two cases here: if the shapes contain tables (or other
Writer-specific features), we should use text frames and we should not
create the actual group shape, as Writer textframes can't be part of
such group shapes. The other case is when the shapes contain simple
text, OTOH there are groupshape-level transformations defined, in that
case we should choose drawinglayer rectangles and actually create a
group shape.
This commit implements support for the first case only.
Change-Id: I9dc99b0711ce5c7a29ea0b14539df0121f9de3d0
E.g. 0,1 was imported as 1,0, as we did not differentiate between not
having the coordinate yet and having it as zero.
Change-Id: Ia5fbbcc791dc9c6866ffd4c146793690661d81b4
That destination contains a whole shape, but the only interesing detail
of it is the fill color, which is the page background color.
Change-Id: I9527db8954c48c980f8734c9bbeaa6ccd3c48fbc
Make sure that at least full-page-width multi-page floating tables are
imported on multiple pages.
Change-Id: Ifb974d50c50b1495634ac2652a3ae46235bb5f52