lcov pointed out that there is no testcase for the export of this, and
turns out the import part wasn't implemented. As a side effect this
implements the same for DOCX import as well.
Change-Id: I016ebc100ec3856bf3a43aea8ea55af72c2ead1e
In RTF, it's possible to start a cells merge using \clmgf, and simply
omit following cells in the row - they must merge automatically.
This makes HorizontallyMergedCell::m_nLastCol/Row uninitialized.
Previously, the uninitialized values arrived as 0,0 - thus the first
range's cell got merged with cell 0,0.
This change prevents the merge; in scenario above, absence of additional
cells in row will create merged cell automatically.
Change-Id: I68b84b7ec70d9512c541a077689369fa4a8dc0c5
Reviewed-on: https://gerrit.libreoffice.org/34079
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
If a list bulletChar is a soft-hyphen, it will disappear in PDF export.
Therefore, replace it by a hard-hyphen.
Change-Id: If0b535e7d2e23454136f25a2b7acf4b294b8dd27
Reviewed-on: https://gerrit.libreoffice.org/33707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
...and remove some unncessary using directives/declarations, in preparation of
removing now-unnecessary #includes from cppumaker-generated files, post
e57ca02849 "Remove dynamic exception
specifications".
Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
Reportedly gperf 3.1 changes the signature of in_word_set(), where the
len parameter changes from unsigned int to size_t.
It turns out the only forward declaration for this function is currently
unused, so just remove it.
Change-Id: Ifbc582cd31ca37fff9ff95a3706ee902ecfe5223
Regression from commit 9e7eb63989 (DOCX
import: parse <w:spacing>'s w:before/afterLines attribute, 2014-10-17),
the problem is that OOXML has 3 different attributes for the paragraph
bottom margin (and other 3 for the top one), while in Writer we just
have a top margin.
Now the import filter tries to work out which one of these should have
priority and ignore the rest, but this is way more complicated when
style inheritance has to be taken into account as well.
To avoid the regression just restrict w:before/afterLines handling for
the case when it's used as direct formatting, that's why this was
introduced after all.
Change-Id: Ie8642c7a9771596def6b8899e098b26c4f8be0b4
Reviewed-on: https://gerrit.libreoffice.org/33738
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
... when file containd ansicpg0/cpg0
This allows user to change this setting and get proper document
language. Similar technique is used currently for DXF and WMF.
Change-Id: I884a973d98384c92d45a1d2e19720ffe3e6aa20d
Reviewed-on: https://gerrit.libreoffice.org/33505
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Apparently copy/paste mistakes in the
642a252cf1 and
21d4cfe19e commits from 2014; most of
the picture effect type tokens added in that commit do have names that
start with "artistic" but not all.
Does not break any unit test. (Does not fix the bug I am investigating
either, though.)
Change-Id: I2c3bb7243e1feaa3fa949b58d3acf34825d6987b
commit 15c3a08b8b set transparency
before the wrap type was known (which is good in case wrap type is
never defined, and the default wrap type IS through, so that fits)
but transparency was never re-evaluated once the wrap type was known.
In MSWord, the header is at a lower zOrder than the body,
so objects that are OVER the header text are still UNDER
the body text. Writer emulates this by insisting that ALL
through-wrapped header objects are UNDER the header text.
(This ought to only apply to objects that spill into the
body text area, but that’s pretty hard to calculate, so
transparency was applied to any object anchored in the header.)
Change-Id: Ie3916c6b7f3fa80caf5994fd910ba4d4d89ec702
Reviewed-on: https://gerrit.libreoffice.org/33152
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Commit e0f9bb7952 added the property
"IsBrowseMode" to SwXDocumentSettings, but it is already available in
the API as SwXViewSettings property "ShowOnlineLayout".
The problem is that both of these properties get exported in ODF into
settings.xml, so it contains "IsBrowseMode" twice.
Unfortunately the SwXViewSettings are not available in writerfilter,
because the XModel::getCurrentController() is null, the view is created
after the import.
But there is already a way to store ViewData in the SfxBaseModel, which
is then used by SfxBaseController::ConnectSfxFrame_Impl() when creating
the view. This applies the property at just the right time.
Change-Id: I842845d09a7b3fe81e27a1ed8ac8a8594da7f4e8
The queries are followed by conditional blocks; so throwing is
unnecessary and erroneous (breaks parser internal state).
Change-Id: I49917a85e34866a326b4a2edd30e76f130b8ee27
Reviewed-on: https://gerrit.libreoffice.org/33244
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Regression from commit 992da0d5cf
(bnc#817956 DOCX import of document background color, 2013-05-27),
<w:background> should be ignored when <w:displayBackgroundShape/> is
missing from settings.xml, it turns out.
This also requires generating the
ooxml:CT_Settings_displayBackgroundShape token from the RTF tokenizer.
Change-Id: I6d7986904cedb952998a87e7648919ae34adc360
Reviewed-on: https://gerrit.libreoffice.org/33207
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Because that's what Word does to show only part of the shape in the
bugdoc.
Change-Id: Ic5cb84cace9237671d71eda0c64e9dadfe244cb9
Reviewed-on: https://gerrit.libreoffice.org/32782
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Liberals of Number format code (NFC) were no longer recognized
by dmapper after it had been removed in
d30a8ec448.
Replace them with enumeration.
Change-Id: I3ed1e09d9f3987fce95bd708b9c0b0568d3f15f9
Reviewed-on: https://gerrit.libreoffice.org/32527
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
hideMark in Word does not force the minimum possible row size,
but simply ignores any cell marker styles/sizings. So an empty row
then takes on the "at least" size defined for the row.
Change-Id: Id24a52f2a360a5040c2eed5c17757c0d32d03520
Reviewed-on: https://gerrit.libreoffice.org/32380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
See commit 1be0a3fa9e (n#825305:
writerfilter RTF import: override style properties like Word,
2014-06-17) for the details on style override in RTF.
Here the problem was that we added an unneeded "reset to 0" property, the
opposite situation that commit 657c6cc3ac
(tdf#104228 RTF import: fix override of style left/right para margin,
2016-12-13) was fixing (there a "reset to 0" was missing).
Change-Id: I37f079b9cb4773214d2531c2e34920b3b8927211
fixes commit cbd0fbc287
which removed the insertion code with the explanation saying
we should simply not do anything,
and that'll lead to the right behavior,
don't try to be smart and try to set TABLE_WIDTH here
but still left the flag set, falsely indicating that the
tableSizeType had been inserted.
Change-Id: I0720083c992d1d03a5fe259d5b4b177a0c8108f8
TODO: the table size still isn't correct.
Reviewed-on: https://gerrit.libreoffice.org/32385
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Currently, imported formulas use default Math object's margins,
that are 2 mm left & right for embedded object and 1 mm left & right
for its model. Before commit eae2331f83,
there was also 3.5 mm bottom margin for embedded object.
This commit sets all margins to 0.
Unit test is included.
Change-Id: I23c78d4cedaeba8f2a70a000dca8e31de20bcab2
Reviewed-on: https://gerrit.libreoffice.org/32334
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
moving this keeps the original fix and prevents losing a table
in this unit test
fixes regression commit ecea3431ca
Change-Id: I5e94760649020ddf1c468d52b91aaf0521bbfdda
Reviewed-on: https://gerrit.libreoffice.org/32269
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
fixes regression from fix for bug 103975 which prevented removal of
empty paragraphs if there was a page/column break. This patch adds
the requirement that there is also a defined SectionBreak.
I did a bad thing with unit test rhbz988516 (which was re-used as
the unit test for bug 103975). I didn't first check in MSWord
to see how many pages it really ought to have, and when it started
round-tripping with 3 pages I was happy. Well, the proper page count
according to MSO is 2 (a hard page/break and Section/newPage combine
to form a single pagebreak). Undoing the regression fixes that too.
The regression was commit 7b250d5698
Change-Id: I15e9df2d260954f02a9e183d9f48c1d267494b49
Reviewed-on: https://gerrit.libreoffice.org/32236
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Justin Luth <justin_luth@sil.org>
The unit test's first blank page already started the paragraph
numbering. Setting it so that a contentless, single paragraph
section will not display numbering. In fact, no dummy paragraph
should have numbering, but that would get complicated.
This is in preparation for tdf#104710.
Change-Id: I98c9926cb3cd1e3fe3cd43bf46cab22bfbec7eba
Reviewed-on: https://gerrit.libreoffice.org/32235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
The unit test should have been showing a blank page before the
content page.
Non-section paragraphs should not remove the first/last status.
Frames were already excluded, now this patch also
excludes header/footer paragraphs.
This is in preparation for tdf#104710.
Change-Id: I686944843302160d6f6bbbcb73f01c836179aa9f
Reviewed-on: https://gerrit.libreoffice.org/32234
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
layoutInCell attribute should be ignored when we are not
in a table.
Change-Id: Ieed29c690f8516f63d0956a4f0495500908a0d27
Reviewed-on: https://gerrit.libreoffice.org/32253
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
sw comments are handled by editeng, so tables in comments aren't
imported. That means lcl_emptyRow() may get a row where the first cell's
start is an empty reference, so handle that case.
Change-Id: I43e286314143934c20e6cbbd656d32883b6b2efe
LibreOffice's default paragraph style is very different from Word's normal
style? Anyway, if normal is not defined in styles.xml, then don't
re-assign any other automatic styles to be based off of it, since that
indicates that the style information being imported is not complete.
avoids regression from commit b79b5e0df6
Change-Id: I1bfa8505d6b89b2bba255ad727ebadbacc8d3651
Reviewed-on: https://gerrit.libreoffice.org/32103
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Empty paragraphs are removed in certain cases. If the previous
paragraph was in a frame, then this one shouldn't be removed
(unless that previous paragraph was in a header/footer).
Most of this patch is renaming the function to clarify that
it refers to the latest paragraph, not the very last one.
As noted in original tdf#75573, there may be other paragraph
containers that should also ignore their framed status - so
I've tried to set this up to make it easier to add those cases
when proof documents are found.
Change-Id: Icd09793f652616622ab266942f4b81eeb39c0ccc
Reviewed-on: https://gerrit.libreoffice.org/32121
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
See commit 1be0a3fa9e (n#825305:
writerfilter RTF import: override style properties like Word,
2014-06-17) for the details, this bug was about the same, just for two
more paragraph properties. Specify the default values for them, so
override of style value as direct formatting works as expected.
Change-Id: I353cc3ae8c35baf1b5ed5a83a8bd131c7bfbbe64
Pleasantly surprised to see we already don't balance before
regular page-breaks or at the end of the document. This adds
not balancing before a page-break-section.
Change-Id: Ifedff5cc45b154a005f13b3212154c443727e286
Reviewed-on: https://gerrit.libreoffice.org/31826
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Since commit ac6bfd85df (tdf#92045 DOCX
import: <w:effect w:val="none"/> doesn't mean blinking, 2016-01-06) the
"no blink" blink type is not 0, but
NS_ooxml::LN_Value_ST_TextEffect_none.
Change-Id: If854e57d125a365f829797f027ca5e131705e137
Reviewed-on: https://gerrit.libreoffice.org/31797
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Next to number and string.
Change-Id: I76f78197412606f00559c1c2790b7c70117ef1c1
Reviewed-on: https://gerrit.libreoffice.org/31767
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
none of the other members hold references to it.
This made the whole dtor obsolete.
Change-Id: I21f49b6e05ca8efda8b466930b5e3b156bc5b868
Reviewed-on: https://gerrit.libreoffice.org/31681
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Every time a comment is referred, the whole comment stream is parsed
but only the referred comment is extracted. But the symbol is always
processed so it is added to all the comments.
Change-Id: I3264de2d011ff188ef64f6500ae426cde0106c16
Reviewed-on: https://gerrit.libreoffice.org/31584
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>