[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.3' - 5 commits - configure.ac download.lst external/libxml2 external/libxslt external/nss lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/source
Andras Timar
andras.timar at collabora.com
Thu Mar 3 21:00:51 UTC 2016
configure.ac | 2
download.lst | 4
external/libxml2/ExternalPackage_xml2.mk | 2
external/libxml2/UnpackedTarball_xml2.mk | 1
external/libxml2/libxml2-freebsd.patch.1 | 15
external/libxml2/libxml2-icu.patch.0 | 2
external/libxml2/libxml2-vc10.patch | 2
external/libxslt/0001-Fix-for-type-confusion-in-preprocessing-attributes.patch.1 | 29
external/libxslt/UnpackedTarball_xslt.mk | 1
external/nss/ExternalPackage_nss.mk | 9
external/nss/ExternalProject_nss.mk | 21
external/nss/Module_nss.mk | 2
external/nss/README | 16
external/nss/UnpackedTarball_nss.mk | 14
external/nss/nss-chromium-nss-static.patch | 487 +++++++
external/nss/nss-ios.patch | 112 +
external/nss/nss-linux-x86.patch.0 | 10
external/nss/nss-more-static.patch | 39
external/nss/nss-win32-make.patch.1 | 20
external/nss/nss.patch | 6
external/nss/nss.vs2015.patch | 12
external/nss/nss.windows.patch | 11
external/nss/nss_macosx.patch | 16
external/nss/ubsan.patch.0 | 24
lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk | 1
lotuswordpro/Library_lwpft.mk | 1
lotuswordpro/inc/pch/precompiled_lwpft.hxx | 1
lotuswordpro/source/filter/LotusWordProImportFilter.cxx | 10
lotuswordpro/source/filter/bencont.cxx | 19
lotuswordpro/source/filter/benlist.cxx | 20
lotuswordpro/source/filter/benname.cxx | 2
lotuswordpro/source/filter/benobj.cxx | 6
lotuswordpro/source/filter/bento.hxx | 41
lotuswordpro/source/filter/benval.cxx | 2
lotuswordpro/source/filter/clone.hxx | 5
lotuswordpro/source/filter/explode.hxx | 2
lotuswordpro/source/filter/first.hxx | 4
lotuswordpro/source/filter/genericfilter.cxx | 2
lotuswordpro/source/filter/lwp9reader.cxx | 16
lotuswordpro/source/filter/lwp9reader.hxx | 2
lotuswordpro/source/filter/lwpbackgroundoverride.hxx | 4
lotuswordpro/source/filter/lwpbackgroundstuff.cxx | 23
lotuswordpro/source/filter/lwpbackgroundstuff.hxx | 2
lotuswordpro/source/filter/lwpbasetype.hxx | 6
lotuswordpro/source/filter/lwpborderstuff.cxx | 2
lotuswordpro/source/filter/lwpbreaksoverride.cxx | 2
lotuswordpro/source/filter/lwpbreaksoverride.hxx | 2
lotuswordpro/source/filter/lwpbulletstylemgr.cxx | 12
lotuswordpro/source/filter/lwpbulletstylemgr.hxx | 1
lotuswordpro/source/filter/lwpcelllayout.cxx | 101 -
lotuswordpro/source/filter/lwpcelllayout.hxx | 12
lotuswordpro/source/filter/lwpcharacterstyle.cxx | 8
lotuswordpro/source/filter/lwpcharborderoverride.cxx | 4
lotuswordpro/source/filter/lwpcharborderoverride.hxx | 2
lotuswordpro/source/filter/lwpcharsetmgr.cxx | 5
lotuswordpro/source/filter/lwpcharsetmgr.hxx | 6
lotuswordpro/source/filter/lwpcontent.cxx | 20
lotuswordpro/source/filter/lwpcontent.hxx | 10
lotuswordpro/source/filter/lwpdivinfo.cxx | 6
lotuswordpro/source/filter/lwpdivinfo.hxx | 15
lotuswordpro/source/filter/lwpdivopts.hxx | 5
lotuswordpro/source/filter/lwpdllist.cxx | 4
lotuswordpro/source/filter/lwpdllist.hxx | 12
lotuswordpro/source/filter/lwpdlvlist.cxx | 2
lotuswordpro/source/filter/lwpdlvlist.hxx | 76 -
lotuswordpro/source/filter/lwpdoc.cxx | 212 +--
lotuswordpro/source/filter/lwpdoc.hxx | 65 -
lotuswordpro/source/filter/lwpdocdata.hxx | 7
lotuswordpro/source/filter/lwpdrawobj.cxx | 101 -
lotuswordpro/source/filter/lwpdrawobj.hxx | 12
lotuswordpro/source/filter/lwpdropcapmgr.cxx | 4
lotuswordpro/source/filter/lwpdropcapmgr.hxx | 2
lotuswordpro/source/filter/lwpfilehdr.cxx | 12
lotuswordpro/source/filter/lwpfilehdr.hxx | 6
lotuswordpro/source/filter/lwpfilter.cxx | 6
lotuswordpro/source/filter/lwpfnlayout.cxx | 40
lotuswordpro/source/filter/lwpfont.cxx | 23
lotuswordpro/source/filter/lwpfont.hxx | 18
lotuswordpro/source/filter/lwpfootnote.cxx | 22
lotuswordpro/source/filter/lwpfootnote.hxx | 17
lotuswordpro/source/filter/lwpfoundry.cxx | 91 -
lotuswordpro/source/filter/lwpfoundry.hxx | 29
lotuswordpro/source/filter/lwpframelayout.cxx | 187 +-
lotuswordpro/source/filter/lwpframelayout.hxx | 4
lotuswordpro/source/filter/lwpfrib.cxx | 51
lotuswordpro/source/filter/lwpfrib.hxx | 2
lotuswordpro/source/filter/lwpfribbreaks.cxx | 13
lotuswordpro/source/filter/lwpfribbreaks.hxx | 2
lotuswordpro/source/filter/lwpfribframe.cxx | 36
lotuswordpro/source/filter/lwpfribframe.hxx | 2
lotuswordpro/source/filter/lwpfribmark.cxx | 24
lotuswordpro/source/filter/lwpfribmark.hxx | 2
lotuswordpro/source/filter/lwpfribptr.cxx | 31
lotuswordpro/source/filter/lwpfribptr.hxx | 2
lotuswordpro/source/filter/lwpfribsection.cxx | 108 -
lotuswordpro/source/filter/lwpfribtable.cxx | 38
lotuswordpro/source/filter/lwpfribtable.hxx | 2
lotuswordpro/source/filter/lwpfribtext.cxx | 8
lotuswordpro/source/filter/lwpgrfobj.cxx | 64
lotuswordpro/source/filter/lwpgrfobj.hxx | 4
lotuswordpro/source/filter/lwpheader.hxx | 3
lotuswordpro/source/filter/lwpholder.hxx | 24
lotuswordpro/source/filter/lwphyperlinkmgr.cxx | 4
lotuswordpro/source/filter/lwphyperlinkmgr.hxx | 2
lotuswordpro/source/filter/lwpidxmgr.cxx | 7
lotuswordpro/source/filter/lwplayout.cxx | 643 +++++-----
lotuswordpro/source/filter/lwplayout.hxx | 196 ++-
lotuswordpro/source/filter/lwplaypiece.hxx | 49
lotuswordpro/source/filter/lwpmarker.cxx | 11
lotuswordpro/source/filter/lwpnotes.cxx | 26
lotuswordpro/source/filter/lwpnumberingoverride.hxx | 2
lotuswordpro/source/filter/lwpnumericfmt.cxx | 2
lotuswordpro/source/filter/lwpnumericfmt.hxx | 20
lotuswordpro/source/filter/lwpobj.cxx | 3
lotuswordpro/source/filter/lwpobj.hxx | 40
lotuswordpro/source/filter/lwpobjfactory.cxx | 47
lotuswordpro/source/filter/lwpobjfactory.hxx | 19
lotuswordpro/source/filter/lwpobjhdr.cxx | 38
lotuswordpro/source/filter/lwpobjhdr.hxx | 6
lotuswordpro/source/filter/lwpobjid.cxx | 41
lotuswordpro/source/filter/lwpobjid.hxx | 13
lotuswordpro/source/filter/lwpobjstrm.cxx | 12
lotuswordpro/source/filter/lwpobjstrm.hxx | 2
lotuswordpro/source/filter/lwpoleobject.cxx | 6
lotuswordpro/source/filter/lwpoverride.cxx | 16
lotuswordpro/source/filter/lwpoverride.hxx | 20
lotuswordpro/source/filter/lwppagehint.hxx | 6
lotuswordpro/source/filter/lwppagelayout.cxx | 113 -
lotuswordpro/source/filter/lwppara.cxx | 158 +-
lotuswordpro/source/filter/lwppara.hxx | 28
lotuswordpro/source/filter/lwppara1.cxx | 50
lotuswordpro/source/filter/lwpparaborderoverride.cxx | 10
lotuswordpro/source/filter/lwpparaborderoverride.hxx | 2
lotuswordpro/source/filter/lwpparaproperty.cxx | 34
lotuswordpro/source/filter/lwpparaproperty.hxx | 50
lotuswordpro/source/filter/lwpparastyle.cxx | 63
lotuswordpro/source/filter/lwpparastyle.hxx | 6
lotuswordpro/source/filter/lwppiece.hxx | 42
lotuswordpro/source/filter/lwpproplist.cxx | 11
lotuswordpro/source/filter/lwpproplist.hxx | 3
lotuswordpro/source/filter/lwpprtinfo.hxx | 4
lotuswordpro/source/filter/lwprowlayout.cxx | 51
lotuswordpro/source/filter/lwprowlayout.hxx | 4
lotuswordpro/source/filter/lwpsdwfileloader.cxx | 4
lotuswordpro/source/filter/lwpsdwfileloader.hxx | 22
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx | 28
lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx | 19
lotuswordpro/source/filter/lwpsdwrect.cxx | 9
lotuswordpro/source/filter/lwpsdwrect.hxx | 10
lotuswordpro/source/filter/lwpsection.cxx | 4
lotuswordpro/source/filter/lwpsection.hxx | 18
lotuswordpro/source/filter/lwpsilverbullet.cxx | 51
lotuswordpro/source/filter/lwpsilverbullet.hxx | 8
lotuswordpro/source/filter/lwpslvlist.hxx | 2
lotuswordpro/source/filter/lwpstory.cxx | 210 +--
lotuswordpro/source/filter/lwpstory.hxx | 46
lotuswordpro/source/filter/lwpsvstream.cxx | 24
lotuswordpro/source/filter/lwpsvstream.hxx | 12
lotuswordpro/source/filter/lwptable.cxx | 6
lotuswordpro/source/filter/lwptable.hxx | 9
lotuswordpro/source/filter/lwptablelayout.cxx | 242 +--
lotuswordpro/source/filter/lwptablelayout.hxx | 7
lotuswordpro/source/filter/lwptaboverride.hxx | 10
lotuswordpro/source/filter/lwptabrack.cxx | 9
lotuswordpro/source/filter/lwptabrack.hxx | 5
lotuswordpro/source/filter/lwptblcell.cxx | 2
lotuswordpro/source/filter/lwptblcell.hxx | 111 -
lotuswordpro/source/filter/lwptblformula.cxx | 26
lotuswordpro/source/filter/lwptblformula.hxx | 3
lotuswordpro/source/filter/lwptoc.cxx | 54
lotuswordpro/source/filter/lwptoc.hxx | 13
lotuswordpro/source/filter/lwptools.cxx | 19
lotuswordpro/source/filter/lwptools.hxx | 10
lotuswordpro/source/filter/lwpuidoc.cxx | 2
lotuswordpro/source/filter/lwpuidoc.hxx | 2
lotuswordpro/source/filter/lwpusrdicts.hxx | 2
lotuswordpro/source/filter/lwpverdocument.hxx | 3
lotuswordpro/source/filter/lwpvpointer.cxx | 6
lotuswordpro/source/filter/lwpvpointer.hxx | 5
lotuswordpro/source/filter/tocread.cxx | 20
lotuswordpro/source/filter/ut.hxx | 8
lotuswordpro/source/filter/utlist.cxx | 14
lotuswordpro/source/filter/utlist.hxx | 6
lotuswordpro/source/filter/xfilter/ixfstyle.hxx | 3
lotuswordpro/source/filter/xfilter/xfbase64.hxx | 2
lotuswordpro/source/filter/xfilter/xfborders.hxx | 8
lotuswordpro/source/filter/xfilter/xfbreaks.hxx | 5
lotuswordpro/source/filter/xfilter/xfcell.cxx | 53
lotuswordpro/source/filter/xfilter/xfcell.hxx | 7
lotuswordpro/source/filter/xfilter/xfcellstyle.cxx | 11
lotuswordpro/source/filter/xfilter/xfcellstyle.hxx | 6
lotuswordpro/source/filter/xfilter/xfcolumns.hxx | 8
lotuswordpro/source/filter/xfilter/xfcontent.hxx | 25
lotuswordpro/source/filter/xfilter/xfcontentcontainer.cxx | 76 -
lotuswordpro/source/filter/xfilter/xfcontentcontainer.hxx | 31
lotuswordpro/source/filter/xfilter/xfcrossref.cxx | 5
lotuswordpro/source/filter/xfilter/xfdatestyle.hxx | 1
lotuswordpro/source/filter/xfilter/xfdocfield.cxx | 4
lotuswordpro/source/filter/xfilter/xfdrawline.cxx | 2
lotuswordpro/source/filter/xfilter/xfdrawobj.cxx | 2
lotuswordpro/source/filter/xfilter/xfdrawobj.hxx | 16
lotuswordpro/source/filter/xfilter/xfdrawpath.hxx | 10
lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx | 24
lotuswordpro/source/filter/xfilter/xfdrawrect.hxx | 10
lotuswordpro/source/filter/xfilter/xfdropcap.hxx | 5
lotuswordpro/source/filter/xfilter/xfendnoteconfig.hxx | 2
lotuswordpro/source/filter/xfilter/xfentry.cxx | 5
lotuswordpro/source/filter/xfilter/xffont.hxx | 8
lotuswordpro/source/filter/xfilter/xffontdecl.cxx | 12
lotuswordpro/source/filter/xfilter/xffontdecl.hxx | 6
lotuswordpro/source/filter/xfilter/xffontfactory.cxx | 12
lotuswordpro/source/filter/xfilter/xffontfactory.hxx | 10
lotuswordpro/source/filter/xfilter/xffontworkstyle.hxx | 7
lotuswordpro/source/filter/xfilter/xffootnote.hxx | 2
lotuswordpro/source/filter/xfilter/xfframe.cxx | 14
lotuswordpro/source/filter/xfilter/xfframe.hxx | 6
lotuswordpro/source/filter/xfilter/xfglobal.hxx | 1
lotuswordpro/source/filter/xfilter/xfimage.cxx | 2
lotuswordpro/source/filter/xfilter/xfimagestyle.cxx | 2
lotuswordpro/source/filter/xfilter/xfindex.hxx | 4
lotuswordpro/source/filter/xfilter/xfinputlist.hxx | 22
lotuswordpro/source/filter/xfilter/xflineheight.hxx | 2
lotuswordpro/source/filter/xfilter/xflist.cxx | 25
lotuswordpro/source/filter/xfilter/xflist.hxx | 4
lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 16
lotuswordpro/source/filter/xfilter/xfliststyle.hxx | 3
lotuswordpro/source/filter/xfilter/xfmargins.hxx | 5
lotuswordpro/source/filter/xfilter/xfnumberstyle.cxx | 2
lotuswordpro/source/filter/xfilter/xfnumfmt.hxx | 13
lotuswordpro/source/filter/xfilter/xfofficemeta.hxx | 4
lotuswordpro/source/filter/xfilter/xfpadding.hxx | 5
lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 18
lotuswordpro/source/filter/xfilter/xfparastyle.hxx | 14
lotuswordpro/source/filter/xfilter/xfrect.hxx | 2
lotuswordpro/source/filter/xfilter/xfrow.cxx | 34
lotuswordpro/source/filter/xfilter/xfrow.hxx | 4
lotuswordpro/source/filter/xfilter/xfshadow.cxx | 12
lotuswordpro/source/filter/xfilter/xfshadow.hxx | 9
lotuswordpro/source/filter/xfilter/xfstylecont.cxx | 54
lotuswordpro/source/filter/xfilter/xfstylecont.hxx | 17
lotuswordpro/source/filter/xfilter/xfstylemanager.cxx | 76 -
lotuswordpro/source/filter/xfilter/xfstylemanager.hxx | 4
lotuswordpro/source/filter/xfilter/xftable.cxx | 57
lotuswordpro/source/filter/xfilter/xftable.hxx | 6
lotuswordpro/source/filter/xfilter/xftextcontent.cxx | 5
lotuswordpro/source/filter/xfilter/xftextcontent.hxx | 5
lotuswordpro/source/filter/xfilter/xftextspan.cxx | 26
lotuswordpro/source/filter/xfilter/xftextspan.hxx | 11
lotuswordpro/source/filter/xfilter/xftextstyle.cxx | 13
lotuswordpro/source/filter/xfilter/xftextstyle.hxx | 10
lotuswordpro/source/filter/xfilter/xftimestyle.cxx | 2
lotuswordpro/source/filter/xfilter/xftimestyle.hxx | 1
252 files changed, 3580 insertions(+), 2836 deletions(-)
New commits:
commit 9a7e17eb9ac951f1f6383c3e89ca5163932ec4fc
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu Mar 3 18:57:27 2016 +0100
Bump version to 4.3-12
Change-Id: Ia130f2700ae69e8e741509367d2bc254adfb9611
diff --git a/configure.ac b/configure.ac
index 9886a0d..3965d8c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([LibreOffice],[4.3.10.11],[],[],[https://libreoffice-from-collabora.com/])
+AC_INIT([LibreOffice],[4.3.10.12],[],[],[https://libreoffice-from-collabora.com/])
AC_PREREQ([2.59])
commit 6017be47f48c4808b7b74164e1fc290d1a9ed462
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 20 13:53:43 2015 +0100
libxslt: add patch for CVE-2015-7995
(cherry picked from commit 45d1abeff9d4041b3e174f0eddd10bfd6ab8a360)
Reviewed-on: https://gerrit.libreoffice.org/20097
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 17c513b7fca9304b635a57d11de77d7eccf7188a)
(cherry picked from commit 5cf00b458326204819332be4424acca16514a8c6)
Change-Id: I733cd21f6d8c7ea1e01f594d1483ad9c2043c188
diff --git a/external/libxslt/0001-Fix-for-type-confusion-in-preprocessing-attributes.patch.1 b/external/libxslt/0001-Fix-for-type-confusion-in-preprocessing-attributes.patch.1
new file mode 100644
index 0000000..4f87e79
--- /dev/null
+++ b/external/libxslt/0001-Fix-for-type-confusion-in-preprocessing-attributes.patch.1
@@ -0,0 +1,29 @@
+From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <veillard at redhat.com>
+Date: Thu, 29 Oct 2015 19:33:23 +0800
+Subject: [PATCH] Fix for type confusion in preprocessing attributes
+
+CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
+We need to check that the parent node is an element before dereferencing
+its namespace
+---
+ libxslt/preproc.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/libxslt/preproc.c b/libxslt/preproc.c
+index 0eb80a0..7f69325 100644
+--- a/libxslt/preproc.c
++++ b/libxslt/preproc.c
+@@ -2249,7 +2249,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
+ } else if (IS_XSLT_NAME(inst, "attribute")) {
+ xmlNodePtr parent = inst->parent;
+
+- if ((parent == NULL) || (parent->ns == NULL) ||
++ if ((parent == NULL) ||
++ (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
+ ((parent->ns != inst->ns) &&
+ (!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
+ (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {
+--
+2.4.3
+
diff --git a/external/libxslt/UnpackedTarball_xslt.mk b/external/libxslt/UnpackedTarball_xslt.mk
index fd4212e..e244ebc 100644
--- a/external/libxslt/UnpackedTarball_xslt.mk
+++ b/external/libxslt/UnpackedTarball_xslt.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,xslt,\
external/libxslt/libxslt-vc10.patch \
external/libxslt/libxslt-1.1.26-memdump.patch \
$(if $(filter ANDROID,$(OS)),external/libxslt/libxslt-android.patch) \
+ external/libxslt/0001-Fix-for-type-confusion-in-preprocessing-attributes.patch.1 \
))
# vim: set noet sw=4 ts=4:
commit 6e8a825701c6c8abeb05b836349ba14132f18cd9
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 20 13:50:51 2015 +0100
libxml2: upgrade to version 2.9.3
- drop libxml2-freebsd.patch.1 (upstream libtool 2.4.6 does the same)
- drop libxml2-vc15.patch (fixed upstream)
Reviewed-on: https://gerrit.libreoffice.org/20084
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 391bcf348d585b5e246ec808833af522edd371f2)
Change-Id: Ia2f194f39efebd3d2ea924d23a5543ac53e93116
Reviewed-on: https://gerrit.libreoffice.org/20096
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit d960a8b17b74417aa61ce226fced5b0fa185acf5)
(cherry picked from commit 4bf27ce7bc9116302ddbaf49d6771335b4e9abd0)
diff --git a/download.lst b/download.lst
index ad9af09..0c7187f 100644
--- a/download.lst
+++ b/download.lst
@@ -91,7 +91,7 @@ export LIBGLTF_MD5SUM := d63a9f47ab048f5009d90693d6aa6424
export LIBGLTF_TARBALL := libgltf-0.0.2.tar.bz2
export LIBLANGTAG_TARBALL := 36271d3fa0d9dec1632029b6d7aac925-liblangtag-0.5.1.tar.bz2
export LIBXMLSEC_TARBALL := 1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz
-export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz
+export LIBXML_TARBALL := daece17e045f1c107610e137ab50c179-libxml2-2.9.3.tar.gz
export LIBXSLT_TARBALL := 9667bf6f9310b957254fdcf6596600b7-libxslt-1.1.28.tar.gz
export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
export MARIADB_TARBALL := 05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2
diff --git a/external/libxml2/ExternalPackage_xml2.mk b/external/libxml2/ExternalPackage_xml2.mk
index a0bf5eb..3694937 100644
--- a/external/libxml2/ExternalPackage_xml2.mk
+++ b/external/libxml2/ExternalPackage_xml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
$(eval $(call gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
endif
else # OS!=WNT
-$(eval $(call gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.1))
+$(eval $(call gb_ExternalPackage_add_file,xml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.3))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxml2/UnpackedTarball_xml2.mk b/external/libxml2/UnpackedTarball_xml2.mk
index 9c53b1f..5cff2ae 100644
--- a/external/libxml2/UnpackedTarball_xml2.mk
+++ b/external/libxml2/UnpackedTarball_xml2.mk
@@ -13,7 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,xml2,$(LIBXML_TARBALL),,libxml2))
$(eval $(call gb_UnpackedTarball_add_patches,xml2,\
external/libxml2/libxml2-config.patch.1 \
- external/libxml2/libxml2-freebsd.patch.1 \
external/libxml2/libxml2-global-symbols.patch \
external/libxml2/libxml2-vc10.patch \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
diff --git a/external/libxml2/libxml2-freebsd.patch.1 b/external/libxml2/libxml2-freebsd.patch.1
deleted file mode 100644
index a874315..0000000
--- a/external/libxml2/libxml2-freebsd.patch.1
+++ /dev/null
@@ -1,15 +0,0 @@
-Usual patch to produce Linux-like .so files on FreeBSD
-
---- a/ltmain.sh 2009-10-06 17:39:54.000000000 +0100
-+++ b/ltmain.sh 2009-12-17 11:43:56.000000000 +0000
-@@ -6271,8 +6271,8 @@
- ;;
-
- freebsd-elf)
-- major=".$current"
-- versuffix=".$current"
-+ major=.`expr $current - $age`
-+ versuffix=".$major.$age.$revision";
- ;;
-
- irix | nonstopux)
diff --git a/external/libxml2/libxml2-icu.patch.0 b/external/libxml2/libxml2-icu.patch.0
index 4db9f9b..da05e40 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -3,7 +3,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
+++ win32/Makefile.msvc 2014-07-18 19:01:39.347982929 +0200
@@ -45,6 +45,7 @@ CPPFLAGS = $(CPPFLAGS) /D "_REENTRANT"
CC = cl.exe
- CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_CONFIG_H" /D "NOLIBTOOL" /W1 $(CRUNTIME)
+ CFLAGS = /nologo /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W1 $(CRUNTIME)
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
+CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n /I$(WORKDIR)/UnpackedTarball/icu/source/common
!if "$(WITH_THREADS)" != "no"
diff --git a/external/libxml2/libxml2-vc10.patch b/external/libxml2/libxml2-vc10.patch
index f88054e..f3f2b51 100644
--- a/external/libxml2/libxml2-vc10.patch
+++ b/external/libxml2/libxml2-vc10.patch
@@ -1,3 +1,5 @@
+Add SOLARINC, and disable SSE2 default for MSVC2012
+
--- build/libxml2-2.7.6/win32/Makefile.msvc.old 2010-09-20 20:22:41.500000000 +0200
+++ build/libxml2-2.7.6/win32/Makefile.msvc 2010-09-20 20:23:00.250000000 +0200
@@ -59,6 +59,7 @@
commit e6b4fced2ec19ff70a57139aee2cbcb4f8ba0559
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 1 17:15:39 2015 +0200
nss: upgrade to release 3.19.4
Change-Id: I303254d17450e5252b5d9e925082c39d0077654e
diff --git a/download.lst b/download.lst
index 33f0c46..ad9af09 100644
--- a/download.lst
+++ b/download.lst
@@ -103,7 +103,7 @@ export MWAW_TARBALL := libmwaw-0.3.1.tar.bz2
export MYSQLCPPCONN_TARBALL := 0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz
export MYTHES_TARBALL := 46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz
export NEON_TARBALL := ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz
-export NSS_TARBALL := b279551b7638d0e36d1199548124c247-nss-3.16.5-with-nspr-4.10.6.tar.gz
+export NSS_TARBALL := 478e0e90ebc4a90159549e77021021fd-nss-3.19.4-with-nspr-4.10.10.tar.gz
export ODFGEN_MD5SUM := c22c83c17cda0754382ada4e116594b7
export ODFGEN_TARBALL := libodfgen-0.1.1.tar.bz2
export OPENCOLLADA_MD5SUM := 4ca8a6ef0afeefc864e9ef21b9f14bd6
diff --git a/external/nss/ExternalPackage_nss.mk b/external/nss/ExternalPackage_nss.mk
index 26f9239..c6d8953fd 100644
--- a/external/nss/ExternalPackage_nss.mk
+++ b/external/nss/ExternalPackage_nss.mk
@@ -11,7 +11,9 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,nss,nss))
$(eval $(call gb_ExternalPackage_use_external_project,nss,nss))
-ifeq ($(OS),MACOSX)
+ifeq ($(OS),IOS)
+# nothing...
+else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_files,nss,$(LIBO_LIB_FOLDER),\
dist/out/lib/libfreebl3.dylib \
dist/out/lib/libnspr4.dylib \
@@ -24,7 +26,6 @@ $(eval $(call gb_ExternalPackage_add_files,nss,$(LIBO_LIB_FOLDER),\
dist/out/lib/libsmime3.dylib \
dist/out/lib/libsoftokn3.dylib \
dist/out/lib/libssl3.dylib \
- $(if $(filter 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),dist/out/lib/libsqlite3.dylib) \
))
else ifeq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_files,nss,$(LIBO_LIB_FOLDER),\
@@ -59,7 +60,9 @@ $(eval $(call gb_ExternalPackage_add_files,nss,$(LIBO_LIB_FOLDER),\
endif
ifeq ($(SYSTEM_CURL),)
-ifeq ($(OS),MACOSX)
+ifeq ($(OS),IOS)
+# nothing
+else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_files,nss,$(LIBO_LIB_FOLDER),\
dist/out/lib/libnsspem.dylib \
))
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index d88810f..17ea6f1 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -17,6 +17,8 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
$(call gb_ExternalProject_get_state_target,nss,configure):
$(call gb_ExternalProject_run,configure,\
$(if $(filter MSC,$(COM)),INCLUDE="$(COMPATH)/include" LIB="$(ILIB)") \
+ $(if $(CROSS_COMPILING),\
+ NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \
nspr/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter MSC-X86_64,$(COM)-$(CPUNAME)),--enable-64bit) \
@@ -59,14 +61,22 @@ else # OS!=WNT
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_ExternalProject_run,build,\
$(if $(filter FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
- $(if $(filter MACOSX,$(OS)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \
- $(if $(filter 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),,NSS_USE_SYSTEM_SQLITE=1)) \
+ $(if $(filter IOS,$(OS)),\
+ $(if $(filter arm64,$(CC)),USE_64=1)) \
+ $(if $(filter MACOSX,$(OS)),\
+ $(if $(filter-out POWERPC,$(CPUNAME)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH)) \
+ NSS_USE_SYSTEM_SQLITE=1) \
$(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
$(if $(CROSS_COMPILING),\
- $(if $(filter MACOSXPOWERPC,$(OS)$(CPUNAME)),CPU_ARCH=ppc) \
- NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \
+ $(if $(filter MACOSXPOWERPC,$(OS)$(CPUNAME)),CPU_ARCH=ppc) \
+ $(if $(filter IOS-ARM,$(OS)-$(CPUNAME)),CPU_ARCH=arm) \
+ NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \
NSDISTMODE=copy \
- $(MAKE) -j1 AR="$(AR)" RANLIB="$(RANLIB)" NMEDIT="$(NM)edit" nss_build_all \
+ $(MAKE) -j1 AR="$(AR)" \
+ RANLIB="$(RANLIB)" \
+ NMEDIT="$(NM)edit" \
+ $(if $(CROSS_COMPILING),NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)") \
+ nss_build_all \
&& rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \
$(if $(filter MACOSX,$(OS)),\
&& chmod u+w $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.dylib \
@@ -77,6 +87,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libnss3.dylib \
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libnssckbi.dylib \
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libnssdbm3.dylib \
+ $(gb_Package_SOURCEDIR_nss)/dist/out/lib/libnsspem.dylib \
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libnssutil3.dylib \
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libplc4.dylib \
$(gb_Package_SOURCEDIR_nss)/dist/out/lib/libplds4.dylib \
diff --git a/external/nss/Module_nss.mk b/external/nss/Module_nss.mk
index 5bc94e5..c1e1ab2 100644
--- a/external/nss/Module_nss.mk
+++ b/external/nss/Module_nss.mk
@@ -10,7 +10,7 @@
$(eval $(call gb_Module_Module,nss))
ifeq ($(SYSTEM_NSS),)
-ifeq ($(filter ANDROID IOS,$(OS)),)
+ifeq ($(filter ANDROID,$(OS)),)
$(eval $(call gb_Module_add_targets,nss,\
UnpackedTarball_nss \
ExternalPackage_nss \
diff --git a/external/nss/README b/external/nss/README
index a6392fe..89498a7 100644
--- a/external/nss/README
+++ b/external/nss/README
@@ -75,3 +75,19 @@ sqlite. Therefore we deliver it into lib/sqlite on unix systems.
See also issue:
[https://issues.apache.org/ooo/show_bug.cgi?id=106132]
+
+== system NSS on Linux ==
+
+Note that different Linux distributions use different SONAMEs for the
+NSS libraries, so it is not possible to use --with-system-nss and build
+a portable generic LO installation set, despite NSS upstream apparently
+maintaining ABI compatibility.
+
+Debian Squeeze:
+0x000000000000000e (SONAME) Library soname: [libnss3.so.1d]
+Fedora 20:
+0x000000000000000e (SONAME) Library soname: [libnss3.so]
+
+For the record, the LSB specified SONAME is libnss3.so
+http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libnss3.html
+
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index f335b27..d297ee4b 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -16,11 +16,17 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.aix.patch \
external/nss/nss-3.13.5-zlib-werror.patch \
external/nss/nss_macosx.patch \
- external/nss/nss-linux-x86.patch.0 \
- $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss.windows.patch) \
+ external/nss/nss-win32-make.patch.1 \
+ $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss.windows.patch \
+ external/nss/nss.vs2015.patch) \
$(if $(filter WNTGCC,$(OS)$(COM)),external/nss/nspr-4.9-build.patch.3 \
external/nss/nss-3.13.3-build.patch.3 \
external/nss/nss.mingw.patch.3) \
+ external/nss/ubsan.patch.0 \
+ $(if $(filter IOS,$(OS)), \
+ external/nss/nss-chromium-nss-static.patch \
+ external/nss/nss-more-static.patch \
+ external/nss/nss-ios.patch) \
))
# nss-pem is only needed for internal curl to read the NSS CA database
@@ -30,10 +36,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
))
endif
-ifeq ($(COM_GCC_IS_CLANG)$(filter -fsanitize=address,$(CC)),TRUE-fsanitize=address)
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
$(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/asan.patch.1 \
))
endif
+endif
# vim: set noet sw=4 ts=4:
diff --git a/external/nss/nss-chromium-nss-static.patch b/external/nss/nss-chromium-nss-static.patch
new file mode 100644
index 0000000..9d7a4e4
--- /dev/null
+++ b/external/nss/nss-chromium-nss-static.patch
@@ -0,0 +1,487 @@
+Based on http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/nss/patches/nss-static.patch
+
+--- a/a/nss/lib/certhigh/certvfy.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/certhigh/certvfy.c Fri May 31 17:44:06 2013 -0700
+@@ -13,9 +13,11 @@
+ #include "certdb.h"
+ #include "certi.h"
+ #include "cryptohi.h"
++#ifndef NSS_DISABLE_LIBPKIX
+ #include "pkix.h"
+ /*#include "pkix_sample_modules.h" */
+ #include "pkix_pl_cert.h"
++#endif /* NSS_DISABLE_LIBPKIX */
+
+
+ #include "nsspki.h"
+@@ -24,6 +26,47 @@
+ #include "pki3hack.h"
+ #include "base.h"
+
++#ifdef NSS_DISABLE_LIBPKIX
++SECStatus
++cert_VerifyCertChainPkix(
++ CERTCertificate *cert,
++ PRBool checkSig,
++ SECCertUsage requiredUsage,
++ PRTime time,
++ void *wincx,
++ CERTVerifyLog *log,
++ PRBool *pSigerror,
++ PRBool *pRevoked)
++{
++ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
++ return SECFailure;
++}
++
++SECStatus
++CERT_SetUsePKIXForValidation(PRBool enable)
++{
++ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
++ return SECFailure;
++}
++
++PRBool
++CERT_GetUsePKIXForValidation()
++{
++ return PR_FALSE;
++}
++
++SECStatus CERT_PKIXVerifyCert(
++ CERTCertificate *cert,
++ SECCertificateUsage usages,
++ CERTValInParam *paramsIn,
++ CERTValOutParam *paramsOut,
++ void *wincx)
++{
++ PORT_SetError(PR_NOT_IMPLEMENTED_ERROR);
++ return SECFailure;
++}
++#endif /* NSS_DISABLE_LIBPKIX */
++
+ /*
+ * Check the validity times of a certificate
+ */
+--- a/a/nss/lib/ckfw/nssck.api Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/ckfw/nssck.api Fri May 31 17:44:06 2013 -0700
+@@ -1752,7 +1752,7 @@
+ }
+ #endif /* DECLARE_STRICT_CRYPTOKI_NAMES */
+
+-static CK_RV CK_ENTRY
++CK_RV CK_ENTRY
+ __ADJOIN(MODULE_NAME,C_GetFunctionList)
+ (
+ CK_FUNCTION_LIST_PTR_PTR ppFunctionList
+@@ -1830,7 +1830,7 @@
+ __ADJOIN(MODULE_NAME,C_WaitForSlotEvent)
+ };
+
+-static CK_RV CK_ENTRY
++CK_RV CK_ENTRY
+ __ADJOIN(MODULE_NAME,C_GetFunctionList)
+ (
+ CK_FUNCTION_LIST_PTR_PTR ppFunctionList
+@@ -1840,6 +1840,8 @@
+ return CKR_OK;
+ }
+
++#define NSS_STATIC
++#ifndef NSS_STATIC
+ /* This one is always present */
+ CK_RV CK_ENTRY
+ C_GetFunctionList
+@@ -1849,6 +1850,7 @@
+ {
+ return __ADJOIN(MODULE_NAME,C_GetFunctionList)(ppFunctionList);
+ }
++#endif
+
+ #undef __ADJOIN
+
+--- a/a/nss/lib/freebl/rsa.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/freebl/rsa.c Fri May 31 17:44:06 2013 -0700
+@@ -1559,6 +1559,14 @@
+ RSA_Cleanup();
+ }
+
++#define NSS_STATIC
++#ifdef NSS_STATIC
++void
++BL_Unload(void)
++{
++}
++#endif
++
+ PRBool bl_parentForkedAfterC_Initialize;
+
+ /*
+--- a/a/nss/lib/freebl/shvfy.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/freebl/shvfy.c Fri May 31 17:44:06 2013 -0700
+@@ -273,9 +273,22 @@
+ return SECSuccess;
+ }
+
++/*
++ * Define PSEUDO_FIPS if you can't do FIPS software integrity test (e.g.,
++ * if you're using NSS as static libraries), but want to conform to the
++ * rest of the FIPS requirements.
++ */
++#define NSS_STATIC
++#ifdef NSS_STATIC
++#define PSEUDO_FIPS
++#endif
++
+ PRBool
+ BLAPI_SHVerify(const char *name, PRFuncPtr addr)
+ {
++#ifdef PSEUDO_FIPS
++ return PR_TRUE; /* a lie, hence *pseudo* FIPS */
++#else
+ PRBool result = PR_FALSE; /* if anything goes wrong,
+ * the signature does not verify */
+ /* find our shared library name */
+@@ -291,11 +303,15 @@
+ }
+
+ return result;
++#endif /* PSEUDO_FIPS */
+ }
+
+ PRBool
+ BLAPI_SHVerifyFile(const char *shName)
+ {
++#ifdef PSEUDO_FIPS
++ return PR_TRUE; /* a lie, hence *pseudo* FIPS */
++#else
+ char *checkName = NULL;
+ PRFileDesc *checkFD = NULL;
+ PRFileDesc *shFD = NULL;
+@@ -492,6 +508,7 @@
+ }
+
+ return result;
++#endif /* PSEUDO_FIPS */
+ }
+
+ PRBool
+--- a/a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c Fri May 31 17:44:06 2013 -0700
+@@ -201,7 +201,11 @@
+
+ typedef SECStatus (*pkix_DecodeCertsFunc)(char *certbuf, int certlen,
+ CERTImportCertificateFunc f, void *arg);
+-
++#define NSS_STATIC
++#ifdef NSS_STATIC
++extern SECStatus CERT_DecodeCertPackage(char* certbuf, int certlen,
++ CERTImportCertificateFunc f, void* arg);
++#endif
+
+ struct pkix_DecodeFuncStr {
+ pkix_DecodeCertsFunc func; /* function pointer to the
+@@ -223,6 +226,11 @@
+ */
+ static PRStatus PR_CALLBACK pkix_getDecodeFunction(void)
+ {
++#ifdef NSS_STATIC
++ pkix_decodeFunc.smimeLib = NULL;
++ pkix_decodeFunc.func = CERT_DecodeCertPackage;
++ return PR_SUCCESS;
++#else
+ pkix_decodeFunc.smimeLib =
+ PR_LoadLibrary(SHLIB_PREFIX"smime3."SHLIB_SUFFIX);
+ if (pkix_decodeFunc.smimeLib == NULL) {
+@@ -235,7 +243,7 @@
+ return PR_FAILURE;
+ }
+ return PR_SUCCESS;
+-
++#endif
+ }
+
+ /*
+--- a/a/nss/lib/nss/nssinit.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/nss/nssinit.c Fri May 31 17:44:06 2013 -0700
+@@ -20,9 +20,11 @@
+ #include "secerr.h"
+ #include "nssbase.h"
+ #include "nssutil.h"
++#ifndef NSS_DISABLE_LIBPKIX
+ #include "pkixt.h"
+ #include "pkix.h"
+ #include "pkix_tools.h"
++#endif /* NSS_DISABLE_LIBPKIX */
+
+ #include "pki3hack.h"
+ #include "certi.h"
+@@ -530,8 +532,10 @@
+ PRBool dontFinalizeModules)
+ {
+ SECStatus rv = SECFailure;
++#ifndef NSS_DISABLE_LIBPKIX
+ PKIX_UInt32 actualMinorVersion = 0;
+ PKIX_Error *pkixError = NULL;
++#endif
+ PRBool isReallyInitted;
+ char *configStrings = NULL;
+ char *configName = NULL;
+@@ -685,6 +689,7 @@
+ pk11sdr_Init();
+ cert_CreateSubjectKeyIDHashTable();
+
++#ifndef NSS_DISABLE_LIBPKIX
+ pkixError = PKIX_Initialize
+ (PKIX_FALSE, PKIX_MAJOR_VERSION, PKIX_MINOR_VERSION,
+ PKIX_MINOR_VERSION, &actualMinorVersion, &plContext);
+@@ -697,6 +702,7 @@
+ CERT_SetUsePKIXForValidation(PR_TRUE);
+ }
+ }
++#endif /* NSS_DISABLE_LIBPKIX */
+
+
+ }
+@@ -1081,7 +1087,9 @@
+ cert_DestroyLocks();
+ ShutdownCRLCache();
+ OCSP_ShutdownGlobal();
++#ifndef NSS_DISABLE_LIBPKIX
+ PKIX_Shutdown(plContext);
++#endif
+ SECOID_Shutdown();
+ status = STAN_Shutdown();
+ cert_DestroySubjectKeyIDHashTable();
+--- a/a/nss/lib/pk11wrap/pk11load.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/pk11wrap/pk11load.c Fri May 31 17:44:06 2013 -0700
+@@ -318,6 +318,13 @@
+ }
+ }
+
++#define NSS_STATIC
++#ifdef NSS_STATIC
++extern CK_RV NSC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
++extern CK_RV FC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
++extern char **NSC_ModuleDBFunc(unsigned long function,char *parameters, void *args);
++extern CK_RV builtinsC_GetFunctionList(CK_FUNCTION_LIST_PTR *pFunctionList);
++#else
+ static const char* my_shlib_name =
+ SHLIB_PREFIX"nss"SHLIB_VERSION"."SHLIB_SUFFIX;
+ static const char* softoken_shlib_name =
+@@ -326,12 +332,14 @@
+ static PRCallOnceType loadSoftokenOnce;
+ static PRLibrary* softokenLib;
+ static PRInt32 softokenLoadCount;
++#endif /* NSS_STATIC */
+
+ #include "prio.h"
+ #include "prprf.h"
+ #include <stdio.h>
+ #include "prsystem.h"
+
++#ifndef NSS_STATIC
+ /* This function must be run only once. */
+ /* determine if hybrid platform, then actually load the DSO. */
+ static PRStatus
+@@ -348,6 +356,7 @@
+ }
+ return PR_FAILURE;
+ }
++#endif /* !NSS_STATIC */
+
+ /*
+ * load a new module into our address space and initialize it.
+@@ -366,6 +375,16 @@
+
+ /* intenal modules get loaded from their internal list */
+ if (mod->internal && (mod->dllName == NULL)) {
++#ifdef NSS_STATIC
++ if (mod->isFIPS) {
++ entry = FC_GetFunctionList;
++ } else {
++ entry = NSC_GetFunctionList;
++ }
++ if (mod->isModuleDB) {
++ mod->moduleDBFunc = NSC_ModuleDBFunc;
++ }
++#else
+ /*
+ * Loads softoken as a dynamic library,
+ * even though the rest of NSS assumes this as the "internal" module.
+@@ -391,6 +410,7 @@
+ mod->moduleDBFunc = (CK_C_GetFunctionList)
+ PR_FindSymbol(softokenLib, "NSC_ModuleDBFunc");
+ }
++#endif
+
+ if (mod->moduleDBOnly) {
+ mod->loaded = PR_TRUE;
+@@ -401,6 +421,15 @@
+ if (mod->dllName == NULL) {
+ return SECFailure;
+ }
++#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
++ if (strstr(mod->dllName, "nssckbi") != NULL) {
++ mod->library = NULL;
++ PORT_Assert(!mod->moduleDBOnly);
++ entry = builtinsC_GetFunctionList;
++ PORT_Assert(!mod->isModuleDB);
++ goto library_loaded;
++ }
++#endif
+
+ /* load the library. If this succeeds, then we have to remember to
+ * unload the library if anything goes wrong from here on out...
+@@ -423,6 +452,9 @@
+ mod->moduleDBFunc = (void *)
+ PR_FindSymbol(library, "NSS_ReturnModuleSpecData");
+ }
++#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
++library_loaded:
++#endif
+ if (mod->moduleDBFunc == NULL) mod->isModuleDB = PR_FALSE;
+ if (entry == NULL) {
+ if (mod->isModuleDB) {
+@@ -562,6 +594,7 @@
+ * if not, we should change this to SECFailure and move it above the
+ * mod->loaded = PR_FALSE; */
+ if (mod->internal && (mod->dllName == NULL)) {
++#ifndef NSS_STATIC
+ if (0 == PR_ATOMIC_DECREMENT(&softokenLoadCount)) {
+ if (softokenLib) {
+ disableUnload = PR_GetEnv("NSS_DISABLE_UNLOAD");
+@@ -573,12 +606,18 @@
+ }
+ loadSoftokenOnce = pristineCallOnce;
+ }
++#endif
+ return SECSuccess;
+ }
+
+ library = (PRLibrary *)mod->library;
+ /* paranoia */
+ if (library == NULL) {
++#if defined(NSS_STATIC) && !defined(NSS_DISABLE_ROOT_CERTS)
++ if (strstr(mod->dllName, "nssckbi") != NULL) {
++ return SECSuccess;
++ }
++#endif
+ return SECFailure;
+ }
+
+--- a/a/nss/lib/softoken/lgglue.c Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/softoken/lgglue.c Fri May 31 17:44:06 2013 -0700
+@@ -23,6 +23,8 @@
+ static LGAddSecmodFunc legacy_glue_addSecmod = NULL;
+ static LGShutdownFunc legacy_glue_shutdown = NULL;
+
++#define NSS_STATIC
++#ifndef NSS_STATIC
+ /*
+ * The following 3 functions duplicate the work done by bl_LoadLibrary.
+ * We should make bl_LoadLibrary a global and replace the call to
+@@ -160,6 +161,7 @@
+
+ return lib;
+ }
++#endif /* STATIC LIBRARIES */
+
+ /*
+ * stub files for legacy db's to be able to encrypt and decrypt
+@@ -272,6 +274,21 @@
+ return SECSuccess;
+ }
+
++#ifdef NSS_STATIC
++#ifdef NSS_DISABLE_DBM
++ return SECFailure;
++#else
++ lib = (PRLibrary *) 0x8;
++
++ legacy_glue_open = legacy_Open;
++ legacy_glue_readSecmod = legacy_ReadSecmodDB;
++ legacy_glue_releaseSecmod = legacy_ReleaseSecmodDBData;
++ legacy_glue_deleteSecmod = legacy_DeleteSecmodDB;
++ legacy_glue_addSecmod = legacy_AddSecmodDB;
++ legacy_glue_shutdown = legacy_Shutdown;
++ setCryptFunction = legacy_SetCryptFunctions;
++#endif
++#else
+ lib = sftkdb_LoadLibrary(LEGACY_LIB_NAME);
+ if (lib == NULL) {
+ return SECFailure;
+@@ -297,11 +314,14 @@
+ PR_UnloadLibrary(lib);
+ return SECFailure;
+ }
++#endif /* NSS_STATIC */
+
+ /* verify the loaded library if we are in FIPS mode */
+ if (isFIPS) {
+ if (!BLAPI_SHVerify(LEGACY_LIB_NAME,(PRFuncPtr)legacy_glue_open)) {
++#ifndef NSS_STATIC
+ PR_UnloadLibrary(lib);
++#endif
+ return SECFailure;
+ }
+ legacy_glue_libCheckSucceeded = PR_TRUE;
+@@ -418,10 +438,12 @@
+ #endif
+ crv = (*legacy_glue_shutdown)(parentForkedAfterC_Initialize);
+ }
++#ifndef NSS_STATIC
+ disableUnload = PR_GetEnv("NSS_DISABLE_UNLOAD");
+ if (!disableUnload) {
+ PR_UnloadLibrary(legacy_glue_lib);
+ }
++#endif
+ legacy_glue_lib = NULL;
+ legacy_glue_open = NULL;
+ legacy_glue_readSecmod = NULL;
+--- a/a/nss/lib/softoken/lgglue.h Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/softoken/lgglue.h Fri May 31 17:44:06 2013 -0700
+@@ -38,6 +38,25 @@
+ typedef void (*LGSetForkStateFunc)(PRBool);
+ typedef void (*LGSetCryptFunc)(LGEncryptFunc, LGDecryptFunc);
+
++extern CK_RV legacy_Open(const char *dir, const char *certPrefix,
++ const char *keyPrefix,
++ int certVersion, int keyVersion, int flags,
++ SDB **certDB, SDB **keyDB);
++extern char ** legacy_ReadSecmodDB(const char *appName,
++ const char *filename,
++ const char *dbname, char *params, PRBool rw);
++extern SECStatus legacy_ReleaseSecmodDBData(const char *appName,
++ const char *filename,
++ const char *dbname, char **params, PRBool rw);
++extern SECStatus legacy_DeleteSecmodDB(const char *appName,
++ const char *filename,
++ const char *dbname, char *params, PRBool rw);
++extern SECStatus legacy_AddSecmodDB(const char *appName,
++ const char *filename,
++ const char *dbname, char *params, PRBool rw);
++extern SECStatus legacy_Shutdown(PRBool forked);
++extern void legacy_SetCryptFunctions(LGEncryptFunc, LGDecryptFunc);
++
+ /*
+ * Softoken Glue Functions
+ */
+--- a/a/nss/lib/util/secport.h Tue May 28 23:37:46 2013 +0200
++++ a/a/nss/lib/util/secport.h Fri May 31 17:44:06 2013 -0700
+@@ -210,6 +210,8 @@
+
+ extern int NSS_SecureMemcmp(const void *a, const void *b, size_t n);
+
++#define NSS_STATIC
++#ifndef NSS_STATIC
+ /*
+ * Load a shared library called "newShLibName" in the same directory as
+ * a shared library that is already loaded, called existingShLibName.
+@@ -244,6 +245,7 @@
+ PORT_LoadLibraryFromOrigin(const char* existingShLibName,
+ PRFuncPtr staticShLibFunc,
+ const char *newShLibName);
++#endif /* NSS_STATIC */
+
+ SEC_END_PROTOS
+
diff --git a/external/nss/nss-ios.patch b/external/nss/nss-ios.patch
new file mode 100644
index 0000000..d4107d7
--- /dev/null
+++ b/external/nss/nss-ios.patch
@@ -0,0 +1,112 @@
+--- a/a/nspr/config/autoconf.mk.in
++++ a/a/nspr/config/autoconf.mk.in
+@@ -67,7 +67,7 @@
+ MSC_VER = @MSC_VER@
+ AR = @AR@
+ AR_FLAGS = @AR_FLAGS@
+-LD = @LD@
++LD = echo
+ RANLIB = @RANLIB@
+ PERL = @PERL@
+ RC = @RC@
+--- a/a/nspr/configure
++++ a/a/nspr/configure
+@@ -755,7 +755,7 @@
+ OBJDIR='$(OBJDIR_NAME)'
+ OBJDIR_NAME=.
+ OBJDIR_SUFFIX=OBJ
+-NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
++NSINSTALL=${NSINSTALL?'$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'}
+ NOSUCHFILE=/no-such-file
+ LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
+ LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
+@@ -3060,7 +3060,7 @@
+ LIB_SUFFIX=a
+ DLL_SUFFIX=so
+ ASM_SUFFIX=s
+-MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
++MKSHLIB='touch $@; echo'
+ PR_MD_ASFILES=
+ PR_MD_CSRCS=
+ PR_MD_ARCH_DIR=unix
+@@ -3904,7 +3904,7 @@
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
+ _OPTIMIZE_FLAGS=-O2
+- MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
++ MKSHLIB=touch $@
+ STRIP="$STRIP -x -S"
+ DLL_SUFFIX=dylib
+ USE_PTHREADS=1
+--- a/a/nss/coreconf/ruleset.mk
++++ a/a/nss/coreconf/ruleset.mk
+@@ -68,7 +68,7 @@
+ endif
+
+ ifeq ($(MKPROG),)
+- MKPROG = $(CC)
++ MKPROG = touch $@; echo
+ endif
+
+ #
+--- a/a/nss/coreconf/Darwin.mk
++++ a/a/nss/coreconf/Darwin.mk
+@@ -124,7 +124,7 @@
+ # May override this with -bundle to create a loadable module.
+ DSO_LDOPTS = -dynamiclib $(DARWIN_DYLIB_VERSIONS) -install_name @__________________________________________________OOO/$(notdir $@) -headerpad_max_install_names
+
+-MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
++MKSHLIB = touch $@; echo
+ DLL_SUFFIX = dylib
+ ifdef MAPFILE
+ MKSHLIB += -exported_symbols_list $(MAPFILE)
+--- a/a/nss/coreconf/UNIX.mk
++++ a/a/nss/coreconf/UNIX.mk
+@@ -21,10 +21,14 @@
+
+ ifdef BUILD_TREE
+ NSINSTALL_DIR = $(BUILD_TREE)/nss
++ifndef NSINSTALL
+ NSINSTALL = $(BUILD_TREE)/nss/nsinstall
++endif
+ else
+ NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
++ifndef NSINSTALL
+ NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
++endif
+ endif
+
+ MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
+--- a/a/nspr/pr/include/md/_darwin.h
++++ a/a/nspr/pr/include/md/_darwin.h
+@@ -26,6 +26,8 @@
+ #define _PR_SI_ARCHITECTURE "ppc"
+ #elif defined(__arm__)
+ #define _PR_SI_ARCHITECTURE "arm"
++#elif defined(__arm64__)
++#define _PR_SI_ARCHITECTURE "arm64"
+ #elif defined(__aarch64__)
+ #define _PR_SI_ARCHITECTURE "aarch64"
+ #else
+--- a/a/nspr/pr/src/Makefile.in
++++ a/a/nspr/pr/src/Makefile.in
+@@ -180,7 +180,7 @@
+ endif
+
+ ifeq ($(OS_TARGET),MacOSX)
+-OS_LIBS = -framework CoreServices -framework CoreFoundation
++OS_LIBS = -framework CoreFoundation
+ endif
+
+ EXTRA_LIBS += $(OS_LIBS)
+--- a/a/nss/cmd/shlibsign/sign.sh
++++ a/a/nss/cmd/shlibsign/sign.sh
+@@ -2,6 +2,8 @@
+ # 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/.
++
++exit 0
+
+ # arguments:
+ # 1: full path to DIST/OBJDIR (parent dir of "lib")
diff --git a/external/nss/nss-linux-x86.patch.0 b/external/nss/nss-linux-x86.patch.0
deleted file mode 100644
index 95a489b..0000000
--- a/external/nss/nss-linux-x86.patch.0
+++ /dev/null
@@ -1,10 +0,0 @@
---- nss/lib/freebl/Makefile 2014-09-29 16:52:50.356265282 +0100
-+++ nss/lib/freebl/Makefile 2014-09-29 16:53:01.823340024 +0100
-@@ -110,6 +110,7 @@
- ifeq (OS2,$(OS_TARGET))
- ASFILES = mpi_x86_os2.s
- DEFINES += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE
-+ DEFINES += -DMP_USE_UINT_DIGIT
- DEFINES += -DMP_ASSEMBLY_DIV_2DX1D
- DEFINES += -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
- DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
diff --git a/external/nss/nss-more-static.patch b/external/nss/nss-more-static.patch
new file mode 100644
index 0000000..6b06a4e
--- /dev/null
+++ b/external/nss/nss-more-static.patch
@@ -0,0 +1,39 @@
+--- a/a/nss/lib/freebl/loader.c
++++ a/a/nss/lib/freebl/loader.c
+@@ -114,6 +114,7 @@
+
+ #include "genload.c"
+
++extern FREEBLGetVectorFn FREEBL_GetVector;
+ /* This function must be run only once. */
+ /* determine if hybrid platform, then actually load the DSO. */
+ static PRStatus
+@@ -136,9 +136,9 @@
+ return PR_FAILURE;
+ }
+
+- handle = loader_LoadLibrary(name);
+- if (handle) {
+- PRFuncPtr address = PR_FindFunctionSymbol(handle, "FREEBL_GetVector");
++ handle = 0;
++ {
++ PRFuncPtr address = FREEBL_GetVector;
+ PRStatus status;
+ if (address) {
+ FREEBLGetVectorFn * getVector = (FREEBLGetVectorFn *)address;
+@@ -887,6 +887,7 @@
+ void
+ BL_Unload(void)
+ {
++#if 0
+ /* This function is not thread-safe, but doesn't need to be, because it is
+ * only called from functions that are also defined as not thread-safe,
+ * namely C_Finalize in softoken, and the SSL bypass shutdown callback called
+@@ -905,6 +905,7 @@
+ blLib = NULL;
+ }
+ loadFreeBLOnce = pristineCallOnce;
++#endif
+ }
+
+ /* ============== New for 3.003 =============================== */
diff --git a/external/nss/nss-win32-make.patch.1 b/external/nss/nss-win32-make.patch.1
new file mode 100644
index 0000000..bc5a759
--- /dev/null
+++ b/external/nss/nss-win32-make.patch.1
@@ -0,0 +1,20 @@
+--- nss/nss/coreconf/rules.mk.orig2 2014-06-03 15:30:01.667200000 +0200
++++ nss/nss/coreconf/rules.mk 2014-06-03 15:30:14.537200000 +0200
+@@ -259,7 +259,7 @@
+ @$(MAKE_OBJDIR)
+ rm -f $@
+ ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
+- $(AR) $(subst /,\\,$(OBJS))
++ $(AR) $(OBJS)
+ else
+ $(AR) cr $@ $(OBJS)
+ endif
+@@ -297,7 +297,7 @@
+ ifdef NS_USE_GCC
+ $(LINK_DLL) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)
+ else
+- $(LINK_DLL) -MAP $(DLLBASE) $(subst /,\\,$(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES))
++ $(LINK_DLL) -MAP $(DLLBASE) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)
+ ifdef MT
+ if test -f $@.manifest; then \
+ $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index 6a01ca8..e555d6e 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -50,8 +50,8 @@ diff -ru a/nss/coreconf/arch.mk b/nss/coreconf/arch.mk
-OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+# OBJDIR_NAME is used to build the directory containing the built objects, for
+# example mozilla/dist/Linux2.6_x86_glibc_PTH_DBG.OBJ
-+# We need to deliver the contents of that folder into the solver. To make that easier
-+# in the makefile we rename this directory to "out".
++# We need to deliver the contents of that folder into instdir. To make that
++# easier in the makefile we rename this directory to "out".
+#OBJDIR_NAME = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(COMPILER_TAG)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+OBJDIR_NAME = out
@@ -105,7 +105,7 @@ diff -ru a/nss/coreconf/Linux.mk b/nss/coreconf/Linux.mk
+ifneq ($(SYSTEM_ZLIB),)
+# Currently (3.12.4) only the tools modutil and signtool are linked with libz
+# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
-+# is also build in nss.
++# is also built in nss.
USE_SYSTEM_ZLIB = 1
ZLIB_LIBS = -lz
+endif
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
new file mode 100755
index 0000000..42a325d
--- /dev/null
+++ b/external/nss/nss.vs2015.patch
@@ -0,0 +1,12 @@
+diff -ru nss.orig/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
+--- foo/nss.orig/nss/coreconf/WIN32.mk 2015-06-17 20:26:43.000000000 +0200
++++ foo/nss/nss/coreconf/WIN32.mk 2015-08-31 20:40:40.146490300 +0200
+@@ -192,7 +192,7 @@
+ ifneq ($(_MSC_VER),$(_MSC_VER_6))
+ # Convert certain deadly warnings to errors (see list at end of file)
+ OS_CFLAGS += -we4002 -we4003 -we4004 -we4006 -we4009 -we4013 \
+- -we4015 -we4028 -we4033 -we4035 -we4045 -we4047 -we4053 -we4054 -we4063 \
++ -we4015 -we4028 -we4033 -we4035 -we4045 -we4047 -we4053 -we4063 \
+ -we4064 -we4078 -we4087 -we4090 -we4098 -we4390 -we4551 -we4553 -we4715
+
+ ifeq ($(_MSC_VER_GE_12),1)
diff --git a/external/nss/nss.windows.patch b/external/nss/nss.windows.patch
index e94b3dd..9464bb1 100644
--- a/external/nss/nss.windows.patch
+++ b/external/nss/nss.windows.patch
@@ -20,3 +20,14 @@
$(OBJDIR)/$(PROG_PREFIX)%$(OBJ_SUFFIX): %.c
@$(MAKE_OBJDIR)
+--- a/a/nspr/pr/include/md/_win95.h
++++ b/b/nspr/pr/include/md/_win95.h
+@@ -312,7 +312,7 @@
+ #define _MD_ATOMIC_ADD(ptr,val) (InterlockedExchangeAdd((PLONG)ptr, (LONG)val) + val)
+ #define _MD_ATOMIC_DECREMENT(x) InterlockedDecrement((PLONG)x)
+ #endif /* x86 */
+-#define _MD_ATOMIC_SET(x,y) InterlockedExchange((PLONG)x, (LONG)y)
++#define _MD_ATOMIC_SET(x,y) _InterlockedExchange((PLONG)x, (LONG)y)
+
+ #define _MD_INIT_IO _PR_MD_INIT_IO
+
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 7c099bc..40d02c9 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -28,7 +28,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
RANLIB = ranlib
ifndef CPU_ARCH
-@@ -57,19 +57,25 @@
+@@ -19,11 +23,15 @@
ifeq (,$(filter-out i%86,$(CPU_ARCH)))
ifdef USE_64
@@ -44,17 +44,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
override CPU_ARCH = x86
endif
else
- ifeq (arm,$(CPU_ARCH))
- # Nothing set for arm currently.
- else
- OS_REL_CFLAGS = -Dppc
-+ifeq (,$(findstring -arch ,$(CC)))
- CC += -arch ppc
-+endif
- endif
- endif
-
-@@ -64,12 +64,16 @@
+@@ -31,12 +39,16 @@
endif
ifneq (,$(MACOS_SDK_DIR))
@@ -72,7 +62,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
# GCC <= 3
DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))
-@@ -150,7 +150,7 @@
+@@ -104,7 +115,7 @@
# May override this with different compatibility and current version numbers.
DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
# May override this with -bundle to create a loadable module.
diff --git a/external/nss/ubsan.patch.0 b/external/nss/ubsan.patch.0
new file mode 100644
index 0000000..956e07b
--- /dev/null
+++ b/external/nss/ubsan.patch.0
@@ -0,0 +1,24 @@
+--- nss/lib/certdb/crl.c
++++ nss/lib/certdb/crl.c
+@@ -2150,7 +2150,7 @@
+ return SECSuccess;
+ }
+ /* all CRLs are good, sort them by thisUpdate */
+- qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*),
++ if (cache->ncrls != 0) qsort(cache->crls, cache->ncrls, sizeof(CachedCrl*),
+ SortCRLsByThisUpdate);
+
+ if (cache->ncrls)
+--- nss/lib/libpkix/pkix/util/pkix_tools.h
++++ nss/lib/libpkix/pkix/util/pkix_tools.h
+@@ -1458,8 +1458,8 @@
+
+ extern PRLogModuleInfo *pkixLog;
+
+-#define PKIX_MAGIC_HEADER LL_INIT(0xFEEDC0FF, 0xEEFACADE)
+-#define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00D, 0xDEADBEEF)
++#define PKIX_MAGIC_HEADER LL_INIT(0xFEEDC0FFU, 0xEEFACADEU)
++#define PKIX_MAGIC_HEADER_DESTROYED LL_INIT(0xBAADF00DU, 0xDEADBEEFU)
+
+ /* see source file for function documentation */
+
commit 0024b47f89c3a55bea0363328882ebd7dffb312b
Author: Andras Timar <andras.timar at collabora.com>
Date: Thu Mar 3 18:56:57 2016 +0100
Backported lwp fixes
Change-Id: I09d592bbbbf5d13d0adad341a57cb1b77abf0d11
diff --git a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
index 17b4f2b..74d0a6f 100644
--- a/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
+++ b/lotuswordpro/CppunitTest_lotuswordpro_test_lotuswordpro.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_api,lotuswordpro_test_lotuswordpro,\
))
$(eval $(call gb_CppunitTest_use_ure,lotuswordpro_test_lotuswordpro))
+$(eval $(call gb_CppunitTest_use_vcl,lotuswordpro_test_lotuswordpro))
$(eval $(call gb_CppunitTest_use_components,lotuswordpro_test_lotuswordpro,\
configmgr/source/configmgr \
diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk
index 8cc8b96..1ed0483 100644
--- a/lotuswordpro/Library_lwpft.mk
+++ b/lotuswordpro/Library_lwpft.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\
cppu \
cppuhelper \
sal \
+ salhelper \
i18nlangtag \
sfx \
sot \
diff --git a/lotuswordpro/inc/pch/precompiled_lwpft.hxx b/lotuswordpro/inc/pch/precompiled_lwpft.hxx
index 1892816..b2ed5ce 100644
--- a/lotuswordpro/inc/pch/precompiled_lwpft.hxx
+++ b/lotuswordpro/inc/pch/precompiled_lwpft.hxx
@@ -58,6 +58,7 @@
#include <rtl/textenc.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
+#include <sal/config.h>
#include <sal/macros.h>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index a1ce6d2..1fd2937 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -180,22 +180,16 @@ OUString LotusWordProImportFilter_getImplementationName ()
return OUString ( "com.sun.star.comp.Writer.LotusWordProImportFilter" );
}
-#define SERVICE_NAME1 "com.sun.star.document.ImportFilter"
-#define SERVICE_NAME2 "com.sun.star.document.ExtendedTypeDetection"
-
Sequence< OUString > SAL_CALL LotusWordProImportFilter_getSupportedServiceNames( )
throw (RuntimeException)
{
Sequence < OUString > aRet(2);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString ( SERVICE_NAME1 );
- pArray[1] = OUString ( SERVICE_NAME2 );
+ pArray[0] = "com.sun.star.document.ImportFilter";
+ pArray[1] = "com.sun.star.document.ExtendedTypeDetection";
return aRet;
}
-#undef SERVICE_NAME2
-#undef SERVICE_NAME1
-
uno::Reference< XInterface > SAL_CALL LotusWordProImportFilter_createInstance( const uno::Reference< XMultiServiceFactory > & rSMgr)
throw( Exception )
{
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 1033f67..2edbfe6 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -56,6 +56,7 @@
#include "first.hxx"
#include "assert.h"
#include <stdio.h>
+#include <osl/diagnose.h>
#include <sot/storinfo.hxx>
namespace OpenStormBento
{
@@ -90,15 +91,9 @@ sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer
*ppContainer = pContainer;
return BenErr_OK;
}
-BenError
-LtcBenContainer::Close()
-{
- return BenErr_OK;
-}
LtcBenContainer::~LtcBenContainer()
{
- Close();
}
BenError
@@ -117,7 +112,7 @@ BenError
LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName)
{
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt;
+ pCUtListElmt pPrevNamedObjectListElmt;
pCBenNamedObject pNamedObject = FindNamedObject(&cNamedObjects,
sPropertyName, &pPrevNamedObjectListElmt);
@@ -125,16 +120,16 @@ LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
{
if (! pNamedObject->IsPropertyName())
return BenErr_NameConflict;
- else *ppPropertyName = (pCBenPropertyName) pNamedObject;
+ else *ppPropertyName = static_cast<pCBenPropertyName>(pNamedObject);
}
else
{
- pCBenIDListElmt pPrevObject;
+ pCUtListElmt pPrevObject;
if (FindID(&cObjects, cNextAvailObjectID, &pPrevObject) != NULL)
return BenErr_DuplicateObjectID;
*ppPropertyName = new CBenPropertyName(this, cNextAvailObjectID,
- (pCBenObject) pPrevObject, sPropertyName, pPrevNamedObjectListElmt);
+ static_cast<pCBenObject>(pPrevObject), sPropertyName, pPrevNamedObjectListElmt);
++cNextAvailObjectID;
}
@@ -144,7 +139,7 @@ LtcBenContainer::RegisterPropertyName(const char * sPropertyName,
pCBenObject
LtcBenContainer::GetNextObject(pCBenObject pCurrObject)
{
- return (pCBenObject) cObjects.GetNextOrNULL(pCurrObject);
+ return static_cast<pCBenObject>(cObjects.GetNextOrNULL(pCurrObject));
}
pCBenObject
@@ -236,7 +231,7 @@ BenError LtcBenContainer::SeekFromEnd(long Offset)
*/
LtcUtBenValueStream * LtcBenContainer::FindNextValueStreamWithPropertyName(const char * sPropertyName, LtcUtBenValueStream * pCurrentValueStream)
{
- CBenPropertyName * pPropertyName;
+ CBenPropertyName * pPropertyName(nullptr);
RegisterPropertyName(sPropertyName, &pPropertyName); // Get property name object
if (NULL == pPropertyName)
diff --git a/lotuswordpro/source/filter/benlist.cxx b/lotuswordpro/source/filter/benlist.cxx
index c2ec123..17acf19 100644
--- a/lotuswordpro/source/filter/benlist.cxx
+++ b/lotuswordpro/source/filter/benlist.cxx
@@ -59,14 +59,14 @@ namespace OpenStormBento
pCBenNamedObject
FindNamedObject(pCUtList pList, const char * sName,
- pCBenNamedObjectListElmt * ppPrev)
+ pCUtListElmt * ppPrev)
{
- pCUtListElmt pTerminating = pList->GetTerminating();
- for (pCUtListElmt pCurr = pList->GetLast(); pCurr != pTerminating;
+ CUtListElmt& rTerminating = pList->GetTerminating();
+ for (pCUtListElmt pCurr = pList->GetLast(); pCurr != &rTerminating;
pCurr = pCurr->GetPrev())
{
pCBenNamedObjectListElmt pCurrNamedObjectListElmt =
- (pCBenNamedObjectListElmt) pCurr;
+ static_cast<pCBenNamedObjectListElmt>(pCurr);
int Comp = strcmp(sName, pCurrNamedObjectListElmt->GetNamedObject()->
GetNameCStr());
@@ -84,19 +84,19 @@ FindNamedObject(pCUtList pList, const char * sName,
}
if (ppPrev != NULL)
- *ppPrev = (pCBenNamedObjectListElmt) pTerminating;
+ *ppPrev = &rTerminating;
return NULL;
}
// Assume list is of BenIDListElmt list elements, sorted by ID
pCBenIDListElmt
-FindID(pCUtList pList, BenObjectID ObjectID, pCBenIDListElmt * ppPrev)
+FindID(pCUtList pList, BenObjectID ObjectID, pCUtListElmt * ppPrev)
{
- pCUtListElmt pTerminating = pList->GetTerminating();
- for (pCUtListElmt pCurr = pList->GetLast(); pCurr != pTerminating;
+ CUtListElmt& rTerminating = pList->GetTerminating();
+ for (pCUtListElmt pCurr = pList->GetLast(); pCurr != &rTerminating;
pCurr = pCurr->GetPrev())
{
- pCBenIDListElmt pCurrIDListElmt = (pCBenIDListElmt) pCurr;
+ pCBenIDListElmt pCurrIDListElmt = static_cast<pCBenIDListElmt>(pCurr);
if (ObjectID == pCurrIDListElmt->GetID())
return pCurrIDListElmt;
@@ -111,7 +111,7 @@ FindID(pCUtList pList, BenObjectID ObjectID, pCBenIDListElmt * ppPrev)
}
if (ppPrev != NULL)
- *ppPrev = (pCBenIDListElmt) pTerminating;
+ *ppPrev = &rTerminating;
return NULL;
}
} //end namespace OpenStormBento
diff --git a/lotuswordpro/source/filter/benname.cxx b/lotuswordpro/source/filter/benname.cxx
index 24806ad..b8ecab7 100644
--- a/lotuswordpro/source/filter/benname.cxx
+++ b/lotuswordpro/source/filter/benname.cxx
@@ -59,7 +59,7 @@ namespace OpenStormBento
// changed to remove warning
CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt)
+ pCUtListElmt pPrevNamedObjectListElmt)
: CBenObject(pContainer, ObjectID, pPrevObject)
, csName(sName)
, cNameListElmt(pPrevNamedObjectListElmt)
diff --git a/lotuswordpro/source/filter/benobj.cxx b/lotuswordpro/source/filter/benobj.cxx
index 4193a6f..3bba37a 100644
--- a/lotuswordpro/source/filter/benobj.cxx
+++ b/lotuswordpro/source/filter/benobj.cxx
@@ -66,8 +66,8 @@ CBenObject::IsNamedObject()
pCBenProperty
CBenObject::UseProperty(BenObjectID PropertyID)
{
- pCBenIDListElmt pPrev;
- return (pCBenProperty) FindID(&cProperties, PropertyID, &pPrev);
+ pCUtListElmt pPrev;
+ return static_cast<pCBenProperty>( FindID(&cProperties, PropertyID, &pPrev) );
}
pCBenValue
@@ -76,7 +76,7 @@ CBenObject::UseValue(BenObjectID PropertyID)
pCBenProperty pProperty = UseProperty(PropertyID);
if (pProperty == NULL)
return NULL;
- return pProperty->UseValue();
+ return &pProperty->UseValue();
}
}// end namespace OpenStormBento
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index 1940e16..dcd5acf 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -144,7 +144,7 @@ sal_uLong BenOpenContainer(LwpSvStream * pStream, pLtcBenContainer * ppContainer
class CBenIDListElmt : public CUtListElmt
{
public: // Internal methods
- CBenIDListElmt(BenObjectID ID, pCBenIDListElmt pPrev) : CUtListElmt(pPrev)
+ CBenIDListElmt(BenObjectID ID, pCUtListElmt pPrev) : CUtListElmt(pPrev)
{ cID = ID; }
CBenIDListElmt(BenObjectID ID) { cID = ID; }
BenObjectID GetID() { return cID; }
@@ -157,7 +157,7 @@ class CBenNamedObjectListElmt : public CUtListElmt
{
public: // Methods
// added to remove warning
- CBenNamedObjectListElmt(pCBenNamedObjectListElmt pPrev) : CUtListElmt(pPrev)
+ CBenNamedObjectListElmt(pCUtListElmt pPrev) : CUtListElmt(pPrev)
{ cpNamedObject = NULL; }
void SetNamedObject(pCBenNamedObject pObj)
{
@@ -204,7 +204,6 @@ class LtcBenContainer
{
public:
BenError Open();
- BenError Close();
BenError RegisterPropertyName(const char * sPropertyName,
pCBenPropertyName * ppPropertyName);
// Pass NULL to begin iteration. Done when returns NULL.
@@ -225,8 +224,8 @@ public: // Internal methods
BenObjectID GetNextAvailObjectID() { return cNextAvailObjectID; }
void SetNextAvailObjectID(BenObjectID ID) { cNextAvailObjectID = ID; }
- pCUtList GetObjects() { return &cObjects; }
- pCUtList GetNamedObjects() { return &cNamedObjects; }
+ CUtList& GetObjects() { return cObjects; }
+ CUtList& GetNamedObjects() { return cNamedObjects; }
LtcUtBenValueStream * FindNextValueStreamWithPropertyName(const char * sPropertyName, LtcUtBenValueStream * pCurrentValueStream);
LtcUtBenValueStream * FindValueStreamWithPropertyName(const char * sPropertyName);
@@ -255,9 +254,9 @@ public:
BenObjectID GetObjectID() { return GetID(); }
public: // Internal methods
CBenObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
- pCBenIDListElmt pPrev) : CBenIDListElmt(ObjectID, pPrev)
+ pCUtListElmt pPrev) : CBenIDListElmt(ObjectID, pPrev)
{ cpContainer = pContainer; }
- pCUtList GetProperties() { return &cProperties; }
+ CUtList& GetProperties() { return cProperties; }
private: // Data
pLtcBenContainer cpContainer;
@@ -296,9 +295,7 @@ public: // Internal methods
inline pCBenValueSegment GetNextValueSegment(pCBenValueSegment
pCurrValueSegment);
inline pLtcBenContainer GetContainer();
- pCUtList GetValueSegments() { return &cValueSegments; }
- // Currently, no generation support
- BenGeneration GetGeneration() { return 1; }
+ CUtList& GetValueSegments() { return cValueSegments; }
private: // Data
pCBenProperty cpProperty;
@@ -313,14 +310,14 @@ public:
// different type. But we never use it that way, so in this code a
// property has exactly one value
- pCBenValue UseValue() { return &cValue; }
+ CBenValue& UseValue() { return cValue; }
pCBenObject GetBenObject() { return cpObject; }
pLtcBenContainer GetContainer() { return GetBenObject()->GetContainer(); }
public: // Internal methods
// changed to remove WARNING here
CBenProperty(pCBenObject pObject, BenObjectID PropertyID,
- BenObjectID TypeID, pCBenIDListElmt pPrevProperty) :
+ BenObjectID TypeID, pCUtListElmt pPrevProperty) :
CBenIDListElmt(PropertyID, pPrevProperty), cValue(TypeID)
{
cpObject = pObject;
@@ -351,11 +348,11 @@ class CBenValueSegment : public CUtListElmt
{
public: // Internal methods
CBenValueSegment(pCBenValue pValue, BenContainerPos Pos,
- unsigned long Size) : CUtListElmt(pValue->GetValueSegments())
+ unsigned long Size) : CUtListElmt(&pValue->GetValueSegments())
{ cpValue = pValue; cImmediate = false; cPos = Pos;
cSize = Size; }
CBenValueSegment(pCBenValue pValue, BenConstDataPtr pImmData,
- unsigned short Size) : CUtListElmt(pValue->GetValueSegments())
+ unsigned short Size) : CUtListElmt(&pValue->GetValueSegments())
{ cpValue = pValue; cImmediate = true;
UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
CBenValueSegment(BenContainerPos Pos, unsigned long Size)
@@ -366,7 +363,7 @@ public: // Internal methods
UtHugeMemcpy(cImmData, pImmData, Size); cSize = Size; }
bool IsLast()
{
- return cpValue == NULL || cpValue->GetValueSegments()->GetLast() ==
+ return cpValue == NULL || cpValue->GetValueSegments().GetLast() ==
this;
}
bool IsImmediate() { return cImmediate; }
@@ -388,7 +385,7 @@ private: // Data
inline pCBenValueSegment CBenValue::GetNextValueSegment(pCBenValueSegment
pCurrValueSegment)
-{ return (pCBenValueSegment) cValueSegments.GetNextOrNULL(pCurrValueSegment); }
+{ return static_cast<pCBenValueSegment>( cValueSegments.GetNextOrNULL(pCurrValueSegment) ); }
inline pLtcBenContainer CBenValue::GetContainer()
{ return GetProperty()->GetContainer(); }
@@ -403,15 +400,15 @@ public: // Methods
public: // Internal methods
CBenNamedObject(pLtcBenContainer pContainer, BenObjectID ObjectID,
pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt);
+ pCUtListElmt pPrevNamedObjectListElmt);
const char * GetName() { return csName.data(); }
const char * GetNameCStr() { return csName.c_str(); }
void SetPosition(BenContainerPos Pos) { cPos = Pos; }
- BenContainerPos GetPosition(void) { return cPos; }
- size_t GetLength(void) { return csName.length()+ 1; }
- pCBenNamedObjectListElmt GetNameListElmt() { return &cNameListElmt; }
+ BenContainerPos GetPosition() { return cPos; }
+ size_t GetLength() { return csName.length()+ 1; }
+ CBenNamedObjectListElmt& GetNameListElmt() { return cNameListElmt; }
private: // Data
std::string csName;
@@ -424,7 +421,7 @@ class CBenPropertyName : public CBenNamedObject
public: // Internal methods
CBenPropertyName(pLtcBenContainer pContainer, BenObjectID ObjectID,
pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
+ pCUtListElmt pPrevNamedObjectListElmt) :
CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
pPrevNamedObjectListElmt) { ; }
virtual bool IsPropertyName() SAL_OVERRIDE;
@@ -435,7 +432,7 @@ class CBenTypeName : public CBenNamedObject
public: // Internal methods
CBenTypeName(pLtcBenContainer pContainer, BenObjectID ObjectID,
pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
+ pCUtListElmt pPrevNamedObjectListElmt) :
CBenNamedObject(pContainer, ObjectID, pPrevObject, sName,
pPrevNamedObjectListElmt) { ; }
virtual bool IsTypeName() SAL_OVERRIDE;
diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx
index 06f45fe..db505a8 100644
--- a/lotuswordpro/source/filter/benval.cxx
+++ b/lotuswordpro/source/filter/benval.cxx
@@ -77,7 +77,7 @@ CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset,
*pAmtRead = 0;
pCBenValueSegment pCurrSeg = NULL;
pLtcBenContainer pContainer = GetContainer();
- BenByteDataPtr pBuffer = (BenByteDataPtr) pReadBuffer;
+ BenByteDataPtr pBuffer = static_cast<BenByteDataPtr>(pReadBuffer);
/// pReadBuffer -- pointer to buffer of read result, allocated outside this function
/// Offset -- read buffer's start offset address, relative value in the whole value stream
diff --git a/lotuswordpro/source/filter/clone.hxx b/lotuswordpro/source/filter/clone.hxx
index 7db1dec..bc2f7fb 100644
--- a/lotuswordpro/source/filter/clone.hxx
+++ b/lotuswordpro/source/filter/clone.hxx
@@ -7,6 +7,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_CLONE_HXX
+#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_CLONE_HXX
+
namespace detail
{
@@ -63,4 +66,6 @@ T* clone(T* const other)
return other ? ::detail::cloner<T, ::detail::has_clone<T>::value>::clone(other) : 0;
}
+#endif // INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_CLONE_HXX
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/explode.hxx b/lotuswordpro/source/filter/explode.hxx
index 9db360b..5cb5601 100644
--- a/lotuswordpro/source/filter/explode.hxx
+++ b/lotuswordpro/source/filter/explode.hxx
@@ -119,7 +119,7 @@ public:
void ConstructTree1();
void ConstructTree2();
void fillArray();
- void ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen);
+ static void ToString(sal_uInt32 nBits, sal_Char *pChar, sal_uInt32 nLen);
};
#endif
diff --git a/lotuswordpro/source/filter/first.hxx b/lotuswordpro/source/filter/first.hxx
index 08d35cd..68d20ce 100644
--- a/lotuswordpro/source/filter/first.hxx
+++ b/lotuswordpro/source/filter/first.hxx
@@ -68,10 +68,10 @@ typedef BenByte * BenByteDataPtr;
typedef const BenByte * BenConstByteDataPtr;
pCBenNamedObject FindNamedObject(pCUtList pList, const char * sName,
- pCBenNamedObjectListElmt * ppPrev);
+ pCUtListElmt * ppPrev);
pCBenIDListElmt FindID(pCUtList pList, BenObjectID ObjectID,
- pCBenIDListElmt * ppPrev);
+ pCUtListElmt * ppPrev);
} // end namespace
// Private headers
diff --git a/lotuswordpro/source/filter/genericfilter.cxx b/lotuswordpro/source/filter/genericfilter.cxx
index 5187b7a..3ff90ec 100644
--- a/lotuswordpro/source/filter/genericfilter.cxx
+++ b/lotuswordpro/source/filter/genericfilter.cxx
@@ -24,7 +24,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL lotuswordpro_component_getFactory(
if ( pServiceManager && implName.equals(LotusWordProImportFilter_getImplementationName()) )
{
Reference< XSingleServiceFactory > xFactory( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
+ static_cast< XMultiServiceFactory * >( pServiceManager ),
OUString::createFromAscii( pImplName ),
LotusWordProImportFilter_createInstance, LotusWordProImportFilter_getSupportedServiceNames() ) );
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx b/lotuswordpro/source/filter/lwp9reader.cxx
index e0ec331..e74d02e 100644
--- a/lotuswordpro/source/filter/lwp9reader.cxx
+++ b/lotuswordpro/source/filter/lwp9reader.cxx
@@ -53,9 +53,9 @@
*
*
************************************************************************/
+
#include "lwp9reader.hxx"
#include "lwpglobalmgr.hxx"
-#include "lwpunoheader.hxx"
#include "lwparrowstyles.hxx"
#include "lwpobjhdr.hxx"
#include "lwpdoc.hxx"
@@ -99,12 +99,6 @@ void Lwp9Reader::Read()
}
/**
- * @descr Read the OLE objects.
- */
-void Lwp9Reader::ReadOleObjects()
-{
-}
-/**
* @descr Read the LWP7 object.
*/
void Lwp9Reader::ReadFileHeader()
@@ -175,7 +169,7 @@ sal_Int64 Lwp9Reader::GetFileSize()
sal_Int64 size = m_pDocStream->Seek( STREAM_SEEK_TO_END);
m_pDocStream->Seek(pos);
- return(size);
+ return size;
}
/**
@@ -186,19 +180,19 @@ void Lwp9Reader::ParseDocument()
WriteDocHeader();
//Get root document
- LwpDocument* doc = dynamic_cast<LwpDocument*> ( m_LwpFileHdr.GetDocID()->obj() );
+ LwpDocument* doc = dynamic_cast<LwpDocument*> ( m_LwpFileHdr.GetDocID().obj().get() );
if (!doc)
return;
//Parse Doc Data
- LwpDocData *pDocData = dynamic_cast<LwpDocData*>((doc->GetDocData())->obj());
+ LwpDocData *pDocData = dynamic_cast<LwpDocData*>(doc->GetDocData().obj().get());
if (pDocData!=NULL)
pDocData->Parse(m_pStream);
//Register Styles
RegisteArrowStyles();
- doc->RegisterStyle();
+ doc->DoRegisterStyle();
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
pXFStyleManager->ToXml(m_pStream);
diff --git a/lotuswordpro/source/filter/lwp9reader.hxx b/lotuswordpro/source/filter/lwp9reader.hxx
index f22cd8b..3058393 100644
--- a/lotuswordpro/source/filter/lwp9reader.hxx
+++ b/lotuswordpro/source/filter/lwp9reader.hxx
@@ -57,7 +57,6 @@
#define INCLUDED_LOTUSWORDPRO_SOURCE_FILTER_LWP9READER_HXX
#include "lwpheader.hxx"
-#include "lwpunoheader.hxx"
#include "lwpsvstream.hxx"
#include "lwpfilehdr.hxx"
#include "lwpobjfactory.hxx"
@@ -83,7 +82,6 @@ class Lwp9Reader
void ParseDocument();
void WriteDocHeader();
void WriteDocEnd();
- void ReadOleObjects();
public:
void Read();
};
diff --git a/lotuswordpro/source/filter/lwpbackgroundoverride.hxx b/lotuswordpro/source/filter/lwpbackgroundoverride.hxx
index afd3e89..7f382ba 100644
--- a/lotuswordpro/source/filter/lwpbackgroundoverride.hxx
+++ b/lotuswordpro/source/filter/lwpbackgroundoverride.hxx
@@ -83,13 +83,13 @@ public:
}
LwpColor GetBackColor(){ return m_aStuff.m_aFillColor; }
- LwpBackgroundStuff* GetBGStuff() { return &m_aStuff; }
+ LwpBackgroundStuff& GetBGStuff() { return m_aStuff; }
protected:
LwpBackgroundOverride(LwpBackgroundOverride const& rOther);
private:
- LwpBackgroundOverride& operator=(LwpBackgroundOverride const& rOther); // not implemented
+ LwpBackgroundOverride& operator=(LwpBackgroundOverride const& rOther) SAL_DELETED_FUNCTION;
private:
LwpBackgroundStuff m_aStuff;
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
index 8a19cc9..ffaa752 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.cxx
@@ -83,14 +83,11 @@ void LwpBackgroundStuff::GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArra
assert(false);
return;
}
- if (pPttnArray)
+ assert((2 < btPttnIndex) && (btPttnIndex < 72));
+ const sal_uInt8* pTempArray = s_pLwpPatternTab[btPttnIndex];
+ for(sal_uInt8 i = 0; i < 32; i++)
{
- assert((2 < btPttnIndex) && (btPttnIndex < 72));
- const sal_uInt8* pTempArray = s_pLwpPatternTab[btPttnIndex];
- for(sal_uInt8 i = 0; i < 32; i++)
- {
- pPttnArray[i] = (i%4 == 0) ? pTempArray[7-i/4] : 0;
- }
+ pPttnArray[i] = (i%4 == 0) ? pTempArray[7-i/4] : 0;
}
}
@@ -113,22 +110,16 @@ XFBGImage* LwpBackgroundStuff::GetFillPattern()
}
// get pattern array from pattern table
- sal_uInt8* pPttnArray = new sal_uInt8 [32];
- this->GetPattern(m_nID, pPttnArray);
+ sal_uInt8 aPttnArray[32];
+ GetPattern(m_nID, aPttnArray);
// create bitmap object from the pattern array
Bitmap aBmp( Size(8, 8), 1 );
BitmapWriteAccess* pWA = aBmp.AcquireWriteAccess();
sal_uInt8* pBuf = pWA->GetBuffer();
- memcpy(pBuf, pPttnArray, 32);
+ memcpy(pBuf, aPttnArray, 32);
aBmp.ReleaseAccess(pWA);
- if (pPttnArray)
- {
- delete [] pPttnArray;
- pPttnArray = NULL;
- }
-
// create XOBitmap object from bitmap object
XOBitmap aXOBitmap( aBmp );
aXOBitmap.Bitmap2Array();
diff --git a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
index 085e092..60d12d1 100644
--- a/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
+++ b/lotuswordpro/source/filter/lwpbackgroundstuff.hxx
@@ -145,7 +145,7 @@ public:
}
private:
- void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
+ static void GetPattern(sal_uInt16 btPttnIndex, sal_uInt8* pPttnArray);
public:
void Read(LwpObjectStream *pStrm);
diff --git a/lotuswordpro/source/filter/lwpbasetype.hxx b/lotuswordpro/source/filter/lwpbasetype.hxx
index 7a2359d..e12297e 100644
--- a/lotuswordpro/source/filter/lwpbasetype.hxx
+++ b/lotuswordpro/source/filter/lwpbasetype.hxx
@@ -112,8 +112,8 @@ public:
LwpPoint();
void Read(LwpObjectStream *pStrm);
void Reset();
- inline sal_Int32 GetX() const;
- inline sal_Int32 GetY() const;
+ sal_Int32 GetX() const {return m_nX;}
+ sal_Int32 GetY() const {return m_nY;}
inline void SetX(sal_Int32 nX);
inline void SetY(sal_Int32 nY);
protected:
@@ -121,8 +121,6 @@ protected:
sal_Int32 m_nY;
};
-sal_Int32 LwpPoint::GetX() const {return m_nX;}
-sal_Int32 LwpPoint::GetY() const {return m_nY;}
void LwpPoint::SetX(sal_Int32 nX){m_nX = nX;}
void LwpPoint::SetY(sal_Int32 nY){m_nY = nY;}
diff --git a/lotuswordpro/source/filter/lwpborderstuff.cxx b/lotuswordpro/source/filter/lwpborderstuff.cxx
index e1d5e88..af80668 100644
--- a/lotuswordpro/source/filter/lwpborderstuff.cxx
+++ b/lotuswordpro/source/filter/lwpborderstuff.cxx
@@ -158,7 +158,7 @@ void LwpBorderStuff::Read(LwpObjectStream *pStrm)
bool LwpBorderStuff::HasSide(sal_uInt16 side)
{
- return m_nSides&side;
+ return (m_nSides & side) != 0;
}
sal_uInt16 LwpBorderStuff::GetSideType(sal_uInt16 side)
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.cxx b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
index bdc689e..12a855a 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.cxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.cxx
@@ -73,7 +73,7 @@ LwpBreaksOverride::LwpBreaksOverride(LwpBreaksOverride const& rOther)
: LwpOverride(rOther)
, m_pNextStyle(0)
{
- std::auto_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle));
+ std::unique_ptr<LwpAtomHolder> pNextStyle(::clone(rOther.m_pNextStyle));
m_pNextStyle = pNextStyle.release();
}
diff --git a/lotuswordpro/source/filter/lwpbreaksoverride.hxx b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
index dff45ea..1454afc 100644
--- a/lotuswordpro/source/filter/lwpbreaksoverride.hxx
+++ b/lotuswordpro/source/filter/lwpbreaksoverride.hxx
@@ -134,7 +134,7 @@ protected:
LwpBreaksOverride(LwpBreaksOverride const& rOther);
private:
- LwpBreaksOverride& operator=(const LwpBreaksOverride& rOther); // not implemented
+ LwpBreaksOverride& operator=(const LwpBreaksOverride& rOther) SAL_DELETED_FUNCTION;
private:
LwpAtomHolder *m_pNextStyle;
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
index f8f6225..933f239 100644
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
+++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx
@@ -155,8 +155,8 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
m_vIDsPairList.push_back(std::make_pair(pBulletOver, aIndentID));
OUString aStyleName;
- LwpFribPtr* pBulletParaFribs = pBulletPara->GetFribs();
- bool bIsNumbering = (pBulletParaFribs->HasFrib(FRIB_TAG_PARANUMBER) != 0);
+ LwpFribPtr& rBulletParaFribs = pBulletPara->GetFribs();
+ bool bIsNumbering = (rBulletParaFribs.HasFrib(FRIB_TAG_PARANUMBER) != 0);
enumXFAlignType eAlign = enumXFAlignStart;
if (pBullOver->IsRightAligned())
@@ -172,9 +172,9 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
for (sal_uInt8 nC = 1; nC < 11; nC++)
{
pListStyle->SetListBullet(nC, pSilverBullet->GetBulletChar(), pSilverBullet->GetBulletFontName(),
- pSilverBullet->GetPrefix(), pSilverBullet->GetSuffix());
+ LwpSilverBullet::GetPrefix(), LwpSilverBullet::GetSuffix());
- if (pIndent->GetMRest() > 0.001)
+ if (pIndent->GetMRest() > 0) /* note: used to be 0.001, no idea why */
{
pListStyle->SetListPosition(nC, 0.0,
LwpTools::ConvertToMetric(LwpTools::ConvertFromUnits(pIndent->GetMRest())), 0.0, eAlign);
@@ -186,7 +186,7 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
}
}
- aStyleName = pXFStyleMgr->AddStyle(pListStyle)->GetStyleName();
+ aStyleName = (pXFStyleMgr->AddStyle(pListStyle)).m_pStyle->GetStyleName();
}
else
{
@@ -242,7 +242,7 @@ OUString LwpBulletStyleMgr::RegisterBulletStyle(LwpPara* pPara, LwpBulletOverrid
pListStyle->SetListPosition(nPos, 0.0, 0.635, 0.0);
}
- aStyleName = pXFStyleMgr->AddStyle(pListStyle)->GetStyleName();
+ aStyleName = (pXFStyleMgr->AddStyle(pListStyle)).m_pStyle->GetStyleName();
}
else
delete pListStyle;
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx b/lotuswordpro/source/filter/lwpbulletstylemgr.hxx
index 94622b2c..8b5b8ac 100644
--- a/lotuswordpro/source/filter/lwpbulletstylemgr.hxx
+++ b/lotuswordpro/source/filter/lwpbulletstylemgr.hxx
@@ -101,7 +101,6 @@ private:
typedef std::pair<boost::shared_ptr<LwpBulletOverride>, LwpObjectID> OverridePair;
std::vector <OUString> m_vStyleNameList;
std::vector <OverridePair> m_vIDsPairList;
- OUString m_aCurrentStyleName;
LwpFoundry* m_pFoundry;
XFList* m_pBulletList;
bool m_bContinue;
diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx
index 59d3a08..404c4e7 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.cxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.cxx
@@ -91,7 +91,7 @@ LwpCellLayout::~LwpCellLayout()
*/
LwpTableLayout * LwpCellLayout::GetTableLayout()
{
- LwpRowLayout * pRow = dynamic_cast<LwpRowLayout *>(GetParent()->obj());
+ LwpRowLayout * pRow = dynamic_cast<LwpRowLayout *>(GetParent().obj().get());
if(!pRow)
{
return NULL;
@@ -121,8 +121,9 @@ LwpTable * LwpCellLayout::GetTable()
*/
void LwpCellLayout::SetCellMap()
{
- // this function is called from LwpTableLayout, so it can't be NULL
- GetTableLayout()->SetWordProCellMap(crowid, ccolid, this);
+ LwpTableLayout * pTableLayout = GetTableLayout();
+ if (pTableLayout)
+ pTableLayout->SetWordProCellMap(crowid, ccolid, this);
}
/**
* @short Get actual width of this cell layout
@@ -265,14 +266,14 @@ void LwpCellLayout::ApplyBackColor(XFCellStyle *pCellStyle)
*/
void LwpCellLayout::ApplyFmtStyle(XFCellStyle *pCellStyle)
{
- LwpLayoutNumerics* pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(cLayNumerics.obj());
+ LwpLayoutNumerics* pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(cLayNumerics.obj().get());
if (!pLayoutNumerics)
{
// if current layout doesn't have format, go to based on layout
- LwpCellLayout* pCellLayout = dynamic_cast<LwpCellLayout*>(m_BasedOnStyle.obj());
+ LwpCellLayout* pCellLayout = dynamic_cast<LwpCellLayout*>(GetBasedOnStyle().get());
if (pCellLayout)
{
- pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(pCellLayout->GetNumericsObject()->obj());
+ pLayoutNumerics = dynamic_cast<LwpLayoutNumerics*>(pCellLayout->GetNumericsObject().obj().get());
}
}
@@ -283,7 +284,7 @@ void LwpCellLayout::ApplyFmtStyle(XFCellStyle *pCellStyle)
if (pStyle)
{
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_NumfmtName = pXFStyleManager->AddStyle(pStyle)->GetStyleName();
+ m_NumfmtName = pXFStyleManager->AddStyle(pStyle).m_pStyle->GetStyleName();
pCellStyle->SetDataStyle(m_NumfmtName);
}
}
@@ -314,7 +315,7 @@ XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uI
{
// if cell layout is aTableID's default cell layout
// it can't have any content, bypass these code
- LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
+ LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj().get());
if (!pTable)
{
assert(false);
@@ -325,13 +326,13 @@ XFCell* LwpCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uI
// if cell layout is aTableID's default cell layout
// we should judt its style by current position
- if (*pTable->GetDefaultCellStyle() == *GetObjectID())
+ if (pTable->GetDefaultCellStyle() == GetObjectID())
{
- aStyleName = GetCellStyleName(nRow, nCol, pTable->GetTableLayout());
+ aStyleName = GetCellStyleName(nRow, nCol, pTable->GetTableLayout().get());
}
// content of cell
- LwpStory* pStory = dynamic_cast<LwpStory*>(m_Content.obj());
+ LwpStory* pStory = dynamic_cast<LwpStory*>(m_Content.obj().get());
if (pStory)
{
pStory->XFConvert(pXFCell);
@@ -347,8 +348,8 @@ LwpPara* LwpCellLayout::GetLastParaOfPreviousStory()
LwpObjectID* pPreStoryID = this->GetPreviousCellStory();
if (pPreStoryID && !(pPreStoryID->IsNull()))
{
- LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY));
- return dynamic_cast<LwpPara*>(pPreStory->GetLastPara()->obj(VO_PARA));
+ LwpStory* pPreStory = dynamic_cast<LwpStory*>(pPreStoryID->obj(VO_STORY).get());
+ return dynamic_cast<LwpPara*>(pPreStory->GetLastPara().obj(VO_PARA).get());
}
else
{
@@ -422,10 +423,7 @@ LwpObjectID * LwpCellLayout::GetPreviousCellStory()
LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout)
{
if (!pTableLayout)
- {
- assert(false);
return enumWholeBorder;
- }
// get left cell and judge if neighbour border is different
XFBorders * pBorders = GetXFBorders();
@@ -433,8 +431,8 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
{
return enumWholeBorder;
}
- XFBorder *pLeftBorder = pBorders->GetLeft();
- XFBorder *pBottomBorder = pBorders->GetBottom();
+ XFBorder& rLeftBorder = pBorders->GetLeft();
+ XFBorder& rBottomBorder = pBorders->GetBottom();
bool bNoLeftBorder = false;
bool bNoBottomBorder = false;
@@ -444,8 +442,8 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
XFBorders * pNeighbourBorders = pLeftNeighbour->GetXFBorders();
if (pNeighbourBorders)
{
- XFBorder * pRightBorder = pNeighbourBorders->GetRight();
- if (*pLeftBorder == *pRightBorder)
+ XFBorder& rRightBorder = pNeighbourBorders->GetRight();
+ if (rLeftBorder == rRightBorder)
{
// for these 2 types cell, left border should be ignored for sake of avoiding duplication border
// but if left border is different with right border of left cell
@@ -463,8 +461,8 @@ LwpCellBorderType LwpCellLayout::GetCellBorderType(sal_uInt16 nRow, sal_uInt16 n
XFBorders * pBelowBorders = pBelowNeighbour->GetXFBorders();
if (pBelowBorders)
{
- XFBorder * pTopBorder = pBelowBorders->GetTop();
- if (*pTopBorder == *pBottomBorder)
+ XFBorder& rTopBorder = pBelowBorders->GetTop();
+ if (rTopBorder == rBottomBorder)
{
// for these 2 types cell, bottom border should be ignored for sake of avoiding duplication border
// but if bottom border is different with right border of left cell
@@ -559,7 +557,7 @@ void LwpCellLayout::RegisterDefaultCell()
}
pCellStyle->SetBorders(pBorders);
}
- m_CellStyleNames[eLoop] = pXFStyleManager->AddStyle(pCellStyle)->GetStyleName();
+ m_CellStyleNames[eLoop] = (pXFStyleManager->AddStyle(pCellStyle)).m_pStyle->GetStyleName();
}
}
/**
@@ -571,8 +569,8 @@ void LwpCellLayout::RegisterDefaultCell()
*/
void LwpCellLayout::RegisterStyle()
{
- LwpVirtualLayout * pParent = dynamic_cast<LwpVirtualLayout *>(GetParent()->obj());
- if (!pParent || pParent->GetLayoutType() != LWP_ROW_LAYOUT)
+ rtl::Reference<LwpVirtualLayout> xParent(dynamic_cast<LwpVirtualLayout *>(GetParent().obj().get()));
+ if (!xParent.is() || xParent->GetLayoutType() != LWP_ROW_LAYOUT)
{
// default cell layout, we must register 4 styles for it
RegisterDefaultCell();
@@ -583,7 +581,6 @@ void LwpCellLayout::RegisterStyle()
XFCellStyle *pCellStyle = new XFCellStyle();
ApplyPadding(pCellStyle);
-// ApplyBackColor(pCellStyle);
ApplyBackGround(pCellStyle);
ApplyWatermark(pCellStyle);
ApplyFmtStyle(pCellStyle);
@@ -592,14 +589,14 @@ void LwpCellLayout::RegisterStyle()
pCellStyle->SetAlignType(enumXFAlignNone, GetVerticalAlignmentType());
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_StyleName = pXFStyleManager->AddStyle(pCellStyle)->GetStyleName();
+ m_StyleName = (pXFStyleManager->AddStyle(pCellStyle)).m_pStyle->GetStyleName();
// content object register styles
- LwpObject * pObj = m_Content.obj();
- if (pObj)
+ rtl::Reference<LwpObject> pObj = m_Content.obj();
+ if (pObj.is())
{
pObj->SetFoundry(m_pFoundry);
- pObj->RegisterStyle();
+ pObj->DoRegisterStyle();
}
//register child layout style
@@ -650,25 +647,25 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID)
{
bool bProtected = false;
// judge current cell
- if (IsProtected())
+ if (GetIsProtected())
{
bProtected = true;
}
else
{
// judge base on
- LwpCellLayout * pBase = dynamic_cast<LwpCellLayout *>(m_BasedOnStyle.obj());
- if (pBase && pBase->IsProtected())
+ LwpCellLayout * pBase = dynamic_cast<LwpCellLayout *>(GetBasedOnStyle().get());
+ if (pBase && pBase->GetIsProtected())
{
bProtected = true;
}
else
{
// judge whole table
- LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
- LwpTableLayout * pTableLayout = pTable ? static_cast<LwpTableLayout *>(pTable->GetTableLayout()) : NULL;
- LwpSuperTableLayout * pSuper = pTableLayout ? pTableLayout->GetSuperTableLayout() : NULL;
- if (pSuper && pSuper->IsProtected())
+ LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj().get());
+ rtl::Reference<LwpTableLayout> xTableLayout(pTable ? pTable->GetTableLayout() : nullptr);
+ LwpSuperTableLayout * pSuper = xTableLayout.is() ? xTableLayout->GetSuperTableLayout() : nullptr;
+ if (pSuper && pSuper->GetIsProtected())
{
bProtected = true;
}
@@ -696,8 +693,10 @@ LwpConnectedCellLayout::~LwpConnectedCellLayout()
*/
void LwpConnectedCellLayout::SetCellMap()
{
- // this function is called from LwpTableLayout, so it can't be NULL
LwpTableLayout * pTableLayout = GetTableLayout();
+ if (!pTableLayout)
+ return;
+
sal_uInt16 nRowSpan = m_nRealrowspan;
for (sal_uInt16 iLoop = 0; iLoop < nRowSpan; iLoop ++)
@@ -730,8 +729,8 @@ LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal
{
return enumWholeBorder;
}
- XFBorder *pLeftBorder = pBorders->GetLeft();
- XFBorder *pBottomBorder = pBorders->GetBottom();
+ XFBorder& rLeftBorder = pBorders->GetLeft();
+ XFBorder& rBottomBorder = pBorders->GetBottom();
bool bNoLeftBorder = true;
bool bNoBottomBorder = true;
@@ -749,8 +748,8 @@ LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal
boost::scoped_ptr<XFBorders> pNeighbourBorders(pLeftNeighbour->GetXFBorders());
if (pNeighbourBorders)
{
- XFBorder * pRightBorder = pNeighbourBorders->GetRight();
- if (*pLeftBorder != *pRightBorder)
+ XFBorder& rRightBorder = pNeighbourBorders->GetRight();
+ if (rLeftBorder != rRightBorder)
{
// if left border is different with right border of left cell
// we should not ignored it
@@ -762,7 +761,11 @@ LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal
}
}
- if ( (nRow + nRowSpan) == pTableLayout->GetTable()->GetRow() )
+ LwpTable* pTable = pTableLayout->GetTable();
+ if (!pTable)
+ throw std::runtime_error("missing table");
+
+ if ( (nRow + nRowSpan) == pTable->GetRow())
{
bNoBottomBorder = false;
}
@@ -776,8 +779,8 @@ LwpCellBorderType LwpConnectedCellLayout::GetCellBorderType(sal_uInt16 nRow, sal
boost::scoped_ptr<XFBorders> pBelowBorders(pBelowNeighbour->GetXFBorders());
if (pBelowBorders)
{
- XFBorder * pTopBorder = pBelowBorders->GetTop();
- if (*pTopBorder != *pBottomBorder)
+ XFBorder& rTopBorder = pBelowBorders->GetTop();
+ if (rTopBorder != rBottomBorder)
{
// if bottom border is different with right border of left cell
// we should not ignored it
@@ -877,19 +880,19 @@ void LwpHiddenCellLayout::Read()
XFCell* LwpHiddenCellLayout::ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol)
{
- if (!cconnectedlayout.obj())
+ if (!cconnectedlayout.obj().is())
return NULL;
- LwpConnectedCellLayout* pConnCell = dynamic_cast<LwpConnectedCellLayout* >(cconnectedlayout.obj());
+ LwpConnectedCellLayout* pConnCell = dynamic_cast<LwpConnectedCellLayout* >(cconnectedlayout.obj().get());
if (!pConnCell || nRow < (pConnCell->GetNumrows()+pConnCell->GetRowID()))
return NULL;
// if the hidden cell should be displayed for limit of SODC
// use the default cell layout
XFCell* pXFCell = NULL;
- LwpTable *pTable = dynamic_cast<LwpTable *>(aTableID.obj());
+ LwpTable *pTable = dynamic_cast<LwpTable *>(aTableID.obj().get());
if (pTable)
{
- LwpCellLayout *pDefault = dynamic_cast<LwpCellLayout *>(pTable->GetDefaultCellStyle()->obj());
+ LwpCellLayout *pDefault = dynamic_cast<LwpCellLayout *>(pTable->GetDefaultCellStyle().obj().get());
if (pDefault)
{
pXFCell = pDefault->ConvertCell(aTableID, nRow, nCol);
diff --git a/lotuswordpro/source/filter/lwpcelllayout.hxx b/lotuswordpro/source/filter/lwpcelllayout.hxx
index d9ab758..1ca533a 100644
--- a/lotuswordpro/source/filter/lwpcelllayout.hxx
+++ b/lotuswordpro/source/filter/lwpcelllayout.hxx
@@ -96,11 +96,11 @@ public:
sal_uInt16 GetRowID(){return crowid;}
sal_uInt8 GetColID(){return ccolid;}
void RegisterStyle() SAL_OVERRIDE;
- LwpObjectID * GetNumericsObject() {return &cLayNumerics;}
+ LwpObjectID& GetNumericsObject() {return cLayNumerics;}
LwpObjectID * GetPreviousCellStory();
virtual LwpPara* GetLastParaOfPreviousStory() SAL_OVERRIDE;
LwpTableLayout * GetTableLayout();
- virtual void SetCellMap(void);
+ virtual void SetCellMap();
double GetActualWidth();
OUString GetNumfmtName(){return m_NumfmtName;}
protected:
@@ -117,8 +117,8 @@ protected:
OUString GetCellStyleName(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
void RegisterDefaultCell();
virtual LwpCellBorderType GetCellBorderType(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
- LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
- virtual sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
+ static LwpCellLayout * GetCellByRowCol(sal_uInt16 nRow, sal_uInt16 nCol, LwpTableLayout * pTableLayout);
+ static sal_uInt16 GetLeftColID(sal_uInt16 nCol){return nCol - 1; };
virtual sal_uInt16 GetBelowRowID(sal_uInt16 nRow){return nRow + 1; };
sal_uInt16 crowid;
@@ -154,7 +154,7 @@ public:
virtual void Parse(IXFStream* pOutputStream) SAL_OVERRIDE;
virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) SAL_OVERRIDE;
void RegisterStyle() SAL_OVERRIDE {}
- virtual void SetCellMap(void) SAL_OVERRIDE;
+ virtual void SetCellMap() SAL_OVERRIDE;
protected:
void Read() SAL_OVERRIDE;
LwpObjectID cconnectedlayout;
@@ -174,7 +174,7 @@ public:
virtual XFCell* ConvertCell(LwpObjectID aTableID, sal_uInt16 nRow, sal_uInt16 nCol) SAL_OVERRIDE;
sal_uInt16 GetNumrows(){return m_nRealrowspan;}
sal_uInt8 GetNumcols(){return m_nRealcolspan;}
- virtual void SetCellMap(void) SAL_OVERRIDE;
+ virtual void SetCellMap() SAL_OVERRIDE;
void SetNumrows(sal_uInt16 nVal){m_nRealrowspan = nVal;}
void SetNumcols(sal_uInt8 nVal){m_nRealcolspan = nVal;}
protected:
diff --git a/lotuswordpro/source/filter/lwpcharacterstyle.cxx b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
index 5c4de3f..8b61199 100644
--- a/lotuswordpro/source/filter/lwpcharacterstyle.cxx
+++ b/lotuswordpro/source/filter/lwpcharacterstyle.cxx
@@ -176,19 +176,19 @@ void LwpTextStyle::RegisterStyle()
XFTextStyle* pStyle = new XFTextStyle();
//Set name
- OUString styleName = GetName()->str();
+ OUString styleName = GetName().str();
pStyle->SetStyleName(styleName);
//Create font
- LwpFontManager* pFontMgr = m_pFoundry->GetFontManger();
- XFFont* pFont = pFontMgr->CreateFont(m_nFinalFontID);
+ LwpFontManager& rFontMgr = m_pFoundry->GetFontManger();
+ rtl::Reference<XFFont> pFont = rFontMgr.CreateFont(m_nFinalFontID);
pStyle->SetFont(pFont);
//Set other properties if needed
//Add style
LwpStyleManager* pStyleMgr = m_pFoundry->GetStyleManager();
- pStyleMgr->AddStyle(*GetObjectID(), pStyle);
+ pStyleMgr->AddStyle(GetObjectID(), pStyle);
}
diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.cxx b/lotuswordpro/source/filter/lwpcharborderoverride.cxx
index a65d7dd..bbe4de5 100644
--- a/lotuswordpro/source/filter/lwpcharborderoverride.cxx
+++ b/lotuswordpro/source/filter/lwpcharborderoverride.cxx
@@ -84,8 +84,8 @@ LwpCharacterBorderOverride::LwpCharacterBorderOverride(LwpCharacterBorderOverrid
, m_nAboveWidth(rOther.m_nAboveWidth)
, m_nBelowWidth(rOther.m_nBelowWidth)
{
- std::auto_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff));
- std::auto_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins));
+ std::unique_ptr<LwpBorderStuff> pBorderStuff(::clone(rOther.m_pBorderStuff));
+ std::unique_ptr<LwpMargins> pMargins(::clone(rOther.m_pMargins));
m_pBorderStuff = pBorderStuff.release();
m_pMargins = pMargins.release();
}
diff --git a/lotuswordpro/source/filter/lwpcharborderoverride.hxx b/lotuswordpro/source/filter/lwpcharborderoverride.hxx
index 2a8528e..9beb601 100644
--- a/lotuswordpro/source/filter/lwpcharborderoverride.hxx
+++ b/lotuswordpro/source/filter/lwpcharborderoverride.hxx
@@ -104,7 +104,7 @@ protected:
LwpCharacterBorderOverride(LwpCharacterBorderOverride const& rOther);
private:
- LwpCharacterBorderOverride& operator=(LwpCharacterBorderOverride const& rOther); // not implemented
+ LwpCharacterBorderOverride& operator=(LwpCharacterBorderOverride const& rOther) SAL_DELETED_FUNCTION;
private:
LwpBorderStuff* m_pBorderStuff;
diff --git a/lotuswordpro/source/filter/lwpcharsetmgr.cxx b/lotuswordpro/source/filter/lwpcharsetmgr.cxx
index f1d31a4..84e270d 100644
--- a/lotuswordpro/source/filter/lwpcharsetmgr.cxx
+++ b/lotuswordpro/source/filter/lwpcharsetmgr.cxx
@@ -110,9 +110,4 @@ rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding(sal_uInt16 wordproCode)
return GetTextCharEncoding();
}
-rtl_TextEncoding LwpCharSetMgr::GetTextCharEncoding()
-{
- return RTL_TEXTENCODING_MS_1252;//here should be a default value,1252 or get from platform, 1-18
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpcharsetmgr.hxx b/lotuswordpro/source/filter/lwpcharsetmgr.hxx
index 6125e5a..340b9e7 100644
--- a/lotuswordpro/source/filter/lwpcharsetmgr.hxx
+++ b/lotuswordpro/source/filter/lwpcharsetmgr.hxx
@@ -75,7 +75,11 @@ public:
static LwpCharSetMgr* GetInstance();
void SetCodePageMap();
rtl_TextEncoding GetTextCharEncoding(sal_uInt16 wordproCode);
- rtl_TextEncoding GetTextCharEncoding();
+ static rtl_TextEncoding GetTextCharEncoding()
+ {
+ return RTL_TEXTENCODING_MS_1252;//here should be a default value,1252 or get from platform, 1-18
+ }
+
private:
std::map<sal_uInt16,rtl_TextEncoding> m_CodePageMap;
static LwpCharSetMgr* Instance;
diff --git a/lotuswordpro/source/filter/lwpcontent.cxx b/lotuswordpro/source/filter/lwpcontent.cxx
index 77ae0d3..17be69b 100644
--- a/lotuswordpro/source/filter/lwpcontent.cxx
+++ b/lotuswordpro/source/filter/lwpcontent.cxx
@@ -125,17 +125,20 @@ void LwpContent::Read()
pStrm->SkipExtra();
}
-LwpVirtualLayout* LwpContent::GetLayout(LwpVirtualLayout* pStartLayout)
+rtl::Reference<LwpVirtualLayout> LwpContent::GetLayout(LwpVirtualLayout* pStartLayout)
{
return m_LayoutsWithMe.GetLayout(pStartLayout);
}
bool LwpContent::HasNonEmbeddedLayouts()
{
- LwpVirtualLayout* pLayout = NULL;
- while( (pLayout = GetLayout(pLayout)) )
+ rtl::Reference<LwpVirtualLayout> xLayout;
+ while (true)
{
- if(!pLayout->NoContentReference())
+ xLayout = GetLayout(xLayout.get());
+ if (!xLayout.is())
+ break;
+ if (!xLayout->NoContentReference())
return true;
}
return false;
@@ -143,10 +146,13 @@ bool LwpContent::HasNonEmbeddedLayouts()
bool LwpContent::IsStyleContent()
{
- LwpVirtualLayout* pLayout = NULL;
- while( (pLayout = GetLayout(pLayout)) )
+ rtl::Reference<LwpVirtualLayout> xLayout;
+ while (true)
{
- if(pLayout->IsStyleLayout())
+ xLayout = GetLayout(xLayout.get());
+ if (!xLayout.is())
+ break;
+ if (xLayout->IsStyleLayout())
return true;
}
return false;
diff --git a/lotuswordpro/source/filter/lwpcontent.hxx b/lotuswordpro/source/filter/lwpcontent.hxx
index fae9fcc..b0900c2 100644
--- a/lotuswordpro/source/filter/lwpcontent.hxx
+++ b/lotuswordpro/source/filter/lwpcontent.hxx
@@ -109,8 +109,8 @@ protected:
protected:
void Read() SAL_OVERRIDE;
public:
- inline LwpAssociatedLayouts* GetLayoutsWithMe();
- LwpVirtualLayout* GetLayout(LwpVirtualLayout* pStartLayout);
+ inline LwpAssociatedLayouts& GetLayoutsWithMe();
+ rtl::Reference<LwpVirtualLayout> GetLayout(LwpVirtualLayout* pStartLayout);
inline bool IsActive();
virtual bool IsTable();
inline OUString GetClassName();
@@ -119,9 +119,9 @@ public:
bool IsStyleContent();
};
-LwpAssociatedLayouts* LwpContent::GetLayoutsWithMe()
+LwpAssociatedLayouts& LwpContent::GetLayoutsWithMe()
{
- return &m_LayoutsWithMe;
+ return m_LayoutsWithMe;
}
inline bool LwpContent::IsActive()
@@ -141,7 +141,7 @@ inline OUString LwpContent::GetClassName()
inline LwpContent* LwpContent::GetNextEnumerated()
{
- return dynamic_cast<LwpContent*>(m_NextEnumerated.obj());
+ return dynamic_cast<LwpContent*>(m_NextEnumerated.obj().get());
}
/**
* @brief
diff --git a/lotuswordpro/source/filter/lwpdivinfo.cxx b/lotuswordpro/source/filter/lwpdivinfo.cxx
index 564309e..11d4f0e 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.cxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.cxx
@@ -166,11 +166,11 @@ sal_uInt16 LwpDivInfo::GetMaxNumberOfPages()
LwpDocument* pDiv = GetDivision();
if(!pDiv)
return 0;
- LwpDLVListHeadTailHolder* pHeadTail = static_cast<LwpDLVListHeadTailHolder*>(pDiv->GetPageHintsID()->obj());
+ LwpDLVListHeadTailHolder* pHeadTail = dynamic_cast<LwpDLVListHeadTailHolder*>(pDiv->GetPageHintsID().obj().get());
if(pHeadTail)
{
- LwpPageHint* pPageHint =static_cast<LwpPageHint*>(pHeadTail->GetTail()->obj());
- if(pPageHint && !pPageHint->GetPageLayoutID()->IsNull())
+ LwpPageHint* pPageHint = dynamic_cast<LwpPageHint*>(pHeadTail->GetTail().obj().get());
+ if(pPageHint && !pPageHint->GetPageLayoutID().IsNull())
{
return pPageHint->GetPageNumber();
}
diff --git a/lotuswordpro/source/filter/lwpdivinfo.hxx b/lotuswordpro/source/filter/lwpdivinfo.hxx
index a2a094f..6ac2fb5 100644
--- a/lotuswordpro/source/filter/lwpdivinfo.hxx
+++ b/lotuswordpro/source/filter/lwpdivinfo.hxx
@@ -78,9 +78,8 @@ class LwpDivInfo : public LwpObject
{
public:
LwpDivInfo(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
- virtual ~LwpDivInfo();
- LwpObjectID* GetInitialLayoutID(){ return &m_InitialLayoutID;}
- LwpObjectID* GetFillerPageTextID(){ return &m_FillerPageTextID;}
+ LwpObjectID& GetInitialLayoutID() { return m_InitialLayoutID; }
+ LwpObjectID& GetFillerPageTextID() { return m_FillerPageTextID; }
// add by ,03/14/2004
OUString GetDivName() { return m_Name.str(); }
// end add
@@ -93,10 +92,12 @@ public:
inline LwpDocument* GetDivision();
void GetNumberOfPages(sal_uInt16& nPageno);
sal_uInt16 GetMaxNumberOfPages();
- LwpAtomHolder* GetExternalName(){return &m_ExternalName;}
+ LwpAtomHolder& GetExternalName() { return m_ExternalName; }
protected:
void Read() SAL_OVERRIDE;
private:
+ virtual ~LwpDivInfo();
+
LwpObjectID m_ParentID;
LwpAtomHolder m_Name;
LwpObjectID m_LayoutID;
@@ -138,7 +139,7 @@ private:
inline bool LwpDivInfo::HasContents()
{
- return (m_nFlags & DI_HASCONTENTS) ? sal_True : sal_False;
+ return (m_nFlags & DI_HASCONTENTS) != 0;
}
inline bool LwpDivInfo::IsOleDivision()
@@ -151,7 +152,7 @@ inline bool LwpDivInfo::IsOleDivision()
inline bool LwpDivInfo::IsScrollable()
{
- return (m_nFlags & DI_SCROLLABLE) ? sal_True : sal_False;
+ return (m_nFlags & DI_SCROLLABLE) != 0;
}
inline bool LwpDivInfo::IsGotoable()
@@ -161,7 +162,7 @@ inline bool LwpDivInfo::IsGotoable()
inline LwpDocument* LwpDivInfo::GetDivision()
{
- return dynamic_cast<LwpDocument*>(m_ParentID.obj());
+ return dynamic_cast<LwpDocument*>(m_ParentID.obj().get());
}
#endif
diff --git a/lotuswordpro/source/filter/lwpdivopts.hxx b/lotuswordpro/source/filter/lwpdivopts.hxx
index 8d0d645..4321787 100644
--- a/lotuswordpro/source/filter/lwpdivopts.hxx
+++ b/lotuswordpro/source/filter/lwpdivopts.hxx
@@ -100,7 +100,7 @@ public:
~LwpTextLanguage();
void Read(LwpObjectStream *pStrm);
private:
- sal_uInt16 ConvertFrom96(sal_uInt16 orgLang);
+ static sal_uInt16 ConvertFrom96(sal_uInt16 orgLang);
sal_uInt16 m_nLanguage;
};
@@ -108,10 +108,11 @@ class LwpDivisionOptions : public LwpObject
{
public:
LwpDivisionOptions(LwpObjectHeader& objHdr, LwpSvStream* pStrm);
- virtual ~LwpDivisionOptions();
protected:
void Read() SAL_OVERRIDE;
private:
+ virtual ~LwpDivisionOptions();
+
LwpHyphenOptions m_HyphOpts;
sal_uInt16 m_nOptionFlag;
LwpTextLanguage m_Lang;
diff --git a/lotuswordpro/source/filter/lwpdllist.cxx b/lotuswordpro/source/filter/lwpdllist.cxx
index abf4d66..04310d2 100644
--- a/lotuswordpro/source/filter/lwpdllist.cxx
+++ b/lotuswordpro/source/filter/lwpdllist.cxx
@@ -64,7 +64,7 @@
#include "lwpdllist.hxx"
-LwpDLList::LwpDLList(void)
+LwpDLList::LwpDLList()
{
m_pNext = m_pPrevious = NULL;
}
@@ -80,7 +80,7 @@ LwpDLList::insert(LwpDLList* Next,LwpDLList* Previous)
m_pPrevious = Previous;
}
-LwpDLList::~LwpDLList(void)
+LwpDLList::~LwpDLList()
{
remove();
}
diff --git a/lotuswordpro/source/filter/lwpdllist.hxx b/lotuswordpro/source/filter/lwpdllist.hxx
index bbb67d2..744d399 100644
--- a/lotuswordpro/source/filter/lwpdllist.hxx
+++ b/lotuswordpro/source/filter/lwpdllist.hxx
@@ -68,12 +68,12 @@
class LwpDLList
{
public:
- LwpDLList(void);
+ LwpDLList();
virtual ~LwpDLList();
void insert(LwpDLList*, LwpDLList*);
- void remove(void);
- LwpDLList* GetNext(void);
- LwpDLList* GetPrevious(void);
+ void remove();
+ LwpDLList* GetNext();
+ LwpDLList* GetPrevious();
void SetNext(LwpDLList*);
void SetPrevious(LwpDLList*);
private:
@@ -81,7 +81,7 @@ private:
LwpDLList* m_pPrevious;
};
-inline LwpDLList* LwpDLList::GetNext(void)
+inline LwpDLList* LwpDLList::GetNext()
{
return m_pNext;
}
@@ -91,7 +91,7 @@ inline void LwpDLList::SetNext(LwpDLList* Next)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list