[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 31 commits - connectivity/registry cppcanvas/source distro-configs/LibreOfficeFlatpak.conf download.lst drawinglayer/source external/poppler extras/source include/vcl oox/source readlicense_oo/license RepositoryExternal.mk sal/osl sal/rtl sc/inc sc/qa scripting/java sc/source sd/qa sd/source solenv/flatpak-manifest.in svx/source sw/qa sw/source sw/uiconfig vcl/Executable_icontest.mk vcl/inc vcl/qa vcl/source vcl/unx writerfilter/source xmlsecurity/source
Stephan Bergmann
sbergman at redhat.com
Wed Jun 27 05:57:10 UTC 2018
RepositoryExternal.mk | 6
connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu | 15
cppcanvas/source/mtfrenderer/emfplus.cxx | 2
cppcanvas/source/mtfrenderer/implrenderer.cxx | 6
cppcanvas/source/mtfrenderer/textaction.cxx | 131
cppcanvas/source/mtfrenderer/textaction.hxx | 1
distro-configs/LibreOfficeFlatpak.conf | 5
download.lst | 4
drawinglayer/source/tools/emfphelperdata.cxx | 2
external/poppler/0001-Fix-building-with-old-clang.patch.1 | 25
external/poppler/ExternalProject_poppler.mk | 51
external/poppler/Module_poppler.mk | 2
external/poppler/StaticLibrary_poppler.mk | 144
external/poppler/UnpackedTarball_poppler.mk | 6
external/poppler/poppler-config.patch.1 | 484 +
external/poppler/poppler-libjpeg.patch.1 | 23
external/poppler/poppler-mac-fake.patch.1 | 13
external/poppler/poppler-notests.patch.1 | 11
external/poppler/ubsan.patch.0 | 230
extras/source/templates/offimisc/Businesscard-with-logo.ott |binary
include/vcl/gfxlink.hxx | 1
include/vcl/graphicfilter.hxx | 4
oox/source/drawingml/table/tablecell.cxx | 3
readlicense_oo/license/CREDITS.fodt | 3391 +++++-----
sal/osl/unx/signal.cxx | 5
sal/rtl/math.cxx | 2
sc/inc/column.hxx | 6
sc/qa/unit/subsequent_export-test.cxx | 4
sc/source/core/data/column.cxx | 2
sc/source/core/data/column3.cxx | 14
sc/source/core/data/formulacell.cxx | 2
sc/source/core/tool/interpr6.cxx | 2
sc/source/filter/html/htmlimp.cxx | 2
sc/source/ui/dbgui/PivotLayoutDialog.cxx | 2
sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 22
sc/source/ui/inc/PivotLayoutDialog.hxx | 2
sc/source/ui/inc/PivotLayoutTreeListBase.hxx | 3
scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java | 4
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java | 5
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptProviderForBeanShell.java | 3
scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java | 3
sd/qa/unit/import-tests.cxx | 2
sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx | 4
solenv/flatpak-manifest.in | 21
svx/source/xml/xmlgrhlp.cxx | 7
sw/qa/extras/ooxmlimport/data/tdf117843.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12
sw/source/core/layout/frmtool.cxx | 3
sw/source/filter/ww8/rtfattributeoutput.cxx | 19
sw/source/ui/frmdlg/cption.cxx | 2
sw/uiconfig/swriter/ui/mmresultprintdialog.ui | 18
vcl/Executable_icontest.mk | 6
vcl/inc/unx/gtk/gtkinst.hxx | 2
vcl/qa/cppunit/jpeg/JpegReaderTest.cxx | 31
vcl/source/filter/graphicfilter2.cxx | 2
vcl/source/gdi/gfxlink.cxx | 16
vcl/source/gdi/pdfextoutdevdata.cxx | 9
vcl/source/outdev/text.cxx | 5
vcl/unx/gtk/gtkinst.cxx | 9
vcl/unx/gtk/gtksalframe.cxx | 2
vcl/unx/gtk3/gtk3gtkframe.cxx | 2
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 4
xmlsecurity/source/xmlsec/xmlstreamio.cxx | 51
63 files changed, 2725 insertions(+), 2145 deletions(-)
New commits:
commit 240429f38db2ba4348f8d3abde1b227116555e69
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jun 25 13:16:06 2018 +0200
Just use --with-extra-buildid=Flatpak
...as suggested in comment <https://github.com/flathub/
org.libreoffice.LibreOffice/issues/48#issuecomment-399739393> to "LibreOffice
6.0.5": "Should 'Flatpak version' be just 'Flatpak' to save translation of
'version' in the string for non-English locales?"
Change-Id: I53171a5725f54520ae9e3cbaf294e291d16e1c78
Reviewed-on: https://gerrit.libreoffice.org/56390
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 3a8ae607cb0e63f252ca5a3b224f479cf304dc3f)
Reviewed-on: https://gerrit.libreoffice.org/56404
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit fa465508dfa98eff7fe6f9aacbb75d3fd2fb6eac)
diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf
index 2e4553e0a022..0f1ff3312ab8 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -2,7 +2,7 @@
--disable-odk
--enable-release-build
--with-ant-home=/run/build/libreoffice/ant
---with-extra-buildid=Flatpak version
+--with-extra-buildid=Flatpak
--with-jdk-home=/usr/lib/sdk/openjdk10/jvm/openjdk-10
--with-lang=ALL
--with-system-libs
commit 1d804d47a6d28f5e55fc74fe206f8c9425d4443f
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Fri Jun 22 14:40:13 2018 +0200
tdf#118316: fix off-by-1 error (outline level is 0-based)
regression since commit 4730b23b1da929b802d527611e974ff1b1e6d6c5
Change-Id: I50627cde3a9a91189db61e19850768412b058064
Reviewed-on: https://gerrit.libreoffice.org/56295
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 28f45e406da9ca2c87d1e4285b0138c081125ec8)
Reviewed-on: https://gerrit.libreoffice.org/56308
(cherry picked from commit 9f836f9bcebba4f47d427cc3343ff59956dfa721)
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index d8bc996a03ce..62e7e5942161 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -365,7 +365,7 @@ void SwCaptionDialog::DrawSample()
if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
{
SwNumberTree::tNumberVector aNumVector;
- aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl(), 1);
+ aNumVector.insert(aNumVector.end(), pFieldType->GetOutlineLvl() + 1, 1);
OUString sNumber( rSh.GetOutlineNumRule()->
MakeNumString(aNumVector, false ));
commit 409f204caeb398847dba75ec3680b53602d25dfc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Jun 5 09:43:49 2018 +0200
tdf#117843 DOCX import: disable compat increased spacing in header/footer
It's only relevant for the body text.
(cherry picked from commit 09a37fe50f36ced755bc326fb6b4c1b6fdf61f86)
Reviewed-on: https://gerrit.libreoffice.org/55335
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit eb65a8c54f56abc8ba66f9cbc779cd20e4740933)
Change-Id: Id894604ed9b2c19400eeabbd2966f104d8b34aab
Reviewed-on: https://gerrit.libreoffice.org/56053
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea at collabora.com>
(cherry picked from commit 6dcf475d5cda984ce0d1035e36267cedc3019e50)
diff --git a/sw/qa/extras/ooxmlimport/data/tdf117843.docx b/sw/qa/extras/ooxmlimport/data/tdf117843.docx
new file mode 100644
index 000000000000..501e85bfef96
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf117843.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 22bf0b01f752..e6f3a150b31f 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1608,6 +1608,18 @@ DECLARE_OOXMLIMPORT_TEST(testTdf116486, "tdf116486.docx")
CPPUNIT_ASSERT_EQUAL( OUString("4006"), aTop );
}
+DECLARE_OOXMLIMPORT_TEST(testTdf117843, "tdf117843.docx")
+{
+ uno::Reference<container::XNameAccess> xPageStyles = getStyles("PageStyles");
+ uno::Reference<style::XStyle> xPageStyle(xPageStyles->getByName("Standard"), uno::UNO_QUERY);
+ uno::Reference<text::XText> xHeaderText
+ = getProperty<uno::Reference<text::XText>>(xPageStyle, "HeaderText");
+ // This was 4025, increased top paragraph margin was unexpected.
+ CPPUNIT_ASSERT_EQUAL(
+ static_cast<sal_Int32>(0),
+ getProperty<sal_Int32>(getParagraphOfText(1, xHeaderText), "ParaTopMargin"));
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b5ec69a98304..f65d2166cc01 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1258,9 +1258,11 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
xTextRange = xTextAppend->finishParagraph( comphelper::containerToSequence(aProperties) );
m_xPreviousParagraph.set(xTextRange, uno::UNO_QUERY);
- if (!rAppendContext.m_aAnchoredObjects.empty())
+ if (!rAppendContext.m_aAnchoredObjects.empty() && !IsInHeaderFooter())
{
// Remember what objects are anchored to this paragraph.
+ // That list is only used for Word compat purposes, and
+ // it is only relevant for body text.
AnchoredObjectInfo aInfo;
aInfo.m_xParagraph = xTextRange;
aInfo.m_aAnchoredObjects = rAppendContext.m_aAnchoredObjects;
commit 4ffc53ee9aac5c5db31ef959c13ddaa00a2c3a5d
Author: Michael Stahl <Michael.Stahl at cib.de>
Date: Fri Jun 22 10:44:02 2018 +0200
poppler: try to work around GCC 4.8.2 bug
As seen on Linux-rpm_deb-x86 at 71-TDF:
poppler/Annot.cc:2491:1: internal compiler error: in connect_traces, at dwarf2cfi.c:2676
The bug report claims that -march=i586 works around the bug.
(cherry picked from commit 1c7921c43960a4a6717c816d646cf0f65fbaec12)
Reviewed-on: https://gerrit.libreoffice.org/56292
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit dce6401f7e1f466c30996ad606699479713209e5)
poppler: fix incorrect GCC_VERSION check
The minor version is encoded into the last 2 digits, the micro version
is not avialable.
Reviewed-on: https://gerrit.libreoffice.org/56380
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Jenkins
Change-Id: I1d97d2df9049e058d49987424cc8e4818a9fa9c6
Reviewed-on: https://gerrit.libreoffice.org/56298
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Jenkins
(cherry picked from commit 08f77bc1c6650ee7b2dd9d7825bbc1cf08d4761b)
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 84873d9c7c2a..f145b7ae9c39 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -33,6 +33,22 @@ $(eval $(call gb_StaticLibrary_add_cxxflags,poppler,\
))
endif
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864
+# can't easily check for 4.8.2 exactly so just apply to GCC 4.8.x
+ifeq ($(COM),GCC)
+ifeq ($(COM_IS_CLANG),)
+ifeq ($(CPUNAME),INTEL)
+ifeq ($(shell expr '$(GCC_VERSION)' '<' 409),1)
+ifeq ($(shell expr '$(GCC_VERSION)' '>=' 408),1)
+$(eval $(call gb_StaticLibrary_add_cxxflags,poppler,\
+ -march=i586 \
+))
+endif
+endif
+endif
+endif
+endif
+
$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,poppler,cc))
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
commit 68cf249043de1417a8e1ccea29b3c9c2895d512f
Author: László Németh <nemeth at numbertext.org>
Date: Mon Jun 18 16:48:02 2018 +0200
tdf#103913 keep ".emf" file extension and mime type
in documents, don't change them to wmf and image/x-wmf
silently, resulting for example, dropping or rejecting
modified documents by firewall packet filtering.
Reviewed-on: https://gerrit.libreoffice.org/56045
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
Conflicts:
svx/source/xml/xmlgrhlp.cxx
(cherry-pick from commit 4cb1e86e5217f09e1d98e51e46803a06fb72f5ce)
Change-Id: I3b8634ae022c7c026b0ed4ebc345c1c3b3f96337
Reviewed-on: https://gerrit.libreoffice.org/56084
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <kelemeng at ubuntu.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit c959815d55919967c9697dc8862ddec6844b7796)
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 2d84fd293e4f..473acd9265f7 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -111,6 +111,7 @@ public:
void SwapIn();
bool IsSwappedOut() const { return( bool(mpSwapOutData) ); }
+ bool IsEMF() const; // WMF & EMF stored under the same type (NativeWmf)
public:
friend VCL_DLLPUBLIC SvStream& WriteGfxLink( SvStream& rOStream, const GfxLink& rGfxLink );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index b04af09f9734..64c272bbbe72 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -675,7 +675,12 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
case GfxLinkType::NativeJpg: aExtension = ".jpg"; break;
case GfxLinkType::NativePng: aExtension = ".png"; break;
case GfxLinkType::NativeTif: aExtension = ".tif"; break;
- case GfxLinkType::NativeWmf: aExtension = ".wmf"; break;
+ case GfxLinkType::NativeWmf:
+ if (aGfxLink.IsEMF())
+ aExtension = ".emf";
+ else
+ aExtension = ".wmf";
+ break;
case GfxLinkType::NativeMet: aExtension = ".met"; break;
case GfxLinkType::NativePct: aExtension = ".pct"; break;
case GfxLinkType::NativeSvg:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index ca1097eccb12..93776963dadb 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3768,21 +3768,6 @@ void RtfAttributeOutput::FontPitchType(FontPitch ePitch) const
m_rExport.OutULong(nVal);
}
-static bool IsEMF(const sal_uInt8* pGraphicAry, unsigned long nSize)
-{
- if (pGraphicAry && (nSize > 0x2c))
- {
- // check the magic number
- if ((pGraphicAry[0x28] == 0x20) && (pGraphicAry[0x29] == 0x45)
- && (pGraphicAry[0x2a] == 0x4d) && (pGraphicAry[0x2b] == 0x46))
- {
- //emf detected
- return true;
- }
- }
- return false;
-}
-
static bool StripMetafileHeader(const sal_uInt8*& rpGraphicAry, unsigned long& rSize)
{
if (rpGraphicAry && (rSize > 0x22))
@@ -4048,8 +4033,8 @@ void RtfAttributeOutput::FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat
pBLIPType = OOO_STRING_SVTOOLS_RTF_PNGBLIP;
break;
case GfxLinkType::NativeWmf:
- pBLIPType = IsEMF(pGraphicAry, nSize) ? OOO_STRING_SVTOOLS_RTF_EMFBLIP
- : OOO_STRING_SVTOOLS_RTF_WMETAFILE;
+ pBLIPType = aGraphicLink.IsEMF() ? OOO_STRING_SVTOOLS_RTF_EMFBLIP
+ : OOO_STRING_SVTOOLS_RTF_WMETAFILE;
break;
case GfxLinkType::NativeGif:
// GIF is not supported by RTF, but we override default conversion to WMF, PNG seems fits better here.
diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx
index a7a33ad1c862..c1acb0a60957 100644
--- a/vcl/source/gdi/gfxlink.cxx
+++ b/vcl/source/gdi/gfxlink.cxx
@@ -277,4 +277,20 @@ std::shared_ptr<sal_uInt8> GfxLink::GetSwapInData() const
return pData;
}
+bool GfxLink::IsEMF() const
+{
+ const sal_uInt8* pGraphicAry = GetData();
+ if ((GetType() == GfxLinkType::NativeWmf) && pGraphicAry && (GetDataSize() > 0x2c))
+ {
+ // check the magic number
+ if ((pGraphicAry[0x28] == 0x20) && (pGraphicAry[0x29] == 0x45)
+ && (pGraphicAry[0x2a] == 0x4d) && (pGraphicAry[0x2b] == 0x46))
+ {
+ //emf detected
+ return true;
+ }
+ }
+ return false;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit a0e375b8c3e0b765d082efe8af23c6b231c6f3d6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jun 6 10:48:27 2018 +0200
Update Flatpak to OpenJDK10
see <https://github.com/flathub/org.libreoffice.LibreOffice/issues/42>
"OpenJDK 10 is now available".
Change-Id: Iaae9d22d91d984a5c11eee26bd05ab7d328d7a5b
Reviewed-on: https://gerrit.libreoffice.org/55422
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 930cb22f75c672c2fa3a4153094df4dd3a71cb7f)
Reviewed-on: https://gerrit.libreoffice.org/55429
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit e0287fcde646c1f6377f3ae9babe7b5155780282)
diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf
index 7fc1fbca36ea..2e4553e0a022 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -3,7 +3,7 @@
--enable-release-build
--with-ant-home=/run/build/libreoffice/ant
--with-extra-buildid=Flatpak version
---with-jdk-home=/usr/lib/sdk/openjdk9/jvm/openjdk-9
+--with-jdk-home=/usr/lib/sdk/openjdk10/jvm/openjdk-10
--with-lang=ALL
--with-system-libs
--with-vendor=The Document Foundation
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index a8ed8895462c..7adaa1bbd83a 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -5,7 +5,7 @@
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.gcc7",
- "org.freedesktop.Sdk.Extension.openjdk9"
+ "org.freedesktop.Sdk.Extension.openjdk10"
],
"build-options": {
"append-ld-library-path": "/usr/lib/sdk/gcc7/lib",
@@ -28,7 +28,7 @@
"name": "openjdk",
"buildsystem": "simple",
"build-commands": [
- "/usr/lib/sdk/openjdk9/install.sh"
+ "/usr/lib/sdk/openjdk10/install.sh"
]
},
{
commit eacb8b0bf4fd82b3cc1f392ae91dbe5dbe2b89b0
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 21 12:43:46 2018 +0200
Don't reset signal that hasn't been set
Once an in-process JVM is instantiated, it is vital that the disposition for
SIGSEGV is not changed afterwards, as we do not make use of Java's libjsig.so
(cf. <https://docs.oracle.com/javase/8/docs/technotes/guides/vm/
signal-chaining.html>) in our processes.
I observed sporadic SIGSEGV crashes of CppunitTest_dbaccess_RowSetClones on a
64-core aarch64 machine (see comment at <https://github.com/flathub/
org.libreoffice.LibreOffice/issues/42#issuecomment-395731088> "OpenJDK 10 is now
available"). What apparently happenes is that the cppunittester process first
sets up its signal handlers through vclbootstrapprotector, which doesn't set one
for SIGSEGV because bSetSEGVHandler is false in sal/osl/unx/signal.cxx because
!is_soffice_Impl(). Then later when the in-process JVM is instantiated it sets
its handlers, including a SIGSEGV one. Towards the end of the process,
DeInitVCL calls osl_removeSignalHandler calls onDeInitSignal, which erroneously
resets the SIGSEGV handler because it doesn't honor bSetSEGVHandler. But it
can apparently happen that JVM threads are still running at that time and are
executing JIT'ed code that can cause SIGSEGV that relies on the JVM's handler
being installed, which it no longer is.
(This can probably also happen for soffice.bin itself, where bSetSEGVHandler
will be true. That will need a different, follow-up fix.)
Change-Id: Ib6d99c23e57daa0b7576964908aadff511f2bb21
Reviewed-on: https://gerrit.libreoffice.org/56232
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
(cherry picked from commit 6417e8cda329116f0d61e0d5e55fa78207b6148c)
Reviewed-on: https://gerrit.libreoffice.org/56243
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit c5d60985afcf834793684ae553c35e20484899b3)
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 9a528fec327a..a96808574c2a 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -315,7 +315,10 @@ bool onDeInitSignal()
/* Initialize the rest of the signals */
for (int i = NoSignals - 1; i >= 0; i--)
- if (Signals[i].Action != ACT_SYSTEM)
+ if (Signals[i].Action != ACT_SYSTEM
+ && ((bSetSEGVHandler || Signals[i].Signal != SIGSEGV)
+ && (bSetWINCHHandler || Signals[i].Signal != SIGWINCH)
+ && (bSetILLHandler || Signals[i].Signal != SIGILL)))
{
if (Signals[i].siginfo) {
act.sa_sigaction = reinterpret_cast<Handler2>(
commit 9e5a9f8f25f7e836da5f540709643e46c8f95641
Author: Justin Luth <justin.luth at collabora.com>
Date: Sat Jun 2 14:57:47 2018 +0300
tdf#104199 sd: nofill borders shouldn't be visible.
regression from export bugfix tdf#90190.
rLineProperties.maLineFill was set, but that value was
never used, leaving aBorderLine with the default value.
Setting borderline to COL_AUTO lets it merge in with background
colors while still taking up the space defined by the border width.
The existing unit test says "it is likely you will break
this if fixing background issues, so feel free to adjust the
test values." Indeed, this patch removes an unwanted black border,
so utilizing that test as a proof.
Change-Id: I0725a3d5874a509a4464c586d60c77cde2b49fcb
Reviewed-on: https://gerrit.libreoffice.org/55205
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Justin Luth <justin_luth at sil.org>
(cherry picked from commit 76505bbd862b17b9b02a2d6e68bac308890dec70)
Reviewed-on: https://gerrit.libreoffice.org/55777
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
(cherry picked from commit 552b3fa548e19436af24f4b413e34b2f15100718)
Reviewed-on: https://gerrit.libreoffice.org/55883
(cherry picked from commit 05021abd97316fe3d188cd9f15c44db2170927d7)
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 36751930d59a..0630d2ffca5d 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -85,8 +85,7 @@ void applyLineAttributes( const ::oox::core::XmlFilterBase& rFilterBase,
}
else if ( rLineProperties.moLineWidth.get(0)!=0 )
{
- // Default color of Line is black.
- rLineProperties.maLineFill.maFillColor.setSrgbClr( 0 );
+ aBorderLine.Color = sal_Int32( COL_AUTO );
aBorderLine.OuterLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
aBorderLine.InnerLineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 4 );
aBorderLine.LineWidth = static_cast< sal_Int16 >( GetCoordinate( rLineProperties.moLineWidth.get( 0 ) ) / 2 );
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 95fb428cfd1b..d8e2245a02b5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -900,7 +900,7 @@ void SdImportTest::testBnc480256()
xCell.set(xTable->getCellByPosition(1, 0), uno::UNO_QUERY_THROW);
xCell->getPropertyValue("BottomBorder") >>= aBorderLine;
- CPPUNIT_ASSERT_EQUAL(util::Color(0), aBorderLine.Color);
+ CPPUNIT_ASSERT_EQUAL(util::Color(COL_AUTO), aBorderLine.Color);
xDocShRef->DoClose();
}
commit 7cf1553c630037ce0fb765f0ec3d4253b77d7934
Author: Michael Stahl <Michael.Stahl at cib.de>
Date: Wed Jun 20 16:10:44 2018 +0200
poppler: upgrade to release 0.66.0
Unfortunately the autotools build system was removed in 0.60.0, and the
CMake one is a bit overeager in linking against system libraries that
happen to be installed on the build machine, and we currently don't
require CMake anyway, so avoid the problems by using a gbuild makefile
and a patch to add the generated header files.
Remove all current patches:
poppler-notests.patch.1: obsolete (autotools build system)
poppler-mac-fake.patch.1: presumed obsolete
ubsan.patch.0: presumably fixed differently upstream in
https://cgit.freedesktop.org/poppler/poppler/commit/?id=f43cb73939f85952d83afc87a6dc638dc1ae311b
poppler-libjpeg.patch.1: obsolete (autotools build system; there appears
to be no way to do this with CMake?)
0001-Fix-building-with-old-clang.patch.1: merged upstream
Change-Id: I271c87ab3ec25cc9d1e8fafb04dae7c004acc350
Reviewed-on: https://gerrit.libreoffice.org/56166
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 67e5355a8b0d51111934e0a0c30870b053c8e0d3)
Reviewed-on: https://gerrit.libreoffice.org/56235
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit b893993869e720bbc078324c201ad9a3be8c0749)
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 0efc07415413..22f1412191e7 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -2777,11 +2777,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
)
-$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,poppler)/fofi/.libs/libfofi$(gb_StaticLibrary_PLAINEXT) \
- $(call gb_UnpackedTarball_get_dir,poppler)/goo/.libs/libgoo$(gb_StaticLibrary_PLAINEXT) \
- $(call gb_UnpackedTarball_get_dir,poppler)/poppler/.libs/libpoppler$(gb_StaticLibrary_PLAINEXT) \
-)
+$(call gb_LinkTarget_use_static_libraries,$(1),poppler)
$(call gb_LinkTarget_use_external,$(1),libjpeg)
diff --git a/download.lst b/download.lst
index 6bcc3d59974c..3db3fe1cdd97 100644
--- a/download.lst
+++ b/download.lst
@@ -222,8 +222,8 @@ export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
export LIBPNG_SHA256SUM := 2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
export LIBPNG_TARBALL := libpng-1.6.34.tar.xz
-export POPPLER_SHA256SUM := a3d626b24cd14efa9864e12584b22c9c32f51c46417d7c10ca17651f297c9641
-export POPPLER_TARBALL := poppler-0.59.0.tar.xz
+export POPPLER_SHA256SUM := 2c096431adfb74bc2f53be466889b7646e1b599f28fa036094f3f7235cc9eae7
+export POPPLER_TARBALL := poppler-0.66.0.tar.xz
export POSTGRESQL_SHA256SUM := db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461
export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
export PYTHON_SHA256SUM := 6ed87a8b6c758cc3299a8b433e8a9a9122054ad5bc8aad43299cff3a53d8ca44
diff --git a/external/poppler/0001-Fix-building-with-old-clang.patch.1 b/external/poppler/0001-Fix-building-with-old-clang.patch.1
deleted file mode 100644
index dcddd11d2967..000000000000
--- a/external/poppler/0001-Fix-building-with-old-clang.patch.1
+++ /dev/null
@@ -1,25 +0,0 @@
-From dd80c182cbcb188af0dd590f222ba9bbb31e3fb7 Mon Sep 17 00:00:00 2001
-From: Albert Astals Cid <aacid at kde.org>
-Date: Mon, 4 Sep 2017 19:36:06 +0200
-Subject: [PATCH] Fix building with old clang
-
----
- poppler/StructElement.cc | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/poppler/StructElement.cc b/poppler/StructElement.cc
-index 0fbd336a..451213f8 100644
---- a/poppler/StructElement.cc
-+++ b/poppler/StructElement.cc
-@@ -248,6 +248,8 @@ struct AttributeMapEntry {
- };
-
- struct AttributeDefaults {
-+ AttributeDefaults() {}; // needed to support old clang
-+
- Object Inline = Object(objName, "Inline");
- Object LrTb = Object(objName, "LrTb");
- Object Normal = Object(objName, "Normal");
---
-2.13.5
-
diff --git a/external/poppler/ExternalProject_poppler.mk b/external/poppler/ExternalProject_poppler.mk
deleted file mode 100644
index 61df84311fae..000000000000
--- a/external/poppler/ExternalProject_poppler.mk
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalProject_ExternalProject,poppler))
-
-$(eval $(call gb_ExternalProject_use_autoconf,poppler,build))
-
-$(eval $(call gb_ExternalProject_use_externals,poppler,\
- libjpeg \
-))
-
-$(eval $(call gb_ExternalProject_register_targets,poppler,\
- build \
-))
-
-$(call gb_ExternalProject_get_state_target,poppler,build) :
- $(call gb_ExternalProject_run,build,\
- $(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_VISIBILITY_FLAGS_CXX) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))") \
- MAKE=$(MAKE) PKG_CONFIG="" ./configure \
- --with-pic \
- --enable-static \
- --disable-shared \
- --enable-xpdf-headers \
- --disable-poppler-cpp \
- --enable-libopenjpeg=none \
- --disable-libtiff \
- --enable-libjpeg \
- --disable-libpng \
- --disable-zlib \
- --disable-libcurl \
- --disable-splash-output \
- --disable-cairo-output \
- --disable-poppler-glib \
- --disable-poppler-qt4 \
- --disable-poppler-qt5 \
- --disable-gtk-test \
- --disable-utils \
- --disable-cms \
- $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
- $(if $(filter WNT MACOSX,$(OS)),--with-font-configuration=win32,--with-font-configuration=fontconfig) \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- && $(MAKE) \
- )
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/Module_poppler.mk b/external/poppler/Module_poppler.mk
index 9e9f540531c2..ebae6e7aaddd 100644
--- a/external/poppler/Module_poppler.mk
+++ b/external/poppler/Module_poppler.mk
@@ -10,7 +10,7 @@
$(eval $(call gb_Module_Module,poppler))
$(eval $(call gb_Module_add_targets,poppler,\
- ExternalProject_poppler \
+ StaticLibrary_poppler \
UnpackedTarball_poppler \
))
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
new file mode 100644
index 000000000000..84873d9c7c2a
--- /dev/null
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -0,0 +1,128 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_StaticLibrary_StaticLibrary,poppler))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler))
+
+$(eval $(call gb_StaticLibrary_use_external,poppler,libjpeg))
+
+$(eval $(call gb_StaticLibrary_set_warnings_not_errors,poppler))
+
+$(eval $(call gb_StaticLibrary_set_include,poppler,\
+ -I$(WORKDIR)/UnpackedTarball/poppler \
+ -I$(WORKDIR)/UnpackedTarball/poppler/fofi \
+ -I$(WORKDIR)/UnpackedTarball/poppler/goo \
+ -I$(WORKDIR)/UnpackedTarball/poppler/poppler \
+ $$(INCLUDE) \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_defs,poppler,\
+ -DWIN32_LEAN_AND_MEAN \
+ -D_CRT_SECURE_NO_WARNINGS \
+))
+$(eval $(call gb_StaticLibrary_add_cxxflags,poppler,\
+ /Zc:wchar_t- \
+))
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,poppler,cc))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
+ UnpackedTarball/poppler/goo/gfile \
+ UnpackedTarball/poppler/goo/gmempp \
+ UnpackedTarball/poppler/goo/GooList \
+ UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/GooString \
+ UnpackedTarball/poppler/goo/gmem \
+ UnpackedTarball/poppler/goo/FixedPoint \
+ UnpackedTarball/poppler/goo/NetPBMWriter \
+ UnpackedTarball/poppler/goo/PNGWriter \
+ UnpackedTarball/poppler/goo/TiffWriter \
+ UnpackedTarball/poppler/goo/JpegWriter \
+ UnpackedTarball/poppler/goo/ImgWriter \
+ UnpackedTarball/poppler/goo/gstrtod \
+ UnpackedTarball/poppler/goo/grandom \
+ UnpackedTarball/poppler/goo/glibc \
+ UnpackedTarball/poppler/goo/glibc_strtok_r \
+ UnpackedTarball/poppler/fofi/FoFiBase \
+ UnpackedTarball/poppler/fofi/FoFiEncodings \
+ UnpackedTarball/poppler/fofi/FoFiTrueType \
+ UnpackedTarball/poppler/fofi/FoFiType1 \
+ UnpackedTarball/poppler/fofi/FoFiType1C \
+ UnpackedTarball/poppler/fofi/FoFiIdentifier \
+ UnpackedTarball/poppler/poppler/Annot \
+ UnpackedTarball/poppler/poppler/Array \
+ UnpackedTarball/poppler/poppler/BuiltinFont \
+ UnpackedTarball/poppler/poppler/BuiltinFontTables \
+ UnpackedTarball/poppler/poppler/CachedFile \
+ UnpackedTarball/poppler/poppler/Catalog \
+ UnpackedTarball/poppler/poppler/CharCodeToUnicode \
+ UnpackedTarball/poppler/poppler/CMap \
+ UnpackedTarball/poppler/poppler/DateInfo \
+ UnpackedTarball/poppler/poppler/Decrypt \
+ UnpackedTarball/poppler/poppler/Dict \
+ UnpackedTarball/poppler/poppler/Error \
+ UnpackedTarball/poppler/poppler/FileSpec \
+ UnpackedTarball/poppler/poppler/FontEncodingTables \
+ UnpackedTarball/poppler/poppler/Form \
+ UnpackedTarball/poppler/poppler/FontInfo \
+ UnpackedTarball/poppler/poppler/Function \
+ UnpackedTarball/poppler/poppler/Gfx \
+ UnpackedTarball/poppler/poppler/GfxFont \
+ UnpackedTarball/poppler/poppler/GfxState \
+ UnpackedTarball/poppler/poppler/GlobalParams \
+ UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/JArithmeticDecoder \
+ UnpackedTarball/poppler/poppler/JBIG2Stream \
+ UnpackedTarball/poppler/poppler/Lexer \
+ UnpackedTarball/poppler/poppler/Link \
+ UnpackedTarball/poppler/poppler/Linearization \
+ UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/MarkedContentOutputDev \
+ UnpackedTarball/poppler/poppler/NameToCharCode \
+ UnpackedTarball/poppler/poppler/Object \
+ UnpackedTarball/poppler/poppler/OptionalContent \
+ UnpackedTarball/poppler/poppler/Outline \
+ UnpackedTarball/poppler/poppler/OutputDev \
+ UnpackedTarball/poppler/poppler/Page \
+ UnpackedTarball/poppler/poppler/PageTransition \
+ UnpackedTarball/poppler/poppler/Parser \
+ UnpackedTarball/poppler/poppler/PDFDoc \
+ UnpackedTarball/poppler/poppler/PDFDocEncoding \
+ UnpackedTarball/poppler/poppler/PDFDocFactory \
+ UnpackedTarball/poppler/poppler/PopplerCache \
+ UnpackedTarball/poppler/poppler/ProfileData \
+ UnpackedTarball/poppler/poppler/PreScanOutputDev \
+ UnpackedTarball/poppler/poppler/PSTokenizer \
+ UnpackedTarball/poppler/poppler/SignatureInfo \
+ UnpackedTarball/poppler/poppler/Stream \
+ UnpackedTarball/poppler/poppler/StructTreeRoot \
+ UnpackedTarball/poppler/poppler/StructElement \
+ UnpackedTarball/poppler/poppler/UnicodeMap \
+ UnpackedTarball/poppler/poppler/UnicodeMapFuncs \
+ UnpackedTarball/poppler/poppler/UnicodeTypeTable \
+ UnpackedTarball/poppler/poppler/UTF \
+ UnpackedTarball/poppler/poppler/XRef \
+ UnpackedTarball/poppler/poppler/PSOutputDev \
+ UnpackedTarball/poppler/poppler/TextOutputDev \
+ UnpackedTarball/poppler/poppler/PageLabelInfo \
+ UnpackedTarball/poppler/poppler/SecurityHandler \
+ UnpackedTarball/poppler/poppler/StdinCachedFile \
+ UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/Sound \
+ UnpackedTarball/poppler/poppler/ViewerPreferences \
+ UnpackedTarball/poppler/poppler/XpdfPluginAPI \
+ UnpackedTarball/poppler/poppler/Movie \
+ UnpackedTarball/poppler/poppler/Rendition \
+ UnpackedTarball/poppler/poppler/DCTStream \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index fc62974521fa..68fd06d9403b 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -12,11 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler))
$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler))
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
- external/poppler/poppler-notests.patch.1 \
- external/poppler/poppler-mac-fake.patch.1 \
- external/poppler/ubsan.patch.0 \
- external/poppler/poppler-libjpeg.patch.1 \
- external/poppler/0001-Fix-building-with-old-clang.patch.1 \
+ external/poppler/poppler-config.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
new file mode 100644
index 000000000000..5328e680e2f2
--- /dev/null
+++ b/external/poppler/poppler-config.patch.1
@@ -0,0 +1,484 @@
+*three* poppler config headers
+
+mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off
+
+manually disabled these because cmake failed to do it:
+HAVE_CAIRO
+ENABLE_NSS3
+ENABLE_LIBPNG (twice!)
+ENABLE_LIBTIFF (twice!)
+ENABLE_LIBCURL
+
+diff --git a/config.h b/config.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/config.h
+@@ -0,0 +1,248 @@
++/* config.h. Generated from config.h.cmake by cmake. */
++
++/* Build against libcurl. */
++/* #undef ENABLE_LIBCURL */
++
++/* Use libjpeg instead of builtin jpeg decoder. */
++#define ENABLE_LIBJPEG 1
++
++/* Use libopenjpeg instead of builtin jpeg2000 decoder. */
++/* #undef ENABLE_LIBOPENJPEG */
++
++/* Build against libtiff. */
++/* #define ENABLE_LIBTIFF 1 */
++
++/* Build against libpng. */
++/* #define ENABLE_LIBPNG 1 */
++
++/* Do not hardcode the library location */
++/* #undef ENABLE_RELOCATABLE */
++
++/* Build against zlib. */
++/* #undef ENABLE_ZLIB */
++
++/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */
++/* #undef ENABLE_ZLIB_UNCOMPRESS */
++
++/* Build against libnss3 for digital signature validation */
++/* #define ENABLE_NSS3 1 */
++
++/* Use cairo for rendering. */
++/* #define HAVE_CAIRO 1 */
++
++/* Do we have any DCT decoder?. */
++#define HAVE_DCT_DECODER 1
++
++/* Do we have any JPX decoder?. */
++/* #undef HAVE_JPX_DECODER */
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++ */
++#define HAVE_DIRENT_H 1
++#endif
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define HAVE_DLFCN_H 1
++#endif
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define HAVE_FCNTL_H 1
++
++/* Define to 1 if you have the `fseek64' function. */
++/* #undef HAVE_FSEEK64 */
++
++#if !defined(_WIN32)
++/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
++#define HAVE_FSEEKO 1
++#endif
++
++/* Define to 1 if you have the `ftell64' function. */
++/* #undef HAVE_FTELL64 */
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the `pread64' function. */
++#define HAVE_PREAD64 1
++#endif
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the `lseek64' function. */
++#define HAVE_LSEEK64 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if gettimeofday is available on your system */
++#define HAVE_GETTIMEOFDAY 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if gmtime_r is available on your system */
++#define HAVE_GMTIME_R 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if timegm is available on your system */
++#define HAVE_TIMEGM 1
++#endif
++
++/* Define if you have the iconv() function and it works. */
++/* #undef HAVE_ICONV */
++
++/* Define to 1 if you have the `z' library (-lz). */
++/* #undef HAVE_LIBZ */
++
++#if !defined(_WIN32)
++/* Defines if localtime_r is available on your system */
++#define HAVE_LOCALTIME_R 1
++#endif
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the `mkstemp' function. */
++#define HAVE_MKSTEMP 1
++#endif
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the `rand_r' function. */
++#define HAVE_RAND_R 1
++#endif
++
++#if defined(_WIN32)
++/* Define to 1 if you have the `strcpy_s' function. */
++#define HAVE_STRCPY_S 1
++#endif
++
++#if defined(_WIN32)
++/* Define to 1 if you have the `strcat_s' function. */
++#define HAVE_STRCAT_S 1
++#endif
++
++#if !defined(_WIN32)
++/* Defines if strtok_r is available on your system */
++#define HAVE_STRTOK_R 1
++#endif
++
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++/* #undef HAVE_NDIR_H */
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the `popen' function. */
++#define HAVE_POPEN 1
++#endif
++
++/* Use splash for rendering. */
++/* #undef HAVE_SPLASH */
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++ */
++#define HAVE_SYS_DIR_H 1
++#endif
++
++#if !defined(__APPLE__) && !defined(_WIN32)
++/* Define to 1 if you have the <sys/mman.h> header file. */
++#define HAVE_SYS_MMAN_H 1
++#endif
++
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++ */
++/* #undef HAVE_SYS_NDIR_H */
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define HAVE_SYS_STAT_H 1
++
++#if !defined(_WIN32)
++/* Define to 1 if you have the <unistd.h> header file. */
++#define HAVE_UNISTD_H 1
++#endif
++
++/* Define to 1 if you have a big endian machine */
++/* #undef WORDS_BIGENDIAN */
++
++/* Define as const if the declaration of iconv() needs const. */
++#define ICONV_CONST
++
++/* Enable multithreading support. */
++#define MULTITHREADED 1
++
++/* Generate OPI comments in PS output. */
++#define OPI_SUPPORT 1
++
++/* Name of package */
++#define PACKAGE "poppler"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=poppler"
++
++/* Define to the full name of this package. */
++#define PACKAGE_NAME "poppler"
++
++/* Define to the full name and version of this package. */
++#define PACKAGE_STRING "poppler 0.66.0"
++
++/* Define to the one symbol short name of this package. */
++#define PACKAGE_TARNAME "poppler"
++
++/* Define to the home page for this package. */
++#define PACKAGE_URL ""
++
++/* Define to the version of this package. */
++#define PACKAGE_VERSION "0.66.0"
++
++/* Poppler data dir */
++#define POPPLER_DATADIR "/usr/local/share/poppler"
++
++/* Support for curl based doc builder is compiled in. */
++/* #undef POPPLER_HAS_CURL_SUPPORT */
++
++/* Include support for CMYK rasterization */
++/* #undef SPLASH_CMYK */
++
++/* Enable word list support. */
++#define TEXTOUT_WORD_LIST 1
++
++/* Defines if use cms */
++/* #undef USE_CMS */
++
++/* Use fixed point arithmetic in the Splash backend */
++/* #undef USE_FIXEDPOINT */
++
++/* Use single precision arithmetic in the Splash backend */
++/* #undef USE_FLOAT */
++
++/* Version number of package */
++#define VERSION "0.66.0"
++
++#if defined(__APPLE__)
++#elif defined (_WIN32)
++/* Use win32 font configuration backend */
++#define WITH_FONTCONFIGURATION_WIN32 1
++#else
++/* Use fontconfig font configuration backend */
++#define WITH_FONTCONFIGURATION_FONTCONFIG 1
++#endif
++
++/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */
++/* #undef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG */
++
++/* MS defined snprintf as deprecated but then added it in Visual Studio 2015. */
++#if defined(_MSC_VER) && _MSC_VER < 1900
++#define snprintf _snprintf
++#endif
++
++//------------------------------------------------------------------------
++// popen
++//------------------------------------------------------------------------
++#if defined(_MSC_VER) || defined(__BORLANDC__)
++#define popen _popen
++#define pclose _pclose
++#endif
++
++/* Number of bits in a file offset, on hosts where this is settable. */
++/* #undef _FILE_OFFSET_BITS */
++
++/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
++/* TODO This is wrong, port if needed #undef _LARGEFILE_SOURCE */
++
++/* Define for large files, on AIX-style hosts. */
++/* TODO This is wrong, port if needed #undef _LARGE_FILES */
+diff --git a/poppler/poppler-config.h b/poppler/poppler-config.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/poppler/poppler-config.h
+@@ -0,0 +1,168 @@
++//================================================= -*- mode: c++ -*- ====
++//
++// poppler-config.h
++//
++// Copyright 1996-2011 Glyph & Cog, LLC
++//
++//========================================================================
++
++//========================================================================
++//
++// Modified under the Poppler project - http://poppler.freedesktop.org
++//
++// All changes made under the Poppler project to this file are licensed
++// under GPL version 2 or later
++//
++// Copyright (C) 2014 Bogdan Cristea <cristeab at gmail.com>
++// Copyright (C) 2014 Hib Eris <hib at hiberis.nl>
++// Copyright (C) 2016 Tor Lillqvist <tml at collabora.com>
++// Copyright (C) 2017 Adrian Johnson <ajohnson at redneon.com>
++//
++// To see a description of the changes please see the Changelog file that
++// came with your tarball or type make ChangeLog if you are building from git
++//
++//========================================================================
++
++#ifndef POPPLER_CONFIG_H
++#define POPPLER_CONFIG_H
++
++// We duplicate some of the config.h #define's here since they are
++// used in some of the header files we install. The #ifndef/#endif
++// around #undef look odd, but it's to silence warnings about
++// redefining those symbols.
++
++/* Defines the poppler version. */
++#ifndef POPPLER_VERSION
++#define POPPLER_VERSION "0.66.0"
++#endif
++
++/* Enable multithreading support. */
++#ifndef MULTITHREADED
++#define MULTITHREADED 1
++#endif
++
++/* Use fixedpoint. */
++#ifndef USE_FIXEDPOINT
++/* #undef USE_FIXEDPOINT */
++#endif
++
++/* Use single precision arithmetic in the Splash backend */
++#ifndef USE_FLOAT
++/* #undef USE_FLOAT */
++#endif
++
++/* Include support for OPI comments. */
++#ifndef OPI_SUPPORT
++#define OPI_SUPPORT 1
++#endif
++
++/* Enable word list support. */
++#ifndef TEXTOUT_WORD_LIST
++#define TEXTOUT_WORD_LIST 1
++#endif
++
++/* Support for curl is compiled in. */
++#ifndef POPPLER_HAS_CURL_SUPPORT
++/* #undef POPPLER_HAS_CURL_SUPPORT */
++#endif
++
++/* Use libjpeg instead of builtin jpeg decoder. */
++#ifndef ENABLE_LIBJPEG
++#define ENABLE_LIBJPEG 1
++#endif
++
++/* Build against libtiff. */
++#ifndef ENABLE_LIBTIFF
++/* #define ENABLE_LIBTIFF 1 */
++#endif
++
++/* Build against libpng. */
++#ifndef ENABLE_LIBPNG
++/* #define ENABLE_LIBPNG 1 */
++#endif
++
++/* Use zlib instead of builtin zlib decoder. */
++#ifndef ENABLE_ZLIB
++/* #undef ENABLE_ZLIB */
++#endif
++
++/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_DIRENT_H
++#if !defined(_WIN32)
++#define HAVE_DIRENT_H 1
++#endif
++#endif
++
++/* Defines if gettimeofday is available on your system */
++#ifndef HAVE_GETTIMEOFDAY
++#if !defined(_WIN32)
++#define HAVE_GETTIMEOFDAY 1
++#endif
++#endif
++
++/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
++#ifndef HAVE_NDIR_H
++/* #undef HAVE_NDIR_H */
++#endif
++
++/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_SYS_DIR_H
++#if !defined(__APPLE__) && !defined(_WIN32)
++#define HAVE_SYS_DIR_H 1
++#endif
++#endif
++
++/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
++ */
++#ifndef HAVE_SYS_NDIR_H
++/* #undef HAVE_SYS_NDIR_H */
++#endif
++
++/* Defines if use cms */
++#ifndef USE_CMS
++/* #undef USE_CMS */
++#endif
++
++// Also, there are preprocessor symbols in the header files
++// that are used but never defined when building poppler using configure
++// or cmake: DISABLE_OUTLINE, DEBUG_MEM,
++// ENABLE_PLUGINS, DEBUG_FORMS
++
++//------------------------------------------------------------------------
++// version
++//------------------------------------------------------------------------
++
++// copyright notice
++#define popplerCopyright "Copyright 2005-2018 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
++
++//------------------------------------------------------------------------
++// Win32 stuff
++//------------------------------------------------------------------------
++
++#if defined(_WIN32) && !defined(_MSC_VER)
++#include <windef.h>
++#else
++#define CDECL
++#endif
++
++//------------------------------------------------------------------------
++// Compiler
++//------------------------------------------------------------------------
++
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
++#include <stdio.h> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h
++#ifdef __MINGW_PRINTF_FORMAT
++#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
++ __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index)))
++#else
++#define GCC_PRINTF_FORMAT(fmt_index, va_index) \
++ __attribute__((__format__(__printf__, fmt_index, va_index)))
++#endif
++#else
++#define GCC_PRINTF_FORMAT(fmt_index, va_index)
++#endif
++
++#endif /* POPPLER_CONFIG_H */
+diff --git a/cpp/poppler-version.h b/cpp/poppler-version.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/cpp/poppler-version.h
+@@ -0,0 +1,39 @@
++/*
++ * Copyright (C) 2009, Pino Toscano <pino at kde.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#ifndef POPPLER_VERSION_H
++#define POPPLER_VERSION_H
++
++#include "poppler-global.h"
++
++#define POPPLER_VERSION "0.66.0"
++#define POPPLER_VERSION_MAJOR 0
++#define POPPLER_VERSION_MINOR 66
++#define POPPLER_VERSION_MICRO 0
++
++namespace poppler
++{
++
++POPPLER_CPP_EXPORT std::string version_string();
++POPPLER_CPP_EXPORT unsigned int version_major();
++POPPLER_CPP_EXPORT unsigned int version_minor();
++POPPLER_CPP_EXPORT unsigned int version_micro();
++
++}
++
++#endif
diff --git a/external/poppler/poppler-libjpeg.patch.1 b/external/poppler/poppler-libjpeg.patch.1
deleted file mode 100644
index c8d54beb75ae..000000000000
--- a/external/poppler/poppler-libjpeg.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
-do not override user supplied LIBJPEG_LIBS so we can use the one in WORKDIR
-
---- poppler/configure.orig 2016-11-02 13:58:32.530617038 +0100
-+++ poppler/configure 2016-11-02 13:58:06.233617689 +0100
-@@ -21377,8 +21377,9 @@
- ac_save_USER_INCLUDES="$USER_INCLUDES"
- ac_save_USER_LDFLAGS="$USER_LDFLAGS"
- USER_INCLUDES="$USER_INCLUDES $LIBJPEG_CFLAGS"
-- USER_LDFLAGS="$USER_LDFLAGS $LIBJPEG_CFLAGS"
-+ USER_LDFLAGS="$USER_LDFLAGS $LIBJPEG_LIBS"
-
-+if test -z "$LIBJPEG_LIBS"; then
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjpeg6b" >&5
- $as_echo_n "checking for libjpeg6b... " >&6; }
-@@ -21489,6 +21490,7 @@
-
-
- fi
-+fi
-
-
- ac_save_CPPFLAGS="$CPPFLAGS"
diff --git a/external/poppler/poppler-mac-fake.patch.1 b/external/poppler/poppler-mac-fake.patch.1
deleted file mode 100644
index d0b1936658ca..000000000000
--- a/external/poppler/poppler-mac-fake.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-diff -ur poppler.org/poppler/GlobalParams.cc poppler/poppler/GlobalParams.cc
---- poppler.org/poppler/GlobalParams.cc 2013-07-09 06:24:38.000000000 -0500
-+++ poppler/poppler/GlobalParams.cc 2013-07-09 06:25:18.000000000 -0500
-@@ -1327,7 +1327,7 @@
- return path;
- }
-
--#elif WITH_FONTCONFIGURATION_WIN32
-+#elif WITH_FONTCONFIGURATION_WIN32 && defined(_WIN32)
- #include "GlobalParamsWin.cc"
-
- GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) {
-
diff --git a/external/poppler/poppler-notests.patch.1 b/external/poppler/poppler-notests.patch.1
deleted file mode 100644
index ffac17312959..000000000000
--- a/external/poppler/poppler-notests.patch.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -483,7 +483,7 @@
- @BUILD_POPPLER_QT4_TRUE at qt4_pc_file = poppler-qt4.pc
- @BUILD_POPPLER_CPP_TRUE at cpp_subdir = cpp
- @BUILD_POPPLER_CPP_TRUE at cpp_pc_file = poppler-cpp.pc
--SUBDIRS = goo fofi $(splash_subdir) poppler utils $(glib_subdir) test $(qt4_subdir) $(qt5_subdir) $(cpp_subdir)
-+SUBDIRS = goo fofi $(splash_subdir) poppler utils $(glib_subdir) $(qt4_subdir) $(qt5_subdir) $(cpp_subdir)
-
- # Add CMake buildsystem files here so they get added on make dist
- EXTRA_DIST = README-XPDF poppler.pc.in poppler-uninstalled.pc.in \
diff --git a/external/poppler/ubsan.patch.0 b/external/poppler/ubsan.patch.0
deleted file mode 100644
index f6e4667dc133..000000000000
--- a/external/poppler/ubsan.patch.0
+++ /dev/null
@@ -1,230 +0,0 @@
---- poppler/Form.cc
-+++ poppler/Form.cc
-@@ -463,12 +463,11 @@
- // FormField
- //========================================================================
-
--FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parentA, std::set<int> *usedParents, FormFieldType ty)
-+FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parentA, FormFieldType ty)
- {
- doc = docA;
- xref = doc->getXRef();
- obj = aobj->copy();
-- Dict* dict = obj.getDict();
- ref.num = ref.gen = 0;
- type = ty;
- parent = parentA;
-@@ -483,7 +482,11 @@
- hasQuadding = gFalse;
-
- ref = aref;
-+}
-
-+void FormField::init(std::set<int> *usedParents)
-+{
-+ Dict* dict = obj.getDict();
- //childs
- Object obj1 = dict->lookup("Kids");
- if (obj1.isArray()) {
-@@ -803,9 +806,15 @@
- //------------------------------------------------------------------------
- // FormFieldButton
- //------------------------------------------------------------------------
--FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-- : FormField(docA, aobj, ref, parent, usedParents, formButton)
-+FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent)
-+ : FormField(docA, aobj, ref, parent, formButton)
- {
-+}
-+
-+void FormFieldButton::init(std::set<int> *usedParents)
-+{
-+ FormField::init(usedParents);
-+
- Dict* dict = obj.getDict();
- active_child = -1;
- noAllOff = false;
-@@ -983,9 +992,15 @@
- //------------------------------------------------------------------------
- // FormFieldText
- //------------------------------------------------------------------------
--FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-- : FormField(docA, aobj, ref, parent, usedParents, formText)
-+FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent)
-+ : FormField(docA, aobj, ref, parent, formText)
- {
-+}
-+
-+void FormFieldText::init(std::set<int> *usedParents)
-+{
-+ FormField::init(usedParents);
-+
- Dict* dict = obj.getDict();
- Object obj1;
- content = NULL;
-@@ -1076,9 +1091,15 @@
- //------------------------------------------------------------------------
- // FormFieldChoice
- //------------------------------------------------------------------------
--FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-- : FormField(docA, aobj, ref, parent, usedParents, formChoice)
-+FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent)
-+ : FormField(docA, aobj, ref, parent, formChoice)
- {
-+}
-+
-+void FormFieldChoice::init(std::set<int> *usedParents)
-+{
-+ FormField::init(usedParents);
-+
- numChoices = 0;
- choices = NULL;
- editedChoice = NULL;
-@@ -1379,11 +1400,17 @@
- //------------------------------------------------------------------------
- // FormFieldSignature
- //------------------------------------------------------------------------
--FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-- : FormField(docA, dict, ref, parent, usedParents, formSignature),
-+FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent)
-+ : FormField(docA, dict, ref, parent, formSignature),
- signature_type(adbe_pkcs7_detached),
- signature(nullptr), signature_info(nullptr)
- {
-+}
-+
-+void FormFieldSignature::init(std::set<int> *usedParents)
-+{
-+ FormField::init(usedParents);
-+
- signature = NULL;
-
- signature_info = new SignatureInfo();
-@@ -1691,15 +1718,15 @@
-
- Object obj2 = Form::fieldLookup(obj->getDict (), "FT");
- if (obj2.isName("Btn")) {
-- field = new FormFieldButton(docA, obj, pref, parent, usedParents);
-+ field = FormFieldButton::create(docA, obj, pref, parent, usedParents);
- } else if (obj2.isName("Tx")) {
-- field = new FormFieldText(docA, obj, pref, parent, usedParents);
-+ field = FormFieldText::create(docA, obj, pref, parent, usedParents);
- } else if (obj2.isName("Ch")) {
-- field = new FormFieldChoice(docA, obj, pref, parent, usedParents);
-+ field = FormFieldChoice::create(docA, obj, pref, parent, usedParents);
- } else if (obj2.isName("Sig")) {
-- field = new FormFieldSignature(docA, obj, pref, parent, usedParents);
-+ field = FormFieldSignature::create(docA, obj, pref, parent, usedParents);
- } else { //we don't have an FT entry => non-terminal field
-- field = new FormField(docA, obj, pref, parent, usedParents);
-+ field = FormField::create(docA, obj, pref, parent, usedParents);
- }
-
- return field;
---- poppler/Form.h
-+++ poppler/Form.h
-@@ -264,8 +264,16 @@
- //------------------------------------------------------------------------
-
- class FormField {
--public:
-- FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, std::set<int> *usedParents, FormFieldType t=formUndef);
-+protected:
-+ FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, FormFieldType t);
-+ void init(std::set<int> *usedParents);
-+public:
-+ static FormField *create(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, std::set<int> *usedParents, FormFieldType t=formUndef)
-+ {
-+ FormField *f = new FormField(docA, aobj, aref, parent, t);
-+ f->init(usedParents);
-+ return f;
-+ }
-
- virtual ~FormField();
-
-@@ -338,8 +346,16 @@
- //------------------------------------------------------------------------
-
- class FormFieldButton: public FormField {
--public:
-- FormFieldButton(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
-+private:
-+ FormFieldButton(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent);
-+ void init(std::set<int> *usedParents);
-+public:
-+ static FormFieldButton *create(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-+ {
-+ FormFieldButton *f = new FormFieldButton(docA, dict, ref, parent);
-+ f->init(usedParents);
-+ return f;
-+ }
-
- FormButtonType getButtonType () { return btype; }
-
-@@ -384,8 +400,16 @@
- //------------------------------------------------------------------------
-
- class FormFieldText: public FormField {
--public:
-- FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
-+private:
-+ FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent);
-+ void init(std::set<int> *usedParents);
-+public:
-+ static FormFieldText *create(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-+ {
-+ FormFieldText *f = new FormFieldText(docA, dict, ref, parent);
-+ f->init(usedParents);
-+ return f;
-+ }
-
- GooString* getContent () { return content; }
- GooString* getContentCopy ();
-@@ -422,8 +446,16 @@
- //------------------------------------------------------------------------
-
- class FormFieldChoice: public FormField {
--public:
-- FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents);
-+private:
-+ FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent);
-+ void init(std::set<int> *usedParents);
-+public:
-+ static FormFieldChoice *create(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-+ {
-+ FormFieldChoice *f = new FormFieldChoice(docA, aobj, ref, parent);
-+ f->init(usedParents);
-+ return f;
-+ }
-
- ~FormFieldChoice();
-
-@@ -491,8 +523,16 @@
-
- class FormFieldSignature: public FormField {
- friend class FormWidgetSignature;
--public:
-- FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
-+private:
-+ FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent);
-+ void init(std::set<int> *usedParents);
-+public:
-+ static FormFieldSignature *create(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents)
-+ {
-+ FormFieldSignature *f = new FormFieldSignature(docA, dict, ref, parent);
-+ f->init(usedParents);
-+ return f;
-+ }
-
- // Use -1 for now as validationTime
- SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime);
---- poppler/XRef.cc
-+++ poppler/XRef.cc
-@@ -293,6 +293,7 @@
- xRefStream = gFalse;
- scannedSpecialFlags = gFalse;
- encrypted = gFalse;
-+ encAlgorithm = cryptRC4;
- permFlags = defPermFlags;
- ownerPasswordOk = gFalse;
- rootNum = -1;
commit 3af6968632a24939ecc93576f8051374fb98833e
Author: Dennis Francis <dennis.francis at collabora.co.uk>
Date: Mon Jun 18 08:14:24 2018 +0530
tdf#118189 : Propagate the state of mbNeedsNumberFormat...
from source formula-cell to destination while calling
SetFormulaCell() on dest formula-cell in CopyByCloneHandler
CopyByCloneHandler get called when some data range is pasted
to a document, or when data is copied to an undo document.
This is a follow-up of the commit
37f6e5de1e72d209b0892734f4de5c4d8a849885
(tdf#114710 : Fixes crash when pasting as GDI metafile)
Change-Id: I936310f13080f2de763ebcd5cb046a25d61d978e
Reviewed-on: https://gerrit.libreoffice.org/55975
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 67c88e284af74c88e37cc8f66cdfc0e346de45ac)
Reviewed-on: https://gerrit.libreoffice.org/56134
(cherry picked from commit 8ea1e4e4a47b0a1b0cf3dfcb0b1e2a32f0db3d88)
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 73afe1a810f8..03dea4fcc50b 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -1430,7 +1430,7 @@ class CopyByCloneHandler
// Clone as formula cell.
ScFormulaCell* pCell = new ScFormulaCell(rSrcCell, mrDestCol.GetDoc(), aDestPos, mnFormulaCellCloneFlags);
pCell->SetDirtyVar();
- mrDestCol.SetFormulaCell(maDestPos, nRow, pCell, meListenType);
+ mrDestCol.SetFormulaCell(maDestPos, nRow, pCell, meListenType, rSrcCell.NeedsNumberFormat());
setDefaultAttrToDest(nRow);
return;
}
commit 3ae3f4c897041c8f8de147e43c644d607161e703
Author: Laurent BP <laurent.balland-poirier at laposte.net>
Date: Sun Jun 3 12:03:03 2018 +0200
tdf#117827 Restore Synchronize labels in template
Correction of de14f0487118d8ea15db54d94c44d7bd28833c82
Update Businesscard-with-logo
- restore "Synchronize labels" function
- restore links that need to be updated at the begining
- change Tab for name and profession to center Tab
- change "Sektsioon" to "Section"
- change "Paneel" to "Frame"
- change "Pilt" to "Image"
Change-Id: If3123ed76faf1055f539dc9f47051696f3f1b40b
Reviewed-on: https://gerrit.libreoffice.org/55243
Tested-by: Jenkins
Reviewed-by: Laurent BP <laurent.balland-poirier at laposte.net>
(cherry picked from commit e92e240693ca13ac2ee38da3518b12f57d3974db)
Reviewed-on: https://gerrit.libreoffice.org/55959
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 8ebbf13ecf3fefb7d136b67b53834145105612ef)
diff --git a/extras/source/templates/offimisc/Businesscard-with-logo.ott b/extras/source/templates/offimisc/Businesscard-with-logo.ott
index 3ff8b3528980..da035f603f26 100644
Binary files a/extras/source/templates/offimisc/Businesscard-with-logo.ott and b/extras/source/templates/offimisc/Businesscard-with-logo.ott differ
commit 4d48fbf01b7d385037933035be29c1426e7a2d45
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
Date: Sun Jan 28 00:14:55 2018 +0100
tdf#114736 no need to call AdjustLayout here
Reviewed-on: https://gerrit.libreoffice.org/48761
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/49033
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 221234c0203d5b3caf6907bff110fc1a9b71a5ad)
Change-Id: Iae8c953155d46e53cffdf3483e3b4b95157719f6
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 2153edf07350..6d43a5b9f9a3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -888,11 +888,6 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
if( mbInitFont )
InitFont();
-
- OUString aStrModifiable = rStr;
- ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStrModifiable, nIndex, nLen,
- 0, nullptr);
-
pLayoutCache->DrawBase() = ImplLogicToDevicePixel( rStartPt );
ImplDrawText( *pLayoutCache );
commit 700f1916664db0ba9f5fcea1fb93992fe2112438
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Jun 13 22:16:44 2018 +0200
tdf#118112: Use ParameterNameSubstitution for Mysql
Change-Id: Ic48aee378d0a89466c49de85baa96a3bea127d2f
Reviewed-on: https://gerrit.libreoffice.org/55771
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit c179e8a7ea273a48713192c3ba7dfea313149cd8)
Reviewed-on: https://gerrit.libreoffice.org/55780
Tested-by: Jenkins
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
(cherry picked from commit 4de33eb2b5a802e8eda36c5806913efeead68441)
diff --git a/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu b/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu
index faf9ddb9fa55..77988448f722 100644
--- a/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu
+++ b/connectivity/registry/mysql/org/openoffice/Office/DataAccess/Drivers.xcu
@@ -41,6 +41,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="ParameterNameSubstitution" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
@@ -115,6 +120,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="ParameterNameSubstitution" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
@@ -194,6 +204,11 @@
<value>true</value>
</prop>
</node>
+ <node oor:name="ParameterNameSubstitution" oor:op="replace">
+ <prop oor:name="Value" oor:type="xs:boolean">
+ <value>true</value>
+ </prop>
+ </node>
</node>
<node oor:name="Features">
<node oor:name="UseKeywordAsBeforeAlias" oor:op="replace">
commit ef54167de9b142e29e58c73e46c0741372767b32
Author: Eike Rathke <erack at redhat.com>
Date: Mon Jun 18 13:53:04 2018 +0200
Resolves: tdf#118073 one leading 0 is significant for 0.
Regression from
commit 9a6527a98fb968b3fe6bc293ff7520a9480d43d0
CommitDate: Mon Jun 27 21:57:52 2016 +0200
stringToDouble() do not parse separator without digit as 0.0
Change-Id: I9d90aedc324ef0938297224297d89817e3fd1e90
Reviewed-on: https://gerrit.libreoffice.org/56028
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 5c0783cecb0b141885a25ca26220614ad3125f8e)
Reviewed-on: https://gerrit.libreoffice.org/56044
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 98bcbd756bb7222578f1e5f12bb3759337a15c0b)
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index 96c5843dcfea..2cf2711662d6 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -816,7 +816,7 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
++p;
}
- CharT const * pFirstSignificant = p;
+ CharT const * pFirstSignificant = ((p > pBegin && *(p-1) == CharT('0')) ? p-1 : p);
long nValExp = 0; // carry along exponent of mantissa
// integer part of mantissa
commit 6814f2c4940246723c7f4c54b7ddf60455550fc8
Author: Bjoern Michaelsen <bjoern.michaelsen at libreoffice.org>
Date: Fri Jun 15 01:05:09 2018 +0200
tdf#117723: nullcheck the ContentAnchor before deref
Change-Id: I4043efc204c8e3af8463ecd325313c99a9d61128
Reviewed-on: https://gerrit.libreoffice.org/55839
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
Tested-by: Björn Michaelsen <bjoern.michaelsen at libreoffice.org>
(cherry picked from commit d8142da066b6ee80444694e0eb6b0da9375a89c7)
Reviewed-on: https://gerrit.libreoffice.org/55953
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit b1d679a1b06de087fe2a1af079e0c6c46473c0e3)
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 73683a400219..65ebe3158f56 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1087,8 +1087,9 @@ void AppendAllObjs(const SwFrameFormats* pTable, const SwFrame* pSib)
// frames nor objects which are anchored to character bounds.
if ((rAnch.GetAnchorId() != RndStdIds::FLY_AT_PAGE) && (rAnch.GetAnchorId() != RndStdIds::FLY_AS_CHAR))
{
+ auto pContentAnchor = rAnch.GetContentAnchor();
// formats in header/footer have no dependencies
- if(pFormat->GetDoc()->IsInHeaderFooter(rAnch.GetContentAnchor()->nNode))
+ if(pContentAnchor && pFormat->GetDoc()->IsInHeaderFooter(pContentAnchor->nNode))
pFormat->MakeFrames();
else
vFormatsToConnect.push_back(pFormat);
commit 9e1b2e9fdf5dbb93bd59c90baba8fc6c6820c300
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Jun 7 09:41:19 2018 +0200
Fix CppunitTest_xmlsecurity_signing with system-xmlsec 1.2.26
Swap the order of the default and custom callback registration, since
the order of lookup is now reversed since
<https://github.com/lsh123/xmlsec/commit/968646fb9b8428174a112fce2f08b1ec89d0ed97>.
Thanks Tomas Chvatal for reporting this.
(cherry picked from commit 576f899811a22e83b6fb6a120c8da303b1f4cac1)
xmlsecurity: check for the libxmlsec version runtime, not build-time
For the general benefit of --with-system-xmlsec usage scenarios (where
LO may be built against an old version of xmlsec and run against a new
one).
(cherry picked from commit bc4e43dd926bbe6f5315b5c372770ac8c7222177)
Change-Id: I60a347454701a679db4ccd8924a723a236d5edff
Reviewed-on: https://gerrit.libreoffice.org/55462
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit 3d532502c9a17049bdd383a3d5c56005222331b7)
Reviewed-on: https://gerrit.libreoffice.org/55944
Tested-by: Jenkins
(cherry picked from commit 355a59a7d4b0c8f50823d4bf68f0cb0c985a2b79)
diff --git a/xmlsecurity/source/xmlsec/xmlstreamio.cxx b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
index de32f8286c1b..910944e11611 100644
--- a/xmlsecurity/source/xmlsec/xmlstreamio.cxx
+++ b/xmlsecurity/source/xmlsec/xmlstreamio.cxx
@@ -157,21 +157,44 @@ XSECXMLSEC_DLLPUBLIC int xmlEnableStreamInputCallbacks()
//Notes: all none default callbacks will lose.
xmlSecIOCleanupCallbacks() ;
- //Register my classbacks.
- int cbs = xmlSecIORegisterCallbacks(
- xmlStreamMatch,
- xmlStreamOpen,
- xmlStreamRead,
- xmlStreamClose ) ;
- if( cbs < 0 ) {
- return -1 ;
+ // Newer xmlsec wants the callback order in the opposite direction.
+ if (xmlSecCheckVersionExt(1, 2, 26, xmlSecCheckVersionABICompatible))
+ {
+ //Register the default callbacks.
+ //Notes: the error will cause xmlsec working problems.
+ int cbs = xmlSecIORegisterDefaultCallbacks() ;
+ if( cbs < 0 ) {
+ return -1 ;
+ }
+
+ //Register my classbacks.
+ cbs = xmlSecIORegisterCallbacks(
+ xmlStreamMatch,
+ xmlStreamOpen,
+ xmlStreamRead,
+ xmlStreamClose ) ;
+ if( cbs < 0 ) {
+ return -1 ;
+ }
}
-
- //Register the default callbacks.
- //Notes: the error will cause xmlsec working problems.
- cbs = xmlSecIORegisterDefaultCallbacks() ;
- if( cbs < 0 ) {
- return -1 ;
+ else
+ {
+ //Register my classbacks.
+ int cbs = xmlSecIORegisterCallbacks(
+ xmlStreamMatch,
+ xmlStreamOpen,
+ xmlStreamRead,
+ xmlStreamClose ) ;
+ if( cbs < 0 ) {
+ return -1 ;
+ }
+
+ //Register the default callbacks.
+ //Notes: the error will cause xmlsec working problems.
+ cbs = xmlSecIORegisterDefaultCallbacks() ;
+ if( cbs < 0 ) {
+ return -1 ;
+ }
}
enableXmlStreamIO |= XMLSTREAMIO_INITIALIZED ;
commit b1a310e4063513d6331a02a49e9627865c485557
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 11 09:00:46 2018 +0100
rhbz#1589029 tdf#93789 impress not showing text highlight in presentation mode
the text hightlighting feature was implemented backed on to the vcl
TextFillColor feature. TextFillColor fills the background of the bounds
of the text with that color
Likely either the same problem or similar as tdf#93789
Change-Id: Iace62cedc49e5f5844ac35d3caa23249b6cb4bc1
Reviewed-on: https://gerrit.libreoffice.org/55635
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit 761cb908d557b6712e7f2fca77b1b60e14005fe9)
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 369ac9ccb3b9..f2dcb9906bf3 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1298,6 +1298,7 @@ namespace cppcanvas
::Color(),
::Size(),
::Color(),
+ ::Color(),
text,
0,
stringLength,
@@ -1612,6 +1613,7 @@ namespace cppcanvas
::Color(),
::Size(),
::Color(),
+ ::Color(),
text,
0,
glyphsCount,
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index b71b34ddd8b8..565c01ee4670 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -865,6 +865,7 @@ namespace cppcanvas
// TODO(F2): implement all text effects
// if( rState.textAlignment ); // TODO(F2): NYI
+ ::Color aTextFillColor( COL_AUTO );
::Color aShadowColor( COL_AUTO );
::Color aReliefColor( COL_AUTO );
::Size aShadowOffset;
@@ -930,6 +931,9 @@ namespace cppcanvas
aReliefColor.SetTransparency( aTextColor.GetTransparency() );
}
+ if (rState.isTextFillColorSet)
+ aTextFillColor = vcl::unotools::doubleSequenceToColor(rState.textFillColor, xColorSpace);
+
// create the actual text action
std::shared_ptr<Action> pTextAction(
TextActionFactory::createTextAction(
@@ -938,6 +942,7 @@ namespace cppcanvas
aReliefColor,
aShadowOffset,
aShadowColor,
+ aTextFillColor,
rString,
nIndex,
nLength,
@@ -1002,6 +1007,7 @@ namespace cppcanvas
aReliefColor,
aShadowOffset,
aShadowColor,
+ aTextFillColor,
aStrikeoutText,
0/*nStartPos*/,
aStrikeoutText.getLength(),
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 550b98e699a6..0bc05d46d3e9 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -470,7 +470,7 @@ namespace cppcanvas
virtual ~TextRenderer() {}
/// Render text with given RenderState
- virtual bool operator()( const rendering::RenderState& rRenderState ) const = 0;
+ virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const = 0;
};
/** Render effect text.
@@ -486,7 +486,8 @@ namespace cppcanvas
const ::Color& rShadowColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rReliefColor,
- const ::basegfx::B2DSize& rReliefOffset )
+ const ::basegfx::B2DSize& rReliefOffset,
+ const ::Color& rTextFillColor )
{
::Color aEmptyColor( COL_AUTO );
uno::Reference<rendering::XColorSpace> xColorSpace(
@@ -507,7 +508,7 @@ namespace cppcanvas
vcl::unotools::colorToDoubleSequence( rShadowColor,
xColorSpace );
- rRenderer( aShadowState );
+ rRenderer( aShadowState, rTextFillColor );
}
// draw relief text, if enabled
@@ -525,11 +526,11 @@ namespace cppcanvas
vcl::unotools::colorToDoubleSequence( rReliefColor,
xColorSpace );
- rRenderer( aReliefState );
+ rRenderer( aReliefState, rTextFillColor );
}
// draw normal text
- rRenderer( rRenderState );
+ rRenderer( rRenderState, rTextFillColor );
return true;
}
@@ -800,7 +801,10 @@ namespace cppcanvas
private:
/// Interface TextRenderer
- virtual bool operator()( const rendering::RenderState& rRenderState ) const override;
+ virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
+
+ geometry::RealRectangle2D queryTextBounds() const;
+ css::uno::Reference<css::rendering::XPolyPolygon2D> queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const;
// TODO(P2): This is potentially a real mass object
// (every character might be a separate TextAction),
@@ -821,6 +825,7 @@ namespace cppcanvas
const ::Color maReliefColor;
const ::basegfx::B2DSize maShadowOffset;
const ::Color maShadowColor;
+ const ::Color maTextFillColor;
const sal_Int8 maTextDirection;
};
@@ -903,7 +908,7 @@ namespace cppcanvas
"::cppcanvas::internal::EffectTextAction(): Invalid font or lines" );
}
- bool EffectTextAction::operator()( const rendering::RenderState& rRenderState ) const
+ bool EffectTextAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const
{
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
@@ -912,6 +917,18 @@ namespace cppcanvas
rViewState,
rRenderState );
+ //rhbz#1589029 non-transparent text fill background support
+ ::Color aEmptyColor( COL_AUTO );
+ if (rTextFillColor != aEmptyColor)
+ {
+ rendering::RenderState aLocalState( rRenderState );
+ aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
+ rTextFillColor, rCanvas->getDevice()->getDeviceColorSpace());
+ auto xTextBounds = queryTextBounds(rCanvas);
+ // background of text
+ rCanvas->fillPolyPolygon(xTextBounds, rViewState, aLocalState);
+ }
+
rCanvas->drawText( maStringContext, mxFont,
rViewState,
rRenderState,
@@ -934,7 +951,8 @@ namespace cppcanvas
maShadowColor,
maShadowOffset,
maReliefColor,
- maReliefOffset );
+ maReliefOffset,
+ maTextFillColor);
}
bool EffectTextAction::renderSubset( const ::basegfx::B2DHomMatrix& rTransformation,
@@ -949,7 +967,7 @@ namespace cppcanvas
return render( rTransformation );
}
- ::basegfx::B2DRange EffectTextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const
+ geometry::RealRectangle2D EffectTextAction::queryTextBounds() const
{
// create XTextLayout, to have the
// XTextLayout::queryTextBounds() method available
@@ -959,11 +977,24 @@ namespace cppcanvas
maTextDirection,
0 ) );
+ return xTextLayout->queryTextBounds();
+ }
+
+ css::uno::Reference<css::rendering::XPolyPolygon2D> EffectTextAction::queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const
+ {
+ auto aTextBounds = queryTextBounds();
+ auto aB2DBounds = ::basegfx::unotools::b2DRectangleFromRealRectangle2D(aTextBounds);
+ auto aTextBoundsPoly = ::basegfx::utils::createPolygonFromRect(aB2DBounds);
+ return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(rCanvas->getDevice(), aTextBoundsPoly);
+ }
+
+ ::basegfx::B2DRange EffectTextAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const
+ {
rendering::RenderState aLocalState( maState );
::canvas::tools::prependToRenderState(aLocalState, rTransformation);
return calcEffectTextBounds( ::basegfx::unotools::b2DRectangleFromRealRectangle2D(
- xTextLayout->queryTextBounds() ),
+ queryTextBounds() ),
::basegfx::B2DRange( 0,0,
maLinesOverallSize.getX(),
maLinesOverallSize.getY() ),
@@ -1184,6 +1215,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
@@ -1196,6 +1228,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
@@ -1220,7 +1253,9 @@ namespace cppcanvas
private:
// TextRenderer interface
- virtual bool operator()( const rendering::RenderState& rRenderState ) const override;
+ virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
+
+ css::uno::Reference<css::rendering::XPolyPolygon2D> queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const;
// TODO(P2): This is potentially a real mass object
// (every character might be a separate TextAction),
@@ -1239,6 +1274,7 @@ namespace cppcanvas
const ::Color maReliefColor;
const ::basegfx::B2DSize maShadowOffset;
const ::Color maShadowColor;
+ const ::Color maTextFillColor;
};
EffectTextArrayAction::EffectTextArrayAction( const ::basegfx::B2DPoint& rStartPoint,
@@ -1246,6 +1282,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
@@ -1262,7 +1299,8 @@ namespace cppcanvas
maReliefOffset( rReliefOffset ),
maReliefColor( rReliefColor ),
maShadowOffset( rShadowOffset ),
- maShadowColor( rShadowColor )
+ maShadowColor( rShadowColor ),
+ maTextFillColor( rTextFillColor )
{
initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
@@ -1286,6 +1324,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
@@ -1303,7 +1342,8 @@ namespace cppcanvas
maReliefOffset( rReliefOffset ),
maReliefColor( rReliefColor ),
maShadowOffset( rShadowOffset ),
- maShadowColor( rShadowColor )
+ maShadowColor( rShadowColor ),
+ maTextFillColor( rTextFillColor )
{
initEffectLinePolyPolygon( maLinesOverallSize,
mxTextLines,
@@ -1323,7 +1363,15 @@ namespace cppcanvas
&rTextTransform );
}
- bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState ) const
+ css::uno::Reference<css::rendering::XPolyPolygon2D> EffectTextArrayAction::queryTextBounds(const uno::Reference<rendering::XCanvas>& rCanvas) const
+ {
+ const geometry::RealRectangle2D aTextBounds(mxTextLayout->queryTextBounds());
+ auto aB2DBounds = ::basegfx::unotools::b2DRectangleFromRealRectangle2D(aTextBounds);
+ auto aTextBoundsPoly = ::basegfx::utils::createPolygonFromRect(aB2DBounds);
+ return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(rCanvas->getDevice(), aTextBoundsPoly);
+ }
+
+ bool EffectTextArrayAction::operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const
{
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
@@ -1332,6 +1380,18 @@ namespace cppcanvas
rViewState,
rRenderState );
+ //rhbz#1589029 non-transparent text fill background support
+ ::Color aEmptyColor( COL_AUTO );
+ if (rTextFillColor != aEmptyColor)
+ {
+ rendering::RenderState aLocalState(rRenderState);
+ aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
+ rTextFillColor, rCanvas->getDevice()->getDeviceColorSpace());
+ auto xTextBounds = queryTextBounds(rCanvas);
+ // background of text
+ rCanvas->fillPolyPolygon(xTextBounds, rViewState, aLocalState);
+ }
+
rCanvas->drawTextLayout( mxTextLayout,
rViewState,
rRenderState );
@@ -1353,7 +1413,8 @@ namespace cppcanvas
maShadowColor,
maShadowOffset,
maReliefColor,
- maReliefOffset );
+ maReliefOffset,
+ maTextFillColor);
}
class EffectTextArrayRenderHelper : public TextRenderer
@@ -1371,12 +1432,24 @@ namespace cppcanvas
}
// TextRenderer interface
- virtual bool operator()( const rendering::RenderState& rRenderState ) const override
+ virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override
{
mrCanvas->fillPolyPolygon( mrLinePolygon,
mrViewState,
rRenderState );
+ //rhbz#1589029 non-transparent text fill background support
+ ::Color aEmptyColor( COL_AUTO );
+ if (rTextFillColor != aEmptyColor)
+ {
+ rendering::RenderState aLocalState(rRenderState);
+ aLocalState.DeviceColor = vcl::unotools::colorToDoubleSequence(
+ rTextFillColor, mrCanvas->getDevice()->getDeviceColorSpace());
+ auto xTextBounds = queryTextBounds();
+ // background of text
+ mrCanvas->fillPolyPolygon(xTextBounds, mrViewState, aLocalState);
+ }
+
mrCanvas->drawTextLayout( mrTextLayout,
mrViewState,
rRenderState );
@@ -1385,6 +1458,15 @@ namespace cppcanvas
}
private:
+
+ css::uno::Reference<css::rendering::XPolyPolygon2D> queryTextBounds() const
+ {
+ const geometry::RealRectangle2D aTextBounds(mrTextLayout->queryTextBounds());
+ auto aB2DBounds = ::basegfx::unotools::b2DRectangleFromRealRectangle2D(aTextBounds);
+ auto aTextBoundsPoly = ::basegfx::utils::createPolygonFromRect(aB2DBounds);
+ return ::basegfx::unotools::xPolyPolygonFromB2DPolygon(mrCanvas->getDevice(), aTextBoundsPoly);
+ }
+
const uno::Reference< rendering::XCanvas >& mrCanvas;
const uno::Reference< rendering::XTextLayout >& mrTextLayout;
const uno::Reference< rendering::XPolyPolygon2D >& mrLinePolygon;
@@ -1442,7 +1524,8 @@ namespace cppcanvas
maShadowColor,
maShadowOffset,
maReliefColor,
- maReliefOffset );
+ maReliefOffset,
+ maTextFillColor);
}
::basegfx::B2DRange EffectTextArrayAction::getBounds( const ::basegfx::B2DHomMatrix& rTransformation ) const
@@ -1554,7 +1637,7 @@ namespace cppcanvas
private:
// TextRenderer interface
- virtual bool operator()( const rendering::RenderState& rRenderState ) const override;
+ virtual bool operator()( const rendering::RenderState& rRenderState, const ::Color& rTextFillColor ) const override;
// TODO(P2): This is potentially a real mass object
// (every character might be a separate TextAction),
@@ -1578,6 +1661,7 @@ namespace cppcanvas
const ::Color maReliefColor;
const ::basegfx::B2DSize maShadowOffset;
const ::Color maShadowColor;
+ const ::Color maTextFillColor;
};
double calcOutlineWidth( const OutDevState& rState,
@@ -1676,7 +1760,7 @@ namespace cppcanvas
rTextTransform );
}
- bool OutlineAction::operator()( const rendering::RenderState& rRenderState ) const
+ bool OutlineAction::operator()( const rendering::RenderState& rRenderState, const ::Color& /*rTextFillColor*/ ) const
{
const rendering::ViewState& rViewState( mpCanvas->getViewState() );
const uno::Reference< rendering::XCanvas >& rCanvas( mpCanvas->getUNOCanvas() );
@@ -1732,7 +1816,8 @@ namespace cppcanvas
maShadowColor,
maShadowOffset,
maReliefColor,
- maReliefOffset );
+ maReliefOffset,
+ maTextFillColor);
}
#if 0 // see #if'ed out use in OutlineAction::renderSubset below:
@@ -2041,6 +2126,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::Size& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
@@ -2174,7 +2260,8 @@ namespace cppcanvas
!rState.textUnderlineStyle &&
!rState.textStrikeoutStyle &&
rReliefColor == aEmptyColor &&
- rShadowColor == aEmptyColor )
+ rShadowColor == aEmptyColor &&
+ rTextFillColor == aEmptyColor )
{
// nope
if( rParms.maTextTransformation.is_initialized() )
@@ -2207,6 +2294,7 @@ namespace cppcanvas
rReliefColor,
aShadowOffset,
rShadowColor,
+ rTextFillColor,
rText,
nStartPos,
nLen,
@@ -2222,6 +2310,7 @@ namespace cppcanvas
rReliefColor,
aShadowOffset,
rShadowColor,
+ rTextFillColor,
rText,
nStartPos,
nLen,
diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx
index 1760477bf79a..e31cab63e78b 100644
--- a/cppcanvas/source/mtfrenderer/textaction.hxx
+++ b/cppcanvas/source/mtfrenderer/textaction.hxx
@@ -66,6 +66,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::Size& rShadowOffset,
const ::Color& rShadowColor,
+ const ::Color& rTextFillColor,
const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
commit ced1199226e2f69db213a97b413e42b4433c7556
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list