Fails with commit 6657d52417295265367cf3ffe5832b60e3c38011 (vcl pdf
import: use pdfium instead of draw_pdf_import, 2017-02-13) reverted.
Change-Id: Ibf29df4fdf5b1bb2684b58564b6e1981463f12eb
I.e. the test documents now reflect what is created by LO if you insert
a PDF image into a document manually on master.
Change-Id: Ibacce15220a21b159b5e987678c381a98a29fd1a
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
Replace creating a full Draw component with direct pdfium library calls.
This also means that the result is now a bitmap, not a metafile for now.
Also decouple HAVE_FEATURE_PDFIMPORT and HAVE_FEATURE_PDFIUM, the first
is the "import PDF into Draw" feature, the second is the "insert PDF as
image" feature.
Change-Id: I72c25642ec84cc831df362e02b1520c6e6d9adcf
Reviewed-on: https://gerrit.libreoffice.org/34217
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
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>
There's another context that reads draw:frame, and it has the same
problem as the one used for Impress shapes. This causes SVG images
in Writer to lose contour polygons and image maps.
Fix this the same way as the other context.
(likely regression from 44cfc7cb6533d827fd2d6e586d92c61d7d7f7a70)
Change-Id: I16cf55e68829b4e1b0841f2015d0729be0ce3725
lcov pointed out this had no coverage previously (unlike the 0 and the 2
case).
Change-Id: Iaa480015d1ddfe7c489a3cbbf079a38d20e6d45c
Reviewed-on: https://gerrit.libreoffice.org/33987
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
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
e57ca02849c3d87142ff5ff9099a212e72b8139c "Remove dynamic exception
specifications".
Change-Id: Iaf1f268871e2ee1d1c76cf90f03557527ebc9067
Previously, the fieldmarks couldn't be removed with backspace or
deletee when cursor was right/left to them.
After commits f72b866c9cf4f07fce6744fbf482c4c6488106e2 and
c34fc4520dfee4ca068f249ee0756dacaa7a60cf, deletion worked wrong
(it didn't delete the mark from mark manager; in case of text
field, it removed one field's boundary).
Now single backspace/delete properly removes the whole fieldmark,
replacing it with its contents if applicable.
Change-Id: Id26e6e4e40e274d9fd6f0224f3e2b4fe33c369b7
Reviewed-on: https://gerrit.libreoffice.org/33812
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
The problem in callnk.cxx was that when selecting 1 char to the right
using keyboard, and exiting field boundary, nCmp pointed to previous
position (inside field), and then compared to position to the left
(which also may be inside field), thus missing call change link (and
read-only state change). Seems that this was a mistake in commit
740efbb1daf26828f70dc785c1e107f67706286b.
In pam.cxx, if cursor was to the left of field, and then selected
1 char to the right to cross field's boundary, then both PaM's point
and mark had same fieldmark, but point was outside, and mark inside,
and as code didn't check this condition, so read-only state wasn't
properly set.
Unit test is augmented to check the second problem.
Change-Id: I7323e53eeb261b4ccdc0f9e36cc0956b373f104d
Reviewed-on: https://gerrit.libreoffice.org/33790
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit fixes commit aa799f64723933bbb46544f835a970cfcbb90384,
and partially reverts commits bd505fdb9f669f365ff39b0ef46f0742c638e333
and 9104d5e8905c2ec2b576b5ca452d3e23d5555e49 that seem unnecessary
now. Unit test included, the existing unit tests of partially
reverted commits are kept.
Change-Id: I2a02cda546f5d484553c3b9467993fca36dae140
Reviewed-on: https://gerrit.libreoffice.org/33722
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Regression from commit 9e7eb63989ef1cf4b9a0e0404b84ef890db3d8e3 (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>
so we can remove unnecessary calls to the OUString(literal) constructor
when calling constructors like this:
Foo(OUString("xxx"), 1)
Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36
Reviewed-on: https://gerrit.libreoffice.org/33698
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
...(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>
Commit 94b296d5416dd71d721ad16216b50bce79e3dc04 changed this to
potentially insert multiple overlapping hyperlink items.
Unfortunately Writer can only have one RES_TXTATR_INETFMT on any given
position in the paragraph, so the hyperlink hints inevitably overwrite
each other.
Revert this to do it the same way as the old code in LO 4.3 did: match
the last unmatched link-start with the first link-end, and ignore all
the link-start before the matching one, as well as the link-end after
the matching one.
This should prevent surprising formatting changes on index update,
including entries spontaneously turning green, and there is no reason
why the result of the new way is objectively better than the old one.
Change-Id: I55be9c212c473908428fa8bd6487d136343fe852
related to tdf#35021 and n#793998 to test
the tab_over_margin compatibility setting
for doc and docx.
Change-Id: I00f932957b59a7ff1a55e69f4fdfae4fc1d17163
Reviewed-on: https://gerrit.libreoffice.org/33278
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Commit d635b351849b8b576c907abf22500d0fa89ab54f (tdf#99100 DOC import:
handle subset of STYLEREF natively, 2016-04-06) started to import the
STYLEREF field code as SwChapterField in case it had \[a-z] switches
after the field argument.
The bugdoc has a \s switch, which is not documented in ISO/IEC
29500-1:2012 17.16.5.59 "STYLEREF", nor is really clear what it would
do.
The original use-case was for the " STYLEREF 1 \* MERGEFORMAT " syntax,
so just keep using fieldmarks for the " STYLEREF <field argument> \[a-z]
" case.
Change-Id: Ibd094e72be4e179c779a79a75769b599d4d9bba8
Reviewed-on: https://gerrit.libreoffice.org/33489
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:
1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
2. split the inheritance of Idle from Timer again to maintain
different Link<>s and move all common code into a TimerBase.
While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.
And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.
It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).
Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
commit 3755c87d0426a499d4755e82d8fbc77caa240764
mis-positions non-textframed floating tables.
The patch only worked under very ideal circumstances
that cannot be identified during import time. Lots of bug
reports indicate real world problems with it.
This is a pretty safe revert because the code only
processes a document one time, so old documents don't
depend on this to work.
Change-Id: I3b94d27901a20e46c2f5fd4305041d1d28acf33a
Reviewed-on: https://gerrit.libreoffice.org/33322
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
This also reverts temporary commit ba2c31da9723182d2087e27a1ea0f95d9617f343
which was done to look for more pro or con proof documents. None found.
This section of code has been essentially unmodified since the initial
import in 2000, so apparently the necessity for preventing the processing
of a section if the table item contains pageBreak info is no longer valid.
My guess is that tables were excluded to fudge round-tripping better. Recent
use of dummy paragraphs during import fixes many import problems, and thus
export of the section node no longer should be avoided.
Change-Id: I28bcf618f596a1676e2e7820de192ca63bffe68f
Reviewed-on: https://gerrit.libreoffice.org/32936
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Now only subsequentchecks are remaining, as far as I see.
Change-Id: Id5e5a874f8de08c0fd3722aecdc02967ae5d421f
Reviewed-on: https://gerrit.libreoffice.org/33346
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
commit 15c3a08b8b1e8060f9659c7bc98480a39d1802c5 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>
This hang happened when the user executed Tools -> Language ->
Hyphenation -> Hyphenate All.
This problem is visible only if all of these conditions are met:
- a line in a paragraph has a word that already contains a soft-hyphen,
but not at the position where the automatic hyphenation would insert
it
- the last line ends with a word that can be hyphenated
- there is a fly frame in the document
In this case it happens during hyphenation that the layout has an
additional empty line at the end (which is removed by the time the
layout finishes), so we hit the case when SwTextFormatter::Hyphenate()
skips the "if( m_pCurr->PrtWidth() && m_pCurr->GetLen() )" block.
Normally hyphenation terminates when it iterates over the portions of the
line and no overrun nor any existing hyphen portion are seen, but in
this case that never happened. Fix the problem by terminating not only
when we reach the end of the portion iteration, but also when the
portion list is non-existing (has zero length).
Change-Id: I71d4b040a2d4692ae6eb92807dbbbb42b077a0f8
Reviewed-on: https://gerrit.libreoffice.org/33303
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Commit e0f9bb795251d950b5dd960fcd030170c8eb67aa 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
Although import handled whether footnote numbering restarted
every page, chapter(section) or document, that information
was not being exported in docx.
Change-Id: If9e0a1d53c8610b18b949fd918c5dd7d7bd94682
Reviewed-on: https://gerrit.libreoffice.org/33183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.
Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
Regression from commit 992da0d5cf04497bad55637f6a6ebfcdaec03e16
(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>