summaryrefslogtreecommitdiff
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.ac15
-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
-rw-r--r--desktop/source/app/cmdlineargs.cxx10
m---------dictionaries0
-rw-r--r--download.lst44
-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/ExternalPackage_curl.mk2
-rw-r--r--external/curl/ExternalProject_curl.mk4
-rw-r--r--external/curl/clang-cl.patch.02
-rw-r--r--external/curl/curl-7.26.0_win-proxy.patch25
-rw-r--r--external/curl/curl-msvc-disable-protocols.patch.14
-rw-r--r--external/curl/curl-msvc.patch.14
-rw-r--r--external/curl/curl-nss.patch.115
-rw-r--r--external/curl/zlib.patch.020
-rw-r--r--external/expat/expat-winapi.patch13
-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/libxml2/ExternalPackage_libxml2.mk2
-rw-r--r--external/libxml2/UnpackedTarball_libxml2.mk3
-rw-r--r--external/libxml2/libxml2-android.patch6
-rw-r--r--external/libxml2/libxml2-config.patch.143
-rw-r--r--external/libxml2/xml2-config.in28
-rw-r--r--external/nss/ExternalProject_nss.mk3
-rw-r--r--external/nss/asan.patch.14
-rw-r--r--external/nss/nss.patch6
-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/poppler/StaticLibrary_poppler.mk7
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk2
-rw-r--r--external/poppler/disable-freetype.patch.141
-rw-r--r--external/poppler/gcc7-EntityInfo.patch.148
-rw-r--r--external/poppler/poppler-config.patch.169
-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--external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch29
-rw-r--r--external/zlib/UnpackedTarball_zlib.mk7
-rw-r--r--external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch32
-rw-r--r--external/zlib/ubsan.patch11
-rw-r--r--filter/qa/data/commentsInMargin.odtbin0 -> 9938 bytes
-rw-r--r--filter/source/pdf/impdialog.cxx12
-rw-r--r--filter/source/pdf/impdialog.hxx2
-rw-r--r--filter/source/pdf/pdfexport.cxx8
-rw-r--r--filter/source/pdf/pdfexport.hxx1
-rw-r--r--filter/source/pdf/pdffilter.cxx1
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx1
-rw-r--r--filter/uiconfig/ui/pdfgeneralpage.ui867
-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/sfx2/objsh.hxx14
-rw-r--r--include/sfx2/strings.hrc2
-rw-r--r--include/sfx2/viewfrm.hxx1
-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--include/vcl/pdfextoutdevdata.hxx4
-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--officecfg/registry/schema/org/openoffice/Office/Common.xcs22
-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/core/tool/interpr7.cxx3
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx9
-rw-r--r--scp2/source/ooo/windowscustomaction_ooo.scp18
-rw-r--r--sdext/Executable_xpdfimport.mk4
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx52
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx57
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx10
-rw-r--r--setup_native/Library_shlxtmsi.mk1
-rw-r--r--setup_native/source/win32/customactions/shellextensions/shlxtmsi.def2
-rw-r--r--setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx140
-rw-r--r--sfx2/source/appl/macroloader.cxx9
-rw-r--r--sfx2/source/doc/iframe.cxx73
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx22
-rw-r--r--sfx2/source/inc/macroloader.hxx2
-rw-r--r--sfx2/source/view/viewfrm.cxx40
-rw-r--r--solenv/clang-format/blacklist1
-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--svl/source/passwordcontainer/passwordcontainer.cxx198
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.hxx69
-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/docsh.hxx13
-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/in_056132_mod.odtbin0 -> 13647 bytes
-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.cxx73
-rw-r--r--sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odtbin0 -> 10030 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx7
-rw-r--r--sw/qa/extras/odfimport/data/tdf149978.fodt53
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx12
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx2
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx2
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep.docbin16384 -> 0 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odtbin0 -> 15980 bytes
-rw-r--r--sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odtbin0 -> 13658 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export.cxx22
-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/calcmove.cxx7
-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.cxx32
-rw-r--r--sw/source/core/layout/wsfrm.cxx27
-rw-r--r--sw/source/core/ole/ndole.cxx99
-rw-r--r--sw/source/core/txtnode/thints.cxx9
-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/htmlplug.cxx7
-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.cxx10
-rw-r--r--sw/source/uibase/app/docsh.cxx10
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.hxx1
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.hxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx10
-rw-r--r--test/source/xmltesttools.cxx8
m---------translations0
-rw-r--r--ucb/qa/complex/ucb/UCB.java7
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx15
-rw-r--r--unoxml/source/xpath/xpathobject.cxx2
-rw-r--r--uui/source/iahndl-authentication.cxx5
-rw-r--r--vcl/opengl/x11/X11DeviceInfo.cxx1
-rw-r--r--vcl/qa/cppunit/pdfexport/data/reduce-small-image.fodt21
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx50
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/gdi/gdimtf.cxx7
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx4
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx6
-rw-r--r--vcl/source/window/accessibility.cxx2
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--xmloff/source/draw/ximpshap.cxx33
-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
274 files changed, 3390 insertions, 2315 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 0fbca56b268b..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.16],[],[],[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
@@ -8061,7 +8061,11 @@ else
SYSTEM_ZLIB=
BUILD_TYPE="$BUILD_TYPE ZLIB"
ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
- ZLIB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lzlib"
+ if test "$COM" = "MSC"; then
+ ZLIB_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/zlib.lib"
+ else
+ ZLIB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lzlib"
+ fi
fi
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)
@@ -8745,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/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 30d0c3f4cced..dc82f0588596 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -29,6 +29,7 @@
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
#include <rtl/uri.hxx>
+#include <tools/urlobj.hxx>
#include <rtl/ustring.hxx>
#include <rtl/process.h>
#include <comphelper/lok.hxx>
@@ -169,7 +170,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur
}
if (nURIlen < 0)
nURIlen = rest2.getLength();
- arg = rest2.copy(0, nURIlen);
+ auto const uri = rest2.copy(0, nURIlen);
+ if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+ // Let the "Open" machinery process the full command URI (leading to failure, by intention,
+ // as the "Open" machinery does not know about those command URI schemes):
+ curEvt = CommandLineEvent::Open;
+ } else {
+ arg = uri;
+ }
return curEvt;
}
diff --git a/dictionaries b/dictionaries
-Subproject be0a77ce3842c5059b9bc5bc5523bd6125b7838
+Subproject fad51a3e1c2a485b98fc388768d869e01905bb1
diff --git a/download.lst b/download.lst
index f17901ded4b6..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 := be42766d5664a739c3974ee3dfbbcbe978a4ccb1fe628bb1d9b59ac79e445fb5
-export CURL_TARBALL := curl-7.78.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
@@ -42,8 +42,8 @@ export EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
export ETONYEK_SHA256SUM := e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
export ETONYEK_VERSION_MICRO := 9
export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := de55794b7a9bc214852fdc075beaaecd854efe1361597e6268ee87946951289b
-export EXPAT_TARBALL := expat-2.4.6.tar.xz
+export EXPAT_SHA256SUM := ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
export FIREBIRD_SHA256SUM := 6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
export FONTCONFIG_SHA256SUM := cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
@@ -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,9 +158,9 @@ 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 := 276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e
-export LIBXML_VERSION_MICRO := 13
-export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.xz
+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
export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
@@ -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 := 07a9e5b70f121a62706140d4cacc3006d3efb869da40f3a2bf7a65d37847f4d9
-export NSS_TARBALL := nss-3.73-with-nspr-4.32.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 := 016dde34e5f868ea98a32ca99b643325a9682281500942b7113f4ec88d20e2f3
-export POPPLER_TARBALL := poppler-21.01.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 POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb30d5852a41e2e
+export POPPLER_TARBALL := poppler-22.09.0.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
@@ -249,8 +251,8 @@ export WPS_VERSION_MICRO := 10
export WPS_TARBALL := libwps-0.4.$(WPS_VERSION_MICRO).tar.xz
export XSLTML_SHA256SUM := 75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870
export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
-export ZLIB_SHA256SUM := 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
-export ZLIB_TARBALL := zlib-1.2.11.tar.xz
+export ZLIB_SHA256SUM := 7db46b8d7726232a621befaab4a1c870f00a90805511c0e0090441dac57def18
+export ZLIB_TARBALL := zlib-1.2.12.tar.xz
export ZMF_SHA256SUM := 27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22
export ZMF_TARBALL := libzmf-0.0.2.tar.xz
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/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk
index 1fb360c85ca9..3308074b363c 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dyli
else ifeq ($(OS),AIX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
else
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.7.0))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.8.0))
endif
endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk
index 06cc96c2e8de..32dca36c1d07 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -42,8 +42,8 @@ $(call gb_ExternalProject_get_state_target,curl,build):
./configure \
$(if $(filter iOS MACOSX,$(OS)),\
--with-secure-transport,\
- $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
- --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
+ $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") --with-nss-deprecated,--without-nss)) \
+ --without-openssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
--without-libssh2 --without-metalink --without-nghttp2 \
diff --git a/external/curl/clang-cl.patch.0 b/external/curl/clang-cl.patch.0
index 2fbb10c2a9aa..5dfb19d5ba59 100644
--- a/external/curl/clang-cl.patch.0
+++ b/external/curl/clang-cl.patch.0
@@ -1,6 +1,6 @@
--- winbuild/MakefileBuild.vc
+++ winbuild/MakefileBuild.vc
-@@ -60,7 +60,7 @@
+@@ -52,7 +52,7 @@
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
diff --git a/external/curl/curl-7.26.0_win-proxy.patch b/external/curl/curl-7.26.0_win-proxy.patch
index 46cdcc739d80..62016a70e8a0 100644
--- a/external/curl/curl-7.26.0_win-proxy.patch
+++ b/external/curl/curl-7.26.0_win-proxy.patch
@@ -12,18 +12,18 @@
--- 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>
+#endif
+
+ #include "doh.h"
#include "urldata.h"
#include "netrc.h"
-
@@ -4586,6 +4590,21 @@
- }
+ #ifndef CURL_DISABLE_PROXY
#ifndef CURL_DISABLE_HTTP
+#ifdef _WIN32
@@ -31,7 +31,7 @@
+{
+ int bufSize;
+ char *out = NULL;
-+ if(wStr != NULL) {
++ if(wStr) {
+ bufSize = WideCharToMultiByte(
+ CP_ACP, 0, wStr, -1, NULL, 0, NULL, NULL);
+ out = (char *)malloc(bufSize * sizeof(char));
@@ -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,28 +58,29 @@
+ char *ieProxy;
+ char *ieNoProxy;
+ char *pos;
++ bool spacesp;
+
+ ieProxy = wstrToCstr(ieProxyConfig->lpszProxy);
+ ieNoProxy = wstrToCstr(ieProxyConfig->lpszProxyBypass);
+
+ /* Convert the ieNoProxy into a proper no_proxy value */
-+ if(NULL != ieNoProxy) {
++ if(ieNoProxy) {
+ no_proxy = strdup(ieNoProxy);
+ pos = strpbrk(no_proxy, "; ");
-+ while(NULL != pos) {
++ while(pos) {
+ no_proxy[pos-no_proxy] = ',';
+ pos = strpbrk(no_proxy, "; ");
+ }
+ }
+
-+ if(!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;
+
-+ if(NULL != ieProxy) {
++ if(ieProxy) {
+ tok = strtok_s(ieProxy, ";", &saveptr);
-+ if(strchr(tok, '=') == NULL) {
++ if(!strchr(tok, '=')) {
+ proxy = strdup(ieProxy);
+ }
+ else {
@@ -90,7 +91,7 @@
+ }
+ tok = strtok_s(NULL, ";", &saveptr);
+ }
-+ while(NULL != tok);
++ while(tok);
+ }
+ }
+ }
diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1
index a6d06c69b004..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
-@@ -733,4 +733,20 @@
+@@ -654,4 +654,20 @@
# define ENABLE_IPV6 1
#endif
@@ -25,7 +25,7 @@ disable protocols nobody needs in MSVC build
#endif /* HEADER_CURL_CONFIG_WIN32_H */
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 23:41:21.393200000 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 23:34:16.028000000 +0200
-@@ -431,7 +431,7 @@
+@@ -562,7 +562,7 @@
EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
diff --git a/external/curl/curl-msvc.patch.1 b/external/curl/curl-msvc.patch.1
index a5b79a8e9c49..54ad026ec8c7 100644
--- a/external/curl/curl-msvc.patch.1
+++ b/external/curl/curl-msvc.patch.1
@@ -2,7 +2,7 @@ MSVC: using SOLARINC
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 16:36:07.713550851 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 16:38:19.301547594 +0200
-@@ -60,7 +60,7 @@
+@@ -52,7 +52,7 @@
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
@@ -11,7 +11,7 @@ MSVC: using SOLARINC
!ENDIF
LFLAGS = /nologo /machine:$(MACHINE)
-@@ -300,11 +300,11 @@
+@@ -426,11 +426,11 @@
# CURL_XX macros are for the curl.exe command
!IF "$(DEBUG)"=="yes"
diff --git a/external/curl/curl-nss.patch.1 b/external/curl/curl-nss.patch.1
index 69fde5f7f236..2e8766b3d45f 100644
--- a/external/curl/curl-nss.patch.1
+++ b/external/curl/curl-nss.patch.1
@@ -1,12 +1,17 @@
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
-@@ -24009,7 +24009,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
- $as_echo "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
+--- 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"
- addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
+ addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lnssutil3"
++ case $host_os in
++ *android*)
++ addlib="${addlib} -llog"
++ ;;
++ esac
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
diff --git a/external/curl/zlib.patch.0 b/external/curl/zlib.patch.0
index f4a0ad4b152f..b4442ba262d1 100644
--- a/external/curl/zlib.patch.0
+++ b/external/curl/zlib.patch.0
@@ -1,22 +1,22 @@
--- configure
+++ configure
-@@ -20709,7 +20709,6 @@
+@@ -23035,7 +23035,6 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
-ZLIB_LIBS=""
# Check whether --with-zlib was given.
- if test "${with_zlib+set}" = set; then :
-@@ -20718,6 +20719,7 @@
+ if test ${with_zlib+y}
+@@ -23045,6 +23044,7 @@
if test "$OPT_ZLIB" = "no" ; then
+ ZLIB_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
- $as_echo "$as_me: WARNING: zlib disabled" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
+ printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
else
-@@ -20725,6 +20725,21 @@
+@@ -23052,6 +23052,21 @@
OPT_ZLIB=""
fi
@@ -38,8 +38,8 @@
if test -z "$OPT_ZLIB" ; then
if test -n "$PKG_CONFIG"; then
-@@ -21005,6 +21020,7 @@
- $as_echo "$as_me: found both libz and libz.h header" >&6;}
+@@ -23344,6 +23359,7 @@
+ printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
curl_zlib_msg="enabled"
fi
+ fi
@@ -48,7 +48,7 @@
if test x"$AMFIXLIB" = x1; then
--- configure.ac
+++ configure.ac
-@@ -880,19 +880,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)
-@@ -975,6 +986,7 @@
+@@ -1336,6 +1347,7 @@
AC_MSG_NOTICE([found both libz and libz.h header])
curl_zlib_msg="enabled"
fi
diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
index 7eae7d5d6139..fed65644a732 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,6 +1,6 @@
---- misc/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:17.375000000 +0000
-+++ misc/build/expat-2.1.0/lib/expat_external.h 2009-11-16 08:53:34.703125000 +0000
-@@ -81,10 +81,6 @@
+--- misc/expat-2.5.0/lib/expat_external.h 2022-10-25 01:32:54.000000000 +0900
++++ misc/build/expat-2.5.0/lib/expat_external.h 2022-10-30 23:09:47.339459134 +0900
+@@ -88,10 +88,6 @@
# ifndef XML_BUILDING_EXPAT
/* using Expat from an application */
@@ -11,12 +11,13 @@
# endif
#endif /* not defined XML_STATIC */
---- misc/expat-2.1.0/lib/xmlparse.c 2021-05-23 16:56:25.000000000 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c 2021-05-25 12:42:11.997173600 +0100
-@@ -64,6 +64,8 @@
+--- misc/expat-2.5.0/lib/xmlparse.c 2022-10-26 00:09:08.000000000 +0900
++++ misc/build/expat-2.5.0/lib/xmlparse.c 2022-10-30 23:09:01.843006341 +0900
+@@ -67,6 +67,9 @@
#endif
#ifdef _WIN32
++# undef HAVE_ARC4RANDOM_BUF
+# undef HAVE_GETRANDOM
+# undef HAVE_SYSCALL_GETRANDOM
/* force stdlib to define rand_s() */
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/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk
index d38eb68df0cb..6338fb20b9df 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
endif
else # OS!=WNT
-$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.$(LIBXML_VERSION_MICRO)))
+$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.10.$(LIBXML_VERSION_MICRO)))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 00398f16af56..4ec3fa074dea 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,11 +14,12 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
$(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
- external/libxml2/libxml2-config.patch.1 \
external/libxml2/libxml2-global-symbols.patch \
external/libxml2/libxml2-vc10.patch \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
external/libxml2/libxml2-icu.patch.0 \
))
+$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-android.patch b/external/libxml2/libxml2-android.patch
index 42af83274026..acf9b17e02db 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -2,9 +2,9 @@
+++ misc/build/libxml2-2.7.6/Makefile.in
@@ -1635,7 +1635,7 @@
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
--all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: check-recursive
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
+all-am: Makefile $(LTLIBRARIES) \
config.h
install-binPROGRAMS: install-libLTLIBRARIES
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
deleted file mode 100644
index 5a2ef1485e92..000000000000
--- a/external/libxml2/libxml2-config.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-Hack the xml2-config to return paths into WORKDIR.
-
---- a/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
-+++ b/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
-@@ -1,9 +1,14 @@
- #! /bin/sh
-
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--includedir=@includedir@
--libdir=@libdir@
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#includedir=@includedir@
-+#libdir=@libdir@
-+
-+prefix=${WORKDIR}/UnpackedTarball/libxml2
-+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2
-+includedir=${WORKDIR}/UnpackedTarball/libxml2/include
-+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs
- cflags=
- libs=
-
-@@ -67,7 +72,8 @@
- ;;
-
- --cflags)
-- cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ cflags="-I${includedir}"
- ;;
-
- --libtool-libs)
-@@ -91,7 +96,8 @@
- libs="@XML_LIBDIR@ $libs"
- fi
-
-- libs="$libs @WIN32_EXTRA_LIBADD@"
-+ #libs="$libs @WIN32_EXTRA_LIBADD@"
-+ libs="-L${libdir} -lxml2 -lm"
- ;;
-
- *)
diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in
new file mode 100644
index 000000000000..164508e47e67
--- /dev/null
+++ b/external/libxml2/xml2-config.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+ --cflags)
+ cflags="$LIBXML_CFLAGS"
+ ;;
+ --libs)
+ libs="$LIBXML_LIBS"
+ ;;
+ esac
+ shift
+done
+
+if test -n "$cflags$libs"; then
+ echo $cflags $libs
+fi
+
+exit 0
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 7f730cb2bc87..ac5aff355b38 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -24,9 +24,10 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
MOZ_DEBUG_FLAGS=" " \
OPT_CODE_SIZE=0) \
MOZ_MSVCVERSION=9 OS_TARGET=WIN95 \
+ USE_SYSTEM_ZLIB=1 \
$(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
LIB="$(ILIB)" \
- XCFLAGS="-arch:SSE $(SOLARINC)" \
+ XCFLAGS="-arch:SSE $(SOLARINC) $(ZLIB_CFLAGS)" \
$(MAKE) nss_build_all RC="rc.exe $(SOLARINC)" \
NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \
NSS_DISABLE_GTESTS=1 \
diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1
index 7dfd6ed4e782..ce584a34a3b5 100644
--- a/external/nss/asan.patch.1
+++ b/external/nss/asan.patch.1
@@ -7,6 +7,6 @@ diff -ur nss.org/nss/coreconf/Linux.mk nss/nss/coreconf/Linux.mk
# against the libsanitizer runtime built into the main executable.
-ZDEFS_FLAG = -Wl,-z,defs
+ZDEFS_FLAG =
- DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
- LDFLAGS += $(ARCHFLAG) -z noexecstack
+ DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index d9aaee5199bb..66fbe37dc5ed 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -87,9 +87,9 @@
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
# against the libsanitizer runtime built into the main executable.
ZDEFS_FLAG = -Wl,-z,defs
--DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
-+DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
- LDFLAGS += $(ARCHFLAG) -z noexecstack
+-DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG))
++DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG)) $(if $(filter-out $(OS),ANDROID),-Wl$(COMMA)-z$(COMMA)origin '-Wl$(COMMA)-rpath$(COMMA)$$ORIGIN')
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
# On Maemo, we need to use the -rpath-link flag for even the standard system
@@ -177,8 +177,13 @@
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/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 3cc0a95e3617..1f1adba6ee34 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/fofi/FoFiType1C \
UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/poppler/Annot \
+ UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
UnpackedTarball/poppler/poppler/Array \
UnpackedTarball/poppler/poppler/BBoxOutputDev \
UnpackedTarball/poppler/poppler/CachedFile \
@@ -83,6 +84,8 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/Decrypt \
UnpackedTarball/poppler/poppler/Dict \
UnpackedTarball/poppler/poppler/Error \
+ UnpackedTarball/poppler/poppler/FDPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/FILECacheLoader \
UnpackedTarball/poppler/poppler/FileSpec \
UnpackedTarball/poppler/poppler/FontEncodingTables \
UnpackedTarball/poppler/poppler/Form \
@@ -93,6 +96,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/GfxState \
UnpackedTarball/poppler/poppler/GlobalParams \
UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/ImageEmbeddingUtils \
UnpackedTarball/poppler/poppler/JArithmeticDecoder \
UnpackedTarball/poppler/poppler/JBIG2Stream \
UnpackedTarball/poppler/poppler/JSInfo \
@@ -129,13 +133,12 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/TextOutputDev \
UnpackedTarball/poppler/poppler/PageLabelInfo \
UnpackedTarball/poppler/poppler/SecurityHandler \
- UnpackedTarball/poppler/poppler/StdinCachedFile \
- UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \
UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/ViewerPreferences \
UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/Rendition \
UnpackedTarball/poppler/poppler/DCTStream \
+ UnpackedTarball/poppler/splash/SplashBitmap \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index 68fd06d9403b..0ac3c8aa69c4 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -13,6 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
external/poppler/poppler-config.patch.1 \
+ external/poppler/disable-freetype.patch.1 \
+ external/poppler/gcc7-EntityInfo.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
new file mode 100644
index 000000000000..d59006eba979
--- /dev/null
+++ b/external/poppler/disable-freetype.patch.1
@@ -0,0 +1,41 @@
+disable freetype dependent code
+
+--- poppler/poppler/Form.cc.orig 2022-09-14 15:46:48.588316681 +0200
++++ poppler/poppler/Form.cc 2022-09-14 15:48:01.468274551 +0200
+@@ -46,7 +46,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cctype>
+-#include "goo/ft_utils.h"
++//#include "goo/ft_utils.h"
+ #include "goo/gmem.h"
+ #include "goo/gfile.h"
+ #include "goo/GooString.h"
+@@ -77,8 +77,8 @@
+ #include "fofi/FoFiTrueType.h"
+ #include "fofi/FoFiIdentifier.h"
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+
+ // return a newly allocated char* containing an UTF16BE string of size length
+ char *pdfDocEncodingToUTF16(const std::string &orig, int *length)
+@@ -2730,6 +2730,8 @@
+
+ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle)
+ {
++ return {};
++#if 0
+ if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".otf")) {
+ error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str());
+ return {};
+@@ -2939,6 +2941,7 @@
+ }
+
+ return { dictFontName, fontDictRef };
++#endif
+ }
+
+ std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
diff --git a/external/poppler/gcc7-EntityInfo.patch.1 b/external/poppler/gcc7-EntityInfo.patch.1
new file mode 100644
index 000000000000..b450bff93af9
--- /dev/null
+++ b/external/poppler/gcc7-EntityInfo.patch.1
@@ -0,0 +1,48 @@
+gcc 7.3.1 says:
+
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:42:34: error: function ‘X509CertificateInfo::EntityInfo& X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
+
+--- poppler/poppler/CertificateInfo.h.orig 2022-09-14 19:32:12.426351385 +0200
++++ poppler/poppler/CertificateInfo.h 2022-09-14 19:32:18.947347812 +0200
+@@ -70,7 +70,7 @@
+ ~EntityInfo();
+
+ EntityInfo(EntityInfo &&) noexcept;
+- EntityInfo &operator=(EntityInfo &&) noexcept;
++ EntityInfo &operator=(EntityInfo &&) /*noexcept*/;
+
+ EntityInfo(const EntityInfo &) = delete;
+ EntityInfo &operator=(const EntityInfo &) = delete;
+--- poppler/poppler/CertificateInfo.cc.orig 2022-09-14 19:31:10.225385467 +0200
++++ poppler/poppler/CertificateInfo.cc 2022-09-14 19:31:12.572384182 +0200
+@@ -39,7 +39,7 @@
+
+ X509CertificateInfo::EntityInfo::EntityInfo(X509CertificateInfo::EntityInfo &&other) noexcept = default;
+
+-X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) noexcept = default;
++X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) /*noexcept*/ = default;
+
+ X509CertificateInfo::X509CertificateInfo() : ku_extensions(KU_NONE), cert_version(-1), is_self_signed(false) { }
+
+--- poppler/poppler/GfxFont.cc.orig 2022-09-14 20:24:32.569607333 +0200
++++ poppler/poppler/GfxFont.cc 2022-09-14 20:24:52.323596186 +0200
+@@ -180,7 +180,7 @@
+
+ GfxFontLoc::GfxFontLoc(GfxFontLoc &&other) noexcept = default;
+
+-GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) noexcept = default;
++GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) /*noexcept*/ = default;
+
+ void GfxFontLoc::setPath(GooString *pathA)
+ {
+--- poppler/poppler/GfxFont.h.orig 2022-09-14 20:24:30.784608340 +0200
++++ poppler/poppler/GfxFont.h 2022-09-14 20:25:08.850586861 +0200
+@@ -124,7 +124,7 @@
+ GfxFontLoc(const GfxFontLoc &) = delete;
+ GfxFontLoc(GfxFontLoc &&) noexcept;
+ GfxFontLoc &operator=(const GfxFontLoc &) = delete;
+- GfxFontLoc &operator=(GfxFontLoc &&other) noexcept;
++ GfxFontLoc &operator=(GfxFontLoc &&other) /*noexcept*/;
+
+ // Set the 'path' string from a GooString on the heap.
+ // Ownership of the object is taken.
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index b902402ea4e7..455a88e2afc4 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -16,7 +16,7 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/config.h
-@@ -0,0 +1,221 @@
+@@ -0,0 +1,220 @@
+/* config.h. Generated from config.h.cmake by cmake. */
+
+/* Build against libcurl. */
@@ -105,9 +105,6 @@ index 0fbd336a..451213f8 100644
+#define HAVE_TIMEGM 1
+#endif
+
-+/* Define if you have the iconv() function and it works. */
-+/* #undef HAVE_ICONV */
-+
+/* Define to 1 if you have the `z' library (-lz). */
+/* #undef HAVE_LIBZ */
+
@@ -176,7 +173,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 21.01.0"
++#define PACKAGE_STRING "poppler 22.09.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -185,7 +182,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.01.0"
++#define PACKAGE_VERSION "22.09.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,7 +200,7 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "21.01.0"
++#define VERSION "22.09.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
@@ -228,6 +225,8 @@ index 0fbd336a..451213f8 100644
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
++#define strncasecmp _strnicmp
++#define strcasecmp _stricmp
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
@@ -243,12 +242,12 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/poppler/poppler-config.h
-@@ -0,0 +1,166 @@
+@@ -0,0 +1,161 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
-+// Copyright 1996-2011 Glyph & Cog, LLC
++// Copyright 1996-2011, 2022 Glyph & Cog, LLC
+//
+//========================================================================
+
@@ -282,7 +281,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "21.01.0"
++#define POPPLER_VERSION "22.09.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -369,18 +368,13 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_BOOST_HEADERS */
+#endif
+
-+/* Is splash backend available */
-+#ifndef HAVE_SPLASH
-+/* #undef HAVE_SPLASH */
-+#endif
-+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// copyright notice
-+#define popplerCopyright "Copyright 2005-2021 The Poppler Developers - http://poppler.freedesktop.org"
-+#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
++#define popplerCopyright "Copyright 2005-2022 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// Win32 stuff
@@ -439,9 +433,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "21.01.0"
-+#define POPPLER_VERSION_MAJOR 21
-+#define POPPLER_VERSION_MINOR 1
++#define POPPLER_VERSION "22.09.0"
++#define POPPLER_VERSION_MAJOR 22
++#define POPPLER_VERSION_MINOR 9
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
@@ -455,3 +449,38 @@ index 0fbd336a..451213f8 100644
+}
+
+#endif
+diff --git a/poppler_private_export.h b/poppler_private_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/poppler_private_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_PRIVATE_EXPORT_H
++#define POPPLER_PRIVATE_EXPORT_H
++
++# define POPPLER_PRIVATE_EXPORT
++# define POPPLER_PRIVATE_NO_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED
++# define POPPLER_PRIVATE_DEPRECATED_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_PRIVATE_EXPORT_H */
+
+diff --git a/cpp/poppler_cpp_export.h b/cpp/poppler_cpp_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/cpp/poppler_cpp_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_CPP_EXPORT_H
++#define POPPLER_CPP_EXPORT_H
++
++# define POPPLER_CPP_EXPORT
++# define POPPLER_CPP_NO_EXPORT
++# define POPPLER_CPP_DEPRECATED
++# define POPPLER_CPP_DEPRECATED_EXPORT
++# define POPPLER_CPP_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_CPP_EXPORT_H */
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/external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch b/external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch
new file mode 100644
index 000000000000..c5c95a92b28a
--- /dev/null
+++ b/external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch
@@ -0,0 +1,29 @@
+From 1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d Mon Sep 17 00:00:00 2001
+From: Mark Adler <fork@madler.net>
+Date: Mon, 8 Aug 2022 10:50:09 -0700
+Subject: [PATCH] Fix extra field processing bug that dereferences NULL
+ state->head.
+
+The recent commit to fix a gzip header extra field processing bug
+introduced the new bug fixed here.
+---
+ inflate.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/inflate.c b/inflate.c
+index 7a7289749..2a3c4fe98 100644
+--- a/inflate.c
++++ b/inflate.c
+@@ -763,10 +763,10 @@ int flush;
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
+- len = state->head->extra_len - state->length;
+ if (state->head != Z_NULL &&
+ state->head->extra != Z_NULL &&
+- len < state->head->extra_max) {
++ (len = state->head->extra_len - state->length) <
++ state->head->extra_max) {
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
diff --git a/external/zlib/UnpackedTarball_zlib.mk b/external/zlib/UnpackedTarball_zlib.mk
index e74039d25089..10ee74b9568a 100644
--- a/external/zlib/UnpackedTarball_zlib.mk
+++ b/external/zlib/UnpackedTarball_zlib.mk
@@ -16,10 +16,11 @@ $(eval $(call gb_UnpackedTarball_set_post_action,zlib,\
cp $(addsuffix .c,adler32 compress crc32 deflate inffast inflate inftrees trees zutil) x64 \
))
-$(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,0))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,1))
-$(eval $(call gb_UnpackedTarball_add_patches,zlib, \
- external/zlib/ubsan.patch \
+$(eval $(call gb_UnpackedTarball_add_patches,zlib,\
+ external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch \
+ external/zlib/1eb7682f845ac9e9bf9ae35bbfb3bad5dacbd91d.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch b/external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch
new file mode 100644
index 000000000000..dc84d3a1d385
--- /dev/null
+++ b/external/zlib/eff308af425b67093bab25f80f1ae950166bece1.patch
@@ -0,0 +1,32 @@
+From eff308af425b67093bab25f80f1ae950166bece1 Mon Sep 17 00:00:00 2001
+From: Mark Adler <fork@madler.net>
+Date: Sat, 30 Jul 2022 15:51:11 -0700
+Subject: [PATCH] Fix a bug when getting a gzip header extra field with
+ inflate().
+
+If the extra field was larger than the space the user provided with
+inflateGetHeader(), and if multiple calls of inflate() delivered
+the extra header data, then there could be a buffer overflow of the
+provided space. This commit assures that provided space is not
+exceeded.
+---
+ inflate.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/inflate.c b/inflate.c
+index 7be8c6366..7a7289749 100644
+--- a/inflate.c
++++ b/inflate.c
+@@ -763,9 +763,10 @@ int flush;
+ copy = state->length;
+ if (copy > have) copy = have;
+ if (copy) {
++ len = state->head->extra_len - state->length;
+ if (state->head != Z_NULL &&
+- state->head->extra != Z_NULL) {
+- len = state->head->extra_len - state->length;
++ state->head->extra != Z_NULL &&
++ len < state->head->extra_max) {
+ zmemcpy(state->head->extra + len, next,
+ len + copy > state->head->extra_max ?
+ state->head->extra_max - len : copy);
diff --git a/external/zlib/ubsan.patch b/external/zlib/ubsan.patch
deleted file mode 100644
index 2d7ff8d67967..000000000000
--- a/external/zlib/ubsan.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- trees.c
-+++ trees.c
-@@ -870,7 +870,7 @@
- bi_windup(s); /* align on byte boundary */
- put_short(s, (ush)stored_len);
- put_short(s, (ush)~stored_len);
-- zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
-+ if (stored_len != 0) zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len);
- s->pending += stored_len;
- #ifdef ZLIB_DEBUG
- s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
diff --git a/filter/qa/data/commentsInMargin.odt b/filter/qa/data/commentsInMargin.odt
new file mode 100644
index 000000000000..3286f9e01899
--- /dev/null
+++ b/filter/qa/data/commentsInMargin.odt
Binary files differ
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index bbb6c9973bb3..cda07639baf5 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -74,6 +74,7 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbUseTaggedPDF( false ),
mbUseTaggedPDFUserSelection( false ),
mbExportNotes( true ),
+ mbExportNotesInMargin( false ),
mbViewPDF( false ),
mbUseReferenceXObject( false ),
mbExportNotesPages( false ),
@@ -195,6 +196,8 @@ ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, Sequence< PropertyValue
mbExportOnlyNotesPages = maConfigItem.ReadBool( "ExportOnlyNotesPages", false );
}
mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false );
+ if (mbIsWriter)
+ mbExportNotesInMargin = maConfigItem.ReadBool( "ExportNotesInMargin", false );
mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false );
mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true );
@@ -380,6 +383,8 @@ Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
maConfigItem.WriteBool( "ExportOnlyNotesPages", mbExportOnlyNotesPages );
}
maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
+ if (mbIsWriter)
+ maConfigItem.WriteBool( "ExportNotesInMargin", mbExportNotesInMargin );
maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
@@ -478,6 +483,7 @@ ImpPDFTabGeneralPage::ImpPDFTabGeneralPage(TabPageParent pParent, const SfxItemS
, mxCbExportBookmarks(m_xBuilder->weld_check_button("bookmarks"))
, mxCbExportHiddenSlides(m_xBuilder->weld_check_button("hiddenpages"))
, mxCbExportNotes(m_xBuilder->weld_check_button("comments"))
+ , mxCbExportNotesInMargin(m_xBuilder->weld_check_button("commentsinmargin"))
, mxCbViewPDF(m_xBuilder->weld_check_button("viewpdf"))
, mxCbUseReferenceXObject(m_xBuilder->weld_check_button("usereferencexobject"))
, mxCbExportNotesPages(m_xBuilder->weld_check_button("notes"))
@@ -516,6 +522,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
mbIsWriter = pParent->mbIsWriter;
mbIsSpreadsheet = pParent->mbIsSpreadsheet;
+ mxCbExportNotesInMargin->set_sensitive( mbIsWriter );
mxCbExportEmptyPages->set_sensitive( mbIsWriter );
mxCbExportPlaceholders->set_sensitive( mbIsWriter );
@@ -572,6 +579,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
mxCbExportBookmarks->set_active( pParent->mbExportBookmarks );
mxCbExportNotes->set_active( pParent->mbExportNotes );
+ mxCbExportNotesInMargin->set_active( pParent->mbExportNotesInMargin );
mxCbViewPDF->set_active( pParent->mbViewPDF);
if ( mbIsPresentation )
@@ -609,10 +617,12 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
{
// tdf#54908 Make selection active if there is a selection in Writer's version
mxRbSelection->set_active( bSelectionPresent );
+ mxCbExportNotesInMargin->set_active(pParent->mbExportNotesInMargin);
}
else
{
mxCbExportPlaceholders->set_active(false);
+ mxCbExportNotesInMargin->set_active(false);
}
mxCbExportEmptyPages->set_active(!pParent->mbIsSkipEmptyPages);
mxCbExportPlaceholders->set_active(pParent->mbIsExportPlaceholders);
@@ -632,6 +642,8 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* pParent )
pParent->mbReduceImageResolution = mxCbReduceImageResolution->get_active();
pParent->mnMaxImageResolution = mxCoReduceImageResolution->get_active_text().toInt32();
pParent->mbExportNotes = mxCbExportNotes->get_active();
+ if (mbIsWriter)
+ pParent->mbExportNotesInMargin = mxCbExportNotesInMargin->get_active();
pParent->mbViewPDF = mxCbViewPDF->get_active();
pParent->mbUseReferenceXObject = mxCbUseReferenceXObject->get_active();
if ( mbIsPresentation )
diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx
index c1a9543d09d5..cfbc8aeb6262 100644
--- a/filter/source/pdf/impdialog.hxx
+++ b/filter/source/pdf/impdialog.hxx
@@ -76,6 +76,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController
bool mbUseTaggedPDFUserSelection;
sal_Int32 mnPDFTypeSelection;
bool mbExportNotes;
+ bool mbExportNotesInMargin;
bool mbViewPDF;
bool mbUseReferenceXObject;
bool mbExportNotesPages;
@@ -193,6 +194,7 @@ class ImpPDFTabGeneralPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> mxCbExportBookmarks;
std::unique_ptr<weld::CheckButton> mxCbExportHiddenSlides;
std::unique_ptr<weld::CheckButton> mxCbExportNotes;
+ std::unique_ptr<weld::CheckButton> mxCbExportNotesInMargin;
std::unique_ptr<weld::CheckButton> mxCbViewPDF;
std::unique_ptr<weld::CheckButton> mxCbUseReferenceXObject;
std::unique_ptr<weld::CheckButton> mxCbExportNotesPages;
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 7617146338d3..3ae796c0ead0 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -98,6 +98,7 @@ PDFExport::PDFExport( const Reference< XComponent >& rxSrcDoc,
mbUseTaggedPDF ( false ),
mnPDFTypeSelection ( 0 ),
mbExportNotes ( true ),
+ mbExportNotesInMargin ( false ),
mbExportPlaceholders ( false ),
mbUseReferenceXObject ( false ),
mbExportNotesPages ( false ),
@@ -484,6 +485,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
rFilterData[ nData ].Value >>= mnPDFTypeSelection;
else if ( rFilterData[ nData ].Name == "ExportNotes" )
rFilterData[ nData ].Value >>= mbExportNotes;
+ else if ( rFilterData[ nData ].Name == "ExportNotesInMargin" )
+ rFilterData[ nData ].Value >>= mbExportNotesInMargin;
else if ( rFilterData[ nData ].Name == "ExportNotesPages" )
rFilterData[ nData ].Value >>= mbExportNotesPages;
else if ( rFilterData[ nData ].Name == "ExportOnlyNotesPages" )
@@ -843,6 +846,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
std::unique_ptr<vcl::PDFExtOutDevData> pPDFExtOutDevData(new vcl::PDFExtOutDevData( *pOut ));
pOut->SetExtOutDevData( pPDFExtOutDevData.get() );
pPDFExtOutDevData->SetIsExportNotes( mbExportNotes );
+ pPDFExtOutDevData->SetIsExportNotesInMargin( mbExportNotesInMargin );
pPDFExtOutDevData->SetIsExportTaggedPDF( mbUseTaggedPDF );
pPDFExtOutDevData->SetIsExportTransitionEffects( mbUseTransitionEffects );
pPDFExtOutDevData->SetIsExportFormFields( mbExportFormFields );
@@ -853,7 +857,7 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
pPDFExtOutDevData->SetIsReduceImageResolution( mbReduceImageResolution );
pPDFExtOutDevData->SetIsExportNamedDestinations( mbExportBmkToDest );
- Sequence< PropertyValue > aRenderOptions( 7 );
+ Sequence< PropertyValue > aRenderOptions( 8 );
aRenderOptions[ 0 ].Name = "RenderDevice";
aRenderOptions[ 0 ].Value <<= uno::Reference<awt::XDevice>(xDevice.get());
aRenderOptions[ 1 ].Name = "ExportNotesPages";
@@ -869,6 +873,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >&
aRenderOptions[ 5 ].Value <<= aPageRange;
aRenderOptions[ 6 ].Name = "ExportPlaceholders";
aRenderOptions[ 6 ].Value <<= mbExportPlaceholders;
+ aRenderOptions[ 7 ].Name = "ExportNotesInMargin";
+ aRenderOptions[ 7 ].Value <<= mbExportNotesInMargin;
if( !aPageRange.isEmpty() || !aSelection.hasValue() )
{
diff --git a/filter/source/pdf/pdfexport.hxx b/filter/source/pdf/pdfexport.hxx
index 6d2d1ffd63e7..2f1d20d516b3 100644
--- a/filter/source/pdf/pdfexport.hxx
+++ b/filter/source/pdf/pdfexport.hxx
@@ -44,6 +44,7 @@ private:
bool mbUseTaggedPDF;
sal_Int32 mnPDFTypeSelection;
bool mbExportNotes;
+ bool mbExportNotesInMargin;
bool mbExportPlaceholders;
bool mbUseReferenceXObject;
bool mbExportNotesPages;
diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx
index f7bed8855d72..cdc215837ad5 100644
--- a/filter/source/pdf/pdffilter.cxx
+++ b/filter/source/pdf/pdffilter.cxx
@@ -81,6 +81,7 @@ bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
aCfgItem.ReadBool( "UseTaggedPDF", false );
aCfgItem.ReadInt32( "SelectPdfVersion", 0 );
aCfgItem.ReadBool( "ExportNotes", false );
+ aCfgItem.ReadBool( "ExportNotesInMargin", false );
aCfgItem.ReadBool( "ExportPlaceholders", false );
aCfgItem.ReadBool( "ExportNotesPages", false );
aCfgItem.ReadBool( "ExportOnlyNotesPages", false );
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/filter/uiconfig/ui/pdfgeneralpage.ui b/filter/uiconfig/ui/pdfgeneralpage.ui
index 2f953a1d965c..c7a1d323837a 100644
--- a/filter/uiconfig/ui/pdfgeneralpage.ui
+++ b/filter/uiconfig/ui/pdfgeneralpage.ui
@@ -1,58 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.4 -->
+<!-- Generated with glade 3.40.0 -->
<interface domain="flt">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">1</property>
<property name="upper">100</property>
<property name="value">90</property>
- <property name="step_increment">1</property>
- <property name="page_increment">10</property>
+ <property name="step-increment">1</property>
+ <property name="page-increment">10</property>
</object>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="PdfGeneralPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">6</property>
- <property name="column_spacing">12</property>
+ <property name="border-width">6</property>
+ <property name="column-spacing">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">12</property>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=4 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkRadioButton" id="all">
<property name="label" translatable="yes" context="pdfgeneralpage|all">_All</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
@@ -60,77 +63,89 @@
<object class="GtkRadioButton" id="range">
<property name="label" translatable="yes" context="pdfgeneralpage|range">_Pages:</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">all</property>
<accessibility>
<relation type="label-for" target="pages"/>
</accessibility>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="selection">
<property name="label" translatable="yes" context="pdfgeneralpage|selection">_Selection</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">all</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="pages">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
- <property name="width_chars">5</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
+ <property name="width-chars">5</property>
<accessibility>
<relation type="labelled-by" target="range"/>
</accessibility>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="slides">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
<property name="label" translatable="yes" context="pdfgeneralpage|slides">Slides:</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="selectedsheets">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
<property name="label" translatable="yes" context="pdfgeneralpage|selectedsheets">_Selection/Selected sheet(s)</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -138,7 +153,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label1">Range</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -147,106 +162,131 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="qualityframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkSpinButton" id="quality">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="qualalign">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label6">_Quality:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">quality</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">quality</property>
<property name="xalign">0</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="frame5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="reduceresolution">
<property name="label" translatable="yes" context="pdfgeneralpage|reduceresolution">_Reduce image resolution</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<accessibility>
<relation type="label-for" target="resolution"/>
</accessibility>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="resolution">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="has_entry">True</property>
+ <property name="can-focus">False</property>
+ <property name="has-entry">True</property>
<items>
<item translatable="yes" context="pdfgeneralpage|resolution">75 DPI</item>
<item translatable="yes" context="pdfgeneralpage|resolution">150 DPI</item>
@@ -256,8 +296,8 @@
</items>
<child internal-child="entry">
<object class="GtkEntry" id="comboboxtext-entry">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="text" translatable="yes" context="pdfgeneralpage|comboboxtext-entry">75 DPI</property>
</object>
</child>
@@ -266,55 +306,109 @@
</accessibility>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="losslesscompress">
<property name="label" translatable="yes" context="pdfgeneralpage|losslesscompress">_Lossless compression</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="jpegcompress">
<property name="label" translatable="yes" context="pdfgeneralpage|jpegcompress">_JPEG compression</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">losslesscompress</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -322,7 +416,7 @@
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label2">Images</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -331,77 +425,93 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="watermark">
<property name="label" translatable="yes" context="pdfgeneralpage|watermark">Sign with _watermark</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="watermarkentry">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkLabel" id="watermarklabel">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|watermarklabel">Text:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">watermarkentry</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">watermarkentry</property>
<property name="xalign">0</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -409,7 +519,7 @@
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label3">Watermark</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -418,110 +528,130 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">13</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">13</property>
<child>
+ <!-- n-columns=3 n-rows=15 -->
<object class="GtkGrid" id="grid10">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkCheckButton" id="embed">
<property name="label" translatable="yes" context="pdfgeneralpage|embed">Hybrid PDF (em_bed ODF file)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that is easily editable in %PRODUCTNAME</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|embed|tooltip_text">Creates a PDF that is easily editable in %PRODUCTNAME</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="tagged">
<property name="label" translatable="yes" context="pdfgeneralpage|tagged">_Tagged PDF (add document structure)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content structure information in a PDF</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|tagged|tooltip_text">Includes a document's content structure information in a PDF</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="forms">
<property name="label" translatable="yes" context="pdfgeneralpage|forms">_Create PDF form</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can be filled out</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|forms|tooltip_text">Creates a PDF with fields that can be filled out</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="formsframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label7">Submit _format:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">format</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">format</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="format">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="pdfgeneralpage|format">FDF</item>
<item translatable="yes" context="pdfgeneralpage|format">PDF</item>
@@ -530,244 +660,408 @@
</items>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="allowdups">
<property name="label" translatable="yes" context="pdfgeneralpage|allowdups">Allow duplicate field _names</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="bookmarks">
<property name="label" translatable="yes" context="pdfgeneralpage|bookmarks">Export _bookmarks</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="exportplaceholders">
<property name="label" translatable="yes" context="pdfgeneralpage|exportplaceholders">Expo_rt placeholders</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="comments">
<property name="label" translatable="yes" context="pdfgeneralpage|comments">_Comments as PDF annotations</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="emptypages">
<property name="label" translatable="yes" context="pdfgeneralpage|emptypages">Exp_ort automatically inserted blank pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">11</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="viewpdf">
<property name="label" translatable="yes" context="pdfgeneralpage|viewpdf">_View PDF after export</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">12</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">13</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="usereferencexobject">
<property name="label" translatable="yes" context="pdfgeneralpage|usereferencexobject">Use reference XObjects</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">13</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">14</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="hiddenpages">
<property name="label" translatable="yes" context="pdfgeneralpage|hiddenpages">Export _hidden pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">10</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="notes">
<property name="label" translatable="yes" context="pdfgeneralpage|notes">Export _notes pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkAlignment" id="onlynotesframe">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkCheckButton" id="onlynotes">
<property name="label" translatable="yes" context="pdfgeneralpage|onlynotes">Export onl_y notes pages</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">10</property>
</packing>
</child>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">6</property>
<child>
<object class="GtkCheckButton" id="pdfa">
<property name="label" translatable="yes" context="pdfgeneralpage|pdfa">Archive (P_DF/A, ISO 19005)</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="tooltip_text" translatable="yes" context="pdfgeneralpage|pdfa|tooltip_text">Creates an ISO 19005-2 compliant PDF file, ideal for long-term document preservation</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="tooltip-text" translatable="yes" context="pdfgeneralpage|pdfa|tooltip_text">Creates an ISO 19005-2 compliant PDF file, ideal for long-term document preservation</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="pdfagrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">20</property>
- <property name="column_spacing">14</property>
+ <property name="can-focus">False</property>
+ <property name="margin-left">20</property>
+ <property name="column-spacing">14</property>
<child>
<object class="GtkRadioButton" id="pdfa2">
<property name="label" translatable="yes" context="pdfgeneralpage|pdfa">PDF/A-2b</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="pdfa1">
<property name="label" translatable="yes" context="pdfgeneralpage|pdfa">PDF/A-1b</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="active">True</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<property name="group">pdfa2</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="commentsinmargin">
+ <property name="label" translatable="yes" context="pdfgeneralpage|commentsinmargin">Co_mments in margin</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -775,7 +1069,7 @@
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="pdfgeneralpage|label4">General</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -784,10 +1078,31 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>
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/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 4db1c5769e80..35210463240e 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -215,6 +215,13 @@ protected:
// helper method
void AddToRecentlyUsedList();
+ // Parent class for actual guard objects that would do useful work
+ class LockAllViewsGuard
+ {
+ public:
+ virtual ~LockAllViewsGuard() {}
+ };
+
public:
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH)
@@ -746,6 +753,13 @@ public:
/** override this if you have a XmlIdRegistry. */
virtual const sfx2::IXmlIdRegistry* GetXmlIdRegistry() const { return nullptr; }
+
+ // Lock all unlocked views, and returns a guard object which unlocks those views when destructed
+ virtual std::unique_ptr<LockAllViewsGuard> LockAllViews()
+ {
+ return std::make_unique<LockAllViewsGuard>();
+ }
+
};
#define SFX_GLOBAL_CLASSID \
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index cdf3e440aea9..c210c95c1f62 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -267,6 +267,8 @@
#define STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK NC_("STR_SIGNATURE_NOTVALIDATED_PARTIAL_OK", "The certificate could not be validated and the document is only partially signed.")
#define STR_SIGNATURE_OK NC_("STR_SIGNATURE_OK", "This document is digitally signed and the signature is valid.")
#define STR_SIGNATURE_SHOW NC_("STR_SIGNATURE_SHOW", "Show Signatures")
+#define STR_REFRESH_MASTER_PASSWORD NC_("STR_REFRESH_MASTER_PASSWORD", "The master password is stored in an outdated format, you should refresh it")
+#define STR_REFRESH_PASSWORD NC_("STR_REFRESH_PASSWORD", "Refresh Password")
#define STR_CLOSE_PANE NC_("STR_CLOSE_PANE", "Close Pane")
#define STR_SFX_DOCK NC_("STR_SFX_DOCK", "Dock")
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 502f1fe4480d..534a5707a69d 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -61,6 +61,7 @@ protected:
DECL_LINK(WhatsNewHandler, Button*, void);
DECL_LINK(SwitchReadOnlyHandler, Button*, void);
DECL_LINK(SignDocumentHandler, Button*, void);
+ DECL_DLLPRIVATE_LINK(RefreshMasterPasswordHdl, Button*, void);
SAL_DLLPRIVATE void KillDispatcher_Impl();
virtual ~SfxViewFrame() override;
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/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx
index 4c14283b03a8..5e060494b87c 100644
--- a/include/vcl/pdfextoutdevdata.hxx
+++ b/include/vcl/pdfextoutdevdata.hxx
@@ -73,6 +73,7 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData
bool mbTaggedPDF;
bool mbExportNotes;
+ bool mbExportNotesInMargin;
bool mbExportNotesPages;
bool mbTransitionEffects;
bool mbUseLosslessCompression;
@@ -104,6 +105,9 @@ public:
bool GetIsExportNotes() const { return mbExportNotes;}
void SetIsExportNotes( const bool bExportNotes );
+ bool GetIsExportNotesInMargin() const { return mbExportNotesInMargin;}
+ void SetIsExportNotesInMargin( const bool bExportNotesInMargin );
+
bool GetIsExportNotesPages() const { return mbExportNotesPages;}
void SetIsExportNotesPages( const bool bExportNotesPages );
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/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index b0c738194f25..efb7048a7d03 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -27,6 +27,11 @@
<info>
<desc>Contains a container for passwords.</desc>
</info>
+ <prop oor:name="InitializationVector" oor:type="xs:string">
+ <info>
+ <desc>Contains an initialization vector for the password encryption.</desc>
+ </info>
+ </prop>
<prop oor:name="Password" oor:type="xs:string" oor:localized="false">
<info>
<desc>Contains a password encoded with the master password.</desc>
@@ -911,12 +916,23 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="StorageVersion" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Specifies what version of encoding scheme the password container uses.</desc>
+ </info>
+ <value>0</value>
+ </prop>
<prop oor:name="HasMaster" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies if there is a valid master password.</desc>
</info>
<value>false</value>
</prop>
+ <prop oor:name="MasterInitializationVector" oor:type="xs:string">
+ <info>
+ <desc>Contains an initialization vector for the master password encryption.</desc>
+ </info>
+ </prop>
<prop oor:name="Master" oor:type="xs:string" oor:nillable="false">
<info>
<desc>Contains the master password encrypted by itself.</desc>
@@ -4899,6 +4915,12 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="ExportNotesInMargin" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Specifies if notes are exported in the document margin.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="ViewPDFAfterExport" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies if PDF automatically opens after export.</desc>
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/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 43439f5d0525..7f573f6809a2 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -222,6 +222,7 @@ void ScInterpreter::ScFilterXML()
case XPATH_STRING:
PushString(OUString::createFromAscii(reinterpret_cast<char*>(pXPathObj->stringval)));
break;
+#if LIBXML_VERSION < 21000 || defined(LIBXML_XPTR_LOCS_ENABLED)
case XPATH_POINT:
PushNoValue();
break;
@@ -231,13 +232,13 @@ void ScInterpreter::ScFilterXML()
case XPATH_LOCATIONSET:
PushNoValue();
break;
+#endif
case XPATH_USERS:
PushNoValue();
break;
case XPATH_XSLT_TREE:
PushNoValue();
break;
-
}
}
}
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/scp2/source/ooo/windowscustomaction_ooo.scp b/scp2/source/ooo/windowscustomaction_ooo.scp
index bc7201b9b2b4..43982c59b8d4 100644
--- a/scp2/source/ooo/windowscustomaction_ooo.scp
+++ b/scp2/source/ooo/windowscustomaction_ooo.scp
@@ -18,24 +18,6 @@
#include "macros.inc"
-WindowsCustomAction gid_Customaction_RenamePrgFolder
- Name = "RenamePrgFolder";
- Typ = "1";
- Source = "shlxtmsi.dll";
- Target = "RenamePrgFolder";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "OLDPRODUCTS And Not REMOVE=\"ALL\" And Not PATCH", "ValidateProductID");
-End
-
-WindowsCustomAction gid_Customaction_RemovePrgFolder
- Name = "RemovePrgFolder";
- Typ = "1";
- Source = "shlxtmsi.dll";
- Target = "RemovePrgFolder";
- Inbinarytable = 1;
- Assignment1 = ("InstallExecuteSequence", "OLDPRODUCTS And Not REMOVE=\"ALL\" And Not PATCH", "end");
-End
-
WindowsCustomAction gid_Customaction_Regallmsdocdll
Name = "Regallmsdocdll";
Typ = "65";
diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index dde84963a1fb..fd07f7b43956 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -22,4 +22,8 @@ $(eval $(call gb_Executable_add_exception_objects,xpdfimport,\
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl \
))
+$(eval $(call gb_Executable_use_system_win32_libs,xpdfimport,\
+ shell32 \
+))
+
# vim:set noet sw=4 ts=4:
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index f91612a5a201..b4a10780741d 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -499,12 +499,6 @@ void Parser::parseFontFamilyName( FontAttributes& rResult )
const sal_Unicode* pCopy = rResult.familyName.getStr();
sal_Int32 nLen = rResult.familyName.getLength();
- // parse out truetype subsets (e.g. BAAAAA+Thorndale)
- if( nLen > 8 && pCopy[6] == '+' )
- {
- pCopy += 7;
- nLen -= 7;
- }
// TODO: Looks like this block needs to be refactored
while( nLen )
@@ -626,52 +620,6 @@ void Parser::readFont()
// extract textual attributes (bold, italic in the name, etc.)
parseFontFamilyName(aResult);
- // need to read font file?
- if( nFileLen )
- {
- uno::Sequence<sal_Int8> aFontFile(nFileLen);
- readBinaryData( aFontFile );
-
- awt::FontDescriptor aFD;
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[0] <<= aFontFile;
-
- try
- {
- uno::Reference< beans::XMaterialHolder > xMat(
- m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.awt.FontIdentificator", aArgs, m_xContext ),
- uno::UNO_QUERY );
- if( xMat.is() )
- {
- uno::Any aRes( xMat->getMaterial() );
- if( aRes >>= aFD )
- {
- if (!aFD.Name.isEmpty())
- {
- aResult.familyName = aFD.Name;
- parseFontFamilyName(aResult);
- }
- aResult.isBold = (aFD.Weight > 100.0);
- aResult.isItalic = (aFD.Slant == awt::FontSlant_OBLIQUE ||
- aFD.Slant == awt::FontSlant_ITALIC );
- aResult.isUnderline = false;
- aResult.size = 0;
- }
- }
- }
- catch( uno::Exception& )
- {
- }
-
- if( aResult.familyName.isEmpty() )
- {
- // last fallback
- aResult.familyName = "Arial";
- aResult.isUnderline = false;
- }
-
- }
if (!m_xDev)
m_xDev.disposeAndReset(VclPtr<VirtualDevice>::Create());
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 94e771b9e8dc..922bf064f571 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -432,14 +432,19 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
FontAttributes aNewFont;
int nSize = 0;
-#if POPPLER_CHECK_VERSION(0, 64, 0)
- const
+#if POPPLER_CHECK_VERSION(20, 12, 0)
+ std::string familyName = gfxFont->getNameWithoutSubsetTag();
+#else
+ std::string familyName = gfxFont->getName()->toStr();
+ if (familyName.length() > 7 && familyName.at(6) == '+')
+ {
+ familyName = familyName.substr(7);
+ }
#endif
- GooString* pFamily = gfxFont->getName();
- if( pFamily )
+ if( familyName != "" )
{
aNewFont.familyName.clear();
- aNewFont.familyName.append( gfxFont->getName() );
+ aNewFont.familyName.append( familyName );
}
else
{
@@ -456,12 +461,21 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
{
// TODO(P3): Unfortunately, need to read stream twice, since
// we must write byte count to stdout before
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+ if ( pBuf )
+ {
+ aNewFont.isEmbedded = true;
+ nSize = pBuf->size();
+ }
+#else
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
if( pBuf )
{
aNewFont.isEmbedded = true;
gfree(pBuf);
}
+#endif
}
m_aFontMap[ nNewId ] = aNewFont;
@@ -474,13 +488,29 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
return;
int nSize = 0;
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+ if ( pBuf )
+ nSize = pBuf->size();
+ if ( nSize == 0 )
+ return;
+#else
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
if( !pBuf )
return;
+#endif
// ---sync point--- see SYNC STREAMS above
fflush(stdout);
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ if( fwrite(pBuf->data(), sizeof(*pBuf->data()), nSize, g_binary_out) != static_cast<size_t>(nSize) )
+ {
+ exit(1); // error
+ }
+ // ---sync point--- see SYNC STREAMS above
+ fflush(g_binary_out);
+#else
if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
{
gfree(pBuf);
@@ -489,6 +519,7 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
// ---sync point--- see SYNC STREAMS above
fflush(g_binary_out);
gfree(pBuf);
+#endif
}
#if POPPLER_CHECK_VERSION(0, 83, 0)
@@ -635,8 +666,15 @@ void PDFOutDev::updateLineDash(GfxState *state)
return;
assert(state);
- double* dashArray; int arrayLen; double startOffset;
+ int arrayLen; double startOffset;
+#if POPPLER_CHECK_VERSION(22, 9, 0)
+ const std::vector<double> &dash = state->getLineDash(&startOffset);
+ const double* dashArray = dash.data();
+ arrayLen = dash.size();
+#else
+ double* dashArray;
state->getLineDash(&dashArray, &arrayLen, &startOffset);
+#endif
printf( "updateLineDash" );
if( arrayLen && dashArray )
@@ -742,7 +780,11 @@ void PDFOutDev::updateFont(GfxState *state)
{
assert(state);
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ GfxFont *gfxFont = state->getFont().get();
+#else
GfxFont *gfxFont = state->getFont();
+#endif
if( !gfxFont )
return;
@@ -786,9 +828,6 @@ void PDFOutDev::updateFont(GfxState *state)
aEsc.data() );
}
printf( "\n" );
-
- if( nEmbedSize )
- writeFontFile(gfxFont);
}
void PDFOutDev::updateRender(GfxState *state)
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 8666ab15cfa6..521a1f91df24 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -119,6 +119,15 @@ int main(int argc, char **argv)
_setmode( _fileno( g_binary_out ), _O_BINARY );
#endif
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ PDFDoc aDoc( std::make_unique<GooString>(pFileName),
+ std::optional<GooString>(pOwnerPasswordStr),
+ std::optional<GooString>(pUserPasswordStr) );
+
+ PDFDoc aErrDoc( std::make_unique<GooString>(pErrFileName),
+ std::optional<GooString>(pOwnerPasswordStr),
+ std::optional<GooString>(pUserPasswordStr) );
+#else
PDFDoc aDoc( pFileName,
pOwnerPasswordStr,
pUserPasswordStr );
@@ -126,6 +135,7 @@ int main(int argc, char **argv)
PDFDoc aErrDoc( pErrFileName,
pOwnerPasswordStr,
pUserPasswordStr );
+#endif
// Check various permissions for aDoc.
PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;
diff --git a/setup_native/Library_shlxtmsi.mk b/setup_native/Library_shlxtmsi.mk
index a4c2fccd2575..bea522c62a3a 100644
--- a/setup_native/Library_shlxtmsi.mk
+++ b/setup_native/Library_shlxtmsi.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_Library_add_exception_objects,shlxtmsi,\
setup_native/source/win32/customactions/shellextensions/migrateinstallpath \
setup_native/source/win32/customactions/shellextensions/completeinstallpath \
setup_native/source/win32/customactions/shellextensions/checkdirectory \
- setup_native/source/win32/customactions/shellextensions/vistaspecial \
setup_native/source/win32/customactions/shellextensions/checkpatches \
))
diff --git a/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def b/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def
index e0e667953d4f..57b6aa154f4d 100644
--- a/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def
+++ b/setup_native/source/win32/customactions/shellextensions/shlxtmsi.def
@@ -7,5 +7,3 @@ EXPORTS
InstallStartmenuFolderIcon
DeinstallStartmenuFolderIcon
SetProductInstallMode
- RenamePrgFolder
- RemovePrgFolder
diff --git a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx b/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
deleted file mode 100644
index 73f5f60ddda0..000000000000
--- a/setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "shlxtmsi.hxx"
-
-#include <strsafe.h>
-
-#include <systools/win32/uwinapi.h>
-#include "../tools/seterror.hxx"
-
-static BOOL RemoveCompleteDirectoryW(const std::wstring& rPath)
-{
- bool bDirectoryRemoved = true;
-
- std::wstring sPattern = rPath + L"\\" + L"*.*";
- WIN32_FIND_DATAW aFindData;
-
- // Finding all content in rPath
-
- HANDLE hFindContent = FindFirstFileW( sPattern.c_str(), &aFindData );
-
- if ( hFindContent != INVALID_HANDLE_VALUE )
- {
- bool fNextFile = false;
- std::wstring sCurrentDir = L".";
- std::wstring sParentDir = L"..";
-
- do
- {
- std::wstring sFileName = aFindData.cFileName;
-
- if (( wcscmp(sFileName.c_str(),sCurrentDir.c_str()) != 0 ) &&
- ( wcscmp(sFileName.c_str(),sParentDir.c_str()) != 0 ))
- {
- std::wstring sCompleteFileName = rPath + L"\\" + sFileName;
-
- if ( aFindData.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
- {
- RemoveCompleteDirectoryW(sCompleteFileName);
- }
- else
- {
- DeleteFileW( sCompleteFileName.c_str() );
- }
- }
-
- fNextFile = FindNextFileW( hFindContent, &aFindData );
-
- } while ( fNextFile );
-
- FindClose( hFindContent );
-
- // empty directory can be removed now
- // RemoveDirectory is only successful, if the last handle to the directory is closed
- // -> first removing content -> closing handle -> remove empty directory
-
-
- if( !( RemoveDirectoryW(rPath.c_str()) ) )
- {
- bDirectoryRemoved = false;
- }
- }
-
- return bDirectoryRemoved;
-}
-
-/** Move program folder to program_old. Tries 10 times (program_old1, program_old2, ...).
- *
- * @return
- * ERROR_INSTALL_FAILURE when the folder cannot be moved.
- * ERROR_SUCCESS otherwise.
- */
-extern "C" __declspec(dllexport) UINT __stdcall RenamePrgFolder( MSIHANDLE handle )
-{
- std::wstring sOfficeInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
-
- std::wstring sRenameSrc = sOfficeInstallPath + L"program";
- std::wstring sRenameDst = sOfficeInstallPath + L"program_old";
-
- bool bSuccess = MoveFileW( sRenameSrc.c_str(), sRenameDst.c_str() );
- if ( !bSuccess )
- {
- WCHAR sAppend[2] = L"0";
- for ( int i = 0; i < 10; i++ )
- {
- sRenameDst = sOfficeInstallPath + L"program_old" + sAppend;
- bSuccess = MoveFileW( sRenameSrc.c_str(), sRenameDst.c_str() );
- if ( bSuccess )
- break;
- sAppend[0] += 1;
- }
- }
-
- return bSuccess ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE;
-}
-
-
-/** Remove leftover program_old folder(s).
- *
- * @return
- * ERROR_INSTALL_FAILURE when the folder cannot be removed.
- * ERROR_SUCCESS otherwise.
- */
-extern "C" __declspec(dllexport) UINT __stdcall RemovePrgFolder( MSIHANDLE handle )
-{
- std::wstring sOfficeInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
- std::wstring sRemoveDir = sOfficeInstallPath + L"program_old";
-
- if (!RemoveCompleteDirectoryW(sRemoveDir))
- return ERROR_INSTALL_FAILURE;
-
- WCHAR sAppend[2] = L"0";
- for ( int i = 0; i < 10; i++ )
- {
- sRemoveDir = sOfficeInstallPath + L"program_old" + sAppend;
- if (!RemoveCompleteDirectoryW( sRemoveDir ))
- return ERROR_INSTALL_FAILURE;
- sAppend[0] += 1;
- }
-
- return ERROR_SUCCESS;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 970ff56b5083..9c14f92a5600 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -76,10 +76,10 @@ css::uno::Sequence<OUString> SAL_CALL SfxMacroLoader::getSupportedServiceNames()
return aSeq;
}
-SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+SfxObjectShell* SfxMacroLoader::GetObjectShell(const Reference <XFrame>& xFrame)
{
SfxObjectShell* pDocShell = nullptr;
- Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+
if ( xFrame.is() )
{
SfxFrame* pFrame=nullptr;
@@ -96,6 +96,11 @@ SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
return pDocShell;
}
+SfxObjectShell* SfxMacroLoader::GetObjectShell_Impl()
+{
+ Reference < XFrame > xFrame( m_xFrame.get(), UNO_QUERY );
+ return SfxMacroLoader::GetObjectShell(xFrame);
+}
uno::Reference<frame::XDispatch> SAL_CALL SfxMacroLoader::queryDispatch(
const util::URL& aURL ,
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index e9bc3f0aabe9..12ea3b104a20 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -38,12 +38,15 @@
#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>
#include <sfx2/sfxsids.hrc>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
#include <tools/debug.hxx>
+#include <macroloader.hxx>
using namespace ::com::sun::star;
@@ -159,38 +162,64 @@ sal_Bool SAL_CALL IFrameObject::load(
{
if ( SvtMiscOptions().IsPluginsEnabled() )
{
- 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();
+ util::URL aTargetURL;
+ aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
+ xTrans->parseStrict( aTargetURL );
- uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
- xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
+ INetURLObject aURLObject(aTargetURL.Complete);
+ if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script"))
+ return false;
- // we must destroy the IFrame before the parent is destroyed
- xWindow->addEventListener( this );
+ uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
+ SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- mxFrame = frame::Frame::create( mxContext );
- uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
- mxFrame->initialize( xWin );
- mxFrame->setName( maFrmDescr.GetName() );
+ bool bUpdateAllowed(true);
+ if (pDoc)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer();
+ bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
+ if (!bUpdateAllowed)
+ return false;
- uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY );
- if ( xFramesSupplier.is() )
- mxFrame->setCreator( xFramesSupplier );
+ OUString sReferer;
+ if (pDoc && pDoc->HasName())
+ sReferer = pDoc->GetMedium()->GetName();
- util::URL aTargetURL;
- aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
- uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
- xTrans->parseStrict( aTargetURL );
+ uno::Reference<css::awt::XWindow> xParentWindow(xFrame->getContainerWindow());
+
+ 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/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 36f58416a9e9..4b58cbe14ecb 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1154,6 +1154,8 @@ bool SfxObjectShell::SaveTo_Impl
UpdateDocInfoForSave();
ModifyBlocker_Impl aMod(this);
+ // tdf#41063, tdf#135244: prevent jumping to cursor at any temporary modification
+ auto aViewGuard(LockAllViews());
std::shared_ptr<const SfxFilter> pFilter = rMedium.GetFilter();
if ( !pFilter )
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/sfx2/source/inc/macroloader.hxx b/sfx2/source/inc/macroloader.hxx
index 9e1dfba18ed0..b3e7a5ec1abc 100644
--- a/sfx2/source/inc/macroloader.hxx
+++ b/sfx2/source/inc/macroloader.hxx
@@ -82,6 +82,8 @@ public:
virtual void SAL_CALL addStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xControl, const css::util::URL& aURL ) override;
+
+ static SfxObjectShell* GetObjectShell(const css::uno::Reference<css::frame::XFrame>& xFrame);
};
#endif
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index f879bc1df21f..04b8f5f3c1ad 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/frame/XLoadable.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
+#include <com/sun/star/task/PasswordContainer.hpp>
#include <officecfg/Office/Common.hxx>
#include <officecfg/Setup.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -1321,6 +1322,24 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
batch->commit();
}
+ if (officecfg::Office::Common::Passwords::HasMaster::get() &&
+ officecfg::Office::Common::Passwords::StorageVersion::get() == 0)
+ {
+ // master password stored in deprecated format
+ VclPtr<SfxInfoBarWindow> pOldMasterPasswordInfoBar =
+ AppendInfoBar("oldmasterpassword",
+ SfxResId(STR_REFRESH_MASTER_PASSWORD), InfoBarType::Danger);
+ if (pOldMasterPasswordInfoBar)
+ {
+ VclPtrInstance<PushButton> const xBtn(&GetWindow());
+ xBtn->SetText(SfxResId(STR_REFRESH_PASSWORD));
+ xBtn->SetSizePixel(xBtn->GetOptimalSize());
+ xBtn->SetClickHdl(LINK(this,
+ SfxViewFrame, RefreshMasterPasswordHdl));
+ pOldMasterPasswordInfoBar->addButton(xBtn);
+ }
+ }
+
// read-only infobar if necessary
const SfxViewShell *pVSh;
const SfxShell *pFSh;
@@ -1475,6 +1494,27 @@ IMPL_LINK_NOARG(SfxViewFrame, SignDocumentHandler, Button*, void)
GetDispatcher()->Execute(SID_SIGNATURE);
}
+IMPL_LINK_NOARG(SfxViewFrame, RefreshMasterPasswordHdl, Button*, void)
+{
+ bool bChanged = false;
+ try
+ {
+ Reference< task::XPasswordContainer2 > xMasterPasswd(
+ task::PasswordContainer::create(comphelper::getProcessComponentContext()));
+
+ css::uno::Reference<css::frame::XFrame> xFrame = GetFrame().GetFrameInterface();
+ css::uno::Reference<css::awt::XWindow> xContainerWindow = xFrame->getContainerWindow();
+
+ uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
+ xContainerWindow));
+ bChanged = xMasterPasswd->changeMasterPassword(xTmpHandler);
+ }
+ catch (const Exception&)
+ {}
+ if (bChanged)
+ RemoveInfoBar(u"oldmasterpassword");
+}
+
void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
{
m_pImpl->bResizeInToOut = true;
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 7da33503d52c..bc7c7261f815 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -12613,7 +12613,6 @@ setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx
setup_native/source/win32/customactions/shellextensions/shlxtmsi.hxx
setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx
setup_native/source/win32/customactions/shellextensions/upgrade.cxx
-setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx
setup_native/source/win32/customactions/tools/checkversion.cxx
setup_native/source/win32/customactions/tools/seterror.cxx
setup_native/source/win32/customactions/tools/seterror.hxx
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/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 5c59f976d8ec..3d85a3f1501a 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <sal/log.hxx>
#include "passwordcontainer.hxx"
@@ -183,23 +185,24 @@ PassMap StorageItem::getInfo()
Sequence< OUString > aNodeNames = ConfigItem::GetNodeNames( "Store" );
sal_Int32 aNodeCount = aNodeNames.getLength();
- Sequence< OUString > aPropNames( aNodeCount );
- sal_Int32 aNodeInd;
+ Sequence< OUString > aPropNames( aNodeCount * 2);
- for( aNodeInd = 0; aNodeInd < aNodeCount; ++aNodeInd )
- {
- aPropNames[aNodeInd] = "Store/Passwordstorage['" + aNodeNames[aNodeInd] + "']/Password";
- }
+ std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.begin(),
+ [](const OUString& rName) -> OUString {
+ return "Store/Passwordstorage['" + rName + "']/Password"; });
+ std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.getArray() + aNodeCount,
+ [](const OUString& rName) -> OUString {
+ return "Store/Passwordstorage['" + rName + "']/InitializationVector"; });
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aPropNames );
- if( aPropertyValues.getLength() != aNodeNames.getLength() )
+ if( aPropertyValues.getLength() != aNodeCount * 2)
{
- OSL_ENSURE( aPropertyValues.getLength() == aNodeNames.getLength(), "Problems during reading" );
+ OSL_FAIL( "Problems during reading" );
return aResult;
}
- for( aNodeInd = 0; aNodeInd < aNodeCount; ++aNodeInd )
+ for( sal_Int32 aNodeInd = 0; aNodeInd < aNodeCount; ++aNodeInd )
{
std::vector< OUString > aUrlUsr = getInfoFromInd( aNodeNames[aNodeInd] );
@@ -209,14 +212,16 @@ PassMap StorageItem::getInfo()
OUString aName = aUrlUsr[1];
OUString aEPasswd;
+ OUString aIV;
aPropertyValues[aNodeInd] >>= aEPasswd;
+ aPropertyValues[aNodeInd + aNodeCount] >>= aIV;
PassMap::iterator aIter = aResult.find( aUrl );
if( aIter != aResult.end() )
- aIter->second.emplace_back( aName, aEPasswd );
+ aIter->second.emplace_back( aName, aEPasswd, aIV );
else
{
- NamePassRecord aNewRecord( aName, aEPasswd );
+ NamePassRecord aNewRecord( aName, aEPasswd, aIV );
std::vector< NamePassRecord > listToAdd( 1, aNewRecord );
aResult.insert( PairUrlRecord( aUrl, listToAdd ) );
@@ -252,7 +257,7 @@ bool StorageItem::useStorage()
if( aPropertyValues.getLength() != aNodeNames.getLength() )
{
- OSL_ENSURE( aPropertyValues.getLength() == aNodeNames.getLength(), "Problems during reading" );
+ OSL_FAIL( "Problems during reading" );
return false;
}
@@ -262,53 +267,79 @@ bool StorageItem::useStorage()
return aResult;
}
+sal_Int32 StorageItem::getStorageVersion()
+{
+ Sequence<OUString> aNodeNames { "StorageVersion" };
+
+ Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
+
+ if( aPropertyValues.getLength() != aNodeNames.getLength() )
+ {
+ OSL_FAIL( "Problems during reading" );
+ return 0;
+ }
+
+ sal_Int32 nResult = 0;
+ aPropertyValues[0] >>= nResult;
-bool StorageItem::getEncodedMP( OUString& aResult )
+ return nResult;
+}
+
+bool StorageItem::getEncodedMP( OUString& aResult, OUString& aResultIV )
{
if( hasEncoded )
{
aResult = mEncoded;
+ aResultIV = mEncodedIV;
return true;
}
- Sequence< OUString > aNodeNames( 2 );
+ Sequence< OUString > aNodeNames( 3 );
aNodeNames[0] = "HasMaster";
aNodeNames[1] = "Master";
+ aNodeNames[2] = "MasterInitializationVector";
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
if( aPropertyValues.getLength() != aNodeNames.getLength() )
{
- OSL_ENSURE( aPropertyValues.getLength() == aNodeNames.getLength(), "Problems during reading" );
+ OSL_FAIL( "Problems during reading" );
return false;
}
aPropertyValues[0] >>= hasEncoded;
aPropertyValues[1] >>= mEncoded;
+ aPropertyValues[2] >>= mEncodedIV;
aResult = mEncoded;
+ aResultIV = mEncodedIV;
return hasEncoded;
}
-void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty )
+void StorageItem::setEncodedMP( const OUString& aEncoded, const OUString& aEncodedIV, bool bAcceptEmpty )
{
- Sequence< OUString > sendNames(2);
- Sequence< uno::Any > sendVals(2);
+ Sequence< OUString > sendNames(4);
+ Sequence< uno::Any > sendVals(4);
sendNames[0] = "HasMaster";
sendNames[1] = "Master";
+ sendNames[2] = "MasterInitializationVector";
+ sendNames[3] = "StorageVersion";
bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty );
sendVals[0] <<= bHasMaster;
sendVals[1] <<= aEncoded;
+ sendVals[2] <<= aEncodedIV;
+ sendVals[3] <<= nCurrentStorageVersion;
ConfigItem::SetModified();
ConfigItem::PutProperties( sendNames, sendVals );
hasEncoded = bHasMaster;
mEncoded = aEncoded;
+ mEncodedIV = aEncodedIV;
}
@@ -344,11 +375,13 @@ void StorageItem::update( const OUString& aURL, const NamePassRecord& aRecord )
forIndex.push_back( aURL );
forIndex.push_back( aRecord.GetUserName() );
- Sequence< beans::PropertyValue > sendSeq(1);
+ Sequence< beans::PropertyValue > sendSeq(2);
- sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password";
+ sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( { aURL, aRecord.GetUserName() } ) + "']/InitializationVector";
+ sendSeq[0].Value <<= aRecord.GetPersistentIV();
- sendSeq[0].Value <<= aRecord.GetPersPasswords();
+ sendSeq[1].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password";
+ sendSeq[1].Value <<= aRecord.GetPersPasswords();
ConfigItem::SetModified();
ConfigItem::SetSetProperties( "Store", sendSeq );
@@ -409,7 +442,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& )
}
}
-std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode )
+std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode )
{
if( !aMasterPasswd.isEmpty() )
{
@@ -424,9 +457,16 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0};
+ if (!aIV.isEmpty())
+ {
+ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
+ iv[ ind ] = static_cast<char>(aIV.copy( ind*2, 2 ).toUInt32(16));
+ }
+
rtlCipherError result = rtl_cipher_init (
aDecoder, rtl_Cipher_DirectionDecode,
- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 );
if( result == rtl_Cipher_E_None )
{
@@ -459,7 +499,7 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
"Can't decode!", css::uno::Reference<css::uno::XInterface>(), mode);
}
-OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPasswd )
+OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPasswd)
{
if( !aMasterPasswd.isEmpty() )
{
@@ -476,9 +516,16 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0};
+ if (!aIV.isEmpty())
+ {
+ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
+ iv[ ind ] = static_cast<char>(aIV.copy( ind*2, 2 ).toUInt32(16));
+ }
+
rtlCipherError result = rtl_cipher_init (
aEncoder, rtl_Cipher_DirectionEncode,
- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 );
if( result == rtl_Cipher_E_None )
{
@@ -546,7 +593,7 @@ void PasswordContainer::UpdateVector( const OUString& aURL, std::vector< NamePas
if( aRecord.HasPasswords( PERSISTENT_RECORD ) )
{
- aNPIter.SetPersPasswords( aRecord.GetPersPasswords() );
+ aNPIter.SetPersPasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV() );
if( writeFile )
{
@@ -579,7 +626,8 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b
{
try
{
- ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER );
+ ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV(),
+ GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER );
aPasswords.insert( aPasswords.end(), aDecodedPasswords.begin(), aDecodedPasswords.end() );
}
catch( NoMasterException& )
@@ -624,6 +672,19 @@ void SAL_CALL PasswordContainer::addPersistent( const OUString& Url, const OUStr
PrivateAdd( Url, UserName, Passwords, PERSISTENT_RECORD, aHandler );
}
+OUString PasswordContainer::createIV()
+{
+ rtlRandomPool randomPool = mRandomPool.get();
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5];
+ rtl_random_getBytes(randomPool, iv, RTL_DIGEST_LENGTH_MD5);
+ OUStringBuffer aBuffer;
+ for (sal_uInt8 i : iv)
+ {
+ aBuffer.append(OUString::number(i >> 4, 16));
+ aBuffer.append(OUString::number(i & 15, 16));
+ }
+ return aBuffer.makeStringAndClear();
+}
void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserName, const Sequence< OUString >& Passwords, char Mode, const Reference< XInteractionHandler >& aHandler )
{
@@ -631,7 +692,11 @@ void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserNam
::std::vector< OUString > aStorePass = comphelper::sequenceToContainer< std::vector<OUString> >( Passwords );
if( Mode == PERSISTENT_RECORD )
- aRecord.SetPersPasswords( EncodePasswords( aStorePass, GetMasterPassword( aHandler ) ) );
+ {
+ OUString sIV = createIV();
+ OUString sEncodedPasswords = EncodePasswords( aStorePass, sIV, GetMasterPassword( aHandler ) );
+ aRecord.SetPersPasswords( sEncodedPasswords, sIV );
+ }
else if( Mode == MEMORY_RECORD )
aRecord.SetMemPasswords( aStorePass );
else
@@ -803,6 +868,18 @@ OUString PasswordContainer::RequestPasswordFromUser( PasswordRequestMode aRMode,
return aResult;
}
+// Mangle the key to match an old bug
+static OUString ReencodeAsOldHash(const OUString& rPass)
+{
+ OUStringBuffer aBuffer;
+ for (int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ++ind)
+ {
+ unsigned char i = static_cast<char>(rPass.copy(ind * 2, 2).toUInt32(16));
+ aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
+ aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+ }
+ return aBuffer.makeStringAndClear();
+}
OUString const & PasswordContainer::GetMasterPassword( const Reference< XInteractionHandler >& aHandler )
{
@@ -812,10 +889,10 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac
if( m_aMasterPasswd.isEmpty() && aHandler.is() )
{
- OUString aEncodedMP;
+ OUString aEncodedMP, aEncodedMPIV;
bool bDefaultPassword = false;
- if( !m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ if( !m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
aRMode = PasswordRequestMode_PASSWORD_CREATE;
else if ( aEncodedMP.isEmpty() )
{
@@ -837,11 +914,15 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac
m_aMasterPasswd = aPass;
std::vector< OUString > aMaster( 1, m_aMasterPasswd );
- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) );
+ OUString sIV = createIV();
+ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, sIV, m_aMasterPasswd ), sIV );
}
else
{
- std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) );
+ if (m_pStorageFile->getStorageVersion() == 0)
+ aPass = ReencodeAsOldHash(aPass);
+
+ std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aEncodedMPIV, aPass, aRMode ) );
if( aRM.empty() || aPass != aRM[0] )
{
bAskAgain = true;
@@ -998,7 +1079,8 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
{
sal_Int32 oldLen = aUsers.getLength();
aUsers.realloc( oldLen + 1 );
- aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
+ aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), aNP.GetPersistentIV(),
+ GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
}
if( aUsers.hasElements() )
@@ -1015,12 +1097,12 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::Reference< task::XInteractionHandler >& xHandler )
{
bool bResult = false;
- OUString aEncodedMP;
+ OUString aEncodedMP, aEncodedMPIV;
uno::Reference< task::XInteractionHandler > xTmpHandler = xHandler;
::osl::MutexGuard aGuard( mMutex );
// the method should fail if there is no master password
- if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
{
if ( aEncodedMP.isEmpty() )
{
@@ -1045,6 +1127,13 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R
do {
aPass = RequestPasswordFromUser( aRMode, xTmpHandler );
+
+
+ if (!aPass.isEmpty() && m_pStorageFile->getStorageVersion() == 0)
+ {
+ aPass = ReencodeAsOldHash(aPass);
+ }
+
bResult = ( !aPass.isEmpty() && aPass == m_aMasterPasswd );
aRMode = PasswordRequestMode_PASSWORD_REENTER; // further questions with error notification
} while( !bResult && !aPass.isEmpty() );
@@ -1082,8 +1171,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
bool bCanChangePassword = true;
// if there is already a stored master password it should be entered by the user before the change happen
- OUString aEncodedMP;
- if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ OUString aEncodedMP, aEncodedMPIV;
+ if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
bCanChangePassword = authorizateWithMasterPassword( xTmpHandler );
if ( bCanChangePassword )
@@ -1102,14 +1191,13 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
// store the new master password
m_aMasterPasswd = aPass;
std::vector< OUString > aMaster( 1, m_aMasterPasswd );
- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) );
+ OUString aIV = createIV();
+ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, aIV, m_aMasterPasswd ), aIV );
// store all the entries with the new password
- for ( int nURLInd = 0; nURLInd < aPersistent.getLength(); nURLInd++ )
- for ( int nNameInd = 0; nNameInd< aPersistent[nURLInd].UserList.getLength(); nNameInd++ )
- addPersistent( aPersistent[nURLInd].Url,
- aPersistent[nURLInd].UserList[nNameInd].UserName,
- aPersistent[nURLInd].UserList[nNameInd].Passwords,
+ for ( const auto& rURL : aPersistent )
+ for ( const auto& rUser : rURL.UserList )
+ addPersistent( rURL.Url, rUser.UserName, rUser.Passwords,
uno::Reference< task::XInteractionHandler >() );
bResult = true;
@@ -1129,7 +1217,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword()
if ( m_pStorageFile )
{
m_aMasterPasswd.clear();
- m_pStorageFile->setEncodedMP( OUString() ); // let the master password be removed from configuration
+ m_pStorageFile->setEncodedMP( OUString(), OUString() ); // let the master password be removed from configuration
}
}
@@ -1140,8 +1228,8 @@ sal_Bool SAL_CALL PasswordContainer::hasMasterPassword( )
if ( !m_pStorageFile )
throw uno::RuntimeException();
- OUString aEncodedMP;
- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) );
+ OUString aEncodedMP, aEncodedMPIV;
+ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) );
}
sal_Bool SAL_CALL PasswordContainer::allowPersistentStoring( sal_Bool bAllow )
@@ -1188,8 +1276,8 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere
bool bCanChangePassword = true;
// if there is already a stored nondefault master password it should be entered by the user before the change happen
- OUString aEncodedMP;
- if( m_pStorageFile->getEncodedMP( aEncodedMP ) && !aEncodedMP.isEmpty() )
+ OUString aEncodedMP, aEncodedMPIV;
+ if( m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && !aEncodedMP.isEmpty() )
bCanChangePassword = authorizateWithMasterPassword( xTmpHandler );
if ( bCanChangePassword )
@@ -1206,14 +1294,12 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere
// store the empty string to flag the default master password
m_aMasterPasswd = aPass;
- m_pStorageFile->setEncodedMP( OUString(), true );
+ m_pStorageFile->setEncodedMP( OUString(), OUString(), true );
// store all the entries with the new password
- for ( int nURLInd = 0; nURLInd < aPersistent.getLength(); nURLInd++ )
- for ( int nNameInd = 0; nNameInd< aPersistent[nURLInd].UserList.getLength(); nNameInd++ )
- addPersistent( aPersistent[nURLInd].Url,
- aPersistent[nURLInd].UserList[nNameInd].UserName,
- aPersistent[nURLInd].UserList[nNameInd].Passwords,
+ for ( const auto& rURL : aPersistent )
+ for ( const auto& rUser : rURL.UserList )
+ addPersistent( rURL.Url, rUser.UserName, rUser.Passwords,
uno::Reference< task::XInteractionHandler >() );
bResult = true;
@@ -1232,8 +1318,8 @@ sal_Bool SAL_CALL PasswordContainer::isDefaultMasterPasswordUsed()
if ( !m_pStorageFile )
throw uno::RuntimeException();
- OUString aEncodedMP;
- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) && aEncodedMP.isEmpty() );
+ OUString aEncodedMP, aEncodedMPIV;
+ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && aEncodedMP.isEmpty() );
}
diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx
index 878eeb8fadaf..032b8cb1ecda 100644
--- a/svl/source/passwordcontainer/passwordcontainer.hxx
+++ b/svl/source/passwordcontainer/passwordcontainer.hxx
@@ -36,6 +36,7 @@
#include <unotools/configitem.hxx>
#include <ucbhelper/interactionrequest.hxx>
+#include <rtl/random.h>
#include <rtl/ref.hxx>
#include <osl/mutex.hxx>
@@ -54,11 +55,12 @@ class NamePassRecord
::std::vector< OUString > m_aMemPass;
// persistent passwords are encrypted in one string
- bool m_bHasPersPass;
+ bool m_bHasPersPass;
OUString m_aPersPass;
+ OUString m_aPersistentIV;
void InitArrays( bool bHasMemoryList, const ::std::vector< OUString >& aMemoryList,
- bool bHasPersistentList, const OUString& aPersistentList )
+ bool bHasPersistentList, const OUString& aPersistentList, const OUString& aPersistentIV )
{
m_bHasMemPass = bHasMemoryList;
if ( bHasMemoryList )
@@ -66,7 +68,10 @@ class NamePassRecord
m_bHasPersPass = bHasPersistentList;
if ( bHasPersistentList )
+ {
m_aPersPass = aPersistentList;
+ m_aPersistentIV = aPersistentIV;
+ }
}
public:
@@ -78,11 +83,12 @@ public:
{
}
- NamePassRecord( const OUString& aName, const OUString& aPersistentList )
+ NamePassRecord( const OUString& aName, const OUString& aPersistentList, const OUString& aPersistentIV )
: m_aName( aName )
, m_bHasMemPass( false )
, m_bHasPersPass( true )
, m_aPersPass( aPersistentList )
+ , m_aPersistentIV( aPersistentIV )
{
}
@@ -91,7 +97,8 @@ public:
, m_bHasMemPass( false )
, m_bHasPersPass( false )
{
- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass );
+ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass,
+ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV );
}
NamePassRecord& operator=( const NamePassRecord& aRecord )
@@ -102,7 +109,9 @@ public:
m_aMemPass.clear();
m_aPersPass.clear();
- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass );
+ m_aPersistentIV.clear();
+ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass,
+ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV );
}
return *this;
}
@@ -138,15 +147,24 @@ public:
return OUString();
}
+ OUString GetPersistentIV() const
+ {
+ if ( m_bHasPersPass )
+ return m_aPersistentIV;
+
+ return OUString();
+ }
+
void SetMemPasswords( const ::std::vector< OUString >& aMemList )
{
m_aMemPass = aMemList;
m_bHasMemPass = true;
}
- void SetPersPasswords( const OUString& aPersList )
+ void SetPersPasswords( const OUString& aPersList, const OUString& aPersIV )
{
m_aPersPass = aPersList;
+ m_aPersistentIV = aPersIV;
m_bHasPersPass = true;
}
@@ -161,6 +179,7 @@ public:
{
m_bHasPersPass = false;
m_aPersPass.clear();
+ m_aPersistentIV.clear();
}
}
@@ -170,6 +189,10 @@ public:
typedef ::std::pair< const OUString, ::std::vector< NamePassRecord > > PairUrlRecord;
typedef ::std::map< OUString, ::std::vector< NamePassRecord > > PassMap;
+// org.openoffice.Office.Common/Passwords/StorageVersion bump if details of
+// how password details are saved changes. Enables migration from previous
+// schemes.
+constexpr sal_Int32 nCurrentStorageVersion = 1;
class PasswordContainer;
@@ -180,6 +203,7 @@ private:
PasswordContainer* mainCont;
bool hasEncoded;
OUString mEncoded;
+ OUString mEncodedIV;
virtual void ImplCommit() override;
@@ -198,8 +222,10 @@ public:
void remove( const OUString& url, const OUString& rec );
void clear();
- bool getEncodedMP( OUString& aResult );
- void setEncodedMP( const OUString& aResult, bool bAcceptEnmpty = false );
+ sal_Int32 getStorageVersion();
+
+ bool getEncodedMP( OUString& aResult, OUString& aResultIV );
+ void setEncodedMP( const OUString& aResult, const OUString& aResultIV, bool bAcceptEmpty = false );
void setUseStorage( bool bUse );
bool useStorage();
@@ -220,6 +246,29 @@ private:
css::uno::Reference< css::lang::XComponent > mComponent;
SysCredentialsConfig mUrlContainer;
+ class RandomPool
+ {
+ private:
+ rtlRandomPool m_aRandomPool;
+ public:
+ RandomPool() : m_aRandomPool(rtl_random_createPool())
+ {
+ }
+ rtlRandomPool get()
+ {
+ return m_aRandomPool;
+ }
+ ~RandomPool()
+ {
+ // Clean up random pool memory
+ rtl_random_destroyPool(m_aRandomPool);
+ }
+ };
+
+ RandomPool mRandomPool;
+
+ OUString createIV();
+
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::task::UserRecord > CopyToUserRecordSequence(
const ::std::vector< NamePassRecord >& original,
@@ -270,10 +319,10 @@ css::task::UrlRecord find(
const css::uno::Reference< css::task::XInteractionHandler >& Handler );
/// @throws css::uno::RuntimeException
- static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword, css::task::PasswordRequestMode mode );
+ static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPassword, css::task::PasswordRequestMode mode );
/// @throws css::uno::RuntimeException
- static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPassword );
+ static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPassword );
public:
PasswordContainer( const css::uno::Reference< css::lang::XMultiServiceFactory >& );
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/docsh.hxx b/sw/inc/docsh.hxx
index 291b20455c17..ba0a823ed258 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -322,16 +322,19 @@ public:
void CallAutomationDocumentEventSinks(const OUString& Method, css::uno::Sequence< css::uno::Any >& Arguments);
void RegisterAutomationDocumentObject(css::uno::Reference< ooo::vba::word::XDocument > const& xDocument);
- class LockAllViewsGuard
+ // Lock all unlocked views, and returns a guard object which unlocks those views when destructed
+ virtual std::unique_ptr<LockAllViewsGuard> LockAllViews() override;
+
+protected:
+ class LockAllViewsGuard_Impl : public LockAllViewsGuard
{
std::vector<SwViewShell*> m_aViewWasUnLocked;
public:
- explicit LockAllViewsGuard(SwViewShell* pViewShell);
- ~LockAllViewsGuard();
+ explicit LockAllViewsGuard_Impl(SwViewShell* pViewShell);
+ ~LockAllViewsGuard_Impl();
};
- // Lock all unlocked views, and returns a guard object which unlocks those views when destructed
- std::unique_ptr<LockAllViewsGuard> LockAllViews();
+
};
/** Find the right DocShell and create a new one:
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/in_056132_mod.odt b/sw/qa/extras/layout/data/in_056132_mod.odt
new file mode 100644
index 000000000000..548401063bdd
--- /dev/null
+++ b/sw/qa/extras/layout/data/in_056132_mod.odt
Binary files differ
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 de540b8e4834..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)
{
@@ -3189,6 +3191,55 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122607_regression)
aTempFile.EnableKillingFile();
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf150616)
+{
+ discardDumpedLayout();
+ if (mxComponent.is())
+ mxComponent->dispose();
+
+ OUString const pName("in_056132_mod.odt");
+
+ OUString const url(m_directories.getURLFromSrc(DATA_DIRECTORY) + pName);
+
+ // note: must set Hidden property, so that SfxFrameViewWindow_Impl::Resize()
+ // does *not* forward initial VCL Window Resize and thereby triggers a
+ // layout which does not happen on soffice --convert-to pdf.
+ std::vector<beans::PropertyValue> aFilterOptions = {
+ { beans::PropertyValue("Hidden", -1, uno::Any(true), beans::PropertyState_DIRECT_VALUE) },
+ };
+
+ std::cout << pName << ":\n";
+
+ // inline the loading because currently properties can't be passed...
+ mxComponent = loadFromDesktop(url, "com.sun.star.text.TextDocument",
+ comphelper::containerToSequence(aFilterOptions));
+ uno::Sequence<beans::PropertyValue> props(comphelper::InitPropertySequence({
+ { "FilterName", uno::Any(OUString("writer_pdf_Export")) },
+ }));
+ utl::TempFile aTempFile;
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ xStorable->storeToURL(aTempFile.GetURL(), props);
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // this one was 0 height
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/LineBreak", "Line",
+ "Important information here!");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/infos/bounds", "height",
+ "253");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[2]/infos/bounds", "top",
+ "7925");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/LineBreak", "Line",
+ "xxx 111 ");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/infos/bounds", "height",
+ "697");
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab[3]/row[2]/cell[2]/txt[3]/infos/bounds", "top",
+ "8178");
+
+ aTempFile.EnableKillingFile();
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBtlrCell)
{
SwDoc* pDoc = createDoc("btlr-cell.odt");
@@ -3568,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/odfexport/data/tdf132642_keepWithNextTable.odt b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt
new file mode 100644
index 000000000000..739cd0078ad7
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf132642_keepWithNextTable.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 4b8cef0525c9..f93696f1ec32 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1998,6 +1998,13 @@ DECLARE_ODFEXPORT_TEST(testTdf101710, "tdf101710.odt")
CPPUNIT_ASSERT_EQUAL(sal_uInt32(10104), getProperty<sal_uInt32>(xStyle, "NumberFormat"));
}
+DECLARE_ODFEXPORT_TEST(testTdf132642_keepWithNextTable, "tdf132642_keepWithNextTable.odt")
+{
+ // Since the row is very big, it should split over two pages.
+ // Since up to this point we haven't tried to make it match MS formats, it should start on page 1.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Row splits over 2 pages", 2, getPages());
+}
+
DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt")
{
// Test that the loext:mimetype attribute is written for exported images, tdf#109202
diff --git a/sw/qa/extras/odfimport/data/tdf149978.fodt b/sw/qa/extras/odfimport/data/tdf149978.fodt
new file mode 100644
index 000000000000..5c4840c258fc
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/tdf149978.fodt
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:officeooo="http://openoffice.org/2009/office" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rpt="http://openoffice.org/2005/report" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:font-family-generic="roman" style:font-pitch="variable" style:name="Times New Roman" svg:font-family="'Times New Roman'"/>
+ <style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="Lucida Sans Unicode" svg:font-family="'Lucida Sans Unicode'"/>
+ <style:font-face style:font-family-generic="system" style:font-pitch="variable" style:name="Tahoma" svg:font-family="Tahoma"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:line-break="strict" style:punctuation-wrap="hanging" style:tab-stop-distance="1.251cm" style:text-autospace="ideograph-alpha" style:writing-mode="page"/>
+ <style:text-properties fo:country="DE" fo:font-size="12pt" fo:hyphenate="false" fo:hyphenation-push-char-count="2" fo:hyphenation-remain-char-count="2" fo:language="de" style:country-asian="none" style:country-complex="none" style:font-name="Times New Roman" style:font-name-asian="Lucida Sans Unicode" style:font-name-complex="Tahoma" style:font-size-asian="12pt" style:font-size-complex="12pt" style:language-asian="zxx" style:language-complex="zxx" style:letter-kerning="true" style:use-window-font-color="true"/>
+ </style:default-style>
+ </office:styles>
+
+ <office:automatic-styles>
+ <style:style style:family="text" style:name="A25" style:parent-style-name="">
+ <style:text-properties fo:background-color="#d3d3d3"/>
+ </style:style>
+ <style:style style:family="text" style:name="A26" style:parent-style-name="">
+ <style:text-properties fo:background-color="inherit" fo:color="inherit"/>
+ </style:style>
+
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm" loext:margin-gutter="0cm">
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="solid" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:style style:name="dp1" style:family="drawing-page">
+ <style:drawing-page-properties draw:background-size="full"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1" draw:style-name="dp1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+ <text:p>foo <text:span text:style-name="A25"><text:span text:style-name="A26">bar</text:span></text:span> baz</text:p>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 703de09ef7f7..fb5441da5254 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -255,6 +255,18 @@ DECLARE_ODFIMPORT_TEST(testPageStyleLayoutDefault, "hello.odt")
CPPUNIT_ASSERT_EQUAL(style::PageStyleLayout_ALL, getProperty<style::PageStyleLayout>(xPropertySet, "PageStyleLayout"));
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf149978)
+{
+ load(mpTestDocumentPath, "tdf149978.fodt");
+ // on Linux the bug only reproduces if a document has been loaded previously
+ load(mpTestDocumentPath, "tdf149978.fodt");
+ // this was nondeterministic so try 10 times
+ for (int i = 1; i <= 10; ++i)
+ {
+ CPPUNIT_ASSERT_EQUAL(COL_WHITE, getProperty<Color>(getRun(getParagraph(i), 2, "bar"), "CharBackColor"));
+ }
+}
+
DECLARE_ODFIMPORT_TEST(testTdf64038, "space.odt")
{
// no space
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index 18b8c4824e35..66cf57cd6093 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -1210,7 +1210,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf81345_045Original,"tdf81345.docx")
uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
- xCursor->jumpToPage(2);
+ xCursor->jumpToLastPage();
OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
CPPUNIT_ASSERT(pageStyleName != "Standard");
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/qa/extras/ww8export/data/tdf91083_tableKeep.doc b/sw/qa/extras/ww8export/data/tdf91083_tableKeep.doc
deleted file mode 100644
index 2215ab0e92d3..000000000000
--- a/sw/qa/extras/ww8export/data/tdf91083_tableKeep.doc
+++ /dev/null
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt b/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt
new file mode 100644
index 000000000000..19a1ac843a78
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf91083_tableKeep2.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt b/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt
new file mode 100644
index 000000000000..d3a13baf490a
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf91083_tableKeep3.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx
index 4804610a8900..5c35d53820b0 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -1296,6 +1296,28 @@ DECLARE_WW8EXPORT_TEST(testTableKeep, "tdf91083.odt")
#endif
#endif
+DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep2, "tdf91083_tableKeep2.odt")
+{
+ //emulate table "keep with next" - split large row in order to keep with previous paragraph
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table doesn't split, so it starts on page 2",
+ OUString("0"), parseDump("count(//page[1]//tab)") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Page 2 starts with a paragraph/title, not a table",
+ OUString("KeepWithNext"), parseDump("//page[2]/body/txt[1]") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table sticks with previous paragraph, so it starts on page 2",
+ OUString("1"), parseDump("count(//page[2]//tab)") );
+ CPPUNIT_ASSERT_MESSAGE("Row itself splits, not the table at a row boundary",
+ "Cell 2" != parseDump("//page[3]//tab//row[2]/cell[1]/txt[1]") );
+}
+
+DECLARE_WW8EXPORT_TEST(tesTdf91083_tableKeep3, "tdf91083_tableKeep3.odt")
+{
+ //emulate table "keep with next" - split single row table in order to keep with previous paragraph
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table doesn't split, so it starts on page 2",
+ OUString("0"), parseDump("count(//page[1]//tab)") );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Table sticks with previous paragraph, so it starts on page 2",
+ OUString("1"), parseDump("count(//page[2]//tab)") );
+}
+
DECLARE_WW8EXPORT_TEST(testTdf76349_textboxMargins, "tdf76349_textboxMargins.doc")
{
// textboxes without borders were losing their spacing items in round-tripping
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/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index cb956d8f916c..f8856c9734ce 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -1730,13 +1730,6 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
// an unsolvable problem: We ignore it with all our power.
if ( !bMoveable || IsUndersized() )
{
- if( !bMoveable && IsInTab() )
- {
- long nDiff = -aRectFnSet.BottomDist( getFrameArea(), aRectFnSet.GetPrtBottom(*GetUpper()) );
- long nReal = GetUpper()->Grow( nDiff );
- if( nReal )
- continue;
- }
break;
}
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 f2314a12ac2f..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?
@@ -1925,11 +1923,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
auto pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
const SwBorderAttrs *pAttrs = pAccess->Get();
- const bool bLargeTable = GetTable()->GetTabLines().size() > 64; //arbitrary value, virtually guaranteed to be larger than one page.
- const bool bEmulateTableKeep = !bLargeTable && AreAllRowsKeepWithNext( GetFirstNonHeadlineRow(), /*bCheckParents=*/false );
- // The beloved keep attribute
- const bool bKeep = IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), bEmulateTableKeep);
-
// All rows should keep together
const bool bDontSplit = !IsFollow() &&
( !GetFormat()->GetLayoutSplit().GetValue() );
@@ -1955,6 +1948,11 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
bool bLastRowHasToMoveToFollow = false;
bool bLastRowMoveNoMoreTries = false;
+ const bool bLargeTable = GetTable()->GetTabLines().size() > 64; //arbitrary value, virtually guaranteed to be larger than one page.
+ const bool bEmulateTableKeep = !bLargeTable && bTableRowKeep && AreAllRowsKeepWithNext( GetFirstNonHeadlineRow(), /*bCheckParents=*/false );
+ // The beloved keep attribute
+ const bool bKeep = IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), bEmulateTableKeep);
+
// Join follow table, if this table is not allowed to split:
if ( bDontSplit )
{
@@ -2402,10 +2400,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
AreAllRowsKeepWithNext( pFirstNonHeadlineRow ) ) &&
!pIndPrev &&
!bDontSplit;
- const bool bEmulateTableKeepFwdMoveAllowed = IsKeepFwdMoveAllowed(bEmulateTableKeep);
+ // tdf91083 MSCompat: this extends bAllowSplitOfRow (and perhaps should just replace it).
+ // If the kept-together items cannot move to a new page, a table split is in general allowed.
+ const bool bEmulateTableKeepSplitAllowed = bEmulateTableKeep && !IsKeepFwdMoveAllowed(/*IgnoreMyOwnKeepValue=*/true);
if ( pFirstNonHeadlineRow && nUnSplitted > 0 &&
- ( !bEmulateTableKeepFwdMoveAllowed ||
+ ( bEmulateTableKeepSplitAllowed ||
( ( !bTableRowKeep || pFirstNonHeadlineRow->GetNext() ||
!pFirstNonHeadlineRow->ShouldRowKeepWithNext() || bAllowSplitOfRow
) && ( !bDontSplit || !pIndPrev )
@@ -2413,14 +2413,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
// #i29438#
// Special DoNotSplit cases:
- // We better avoid splitting if the table keeps with next paragraph and can move fwd still.
// We better avoid splitting of a row frame if we are inside a columned
// section which has a height of 0, because this is not growable and thus
// all kinds of unexpected things could happen.
- if ( !bEmulateTableKeepFwdMoveAllowed ||
- ( IsInSct() && FindSctFrame()->Lower()->IsColumnFrame() &&
- 0 == aRectFnSet.GetHeight(GetUpper()->getFrameArea())
- ) )
+ if ( IsInSct() && FindSctFrame()->Lower()->IsColumnFrame() &&
+ 0 == aRectFnSet.GetHeight(GetUpper()->getFrameArea())
+ )
{
bTryToSplit = false;
}
@@ -2490,7 +2488,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// The repeating lines / keeping lines still fit into the upper or
// if we do not have an (in)direct Prev, we split anyway.
if( aRectFnSet.YDiff(nDeadLine, nBreakLine) >=0
- || !pIndPrev || !bEmulateTableKeepFwdMoveAllowed )
+ || !pIndPrev || bEmulateTableKeepSplitAllowed )
{
aNotify.SetLowersComplete( false );
bSplit = true;
@@ -2510,7 +2508,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
}
- const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || !bEmulateTableKeepFwdMoveAllowed) ) );
+ const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || bEmulateTableKeepSplitAllowed) ) );
if (!bTryToSplit && !bSplitError)
{
--nUnSplitted;
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/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 3d55ed251f2b..fcb2fe20c0ba 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -3241,13 +3241,12 @@ bool SwpHints::TryInsertHint(
{
// There may be more than one character style at the current position.
// Take care of the sort number.
- // Special case ruby portion: During import, the ruby attribute is set
- // multiple times
- // Special case hyperlink: During import, the ruby attribute is set
- // multiple times
// FME 2007-11-08 #i82989# in NOHINTADJUST mode, we want to insert
// character attributes directly
- if ( RES_TXTATR_CHARFMT == nWhich && !bNoHintAdjustMode )
+ if (!bNoHintAdjustMode
+ && ( (RES_TXTATR_CHARFMT == nWhich)
+ // tdf#149978 also for import of automatic styles, could be produced by non-LO application
+ || (RES_TXTATR_AUTOFMT == nWhich && rNode.GetDoc()->IsInXMLImport())))
{
BuildPortions( rNode, *pHint, nMode );
}
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/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index ca1eeb9b9ce5..fb164cd873e1 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1089,7 +1089,12 @@ void SwHTMLParser::InsertFloatingFrame()
bool bHasBorder = aFrameDesc.HasFrameBorder();
Size aMargin = aFrameDesc.GetMargin();
- xSet->setPropertyValue("FrameURL", uno::makeAny( aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE ) ) );
+ OUString sHRef = aFrameDesc.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
+
+ if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+ NotifyMacroEventRead();
+
+ xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingMode::Auto )
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 d7bbc44d2d20..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;
@@ -856,9 +857,14 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
if ( xSet.is() )
{
+ OUString sHRef = URIHelper::SmartRel2Abs(
+ INetURLObject( GetXMLImport().GetBaseURL() ), rHRef );
+
+ if (INetURLObject(sHRef).GetProtocol() == INetProtocol::Macro)
+ GetXMLImport().NotifyMacroEventRead();
+
xSet->setPropertyValue("FrameURL",
- makeAny( URIHelper::SmartRel2Abs(
- INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) );
+ makeAny( sHRef ) );
xSet->setPropertyValue("FrameName",
makeAny( rName ) );
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 083b4ec6c648..a6a56fb33366 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -380,7 +380,7 @@ bool SwDocShell::Save()
return !nErr.IsError();
}
-SwDocShell::LockAllViewsGuard::LockAllViewsGuard(SwViewShell* pViewShell)
+SwDocShell::LockAllViewsGuard_Impl::LockAllViewsGuard_Impl(SwViewShell* pViewShell)
{
if (!pViewShell)
return;
@@ -394,23 +394,21 @@ SwDocShell::LockAllViewsGuard::LockAllViewsGuard(SwViewShell* pViewShell)
}
}
-SwDocShell::LockAllViewsGuard::~LockAllViewsGuard()
+SwDocShell::LockAllViewsGuard_Impl::~LockAllViewsGuard_Impl()
{
for (SwViewShell* pShell : m_aViewWasUnLocked)
pShell->LockView(false);
}
-std::unique_ptr<SwDocShell::LockAllViewsGuard> SwDocShell::LockAllViews()
+std::unique_ptr<SfxObjectShell::LockAllViewsGuard> SwDocShell::LockAllViews()
{
- return std::make_unique<LockAllViewsGuard>(GetEditShell());
+ return std::make_unique<LockAllViewsGuard_Impl>(GetEditShell());
}
// Save using the Defaultformat
bool SwDocShell::SaveAs( SfxMedium& rMedium )
{
SwWait aWait( *this, true );
- // tdf#41063: prevent jumping to cursor at any temporary modification
- auto aViewGuard(LockAllViews());
//#i3370# remove quick help to prevent saving of autocorrection suggestions
if (m_pView)
m_pView->GetEditWin().StopQuickHelp();
diff --git a/sw/source/uibase/docvw/OverlayRanges.hxx b/sw/source/uibase/docvw/OverlayRanges.hxx
index 7482deef8f97..f8ea5694b128 100644
--- a/sw/source/uibase/docvw/OverlayRanges.hxx
+++ b/sw/source/uibase/docvw/OverlayRanges.hxx
@@ -24,6 +24,7 @@
#include <basegfx/range/b2drange.hxx>
#include <vector>
+#include <memory>
class SwView;
diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.hxx b/sw/source/uibase/docvw/ShadowOverlayObject.hxx
index 637d088eab7b..3651bf4e8b8d 100644
--- a/sw/source/uibase/docvw/ShadowOverlayObject.hxx
+++ b/sw/source/uibase/docvw/ShadowOverlayObject.hxx
@@ -22,6 +22,8 @@
#include <svx/sdr/overlay/overlayobject.hxx>
+#include <memory>
+
class SwView;
namespace sw { namespace sidebarwindows {
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 149648caa3a0..ec585cda8c25 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3037,8 +3037,14 @@ void SAL_CALL SwXTextDocument::render(
SwWrtShell* pWrtShell = pSwView ? pSwView->GetWrtShellPtr() : nullptr;
- SwPrintData const& rSwPrtOptions =
- *m_pRenderData->GetSwPrtOptions();
+ SwPrintData rSwPrtOptions = *m_pRenderData->GetSwPrtOptions();
+ if (bIsPDFExport)
+ {
+ rSwPrtOptions.SetPrintPostIts(
+ lcl_GetBoolProperty(rxOptions, "ExportNotesInMargin")
+ ? SwPostItMode::InMargins
+ : SwPostItMode::NONE);
+ }
if (bIsPDFExport && (bFirstPage || bHasPDFExtOutDevData) && pWrtShell)
{
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 3c186dd08d63..63ebfb84b8f9 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -128,10 +128,16 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath)
case XPATH_NUMBER:
return OUString::number(pXmlObj->floatval);
case XPATH_STRING:
- return convert(pXmlObj->stringval);
+ {
+ auto convertedVal = convert(pXmlObj->stringval);
+ xmlXPathFreeObject(pXmlObj);
+ return convertedVal;
+ }
+#if LIBXML_VERSION < 21000 || defined(LIBXML_XPTR_LOCS_ENABLED)
case XPATH_POINT:
case XPATH_RANGE:
case XPATH_LOCATIONSET:
+#endif
case XPATH_USERS:
case XPATH_XSLT_TREE:
CPPUNIT_FAIL("Unsupported XPath type");
diff --git a/translations b/translations
-Subproject 3f74ca89c8934eb51150c6118d2a328eb25a9fa
+Subproject 114c2ce430a32f986c9d47e76c6b1da252fd5d6
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/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index 2a055f10cdc4..6da7ed351f80 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -44,12 +44,14 @@ namespace XPath
return XPathObjectType_XPATH_NUMBER;
case XPATH_STRING:
return XPathObjectType_XPATH_STRING;
+#if LIBXML_VERSION < 21000 || defined(LIBXML_XPTR_LOCS_ENABLED)
case XPATH_POINT:
return XPathObjectType_XPATH_POINT;
case XPATH_RANGE:
return XPathObjectType_XPATH_RANGE;
case XPATH_LOCATIONSET:
return XPathObjectType_XPATH_LOCATIONSET;
+#endif
case XPATH_USERS:
return XPathObjectType_XPATH_USERS;
case XPATH_XSLT_TREE:
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 114cf8b87563..d557fb75cbd5 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -436,8 +436,9 @@ executeMasterPasswordDialog(
OUStringBuffer aBuffer;
for (sal_uInt8 i : aKey)
{
- aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
- aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+ // match PasswordContainer::DecodePasswords aMasterPasswd.copy(index * 2, 2).toUInt32(16));
+ aBuffer.append(OUString::number(i >> 4, 16));
+ aBuffer.append(OUString::number(i & 15, 16));
}
rInfo.SetPassword(aBuffer.makeStringAndClear());
}
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/data/reduce-small-image.fodt b/vcl/qa/cppunit/pdfexport/data/reduce-small-image.fodt
new file mode 100644
index 000000000000..99ff22746e48
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/reduce-small-image.fodt
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ooo="http://openoffice.org/2004/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:default-style style:family="graphic">
+ </style:default-style>
+ <style:style style:name="Graphics" style:family="graphic">
+ </style:style>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:run-through="foreground" style:horizontal-pos="center" style:horizontal-rel="paragraph" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p text:style-name="Standard"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="char" svg:width="0.041cm" svg:height="0.041cm" draw:z-index="0"><draw:image loext:mime-type="image/png"><office:binary-data>iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMklEQVR42mP4//8/AyWYYXAZ
+ wHSK+z8pbOoaAJIgBWM1gFh/jxqAxwCKYmHgE9KAZSYAhK3Dgc2FxfUAAAAASUVORK5CYII=
+ </office:binary-data></draw:image></draw:frame></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 32288d569728..941186d9bd6b 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -149,6 +149,7 @@ public:
//BAD CPPUNIT_TEST(testTdf106972Pdf17);
//BAD CPPUNIT_TEST(testTdf107018);
//BAD CPPUNIT_TEST(testTdf107089);
+ void testReduceSmallImage();
CPPUNIT_TEST_SUITE(PdfExportTest);
// CPPUNIT_TEST(testTdf106059);
@@ -186,6 +187,7 @@ public:
CPPUNIT_TEST(testTdf115967);
CPPUNIT_TEST(testTdf121615);
CPPUNIT_TEST(testTocLink);
+ CPPUNIT_TEST(testReduceSmallImage);
CPPUNIT_TEST_SUITE_END();
};
@@ -679,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);
}
@@ -1669,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;
@@ -1704,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 **");
}
@@ -1735,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();
}
@@ -1830,6 +1833,45 @@ void PdfExportTest::testTocLink()
CPPUNIT_ASSERT(FPDFLink_Enumerate(pPdfPage.get(), &nStartPos, &pLinkAnnot));
}
+void PdfExportTest::testReduceSmallImage()
+{
+ // Load the Writer document.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "reduce-small-image.fodt";
+ mxComponent = loadFromDesktop(aURL);
+
+ // Save as PDF.
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Parse the PDF: get the image.
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ maMemory.WriteStream(aFile);
+ DocumentHolder pPdfDocument(
+ FPDF_LoadMemDocument(maMemory.GetData(), maMemory.GetSize(), /*password=*/nullptr));
+ CPPUNIT_ASSERT(pPdfDocument.get());
+ CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument.get()));
+ PageHolder pPdfPage(FPDF_LoadPage(pPdfDocument.get(), /*page_index=*/0));
+ CPPUNIT_ASSERT(pPdfPage.get());
+ CPPUNIT_ASSERT_EQUAL(1, FPDFPage_CountObjects(pPdfPage.get()));
+ FPDF_PAGEOBJECT pPageObject = FPDFPage_GetObject(pPdfPage.get(), 0);
+ CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(pPageObject));
+
+ // Make sure we don't scale down a tiny bitmap.
+ FPDF_BITMAP pBitmap = FPDFImageObj_GetBitmap(pPageObject);
+ CPPUNIT_ASSERT(pBitmap);
+ int nWidth = FPDFBitmap_GetWidth(pBitmap);
+ int nHeight = FPDFBitmap_GetHeight(pBitmap);
+ FPDFBitmap_Destroy(pBitmap);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 16
+ // - Actual : 6
+ // i.e. the image was scaled down to 300 DPI, even if it had tiny size.
+ CPPUNIT_ASSERT_EQUAL(16, nWidth);
+ CPPUNIT_ASSERT_EQUAL(16, nHeight);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
}
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/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 8696fd259a0e..f3a5a86d4df2 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -568,6 +568,10 @@ void PDFExtOutDevData::SetIsExportNotes( const bool bExportNotes )
{
mbExportNotes = bExportNotes;
}
+void PDFExtOutDevData::SetIsExportNotesInMargin( const bool bExportNotesInMargin )
+{
+ mbExportNotesInMargin = bExportNotesInMargin;
+}
void PDFExtOutDevData::SetIsExportNotesPages( const bool bExportNotesPages )
{
mbExportNotesPages = bExportNotesPages;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 5e5c0e5fbf6a..5edf11eba18d 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -110,11 +110,13 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
bIsPng = (eType == GfxLinkType::NativePng);
}
- if( i_rContext.m_nMaxImageResolution > 50 )
+ // Do not downsample images smaller than 50x50px.
+ const Size aBmpSize(aBitmapEx.GetSizePixel());
+ if (i_rContext.m_nMaxImageResolution > 50 && aBmpSize.getWidth() > 50
+ && aBmpSize.getHeight() > 50)
{
// do downsampling if necessary
const Size aDstSizeTwip( i_pDummyVDev->PixelToLogic(i_pDummyVDev->LogicToPixel(aSize), MapMode(MapUnit::MapTwip)) );
- const Size aBmpSize( aBitmapEx.GetSizePixel() );
const double fBmpPixelX = aBmpSize.Width();
const double fBmpPixelY = aBmpSize.Height();
const double fMaxPixelX = aDstSizeTwip.Width() * i_rContext.m_nMaxImageResolution / 1440.0;
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/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index a54bc05a6b92..ad1443ae71c4 100644
--- a/wizards/source/access2base/DoCmd.xba
+++ b/wizards/source/access2base/DoCmd.xba
@@ -2655,7 +2655,7 @@ Private Sub _ShellExecute(sCommand As String)
Dim oShell As Object
Set oShell = createUnoService(&quot;com.sun.star.system.SystemShellExecute&quot;)
- oShell.execute(sCommand, &quot;&quot; , com.sun.star.system.SystemShellExecuteFlags.DEFAULTS)
+ oShell.execute(sCommand, &quot;&quot; , com.sun.star.system.SystemShellExecuteFlags.URIS_ONLY)
End Sub &apos; _ShellExecute V0.8.5
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 281649a4fcd7..8c99e834ce50 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -90,6 +90,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/vector/b2dvector.hxx>
+#include <tools/urlobj.hxx>
#include <o3tl/safeint.hxx>
#include <config_features.h>
@@ -3223,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() )
{
@@ -3234,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() )
@@ -3244,6 +3270,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
if( !maHref.isEmpty() )
{
+ if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+ GetImport().NotifyMacroEventRead();
+
xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
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;