summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.fetch1
-rw-r--r--RepositoryExternal.mk9
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx11
-rwxr-xr-xbin/check-elf-dynamic-objects3
-rw-r--r--configure.ac9
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx31
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx6
-rwxr-xr-xdesktop/scripts/soffice.sh4
m---------dictionaries0
-rw-r--r--download.lst30
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx60
-rw-r--r--embeddedobj/source/commonembedding/specialobject.cxx9
-rw-r--r--embeddedobj/source/inc/commonembobj.hxx3
-rw-r--r--embeddedobj/source/inc/specialobject.hxx7
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/curl/curl-7.26.0_win-proxy.patch9
-rw-r--r--external/curl/curl-msvc-disable-protocols.patch.12
-rw-r--r--external/curl/curl-nss.patch.16
-rw-r--r--external/curl/zlib.patch.012
-rw-r--r--external/hsqldb/UnpackedTarball_hsqldb.mk1
-rw-r--r--external/hsqldb/patches/disable-dump-script.patch14
-rw-r--r--external/libffi/ExternalPackage_libffi.mk20
-rw-r--r--external/libffi/ExternalProject_libffi.mk50
-rw-r--r--external/libffi/Makefile7
-rw-r--r--external/libffi/Module_libffi.mk18
-rw-r--r--external/libffi/README3
-rw-r--r--external/libffi/UnpackedTarball_libffi.mk14
-rw-r--r--external/liborcus/gcc9.patch.04
-rw-r--r--external/libpagemaker/UnpackedTarball_libpagemaker.mk4
-rw-r--r--external/libpagemaker/include.patch.110
-rw-r--r--external/openssl/ExternalPackage_openssl.mk8
-rw-r--r--external/openssl/ExternalProject_openssl.mk2
-rw-r--r--external/pdfium/Library_pdfium.mk142
-rw-r--r--external/pdfium/README4
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk19
-rw-r--r--external/pdfium/build.patch.1171
-rw-r--r--external/pdfium/c++20-comparison.patch12
-rw-r--r--external/pdfium/configs/build_config.h132
-rw-r--r--external/pdfium/inc/pch/precompiled_pdfium.hxx105
-rw-r--r--external/pdfium/msvc2017.patch.115
-rw-r--r--external/pdfium/ubsan.patch6
-rw-r--r--external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.159
-rw-r--r--external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1175
-rw-r--r--external/python3/0001-remove-long-double-from-ctypes-value-union.patch.134
-rw-r--r--external/python3/ExternalPackage_python3.mk334
-rw-r--r--external/python3/ExternalProject_python3.mk48
-rw-r--r--external/python3/UnpackedTarball_python3.mk16
-rw-r--r--external/python3/i100492-freebsd.patch.149
-rw-r--r--external/python3/internal-zlib.patch.022
-rw-r--r--external/python3/python-3.3.0-clang.patch.113
-rw-r--r--external/python3/python-3.3.0-darwin.patch.122
-rw-r--r--external/python3/python-3.3.0-pythreadstate.patch.115
-rw-r--r--external/python3/python-3.3.3-aix.patch.1146
-rw-r--r--external/python3/python-3.3.3-disable-obmalloc.patch.023
-rw-r--r--external/python3/python-3.3.3-elf-rpath.patch.115
-rw-r--r--external/python3/python-3.5.4-msvc-disable.patch.121
-rw-r--r--external/python3/python-3.5.4-ssl.patch.183
-rw-r--r--external/python3/python-3.5.tweak.strip.soabi.patch2
-rw-r--r--external/python3/python-3.7.6-msvc-ssl.patch.126
-rw-r--r--external/python3/python3-osx-avoid-new-10.13.patch.161
-rw-r--r--external/python3/ubsan.patch.045
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx1
-rw-r--r--forms/source/component/EventThread.hxx1
-rw-r--r--forms/source/xforms/xpathlib/xpathlib.cxx7
-rw-r--r--formula/source/core/api/token.cxx13
-rwxr-xr-xg18
-rw-r--r--include/svtools/imageresourceaccess.hxx2
-rw-r--r--include/svx/hexcolorcontrol.hxx2
-rw-r--r--include/svx/svdoole2.hxx17
-rw-r--r--include/svx/unoshape.hxx2
-rw-r--r--include/vcl/BitmapBuffer.hxx2
-rw-r--r--include/vcl/button.hxx2
-rw-r--r--include/vcl/font/Feature.hxx1
-rw-r--r--include/vcl/gdimtf.hxx1
-rw-r--r--io/source/acceptor/acc_pipe.cxx2
-rw-r--r--io/source/acceptor/acc_socket.cxx1
-rw-r--r--io/source/connector/connector.cxx2
-rw-r--r--pyuno/inc/pyuno.hxx1
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx2
-rw-r--r--pyuno/source/module/pyuno.cxx9
-rw-r--r--pyuno/source/module/pyuno_runtime.cxx31
-rw-r--r--readlicense_oo/license/license.xml23
-rw-r--r--sc/source/core/inc/interpre.hxx12
-rw-r--r--sc/source/core/tool/interpr1.cxx4
-rw-r--r--sc/source/core/tool/interpr3.cxx4
-rw-r--r--sc/source/core/tool/interpr4.cxx10
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx9
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx3
-rw-r--r--sfx2/source/doc/iframe.cxx69
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx22
-rw-r--r--solenv/flatpak-manifest.in6
-rw-r--r--solenv/gdb/libreoffice/sw.py6
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx2
-rw-r--r--svtools/source/contnr/contentenumeration.hxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx123
-rw-r--r--svx/source/svdraw/svdpdf.cxx15
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx1
-rw-r--r--svx/source/unodraw/shapeimpl.hxx5
-rw-r--r--svx/source/unodraw/unoshap4.cxx23
-rw-r--r--sw/CppunitTest_sw_core_crsr.mk73
-rw-r--r--sw/IwyuFilter_sw.yaml6
-rw-r--r--sw/Module_sw.mk1
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/qa/core/crsr/crsr.cxx58
-rw-r--r--sw/qa/core/crsr/data/sel-all-starts-with-table.odtbin0 -> 8720 bytes
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx58
-rw-r--r--sw/qa/extras/layout/data/tdf115094.docxbin32186 -> 31044 bytes
-rw-r--r--sw/qa/extras/layout/data/tox-update-wrong-pages.odtbin0 -> 18234 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx24
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx2
-rw-r--r--sw/source/core/crsr/callnk.cxx50
-rw-r--r--sw/source/core/doc/docfmt.cxx1
-rw-r--r--sw/source/core/fields/docufld.cxx7
-rw-r--r--sw/source/core/fields/flddat.cxx10
-rw-r--r--sw/source/core/inc/UndoTable.hxx8
-rw-r--r--sw/source/core/inc/frmtool.hxx1
-rw-r--r--sw/source/core/layout/flowfrm.cxx20
-rw-r--r--sw/source/core/layout/ftnfrm.cxx14
-rw-r--r--sw/source/core/layout/layouter.cxx14
-rw-r--r--sw/source/core/layout/sectfrm.cxx3
-rw-r--r--sw/source/core/layout/tabfrm.cxx4
-rw-r--r--sw/source/core/layout/wsfrm.cxx27
-rw-r--r--sw/source/core/ole/ndole.cxx99
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/view/vprint.cxx65
-rw-r--r--sw/source/filter/docx/swdocxreader.hxx2
-rw-r--r--sw/source/filter/html/htmlatr.cxx3
-rw-r--r--sw/source/filter/html/htmlctxt.cxx3
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx1
-rw-r--r--sw/source/filter/html/htmlfly.hxx1
-rw-r--r--sw/source/filter/html/htmlform.hxx2
-rw-r--r--sw/source/filter/html/htmlnumreader.cxx1
-rw-r--r--sw/source/filter/html/parcss1.hxx5
-rw-r--r--sw/source/filter/html/svxcss1.hxx1
-rw-r--r--sw/source/filter/html/swcss1.hxx3
-rw-r--r--sw/source/filter/html/swhtml.cxx1
-rw-r--r--sw/source/filter/html/swhtml.hxx1
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/inc/fltshell.hxx5
-rw-r--r--sw/source/filter/inc/msfilter.hxx4
-rw-r--r--sw/source/filter/inc/rtf.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx1
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx1
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx1
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx1
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx3
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx1
-rw-r--r--sw/source/filter/ww8/docxexport.cxx1
-rw-r--r--sw/source/filter/ww8/docxexport.hxx3
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx2
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx1
-rw-r--r--sw/source/filter/ww8/escher.hxx2
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx1
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx3
-rw-r--r--sw/source/filter/ww8/sortedarray.hxx1
-rw-r--r--sw/source/filter/ww8/types.hxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx2
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx1
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx1
-rw-r--r--sw/source/filter/ww8/writerwordglue.hxx1
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx1
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx1
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx1
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx1
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx2
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx5
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx1
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx1
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx7
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx6
-rw-r--r--sw/source/filter/xml/wrtxml.hxx3
-rw-r--r--sw/source/filter/xml/xmlbrshe.hxx3
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx1
-rw-r--r--sw/source/filter/xml/xmlimp.hxx2
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx3
-rw-r--r--sw/source/filter/xml/xmlitem.hxx2
-rw-r--r--sw/source/filter/xml/xmlithlp.hxx1
-rw-r--r--sw/source/filter/xml/xmltbli.hxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx1
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx11
-rw-r--r--ucb/qa/complex/ucb/UCB.java7
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx15
-rw-r--r--vcl/opengl/x11/X11DeviceInfo.cxx1
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx9
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx7
-rw-r--r--vcl/source/window/accessibility.cxx2
-rw-r--r--xmloff/source/draw/ximpshap.cxx29
-rw-r--r--xmloff/source/draw/ximpshap.hxx2
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx2
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.hxx2
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.hxx1
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx1
199 files changed, 1827 insertions, 1581 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 522a4e22bc72..d046a1029448 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -154,6 +154,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
$(call fetch_Optional,LIBASSUAN,LIBASSUAN_TARBALL) \
$(call fetch_Optional,LIBEOT,LIBEOT_TARBALL) \
$(call fetch_Optional,LIBEXTTEXTCAT,LIBEXTTEXTCAT_TARBALL) \
+ $(call fetch_Optional,LIBFFI,LIBFFI_TARBALL) \
$(call fetch_Optional,LIBGPGERROR,LIBGPGERROR_TARBALL) \
$(call fetch_Optional,LIBLANGTAG,LANGTAGREG_TARBALL) \
$(call fetch_Optional,LIBLANGTAG,LIBLANGTAG_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 82da26bfe624..4d7b30a24b0f 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3175,6 +3175,7 @@ else # !SYSTEM_PYTHON
$(eval $(call gb_Helper_register_packages_for_install,python,\
python3 \
+ $(if $(filter WNT,$(OS)),libffi) \
))
define gb_LinkTarget__use_python_headers
@@ -3207,12 +3208,18 @@ $(call gb_LinkTarget_add_libs,$(1),\
else
$(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,python3) \
- -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m \
+ -lpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
)
endif
endef
+# this is only used by python currently
+define gb_ExternalProject__use_libffi
+$(call gb_ExternalProject_use_external_project,$(1),libffi)
+
+endef
+
endif # SYSTEM_PYTHON
# ORCUS
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 5f5089ab5dbb..1a733a6eeb4f 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -730,9 +730,14 @@ Reference< XAccessible > SAL_CALL VCLXAccessibleToolBox::getAccessibleChild( sal
Reference< XAccessible> xParent = pChild;
if ( pItemWindow )
{
- xChild = new OToolBoxWindowItem(0,::comphelper::getProcessComponentContext(),pItemWindow->GetAccessible(),xParent);
- pItemWindow->SetAccessible(xChild);
- pChild->SetChild( xChild );
+ auto const xInnerAcc(pItemWindow->GetAccessible());
+ if (xInnerAcc) // else child is being disposed - avoid crashing
+ {
+ xChild = new OToolBoxWindowItem(0,
+ ::comphelper::getProcessComponentContext(), xInnerAcc, xParent);
+ pItemWindow->SetAccessible(xChild);
+ pChild->SetChild( xChild );
+ }
}
xChild = pChild;
if ( nHighlightItemId > 0 && nItemId == nHighlightItemId )
diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 3667f5c09a83..24175f66d40c 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -113,6 +113,9 @@ local file="$1"
# skip the majority of files, no ELF binaries here
skip=1
;;
+ */_uuid.cpython-*.so)
+ whitelist="${whitelist} libuuid.so.1"
+ ;;
*/libcairocanvaslo.so)
whitelist="${whitelist} libcairo.so.2"
;;
diff --git a/configure.ac b/configure.ac
index 64ed87fda8a5..107a3505d54f 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],[6.3.6.19],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.3.6.29],[],[],[http://documentfoundation.org/])
dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
@@ -8749,13 +8749,16 @@ int main(int argc, char **argv) {
internal)
SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3
- PYTHON_VERSION_MINOR=5
- PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.9
+ PYTHON_VERSION_MINOR=8
+ PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.17
if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
fi
AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
BUILD_TYPE="$BUILD_TYPE PYTHON"
+ if test "$OS" = LINUX -o "$OS" = WNT ; then
+ BUILD_TYPE="$BUILD_TYPE LIBFFI"
+ fi
# Embedded Python dies without Home set
if test "$HOME" = ""; then
export HOME=""
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index c80826d4a79b..7922a020657d 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -299,6 +299,37 @@ namespace connectivity
} // if ( xStream.is() )
::comphelper::disposeComponent(xStream);
}
+
+ // disallow any database/script files that contain a "SCRIPT[.*]" entry (this is belt and braces
+ // in that bundled hsqldb 1.8.0 is patched to also reject them)
+ //
+ // hsqldb 2.6.0 release notes have: added system role SCRIPT_OPS for export / import of database structure and data
+ // which seems to provide a builtin way to do this with contemporary hsqldb
+ const OUString sScript( "script" );
+ if (!bIsNewDatabase && xStorage->isStreamElement(sScript))
+ {
+ Reference<XStream > xStream = xStorage->openStreamElement(sScript, ElementModes::READ);
+ if (xStream.is())
+ {
+ std::unique_ptr<SvStream> pStream(::utl::UcbStreamHelper::CreateStream(xStream));
+ if (pStream)
+ {
+ OString sLine;
+ while (pStream->ReadLine(sLine))
+ {
+ OString sText = sLine.trim();
+ if (sText.startsWithIgnoreAsciiCase("SCRIPT"))
+ {
+ ::connectivity::SharedResources aResources;
+ sMessage = aResources.getResourceString(STR_COULD_NOT_LOAD_FILE).replaceFirst("$filename$", sSystemPath);
+ break;
+ }
+ }
+ }
+ } // if ( xStream.is() )
+ ::comphelper::disposeComponent(xStream);
+ }
+
}
catch(Exception&)
{
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index f3f09b71aa2a..83083b4bf7b3 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2415,7 +2415,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_ODT()
}
int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument);
- CPPUNIT_ASSERT_EQUAL(int(1), nState);
+ // OK or NOTVALIDATED (signature is OK, but certificate could not be validated)
+ CPPUNIT_ASSERT(nState == 1 || nState == 4);
}
void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
@@ -2475,7 +2476,8 @@ void DesktopLOKTest::testInsertCertificate_PEM_DOCX()
}
int nState = pDocument->m_pDocumentClass->getSignatureState(pDocument);
- CPPUNIT_ASSERT_EQUAL(int(5), nState);
+ // PARTIAL_OK or NOTVALIDATED_PARTIAL_OK
+ CPPUNIT_ASSERT(nState == 5 || nState == 6);
}
void DesktopLOKTest::testSignDocument_PEM_PDF()
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index fee25b3f0fb3..3fb45728e287 100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -78,8 +78,8 @@ for arg in "$@" $EXTRAOPT ; do
case "$arg" in
--record)
if which rr >/dev/null 2>&1 ; then
- # smoketest may already be recorded => use ignore-nested
- RRCHECK="rr record --ignore-nested"
+ # smoketest may already be recorded => ignore nested
+ RRCHECK="rr record --nested=ignore"
checks="c$checks"
else
echo "Error: Can't find the tool \"rr\", --record option will be ignored."
diff --git a/dictionaries b/dictionaries
-Subproject be0a77ce3842c5059b9bc5bc5523bd6125b7838
+Subproject fad51a3e1c2a485b98fc388768d869e01905bb1
diff --git a/download.lst b/download.lst
index 246eedf56d0e..52b288084c4d 100644
--- a/download.lst
+++ b/download.lst
@@ -29,8 +29,8 @@ export CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52
export CPPUNIT_TARBALL := cppunit-1.14.0.tar.gz
export CT2N_SHA256SUM := 71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
export CT2N_TARBALL := 1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := 2d61116e5f485581f6d59865377df4463f2e788677ac43222b496d4e49fb627b
-export CURL_TARBALL := curl-7.86.0.tar.xz
+export CURL_SHA256SUM := 0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0
+export CURL_TARBALL := curl-8.0.1.tar.xz
export EBOOK_SHA256SUM := 7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
export EPOXY_SHA256SUM := 002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
@@ -146,6 +146,8 @@ export LIBEOT_SHA256SUM := cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9
export LIBEOT_TARBALL := libeot-0.01.tar.bz2
export LIBEXTTEXTCAT_SHA256SUM := 13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8
export LIBEXTTEXTCAT_TARBALL := libexttextcat-3.4.5.tar.xz
+export LIBFFI_SHA256SUM := 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
+export LIBFFI_TARBALL := libffi-3.3.tar.gz
export LIBGPGERROR_SHA256SUM := 4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2
export LIBGPGERROR_TARBALL := libgpg-error-1.27.tar.bz2
export LIBLANGTAG_SHA256SUM := d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e
@@ -156,8 +158,8 @@ export LIBTOMMATH_SHA256SUM := 083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
export LIBTOMMATH_TARBALL := ltm-1.0.zip
export XMLSEC_SHA256SUM := 13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4
export XMLSEC_TARBALL := xmlsec1-1.2.28.tar.gz
-export LIBXML_SHA256SUM := 5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
-export LIBXML_VERSION_MICRO := 3
+export LIBXML_SHA256SUM := ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45
+export LIBXML_VERSION_MICRO := 4
export LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz
export LIBXSLT_SHA256SUM := 8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79
export LIBXSLT_VERSION_MICRO := 35
@@ -181,8 +183,8 @@ export MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
export NEON_SHA256SUM := db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
export NEON_TARBALL := neon-0.30.2.tar.gz
-export NSS_SHA256SUM := 5369ed274a19f480ec94e1faef04da63e3cbac1a82e15bb1751e58b2f274b835
-export NSS_TARBALL := nss-3.79-with-nspr-4.34.tar.gz
+export NSS_SHA256SUM := fcfa26d2738ec5b0cf72ab4be784eac832a75132cda2e295799c04d62a93607a
+export NSS_TARBALL := nss-3.88.1-with-nspr-4.35.tar.gz
export ODFGEN_SHA256SUM := 2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
export ODFGEN_VERSION_MICRO := 6
export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
@@ -192,26 +194,26 @@ export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55
export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
export OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34
export OPENLDAP_TARBALL := openldap-2.4.59.tgz
-export OPENSSL_SHA256SUM := e8be6a35fe41d10603c3cc635e93289ed00bf34b79671a3a4de64fcee00d5242
-export OPENSSL_TARBALL := openssl-1.1.1i.tar.gz
+export OPENSSL_SHA256SUM := 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
+export OPENSSL_TARBALL := openssl-1.1.1t.tar.gz
export ORCUS_SHA256SUM := 3f48cfbc21ad74787218284939c04d42cb836c73bc393f27f538b668e4d78a5f
export ORCUS_TARBALL := liborcus-0.14.1.tar.gz
export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
-export PDFIUM_SHA256SUM := eca406d47ac7e2a84dcc86f93c08f96e591d409589e881477fa75e488e4851d8
-export PDFIUM_TARBALL := pdfium-4306.tar.bz2
+export PDFIUM_SHA256SUM := b1052ff24e9ffb11af017c444bb0f6ad508d64c9a0fb88cacb0e8210245dde06
+export PDFIUM_TARBALL := pdfium-5778.tar.bz2
export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb30d5852a41e2e
export POPPLER_TARBALL := poppler-22.09.0.tar.xz
-export POSTGRESQL_SHA256SUM := 9b81067a55edbaabc418aacef457dd8477642827499560b00615a6ea6c13f6b3
-export POSTGRESQL_TARBALL := postgresql-13.5.tar.bz2
-export PYTHON_SHA256SUM := c24a37c63a67f53bdd09c5f287b5cff8e8b98f857bf348c577d454d3f74db049
-export PYTHON_TARBALL := Python-3.5.9.tar.xz
+export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2
+export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2
+PYTHON_SHA256SUM := 2e54b0c68191f16552f6de2e97a2396540572a219f6bbb28591a137cecc490a9
+PYTHON_TARBALL := Python-3.8.17.tar.xz
export QXP_SHA256SUM := e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
export QXP_TARBALL := libqxp-0.0.2.tar.xz
export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 8c888df48a9e..eaa8789e6fe0 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -155,6 +155,37 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( bool bBeforeChange, sa
}
}
+void OCommonEmbeddedObject::SetInplaceActiveState()
+{
+ if ( !m_xClientSite.is() )
+ throw embed::WrongStateException( "client site not set, yet", *this );
+
+ uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY );
+ if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() )
+ throw embed::WrongStateException(); //TODO: can't activate inplace
+ xInplaceClient->activatingInplace();
+
+ uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW );
+
+ m_xClientWindow = xClientWindowSupplier->getWindow();
+ m_aOwnRectangle = xInplaceClient->getPlacement();
+ m_aClipRectangle = xInplaceClient->getClipRectangle();
+ awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle );
+
+ // create own window based on the client window
+ // place and resize the window according to the rectangles
+ uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW );
+
+ // dispatch provider may not be provided
+ uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider();
+ bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP );
+ m_nObjectState = embed::EmbedStates::INPLACE_ACTIVE;
+ if ( !bOk )
+ {
+ SwitchStateTo_Impl( embed::EmbedStates::RUNNING );
+ throw embed::WrongStateException(); //TODO: can't activate inplace
+ }
+}
void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
@@ -229,34 +260,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
if ( nNextState == embed::EmbedStates::INPLACE_ACTIVE )
{
- if ( !m_xClientSite.is() )
- throw embed::WrongStateException( "client site not set, yet", *this );
-
- uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY );
- if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() )
- throw embed::WrongStateException(); //TODO: can't activate inplace
- xInplaceClient->activatingInplace();
-
- uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW );
-
- m_xClientWindow = xClientWindowSupplier->getWindow();
- m_aOwnRectangle = xInplaceClient->getPlacement();
- m_aClipRectangle = xInplaceClient->getClipRectangle();
- awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle );
-
- // create own window based on the client window
- // place and resize the window according to the rectangles
- uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW );
-
- // dispatch provider may not be provided
- uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider();
- bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP );
- m_nObjectState = nNextState;
- if ( !bOk )
- {
- SwitchStateTo_Impl( embed::EmbedStates::RUNNING );
- throw embed::WrongStateException(); //TODO: can't activate inplace
- }
+ SetInplaceActiveState();
}
else if ( nNextState == embed::EmbedStates::ACTIVE )
{
diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx
index a1e55d87debe..e5e7504ef3d2 100644
--- a/embeddedobj/source/commonembedding/specialobject.cxx
+++ b/embeddedobj/source/commonembedding/specialobject.cxx
@@ -57,6 +57,7 @@ uno::Any SAL_CALL OSpecialEmbeddedObject::queryInterface( const uno::Type& rType
uno::Any aReturn = ::cppu::queryInterface( rType,
static_cast< embed::XEmbeddedObject* >( this ),
static_cast< embed::XInplaceObject* >( this ),
+ static_cast< embed::XCommonEmbedPersist* >( static_cast< embed::XEmbedPersist* >( this ) ),
static_cast< embed::XVisualObject* >( this ),
static_cast< embed::XClassifiedObject* >( this ),
static_cast< embed::XComponentSupplier* >( this ),
@@ -170,4 +171,12 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID )
OCommonEmbeddedObject::doVerb( nVerbID );
}
+void SAL_CALL OSpecialEmbeddedObject::reload(
+ const uno::Sequence< beans::PropertyValue >&,
+ const uno::Sequence< beans::PropertyValue >&)
+{
+ // Allow IFrames to reload their content
+ SetInplaceActiveState();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index c00fbdc096be..78e46e0c0c89 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -231,6 +231,9 @@ private:
const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs );
+protected:
+ void SetInplaceActiveState();
+
public:
OCommonEmbeddedObject(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
diff --git a/embeddedobj/source/inc/specialobject.hxx b/embeddedobj/source/inc/specialobject.hxx
index 32ad61a7a582..4c4bc70db377 100644
--- a/embeddedobj/source/inc/specialobject.hxx
+++ b/embeddedobj/source/inc/specialobject.hxx
@@ -48,6 +48,13 @@ public:
virtual void SAL_CALL changeState( sal_Int32 nNewState ) override;
virtual void SAL_CALL doVerb( sal_Int32 nVerbID ) override;
+
+// XCommonEmbedPersist
+
+ virtual void SAL_CALL reload(
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
+ const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs ) override;
+
};
#endif
diff --git a/external/Module_external.mk b/external/Module_external.mk
index e9d53ee5ab7c..b03083640336 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -57,6 +57,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,LIBATOMIC_OPS,libatomic_ops) \
$(call gb_Helper_optional,LIBEOT,libeot) \
$(call gb_Helper_optional,LIBEXTTEXTCAT,libexttextcat) \
+ $(call gb_Helper_optional,LIBFFI,libffi) \
$(call gb_Helper_optional,LIBGPGERROR,libgpg-error) \
$(call gb_Helper_optional,LIBLANGTAG,liblangtag) \
$(call gb_Helper_optional,LIBNUMBERTEXT,libnumbertext) \
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch
index 6fb20533e097..62016a70e8a0 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -12,8 +12,8 @@
--- curl-7.26.0/lib/url.c
+++ misc/build/curl-7.26.0/lib/url.c
@@ -78,6 +78,10 @@
- bool Curl_win32_idn_to_ascii(const char *in, char **out);
- #endif /* USE_LIBIDN2 */
+
+ #include <limits.h>
+#ifdef _WIN32
+#include <WinHttp.h>
@@ -44,7 +44,7 @@
/****************************************************************
* Detect what (if any) proxy to use. Remember that this selects a host
* name and is not limited to HTTP proxies only.
-@@ -4613,6 +4633,66 @@
+@@ -4613,6 +4633,67 @@
* For compatibility, the all-uppercase versions of these variables are
* checked if the lowercase versions don't exist.
*/
@@ -58,6 +58,7 @@
+ char *ieProxy;
+ char *ieNoProxy;
+ char *pos;
++ bool spacesp;
+
+ ieProxy = wstrToCstr(ieProxyConfig->lpszProxy);
+ ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
@@ -72,7 +73,7 @@
+ }
+ }
+
-+ if(!Curl_check_noproxy(conn->host.name, no_proxy)) {
++ if(!Curl_check_noproxy(conn->host.name, no_proxy, &spacesp)) {
+ /* Look for the http proxy setting */
+ char *tok;
+ char *saveptr;
diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1
index 89c4ff576f85..71ff0c01a028 100644
--- a/external/curl/curl-msvc-disable-protocols.patch.1
+++ b/external/curl/curl-msvc-disable-protocols.patch.1
@@ -2,7 +2,7 @@ disable protocols nobody needs in MSVC build
--- curl/lib/config-win32.h.orig 2017-08-09 16:43:29.464000000 +0200
+++ curl/lib/config-win32.h 2017-08-09 16:47:38.549200000 +0200
-@@ -616,4 +616,20 @@
+@@ -654,4 +654,20 @@
# define ENABLE_IPV6 1
#endif
diff --git a/external/curl/curl-nss.patch.1 b/external/curl/curl-nss.patch.1
index 5ef25748d7eb..2e8766b3d45f 100644
--- a/external/curl/curl-nss.patch.1
+++ b/external/curl/curl-nss.patch.1
@@ -1,7 +1,7 @@
diff -ur curl.org/configure curl/configure
---- curl.org/configure 2016-03-13 15:14:07.177000076 +0100
-+++ curl/configure 2016-03-13 15:16:44.132000076 +0100
-@@ -27985,7 +27985,12 @@
+--- curl.orig/configure 2023-02-20 16:11:55.000000000 +0900
++++ curl/configure 2023-02-23 15:40:58.617432471 +0900
+@@ -28675,7 +28675,12 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
addld="-L$OPT_NSS/lib"
diff --git a/external/curl/zlib.patch.0 b/external/curl/zlib.patch.0
index b8e242a3aaea..b4442ba262d1 100644
--- a/external/curl/zlib.patch.0
+++ b/external/curl/zlib.patch.0
@@ -1,6 +1,6 @@
--- configure
+++ configure
-@@ -22808,7 +22808,6 @@
+@@ -23035,7 +23035,6 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
@@ -8,7 +8,7 @@
# Check whether --with-zlib was given.
if test ${with_zlib+y}
-@@ -22818,6 +22818,7 @@
+@@ -23045,6 +23044,7 @@
if test "$OPT_ZLIB" = "no" ; then
@@ -16,7 +16,7 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
else
-@@ -22825,6 +825,21 @@
+@@ -23052,6 +23052,21 @@
OPT_ZLIB=""
fi
@@ -38,7 +38,7 @@
if test -z "$OPT_ZLIB" ; then
if test -n "$PKG_CONFIG"; then
-@@ -23120,6 +23120,7 @@
+@@ -23344,6 +23359,7 @@
printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
curl_zlib_msg="enabled"
fi
@@ -48,7 +48,7 @@
if test x"$AMFIXLIB" = x1; then
--- configure.ac
+++ configure.ac
-@@ -1222,19 +1222,30 @@
+@@ -1243,19 +1243,30 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
@@ -80,7 +80,7 @@
if test -z "$OPT_ZLIB" ; then
CURL_CHECK_PKGCONFIG(zlib)
-@@ -1316,6 +1316,7 @@
+@@ -1336,6 +1347,7 @@
AC_MSG_NOTICE([found both libz and libz.h header])
curl_zlib_msg="enabled"
fi
diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk b/external/hsqldb/UnpackedTarball_hsqldb.mk
index cbba770f19a0..ed262cccf4ca 100644
--- a/external/hsqldb/UnpackedTarball_hsqldb.mk
+++ b/external/hsqldb/UnpackedTarball_hsqldb.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\
external/hsqldb/patches/jdbc-4.1.patch \
external/hsqldb/patches/multipleResultSets.patch \
) \
+ external/hsqldb/patches/disable-dump-script.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/patches/disable-dump-script.patch b/external/hsqldb/patches/disable-dump-script.patch
new file mode 100644
index 000000000000..401dd38abc9a
--- /dev/null
+++ b/external/hsqldb/patches/disable-dump-script.patch
@@ -0,0 +1,14 @@
+--- a/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 11:08:11.297243034 +0000
++++ b/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 13:49:17.973089433 +0000
+@@ -403,6 +403,11 @@
+ throw Trace.error(Trace.INVALID_IDENTIFIER);
+ }
+
++ // added condition to avoid execution of spurious command in .script or .log file
++ if (session.isProcessingScript() || session.isProcessingLog()) {
++ return new Result(ResultConstants.UPDATECOUNT);
++ }
++
+ dsw = new ScriptWriterText(database, token, true, true, true);
+
+ dsw.writeAll();
diff --git a/external/libffi/ExternalPackage_libffi.mk b/external/libffi/ExternalPackage_libffi.mk
new file mode 100644
index 000000000000..61b0a1ca460c
--- /dev/null
+++ b/external/libffi/ExternalPackage_libffi.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,libffi,libffi))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libffi,libffi))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_files,libffi,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \
+ $(HOST_PLATFORM)/.libs/libffi-7.dll \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/ExternalProject_libffi.mk b/external/libffi/ExternalProject_libffi.mk
new file mode 100644
index 000000000000..0ff625ea3e20
--- /dev/null
+++ b/external/libffi/ExternalProject_libffi.mk
@@ -0,0 +1,50 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,libffi))
+
+$(eval $(call gb_ExternalProject_register_targets,libffi,\
+ build \
+))
+
+# set prefix so that it ends up in libffi.pc so that pkg-config in python3 works
+# For a static Windows build, change CPPFLAGS to include -D_LIB and --disable-static
+# Also remove the ExternalPackage in that case
+
+libffi_WIN_PLATFORM := $(strip \
+ $(if $(filter INTEL,$(CPUNAME)),32) \
+ $(if $(filter X86_64,$(CPUNAME)),64) \
+ $(if $(filter ARM64,$(CPUNAME)),arm64) \
+ )
+
+$(call gb_ExternalProject_get_state_target,libffi,build):
+ $(call gb_ExternalProject_run,build,\
+ export LIB="$(ILIB)" && \
+ ./configure \
+ --enable-option-checking=fatal \
+ --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+ $(if $(filter LINUX,$(OS)), \
+ --disable-shared \
+ CC="$(CC) -fvisibility=hidden" \
+ --with-pic \
+ --enable-portable-binary) \
+ $(if $(filter WNT,$(OS)), \
+ --disable-static \
+ CC="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \
+ CXX="$(call gb_UnpackedTarball_get_dir,libffi)/msvcc.sh -m$(libffi_WIN_PLATFORM)" \
+ LD='link' \
+ CPP='cl -nologo -EP' \
+ CXXCPP='cl -nologo -EP' \
+ CPPFLAGS="-DFFI_BUILDING_DLL $(SOLARINC)") \
+ --prefix=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM) \
+ --disable-docs \
+ && $(MAKE) \
+ )
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/Makefile b/external/libffi/Makefile
new file mode 100644
index 000000000000..e4968cf85fb6
--- /dev/null
+++ b/external/libffi/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/Module_libffi.mk b/external/libffi/Module_libffi.mk
new file mode 100644
index 000000000000..ace75480abe3
--- /dev/null
+++ b/external/libffi/Module_libffi.mk
@@ -0,0 +1,18 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,libffi))
+
+$(eval $(call gb_Module_add_targets,libffi,\
+ UnpackedTarball_libffi \
+ ExternalProject_libffi \
+ ExternalPackage_libffi \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/README b/external/libffi/README
new file mode 100644
index 000000000000..cdf7fa937bc8
--- /dev/null
+++ b/external/libffi/README
@@ -0,0 +1,3 @@
+libffi is required to build CPython's ctypes module
+
+https://sourceware.org/libffi/
diff --git a/external/libffi/UnpackedTarball_libffi.mk b/external/libffi/UnpackedTarball_libffi.mk
new file mode 100644
index 000000000000..5d0582329ac5
--- /dev/null
+++ b/external/libffi/UnpackedTarball_libffi.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,libffi))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,libffi,$(LIBFFI_TARBALL)))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/liborcus/gcc9.patch.0 b/external/liborcus/gcc9.patch.0
index f89b1dddccb1..e12500ba3df1 100644
--- a/external/liborcus/gcc9.patch.0
+++ b/external/liborcus/gcc9.patch.0
@@ -1,6 +1,6 @@
--- include/orcus/types.hpp
+++ include/orcus/types.hpp
-@@ -7,6 +7,14 @@
+@@ -7,7 +7,16 @@
#ifndef INCLUDED_ORCUS_TYPES_HPP
#define INCLUDED_ORCUS_TYPES_HPP
@@ -13,8 +13,10 @@
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
++#include <cstdint>
#include <cstdlib>
#include <vector>
+ #include <string>
@@ -145,6 +152,10 @@
typedef ::std::vector<xml_token_attr_t> xml_attrs_t;
diff --git a/external/libpagemaker/UnpackedTarball_libpagemaker.mk b/external/libpagemaker/UnpackedTarball_libpagemaker.mk
index a090d334c3fe..c21f9b7db394 100644
--- a/external/libpagemaker/UnpackedTarball_libpagemaker.mk
+++ b/external/libpagemaker/UnpackedTarball_libpagemaker.mk
@@ -21,4 +21,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \
))
endif
+$(eval $(call gb_UnpackedTarball_add_patches,libpagemaker, \
+ external/libpagemaker/include.patch.1 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libpagemaker/include.patch.1 b/external/libpagemaker/include.patch.1
new file mode 100644
index 000000000000..ac6cce7f5898
--- /dev/null
+++ b/external/libpagemaker/include.patch.1
@@ -0,0 +1,10 @@
+--- libpagemaker/src/lib/PMDTypes.h.orig 2023-05-10 19:58:32.975142131 +0200
++++ libpagemaker/src/lib/PMDTypes.h 2023-05-10 19:58:55.511175229 +0200
+@@ -10,6 +10,7 @@
+ #ifndef __PMDTYPES_H__
+ #define __PMDTYPES_H__
+
++#include <cstdint>
+ #include <boost/optional.hpp>
+
+ #include "Units.h"
diff --git a/external/openssl/ExternalPackage_openssl.mk b/external/openssl/ExternalPackage_openssl.mk
index de77f53f33b9..d0c0dbaab975 100644
--- a/external/openssl/ExternalPackage_openssl.mk
+++ b/external/openssl/ExternalPackage_openssl.mk
@@ -16,6 +16,14 @@ $(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER),\
libcrypto-1_1.dll \
libssl-1_1.dll \
))
+ifneq ($(DISABLE_PYTHON),TRUE)
+ifneq ($(SYSTEM_PYTHON),TRUE)
+$(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \
+ libcrypto-1_1.dll \
+ libssl-1_1.dll \
+))
+endif
+endif
endif
# vim: set noet sw=4 ts=4:
diff --git a/external/openssl/ExternalProject_openssl.mk b/external/openssl/ExternalProject_openssl.mk
index 17fd4c68da54..eccf8438958a 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -83,7 +83,9 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
CC="$(CC) -fPIC \
$(if $(filter TRUE, $(ENABLE_DBGUTIL)), -DPURIFY,) \
$(if $(filter-out WNT MACOSX,$(OS)),-fvisibility=hidden)" \
+ && ln -s . lib \
)
+# symlink lib dir for python3
endif
# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 82e38c21b76a..188faa1cee67 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_Library_set_include,pdfium,\
-I$(call gb_UnpackedTarball_get_dir,pdfium) \
-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \
-I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/agg23 \
+ -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party/abseil-cpp \
$$(INCLUDE) \
))
@@ -39,14 +40,11 @@ $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
# pdfium
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annot \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annothandlermgr \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiteration \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannot \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_baannothandler \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_formfillenvironment \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pageview \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widget \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_widgethandler \
UnpackedTarball/pdfium/fpdfsdk/fpdf_dataavail \
UnpackedTarball/pdfium/fpdfsdk/fpdf_ext \
UnpackedTarball/pdfium/fpdfsdk/fpdf_flatten \
@@ -55,10 +53,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/fpdf_structtree \
UnpackedTarball/pdfium/fpdfsdk/fpdf_sysfontinfo \
UnpackedTarball/pdfium/fpdfsdk/fpdf_transformpage \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_actionhandler \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiterator \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_customaccess \
- UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_fieldaction \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_filewriteadapter \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_helpers \
UnpackedTarball/pdfium/fpdfsdk/fpdf_annot \
@@ -77,6 +73,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_interactiveform \
UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_renderpage \
UnpackedTarball/pdfium/fpdfsdk/fpdf_signature \
+ UnpackedTarball/pdfium/constants/annotation_common \
+ UnpackedTarball/pdfium/constants/appearance \
+ UnpackedTarball/pdfium/constants/form_fields \
+ UnpackedTarball/pdfium/constants/page_object \
+ UnpackedTarball/pdfium/constants/stream_dict_common \
+ UnpackedTarball/pdfium/constants/transparency \
+ UnpackedTarball/pdfium/constants/font_encodings \
))
# fdrm
@@ -90,7 +93,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_checkbox \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_combobox \
- UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_formfiller \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_formfield \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_interactiveformfiller \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_listbox \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_pushbutton \
@@ -98,7 +101,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textfield \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_button \
UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textobject \
- UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_privatedata \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_fieldaction \
+ UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_perwindowdata \
))
# fpdfapi
@@ -233,10 +237,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageloader \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \
- UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageimagecache \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \
@@ -254,7 +257,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/font/cfx_stockfontarray \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cid2unicodemap \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmap \
- UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmapmanager \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cmapparser \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontglobals \
UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_tounicodemap \
@@ -282,11 +284,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercontext \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \
UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \
+ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_indexedcs \
+ UnpackedTarball/pdfium/core/fpdfapi/parser/object_tree_traversal_util \
))
# fpdfdoc
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/core/fpdfdoc/cline \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_aaction \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_action \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annot \
@@ -307,18 +311,17 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_nametree \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_numbertree \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_pagelabel \
- UnpackedTarball/pdfium/core/fpdfdoc/cpdf_variabletext \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_viewerpreferences \
UnpackedTarball/pdfium/core/fpdfdoc/cpvt_fontmap \
- UnpackedTarball/pdfium/core/fpdfdoc/cpvt_generateap \
UnpackedTarball/pdfium/core/fpdfdoc/cpvt_wordinfo \
- UnpackedTarball/pdfium/core/fpdfdoc/csection \
- UnpackedTarball/pdfium/core/fpdfdoc/ctypeset \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structelement \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structtree \
- UnpackedTarball/pdfium/core/fpdfdoc/cba_fontmap \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_color_utils \
UnpackedTarball/pdfium/core/fpdfdoc/cpdf_icon \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bafontmap \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_generateap \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_section \
+ UnpackedTarball/pdfium/core/fpdfdoc/cpvt_variabletext \
))
# fpdftext
@@ -349,7 +352,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_SymbolDict \
UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_TrdProc \
UnpackedTarball/pdfium/core/fxcodec/gif/cfx_gif \
- UnpackedTarball/pdfium/core/fxcodec/gif/cfx_lzwdecompressor \
+ UnpackedTarball/pdfium/core/fxcodec/gif/lzw_decompressor \
UnpackedTarball/pdfium/core/fxcodec/cfx_codec_memory \
UnpackedTarball/pdfium/core/fxcodec/fax/faxmodule \
UnpackedTarball/pdfium/core/fxcodec/scanlinedecoder \
@@ -359,7 +362,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext \
UnpackedTarball/pdfium/core/fxcodec/basic/basicmodule \
UnpackedTarball/pdfium/core/fxcodec/flate/flatemodule \
- UnpackedTarball/pdfium/core/fxcodec/icc/iccmodule \
+ UnpackedTarball/pdfium/core/fxcodec/icc/icc_transform \
UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_decoder \
UnpackedTarball/pdfium/core/fxcodec/jpeg/jpeg_common \
))
@@ -387,7 +390,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/css/cfx_csscustomproperty \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssdeclaration \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssenumvalue \
- UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssexttextbuf \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssnumbervalue \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_csspropertyholder \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssrulecollection \
@@ -397,16 +399,15 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstyleselector \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssstylesheet \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_csssyntaxparser \
- UnpackedTarball/pdfium/core/fxcrt/css/cfx_csstextbuf \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvalue \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvaluelist \
UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssvaluelistparser \
+ UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssinputtextbuf \
+ UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssoutputtextbuf \
UnpackedTarball/pdfium/core/fxcrt/cfx_datetime \
UnpackedTarball/pdfium/core/fxcrt/bytestring \
- UnpackedTarball/pdfium/core/fxcrt/cfx_binarybuf \
UnpackedTarball/pdfium/core/fxcrt/cfx_bitstream \
UnpackedTarball/pdfium/core/fxcrt/cfx_utf8decoder \
- UnpackedTarball/pdfium/core/fxcrt/cfx_widetextbuf \
UnpackedTarball/pdfium/core/fxcrt/fx_random \
UnpackedTarball/pdfium/core/fxcrt/fx_string \
UnpackedTarball/pdfium/core/fxcrt/widestring \
@@ -414,9 +415,14 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/fx_codepage \
UnpackedTarball/pdfium/core/fxcrt/fx_number \
UnpackedTarball/pdfium/core/fxcrt/cfx_utf8encoder \
- UnpackedTarball/pdfium/core/fxcrt/cfx_readonlymemorystream \
UnpackedTarball/pdfium/core/fxcrt/observed_ptr \
UnpackedTarball/pdfium/core/fxcrt/string_data_template \
+ UnpackedTarball/pdfium/core/fxcrt/binary_buffer \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_span_stream \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_string_stream \
+ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_vector_stream \
+ UnpackedTarball/pdfium/core/fxcrt/fx_memory_malloc \
+ UnpackedTarball/pdfium/core/fxcrt/widetext_buffer \
))
# fxge
@@ -462,7 +468,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/cfx_gemodule \
UnpackedTarball/pdfium/core/fxge/cfx_graphstate \
UnpackedTarball/pdfium/core/fxge/cfx_graphstatedata \
- UnpackedTarball/pdfium/core/fxge/cfx_pathdata \
+ UnpackedTarball/pdfium/core/fxge/cfx_path \
UnpackedTarball/pdfium/core/fxge/cfx_renderdevice \
UnpackedTarball/pdfium/core/fxge/cfx_substfont \
UnpackedTarball/pdfium/core/fxge/cfx_unicodeencoding \
@@ -474,6 +480,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/dib/cfx_cmyk_to_srgb \
UnpackedTarball/pdfium/core/fxge/text_char_pos \
UnpackedTarball/pdfium/core/fxge/cfx_face \
+ UnpackedTarball/pdfium/core/fxge/cfx_defaultrenderdevice \
+ UnpackedTarball/pdfium/core/fxge/calculate_pitch \
))
# javascript, build with pdf_enable_v8 disabled.
@@ -490,9 +498,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_caret \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_combo_box \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_edit \
- UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_edit_ctrl \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_edit_impl \
- UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_icon \
+ UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_sbbutton \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_list_box \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_cbbutton \
UnpackedTarball/pdfium/fpdfsdk/pwl/cpwl_cblistbox \
@@ -520,47 +527,44 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/third_party/agg23/agg_vcgen_stroke \
))
+# third_party/abseil-cpp
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_optional_access \
+ UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_variant_access \
+))
+
# third_party/fx_libopenjpeg
$(eval $(call gb_Library_add_generated_cobjects,pdfium,\
- UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/event \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/image \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
- UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/bio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/cio \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/dwt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/event \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/function_list \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/image \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/invert \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/j2k \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/jp2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/mct \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/mqc \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/opj_clock \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/pi \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/thread \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/t1 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/t2 \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/tcd \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/tgt \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/sparse_array \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/ht_dec \
))
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \
+ UnpackedTarball/pdfium/third_party/libopenjpeg/opj_malloc \
))
# pdfium_base
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc \
UnpackedTarball/pdfium/third_party/base/debug/alias \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/oom_callback \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_bucket \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \
- UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \
UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \
))
@@ -620,12 +624,14 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
UnpackedTarball/pdfium/third_party/freetype/src/src/truetype/truetype \
UnpackedTarball/pdfium/third_party/freetype/src/src/type1/type1 \
UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftdebug \
+ UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftfstype \
))
endif
ifneq ($(OS),WNT)
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_posix \
+ UnpackedTarball/pdfium/core/fxcrt/fx_folder_posix \
))
endif
@@ -641,8 +647,10 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/win32/cps_printer_driver \
UnpackedTarball/pdfium/core/fxge/win32/ctext_only_printer_driver \
UnpackedTarball/pdfium/core/fxge/win32/cwin32_platform \
+ UnpackedTarball/pdfium/core/fxge/win32/cfx_psfonttracker \
UnpackedTarball/pdfium/core/fxge/cfx_windowsrenderdevice \
UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \
+ UnpackedTarball/pdfium/core/fxcrt/fx_folder_windows \
UnpackedTarball/pdfium/third_party/base/win/win_util \
UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_windowsrenderdevice \
))
@@ -660,7 +668,7 @@ ifeq ($(OS),MACOSX)
# fxge
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \
- UnpackedTarball/pdfium/core/fxge/apple/fx_mac_impl \
+ UnpackedTarball/pdfium/core/fxge/apple/fx_apple_impl \
UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \
))
@@ -670,6 +678,20 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\
))
endif
+ifeq ($(OS),iOS)
+# fxge
+$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
+ UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \
+ UnpackedTarball/pdfium/core/fxge/apple/fx_apple_impl \
+ UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \
+))
+
+$(eval $(call gb_Library_use_system_darwin_frameworks,pdfium,\
+ CoreGraphics \
+ CoreFoundation \
+))
+endif
+
ifeq ($(OS),ANDROID)
# fxge
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
@@ -685,7 +707,7 @@ endif
ifeq ($(OS),LINUX)
# fxge
$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
- UnpackedTarball/pdfium/core/fxge/fx_ge_linux \
+ UnpackedTarball/pdfium/core/fxge/linux/fx_linux_impl \
))
endif
diff --git a/external/pdfium/README b/external/pdfium/README
index c1719cf0a152..2be9e8f11b26 100644
--- a/external/pdfium/README
+++ b/external/pdfium/README
@@ -8,6 +8,10 @@ https://pdfium.googlesource.com/pdfium/
How to update the tarball:
version=$(git for-each-ref|grep chromium/|tail -n 1|sed 's|.*/||')
+git checkout --track origin/chromium/$version
+gclient sync
git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${version}.tar
(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/)
+(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/)
+(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h)
bzip2 pdfium-${version}.tar
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
index f4643376cee0..07004e8de71d 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -11,6 +11,7 @@ pdfium_patches :=
pdfium_patches += ubsan.patch
# Fixes build on our baseline.
pdfium_patches += build.patch.1
+pdfium_patches += msvc2017.patch.1
# Avoids Windows 8 build dependency.
pdfium_patches += windows7.patch.1
pdfium_patches += c++20-comparison.patch
@@ -25,29 +26,17 @@ $(eval $(call gb_UnpackedTarball_add_patches,pdfium,\
$(foreach patch,$(pdfium_patches),external/pdfium/$(patch)) \
))
-# Upstream build system generates this, but it's not really a generated file.
-# Stripped down version from <https://dxr.mozilla.org/mozilla-central/source/ipc/chromium/src/build/build_config.h>.
-$(eval $(call gb_UnpackedTarball_add_file,pdfium,build/build_config.h,external/pdfium/configs/build_config.h))
-
$(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\
mv third_party/bigint/BigInteger.cc third_party/bigint/BigInteger.cpp && \
mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \
mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \
mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \
- mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \
- mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \
- mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp && \
mv third_party/base/debug/alias.cc third_party/base/debug/alias.cpp && \
- mv third_party/base/allocator/partition_allocator/oom_callback.cc third_party/base/allocator/partition_allocator/oom_callback.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \
- mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \
- mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \
mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \
mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \
- mv third_party/libopenjpeg20/opj_malloc.cc third_party/libopenjpeg20/opj_malloc.cpp \
+ mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \
+ mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp && \
+ mv third_party/abseil-cpp/absl/types/bad_variant_access.cc third_party/abseil-cpp/absl/types/bad_variant_access.cpp \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index 9d48b022fae2..55c3cb304f3b 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -1,8 +1,66 @@
+-*- Mode: diff -*-
+diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp
+index f5a51b24e..8b308d0a6 100644
+--- a/core/fpdfapi/font/cpdf_cidfont.cpp
++++ b/core/fpdfapi/font/cpdf_cidfont.cpp
+@@ -755,7 +755,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) {
+ uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding(
+ FT_ENCODING_APPLE_ROMAN, name_unicode);
+ index = maccode ? FT_Get_Char_Index(face, maccode)
+- : FT_Get_Name_Index(face, name);
++ : FT_Get_Name_Index(face, const_cast<char*>(name));
+ }
+ if (index == 0 || index == 0xffff)
+ return charcode ? static_cast<int>(charcode) : -1;
+diff --git a/core/fpdfapi/font/cpdf_truetypefont.cpp b/core/fpdfapi/font/cpdf_truetypefont.cpp
+index 0a59b54eb..a96e11759 100644
+--- a/core/fpdfapi/font/cpdf_truetypefont.cpp
++++ b/core/fpdfapi/font/cpdf_truetypefont.cpp
+@@ -91,7 +91,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
+ FT_ENCODING_APPLE_ROMAN,
+ m_Encoding.UnicodeFromCharCode(charcode));
+ if (!maccode) {
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
+ } else {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode);
+ }
+@@ -105,7 +105,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32);
+ continue;
+ }
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name));
+ if (m_GlyphIndex[charcode] != 0 || !bToUnicode)
+ continue;
+
+diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp
+index 55510e7d7..2f13f00b8 100644
+--- a/core/fpdfapi/font/cpdf_type1font.cpp
++++ b/core/fpdfapi/font/cpdf_type1font.cpp
+@@ -263,7 +263,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
+ static_cast<uint32_t>(charcode));
+ if (name) {
+ m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
+ } else {
+ m_GlyphIndex[charcode] = FT_Get_Char_Index(
+ m_Font.GetFaceRec(), static_cast<uint32_t>(charcode));
+@@ -294,7 +294,7 @@ void CPDF_Type1Font::LoadGlyphMap() {
+ continue;
+
+ m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name));
+- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name);
++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name));
+ if (m_GlyphIndex[charcode] != 0)
+ continue;
+
diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp
-index 323de4ffc..f11a0b0ad 100644
+index 228a0c137..bf512beb3 100644
--- a/core/fpdfdoc/cpdf_metadata.cpp
+++ b/core/fpdfdoc/cpdf_metadata.cpp
-@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
+@@ -77,7 +77,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const {
CFX_XMLParser parser(stream);
std::unique_ptr<CFX_XMLDocument> doc = parser.Parse();
if (!doc)
@@ -11,42 +69,95 @@ index 323de4ffc..f11a0b0ad 100644
std::vector<UnsupportedFeature> unsupported;
CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
+diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
+index 9391d61ab..490ce2230 100644
+--- a/core/fxcodec/jpx/cjpx_decoder.cpp
++++ b/core/fxcodec/jpx/cjpx_decoder.cpp
+@@ -75,7 +75,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
+ if (!data.b)
+ return absl::nullopt;
+
+- return data;
++ return std::move(data);
+ }
+
+ void sycc_to_rgb(int offset,
+
+diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
+index a2a44df39..d6cedee46 100644
+--- a/core/fxge/cfx_font.cpp
++++ b/core/fxge/cfx_font.cpp
+@@ -48,25 +48,9 @@ struct OUTLINE_PARAMS {
+ // TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be
+ // available to all users in the future, remove FreeMMVar() and use
+ // FT_Done_MM_Var() directly.
+-//
+-// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
+-#if !BUILDFLAG(IS_WIN)
+-extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
+-#endif
+
+ void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
+-#if BUILDFLAG(IS_WIN)
+- // Assume `use_system_freetype` GN var is never set on Windows.
+- constexpr bool has_ft_done_mm_var_func = true;
+-#else
+- static const bool has_ft_done_mm_var_func = !!FT_Done_MM_Var;
+-#endif
+- if (has_ft_done_mm_var_func) {
+- FT_Done_MM_Var(CFX_GEModule::Get()->GetFontMgr()->GetFTLibrary(),
+- variation_desc);
+- } else {
+ FXFT_Free(rec, variation_desc);
+- }
+ }
+
+ FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {
+diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h
+index 44c921a14..0152a89b7 100644
+--- a/third_party/base/numerics/safe_conversions_impl.h
++++ b/third_party/base/numerics/safe_conversions_impl.h
+@@ -89,7 +89,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) {
+
+ // TODO(jschuh): Switch to std::is_constant_evaluated() once C++20 is supported.
+ // Alternately, the usage could be restructured for "consteval if" in C++23.
+-#define IsConstantEvaluated() (__builtin_is_constant_evaluated())
++#define IsConstantEvaluated() (false)
+
+ // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict
+ // some accelerated runtime paths to release builds until this can be forced
diff --git a/third_party/base/span.h b/third_party/base/span.h
-index 0fb627ba8..f71c362e2 100644
---- a/third_party/base/span.h
-+++ b/third_party/base/span.h
-@@ -214,7 +214,7 @@ class span {
- // Conversions from spans of compatible types: this allows a span<T> to be
- // seamlessly used as a span<const T>, but not the other way around.
- template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
-- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
-+ span(const span<U>& other) : span(other.data(), other.size()) {}
- span& operator=(const span& other) noexcept = default;
- ~span() noexcept {
- if (!size_) {
-diff --git a/third_party/base/span.h b/third_party/base/span.h
-index 0fb627ba8..dda1fc8bc 100644
+index ed2a3c8de..87493861c 100644
--- a/third_party/base/span.h
+++ b/third_party/base/span.h
-@@ -204,7 +204,7 @@ class span {
- // size()|.
+@@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span {
+ #else
template <typename Container,
typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
- constexpr span(Container& container)
+ span(Container& container)
: span(container.data(), container.size()) {}
- template <
- typename Container,
-diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
-index dbc1b1045..36b72461d 100644
---- a/core/fxcodec/jpx/cjpx_decoder.cpp
-+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
-@@ -70,7 +70,7 @@ Optional<OpjImageRgbData> alloc_rgb(size_t size) {
- if (!data.b)
- return {};
+ #endif
-- return data;
-+ return std::move(data);
+@@ -225,7 +225,7 @@ class TRIVIAL_ABI GSL_POINTER span {
+ // Conversions from spans of compatible types: this allows a span<T> to be
+ // seamlessly used as a span<const T>, but not the other way around.
+ template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>>
+- constexpr span(const span<U>& other) : span(other.data(), other.size()) {}
++ span(const span<U>& other) : span(other.data(), other.size()) {}
+ span& operator=(const span& other) noexcept {
+ if (this != &other) {
+ ReleaseEmptySpan();
+diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c
+index 29d3ee528..d5c7a1bc9 100644
+--- a/third_party/libopenjpeg/openjpeg.c
++++ b/third_party/libopenjpeg/openjpeg.c
+@@ -433,7 +433,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
+ return OPJ_FALSE;
}
- void sycc_to_rgb(int offset,
+-OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
++OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
+ OPJ_BOOL strict)
+ {
+ if (p_codec) {
diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch
index 025f9ba010db..d26fe66ad8b7 100644
--- a/external/pdfium/c++20-comparison.patch
+++ b/external/pdfium/c++20-comparison.patch
@@ -1,13 +1,13 @@
--- core/fxcrt/fx_memory_wrappers.h
+++ core/fxcrt/fx_memory_wrappers.h
-@@ -70,8 +70,8 @@
+@@ -70,8 +70,8 @@ struct FxPartitionAllocAllocator {
}
// There's no state, so they are all the same,
-- bool operator==(const FxAllocAllocator& that) { return true; }
-- bool operator!=(const FxAllocAllocator& that) { return false; }
-+ bool operator==(const FxAllocAllocator& that) const { return true; }
-+ bool operator!=(const FxAllocAllocator& that) const { return false; }
+- bool operator==(const FxPartitionAllocAllocator& that) { return true; }
+- bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
++ bool operator==(const FxPartitionAllocAllocator& that) const { return true; }
++ bool operator!=(const FxPartitionAllocAllocator& that) const { return false; }
};
- #endif // CORE_FXCRT_FX_MEMORY_WRAPPERS_H_
+ // Used to put backing store for std::vector<> and such into the
diff --git a/external/pdfium/configs/build_config.h b/external/pdfium/configs/build_config.h
deleted file mode 100644
index ec93c278767c..000000000000
--- a/external/pdfium/configs/build_config.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file adds defines about the platform we're currently building on.
-// Operating System:
-// OS_WIN / OS_APPLE / OS_LINUX / OS_POSIX (MACOSX or LINUX)
-// Compiler:
-// COMPILER_MSVC / COMPILER_GCC
-// Processor:
-// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
-// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
-
-#ifndef BUILD_BUILD_CONFIG_H_
-#define BUILD_BUILD_CONFIG_H_
-
-// A set of macros to use for platform detection.
-#if defined(ANDROID)
-#define OS_ANDROID 1
-#define OS_LINUX 1
-#elif defined(__APPLE__)
-#define OS_APPLE 1
-#elif defined(__linux__)
-#define OS_LINUX 1
-#elif defined(__DragonFly__)
-#define OS_DRAGONFLY 1
-#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#define OS_FREEBSD 1
-#elif defined(__NetBSD__)
-#define OS_NETBSD 1
-#elif defined(__OpenBSD__)
-#define OS_OPENBSD 1
-#elif defined(__sun__)
-#define OS_SOLARIS 1
-#elif defined(_WIN32)
-#define OS_WIN 1
-#else
-#error Please add support for your platform in build/build_config.h
-#endif
-
-// For access to standard BSD features, use OS_BSD instead of a
-// more specific macro.
-#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) || defined(OS_NETBSD) || defined(OS_OPENBSD)
-#define OS_BSD 1
-#endif
-
-// For access to standard POSIX features, use OS_POSIX instead of a more
-// specific macro.
-#if defined(OS_APPLE) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
-#define OS_POSIX 1
-#endif
-
-// Compiler detection.
-#if defined(__GNUC__)
-#define COMPILER_GCC 1
-#elif defined(_MSC_VER)
-#define COMPILER_MSVC 1
-#else
-#error Please add support for your compiler in build/build_config.h
-#endif
-
-// Processor architecture detection. For more info on what's defined, see:
-// http://msdn.microsoft.com/en-us/library/b0084kay.aspx
-// http://www.agner.org/optimize/calling_conventions.pdf
-// or with gcc, run: "echo | gcc -E -dM -"
-#if defined(_M_X64) || defined(__x86_64__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86_64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(_M_IX86) || defined(__i386__)
-#define ARCH_CPU_X86_FAMILY 1
-#define ARCH_CPU_X86 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__ARMEL__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARMEL 1
-#define ARCH_CPU_32_BITS 1
-#define WCHAR_T_IS_UNSIGNED 1
-#elif defined(__powerpc64__)
-#define ARCH_CPU_PPC64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__ppc__) || defined(__powerpc__)
-#define ARCH_CPU_PPC 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__sparc__) && defined(__arch64__)
-#define ARCH_CPU_SPARC 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__sparc__)
-#define ARCH_CPU_SPARC 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__mips64) && defined(__LP64__)
-#define ARCH_CPU_MIPS 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__mips__)
-#define ARCH_CPU_MIPS 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__hppa__)
-#define ARCH_CPU_HPPA 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__ia64__)
-#define ARCH_CPU_IA64 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__s390x__)
-#define ARCH_CPU_S390X 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__s390__)
-#define ARCH_CPU_S390 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__sh__)
-#define ARCH_CPU_SH 1
-#define ARCH_CPU_32_BITS 1
-#elif defined(__alpha__)
-#define ARCH_CPU_ALPHA 1
-#define ARCH_CPU_64_BITS 1
-#elif defined(__aarch64__)
-#define ARCH_CPU_ARM_FAMILY 1
-#define ARCH_CPU_ARM64 1
-#define ARCH_CPU_64_BITS 1
-#else
-#error Please add support for your architecture in build/build_config.h
-#endif
-
-// Type detection for wchar_t.
-#if defined(OS_WIN)
-#define WCHAR_T_IS_UTF16
-#else
-#define WCHAR_T_IS_UTF32
-#endif
-
-#endif // BUILD_BUILD_CONFIG_H_
diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index cc82c4555e3a..6258e8036360 100644
--- a/external/pdfium/inc/pch/precompiled_pdfium.hxx
+++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx
@@ -13,13 +13,14 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-09-21 15:21:21 using:
+ Generated on 2022-11-08 17:05:53 using:
./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
./bin/update_pch_bisect ./external/pdfium/inc/pch/precompiled_pdfium.hxx "make external/pdfium.build" --find-conflicts
*/
+#include <sal/config.h>
#if PCH_LEVEL >= 1
#include <agg_curves.h>
#include <agg_math.h>
@@ -30,28 +31,29 @@
#include <agg_vcgen_stroke.h>
#include <algorithm>
#include <array>
-#include <atomic>
#include <cassert>
-#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
-#include <cstring>
-#include <cwchar>
-#include <cwctype>
+#include <ctype.h>
#include <functional>
#include <iterator>
#include <limits.h>
#include <limits>
#include <list>
#include <map>
+#include <math.h>
#include <memory>
+#include <new>
#include <numeric>
+#include <ostream>
#include <set>
#include <setjmp.h>
#include <sstream>
#include <stack>
+#include <stdarg.h>
#include <stddef.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <string>
@@ -60,6 +62,7 @@
#include <type_traits>
#include <utility>
#include <vector>
+#include <wchar.h>
#endif // PCH_LEVEL >= 1
#if PCH_LEVEL >= 2
#endif // PCH_LEVEL >= 2
@@ -68,6 +71,9 @@
#include <constants/access_permissions.h>
#include <constants/annotation_common.h>
#include <constants/annotation_flags.h>
+#include <constants/appearance.h>
+#include <constants/ascii.h>
+#include <constants/font_encodings.h>
#include <constants/form_fields.h>
#include <constants/form_flags.h>
#include <constants/page_object.h>
@@ -89,7 +95,6 @@
#include <core/fpdfapi/font/cpdf_cid2unicodemap.h>
#include <core/fpdfapi/font/cpdf_cidfont.h>
#include <core/fpdfapi/font/cpdf_cmap.h>
-#include <core/fpdfapi/font/cpdf_cmapmanager.h>
#include <core/fpdfapi/font/cpdf_cmapparser.h>
#include <core/fpdfapi/font/cpdf_font.h>
#include <core/fpdfapi/font/cpdf_fontencoding.h>
@@ -102,6 +107,7 @@
#include <core/fpdfapi/font/cpdf_type3font.h>
#include <core/fpdfapi/page/cpdf_allstates.h>
#include <core/fpdfapi/page/cpdf_annotcontext.h>
+#include <core/fpdfapi/page/cpdf_basedcs.h>
#include <core/fpdfapi/page/cpdf_clippath.h>
#include <core/fpdfapi/page/cpdf_color.h>
#include <core/fpdfapi/page/cpdf_colorspace.h>
@@ -120,10 +126,13 @@
#include <core/fpdfapi/page/cpdf_graphicstates.h>
#include <core/fpdfapi/page/cpdf_iccprofile.h>
#include <core/fpdfapi/page/cpdf_image.h>
+#include <core/fpdfapi/page/cpdf_imageloader.h>
#include <core/fpdfapi/page/cpdf_imageobject.h>
+#include <core/fpdfapi/page/cpdf_indexedcs.h>
#include <core/fpdfapi/page/cpdf_meshstream.h>
#include <core/fpdfapi/page/cpdf_occontext.h>
#include <core/fpdfapi/page/cpdf_page.h>
+#include <core/fpdfapi/page/cpdf_pageimagecache.h>
#include <core/fpdfapi/page/cpdf_pagemodule.h>
#include <core/fpdfapi/page/cpdf_pageobject.h>
#include <core/fpdfapi/page/cpdf_pageobjectholder.h>
@@ -181,10 +190,7 @@
#include <core/fpdfapi/render/charposlist.h>
#include <core/fpdfapi/render/cpdf_devicebuffer.h>
#include <core/fpdfapi/render/cpdf_docrenderdata.h>
-#include <core/fpdfapi/render/cpdf_imagecacheentry.h>
-#include <core/fpdfapi/render/cpdf_imageloader.h>
#include <core/fpdfapi/render/cpdf_imagerenderer.h>
-#include <core/fpdfapi/render/cpdf_pagerendercache.h>
#include <core/fpdfapi/render/cpdf_pagerendercontext.h>
#include <core/fpdfapi/render/cpdf_progressiverenderer.h>
#include <core/fpdfapi/render/cpdf_rendercontext.h>
@@ -196,13 +202,12 @@
#include <core/fpdfapi/render/cpdf_textrenderer.h>
#include <core/fpdfapi/render/cpdf_type3cache.h>
#include <core/fpdfapi/render/cpdf_type3glyphmap.h>
-#include <core/fpdfdoc/cba_fontmap.h>
-#include <core/fpdfdoc/cline.h>
#include <core/fpdfdoc/cpdf_aaction.h>
#include <core/fpdfdoc/cpdf_action.h>
#include <core/fpdfdoc/cpdf_annot.h>
#include <core/fpdfdoc/cpdf_annotlist.h>
#include <core/fpdfdoc/cpdf_apsettings.h>
+#include <core/fpdfdoc/cpdf_bafontmap.h>
#include <core/fpdfdoc/cpdf_bookmark.h>
#include <core/fpdfdoc/cpdf_bookmarktree.h>
#include <core/fpdfdoc/cpdf_color_utils.h>
@@ -211,6 +216,7 @@
#include <core/fpdfdoc/cpdf_filespec.h>
#include <core/fpdfdoc/cpdf_formcontrol.h>
#include <core/fpdfdoc/cpdf_formfield.h>
+#include <core/fpdfdoc/cpdf_generateap.h>
#include <core/fpdfdoc/cpdf_icon.h>
#include <core/fpdfdoc/cpdf_iconfit.h>
#include <core/fpdfdoc/cpdf_interactiveform.h>
@@ -222,14 +228,12 @@
#include <core/fpdfdoc/cpdf_pagelabel.h>
#include <core/fpdfdoc/cpdf_structelement.h>
#include <core/fpdfdoc/cpdf_structtree.h>
-#include <core/fpdfdoc/cpdf_variabletext.h>
#include <core/fpdfdoc/cpdf_viewerpreferences.h>
#include <core/fpdfdoc/cpvt_fontmap.h>
-#include <core/fpdfdoc/cpvt_generateap.h>
+#include <core/fpdfdoc/cpvt_section.h>
+#include <core/fpdfdoc/cpvt_variabletext.h>
#include <core/fpdfdoc/cpvt_word.h>
#include <core/fpdfdoc/cpvt_wordinfo.h>
-#include <core/fpdfdoc/csection.h>
-#include <core/fpdfdoc/ctypeset.h>
#include <core/fpdfdoc/ipvt_fontmap.h>
#include <core/fpdftext/cpdf_linkextract.h>
#include <core/fpdftext/cpdf_textpage.h>
@@ -241,8 +245,8 @@
#include <core/fxcodec/flate/flatemodule.h>
#include <core/fxcodec/fx_codec.h>
#include <core/fxcodec/gif/cfx_gif.h>
-#include <core/fxcodec/gif/cfx_lzwdecompressor.h>
-#include <core/fxcodec/icc/iccmodule.h>
+#include <core/fxcodec/gif/lzw_decompressor.h>
+#include <core/fxcodec/icc/icc_transform.h>
#include <core/fxcodec/jbig2/JBig2_ArithDecoder.h>
#include <core/fxcodec/jbig2/JBig2_ArithIntDecoder.h>
#include <core/fxcodec/jbig2/JBig2_BitStream.h>
@@ -269,18 +273,18 @@
#include <core/fxcodec/scanlinedecoder.h>
#include <core/fxcrt/autonuller.h>
#include <core/fxcrt/autorestorer.h>
+#include <core/fxcrt/binary_buffer.h>
#include <core/fxcrt/bytestring.h>
-#include <core/fxcrt/cfx_binarybuf.h>
#include <core/fxcrt/cfx_bitstream.h>
#include <core/fxcrt/cfx_datetime.h>
-#include <core/fxcrt/cfx_fixedbufgrow.h>
#include <core/fxcrt/cfx_memorystream.h>
-#include <core/fxcrt/cfx_readonlymemorystream.h>
+#include <core/fxcrt/cfx_read_only_span_stream.h>
+#include <core/fxcrt/cfx_read_only_string_stream.h>
+#include <core/fxcrt/cfx_read_only_vector_stream.h>
#include <core/fxcrt/cfx_seekablestreamproxy.h>
#include <core/fxcrt/cfx_timer.h>
#include <core/fxcrt/cfx_utf8decoder.h>
#include <core/fxcrt/cfx_utf8encoder.h>
-#include <core/fxcrt/cfx_widetextbuf.h>
#include <core/fxcrt/css/cfx_css.h>
#include <core/fxcrt/css/cfx_csscolorvalue.h>
#include <core/fxcrt/css/cfx_csscomputedstyle.h>
@@ -288,8 +292,9 @@
#include <core/fxcrt/css/cfx_cssdata.h>
#include <core/fxcrt/css/cfx_cssdeclaration.h>
#include <core/fxcrt/css/cfx_cssenumvalue.h>
-#include <core/fxcrt/css/cfx_cssexttextbuf.h>
+#include <core/fxcrt/css/cfx_cssinputtextbuf.h>
#include <core/fxcrt/css/cfx_cssnumbervalue.h>
+#include <core/fxcrt/css/cfx_cssoutputtextbuf.h>
#include <core/fxcrt/css/cfx_csspropertyholder.h>
#include <core/fxcrt/css/cfx_cssrulecollection.h>
#include <core/fxcrt/css/cfx_cssselector.h>
@@ -298,15 +303,20 @@
#include <core/fxcrt/css/cfx_cssstyleselector.h>
#include <core/fxcrt/css/cfx_cssstylesheet.h>
#include <core/fxcrt/css/cfx_csssyntaxparser.h>
-#include <core/fxcrt/css/cfx_csstextbuf.h>
#include <core/fxcrt/css/cfx_cssvalue.h>
#include <core/fxcrt/css/cfx_cssvaluelist.h>
#include <core/fxcrt/css/cfx_cssvaluelistparser.h>
+#include <core/fxcrt/data_vector.h>
#include <core/fxcrt/fileaccess_iface.h>
+#include <core/fxcrt/fixed_try_alloc_zeroed_data_vector.h>
+#include <core/fxcrt/fixed_uninit_data_vector.h>
+#include <core/fxcrt/fixed_zeroed_data_vector.h>
+#include <core/fxcrt/fx_2d_size.h>
#include <core/fxcrt/fx_bidi.h>
#include <core/fxcrt/fx_codepage.h>
#include <core/fxcrt/fx_coordinates.h>
#include <core/fxcrt/fx_extension.h>
+#include <core/fxcrt/fx_folder.h>
#include <core/fxcrt/fx_memory.h>
#include <core/fxcrt/fx_memory_wrappers.h>
#include <core/fxcrt/fx_number.h>
@@ -314,16 +324,22 @@
#include <core/fxcrt/fx_safe_types.h>
#include <core/fxcrt/fx_stream.h>
#include <core/fxcrt/fx_string.h>
+#include <core/fxcrt/fx_string_wrappers.h>
#include <core/fxcrt/fx_system.h>
#include <core/fxcrt/fx_unicode.h>
#include <core/fxcrt/maybe_owned.h>
#include <core/fxcrt/observed_ptr.h>
#include <core/fxcrt/pauseindicator_iface.h>
#include <core/fxcrt/retain_ptr.h>
+#include <core/fxcrt/scoped_set_insertion.h>
+#include <core/fxcrt/small_buffer.h>
+#include <core/fxcrt/span_util.h>
+#include <core/fxcrt/stl_util.h>
#include <core/fxcrt/string_data_template.h>
#include <core/fxcrt/string_pool_template.h>
#include <core/fxcrt/unowned_ptr.h>
#include <core/fxcrt/widestring.h>
+#include <core/fxcrt/widetext_buffer.h>
#include <core/fxcrt/xml/cfx_xmlchardata.h>
#include <core/fxcrt/xml/cfx_xmldocument.h>
#include <core/fxcrt/xml/cfx_xmlelement.h>
@@ -332,6 +348,7 @@
#include <core/fxcrt/xml/cfx_xmlparser.h>
#include <core/fxcrt/xml/cfx_xmltext.h>
#include <core/fxge/agg/fx_agg_driver.h>
+#include <core/fxge/calculate_pitch.h>
#include <core/fxge/cfx_cliprgn.h>
#include <core/fxge/cfx_color.h>
#include <core/fxge/cfx_defaultrenderdevice.h>
@@ -348,7 +365,7 @@
#include <core/fxge/cfx_glyphcache.h>
#include <core/fxge/cfx_graphstate.h>
#include <core/fxge/cfx_graphstatedata.h>
-#include <core/fxge/cfx_pathdata.h>
+#include <core/fxge/cfx_path.h>
#include <core/fxge/cfx_renderdevice.h>
#include <core/fxge/cfx_substfont.h>
#include <core/fxge/cfx_textrenderoptions.h>
@@ -367,23 +384,19 @@
#include <core/fxge/dib/fx_dib.h>
#include <core/fxge/dib/scanlinecomposer_iface.h>
#include <core/fxge/fontdata/chromefontdata/chromefontdata.h>
+#include <core/fxge/freetype/fx_freetype.h>
#include <core/fxge/fx_font.h>
-#include <core/fxge/fx_freetype.h>
#include <core/fxge/renderdevicedriver_iface.h>
#include <core/fxge/scoped_font_transform.h>
#include <core/fxge/systemfontinfo_iface.h>
#include <core/fxge/text_char_pos.h>
#include <core/fxge/text_glyph_pos.h>
-#include <fpdfsdk/cpdfsdk_actionhandler.h>
#include <fpdfsdk/cpdfsdk_annot.h>
-#include <fpdfsdk/cpdfsdk_annothandlermgr.h>
#include <fpdfsdk/cpdfsdk_annotiteration.h>
#include <fpdfsdk/cpdfsdk_annotiterator.h>
#include <fpdfsdk/cpdfsdk_appstream.h>
#include <fpdfsdk/cpdfsdk_baannot.h>
-#include <fpdfsdk/cpdfsdk_baannothandler.h>
#include <fpdfsdk/cpdfsdk_customaccess.h>
-#include <fpdfsdk/cpdfsdk_fieldaction.h>
#include <fpdfsdk/cpdfsdk_filewriteadapter.h>
#include <fpdfsdk/cpdfsdk_formfillenvironment.h>
#include <fpdfsdk/cpdfsdk_helpers.h>
@@ -392,35 +405,32 @@
#include <fpdfsdk/cpdfsdk_pauseadapter.h>
#include <fpdfsdk/cpdfsdk_renderpage.h>
#include <fpdfsdk/cpdfsdk_widget.h>
-#include <fpdfsdk/cpdfsdk_widgethandler.h>
#include <fpdfsdk/formfiller/cffl_button.h>
#include <fpdfsdk/formfiller/cffl_checkbox.h>
#include <fpdfsdk/formfiller/cffl_combobox.h>
-#include <fpdfsdk/formfiller/cffl_formfiller.h>
+#include <fpdfsdk/formfiller/cffl_fieldaction.h>
+#include <fpdfsdk/formfiller/cffl_formfield.h>
#include <fpdfsdk/formfiller/cffl_interactiveformfiller.h>
#include <fpdfsdk/formfiller/cffl_listbox.h>
-#include <fpdfsdk/formfiller/cffl_privatedata.h>
+#include <fpdfsdk/formfiller/cffl_perwindowdata.h>
#include <fpdfsdk/formfiller/cffl_pushbutton.h>
#include <fpdfsdk/formfiller/cffl_radiobutton.h>
#include <fpdfsdk/formfiller/cffl_textfield.h>
#include <fpdfsdk/formfiller/cffl_textobject.h>
-#include <fpdfsdk/ipdfsdk_annothandler.h>
#include <fpdfsdk/pwl/cpwl_button.h>
#include <fpdfsdk/pwl/cpwl_caret.h>
#include <fpdfsdk/pwl/cpwl_cbbutton.h>
#include <fpdfsdk/pwl/cpwl_cblistbox.h>
#include <fpdfsdk/pwl/cpwl_combo_box.h>
#include <fpdfsdk/pwl/cpwl_edit.h>
-#include <fpdfsdk/pwl/cpwl_edit_ctrl.h>
#include <fpdfsdk/pwl/cpwl_edit_impl.h>
-#include <fpdfsdk/pwl/cpwl_icon.h>
#include <fpdfsdk/pwl/cpwl_list_box.h>
#include <fpdfsdk/pwl/cpwl_list_ctrl.h>
+#include <fpdfsdk/pwl/cpwl_sbbutton.h>
#include <fpdfsdk/pwl/cpwl_scroll_bar.h>
#include <fpdfsdk/pwl/cpwl_special_button.h>
#include <fpdfsdk/pwl/cpwl_wnd.h>
#include <fpdfsdk/pwl/ipwl_fillernotify.h>
-#include <fpdfsdk/pwl/ipwl_systemhandler.h>
#include <fxjs/cjs_event_context_stub.h>
#include <fxjs/cjs_runtimestub.h>
#include <fxjs/ijs_event_context.h>
@@ -444,6 +454,7 @@
#include <public/fpdf_text.h>
#include <public/fpdf_transformpage.h>
#include <public/fpdfview.h>
+#include <third_party/abseil-cpp/absl/types/optional.h>
#include <third_party/agg23/agg_clip_liang_barsky.h>
#include <third_party/agg23/agg_conv_dash.h>
#include <third_party/agg23/agg_conv_stroke.h>
@@ -453,36 +464,20 @@
#include <third_party/agg23/agg_rasterizer_scanline_aa.h>
#include <third_party/agg23/agg_renderer_scanline.h>
#include <third_party/agg23/agg_scanline_u.h>
-#include <third_party/base/allocator/partition_allocator/address_space_randomization.h>
-#include <third_party/base/allocator/partition_allocator/oom.h>
-#include <third_party/base/allocator/partition_allocator/oom_callback.h>
-#include <third_party/base/allocator/partition_allocator/page_allocator.h>
-#include <third_party/base/allocator/partition_allocator/page_allocator_internal.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc_check.h>
-#include <third_party/base/allocator/partition_allocator/partition_alloc_constants.h>
-#include <third_party/base/allocator/partition_allocator/partition_bucket.h>
-#include <third_party/base/allocator/partition_allocator/partition_direct_map_extent.h>
-#include <third_party/base/allocator/partition_allocator/partition_oom.h>
-#include <third_party/base/allocator/partition_allocator/partition_page.h>
-#include <third_party/base/allocator/partition_allocator/partition_root_base.h>
-#include <third_party/base/allocator/partition_allocator/random.h>
-#include <third_party/base/allocator/partition_allocator/spin_lock.h>
-#include <third_party/base/bits.h>
#include <third_party/base/check.h>
#include <third_party/base/check_op.h>
#include <third_party/base/compiler_specific.h>
#include <third_party/base/containers/adapters.h>
+#include <third_party/base/containers/contains.h>
+#include <third_party/base/cxx17_backports.h>
#include <third_party/base/debug/alias.h>
#include <third_party/base/memory/aligned_memory.h>
#include <third_party/base/no_destructor.h>
#include <third_party/base/notreached.h>
#include <third_party/base/numerics/safe_conversions.h>
#include <third_party/base/numerics/safe_math.h>
-#include <third_party/base/optional.h>
#include <third_party/base/ptr_util.h>
#include <third_party/base/span.h>
-#include <third_party/base/stl_util.h>
#include <third_party/skia_shared/SkFloatToDecimal.h>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
diff --git a/external/pdfium/msvc2017.patch.1 b/external/pdfium/msvc2017.patch.1
new file mode 100644
index 000000000000..d19279bd3ca7
--- /dev/null
+++ b/external/pdfium/msvc2017.patch.1
@@ -0,0 +1,15 @@
+--- pdfium/third_party/abseil-cpp/absl/base/policy_checks.h.orig 2023-06-26 19:10:40.362247395 +0200
++++ pdfium/third_party/abseil-cpp/absl/base/policy_checks.h 2023-06-26 19:10:55.204269825 +0200
+@@ -46,9 +46,9 @@
+
+ // We support Visual Studio 2019 (MSVC++ 16.0) and later.
+ // This minimum will go up.
+-#if defined(_MSC_VER) && _MSC_VER < 1920 && !defined(__clang__)
+-#error "This package requires Visual Studio 2019 (MSVC++ 16.0) or higher."
+-#endif
++//#if defined(_MSC_VER) && _MSC_VER < 1920 && !defined(__clang__)
++//#error "This package requires Visual Studio 2019 (MSVC++ 16.0) or higher."
++//#endif
+
+ // We support GCC 7 and later.
+ // This minimum will go up.
diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch
index 8610e24f2828..bc9868244275 100644
--- a/external/pdfium/ubsan.patch
+++ b/external/pdfium/ubsan.patch
@@ -1,9 +1,9 @@
--- core/fxcrt/string_data_template.cpp
+++ core/fxcrt/string_data_template.cpp
@@ -82,7 +82,8 @@ void StringDataTemplate<CharType>::CopyContentsAt(size_t offset,
- ASSERT(nLen >= 0);
- ASSERT(offset + nLen <= m_nAllocLength);
-
+ DCHECK_GE(offset, 0);
+ DCHECK_GE(nLen, 0);
+ DCHECK_LE(offset + nLen, m_nAllocLength);
- memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
+ if (nLen != 0)
+ memcpy(m_String + offset, pStr, nLen * sizeof(CharType));
diff --git a/external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 b/external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1
deleted file mode 100644
index 489e5d0e89ee..000000000000
--- a/external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1
+++ /dev/null
@@ -1,59 +0,0 @@
-From 582d188e6e3487180891f1fc457a80dec8be26a8 Mon Sep 17 00:00:00 2001
-From: Christian Heimes <christian@python.org>
-Date: Mon, 24 Sep 2018 14:38:31 +0200
-Subject: [PATCH] [3.6] bpo-17239: Disable external entities in SAX parser
- (GH-9217) (GH-9512)
-
-The SAX parser no longer processes general external entities by default
-to increase security. Before, the parser created network connections
-to fetch remote files or loaded local files from the file system for DTD
-and entities.
-
-Signed-off-by: Christian Heimes <christian@python.org>
-
-https://bugs.python.org/issue17239.
-(cherry picked from commit 17b1d5d4e36aa57a9b25a0e694affbd1ee637e45)
-
-Co-authored-by: Christian Heimes <christian@python.org>
-
-
-
-https://bugs.python.org/issue17239
----
- Doc/library/xml.dom.pulldom.rst | 14 +++++
- Doc/library/xml.rst | 6 +-
- Doc/library/xml.sax.rst | 8 +++
- Doc/whatsnew/3.6.rst | 18 +++++-
- Lib/test/test_pulldom.py | 7 +++
- Lib/test/test_sax.py | 60 ++++++++++++++++++-
- Lib/test/test_xml_etree.py | 13 ++++
- Lib/xml/sax/expatreader.py | 2 +-
- .../2018-09-11-18-30-55.bpo-17239.kOpwK2.rst | 3 +
- 9 files changed, 125 insertions(+), 6 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Security/2018-09-11-18-30-55.bpo-17239.kOpwK2.rst
-
-diff --git a/Lib/xml/sax/expatreader.py b/Lib/xml/sax/expatreader.py
-index 421358fa5b..5066ffc2fa 100644
---- a/Lib/xml/sax/expatreader.py
-+++ b/Lib/xml/sax/expatreader.py
-@@ -95,7 +95,7 @@ class ExpatParser(xmlreader.IncrementalParser, xmlreader.Locator):
- self._lex_handler_prop = None
- self._parsing = 0
- self._entity_stack = []
-- self._external_ges = 1
-+ self._external_ges = 0
- self._interning = None
-
- # XMLReader methods
-diff --git a/Misc/NEWS.d/next/Security/2018-09-11-18-30-55.bpo-17239.kOpwK2.rst b/Misc/NEWS.d/next/Security/2018-09-11-18-30-55.bpo-17239.kOpwK2.rst
-new file mode 100644
-index 0000000000..8dd0fe8c1b
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2018-09-11-18-30-55.bpo-17239.kOpwK2.rst
-@@ -0,0 +1,3 @@
-+The xml.sax and xml.dom.minidom parsers no longer processes external
-+entities by default. External DTD and ENTITY declarations no longer
-+load files or create network connections.
---
-2.20.1
-
diff --git a/external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1 b/external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1
deleted file mode 100644
index fdcc5cb65267..000000000000
--- a/external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1
+++ /dev/null
@@ -1,175 +0,0 @@
-From 34df10a9a16b38d54421eeeaf73ec89828563be7 Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin@python.org>
-Date: Mon, 18 Jan 2021 15:11:46 -0600
-Subject: [PATCH] [3.6] closes bpo-42938: Replace snprintf with Python unicode
- formatting in ctypes param reprs. (GH-24250)
-
-(cherry picked from commit 916610ef90a0d0761f08747f7b0905541f0977c7)
-
-Co-authored-by: Benjamin Peterson <benjamin@python.org>
----
- Lib/ctypes/test/test_parameters.py | 43 +++++++++++++++
- .../2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst | 2 +
- Modules/_ctypes/callproc.c | 55 +++++++------------
- 3 files changed, 66 insertions(+), 34 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-
-diff --git a/Lib/ctypes/test/test_parameters.py b/Lib/ctypes/test/test_parameters.py
-index e4c25fd880..531894fdec 100644
---- a/Lib/ctypes/test/test_parameters.py
-+++ b/Lib/ctypes/test/test_parameters.py
-@@ -201,6 +201,49 @@ def __dict__(self):
- self.assertRaises(ArgumentError, func, 99)
-
-
-+ def test_parameter_repr(self):
-+ from ctypes import (
-+ c_bool,
-+ c_char,
-+ c_wchar,
-+ c_byte,
-+ c_ubyte,
-+ c_short,
-+ c_ushort,
-+ c_int,
-+ c_uint,
-+ c_long,
-+ c_ulong,
-+ c_longlong,
-+ c_ulonglong,
-+ c_float,
-+ c_double,
-+ c_longdouble,
-+ c_char_p,
-+ c_wchar_p,
-+ c_void_p,
-+ )
-+ self.assertRegex(repr(c_bool.from_param(True)), r"^<cparam '\?' at 0x[A-Fa-f0-9]+>$")
-+ self.assertEqual(repr(c_char.from_param(97)), "<cparam 'c' ('a')>")
-+ self.assertRegex(repr(c_wchar.from_param('a')), r"^<cparam 'u' at 0x[A-Fa-f0-9]+>$")
-+ self.assertEqual(repr(c_byte.from_param(98)), "<cparam 'b' (98)>")
-+ self.assertEqual(repr(c_ubyte.from_param(98)), "<cparam 'B' (98)>")
-+ self.assertEqual(repr(c_short.from_param(511)), "<cparam 'h' (511)>")
-+ self.assertEqual(repr(c_ushort.from_param(511)), "<cparam 'H' (511)>")
-+ self.assertRegex(repr(c_int.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
-+ self.assertRegex(repr(c_uint.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
-+ self.assertRegex(repr(c_long.from_param(20000)), r"^<cparam '[li]' \(20000\)>$")
-+ self.assertRegex(repr(c_ulong.from_param(20000)), r"^<cparam '[LI]' \(20000\)>$")
-+ self.assertRegex(repr(c_longlong.from_param(20000)), r"^<cparam '[liq]' \(20000\)>$")
-+ self.assertRegex(repr(c_ulonglong.from_param(20000)), r"^<cparam '[LIQ]' \(20000\)>$")
-+ self.assertEqual(repr(c_float.from_param(1.5)), "<cparam 'f' (1.5)>")
-+ self.assertEqual(repr(c_double.from_param(1.5)), "<cparam 'd' (1.5)>")
-+ self.assertEqual(repr(c_double.from_param(1e300)), "<cparam 'd' (1e+300)>")
-+ self.assertRegex(repr(c_longdouble.from_param(1.5)), r"^<cparam ('d' \(1.5\)|'g' at 0x[A-Fa-f0-9]+)>$")
-+ self.assertRegex(repr(c_char_p.from_param(b'hihi')), "^<cparam 'z' \(0x[A-Fa-f0-9]+\)>$")
-+ self.assertRegex(repr(c_wchar_p.from_param('hihi')), "^<cparam 'Z' \(0x[A-Fa-f0-9]+\)>$")
-+ self.assertRegex(repr(c_void_p.from_param(0x12)), r"^<cparam 'P' \(0x0*12\)>$")
-+
- ################################################################
-
- if __name__ == '__main__':
-diff --git a/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-new file mode 100644
-index 0000000000..7df65a156f
---- /dev/null
-+++ b/Misc/NEWS.d/next/Security/2021-01-18-09-27-31.bpo-42938.4Zn4Mp.rst
-@@ -0,0 +1,2 @@
-+Avoid static buffers when computing the repr of :class:`ctypes.c_double` and
-+:class:`ctypes.c_longdouble` values.
-diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
-index 70e416b950..9fcf95f543 100644
---- a/Modules/_ctypes/callproc.c
-+++ b/Modules/_ctypes/callproc.c
-@@ -451,54 +451,43 @@ PyCArg_dealloc(PyCArgObject *self)
- static PyObject *
- PyCArg_repr(PyCArgObject *self)
- {
-- char buffer[256];
- switch(self->tag) {
- case 'b':
- case 'B':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.b);
-- break;
- case 'h':
- case 'H':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.h);
-- break;
- case 'i':
- case 'I':
-- sprintf(buffer, "<cparam '%c' (%d)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%d)>",
- self->tag, self->value.i);
-- break;
- case 'l':
- case 'L':
-- sprintf(buffer, "<cparam '%c' (%ld)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%ld)>",
- self->tag, self->value.l);
-- break;
-
- #ifdef HAVE_LONG_LONG
- case 'q':
- case 'Q':
-- sprintf(buffer,
--#ifdef MS_WIN32
-- "<cparam '%c' (%I64d)>",
--#else
-- "<cparam '%c' (%qd)>",
--#endif
-+ return PyUnicode_FromFormat("<cparam '%c' (%qd)>",
- self->tag, self->value.q);
-- break;
- #endif
- case 'd':
-- sprintf(buffer, "<cparam '%c' (%f)>",
-- self->tag, self->value.d);
-- break;
-- case 'f':
-- sprintf(buffer, "<cparam '%c' (%f)>",
-- self->tag, self->value.f);
-- break;
--
-+ case 'f': {
-+ PyObject *f = PyFloat_FromDouble((self->tag == 'f') ? self->value.f : self->value.d);
-+ if (f == NULL) {
-+ return NULL;
-+ }
-+ { PyObject *result = PyUnicode_FromFormat("<cparam '%c' (%R)>", self->tag, f);
-+ Py_DECREF(f);
-+ return result; }
-+ }
- case 'c':
-- sprintf(buffer, "<cparam '%c' (%c)>",
-+ return PyUnicode_FromFormat("<cparam '%c' ('%c')>",
- self->tag, self->value.c);
-- break;
-
- /* Hm, are these 'z' and 'Z' codes useful at all?
- Shouldn't they be replaced by the functionality of c_string
-@@ -507,16 +495,14 @@ PyCArg_repr(PyCArgObject *self)
- case 'z':
- case 'Z':
- case 'P':
-- sprintf(buffer, "<cparam '%c' (%p)>",
-+ return PyUnicode_FromFormat("<cparam '%c' (%p)>",
- self->tag, self->value.p);
- break;
-
- default:
-- sprintf(buffer, "<cparam '%c' at %p>",
-- self->tag, self);
-- break;
-+ return PyUnicode_FromFormat("<cparam '%c' at %p>",
-+ (unsigned char)self->tag, (void *)self);
- }
-- return PyUnicode_FromString(buffer);
- }
-
- static PyMemberDef PyCArgType_members[] = {
---
-2.29.2
-
diff --git a/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1 b/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1
deleted file mode 100644
index 8cdaf84de37c..000000000000
--- a/external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1
+++ /dev/null
@@ -1,34 +0,0 @@
-From 6d999803a07ef5e01f0048d4f276e9cf4401a23d Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin@python.org>
-Date: Mon, 5 Sep 2016 16:24:52 -0700
-Subject: [PATCH] remove long double from ctypes value union
-
-It is unused. It also forces a 16-byte alignment, which creates problems because
-Python's allocator only uses 8-byte alignment.
----
- Modules/_ctypes/ctypes.h | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/Modules/_ctypes/ctypes.h b/Modules/_ctypes/ctypes.h
-index 0d3f7241ca..d80ea82cee 100644
---- a/Modules/_ctypes/ctypes.h
-+++ b/Modules/_ctypes/ctypes.h
-@@ -34,7 +34,6 @@ union value {
- #ifdef HAVE_LONG_LONG
- PY_LONG_LONG ll;
- #endif
-- long double D;
- };
-
- /*
-@@ -306,7 +305,6 @@ struct tagPyCArgObject {
- #ifdef HAVE_LONG_LONG
- PY_LONG_LONG q;
- #endif
-- long double D;
- double d;
- float f;
- void *p;
---
-2.31.1
-
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index dc3d739c295b..bc568a810d6e 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -24,15 +24,14 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYT
endif
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
PCbuild/$(python_arch_subdir)_ctypes$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_ctypes_test$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_decimal$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_elementtree$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_msi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_multiprocessing$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+ PCbuild/$(python_arch_subdir)_overlapped$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
+ PCbuild/$(python_arch_subdir)_queue$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_socket$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)_ssl$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_testbuffer$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
- PCbuild/$(python_arch_subdir)_testcapi$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)pyexpat$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)select$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
@@ -41,8 +40,8 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
else
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so.1.0-gdb.py,Tools/gdb/libpython.py))
+$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0,libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so))
+$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-gdb.py,Tools/gdb/libpython.py))
# Unfortunately the python build system does not allow to explicitly enable or
# disable these, it just tries to build them and then prints which did not
@@ -53,63 +52,68 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(
ifneq ($(OS),AIX)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib-dynload,\
- LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_ctypes_test.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/array.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_asyncio.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/audioop.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/binascii.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_bisect.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_blake2.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/cmath.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_cn.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_hk.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_iso2022.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_jp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_kr.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_codecs_tw.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_contextvars.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_crypt.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_csv.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_ctypes.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_datetime.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_decimal.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_elementtree.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/fcntl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/grp.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
$(if $(DISABLE_OPENSSL),, \
- LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_hashlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
) \
- LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_heapq.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_json.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_lsprof.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/math.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_md5.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/mmap.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_multibytecodec.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_multiprocessing.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_opcode.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/ossaudiodev.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/parser.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_pickle.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_posixshmem.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_posixsubprocess.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/pyexpat.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_queue.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_random.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/resource.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/select.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha1.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha256.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_sha512.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_socket.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/spwd.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
$(if $(DISABLE_OPENSSL),, \
- LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_ssl.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
) \
- LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testbuffer.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testcapi.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testimportmultiple.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/_testmultiphase.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
- LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so \
+ LO_lib/_statistics.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_struct.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/syslog.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/termios.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/unicodedata.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/xxlimited.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_xxsubinterpreters.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/_xxtestfuzz.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
+ LO_lib/zlib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so \
))
endif
endif
@@ -117,10 +121,20 @@ endif
# headers are not delivered, but used from unpacked dir Include/
# (+ toplevel for pyconfig.h)
+ifeq ($(OS),LINUX)
+python3_MACHDEP=linux
+else
+ifeq ($(OS),MACOSX)
+python3_MACHDEP=darwin
+endif
+endif
+
# that one is generated...
+# note: python configure overrides config.guess with something that doesn't
+# put -pc in its linux platform triplets, so filter that...
ifneq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
- LO_lib/_sysconfigdata.py \
+ LO_lib/_sysconfigdata__$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
))
endif
@@ -130,33 +144,10 @@ endif
# idlelib, tkinter, turtledemo - need Tk to build the C module
# test - probably unnecessary? was explicitly removed #i116738#
# venv - why would we need virtual environments
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/plat-linux,\
- Lib/plat-linux/regen \
- Lib/plat-linux/CDROM.py \
- Lib/plat-linux/DLFCN.py \
- Lib/plat-linux/IN.py \
- Lib/plat-linux/TYPES.py \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/plat-darwin,\
- Lib/plat-darwin/IN.py \
- Lib/plat-darwin/regen \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/plat-sunos5,\
- Lib/plat-sunos5/regen \
- Lib/plat-sunos5/CDIO.py \
- Lib/plat-sunos5/DLFCN.py \
- Lib/plat-sunos5/IN.py \
- Lib/plat-sunos5/STROPTS.py \
- Lib/plat-sunos5/TYPES.py \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/plat-aix4,\
- Lib/plat-aix4/regen \
- Lib/plat-aix4/IN.py \
-))
+#
+# These lists are now sorted with "LC_COLLATE=C sort", by using
+# find Lib/ -name "*.py" | sort | sed -e 's/^/\t/' -e 's/$/ \\/'
+#
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LICENSE \
@@ -169,6 +160,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/_dummy_thread.py \
Lib/_markupbase.py \
Lib/_osx_support.py \
+ Lib/_py_abc.py \
Lib/_pydecimal.py \
Lib/_pyio.py \
Lib/_sitebuiltins.py \
@@ -187,6 +179,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/binhex.py \
Lib/bisect.py \
Lib/bz2.py \
+ Lib/cProfile.py \
Lib/calendar.py \
Lib/cgi.py \
Lib/cgitb.py \
@@ -199,11 +192,12 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/compileall.py \
Lib/configparser.py \
Lib/contextlib.py \
+ Lib/contextvars.py \
Lib/copy.py \
Lib/copyreg.py \
- Lib/cProfile.py \
Lib/crypt.py \
Lib/csv.py \
+ Lib/dataclasses.py \
Lib/datetime.py \
Lib/decimal.py \
Lib/difflib.py \
@@ -237,8 +231,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/linecache.py \
Lib/locale.py \
Lib/lzma.py \
- Lib/macpath.py \
- Lib/macurl2path.py \
Lib/mailbox.py \
Lib/mailcap.py \
Lib/mimetypes.py \
@@ -266,19 +258,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/profile.py \
Lib/pstats.py \
Lib/pty.py \
- Lib/pyclbr.py \
Lib/py_compile.py \
+ Lib/pyclbr.py \
Lib/pydoc.py \
Lib/queue.py \
Lib/quopri.py \
Lib/random.py \
- Lib/reprlib.py \
Lib/re.py \
+ Lib/reprlib.py \
Lib/rlcompleter.py \
Lib/runpy.py \
Lib/sched.py \
- Lib/shelve.py \
+ Lib/secrets.py \
Lib/selectors.py \
+ Lib/shelve.py \
Lib/shlex.py \
Lib/shutil.py \
Lib/signal.py \
@@ -292,10 +285,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/sre_constants.py \
Lib/sre_parse.py \
Lib/ssl.py \
- Lib/statistics.py \
Lib/stat.py \
- Lib/stringprep.py \
+ Lib/statistics.py \
Lib/string.py \
+ Lib/stringprep.py \
Lib/struct.py \
Lib/subprocess.py \
Lib/sunau.py \
@@ -310,25 +303,15 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/this.py \
Lib/threading.py \
Lib/timeit.py \
- Lib/tokenize.py \
Lib/token.py \
- Lib/traceback.py \
+ Lib/tokenize.py \
Lib/trace.py \
+ Lib/traceback.py \
+ Lib/tracemalloc.py \
Lib/tty.py \
Lib/turtle.py \
Lib/types.py \
Lib/typing.py \
- Lib/unittest/case.py \
- Lib/unittest/__init__.py \
- Lib/unittest/loader.py \
- Lib/unittest/__main__.py \
- Lib/unittest/main.py \
- Lib/unittest/mock.py \
- Lib/unittest/result.py \
- Lib/unittest/runner.py \
- Lib/unittest/signals.py \
- Lib/unittest/suite.py \
- Lib/unittest/util.py \
Lib/uu.py \
Lib/uuid.py \
Lib/warnings.py \
@@ -336,12 +319,45 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/weakref.py \
Lib/webbrowser.py \
Lib/xdrlib.py \
+ Lib/zipapp.py \
Lib/zipfile.py \
+ Lib/zipimport.py \
+))
+
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/asyncio,\
+ Lib/asyncio/__init__.py \
+ Lib/asyncio/__main__.py \
+ Lib/asyncio/base_events.py \
+ Lib/asyncio/base_futures.py \
+ Lib/asyncio/base_subprocess.py \
+ Lib/asyncio/base_tasks.py \
+ Lib/asyncio/constants.py \
+ Lib/asyncio/coroutines.py \
+ Lib/asyncio/events.py \
+ Lib/asyncio/exceptions.py \
+ Lib/asyncio/format_helpers.py \
+ Lib/asyncio/futures.py \
+ Lib/asyncio/locks.py \
+ Lib/asyncio/log.py \
+ Lib/asyncio/proactor_events.py \
+ Lib/asyncio/protocols.py \
+ Lib/asyncio/queues.py \
+ Lib/asyncio/runners.py \
+ Lib/asyncio/selector_events.py \
+ Lib/asyncio/sslproto.py \
+ Lib/asyncio/staggered.py \
+ Lib/asyncio/streams.py \
+ Lib/asyncio/subprocess.py \
+ Lib/asyncio/tasks.py \
+ Lib/asyncio/transports.py \
+ Lib/asyncio/trsock.py \
+ Lib/asyncio/unix_events.py \
+ Lib/asyncio/windows_events.py \
+ Lib/asyncio/windows_utils.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/collections,\
Lib/collections/__init__.py \
- Lib/collections/__main__.py \
Lib/collections/abc.py \
))
@@ -358,6 +374,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/ctypes,\
Lib/ctypes/__init__.py \
+ Lib/ctypes/_aix.py \
Lib/ctypes/_endian.py \
Lib/ctypes/util.py \
Lib/ctypes/wintypes.py \
@@ -391,8 +408,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/distutils/errors.py \
Lib/distutils/extension.py \
Lib/distutils/fancy_getopt.py \
- Lib/distutils/filelist.py \
Lib/distutils/file_util.py \
+ Lib/distutils/filelist.py \
Lib/distutils/log.py \
Lib/distutils/msvc9compiler.py \
Lib/distutils/msvccompiler.py \
@@ -401,44 +418,44 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/distutils/text_file.py \
Lib/distutils/unixccompiler.py \
Lib/distutils/util.py \
- Lib/distutils/versionpredicate.py \
Lib/distutils/version.py \
+ Lib/distutils/versionpredicate.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/distutils/command,\
Lib/distutils/command/__init__.py \
+ Lib/distutils/command/bdist.py \
Lib/distutils/command/bdist_dumb.py \
Lib/distutils/command/bdist_msi.py \
- Lib/distutils/command/bdist.py \
Lib/distutils/command/bdist_rpm.py \
Lib/distutils/command/bdist_wininst.py \
+ Lib/distutils/command/build.py \
Lib/distutils/command/build_clib.py \
Lib/distutils/command/build_ext.py \
- Lib/distutils/command/build.py \
Lib/distutils/command/build_py.py \
Lib/distutils/command/build_scripts.py \
Lib/distutils/command/check.py \
Lib/distutils/command/clean.py \
Lib/distutils/command/command_template \
Lib/distutils/command/config.py \
+ Lib/distutils/command/install.py \
Lib/distutils/command/install_data.py \
Lib/distutils/command/install_egg_info.py \
Lib/distutils/command/install_headers.py \
Lib/distutils/command/install_lib.py \
- Lib/distutils/command/install.py \
Lib/distutils/command/install_scripts.py \
Lib/distutils/command/register.py \
Lib/distutils/command/sdist.py \
Lib/distutils/command/upload.py \
- Lib/distutils/command/wininst-10.0-amd64.exe \
Lib/distutils/command/wininst-10.0.exe \
- Lib/distutils/command/wininst-14.0-amd64.exe \
+ Lib/distutils/command/wininst-10.0-amd64.exe \
Lib/distutils/command/wininst-14.0.exe \
+ Lib/distutils/command/wininst-14.0-amd64.exe \
Lib/distutils/command/wininst-6.0.exe \
Lib/distutils/command/wininst-7.1.exe \
Lib/distutils/command/wininst-8.0.exe \
- Lib/distutils/command/wininst-9.0-amd64.exe \
Lib/distutils/command/wininst-9.0.exe \
+ Lib/distutils/command/wininst-9.0-amd64.exe \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email,\
@@ -482,8 +499,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/aliases.py \
Lib/encodings/ascii.py \
Lib/encodings/base64_codec.py \
- Lib/encodings/big5hkscs.py \
Lib/encodings/big5.py \
+ Lib/encodings/big5hkscs.py \
Lib/encodings/bz2_codec.py \
Lib/encodings/charmap.py \
Lib/encodings/cp037.py \
@@ -500,10 +517,10 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/cp1256.py \
Lib/encodings/cp1257.py \
Lib/encodings/cp1258.py \
+ Lib/encodings/cp273.py \
Lib/encodings/cp424.py \
Lib/encodings/cp437.py \
Lib/encodings/cp500.py \
- Lib/encodings/cp65001.py \
Lib/encodings/cp720.py \
Lib/encodings/cp737.py \
Lib/encodings/cp775.py \
@@ -537,20 +554,20 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/hp_roman8.py \
Lib/encodings/hz.py \
Lib/encodings/idna.py \
+ Lib/encodings/iso2022_jp.py \
Lib/encodings/iso2022_jp_1.py \
- Lib/encodings/iso2022_jp_2004.py \
Lib/encodings/iso2022_jp_2.py \
+ Lib/encodings/iso2022_jp_2004.py \
Lib/encodings/iso2022_jp_3.py \
Lib/encodings/iso2022_jp_ext.py \
- Lib/encodings/iso2022_jp.py \
Lib/encodings/iso2022_kr.py \
+ Lib/encodings/iso8859_1.py \
Lib/encodings/iso8859_10.py \
Lib/encodings/iso8859_11.py \
Lib/encodings/iso8859_13.py \
Lib/encodings/iso8859_14.py \
Lib/encodings/iso8859_15.py \
Lib/encodings/iso8859_16.py \
- Lib/encodings/iso8859_1.py \
Lib/encodings/iso8859_2.py \
Lib/encodings/iso8859_3.py \
Lib/encodings/iso8859_4.py \
@@ -573,29 +590,29 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/mac_greek.py \
Lib/encodings/mac_iceland.py \
Lib/encodings/mac_latin2.py \
- Lib/encodings/mac_romanian.py \
Lib/encodings/mac_roman.py \
+ Lib/encodings/mac_romanian.py \
Lib/encodings/mac_turkish.py \
Lib/encodings/mbcs.py \
+ Lib/encodings/oem.py \
Lib/encodings/palmos.py \
Lib/encodings/ptcp154.py \
Lib/encodings/punycode.py \
Lib/encodings/quopri_codec.py \
Lib/encodings/raw_unicode_escape.py \
Lib/encodings/rot_13.py \
- Lib/encodings/shift_jis_2004.py \
Lib/encodings/shift_jis.py \
+ Lib/encodings/shift_jis_2004.py \
Lib/encodings/shift_jisx0213.py \
Lib/encodings/tis_620.py \
Lib/encodings/undefined.py \
Lib/encodings/unicode_escape.py \
- Lib/encodings/unicode_internal.py \
+ Lib/encodings/utf_16.py \
Lib/encodings/utf_16_be.py \
Lib/encodings/utf_16_le.py \
- Lib/encodings/utf_16.py \
+ Lib/encodings/utf_32.py \
Lib/encodings/utf_32_be.py \
Lib/encodings/utf_32_le.py \
- Lib/encodings/utf_32.py \
Lib/encodings/utf_7.py \
Lib/encodings/utf_8.py \
Lib/encodings/utf_8_sig.py \
@@ -623,6 +640,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/importlib/_bootstrap_external.py \
Lib/importlib/abc.py \
Lib/importlib/machinery.py \
+ Lib/importlib/metadata.py \
+ Lib/importlib/resources.py \
Lib/importlib/util.py \
))
@@ -658,8 +677,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_buffer.py \
Lib/lib2to3/fixes/fix_dict.py \
Lib/lib2to3/fixes/fix_except.py \
- Lib/lib2to3/fixes/fix_execfile.py \
Lib/lib2to3/fixes/fix_exec.py \
+ Lib/lib2to3/fixes/fix_execfile.py \
Lib/lib2to3/fixes/fix_exitfunc.py \
Lib/lib2to3/fixes/fix_filter.py \
Lib/lib2to3/fixes/fix_funcattrs.py \
@@ -668,13 +687,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_has_key.py \
Lib/lib2to3/fixes/fix_idioms.py \
Lib/lib2to3/fixes/fix_import.py \
- Lib/lib2to3/fixes/fix_imports2.py \
Lib/lib2to3/fixes/fix_imports.py \
+ Lib/lib2to3/fixes/fix_imports2.py \
Lib/lib2to3/fixes/fix_input.py \
Lib/lib2to3/fixes/fix_intern.py \
Lib/lib2to3/fixes/fix_isinstance.py \
- Lib/lib2to3/fixes/fix_itertools_imports.py \
Lib/lib2to3/fixes/fix_itertools.py \
+ Lib/lib2to3/fixes/fix_itertools_imports.py \
Lib/lib2to3/fixes/fix_long.py \
Lib/lib2to3/fixes/fix_map.py \
Lib/lib2to3/fixes/fix_metaclass.py \
@@ -714,8 +733,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/pgen2/literals.py \
Lib/lib2to3/pgen2/parse.py \
Lib/lib2to3/pgen2/pgen.py \
- Lib/lib2to3/pgen2/tokenize.py \
Lib/lib2to3/pgen2/token.py \
+ Lib/lib2to3/pgen2/tokenize.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/logging,\
@@ -724,13 +743,25 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/logging/handlers.py \
))
+ifeq (WNT,$(OS))
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/msilib,\
+ Lib/msilib/__init__.py \
+ Lib/msilib/schema.py \
+ Lib/msilib/sequence.py \
+ Lib/msilib/text.py \
+))
+endif
+
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/multiprocessing,\
Lib/multiprocessing/__init__.py \
Lib/multiprocessing/connection.py \
Lib/multiprocessing/context.py \
+ Lib/multiprocessing/dummy/__init__.py \
+ Lib/multiprocessing/dummy/connection.py \
Lib/multiprocessing/forkserver.py \
Lib/multiprocessing/heap.py \
Lib/multiprocessing/managers.py \
+ Lib/multiprocessing/pool.py \
Lib/multiprocessing/popen_fork.py \
Lib/multiprocessing/popen_forkserver.py \
Lib/multiprocessing/popen_spawn_posix.py \
@@ -739,7 +770,8 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/multiprocessing/queues.py \
Lib/multiprocessing/reduction.py \
Lib/multiprocessing/resource_sharer.py \
- Lib/multiprocessing/semaphore_tracker.py \
+ Lib/multiprocessing/resource_tracker.py \
+ Lib/multiprocessing/shared_memory.py \
Lib/multiprocessing/sharedctypes.py \
Lib/multiprocessing/spawn.py \
Lib/multiprocessing/synchronize.py \
@@ -760,6 +792,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest,\
Lib/unittest/__init__.py \
Lib/unittest/__main__.py \
+ Lib/unittest/async_case.py \
Lib/unittest/case.py \
Lib/unittest/loader.py \
Lib/unittest/main.py \
@@ -771,39 +804,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/unittest/util.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test,\
- Lib/unittest/test/__init__.py \
- Lib/unittest/test/__main__.py \
- Lib/unittest/test/_test_warnings.py \
- Lib/unittest/test/dummy.py \
- Lib/unittest/test/support.py \
- Lib/unittest/test/test_assertions.py \
- Lib/unittest/test/test_break.py \
- Lib/unittest/test/test_case.py \
- Lib/unittest/test/test_discovery.py \
- Lib/unittest/test/test_functiontestcase.py \
- Lib/unittest/test/test_loader.py \
- Lib/unittest/test/test_program.py \
- Lib/unittest/test/test_result.py \
- Lib/unittest/test/test_runner.py \
- Lib/unittest/test/test_setups.py \
- Lib/unittest/test/test_skipping.py \
- Lib/unittest/test/test_suite.py \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/unittest/test/testmock,\
- Lib/unittest/test/testmock/__init__.py \
- Lib/unittest/test/testmock/__main__.py \
- Lib/unittest/test/testmock/support.py \
- Lib/unittest/test/testmock/testcallable.py \
- Lib/unittest/test/testmock/testhelpers.py \
- Lib/unittest/test/testmock/testmagicmethods.py \
- Lib/unittest/test/testmock/testmock.py \
- Lib/unittest/test/testmock/testpatch.py \
- Lib/unittest/test/testmock/testsentinel.py \
- Lib/unittest/test/testmock/testwith.py \
-))
-
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/urllib,\
Lib/urllib/__init__.py \
Lib/urllib/error.py \
@@ -828,21 +828,21 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/dom,\
Lib/xml/dom/__init__.py \
- Lib/xml/dom/NodeFilter.py \
Lib/xml/dom/domreg.py \
Lib/xml/dom/expatbuilder.py \
Lib/xml/dom/minicompat.py \
Lib/xml/dom/minidom.py \
+ Lib/xml/dom/NodeFilter.py \
Lib/xml/dom/pulldom.py \
Lib/xml/dom/xmlbuilder.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/etree,\
Lib/xml/etree/__init__.py \
+ Lib/xml/etree/cElementTree.py \
Lib/xml/etree/ElementInclude.py \
Lib/xml/etree/ElementPath.py \
Lib/xml/etree/ElementTree.py \
- Lib/xml/etree/cElementTree.py \
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\
@@ -866,7 +866,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
))
$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/site-packages,\
- Lib/site-packages/README \
+ Lib/site-packages/README.txt \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 405b633cde95..36b4f0a0ce76 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
expat \
+ $(if $(filter WNT LINUX,$(OS)),libffi) \
openssl \
zlib \
))
@@ -29,16 +30,24 @@ ifeq ($(OS),WNT)
# TODO: using Debug configuration and related mangling of pyconfig.h
+python3_WIN_PLATFORM_MSBUILD := $(strip \
+ $(if $(filter INTEL,$(CPUNAME)),Win32) \
+ $(if $(filter X86_64,$(CPUNAME)),x64) \
+ $(if $(filter ARM64,$(CPUNAME)),arm64) \
+ )
+
# at least for MSVC 2008 it is necessary to clear MAKEFLAGS because
# nmake is invoked
$(call gb_ExternalProject_get_state_target,python3,build) :
$(call gb_ExternalProject_run,build,\
MAKEFLAGS= MSBuild.exe pcbuild.sln /t:Build \
/p:Configuration=$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
- /p:Platform=$(if $(filter INTEL,$(CPUNAME)),Win32,x64) \
+ /p:Platform=$(python3_WIN_PLATFORM_MSBUILD) \
/p:opensslIncludeDir=$(call gb_UnpackedTarball_get_dir,openssl)/include \
- /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl) \
+ /p:opensslOutDir=$(call gb_UnpackedTarball_get_dir,openssl)/ \
/p:zlibDir=$(call gb_UnpackedTarball_get_dir,zlib) \
+ /p:libffiOutDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs \
+ /p:libffiIncludeDir=$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/include \
/maxcpucount \
$(if $(filter 150,$(VCVER)),/p:PlatformToolset=v141 /p:VisualStudioVersion=15.0 /ToolsVersion:15.0) \
$(if $(filter 160,$(VCVER)),/p:PlatformToolset=v142 /p:VisualStudioVersion=16.0 /ToolsVersion:Current) \
@@ -49,6 +58,16 @@ else
# --with-system-expat: this should find the one in the workdir (or system)
+# OPENSSL_INCLUDES OPENSSL_LDFLAGS OPENSSL_LIBS cannot be set via commandline!
+# use --with-openssl instead, which requires include/ and lib/ subdirs.
+
+# libffi is not all that stable, with 3 different SONAMEs currently, so we
+# have to bundle it; --without-system-ffi does not work any more on Linux.
+# Unfortuantely (as of 3.7) pkg-config is used to locate libffi so we do some
+# hacks to find the libffi.pc in workdir by overriding PKG_CONFIG_LIBDIR.
+# Also, pkg-config is only used to find the headers, the libdir needs to be
+# passed extra.
+
# create a symlink "LO_lib" because the .so are in a directory with platform
# specific name like build/lib.linux-x86_64-3.3
@@ -80,17 +99,22 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
) \
--enable-framework=/@__________________________________________________OOO --with-framework-name=LibreOfficePython, \
--enable-shared \
+ $(if $(filter 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),ac_cv_func_utimensat=no) \
+ ) \
+ $(if $(SYSTEM_OPENSSL)$(DISABLE_OPENSSL),,\
+ --with-openssl=$(call gb_UnpackedTarball_get_dir,openssl) \
+ ) \
+ $(if $(filter LINUX,$(OS)), \
+ PKG_CONFIG_LIBDIR="$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)$${PKG_CONFIG_LIBDIR:+:$$PKG_CONFIG_LIBDIR}" \
) \
CC="$(strip $(CC) \
- $(if $(SYSTEM_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include \
- $(if $(DISABLE_OPENSSL),,-I$(call gb_UnpackedTarball_get_dir,openssl)/include)) \
$(if $(SYSTEM_EXPAT),,-I$(call gb_UnpackedTarball_get_dir,expat)/lib) \
$(if $(SYSBASE), -I$(SYSBASE)/usr/include) \
)" \
$(if $(python3_cflags),CFLAGS='$(python3_cflags)') \
$(if $(filter -fsanitize=%,$(CC)),LINKCC="$(CXX) -pthread") \
LDFLAGS="$(strip $(LDFLAGS) \
- $(if $(SYSTEM_OPENSSL),,-L$(call gb_UnpackedTarball_get_dir,openssl)) \
+ $(if $(filter LINUX,$(OS)),-L$(call gb_UnpackedTarball_get_dir,libffi)/$(HOST_PLATFORM)/.libs) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSTEM_ZLIB),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
@@ -112,14 +136,14 @@ python3_fw_prefix=$(call gb_UnpackedTarball_get_dir,python3)/python-inst/@______
$(call gb_ExternalProject_get_state_target,python3,fixscripts) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove reference to installroot from scripts,build,CUS,5)
$(COMMAND_ECHO)for file in \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3 \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/2to3-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/easy_install-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/idle$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR) \
+ $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pip$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pydoc$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)-config \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m-config \
- $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin/pyvenv-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) ; do \
- { rm "$$file" && $(gb_AWK) '\
+ ; do { rm "$$file" && $(gb_AWK) '\
BEGIN {print "#!/bin/bash\n\
origpath=$$(pwd)\n\
bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\
@@ -141,16 +165,14 @@ $(call gb_ExternalProject_get_state_target,python3,fixinstallnames) : $(call gb_
@loader_path/../../../LibreOfficePython $$file ; done
touch $@
-# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,executables) : $(call gb_ExternalProject_get_state_target,python3,build)
cd $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/bin ; \
- for file in python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR) \
- python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m ; do \
$(INSTALL_NAME_TOOL) -change \
$(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/LibreOfficePython \
- @executable_path/../LibreOfficePython $$file ; done
+ @executable_path/../LibreOfficePython python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
touch $@
+# also delete binaries that are symlinked in scp2
$(call gb_ExternalProject_get_state_target,python3,removeunnecessarystuff) : $(call gb_ExternalProject_get_state_target,python3,build)
$(call gb_Output_announce,python3 - remove the stuff we don't need to ship,build,CUS,5)
rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 41d9e4d78ff5..94950537386c 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -17,18 +17,12 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
- $(if $(filter AIX,$(OS)),external/python3/python-3.3.3-aix.patch.1) \
external/python3/python-3.3.0-darwin.patch.1 \
- external/python3/python-3.5.4-ssl.patch.1 \
+ external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
- external/python3/python-3.3.0-pythreadstate.patch.1 \
- external/python3/python-3.3.0-clang.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
- external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1 \
- external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1 \
- external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
@@ -49,12 +43,4 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3, \
))
endif
-ifeq ($(OS),MACOSX)
-ifneq ($(filter 1090 101000 101100 101200,$(MAC_OS_X_VERSION_MIN_REQUIRED)),)
-$(eval $(call gb_UnpackedTarball_add_patches,python3,\
- external/python3/python3-osx-avoid-new-10.13.patch.1 \
-))
-endif
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/external/python3/i100492-freebsd.patch.1 b/external/python3/i100492-freebsd.patch.1
index 9b4b33729f75..b2ca1ee7117f 100644
--- a/external/python3/i100492-freebsd.patch.1
+++ b/external/python3/i100492-freebsd.patch.1
@@ -1,40 +1,8 @@
FreeBSD porting fixes, patch by maho@openoffice.org
---- python3.orig/Lib/test/test_threading.py 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Lib/test/test_threading.py 2015-07-26 17:03:55.935367820 +0200
-@@ -24,8 +24,8 @@
- # #12316 and #11870), and fork() from a worker thread is known to trigger
- # problems with some operating systems (issue #3863): skip problematic tests
- # on platforms known to behave badly.
--platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5',
-- 'hp-ux11')
-+platforms_to_skip = ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'netbsd5',
-+ 'os2emx', 'hp-ux11')
-
-
- # A trivial mutable counter.
--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
+++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
-@@ -42,6 +42,10 @@
- #endif
- #endif
-
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+#endif
-+
- /* The POSIX spec says that implementations supporting the sem_*
- family of functions must indicate this by defining
- _POSIX_SEMAPHORES. */
-@@ -60,7 +64,6 @@
- in default setting. So the process scope is preferred to get
- enough number of threads to work. */
- #ifdef __FreeBSD__
--#include <osreldate.h>
- #if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
- #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
- #endif
-@@ -186,6 +189,9 @@
+@@ -238,6 +238,9 @@
{
pthread_t th;
int status;
@@ -44,11 +12,10 @@ FreeBSD porting fixes, patch by maho@openoffice.org
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
-@@ -214,7 +220,10 @@
- #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
- pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
- #endif
--
+@@ -277,6 +280,10 @@
+ callback->func = func;
+ callback->arg = arg;
+
+#ifdef __FreeBSD__
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
@@ -56,9 +23,9 @@ FreeBSD porting fixes, patch by maho@openoffice.org
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
&attrs,
-@@ -225,6 +234,9 @@
- (void *)arg
- );
+@@ -285,6 +292,9 @@
+ #endif
+ pythread_wrapper, callback);
+#ifdef __FreeBSD__
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
diff --git a/external/python3/internal-zlib.patch.0 b/external/python3/internal-zlib.patch.0
index abe2630bd2e7..27bb737db0c7 100644
--- a/external/python3/internal-zlib.patch.0
+++ b/external/python3/internal-zlib.patch.0
@@ -19,32 +19,32 @@
--- setup.py
+++ setup.py
-@@ -1362,7 +1362,7 @@
+@@ -1483,7 +1483,7 @@
#
# You can upgrade zlib to version 1.1.4 yourself by going to
# http://www.gzip.org/zlib/
-- zlib_inc = find_file('zlib.h', [], inc_dirs)
+- zlib_inc = find_file('zlib.h', [], self.inc_dirs)
+ zlib_inc = [os.environ.get('ZLIB_INCDIR')]
have_zlib = False
if zlib_inc is not None:
zlib_h = zlib_inc[0] + '/zlib.h'
-@@ -1379,13 +1379,13 @@
+@@ -1500,13 +1500,13 @@
version = line.split()[2]
break
if version >= version_req:
-- if (self.compiler.find_library_file(lib_dirs, 'z')):
-+ if (self.compiler.find_library_file(lib_dirs, 'zlib')):
- if host_platform == "darwin":
+- if (self.compiler.find_library_file(self.lib_dirs, 'z')):
++ if (self.compiler.find_library_file(self.lib_dirs, 'zlib')):
+ if MACOS:
zlib_extra_link_args = ('-Wl,-search_paths_first',)
else:
zlib_extra_link_args = ()
- exts.append( Extension('zlib', ['zlibmodule.c'],
-- libraries = ['z'],
-+ libraries = ['zlib'],
- extra_link_args = zlib_extra_link_args))
+ self.add(Extension('zlib', ['zlibmodule.c'],
+- libraries=['z'],
++ libraries=['zlib'],
+ extra_link_args=zlib_extra_link_args))
have_zlib = True
else:
-@@ -1399,7 +1399,7 @@
+@@ -1520,7 +1520,7 @@
# crc32 if we have it. Otherwise binascii uses its own.
if have_zlib:
extra_compile_args = ['-DUSE_ZLIB_CRC32']
diff --git a/external/python3/python-3.3.0-clang.patch.1 b/external/python3/python-3.3.0-clang.patch.1
deleted file mode 100644
index 9001110fbed4..000000000000
--- a/external/python3/python-3.3.0-clang.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
--*- Mode: diff -*-
-
---- python3/setup.py
-+++ python3/setup.py
-@@ -436,7 +436,7 @@
- if ret >> 8 == 0:
- with open(tmpfile) as fp:
- for line in fp.readlines():
-- if line.startswith("gcc version"):
-+ if line.startswith("gcc version") or line.startswith("clang -cc1 version"):
- is_gcc = True
- elif line.startswith("#include <...>"):
- in_incdirs = True
diff --git a/external/python3/python-3.3.0-darwin.patch.1 b/external/python3/python-3.3.0-darwin.patch.1
index d5cb17e339a2..d262d55cd5b3 100644
--- a/external/python3/python-3.3.0-darwin.patch.1
+++ b/external/python3/python-3.3.0-darwin.patch.1
@@ -5,7 +5,7 @@ LO needs to build both against MacOSX SDK and not produce universal binaries.
diff -ru python3.orig/configure python3/configure
--- python3.orig/configure 2015-07-26 17:36:11.808497783 +0200
+++ python3/configure 2015-07-26 17:38:49.016508337 +0200
-@@ -6794,7 +6794,20 @@
+@@ -7385,7 +7385,20 @@
then
case "$UNIVERSAL_ARCHS" in
32-bit)
@@ -30,7 +30,7 @@ diff -ru python3.orig/configure python3/configure
diff -ru python3.orig/Mac/Makefile.in python3/Mac/Makefile.in
--- python3.orig/Mac/Makefile.in 2015-07-05 18:50:07.000000000 +0200
+++ python3/Mac/Makefile.in 2015-07-26 17:40:14.860514100 +0200
-@@ -43,7 +43,7 @@
+@@ -44,7 +44,7 @@
INSTALL_SCRIPT= @INSTALL_SCRIPT@
INSTALL_DATA=@INSTALL_DATA@
LN=@LN@
@@ -49,7 +49,7 @@ diff -ru python3.orig/Mac/Resources/app/Info.plist.in python3/Mac/Resources/app/
- <string>Python</string>
+ <string>LibreOfficePython</string>
<key>CFBundleGetInfoString</key>
- <string>%version%, (c) 2001-2016 Python Software Foundation.</string>
+ <string>%version%, (c) 2001-2023 Python Software Foundation.</string>
<key>CFBundleHelpBookFolder</key>
diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resources/framework/Info.plist.in
--- python3.orig/Mac/Resources/framework/Info.plist.in 2015-07-05 18:50:07.000000000 +0200
@@ -63,19 +63,3 @@ diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resource
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
-diff -ru python3.orig/setup.py python3/setup.py
---- python3.orig/setup.py 2015-07-26 17:36:11.804497783 +0200
-+++ python3/setup.py 2015-07-26 17:39:48.599512337 +0200
-@@ -468,11 +468,11 @@
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-- if not cross_compiling:
-+ if not cross_compiling and host_platform != 'darwin':
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
-+ if cross_compiling or host_platform == 'darwin':
- self.add_gcc_paths()
- self.add_multiarch_paths()
diff --git a/external/python3/python-3.3.0-pythreadstate.patch.1 b/external/python3/python-3.3.0-pythreadstate.patch.1
deleted file mode 100644
index 66350e2c8112..000000000000
--- a/external/python3/python-3.3.0-pythreadstate.patch.1
+++ /dev/null
@@ -1,15 +0,0 @@
-disable a check in PyThreadState_Swap that is hopefully not a "real" problem
-
---- python3/Python/pystate.c 2013-04-17 22:45:00.799800000 +0200
-+++ python3/Python/pystate.c 2013-04-17 22:46:53.743800000 +0200
-@@ -437,7 +437,9 @@
- to be used for a thread. Check this the best we can in debug
- builds.
- */
--#if defined(Py_DEBUG) && defined(WITH_THREAD)
-+#if defined(Py_DEBUG) && defined(WITH_THREAD) && 0
-+ /* disable this for LO - it is triggered by nested PyThreadAttach
-+ which do not appear to be a real problem */
- if (newts) {
- /* This can be called from PyEval_RestoreThread(). Similar
- to it, we need to ensure errno doesn't change.
diff --git a/external/python3/python-3.3.3-aix.patch.1 b/external/python3/python-3.3.3-aix.patch.1
deleted file mode 100644
index 571d69a88f6b..000000000000
--- a/external/python3/python-3.3.3-aix.patch.1
+++ /dev/null
@@ -1,146 +0,0 @@
-build with GCC on AIX
-
-diff -ru python3.orig/configure python3/configure
---- python3.orig/configure 2015-07-26 17:10:18.218393484 +0200
-+++ python3/configure 2015-07-26 17:29:44.460471779 +0200
-@@ -3534,8 +3534,6 @@
- else
-
- case $ac_sys_system in
-- AIX*) CC=${CC:-xlc_r}
-- without_gcc=;;
- *) without_gcc=no;;
- esac
- fi
-@@ -5787,10 +5785,18 @@
- PY3LIBRARY=libpython3.so
- fi
- ;;
-- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
-+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)
- LDLIBRARY='libpython$(LDVERSION).so'
-- BLDLIBRARY='-L. -lpython$(LDVERSION)'
-- RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-+ case $ac_sys_system in
-+ AIX*)
-+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
-+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
-+ ;;
-+ *)
-+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
-+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-+ ;;
-+ esac
- INSTSONAME="$LDLIBRARY".$SOVERSION
- if test "$with_pydebug" != yes
- then
-@@ -8789,8 +8795,13 @@
- then
- case $ac_sys_system/$ac_sys_release in
- AIX*)
-- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
-+ if test "$GCC" = "yes"; then
-+ LDSHARED='$(CC) -shared'
-+ BLDSHARED='$(CC) -Wl,-brtl -shared'
-+ else
-+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
-+ fi
- ;;
- IRIX/5*) LDSHARED="ld -shared";;
- IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
-diff -ru python3.orig/configure.ac python3/configure.ac
---- python3.orig/configure.ac 2015-07-05 18:50:08.000000000 +0200
-+++ python3/configure.ac 2015-07-26 17:32:10.445481579 +0200
-@@ -587,8 +587,6 @@
- without_gcc=$withval;;
- esac], [
- case $ac_sys_system in
-- AIX*) CC=${CC:-xlc_r}
-- without_gcc=;;
- *) without_gcc=no;;
- esac])
- AC_MSG_RESULT($without_gcc)
-@@ -1090,10 +1088,18 @@
- PY3LIBRARY=libpython3.so
- fi
- ;;
-- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
-+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|AIX*)Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
- LDLIBRARY='libpython$(LDVERSION).so'
-- BLDLIBRARY='-L. -lpython$(LDVERSION)'
-- RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
-+ case $ac_sys_system in
-+ AIX*)
-+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(LDVERSION)'
-+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
-+ ;;
-+ *)
-+ BLDLIBRARY='-L. -lpython$(LDVERSION)'
-+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
-+ ;;
-+ esac
- INSTSONAME="$LDLIBRARY".$SOVERSION
- if test "$with_pydebug" != yes
- then
-@@ -2164,8 +2170,13 @@
- then
- case $ac_sys_system/$ac_sys_release in
- AIX*)
-- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
-+ if test "$GCC" = "yes"; then
-+ LDSHARED='$(CC) -shared'
-+ BLDSHARED='$(CC) -Wl,-brtl -shared'
-+ else
-+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
-+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
-+ fi
- ;;
- IRIX/5*) LDSHARED="ld -shared";;
- IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
-diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
---- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200
-@@ -598,14 +598,17 @@
-
- libpython$(LDVERSION).so: $(LIBRARY_OBJS)
- if test $(INSTSONAME) != $(LDLIBRARY); then \
-- $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-+ $(BLDSHARED) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
- $(LN) -f $(INSTSONAME) $@; \
- else \
- $(BLDSHARED) -o $@ $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
- fi
-
- libpython3.so: libpython$(LDVERSION).so
-- $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^
-+ if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
-+ SONAME="-Wl,-h$@"; \
-+ fi; \
-+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ $(SONAME) $^
-
- libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
- $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-@@ -1299,6 +1305,8 @@
- export PATH; PATH="`pwd`:$$PATH"; \
- export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
- export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
-+ export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
-+ export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
- export EXE; EXE="$(BUILDEXE)"; \
- if [ -n "$(MULTIARCH)" ]; then export MULTIARCH; MULTIARCH=$(MULTIARCH); fi; \
- export PYTHON_FOR_BUILD; \
-diff -ru python3.orig/Modules/Setup.dist python3/Modules/Setup.dist
---- python3.orig/Modules/Setup.dist 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Modules/Setup.dist 2015-07-26 17:34:27.951490811 +0200
-@@ -181,7 +181,7 @@
- #_bisect _bisectmodule.c # Bisection algorithms
- #_heapq _heapqmodule.c # Heap queue algorithm
-
--#unicodedata unicodedata.c # static Unicode character database
-+unicodedata unicodedata.c # static Unicode character database
-
-
- # Modules with some UNIX dependencies -- on by default:
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index a162298d4971..c4a1dea61ecf 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,17 +1,6 @@
---- Include/objimpl.h
-+++ Include/objimpl.h
-@@ -250,7 +250,7 @@
- union _gc_head *gc_prev;
- Py_ssize_t gc_refs;
- } gc;
-- double dummy; /* force worst-case alignment */
-+ long double dummy; /* force worst-case alignment */
- } PyGC_Head;
-
- extern PyGC_Head *_PyGC_generation0;
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
-@@ -413,8 +413,8 @@
+@@ -712,8 +712,8 @@
#ifdef WITH_PYMALLOC
@@ -21,12 +10,12 @@
/* If we're using GCC, use __builtin_expect() to reduce overhead of
the valgrind checks */
-@@ -1181,7 +1181,7 @@
+@@ -1430,7 +1430,7 @@
#ifdef WITH_VALGRIND
- if (UNLIKELY(running_on_valgrind == -1))
+ if (UNLIKELY(running_on_valgrind == -1)) {
- running_on_valgrind = RUNNING_ON_VALGRIND;
+ running_on_valgrind = 1;
- if (UNLIKELY(running_on_valgrind))
- goto redirect;
- #endif
+ }
+ if (UNLIKELY(running_on_valgrind)) {
+ return NULL;
diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1
index 029d98c0310d..a408858f5917 100644
--- a/external/python3/python-3.3.3-elf-rpath.patch.1
+++ b/external/python3/python-3.3.3-elf-rpath.patch.1
@@ -5,18 +5,16 @@ set RPATH (only to be used on ELF platforms)
diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
--- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200
+++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200
-@@ -550,7 +550,7 @@
+@@ -566,7 +566,7 @@
# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-+ $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
+- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
---- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200
-@@ -607,7 +607,7 @@
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
+@@ -628,7 +628,7 @@
fi
libpython3.so: libpython$(LDVERSION).so
@@ -24,5 +22,4 @@ diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ -Wl,-rpath,\$$ORIGIN
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
- $(CC) -dynamiclib -Wl,-single_module $(PY_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
-
+ $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1
index 54b2a5f46540..d5b4e3f6264b 100644
--- a/external/python3/python-3.5.4-msvc-disable.patch.1
+++ b/external/python3/python-3.5.4-msvc-disable.patch.1
@@ -3,7 +3,7 @@ Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- python3.orig/PCbuild/pcbuild.sln 2017-08-10 00:04:44.359879894 +0200
+++ python3/PCbuild/pcbuild.sln 2017-08-10 00:13:51.179873748 +0200
-@@ -12,8 +12,6 @@
+@@ -15,8 +15,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
@@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
-@@ -28,32 +26,18 @@
+@@ -31,34 +29,20 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
@@ -22,6 +22,8 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}"
+ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
@@ -45,17 +47,12 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
-@@ -80,12 +64,6 @@
+@@ -93,8 +77,6 @@
EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testmultiphase", "_testmultiphase.vcxproj", "{16BFE6F0-22EF-40B5-B831-7E937119EF10}"
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
EndProject
--Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tcl", "tcl.vcxproj", "{B5FD6F1D-129E-4BFF-9340-03606FAC7283}"
--EndProject
--Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tix", "tix.vcxproj", "{C5A3E7FB-9695-4B2E-960B-1D9F43F1E555}"
--EndProject
--Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
+-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblzma", "liblzma.vcxproj", "{12728250-16EC-4DC6-94D7-E21DD88947F8}"
-EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python_uwp", "python_uwp.vcxproj", "{9DE9E23D-C8D4-4817-92A9-920A8B1FE5FF}"
EndProject
- Global
-Only in python3/PCbuild: pcbuild.sln~
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "venvlauncher", "venvlauncher.vcxproj", "{494BAC80-A60C-43A9-99E7-ACB691CE2C4D}"
diff --git a/external/python3/python-3.5.4-ssl.patch.1 b/external/python3/python-3.5.4-ssl.patch.1
deleted file mode 100644
index 123588661d2f..000000000000
--- a/external/python3/python-3.5.4-ssl.patch.1
+++ /dev/null
@@ -1,83 +0,0 @@
--*- Mode: diff -*-
-
-Tweak SSL build to find OpenSSL in workdir & not build it itself in "ssl.vcproj" etc.
-
-diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
---- python3.orig/PCbuild/pcbuild.sln 2017-08-09 23:39:15.511897077 +0200
-+++ python3/PCbuild/pcbuild.sln 2017-08-09 23:48:41.375890717 +0200
-@@ -86,10 +86,6 @@
- EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tk", "tk.vcxproj", "{7E85ECCF-A72C-4DA4-9E52-884508E80BA1}"
- EndProject
--Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libeay", "libeay.vcxproj", "{E5B04CC0-EB4C-42AB-B4DC-18EF95F864B0}"
--EndProject
--Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssleay", "ssleay.vcxproj", "{10615B24-73BF-4EFA-93AA-236916321317}"
--EndProject
- Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pyshellext", "pyshellext.vcxproj", "{0F6EE4A4-C75F-4578-B4B3-2D64F4B9B782}"
- EndProject
- Global
-diff -ru python3.orig/PCbuild/_ssl.vcxproj python3/PCbuild/_ssl.vcxproj
---- python3.orig/PCbuild/_ssl.vcxproj 2017-08-07 09:59:11.000000000 +0200
-+++ python3/PCbuild/_ssl.vcxproj 2017-08-09 23:50:36.871889419 +0200
-@@ -1,4 +1,4 @@
--<?xml version="1.0" encoding="utf-8"?>
-+<?xml version="1.0" encoding="utf-8"?>
- <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
-@@ -61,10 +61,10 @@
- </PropertyGroup>
- <ItemDefinitionGroup>
- <ClCompile>
-- <AdditionalIncludeDirectories>$(opensslIncludeDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-+ <AdditionalIncludeDirectories>$(WORKDIR)/UnpackedTarball/openssl/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
-- <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(OutDir)libeay$(PyDebugExt).lib;$(OutDir)ssleay$(PyDebugExt).lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>ws2_32.lib;crypt32.lib;$(WORKDIR)\UnpackedTarball\openssl\libcrypto.lib;$(WORKDIR)\UnpackedTarball\openssl\libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
-@@ -78,14 +78,6 @@
- <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
-- <ProjectReference Include="libeay.vcxproj">
-- <Project>{e5b04cc0-eb4c-42ab-b4dc-18ef95f864b0}</Project>
-- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-- </ProjectReference>
-- <ProjectReference Include="ssleay.vcxproj">
-- <Project>{10615b24-73bf-4efa-93aa-236916321317}</Project>
-- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-- </ProjectReference>
- <ProjectReference Include="_socket.vcxproj">
- <Project>{86937f53-c189-40ef-8ce8-8759d8e7d480}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
-diff -ru python3.orig/setup.py python3/setup.py
---- python3.orig/setup.py 2017-08-09 23:39:15.495897077 +0200
-+++ python3/setup.py 2017-08-09 23:53:06.891887733 +0200
-@@ -807,7 +807,10 @@
- exts.append( Extension('_socket', ['socketmodule.c'],
- depends = ['socketmodule.h']) )
- # Detect SSL support for the socket module (via _ssl)
-+ ooosslinc = os.environ.get('WORKDIR') + \
-+ '/UnpackedTarball/openssl/include/'
- search_for_ssl_incs_in = [
-+ ooosslinc,
- '/usr/local/ssl/include',
- '/usr/contrib/ssl/include/'
- ]
-@@ -819,8 +822,12 @@
- ['/usr/kerberos/include'])
- if krb5_h:
- ssl_incs += krb5_h
-+ ooossllib = os.environ.get('WORKDIR') + \
-+ '/UnpackedTarball/openssl'
-+ ooosslinc = ooosslinc + '/'
- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
-- ['/usr/local/ssl/lib',
-+ [ooossllib,
-+ '/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
- ] )
-
diff --git a/external/python3/python-3.5.tweak.strip.soabi.patch b/external/python3/python-3.5.tweak.strip.soabi.patch
index 48ac7f82f8be..4c2bb2bb9a29 100644
--- a/external/python3/python-3.5.tweak.strip.soabi.patch
+++ b/external/python3/python-3.5.tweak.strip.soabi.patch
@@ -1,7 +1,7 @@
diff -ru python3.orig/configure python3/configure
--- misc/python3.orig/configure 2015-07-26 21:14:31.127377193 +0200
+++ misc/python3/configure 2015-07-26 21:21:34.975405648 +0200
-@@ -14388,7 +14388,7 @@
+@@ -15229,7 +15229,7 @@
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1
new file mode 100644
index 000000000000..11d6f85aaffb
--- /dev/null
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -0,0 +1,26 @@
+No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
+
+--- python3/PCbuild/_ssl.vcxproj.orig2 2019-12-23 15:54:19.254298900 +0100
++++ python3/PCbuild/_ssl.vcxproj 2019-12-23 15:54:24.693251200 +0100
+@@ -99,9 +99,6 @@
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\Modules\_ssl.c" />
+- <ClCompile Include="$(opensslIncludeDir)\applink.c">
+- <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;$(PreprocessorDefinitions)</PreprocessorDefinitions>
+- </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="..\PC\python_nt.rc" />
+--- python3/PCbuild/openssl.props.orig 2019-12-23 16:20:34.588135900 +0100
++++ python3/PCbuild/openssl.props 2019-12-23 16:20:51.074001300 +0100
+@@ -11,8 +11,6 @@
+ </ItemDefinitionGroup>
+ <PropertyGroup>
+ <_DLLSuffix>-1_1</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ </PropertyGroup>
+ <ItemGroup>
+ <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
+
diff --git a/external/python3/python3-osx-avoid-new-10.13.patch.1 b/external/python3/python3-osx-avoid-new-10.13.patch.1
deleted file mode 100644
index 93bf5a078e01..000000000000
--- a/external/python3/python3-osx-avoid-new-10.13.patch.1
+++ /dev/null
@@ -1,61 +0,0 @@
--*- Mode: Diff -*-
-
---- python3/Modules/posixmodule.c
-+++ python3/Modules/posixmodule.c
-@@ -4565,12 +4565,12 @@
- } \
-
-
--#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
-+#if defined(HAVE_FUTIMESAT)
-
- static int
- utime_dir_fd(utime_t *ut, int dir_fd, char *path, int follow_symlinks)
- {
--#ifdef HAVE_UTIMENSAT
-+#if 0
- int flags = follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW;
- UTIME_TO_TIMESPEC;
- return utimensat(dir_fd, path, time, flags);
-@@ -4591,12 +4591,12 @@
- #define FUTIMENSAT_DIR_FD_CONVERTER dir_fd_unavailable
- #endif
-
--#if defined(HAVE_FUTIMES) || defined(HAVE_FUTIMENS)
-+#if defined(HAVE_FUTIMES)
-
- static int
- utime_fd(utime_t *ut, int fd)
- {
--#ifdef HAVE_FUTIMENS
-+#if 0
- UTIME_TO_TIMESPEC;
- return futimens(fd, time);
- #else
-@@ -4619,7 +4619,7 @@
- static int
- utime_nofollow_symlinks(utime_t *ut, char *path)
- {
--#ifdef HAVE_UTIMENSAT
-+#if 0
- UTIME_TO_TIMESPEC;
- return utimensat(DEFAULT_DIR_FD, path, time, AT_SYMLINK_NOFOLLOW);
- #else
-@@ -4635,7 +4635,7 @@
- static int
- utime_default(utime_t *ut, char *path)
- {
--#ifdef HAVE_UTIMENSAT
-+#if 0
- UTIME_TO_TIMESPEC;
- return utimensat(DEFAULT_DIR_FD, path, time, 0);
- #elif defined(HAVE_UTIMES)
-@@ -4836,7 +4836,7 @@
- else
- #endif
-
--#if defined(HAVE_FUTIMESAT) || defined(HAVE_UTIMENSAT)
-+#if defined(HAVE_FUTIMESAT)
- if ((dir_fd != DEFAULT_DIR_FD) || (!follow_symlinks))
- result = utime_dir_fd(&utime, dir_fd, path->narrow, follow_symlinks);
- else
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 36d2acf1c947..d44fbe055c86 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -1,25 +1,3 @@
---- Modules/_ctypes/libffi/src/x86/ffi64.c
-+++ Modules/_ctypes/libffi/src/x86/ffi64.c
-@@ -548,11 +548,15 @@
- tramp = (volatile unsigned short *) &closure->tramp[0];
-
- tramp[0] = 0xbb49; /* mov <code>, %r11 */
-- *((unsigned long long * volatile) &tramp[1])
-- = (unsigned long) ffi_closure_unix64;
-+ tramp[1] = (unsigned long) ffi_closure_unix64;
-+ tramp[2] = ((unsigned long) ffi_closure_unix64) >> 16;
-+ tramp[3] = ((unsigned long) ffi_closure_unix64) >> 32;
-+ tramp[4] = ((unsigned long) ffi_closure_unix64) >> 48;
- tramp[5] = 0xba49; /* mov <data>, %r10 */
-- *((unsigned long long * volatile) &tramp[6])
-- = (unsigned long) codeloc;
-+ tramp[6] = (unsigned long) codeloc;
-+ tramp[7] = ((unsigned long) codeloc) >> 16;
-+ tramp[8] = ((unsigned long) codeloc) >> 32;
-+ tramp[9] = ((unsigned long) codeloc) >> 48;
-
- /* Set the carry bit iff the function uses any sse registers.
- This is clc or stc, together with the first byte of the jmp. */
--- Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
+++ Modules/_ctypes/libffi_osx/x86/x86-ffi64.c
@@ -599,9 +599,15 @@
@@ -40,3 +18,26 @@
/* Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
+--- Modules/posixmodule.c
++++ Modules/posixmodule.c
+@@ -13998,6 +13998,9 @@
+ };
+
+ static int
++#if defined __clang__
++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in /usr/include/linux/memfd.h
++#endif
+ all_ins(PyObject *m)
+ {
+ #ifdef F_OK
+--- Objects/listobject.c
++++ Objects/listobject.c
+@@ -554,7 +554,7 @@
+ dest[i] = v;
+ }
+ src = b->ob_item;
+- dest = np->ob_item + Py_SIZE(a);
++ dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a);
+ for (i = 0; i < Py_SIZE(b); i++) {
+ PyObject *v = src[i];
+ Py_INCREF(v);
diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx
index d9e20cd05847..d4a760366626 100644
--- a/filter/source/xsltdialog/xmlfilterjar.hxx
+++ b/filter/source/xsltdialog/xmlfilterjar.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <memory>
#include <vector>
class filter_info_impl;
diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx
index 363bf94acc6e..d16474f27dce 100644
--- a/forms/source/component/EventThread.hxx
+++ b/forms/source/component/EventThread.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
+#include <memory>
#include <vector>
#include <com/sun/star/lang/XEventListener.hpp>
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index 6fd72e923bf0..a5f780d2326d 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -275,8 +275,11 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/)
be omitted or, if present, the time zone must be Coordinated Universal tools::Time (UTC)
indicated by a "Z".
*/
- DateTime aDateTime( DateTime::SYSTEM );
- OString aDateTimeString = makeDateTimeString(aDateTime);
+ OString aDateTimeString;
+ if (std::getenv("STABLE_FIELDS_HACK"))
+ aDateTimeString = makeDateTimeString(DateTime(DateTime::EMPTY));
+ else
+ aDateTimeString = makeDateTimeString(DateTime(DateTime::SYSTEM));
xmlChar *pString = static_cast<xmlChar*>(xmlMalloc(aDateTimeString.getLength()+1));
strncpy(reinterpret_cast<char*>(pString), aDateTimeString.getStr(), aDateTimeString.getLength());
pString[aDateTimeString.getLength()] = 0;
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 8069863ca503..f45be812e734 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -95,17 +95,14 @@ sal_uInt8 FormulaToken::GetParamCount() const
return 0; // parameters and specials
// ocIf... jump commands not for FAP, have cByte then
//2do: bool parameter whether FAP or not?
- else if ( GetByte() )
+ else if (GetByte())
return GetByte(); // all functions, also ocExternal and ocMacro
- else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP)
- return 2; // binary
- else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP)
- || eOp == ocPercentSign)
- return 1; // unary
+ else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP && eOp != ocAnd && eOp != ocOr)
+ return 2; // binary operators, compiler checked; OR and AND legacy but are functions
+ else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP) || eOp == ocPercentSign)
+ return 1; // unary operators, compiler checked
else if (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR)
return 0; // no parameter
- else if (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR)
- return 1; // one parameter
else if (FormulaCompiler::IsOpCodeJumpCommand( eOp ))
return 1; // only the condition counts as parameter
else
diff --git a/g b/g
index 746babe23539..dd95b737d492 100755
--- a/g
+++ b/g
@@ -10,9 +10,9 @@ fi
SUBMODULES_ALL="dictionaries helpcontent2 translations"
pushd $(dirname $0) > /dev/null
-if [ -f config_host.mk ] ; then
- # we are in the BUILDDIR
- SRC_ROOT=$(< config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//")
+if [ -f ${BUILDDIR}/config_host.mk ] ; then
+ # we are in the SRCDIR
+ SRC_ROOT=$(< ${BUILDDIR}/config_host.mk grep -a SRC_ROOT | sed -e "s/.*=//")
else
SRC_ROOT=$(pwd)
fi
@@ -138,8 +138,8 @@ get_active_submodules()
get_configured_submodules()
{
SUBMODULES_CONFIGURED=""
- if [ -f config_host.mk ] ; then
- SUBMODULES_CONFIGURED=$(< config_host.mk grep -a GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
+ if [ -f ${BUILDDIR}/config_host.mk ] ; then
+ SUBMODULES_CONFIGURED=$(< ${BUILDDIR}/config_host.mk grep -a GIT_NEEDED_SUBMODULES | sed -e "s/.*=//")
else
# if we need the configured submodule before the configuration is done. we assumed you want them all
SUBMODULES_CONFIGURED=${SUBMODULES_ALL?}
@@ -149,12 +149,12 @@ get_configured_submodules()
get_git_reference()
{
REFERENCED_GIT=""
- if [ -f config_host.mk ]; then
- REFERENCED_GIT=$(< config_host.mk grep -a GIT_REFERENCE_SRC | sed -e "s/.*=//")
+ if [ -f ${BUILDDIR}/config_host.mk ]; then
+ REFERENCED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a GIT_REFERENCE_SRC | sed -e "s/.*=//")
fi
LINKED_GIT=""
- if [ -f config_host.mk ]; then
- LINKED_GIT=$(< config_host.mk grep -a GIT_LINK_SRC | sed -e "s/.*=//")
+ if [ -f ${BUILDDIR}/config_host.mk ]; then
+ LINKED_GIT=$(< ${BUILDDIR}/config_host.mk grep -a GIT_LINK_SRC | sed -e "s/.*=//")
fi
}
diff --git a/include/svtools/imageresourceaccess.hxx b/include/svtools/imageresourceaccess.hxx
index 782091cf2cc3..21509310e8db 100644
--- a/include/svtools/imageresourceaccess.hxx
+++ b/include/svtools/imageresourceaccess.hxx
@@ -24,6 +24,8 @@
#include <com/sun/star/uno/Reference.hxx>
+#include <memory>
+
namespace com :: sun :: star :: io { class XInputStream; }
namespace com :: sun :: star :: uno { class XComponentContext; }
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
index 515f070717c8..432b0e1451d7 100644
--- a/include/svx/hexcolorcontrol.hxx
+++ b/include/svx/hexcolorcontrol.hxx
@@ -24,6 +24,8 @@
#include <tools/color.hxx>
#include <tools/link.hxx>
+#include <memory>
+
namespace weld { class Entry; }
struct ImplSVEvent;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index a897b797694d..3d289d5af84e 100644
--- a/include/svx/svdoole2.hxx
+++ b/include/svx/svdoole2.hxx
@@ -42,6 +42,7 @@ namespace frame { class XModel; }
namespace svt { class EmbeddedObjectRef; }
class SdrOle2ObjImpl;
+class SvxOle2Shape;
class SVX_DLLPUBLIC SdrOle2Obj : public SdrRectObj
{
@@ -49,7 +50,7 @@ private:
std::unique_ptr<SdrOle2ObjImpl> mpImpl;
private:
- SVX_DLLPRIVATE void Connect_Impl();
+ SVX_DLLPRIVATE void Connect_Impl(SvxOle2Shape* pCreator = nullptr);
SVX_DLLPRIVATE void Disconnect_Impl();
SVX_DLLPRIVATE void AddListeners_Impl();
SVX_DLLPRIVATE void RemoveListeners_Impl();
@@ -105,7 +106,7 @@ public:
// OLE object has got a separate PersistName member now;
// !!! use ::SetPersistName( ... ) only, if you know what you do !!!
const OUString& GetPersistName() const;
- void SetPersistName( const OUString& rPersistName );
+ void SetPersistName( const OUString& rPersistName, SvxOle2Shape* pCreator = nullptr );
// One can add an application name to a SdrOle2Obj, which can be queried for
// later on (SD needs this for presentation objects).
@@ -153,7 +154,7 @@ public:
sal_Int64 nAspect );
static bool Unload( const css::uno::Reference< css::embed::XEmbeddedObject >& xObj, sal_Int64 nAspect );
bool Unload();
- void Connect();
+ void Connect(SvxOle2Shape* pCreator = nullptr);
void Disconnect();
void ObjectLoaded();
@@ -200,6 +201,16 @@ public:
void Connect() { GetRealObject(); }
};
+class SVX_DLLPUBLIC SdrIFrameLink final : public sfx2::SvBaseLink
+{
+ SdrOle2Obj* m_pObject;
+
+public:
+ explicit SdrIFrameLink(SdrOle2Obj* pObject);
+ virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const OUString& rMimeType, const css::uno::Any & rValue ) override;
+};
+
#endif // INCLUDED_SVX_SVDOOLE2_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 60917bf7d893..6bbbe5b56502 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -605,6 +605,8 @@ public:
bool createObject( const SvGlobalName &aClassName );
void createLink( const OUString& aLinkURL );
+
+ virtual OUString GetAndClearInitialFrameURL();
};
diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index 2a064951c447..3686e5fcb508 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -25,6 +25,8 @@
#include <vcl/ColorMask.hxx>
#include <vcl/Scanline.hxx>
+#include <memory>
+
struct SalTwoRect;
struct VCL_DLLPUBLIC BitmapBuffer
diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx
index 4e782aa7a437..2a63e47a8c9b 100644
--- a/include/vcl/button.hxx
+++ b/include/vcl/button.hxx
@@ -297,7 +297,7 @@ private:
const Size& rImageSize, tools::Rectangle& rStateRect,
tools::Rectangle& rMouseRect );
SAL_DLLPRIVATE void ImplDrawRadioButton(vcl::RenderContext& rRenderContext );
- SAL_DLLPRIVATE void ImplUncheckAllOther( const bool bSetStyle = true);
+ SAL_DLLPRIVATE void ImplUncheckAllOther();
SAL_DLLPRIVATE Size ImplGetRadioImageSize() const;
SAL_DLLPRIVATE long ImplGetImageToTextDistance() const;
diff --git a/include/vcl/font/Feature.hxx b/include/vcl/font/Feature.hxx
index b56ce19ba194..4b7b0b5af843 100644
--- a/include/vcl/font/Feature.hxx
+++ b/include/vcl/font/Feature.hxx
@@ -13,6 +13,7 @@
#include <vcl/dllapi.h>
#include <rtl/ustring.hxx>
#include <vector>
+#include <cstdint>
namespace vcl
{
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index 661caf863a22..a008613fce25 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -114,6 +114,7 @@ public:
void Move( long nX, long nY );
// additional Move method getting specifics how to handle MapMode( MapUnit::MapPixel )
void Move( long nX, long nY, long nDPIX, long nDPIY );
+ void ScaleActions(double fScaleX, double fScaleY);
void Scale( double fScaleX, double fScaleY );
void Scale( const Fraction& rScaleX, const Fraction& rScaleY );
void Rotate( long nAngle10 );
diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx
index ad9ce09a20cb..0af2ae14a32c 100644
--- a/io/source/acceptor/acc_pipe.cxx
+++ b/io/source/acceptor/acc_pipe.cxx
@@ -27,6 +27,8 @@
#include <osl/mutex.hxx>
#include <cppuhelper/implbase.hxx>
+#include <memory>
+
using namespace ::osl;
using namespace ::cppu;
using namespace ::com::sun::star::uno;
diff --git a/io/source/acceptor/acc_socket.cxx b/io/source/acceptor/acc_socket.cxx
index ba6938928bbe..8f0614d82212 100644
--- a/io/source/acceptor/acc_socket.cxx
+++ b/io/source/acceptor/acc_socket.cxx
@@ -20,6 +20,7 @@
#include "acceptor.hxx"
#include <unordered_set>
+#include <memory>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
diff --git a/io/source/connector/connector.cxx b/io/source/connector/connector.cxx
index cee46004506d..fb0f703abdb2 100644
--- a/io/source/connector/connector.cxx
+++ b/io/source/connector/connector.cxx
@@ -34,6 +34,8 @@
#include <services.hxx>
#include "connector.hxx"
+#include <memory>
+
#define IMPLEMENTATION_NAME "com.sun.star.comp.io.Connector"
#define SERVICE_NAME "com.sun.star.connection.Connector"
diff --git a/pyuno/inc/pyuno.hxx b/pyuno/inc/pyuno.hxx
index 1d1fa7750879..ebd7fc45e864 100644
--- a/pyuno/inc/pyuno.hxx
+++ b/pyuno/inc/pyuno.hxx
@@ -277,6 +277,7 @@ public:
class LO_DLLPUBLIC_PYUNO PyThreadAttach
{
PyThreadState *tstate;
+ bool m_isNewState;
PyThreadAttach ( const PyThreadAttach & ) = delete;
PyThreadAttach & operator = ( const PyThreadAttach & ) = delete;
public:
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index 938d53814545..477c8a3a318a 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -230,10 +230,12 @@ PythonInit() {
PyThreadState *tstate = PyThreadState_Get();
PyEval_ReleaseThread( tstate );
+#if PY_VERSION_HEX < 0x030B0000
// This tstate is never used again, so delete it here.
// This prevents an assertion in PyThreadState_Swap on the
// PyThreadAttach below.
PyThreadState_Delete(tstate);
+#endif
}
}
};
diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index e59319030eb8..2b17f0c73eac 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -338,13 +338,14 @@ static int lcl_PySlice_GetIndicesEx( PyObject *pObject, sal_Int32 nLen, sal_Int3
{
Py_ssize_t nStart_ssize, nStop_ssize, nStep_ssize, nSliceLength_ssize;
- int nResult = PySlice_GetIndicesEx(
+ int nResult =
#if PY_VERSION_HEX >= 0x030200f0
- pObject,
+ PySlice_GetIndicesEx(pObject,
+ nLen, &nStart_ssize, &nStop_ssize, &nStep_ssize, &nSliceLength_ssize );
#else
- reinterpret_cast<PySliceObject*>(pObject),
-#endif
+ PySlice_GetIndicesEx(reinterpret_cast<PySliceObject*>(pObject),
nLen, &nStart_ssize, &nStop_ssize, &nStep_ssize, &nSliceLength_ssize );
+#endif
if (nResult == -1)
return -1;
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx
index d307f9af363c..5b10bede5275 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -977,8 +977,21 @@ Any Runtime::extractUnoException( const PyRef & excType, const PyRef &excValue,
PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
+ : m_isNewState(false)
{
- tstate = PyThreadState_New( interp );
+ // note: *may* be called recursively, with PyThreadDetach between - in
+ // that case, don't create *new* PyThreadState but reuse!
+#ifndef NDEBUG
+ PyThreadState const*const current = _PyThreadState_UncheckedGet();
+ // dereference isn't safe but let's hope it's tolerable for debugging purpose
+ assert((current == nullptr || current->thread_id != PyThread_get_thread_ident()) && "recursive PyThreadAttach");
+#endif
+ tstate = PyGILState_GetThisThreadState(); // from TLS, possibly detached
+ if (!tstate)
+ {
+ m_isNewState = true;
+ tstate = PyThreadState_New( interp );
+ }
if( !tstate )
throw RuntimeException( "Couldn't create a pythreadstate" );
PyEval_AcquireThread( tstate);
@@ -986,9 +999,19 @@ PyThreadAttach::PyThreadAttach( PyInterpreterState *interp)
PyThreadAttach::~PyThreadAttach()
{
- PyThreadState_Clear( tstate );
- PyEval_ReleaseThread( tstate );
- PyThreadState_Delete( tstate );
+ if (m_isNewState)
+ { // Clear needs GIL!
+ PyThreadState_Clear( tstate );
+ }
+ if (m_isNewState)
+ { // note: PyThreadState_Delete(tstate) cannot be called, it will assert
+ // because it requires a PyThreadState to be set, but not the tstate!
+ PyThreadState_DeleteCurrent();
+ }
+ else
+ {
+ PyEval_ReleaseThread( tstate );
+ }
}
PyThreadDetach::PyThreadDetach()
diff --git a/readlicense_oo/license/license.xml b/readlicense_oo/license/license.xml
index d211b18b1692..1c2a3d4b6290 100644
--- a/readlicense_oo/license/license.xml
+++ b/readlicense_oo/license/license.xml
@@ -1686,6 +1686,29 @@
ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.</p>
</div>
+ <div class ="LIBFFI">
+ <h2>libffi</h2>
+ <p>The following software may be included in this product: libffi</p>
+ <p>The libffi project code is covered by the MIT license:</p>
+ <p>libffi - Copyright (c) 1996-2019 Anthony Green, Red Hat, Inc and others.</p>
+ <p>See source files for details.</p>
+ <p>Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ ``Software''), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:</p>
+ <p>The above copyright notice and this permission notice shall be
+ included in all copies or substantial portions of the Software.</p>
+ <p>THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
+ </div>
<div class="PYTHON">
<h2>Python</h2>
<p>The following software may be included in this product: Python. Use of any of this software is governed by
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 398fe707f86f..0840d599cbe1 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -235,6 +235,7 @@ private:
inline bool MustHaveParamCount( short nAct, short nMust );
inline bool MustHaveParamCount( short nAct, short nMust, short nMax );
inline bool MustHaveParamCountMin( short nAct, short nMin );
+ inline bool MustHaveParamCountMinWithStackCheck( short nAct, short nMin );
void PushParameterExpected();
void PushIllegalParameter();
void PushIllegalArgument();
@@ -1081,6 +1082,17 @@ inline bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
return false;
}
+inline bool ScInterpreter::MustHaveParamCountMinWithStackCheck( short nAct, short nMin )
+{
+ assert(sp >= nAct);
+ if (sp < nAct)
+ {
+ PushParameterExpected();
+ return false;
+ }
+ return MustHaveParamCountMin( nAct, nMin);
+}
+
inline bool ScInterpreter::CheckStringPositionArgument( double & fVal )
{
if (!rtl::math::isFinite( fVal))
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index a624307dedd6..bdb83af166af 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7522,7 +7522,7 @@ void ScInterpreter::ScVLookup()
void ScInterpreter::ScSubTotal()
{
sal_uInt8 nParamCount = GetByte();
- if ( MustHaveParamCountMin( nParamCount, 2 ) )
+ if ( MustHaveParamCountMinWithStackCheck( nParamCount, 2 ) )
{
// We must fish the 1st parameter deep from the stack! And push it on top.
const FormulaToken* p = pStack[ sp - nParamCount ];
@@ -7569,7 +7569,7 @@ void ScInterpreter::ScSubTotal()
void ScInterpreter::ScAggregate()
{
sal_uInt8 nParamCount = GetByte();
- if ( MustHaveParamCountMin( nParamCount, 3 ) )
+ if ( MustHaveParamCountMinWithStackCheck( nParamCount, 3 ) )
{
// fish the 1st parameter from the stack and push it on top.
const FormulaToken* p = pStack[ sp - nParamCount ];
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 414237b369b3..7596fec7c72d 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3473,7 +3473,7 @@ void ScInterpreter::ScPercentile( bool bInclusive )
GetNumberSequenceArray( 1, aArray, false );
if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
- SetError( FormulaError::NoValue );
+ PushNoValue();
return;
}
if ( bInclusive )
@@ -3496,7 +3496,7 @@ void ScInterpreter::ScQuartile( bool bInclusive )
GetNumberSequenceArray( 1, aArray, false );
if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
- SetError( FormulaError::NoValue );
+ PushNoValue();
return;
}
if ( bInclusive )
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index bb6583a2c460..e5cfbcb02b09 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3985,7 +3985,15 @@ StackVar ScInterpreter::Interpret()
else if (sp >= pCur->GetParamCount())
nStackBase = sp - pCur->GetParamCount();
else
- nStackBase = sp; // underflow?!?
+ {
+ SAL_WARN("sc.core", "Stack anomaly at " << aPos.Format(
+ ScRefFlags::VALID | ScRefFlags::FORCE_DOC | ScRefFlags::TAB_3D, pDok)
+ << " eOp: " << static_cast<int>(eOp)
+ << " params: " << static_cast<int>(pCur->GetParamCount())
+ << " nStackBase: " << nStackBase << " sp: " << sp);
+ nStackBase = sp;
+ assert(!"underflow");
+ }
}
switch( eOp )
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index 479d1b0e56b2..7021e9fecd26 100644
--- a/sc/source/ui/docshell/documentlinkmgr.cxx
+++ b/sc/source/ui/docshell/documentlinkmgr.cxx
@@ -142,7 +142,7 @@ bool DocumentLinkManager::hasDdeOrOleOrWebServiceLinks(bool bDde, bool bOle, boo
sfx2::SvBaseLink* pBase = rLink.get();
if (bDde && dynamic_cast<ScDdeLink*>(pBase))
return true;
- if (bOle && dynamic_cast<SdrEmbedObjectLink*>(pBase))
+ if (bOle && (dynamic_cast<SdrEmbedObjectLink*>(pBase) || dynamic_cast<SdrIFrameLink*>(pBase)))
return true;
if (bWebService && dynamic_cast<ScWebServiceLink*>(pBase))
return true;
@@ -173,6 +173,13 @@ bool DocumentLinkManager::updateDdeOrOleOrWebServiceLinks(weld::Window* pWin)
continue;
}
+ SdrIFrameLink* pIFrameLink = dynamic_cast<SdrIFrameLink*>(pBase);
+ if (pIFrameLink)
+ {
+ pIFrameLink->Update();
+ continue;
+ }
+
ScWebServiceLink* pWebserviceLink = dynamic_cast<ScWebServiceLink*>(pBase);
if (pWebserviceLink)
{
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 427a6c58109e..922bf064f571 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -828,9 +828,6 @@ void PDFOutDev::updateFont(GfxState *state)
aEsc.data() );
}
printf( "\n" );
-
- if( nEmbedSize )
- writeFontFile(gfxFont);
}
void PDFOutDev::updateRender(GfxState *state)
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index f0fcfbe64dc2..12ea3b104a20 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -38,6 +38,7 @@
#include <svtools/miscopt.hxx>
#include <svl/ownlist.hxx>
#include <svl/itemprop.hxx>
+#include <sfx2/docfile.hxx>
#include <sfx2/frmdescr.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/sfxdlg.hxx>
@@ -166,41 +167,59 @@ sal_Bool SAL_CALL IFrameObject::load(
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
xTrans->parseStrict( aTargetURL );
- if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro)
- {
- uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
- SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- if (pDoc && !pDoc->AdjustMacroMode())
- return false;
- }
+ INetURLObject aURLObject(aTargetURL.Complete);
+ if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script"))
+ return false;
- DBG_ASSERT( !mxFrame.is(), "Frame already existing!" );
- VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
- VclPtr<IFrameWindow_Impl> pWin = VclPtr<IFrameWindow_Impl>::Create( pParent, maFrmDescr.IsFrameBorderOn() );
- pWin->SetSizePixel( pParent->GetOutputSizePixel() );
- pWin->SetBackground();
- pWin->Show();
+ uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
+ SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
- xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
+ bool bUpdateAllowed(true);
+ if (pDoc)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer();
+ bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
+ if (!bUpdateAllowed)
+ return false;
- // we must destroy the IFrame before the parent is destroyed
- xWindow->addEventListener( this );
+ OUString sReferer;
+ if (pDoc && pDoc->HasName())
+ sReferer = pDoc->GetMedium()->GetName();
- mxFrame = frame::Frame::create( mxContext );
- uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
- mxFrame->initialize( xWin );
- mxFrame->setName( maFrmDescr.GetName() );
+ uno::Reference<css::awt::XWindow> xParentWindow(xFrame->getContainerWindow());
- uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY );
- if ( xFramesSupplier.is() )
- mxFrame->setCreator( xFramesSupplier );
+ if (!mxFrame.is())
+ {
+ VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow(xParentWindow);
+ VclPtr<IFrameWindow_Impl> pWin = VclPtr<IFrameWindow_Impl>::Create( pParent, maFrmDescr.IsFrameBorderOn() );
+ pWin->SetSizePixel( pParent->GetOutputSizePixel() );
+ pWin->SetBackground();
+ pWin->Show();
+
+ uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
+ xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
+
+ // we must destroy the IFrame before the parent is destroyed
+ xWindow->addEventListener( this );
+
+ mxFrame = frame::Frame::create( mxContext );
+ uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
+ mxFrame->initialize( xWin );
+ mxFrame->setName( maFrmDescr.GetName() );
+
+ uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY );
+ if ( xFramesSupplier.is() )
+ mxFrame->setCreator( xFramesSupplier );
+ }
- uno::Sequence < beans::PropertyValue > aProps(2);
+ uno::Sequence < beans::PropertyValue > aProps(3);
aProps[0].Name = "PluginMode";
aProps[0].Value <<= sal_Int16(2);
aProps[1].Name = "ReadOnly";
aProps[1].Value <<= true;
+ aProps[2].Name = "Referer";
+ aProps[2].Value <<= sReferer;
uno::Reference < frame::XDispatch > xDisp = mxFrame->queryDispatch( aTargetURL, "_self", 0 );
if ( xDisp.is() )
xDisp->dispatch( aTargetURL, aProps );
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 353161ef9a8e..d68830211d5d 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3136,22 +3136,23 @@ public:
void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame::XController2 >& xController )
{
- // object already disposed?
- if ( impl_isDisposed() )
+ if (aName.isEmpty())
+ {
+ SAL_WARN("sfx.doc", "postEvent_Impl: Empty event name!");
return;
-
- // keep m_pData alive, if notified target would dispose the document
- std::shared_ptr<IMPL_SfxBaseModel_DataContainer> pData(m_pData);
+ }
// also make sure this object doesn't self-destruct while notifying
- rtl::Reference<SfxBaseModel> self(this);
+ rtl::Reference<SfxBaseModel> xHoldAlive(this);
+ // keep m_pData alive, if notified target would dispose the document
+ std::shared_ptr<IMPL_SfxBaseModel_DataContainer> xKeepAlive(m_pData);
- DBG_ASSERT( !aName.isEmpty(), "Empty event name!" );
- if (aName.isEmpty())
+ // object already disposed?
+ if ( impl_isDisposed() )
return;
::cppu::OInterfaceContainerHelper* pIC =
- m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XDocumentEventListener>::get());
+ xKeepAlive->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XDocumentEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxDocumentEvent: " + aName);
@@ -3164,7 +3165,7 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
aDocumentEvent ) );
}
- pIC = m_pData->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get());
+ pIC = xKeepAlive->m_aInterfaceContainer.getContainer( cppu::UnoType<document::XEventListener>::get());
if ( pIC )
{
SAL_INFO("sfx.doc", "SfxEvent: " + aName);
@@ -3176,7 +3177,6 @@ void SfxBaseModel::postEvent_Impl( const OUString& aName, const Reference< frame
&document::XEventListener::notifyEvent,
aEvent ) );
}
-
}
Reference < container::XIndexAccess > SAL_CALL SfxBaseModel::getViewData()
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 88b0d7e91969..37fac861677a 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -69,10 +69,10 @@
"type": "shell"
},
{
- "url": "https://dev-www.libreoffice.org/src/pdfium-4306.tar.bz2",
- "sha256": "eca406d47ac7e2a84dcc86f93c08f96e591d409589e881477fa75e488e4851d8",
+ "url": "https://dev-www.libreoffice.org/src/pdfium-4643.tar.bz2",
+ "sha256": "eb98a77eaaab9e9e8de541cfd18b9438dd3c538bd5ef163820353179727f5dc9",
"type": "file",
- "dest-filename": "external/tarballs/pdfium-4306.tar.bz2"
+ "dest-filename": "external/tarballs/pdfium-4643.tar.bz2"
},
{
"url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz",
diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py
index e170709fb79c..7a5ce193684b 100644
--- a/solenv/gdb/libreoffice/sw.py
+++ b/solenv/gdb/libreoffice/sw.py
@@ -8,6 +8,7 @@
#
import six
+import gdb
from libreoffice.util import printing
class SwPositionPrinter(object):
@@ -194,7 +195,10 @@ class BigPtrArrayPrinter(object):
class _iterator(six.Iterator):
def __init__(self, array):
- self.blocks = array['m_ppInf']['_M_t']['_M_t']['_M_head_impl']
+ # libstdc++ unique_ptr is a std::tuple which contains multiple
+ # _M_head_impl members and gdb may pick the wrong one by default
+ # so have to manually cast it to the one that contains the array
+ self.blocks = array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0, BlockInfo**, false>"))['_M_head_impl']
self.count = array['m_nSize']
self.pos = 0
self.block_count = array['m_nBlock']
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index ef0214ba61c3..af97164c1090 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -28,6 +28,8 @@
#include <osl/mutex.hxx>
+#include <memory>
+
namespace com::sun::star::container { class XNameAccess; }
namespace com::sun::star::io { class XInputStream; }
namespace com::sun::star::io { class XStream; }
diff --git a/svtools/source/contnr/contentenumeration.hxx b/svtools/source/contnr/contentenumeration.hxx
index affa2b6eb9cb..0c653a31147b 100644
--- a/svtools/source/contnr/contentenumeration.hxx
+++ b/svtools/source/contnr/contentenumeration.hxx
@@ -29,6 +29,8 @@
#include <vcl/image.hxx>
+#include <memory>
+
namespace svt
{
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index c4d6f49c5db0..5fd8f977f8e6 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -77,6 +77,8 @@
#include <sdr/contact/viewcontactofsdrole2obj.hxx>
#include <svx/svdograf.hxx>
#include <sdr/properties/oleproperties.hxx>
+#include <svx/unoshape.hxx>
+#include <svx/xlineit0.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xbtmpit.hxx>
#include <svx/xflbmtit.hxx>
@@ -595,6 +597,35 @@ void SdrEmbedObjectLink::Closed()
SvBaseLink::Closed();
}
+SdrIFrameLink::SdrIFrameLink(SdrOle2Obj* pObject)
+ : ::sfx2::SvBaseLink(::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB)
+ , m_pObject(pObject)
+{
+ SetSynchron( false );
+}
+
+::sfx2::SvBaseLink::UpdateResult SdrIFrameLink::DataChanged(
+ const OUString&, const uno::Any& )
+{
+ uno::Reference<embed::XEmbeddedObject> xObject = m_pObject->GetObjRef();
+ uno::Reference<embed::XCommonEmbedPersist> xPersObj(xObject, uno::UNO_QUERY);
+ if (xPersObj.is())
+ {
+ // let the IFrameObject reload the link
+ try
+ {
+ xPersObj->reload(uno::Sequence<beans::PropertyValue>(), uno::Sequence<beans::PropertyValue>());
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ m_pObject->SetChanged();
+ }
+
+ return SUCCESS;
+}
+
class SdrOle2ObjImpl
{
public:
@@ -612,7 +643,7 @@ public:
bool mbLoadingOLEObjectFailed:1; // New local var to avoid repeated loading if load of OLE2 fails
bool mbConnected:1;
- SdrEmbedObjectLink* mpObjectLink;
+ sfx2::SvBaseLink* mpObjectLink;
OUString maLinkURL;
rtl::Reference<SvxUnoShapeModifyListener> mxModifyListener;
@@ -812,7 +843,7 @@ bool SdrOle2Obj::IsEmpty() const
return !mpImpl->mxObjRef.is();
}
-void SdrOle2Obj::Connect()
+void SdrOle2Obj::Connect(SvxOle2Shape* pCreator)
{
if( IsEmptyPresObj() )
return;
@@ -825,7 +856,7 @@ void SdrOle2Obj::Connect()
return;
}
- Connect_Impl();
+ Connect_Impl(pCreator);
AddListeners_Impl();
}
@@ -922,39 +953,66 @@ void SdrOle2Obj::DisconnectFileLink_Impl()
void SdrOle2Obj::CheckFileLink_Impl()
{
- if (mpImpl->mxObjRef.GetObject().is() && !mpImpl->mpObjectLink)
+ if (!(mpImpl->mxObjRef.GetObject().is() && !mpImpl->mpObjectLink))
+ return;
+
+ try
{
- try
- {
- uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
+ uno::Reference<embed::XEmbeddedObject> xObject = mpImpl->mxObjRef.GetObject();
+ if (!xObject)
+ return;
+
+ bool bIFrame = false;
- if ( xLinkSupport.is() && xLinkSupport->isLink() )
+ OUString aLinkURL;
+ uno::Reference<embed::XLinkageSupport> xLinkSupport(xObject, uno::UNO_QUERY);
+ if (xLinkSupport)
+ {
+ if (xLinkSupport->isLink())
+ aLinkURL = xLinkSupport->getLinkURL();
+ }
+ else
+ {
+ // get IFrame (Floating Frames) listed and updatable from the
+ // manage links dialog
+ SvGlobalName aClassId(xObject->getClassID());
+ if (aClassId == SvGlobalName(SO3_IFRAME_CLASSID))
{
- OUString aLinkURL = xLinkSupport->getLinkURL();
+ uno::Reference<beans::XPropertySet> xSet(xObject->getComponent(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->getPropertyValue("FrameURL") >>= aLinkURL;
+ bIFrame = true;
+ }
+ }
- if ( !aLinkURL.isEmpty() )
- {
- // this is a file link so the model link manager should handle it
- sfx2::LinkManager* pLinkManager(getSdrModelFromSdrObject().GetLinkManager());
+ if (!aLinkURL.isEmpty()) // this is a file link so the model link manager should handle it
+ {
+ sfx2::LinkManager* pLinkManager(getSdrModelFromSdrObject().GetLinkManager());
- if ( pLinkManager )
- {
- mpImpl->mpObjectLink = new SdrEmbedObjectLink( this );
- mpImpl->maLinkURL = aLinkURL;
- pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
- mpImpl->mpObjectLink->Connect();
- }
+ if ( pLinkManager )
+ {
+ SdrEmbedObjectLink* pEmbedObjectLink = nullptr;
+ if (!bIFrame)
+ {
+ pEmbedObjectLink = new SdrEmbedObjectLink(this);
+ mpImpl->mpObjectLink = pEmbedObjectLink;
}
+ else
+ mpImpl->mpObjectLink = new SdrIFrameLink(this);
+ mpImpl->maLinkURL = aLinkURL;
+ pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
+ if (pEmbedObjectLink)
+ pEmbedObjectLink->Connect();
}
}
- catch (const css::uno::Exception& e)
- {
- SAL_WARN("svx", "SdrOle2Obj::CheckFileLink_Impl(), " << e);
- }
+ }
+ catch (const css::uno::Exception& e)
+ {
+ SAL_WARN("svx", "SdrOle2Obj::CheckFileLink_Impl(), " << e);
}
}
-void SdrOle2Obj::Connect_Impl()
+void SdrOle2Obj::Connect_Impl(SvxOle2Shape* pCreator)
{
if(!mpImpl->aPersistName.isEmpty() )
{
@@ -994,6 +1052,17 @@ void SdrOle2Obj::Connect_Impl()
}
}
+ if (pCreator)
+ {
+ OUString sFrameURL(pCreator->GetAndClearInitialFrameURL());
+ if (!sFrameURL.isEmpty() && svt::EmbeddedObjectRef::TryRunningState(mpImpl->mxObjRef.GetObject()))
+ {
+ uno::Reference<beans::XPropertySet> xSet(mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->setPropertyValue("FrameURL", uno::Any(sFrameURL));
+ }
+ }
+
if ( mpImpl->mxObjRef.is() )
{
if ( !mpImpl->mxLightClient.is() )
@@ -1313,14 +1382,14 @@ SdrObject* SdrOle2Obj::getFullDragClone() const
return createSdrGrafObjReplacement(false);
}
-void SdrOle2Obj::SetPersistName( const OUString& rPersistName )
+void SdrOle2Obj::SetPersistName( const OUString& rPersistName, SvxOle2Shape* pCreator )
{
DBG_ASSERT( mpImpl->aPersistName.isEmpty(), "Persist name changed!");
mpImpl->aPersistName = rPersistName;
mpImpl->mbLoadingOLEObjectFailed = false;
- Connect();
+ Connect(pCreator);
SetChanged();
}
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index f1dfe60082f9..514de3358f7f 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -769,7 +769,7 @@ void ImpSdrPdfImport::ImportForm(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
const Matrix aOldMatrix = mCurMatrix;
FS_MATRIX matrix;
- FPDFFormObj_GetMatrix(pPageObject, &matrix);
+ FPDFPageObj_GetMatrix(pPageObject, &matrix);
mCurMatrix = Matrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
const int nCount = FPDFFormObj_CountObjects(pPageObject);
@@ -799,7 +799,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
return;
FS_MATRIX matrix;
- FPDFTextObj_GetMatrix(pPageObject, &matrix);
+ FPDFPageObj_GetMatrix(pPageObject, &matrix);
Matrix aTextMatrix(mCurMatrix);
aTextMatrix.Transform(left, right, top, bottom);
@@ -808,7 +808,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
const int nChars = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
std::unique_ptr<sal_Unicode[]> pText(new sal_Unicode[nChars]);
- const int nActualChars = FPDFTextObj_GetText(pPageObject, pTextPage, pText.get(), nChars);
+ const int nActualChars = FPDFTextObj_GetText(
+ pPageObject, pTextPage, reinterpret_cast<FPDF_WCHAR*>(pText.get()), nChars);
if (nActualChars <= 0)
{
return;
@@ -816,7 +817,8 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
OUString sText(pText.get(), nActualChars);
- const double dFontSize = FPDFTextObj_GetFontSize(pPageObject);
+ float dFontSize{};
+ FPDFTextObj_GetFontSize(pPageObject, &dFontSize);
double dFontSizeH = fabs(sqrt2(matrix.a, matrix.c) * dFontSize);
double dFontSizeV = fabs(sqrt2(matrix.b, matrix.d) * dFontSize);
dFontSizeH = lcl_PointToPixel(dFontSizeH);
@@ -835,8 +837,7 @@ void ImpSdrPdfImport::ImportText(FPDF_PAGEOBJECT pPageObject, FPDF_TEXTPAGE pTex
const int nFontName = 80 + 1;
std::unique_ptr<char[]> pFontName(new char[nFontName]); // + terminating null
- char* pCharFontName = reinterpret_cast<char*>(pFontName.get());
- int nFontNameChars = FPDFTextObj_GetFontName(pPageObject, pCharFontName, nFontName);
+ int nFontNameChars = FPDFTextObj_GetFontSize(pPageObject, &dFontSize);
if (nFontName >= nFontNameChars)
{
OUString sFontName = OUString::createFromAscii(pFontName.get());
@@ -1035,7 +1036,7 @@ void ImpSdrPdfImport::ImportImage(FPDF_PAGEOBJECT pPageObject, int /*nPageObject
void ImpSdrPdfImport::ImportPath(FPDF_PAGEOBJECT pPageObject, int /*nPageObjectIndex*/)
{
FS_MATRIX matrix;
- FPDFPath_GetMatrix(pPageObject, &matrix);
+ FPDFPageObj_GetMatrix(pPageObject, &matrix);
Matrix aPathMatrix(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f);
aPathMatrix.Concatinate(mCurMatrix);
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
index 8407b084dbdc..003e930de45b 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx
@@ -31,6 +31,7 @@
#include <comphelper/interfacecontainer2.hxx>
#include <vcl/vclptr.hxx>
+#include <memory>
namespace textconversiondlgs
{
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index 9b0a713184fa..23a886036f32 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -62,8 +62,11 @@ public:
virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
};
+
class SvxFrameShape : public SvxOle2Shape
{
+private:
+ OUString m_sInitialFrameURL;
protected:
// override these for special property handling in subcasses. Return true if property is handled
virtual bool setPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, const css::uno::Any& rValue ) override;
@@ -80,6 +83,8 @@ public:
virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) override;
virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
+
+ virtual OUString GetAndClearInitialFrameURL() override;
};
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 158b8f2e1cce..2187285547ef 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -180,7 +180,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
#else
pOle = static_cast<SdrOle2Obj*>(GetSdrObject());
#endif
- pOle->SetPersistName( aPersistName );
+ pOle->SetPersistName( aPersistName, this );
return true;
}
break;
@@ -501,10 +501,11 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL )
void SvxOle2Shape::resetModifiedState()
{
- ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist();
+ SdrObject* pObject = GetSdrObject();
+ ::comphelper::IEmbeddedHelper* pPersist = pObject ? pObject->getSdrModelFromSdrObject().GetPersist() : nullptr;
if( pPersist && !pPersist->isEnableSetModified() )
{
- SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
+ SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >(pObject);
if( pOle && !pOle->IsEmpty() )
{
uno::Reference < util::XModifiable > xMod( pOle->GetObjRef(), uno::UNO_QUERY );
@@ -554,6 +555,11 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(OUString& rHexCLSID)
return aClassName;
}
+OUString SvxOle2Shape::GetAndClearInitialFrameURL()
+{
+ return OUString();
+}
+
SvxAppletShape::SvxAppletShape(SdrObject* pObject)
: SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) )
{
@@ -707,8 +713,19 @@ SvxFrameShape::~SvxFrameShape() throw()
{
}
+OUString SvxFrameShape::GetAndClearInitialFrameURL()
+{
+ OUString sRet(m_sInitialFrameURL);
+ m_sInitialFrameURL.clear();
+ return sRet;
+}
+
void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
+ uno::Reference<beans::XPropertySet> xSet(static_cast<OWeakObject *>(this), uno::UNO_QUERY);
+ if (xSet)
+ xSet->getPropertyValue("FrameURL") >>= m_sInitialFrameURL;
+
SvxShape::Create( pNewObj, pNewPage );
const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID );
createObject(aIFrameClassId);
diff --git a/sw/CppunitTest_sw_core_crsr.mk b/sw/CppunitTest_sw_core_crsr.mk
new file mode 100644
index 000000000000..00c90bba69b4
--- /dev/null
+++ b/sw/CppunitTest_sw_core_crsr.mk
@@ -0,0 +1,73 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_crsr))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_crsr))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_crsr, \
+ sw/qa/core/crsr/crsr \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_crsr, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ svxcore \
+ sw \
+ test \
+ unotest \
+ utl \
+ vcl \
+ svt \
+ tl \
+ svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_crsr,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_crsr,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/extras/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_crsr,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_crsr))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_crsr))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_crsr,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_crsr,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_crsr))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_crsr, \
+ modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_crsr))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/IwyuFilter_sw.yaml b/sw/IwyuFilter_sw.yaml
index 69aa7bf7de09..58d6a158af30 100644
--- a/sw/IwyuFilter_sw.yaml
+++ b/sw/IwyuFilter_sw.yaml
@@ -434,3 +434,9 @@ blacklist:
sw/qa/extras/ww8import/ww8import.cxx:
# Needed for for-loop range
- com/sun/star/graphic/XGraphic.hpp
+ include/sal/types.h:
+ # Ignore warning during checking source/filter/ww8/types.hxx
+ - sal/typesizes.h
+ sw/source/filter/ww8/ww8scan.hxx:
+ # OSL_BIGENDIAN is being checked
+ - osl/endian.h
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 9121847c6f01..ebf30e3e2ad7 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -102,6 +102,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_accessible_relation_set \
CppunitTest_sw_apitests \
CppunitTest_sw_unowriter \
+ CppunitTest_sw_core_crsr \
))
ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 21896f6f99c0..b996540e70b5 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -28,7 +28,7 @@ class SwGrfFormatColl;
class SwDoc;
class SwOLENode;
class SwOLEListener_Impl;
-class SwEmbedObjectLink;
+namespace sfx2 { class SvBaseLink; }
class DeflateData;
class SW_DLLPUBLIC SwOLEObj
@@ -88,7 +88,7 @@ class SW_DLLPUBLIC SwOLENode: public SwNoTextNode
bool mbOLESizeInvalid; /**< Should be considered at SwDoc::PrtOLENotify
(e.g. copied). Is not persistent. */
- SwEmbedObjectLink* mpObjectLink;
+ sfx2::SvBaseLink* mpObjectLink;
OUString maLinkURL;
SwOLENode( const SwNodeIndex &rWhere,
diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx
new file mode 100644
index 000000000000..c22e072091a5
--- /dev/null
+++ b/sw/qa/core/crsr/crsr.cxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <swmodeltestbase.hxx>
+
+#include <com/sun/star/awt/FontWeight.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
+#include <com/sun/star/view/XLineCursor.hpp>
+#include <com/sun/star/text/XTextDocument.hpp>
+#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
+#include <com/sun/star/text/XTextViewCursor.hpp>
+
+#include <comphelper/propertysequence.hxx>
+#include <svl/srchitem.hxx>
+#include <vcl/scheduler.hxx>
+
+#include <docsh.hxx>
+#include <unotxdoc.hxx>
+#include <wrtsh.hxx>
+
+char const DATA_DIRECTORY[] = "/sw/qa/core/crsr/data/";
+
+/// Covers sw/source/core/crsr/ fixes.
+class SwCoreCrsrTest : public SwModelTestBase
+{
+};
+
+CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testSelAllStartsWithTable)
+{
+ load(DATA_DIRECTORY, "sel-all-starts-with-table.odt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwDocShell* pDocShell = pTextDoc->GetDocShell();
+ SwDoc* pDoc = pDocShell->GetDoc();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
+
+ pWrtShell->SelAll();
+ pWrtShell->SelAll();
+ Scheduler::ProcessEventsToIdle();
+ pWrtShell->DelLeft();
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0
+ // - Actual : 1
+ // i.e. the table selection was lost and the table was not deleted.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pDoc->GetTableFrameFormatCount(/*bUsed=*/true));
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/crsr/data/sel-all-starts-with-table.odt b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt
new file mode 100644
index 000000000000..a368095a55cf
--- /dev/null
+++ b/sw/qa/core/crsr/data/sel-all-starts-with-table.odt
Binary files differ
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index 842289f1dd44..00b5f511002f 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -38,11 +38,11 @@ public:
* Wraps a reqif-xhtml fragment into an XHTML file, so an XML parser can
* parse it.
*/
- void wrapFragment(SvMemoryStream& rStream)
+ static void wrapFragment(const utl::TempFile& rTempFile, SvMemoryStream& rStream)
{
rStream.WriteCharPtr(
"<reqif-xhtml:html xmlns:reqif-xhtml=\"http://www.w3.org/1999/xhtml\">\n");
- SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ);
+ SvFileStream aFileStream(rTempFile.GetURL(), StreamMode::READ);
rStream.WriteStream(aFileStream);
rStream.WriteCharPtr("</reqif-xhtml:html>\n");
rStream.Seek(0);
@@ -102,6 +102,11 @@ private:
#define DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(TestName, filename) DECLARE_SW_ROUNDTRIP_TEST(TestName, filename, nullptr, HtmlExportTest)
+/// HTML export of the sw doc model tests.
+class SwHtmlDomExportTest : public SwModelTestBase, public HtmlTestTools
+{
+};
+
DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testFdo81276, "fdo81276.html")
{
uno::Reference<container::XNameAccess> xPageStyles(getStyles("PageStyles"));
@@ -488,17 +493,25 @@ DECLARE_HTMLEXPORT_TEST(testReqIfJpgImg, "reqif-jpg-img.xhtml")
DECLARE_HTMLEXPORT_TEST(testReqIfTable, "reqif-table.xhtml")
{
- htmlDocPtr pDoc = parseHtml(maTempFile);
+ SvMemoryStream aStream;
+ HtmlExportTest::wrapFragment(maTempFile, aStream);
+ xmlDocPtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
// <div> was missing, so the XHTML fragment wasn't a valid
// xhtml.BlkStruct.class type anymore.
- assertXPath(pDoc, "/html/body/div/table/tr/th", 1);
+ assertXPath(pDoc,
+ "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ 1);
// The attribute was present to contain "background" and "border", which is
// ignored in reqif-xhtml.
- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "style");
+ assertXPathNoAttribute(
+ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ "style");
// The attribute was present, which is not valid in reqif-xhtml.
- assertXPathNoAttribute(pDoc, "/html/body/div/table/tr/th", "bgcolor");
+ assertXPathNoAttribute(
+ pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:table/reqif-xhtml:tr/reqif-xhtml:th",
+ "bgcolor");
}
DECLARE_HTMLEXPORT_TEST(testReqIfTable2, "reqif-table2.odt")
@@ -564,7 +577,7 @@ DECLARE_HTMLEXPORT_ROUNDTRIP_TEST(testReqIfOle2, "reqif-ole2.xhtml")
{
// Check that the replacement graphic is exported at RTF level.
SvMemoryStream aStream;
- wrapFragment(aStream);
+ wrapFragment(maTempFile, aStream);
xmlDocPtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
// Get the path of the RTF data.
@@ -627,7 +640,7 @@ DECLARE_HTMLEXPORT_TEST(testTransparentImage, "transparent-image.odt")
DECLARE_HTMLEXPORT_TEST(testTransparentImageReqIf, "transparent-image.odt")
{
SvMemoryStream aStream;
- wrapFragment(aStream);
+ wrapFragment(maTempFile, aStream);
xmlDocPtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
@@ -644,7 +657,7 @@ DECLARE_HTMLEXPORT_TEST(testOleNodataReqIf, "reqif-ole-nodata.odt")
{
// This failed, io::IOException was thrown during the filter() call.
SvMemoryStream aStream;
- wrapFragment(aStream);
+ wrapFragment(maTempFile, aStream);
xmlDocPtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
@@ -659,7 +672,7 @@ DECLARE_HTMLEXPORT_TEST(testOleNodataReqIf, "reqif-ole-nodata.odt")
DECLARE_HTMLEXPORT_TEST(testNoLangReqIf, "reqif-no-lang.odt")
{
SvMemoryStream aStream;
- wrapFragment(aStream);
+ wrapFragment(maTempFile, aStream);
xmlDocPtr pDoc = parseXmlStream(&aStream);
CPPUNIT_ASSERT(pDoc);
@@ -683,6 +696,31 @@ DECLARE_HTMLEXPORT_TEST(testFieldShade, "field-shade.odt")
assertXPath(pDoc, "/html/body/p[2]/span/span", 0);
}
+CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testBlockQuoteReqIf)
+{
+ // Build a document model that uses the Quotations paragraph style.
+ loadURL("private:factory/swriter", nullptr);
+ uno::Reference<beans::XPropertySet> xParagraph(getParagraph(1), uno::UNO_QUERY);
+ xParagraph->setPropertyValue("ParaStyleName", uno::makeAny(OUString("Quotations")));
+
+ // Export it.
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("HTML (StarWriter)");
+ aMediaDescriptor["FilterOptions"] <<= OUString("xhtmlns=reqif-xhtml");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+ SvMemoryStream aStream;
+ HtmlExportTest::wrapFragment(maTempFile, aStream);
+ xmlDocPtr pDoc = parseXmlStream(&aStream);
+ CPPUNIT_ASSERT(pDoc);
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 0
+ // i.e. <blackquote> had character (direct) children, which is invalid xhtml.
+ assertXPath(pDoc, "/reqif-xhtml:html/reqif-xhtml:div/reqif-xhtml:blockquote/reqif-xhtml:p", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/layout/data/tdf115094.docx b/sw/qa/extras/layout/data/tdf115094.docx
index 49a7c9194f1a..c6c0176c2af4 100644
--- a/sw/qa/extras/layout/data/tdf115094.docx
+++ b/sw/qa/extras/layout/data/tdf115094.docx
Binary files differ
diff --git a/sw/qa/extras/layout/data/tox-update-wrong-pages.odt b/sw/qa/extras/layout/data/tox-update-wrong-pages.odt
new file mode 100644
index 000000000000..40ceb7ac4bd2
--- /dev/null
+++ b/sw/qa/extras/layout/data/tox-update-wrong-pages.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 9747090b6581..11c502d4c09d 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -1197,6 +1197,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf138039)
assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored", 0);
}
+#ifndef WNT
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf143239)
{
SwDoc* pDoc = createDoc("tdf143239-1-min.odt");
@@ -1262,6 +1263,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf143239)
discardDumpedLayout();
}
}
+#endif
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTableOverlapFooterFly)
{
@@ -3617,6 +3619,28 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBIRT)
load(DATA_DIRECTORY, "birt_min.odt");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf155324)
+{
+ createDoc("tox-update-wrong-pages.odt");
+
+ lcl_dispatchCommand(mxComponent, ".uno:UpdateAllIndexes", {});
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ // the problem was that the first entry was on page 7, 2nd on page 9 etc.
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[1]/Text[1]", "Portion", "Foo");
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[1]/Text[3]", "Portion", "5");
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[2]/Text[1]", "Portion", "bar");
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[2]/Text[3]", "Portion", "7");
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[3]/Text[1]", "Portion", "Three");
+ assertXPath(pXmlDoc, "/root/page[1]/body/section[2]/txt[3]/Text[3]", "Portion", "7");
+
+ // check first content page has the footnotes
+ assertXPath(pXmlDoc, "/root/page[5]/body/txt[1]/Text", "Portion", "Foo");
+ assertXPath(pXmlDoc, "/root/page[4]/ftncont", 0);
+ assertXPath(pXmlDoc, "/root/page[5]/ftncont/ftn", 5);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index b359ef7df607..f7c0664d596d 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -1238,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testMixedFormFieldInsertion)
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf124261)
{
-#if !defined(WNT)
+#if !defined(WNT) && !defined(MACOSX)
// Make sure that pressing a key in a btlr cell frame causes an immediate, correct repaint.
SwDoc* pDoc = createDoc("tdf124261.docx");
SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout();
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 0754ca48e48e..51272444485e 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -35,6 +35,7 @@
#include <ndtxt.hxx>
#include <flyfrm.hxx>
#include <breakit.hxx>
+#include <UndoTable.hxx>
SwCallLink::SwCallLink( SwCursorShell & rSh )
: rShell( rSh )
@@ -64,26 +65,51 @@ SwCallLink::SwCallLink( SwCursorShell & rSh )
}
}
-static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell const & rShell)
+namespace sw {
+
+/**
+ An empty paragraph inside a table with a nested table preceding it
+ should be hidden, unless the cursor is positioned in the paragraph.
+
+ If the cursor is now (or was previously) inside such a paragraph,
+ send a size change notification on the row frame to force reformatting.
+ */
+void NotifyTableCollapsedParagraph(const SwContentNode *const pNode, SwCursorShell *const pShell)
{
if ( !pNode )
return;
- SwFrame *const pMyFrame = pNode->getLayoutFrame( rShell.GetLayout() );
+ SwFrame *const pMyFrame = pNode->getLayoutFrame(pShell ? pShell->GetLayout() : nullptr);
if ( !pMyFrame )
return;
- // We need to emulated a change of the row height in order
- // to have the complete row redrawn
+ // important: only invalidate layout if something is actually hidden or
+ // shown! Otherwise performance is going to suffer with "difficult" tables.
+ if (!pMyFrame->IsCollapse())
+ return;
+
SwRowFrame *const pRow = pMyFrame->FindRowFrame();
if ( !pRow )
return;
const SwTableLine* pLine = pRow->GetTabLine( );
+
+ if (pShell && (pShell->IsTableMode() || (pShell->StartsWithTable() && pShell->ExtendedSelectedAll())))
+ {
+ // If we have a table selection, then avoid the notification: it's not necessary (the text
+ // cursor needs no updating) and the notification may kill the selection overlay, leading to
+ // flicker.
+ // Same for whole-document selection when it starts with a table.
+ return;
+ }
+
+ // notify a change in frame size to force reformatting of the row
SwFormatFrameSize aSize = pLine->GetFrameFormat()->GetFrameSize();
pRow->ModifyNotification(nullptr, &aSize);
}
+} // namespace sw
+
SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
{
if( nNdTyp == SwNodeType::NONE || !rShell.m_bCallChgLnk ) // see ctor
@@ -96,15 +122,17 @@ SwCallLink::~SwCallLink() COVERITY_NOEXCEPT_FALSE
if( !pCNd )
return;
- lcl_notifyRow(pCNd, rShell);
-
- const SwDoc *pDoc=rShell.GetDoc();
- const SwContentNode *pNode = nullptr;
- if ( pDoc && nNode < pDoc->GetNodes( ).Count( ) )
+ if (pCNd->GetIndex() != nNode) // only if moved to different node
{
- pNode = pDoc->GetNodes()[nNode]->GetContentNode();
+ ::sw::NotifyTableCollapsedParagraph(pCNd, &rShell);
+
+ const SwDoc *pDoc=rShell.GetDoc();
+ if (nNode < pDoc->GetNodes().Count())
+ {
+ const SwContentNode *const pNode = pDoc->GetNodes()[nNode]->GetContentNode();
+ ::sw::NotifyTableCollapsedParagraph(pNode, &rShell);
+ }
}
- lcl_notifyRow(pNode, rShell);
sal_Int32 nCmp, nCurrentContent = pCurrentCursor->GetPoint()->nContent.GetIndex();
SwNodeType nNdWhich = pCNd->GetNodeType();
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 0c69d1d4a9a6..d91d83108cb9 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1971,6 +1971,7 @@ void SwDoc::dumpAsXml(xmlTextWriterPtr pWriter) const
mpFrameFormatTable->dumpAsXml(pWriter, "frmFormatTable");
mpSpzFrameFormatTable->dumpAsXml(pWriter, "spzFrameFormatTable");
mpSectionFormatTable->dumpAsXml(pWriter);
+ mpTableFrameFormatTable->dumpAsXml(pWriter, "tableFrameFormatTable");
mpNumRuleTable->dumpAsXml(pWriter);
getIDocumentRedlineAccess().GetRedlineTable().dumpAsXml(pWriter);
getIDocumentRedlineAccess().GetExtraRedlineTable().dumpAsXml(pWriter);
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 53e9097279eb..cbebaeb51165 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -932,8 +932,11 @@ OUString SwDocInfoFieldType::Expand( sal_uInt16 nSub, sal_uInt32 nFormat,
else if( nSub == DI_PRINT )
{
aName = xDocProps->getPrintedBy();
- uDT = xDocProps->getPrintDate();
- aDate = DateTime(uDT);
+ if ( !std::getenv("STABLE_FIELDS_HACK") )
+ {
+ uDT = xDocProps->getPrintDate();
+ aDate = DateTime(uDT);
+ }
}
else
break;
diff --git a/sw/source/core/fields/flddat.cxx b/sw/source/core/fields/flddat.cxx
index f2a6a779a0ed..ecd3b8d97579 100644
--- a/sw/source/core/fields/flddat.cxx
+++ b/sw/source/core/fields/flddat.cxx
@@ -62,6 +62,11 @@ SwDateTimeField::SwDateTimeField(SwDateTimeFieldType* pInitType, sal_uInt16 nSub
OUString SwDateTimeField::ExpandImpl(SwRootFrame const*const) const
{
+ if (getenv("STABLE_FIELDS_HACK"))
+ {
+ const_cast<SwDateTimeField*>(this)->m_nSubType |= FIXEDFLD; //HACK
+ }
+
double fVal;
if (!(IsFixed()))
@@ -130,6 +135,11 @@ double SwDateTimeField::GetDateTime(SwDoc* pDoc, const DateTime& rDT)
double SwDateTimeField::GetValue() const
{
+ if (getenv("STABLE_FIELDS_HACK"))
+ {
+ const_cast<SwDateTimeField*>(this)->m_nSubType |= FIXEDFLD; //HACK
+ }
+
if (IsFixed())
return SwValueField::GetValue();
else
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index 65a62d284682..224180f053b7 100644
--- a/sw/source/core/inc/UndoTable.hxx
+++ b/sw/source/core/inc/UndoTable.hxx
@@ -42,6 +42,14 @@ class SwStartNode;
class SwTableNode;
class SwTableAutoFormat;
class SwTableSortBoxes;
+class SwContentNode;
+class SwCursorShell;
+
+namespace sw {
+
+void NotifyTableCollapsedParagraph(const SwContentNode* pNode, SwCursorShell *const pShell);
+
+}
class SwUndoInsTable : public SwUndo
{
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 9e9c0c8f25a5..4f08992c04e8 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -152,6 +152,7 @@ long CalcHeightWithFlys( const SwFrame *pFrame );
namespace sw {
+bool HasPageBreakBefore(SwPageFrame const& rPage);
bool IsRightPageByNumber(SwRootFrame const& rLayout, sal_uInt16 nPageNum);
} // namespace sw
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index c84bc17f9359..4d147d645d51 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -821,6 +821,26 @@ SwLayoutFrame *SwFrame::GetLeaf( MakePageType eMakePage, bool bFwd )
return bFwd ? GetNextLeaf( eMakePage ) : GetPrevLeaf();
}
+namespace sw {
+
+bool HasPageBreakBefore(SwPageFrame const& rPage)
+{
+ SwFrame const* pFlow(rPage.FindFirstBodyContent());
+ if (!pFlow)
+ {
+ return false;
+ }
+ while (pFlow->GetUpper()->IsInTab())
+ {
+ pFlow = pFlow->GetUpper()->FindTabFrame();
+ }
+ return pFlow->GetPageDescItem().GetPageDesc()
+ || pFlow->GetBreakItem().GetBreak() == SvxBreak::PageBefore
+ || pFlow->GetBreakItem().GetBreak() == SvxBreak::PageBoth;
+};
+
+} // namespace sw
+
bool SwFrame::WrongPageDesc( SwPageFrame* pNew )
{
// Now it's getting a bit complicated:
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 280e6ed13d82..a41819058588 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -563,10 +563,20 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
if( aRectFnSet.GetWidth(getFrameArea())!=aRectFnSet.GetWidth(pParent->getFramePrintArea()) )
InvalidateSize_();
InvalidatePos_();
+ if (SwFrame *const pContent = ContainsContent())
+ { // tdf#139687 invalidate possibly stale top margin (computed from previous frame)
+ pContent->InvalidatePrt_();
+ }
SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- if ( GetNext() )
- GetNext()->InvalidatePos_();
+ if (SwFootnoteFrame *const pNext = static_cast<SwFootnoteFrame *>(GetNext()))
+ {
+ pNext->InvalidatePos_();
+ if (SwFrame *const pContent = pNext->ContainsContent())
+ { // tdf#139687 invalidate possibly stale top margin (computed from previous frame)
+ pContent->InvalidatePrt_();
+ }
+ }
if( aRectFnSet.GetHeight(getFrameArea()) )
pParent->Grow( aRectFnSet.GetHeight(getFrameArea()) );
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index dbb5757bbd1b..993a22b33df8 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -183,12 +183,10 @@ void SwLooping::Control( SwPageFrame* pPage )
static bool bNoLouie = false;
if( bNoLouie )
return;
+#endif
// FME 2007-08-30 #i81146# new loop control
- OSL_ENSURE( 0 != mnLoopControlStage, "Looping Louie: Stage 1!" );
- OSL_ENSURE( 1 != mnLoopControlStage, "Looping Louie: Stage 2!!" );
- OSL_ENSURE( 2 > mnLoopControlStage, "Looping Louie: Stage 3!!!" );
-#endif
+ SAL_WARN("sw.layout", "Looping Louie: Stage " << (mnLoopControlStage + 1) << "!");
Drastic( pPage->Lower() );
if( nNew > nMinPage && pPage->GetPrev() )
@@ -235,7 +233,7 @@ void SwLayouter::InsertEndnotes( SwSectionFrame const * pSect )
void SwLayouter::LoopControl( SwPageFrame* pPage )
{
- OSL_ENSURE( mpLooping, "Looping: Lost control" );
+ assert(mpLooping);
mpLooping->Control( pPage );
}
@@ -243,9 +241,7 @@ void SwLayouter::LoopingLouieLight( const SwDoc& rDoc, const SwTextFrame& rFrame
{
if ( mpLooping && mpLooping->IsLoopingLouieLight() )
{
-#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "Looping Louie (Light): Fixating fractious frame" );
-#endif
+ SAL_WARN("sw.layout", "Looping Louie (Light): Fixating fractious frame");
SwLayouter::InsertMovedFwdFrame( rDoc, rFrame, rFrame.FindPageFrame()->GetPhyPageNum() );
}
}
@@ -289,7 +285,7 @@ bool SwLayouter::Collecting( SwDoc* pDoc, SwSectionFrame const * pSect, SwFootno
bool SwLayouter::StartLoopControl( SwDoc* pDoc, SwPageFrame const *pPage )
{
- OSL_ENSURE( pDoc, "No doc, no fun" );
+ assert(pDoc);
if( !pDoc->getIDocumentLayoutAccess().GetLayouter() )
pDoc->getIDocumentLayoutAccess().SetLayouter( new SwLayouter() );
return !pDoc->getIDocumentLayoutAccess().GetLayouter()->mpLooping &&
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 58d0c7d4d5ad..4a34d748a46e 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1723,7 +1723,8 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
// case pLayLeaf points to our section's cell's follow, which is
// fine to be on the same page. New page creation is handled when
// creating / moving the cell frame.
- if( WrongPageDesc( pNxtPg ) && !bLayLeafTableAllowed )
+ // It doesn't make sense to move to a page that starts with break?
+ if ((WrongPageDesc(pNxtPg) || HasPageBreakBefore(*pNxtPg)) && !bLayLeafTableAllowed )
{
if( bWrongPage )
break; // there's a column between me and my right page
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 54c2c8889c88..3c40df5447de 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1538,9 +1538,7 @@ bool SwContentFrame::CalcLowers(SwLayoutFrame & rLay, SwLayoutFrame const& rDont
continue;
}
-#if OSL_DEBUG_LEVEL > 1
- OSL_FAIL( "LoopControl in SwContentFrame::CalcLowers" );
-#endif
+ SAL_WARN("sw.layout", "LoopControl in SwContentFrame::CalcLowers");
}
}
if (!rDontLeave.IsAnLower(pCnt)) // moved backward?
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index b7e5e3149403..b5101a567df7 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -2735,13 +2735,28 @@ SwTwips SwLayoutFrame::GrowFrame( SwTwips nDist, bool bTst, bool bInfo )
SwPageFrame *pPage = FindPageFrame();
if ( GetNext() )
{
- GetNext()->InvalidatePos_();
- if (GetNext()->IsRowFrame())
- { // also invalidate first cell
- static_cast<SwLayoutFrame*>(GetNext())->Lower()->InvalidatePos_();
+ SwFrame * pNext = GetNext();
+ do
+ {
+ pNext->InvalidatePos_();
+ if (pNext->IsRowFrame())
+ { // also invalidate first cell
+ static_cast<SwLayoutFrame*>(pNext)->Lower()->InvalidatePos_();
+ }
+ else if (pNext->IsContentFrame())
+ {
+ pNext->InvalidatePage(pPage);
+ }
+ if (pNext->HasFixSize())
+ { // continue to invalidate because growing pNext won't do it!
+ pNext = pNext->GetNext();
+ }
+ else
+ {
+ break;
+ }
}
- if ( GetNext()->IsContentFrame() )
- GetNext()->InvalidatePage( pPage );
+ while (pNext);
}
if ( !IsPageBodyFrame() )
{
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 4d2d5b05bce8..3a15ee2c0c13 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -146,6 +146,8 @@ void SAL_CALL SwOLEListener_Impl::disposing( const lang::EventObject& )
// TODO/LATER: actually SwEmbedObjectLink should be used here, but because different objects are used to control
// embedded object different link objects with the same functionality had to be implemented
+namespace {
+
class SwEmbedObjectLink : public sfx2::SvBaseLink
{
SwOLENode* pOleNode;
@@ -208,6 +210,44 @@ void SwEmbedObjectLink::Closed()
SvBaseLink::Closed();
}
+class SwIFrameLink : public sfx2::SvBaseLink
+{
+ SwOLENode* m_pOleNode;
+
+public:
+ explicit SwIFrameLink(SwOLENode* pNode)
+ : ::sfx2::SvBaseLink(::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB)
+ , m_pOleNode(pNode)
+ {
+ SetSynchron( false );
+ }
+
+ ::sfx2::SvBaseLink::UpdateResult DataChanged(
+ const OUString&, const uno::Any& )
+ {
+ uno::Reference<embed::XEmbeddedObject> xObject = m_pOleNode->GetOLEObj().GetOleRef();
+ uno::Reference<embed::XCommonEmbedPersist> xPersObj(xObject, uno::UNO_QUERY);
+ if (xPersObj.is())
+ {
+ // let the IFrameObject reload the link
+ try
+ {
+ xPersObj->reload(uno::Sequence<beans::PropertyValue>(), uno::Sequence<beans::PropertyValue>());
+ }
+ catch (const uno::Exception&)
+ {
+ }
+
+ m_pOleNode->SetChanged();
+ }
+
+ return SUCCESS;
+ }
+
+};
+
+}
+
SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
const svt::EmbeddedObjectRef& xObj,
SwGrfFormatColl *pGrfColl,
@@ -589,28 +629,59 @@ void SwOLENode::DisconnectFileLink_Impl()
void SwOLENode::CheckFileLink_Impl()
{
- if ( maOLEObj.m_xOLERef.GetObject().is() && !mpObjectLink )
+ if ( !(maOLEObj.m_xOLERef.GetObject().is() && !mpObjectLink) )
+ return;
+
+ try
{
- try
+ uno::Reference<embed::XEmbeddedObject> xObject = maOLEObj.m_xOLERef.GetObject();
+ if (!xObject)
+ return;
+
+ bool bIFrame = false;
+
+ OUString aLinkURL;
+ uno::Reference<embed::XLinkageSupport> xLinkSupport(xObject, uno::UNO_QUERY);
+ if (xLinkSupport)
+ {
+ if (xLinkSupport->isLink())
+ aLinkURL = xLinkSupport->getLinkURL();
+ }
+ else
{
- uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.m_xOLERef.GetObject(), uno::UNO_QUERY_THROW );
- if ( xLinkSupport->isLink() )
+ // get IFrame (Floating Frames) listed and updatable from the
+ // manage links dialog
+ SvGlobalName aClassId(xObject->getClassID());
+ if (aClassId == SvGlobalName(SO3_IFRAME_CLASSID))
{
- const OUString aLinkURL = xLinkSupport->getLinkURL();
- if ( !aLinkURL.isEmpty() )
- {
- // this is a file link so the model link manager should handle it
- mpObjectLink = new SwEmbedObjectLink( this );
- maLinkURL = aLinkURL;
- GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
- mpObjectLink->Connect();
- }
+ uno::Reference<beans::XPropertySet> xSet(xObject->getComponent(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->getPropertyValue("FrameURL") >>= aLinkURL;
+ bIFrame = true;
}
}
- catch( uno::Exception& )
+
+ if (!aLinkURL.isEmpty()) // this is a file link so the model link manager should handle it
{
+ SwEmbedObjectLink* pEmbedObjectLink = nullptr;
+ if (!bIFrame)
+ {
+ pEmbedObjectLink = new SwEmbedObjectLink(this);
+ mpObjectLink = pEmbedObjectLink;
+ }
+ else
+ {
+ mpObjectLink = new SwIFrameLink(this);
+ }
+ maLinkURL = aLinkURL;
+ GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
+ if (pEmbedObjectLink)
+ pEmbedObjectLink->Connect();
}
}
+ catch( uno::Exception& )
+ {
+ }
}
// #i99665#
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index a1c9fb40f338..4ebaea08d243 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -277,6 +277,8 @@ void SwUndoInsTable::UndoImpl(::sw::UndoRedoContext & rContext)
if( SfxItemState::SET == pTableFormat->GetItemState( RES_BREAK,
false, &pItem ) )
pNextNd->SetAttr( *pItem );
+
+ ::sw::NotifyTableCollapsedParagraph(pNextNd, nullptr);
}
sTableNm = pTableNd->GetTable().GetFrameFormat()->GetName();
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 8f0600d59a1d..4c89734e3ea2 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -33,6 +33,7 @@
#include <unotools/syslocale.hxx>
#include <vcl/oldprintadaptor.hxx>
+#include <optional>
#include <unotxdoc.hxx>
#include <docsh.hxx>
#include <txtfld.hxx>
@@ -461,32 +462,13 @@ bool SwViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Push();
- // fdo#36815 for comments in margins print to a metafile
- // and then scale that metafile down so that the comments
- // will fit on the real page, and replay that scaled
- // output to the real outputdevice
- GDIMetaFile *pOrigRecorder(nullptr);
- std::unique_ptr<GDIMetaFile> pMetaFile;
SwPostItMode nPostItMode = rPrintData.GetPrintPostIts();
// tdf#91680 Reserve space in margin for comments only if there are comments
const bool bHasPostItsToPrintInMargins = ( nPostItMode == SwPostItMode::InMargins ) &&
sw_GetPostIts( &GetDoc()->getIDocumentFieldsAccess(), nullptr );
- if ( bHasPostItsToPrintInMargins )
- {
- //get and disable the existing recorder
- pOrigRecorder = pOutDev->GetConnectMetaFile();
- pOutDev->SetConnectMetaFile(nullptr);
- // turn off output to the device
- pOutDev->EnableOutput(false);
- // just record the rendering commands to the metafile
- // instead
- pMetaFile.reset(new GDIMetaFile);
- pMetaFile->SetPrefSize(pOutDev->GetOutputSize());
- pMetaFile->SetPrefMapMode(pOutDev->GetMapMode());
- pMetaFile->Record(pOutDev);
- }
+ ::std::optional<long> oOrigHeight;
// Print/PDF export for (multi-)selection has already generated a
// temporary document with the selected text.
@@ -550,32 +532,7 @@ bool SwViewShell::PrintOrPDFExport(
pPostItManager->CalcRects();
pPostItManager->LayoutPostIts();
pPostItManager->DrawNotesForPage(pOutDev, nPage-1);
-
- //Stop recording now
- pMetaFile->Stop();
- pMetaFile->WindStart();
- //Enable output to the device again
- pOutDev->EnableOutput();
- //Restore the original recorder
- pOutDev->SetConnectMetaFile(pOrigRecorder);
-
- //Now scale the recorded page down so the notes
- //will fit in the final page
- double fScale = 0.75;
- long nOrigHeight = pStPage->getFrameArea().Height();
- long nNewHeight = nOrigHeight*fScale;
- long nShiftY = (nOrigHeight-nNewHeight)/2;
- pMetaFile->Scale( fScale, fScale );
- pMetaFile->WindStart();
- //Move the scaled page down to center it
- //the other variant of Move does not map pixels
- //back to the logical units correctly
- pMetaFile->Move(0, convertTwipToMm100(nShiftY), pOutDev->GetDPIX(), pOutDev->GetDPIY());
- pMetaFile->WindStart();
-
- //play back the scaled page
- pMetaFile->Play(pOutDev);
- pMetaFile.reset();
+ oOrigHeight.emplace(pStPage->getFrameArea().Height());
}
}
@@ -585,6 +542,22 @@ bool SwViewShell::PrintOrPDFExport(
// output device is now provided by a call from outside the Writer)
pOutDev->Pop();
+ // avoid a warning about unbalanced Push/Pop by doing this last:
+ if (oOrigHeight)
+ {
+ // fdo#36815 Now scale the recorded page down so the comments in
+ // margins will fit in the final page
+ double fScale = 0.75;
+ long nNewHeight = *oOrigHeight*fScale;
+ long nShiftY = (*oOrigHeight-nNewHeight)/2;
+ GDIMetaFile *const pMetaFile = pOutDev->GetConnectMetaFile();
+ pMetaFile->ScaleActions(fScale, fScale);
+ //Move the scaled page down to center it
+ //the other variant of Move does not map pixels
+ //back to the logical units correctly
+ pMetaFile->Move(0, convertTwipToMm100(nShiftY), pOutDev->GetDPIX(), pOutDev->GetDPIY());
+ }
+
return true;
}
diff --git a/sw/source/filter/docx/swdocxreader.hxx b/sw/source/filter/docx/swdocxreader.hxx
index 57900c12143b..214d2742d287 100644
--- a/sw/source/filter/docx/swdocxreader.hxx
+++ b/sw/source/filter/docx/swdocxreader.hxx
@@ -21,8 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_DOCX_SWDOCXREADER_HXX
#include <shellio.hxx>
-#include <com/sun/star/xml/dom/XDocument.hpp>
-#include <tools/ref.hxx>
/// Wrapper for the UNO DOCX import filter (in writerfilter) for autotext purposes.
class SwDOCXReader : public StgReader
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index d73f91572513..d2e7d236739d 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -802,8 +802,9 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// for BLOCKQUOTE, ADDRESS and DD we output another paragrah token, if
// - no styles are written and
// - a lower spacing or a paragraph alignment exists
+ // Also, XHTML does not allow character children in this context.
OString aToken = rInfo.aToken;
- if( !rHWrt.m_bCfgOutStyles && rInfo.bParaPossible && !bPara &&
+ if( (!rHWrt.m_bCfgOutStyles || rHWrt.mbXHTML) && rInfo.bParaPossible && !bPara &&
(bHasParSpace || pAdjItem) )
{
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rHWrt.GetNamespace() + rInfo.aToken );
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index 43f42aef10e4..0c739bfcf590 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/text/HoriOrientation.hpp>
+#include <com/sun/star/text/VertOrientation.hpp>
+
#include <hintids.hxx>
#include <svl/itemiter.hxx>
#include <editeng/lrspitem.hxx>
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 218ffa02a200..3d715fff1bca 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -48,6 +48,7 @@
#include <drawdoc.hxx>
#include <frmfmt.hxx>
#include <fmtanchr.hxx>
+#include <fmtornt.hxx>
#include <fmtsrnd.hxx>
#include <ndtxt.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 88e7e3b80c0c..90722338807a 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFLY_HXX
-#include <tools/solar.h>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
diff --git a/sw/source/filter/html/htmlform.hxx b/sw/source/filter/html/htmlform.hxx
index b097e86a9202..562bb65089d7 100644
--- a/sw/source/filter/html/htmlform.hxx
+++ b/sw/source/filter/html/htmlform.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFORM_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_HTMLFORM_HXX
+#include <sal/types.h>
+
extern const sal_Char * aEventListenerTable[];
extern const sal_Char * aEventMethodTable[];
extern const sal_Char * aEventSDOptionTable[];
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 81df21aad9be..4060b7858d06 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/style/NumberingType.hpp>
#include <hintids.hxx>
#include <svtools/htmltokn.h>
diff --git a/sw/source/filter/html/parcss1.hxx b/sw/source/filter/html/parcss1.hxx
index 1a4b02c6727f..7afbd84e1c6d 100644
--- a/sw/source/filter/html/parcss1.hxx
+++ b/sw/source/filter/html/parcss1.hxx
@@ -20,6 +20,11 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_PARCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_PARCSS1_HXX
+#include <rtl/ustring.hxx>
+#include <tools/color.hxx>
+
+#include <memory>
+
// tokens of the CSS1 parser
enum CSS1Token
{
diff --git a/sw/source/filter/html/svxcss1.hxx b/sw/source/filter/html/svxcss1.hxx
index fdc2b1a78a67..bb4dc73ae525 100644
--- a/sw/source/filter/html/svxcss1.hxx
+++ b/sw/source/filter/html/svxcss1.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SW_SOURCE_FILTER_HTML_SVXCSS1_HXX
#include <svl/itemset.hxx>
+#include <svx/flagsdef.hxx>
#include <editeng/svxenum.hxx>
#include <rtl/textenc.h>
#include "parcss1.hxx"
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index b368bd1f068e..c6a3e6bdb8fd 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -20,6 +20,9 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
+#include <svtools/htmltokn.h>
+#include <tools/solar.h>
+
#include <poolfmt.hxx>
#include "svxcss1.hxx"
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index df4d4eed2da5..8495d0014e1b 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -83,6 +83,7 @@
#include <fchrfmt.hxx>
#include <fmtinfmt.hxx>
#include <fmtfollowtextflow.hxx>
+#include <fmtornt.hxx>
#include <docary.hxx>
#include <docstat.hxx>
#include <doc.hxx>
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 4c4a4d414313..b931042a3fe7 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -27,7 +27,6 @@
#include <editeng/svxenum.hxx>
#include <rtl/ref.hxx>
#include <fltshell.hxx>
-#include <fmtornt.hxx>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index c90c784e7abc..47893227f98f 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -26,13 +26,13 @@
#include <com/sun/star/container/XIndexContainer.hpp>
#include <com/sun/star/form/XForm.hpp>
-#include <vcl/field.hxx>
#include <i18nlangtag/lang.h>
#include <comphelper/stl_types.hxx>
#include <o3tl/sorted_vector.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <rtl/ref.hxx>
#include <svtools/htmlout.hxx>
+#include <tools/fldunit.hxx>
#include <shellio.hxx>
#include <wrt_fn.hxx>
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 47c1aedab650..713709dd7caa 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -20,11 +20,7 @@
#define INCLUDED_SW_SOURCE_FILTER_INC_FLTSHELL_HXX
#include <hintids.hxx>
-#include <vcl/keycod.hxx>
#include <tools/datetime.hxx>
-#include <editeng/formatbreakitem.hxx>
-#include <poolfmt.hxx>
-#include <fmtornt.hxx>
#include <mdiexp.hxx>
#include <ndindex.hxx>
#include <pam.hxx>
@@ -34,7 +30,6 @@
#include <cstddef>
#include <limits>
#include <memory>
-#include <deque>
class SwTOXBase;
class SwField;
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index f36c78fb3d58..4ed7d7045511 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -23,17 +23,13 @@
#include <sal/config.h>
#include <cstddef>
-#include <set>
#include <map>
#include <vector>
#include <memory>
#include <swtypes.hxx>
#include "wwstyles.hxx"
#include <rtl/textenc.h>
-#include <tools/gen.hxx>
-#include <filter/msfilter/util.hxx>
#include "fltshell.hxx"
-#include <redline.hxx>
#include <shellio.hxx>
#include <svl/zforlist.hxx>
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 293e87630edc..d1e4d3fa9e3a 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -19,7 +19,7 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX
#define INCLUDED_SW_SOURCE_FILTER_INC_RTF_HXX
-#include <tools/solar.h>
+#include <sal/types.h>
class RTFSurround
{
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 6dfe3d2f4e4c..623ddeeda5c4 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
#define INCLUDED_SW_SOURCE_FILTER_INC_WRTSWTBL_HXX
-#include <tools/solar.h>
#include <tools/color.hxx>
#include <o3tl/sorted_vector.hxx>
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index b9290e24d3d5..628f3194b805 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -27,6 +27,7 @@
#include <o3tl/make_shared.hxx>
#include <tools/stream.hxx>
#include <sal/log.hxx>
+#include <osl/diagnose.h>
namespace ww8
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index b404d4b69820..afd4e696780d 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -23,7 +23,6 @@
#include <memory>
#include <vector>
-#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <IDocumentExternalData.hxx>
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 0ecda9170a19..b5d4897253ea 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -29,6 +29,7 @@
#include <ndtxt.hxx>
#include <dbgoutsw.hxx>
#include <sal/log.hxx>
+#include <osl/diagnose.h>
namespace ww8
{
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 2439cfabf5f8..72116df53bc2 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -31,13 +31,10 @@
#include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <swtypes.hxx>
-#include <wrtswtbl.hxx>
#include <fldbas.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <unotools/saveopt.hxx>
-#include <vector>
-
class Point;
class SvxCaseMapItem;
class SvxColorItem;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c686845dce7f..6de60f9eaae5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -117,6 +117,7 @@
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
+#include <poolfmt.hxx>
#include <charatr.hxx>
#include <swmodule.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 46b3833ea49f..2d4726bbebdb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -26,6 +26,7 @@
#include "fields.hxx"
#include <IMark.hxx>
#include "docxexport.hxx"
+#include <wrtswtbl.hxx>
#include <editeng/boxitem.hxx>
#include <sax/fshelper.hxx>
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 7babed3ebb44..4a0d84205d2c 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -64,6 +64,7 @@
#include <section.hxx>
#include <ftninfo.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <swdbdata.hxx>
#include <editeng/unoprnms.hxx>
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 1de037fb7662..0424f2619e75 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -23,13 +23,10 @@
#include "wrtww8.hxx"
#include <sax/fshelper.hxx>
-#include <sax/fastattribs.hxx>
#include <rtl/ustring.hxx>
#include <cstdio>
#include <memory>
-#include <vector>
-#include <boost/optional.hpp>
#include <ndole.hxx>
class DocxAttributeOutput;
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index c2ec261d0d20..614069f0dd5d 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
+#include <sal/types.h>
+
#include <vector>
class SwFormatFootnote;
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index da04f259316e..b572a728c5db 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -29,6 +29,7 @@
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
#include <fmtcntnt.hxx>
+#include <fmtornt.hxx>
#include <ndtxt.hxx>
#include <txatbase.hxx>
#include <fmtfsize.hxx>
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index a38f0c02b0e7..3e7e49edf0fc 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_ESCHER_HXX
#include <filter/msfilter/escherex.hxx>
+#include <svx/svdtrans.hxx>
+#include "wrtww8.hxx"
const sal_uInt32 nInlineHack = 0x00010001;
class SwFrameFormat;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index d49dba1e57a8..35a5645e7041 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -82,6 +82,7 @@
#include <grfatr.hxx>
#include <ndole.hxx>
#include <lineinfo.hxx>
+#include <redline.hxx>
#include <rtf.hxx>
#include <IDocumentSettingAccess.hxx>
#include <vcl/cvtgrf.hxx>
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index 1b4799d5978f..ba8f020d4994 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -26,6 +26,8 @@
#include "attributeoutputbase.hxx"
#include "rtfstringbuffer.hxx"
+#include <wrtswtbl.hxx>
+
#include <rtl/strbuf.hxx>
#include <boost/optional.hpp>
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 504424b70d8a..4c8ed0281537 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -43,6 +43,8 @@
#include <editeng/boxitem.hxx>
#include <editeng/shaditem.hxx>
#include <lineinfo.hxx>
+#include <poolfmt.hxx>
+#include <redline.hxx>
#include <swmodule.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <IDocumentStylePoolAccess.hxx>
@@ -50,6 +52,7 @@
#include <svtools/rtfkeywd.hxx>
#include <filter/msfilter/rtfutil.hxx>
#include <unotools/docinfohelper.hxx>
+#include <osl/diagnose.h>
#include <rtl/tencinfo.h>
#include <sal/log.hxx>
#if OSL_DEBUG_LEVEL > 1
diff --git a/sw/source/filter/ww8/sortedarray.hxx b/sw/source/filter/ww8/sortedarray.hxx
index 2e36fba4155c..7efec13aa9ff 100644
--- a/sw/source/filter/ww8/sortedarray.hxx
+++ b/sw/source/filter/ww8/sortedarray.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_SORTEDARRAY_HXX
#include <osl/diagnose.h>
-#include <sal/log.hxx>
#include <algorithm>
//simple template that manages a static [] array by sorting at construction
diff --git a/sw/source/filter/ww8/types.hxx b/sw/source/filter/ww8/types.hxx
index c832e133cff8..f2fd85817c49 100644
--- a/sw/source/filter/ww8/types.hxx
+++ b/sw/source/filter/ww8/types.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_TYPES_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_TYPES_HXX
+#include <sal/types.h>
+
#include <vector>
namespace ww
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index eb46cfb1463c..5e62280a501a 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -48,6 +48,8 @@
#include <docary.hxx>
#include <charfmt.hxx>
#include <fchrfmt.hxx>
+#include <redline.hxx>
+#include "types.hxx"
#include <unotools/streamwrap.hxx>
#include <svtools/embedhlp.hxx>
#include <numrule.hxx>
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index 80430bcca9d7..4f6f67e49b8d 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -26,7 +26,6 @@
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <sfx2/objsh.hxx>
-#include "types.hxx"
#include <svl/itempool.hxx>
#include <svl/itemset.hxx>
#include <svx/svdtypes.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index fc69bb8ed574..c802760b4cdf 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -43,6 +43,7 @@
#include <fmtclds.hxx>
#include <hfspacingitem.hxx>
#include <fmtfsize.hxx>
+#include <poolfmt.hxx>
#include <swrect.hxx>
#include <fmthdft.hxx>
#include <frmatr.hxx>
diff --git a/sw/source/filter/ww8/writerwordglue.hxx b/sw/source/filter/ww8/writerwordglue.hxx
index 362a8e19a342..3b532356602a 100644
--- a/sw/source/filter/ww8/writerwordglue.hxx
+++ b/sw/source/filter/ww8/writerwordglue.hxx
@@ -21,7 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_WW8_WRITERWORDGLUE_HXX
#include "needed_cast.hxx"
-#include "types.hxx"
class SwFrameFormat;
class SfxItemSet;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index bf682a5880d5..1f3dec9ef7ce 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -76,6 +76,7 @@
#include <ndole.hxx>
#include <unodraw.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include "ww8par.hxx"
#include <breakit.hxx>
#include <com/sun/star/i18n/ScriptType.hpp>
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 03b7ace7caa8..42345b5b147e 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -57,6 +57,7 @@
#include <lineinfo.hxx>
#include <fmtline.hxx>
#include <swtable.hxx>
+#include <redline.hxx>
#include <msfilter.hxx>
#include <swmodule.hxx>
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 91be4679ff4d..b6e98bcde657 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -71,6 +71,7 @@
#include <shellio.hxx>
#include <docstat.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <IMark.hxx>
#include <swtable.hxx>
#include "wrtww8.hxx"
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index a8c81bf07d6c..d2ce90413a4f 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -26,7 +26,6 @@
#include <editeng/editdata.hxx>
#include <shellio.hxx>
-#include <wrt_fn.hxx>
#include "ww8struc.hxx"
#include "ww8scan.hxx"
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 10e58270ab60..6cdd6784567d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -104,6 +104,7 @@
#include <flddat.hxx>
#include <ndtxt.hxx>
#include <swrect.hxx>
+#include <redline.hxx>
#include <reffld.hxx>
#include <ftninfo.hxx>
#include <charfmt.hxx>
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index f923e35617ed..a4b9e7d167fe 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -24,6 +24,7 @@
#include <swerror.h>
#include <ndtxt.hxx>
#include <pam.hxx>
+#include <poolfmt.hxx>
#include <shellio.hxx>
#include <docsh.hxx>
#include <fmtanchr.hxx>
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index 6d865ad787c5..61b3f6fc6741 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -22,6 +22,8 @@
#include <memory>
#include <sot/storage.hxx>
+
+#include <doc.hxx>
#include "ww8scan.hxx"
class SwTextBlocks;
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index ce3c2e4410a0..0e98b7ddda5c 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -22,7 +22,12 @@
#include <vector>
#include <stack>
+
+#include <filter/msfilter/msdffimp.hxx>
+#include <svx/svdpage.hxx>
+
#include "writerhelper.hxx"
+#include "ww8struc.hxx"
struct EscherShape
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 792b83aad76a..da0d802f2dd5 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -47,6 +47,7 @@
#include <editeng/outlobj.hxx>
#include <editeng/brushitem.hxx>
+#include <editeng/formatbreakitem.hxx>
#include <editeng/tstpitem.hxx>
#include <editeng/ulspitem.hxx>
#include <editeng/langitem.hxx>
@@ -82,6 +83,7 @@
#include <ndtxt.hxx>
#include <pagedesc.hxx>
#include <paratr.hxx>
+#include <poolfmt.hxx>
#include <fmtclbl.hxx>
#include <section.hxx>
#include <docsh.hxx>
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index 4875270e6e27..86f84364aa0e 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -20,11 +20,7 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8PAR2_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_WW8PAR2_HXX
-#include <swtypes.hxx>
#include <fmtfsize.hxx>
-#include <fmtornt.hxx>
-#include <fmtsrnd.hxx>
-#include <editeng/lrspitem.hxx>
#include <svl/itemset.hxx>
#include <svx/swframetypes.hxx>
#include <swtable.hxx>
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 2c97062f01ff..fd517e6999b4 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -79,6 +79,7 @@
#include <breakit.hxx>
#include <fmtclds.hxx>
#include <pagedesc.hxx>
+#include <poolfmt.hxx>
#include <SwStyleNameMapper.hxx>
#include "ww8scan.hxx"
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 075756a6d558..0073caefb9ff 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -70,6 +70,7 @@
#include <i18nlangtag/mslangid.hxx>
#include <svx/xfillit0.hxx>
#include <svx/xflclit.hxx>
+#include "sortedarray.hxx"
#include "sprmids.hxx"
#include <fmtpdsc.hxx>
#include <node.hxx>
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 45454a6d3187..f9629bbd33f8 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -20,10 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX
#define INCLUDED_SW_SOURCE_FILTER_WW8_WW8SCAN_HXX
-#ifndef LONG_MAX
-#include <limits.h>
-#endif
-#include <algorithm>
#include <cassert>
#include <cstddef>
#include <deque>
@@ -36,13 +32,10 @@
#include <tools/solar.h>
#include <tools/stream.hxx>
#include <rtl/ustring.hxx>
-#include "sortedarray.hxx"
#include "ww8struc.hxx"
#include "types.hxx"
-#include <unomid.h>
-
class SvStream;
//Commonly used string literals for stream and storage names in word docs
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 5e2a468947cc..f4f50e1e748d 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -22,13 +22,15 @@
#include <sal/config.h>
-#include <osl/endian.h>
#include <rtl/ustring.hxx>
-#include <editeng/borderline.hxx>
#include <filter/msfilter/util.hxx>
#include <i18nlangtag/lang.h>
#include <tools/color.hxx>
+#include <tools/solar.h>
+#include <tools/stream.hxx>
+
+#include <vector>
#ifdef _WIN32
# pragma pack(push, 2)
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 1dbd9f63dfa0..a82a0315e056 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -19,9 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_WRTXML_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <shellio.hxx>
diff --git a/sw/source/filter/xml/xmlbrshe.hxx b/sw/source/filter/xml/xmlbrshe.hxx
index e9096a5a7230..1e970ff8ed04 100644
--- a/sw/source/filter/xml/xmlbrshe.hxx
+++ b/sw/source/filter/xml/xmlbrshe.hxx
@@ -20,9 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLBRSHE_HXX
-#include <rtl/ustring.hxx>
-#include <xmloff/attrlist.hxx>
-
class SvxBrushItem;
class SwXMLExport;
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index a7d290a2d640..f3f07c33c351 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -20,7 +20,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLEXPIT_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLEXPIT_HXX
-#include <tools/solar.h>
#include <xmloff/xmlexppr.hxx>
#include "xmlitmap.hxx"
#include <vector>
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index fb326377d382..ed2317c73866 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -26,8 +26,6 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
-#include <sot/storage.hxx>
-
#include <xmloff/xmlictxt.hxx>
#include <xmloff/xmlimp.hxx>
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 47a367fdd9ca..d6c19b20bea3 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -19,9 +19,6 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_XML_XMLIMPIT_HXX
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLIMPIT_HXX
-#include <limits.h>
-#include <tools/solar.h>
-
#include <com/sun/star/xml/sax/XAttributeList.hpp>
#include "xmlitmap.hxx"
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index b8248ad6dc6f..4f06cfc94d9c 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -21,8 +21,6 @@
#define INCLUDED_SW_SOURCE_FILTER_XML_XMLITEM_HXX
#include <com/sun/star/xml/sax/XAttributeList.hpp>
-#include <tools/solar.h>
-#include <limits.h>
#include <xmloff/xmlictxt.hxx>
class SfxItemSet;
diff --git a/sw/source/filter/xml/xmlithlp.hxx b/sw/source/filter/xml/xmlithlp.hxx
index e5498009bd3e..57d688feffe5 100644
--- a/sw/source/filter/xml/xmlithlp.hxx
+++ b/sw/source/filter/xml/xmlithlp.hxx
@@ -22,7 +22,6 @@
#include <sal/types.h>
#include <xmloff/xmlement.hxx>
-#include <hintids.hxx>
#include <editeng/brushitem.hxx>
namespace editeng { class SvxBorderLine; }
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 9d5272e46d37..e8e10df55225 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -22,6 +22,8 @@
#include <xmloff/XMLTextTableContext.hxx>
+#include "xmlimp.hxx"
+
#include <memory>
#include <unordered_map>
#include <vector>
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 40d6f96e5370..0ccb11f233e2 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -61,6 +61,7 @@
#include <svtools/embedhlp.hxx>
#include <svl/urihelper.hxx>
#include <sfx2/frmdescr.hxx>
+#include <tools/globname.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index fb4ecac28965..ec585cda8c25 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3038,13 +3038,16 @@ void SAL_CALL SwXTextDocument::render(
SwWrtShell* pWrtShell = pSwView ? pSwView->GetWrtShellPtr() : nullptr;
SwPrintData rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ if (bIsPDFExport)
+ {
+ rSwPrtOptions.SetPrintPostIts(
+ lcl_GetBoolProperty(rxOptions, "ExportNotesInMargin")
+ ? SwPostItMode::InMargins
+ : SwPostItMode::NONE);
+ }
if (bIsPDFExport && (bFirstPage || bHasPDFExtOutDevData) && pWrtShell)
{
- rSwPrtOptions.SetPrintPostIts(
- lcl_GetBoolProperty(rxOptions, "ExportNotesInMargin")
- ? SwPostItMode::InMargins
- : SwPostItMode::NONE);
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, false, rSwPrtOptions );
}
diff --git a/ucb/qa/complex/ucb/UCB.java b/ucb/qa/complex/ucb/UCB.java
index ddaac8790297..2a3b1acbc58d 100644
--- a/ucb/qa/complex/ucb/UCB.java
+++ b/ucb/qa/complex/ucb/UCB.java
@@ -117,10 +117,11 @@ public class UCB {
System.out.println("now executing open");
executeCommand(content, "open", aArg);
- fail("Expected 'IllegalArgumentException' was not thrown.");
+ fail("Expected exception 'IllegalArgumentException' or 'IllegalIdentifierException' was not thrown.");
} catch (com.sun.star.lang.IllegalArgumentException ex) {
- //TODO error message;
- System.out.println("Correct exception thrown: " + ex.getClass().toString());
+ // correct
+ } catch (com.sun.star.ucb.IllegalIdentifierException ex) {
+ // correct
} catch(com.sun.star.ucb.InteractiveNetworkException ex) {
System.out.println("This Exception is correctly thrown when no Proxy in StarOffice is used.");
System.out.println("To reproduce the bug behaviour, use a Proxy and try again.");
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 93cf2bf2b82f..a9f9fb613f49 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -64,6 +64,7 @@
#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
+#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/InteractiveNetworkConnectException.hpp>
#include <com/sun/star/ucb/InteractiveNetworkResolveNameException.hpp>
#include <com/sun/star/ucb/InteractiveIOException.hpp>
@@ -226,6 +227,7 @@ enum ACTION { NOACTION,
THROWAUTHENTICATIONREQUEST,
THROWACCESSDENIED,
THROWINTERACTIVECONNECT,
+ THROWMALFORMED,
THROWRESOLVENAME,
THROWQUOTE,
THROWNOFILE,
@@ -342,6 +344,15 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
Environment);
break;
}
+ case THROWMALFORMED:
+ {
+ IllegalIdentifierException ex;
+ aRet <<= ex;
+ ucbhelper::cancelCommandExecution(
+ aRet,
+ Environment);
+ break;
+ }
case THROWRESOLVENAME:
{
InteractiveNetworkResolveNameException excep;
@@ -536,6 +547,10 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
{
if(e.code() == CURLE_COULDNT_CONNECT)
action = THROWINTERACTIVECONNECT;
+ else if (e.code() == CURLE_URL_MALFORMAT)
+ {
+ action = THROWMALFORMED;
+ }
else if(e.code() == CURLE_COULDNT_RESOLVE_HOST )
action = THROWRESOLVENAME;
else if(e.code() == CURLE_FTP_USER_PASSWORD_INCORRECT ||
diff --git a/vcl/opengl/x11/X11DeviceInfo.cxx b/vcl/opengl/x11/X11DeviceInfo.cxx
index 577e2c2ad3b2..f51aa0950f85 100644
--- a/vcl/opengl/x11/X11DeviceInfo.cxx
+++ b/vcl/opengl/x11/X11DeviceInfo.cxx
@@ -18,6 +18,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <stdint.h>
#include <errno.h>
#include <sys/utsname.h>
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 602dd6a4a0b7..941186d9bd6b 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -681,7 +681,8 @@ void PdfExportTest::testSofthyphenPos()
FPDF_PAGEOBJECT pPdfPageObject = FPDFPage_GetObject(pPdfPage.get(), i);
CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_TEXT, FPDFPageObj_GetType(pPdfPageObject));
haveText = true;
- double const size(FPDFTextObj_GetFontSize(pPdfPageObject));
+ float size{};
+ FPDFTextObj_GetFontSize(pPdfPageObject, &size);
CPPUNIT_ASSERT_DOUBLES_EQUAL(11.05, size, 1E-06);
}
@@ -1671,7 +1672,7 @@ void PdfExportTest::testTdf115262()
{
unsigned long nTextSize = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
std::vector<sal_Unicode> aText(nTextSize);
- FPDFTextObj_GetText(pPageObject, pTextPage, aText.data(), nTextSize);
+ FPDFTextObj_GetText(pPageObject, pTextPage, reinterpret_cast<FPDF_WCHAR*>(aText.data()), nTextSize);
OUString sText(aText.data(), nTextSize / 2 - 1);
if (sText == "400")
nRowTop = fTop;
@@ -1706,7 +1707,7 @@ void PdfExportTest::testTdf121962()
continue;
unsigned long nTextSize = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 0);
std::vector<sal_Unicode> aText(nTextSize);
- FPDFTextObj_GetText(pPageObject, pTextPage, aText.data(), nTextSize);
+ FPDFTextObj_GetText(pPageObject, pTextPage, reinterpret_cast<FPDF_WCHAR*>(aText.data()), nTextSize);
OUString sText(aText.data(), nTextSize / 2 - 1);
CPPUNIT_ASSERT(sText != "** Expression is faulty **");
}
@@ -1737,7 +1738,7 @@ void PdfExportTest::testTdf115967()
continue;
unsigned long nTextSize = FPDFTextObj_GetText(pPageObject, pTextPage, nullptr, 2);
std::vector<sal_Unicode> aText(nTextSize);
- FPDFTextObj_GetText(pPageObject, pTextPage, aText.data(), nTextSize);
+ FPDFTextObj_GetText(pPageObject, pTextPage, reinterpret_cast<FPDF_WCHAR*>(aText.data()), nTextSize);
OUString sChar(aText.data(), nTextSize / 2 - 1);
sText += sChar.trim();
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b3e33a6c4203..b607a70cddaf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1857,9 +1857,6 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nSty
nStyle &= ~WB_TABSTOP;
}
- if ( IsChecked() && IsRadioCheckEnabled() )
- ImplUncheckAllOther( /*bSetStyle=*/false );
-
return nStyle;
}
@@ -2245,10 +2242,9 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud
return aGroup;
}
-void RadioButton::ImplUncheckAllOther( const bool bSetStyle )
+void RadioButton::ImplUncheckAllOther()
{
- if ( bSetStyle )
- mpWindowImpl->mnStyle |= WB_TABSTOP;
+ mpWindowImpl->mnStyle |= WB_TABSTOP;
std::vector<VclPtr<RadioButton> > aGroup(GetRadioButtonGroup(false));
// iterate over radio button group and checked buttons
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index eb730fe578a7..7e40830e7f7b 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -690,7 +690,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY )
}
}
-void GDIMetaFile::Scale( double fScaleX, double fScaleY )
+void GDIMetaFile::ScaleActions(double const fScaleX, double const fScaleY)
{
for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() )
{
@@ -706,6 +706,11 @@ void GDIMetaFile::Scale( double fScaleX, double fScaleY )
pModAct->Scale( fScaleX, fScaleY );
}
+}
+
+void GDIMetaFile::Scale( double fScaleX, double fScaleY )
+{
+ ScaleActions(fScaleX, fScaleY);
m_aPrefSize.setWidth( FRound( m_aPrefSize.Width() * fScaleX ) );
m_aPrefSize.setHeight( FRound( m_aPrefSize.Height() * fScaleY ) );
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index ef3bf456e7a9..58a2028aa1aa 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -125,7 +125,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bo
*/
if ( !mpWindowImpl )
return css::uno::Reference< css::accessibility::XAccessible >();
- if ( !mpWindowImpl->mxAccessible.is() && bCreate )
+ if (!mpWindowImpl->mxAccessible.is() && !mpWindowImpl->mbInDispose && bCreate)
mpWindowImpl->mxAccessible = CreateAccessible();
return mpWindowImpl->mxAccessible;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 508003297f1e..8c99e834ce50 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3224,9 +3224,35 @@ SdXMLFloatingFrameShapeContext::~SdXMLFloatingFrameShapeContext()
{
}
+uno::Reference<drawing::XShape> SdXMLFloatingFrameShapeContext::CreateFloatingFrameShape() const
+{
+ uno::Reference<lang::XMultiServiceFactory> xServiceFact(GetImport().GetModel(), uno::UNO_QUERY);
+ if (!xServiceFact.is())
+ return nullptr;
+ uno::Reference<drawing::XShape> xShape(
+ xServiceFact->createInstance("com.sun.star.drawing.FrameShape"), uno::UNO_QUERY);
+ return xShape;
+}
+
void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& )
{
- AddShape("com.sun.star.drawing.FrameShape");
+ uno::Reference<drawing::XShape> xShape(SdXMLFloatingFrameShapeContext::CreateFloatingFrameShape());
+
+ uno::Reference< beans::XPropertySet > xProps(xShape, uno::UNO_QUERY);
+ // set FrameURL before AddShape, we have to do it again later because it
+ // gets cleared when the SdrOle2Obj is attached to the XShape. But we want
+ // FrameURL to exist when AddShape triggers SetPersistName which itself
+ // triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to
+ // know what URL will end up being used. So bodge this by setting FrameURL
+ // to the temp pre-SdrOle2Obj attached properties and we can smuggle it
+ // eventually into SdrOle2Obj::SetPersistName at the right point after
+ // PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called
+ // in order to inform the link manager that this is an IFrame that links to
+ // a URL
+ if (xProps && !maHref.isEmpty())
+ xProps->setPropertyValue("FrameURL", Any(maHref));
+
+ AddShape(xShape);
if( mxShape.is() )
{
@@ -3235,7 +3261,6 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
// set pos, size, shear and rotate
SetTransformation();
- uno::Reference< beans::XPropertySet > xProps( mxShape, uno::UNO_QUERY );
if( xProps.is() )
{
if( !maFrameName.isEmpty() )
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index c1e34a138093..a82bebbc42f3 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -517,6 +517,8 @@ private:
OUString maFrameName;
OUString maHref;
+ css::uno::Reference<css::drawing::XShape> CreateFloatingFrameShape() const;
+
public:
SdXMLFloatingFrameShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index f11ad59d8ba1..6ac0cbddaa3e 100644
--- a/xmlsecurity/source/gpg/SEInitializer.cxx
+++ b/xmlsecurity/source/gpg/SEInitializer.cxx
@@ -14,6 +14,8 @@
#include <global.h>
+#include <memory>
+
namespace com::sun::star::uno { class XComponentContext; }
using namespace css;
diff --git a/xmlsecurity/source/gpg/SecurityEnvironment.hxx b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
index a8aacfa5a10b..3b9a21a8f93b 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
@@ -18,6 +18,8 @@
#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <memory>
+
namespace com::sun::star::security { class XCertificate; }
namespace GpgME { class Context; }
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index 540028b22fc9..5fe6f53eb701 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -17,6 +17,7 @@
#include <xmloff/nmspmap.hxx>
+#include <memory>
#include <stack>
class XSecController;
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index 7674bf28b84d..a54bbdac37a5 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -27,6 +27,7 @@
#include <xmloff/nmspmap.hxx>
+#include <memory>
#include <stack>
class XMLSignatureHelper;