summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-02Change PACKAGEREVISION to 20200902cp-6.0-29-20200902Andras Timar1-1/+1
Change-Id: I72b986ba8d73ddbe674901b1648d4652f12ec2b2
2020-08-18nss: upgrade to release 3.55.0Michael Stahl3-43/+2
Fixes CVE-2020-6829, CVE-2020-12400 CVE-2020-12401 CVE-2020-12403. (also CVE-2020-12402 CVE-2020-12399 in older releases since 3.47) * external/nss/nss.nspr-parallel-win-debug_build.patch: remove, merged upstream Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100345 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 495a5944a3d442cfe748a3bb0dcef76f6a961d30) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100420 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 227d30a3a17f2fffb1a166cdc3e2a796bb335214) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100590 Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 94cecbfdf3cf01fe3d5658c7edf78696da2a249f) Change-Id: I8b48e25ce68a2327cde1420abdaea8f9e51a7888
2020-08-18NSS: enable parallel buildJan-Marek Glogowski8-30/+76
Since NSS 3.53, the Makefile based build should be fixed (upstream bug 290526). The only missing patch is a minimal NSPR fix for the "NSPR, configure + make, parallel, Windows, MS VS, debug" build. That patch isn't incuded in the NSPR 4.25 release (but it's already in the mercurial repo for NSPR 4.26). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95218 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit b56e8d6def26a0430853835e997f1be841840a61) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100419 Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit c1bce55faebd9ad8751d7b6b9a7f77dff7b3d507) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100589 (cherry picked from commit 3e4dbb1708d4b3b7619602b63602b884a7bb2caa) Change-Id: I8eaa3792a12bdff734e56ac3f552991478957e23
2020-08-18curl: upgrade to release 7.71.0Michael Stahl5-9/+10
Fixes CVE-2020-8169, and about 3 other ones that don't affect LO/libcmis. Disable new optional dependencies "ngtcp2" and "quiche". Change-Id: I595ed909c4e792ac3244643511a338b117e7f102 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97406 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit cb0c7e26e5708010b1fe941ae2f66134f31ed876) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97386 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 43130216127913d30074d3fe99c5706dcce44dee)
2020-06-24Fix libgpg-error compilation error with gawk5nd1013-1/+116
This is an adaptation of upstream patch https://github.com/gpg/libgpg-error/commit/7865041c77f4f7005282f10f9b6666b19072fbdf plus a fix to Makefile.in Change-Id: I5bf946cf93e5849b8a3428064ab86f6255be97da Reviewed-on: https://gerrit.libreoffice.org/75022 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit af3b993ebea2f653fabba981d4c22b9aa779b32a) Reviewed-on: https://gerrit.libreoffice.org/75075 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 87215115618de0c12d287a300fc5fde993886089) Reviewed-on: https://gerrit.libreoffice.org/76308 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 8edc7023a14d26a7a6201f154b5c0e8edb47b1d9) (cherry picked from commit 876d96f8c8a8d29e69b00820d34d25e19abe0563) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97032 Tested-by: Aron Budea <aron.budea@collabora.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
2020-06-23tdf#116194 DOCX import: fix missing tables with w:gridBeforeLászló Németh8-15/+74
Regression from the commit cf33af732ed0d3d553bb74636e3b14c55d44c153 "handle w:gridBefore by faking cells (fdo#38414)" This patch replaces the previous fix with a better solution, fixing tdf#38414 on the proposed DomainMapper level. (Note: to reject the old fix completely, its follow-up commit w:gridAfter will be handled in a similar way.) Now the related regressions, tdf#111679, tdf#120512 and the complex forms of tdf#116194, tdf120256 and tdf#122608 are fixed, too. Reviewed-on: https://gerrit.libreoffice.org/84263 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit da1f71edfc72928b07a569b98e2766a8a7de9d2a) Reviewed-on: https://gerrit.libreoffice.org/84711 Tested-by: Jenkins Change-Id: Id25f5fb4d9021c87ee8c82782b2038e6fb255673
2020-06-23nss: upgrade to release 3.47.1Michael Stahl7-25/+13
Fixes CVE-2019-11745. Remove nss.fix-freebl-add-lcc-support.patch.1, fixed upstream. Reviewed-on: https://gerrit.libreoffice.org/83673 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit a6238c3fba80889f9090d997e2a4979b78b34ac7) Change-Id: I72e35c90fabb0a83f547a787dbaee774e35f9c08
2020-06-23tdf#107487 fix font fallback for non-BMP characters.Mark Hung1-3/+5
Non-BMP characters use two sal_Unicodes. It is necessary to advnace with OUString::iterateCodePoints safely instead of nCharPos + 1. Change-Id: Iea1005f05421b1021a9b3ff611439357d4dcba9e Reviewed-on: https://gerrit.libreoffice.org/73326 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 16faad3657fad114aa984f92a14a5f212a2f8ff5) Reviewed-on: https://gerrit.libreoffice.org/80467 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-23sw: fix use after free on tdf117215-1.odtMichael Stahl2-1/+3
Move the fix from 6d0ea082889c89eb8b408779f2de08da7441ff54 to SwFlyFrame::DestroyImpl() so we unregister every SwFlyFrame. ==1550==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000383f56 at pc 0x7efcd70d5ab9 bp 0x7ffeb7ac7c40 sp 0x7ffeb7ac7c38 WRITE of size 1 at 0x615000383f56 thread T0 0 SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) sw/source/core/layout/anchoredobject.cxx:743:32 1 SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() sw/source/core/layout/objstmpconsiderwrapinfl.cxx:53:23 2 SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) sw/source/core/layout/layouter.cxx:387:84 3 sw::DocumentLayoutManager::ClearSwLayouterEntries() sw/source/core/doc/DocumentLayoutManager.cxx:497:5 4 sw::DocumentStateManager::SetModified() sw/source/core/doc/DocumentStateManager.cxx:45:39 5 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3942:36 0x615000383f56 is located 342 bytes inside of 504-byte region [0x615000383e00,0x615000383ff8) freed by thread T0 here: 1 SwFlyAtContentFrame::~SwFlyAtContentFrame() sw/source/core/inc/flyfrms.hxx:159:7 2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9 3 SwFrameFormat::DelFrames() sw/source/core/layout/atrfrm.cxx:2624:17 4 SwUndoFlyBase::DelFly(SwDoc*) sw/source/core/undo/undobj1.cxx:161:19 5 SwUndoDelLayFormat::SwUndoDelLayFormat(SwFrameFormat*) sw/source/core/undo/undobj1.cxx:403:5 6 SwHistoryTextFlyCnt::SwHistoryTextFlyCnt(SwFrameFormat*) sw/source/core/undo/rolbck.cxx:538:20 7 SwHistory::Add(SwFlyFrameFormat&, unsigned short&) sw/source/core/undo/rolbck.cxx:1083:50 8 SwUndoSaveContent::DelContentIndex(SwPosition const&, SwPosition const&, DelContentType) sw/source/core/undo/undobj.cxx:1020:39 9 SwUndoDelete::SwUndoDelete(SwPaM&, bool, bool) sw/source/core/undo/undel.cxx:229:9 11 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3939:55 Change-Id: Ia0c28c9d5792615cbb566e502374efd0f4056daf Reviewed-on: https://gerrit.libreoffice.org/75857 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit dea72ef111ee8a0b1b178f8cd48757514d5ca831) Reviewed-on: https://gerrit.libreoffice.org/75941 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 4b9324b93dcbd72c8c8949309d45790dd8f7d5fd) Reviewed-on: https://gerrit.libreoffice.org/76306 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 00c4ae49aa88319660b9201e8e5d8393953fa1ed)
2020-06-23forcepoint73 deleted SwAnchoredObject still referenced in TmpConsiderWrapInflCaolán McNamara7-19/+43
Reviewed-on: https://gerrit.libreoffice.org/58760 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 6d0ea082889c89eb8b408779f2de08da7441ff54) Change-Id: If255723834d049865fcf6fd0eac7768dfcbad2a1 Reviewed-on: https://gerrit.libreoffice.org/58768 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit de765158b372d5f7bbb1b37c7d6be695ab6104ac)
2020-06-23ofz#11125 pass param len aroundCaolán McNamara2-11/+38
Change-Id: I4b382271df21c58de0e102af6e0b07a88a1d9610 Reviewed-on: https://gerrit.libreoffice.org/62448 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 6253b1a29c8c1bcd7fd9efb07ca1a12fb0fc1746)
2020-06-23forcepoint#67 detect cairo surface creation failureCaolán McNamara1-0/+10
if e.g. too large Reviewed-on: https://gerrit.libreoffice.org/58454 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 36bee88834f90818c5475b460c729186ef6c9229) Change-Id: I7de8748a5ed695c1b3ddc8c1358414f3acd68c94
2020-06-23NSS fix lcc support patchJan-Marek Glogowski2-0/+12
This hangs the build process with current MSVC cl.exe. It even hangs when just calling "cl -? >/dev/null". Probably a cl.exe bug to detect redirection properly? This adds stdin redirection to /dev/null, like in configure.ac checks. Reviewed-on: https://gerrit.libreoffice.org/75495 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit b11ea5e9c37b19f0d60a4075146668954a7bf728) Change-Id: Ie03c3103ac68cd131dc280755621a8ce0417314f
2020-06-23nss: upgrade to release 3.45Michael Stahl6-550/+9
Fixes CVE-2019-11729 CVE-2019-11719 CVE-2019-11727, and the less important CVE-2018-12384 and CVE-2018-12404 from intermediate releases. Since NSS 3.44 it's possible to build as static libraries and for iOS; drop the nss-chromium-nss-static.patch and nss-more-static.patch and hope that it works. Drop one hunk from nss.patch that looks fixed upstream. Reviewed-on: https://gerrit.libreoffice.org/75344 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 6efc8a33f69bc7f4be45b7b81f67cd74c163b99e) Change-Id: I7f37ac36f7f8dfd49d0bfb4a6185ca49d4f618a3 Reviewed-on: https://gerrit.libreoffice.org/75410 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2020-06-23curl: upgrade to release 7.65.0Michael Stahl2-12/+2
Fixes CVE-2019-5435. It looks like this is not a problem on 32-bit Windows because fortunately we don't use /LARGEADDRESSAWARE flag to set IMAGE_FILE_LARGE_ADDRESS_AWARE... but on 32-bit Linux the user-space VM is 3GB so an exploit might be possible. Apparently there's no code in LO that uses the CURLU_URLENCODE flag. The other one, CVE-2019-5436, doesn't matter because we disable tftp. Change-Id: I0d4f087befa5a3c4fb21ec36761dad68932425d9 Reviewed-on: https://gerrit.libreoffice.org/72732 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit edb01616ac176401650c35d938c75c6c5558a47e)
2020-06-23upload libvisio 0.1.7David Tardon5-48/+7
Change-Id: I4eb115c7c085b325370e9cd8f80e1b03f16f5033 Reviewed-on: https://gerrit.libreoffice.org/77640 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/77885 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-23upload libabw 0.1.3David Tardon4-55/+5
Change-Id: Ibb45a473f49a9ba8f9cf53593dead375ac8a1951 Reviewed-on: https://gerrit.libreoffice.org/77639 Tested-by: Jenkins Reviewed-by: David Tardon <dtardon@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/77884 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-23icu: add patch to fix CVE-2020-10531Michael Stahl3-1/+42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90971 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 002d1152dc418f7d624409e76cd9d4ac0b42c7f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90975 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 63b573faf984875cda7a879e696ea75fae81df57) Change-Id: I0aca4af1bd79f28bf1c920a4d05e80948106aaac
2020-06-23Remove a fragment from a file URL early onStephan Bergmann1-1/+4
...as ShellExecuteExW would ignore it anyway Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86868 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 14b36a16b225bf7c988f118d499a7287c47cd83e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86877 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 51da0d22ff42b20ab38130b7874651ef136ecceb) Change-Id: I969db094bb7d2ea230ac8c36eb23d71a90fbe466
2020-06-23poppler: upgrade to release 0.82.0Michael Stahl6-39/+185
fixes CVE-2019-9903 CVE-2019-9631 CVE-2019-9545 CVE-2019-9543 CVE-2019-14494 CVE-2019-12293 CVE-2019-11026 CVE-2019-10873 CVE-2019-10872 CVE-2019-10871 CVE-2019-10018 remove obsolete 0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 Reviewed-on: https://gerrit.libreoffice.org/83308 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 28e52c49452320ac76489d0f93ca5692456e5331) Reviewed-on: https://gerrit.libreoffice.org/83336 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit f3b2d61376c6d7ae262f58406d89ef0caa8b0aaf) Change-Id: I72b3bf89b294ed3e24157c7e75fd58d4f68d9f35
2020-06-23Fix build with poppler-0.82Rasmus Thomsen2-0/+39
Reviewed-on: https://gerrit.libreoffice.org/81545 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 2eadd46ab81058087af95bdfc1fea28fcdb65998) Reviewed-on: https://gerrit.libreoffice.org/83363 Reviewed-by: Rasmus Thomsen <oss@cogitri.dev> (cherry picked from commit 928a372775a0758aa76eb10e568d5c106a8586eb) Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc
2020-06-23libxslt: upgrade to release 1.1.34Michael Stahl6-136/+85
Fixes CVE-2019-18197. Remove obsolete e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1. Reviewed-on: https://gerrit.libreoffice.org/83312 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit e9ea24cc004a8b9a5856f2f268bd40433c504db1) Reviewed-on: https://gerrit.libreoffice.org/83377 (cherry picked from commit d19b32c779bfeb51ef9570c3de8ed1925ec44473) Change-Id: I95cf498e245083528f98bfef8cdd240bbe2211b9
2020-06-23libxml2: upgrade to release 2.9.10Michael Stahl3-39/+13
... which is, surprisingly enough, required to build the latest libxslt. Reviewed-on: https://gerrit.libreoffice.org/83311 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit d1bf39a78ed239d4493f0470ca937852265e79d6) Reviewed-on: https://gerrit.libreoffice.org/83347 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit e9dc4662d4ba3bde91407911f1bc1a7aa25fa0ce) Change-Id: Ifbb36ed61b8f68185f9c788f63a8edeb58899f94
2020-06-23Resolves: tdf#126928 allow link updates in an intermediate linked documentEike Rathke4-28/+57
... if link updates are allowed in the current document and that intermediate document resides in a trusted location. This works with both, the "Always (from trusted locations)" and the "On request" settings under Tools -> Options -> Calc -> General. It can't work with documents residing in a non-trusted location as there is no way to allow updates on demand for a such loaded document (hidden via formulas). Reviewed-on: https://gerrit.libreoffice.org/77588 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit 54bf84746a2a9a2e2aaf0df9e429b0cfd538f640) Reviewed-on: https://gerrit.libreoffice.org/77604 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 14825a8b7f00ee4c148f2583856e5102312cabbd) (cherry picked from commit f136b30fa3e991b780e4b1ed704d04256d0cfca0) Change-Id: Ie483f7743db7c6d5cf947dc16a9c3660855f3423
2020-06-23latest expatCaolán McNamara6-15/+12
Change-Id: Ia98c9718ccd8e18b5f56851027bde944164f05c4 Reviewed-on: https://gerrit.libreoffice.org/78978 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 4436a29401beffd0893ecae70cd09c7a49f49f22)
2020-06-23limit forms to http[s]Caolán McNamara2-0/+9
Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93993 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-22[cp] Be more relaxed with accepting certs in serfAndras Timar2-0/+12
The Desktop product uses neon, so this patch is for Online. When the WOPI-like host uses a self-signed SSL certificate, serf refuses to fetch resources from it, so Insert - Image and Create from Template operations fail. Related commit: a08552a8c36754930a3268e27aefee70d5cf21df But in case of serf somehow we do not trigger the interaction handler, we get an information message box with the text "Image file cannot be opened" So I decided to patch serf. The result is the same. * In Collabora Online 4.0.x we do not check the cert of WOPI-like host anyway. * In Collabora Online 4.2.x we optionally check the cert of WOPI-like host. The Create from Template and Insert - Image cases will be exceptional, where we won't check it. Generally it should not make a big difference. Change-Id: I3937bf450ef70f3a793ec1c793336d18209b6e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93306 Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-05-18DOCX export: fix interaction between the crop and the wrap polygon of imageMiklos Vajna7-16/+50
If the wrap polygon is influenced by crop at import time, we need to do the opposite at export time. Do this for RTF and DOCX, where there is matching import code in writerfilter/, leave DOC alone for now. Test this by changing testFdo76803 into an export test, then seeing how the first point's Y position fails and fixing up the exporter, so we get back the old good value. Conflicts: sw/source/filter/ww8/docxsdrexport.cxx writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx (cherry picked from commit c68b458514b35cae70c9a6630e06f46a867aa3b9) Change-Id: Ieef18aad3c76f7945c7348201b07bcb27a4cd48d
2020-05-18DOCX import: fix interaction between the crop and the wrap polygon of imagesMiklos Vajna5-8/+69
Word first applies the crop, then applies the wrap polygon on the remaining visible part of the image. Writer applies the crop on the original bitmap, and even has explicit code to make sure the uncropped bitmap is used for the wrap polygon, see how SwFlyFrame::GetContour() calls SwNoTextFrame::GetGrfArea(), which will extend the resulting size based on cropping. Fix the problem by moving and scaling the wrap polygon, so it ends up where it would in Word. Also adapt testFdo76803, which had a similar crop+wrap polygon case, but the different there is quite small. (cherry picked from commit 2abe9837deee3823c7928a76b5b2f94f1464f1a3) Conflicts: writerfilter/CppunitTest_writerfilter_dmapper.mk writerfilter/qa/cppunittests/dmapper/GraphicImport.cxx Change-Id: Iab2adaa81a33eb04e1806b17ed129ac50f5d2aa3
2020-05-18tdf#130494: DOCX import: limit paragraph-level character propertyLászló Németh3-4/+28
expansion for the whole table paragraph based on the last character context. regression from 2ab481b038b62b1ff576ac4d49d03c1798cd7f84 (tdf#90069 DOCX: fix character style of new table rows) (cherry picked from commit abb9c7db8bcc06f907d39a7811711882161d5803) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I49da23c268436488ff1537771869c38108113c12
2020-05-18tdf#128959 DOCX import: fix missing text lines in tablesLászló Németh3-2/+31
Orphan/widow line break settings aren't always ignored by Writer table layout code, in this case, in vertically merged cells, resulting missing paragraph lines. As a workaround for interoperability, disable orphan/widow control in cell paragraphs during the DOCX import to get correct layout in Writer, too. (cherry picked from commit 8b13da71aedd094de0d351a4bd5ad43fdb4bddde) Conflicts: sw/qa/extras/layout/layout.cxx writerfilter/source/dmapper/DomainMapper_Impl.cxx Change-Id: I48fdb0a3bb421fd4df2c729e307a7ef483e3e772
2020-05-18tdf#118672 sw layout, TabOverMargin: allow using the area over the tab portionMiklos Vajna1-3/+16
TabOverMargin in general is about allowing the cursor to jump over a margin if there is an explicit tab stop there. A corner-case is what to do when there is enough content so a line break is necessary for the characters after the tab portion. Allow using the area up to the edge of the whole text frame (i.e. over the tab position), this matches what Word does. (cherry picked from commit 4b345f95ce7cb09011892bf465cfdf3811adaf8e) Conflicts: sw/qa/extras/layout/layout.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/xmldump.cxx [ Just the sw layout xml dump part. ] Change-Id: Ie86edf030d54fba556eee26e7ea563fb8d4fbee4
2020-05-18tdf#90069 DOCX: fix character style of new table rowsLászló Németh3-0/+46
DOCX table import didn't set paragraph level character styles on paragraph level, only on text portions, resulting default character style in the newly inserted table rows instead of copying the style of the previous table row. (cherry picked from commit 2ab481b038b62b1ff576ac4d49d03c1798cd7f84) Conflicts: sw/qa/extras/uiwriter/uiwriter2.cxx Change-Id: Idb4438c767bdc7e0026fc6e0f0a795d8efdda3c8
2020-05-18tdf#126723 writerfilter::finishParagraph - me, not previousJustin Luth3-9/+15
In LO 6.2 commit 480ac84f2f5049fb4337b36f12fd6796e005761b the existing m_xPreviousParagraph was conveniently used to apply the changed properties. I never did like that choice, but despite looking at it, I failed to see that it is set in an inside loop, which means that it was NOT NECESSARILY reset to the current paragaph. So I'm happy to have proof that we should not use m_xPreviousParagraph. (cherry picked from commit 4c096b7e75a3c47abe4b3eb41183c133cb4cb441) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport13.cxx Change-Id: I5c7f1b0f097711d65ae0d0be1f0fbc40c8b96e9d
2020-05-18tdf#119188 DOCX import: fix zero margins of numbered lines in cellsLászló Németh3-3/+23
regression from 5c6bce38a01b21403a603acd3148cf3bbb4c685f (tdf#104354 DOCX import: fix paragraph auto spacing in tables). (cherry picked from commit 5e2caf236091c71b2148970eba36b22655d8845a) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: I486d155eb4463599ab922837fd2f4347b48e0851
2020-05-18tdf#118521 writerfilter: ContextMargin grouped with Top/BottomJustin Luth3-19/+45
fixes tdf#104348, but tagging with the bug# of the initial fixes. Internally, EditEng holds Top/Bottom/Context settings in one object, so if only one piece is set, the cloned object starts with docDefaults, so the un-initialized parts also need to be specified with the values they inherit from their style. So this patch makes two corrections. The first is grouping ContextMargin with top/bottom. The second correction is to check the entire style-chain instead of only the direct style for the inherited property. Change-Id: Ie1d4c9538aefece4ff8b7287242c7f4d33319b3b Reviewed-on: https://gerrit.libreoffice.org/57914 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 07266e2314fd19dcbf777dadd52d7b826b23c207)
2020-05-18tdf#118521 DOCX import: style sets unset left/right/hanging marginJustin Luth3-19/+57
followup to commit 480ac84f2f5049fb4337b36f12fd6796e005761b which nicely paved the way by doing this for top/bottom. (cherry picked from commit eab67995d7056682c250efa3c903b1fffd812700) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: I61b4e298e8732391b4f0467b459d9c15298925fa
2020-05-18tdf#118521 DOCX import: fix paragraph margin from paragraph styleLászló Németh1-0/+25
when the other (top or bottom) margin was set by direct formatting. Change-Id: Ic4038397329374fb2d6cf974751310f7dd8e8b31 Reviewed-on: https://gerrit.libreoffice.org/57585 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit dc0300eac3b755bc207cd1fe87217f4ebaeb9f58)
2020-05-18tdf#117504 ooxmlimport: check paragraph props for actual styleJustin Luth4-2/+19
m_sCurrentParaStyleName sounds like a nice idea, and has been around since the initial fork, but by the time finishParagraph() rolls around, the chances that it is still accurate are rather low. Anything that contains a paragraph (like comments, textboxes, shapes, tables, flys etc) might have modified that value. This fix queries the current paragraph itself to see if PROP_PARA_STYLE_NAME is set, which it typically is by lcl_startParagraphGroup() except when IsInShape(). If it isn't specified, then fallback to the previous result, which still may not be accurate, but at least it won't be a regression. It is too late in the development cycle to look into fully eliminating m_sCurrentParaStyleName. I hope to investigate that in the 6.2 development cycle. (cherry picked from commit 8920d865ee148518bf71f71ce1866b24cc17c07e) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport12.cxx Change-Id: I124688d864f553dd5778b3593f511cc41d31c262
2020-05-18writerfilter NFC: save ConvertedParaStyleName, not WW8NameJustin Luth3-11/+10
and rename m_sCurrentParaStyleId -> m_sCurrentParaStyleName This is prep work for tdf#117504, where the value saved in m_sCurrentParaStyleId is not accurate. Since the actual value saved inside the paragraph properties is the ConvertStyleName(), lets use the LO-version of the style name, so that FindStyleSheetByConvertedStyleName() can be used for either the paragraph's PropertyValue or m_pImpl->m_sCurrentParaStyleName. Change-Id: I8aed80094417ea91f2515e666dc05ecbb021a128 Reviewed-on: https://gerrit.libreoffice.org/54084 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 36839898fadddee155fb73e70d16e1eea4f5f9f0)
2020-05-18writerfilter: move TopContextType==Para requirementJustin Luth1-2/+4
This is prep work for tdf#95377. I need this function to run when there is no TopContext. This function doesn't do anything with the context, so in that regard I wonder if it is even necessary? My guess would be that it is a leftover piece from discovering the fix for n75883. However, to avoid causing a regression, I'm just pulling this test into the calling functions. (Of the three instances calling this function, two need to be contextless..) This is not truly NFC because if the followup patch is reverted, then this one will cause a change. But that is actually OK, because if my follow-up patch breaks because of these two functions changing to become contextless, then I'll be better able to pin-point the reason for the regression. Original commit adding this function was commit 2123ede032ca64f696ef54af4ad3238974ca2b5d Change-Id: I471aa852aa48527d69e0343a2ac28fa6e8acb209 Reviewed-on: https://gerrit.libreoffice.org/48062 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 254c80037a3939c110d5c66fef6c28caf47625e5)
2020-05-18tdf#95377 ooxmlimport: treat default style like named stylesJustin Luth3-75/+85
The default style was missing out on all of the fixes made by LN_CT_PPrBase_pStyle. That included right margins, and numbering styles. Essentially, this change is just copy and paste from one function to another. I tried to make all of the logic changes separately in previous commits. So the adjustments here are simply to accommodate different variable/function names. So if this causes any regressions, it ought to just be related to either applying later on (at finishparagraph instead of LN_CT_PPrBase_pStyle or because it includes the default style. One important note regards the preparatory commit 254c80037a3939c110d5c66fef6c28caf47625e5. If this commit is reverted, make sure to check that commit to add a conditional wrappers around GetCurrentNumberingRules(). (cherry picked from commit cc1c9c7484d97167021301f32c3397124c4d79f5) Conflicts: writerfilter/source/dmapper/DomainMapper.cxx Change-Id: I9827b2cd1a74a13cf18ada9baa221c5c567a7391
2020-05-18tdf#76817 ooxmlimport: connect Heading to existing numbersJustin Luth5-5/+7
This fixes the inability to insert a numbered Heading into an existing sequence in an opened document. Before it would start a new sequence, but now it connects to / adjusts the other numbered Headings. LibreOffice has built-in handling for "Chapter Numbering". All of the formatting for this is tied to the paragraph stylename. Since MSO has a different structure, in docx format these are defined as "regular" styles with an OutlineLvl component. During import, that style information was copied to LO's special Outline chapter numbering style. *From this point on, the "regular" list style should no longer be referred to.* Numbering is only defined by the paragraph stylename (which by definition is "Heading X"). The unit test I am hijacking has an unchangeable Paragraph Numbering style of "Outline Numbering" and not WWNumX. So, in reality the document ought to require the style name to be the internal Outline style like it originally was. A followup patch allows this to round-trip. Change-Id: If5d544529fa32d4abaa2b46403bc61c028e53f21 Reviewed-on: https://gerrit.libreoffice.org/47827 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 7201d157a2ff2f0a8b6bb8fa57e31871187cbc81)
2020-05-18ooxmlimport: support inherited listidJustin Luth5-46/+74
This is prep work for tdf#95377. This unit test avoids the unique chapter-numbering style (from the heading paragraph styles) and just has a basic, user-created style inheriting from Default. Also unique about this unit test is that the numbering is specified by the "Default Style" which takes a rather unique code path and exposes even more problems. We already know the listId through a recursive function, and GetCurrentNumberingRules only looks at the current style which isn't good enough. Moved that modified function into DomainMapper_Impl since I will need it there for bug 95377. Additionally, ensure that directly applied paragraph properties are not overwritten. That also meant changing the order, so that paraStyle properties are directly applied to the paragraph before applying RightMargin and friends. Change-Id: I5c1fb71d64727be9d9105f287150daf4e0ff413d Reviewed-on: https://gerrit.libreoffice.org/48457 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 8fd13c356d78fb72ba5dd288a495551f23e15363)
2020-05-18writerfilter: use WW8 name for StyleIdJustin Luth1-3/+2
The sStyleIdentifierD for the default style is "Normal". FindStyleSheetByISTD uses sStyleIndentifierD for its comparison. SetCurrentParaStyleId() is used to save the WW8 provided name. Thus, the default style should do the same. The SetCurrentParaStyleId was added here by commit 4abb20ee162ff874cc143fd952f72d30ddc9d136 Author: Miklos Vajna Date: Tue Jun 19 17:36:28 2012 +0200 Also removing the static variable, since it serves no purpose. Change-Id: I58659e9d809c32dd799fb46217971707991b2803 Reviewed-on: https://gerrit.libreoffice.org/48034 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 9dfd46ef4b341a5dfed7d320696959402a549fdb)
2020-05-18tdf#104354 DOCX import: fix paragraph auto spacing in tablesLászló Németh5-4/+126
Top margin of first paragraph of a table cell with auto spacing, and bottom margin of last paragraph of a table cell with auto spacing are zero (except in numbered last paragraphs), but LibreOffice set 14pt instead of them, resulting much longer tables. Following cases needed special handling: - auto spacing in style - direct top and bottom auto spacing - direct top and bottom margins - footnotes in cell paragraphs Change-Id: I462847616dd43b4ba30fae2c4eb99abb49bfb9a3 Reviewed-on: https://gerrit.libreoffice.org/57352 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 5c6bce38a01b21403a603acd3148cf3bbb4c685f)
2020-05-18tdf#106062 ooxmlimport: skip fake tab only on hanging indentJustin Luth5-17/+33
Export has changed, so that it only exports a tab when the footnote paragraph has a hanging indent. Adjusting the import code to match that change. Please test with MSO before flagging this patch as a regression. Certainly there will be some documents previously saved by LO which will now, in LO, show an extra tab character after the footnote. Any previously saved document without a hanging indent will display this extra tab. However, MSO has always seen that extra tab, so these patches are enhancing compatibility. This patch corrects several incorrect assumptions: -The paragraph style is not necessarily "Footnote". -The paragraph may have directly defined a hanging margin. -An aesthetic tab is needed on a hanging indent, not a defined margin. (cherry picked from commit 946fee3ef1e319ad63a599b72dbd55ef52cbc640) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: Ieaa76448ce202d92efdb8d1fc04ba2674ed120ba
2020-05-18tdf#106062 ooxmlexport: hanging indent ? aesthetic tab : noJustin Luth2-7/+13
By default, LO footnote paragraph style has a hanging indent of .60cm. In LO footnotes, the footnote character starts at the hanging indent (position 0) and the footnote text "magically" starts at the left margin. MSO doesn't do any magical formatting so exporting emulates that by inserting a tab after the footnote character. However, that aethetic tab was being inserted after EVERY footnote character, regardless of whether the emulation was needed or not. That particularly caused problems when the document was originally authored by MSO, which typically has no margin or first line indent. In those cases, the document is altered by gaining undesirable extra space. Since the emulation is only of value with a hanging indent that is larger than the footnote character, only add the tab when a hanging indent exists. (Checking the size of the hanging indent could improve this even more, but measuring font size etc adds too much complexity.) The import code also knows about the fake tab and removes it. Follow-up patches will change the import to ONLY remove the fake tab if there is a hanging indent. (That is going to cause "regressions" because tabs from some previously saved documents will now show the "aesthetic tab" - just like MSO does.) Change-Id: I371da3f2b09f600f027377a36583f91b39425151 Reviewed-on: https://gerrit.libreoffice.org/52171 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 818619b0f2f7813decb26d0b14362dec76a8ff37)
2020-05-18tdf#112886 ooxmlimport: skip useless footnote placeholderJustin Luth3-6/+3
Inserting the 0x02 placeholder as the first entry in the line interferes with the aesthetic tab code. lcl_text has code to ignore that placeholder, but lcl_utext doesn't. Ignoring at lcl_utext has the same affect as not processing it at all. Only .docx adds 0x02, so it should be fairly safe to avoid the 0x02 completely. Nothing was detected missing by skipping the placeholder. All of the code was inherited from OOo. Change-Id: Ie8840e5946fec89f270fef5523c88ee5051ca8ef Reviewed-on: https://gerrit.libreoffice.org/51912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 3138abfb052a4241cfca4b8d430c139cca50a85c)
2020-05-18tdf93121 MS export: only one fake tab per footnoteJustin Luth4-1/+21
Every paragraph was getting the fake tab added. The fake tab is only inserted by LO in order to emulate the spacing between the footnote character and the footnote paragraph, so it is not desirable to insert it before additional paragraphs. The fake tab is also only removed once per footnote during the import process, so this fake tab was altering the document during the first round-trip. (cherry picked from commit add7a962bc33b3c1f2252a9920bebf324df688de) Conflicts: sw/source/filter/ww8/wrtww8.cxx Change-Id: Ia54cea1b04c747a021032f46f22b673fe6658995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94324 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>