summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.fetch1
-rw-r--r--Repository.mk4
-rw-r--r--RepositoryExternal.mk61
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx14
-rw-r--r--basctl/source/basicide/bastype3.hxx1
-rw-r--r--basctl/source/basicide/bastypes.cxx5
-rw-r--r--basctl/source/basicide/iderdll.cxx1
-rw-r--r--basctl/source/basicide/macrodlg.cxx7
-rw-r--r--basctl/uiconfig/basicide/menubar/menubar.xml1
-rwxr-xr-xbin/symstore.sh26
-rw-r--r--brand/cib/Image.svg78
-rw-r--r--brand/cib/banner.svg86
-rw-r--r--brand/cib/flat_logo.svg504
-rw-r--r--brand/cib/intro-highres.pngbin18421 -> 17064 bytes
-rw-r--r--brand/cib/intro-highres.svg264
-rw-r--r--brand/cib/intro.pngbin13854 -> 10827 bytes
-rw-r--r--brand/cib/intro.svg255
-rw-r--r--brand/cib/logo.pngbin4714 -> 731 bytes
-rw-r--r--brand/cib/logo.svg105
-rw-r--r--canvas/source/directx/dx_bitmapcanvashelper.cxx4
-rw-r--r--canvas/source/directx/dx_canvascustomsprite.cxx2
-rw-r--r--canvas/source/directx/dx_canvashelper.cxx4
-rw-r--r--canvas/source/directx/dx_canvashelper.hxx2
-rw-r--r--canvas/source/directx/dx_spritehelper.cxx6
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx7
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx4
-rw-r--r--chart2/uiconfig/menubar/menubar.xml1
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx4
-rw-r--r--comphelper/source/misc/hash.cxx6
-rw-r--r--comphelper/source/streaming/seqoutputstreamserv.cxx13
-rw-r--r--compilerplugins/clang/stringconcatliterals.cxx3
-rw-r--r--compilerplugins/clang/test/unusedfields.cxx1
-rw-r--r--config_host.mk.in3
-rw-r--r--config_host/config_global.h.in1
-rw-r--r--configmgr/source/data.hxx2
-rw-r--r--configure.ac106
-rw-r--r--connectivity/source/commontools/dbconversion.cxx9
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx15
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx31
-rw-r--r--connectivity/source/inc/java/tools.hxx4
-rw-r--r--connectivity/source/parse/sqlbison.y6
-rw-r--r--cui/inc/strings.hrc3
-rw-r--r--cui/source/dialogs/SpellDialog.cxx2
-rw-r--r--cui/source/dialogs/about.cxx56
-rw-r--r--cui/source/inc/about.hxx4
-rw-r--r--cui/source/options/optaboutconfig.cxx44
-rw-r--r--cui/source/options/optaboutconfig.hxx2
-rw-r--r--cui/source/options/optjava.cxx21
-rw-r--r--cui/source/options/optlingu.cxx14
-rw-r--r--cui/source/options/optsave.cxx12
-rw-r--r--cui/source/options/optsave.hxx1
-rw-r--r--cui/uiconfig/ui/editmodulesdialog.ui16
-rw-r--r--cui/uiconfig/ui/optlingupage.ui17
-rw-r--r--cui/uiconfig/ui/optsavepage.ui15
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx3
-rw-r--r--dbaccess/source/ui/dlg/odbcconfig.cxx8
-rw-r--r--dbaccess/uiconfig/dbapp/menubar/menubar.xml1
-rw-r--r--dbaccess/uiconfig/dbquery/menubar/menubar.xml1
-rw-r--r--dbaccess/uiconfig/dbrelation/menubar/menubar.xml1
-rw-r--r--dbaccess/uiconfig/dbtable/menubar/menubar.xml1
-rw-r--r--dbaccess/uiconfig/dbtdata/menubar/menubar.xml1
-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
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx1
-rw-r--r--desktop/source/migration/migration.cxx107
-rw-r--r--desktop/uiconfig/ui/extensionmanager.ui16
-rw-r--r--desktop/win32/source/loader.cxx41
-rw-r--r--distro-configs/LibreOfficeFlatpak.conf1
-rw-r--r--download.lst852
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx31
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx2
-rw-r--r--dtrans/Library_dnd.mk61
-rw-r--r--dtrans/Library_dtrans.mk38
-rw-r--r--dtrans/Library_ftransl.mk53
-rw-r--r--dtrans/Library_sysdtrans.mk53
-rw-r--r--dtrans/Module_dtrans.mk10
-rw-r--r--dtrans/README4
-rw-r--r--dtrans/StaticLibrary_dtobj.mk44
-rw-r--r--dtrans/source/generic/dtrans.cxx74
-rw-r--r--dtrans/source/win32/clipb/APNDataObject.hxx72
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.cxx210
-rw-r--r--dtrans/source/win32/clipb/WinClipbImpl.hxx106
-rw-r--r--dtrans/source/win32/clipb/WinClipboard.cxx239
-rw-r--r--dtrans/source/win32/clipb/wcbentry.cxx82
-rw-r--r--dtrans/source/win32/dnd/dndentry.cxx88
-rw-r--r--dtrans/source/win32/ftransl/ftranslentry.cxx79
-rw-r--r--editeng/inc/editattr.hxx3
-rw-r--r--editeng/qa/unit/core-test.cxx2
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx3
-rw-r--r--editeng/source/editeng/editattr.cxx9
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx5
-rw-r--r--editeng/source/outliner/outleeng.cxx4
-rw-r--r--editeng/source/outliner/outleeng.hxx2
-rw-r--r--editeng/source/outliner/outliner.cxx7
-rw-r--r--editeng/source/uno/unoedprx.cxx4
-rw-r--r--editeng/source/uno/unofored.cxx4
-rw-r--r--editeng/source/uno/unoforou.cxx4
-rw-r--r--editeng/source/uno/unotext.cxx5
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx60
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx25
-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--extensions/uiconfig/sbibliography/menubar/menubar.xml1
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/apache-commons/ExternalPackage_apache_commons_logging.mk16
-rw-r--r--external/apache-commons/ExternalProject_apache_commons_logging.mk29
-rw-r--r--external/apache-commons/Makefile7
-rw-r--r--external/apache-commons/README1
-rw-r--r--external/apache-commons/UnpackedTarball_apache_commons_logging.mk22
-rw-r--r--external/apache-commons/patches/logging.patch46
-rw-r--r--external/breakpad/SIGSTKSZ.patch11
-rw-r--r--external/breakpad/UnpackedTarball_breakpad.mk2
-rw-r--r--external/breakpad/include.patch10
-rw-r--r--external/coinmp/UnpackedTarball_coinmp.mk2
-rw-r--r--external/coinmp/configure-exit.patch33
-rw-r--r--external/coinmp/register.patch369
-rw-r--r--external/ct2n/include.patch.010
-rw-r--r--external/curl/2b0994c29a721c91c57.patch48
-rw-r--r--external/curl/CVE-2023-38545_7.87.0.patch134
-rw-r--r--external/curl/ExternalPackage_curl.mk4
-rw-r--r--external/curl/ExternalProject_curl.mk12
-rw-r--r--external/curl/UnpackedTarball_curl.mk3
-rw-r--r--external/curl/clang-cl.patch.02
-rw-r--r--external/curl/curl-7.26.0_win-proxy.patch27
-rw-r--r--external/curl/curl-msvc-disable-protocols.patch.19
-rw-r--r--external/curl/curl-msvc-zlib.patch.116
-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.024
-rw-r--r--external/expat/0001-Fix-compiler-warnings.patch47
-rw-r--r--external/expat/UnpackedTarball_expat.mk4
-rw-r--r--external/expat/expat-winapi.patch18
-rw-r--r--external/expat/ubsan.patch.011
-rw-r--r--external/gpgmepp/ExternalProject_gpgmepp.mk2
-rw-r--r--external/gpgmepp/UnpackedTarball_gpgmepp.mk1
-rw-r--r--external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.132
-rw-r--r--external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.129
-rw-r--r--external/harfbuzz/UnpackedTarball_harfbuzz.mk1
-rw-r--r--external/hsqldb/UnpackedTarball_hsqldb.mk1
-rw-r--r--external/hsqldb/patches/disable-dump-script.patch14
-rw-r--r--external/icu/UnpackedTarball_icu.mk2
-rw-r--r--external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.294
-rw-r--r--external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.239
-rw-r--r--external/jfreereport/ExternalProject_jfreereport_flow_engine.mk3
-rw-r--r--external/jfreereport/ExternalProject_jfreereport_liblayout.mk7
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libbase.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libformula.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libloader.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_librepository.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk1
-rw-r--r--external/jfreereport/UnpackedTarball_jfreereport_libxml.mk1
-rw-r--r--external/jfreereport/patches/flow-engine.patch3
-rw-r--r--external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1903
-rw-r--r--external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1506
-rw-r--r--external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1266
-rw-r--r--external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1860
-rw-r--r--external/jfreereport/patches/liblayout.patch3
-rw-r--r--external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1635
-rw-r--r--external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1117
-rw-r--r--external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.131
-rw-r--r--external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1313
-rw-r--r--external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1101
-rw-r--r--external/libassuan/ExternalProject_libassuan.mk3
-rw-r--r--external/libffi/ExternalPackage_libffi.mk (renamed from external/apache-commons/Module_apache-commons.mk)12
-rw-r--r--external/libffi/ExternalProject_libffi.mk29
-rw-r--r--external/libffi/Module_libffi.mk1
-rw-r--r--external/libgpg-error/ExternalProject_libgpg-error.mk2
-rw-r--r--external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk1
-rw-r--r--external/libjpeg-turbo/c76f4a08263b0cea40d2967560ac7c21f6959079.patch.138
-rw-r--r--external/liblangtag/UnpackedTarball_liblangtag.mk2
-rw-r--r--external/liblangtag/Wformat-overflow.patch17
-rw-r--r--external/liblangtag/langtag-valencia.patch.029
-rw-r--r--external/libmwaw/Library_mwaw.mk4
-rw-r--r--external/libnumbertext/EmptyString.patch113
-rw-r--r--external/libnumbertext/UnpackedTarball_libnumbertext.mk1
-rw-r--r--external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.158
-rw-r--r--external/libodfgen/ExternalProject_libodfgen.mk4
-rw-r--r--external/libodfgen/Library_odfgen.mk3
-rw-r--r--external/libodfgen/UnpackedTarball_libodfgen.mk8
-rw-r--r--external/libodfgen/c++11.patch44
-rw-r--r--external/libodfgen/libodfgen-bundled-soname.patch.05
-rw-r--r--external/liborcus/UnpackedTarball_liborcus.mk18
-rw-r--r--external/liborcus/forcepoint-83.patch.138
-rw-r--r--external/liborcus/forcepoint-84.patch.138
-rw-r--r--external/liborcus/forcepoint-87.patch.127
-rw-r--r--external/liborcus/forcepoint-95.patch.111
-rw-r--r--external/liborcus/include.patch.051
-rw-r--r--external/liborcus/overrun.patch.063
-rw-r--r--external/libtommath/README2
-rw-r--r--external/libtommath/UnpackedTarball_libtommath.mk2
-rw-r--r--external/libtommath/clang-cl.patch16
-rw-r--r--external/libtommath/libtommath-msvc.patch12
-rw-r--r--external/libwpd/UnpackedTarball_libwpd.mk1
-rw-r--r--external/libwpd/include.patch10
-rw-r--r--external/libxml2/ExternalPackage_libxml2.mk2
-rw-r--r--external/libxml2/ExternalProject_libxml2.mk4
-rw-r--r--external/libxml2/UnpackedTarball_libxml2.mk7
-rw-r--r--external/libxml2/libxml2-XMLCALL-redefine.patch.011
-rw-r--r--external/libxml2/libxml2-android.patch6
-rw-r--r--external/libxml2/libxml2-config.patch.143
-rw-r--r--external/libxml2/libxml2-global-symbols.patch18
-rw-r--r--external/libxml2/libxml2-icu-sym.patch.02
-rw-r--r--external/libxml2/libxml2-icu.patch.02
-rw-r--r--external/libxml2/ubsan.patch.011
-rw-r--r--external/libxml2/xml2-config.in28
-rw-r--r--external/libxslt/ExternalPackage_libxslt.mk2
-rw-r--r--external/libxslt/README2
-rw-r--r--external/libxslt/UnpackedTarball_libxslt.mk1
-rw-r--r--external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.169
-rw-r--r--external/libxslt/rpath.patch.02
-rw-r--r--external/neon/Library_neon.mk6
-rw-r--r--external/nss/ExternalProject_nss.mk7
-rw-r--r--external/nss/README26
-rw-r--r--external/nss/UnpackedTarball_nss.mk4
-rw-r--r--external/nss/asan.patch.16
-rw-r--r--external/nss/clang-cl.patch.012
-rw-r--r--external/nss/macos-dlopen.patch.02
-rw-r--r--external/nss/nss-android.patch.113
-rw-r--r--external/nss/nss-bz1646594.patch.12
-rw-r--r--external/nss/nss-ios.patch112
-rw-r--r--external/nss/nss-restore-manual-pre-dependencies.patch.16
-rw-r--r--external/nss/nss-win32-make.patch.14
-rw-r--r--external/nss/nss.aix.patch10
-rw-r--r--external/nss/nss.bzmozilla1238154.patch2
-rw-r--r--external/nss/nss.cygwin64.in32bit.patch2
-rw-r--r--external/nss/nss.nowerror.patch2
-rw-r--r--external/nss/nss.patch22
-rw-r--r--external/nss/nss.utf8bom.patch.14
-rw-r--r--external/nss/nss.vs2015.patch2
-rw-r--r--external/nss/nss.vs2015.pdb.patch2
-rw-r--r--external/nss/nss.windows.patch6
-rw-r--r--external/nss/nss_macosx.patch17
-rw-r--r--external/nss/ubsan.patch.02
-rw-r--r--external/openssl/ExternalPackage_openssl.mk12
-rw-r--r--external/openssl/ExternalProject_openssl.mk15
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk11
-rw-r--r--external/openssl/openssl-1.0.1h-win64.patch.147
-rw-r--r--external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1578
-rw-r--r--external/openssl/openssl-3650-masm.patch.135
-rw-r--r--external/openssl/openssl-fixbuild.patch.123
-rw-r--r--external/openssl/openssl-no-multilib.patch.038
-rw-r--r--external/openssl/openssllnx.patch23
-rw-r--r--external/openssl/opensslsol.patch20
-rw-r--r--external/openssl/opensslwnt.patch167
-rw-r--r--external/openssl/opensslwnt_safeseh.patch23
-rw-r--r--external/pdfium/Library_pdfium.mk128
-rw-r--r--external/pdfium/README4
-rw-r--r--external/pdfium/UnpackedTarball_pdfium.mk19
-rw-r--r--external/pdfium/build.patch.1180
-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.hxx107
-rw-r--r--external/pdfium/include.patch11
-rw-r--r--external/pdfium/msvc2017.patch.115
-rw-r--r--external/pdfium/ubsan.patch6
-rw-r--r--external/poppler/README2
-rw-r--r--external/poppler/StaticLibrary_poppler.mk59
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk4
-rw-r--r--external/poppler/disable-freetype.patch.141
-rw-r--r--external/poppler/disable-nss-and-gpgmepp.patch.176
-rw-r--r--external/poppler/gcc7-EntityInfo.patch.155
-rw-r--r--external/poppler/gcc7-GfxFont.patch.194
-rw-r--r--external/poppler/poppler-config.patch.191
-rw-r--r--external/postgresql/ExternalProject_postgresql.mk2
-rw-r--r--external/postgresql/postgres-msvc-build.patch.16
-rw-r--r--external/python3/ExternalPackage_python3.mk278
-rw-r--r--external/python3/ExternalProject_python3.mk28
-rw-r--r--external/python3/UnpackedTarball_python3.mk1
-rw-r--r--external/python3/i100492-freebsd.patch.16
-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.3-disable-obmalloc.patch.04
-rw-r--r--external/python3/python-3.3.3-elf-rpath.patch.112
-rw-r--r--external/python3/python-3.5.4-msvc-disable.patch.18
-rw-r--r--external/python3/python-3.5.tweak.strip.soabi.patch2
-rw-r--r--external/python3/python-3.7.6-msvc-ssl.patch.127
-rw-r--r--external/python3/ubsan.patch.023
-rw-r--r--external/redland/UnpackedTarball_raptor.mk1
-rw-r--r--external/redland/raptor/raptor-libxml2-11.patch.115
-rw-r--r--external/xmlsec/0001-xmlSecX509DataGetNodeContent-don-t-return-0-for-non-.patch.168
-rw-r--r--external/xmlsec/UnpackedTarball_xmlsec.mk1
-rw-r--r--external/zlib/UnpackedTarball_zlib.mk4
-rw-r--r--external/zlib/ubsan.patch11
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx1
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx6
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx2
-rw-r--r--forms/source/component/EventThread.hxx1
-rw-r--r--forms/source/xforms/propertysetbase.hxx1
-rw-r--r--formula/source/core/api/token.cxx21
-rw-r--r--fpicker/source/office/contentenumeration.hxx6
-rw-r--r--fpicker/source/office/fileview.cxx10
-rw-r--r--framework/qa/cppunit/dispatchtest.cxx3
-rw-r--r--framework/source/dispatch/closedispatcher.cxx13
-rw-r--r--framework/source/helper/titlebarupdate.cxx2
-rw-r--r--framework/source/services/desktop.cxx21
-rw-r--r--framework/uiconfig/startmodule/menubar/menubar.xml1
-rwxr-xr-xg18
-rw-r--r--helpcompiler/source/HelpCompiler.cxx10
-rw-r--r--helpcompiler/source/HelpLinker.cxx4
m---------helpcontent20
-rw-r--r--hwpfilter/source/drawing.h13
-rw-r--r--hwpfilter/source/hcode.cxx2
-rw-r--r--hwpfilter/source/htags.cxx26
-rw-r--r--hwpfilter/source/hwpfile.cxx7
-rw-r--r--hwpfilter/source/hwpfile.h6
-rw-r--r--hwpfilter/source/hwpread.cxx21
-rw-r--r--hwpfilter/source/hwpreader.cxx91
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx2
-rw-r--r--i18npool/source/characterclassification/cclass_unicode_parser.cxx10
-rwxr-xr-xicon-themes/breeze/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rw-r--r--icon-themes/cib/sfx2/res/logo.pngbin4714 -> 731 bytes
-rw-r--r--icon-themes/colibre/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rwxr-xr-xicon-themes/elementary/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rw-r--r--icon-themes/karasa_jaga/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rwxr-xr-xicon-themes/sifr/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rw-r--r--icon-themes/tango/sfx2/res/logo.pngbin4714 -> 5381 bytes
-rw-r--r--include/comphelper/hash.hxx1
-rw-r--r--include/default.rc2
-rw-r--r--include/editeng/editeng.hxx3
-rw-r--r--include/editeng/outliner.hxx6
-rw-r--r--include/editeng/unoedprx.hxx3
-rw-r--r--include/editeng/unoedsrc.hxx3
-rw-r--r--include/editeng/unofored.hxx2
-rw-r--r--include/editeng/unoforou.hxx2
-rw-r--r--include/editeng/unotext.hxx2
-rw-r--r--include/filter/msfilter/mscodec.hxx1
-rw-r--r--include/jvmfwk/framework.hxx11
-rw-r--r--include/o3tl/lru_map.hxx2
-rw-r--r--include/o3tl/safeint.hxx8
-rw-r--r--include/o3tl/string_view.hxx867
-rw-r--r--include/oox/crypto/AgileEngine.hxx1
-rw-r--r--include/oox/crypto/CryptTools.hxx1
-rw-r--r--include/rtl/bootstrap.h14
-rw-r--r--include/sal/log-areas.dox1
-rw-r--r--include/sal/log.hxx46
-rw-r--r--include/sal/types.h6
-rw-r--r--include/sfx2/basedlgs.hxx5
-rw-r--r--include/sfx2/childwin.hxx1
-rw-r--r--include/sfx2/docmacromode.hxx4
-rw-r--r--include/sfx2/infobar.hxx2
-rw-r--r--include/sfx2/objsh.hxx8
-rw-r--r--include/sfx2/sidebar/SidebarPanelBase.hxx4
-rw-r--r--include/sfx2/strings.hrc3
-rw-r--r--include/sfx2/templatedlg.hxx1
-rw-r--r--include/sfx2/viewfrm.hxx1
-rw-r--r--include/sfx2/viewsh.hxx1
-rw-r--r--include/svl/sigstruct.hxx39
-rw-r--r--include/svl/zforlist.hxx2
-rw-r--r--include/svtools/imageresourceaccess.hxx2
-rw-r--r--include/svx/ClassificationEditView.hxx2
-rw-r--r--include/svx/hexcolorcontrol.hxx2
-rw-r--r--include/svx/svdomeas.hxx2
-rw-r--r--include/svx/svdoole2.hxx17
-rw-r--r--include/svx/svdotext.hxx2
-rw-r--r--include/svx/svdoutl.hxx2
-rw-r--r--include/svx/unoshape.hxx8
-rw-r--r--include/tools/urlobj.hxx5
-rw-r--r--include/vcl/BitmapBuffer.hxx6
-rw-r--r--include/vcl/BitmapTools.hxx5
-rw-r--r--include/vcl/filter/PngImageReader.hxx4
-rw-r--r--include/vcl/font/Feature.hxx1
-rw-r--r--include/vcl/print.hxx1
-rw-r--r--include/vcl/svtabbx.hxx1
-rw-r--r--include/vcl/transfer.hxx4
-rw-r--r--include/vcl/treelistbox.hxx2
-rw-r--r--include/vcl/weld.hxx5
-rw-r--r--include/vcl/window.hxx3
-rw-r--r--include/xmloff/xmlimp.hxx6
-rw-r--r--include/xmloff/xmlnmspe.hxx10
-rw-r--r--include/xmloff/xmltoken.hxx15
-rw-r--r--instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmpbin115906 -> 119082 bytes
-rw-r--r--instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmpbin202314 -> 206778 bytes
-rw-r--r--instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt6
-rw-r--r--instsetoo_native/util/openoffice.lst.in72
-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--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx16
-rw-r--r--jvmfwk/source/framework.cxx79
-rw-r--r--jvmfwk/source/fwkbase.cxx6
-rw-r--r--librelogo/source/LibreLogo/LibreLogo.py34
-rw-r--r--lotuswordpro/source/filter/lwpdrawobj.cxx123
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.cxx35
-rw-r--r--lotuswordpro/source/filter/lwpfribptr.hxx4
-rw-r--r--o3tl/CppunitTest_o3tl_tests.mk2
-rw-r--r--o3tl/qa/test-string_view.cxx212
-rw-r--r--odk/build-examples_common.mk2
-rw-r--r--offapi/com/sun/star/text/ViewSettings.idl6
-rw-r--r--offapi/com/sun/star/view/PrintOptions.idl8
-rw-r--r--officecfg/files.mk1
-rw-r--r--officecfg/registry/data/org/openoffice/Setup.xcu11
-rw-r--r--officecfg/registry/schema/org/openoffice/Inet.xcs6
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs55
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs53
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs41
-rw-r--r--oox/qa/unit/CryptoTest.cxx62
-rw-r--r--oox/source/crypto/AgileEngine.cxx33
-rw-r--r--oox/source/crypto/CryptTools.cxx6
-rw-r--r--oox/source/ole/vbacontrol.cxx6
-rw-r--r--postprocess/CustomTarget_registry.mk1
-rw-r--r--postprocess/Rdb_services.mk5
-rw-r--r--pyuno/source/loader/pythonloader.py4
-rw-r--r--readlicense_oo/license/NOTICE8
-rw-r--r--reportbuilder/Jar_reportbuilder.mk1
-rw-r--r--reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java7
-rw-r--r--reportbuilder/java/org/libreoffice/report/StorageRepository.java48
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/Manifest.mf2
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java9
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java2
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java7
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementLayoutController.java19
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java23
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java23
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/OleProducer.java12
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java10
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java2
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/parser/office/DocumentContentReadHandler.java13
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--reportdesign/uiconfig/dbreport/menubar/menubar.xml1
-rw-r--r--sal/Library_sal.mk1
-rw-r--r--sal/osl/all/log.cxx87
-rw-r--r--sal/rtl/bootstrap.cxx130
-rw-r--r--sax/source/fastparser/fastparser.cxx2
-rw-r--r--sc/inc/document.hxx5
-rw-r--r--sc/inc/documentimport.hxx2
-rw-r--r--sc/inc/drwlayer.hxx1
-rw-r--r--sc/inc/editutil.hxx6
-rw-r--r--sc/inc/table.hxx2
-rw-r--r--sc/qa/extras/scpdfexport.cxx16
-rw-r--r--sc/qa/extras/testdocuments/forcepoint97.xlsxbin0 -> 21127 bytes
-rw-r--r--sc/qa/uitest/calc_tests7/tdf150044.py85
-rw-r--r--sc/qa/unit/data/contentCSV/fdo48621_broken_quotes_exported.csv8
-rw-r--r--sc/qa/unit/data/xlsx/forcepoint107.xlsxbin0 -> 398436 bytes
-rw-r--r--sc/qa/unit/filters-test.cxx9
-rw-r--r--sc/source/core/data/colorscale.cxx6
-rw-r--r--sc/source/core/data/dociter.cxx10
-rw-r--r--sc/source/core/data/documen2.cxx1
-rw-r--r--sc/source/core/data/document.cxx16
-rw-r--r--sc/source/core/data/documentimport.cxx22
-rw-r--r--sc/source/core/data/dpobject.cxx11
-rw-r--r--sc/source/core/data/dptabres.cxx12
-rw-r--r--sc/source/core/data/drwlayer.cxx36
-rw-r--r--sc/source/core/data/formulacell.cxx6
-rw-r--r--sc/source/core/data/global.cxx7
-rw-r--r--sc/source/core/data/table2.cxx30
-rw-r--r--sc/source/core/data/table5.cxx38
-rw-r--r--sc/source/core/inc/interpre.hxx12
-rw-r--r--sc/source/core/tool/compiler.cxx19
-rw-r--r--sc/source/core/tool/editutil.cxx13
-rw-r--r--sc/source/core/tool/interpr1.cxx6
-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.cxx4
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx2
-rw-r--r--sc/source/filter/html/htmlpars.cxx10
-rw-r--r--sc/source/filter/lotus/op.cxx11
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx16
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx2
-rw-r--r--sc/source/filter/orcus/filterdetect.cxx8
-rw-r--r--sc/source/filter/xml/XMLCalculationSettingsContext.cxx14
-rw-r--r--sc/source/filter/xml/XMLExportDataPilot.cxx2
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx28
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx4
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx39
-rw-r--r--sc/source/ui/dbgui/validate.cxx14
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/docsh.cxx8
-rw-r--r--sc/source/ui/docshell/docsh4.cxx8
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx9
-rw-r--r--sc/source/ui/docshell/impex.cxx155
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx3
-rw-r--r--sc/source/ui/inc/gridwin.hxx2
-rw-r--r--sc/source/ui/inc/impex.hxx18
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx2
-rw-r--r--sc/source/ui/inc/validate.hxx8
-rw-r--r--sc/source/ui/pagedlg/scuitphfedit.cxx11
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx3
-rw-r--r--sc/source/ui/unoobj/fielduno.cxx8
-rw-r--r--sc/source/ui/view/cellsh.cxx3
-rw-r--r--sc/source/ui/view/editsh.cxx3
-rw-r--r--sc/source/ui/view/formatsh.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx6
-rw-r--r--sc/source/ui/view/output.cxx5
-rw-r--r--sc/source/ui/view/output2.cxx7
-rw-r--r--sc/source/ui/view/select.cxx3
-rw-r--r--sc/source/ui/view/tabview3.cxx1
-rw-r--r--sc/source/ui/view/viewdata.cxx34
-rw-r--r--sc/source/ui/view/viewfunc.cxx3
-rw-r--r--sc/uiconfig/scalc/menubar/menubar.xml1
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar.ui7
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_compact.ui7
-rw-r--r--sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui7
-rw-r--r--scp2/inc/macros.inc2
-rw-r--r--scp2/source/base/folderitem_base.scp2
-rw-r--r--scp2/source/base/registryitem_base.scp2
-rw-r--r--scp2/source/calc/folderitem_calc.scp2
-rw-r--r--scp2/source/calc/registryitem_calc.scp8
-rw-r--r--scp2/source/draw/folderitem_draw.scp2
-rw-r--r--scp2/source/draw/registryitem_draw.scp8
-rw-r--r--scp2/source/impress/folderitem_impress.scp2
-rw-r--r--scp2/source/impress/registryitem_impress.scp8
-rw-r--r--scp2/source/math/folderitem_math.scp2
-rw-r--r--scp2/source/math/registryitem_math.scp4
-rw-r--r--scp2/source/ooo/folderitem_ooo.scp6
-rw-r--r--scp2/source/ooo/folderitem_ooo.ulf2
-rw-r--r--scp2/source/writer/folderitem_writer.scp2
-rw-r--r--scp2/source/writer/registryitem_writer.scp14
-rw-r--r--scripting/Jar_ScriptFramework.mk1
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java4
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java61
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java73
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java6
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java91
-rw-r--r--scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java6
-rw-r--r--scripting/source/pyprov/mailmerge.py10
-rw-r--r--scripting/source/pyprov/pythonscript.py8
-rw-r--r--sd/qa/uitest/impress_tests/data/tdf153161_FlushToSave.odpbin0 -> 37209 bytes
-rw-r--r--sd/qa/uitest/impress_tests/tdf153161.py41
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx8
-rw-r--r--sd/source/filter/xml/sdxmlwrp.cxx2
-rw-r--r--sd/source/ui/app/sdmod1.cxx29
-rw-r--r--sd/source/ui/remotecontrol/Receiver.cxx21
-rw-r--r--sd/source/ui/view/drviews4.cxx5
-rw-r--r--sd/uiconfig/sdraw/menubar/menubar.xml1
-rw-r--r--sd/uiconfig/sdraw/ui/notebookbar.ui7
-rw-r--r--sd/uiconfig/sdraw/ui/notebookbar_compact.ui7
-rw-r--r--sd/uiconfig/simpress/menubar/menubar.xml1
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar.ui7
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_compact.ui7
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui7
-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/source/packinfo/packinfo_brand.txt56
-rw-r--r--setup_native/source/packinfo/packinfo_extensions.txt30
-rw-r--r--setup_native/source/packinfo/packinfo_office.txt311
-rw-r--r--setup_native/source/packinfo/packinfo_office_help.txt7
-rw-r--r--setup_native/source/packinfo/packinfo_office_lang.txt44
-rw-r--r--setup_native/source/packinfo/packinfo_sdkoo.txt6
-rw-r--r--setup_native/source/packinfo/packinfo_ure.txt16
-rw-r--r--sfx2/Library_sfx.mk3
-rw-r--r--sfx2/qa/complex/sfx2/UndoManager.java4
-rw-r--r--sfx2/sdi/appslots.sdi4
-rw-r--r--sfx2/sdi/sfx.sdi15
-rw-r--r--sfx2/source/appl/appserv.cxx35
-rw-r--r--sfx2/source/appl/childwin.cxx19
-rw-r--r--sfx2/source/appl/macroloader.cxx9
-rw-r--r--sfx2/source/appl/workwin.cxx6
-rw-r--r--sfx2/source/dialog/backingwindow.cxx50
-rw-r--r--sfx2/source/dialog/backingwindow.hxx1
-rw-r--r--sfx2/source/dialog/basedlgs.cxx8
-rw-r--r--sfx2/source/dialog/infobar.cxx20
-rw-r--r--sfx2/source/doc/docfile.cxx55
-rw-r--r--sfx2/source/doc/docmacromode.cxx8
-rw-r--r--sfx2/source/doc/iframe.cxx77
-rw-r--r--sfx2/source/doc/objembed.cxx9
-rw-r--r--sfx2/source/doc/objmisc.cxx67
-rw-r--r--sfx2/source/doc/objstor.cxx37
-rw-r--r--sfx2/source/doc/objxtor.cxx9
-rw-r--r--sfx2/source/doc/printhelper.cxx9
-rw-r--r--sfx2/source/doc/templatedlg.cxx3
-rw-r--r--sfx2/source/inc/eventsupplier.hxx3
-rw-r--r--sfx2/source/inc/macroloader.hxx2
-rw-r--r--sfx2/source/inc/objshimp.hxx3
-rw-r--r--sfx2/source/notify/eventsupplier.cxx34
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx11
-rw-r--r--sfx2/source/view/viewfrm.cxx53
-rw-r--r--sfx2/source/view/viewprn.cxx12
-rw-r--r--sfx2/source/view/viewsh.cxx11
-rw-r--r--sfx2/uiconfig/ui/startcenter.ui16
-rw-r--r--sfx2/uiconfig/ui/templatedlg.ui16
-rw-r--r--shell/source/backends/kf5be/kf5backend.cxx2
-rw-r--r--shell/source/win32/SysShExec.cxx35
-rw-r--r--shell/source/win32/simplemail/senddoc.cxx38
-rw-r--r--shell/source/win32/simplemail/smplmailclient.cxx18
-rw-r--r--shell/source/win32/simplemail/smplmailclient.hxx2
-rw-r--r--solenv/clang-format/blacklist174
-rw-r--r--solenv/flatpak-manifest.in32
-rw-r--r--solenv/gbuild/partial_build.mk2
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk8
-rw-r--r--solenv/gdb/boost/util/printing.py2
-rw-r--r--solenv/gdb/libreoffice/sw.py6
-rw-r--r--solenv/gdb/libreoffice/util/printing.py2
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx4
-rw-r--r--starmath/CppunitTest_starmath_qa_cppunit.mk8
-rw-r--r--starmath/inc/token.hxx2
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx1
-rw-r--r--starmath/qa/cppunit/test_node.cxx1
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx1
-rw-r--r--starmath/qa/extras/mmlexport-test.cxx3
-rw-r--r--starmath/source/accessibility.cxx4
-rw-r--r--starmath/source/accessibility.hxx2
-rw-r--r--starmath/uiconfig/smath/menubar/menubar.xml1
-rw-r--r--svl/source/crypto/cryptosign.cxx16
-rw-r--r--svl/source/numbers/zforlist.cxx8
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx166
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.hxx69
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx2
-rw-r--r--svtools/source/svhtml/parhtml.cxx6
-rw-r--r--svx/source/accessibility/AccessibleEmptyEditSource.cxx2
-rw-r--r--svx/source/dialog/ClassificationEditView.cxx3
-rw-r--r--svx/source/dialog/SafeModeDialog.cxx6
-rw-r--r--svx/source/dialog/crashreportdlg.cxx2
-rw-r--r--svx/source/dialog/crashreportdlg.hxx1
-rw-r--r--svx/source/dialog/fntctrl.cxx2
-rw-r--r--svx/source/dialog/weldeditview.cxx9
-rw-r--r--svx/source/form/fmview.cxx31
-rw-r--r--svx/source/sdr/contact/viewobjectcontact.cxx36
-rw-r--r--svx/source/svdraw/svdedxv.cxx7
-rw-r--r--svx/source/svdraw/svdomeas.cxx6
-rw-r--r--svx/source/svdraw/svdoole2.cxx698
-rw-r--r--svx/source/svdraw/svdotxfl.cxx3
-rw-r--r--svx/source/svdraw/svdoutl.cxx7
-rw-r--r--svx/source/svdraw/svdpdf.cxx16
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_translation_unodialog.hxx1
-rw-r--r--svx/source/unodraw/shapeimpl.hxx12
-rw-r--r--svx/source/unodraw/unomod.cxx6
-rw-r--r--svx/source/unodraw/unopage.cxx14
-rw-r--r--svx/source/unodraw/unoshap4.cxx61
-rw-r--r--svx/source/xml/xmlgrhlp.cxx3
-rw-r--r--svx/uiconfig/ui/crashreportdlg.ui22
-rw-r--r--sw/CppunitTest_sw_core_attr.mk74
-rw-r--r--sw/CppunitTest_sw_core_edit.mk74
-rw-r--r--sw/CppunitTest_sw_core_text.mk2
-rw-r--r--sw/Module_sw.mk2
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/IDocumentContentOperations.hxx11
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx10
-rw-r--r--sw/inc/cmdid.h2
-rw-r--r--sw/inc/crsrsh.hxx37
-rw-r--r--sw/inc/deletelistener.hxx92
-rw-r--r--sw/inc/doc.hxx9
-rw-r--r--sw/inc/editsh.hxx18
-rw-r--r--sw/inc/index.hxx17
-rw-r--r--sw/inc/ndarr.hxx15
-rw-r--r--sw/inc/ndole.hxx19
-rw-r--r--sw/inc/ndtxt.hxx5
-rw-r--r--sw/inc/node.hxx2
-rw-r--r--sw/inc/pam.hxx4
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/inc/swabstdlg.hxx2
-rw-r--r--sw/inc/swcrsr.hxx2
-rw-r--r--sw/inc/swrect.hxx3
-rw-r--r--sw/inc/undobj.hxx12
-rw-r--r--sw/inc/unobaseclass.hxx19
-rw-r--r--sw/inc/unosett.hxx5
-rw-r--r--sw/inc/unotextcursor.hxx4
-rw-r--r--sw/inc/unotextrange.hxx2
-rw-r--r--sw/inc/viewopt.hxx27
-rw-r--r--sw/qa/core/attr/attr.cxx86
-rw-r--r--sw/qa/core/attr/data/attr-set.docxbin0 -> 11582 bytes
-rw-r--r--sw/qa/core/data/html/pass/ofz40593-1.htmlbin0 -> 5192 bytes
-rwxr-xr-xsw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docxbin0 -> 89419 bytes
-rw-r--r--sw/qa/core/data/rtf/fail/forcepoint-82.rtf28
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint-96.rtf8
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint104.rtf571
-rw-r--r--sw/qa/core/data/rtf/pass/forcepoint110.rtfbin0 -> 7776 bytes
-rw-r--r--sw/qa/core/data/ww5/pass/ooo37322-1-WW2.docbin0 -> 5559 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz34749-1.docbin0 -> 49370 bytes
-rw-r--r--sw/qa/core/data/ww8/pass/ofz38011-1.docbin0 -> 63022 bytes
-rw-r--r--sw/qa/core/edit/data/redline-hidden.fodt32
-rw-r--r--sw/qa/core/edit/edit.cxx57
-rw-r--r--sw/qa/core/layout/data/tdf122894-4.docbin0 -> 214528 bytes
-rw-r--r--sw/qa/core/layout/layout.cxx5
-rw-r--r--sw/qa/core/text/text.cxx51
-rw-r--r--sw/qa/core/uwriter.cxx2
-rw-r--r--sw/qa/extras/htmlexport/htmlexport.cxx16
-rwxr-xr-xsw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf347
-rw-r--r--sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtfbin0 -> 109018 bytes
-rw-r--r--sw/qa/extras/layout/data/abi11870-2.odtbin0 -> 117386 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint102.rtf178
-rw-r--r--sw/qa/extras/layout/data/forcepoint89.htmlbin0 -> 3321 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint90.rtf1
-rw-r--r--sw/qa/extras/layout/data/forcepoint91.htmlbin0 -> 49256 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint92.docbin0 -> 29200 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint93-1.rtfbin0 -> 88310 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint93-2.rtfbin0 -> 5456 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint94.htmlbin0 -> 12370 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint98.htmlbin0 -> 7171 bytes
-rw-r--r--sw/qa/extras/layout/data/forcepoint99.htmlbin0 -> 14034 bytes
-rw-r--r--sw/qa/extras/layout/data/keep-with-next-fly.fodt146
-rw-r--r--sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt15
-rw-r--r--sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt90
-rw-r--r--sw/qa/extras/layout/data/s4_min2.fodt360
-rw-r--r--sw/qa/extras/layout/data/table-0-height-rows.fodt611
-rw-r--r--sw/qa/extras/layout/data/tdf141079.odtbin0 -> 8787 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf147485-forcepoint.docbin0 -> 62544 bytes
-rw-r--r--sw/qa/extras/layout/data/three_sections.fodt18
-rw-r--r--sw/qa/extras/layout/layout.cxx306
-rw-r--r--sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odtbin0 -> 11544 bytes
-rw-r--r--sw/qa/extras/odfexport/data/tdf137199.docxbin0 -> 13281 bytes
-rw-r--r--sw/qa/extras/odfexport/data/tdf151100.docxbin0 -> 17741 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx36
-rw-r--r--sw/qa/extras/odfimport/data/forcepoint108.fodt67
-rw-r--r--sw/qa/extras/odfimport/data/incorrectsum.odtbin0 -> 17356 bytes
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx28
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf155690.docxbin0 -> 17677 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx53
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx2
-rw-r--r--sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt20
-rw-r--r--sw/qa/extras/uiwriter/data/demo91.fodt156
-rw-r--r--sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt21
-rw-r--r--sw/qa/extras/uiwriter/data/pagebreak-source.fodt131
-rw-r--r--sw/qa/extras/uiwriter/data/pagebreak-target.fodt137
-rw-r--r--sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt219
-rw-r--r--sw/qa/extras/uiwriter/data/tdf114973.fodt144
-rw-r--r--sw/qa/extras/uiwriter/data/tdf125154.odtbin0 -> 10210 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf133982.docxbin0 -> 11705 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf134021.docxbin0 -> 23096 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf139843.odtbin0 -> 38984 bytes
-rw-r--r--sw/qa/extras/uiwriter/data/tdf148868.odtbin0 -> 11112 bytes
-rw-r--r--sw/qa/extras/uiwriter/data2/tdf135061.odtbin0 -> 10767 bytes
-rw-r--r--sw/qa/extras/uiwriter/data2/tdf136452.fodt80
-rw-r--r--sw/qa/extras/uiwriter/data2/tdf141175.odtbin0 -> 9574 bytes
-rw-r--r--sw/qa/extras/uiwriter/data2/try2.fodt66
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx769
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx702
-rw-r--r--sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt87
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx95
-rw-r--r--sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odtbin0 -> 14081 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx6
-rw-r--r--sw/qa/inc/swmodeltestbase.hxx8
-rw-r--r--sw/qa/python/check_xmodifiable2.py9
-rw-r--r--sw/qa/uitest/data/tdf39721.fodt42
-rw-r--r--sw/qa/uitest/writer_tests/data/tdf135018.odtbin47920 -> 48909 bytes
-rw-r--r--sw/qa/uitest/writer_tests2/bookmark.py39
-rw-r--r--sw/qa/uitest/writer_tests7/tdf130199.py62
-rw-r--r--sw/qa/uitest/writer_tests7/tdf145093.py34
-rw-r--r--sw/qa/unit/data/sw-dialogs-test.txt1
-rw-r--r--sw/sdi/_textsh.sdi6
-rw-r--r--sw/sdi/swriter.sdi18
-rw-r--r--sw/source/core/attr/swatrset.cxx3
-rw-r--r--sw/source/core/bastyp/calc.cxx2
-rw-r--r--sw/source/core/bastyp/index.cxx5
-rw-r--r--sw/source/core/bastyp/swrect.cxx12
-rw-r--r--sw/source/core/crsr/bookmrk.cxx18
-rw-r--r--sw/source/core/crsr/callnk.cxx42
-rw-r--r--sw/source/core/crsr/crbm.cxx15
-rw-r--r--sw/source/core/crsr/crsrsh.cxx409
-rw-r--r--sw/source/core/crsr/crstrvl.cxx41
-rw-r--r--sw/source/core/crsr/pam.cxx52
-rw-r--r--sw/source/core/crsr/swcrsr.cxx38
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx247
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx8
-rw-r--r--sw/source/core/doc/docbm.cxx44
-rw-r--r--sw/source/core/doc/doccorr.cxx7
-rw-r--r--sw/source/core/doc/docedt.cxx15
-rw-r--r--sw/source/core/doc/docfmt.cxx9
-rw-r--r--sw/source/core/doc/doclay.cxx11
-rw-r--r--sw/source/core/doc/docnew.cxx27
-rw-r--r--sw/source/core/doc/textboxhelper.cxx3
-rw-r--r--sw/source/core/docnode/ndsect.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl.cxx299
-rw-r--r--sw/source/core/docnode/node.cxx6
-rw-r--r--sw/source/core/docnode/nodes.cxx231
-rw-r--r--sw/source/core/docnode/section.cxx30
-rw-r--r--sw/source/core/edit/acorrect.cxx5
-rw-r--r--sw/source/core/edit/autofmt.cxx29
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/eddel.cxx65
-rw-r--r--sw/source/core/edit/edfcol.cxx6
-rw-r--r--sw/source/core/edit/edglbldc.cxx2
-rw-r--r--sw/source/core/edit/edglss.cxx19
-rw-r--r--sw/source/core/edit/editsh.cxx6
-rw-r--r--sw/source/core/edit/edlingu.cxx19
-rw-r--r--sw/source/core/edit/edws.cxx6
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx37
-rw-r--r--sw/source/core/frmedt/feshview.cxx15
-rw-r--r--sw/source/core/frmedt/fetab.cxx5
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx9
-rw-r--r--sw/source/core/inc/MarkManager.hxx6
-rw-r--r--sw/source/core/inc/UndoDelete.hxx3
-rw-r--r--sw/source/core/inc/UndoRedline.hxx8
-rw-r--r--sw/source/core/inc/UndoTable.hxx10
-rw-r--r--sw/source/core/inc/bookmrk.hxx6
-rw-r--r--sw/source/core/inc/frame.hxx15
-rw-r--r--sw/source/core/inc/layact.hxx8
-rw-r--r--sw/source/core/inc/layfrm.hxx1
-rw-r--r--sw/source/core/inc/mvsave.hxx8
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/scriptinfo.hxx1
-rw-r--r--sw/source/core/inc/sectfrm.hxx4
-rw-r--r--sw/source/core/inc/txtfrm.hxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/calcmove.cxx13
-rw-r--r--sw/source/core/layout/findfrm.cxx8
-rw-r--r--sw/source/core/layout/flowfrm.cxx132
-rw-r--r--sw/source/core/layout/frmtool.cxx113
-rw-r--r--sw/source/core/layout/ftnfrm.cxx13
-rw-r--r--sw/source/core/layout/layact.cxx68
-rw-r--r--sw/source/core/layout/layhelp.hxx3
-rw-r--r--sw/source/core/layout/newfrm.cxx5
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx56
-rw-r--r--sw/source/core/layout/pagechg.cxx11
-rw-r--r--sw/source/core/layout/sectfrm.cxx120
-rw-r--r--sw/source/core/layout/tabfrm.cxx211
-rw-r--r--sw/source/core/layout/trvlfrm.cxx25
-rw-r--r--sw/source/core/layout/wsfrm.cxx14
-rw-r--r--sw/source/core/ole/ndole.cxx227
-rw-r--r--sw/source/core/table/swtable.cxx15
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rwxr-xr-xsw/source/core/text/frmform.cxx20
-rw-r--r--sw/source/core/text/itratr.cxx2
-rw-r--r--sw/source/core/text/itrcrsr.cxx8
-rw-r--r--sw/source/core/text/itrform2.cxx25
-rw-r--r--sw/source/core/text/itrform2.hxx2
-rw-r--r--sw/source/core/text/porfld.cxx16
-rw-r--r--sw/source/core/text/porfld.hxx2
-rw-r--r--sw/source/core/text/porlay.cxx41
-rw-r--r--sw/source/core/text/pormulti.cxx21
-rw-r--r--sw/source/core/text/porrst.cxx13
-rw-r--r--sw/source/core/text/porrst.hxx7
-rw-r--r--sw/source/core/text/txtfrm.cxx25
-rw-r--r--sw/source/core/text/widorp.cxx2
-rw-r--r--sw/source/core/text/xmldump.cxx32
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx118
-rw-r--r--sw/source/core/txtnode/thints.cxx4
-rw-r--r--sw/source/core/txtnode/txtedt.cxx6
-rw-r--r--sw/source/core/undo/rolbck.cxx39
-rw-r--r--sw/source/core/undo/unbkmk.cxx2
-rw-r--r--sw/source/core/undo/undel.cxx51
-rw-r--r--sw/source/core/undo/undobj.cxx70
-rw-r--r--sw/source/core/undo/unins.cxx11
-rw-r--r--sw/source/core/undo/unredln.cxx38
-rw-r--r--sw/source/core/undo/untbl.cxx24
-rw-r--r--sw/source/core/undo/untblk.cxx14
-rw-r--r--sw/source/core/unocore/unobkm.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unoframe.cxx9
-rw-r--r--sw/source/core/unocore/unoobj.cxx10
-rw-r--r--sw/source/core/unocore/unoobj2.cxx23
-rw-r--r--sw/source/core/unocore/unosett.cxx20
-rw-r--r--sw/source/core/unocore/unotbl.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx49
-rw-r--r--sw/source/filter/basflt/shellio.cxx8
-rw-r--r--sw/source/filter/html/htmlplug.cxx7
-rw-r--r--sw/source/filter/html/htmltab.cxx34
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx11
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx28
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx5
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par.cxx13
-rw-r--r--sw/source/filter/ww8/ww8par.hxx12
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx9
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx3
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx80
-rw-r--r--sw/source/filter/xml/xmlexp.hxx5
-rw-r--r--sw/source/filter/xml/xmlfmte.cxx12
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx149
-rw-r--r--sw/source/filter/xml/xmltbli.cxx2
-rw-r--r--sw/source/filter/xml/xmltexte.hxx12
-rw-r--r--sw/source/filter/xml/xmltexti.cxx9
-rw-r--r--sw/source/ui/config/optpage.cxx9
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx4
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx2
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx13
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx3
-rw-r--r--sw/source/ui/misc/bookmark.cxx125
-rw-r--r--sw/source/uibase/app/appopt.cxx1
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx2
-rw-r--r--sw/source/uibase/config/cfgitems.cxx10
-rw-r--r--sw/source/uibase/config/usrpref.cxx62
-rw-r--r--sw/source/uibase/config/viewopt.cxx23
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx6
-rw-r--r--sw/source/uibase/docvw/OverlayRanges.hxx2
-rw-r--r--sw/source/uibase/docvw/ShadowOverlayObject.hxx6
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx37
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx4
-rw-r--r--sw/source/uibase/inc/bookmark.hxx17
-rw-r--r--sw/source/uibase/inc/cfgitems.hxx2
-rw-r--r--sw/source/uibase/inc/fldtdlg.hxx2
-rw-r--r--sw/source/uibase/inc/optpage.hxx5
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx6
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx4
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx5
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx8
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/shells/textsh1.cxx20
-rw-r--r--sw/source/uibase/uitest/uiobject.cxx25
-rw-r--r--sw/source/uibase/uiview/pview.cxx1
-rw-r--r--sw/source/uibase/uiview/view.cxx4
-rw-r--r--sw/source/uibase/uiview/view0.cxx2
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx2
-rw-r--r--sw/source/uibase/uiview/viewmdi.cxx13
-rw-r--r--sw/source/uibase/uiview/viewport.cxx5
-rw-r--r--sw/source/uibase/uno/unomod.cxx4
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx1
-rw-r--r--sw/source/uibase/utlui/content.cxx18
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx41
-rw-r--r--sw/source/uibase/wrtsh/move.cxx46
-rw-r--r--sw/source/uibase/wrtsh/select.cxx42
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx69
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx42
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/sglobal/popupmenu/table.xml2
-rw-r--r--sw/uiconfig/sweb/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/sweb/popupmenu/table.xml2
-rw-r--r--sw/uiconfig/swform/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swform/popupmenu/table.xml2
-rw-r--r--sw/uiconfig/swreport/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/popupmenu/table.xml2
-rw-r--r--sw/uiconfig/swriter/ui/insertbookmark.ui20
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar.ui7
-rw-r--r--sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui7
-rw-r--r--sw/uiconfig/swriter/ui/optformataidspage.ui32
-rw-r--r--sw/uiconfig/swriter/ui/warnhiddensectiondialog.ui35
-rw-r--r--sw/uiconfig/swxform/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swxform/popupmenu/table.xml2
-rw-r--r--sw/uiconfig/swxform/toolbar/formdesign.xml2
-rw-r--r--swext/mediawiki/src/THIRDPARTYLICENSEREADME.html16
-rw-r--r--sysui/desktop/debian/control4
-rw-r--r--sysui/desktop/freedesktop/freedesktop-menus.spec5
-rw-r--r--sysui/desktop/icons/empty-document.icobin45733 -> 4546 bytes
-rw-r--r--sysui/desktop/icons/empty-template.icobin45733 -> 4546 bytes
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/apps/main.pngbin19491 -> 51860 bytes
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.pngbin19491 -> 51860 bytes
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.pngbin19662 -> 51860 bytes
-rw-r--r--sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/128x128/apps/main.pngbin2092 -> 3539 bytes
-rw-r--r--sysui/desktop/icons/hicolor/128x128/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/128x128/apps/startcenter.pngbin2092 -> 3539 bytes
-rw-r--r--sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.pngbin2434 -> 3539 bytes
-rw-r--r--sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/16x16/apps/main.pngbin385 -> 841 bytes
-rw-r--r--sysui/desktop/icons/hicolor/16x16/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/16x16/apps/startcenter.pngbin385 -> 841 bytes
-rw-r--r--sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.pngbin398 -> 841 bytes
-rw-r--r--sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/22x22/apps/main.pngbin503 -> 987 bytes
-rw-r--r--sysui/desktop/icons/hicolor/22x22/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/22x22/apps/startcenter.pngbin503 -> 987 bytes
-rw-r--r--sysui/desktop/icons/hicolor/22x22/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.pngbin430 -> 987 bytes
-rw-r--r--sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/24x24/apps/main.pngbin533 -> 1040 bytes
-rw-r--r--sysui/desktop/icons/hicolor/24x24/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/24x24/apps/startcenter.pngbin533 -> 1040 bytes
-rw-r--r--sysui/desktop/icons/hicolor/24x24/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.pngbin455 -> 1040 bytes
-rw-r--r--sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/256x256/apps/main.pngbin4172 -> 2913 bytes
-rw-r--r--sysui/desktop/icons/hicolor/256x256/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/256x256/apps/startcenter.pngbin4172 -> 2913 bytes
-rw-r--r--sysui/desktop/icons/hicolor/256x256/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.pngbin3894 -> 2913 bytes
-rw-r--r--sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/32x32/apps/main.pngbin649 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/hicolor/32x32/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/32x32/apps/startcenter.pngbin649 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/hicolor/32x32/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.pngbin642 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/48x48/apps/main.pngbin912 -> 1419 bytes
-rw-r--r--sysui/desktop/icons/hicolor/48x48/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/48x48/apps/startcenter.pngbin912 -> 1419 bytes
-rw-r--r--sysui/desktop/icons/hicolor/48x48/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.pngbin928 -> 1419 bytes
-rw-r--r--sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/512x512/apps/main.pngbin8799 -> 18371 bytes
-rw-r--r--sysui/desktop/icons/hicolor/512x512/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/512x512/apps/startcenter.pngbin8799 -> 18371 bytes
-rw-r--r--sysui/desktop/icons/hicolor/512x512/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.pngbin7931 -> 18371 bytes
-rw-r--r--sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/64x64/apps/main.pngbin1148 -> 1574 bytes
-rw-r--r--sysui/desktop/icons/hicolor/64x64/apps/main.svg98
-rw-r--r--sysui/desktop/icons/hicolor/64x64/apps/startcenter.pngbin1148 -> 1574 bytes
-rw-r--r--sysui/desktop/icons/hicolor/64x64/apps/startcenter.svg98
-rw-r--r--sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.pngbin1108 -> 1574 bytes
-rw-r--r--sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/hicolor/scalable/apps/main.pngbin2092 -> 4966 bytes
-rw-r--r--sysui/desktop/icons/hicolor/scalable/apps/main.svg84
-rw-r--r--sysui/desktop/icons/hicolor/scalable/apps/startcenter.svg418
-rw-r--r--sysui/desktop/icons/locolor/16x16/apps/main.pngbin385 -> 841 bytes
-rw-r--r--sysui/desktop/icons/locolor/16x16/apps/main.svg11
-rw-r--r--sysui/desktop/icons/locolor/16x16/apps/startcenter.pngbin385 -> 841 bytes
-rw-r--r--sysui/desktop/icons/locolor/16x16/apps/startcenter.svg11
-rw-r--r--sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.pngbin349 -> 841 bytes
-rw-r--r--sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.svg11
-rw-r--r--sysui/desktop/icons/locolor/32x32/apps/main.pngbin649 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/locolor/32x32/apps/main.svg17
-rw-r--r--sysui/desktop/icons/locolor/32x32/apps/startcenter.pngbin649 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/locolor/32x32/apps/startcenter.svg17
-rw-r--r--sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.pngbin386 -> 1147 bytes
-rw-r--r--sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.svg17
-rw-r--r--sysui/desktop/icons/oasis-empty-document.icobin45733 -> 4546 bytes
-rw-r--r--sysui/desktop/icons/oasis-empty-template.icobin45733 -> 4546 bytes
-rw-r--r--sysui/desktop/icons/open.icobin45733 -> 4546 bytes
-rw-r--r--sysui/desktop/icons/soffice.icobin45775 -> 4546 bytes
-rw-r--r--sysui/desktop/macosx/Info.plist.in17
-rw-r--r--sysui/desktop/menus/startcenter.desktop4
-rwxr-xr-xsysui/desktop/share/create_tree.sh8
-rw-r--r--sysui/desktop/share/launcher_comment.ulf2
-rw-r--r--sysui/productlist.mk6
-rw-r--r--test/source/xmltesttools.cxx2
-rw-r--r--toolkit/source/helper/unowrapper.cxx9
-rw-r--r--tools/source/fsys/fileutil.cxx7
-rw-r--r--tools/source/fsys/urlobj.cxx9
-rw-r--r--tools/source/generic/poly.cxx2
m---------translations0
-rw-r--r--ucb/CppunitTest_ucb_webdav_core.mk69
-rw-r--r--ucb/CppunitTest_ucb_webdav_local_neon.mk53
-rw-r--r--ucb/CppunitTest_ucb_webdav_neon_opts.mk56
-rw-r--r--ucb/CppunitTest_ucb_webdav_propfindcache.mk56
-rw-r--r--ucb/CppunitTest_ucb_webdav_res_access.mk56
-rw-r--r--ucb/Library_ucpdav1.mk45
-rw-r--r--ucb/Module_ucb.mk5
-rw-r--r--ucb/qa/complex/ucb/UCB.java7
-rw-r--r--ucb/qa/cppunit/webdav/webdav_local_neon.cxx69
-rw-r--r--ucb/qa/cppunit/webdav/webdav_options.cxx6
-rw-r--r--ucb/qa/cppunit/webdav/webdav_propfindcache.cxx8
-rw-r--r--ucb/qa/cppunit/webdav/webdav_resource_access.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx15
-rw-r--r--ucb/source/ucp/webdav-curl/ContentProperties.cxx568
-rw-r--r--ucb/source/ucp/webdav-curl/ContentProperties.hxx173
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.cxx2550
-rw-r--r--ucb/source/ucp/webdav-curl/CurlSession.hxx149
-rw-r--r--ucb/source/ucp/webdav-curl/CurlUri.cxx327
-rw-r--r--ucb/source/ucp/webdav-curl/CurlUri.hxx94
-rw-r--r--ucb/source/ucp/webdav-curl/DAVAuthListener.hxx (renamed from dtrans/source/generic/dtrans.component)39
-rw-r--r--ucb/source/ucp/webdav-curl/DAVAuthListenerImpl.hxx61
-rw-r--r--ucb/source/ucp/webdav-curl/DAVException.hxx174
-rw-r--r--ucb/source/ucp/webdav-curl/DAVProperties.cxx202
-rw-r--r--ucb/source/ucp/webdav-curl/DAVProperties.hxx57
-rw-r--r--ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx54
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResource.hxx61
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx1192
-rw-r--r--ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx220
-rw-r--r--ucb/source/ucp/webdav-curl/DAVSession.hxx196
-rw-r--r--ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx87
-rw-r--r--ucb/source/ucp/webdav-curl/DAVSessionFactory.hxx74
-rw-r--r--ucb/source/ucp/webdav-curl/DAVTypes.cxx199
-rw-r--r--ucb/source/ucp/webdav-curl/DAVTypes.hxx202
-rw-r--r--ucb/source/ucp/webdav-curl/DateTimeHelper.cxx258
-rw-r--r--ucb/source/ucp/webdav-curl/DateTimeHelper.hxx55
-rw-r--r--ucb/source/ucp/webdav-curl/ImportCookies.cxx249
-rw-r--r--ucb/source/ucp/webdav-curl/PropertyMap.hxx (renamed from dtrans/util/dnd.component)53
-rw-r--r--ucb/source/ucp/webdav-curl/PropfindCache.cxx91
-rw-r--r--ucb/source/ucp/webdav-curl/PropfindCache.hxx81
-rw-r--r--ucb/source/ucp/webdav-curl/SerfLockStore.cxx275
-rw-r--r--ucb/source/ucp/webdav-curl/SerfLockStore.hxx96
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx220
-rw-r--r--ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx (renamed from dtrans/util/ftransl.component)41
-rw-r--r--ucb/source/ucp/webdav-curl/ucpdav1.component (renamed from dtrans/util/sysdtrans.component)7
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx4307
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.hxx305
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx635
-rw-r--r--ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx486
-rw-r--r--ucb/source/ucp/webdav-curl/webdavdatasupplier.hxx73
-rw-r--r--ucb/source/ucp/webdav-curl/webdavprovider.cxx174
-rw-r--r--ucb/source/ucp/webdav-curl/webdavprovider.hxx100
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresponseparser.cxx1000
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresponseparser.hxx38
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresultset.cxx76
-rw-r--r--ucb/source/ucp/webdav-curl/webdavresultset.hxx48
-rw-r--r--ucb/source/ucp/webdav-neon/ucpdav1.component5
-rw-r--r--ucb/source/ucp/webdav-neon/webdavprovider.cxx42
-rw-r--r--ucb/source/ucp/webdav-neon/webdavprovider.hxx7
-rw-r--r--ucb/source/ucp/webdav-neon/webdavservices.cxx67
-rw-r--r--ucb/source/ucp/webdav/webdavprovider.cxx10
-rw-r--r--unotools/source/i18n/resmgr.cxx5
-rw-r--r--unoxml/qa/unit/domtest.cxx8
-rw-r--r--unoxml/source/dom/attr.cxx1
-rw-r--r--unoxml/source/dom/document.cxx1
-rw-r--r--unoxml/source/dom/documentbuilder.cxx1
-rw-r--r--unoxml/source/dom/entity.cxx1
-rw-r--r--unoxml/source/xpath/xpathapi.cxx7
-rw-r--r--unoxml/source/xpath/xpathobject.cxx2
-rw-r--r--uui/source/iahndl-authentication.cxx5
-rw-r--r--vcl/Library_vclplug_win.mk34
-rw-r--r--vcl/inc/brdwin.hxx2
-rw-r--r--vcl/inc/salframe.hxx2
-rw-r--r--vcl/inc/win/salframe.h1
-rw-r--r--vcl/inc/win/salgdi.h7
-rw-r--r--vcl/inc/win/salprn.h13
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx11
-rw-r--r--vcl/source/app/salvtables.cxx15
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/fontsubset/sft.cxx12
-rw-r--r--vcl/source/fontsubset/ttcr.cxx36
-rw-r--r--vcl/source/gdi/jobset.cxx7
-rw-r--r--vcl/source/gdi/print.cxx17
-rw-r--r--vcl/source/gdi/svmconverter.cxx20
-rw-r--r--vcl/source/graphic/Manager.cxx7
-rw-r--r--vcl/source/helper/strhelper.cxx3
-rw-r--r--vcl/source/outdev/hatch.cxx7
-rw-r--r--vcl/source/outdev/text.cxx2
-rw-r--r--vcl/source/outdev/textline.cxx2
-rw-r--r--vcl/source/toolkit/group.cxx6
-rw-r--r--vcl/source/treelist/svtabbx.cxx25
-rw-r--r--vcl/source/treelist/treelist.cxx8
-rw-r--r--vcl/source/treelist/treelistbox.cxx7
-rw-r--r--vcl/source/treelist/uiobject.cxx13
-rw-r--r--vcl/source/window/brdwin.cxx15
-rw-r--r--vcl/source/window/cursor.cxx5
-rw-r--r--vcl/source/window/dlgctrl.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx4
-rw-r--r--vcl/source/window/event.cxx3
-rw-r--r--vcl/source/window/floatwin.cxx2
-rw-r--r--vcl/source/window/layout.cxx2
-rw-r--r--vcl/source/window/window.cxx9
-rw-r--r--vcl/source/window/window2.cxx9
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx49
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx45
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx151
-rw-r--r--vcl/vclplug_win.component46
-rw-r--r--vcl/win/app/salinst.cxx3
-rw-r--r--vcl/win/app/saltimer.cxx4
-rw-r--r--vcl/win/dtrans/APNDataObject.cxx (renamed from dtrans/source/win32/dtobj/APNDataObject.cxx)0
-rw-r--r--vcl/win/dtrans/APNDataObject.hxx (renamed from dtrans/source/win32/dtobj/APNDataObject.hxx)5
-rw-r--r--vcl/win/dtrans/DOTransferable.cxx (renamed from dtrans/source/win32/dtobj/DOTransferable.cxx)114
-rw-r--r--vcl/win/dtrans/DOTransferable.hxx (renamed from dtrans/source/win32/dtobj/DOTransferable.hxx)19
-rw-r--r--vcl/win/dtrans/DTransHelper.cxx (renamed from dtrans/source/win32/dtobj/DTransHelper.cxx)0
-rw-r--r--vcl/win/dtrans/DTransHelper.hxx (renamed from dtrans/source/win32/dtobj/DTransHelper.hxx)2
-rw-r--r--vcl/win/dtrans/DataFmtTransl.cxx (renamed from dtrans/source/win32/dtobj/DataFmtTransl.cxx)8
-rw-r--r--vcl/win/dtrans/DataFmtTransl.hxx (renamed from dtrans/source/win32/dtobj/DataFmtTransl.hxx)2
-rw-r--r--vcl/win/dtrans/DtObjFactory.cxx (renamed from dtrans/source/win32/dtobj/DtObjFactory.cxx)3
-rw-r--r--vcl/win/dtrans/DtObjFactory.hxx (renamed from dtrans/source/inc/DtObjFactory.hxx)0
-rw-r--r--vcl/win/dtrans/Fetc.cxx (renamed from dtrans/source/win32/dtobj/Fetc.cxx)2
-rw-r--r--vcl/win/dtrans/Fetc.hxx (renamed from dtrans/source/win32/dtobj/Fetc.hxx)0
-rw-r--r--vcl/win/dtrans/FetcList.cxx (renamed from dtrans/source/win32/dtobj/FetcList.cxx)9
-rw-r--r--vcl/win/dtrans/FetcList.hxx (renamed from dtrans/source/win32/dtobj/FetcList.hxx)0
-rw-r--r--vcl/win/dtrans/FmtFilter.cxx (renamed from dtrans/source/win32/dtobj/FmtFilter.cxx)0
-rw-r--r--vcl/win/dtrans/FmtFilter.hxx (renamed from dtrans/source/win32/dtobj/FmtFilter.hxx)0
-rw-r--r--vcl/win/dtrans/ImplHelper.cxx (renamed from dtrans/source/win32/misc/ImplHelper.cxx)0
-rw-r--r--vcl/win/dtrans/ImplHelper.hxx (renamed from dtrans/source/win32/misc/ImplHelper.hxx)0
-rw-r--r--vcl/win/dtrans/MimeAttrib.hxx (renamed from dtrans/source/win32/dtobj/MimeAttrib.hxx)0
-rw-r--r--vcl/win/dtrans/MtaOleClipb.cxx (renamed from dtrans/source/win32/clipb/MtaOleClipb.cxx)15
-rw-r--r--vcl/win/dtrans/MtaOleClipb.hxx (renamed from dtrans/source/win32/clipb/MtaOleClipb.hxx)0
-rw-r--r--vcl/win/dtrans/TxtCnvtHlp.cxx (renamed from dtrans/source/win32/dtobj/TxtCnvtHlp.cxx)3
-rw-r--r--vcl/win/dtrans/TxtCnvtHlp.hxx (renamed from dtrans/source/win32/dtobj/TxtCnvtHlp.hxx)0
-rw-r--r--vcl/win/dtrans/WinClip.hxx (renamed from dtrans/source/inc/WinClip.hxx)0
-rw-r--r--vcl/win/dtrans/WinClipboard.cxx364
-rw-r--r--vcl/win/dtrans/WinClipboard.hxx (renamed from dtrans/source/win32/clipb/WinClipboard.hxx)96
-rw-r--r--vcl/win/dtrans/XNotifyingDataObject.cxx (renamed from dtrans/source/win32/dtobj/XNotifyingDataObject.cxx)9
-rw-r--r--vcl/win/dtrans/XNotifyingDataObject.hxx (renamed from dtrans/source/win32/dtobj/XNotifyingDataObject.hxx)11
-rw-r--r--vcl/win/dtrans/XTDataObject.cxx (renamed from dtrans/source/win32/dtobj/XTDataObject.cxx)8
-rw-r--r--vcl/win/dtrans/XTDataObject.hxx (renamed from dtrans/source/win32/dtobj/XTDataObject.hxx)0
-rw-r--r--vcl/win/dtrans/clipboardmanager.cxx (renamed from dtrans/source/generic/clipboardmanager.cxx)97
-rw-r--r--vcl/win/dtrans/clipboardmanager.hxx (renamed from dtrans/source/generic/clipboardmanager.hxx)6
-rw-r--r--vcl/win/dtrans/ftransl.cxx (renamed from dtrans/source/win32/ftransl/ftransl.cxx)31
-rw-r--r--vcl/win/dtrans/ftransl.hxx (renamed from dtrans/source/win32/ftransl/ftransl.hxx)2
-rw-r--r--vcl/win/dtrans/generic_clipboard.cxx (renamed from dtrans/source/generic/generic_clipboard.cxx)18
-rw-r--r--vcl/win/dtrans/generic_clipboard.hxx (renamed from dtrans/source/generic/generic_clipboard.hxx)6
-rw-r--r--vcl/win/dtrans/globals.cxx (renamed from dtrans/source/win32/dnd/globals.cxx)0
-rw-r--r--vcl/win/dtrans/globals.hxx (renamed from dtrans/source/win32/dnd/globals.hxx)6
-rw-r--r--vcl/win/dtrans/idroptarget.cxx (renamed from dtrans/source/win32/dnd/idroptarget.cxx)0
-rw-r--r--vcl/win/dtrans/idroptarget.hxx (renamed from dtrans/source/win32/dnd/idroptarget.hxx)0
-rw-r--r--vcl/win/dtrans/source.cxx (renamed from dtrans/source/win32/dnd/source.cxx)14
-rw-r--r--vcl/win/dtrans/source.hxx (renamed from dtrans/source/win32/dnd/source.hxx)0
-rw-r--r--vcl/win/dtrans/sourcecontext.cxx (renamed from dtrans/source/win32/dnd/sourcecontext.cxx)0
-rw-r--r--vcl/win/dtrans/sourcecontext.hxx (renamed from dtrans/source/win32/dnd/sourcecontext.hxx)0
-rw-r--r--vcl/win/dtrans/target.cxx (renamed from dtrans/source/win32/dnd/target.cxx)16
-rw-r--r--vcl/win/dtrans/target.hxx (renamed from dtrans/source/win32/dnd/target.hxx)0
-rw-r--r--vcl/win/dtrans/targetdragcontext.cxx (renamed from dtrans/source/win32/dnd/targetdragcontext.cxx)0
-rw-r--r--vcl/win/dtrans/targetdragcontext.hxx (renamed from dtrans/source/win32/dnd/targetdragcontext.hxx)0
-rw-r--r--vcl/win/dtrans/targetdropcontext.cxx (renamed from dtrans/source/win32/dnd/targetdropcontext.cxx)0
-rw-r--r--vcl/win/dtrans/targetdropcontext.hxx (renamed from dtrans/source/win32/dnd/targetdropcontext.hxx)0
-rw-r--r--vcl/win/gdi/gdiimpl.cxx6
-rw-r--r--vcl/win/gdi/salbmp.cxx2
-rw-r--r--vcl/win/gdi/salfont.cxx14
-rw-r--r--vcl/win/gdi/salgdi.cxx24
-rw-r--r--vcl/win/gdi/salprn.cxx83
-rw-r--r--vcl/win/gdi/salvd.cxx13
-rw-r--r--vcl/win/window/salframe.cxx148
-rw-r--r--vcl/workben/dtrans/makefile.mk (renamed from dtrans/source/test/makefile.mk)0
-rw-r--r--vcl/workben/dtrans/test_dtrans.cxx (renamed from dtrans/source/test/test_dtrans.cxx)0
-rw-r--r--vcl/workben/win/dnd/atlwindow.cxx (renamed from dtrans/test/win32/dnd/atlwindow.cxx)0
-rw-r--r--vcl/workben/win/dnd/atlwindow.hxx (renamed from dtrans/test/win32/dnd/atlwindow.hxx)0
-rw-r--r--vcl/workben/win/dnd/dndTest.cxx (renamed from dtrans/test/win32/dnd/dndTest.cxx)0
-rw-r--r--vcl/workben/win/dnd/makefile.mk (renamed from dtrans/test/win32/dnd/makefile.mk)0
-rw-r--r--vcl/workben/win/dnd/sourcelistener.cxx (renamed from dtrans/test/win32/dnd/sourcelistener.cxx)0
-rw-r--r--vcl/workben/win/dnd/sourcelistener.hxx (renamed from dtrans/test/win32/dnd/sourcelistener.hxx)0
-rw-r--r--vcl/workben/win/dnd/targetlistener.cxx (renamed from dtrans/test/win32/dnd/targetlistener.cxx)0
-rw-r--r--vcl/workben/win/dnd/targetlistener.hxx (renamed from dtrans/test/win32/dnd/targetlistener.hxx)0
-rw-r--r--vcl/workben/win/dnd/transferable.cxx (renamed from dtrans/test/win32/dnd/transferable.cxx)0
-rw-r--r--vcl/workben/win/dnd/transferable.hxx (renamed from dtrans/test/win32/dnd/transferable.hxx)0
-rw-r--r--vcl/workben/win/dtrans/XTDo.cxx (renamed from dtrans/source/win32/workbench/XTDo.cxx)0
-rw-r--r--vcl/workben/win/dtrans/XTDo.hxx (renamed from dtrans/source/win32/workbench/XTDo.hxx)0
-rw-r--r--vcl/workben/win/dtrans/makefile.mk (renamed from dtrans/source/win32/workbench/makefile.mk)0
-rw-r--r--vcl/workben/win/dtrans/test_wincb.cxx (renamed from dtrans/source/win32/workbench/test_wincb.cxx)0
-rw-r--r--vcl/workben/win/dtrans/testmarshal.cxx (renamed from dtrans/source/win32/workbench/testmarshal.cxx)0
-rw-r--r--winaccessibility/inc/AccEventListener.hxx2
-rw-r--r--winaccessibility/inc/AccObject.hxx4
-rw-r--r--winaccessibility/inc/AccObjectWinManager.hxx9
-rw-r--r--winaccessibility/source/service/AccEventListener.cxx9
-rw-r--r--winaccessibility/source/service/AccObject.cxx11
-rw-r--r--winaccessibility/source/service/AccObjectWinManager.cxx165
-rw-r--r--winaccessibility/source/service/msaaservice_impl.cxx2
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx86
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx11
-rw-r--r--xmloff/qa/unit/uxmloff.cxx62
-rw-r--r--xmloff/source/core/xmlimp.cxx94
-rw-r--r--xmloff/source/core/xmltoken.cxx15
-rw-r--r--xmloff/source/draw/sdpropls.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx15
-rw-r--r--xmloff/source/draw/ximpshap.cxx37
-rw-r--r--xmloff/source/draw/ximpshap.hxx2
-rw-r--r--xmloff/source/meta/xmlmetai.cxx4
-rw-r--r--xmloff/source/style/PageMasterStyleMap.cxx6
-rw-r--r--xmloff/source/style/xmlnume.cxx19
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/token/tokens.txt10
-rw-r--r--xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk8
-rw-r--r--xmlsecurity/CppunitTest_xmlsecurity_signing.mk9
-rw-r--r--xmlsecurity/inc/biginteger.hxx12
-rw-r--r--xmlsecurity/inc/xmlsec-wrapper.h5
-rw-r--r--xmlsecurity/inc/xmlsec/saxhelper.hxx1
-rw-r--r--xmlsecurity/inc/xmlsignaturehelper.hxx12
-rw-r--r--xmlsecurity/inc/xsecctl.hxx20
-rw-r--r--xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx32
-rw-r--r--xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odtbin0 -> 14045 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odtbin0 -> 13139 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated2.odtbin0 -> 13160 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated_triple.odtbin0 -> 13237 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/02_doc_signed_by_trusted_person_manipulated.odtbin0 -> 14003 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/cert9.db (renamed from xmlsecurity/qa/unit/signing/data/cert8.db)bin65536 -> 53248 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/key3.dbbin16384 -> 0 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/key4.dbbin0 -> 49152 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/pkcs11.txt5
-rw-r--r--xmlsecurity/qa/unit/signing/data/signed_with_x509certificate_chain.odtbin0 -> 13585 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/data/test.p7b249
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx170
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx159
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx15
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx2
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.hxx5
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx63
-rw-r--r--xmlsecurity/source/helper/documentsignaturemanager.cxx12
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx212
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.cxx1457
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.hxx76
-rw-r--r--xmlsecurity/source/helper/pdfsignaturehelper.cxx8
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx163
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx194
-rw-r--r--xmlsecurity/source/helper/xsecparser.cxx1706
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx108
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx60
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx227
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx67
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx125
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx108
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx8
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx3
1272 files changed, 44537 insertions, 12859 deletions
diff --git a/Makefile.fetch b/Makefile.fetch
index 0932b761adaf..9cb479b80a82 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -101,7 +101,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
@date >> $(fetch_LOGFILE)
$(foreach item, \
$(call fetch_Optional,ABW,ABW_TARBALL) \
- $(call fetch_Optional,APACHE_COMMONS,APACHE_COMMONS_LOGGING_TARBALL) \
$(call fetch_Optional,APR,APR_TARBALL) \
$(call fetch_Optional,APR,APR_UTIL_TARBALL) \
$(call fetch_Optional,BOOST,BOOST_TARBALL) \
diff --git a/Repository.mk b/Repository.mk
index 6d468833eaf6..8175a7ceb8f5 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -619,7 +619,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
sdbc2 \
sofficeapp \
srtrs1 \
- $(if $(filter $(OS),WNT),sysdtrans) \
textconv_dict \
ucb1 \
ucbhelper \
@@ -638,10 +637,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
macabdrv1 \
) \
$(if $(filter WNT,$(OS)), \
- dnd \
- dtrans \
fps \
- ftransl \
inprocserv \
UAccCOM \
winaccessibility \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3d2d61dfc2b4..031c002ccd72 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1570,13 +1570,14 @@ define gb_LinkTarget__use_openssl
$(call gb_LinkTarget_use_package,$(1),openssl)
ifeq ($(OS),WNT)
$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/ssleay32.lib \
- $(call gb_UnpackedTarball_get_dir,openssl)/out32dll/libeay32.lib \
+ $(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.lib \
+ $(call gb_UnpackedTarball_get_dir,openssl)/libssl.lib \
)
else
$(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,openssl)/libssl.a \
$(call gb_UnpackedTarball_get_dir,openssl)/libcrypto.a \
+ $(if $(filter $(OS),LINUX),-pthread) \
)
$(call gb_LinkTarget_use_external_project,$(1),openssl)
ifeq ($(OS),SOLARIS)
@@ -2725,7 +2726,7 @@ $(call gb_LinkTarget_set_include,$(1),\
ifeq ($(COM),MSC)
$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
+ $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
)
else
$(call gb_LinkTarget_add_libs,$(1),\
@@ -3178,7 +3179,7 @@ $(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
@@ -3376,6 +3377,11 @@ $(call gb_LinkTarget_add_libs,$(1),\
endef
+define gb_LinkTarget__use_nssutil3
+$(call gb_LinkTarget__use_nss3,$(1))
+
+endef
+
define gb_LinkTarget__use_plc4
$(call gb_LinkTarget__use_nss3,$(1))
@@ -3445,6 +3451,27 @@ endif
endef
+define gb_LinkTarget__use_nssutil3
+$(call gb_LinkTarget_use_package,$(1),nss)
+$(call gb_LinkTarget_set_include,$(1),\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss \
+ -I$(call gb_UnpackedTarball_get_dir,nss)/dist/out/include \
+)
+
+ifeq ($(COM),MSC)
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/nssutil3.lib \
+)
+else
+$(call gb_LinkTarget_add_libs,$(1),\
+ -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib \
+ -lnssutil3 \
+)
+endif
+
+endef
+
define gb_ExternalProject__use_nss3
$(call gb_ExternalProject_use_package,$(1),nss)
@@ -3695,32 +3722,6 @@ endif # SYSTEM_RHINO
endif
-ifneq ($(SYSTEM_APACHE_COMMONS),)
-
-define gb_Jar__use_commons-logging
-$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
-endef
-gb_ExternalProject__use_commons-logging :=
-
-else # !SYSTEM_APACHE_COMMONS
-
-ifeq ($(ENABLE_JAVA),TRUE)
-$(eval $(call gb_Helper_register_jars_for_install,OOO,reportbuilder,\
- commons-logging-$(COMMONS_LOGGING_VERSION) \
-))
-endif
-
-define gb_Jar__use_commons-logging
-$(call gb_Jar_use_external_project,$(1),apache_commons_logging)
-$(call gb_Jar_use_jar,$(1),commons-logging-$(COMMONS_LOGGING_VERSION))
-endef
-define gb_ExternalProject__use_commons-logging
-$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
-endef
-
-endif # SYSTEM_APACHE_COMMONS
-
-
ifneq ($(SYSTEM_JFREEREPORT),)
define gb_Jar__use_flow-engine
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index bc183d563332..0135a78ed597 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -51,11 +51,9 @@ void FrameGrabber::disposePipeline()
FrameGrabber::FrameGrabber( const OUString &rURL ) :
FrameGrabber_BASE()
{
- gchar *pPipelineStr;
- pPipelineStr = g_strdup_printf(
- "uridecodebin uri=%s ! videoconvert ! videoscale ! appsink "
- "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"",
- OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ const char pPipelineStr[] =
+ "uridecodebin name=source ! videoconvert ! videoscale ! appsink "
+ "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"";
GError *pError = nullptr;
mpPipeline = gst_parse_launch( pPipelineStr, &pError );
@@ -66,6 +64,12 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) :
}
if( mpPipeline ) {
+
+ if (GstElement *pUriDecode = gst_bin_get_by_name(GST_BIN(mpPipeline), "source"))
+ g_object_set(pUriDecode, "uri", OUStringToOString(rURL, RTL_TEXTENCODING_UTF8).getStr(), nullptr);
+ else
+ g_warning("Missing 'source' element in gstreamer pipeline");
+
// pre-roll
switch( gst_element_set_state( mpPipeline, GST_STATE_PAUSED ) ) {
case GST_STATE_CHANGE_FAILURE:
diff --git a/basctl/source/basicide/bastype3.hxx b/basctl/source/basicide/bastype3.hxx
index 41ddf81b93f8..29d7bf882c5f 100644
--- a/basctl/source/basicide/bastype3.hxx
+++ b/basctl/source/basicide/bastype3.hxx
@@ -36,6 +36,7 @@ class ExtendedEdit final : public Edit
public:
ExtendedEdit(vcl::Window* pParent, WinBits nStyle);
+ ~ExtendedEdit();
void SetAccHdl( const Link<Accelerator&,void>& rLink ) { aAccHdl = rLink; }
Accelerator& GetAccelerator() { return aAcc; }
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index f38ba5d33e8c..9df106d2b528 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -418,6 +418,11 @@ ExtendedEdit::ExtendedEdit(vcl::Window* pParent, WinBits nStyle)
Control::SetLoseFocusHdl( LINK( this, ExtendedEdit, ImplLoseFocusHdl ) );
}
+ExtendedEdit::~ExtendedEdit()
+{
+ Application::RemoveAccel( &aAcc );
+}
+
IMPL_LINK_NOARG(ExtendedEdit, ImplGetFocusHdl, Control&, void)
{
Application::InsertAccel( &aAcc );
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index 9f2f2dcf6315..a9ca9139a525 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -146,6 +146,7 @@ ExtraData* Dll::GetExtraData ()
ExtraData::ExtraData () :
+ m_aLastEntryDesc(EntryDescriptor()),
bChoosingMacro(false),
bShellInCriticalSection(false)
{
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 0d9ee3691bcb..d6a23834c8bd 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -152,6 +152,13 @@ void MacroChooser::RestoreMacroDescription()
aDesc = pData->GetLastEntryDescriptor();
}
+ // No valid EntryDescriptor found
+ if (aDesc.GetMethodName().isEmpty())
+ {
+ m_xMacroNameEdit->select_region(0, 0);
+ return;
+ }
+
m_xBasicBox->SetCurrentEntry(aDesc);
BasicSelectHdl(m_xBasicBox->get_widget());
diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml
index 68f7cbab6742..85d8505718a3 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -161,7 +161,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/bin/symstore.sh b/bin/symstore.sh
index f4b0a5d13943..7b782a2078d7 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -16,6 +16,8 @@ BLACK_LIST="python.exe"
#
# Same format as for BLACK_LIST above
MOREPDBS_OKLIST="libcurl.dll
+libcrypto-1_1.dll
+libssl-1_1.dll
freebl3.dll
libeay32.dll
nspr4.dll
@@ -31,6 +33,10 @@ sqlite3.dll
ssl3.dll
ssleay32.dll"
+verbose_none()
+{
+ do_none=
+}
add_pdb()
{
@@ -45,10 +51,15 @@ add_pdb()
ret=$(find "${INSTDIR}/" -type f -name "*.${extension}" | grep -vF "$BLACK_LIST")
while IFS= read -r file
do
+ ${VERBOSE} -n "Found: $file"
# store dll/exe itself (needed for minidumps)
if [ $WITHEXEC == 1 ] ; then
cygpath -w "$file" >> "$list"
+ ${VERBOSE} " insert"
+ else
+ ${VERBOSE} " "
fi
+
# store pdb file
filename=$(basename "$file" ".${extension}")
pdball+=($(grep -i "/${filename}${pdbext}" <<< ${ALL_PDBS}))
@@ -56,8 +67,12 @@ add_pdb()
cygpath -w "${pdball[0]}" >> "$list"
fi
case ${#pdball[@]} in
- 0) ((++stats_notfound)) ;;
- 1) ((++stats_found)) ;;
+ 0) ((++stats_notfound))
+ ${VERBOSE} " PDB not found"
+ ;;
+ 1) ((++stats_found))
+ ${VERBOSE} " ${pdball[0]} insert"
+ ;;
*) ((++stats_morefound))
if [ -z "$(echo $file | grep -F "$MOREPDBS_OKLIST")" ]; then
echo "Error: found duplicate PDBs:"
@@ -65,6 +80,8 @@ add_pdb()
echo " $morepdbs"
done
exit 1
+ else
+ ${VERBOSE} " ${pdball[0]} insert (is in more okay list)"
fi
;;
esac
@@ -98,13 +115,15 @@ SYM_PATH=${WORKDIR}/symstore
COMMENT=""
COMCMD=""
WITHEXEC=1
+VERBOSE=verbose_none
-USAGE="Usage: $0 [-h|-k <keep_num_versions>|-p <symbol_store_path>]
+USAGE="Usage: $0 [-h|-k <keep_num_versions>|-p <symbol_store_path>|-c <comment>|-n|-v]
-h: this cruft
-c <comment> specifies a comment for the transaction
-n do not store exe/dll on the symbole server
-k <int>: keep this number of old symbol versions around
(default: ${MAX_KEEP}. Set to 0 for unlimited)
+ -v verbose mode, output detail report of files
-p <path>: specify full path to symbol store tree
If no path is specified, defaults to ${SYM_PATH}.
"
@@ -117,6 +136,7 @@ do
-p|--path) SYM_PATH="$2"; shift 2;;
-c|--comment) COMCMD="/c"; COMMENT="$2"; shift 2;;
-n|--noexec) WITHEXEC=0; shift ;;
+ -v|--verbose) VERBOSE=echo; shift ;;
-h|--help) echo "${USAGE}"; exit 0;;
-*) echo "${USAGE}" >&2; exit 1;;
*) break;;
diff --git a/brand/cib/Image.svg b/brand/cib/Image.svg
index 369941585b61..b956bf05571f 100644
--- a/brand/cib/Image.svg
+++ b/brand/cib/Image.svg
@@ -2,30 +2,30 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 162 312"
xml:space="preserve"
id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="Image.svg"
width="162"
height="312"
inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\instsetoo_native\inc_common\windows\msi_templates\Binary\ImageBanner.bmp.png"
inkscape:export-xdpi="96"
- inkscape:export-ydpi="96"><metadata
+ inkscape:export-ydpi="96"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata3474"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs3472"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4978"><rect
@@ -61,22 +61,24 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="2880"
- inkscape:window-height="1721"
+ inkscape:window-width="1920"
+ inkscape:window-height="1011"
id="namedview3470"
showgrid="false"
inkscape:zoom="2.02"
- inkscape:cx="263.66575"
- inkscape:cy="147.35983"
- inkscape:window-x="2869"
- inkscape:window-y="-11"
+ inkscape:cx="180.44554"
+ inkscape:cy="147.52475"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="doXigate_Arbeitsunterlagen"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
+ inkscape:showpageshadow="false"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1" />
<style
type="text/css"
id="style3338">
@@ -292,15 +294,31 @@
class="cls-1"
x="-12.205721"
y="-40.636944"
- style="fill:#961e29;stroke-width:2.30338931" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g></svg> \ No newline at end of file
+ style="fill:#ffffff;stroke-width:2.30338931;fill-opacity:1" /><g
+ id="g25"
+ transform="matrix(1.3734481,0,0,1.3734481,2.7428059,-8.3812465)"><path
+ d="m 21.65,17.96 c -0.31,-0.32 -0.83,-0.32 -1.14,0 L 12.1,26.37 8.57,22.85 6.65,24.77 12.1,30.22 23.01,19.31 21.66,17.95 Z"
+ style="fill:#e11e19"
+ id="path15" /><path
+ d="m 15.74,28.28 -2.33,1.97 h 1.45 c 2.67,0 4.84,-2.17 4.84,-4.84 v -0.44 l -2.22,1.9 c -0.37,0.67 -0.99,1.18 -1.74,1.41 z"
+ style="fill:#e11e19"
+ id="path17" /><polygon
+ points="4.92,28.42 4.92,10.25 17.86,10.25 17.86,18.13 19.69,16.56 19.69,8.41 3.08,8.41 3.08,30.26 9.62,30.26 8.07,28.42 "
+ style="fill:#e11e19"
+ id="polygon19" /><rect
+ x="7.2600002"
+ y="11.82"
+ width="7.8899999"
+ height="2.24"
+ rx="1.05"
+ ry="1.05"
+ style="fill:#e11e19"
+ id="rect21" /><rect
+ x="7.3699999"
+ y="17.120001"
+ width="7.8899999"
+ height="2.1300001"
+ rx="1"
+ ry="1"
+ style="fill:#e11e19"
+ id="rect23" /></g></g></svg>
diff --git a/brand/cib/banner.svg b/brand/cib/banner.svg
index 9b03d38ea183..6024e93533ee 100644
--- a/brand/cib/banner.svg
+++ b/brand/cib/banner.svg
@@ -2,30 +2,30 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 499 58"
xml:space="preserve"
id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="banner.svg"
width="499"
height="58"
inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\brand\cib\intro-highres.png"
inkscape:export-xdpi="96"
- inkscape:export-ydpi="96"><metadata
+ inkscape:export-ydpi="96"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata3474"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs3472"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4978"><rect
@@ -62,21 +62,23 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
- inkscape:window-height="1000"
+ inkscape:window-height="1011"
id="namedview3470"
showgrid="false"
- inkscape:zoom="2.16"
- inkscape:cx="263.66575"
- inkscape:cy="108.40609"
- inkscape:window-x="-11"
- inkscape:window-y="-11"
+ inkscape:zoom="5.2987922"
+ inkscape:cx="408.20623"
+ inkscape:cy="66.052788"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3336"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
+ inkscape:showpageshadow="false"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1" />
<style
type="text/css"
id="style3338">
@@ -283,24 +285,30 @@
</g>
<g
- data-name="doXigate Arbeitsunterlagen"
- id="doXigate_Arbeitsunterlagen"
- transform="matrix(1.5675676,0,0,1.5675676,441,-6e-7)"><rect
- id="rect997"
- height="37"
- width="37"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g></svg> \ No newline at end of file
+ id="g25"
+ transform="matrix(2.5725516,0,0,2.5725516,438.56872,-20.558642)"><path
+ d="m 21.65,17.96 c -0.31,-0.32 -0.83,-0.32 -1.14,0 L 12.1,26.37 8.57,22.85 6.65,24.77 12.1,30.22 23.01,19.31 21.66,17.95 Z"
+ style="fill:#e11e19"
+ id="path15" /><path
+ d="m 15.74,28.28 -2.33,1.97 h 1.45 c 2.67,0 4.84,-2.17 4.84,-4.84 v -0.44 l -2.22,1.9 c -0.37,0.67 -0.99,1.18 -1.74,1.41 z"
+ style="fill:#e11e19"
+ id="path17" /><polygon
+ points="8.07,28.42 4.92,28.42 4.92,10.25 17.86,10.25 17.86,18.13 19.69,16.56 19.69,8.41 3.08,8.41 3.08,30.26 9.62,30.26 "
+ style="fill:#e11e19"
+ id="polygon19" /><rect
+ x="7.2600002"
+ y="11.82"
+ width="7.8899999"
+ height="2.24"
+ rx="1.05"
+ ry="1.05"
+ style="fill:#e11e19"
+ id="rect21" /><rect
+ x="7.3699999"
+ y="17.120001"
+ width="7.8899999"
+ height="2.1300001"
+ rx="1"
+ ry="1"
+ style="fill:#e11e19"
+ id="rect23" /></g></svg>
diff --git a/brand/cib/flat_logo.svg b/brand/cib/flat_logo.svg
index b9f52ca5d5d1..2ee6c3366d9e 100644
--- a/brand/cib/flat_logo.svg
+++ b/brand/cib/flat_logo.svg
@@ -1,417 +1,87 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- x="0px"
- y="0px"
- viewBox="0 0 491.5 85.5"
- xml:space="preserve"
- id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- sodipodi:docname="flat_logo.svg"
- width="491.5"
- height="85.5"><metadata
- id="metadata3474"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
- id="defs3472"><clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath4978"><rect
- style="fill:#5fa243;fill-opacity:1"
- id="rect4980"
- width="113.625"
- height="79.875"
- x="72.875"
- y="50.125" /></clipPath><style
- id="style1078">
- .cls-1 {
- fill: #961e29;
- }
-
- .cls-2 {
- fill: #fff;
- }
- </style><style
- id="style943">
- .cls-1 {
- fill: #961e29;
- }
-
- .cls-2 {
- fill: #fff;
- }
- </style></defs><sodipodi:namedview
- pagecolor="#eff1f4"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="2880"
- inkscape:window-height="1721"
- id="namedview3470"
- showgrid="false"
- inkscape:zoom="2.8284271"
- inkscape:cx="226.99865"
- inkscape:cy="120.32247"
- inkscape:window-x="2869"
- inkscape:window-y="-11"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3336"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
-<style
- type="text/css"
- id="style3338">
- .st0{display:none;}
- .st1{display:inline;}
- .st2{fill:#5FA243;}
- .st3{fill:#FFFFFF;}
- .st4{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
- .st5{fill:#C12521;}
- .st6{clip-path:url(#SVGID_2_);fill:#FFFFFF;}
- .st7{display:inline;fill:#5FA243;}
- .st8{display:inline;fill:#C12521;}
- .st9{display:inline;fill:#FFFFFF;}
- .st10{clip-path:url(#SVGID_4_);fill:#FFFFFF;}
- .st11{font-family:'CIBUnit';}
- .st12{font-size:17px;}
-</style>
-<g
- id="alte_version"
- class="st0"
- style="display:none"
- transform="translate(-52.877201,-98.441053)">
- <g
- class="st1"
- id="g3341"
- style="display:inline">
- <polygon
- class="st2"
- points="262,-250 262,-64 0,-64 0,-249.9 "
- id="polygon3343"
- style="fill:#5fa243" />
- </g>
- <g
- id="Libre_2_"
- class="st1"
- style="display:inline">
- <polyline
- class="st3"
- points="73.7,-207.5 73.7,-182.8 89.6,-182.8 89.6,-186.5 78.6,-186.5 78.6,-207.5 73.7,-207.5 "
- id="polyline3346"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 92.6,-182.8 h 4.9 v -17.8 h -4.9 v 17.8 m 2.4,-19.3 c 1.5,0 2.8,-1.2 2.8,-2.8 0,-1.5 -1.3,-2.8 -2.8,-2.8 -1.6,0 -2.8,1.3 -2.8,2.8 0,1.6 1.3,2.8 2.8,2.8"
- id="path3348"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 105.9,-198.5 v 0 L 105.8,-209 H 101 v 26.2 h 4.8 l 0.1,-2.1 h 0.1 c 1.5,1.7 3,2.4 5.6,2.4 4.7,0 7.8,-4.3 7.8,-9.6 0,-5.1 -2.8,-8.9 -7.6,-8.9 -2.7,0.1 -4.2,0.9 -5.9,2.5 m 0,6.4 c 0,-3.1 1.4,-5.1 4,-5.1 2.9,0 4.4,2.1 4.4,5.5 0,3.4 -1.4,5.5 -4.3,5.5 -2.5,0 -4.1,-2 -4.1,-5.1 v -0.8"
- id="path3350"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 132.4,-200.9 c -2.3,0.1 -4.5,1.6 -5.6,3.5 h -0.1 l -0.1,-3.2 h -4.8 v 17.8 h 4.9 v -6.7 c 0,-3.6 0.7,-4.8 1.8,-5.7 1,-0.7 2.1,-1 3.7,-1.1 l 0.2,-4.6"
- id="path3352"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 150.3,-192.7 c 0,-4.4 -2.7,-8.2 -7.3,-8.2 -5.6,0 -9.2,3.9 -9.2,9.7 0,5.7 3.7,8.8 9.2,8.8 2.6,0 4.4,-0.4 6.1,-1.2 l -0.5,-3.6 c -1.6,0.7 -3.2,1.1 -5,1.1 -2.9,0 -4.8,-1.3 -5,-4.1 h 11.5 c 0.1,-0.7 0.2,-1.7 0.2,-2.5 m -7.9,-4.5 c 2.1,0 3.1,1.7 3.2,3.5 h -6.9 c 0.4,-2 1.8,-3.5 3.7,-3.5"
- id="path3354"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 165,-207.8 c -6.5,0 -11.9,4.8 -11.9,12.7 0,7.9 5.4,12.7 11.9,12.7 6.5,0 11.9,-4.8 11.9,-12.7 0.1,-8 -5.3,-12.7 -11.9,-12.7 m 0,2.4 c 4.9,0 8.6,3.6 8.6,10.2 0,6.6 -3.7,10.2 -8.6,10.2 -4.9,0 -8.6,-3.6 -8.6,-10.2 0.1,-6.5 3.8,-10.2 8.6,-10.2"
- id="path3356"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 181.6,-201.5 v 1.1 h -2.9 v 2.3 h 2.9 v 15.3 h 3 v -15.3 h 4.5 v -2.3 h -4.5 v -1.6 c 0,-3.2 1.3,-5 3.8,-5 1.1,0 1.9,0.2 2.5,0.4 l 0.3,-2.3 c -0.7,-0.3 -1.9,-0.5 -2.9,-0.5 -4.2,0 -6.7,2.8 -6.7,7.9"
- id="path3358"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 191.7,-201.5 v 1.1 h -2.9 v 2.3 h 2.9 v 15.3 h 3 v -15.3 h 4.5 v -2.3 h -4.5 v -1.6 c 0,-3.2 1.3,-5 3.8,-5 1.1,0 1.9,0.2 2.5,0.4 l 0.3,-2.3 c -0.7,-0.3 -1.9,-0.5 -2.9,-0.5 -4.2,0 -6.7,2.8 -6.7,7.9"
- id="path3360"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 202.8,-182.8 h 3 v -17.6 h -3 v 17.6 m 1.5,-20.2 c 1.1,0 1.9,-0.8 1.9,-1.9 0,-1.1 -0.8,-1.9 -1.9,-1.9 -1.1,0 -1.9,0.8 -1.9,1.9 0.1,1.1 0.9,1.9 1.9,1.9"
- id="path3362"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 212.2,-191.7 c 0,-4.4 2.7,-6.8 6.1,-6.8 1.8,0 3.4,0.4 4.7,1.1 l 0.3,-2.3 c -1.1,-0.5 -2.8,-1.1 -4.8,-1.1 -5.4,0 -9.5,3.3 -9.5,9.5 0,5.8 3.7,8.9 8.6,8.9 2.2,0 3.7,-0.3 5.5,-1 l -0.3,-2.3 c -1.5,0.7 -3.2,1 -4.7,1 -3.5,0 -5.9,-2.3 -5.9,-7"
- id="path3364"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 240.5,-190.9 c 0.1,-0.7 0.1,-1.2 0.1,-1.8 0,-4.5 -2.4,-8.1 -6.9,-8.1 -4.9,0 -8.5,4.1 -8.5,9.5 0,6 3.6,8.9 8.5,8.9 2.2,0 3.8,-0.3 5.5,-1 l -0.3,-2.3 c -1.3,0.7 -3.3,1 -4.8,1 -3.5,0 -5.8,-2.2 -5.9,-6.2 h 12.3 m -7,-7.5 c 2.7,0 4.1,2.2 4.1,5.1 h -9.2 c 0.5,-3.1 2.2,-5.1 5.1,-5.1"
- id="path3366"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st4"
- d="m 47.3,-224.2 c -0.4,0 -0.8,0.2 -1,0.6 -0.2,0.4 -0.1,0.8 0.2,1.1 l 8.7,8.8 c 0.3,0.3 0.7,0.4 1.1,0.2 0.4,-0.2 0.6,-0.5 0.6,-0.9 v -8.8 c 0,-0.5 -0.5,-1 -1,-1 z m 0,0"
- id="path3368"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd" />
- <path
- class="st4"
- d="m 23.4,-224.2 c -0.5,0 -1,0.5 -1,1 v 39.9 c 0,0.5 0.5,1 1,1 H 56 c 0.5,0 1,-0.5 1,-1 V -209 c 0,-0.3 -0.1,-0.5 -0.3,-0.7 l -14.1,-14.2 c -0.2,-0.2 -0.5,-0.3 -0.7,-0.3 z m 1,2.1 h 17.1 l 13.5,13.6 v 24.3 H 24.4 Z m 0,0"
- id="path3370"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd" />
- </g>
- <g
- class="st1"
- id="g3372"
- style="display:inline">
- <path
- class="st5"
- d="M 0,-103.5 0.1,-64 H 262 v -112 c -82,46.9 -180.2,-13.4 -262,72.5 z"
- id="path3374"
- inkscape:connector-curvature="0"
- style="fill:#c12521" />
- </g>
- <g
- class="st1"
- id="g3376"
- style="display:inline">
- <path
- class="st3"
- d="m 313.7,-253 c 0,0 -0.3,1.4 -1,4.1 -0.6,2.7 -1.7,6.6 -3.2,11.5 -1.6,4.9 -3.6,10.8 -6.6,17.4 -3,6.6 -6.9,13.8 -12.1,21 -0.7,0.9 -1.3,1.8 -2,2.7 -0.7,0.9 -1.5,1.8 -2.2,2.7 -0.4,0.4 -0.7,0.9 -1.1,1.4 -0.4,0.4 -0.8,0.9 -1.2,1.3 -0.8,0.9 -1.6,1.8 -2.4,2.6 -0.8,0.9 -1.7,1.7 -2.6,2.6 -0.4,0.4 -0.9,0.9 -1.3,1.3 -0.4,0.4 -0.9,0.8 -1.4,1.2 -0.9,0.8 -1.9,1.6 -2.9,2.5 -1,0.8 -2,1.5 -3,2.3 -4.1,3 -8.6,5.9 -13.4,8.3 -4.8,2.4 -9.9,4.6 -15.2,6.3 -10.6,3.5 -22,5.7 -33.5,7 -11.6,1.4 -23.3,1.8 -35.1,2.1 -11.7,0.2 -23.4,0.5 -35,0.7 -11.5,0.3 -22.8,0.9 -33.7,2.1 -10.9,1.1 -21.3,3 -31,5.4 -9.7,2.5 -18.6,5.6 -26.6,9.2 -8,3.6 -14.9,7.6 -20.8,11.6 -1.5,0.9 -2.9,2 -4.2,3 -0.7,0.5 -1.3,1 -2,1.4 -0.6,0.5 -1.2,1 -1.8,1.5 -1.2,0.9 -2.4,1.8 -3.5,2.7 -1.1,0.9 -2.1,1.8 -3.1,2.6 -2,1.6 -3.6,3.2 -5.1,4.6 -1.5,1.3 -2.7,2.5 -3.6,3.5 -2,1.9 -3,3 -3,3 0,0 1,-1.1 2.8,-3.2 0.9,-1 2,-2.3 3.4,-3.7 1.4,-1.4 3,-3.1 4.9,-4.8 3.7,-3.6 8.5,-7.6 14.4,-11.7 5.8,-4.2 12.8,-8.4 20.8,-12.1 8,-3.8 17,-7.1 26.8,-9.8 9.8,-2.6 20.3,-4.6 31.3,-6 11,-1.4 22.3,-2.1 33.9,-2.6 11.6,-0.5 23.3,-0.7 35,-1.1 11.7,-0.4 23.4,-1 34.7,-2.3 11.4,-1.3 22.4,-3.5 32.7,-6.8 10.2,-3.5 19.6,-8.2 27.6,-14 1,-0.7 2,-1.5 2.9,-2.2 0.9,-0.8 1.9,-1.6 2.8,-2.3 0.9,-0.8 1.8,-1.6 2.7,-2.4 0.9,-0.8 1.7,-1.6 2.6,-2.4 0.8,-0.8 1.6,-1.7 2.4,-2.5 0.4,-0.4 0.8,-0.8 1.2,-1.2 0.4,-0.4 0.7,-0.9 1.1,-1.3 0.7,-0.9 1.5,-1.7 2.2,-2.5 0.7,-0.8 1.4,-1.7 2,-2.6 5.3,-6.8 9.4,-13.8 12.6,-20 3.3,-6.3 5.6,-12 7.5,-16.8 0.9,-2.4 1.7,-4.5 2.4,-6.4 0.4,-0.9 0.6,-1.8 0.9,-2.6 0.3,-0.8 0.5,-1.5 0.7,-2.2 0.8,-2.7 1.3,-4.1 1.3,-4.1 z"
- id="path3378"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <g
- class="st1"
- id="g3380"
- style="display:inline">
- <path
- class="st3"
- d="m 185.1,-89.2 c 0,1.9 -2.3,4 -4.2,4 -1.2,0 -3.4,0 -3.4,0 v -33.6 h 7.6 z"
- id="path3382"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <g
- id="g3384">
- <defs
- id="defs3386">
- <rect
- id="SVGID_1_"
- x="147.60001"
- y="-126.7"
- width="92.699997"
- height="42" />
- </defs>
- <clipPath
- id="SVGID_2_">
- <use
- xlink:href="#SVGID_1_"
- style="overflow:visible"
- id="use3390"
- x="0"
- y="0"
- width="100%"
- height="100%" />
- </clipPath>
- <path
- class="st6"
- d="m 207.1,-108.8 c 0,-1.3 -0.3,-2.3 -0.9,-2.8 -0.6,-0.5 -1.7,-0.8 -3.1,-0.8 H 197 v 7.3 h 6.3 c 1.3,0 2.3,-0.3 2.9,-0.9 0.6,-0.5 0.9,-1.5 0.9,-2.8 z m 0.8,13.3 c 0,-1.4 -0.3,-2.4 -1,-3.1 -0.7,-0.6 -1.8,-0.9 -3.5,-0.9 h -6.5 v 8.1 h 6.7 c 0,0 2.6,-0.3 3.3,-0.9 0.7,-0.5 1,-1.6 1,-3.2 z m -14.3,-23.3 c 0.8,0 9.7,0 9.7,0 3.7,0 6.4,0.8 8.2,2.3 1.8,1.5 2.7,3.6 2.7,6.3 0,1.9 -0.4,3.4 -1.2,4.6 -0.8,1.2 -1.9,2.1 -3.2,2.6 v 0.1 c 3.8,1 5.7,3.7 5.7,7.9 0,1.5 -0.2,2.9 -0.7,4.1 -0.5,1.2 -1.2,2.2 -2.1,3.1 -1,0.9 -2.2,1.5 -3.7,1.9 -1.5,0.4 -3.3,0.7 -5.4,0.7 h -13.8 c 0,0 0,-29.6 0,-29.6 -0.1,-1.5 2.2,-4 3.8,-4 z"
- id="path3392"
- clip-path="url(#SVGID_2_)"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st6"
- d="m 167.1,-112.3 c -9.3,-1.4 -11.6,1.8 -11.6,10.3 0,8.2 2.3,11.3 12.4,10.3 3.2,-0.3 3.9,0.7 4.5,5.6 -1.1,0.6 -5.9,1.4 -9.3,1.3 -5.1,-0.2 -9.3,-1.4 -11.7,-4.3 -2.5,-2.8 -3.7,-7.2 -3.7,-13.2 0,-12 5.4,-17 15.9,-17 5.1,0 8.6,1.5 8.6,1.5 -1,5.6 -1.9,6 -5.1,5.5 z"
- id="path3394"
- clip-path="url(#SVGID_2_)"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <path
- class="st3"
- d="m 234.5,-99.5 c 2.5,0 6.2,-4 6.2,-6.1 0,0 0,-21 0,-21 h -19.3 v 27.2 h 13.1 z"
- id="path3396"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <text
- transform="translate(20.9652,-84.5756)"
- class="st9 st11 st12"
- id="text3398"
- style="font-size:17px;line-height:0%;font-family:CIBUnit;display:inline;fill:#ffffff">powered by</text>
-
-
-
-
-
-
-</g>
-
-<g
- data-name="doXigate Arbeitsunterlagen"
- id="doXigate_Arbeitsunterlagen"
- transform="matrix(2.1647413,0,0,2.1647413,66.690227,2.702286)"><g
- id="g995"><path
- id="path949"
- d="M 53.008,20.047 H 43 V 3.242 h 3.785 v 13.735 h 6.223 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path951"
- d="m 56.781,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.8,1.8 0 0 1 -0.6,-1.365 1.733,1.733 0 0 1 0.6,-1.36 2.508,2.508 0 0 1 3.076,0 1.737,1.737 0 0 1 0.592,1.36 1.783,1.783 0 0 1 -0.592,1.382 2.2,2.2 0 0 1 -1.541,0.539 z m 1.828,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path953"
- d="M 65.477,18.652 H 65.43 v 1.395 h -3.7 V 2.281 h 3.7 v 7.571 h 0.047 a 4.392,4.392 0 0 1 3.9,-2.1 4.28,4.28 0 0 1 3.574,1.594 6.87,6.87 0 0 1 1.254,4.359 7.437,7.437 0 0 1 -1.465,4.816 4.771,4.771 0 0 1 -3.914,1.817 3.78,3.78 0 0 1 -3.349,-1.686 z M 65.371,13.59 v 1.23 a 2.81,2.81 0 0 0 0.668,1.922 2.173,2.173 0 0 0 1.711,0.762 2.269,2.269 0 0 0 1.963,-0.979 4.722,4.722 0 0 0 0.7,-2.771 3.763,3.763 0 0 0 -0.638,-2.326 2.156,2.156 0 0 0 -1.823,-0.838 2.352,2.352 0 0 0 -1.845,0.832 3.157,3.157 0 0 0 -0.736,2.168 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path955"
- d="m 84.438,11.387 a 3.217,3.217 0 0 0 -1.559,-0.364 2.245,2.245 0 0 0 -1.887,0.885 3.861,3.861 0 0 0 -0.679,2.408 v 5.731 h -3.7 v -12 h 3.7 v 2.226 h 0.046 a 3.2,3.2 0 0 1 3.164,-2.437 2.384,2.384 0 0 1 0.915,0.141 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path957"
- d="M 96.848,15.1 H 89.02 q 0.188,2.613 3.293,2.613 a 6.428,6.428 0 0 0 3.48,-0.938 v 2.672 a 9.139,9.139 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.6,-4.495 6.422,6.422 0 0 1 1.729,-4.732 5.778,5.778 0 0 1 4.266,-1.746 5.24,5.24 0 0 1 4.06,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 A 1.992,1.992 0 0 0 89.787,10.986 3.361,3.361 0 0 0 89,12.828 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path959"
- d="m 106.516,20.34 a 7.819,7.819 0 0 1 -5.883,-2.35 8.433,8.433 0 0 1 -2.274,-6.123 9.04,9.04 0 0 1 2.309,-6.445 7.991,7.991 0 0 1 6.117,-2.461 7.63,7.63 0 0 1 5.815,2.355 8.688,8.688 0 0 1 2.22,6.211 8.894,8.894 0 0 1 -2.3,6.387 7.907,7.907 0 0 1 -6.004,2.426 z M 106.68,6.219 a 3.81,3.81 0 0 0 -3.164,1.494 6.224,6.224 0 0 0 -1.172,3.955 6.111,6.111 0 0 0 1.172,3.949 4.044,4.044 0 0 0 6.175,0.041 6.045,6.045 0 0 0 1.149,-3.92 6.555,6.555 0 0 0 -1.113,-4.066 3.63,3.63 0 0 0 -3.047,-1.453 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path961"
- d="m 125.078,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.78,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.692 v -9.27 h -2.015 v -2.73 h 2.015 V 6.559 a 4.322,4.322 0 0 1 1.336,-3.3 5.1,5.1 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path963"
- d="m 134.277,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.781,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.691 v -9.27 h -2.016 v -2.73 h 2.016 V 6.559 a 4.319,4.319 0 0 1 1.336,-3.3 5.092,5.092 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path965"
- d="m 137.523,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.794,1.794 0 0 1 -0.6,-1.365 1.732,1.732 0 0 1 0.6,-1.36 2.509,2.509 0 0 1 3.077,0 1.74,1.74 0 0 1 0.591,1.36 1.786,1.786 0 0 1 -0.591,1.382 2.2,2.2 0 0 1 -1.542,0.539 z m 1.829,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path967"
- d="m 151.563,19.613 a 7.316,7.316 0 0 1 -3.622,0.727 6.124,6.124 0 0 1 -4.476,-1.676 5.785,5.785 0 0 1 -1.711,-4.324 6.373,6.373 0 0 1 1.834,-4.822 6.775,6.775 0 0 1 4.9,-1.764 6.3,6.3 0 0 1 3.071,0.562 v 3.141 a 4.224,4.224 0 0 0 -2.59,-0.867 3.41,3.41 0 0 0 -2.526,0.932 3.475,3.475 0 0 0 -0.931,2.572 3.424,3.424 0 0 0 0.89,2.5 3.275,3.275 0 0 0 2.449,0.908 4.891,4.891 0 0 0 2.708,-0.867 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path969"
- d="m 164.77,15.1 h -7.829 q 0.188,2.613 3.293,2.613 a 6.429,6.429 0 0 0 3.481,-0.938 v 2.672 a 9.142,9.142 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.606,-4.495 6.422,6.422 0 0 1 1.735,-4.732 5.777,5.777 0 0 1 4.265,-1.746 5.242,5.242 0 0 1 4.061,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 a 1.992,1.992 0 0 0 -1.541,0.738 3.354,3.354 0 0 0 -0.791,1.84 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path971"
- d="m 44.62,32.412 v 3.555 H 43 v -9.8 h 2.974 a 3.938,3.938 0 0 1 2.618,0.786 2.743,2.743 0 0 1 0.93,2.215 3.061,3.061 0 0 1 -0.971,2.338 3.689,3.689 0 0 1 -2.625,0.909 z m 0,-4.908 v 3.582 h 1.053 a 2.333,2.333 0 0 0 1.593,-0.485 1.737,1.737 0 0 0 0.547,-1.368 q 0,-1.73 -2.01,-1.729 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path973"
- d="M 56.272,36.131 A 4.41,4.41 0 0 1 52.878,34.757 5.046,5.046 0 0 1 51.6,31.182 5.348,5.348 0 0 1 52.9,27.408 4.568,4.568 0 0 1 56.43,26 a 4.31,4.31 0 0 1 3.325,1.367 5.06,5.06 0 0 1 1.262,3.575 5.364,5.364 0 0 1 -1.292,3.794 4.481,4.481 0 0 1 -3.453,1.395 z m 0.076,-8.7 a 2.727,2.727 0 0 0 -2.191,1.005 3.973,3.973 0 0 0 -0.844,2.645 4.013,4.013 0 0 0 0.82,2.632 2.647,2.647 0 0 0 2.146,1 2.77,2.77 0 0 0 2.222,-0.95 3.967,3.967 0 0 0 0.814,-2.659 4.146,4.146 0 0 0 -0.791,-2.714 2.667,2.667 0 0 0 -2.176,-0.961 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path975"
- d="m 76.025,26.164 -2.686,9.8 H 71.5 L 69.634,29.11 A 4.77,4.77 0 0 1 69.49,28.153 h -0.027 a 4.639,4.639 0 0 1 -0.164,0.944 l -1.873,6.87 h -1.88 l -2.741,-9.8 h 1.784 l 1.777,7.178 a 5.2,5.2 0 0 1 0.137,0.943 h 0.034 a 5.373,5.373 0 0 1 0.192,-0.943 l 2.009,-7.178 h 1.675 l 1.859,7.233 a 5.635,5.635 0 0 1 0.144,0.875 h 0.027 a 5.445,5.445 0 0 1 0.158,-0.9 l 1.743,-7.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path977"
- d="m 83.94,35.967 h -5.5 v -9.8 h 5.285 v 1.381 h -3.661 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 h 3.876 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path979"
- d="m 94.307,35.967 h -1.9 l -1.565,-2.625 a 5.813,5.813 0 0 0 -0.414,-0.619 2.488,2.488 0 0 0 -0.41,-0.42 1.349,1.349 0 0 0 -0.454,-0.239 1.9,1.9 0 0 0 -0.554,-0.076 h -0.656 v 3.979 h -1.622 v -9.8 h 3.227 a 4.678,4.678 0 0 1 1.271,0.164 2.962,2.962 0 0 1 1.012,0.5 2.3,2.3 0 0 1 0.673,0.826 2.608,2.608 0 0 1 0.243,1.16 2.883,2.883 0 0 1 -0.153,0.954 2.492,2.492 0 0 1 -0.438,0.771 2.661,2.661 0 0 1 -0.683,0.578 3.4,3.4 0 0 1 -0.9,0.369 v 0.028 a 2.489,2.489 0 0 1 0.465,0.332 c 0.132,0.12 0.258,0.244 0.376,0.372 a 4.53,4.53 0 0 1 0.352,0.434 c 0.117,0.162 0.245,0.35 0.387,0.564 z m -5.954,-8.484 v 3.186 h 1.353 a 2,2 0 0 0 0.693,-0.116 1.587,1.587 0 0 0 0.551,-0.335 1.52,1.52 0 0 0 0.363,-0.533 1.843,1.843 0 0 0 0.129,-0.7 A 1.4,1.4 0 0 0 91,27.88 1.856,1.856 0 0 0 89.722,27.48 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path981"
- d="m 102,35.967 h -5.5 v -9.8 h 5.284 v 1.381 h -3.659 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 H 102 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path983"
- d="m 104.794,35.967 v -9.8 h 2.83 q 5.421,0 5.421,4.778 a 4.711,4.711 0 0 1 -1.5,3.648 5.741,5.741 0 0 1 -4.033,1.377 z m 1.62,-8.422 v 7.048 h 1.3 a 3.636,3.636 0 0 0 2.67,-0.944 3.583,3.583 0 0 0 0.953,-2.666 q 0,-3.438 -3.562,-3.438 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path985"
- d="m 120.785,35.967 v -9.8 h 3.115 a 3.665,3.665 0 0 1 2.251,0.622 1.932,1.932 0 0 1 0.832,1.62 2.32,2.32 0 0 1 -0.472,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.275,2.275 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.93,3.93 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.482,-1.131 q 0,-1.259 -1.682,-1.258 z m 0,4.1 v 3.1 h 1.388 a 2.119,2.119 0 0 0 1.4,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path987"
- d="m 136.717,26.164 -3.217,6.241 v 3.562 h -1.627 V 32.44 l -3.131,-6.276 h 1.858 l 1.927,4.2 q 0.034,0.075 0.2,0.568 h 0.021 a 3.839,3.839 0 0 1 0.226,-0.568 l 2.016,-4.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path989"
- d="m 150.752,35.557 a 5.938,5.938 0 0 1 -2.755,0.574 4.5,4.5 0 0 1 -3.418,-1.347 4.909,4.909 0 0 1 -1.285,-3.534 5.15,5.15 0 0 1 1.445,-3.8 4.951,4.951 0 0 1 3.655,-1.45 6,6 0 0 1 2.358,0.4 v 1.614 a 4.208,4.208 0 0 0 -2.187,-0.588 3.442,3.442 0 0 0 -2.582,1.018 3.744,3.744 0 0 0 -0.983,2.724 3.567,3.567 0 0 0 0.923,2.58 3.209,3.209 0 0 0 2.427,0.961 4.348,4.348 0 0 0 2.406,-0.656 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path991"
- d="m 155.329,35.967 h -1.675 v -9.8 h 1.675 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path993"
- d="m 158.793,35.967 v -9.8 h 3.11 a 3.667,3.667 0 0 1 2.252,0.622 1.931,1.931 0 0 1 0.831,1.62 2.32,2.32 0 0 1 -0.471,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.279,2.279 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.932,3.932 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.481,-1.131 q 0,-1.259 -1.681,-1.258 z m 0,4.1 v 3.1 h 1.387 a 2.119,2.119 0 0 0 1.405,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /></g><rect
- id="rect997"
- height="37"
- width="37"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.2" width="46.5mm" height="10.3mm" viewBox="0 0 4650 1030" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:ooo="http://xml.openoffice.org/svg/export" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:presentation="http://sun.com/xmlns/staroffice/presentation" xmlns:smil="http://www.w3.org/2001/SMIL20/" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xml:space="preserve">
+ <defs class="ClipPathGroup">
+ <clipPath id="presentation_clip_path" clipPathUnits="userSpaceOnUse">
+ <rect x="0" y="0" width="4650" height="1030"/>
+ </clipPath>
+ <clipPath id="presentation_clip_path_shrink" clipPathUnits="userSpaceOnUse">
+ <rect x="4" y="1" width="4641" height="1028"/>
+ </clipPath>
+ </defs>
+ <defs class="TextShapeIndex">
+ <g ooo:slide="id1" ooo:id-list="id3"/>
+ </defs>
+ <defs class="EmbeddedBulletChars">
+ <g id="bullet-char-template-57356" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"/>
+ </g>
+ <g id="bullet-char-template-57354" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z"/>
+ </g>
+ <g id="bullet-char-template-10146" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z"/>
+ </g>
+ <g id="bullet-char-template-10132" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z"/>
+ </g>
+ <g id="bullet-char-template-10007" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z"/>
+ </g>
+ <g id="bullet-char-template-10004" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z"/>
+ </g>
+ <g id="bullet-char-template-9679" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z"/>
+ </g>
+ <g id="bullet-char-template-8226" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z"/>
+ </g>
+ <g id="bullet-char-template-8211" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z"/>
+ </g>
+ <g id="bullet-char-template-61548" transform="scale(0.00048828125,-0.00048828125)">
+ <path d="M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z"/>
+ </g>
+ </defs>
+ <g>
+ <g id="id2" class="Master_Slide">
+ <g id="bg-id2" class="Background"/>
+ <g id="bo-id2" class="BackgroundObjects"/>
+ </g>
+ </g>
+ <g class="SlideGroup">
+ <g>
+ <g id="container-id1">
+ <g id="id1" class="Slide" clip-path="url(#presentation_clip_path)">
+ <g class="Page">
+ <defs class="SlideBackground">
+ <g id="bg-id1" class="Background">
+ <path fill="rgb(255,255,255)" stroke="none" d="M 2325,1029 L 0,1029 0,0 4649,0 4649,1029 2325,1029 Z"/>
+ </g>
+ </defs>
+ <g class="Graphic">
+ <g id="id3">
+ <rect class="BoundingBox" stroke="none" fill="none" x="0" y="0" width="4654" height="1032"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 1275,778 C 1236,798 1187,809 1129,809 1053,809 993,785 947,736 902,687 879,624 879,545 879,460 904,391 956,339 1007,287 1071,260 1150,260 1200,260 1242,268 1275,282 L 1275,349 C 1237,328 1195,317 1149,317 1088,317 1039,337 1001,378 963,419 944,473 944,541 944,609 962,657 997,696 1033,734 1079,753 1136,753 1190,753 1236,741 1275,718 L 1275,778 1275,778 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 1464,800 L 1402,800 1402,269 1464,269 1464,800 1464,800 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 1623,800 L 1623,269 1774,269 C 1820,269 1856,280 1883,303 1910,325 1924,355 1924,391 1924,421 1916,447 1899,469 1883,491 1861,507 1832,517 L 1832,518 C 1868,522 1896,536 1918,559 1939,581 1950,611 1950,648 1950,693 1934,730 1901,758 1869,786 1827,800 1778,800 L 1623,800 1623,800 Z M 1685,325 L 1685,497 1749,497 C 1783,497 1810,489 1829,472 1849,456 1859,432 1859,403 1859,351 1825,325 1757,325 L 1685,325 1685,325 Z M 1685,553 L 1685,744 1770,744 C 1806,744 1834,735 1854,718 1875,701 1885,677 1885,647 1885,584 1842,553 1757,553 L 1685,553 1685,553 Z"/>
+ <path fill="rgb(225,30,25)" stroke="none" d="M 586,488 C 578,480 564,480 556,488 L 333,710 240,617 189,668 333,812 622,524 586,488 586,488 Z"/>
+ <path fill="rgb(225,30,25)" stroke="none" d="M 368,813 L 406,813 C 477,813 534,756 534,685 L 534,673 476,724 C 466,741 449,755 430,761 L 368,813 Z"/>
+ <path fill="rgb(225,30,25)" stroke="none" d="M 143,765 L 143,284 486,284 486,493 534,451 534,236 95,236 95,813 268,813 227,765 143,765 143,765 Z"/>
+ <path fill="rgb(225,30,25)" stroke="none" d="M 310,385 L 386,385 C 402,385 414,372 414,357 L 414,353 C 414,338 402,326 386,326 L 233,326 C 218,326 205,338 205,353 L 205,357 C 205,372 218,385 233,385 L 310,385 Z"/>
+ <path fill="rgb(225,30,25)" stroke="none" d="M 313,522 L 390,522 C 405,522 417,510 417,496 L 417,492 C 417,478 405,466 390,466 L 235,466 C 220,466 208,478 208,492 L 208,496 C 208,510 220,522 235,522 L 313,522 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 2464,811 C 2389,811 2328,786 2283,736 2238,687 2215,622 2215,543 2215,457 2238,389 2284,338 2331,288 2393,262 2473,262 2546,262 2605,287 2650,336 2695,386 2717,450 2717,530 2717,616 2694,685 2649,735 2603,785 2541,811 2464,811 L 2464,811 Z M 2468,318 C 2413,318 2367,338 2332,379 2298,419 2280,472 2280,537 2280,602 2297,655 2331,695 2365,735 2409,754 2464,754 2522,754 2568,735 2602,697 2635,659 2652,606 2652,538 2652,470 2636,414 2603,375 2571,337 2526,318 2468,318 L 2468,318 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 2979,284 C 2937,284 2915,311 2915,364 L 2915,423 3004,423 3004,475 2915,475 2915,802 2855,802 2855,475 2790,475 2790,423 2855,423 2855,361 C 2855,322 2867,290 2890,267 2913,244 2941,233 2976,233 2994,233 3009,235 3020,239 L 3020,294 C 3008,287 2994,284 2979,284 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 3236,284 C 3193,284 3172,311 3172,364 L 3172,423 3261,423 3261,475 3172,475 3172,802 3112,802 3112,475 3047,475 3047,423 3112,423 3112,361 C 3112,322 3123,290 3146,267 3169,244 3198,233 3232,233 3251,233 3265,235 3276,239 L 3276,294 C 3264,287 3251,284 3236,284 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 3376,326 C 3365,326 3356,323 3349,315 3341,308 3337,299 3337,287 3337,276 3341,266 3349,259 3356,251 3365,248 3376,248 3387,248 3397,251 3405,259 3412,266 3416,276 3416,287 3416,299 3412,307 3405,315 3397,323 3387,326 3376,326 L 3376,326 Z M 3406,802 L 3345,802 3345,423 3406,423 3406,802 3406,802 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 3806,784 C 3777,802 3742,811 3703,811 3649,811 3605,793 3572,758 3538,722 3522,677 3522,621 3522,559 3540,508 3576,471 3611,433 3659,414 3719,414 3752,414 3782,420 3807,432 L 3807,494 C 3779,475 3749,465 3717,465 3678,465 3646,479 3621,507 3596,534 3584,571 3584,616 3584,661 3595,696 3619,721 3642,747 3673,760 3713,760 3746,760 3777,749 3806,727 L 3806,784 3806,784 Z"/>
+ <path fill="rgb(33,41,52)" stroke="none" d="M 4222,627 L 3954,627 C 3955,670 3967,702 3988,725 4010,748 4040,760 4078,760 4121,760 4160,745 4196,717 L 4196,774 C 4162,799 4118,811 4063,811 4009,811 3968,793 3937,759 3907,725 3891,676 3891,614 3891,555 3908,507 3941,470 3975,432 4016,414 4066,414 4116,414 4154,430 4181,462 4208,494 4222,538 4222,595 L 4222,627 4222,627 Z M 4160,576 C 4160,541 4151,513 4134,494 4118,475 4095,465 4065,465 4035,465 4012,475 3992,495 3972,516 3960,543 3955,576 L 4160,576 4160,576 Z"/>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg> \ No newline at end of file
diff --git a/brand/cib/intro-highres.png b/brand/cib/intro-highres.png
index 04471d8170a9..17560c7fe464 100644
--- a/brand/cib/intro-highres.png
+++ b/brand/cib/intro-highres.png
Binary files differ
diff --git a/brand/cib/intro-highres.svg b/brand/cib/intro-highres.svg
index 67e0159ce769..b3258b6c4c7e 100644
--- a/brand/cib/intro-highres.svg
+++ b/brand/cib/intro-highres.svg
@@ -2,30 +2,30 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 773 394"
xml:space="preserve"
id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="intro-highres.svg"
width="773"
height="394"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\brand\cib\intro.png"
+ inkscape:export-filename="intro-highres.png"
inkscape:export-xdpi="96"
- inkscape:export-ydpi="96"><metadata
+ inkscape:export-ydpi="96"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata3474"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs3472"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4978"><rect
@@ -52,7 +52,14 @@
.cls-2 {
fill: #fff;
}
- </style></defs><sodipodi:namedview
+ </style><clipPath
+ id="b"><rect
+ x="0.13"
+ y="-0.15000001"
+ width="174"
+ height="38"
+ style="fill:none"
+ id="rect2" /></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
@@ -62,21 +69,23 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
- inkscape:window-height="1000"
+ inkscape:window-height="1011"
id="namedview3470"
showgrid="false"
- inkscape:zoom="1"
- inkscape:cx="264.75405"
- inkscape:cy="108.40609"
- inkscape:window-x="-11"
- inkscape:window-y="-11"
+ inkscape:zoom="0.94451843"
+ inkscape:cx="93.698542"
+ inkscape:cy="265.74389"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3336"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
+ inkscape:showpageshadow="false"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1" />
<style
type="text/css"
id="style3338">
@@ -98,14 +107,14 @@
id="alte_version"
class="st0"
style="display:none"
- transform="translate(-52.877201,210.05895)">
+ transform="translate(-52.890201,77.058947)">
<g
class="st1"
id="g3341"
style="display:inline">
<polygon
class="st2"
- points="262,-250 262,-64 0,-64 0,-249.9 "
+ points="0,-64 0,-249.9 262,-250 262,-64 "
id="polygon3343"
style="fill:#5fa243" />
</g>
@@ -282,152 +291,65 @@
</g>
<g
- data-name="doXigate Arbeitsunterlagen"
- id="doXigate_Arbeitsunterlagen"
- transform="matrix(2.7510816,0,0,2.7510816,158.94022,146.10499)"><g
- id="g995"><path
- id="path949"
- d="M 53.008,20.047 H 43 V 3.242 h 3.785 v 13.735 h 6.223 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path951"
- d="m 56.781,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.8,1.8 0 0 1 -0.6,-1.365 1.733,1.733 0 0 1 0.6,-1.36 2.508,2.508 0 0 1 3.076,0 1.737,1.737 0 0 1 0.592,1.36 1.783,1.783 0 0 1 -0.592,1.382 2.2,2.2 0 0 1 -1.541,0.539 z m 1.828,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path953"
- d="M 65.477,18.652 H 65.43 v 1.395 h -3.7 V 2.281 h 3.7 v 7.571 h 0.047 a 4.392,4.392 0 0 1 3.9,-2.1 4.28,4.28 0 0 1 3.574,1.594 6.87,6.87 0 0 1 1.254,4.359 7.437,7.437 0 0 1 -1.465,4.816 4.771,4.771 0 0 1 -3.914,1.817 3.78,3.78 0 0 1 -3.349,-1.686 z M 65.371,13.59 v 1.23 a 2.81,2.81 0 0 0 0.668,1.922 2.173,2.173 0 0 0 1.711,0.762 2.269,2.269 0 0 0 1.963,-0.979 4.722,4.722 0 0 0 0.7,-2.771 3.763,3.763 0 0 0 -0.638,-2.326 2.156,2.156 0 0 0 -1.823,-0.838 2.352,2.352 0 0 0 -1.845,0.832 3.157,3.157 0 0 0 -0.736,2.168 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path955"
- d="m 84.438,11.387 a 3.217,3.217 0 0 0 -1.559,-0.364 2.245,2.245 0 0 0 -1.887,0.885 3.861,3.861 0 0 0 -0.679,2.408 v 5.731 h -3.7 v -12 h 3.7 v 2.226 h 0.046 a 3.2,3.2 0 0 1 3.164,-2.437 2.384,2.384 0 0 1 0.915,0.141 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path957"
- d="M 96.848,15.1 H 89.02 q 0.188,2.613 3.293,2.613 a 6.428,6.428 0 0 0 3.48,-0.938 v 2.672 a 9.139,9.139 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.6,-4.495 6.422,6.422 0 0 1 1.729,-4.732 5.778,5.778 0 0 1 4.266,-1.746 5.24,5.24 0 0 1 4.06,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 A 1.992,1.992 0 0 0 89.787,10.986 3.361,3.361 0 0 0 89,12.828 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path959"
- d="m 106.516,20.34 a 7.819,7.819 0 0 1 -5.883,-2.35 8.433,8.433 0 0 1 -2.274,-6.123 9.04,9.04 0 0 1 2.309,-6.445 7.991,7.991 0 0 1 6.117,-2.461 7.63,7.63 0 0 1 5.815,2.355 8.688,8.688 0 0 1 2.22,6.211 8.894,8.894 0 0 1 -2.3,6.387 7.907,7.907 0 0 1 -6.004,2.426 z M 106.68,6.219 a 3.81,3.81 0 0 0 -3.164,1.494 6.224,6.224 0 0 0 -1.172,3.955 6.111,6.111 0 0 0 1.172,3.949 4.044,4.044 0 0 0 6.175,0.041 6.045,6.045 0 0 0 1.149,-3.92 6.555,6.555 0 0 0 -1.113,-4.066 3.63,3.63 0 0 0 -3.047,-1.453 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path961"
- d="m 125.078,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.78,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.692 v -9.27 h -2.015 v -2.73 h 2.015 V 6.559 a 4.322,4.322 0 0 1 1.336,-3.3 5.1,5.1 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path963"
- d="m 134.277,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.781,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.691 v -9.27 h -2.016 v -2.73 h 2.016 V 6.559 a 4.319,4.319 0 0 1 1.336,-3.3 5.092,5.092 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path965"
- d="m 137.523,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.794,1.794 0 0 1 -0.6,-1.365 1.732,1.732 0 0 1 0.6,-1.36 2.509,2.509 0 0 1 3.077,0 1.74,1.74 0 0 1 0.591,1.36 1.786,1.786 0 0 1 -0.591,1.382 2.2,2.2 0 0 1 -1.542,0.539 z m 1.829,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path967"
- d="m 151.563,19.613 a 7.316,7.316 0 0 1 -3.622,0.727 6.124,6.124 0 0 1 -4.476,-1.676 5.785,5.785 0 0 1 -1.711,-4.324 6.373,6.373 0 0 1 1.834,-4.822 6.775,6.775 0 0 1 4.9,-1.764 6.3,6.3 0 0 1 3.071,0.562 v 3.141 a 4.224,4.224 0 0 0 -2.59,-0.867 3.41,3.41 0 0 0 -2.526,0.932 3.475,3.475 0 0 0 -0.931,2.572 3.424,3.424 0 0 0 0.89,2.5 3.275,3.275 0 0 0 2.449,0.908 4.891,4.891 0 0 0 2.708,-0.867 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path969"
- d="m 164.77,15.1 h -7.829 q 0.188,2.613 3.293,2.613 a 6.429,6.429 0 0 0 3.481,-0.938 v 2.672 a 9.142,9.142 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.606,-4.495 6.422,6.422 0 0 1 1.735,-4.732 5.777,5.777 0 0 1 4.265,-1.746 5.242,5.242 0 0 1 4.061,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 a 1.992,1.992 0 0 0 -1.541,0.738 3.354,3.354 0 0 0 -0.791,1.84 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path971"
- d="m 44.62,32.412 v 3.555 H 43 v -9.8 h 2.974 a 3.938,3.938 0 0 1 2.618,0.786 2.743,2.743 0 0 1 0.93,2.215 3.061,3.061 0 0 1 -0.971,2.338 3.689,3.689 0 0 1 -2.625,0.909 z m 0,-4.908 v 3.582 h 1.053 a 2.333,2.333 0 0 0 1.593,-0.485 1.737,1.737 0 0 0 0.547,-1.368 q 0,-1.73 -2.01,-1.729 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path973"
- d="M 56.272,36.131 A 4.41,4.41 0 0 1 52.878,34.757 5.046,5.046 0 0 1 51.6,31.182 5.348,5.348 0 0 1 52.9,27.408 4.568,4.568 0 0 1 56.43,26 a 4.31,4.31 0 0 1 3.325,1.367 5.06,5.06 0 0 1 1.262,3.575 5.364,5.364 0 0 1 -1.292,3.794 4.481,4.481 0 0 1 -3.453,1.395 z m 0.076,-8.7 a 2.727,2.727 0 0 0 -2.191,1.005 3.973,3.973 0 0 0 -0.844,2.645 4.013,4.013 0 0 0 0.82,2.632 2.647,2.647 0 0 0 2.146,1 2.77,2.77 0 0 0 2.222,-0.95 3.967,3.967 0 0 0 0.814,-2.659 4.146,4.146 0 0 0 -0.791,-2.714 2.667,2.667 0 0 0 -2.176,-0.961 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path975"
- d="m 76.025,26.164 -2.686,9.8 H 71.5 L 69.634,29.11 A 4.77,4.77 0 0 1 69.49,28.153 h -0.027 a 4.639,4.639 0 0 1 -0.164,0.944 l -1.873,6.87 h -1.88 l -2.741,-9.8 h 1.784 l 1.777,7.178 a 5.2,5.2 0 0 1 0.137,0.943 h 0.034 a 5.373,5.373 0 0 1 0.192,-0.943 l 2.009,-7.178 h 1.675 l 1.859,7.233 a 5.635,5.635 0 0 1 0.144,0.875 h 0.027 a 5.445,5.445 0 0 1 0.158,-0.9 l 1.743,-7.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path977"
- d="m 83.94,35.967 h -5.5 v -9.8 h 5.285 v 1.381 h -3.661 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 h 3.876 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path979"
- d="m 94.307,35.967 h -1.9 l -1.565,-2.625 a 5.813,5.813 0 0 0 -0.414,-0.619 2.488,2.488 0 0 0 -0.41,-0.42 1.349,1.349 0 0 0 -0.454,-0.239 1.9,1.9 0 0 0 -0.554,-0.076 h -0.656 v 3.979 h -1.622 v -9.8 h 3.227 a 4.678,4.678 0 0 1 1.271,0.164 2.962,2.962 0 0 1 1.012,0.5 2.3,2.3 0 0 1 0.673,0.826 2.608,2.608 0 0 1 0.243,1.16 2.883,2.883 0 0 1 -0.153,0.954 2.492,2.492 0 0 1 -0.438,0.771 2.661,2.661 0 0 1 -0.683,0.578 3.4,3.4 0 0 1 -0.9,0.369 v 0.028 a 2.489,2.489 0 0 1 0.465,0.332 c 0.132,0.12 0.258,0.244 0.376,0.372 a 4.53,4.53 0 0 1 0.352,0.434 c 0.117,0.162 0.245,0.35 0.387,0.564 z m -5.954,-8.484 v 3.186 h 1.353 a 2,2 0 0 0 0.693,-0.116 1.587,1.587 0 0 0 0.551,-0.335 1.52,1.52 0 0 0 0.363,-0.533 1.843,1.843 0 0 0 0.129,-0.7 A 1.4,1.4 0 0 0 91,27.88 1.856,1.856 0 0 0 89.722,27.48 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path981"
- d="m 102,35.967 h -5.5 v -9.8 h 5.284 v 1.381 h -3.659 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 H 102 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path983"
- d="m 104.794,35.967 v -9.8 h 2.83 q 5.421,0 5.421,4.778 a 4.711,4.711 0 0 1 -1.5,3.648 5.741,5.741 0 0 1 -4.033,1.377 z m 1.62,-8.422 v 7.048 h 1.3 a 3.636,3.636 0 0 0 2.67,-0.944 3.583,3.583 0 0 0 0.953,-2.666 q 0,-3.438 -3.562,-3.438 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path985"
- d="m 120.785,35.967 v -9.8 h 3.115 a 3.665,3.665 0 0 1 2.251,0.622 1.932,1.932 0 0 1 0.832,1.62 2.32,2.32 0 0 1 -0.472,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.275,2.275 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.93,3.93 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.482,-1.131 q 0,-1.259 -1.682,-1.258 z m 0,4.1 v 3.1 h 1.388 a 2.119,2.119 0 0 0 1.4,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path987"
- d="m 136.717,26.164 -3.217,6.241 v 3.562 h -1.627 V 32.44 l -3.131,-6.276 h 1.858 l 1.927,4.2 q 0.034,0.075 0.2,0.568 h 0.021 a 3.839,3.839 0 0 1 0.226,-0.568 l 2.016,-4.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path989"
- d="m 150.752,35.557 a 5.938,5.938 0 0 1 -2.755,0.574 4.5,4.5 0 0 1 -3.418,-1.347 4.909,4.909 0 0 1 -1.285,-3.534 5.15,5.15 0 0 1 1.445,-3.8 4.951,4.951 0 0 1 3.655,-1.45 6,6 0 0 1 2.358,0.4 v 1.614 a 4.208,4.208 0 0 0 -2.187,-0.588 3.442,3.442 0 0 0 -2.582,1.018 3.744,3.744 0 0 0 -0.983,2.724 3.567,3.567 0 0 0 0.923,2.58 3.209,3.209 0 0 0 2.427,0.961 4.348,4.348 0 0 0 2.406,-0.656 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path991"
- d="m 155.329,35.967 h -1.675 v -9.8 h 1.675 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path993"
- d="m 158.793,35.967 v -9.8 h 3.11 a 3.667,3.667 0 0 1 2.252,0.622 1.931,1.931 0 0 1 0.831,1.62 2.32,2.32 0 0 1 -0.471,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.279,2.279 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.932,3.932 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.481,-1.131 q 0,-1.259 -1.681,-1.258 z m 0,4.1 v 3.1 h 1.387 a 2.119,2.119 0 0 0 1.405,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /></g><rect
- id="rect997"
- height="37"
- width="37"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g><rect
- style="fill:#961e29;fill-opacity:1;stroke:none;stroke-width:1.03947806;stroke-opacity:1"
- id="rect880"
- width="773"
- height="60"
- x="0.013000467"
- y="0" /><rect
- style="fill:#961e29;fill-opacity:1;stroke:none;stroke-width:1.03947806;stroke-opacity:1"
- id="rect880-0"
- width="773"
- height="60"
- x="0.013000488"
- y="334" /></svg> \ No newline at end of file
+ clip-path="url(#b)"
+ id="g43"
+ transform="matrix(3.8917487,0,0,3.8834687,68.064995,121.97128)"
+ inkscape:export-filename="intro-highres.png"
+ inkscape:export-xdpi="144.92"
+ inkscape:export-ydpi="144.92"><g
+ id="g41"><g
+ id="g13"><path
+ d="m 47.7,28.92 c -1.48,0.78 -3.33,1.18 -5.54,1.18 -2.86,0 -5.14,-0.92 -6.86,-2.76 -1.72,-1.84 -2.58,-4.25 -2.58,-7.24 0,-3.21 0.97,-5.8 2.9,-7.78 1.93,-1.98 4.38,-2.97 7.35,-2.97 1.9,0 3.48,0.28 4.73,0.83 v 2.51 c -1.44,-0.8 -3.02,-1.2 -4.76,-1.2 -2.3,0 -4.17,0.77 -5.61,2.31 -1.44,1.54 -2.15,3.6 -2.15,6.17 0,2.57 0.67,4.39 2.01,5.84 1.34,1.45 3.1,2.18 5.27,2.18 2.02,0 3.76,-0.45 5.24,-1.34 v 2.28 z"
+ style="fill:#212934"
+ id="path7" /><path
+ d="M 54.86,29.76 H 52.51 V 9.69 h 2.35 z"
+ style="fill:#212934"
+ id="path9" /><path
+ d="M 60.85,29.76 V 9.69 h 5.71 c 1.74,0 3.11,0.42 4.13,1.27 1.02,0.85 1.53,1.96 1.53,3.32 0,1.14 -0.31,2.13 -0.92,2.97 -0.62,0.84 -1.46,1.44 -2.55,1.79 v 0.06 c 1.35,0.16 2.44,0.67 3.25,1.53 0.81,0.86 1.22,1.99 1.22,3.37 0,1.72 -0.62,3.11 -1.85,4.17 -1.23,1.06 -2.79,1.6 -4.66,1.6 H 60.86 Z M 63.2,11.81 v 6.48 h 2.41 c 1.29,0 2.3,-0.31 3.04,-0.93 0.74,-0.62 1.11,-1.5 1.11,-2.62 0,-1.95 -1.28,-2.93 -3.85,-2.93 h -2.7 z m 0,8.6 v 7.22 h 3.19 c 1.38,0 2.45,-0.33 3.21,-0.98 0.76,-0.65 1.14,-1.55 1.14,-2.69 0,-2.37 -1.61,-3.56 -4.84,-3.56 h -2.7 z"
+ style="fill:#212934"
+ id="path11" /></g><g
+ id="g25"><path
+ d="m 21.65,17.96 c -0.31,-0.32 -0.83,-0.32 -1.14,0 L 12.1,26.37 8.57,22.85 6.65,24.77 12.1,30.22 23.01,19.31 21.66,17.95 Z"
+ style="fill:#e11e19"
+ id="path15" /><path
+ d="m 15.74,28.28 -2.33,1.97 h 1.45 c 2.67,0 4.84,-2.17 4.84,-4.84 v -0.44 l -2.22,1.9 c -0.37,0.67 -0.99,1.18 -1.74,1.41 z"
+ style="fill:#e11e19"
+ id="path17" /><polygon
+ points="19.69,8.41 3.08,8.41 3.08,30.26 9.62,30.26 8.07,28.42 4.92,28.42 4.92,10.25 17.86,10.25 17.86,18.13 19.69,16.56 "
+ style="fill:#e11e19"
+ id="polygon19" /><rect
+ x="7.2600002"
+ y="11.82"
+ width="7.8899999"
+ height="2.24"
+ rx="1.05"
+ ry="1.05"
+ style="fill:#e11e19"
+ id="rect21" /><rect
+ x="7.3699999"
+ y="17.120001"
+ width="7.8899999"
+ height="2.1300001"
+ rx="1"
+ ry="1"
+ style="fill:#e11e19"
+ id="rect23" /></g><g
+ id="g39"><path
+ d="m 92.64,30.16 c -2.85,0 -5.13,-0.94 -6.84,-2.81 -1.71,-1.87 -2.57,-4.32 -2.57,-7.32 0,-3.23 0.87,-5.81 2.62,-7.73 1.75,-1.92 4.12,-2.88 7.13,-2.88 2.77,0 5,0.93 6.7,2.8 1.69,1.87 2.54,4.31 2.54,7.32 0,3.28 -0.87,5.87 -2.6,7.77 -1.74,1.9 -4.06,2.86 -6.97,2.86 z m 0.17,-18.62 c -2.11,0 -3.82,0.76 -5.14,2.28 -1.32,1.52 -1.97,3.52 -1.97,5.99 0,2.47 0.64,4.46 1.92,5.97 1.28,1.51 2.96,2.26 5.02,2.26 2.2,0 3.94,-0.72 5.21,-2.16 1.27,-1.44 1.9,-3.45 1.9,-6.03 0,-2.58 -0.62,-4.7 -1.85,-6.15 -1.23,-1.45 -2.93,-2.17 -5.1,-2.17 z"
+ style="fill:#212934"
+ id="path27" /><path
+ d="m 113.65,10.62 c -0.45,-0.25 -0.96,-0.38 -1.53,-0.38 -1.61,0 -2.41,1.01 -2.41,3.04 v 2.21 h 3.36 v 1.96 h -3.36 v 12.38 h -2.28 V 17.45 h -2.45 v -1.96 h 2.45 v -2.32 c 0,-1.5 0.43,-2.69 1.3,-3.56 0.87,-0.87 1.95,-1.31 3.25,-1.31 0.7,0 1.25,0.08 1.67,0.25 z"
+ style="fill:#212934"
+ id="path29" /><path
+ d="m 123.35,10.62 c -0.45,-0.25 -0.96,-0.38 -1.53,-0.38 -1.61,0 -2.41,1.01 -2.41,3.04 v 2.21 h 3.36 v 1.96 h -3.36 v 12.38 h -2.28 V 17.45 h -2.45 v -1.96 h 2.45 v -2.32 c 0,-1.5 0.43,-2.69 1.3,-3.56 0.87,-0.87 1.95,-1.31 3.25,-1.31 0.7,0 1.25,0.08 1.67,0.25 z"
+ style="fill:#212934"
+ id="path31" /><path
+ d="m 127.13,11.85 c -0.41,0 -0.76,-0.14 -1.05,-0.42 -0.29,-0.28 -0.43,-0.63 -0.43,-1.06 0,-0.43 0.14,-0.79 0.43,-1.07 0.29,-0.29 0.64,-0.43 1.05,-0.43 0.41,0 0.78,0.14 1.07,0.43 0.29,0.28 0.44,0.64 0.44,1.07 0,0.43 -0.15,0.76 -0.44,1.05 -0.29,0.29 -0.65,0.43 -1.07,0.43 z m 1.12,17.98 h -2.3 V 15.49 h 2.3 z"
+ style="fill:#212934"
+ id="path33" /><path
+ d="m 143.38,29.17 c -1.1,0.66 -2.41,0.99 -3.92,0.99 -2.04,0 -3.69,-0.67 -4.95,-2 -1.25,-1.33 -1.88,-3.05 -1.88,-5.17 0,-2.36 0.68,-4.26 2.03,-5.69 1.35,-1.43 3.16,-2.15 5.42,-2.15 1.26,0 2.37,0.23 3.33,0.7 v 2.35 c -1.06,-0.75 -2.2,-1.12 -3.42,-1.12 -1.47,0 -2.67,0.53 -3.61,1.58 -0.94,1.05 -1.41,2.43 -1.41,4.14 0,1.71 0.44,3.01 1.32,3.98 0.88,0.97 2.07,1.46 3.55,1.46 1.25,0 2.43,-0.42 3.53,-1.25 v 2.18 z"
+ style="fill:#212934"
+ id="path35" /><path
+ d="m 159.09,23.23 h -10.12 c 0.04,1.6 0.47,2.83 1.29,3.7 0.82,0.87 1.95,1.3 3.39,1.3 1.62,0 3.1,-0.53 4.45,-1.6 v 2.16 c -1.26,0.92 -2.93,1.37 -5,1.37 -2.07,0 -3.62,-0.65 -4.77,-1.95 -1.15,-1.3 -1.74,-3.13 -1.74,-5.5 0,-2.23 0.63,-4.05 1.9,-5.45 1.26,-1.41 2.83,-2.11 4.71,-2.11 1.88,0 3.33,0.61 4.35,1.82 1.03,1.21 1.54,2.9 1.54,5.05 v 1.2 z m -2.35,-1.95 c 0,-1.33 -0.33,-2.36 -0.96,-3.09 -0.63,-0.73 -1.5,-1.11 -2.62,-1.11 -1.12,0 -2,0.39 -2.76,1.16 -0.76,0.78 -1.22,1.79 -1.4,3.04 z"
+ style="fill:#212934"
+ id="path37" /></g></g></g></svg>
diff --git a/brand/cib/intro.png b/brand/cib/intro.png
index 2300158f88cb..508ca511aa1f 100644
--- a/brand/cib/intro.png
+++ b/brand/cib/intro.png
Binary files differ
diff --git a/brand/cib/intro.svg b/brand/cib/intro.svg
index 3bf766aff886..505140a844c7 100644
--- a/brand/cib/intro.svg
+++ b/brand/cib/intro.svg
@@ -2,30 +2,30 @@
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
viewBox="0 0 511 261"
xml:space="preserve"
id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
+ inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="intro.svg"
width="511"
height="261"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\brand\cib\intro.png"
+ inkscape:export-filename="intro.png"
inkscape:export-xdpi="96"
- inkscape:export-ydpi="96"><metadata
+ inkscape:export-ydpi="96"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata
id="metadata3474"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs3472"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4978"><rect
@@ -52,7 +52,14 @@
.cls-2 {
fill: #fff;
}
- </style></defs><sodipodi:namedview
+ </style><clipPath
+ id="b"><rect
+ x="0.13"
+ y="-0.15000001"
+ width="174"
+ height="38"
+ style="fill:none"
+ id="rect2" /></clipPath></defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
@@ -62,21 +69,23 @@
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:window-width="1920"
- inkscape:window-height="1000"
+ inkscape:window-height="1011"
id="namedview3470"
showgrid="false"
inkscape:zoom="2.02"
- inkscape:cx="264.75405"
- inkscape:cy="108.40609"
- inkscape:window-x="-11"
- inkscape:window-y="-11"
+ inkscape:cx="181.93069"
+ inkscape:cy="108.91089"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg3336"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
+ inkscape:showpageshadow="false"
+ inkscape:pagecheckerboard="0"
+ inkscape:deskcolor="#d1d1d1" />
<style
type="text/css"
id="style3338">
@@ -282,152 +291,62 @@
</g>
<g
- data-name="doXigate Arbeitsunterlagen"
- id="doXigate_Arbeitsunterlagen"
- transform="matrix(2.1647413,0,0,2.1647413,76.440227,90.452286)"><g
- id="g995"><path
- id="path949"
- d="M 53.008,20.047 H 43 V 3.242 h 3.785 v 13.735 h 6.223 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path951"
- d="m 56.781,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.8,1.8 0 0 1 -0.6,-1.365 1.733,1.733 0 0 1 0.6,-1.36 2.508,2.508 0 0 1 3.076,0 1.737,1.737 0 0 1 0.592,1.36 1.783,1.783 0 0 1 -0.592,1.382 2.2,2.2 0 0 1 -1.541,0.539 z m 1.828,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path953"
- d="M 65.477,18.652 H 65.43 v 1.395 h -3.7 V 2.281 h 3.7 v 7.571 h 0.047 a 4.392,4.392 0 0 1 3.9,-2.1 4.28,4.28 0 0 1 3.574,1.594 6.87,6.87 0 0 1 1.254,4.359 7.437,7.437 0 0 1 -1.465,4.816 4.771,4.771 0 0 1 -3.914,1.817 3.78,3.78 0 0 1 -3.349,-1.686 z M 65.371,13.59 v 1.23 a 2.81,2.81 0 0 0 0.668,1.922 2.173,2.173 0 0 0 1.711,0.762 2.269,2.269 0 0 0 1.963,-0.979 4.722,4.722 0 0 0 0.7,-2.771 3.763,3.763 0 0 0 -0.638,-2.326 2.156,2.156 0 0 0 -1.823,-0.838 2.352,2.352 0 0 0 -1.845,0.832 3.157,3.157 0 0 0 -0.736,2.168 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path955"
- d="m 84.438,11.387 a 3.217,3.217 0 0 0 -1.559,-0.364 2.245,2.245 0 0 0 -1.887,0.885 3.861,3.861 0 0 0 -0.679,2.408 v 5.731 h -3.7 v -12 h 3.7 v 2.226 h 0.046 a 3.2,3.2 0 0 1 3.164,-2.437 2.384,2.384 0 0 1 0.915,0.141 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path957"
- d="M 96.848,15.1 H 89.02 q 0.188,2.613 3.293,2.613 a 6.428,6.428 0 0 0 3.48,-0.938 v 2.672 a 9.139,9.139 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.6,-4.495 6.422,6.422 0 0 1 1.729,-4.732 5.778,5.778 0 0 1 4.266,-1.746 5.24,5.24 0 0 1 4.06,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 A 1.992,1.992 0 0 0 89.787,10.986 3.361,3.361 0 0 0 89,12.828 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path959"
- d="m 106.516,20.34 a 7.819,7.819 0 0 1 -5.883,-2.35 8.433,8.433 0 0 1 -2.274,-6.123 9.04,9.04 0 0 1 2.309,-6.445 7.991,7.991 0 0 1 6.117,-2.461 7.63,7.63 0 0 1 5.815,2.355 8.688,8.688 0 0 1 2.22,6.211 8.894,8.894 0 0 1 -2.3,6.387 7.907,7.907 0 0 1 -6.004,2.426 z M 106.68,6.219 a 3.81,3.81 0 0 0 -3.164,1.494 6.224,6.224 0 0 0 -1.172,3.955 6.111,6.111 0 0 0 1.172,3.949 4.044,4.044 0 0 0 6.175,0.041 6.045,6.045 0 0 0 1.149,-3.92 6.555,6.555 0 0 0 -1.113,-4.066 3.63,3.63 0 0 0 -3.047,-1.453 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path961"
- d="m 125.078,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.78,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.692 v -9.27 h -2.015 v -2.73 h 2.015 V 6.559 a 4.322,4.322 0 0 1 1.336,-3.3 5.1,5.1 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path963"
- d="m 134.277,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.781,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.691 v -9.27 h -2.016 v -2.73 h 2.016 V 6.559 a 4.319,4.319 0 0 1 1.336,-3.3 5.092,5.092 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path965"
- d="m 137.523,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.794,1.794 0 0 1 -0.6,-1.365 1.732,1.732 0 0 1 0.6,-1.36 2.509,2.509 0 0 1 3.077,0 1.74,1.74 0 0 1 0.591,1.36 1.786,1.786 0 0 1 -0.591,1.382 2.2,2.2 0 0 1 -1.542,0.539 z m 1.829,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path967"
- d="m 151.563,19.613 a 7.316,7.316 0 0 1 -3.622,0.727 6.124,6.124 0 0 1 -4.476,-1.676 5.785,5.785 0 0 1 -1.711,-4.324 6.373,6.373 0 0 1 1.834,-4.822 6.775,6.775 0 0 1 4.9,-1.764 6.3,6.3 0 0 1 3.071,0.562 v 3.141 a 4.224,4.224 0 0 0 -2.59,-0.867 3.41,3.41 0 0 0 -2.526,0.932 3.475,3.475 0 0 0 -0.931,2.572 3.424,3.424 0 0 0 0.89,2.5 3.275,3.275 0 0 0 2.449,0.908 4.891,4.891 0 0 0 2.708,-0.867 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path969"
- d="m 164.77,15.1 h -7.829 q 0.188,2.613 3.293,2.613 a 6.429,6.429 0 0 0 3.481,-0.938 v 2.672 a 9.142,9.142 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.606,-4.495 6.422,6.422 0 0 1 1.735,-4.732 5.777,5.777 0 0 1 4.265,-1.746 5.242,5.242 0 0 1 4.061,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 a 1.992,1.992 0 0 0 -1.541,0.738 3.354,3.354 0 0 0 -0.791,1.84 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path971"
- d="m 44.62,32.412 v 3.555 H 43 v -9.8 h 2.974 a 3.938,3.938 0 0 1 2.618,0.786 2.743,2.743 0 0 1 0.93,2.215 3.061,3.061 0 0 1 -0.971,2.338 3.689,3.689 0 0 1 -2.625,0.909 z m 0,-4.908 v 3.582 h 1.053 a 2.333,2.333 0 0 0 1.593,-0.485 1.737,1.737 0 0 0 0.547,-1.368 q 0,-1.73 -2.01,-1.729 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path973"
- d="M 56.272,36.131 A 4.41,4.41 0 0 1 52.878,34.757 5.046,5.046 0 0 1 51.6,31.182 5.348,5.348 0 0 1 52.9,27.408 4.568,4.568 0 0 1 56.43,26 a 4.31,4.31 0 0 1 3.325,1.367 5.06,5.06 0 0 1 1.262,3.575 5.364,5.364 0 0 1 -1.292,3.794 4.481,4.481 0 0 1 -3.453,1.395 z m 0.076,-8.7 a 2.727,2.727 0 0 0 -2.191,1.005 3.973,3.973 0 0 0 -0.844,2.645 4.013,4.013 0 0 0 0.82,2.632 2.647,2.647 0 0 0 2.146,1 2.77,2.77 0 0 0 2.222,-0.95 3.967,3.967 0 0 0 0.814,-2.659 4.146,4.146 0 0 0 -0.791,-2.714 2.667,2.667 0 0 0 -2.176,-0.961 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path975"
- d="m 76.025,26.164 -2.686,9.8 H 71.5 L 69.634,29.11 A 4.77,4.77 0 0 1 69.49,28.153 h -0.027 a 4.639,4.639 0 0 1 -0.164,0.944 l -1.873,6.87 h -1.88 l -2.741,-9.8 h 1.784 l 1.777,7.178 a 5.2,5.2 0 0 1 0.137,0.943 h 0.034 a 5.373,5.373 0 0 1 0.192,-0.943 l 2.009,-7.178 h 1.675 l 1.859,7.233 a 5.635,5.635 0 0 1 0.144,0.875 h 0.027 a 5.445,5.445 0 0 1 0.158,-0.9 l 1.743,-7.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path977"
- d="m 83.94,35.967 h -5.5 v -9.8 h 5.285 v 1.381 h -3.661 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 h 3.876 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path979"
- d="m 94.307,35.967 h -1.9 l -1.565,-2.625 a 5.813,5.813 0 0 0 -0.414,-0.619 2.488,2.488 0 0 0 -0.41,-0.42 1.349,1.349 0 0 0 -0.454,-0.239 1.9,1.9 0 0 0 -0.554,-0.076 h -0.656 v 3.979 h -1.622 v -9.8 h 3.227 a 4.678,4.678 0 0 1 1.271,0.164 2.962,2.962 0 0 1 1.012,0.5 2.3,2.3 0 0 1 0.673,0.826 2.608,2.608 0 0 1 0.243,1.16 2.883,2.883 0 0 1 -0.153,0.954 2.492,2.492 0 0 1 -0.438,0.771 2.661,2.661 0 0 1 -0.683,0.578 3.4,3.4 0 0 1 -0.9,0.369 v 0.028 a 2.489,2.489 0 0 1 0.465,0.332 c 0.132,0.12 0.258,0.244 0.376,0.372 a 4.53,4.53 0 0 1 0.352,0.434 c 0.117,0.162 0.245,0.35 0.387,0.564 z m -5.954,-8.484 v 3.186 h 1.353 a 2,2 0 0 0 0.693,-0.116 1.587,1.587 0 0 0 0.551,-0.335 1.52,1.52 0 0 0 0.363,-0.533 1.843,1.843 0 0 0 0.129,-0.7 A 1.4,1.4 0 0 0 91,27.88 1.856,1.856 0 0 0 89.722,27.48 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path981"
- d="m 102,35.967 h -5.5 v -9.8 h 5.284 v 1.381 h -3.659 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 H 102 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path983"
- d="m 104.794,35.967 v -9.8 h 2.83 q 5.421,0 5.421,4.778 a 4.711,4.711 0 0 1 -1.5,3.648 5.741,5.741 0 0 1 -4.033,1.377 z m 1.62,-8.422 v 7.048 h 1.3 a 3.636,3.636 0 0 0 2.67,-0.944 3.583,3.583 0 0 0 0.953,-2.666 q 0,-3.438 -3.562,-3.438 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path985"
- d="m 120.785,35.967 v -9.8 h 3.115 a 3.665,3.665 0 0 1 2.251,0.622 1.932,1.932 0 0 1 0.832,1.62 2.32,2.32 0 0 1 -0.472,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.275,2.275 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.93,3.93 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.482,-1.131 q 0,-1.259 -1.682,-1.258 z m 0,4.1 v 3.1 h 1.388 a 2.119,2.119 0 0 0 1.4,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path987"
- d="m 136.717,26.164 -3.217,6.241 v 3.562 h -1.627 V 32.44 l -3.131,-6.276 h 1.858 l 1.927,4.2 q 0.034,0.075 0.2,0.568 h 0.021 a 3.839,3.839 0 0 1 0.226,-0.568 l 2.016,-4.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path989"
- d="m 150.752,35.557 a 5.938,5.938 0 0 1 -2.755,0.574 4.5,4.5 0 0 1 -3.418,-1.347 4.909,4.909 0 0 1 -1.285,-3.534 5.15,5.15 0 0 1 1.445,-3.8 4.951,4.951 0 0 1 3.655,-1.45 6,6 0 0 1 2.358,0.4 v 1.614 a 4.208,4.208 0 0 0 -2.187,-0.588 3.442,3.442 0 0 0 -2.582,1.018 3.744,3.744 0 0 0 -0.983,2.724 3.567,3.567 0 0 0 0.923,2.58 3.209,3.209 0 0 0 2.427,0.961 4.348,4.348 0 0 0 2.406,-0.656 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path991"
- d="m 155.329,35.967 h -1.675 v -9.8 h 1.675 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path993"
- d="m 158.793,35.967 v -9.8 h 3.11 a 3.667,3.667 0 0 1 2.252,0.622 1.931,1.931 0 0 1 0.831,1.62 2.32,2.32 0 0 1 -0.471,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.279,2.279 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.932,3.932 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.481,-1.131 q 0,-1.259 -1.681,-1.258 z m 0,4.1 v 3.1 h 1.387 a 2.119,2.119 0 0 0 1.405,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /></g><rect
- id="rect997"
- height="37"
- width="37"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g><rect
- style="fill:#961e29;fill-opacity:1;stroke:none;stroke-width:0.73190653;stroke-opacity:1"
- id="rect880"
- width="510.974"
- height="45"
- x="0.013000467"
- y="0" /><rect
- style="fill:#961e29;fill-opacity:1;stroke:none;stroke-width:0.73190647;stroke-opacity:1"
- id="rect880-0"
- width="510.974"
- height="45"
- x="0.013000488"
- y="216" /></svg> \ No newline at end of file
+ clip-path="url(#b)"
+ id="g43"
+ transform="matrix(2.5725516,0,0,2.5725516,42.906241,80.798237)"><g
+ id="g41"><g
+ id="g13"><path
+ d="m 47.7,28.92 c -1.48,0.78 -3.33,1.18 -5.54,1.18 -2.86,0 -5.14,-0.92 -6.86,-2.76 -1.72,-1.84 -2.58,-4.25 -2.58,-7.24 0,-3.21 0.97,-5.8 2.9,-7.78 1.93,-1.98 4.38,-2.97 7.35,-2.97 1.9,0 3.48,0.28 4.73,0.83 v 2.51 c -1.44,-0.8 -3.02,-1.2 -4.76,-1.2 -2.3,0 -4.17,0.77 -5.61,2.31 -1.44,1.54 -2.15,3.6 -2.15,6.17 0,2.57 0.67,4.39 2.01,5.84 1.34,1.45 3.1,2.18 5.27,2.18 2.02,0 3.76,-0.45 5.24,-1.34 v 2.28 z"
+ style="fill:#212934"
+ id="path7" /><path
+ d="M 54.86,29.76 H 52.51 V 9.69 h 2.35 z"
+ style="fill:#212934"
+ id="path9" /><path
+ d="M 60.85,29.76 V 9.69 h 5.71 c 1.74,0 3.11,0.42 4.13,1.27 1.02,0.85 1.53,1.96 1.53,3.32 0,1.14 -0.31,2.13 -0.92,2.97 -0.62,0.84 -1.46,1.44 -2.55,1.79 v 0.06 c 1.35,0.16 2.44,0.67 3.25,1.53 0.81,0.86 1.22,1.99 1.22,3.37 0,1.72 -0.62,3.11 -1.85,4.17 -1.23,1.06 -2.79,1.6 -4.66,1.6 H 60.86 Z M 63.2,11.81 v 6.48 h 2.41 c 1.29,0 2.3,-0.31 3.04,-0.93 0.74,-0.62 1.11,-1.5 1.11,-2.62 0,-1.95 -1.28,-2.93 -3.85,-2.93 h -2.7 z m 0,8.6 v 7.22 h 3.19 c 1.38,0 2.45,-0.33 3.21,-0.98 0.76,-0.65 1.14,-1.55 1.14,-2.69 0,-2.37 -1.61,-3.56 -4.84,-3.56 h -2.7 z"
+ style="fill:#212934"
+ id="path11" /></g><g
+ id="g25"><path
+ d="m 21.65,17.96 c -0.31,-0.32 -0.83,-0.32 -1.14,0 L 12.1,26.37 8.57,22.85 6.65,24.77 12.1,30.22 23.01,19.31 21.66,17.95 Z"
+ style="fill:#e11e19"
+ id="path15" /><path
+ d="m 15.74,28.28 -2.33,1.97 h 1.45 c 2.67,0 4.84,-2.17 4.84,-4.84 v -0.44 l -2.22,1.9 c -0.37,0.67 -0.99,1.18 -1.74,1.41 z"
+ style="fill:#e11e19"
+ id="path17" /><polygon
+ points="9.62,30.26 8.07,28.42 4.92,28.42 4.92,10.25 17.86,10.25 17.86,18.13 19.69,16.56 19.69,8.41 3.08,8.41 3.08,30.26 "
+ style="fill:#e11e19"
+ id="polygon19" /><rect
+ x="7.2600002"
+ y="11.82"
+ width="7.8899999"
+ height="2.24"
+ rx="1.05"
+ ry="1.05"
+ style="fill:#e11e19"
+ id="rect21" /><rect
+ x="7.3699999"
+ y="17.120001"
+ width="7.8899999"
+ height="2.1300001"
+ rx="1"
+ ry="1"
+ style="fill:#e11e19"
+ id="rect23" /></g><g
+ id="g39"><path
+ d="m 92.64,30.16 c -2.85,0 -5.13,-0.94 -6.84,-2.81 -1.71,-1.87 -2.57,-4.32 -2.57,-7.32 0,-3.23 0.87,-5.81 2.62,-7.73 1.75,-1.92 4.12,-2.88 7.13,-2.88 2.77,0 5,0.93 6.7,2.8 1.69,1.87 2.54,4.31 2.54,7.32 0,3.28 -0.87,5.87 -2.6,7.77 -1.74,1.9 -4.06,2.86 -6.97,2.86 z m 0.17,-18.62 c -2.11,0 -3.82,0.76 -5.14,2.28 -1.32,1.52 -1.97,3.52 -1.97,5.99 0,2.47 0.64,4.46 1.92,5.97 1.28,1.51 2.96,2.26 5.02,2.26 2.2,0 3.94,-0.72 5.21,-2.16 1.27,-1.44 1.9,-3.45 1.9,-6.03 0,-2.58 -0.62,-4.7 -1.85,-6.15 -1.23,-1.45 -2.93,-2.17 -5.1,-2.17 z"
+ style="fill:#212934"
+ id="path27" /><path
+ d="m 113.65,10.62 c -0.45,-0.25 -0.96,-0.38 -1.53,-0.38 -1.61,0 -2.41,1.01 -2.41,3.04 v 2.21 h 3.36 v 1.96 h -3.36 v 12.38 h -2.28 V 17.45 h -2.45 v -1.96 h 2.45 v -2.32 c 0,-1.5 0.43,-2.69 1.3,-3.56 0.87,-0.87 1.95,-1.31 3.25,-1.31 0.7,0 1.25,0.08 1.67,0.25 z"
+ style="fill:#212934"
+ id="path29" /><path
+ d="m 123.35,10.62 c -0.45,-0.25 -0.96,-0.38 -1.53,-0.38 -1.61,0 -2.41,1.01 -2.41,3.04 v 2.21 h 3.36 v 1.96 h -3.36 v 12.38 h -2.28 V 17.45 h -2.45 v -1.96 h 2.45 v -2.32 c 0,-1.5 0.43,-2.69 1.3,-3.56 0.87,-0.87 1.95,-1.31 3.25,-1.31 0.7,0 1.25,0.08 1.67,0.25 z"
+ style="fill:#212934"
+ id="path31" /><path
+ d="m 127.13,11.85 c -0.41,0 -0.76,-0.14 -1.05,-0.42 -0.29,-0.28 -0.43,-0.63 -0.43,-1.06 0,-0.43 0.14,-0.79 0.43,-1.07 0.29,-0.29 0.64,-0.43 1.05,-0.43 0.41,0 0.78,0.14 1.07,0.43 0.29,0.28 0.44,0.64 0.44,1.07 0,0.43 -0.15,0.76 -0.44,1.05 -0.29,0.29 -0.65,0.43 -1.07,0.43 z m 1.12,17.98 h -2.3 V 15.49 h 2.3 z"
+ style="fill:#212934"
+ id="path33" /><path
+ d="m 143.38,29.17 c -1.1,0.66 -2.41,0.99 -3.92,0.99 -2.04,0 -3.69,-0.67 -4.95,-2 -1.25,-1.33 -1.88,-3.05 -1.88,-5.17 0,-2.36 0.68,-4.26 2.03,-5.69 1.35,-1.43 3.16,-2.15 5.42,-2.15 1.26,0 2.37,0.23 3.33,0.7 v 2.35 c -1.06,-0.75 -2.2,-1.12 -3.42,-1.12 -1.47,0 -2.67,0.53 -3.61,1.58 -0.94,1.05 -1.41,2.43 -1.41,4.14 0,1.71 0.44,3.01 1.32,3.98 0.88,0.97 2.07,1.46 3.55,1.46 1.25,0 2.43,-0.42 3.53,-1.25 v 2.18 z"
+ style="fill:#212934"
+ id="path35" /><path
+ d="m 159.09,23.23 h -10.12 c 0.04,1.6 0.47,2.83 1.29,3.7 0.82,0.87 1.95,1.3 3.39,1.3 1.62,0 3.1,-0.53 4.45,-1.6 v 2.16 c -1.26,0.92 -2.93,1.37 -5,1.37 -2.07,0 -3.62,-0.65 -4.77,-1.95 -1.15,-1.3 -1.74,-3.13 -1.74,-5.5 0,-2.23 0.63,-4.05 1.9,-5.45 1.26,-1.41 2.83,-2.11 4.71,-2.11 1.88,0 3.33,0.61 4.35,1.82 1.03,1.21 1.54,2.9 1.54,5.05 v 1.2 z m -2.35,-1.95 c 0,-1.33 -0.33,-2.36 -0.96,-3.09 -0.63,-0.73 -1.5,-1.11 -2.62,-1.11 -1.12,0 -2,0.39 -2.76,1.16 -0.76,0.78 -1.22,1.79 -1.4,3.04 z"
+ style="fill:#212934"
+ id="path37" /></g></g></g></svg>
diff --git a/brand/cib/logo.png b/brand/cib/logo.png
index ace737a89fd9..4ae4a19b1ccb 100644
--- a/brand/cib/logo.png
+++ b/brand/cib/logo.png
Binary files differ
diff --git a/brand/cib/logo.svg b/brand/cib/logo.svg
index 4e0efdbc9249..7cfdad3fd177 100644
--- a/brand/cib/logo.svg
+++ b/brand/cib/logo.svg
@@ -1,104 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="300"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 7937.5004 7937.5005"
- width="300"
- version="1.1"
- id="svg1868"
- sodipodi:docname="logo.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\icon-themes\cib\sfx2\res\logo.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872">
- <style
- id="style838">
- .cls-1 {
- fill: #961e29;
- }
-
- .cls-2 {
- fill: #fff;
- }
- </style>
- </defs>
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1031"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="1.6857142"
- inkscape:cx="59.607026"
- inkscape:cy="150.4356"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,562.35777)">
- <g
- id="g6082">
- <g
- data-name="Ebene 4"
- id="Ebene_4-3"
- transform="matrix(1.0090412,0,0,1.0090412,1.832226,-3.0012875)">
- <rect
- id="rect844"
- height="74"
- width="74"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" />
- <g
- id="g848">
- <path
- d="m 47.181,9 a 1.4,1.4 0 0 0 -1.288,0.817 1.365,1.365 0 0 0 0.3,1.481 L 57.82,22.964 a 1.407,1.407 0 0 0 1.48,0.3 1.376,1.376 0 0 0 0.85,-1.234 V 10.345 A 1.4,1.4 0 0 0 58.787,9 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- d="M 15.207,9 A 1.377,1.377 0 0 0 13.85,10.38 V 63.621 A 1.377,1.377 0 0 0 15.207,65 L 45.791,64.984 C 50.291,65 60.15,55.319 60.15,50.428 c 0,-8.285 0,-21.092 0,-21.092 a 1.382,1.382 0 0 0 -0.4,-0.98 L 40.9,9.423 A 1.374,1.374 0 0 0 39.926,9 Z m 1.38,2.759 h 22.76 l 18.044,18.133 c 0,0 -0.011,18.437 -0.011,19.619 0,3.668 -8.458,12.73 -12.9,12.73 H 16.587 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- </g>
- </g>
- </g>
-</svg>
+<?xml version="1.0" encoding="UTF-8"?><svg id="Logos_Material" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs><style>.cls-1{fill:#e11e19;}.cls-2{clip-path:url(#clippath);}.cls-3{fill:none;}</style><clipPath id="clippath"><rect class="cls-3" x="206.65" y="209.85" width="174" height="38"/></clipPath></defs><g class="cls-2"><g><path class="cls-1" d="M27.39,14.82c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.68,26.54l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="8.4 26.69 8.4 6.07 23.08 6.07 23.08 15.02 25.17 13.23 25.17 3.98 6.32 3.98 6.32 28.77 13.74 28.77 11.98 26.69 8.4 26.69"/><rect class="cls-1" x="11.05" y="7.86" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="11.19" y="13.87" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></g><g><path class="cls-1" d="M26.82,14.24c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.11,25.96l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="7.83 26.11 7.83 5.49 22.51 5.49 22.51 14.44 24.6 12.65 24.6 3.4 5.75 3.4 5.75 28.2 13.17 28.2 11.41 26.11 7.83 26.11"/><rect class="cls-1" x="10.48" y="7.28" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="10.62" y="13.29" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></svg> \ No newline at end of file
diff --git a/canvas/source/directx/dx_bitmapcanvashelper.cxx b/canvas/source/directx/dx_bitmapcanvashelper.cxx
index b6d08fbbf8df..9733853f5958 100644
--- a/canvas/source/directx/dx_bitmapcanvashelper.cxx
+++ b/canvas/source/directx/dx_bitmapcanvashelper.cxx
@@ -60,7 +60,7 @@ namespace dxcanvas
{
ENSURE_OR_THROW( rTarget,
"BitmapCanvasHelper::setTarget(): Invalid target" );
- ENSURE_OR_THROW( !mpTarget.get(),
+ ENSURE_OR_THROW( !mpTarget,
"BitmapCanvasHelper::setTarget(): target set, old target would be overwritten" );
mpTarget = rTarget;
@@ -72,7 +72,7 @@ namespace dxcanvas
{
ENSURE_OR_THROW( rTarget,
"BitmapCanvasHelper::setTarget(): invalid target" );
- ENSURE_OR_THROW( !mpTarget.get(),
+ ENSURE_OR_THROW( !mpTarget,
"BitmapCanvasHelper::setTarget(): target set, old target would be overwritten" );
mpTarget = rTarget;
diff --git a/canvas/source/directx/dx_canvascustomsprite.cxx b/canvas/source/directx/dx_canvascustomsprite.cxx
index ad18d765ae2b..883ebe431739 100644
--- a/canvas/source/directx/dx_canvascustomsprite.cxx
+++ b/canvas/source/directx/dx_canvascustomsprite.cxx
@@ -43,7 +43,7 @@ namespace dxcanvas
mpSpriteCanvas( rRefDevice ),
mpSurface()
{
- ENSURE_OR_THROW( rRefDevice.get(),
+ ENSURE_OR_THROW( rRefDevice,
"CanvasCustomSprite::CanvasCustomSprite(): Invalid sprite canvas" );
mpSurface.reset(
diff --git a/canvas/source/directx/dx_canvashelper.cxx b/canvas/source/directx/dx_canvashelper.cxx
index 927f838244ab..de4969c6dd48 100644
--- a/canvas/source/directx/dx_canvashelper.cxx
+++ b/canvas/source/directx/dx_canvashelper.cxx
@@ -124,7 +124,7 @@ namespace dxcanvas
{
ENSURE_OR_THROW( rTarget,
"CanvasHelper::setTarget(): Invalid target" );
- ENSURE_OR_THROW( !mpGraphicsProvider.get(),
+ ENSURE_OR_THROW( !mpGraphicsProvider,
"CanvasHelper::setTarget(): target set, old target would be overwritten" );
mpGraphicsProvider = rTarget;
@@ -135,7 +135,7 @@ namespace dxcanvas
{
ENSURE_OR_THROW( rTarget,
"CanvasHelper::setTarget(): invalid target" );
- ENSURE_OR_THROW( !mpGraphicsProvider.get(),
+ ENSURE_OR_THROW( !mpGraphicsProvider,
"CanvasHelper::setTarget(): target set, old target would be overwritten" );
mpGraphicsProvider = rTarget;
diff --git a/canvas/source/directx/dx_canvashelper.hxx b/canvas/source/directx/dx_canvashelper.hxx
index 483033fd7c49..12c939e2e9ac 100644
--- a/canvas/source/directx/dx_canvashelper.hxx
+++ b/canvas/source/directx/dx_canvashelper.hxx
@@ -236,7 +236,7 @@ namespace dxcanvas
/// Provides the Gdiplus::Graphics to render into
GraphicsProviderSharedPtr mpGraphicsProvider;
- bool needOutput() const { return mpGraphicsProvider.get() != nullptr; };
+ bool needOutput() const { return bool(mpGraphicsProvider); };
// returns transparency of color
void setupGraphicsState( GraphicsSharedPtr const & rGraphics,
diff --git a/canvas/source/directx/dx_spritehelper.cxx b/canvas/source/directx/dx_spritehelper.cxx
index af4f340a5437..8f436283387c 100644
--- a/canvas/source/directx/dx_spritehelper.cxx
+++ b/canvas/source/directx/dx_spritehelper.cxx
@@ -55,7 +55,7 @@ namespace dxcanvas
const DXSurfaceBitmapSharedPtr& rBitmap,
bool bShowSpriteBounds )
{
- ENSURE_OR_THROW( rSpriteCanvas.get() &&
+ ENSURE_OR_THROW( rSpriteCanvas &&
rRenderModule &&
rBitmap,
"SpriteHelper::init(): Invalid device, sprite canvas or surface" );
@@ -87,7 +87,7 @@ namespace dxcanvas
bool SpriteHelper::needRedraw() const
{
if( !mpBitmap ||
- !mpSpriteCanvas.get() )
+ !mpSpriteCanvas )
{
return false; // we're disposed, no redraw necessary
}
@@ -104,7 +104,7 @@ namespace dxcanvas
void SpriteHelper::redraw( bool& io_bSurfaceDirty ) const
{
if( !mpBitmap ||
- !mpSpriteCanvas.get() )
+ !mpSpriteCanvas )
{
return; // we're disposed
}
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index eec8280425b4..24d0c85b809b 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -1222,6 +1222,13 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXMLRange )
{
+ // Handle non-standards-conforming table:cell-range-address="PivotChart", see
+ // <https://bugs.documentfoundation.org/show_bug.cgi?id=112783> "PIVOT CHARTS: Save produces
+ // invalid file because of invalid cell address":
+ if (aXMLRange == "PivotChart") {
+ return "";
+ }
+
const OUString aPivotTableID("PT@");
if (aXMLRange.startsWith(aPivotTableID))
return aXMLRange.copy(aPivotTableID.getLength());
diff --git a/chart2/source/view/inc/PlottingPositionHelper.hxx b/chart2/source/view/inc/PlottingPositionHelper.hxx
index 74fc37cdea80..3343196e7e45 100644
--- a/chart2/source/view/inc/PlottingPositionHelper.hxx
+++ b/chart2/source/view/inc/PlottingPositionHelper.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_CHART2_SOURCE_VIEW_INC_PLOTTINGPOSITIONHELPER_HXX
#define INCLUDED_CHART2_SOURCE_VIEW_INC_PLOTTINGPOSITIONHELPER_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <chartview/ExplicitScaleValues.hxx>
#include <basegfx/range/b2drectangle.hxx>
diff --git a/chart2/uiconfig/menubar/menubar.xml b/chart2/uiconfig/menubar/menubar.xml
index dca2eaff7efe..a0e848f5cd92 100644
--- a/chart2/uiconfig/menubar/menubar.xml
+++ b/chart2/uiconfig/menubar/menubar.xml
@@ -162,7 +162,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index dfc408690027..946737994ab7 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -268,7 +268,9 @@ std::vector<unsigned char> DocPasswordHelper::GetOoxHashAsVector(
eType = comphelper::HashType::SHA512;
else if (rAlgorithmName == "SHA-256" || rAlgorithmName == "SHA256")
eType = comphelper::HashType::SHA256;
- else if (rAlgorithmName == "SHA-1" || rAlgorithmName == "SHA1") // "SHA1" might be in the wild
+ else if (rAlgorithmName == u"SHA-384" || rAlgorithmName == u"SHA384")
+ eType = comphelper::HashType::SHA384;
+ else if (rAlgorithmName == u"SHA-1" || rAlgorithmName == u"SHA1") // "SHA1" might be in the wild
eType = comphelper::HashType::SHA1;
else if (rAlgorithmName == "MD5")
eType = comphelper::HashType::MD5;
diff --git a/comphelper/source/misc/hash.cxx b/comphelper/source/misc/hash.cxx
index 3db0b3e56616..ca5467904c22 100644
--- a/comphelper/source/misc/hash.cxx
+++ b/comphelper/source/misc/hash.cxx
@@ -39,6 +39,8 @@ struct HashImpl
return HASH_AlgSHA1;
case HashType::SHA256:
return HASH_AlgSHA256;
+ case HashType::SHA384:
+ return HASH_AlgSHA384;
case HashType::SHA512:
return HASH_AlgSHA512;
}
@@ -58,6 +60,8 @@ struct HashImpl
return EVP_sha1();
case HashType::SHA256:
return EVP_sha256();
+ case HashType::SHA384:
+ return EVP_sha384();
case HashType::SHA512:
return EVP_sha512();
}
@@ -138,6 +142,8 @@ size_t Hash::getLength() const
return 20;
case HashType::SHA256:
return 32;
+ case HashType::SHA384:
+ return 48;
case HashType::SHA512:
return 64;
}
diff --git a/comphelper/source/streaming/seqoutputstreamserv.cxx b/comphelper/source/streaming/seqoutputstreamserv.cxx
index cadc691c8f03..5c7de4d87080 100644
--- a/comphelper/source/streaming/seqoutputstreamserv.cxx
+++ b/comphelper/source/streaming/seqoutputstreamserv.cxx
@@ -62,8 +62,9 @@ private:
::osl::Mutex m_aMutex;
- uno::Reference< io::XOutputStream > m_xOutputStream;
+ // WARNING: dtor of m_xOutputStream writes into m_aSequence so that must live longer!
uno::Sequence< ::sal_Int8 > m_aSequence;
+ uno::Reference< io::XOutputStream > m_xOutputStream;
};
SequenceOutputStreamService::SequenceOutputStreamService()
{
@@ -112,6 +113,7 @@ void SAL_CALL SequenceOutputStreamService::closeOutput()
if ( !m_xOutputStream.is() )
throw io::NotConnectedException();
+ m_xOutputStream->flush();
m_xOutputStream->closeOutput();
m_xOutputStream.clear();
}
@@ -120,10 +122,13 @@ void SAL_CALL SequenceOutputStreamService::closeOutput()
uno::Sequence< ::sal_Int8 > SAL_CALL SequenceOutputStreamService::getWrittenBytes()
{
::osl::MutexGuard aGuard( m_aMutex );
- if ( !m_xOutputStream.is() )
- throw io::NotConnectedException();
- m_xOutputStream->flush();
+ if (m_xOutputStream.is())
+ {
+ m_xOutputStream->flush();
+ }
+ // else: no exception, just return the finished sequence
+
return m_aSequence;
}
diff --git a/compilerplugins/clang/stringconcatliterals.cxx b/compilerplugins/clang/stringconcatliterals.cxx
index 0f26f4f553bc..0b52bd0c9b4f 100644
--- a/compilerplugins/clang/stringconcatliterals.cxx
+++ b/compilerplugins/clang/stringconcatliterals.cxx
@@ -109,7 +109,8 @@ bool StringConcatLiterals::VisitCallExpr(CallExpr const * expr) {
compiler.getSourceManager().getSpellingLoc(
compiler.getSourceManager().getImmediateMacroCallerLoc(
compiler.getSourceManager().getImmediateMacroCallerLoc(
- compat::getBeginLoc(expr))))),
+ compiler.getSourceManager().getImmediateMacroCallerLoc(
+ compat::getBeginLoc(expr)))))),
SRCDIR "/include/tools/diagnose_ex.h"))
return true;
diff --git a/compilerplugins/clang/test/unusedfields.cxx b/compilerplugins/clang/test/unusedfields.cxx
index 2ec4ab815414..205e1a605203 100644
--- a/compilerplugins/clang/test/unusedfields.cxx
+++ b/compilerplugins/clang/test/unusedfields.cxx
@@ -11,6 +11,7 @@
// expected-no-diagnostics
#else
+#include <memory>
#include <vector>
#include <ostream>
#include <com/sun/star/uno/Any.hxx>
diff --git a/config_host.mk.in b/config_host.mk.in
index 1b5fa47f3b75..4ebff11ed165 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -72,8 +72,6 @@ export CLUCENE_LIBS=$(gb_SPACE)@CLUCENE_LIBS@
export LIBCMIS_CFLAGS=$(gb_SPACE)@LIBCMIS_CFLAGS@
export LIBCMIS_LIBS=$(gb_SPACE)@LIBCMIS_LIBS@
export COM=@COM@
-export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@
-export COMMONS_LOGGING_VERSION=@COMMONS_LOGGING_VERSION@
export COMPATH=@COMPATH@
export COMPILER_PLUGINS=@COMPILER_PLUGINS@
export COMPILER_PLUGINS_CXX=@COMPILER_PLUGINS_CXX@
@@ -506,7 +504,6 @@ export STRIP=@STRIP@
export STRIP_COMPONENTS=@STRIP_COMPONENTS@
export SYSBASE=@SYSBASE@
export SYSTEM_ABW=@SYSTEM_ABW@
-export SYSTEM_APACHE_COMMONS=@SYSTEM_APACHE_COMMONS@
export SYSTEM_APR=@SYSTEM_APR@
export SYSTEM_BLUEZ=@SYSTEM_BLUEZ@
export SYSTEM_BOOST=@SYSTEM_BOOST@
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 5b04594c12f5..4a4998e77aa5 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -12,6 +12,7 @@ Any change in this header will cause a rebuild of almost everything.
#ifndef CONFIG_GLOBAL_H
#define CONFIG_GLOBAL_H
+#define HAVE_CXX14_CONSTEXPR 0
#define HAVE_GCC_BUILTIN_ATOMIC 0
#define HAVE_GCC_BUILTIN_FFS 0
/* _Pragma */
diff --git a/configmgr/source/data.hxx b/configmgr/source/data.hxx
index 315fe7b9bf47..3e4bbd73ff36 100644
--- a/configmgr/source/data.hxx
+++ b/configmgr/source/data.hxx
@@ -69,7 +69,7 @@ struct Data {
rtl::Reference< Node > resolvePathRepresentation(
OUString const & pathRepresentation,
- OUString * canonicRepresenation, std::vector<OUString> * path, int * finalizedLayer)
+ OUString * canonicRepresentation, std::vector<OUString> * path, int * finalizedLayer)
const;
rtl::Reference< Node > getTemplate(
diff --git a/configure.ac b/configure.ac
index 000ed8c340c7..4b7de8d43669 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 powered by CIB],[6.4.0.0.0+],[],[],[http://libreoffice.cib.eu/])
+AC_INIT([CIB Office],[6.4.0.24],[],[],[https://www.cib.de/office/])
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
@@ -1742,11 +1742,6 @@ AC_ARG_WITH(system-gpgmepp,
[Use gpgmepp already on system]),,
[with_system_gpgmepp="$with_system_libs"])
-AC_ARG_WITH(system-apache-commons,
- AS_HELP_STRING([--with-system-apache-commons],
- [Use Apache commons libraries already on system.]),,
- [with_system_apache_commons="$with_system_jars"])
-
AC_ARG_WITH(system-mariadb,
AS_HELP_STRING([--with-system-mariadb],
[Use MariaDB/MySQL libraries already on system.]),,
@@ -1824,11 +1819,6 @@ AC_ARG_WITH(rhino-jar,
[Specify path to jarfile manually.]),
RHINO_JAR=$withval)
-AC_ARG_WITH(commons-logging-jar,
- AS_HELP_STRING([--with-commons-logging-jar=JARFILE],
- [Specify path to jarfile manually.]),
- COMMONS_LOGGING_JAR=$withval)
-
AC_ARG_WITH(system-jfreereport,
AS_HELP_STRING([--with-system-jfreereport],
[Use JFreeReport already on system.]),,
@@ -1961,7 +1951,7 @@ AC_ARG_WITH(system-liblangtag,
AC_ARG_WITH(webdav,
AS_HELP_STRING([--with-webdav],
[Specify which library to use for webdav implementation.
- Possible values: "neon", "serf", "no". The default value is "neon".
+ Possible values: "neon", "serf", "curl", "no". The default value is "neon".
Example: --with-webdav="serf"]),
WITH_WEBDAV=$withval,
WITH_WEBDAV="neon")
@@ -5363,6 +5353,10 @@ fi
if test "$with_system_hsqldb" = "yes"; then
perl_use_string="$perl_use_string ; use Archive::Zip"
fi
+if test "$with_system_openssl" != "yes"; then
+ # OpenSSL needs that to build
+ perl_use_string="$perl_use_string ; use FindBin"
+fi
if $PERL -e "$perl_use_string">/dev/null 2>&1; then
AC_MSG_RESULT([all modules found])
else
@@ -7758,7 +7752,7 @@ if test "$with_export_validation" != "no"; then
ODFVALIDATOR="$BUILDDIR/bin/odfvalidator.sh"
# and fetch name of odfvalidator jar name from download.lst
- ODFVALIDATOR_JAR=`$SED -n -e "s/export *ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+ ODFVALIDATOR_JAR=`$SED -n -e "s/^ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
AC_SUBST(ODFVALIDATOR_JAR)
if test -z "$ODFVALIDATOR_JAR"; then
@@ -7785,7 +7779,7 @@ if test "$with_export_validation" != "no"; then
OFFICEOTRON="$BUILDDIR/bin/officeotron.sh"
# and fetch name of officeotron jar name from download.lst
- OFFICEOTRON_JAR=`$SED -n -e "s/export *OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+ OFFICEOTRON_JAR=`$SED -n -e "s/^OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
AC_SUBST(OFFICEOTRON_JAR)
if test -z "$OFFICEOTRON_JAR"; then
@@ -8118,7 +8112,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)
@@ -8410,7 +8408,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.15])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.16])
libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8])
@@ -8797,14 +8795,14 @@ int main(int argc, char **argv) {
internal)
SYSTEM_PYTHON=
PYTHON_VERSION_MAJOR=3
- PYTHON_VERSION_MINOR=7
- PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.10
+ PYTHON_VERSION_MINOR=8
+ PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.19
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; then
+ if test "$OS" = LINUX -o "$OS" = WNT ; then
BUILD_TYPE="$BUILD_TYPE LIBFFI"
fi
# Embedded Python dies without Home set
@@ -9289,32 +9287,7 @@ if test "$with_system_curl" = "yes"; then
AC_MSG_RESULT([external])
SYSTEM_CURL=TRUE
- # First try PKGCONFIG and then fall back
- PKG_CHECK_MODULES(CURL, libcurl >= 7.19.4,, [:])
-
- if test -n "$CURL_PKG_ERRORS"; then
- AC_PATH_PROG(CURLCONFIG, curl-config)
- if test -z "$CURLCONFIG"; then
- AC_MSG_ERROR([curl development files not found])
- fi
- CURL_LIBS=`$CURLCONFIG --libs`
- FilterLibs "${CURL_LIBS}"
- CURL_LIBS="${filteredlibs}"
- CURL_CFLAGS=$("$CURLCONFIG" --cflags | sed -e "s/-I/${ISYSTEM?}/g")
- curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'`
-
- AC_MSG_CHECKING([whether libcurl is >= 7.19.4])
- case $curl_version in
- dnl brackets doubled below because Autoconf uses them as m4 quote characters,
- dnl so they need to be doubled to end up in the configure script
- 7.19.4|7.19.[[5-9]]|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*)
- AC_MSG_RESULT([yes])
- ;;
- *)
- AC_MSG_ERROR([no, you have $curl_version])
- ;;
- esac
- fi
+ PKG_CHECK_MODULES(CURL, libcurl >= 7.68.0)
ENABLE_CURL=TRUE
elif test $_os = iOS; then
@@ -9852,6 +9825,13 @@ if test $_os = iOS -o $_os = Android; then
fi
AC_MSG_CHECKING([for webdav library])
case "$WITH_WEBDAV" in
+curl)
+ AC_MSG_RESULT([curl])
+ # curl is already mandatory (almost) and checked elsewhere
+ if test "$enable_curl" = "no"; then
+ AC_MSG_ERROR(["--with-webdav=curl conflicts with --disable-curl"])
+ fi
+ ;;
serf)
AC_MSG_RESULT([serf])
# Check for system apr-util
@@ -11202,36 +11182,6 @@ AC_SUBST(LIBREPOSITORY_JAR)
AC_SUBST(LIBFONTS_JAR)
AC_SUBST(LIBSERIALIZER_JAR)
-# this has to be here because both the Wiki Publisher and the SRB use
-# commons-logging
-COMMONS_LOGGING_VERSION=1.2
-if test "$ENABLE_REPORTBUILDER" = "TRUE"; then
- AC_MSG_CHECKING([which Apache commons-* libs to use])
- if test "$with_system_apache_commons" = "yes"; then
- SYSTEM_APACHE_COMMONS=TRUE
- AC_MSG_RESULT([external])
- if test -z $COMMONS_LOGGING_JAR; then
- if test -f /usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar; then
- COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-${COMMONS_LOGGING_VERSION}.jar
- elif test -f /usr/share/java/commons-logging.jar; then
- COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar
- else
- AC_MSG_ERROR(commons-logging.jar replacement not found.)
- fi
- elif ! test -f $COMMONS_LOGGING_JAR; then
- AC_MSG_ERROR(commons-logging.jar not found.)
- fi
- else
- AC_MSG_RESULT([internal])
- SYSTEM_APACHE_COMMONS=
- BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS"
- NEED_ANT=TRUE
- fi
-fi
-AC_SUBST(SYSTEM_APACHE_COMMONS)
-AC_SUBST(COMMONS_LOGGING_JAR)
-AC_SUBST(COMMONS_LOGGING_VERSION)
-
# scripting provider for BeanShell?
AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
@@ -11450,8 +11400,8 @@ then
kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel"
fi
- kf5_test_include="KF5/kcoreaddons_version.h"
- kf5_test_library="libKF5CoreAddons.so"
+ kf5_test_include="KF5/KIOFileWidgets/KFileWidget"
+ kf5_test_library="libKF5KIOFileWidgets.so"
kf5_libdirs="$qt5_libdir $kf5_libdirs"
dnl kf5 KDE4 support compatibility installed
@@ -12107,6 +12057,8 @@ if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no"; then
HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
elif test -e /usr/share/java/hamcrest/core.jar; then
HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
+ elif test -e /usr/share/java/hamcrest/hamcrest.jar; then
+ HAMCREST_JAR=/usr/share/java/hamcrest/hamcrest.jar
else
HAMCREST_JAR=/usr/share/java/hamcrest.jar
fi
diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index 77e7c871123c..6cd27e46a5ff 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -27,6 +27,7 @@
#include <rtl/character.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
+#include <sal/log.hxx>
#include <unotools/datetime.hxx>
#include <sstream>
#include <iomanip>
@@ -167,10 +168,13 @@ namespace dbtools
;
}
-
static sal_Int32 implDaysInMonth(sal_Int32 _nMonth, sal_Int32 _nYear)
{
- OSL_ENSURE(_nMonth > 0 && _nMonth < 13,"Month as invalid value!");
+ SAL_WARN_IF(_nMonth < 1 || _nMonth > 12, "connectivity.commontools", "Month has invalid value: " << _nMonth);
+ if (_nMonth < 1)
+ _nMonth = 1;
+ else if (_nMonth > 12)
+ _nMonth = 12;
if (_nMonth != 2)
return aDaysInMonth[_nMonth-1];
else
@@ -182,7 +186,6 @@ namespace dbtools
}
}
-
static sal_Int32 implRelativeToAbsoluteNull(const css::util::Date& _rDate)
{
sal_Int32 nDays = 0;
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index ffd4eb2ab30f..f3c15904072e 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -773,10 +773,8 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
for (std::size_t i = 1; aIter != aEnd && nByteOffset <= m_nBufferSize && i < nCount;++aIter, i++)
{
// Lengths depending on data type:
- sal_Int32 nLen = 0;
- sal_Int32 nType = 0;
- nLen = m_aPrecisions[i-1];
- nType = m_aTypes[i-1];
+ sal_Int32 nLen = m_aPrecisions[i-1];
+ sal_Int32 nType = m_aTypes[i-1];
switch(nType)
{
@@ -835,8 +833,13 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
else if ( DataType::TIMESTAMP == nType )
{
sal_Int32 nDate = 0,nTime = 0;
+ if (nLen < 8)
+ {
+ SAL_WARN("connectivity.drivers", "short TIMESTAMP");
+ return false;
+ }
memcpy(&nDate, pData, 4);
- memcpy(&nTime, pData+ 4, 4);
+ memcpy(&nTime, pData + 4, 4);
if ( !nDate && !nTime )
{
(_rRow->get())[i]->setNull();
@@ -914,7 +917,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
{
case DataType::DATE:
{
- if (aStr.getLength() != nLen)
+ if (nLen < 8 || aStr.getLength() != nLen)
{
(_rRow->get())[i]->setNull();
break;
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index de76ecbba29d..95c610843efa 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -300,6 +300,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/connectivity/source/inc/java/tools.hxx b/connectivity/source/inc/java/tools.hxx
index e3763cd655a0..f8e694063374 100644
--- a/connectivity/source/inc/java/tools.hxx
+++ b/connectivity/source/inc/java/tools.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_TOOLS_HXX
#define INCLUDED_CONNECTIVITY_SOURCE_INC_JAVA_TOOLS_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/uno/Sequence.h>
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index c9d423e3219c..6fa996b5e474 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -74,9 +74,15 @@ inline connectivity::OSQLInternalNode* newNode(const OUString& _newValue,
// yyi is the internal number of the rule that is currently being reduced
// This can be mapped to external rule number via the yyrmap.
+#if defined YYBISON && YYBISON >= 30800
+#define SQL_NEW_RULE newNode("", SQLNodeType::Rule, yyr1[yyrule])
+#define SQL_NEW_LISTRULE newNode("", SQLNodeType::ListRule, yyr1[yyrule])
+#define SQL_NEW_COMMALISTRULE newNode("", SQLNodeType::CommaListRule, yyr1[yyrule])
+#else
#define SQL_NEW_RULE newNode("", SQLNodeType::Rule, yyr1[yyn])
#define SQL_NEW_LISTRULE newNode("", SQLNodeType::ListRule, yyr1[yyn])
#define SQL_NEW_COMMALISTRULE newNode("", SQLNodeType::CommaListRule, yyr1[yyn])
+#endif
extern connectivity::OSQLParser* xxx_pGLOBAL_SQLPARSER;
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index c9d1acec41af..9a224a3bb9a0 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -380,9 +380,10 @@
#define RID_SVXSTR_REGISTERED_DATABASES NC_("RID_SVXSTR_REGISTERED_DATABASES", "Registered Databases")
#define RID_SVXSTR_CANNOTCONVERTURL_ERR NC_("RID_SVXSTR_CANNOTCONVERTURL_ERR", "The URL <%1> cannot be converted to a filesystem path.")
+#define RID_CUISTR_OPT_READONLY NC_("RID_CUISTR_OPT_READONLY", "This property is locked for editing.")
#define RID_SVXSTR_ABOUT_VERSION NC_("aboutdialog|textbuffer1", "Version: %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX")
-#define RID_SVXSTR_ABOUT_COPYRIGHT NC_("aboutdialog|copyright", "Copyright © 2000–2020 LibreOffice contributors.")
+#define RID_SVXSTR_ABOUT_COPYRIGHT NC_("aboutdialog|copyright", "Copyright © 2000–2021 LibreOffice contributors.")
#define RID_SVXSTR_ABOUT_CREDITS_URL NC_("aboutdialog|link", "https://www.libreoffice.org/about-us/credits/")
#define RID_SVXSTR_ABOUT_BUILDID NC_("aboutdialog|buildid", "Build ID: $BUILDID")
#define RID_SVXSTR_ABOUT_VENDOR NC_("aboutdialog|vendor", "This release was supplied by %OOOVENDOR.")
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 204a0b308a2e..58558b660c6e 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1973,7 +1973,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const
aPortion2.sText = aLeftOverText.makeStringAndClear();
aRet.push_back( aPortion2 );
}
- else
+ else if (!aLeftOverText.isEmpty() && !aRet.empty())
{ // we just need to append the left-over text to the last portion (which had no errors)
aRet[ aRet.size() - 1 ].sText += aLeftOverText;
}
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 12dcb9bf9dbf..ea85f401df48 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -64,16 +64,7 @@ AboutDialog::AboutDialog(weld::Window* pParent)
, m_xContentArea(m_xDialog->weld_content_area())
{
m_xDialog->add_button(GetStandardText(StandardButtonType::Close), RET_CLOSE);
- m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_CREDITS), 101);
- m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_WEBSITE), 102);
- m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_RELEASE_NOTES), 103);
-
- m_xCreditsButton.reset(m_xDialog->weld_widget_for_response(101));
- m_xCreditsButton->set_secondary(true);
- m_xWebsiteButton.reset(m_xDialog->weld_widget_for_response(102));
- m_xWebsiteButton->set_secondary(true);
- m_xReleaseNotesButton.reset(m_xDialog->weld_widget_for_response(103));
- m_xReleaseNotesButton->set_secondary(true);
+
m_xCloseButton.reset(m_xDialog->weld_widget_for_response(RET_CLOSE));
m_buildIdLinkString = m_xDialog->get_website_label();
@@ -88,9 +79,6 @@ AboutDialog::AboutDialog(weld::Window* pParent)
m_xDialog->connect_size_allocate(LINK(this, AboutDialog, SizeAllocHdl));
// Connect all handlers
- m_xCreditsButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) );
- m_xWebsiteButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) );
- m_xReleaseNotesButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) );
m_xCloseButton->grab_focus();
}
@@ -98,46 +86,6 @@ AboutDialog::~AboutDialog()
{
}
-IMPL_LINK(AboutDialog, HandleClick, weld::Button&, rButton, void)
-{
- OUString sURL = "";
-
- // Find which button was pressed and from this, get the URL to be opened
- if (&rButton == m_xCreditsButton.get())
- sURL = CuiResId(RID_SVXSTR_ABOUT_CREDITS_URL);
- else if (&rButton == m_xWebsiteButton.get())
- {
- sURL = officecfg::Office::Common::Help::StartCenter::InfoURL::get();
- localizeWebserviceURI(sURL);
- }
- else if (&rButton == m_xReleaseNotesButton.get())
- {
- sURL = officecfg::Office::Common::Menus::ReleaseNotesURL::get() +
- "?LOvers=" + utl::ConfigManager::getProductVersion() +
- "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
- }
-
- // If the URL is empty, don't do anything
- if ( sURL.isEmpty() )
- return;
- try
- {
- Reference< css::system::XSystemShellExecute > xSystemShellExecute(
- css::system::SystemShellExecute::create(::comphelper::getProcessComponentContext() ) );
- xSystemShellExecute->execute( sURL, OUString(), css::system::SystemShellExecuteFlags::URIS_ONLY );
- }
- catch (const Exception&)
- {
- Any exc( ::cppu::getCaughtException() );
- OUString msg( ::comphelper::anyToString( exc ) );
- const SolarMutexGuard guard;
- std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(getDialog(),
- VclMessageType::Warning, VclButtonsType::Ok, msg));
- xErrorBox->set_title(m_xDialog->get_title());
- xErrorBox->run();
- }
-}
-
void AboutDialog::SetBuildIdLink()
{
OUString sDefault;
@@ -152,7 +100,7 @@ void AboutDialog::SetBuildIdLink()
}
m_xDialog->set_website_label(m_buildIdLinkString.replaceAll("$GITHASH", buildId));
- m_xDialog->set_website("https://hub.libreoffice.org/git-core/" + buildId);
+ m_xDialog->set_website(OUString());
}
else
{
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index c51eb15433d8..eacd4be8f53e 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -28,9 +28,6 @@ private:
std::unique_ptr<weld::Builder> m_xBuilder;
std::shared_ptr<weld::AboutDialog> m_xDialog;
std::unique_ptr<weld::Container> m_xContentArea;
- std::unique_ptr<weld::Button> m_xCreditsButton;
- std::unique_ptr<weld::Button> m_xWebsiteButton;
- std::unique_ptr<weld::Button> m_xReleaseNotesButton;
std::unique_ptr<weld::Button> m_xCloseButton;
BitmapEx aLogoBitmap;
@@ -52,7 +49,6 @@ public:
virtual weld::Dialog* getDialog() override { return m_xDialog.get(); }
virtual ~AboutDialog() override;
- DECL_LINK(HandleClick, weld::Button&, void);
DECL_LINK(SizeAllocHdl, const Size&, void);
};
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 217b0bc5308f..b0687a7a797e 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -14,6 +14,10 @@
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/UnknownPropertyException.hpp>
+#include <com/sun/star/beans/XPropertySetInfo.hpp>
+#include <com/sun/star/configuration/ReadWriteAccess.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
#include <com/sun/star/container/XHierarchicalName.hpp>
@@ -22,10 +26,14 @@
#include <com/sun/star/util/SearchAlgorithms2.hpp>
#include <unotools/textsearch.hxx>
#include <vcl/event.hxx>
+#include <vcl/svapp.hxx>
#include <sal/log.hxx>
#include <tools/diagnose_ex.h>
#include <tools/debug.hxx>
+#include <dialmgr.hxx>
+#include <strings.hrc>
+
#include <memory>
#include <vector>
#include <iostream>
@@ -54,18 +62,21 @@ struct Prop_Impl
struct UserData
{
bool bIsPropertyPath;
+ bool bIsReadOnly;
OUString sPropertyPath;
int aLineage;
Reference<XNameAccess> aXNameAccess;
- explicit UserData( OUString const & rPropertyPath )
+ explicit UserData( OUString const & rPropertyPath, bool isReadOnly )
: bIsPropertyPath( true )
+ , bIsReadOnly( isReadOnly )
, sPropertyPath(rPropertyPath)
, aLineage(0)
{}
explicit UserData( Reference<XNameAccess> const & rXNameAccess, int rIndex )
: bIsPropertyPath( false )
+ , bIsReadOnly( false )
, aLineage(rIndex)
, aXNameAccess( rXNameAccess )
{}
@@ -200,9 +211,9 @@ CuiAboutConfigTabPage::~CuiAboutConfigTabPage()
void CuiAboutConfigTabPage::InsertEntry(const OUString& rPropertyPath, const OUString& rProp, const OUString& rStatus,
const OUString& rType, const OUString& rValue, const weld::TreeIter* pParentEntry,
- bool bInsertToPrefBox)
+ bool bInsertToPrefBox, bool bIsReadOnly)
{
- m_vectorUserData.push_back(std::make_unique<UserData>(rPropertyPath));
+ m_vectorUserData.push_back(std::make_unique<UserData>(rPropertyPath, bIsReadOnly));
if (bInsertToPrefBox)
{
OUString sId(OUString::number(reinterpret_cast<sal_Int64>(m_vectorUserData.back().get())));
@@ -308,6 +319,22 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
}
);
+ css::uno::Reference<css::configuration::XReadWriteAccess> m_xReadWriteAccess;
+ m_xReadWriteAccess = css::configuration::ReadWriteAccess::create(
+ ::comphelper::getProcessComponentContext(), "*");
+ beans::Property aProperty;
+ bool bReadOnly = false;
+ try
+ {
+ aProperty = m_xReadWriteAccess->getPropertyByHierarchicalName(sPath + "/"
+ + sPropertyName);
+ bReadOnly = (aProperty.Attributes & beans::PropertyAttribute::READONLY) != 0;
+ }
+ catch (css::beans::UnknownPropertyException)
+ {
+ SAL_WARN("cui.options", "unknown property: " << sPath + "/" + sPropertyName);
+ }
+
OUString sType = aNode.getValueTypeName();
OUStringBuffer sValue;
@@ -469,7 +496,7 @@ void CuiAboutConfigTabPage::FillItems(const Reference< XNameAccess >& xNameAcces
for(int j = 1; j < lineage; ++j)
index = sPath.indexOf("/", index + 1);
- InsertEntry(sPath, sPath.copy(index+1), seqItems[i], sType, sValue.makeStringAndClear(), pParentEntry, !bLoadAll);
+ InsertEntry(sPath, sPath.copy(index+1), seqItems[i], sType, sValue.makeStringAndClear(), pParentEntry, !bLoadAll, bReadOnly);
}
}
}
@@ -573,6 +600,15 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, StandardHdl_Impl, weld::Button&, void )
return;
UserData *pUserData = reinterpret_cast<UserData*>(m_xPrefBox->get_id(*m_xScratchIter).toInt64());
+ if (pUserData && pUserData->bIsReadOnly)
+ {
+ std::unique_ptr<weld::MessageDialog> xMessageBox(
+ Application::CreateMessageDialog(m_xDialog.get(), VclMessageType::Info, VclButtonsType::Ok,
+ CuiResId(RID_CUISTR_OPT_READONLY)));
+ xMessageBox->run();
+ return;
+ }
+
if (pUserData && pUserData->bIsPropertyPath)
{
//if selection is a node
diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx
index b7781859eb4b..ab1cdcfb6ee6 100644
--- a/cui/source/options/optaboutconfig.hxx
+++ b/cui/source/options/optaboutconfig.hxx
@@ -67,7 +67,7 @@ public:
explicit CuiAboutConfigTabPage(weld::Window* pParent);
virtual ~CuiAboutConfigTabPage() override;
void InsertEntry(const OUString &rPropertyPath, const OUString& rProp, const OUString& rStatus, const OUString& rType, const OUString& rValue,
- const weld::TreeIter* pParentEntry, bool bInsertToPrefBox);
+ const weld::TreeIter* pParentEntry, bool bInsertToPrefBox, bool bIsReadOnly);
void Reset();
void FillItems(const css::uno::Reference<css::container::XNameAccess>& xNameAccess,
const weld::TreeIter* pParentEntry = nullptr, int lineage = 0, bool bLoadAll = false);
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 36540800bb62..02bfc89f7c0a 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -34,6 +34,7 @@
#include <officecfg/Office/Common.hxx>
#include <osl/file.hxx>
#include <svtools/miscopt.hxx>
+#include <rtl/bootstrap.hxx>
#include <strings.hrc>
#include <vcl/svapp.hxx>
@@ -933,21 +934,29 @@ void SvxJavaClassPathDlg::SetClassPath( const OUString& _rPath )
if ( m_sOldPath.isEmpty() )
m_sOldPath = _rPath;
m_xPathList->clear();
+#if HAVE_FEATURE_JAVA
if (!_rPath.isEmpty())
{
- sal_Int32 nIdx = 0;
- do
+ std::vector paths = jfw_convertUserPathList(_rPath);
+ for (auto const& path : paths)
{
- OUString sToken = _rPath.getToken( 0, CLASSPATH_DELIMITER, nIdx );
OUString sURL;
- osl::FileBase::getFileURLFromSystemPath(sToken, sURL); // best effort
+ if (path.startsWith("$"))
+ {
+ sURL = path;
+ rtl::Bootstrap::expandMacros(sURL);
+ }
+ else
+ {
+ osl::FileBase::getFileURLFromSystemPath(path, sURL);
+ }
INetURLObject aURL( sURL );
- m_xPathList->append("", sToken, SvFileInformationManager::GetImageId(aURL));
+ m_xPathList->append("", path, SvFileInformationManager::GetImageId(aURL));
}
- while (nIdx>=0);
// select first entry
m_xPathList->select(0);
}
+#endif
SelectHdl_Impl(*m_xPathList);
}
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 419b93b9d1bd..073a856f73ef 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -837,7 +837,6 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController*
, m_xLinguDicsDelPB(m_xBuilder->weld_button("lingudictsdelete"))
, m_xLinguOptionsCLB(m_xBuilder->weld_tree_view("linguoptions"))
, m_xLinguOptionsEditPB(m_xBuilder->weld_button("linguoptionsedit"))
- , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink"))
{
std::vector<int> aWidths;
aWidths.push_back(m_xLinguModulesCLB->get_checkbox_column_width());
@@ -863,9 +862,6 @@ SvxLinguTabPage::SvxLinguTabPage(weld::Container* pPage, weld::DialogController*
m_xLinguOptionsCLB->connect_changed( LINK( this, SvxLinguTabPage, SelectHdl_Impl ));
m_xLinguOptionsCLB->connect_row_activated(LINK(this, SvxLinguTabPage, BoxDoubleClickHdl_Impl));
- if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() == SvtExtendedSecurityOptions::OPEN_NEVER )
- m_xMoreDictsLink->hide();
-
xProp = LinguMgr::GetLinguPropertySet();
xDicList.set( LinguMgr::GetDictionaryList(), UNO_QUERY );
if (xDicList.is())
@@ -1521,12 +1517,6 @@ void SvxLinguTabPage::HideGroups( sal_uInt16 nGrp )
m_xLinguModulesFT->hide();
m_xLinguModulesCLB->hide();
m_xLinguModulesEditPB->hide();
-
- if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode()
- != SvtExtendedSecurityOptions::OPEN_NEVER )
- {
- m_xMoreDictsLink->show();
- }
}
}
@@ -1541,7 +1531,6 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& r
, m_xPrioUpPB(m_xBuilder->weld_button("up"))
, m_xPrioDownPB(m_xBuilder->weld_button("down"))
, m_xBackPB(m_xBuilder->weld_button("back"))
- , m_xMoreDictsLink(m_xBuilder->weld_link_button("moredictslink"))
, m_xClosePB(m_xBuilder->weld_button("close"))
, m_xLanguageLB(new SvxLanguageBox(m_xBuilder->weld_combo_box("language")))
{
@@ -1565,9 +1554,6 @@ SvxEditModulesDlg::SvxEditModulesDlg(weld::Window* pParent, SvxLinguData_Impl& r
m_xPrioUpPB->set_sensitive( false );
m_xPrioDownPB->set_sensitive( false );
- if ( SvtExtendedSecurityOptions().GetOpenHyperlinkMode() == SvtExtendedSecurityOptions::OPEN_NEVER )
- m_xMoreDictsLink->hide();
-
// set that we want the checkbox shown if spellchecking is available
m_xLanguageLB->SetLanguageList(SvxLanguageListFlags::EMPTY, false, false, true);
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 72f736ce406b..2ce16aa16de8 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -29,6 +29,7 @@
#include <com/sun/star/container/XContainerQuery.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/beans/PropertyValue.hpp>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/sfxsids.hrc>
#include <sfx2/docfilt.hxx>
#include <unotools/optionsdlg.hxx>
@@ -69,6 +70,7 @@ SvxSaveTabPage_Impl::SvxSaveTabPage_Impl() : bInitialized( false )
SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet)
: SfxTabPage( pPage, pController, "cui/ui/optsavepage.ui", "OptSavePage", &rCoreSet )
, pImpl(new SvxSaveTabPage_Impl)
+ , m_xLoadViewPosAnyUserCB(m_xBuilder->weld_check_button("load_anyuser"))
, m_xLoadUserSettingsCB(m_xBuilder->weld_check_button("load_settings"))
, m_xLoadDocPrinterCB(m_xBuilder->weld_check_button("load_docprinter"))
, m_xDocInfoCB(m_xBuilder->weld_check_button("docinfo"))
@@ -215,6 +217,13 @@ bool SvxSaveTabPage::FillItemSet( SfxItemSet* rSet )
{
bool bModified = false;
SvtSaveOptions aSaveOpt;
+ if (m_xLoadViewPosAnyUserCB->get_state_changed_from_saved())
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(
+ comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Load::ViewPositionForAnyUser::set(m_xLoadViewPosAnyUserCB->get_active(), pBatch);
+ pBatch->commit();
+ }
if(m_xLoadUserSettingsCB->get_state_changed_from_saved())
{
aSaveOpt.SetLoadUserSettings(m_xLoadUserSettingsCB->get_active());
@@ -353,6 +362,9 @@ static bool isODFFormat( const OUString& sFilter )
void SvxSaveTabPage::Reset( const SfxItemSet* )
{
SvtSaveOptions aSaveOpt;
+ m_xLoadViewPosAnyUserCB->set_active(officecfg::Office::Common::Load::ViewPositionForAnyUser::get());
+ m_xLoadViewPosAnyUserCB->save_state();
+ m_xLoadViewPosAnyUserCB->set_sensitive(!officecfg::Office::Common::Load::ViewPositionForAnyUser::isReadOnly());
m_xLoadUserSettingsCB->set_active(aSaveOpt.IsLoadUserSettings());
m_xLoadUserSettingsCB->save_state();
m_xLoadUserSettingsCB->set_sensitive(!aSaveOpt.IsReadOnly(SvtSaveOptions::EOption::UseUserData));
diff --git a/cui/source/options/optsave.hxx b/cui/source/options/optsave.hxx
index 4314bdda1ddf..f412054ae600 100644
--- a/cui/source/options/optsave.hxx
+++ b/cui/source/options/optsave.hxx
@@ -45,6 +45,7 @@ class SvxSaveTabPage : public SfxTabPage
private:
std::unique_ptr<SvxSaveTabPage_Impl> pImpl;
+ std::unique_ptr<weld::CheckButton> m_xLoadViewPosAnyUserCB;
std::unique_ptr<weld::CheckButton> m_xLoadUserSettingsCB;
std::unique_ptr<weld::CheckButton> m_xLoadDocPrinterCB;
std::unique_ptr<weld::CheckButton> m_xDocInfoCB;
diff --git a/cui/uiconfig/ui/editmodulesdialog.ui b/cui/uiconfig/ui/editmodulesdialog.ui
index 77b8af666236..23ab7e81cdff 100644
--- a/cui/uiconfig/ui/editmodulesdialog.ui
+++ b/cui/uiconfig/ui/editmodulesdialog.ui
@@ -111,22 +111,6 @@
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<child>
- <object class="GtkLinkButton" id="moredictslink">
- <property name="label" translatable="yes" context="editmodulesdialog|moredictslink">Get more dictionaries online...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- <property name="uri">https://extensions.libreoffice.org/dictionaries/</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/cui/uiconfig/ui/optlingupage.ui b/cui/uiconfig/ui/optlingupage.ui
index 114bfde51ca2..954813abedaa 100644
--- a/cui/uiconfig/ui/optlingupage.ui
+++ b/cui/uiconfig/ui/optlingupage.ui
@@ -361,23 +361,6 @@
<property name="row_spacing">3</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkLinkButton" id="moredictslink">
- <property name="label" translatable="yes" context="optlingupage|moredictslink">Get more dictionaries online...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- <property name="uri">https://extensions.libreoffice.org/dictionaries/</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">2</property>
- </packing>
- </child>
- <child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index e9a090d45091..c95efcfc68cc 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -61,6 +61,21 @@
<property name="top_attach">0</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="load_anyuser">
+ <property name="label" translatable="yes" context="optsavepage|load_anyuser">Load view position with the document even if it was saved by a different user</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">2</property>
+ </packing>
+ </child>
</object>
</child>
</object>
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 9681254b8262..625422812960 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1142,7 +1142,8 @@ bool ODatabaseModelImpl::checkMacrosOnLoading()
{
Reference< XInteractionHandler > xInteraction;
xInteraction = m_aMediaDescriptor.getOrDefault( "InteractionHandler", xInteraction );
- return m_aMacroMode.checkMacrosOnLoading( xInteraction );
+ const bool bHasMacros = m_aMacroMode.hasMacros();
+ return m_aMacroMode.checkMacrosOnLoading(xInteraction, false /*HasValidContentSignature*/, bHasMacros);
}
void ODatabaseModelImpl::resetMacroExecutionMode()
diff --git a/dbaccess/source/ui/dlg/odbcconfig.cxx b/dbaccess/source/ui/dlg/odbcconfig.cxx
index f4e831439591..40507b818c2f 100644
--- a/dbaccess/source/ui/dlg/odbcconfig.cxx
+++ b/dbaccess/source/ui/dlg/odbcconfig.cxx
@@ -280,7 +280,7 @@ OOdbcManagement::OOdbcManagement(const Link<void*,void>& rAsyncFinishCallback)
OOdbcManagement::~OOdbcManagement()
{
// wait for our thread to be finished
- if ( m_pProcessWait.get() )
+ if ( m_pProcessWait )
m_pProcessWait->join();
}
@@ -306,19 +306,19 @@ bool OOdbcManagement::manageDataSources_async()
void OOdbcManagement::disableCallback()
{
- if (m_pProcessWait.get())
+ if (m_pProcessWait)
m_pProcessWait->disableCallback();
}
void OOdbcManagement::receivedCallback()
{
- if (m_pProcessWait.get())
+ if (m_pProcessWait)
m_pProcessWait->receivedCallback();
}
bool OOdbcManagement::isRunning() const
{
- return ( m_pProcessWait.get() && m_pProcessWait->isRunning() );
+ return ( m_pProcessWait && m_pProcessWait->isRunning() );
}
#endif // HAVE_ODBC_ADMINISTRATION
diff --git a/dbaccess/uiconfig/dbapp/menubar/menubar.xml b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
index 34d8b8f5dc0e..214747123b2e 100644
--- a/dbaccess/uiconfig/dbapp/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbapp/menubar/menubar.xml
@@ -149,7 +149,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/dbaccess/uiconfig/dbquery/menubar/menubar.xml b/dbaccess/uiconfig/dbquery/menubar/menubar.xml
index e896abfa00da..46c31e3f6613 100644
--- a/dbaccess/uiconfig/dbquery/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbquery/menubar/menubar.xml
@@ -104,7 +104,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/dbaccess/uiconfig/dbrelation/menubar/menubar.xml b/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
index fbeda4a1e9c2..8d13f0fc557e 100644
--- a/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbrelation/menubar/menubar.xml
@@ -88,7 +88,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/dbaccess/uiconfig/dbtable/menubar/menubar.xml b/dbaccess/uiconfig/dbtable/menubar/menubar.xml
index 4ef7c80a26a2..bba876604886 100644
--- a/dbaccess/uiconfig/dbtable/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbtable/menubar/menubar.xml
@@ -88,7 +88,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/dbaccess/uiconfig/dbtdata/menubar/menubar.xml b/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
index c858d89878e4..4c5553aef0ed 100644
--- a/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
+++ b/dbaccess/uiconfig/dbtdata/menubar/menubar.xml
@@ -113,7 +113,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1bb185dd5b9e..f32fb09d9270 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2396,7 +2396,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()
@@ -2454,7 +2455,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 415ea047361d..021c706f5c78 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 381147cd534e..846714158e25 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/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index e48bb2d0912d..cda1d3c11d77 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -449,7 +449,6 @@ ExtMgrDialog::ExtMgrDialog(weld::Window *pParent, TheExtensionManager *pManager)
, m_xBundledCbx(m_xBuilder->weld_check_button("bundled"))
, m_xSharedCbx(m_xBuilder->weld_check_button("shared"))
, m_xUserCbx(m_xBuilder->weld_check_button("user"))
- , m_xGetExtensions(m_xBuilder->weld_link_button("getextensions"))
, m_xProgressText(m_xBuilder->weld_label("progressft"))
, m_xProgressBar(m_xBuilder->weld_progress_bar("progressbar"))
, m_xCancelBtn(m_xBuilder->weld_button("cancel"))
@@ -504,9 +503,8 @@ ExtMgrDialog::~ExtMgrDialog()
m_aIdle.Stop();
}
-void ExtMgrDialog::setGetExtensionsURL( const OUString &rURL )
+void ExtMgrDialog::setGetExtensionsURL( const OUString &/* rURL */ )
{
- m_xGetExtensions->set_uri( rURL );
}
void ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 84a755677843..a27db669a9f4 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -127,7 +127,6 @@ class ExtMgrDialog : public weld::GenericDialogController
std::unique_ptr<weld::CheckButton> m_xBundledCbx;
std::unique_ptr<weld::CheckButton> m_xSharedCbx;
std::unique_ptr<weld::CheckButton> m_xUserCbx;
- std::unique_ptr<weld::LinkButton> m_xGetExtensions;
std::unique_ptr<weld::Label> m_xProgressText;
std::unique_ptr<weld::ProgressBar> m_xProgressBar;
std::unique_ptr<weld::Button> m_xCancelBtn;
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index be21788c40d1..05baeddbb4c3 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -38,6 +38,7 @@
#include <i18nlangtag/lang.h>
#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
+#include <officecfg/Office/UI.hxx>
#include <osl/file.hxx>
#include <osl/security.hxx>
#include <unotools/configmgr.hxx>
@@ -45,6 +46,7 @@
#include <com/sun/star/configuration/Update.hpp>
#include <com/sun/star/configuration/theDefaultProvider.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/task/XJob.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
@@ -666,6 +668,55 @@ bool getComponent(OUString const & path, OUString * component)
return true;
}
+void renameMigratedSetElementTo(
+ css::uno::Reference<css::container::XNameContainer> const & set, OUString const & currentName,
+ OUString const & migratedName)
+{
+ // To avoid unexpected data loss, the code is careful to only rename from currentName to
+ // migratedName in the expected case where the currentName element exists and the migratedName
+ // element doesn't exist:
+ auto const hasCurrent = set->hasByName(currentName);
+ auto const hasMigrated = set->hasByName(migratedName);
+ if (hasCurrent && !hasMigrated) {
+ auto const elem = set->getByName(currentName);
+ set->removeByName(currentName);
+ set->insertByName(migratedName, elem);
+ } else {
+ SAL_INFO_IF(!hasCurrent, "desktop.migration", "unexpectedly missing " << currentName);
+ SAL_INFO_IF(hasMigrated, "desktop.migration", "unexpectedly present " << migratedName);
+ }
+}
+
+void renameMigratedSetElementBack(
+ css::uno::Reference<css::container::XNameContainer> const & set, OUString const & currentName,
+ OUString const & migratedName)
+{
+ // To avoid unexpected data loss, the code is careful to ensure that in the end a currentName
+ // element exists, creating it from a template if the migratedName element had unexpectedly gone
+ // missing:
+ auto const hasMigrated = set->hasByName(migratedName);
+ css::uno::Any elem;
+ if (hasMigrated) {
+ elem = set->getByName(migratedName);
+ set->removeByName(migratedName);
+ } else {
+ SAL_INFO("desktop.migration", "unexpected loss of " << migratedName);
+ elem <<= css::uno::Reference<css::lang::XSingleServiceFactory>(
+ set, css::uno::UNO_QUERY_THROW)->createInstance();
+ }
+ if (set->hasByName(currentName)) {
+ SAL_INFO("desktop.migration", "unexpected reappearance of " << currentName);
+ if (hasMigrated) {
+ SAL_INFO(
+ "desktop.migration",
+ "reappeared " << currentName << " overwritten with " << migratedName);
+ set->replaceByName(currentName, elem);
+ }
+ } else {
+ set->insertByName(currentName, elem);
+ }
+}
+
}
void MigrationImpl::copyConfig()
@@ -696,6 +747,30 @@ void MigrationImpl::copyConfig()
regFile.close();
}
+ // If the to-be-migrated data contains modifications of
+ // /org.openoffice.Office.UI/ColorScheme/ColorSchemes set elements named after the migrated
+ // product name, those modifications must instead be made to the corresponding set elements
+ // named after the current product name. However, if the current configuration data does not
+ // contain those old-named set elements at all, their modification data would silently be
+ // ignored by css.configuration.XUpdate::insertModificationXcuFile. So temporarily rename any
+ // new-named set elements to their old-named counterparts here, and rename them back again down
+ // below after importing the migrated data:
+ OUString sProductName = utl::ConfigManager::getProductName();
+ OUString sProductNameDark = sProductName + " Dark";
+ OUString sMigratedProductName = m_aInfo.productname;
+ // remove version number from the end of product name if there’s one
+ if (isdigit(sMigratedProductName[sMigratedProductName.getLength() - 1]))
+ sMigratedProductName = (sMigratedProductName.copy(0, m_aInfo.productname.getLength() - 1)).trim();
+ OUString sMigratedProductNameDark = sMigratedProductName + " Dark";
+ auto const tempRename = sMigratedProductName != sProductName;
+ if (tempRename) {
+ auto const batch = comphelper::ConfigurationChanges::create();
+ auto const schemes = officecfg::Office::UI::ColorScheme::ColorSchemes::get(batch);
+ renameMigratedSetElementTo(schemes, sProductName, sMigratedProductName);
+ renameMigratedSetElementTo(schemes, sProductNameDark, sMigratedProductNameDark);
+ batch->commit();
+ }
+
for (auto const& comp : comps)
{
if (!comp.second.includedPaths.empty()) {
@@ -728,12 +803,44 @@ void MigrationImpl::copyConfig()
regFilePath,
comphelper::containerToSequence(comp.second.includedPaths),
comphelper::containerToSequence(comp.second.excludedPaths));
+
} else {
SAL_INFO( "desktop.migration", "configuration migration component " << comp.first << " ignored (only excludes, no includes)" );
}
next:
;
}
+ if (tempRename) {
+ auto const batch = comphelper::ConfigurationChanges::create();
+ auto const schemes = officecfg::Office::UI::ColorScheme::ColorSchemes::get(batch);
+ renameMigratedSetElementBack(schemes, sProductName, sMigratedProductName);
+ renameMigratedSetElementBack(schemes, sProductNameDark, sMigratedProductNameDark);
+ batch->commit();
+ }
+ // checking the migrated (product name related) color scheme name, and replace it to the current version scheme name
+ try
+ {
+ OUString sMigratedColorScheme;
+ uno::Reference<XPropertySet> aPropertySet(
+ getConfigAccess("org.openoffice.Office.UI/ColorScheme", true), uno::UNO_QUERY_THROW);
+ if (aPropertySet->getPropertyValue("CurrentColorScheme") >>= sMigratedColorScheme)
+ {
+ if (sMigratedColorScheme.equals(sMigratedProductName))
+ {
+ aPropertySet->setPropertyValue("CurrentColorScheme",
+ uno::Any(sProductName));
+ uno::Reference<XChangesBatch>(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges();
+ }
+ else if (sMigratedColorScheme.equals(sMigratedProductNameDark))
+ {
+ aPropertySet->setPropertyValue("CurrentColorScheme",
+ uno::Any(sProductNameDark));
+ uno::Reference<XChangesBatch>(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges();
+ }
+ }
+ } catch (const Exception&) {
+ // fail silently...
+ }
}
uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPath, bool bUpdate)
diff --git a/desktop/uiconfig/ui/extensionmanager.ui b/desktop/uiconfig/ui/extensionmanager.ui
index bcc1be250dd0..828c799178c3 100644
--- a/desktop/uiconfig/ui/extensionmanager.ui
+++ b/desktop/uiconfig/ui/extensionmanager.ui
@@ -312,22 +312,6 @@
<property name="top_attach">0</property>
</packing>
</child>
- <child>
- <object class="GtkLinkButton" id="getextensions">
- <property name="label" translatable="yes" context="extensionmanager|getextensions">Get more extensions online...</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="relief">none</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">3</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/desktop/win32/source/loader.cxx b/desktop/win32/source/loader.cxx
index 40cef9e3fd4f..e42420391b4b 100644
--- a/desktop/win32/source/loader.cxx
+++ b/desktop/win32/source/loader.cxx
@@ -164,11 +164,13 @@ int officeloader_impl(bool bAllowConsole)
}
std::vector<std::wstring> aEscapedArgs;
- // read limit values from bootstrap.ini
+ // read limit values from fundamental.override.ini
unsigned int nMaxMemoryInMB = 0;
bool bExcludeChildProcesses = true;
+ bool fallbackForMaxMemoryInMB = true;
+ bool fallbackForExcludeChildProcesses = true;
- const WCHAR* szIniFile = L"\\bootstrap.ini";
+ const WCHAR* szIniFile = L"\\fundamental.override.ini";
const size_t nDirLen = wcslen(szIniDirectory);
if (wcslen(szIniFile) + nDirLen < MAX_PATH)
{
@@ -181,14 +183,45 @@ int officeloader_impl(bool bAllowConsole)
boost::property_tree::ptree pt;
std::ifstream aFile(szBootstrapIni);
boost::property_tree::ini_parser::read_ini(aFile, pt);
- nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", nMaxMemoryInMB);
- bExcludeChildProcesses = pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+ nMaxMemoryInMB = pt.get("Bootstrap.LimitMaximumMemoryInMB", nMaxMemoryInMB);
+ fallbackForMaxMemoryInMB = !pt.get_child_optional("Bootstrap.LimitMaximumMemoryInMB");
+ bExcludeChildProcesses = pt.get("Bootstrap.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+ fallbackForExcludeChildProcesses
+ = !pt.get_child_optional("Bootstrap.ExcludeChildProcessesFromLimit");
}
catch (...)
{
nMaxMemoryInMB = 0;
}
}
+ // For backwards compatibility, for now also try to read the values from bootstrap.ini if
+ // fundamental.override.ini does not provide them:
+ if (fallbackForMaxMemoryInMB || fallbackForExcludeChildProcesses) {
+ const WCHAR* szFallbackIniFile = L"\\bootstrap.ini";
+ const size_t nFallbackDirLen = wcslen(szIniDirectory);
+ if (wcslen(szFallbackIniFile) + nFallbackDirLen < MAX_PATH)
+ {
+ WCHAR szBootstrapIni[MAX_PATH];
+ wcscpy(szBootstrapIni, szIniDirectory);
+ wcscpy(&szBootstrapIni[nFallbackDirLen], szFallbackIniFile);
+
+ try
+ {
+ boost::property_tree::ptree pt;
+ std::ifstream aFile(szBootstrapIni);
+ boost::property_tree::ini_parser::read_ini(aFile, pt);
+ if (fallbackForMaxMemoryInMB) {
+ nMaxMemoryInMB = pt.get("Win32.LimitMaximumMemoryInMB", nMaxMemoryInMB);
+ }
+ if (fallbackForExcludeChildProcesses) {
+ bExcludeChildProcesses = pt.get("Win32.ExcludeChildProcessesFromLimit", bExcludeChildProcesses);
+ }
+ }
+ catch (...)
+ {
+ }
+ }
+ }
// create a Windows JobObject with a memory limit
HANDLE hJobObject = nullptr;
diff --git a/distro-configs/LibreOfficeFlatpak.conf b/distro-configs/LibreOfficeFlatpak.conf
index 0d0f9ce5c881..d7f1b9cc4f74 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -10,7 +10,6 @@
--without-export-validation
--without-junit
--without-lxml
---without-system-apache-commons
--without-system-beanshell
--without-system-bluez
--without-system-boost
diff --git a/download.lst b/download.lst
index 702a921e929b..4353d04acf67 100644
--- a/download.lst
+++ b/download.lst
@@ -1,263 +1,597 @@
-export ABW_SHA256SUM := e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed
-export ABW_TARBALL := libabw-0.1.3.tar.xz
-export APACHE_COMMONS_LOGGING_SHA256SUM := 49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
-export APACHE_COMMONS_LOGGING_TARBALL := commons-logging-1.2-src.tar.gz
-export APR_SHA256SUM := 1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb
-export APR_TARBALL := apr-1.5.2.tar.gz
-export APR_UTIL_SHA256SUM := 976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19
-export APR_UTIL_TARBALL := apr-util-1.5.4.tar.gz
-export BOOST_SHA256SUM := 8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
-export BOOST_TARBALL := boost_1_69_0.tar.bz2
-export BREAKPAD_SHA256SUM := 7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9
-export BREAKPAD_TARBALL := breakpad.zip
-export BSH_SHA256SUM := 9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96
-export BSH_TARBALL := beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
-export BZIP2_SHA256SUM := a2848f34fcd5d6cf47def00461fcb528a0484d8edef8208d6d2e2909dc61d9cd
-export BZIP2_TARBALL := 00b516f4704d4a7cb50a1d97e6e8e15b-bzip2-1.0.6.tar.gz
-export CAIRO_SHA256SUM := 5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
-export CAIRO_VERSION_MICRO := 0
-export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
-export CDR_SHA256SUM := 6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48
-export CDR_TARBALL := libcdr-0.1.5.tar.xz
-export CLUCENE_SHA256SUM := ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
-export CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
-export LIBCMIS_SHA256SUM := d7b18d9602190e10d437f8a964a32e983afd57e2db316a07d87477a79f5000a2
-export LIBCMIS_TARBALL := libcmis-0.5.2.tar.xz
-export COINMP_SHA256SUM := 86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f
-export COINMP_TARBALL := CoinMP-1.7.6.tgz
-export CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780
-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 := cdf18794393d8bead915312708a9e5d819c6e9919de14b20d5c8e7987abd9772
-export CURL_TARBALL := curl-7.71.0.tar.xz
-export EBOOK_SHA256SUM := 7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
-export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
-export EPOXY_SHA256SUM := 002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
-export EPOXY_TARBALL := libepoxy-1.5.3.tar.xz
-export EPM_SHA256SUM := b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91
-export EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
-export EPUBGEN_SHA256SUM := 03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad
-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 := 9a130948b05a82da34e4171d5f5ae5d321d9630277af02c8fa51e431f6475102
-export EXPAT_TARBALL := expat-2.2.8.tar.bz2
-export FIREBIRD_SHA256SUM := 6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
-export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
-export FONTCONFIG_SHA256SUM := cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
-export FONTCONFIG_TARBALL := fontconfig-2.12.6.tar.bz2
-export FONT_CALADEA_SHA256SUM := c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09
-export FONT_CALADEA_TARBALL := 368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
-export FONT_CARLITO_SHA256SUM := 4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a
-export FONT_CARLITO_TARBALL := c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
-export FONT_DEJAVU_SHA256SUM := 7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a
-export FONT_DEJAVU_TARBALL := 33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip
-export FONT_GENTIUM_SHA256SUM := 2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc
-export FONT_GENTIUM_TARBALL := 1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip
-export FONT_LIBERATION_NARROW_SHA256SUM := 8879d89b5ff7b506c9fc28efc31a5c0b954bbe9333e66e5283d27d20a8519ea3
-export FONT_LIBERATION_NARROW_TARBALL := liberation-narrow-fonts-ttf-1.07.6.tar.gz
-export FONT_LIBERATION_SHA256SUM := c40e95fc5e0ecb73d4be565ae2afc1114e2bc7dc5253e00ee92d8fd6cc4adf45
-export FONT_LIBERATION_TARBALL := liberation-fonts-ttf-2.00.4.tar.gz
-export FONT_LINLIBERTINEG_SHA256SUM := 54adcb2bc8cac0927a647fbd9362f45eff48130ce6e2379dc3867643019e08c5
-export FONT_LINLIBERTINEG_TARBALL := e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
-export FONT_SOURCECODE_SHA256SUM := 09466dce87653333f189acd8358c60c6736dcd95f042dee0b644bdcf65b6ae2f
-export FONT_SOURCECODE_TARBALL := 907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz
-export FONT_SOURCESANS_SHA256SUM := e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61
-export FONT_SOURCESANS_TARBALL := edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz
-export FONT_SOURCESERIF_SHA256SUM := 826a2b784d5cdb4c2bbc7830eb62871528360a61a52689c102a101623f1928e3
-export FONT_SOURCESERIF_TARBALL := source-serif-pro-3.000R.tar.gz
-export FONT_EMOJIONE_COLOR_SHA256SUM := d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7
-export FONT_EMOJIONE_COLOR_TARBALL := EmojiOneColor-SVGinOT-1.3.tar.gz
-export FONT_NOTO_SHA256SUM := 29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994
-export FONT_NOTO_TARBALL := noto-fonts-20171024.tar.gz
-export FONT_CULMUS_SHA256SUM := dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b
-export FONT_CULMUS_TARBALL := culmus-0.131.tar.gz
-export FONT_LIBRE_HEBREW_SHA256SUM := f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a
-export FONT_LIBRE_HEBREW_TARBALL := libre-hebrew-1.0.tar.gz
-export FONT_ALEF_SHA256SUM := b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52
-export FONT_ALEF_TARBALL := alef-1.001.tar.gz
-export FONT_AMIRI_SHA256SUM := 1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166
-export FONT_AMIRI_TARBALL := Amiri-0.111.zip
-export FONT_KACST_SHA256SUM := dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
-export FONT_KACST_TARBALL := ttf-kacst_2.01+mry.tar.gz
-export FONT_REEM_SHA256SUM := f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f
-export FONT_REEM_TARBALL := ReemKufi-0.7.zip
-export FONT_SCHEHERAZADE_SHA256SUM := 251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5
-export FONT_SCHEHERAZADE_TARBALL := Scheherazade-2.100.zip
-export FREEHAND_SHA256SUM := 0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac
-export FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
-export FREETYPE_SHA256SUM := db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
-export FREETYPE_TARBALL := freetype-2.9.1.tar.bz2
-export GLM_SHA256SUM := d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a
-export GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
-export GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb
-export GPGME_TARBALL := gpgme-1.9.0.tar.bz2
-export GRAPHITE_SHA256SUM := b8e892d8627c41888ff121e921455b9e2d26836978f2359173d19825da62b8fc
-export GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
-export HARFBUZZ_SHA256SUM := 9cf7d117548265f95ca884e2f4c9fafaf4e17d45a67b11107147b79eed76c966
-export HARFBUZZ_TARBALL := harfbuzz-2.6.0.tar.xz
-export HSQLDB_SHA256SUM := d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
-export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
-export HUNSPELL_SHA256SUM := 57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951
-export HUNSPELL_TARBALL := hunspell-1.7.0.tar.gz
-export HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
-export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
-export ICU_SHA256SUM := 53e37466b3d6d6d01ead029e3567d873a43a5d1c668ed2278e253b683136d948
-export ICU_TARBALL := icu4c-65_1-src.tgz
-export ICU_DATA_SHA256SUM := 06359a7c4ad125ba11d3ac30617cd4b932f1214f611db96573032726574896b6
-export ICU_DATA_TARBALL := icu4c-65_1-data.zip
-export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
-export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
-export JFREEREPORT_FLUTE_SHA256SUM := 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
-export JFREEREPORT_FLUTE_TARBALL := d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
-export JFREEREPORT_LIBBASE_SHA256SUM := 75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba
-export JFREEREPORT_LIBBASE_TARBALL := eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
-export JFREEREPORT_LIBFONTS_SHA256SUM := e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743
-export JFREEREPORT_LIBFONTS_TARBALL := 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
-export JFREEREPORT_LIBFORMULA_SHA256SUM := 5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b
-export JFREEREPORT_LIBFORMULA_TARBALL := 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
-export JFREEREPORT_LIBLAYOUT_SHA256SUM := e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772
-export JFREEREPORT_LIBLAYOUT_TARBALL := db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
-export JFREEREPORT_LIBLOADER_SHA256SUM := 3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8
-export JFREEREPORT_LIBLOADER_TARBALL := 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
-export JFREEREPORT_LIBREPOSITORY_SHA256SUM := abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095
-export JFREEREPORT_LIBREPOSITORY_TARBALL := 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
-export JFREEREPORT_LIBSERIALIZER_SHA256SUM := 05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343
-export JFREEREPORT_LIBSERIALIZER_TARBALL := f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
-export JFREEREPORT_LIBXML_SHA256SUM := 7d2797fe9f79a77009721e3f14fa4a1dec17a6d706bdc93f85f1f01d124fab66
-export JFREEREPORT_LIBXML_TARBALL := ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
-export JFREEREPORT_SAC_SHA256SUM := 085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
-export JFREEREPORT_SAC_TARBALL := 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
-export LIBJPEG_TURBO_SHA256SUM := b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523
-export LIBJPEG_TURBO_TARBALL := libjpeg-turbo-1.5.3.tar.gz
-export LANGTAGREG_SHA256SUM := fb1ee0dabfd956a445fbe9f351e86a52767808558f20f4256e67fbbb3768e9da
-export LANGTAGREG_TARBALL := language-subtag-registry-2020-04-01.tar.bz2
-export LANGUAGETOOL_SHA256SUM := 48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d
-export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
-export LCMS2_SHA256SUM := 48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20
-export LCMS2_TARBALL := lcms2-2.9.tar.gz
-export LIBASSUAN_SHA256SUM := 47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449
-export LIBASSUAN_TARBALL := libassuan-2.5.1.tar.bz2
-export LIBATOMIC_OPS_SHA256SUM := 1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665
-export LIBATOMIC_OPS_TARBALL := libatomic_ops-7.6.8.tar.gz
-export LIBEOT_SHA256SUM := cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a
-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
-export LIBLANGTAG_TARBALL := liblangtag-0.6.2.tar.bz2
-export LIBNUMBERTEXT_SHA256SUM := e1c9086b4cecb6b25f180316f30740dfabe6a4dbaf70dddc34276fc839e4f4f7
-export LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.5.tar.xz
-export LIBTOMMATH_SHA256SUM := 083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483
-export LIBTOMMATH_TARBALL := ltm-1.0.zip
-export XMLSEC_SHA256SUM := 13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4
-export XMLSEC_TARBALL := xmlsec1-1.2.28.tar.gz
-export LIBXML_SHA256SUM := aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
-export LIBXML_VERSION_MICRO := 10
-export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
-export LIBXSLT_SHA256SUM := 98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
-export LIBXSLT_VERSION_MICRO := 34
-export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
-export LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695
-export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
-export LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e
-export LXML_TARBALL := lxml-4.1.1.tgz
-export MARIADB_CONNECTOR_C_SHA256SUM := 431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
-export MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
-export MDDS_SHA256SUM := 144d6debd7be32726f332eac14ef9f17e2d3cf89cb3250eb31a7127e0789680d
-export MDDS_TARBALL := mdds-1.5.0.tar.bz2
-export MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
-export MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
-export MSPUB_SHA256SUM := ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
-export MSPUB_TARBALL := libmspub-0.1.4.tar.xz
-export MWAW_SHA256SUM := 0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1
-export MWAW_VERSION_MICRO := 15
-export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
-export MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
-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 := ec6032d78663c6ef90b4b83eb552dedf721d2bce208cec3bf527b8f637db7e45
-export NSS_TARBALL := nss-3.55-with-nspr-4.27.tar.gz
-export ODFGEN_SHA256SUM := 2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
-export ODFGEN_VERSION_MICRO := 6
-export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
-export ODFVALIDATOR_SHA256SUM := 984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504
-export ODFVALIDATOR_JAR := odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
-export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
-export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
-export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
-export OPENLDAP_TARBALL := openldap-2.4.45.tgz
-export OPENSSL_SHA256SUM := 14cb464efe7ac6b54799b34456bd69558a749a4931ecfd9cf9f71d7881cac7bc
-export OPENSSL_TARBALL := openssl-1.0.2t.tar.gz
-export ORCUS_SHA256SUM := 0dd26f3f2e611c51df9ee02d6dbf08887989eaa417b73f6877cd0d94df795fc2
-export ORCUS_TARBALL := liborcus-0.15.3.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 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 := 12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f
-export POSTGRESQL_TARBALL := postgresql-13.1.tar.bz2
-export PYTHON_SHA256SUM := f8d82e7572c86ec9d55c8627aae5040124fd2203af400c383c821b980306ee6b
-export PYTHON_TARBALL := Python-3.7.10.tar.xz
-export QRCODEGEN_SHA256SUM := fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
-export QRCODEGEN_TARBALL := QR-Code-generator-1.4.0.tar.gz
-export QXP_SHA256SUM := e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
-export QXP_TARBALL := libqxp-0.0.2.tar.xz
-export RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
-export RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
-export RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c
-export RASQAL_TARBALL := 1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz
-export REDLAND_SHA256SUM := de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681
-export REDLAND_TARBALL := e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz
-export REVENGE_SHA256SUM := c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf
-export REVENGE_VERSION_MICRO := 4
-export REVENGE_TARBALL := librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
-export RHINO_SHA256SUM := 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
-export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
-export SERF_SHA256SUM := 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700
-export SERF_TARBALL := serf-1.2.1.tar.bz2
-export STAROFFICE_SHA256SUM := 6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4
-export STAROFFICE_VERSION_MICRO := 6
-export STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz
-export SWING_SHA256SUM := 64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
-export SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
-export TWAIN_DSM_SHA256SUM := 82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6
-export TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
-export UCPP_SHA256SUM := 983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
-export UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
-export VISIO_SHA256SUM := 8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
-export VISIO_TARBALL := libvisio-0.1.7.tar.xz
-export WPD_SHA256SUM := 2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
-export WPD_VERSION_MICRO := 3
-export WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
-export WPG_SHA256SUM := 99b3f7f8832385748582ab8130fbb9e5607bd5179bebf9751ac1d51a53099d1c
-export WPG_VERSION_MICRO := 3
-export WPG_TARBALL := libwpg-0.3.$(WPG_VERSION_MICRO).tar.xz
-export WPS_SHA256SUM := 1421e034286a9f96d3168a1c54ea570ee7aa008ca07b89de005ad5ce49fb29ca
-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 ZMF_SHA256SUM := 27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22
-export ZMF_TARBALL := libzmf-0.0.2.tar.xz
+ABW_SHA256SUM := e763a9dc21c3d2667402d66e202e3f8ef4db51b34b79ef41f56cacb86dcd6eed
+ABW_TARBALL := libabw-0.1.3.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+APR_SHA256SUM := 1af06e1720a58851d90694a984af18355b65bb0d047be03ec7d659c746d6dbdb
+APR_TARBALL := apr-1.5.2.tar.gz
+APR_UTIL_SHA256SUM := 976a12a59bc286d634a21d7be0841cc74289ea9077aa1af46be19d1a6e844c19
+APR_UTIL_TARBALL := apr-util-1.5.4.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+BOOST_SHA256SUM := 8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
+BOOST_TARBALL := boost_1_69_0.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+BREAKPAD_SHA256SUM := 7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a14686fb311cb9
+BREAKPAD_TARBALL := breakpad.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+BSH_SHA256SUM := 9e93c73e23aff644b17dfff656444474c14150e7f3b38b19635e622235e01c96
+BSH_TARBALL := beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+BZIP2_SHA256SUM := ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
+BZIP2_TARBALL := bzip2-1.0.8.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CAIRO_SHA256SUM := 5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
+CAIRO_VERSION_MICRO := 0
+CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CDR_SHA256SUM := 6ace5c499a8be34ad871e825442ce388614ae2d8675c4381756a7319429e3a48
+CDR_TARBALL := libcdr-0.1.5.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CLUCENE_SHA256SUM := ddfdc433dd8ad31b5c5819cc4404a8d2127472a3b720d3e744e8c51d79732eab
+CLUCENE_TARBALL := 48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBCMIS_SHA256SUM := d7b18d9602190e10d437f8a964a32e983afd57e2db316a07d87477a79f5000a2
+LIBCMIS_TARBALL := libcmis-0.5.2.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+COINMP_SHA256SUM := 86c798780b9e1f5921fe4efe651a93cb420623b45aa1fdff57af8c37f116113f
+COINMP_TARBALL := CoinMP-1.7.6.tgz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52bfd29d674780
+CPPUNIT_TARBALL := cppunit-1.14.0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CT2N_SHA256SUM := 71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
+CT2N_TARBALL := 1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+CURL_SHA256SUM := 0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0
+CURL_TARBALL := curl-8.0.1.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+EBOOK_SHA256SUM := 7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
+EBOOK_TARBALL := libe-book-0.1.3.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+EPOXY_SHA256SUM := 002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
+EPOXY_TARBALL := libepoxy-1.5.3.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+EPM_SHA256SUM := b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7713ddb91
+EPM_TARBALL := 3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+EPUBGEN_SHA256SUM := 03e084b994cbeffc8c3dd13303b2cb805f44d8f2c3b79f7690d7e3fc7f6215ad
+EPUBGEN_TARBALL := libepubgen-0.1.1.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ETONYEK_SHA256SUM := e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a
+ETONYEK_VERSION_MICRO := 9
+ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+EXPAT_SHA256SUM := cb5f5a8ea211e1cabd59be0a933a52e3c02cc326e86a4d387d8d218e7ee47a3e
+EXPAT_TARBALL := expat-2.6.0.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FIREBIRD_SHA256SUM := 6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
+FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONTCONFIG_SHA256SUM := cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
+FONTCONFIG_TARBALL := fontconfig-2.12.6.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_CALADEA_SHA256SUM := c48d1c2fd613c9c06c959c34da7b8388059e2408d2bb19845dc3ed35f76e4d09
+FONT_CALADEA_TARBALL := 368f114c078f94214a308a74c7e991bc-crosextrafonts-20130214.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_CARLITO_SHA256SUM := 4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a
+FONT_CARLITO_TARBALL := c74b7223abe75949b4af367942d96c7a-crosextrafonts-carlito-20130920.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_DEJAVU_SHA256SUM := 7576310b219e04159d35ff61dd4a4ec4cdba4f35c00e002a136f00e96a908b0a
+FONT_DEJAVU_TARBALL := 33e1e61fab06a547851ed308b4ffef42-dejavu-fonts-ttf-2.37.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_GENTIUM_SHA256SUM := 2f1a2c5491d7305dffd3520c6375d2f3e14931ee35c6d8ae1e8f098bf1a7b3cc
+FONT_GENTIUM_TARBALL := 1725634df4bb3dcb1b2c91a6175f8789-GentiumBasic_1102.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_LIBERATION_NARROW_SHA256SUM := 8879d89b5ff7b506c9fc28efc31a5c0b954bbe9333e66e5283d27d20a8519ea3
+FONT_LIBERATION_NARROW_TARBALL := liberation-narrow-fonts-ttf-1.07.6.tar.gz
+FONT_LIBERATION_SHA256SUM := c40e95fc5e0ecb73d4be565ae2afc1114e2bc7dc5253e00ee92d8fd6cc4adf45
+FONT_LIBERATION_TARBALL := liberation-fonts-ttf-2.00.4.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_LINLIBERTINEG_SHA256SUM := 54adcb2bc8cac0927a647fbd9362f45eff48130ce6e2379dc3867643019e08c5
+FONT_LINLIBERTINEG_TARBALL := e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_SOURCECODE_SHA256SUM := 09466dce87653333f189acd8358c60c6736dcd95f042dee0b644bdcf65b6ae2f
+FONT_SOURCECODE_TARBALL := 907d6e99f241876695c19ff3db0b8923-source-code-pro-2.030R-ro-1.050R-it.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_SOURCESANS_SHA256SUM := e7bc9a1fec787a529e49f5a26b93dcdcf41506449dfc70f92cdef6d17eb6fb61
+FONT_SOURCESANS_TARBALL := edc4d741888bc0d38e32dbaa17149596-source-sans-pro-2.010R-ro-1.065R-it.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_SOURCESERIF_SHA256SUM := 826a2b784d5cdb4c2bbc7830eb62871528360a61a52689c102a101623f1928e3
+FONT_SOURCESERIF_TARBALL := source-serif-pro-3.000R.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_EMOJIONE_COLOR_SHA256SUM := d1a08f7c10589f22740231017694af0a7a270760c8dec33d8d1c038e2be0a0c7
+FONT_EMOJIONE_COLOR_TARBALL := EmojiOneColor-SVGinOT-1.3.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_NOTO_SHA256SUM := 29acc15a4c4d6b51201ba5d60f303dfbc2e5acbfdb70413c9ae1ed34fa259994
+FONT_NOTO_TARBALL := noto-fonts-20171024.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_CULMUS_SHA256SUM := dcf112cfcccb76328dcfc095f4d7c7f4d2f7e48d0eed5e78b100d1d77ce2ed1b
+FONT_CULMUS_TARBALL := culmus-0.131.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_LIBRE_HEBREW_SHA256SUM := f596257c1db706ce35795b18d7f66a4db99d427725f20e9384914b534142579a
+FONT_LIBRE_HEBREW_TARBALL := libre-hebrew-1.0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_ALEF_SHA256SUM := b98b67602a2c8880a1770f0b9e37c190f29a7e2ade5616784f0b89fbdb75bf52
+FONT_ALEF_TARBALL := alef-1.001.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_AMIRI_SHA256SUM := 1fbfccced6348b5db2c1c21d5b319cd488e14d055702fa817a0f6cb83d882166
+FONT_AMIRI_TARBALL := Amiri-0.111.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_KACST_SHA256SUM := dca00f5e655f2f217a766faa73a81f542c5c204aa3a47017c3c2be0b31d00a56
+FONT_KACST_TARBALL := ttf-kacst_2.01+mry.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_REEM_SHA256SUM := f60c6508d209ce4236d2d7324256c2ffddd480be7e3d6023770b93dc391a605f
+FONT_REEM_TARBALL := ReemKufi-0.7.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FONT_SCHEHERAZADE_SHA256SUM := 251c8817ceb87d9b661ce1d5b49e732a0116add10abc046be4b8ba5196e149b5
+FONT_SCHEHERAZADE_TARBALL := Scheherazade-2.100.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FREEHAND_SHA256SUM := 0e422d1564a6dbf22a9af598535425271e583514c0f7ba7d9091676420de34ac
+FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+FREETYPE_SHA256SUM := db8d87ea720ea9d5edc5388fc7a0497bb11ba9fe972245e0f7f4c7e8b1e1e84d
+FREETYPE_TARBALL := freetype-2.9.1.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+GLM_SHA256SUM := d0312c360efe04dd048b3311fe375ff36f1993b4c2e3cb58c81062990532904a
+GLM_TARBALL := bae83fa5dc7f081768daace6e199adc3-glm-0.9.4.6-libreoffice.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+GPGME_SHA256SUM := 1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb
+GPGME_TARBALL := gpgme-1.9.0.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+GRAPHITE_SHA256SUM := b8e892d8627c41888ff121e921455b9e2d26836978f2359173d19825da62b8fc
+GRAPHITE_TARBALL := graphite2-minimal-1.3.14.tgz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+HARFBUZZ_SHA256SUM := 9cf7d117548265f95ca884e2f4c9fafaf4e17d45a67b11107147b79eed76c966
+HARFBUZZ_TARBALL := harfbuzz-2.6.0.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+HSQLDB_SHA256SUM := d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
+HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+HUNSPELL_SHA256SUM := 57be4e03ae9dd62c3471f667a0d81a14513e314d4d92081292b90435944ff951
+HUNSPELL_TARBALL := hunspell-1.7.0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
+HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ICU_SHA256SUM := 53e37466b3d6d6d01ead029e3567d873a43a5d1c668ed2278e253b683136d948
+ICU_TARBALL := icu4c-65_1-src.tgz
+ICU_DATA_SHA256SUM := 06359a7c4ad125ba11d3ac30617cd4b932f1214f611db96573032726574896b6
+ICU_DATA_TARBALL := icu4c-65_1-data.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+JFREEREPORT_FLOW_ENGINE_SHA256SUM := 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
+JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
+JFREEREPORT_FLUTE_SHA256SUM := 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
+JFREEREPORT_FLUTE_TARBALL := d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
+JFREEREPORT_LIBBASE_SHA256SUM := 75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba
+JFREEREPORT_LIBBASE_TARBALL := eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
+JFREEREPORT_LIBFONTS_SHA256SUM := e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743
+JFREEREPORT_LIBFONTS_TARBALL := 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
+JFREEREPORT_LIBFORMULA_SHA256SUM := 5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b
+JFREEREPORT_LIBFORMULA_TARBALL := 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
+JFREEREPORT_LIBLAYOUT_SHA256SUM := e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772
+JFREEREPORT_LIBLAYOUT_TARBALL := db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
+JFREEREPORT_LIBLOADER_SHA256SUM := 3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8
+JFREEREPORT_LIBLOADER_TARBALL := 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
+JFREEREPORT_LIBREPOSITORY_SHA256SUM := abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095
+JFREEREPORT_LIBREPOSITORY_TARBALL := 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
+JFREEREPORT_LIBSERIALIZER_SHA256SUM := 05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343
+JFREEREPORT_LIBSERIALIZER_TARBALL := f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
+JFREEREPORT_LIBXML_SHA256SUM := 7d2797fe9f79a77009721e3f14fa4a1dec17a6d706bdc93f85f1f01d124fab66
+JFREEREPORT_LIBXML_TARBALL := ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
+JFREEREPORT_SAC_SHA256SUM := 085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
+JFREEREPORT_SAC_TARBALL := 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBJPEG_TURBO_SHA256SUM := b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523
+LIBJPEG_TURBO_TARBALL := libjpeg-turbo-1.5.3.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LANGTAGREG_SHA256SUM := fb1ee0dabfd956a445fbe9f351e86a52767808558f20f4256e67fbbb3768e9da
+LANGTAGREG_TARBALL := language-subtag-registry-2020-04-01.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LANGUAGETOOL_SHA256SUM := 48c87e41636783bba438b65fd895821e369ed139e1465fac654323ad93c5a82d
+LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LCMS2_SHA256SUM := 48c6fdf98396fa245ed86e622028caf49b96fa22f3e5734f853f806fbc8e7d20
+LCMS2_TARBALL := lcms2-2.9.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBASSUAN_SHA256SUM := 47f96c37b4f2aac289f0bc1bacfa8bd8b4b209a488d3d15e2229cb6cc9b26449
+LIBASSUAN_TARBALL := libassuan-2.5.1.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBATOMIC_OPS_SHA256SUM := 1d6a279edf81767e74d2ad2c9fce09459bc65f12c6525a40b0cb3e53c089f665
+LIBATOMIC_OPS_TARBALL := libatomic_ops-7.6.8.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBEOT_SHA256SUM := cf5091fa8e7dcdbe667335eb90a2cfdd0a3fe8f8c7c8d1ece44d9d055736a06a
+LIBEOT_TARBALL := libeot-0.01.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBEXTTEXTCAT_SHA256SUM := 13fdbc9d4c489a4d0519e51933a1aa21fe3fb9eb7da191b87f7a63e82797dac8
+LIBEXTTEXTCAT_TARBALL := libexttextcat-3.4.5.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBFFI_SHA256SUM := 72fba7922703ddfa7a028d513ac15a85c8d54c8d67f55fa5a4802885dc652056
+LIBFFI_TARBALL := libffi-3.3.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBGPGERROR_SHA256SUM := 4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2
+LIBGPGERROR_TARBALL := libgpg-error-1.27.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBLANGTAG_SHA256SUM := 5ed6bcd4ae3f3c05c912e62f216cd1a44123846147f729a49fb5668da51e030e
+LIBLANGTAG_TARBALL := liblangtag-0.6.7.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBNUMBERTEXT_SHA256SUM := e1c9086b4cecb6b25f180316f30740dfabe6a4dbaf70dddc34276fc839e4f4f7
+LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.5.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBTOMMATH_SHA256SUM := 986025d7b374276fee2e30e99f3649e4ac0db8a02257a37ee10eae72abed0d1f
+LIBTOMMATH_TARBALL := ltm-1.2.1.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+XMLSEC_SHA256SUM := 13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4
+XMLSEC_TARBALL := xmlsec1-1.2.28.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBXML_SHA256SUM := a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
+LIBXML_VERSION_MICRO := 5
+LIBXML_TARBALL := libxml2-2.12.$(LIBXML_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBXSLT_SHA256SUM := 2a20ad621148339b0759c4d4e96719362dee64c9a096dbba625ba053846349f0
+LIBXSLT_VERSION_MICRO := 39
+LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695
+LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e
+LXML_TARBALL := lxml-4.1.1.tgz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MARIADB_CONNECTOR_C_SHA256SUM := 431434d3926f4bcce2e5c97240609983f60d7ff50df5a72083934759bb863f7b
+MARIADB_CONNECTOR_C_TARBALL := mariadb-connector-c-3.1.8-src.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MDDS_SHA256SUM := 144d6debd7be32726f332eac14ef9f17e2d3cf89cb3250eb31a7127e0789680d
+MDDS_TARBALL := mdds-1.5.0.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e3990d68aabf6e8b3f5a0
+MDNSRESPONDER_TARBALL := mDNSResponder-878.200.35.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MSPUB_SHA256SUM := ef36c1a1aabb2ba3b0bedaaafe717bf4480be2ba8de6f3894be5fd3702b013ba
+MSPUB_TARBALL := libmspub-0.1.4.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MWAW_SHA256SUM := 0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868
+MWAW_VERSION_MICRO := 16
+MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b0e0790a305f
+MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+NEON_SHA256SUM := db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
+NEON_TARBALL := neon-0.30.2.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+NSS_SHA256SUM := 59bb55a59b02e4004fc26ad0aa1a13fe8d73c6c90c447dd2f2efb73fb81083ed
+NSS_TARBALL := nss-3.98-with-nspr-4.35.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ODFGEN_SHA256SUM := 55200027fd46623b9bdddd38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625
+ODFGEN_VERSION_MICRO := 8
+ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ODFVALIDATOR_SHA256SUM := 984f2a479df79e27e7b01a5815ac53ae64e07746b882262d8a64566494515504
+ODFVALIDATOR_JAR := odfvalidator-1.2.0-incubating-SNAPSHOT-jar-with-dependencies-971c54fd38a968f5860014b44301872706f9e540.jar
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
+OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34
+OPENLDAP_TARBALL := openldap-2.4.59.tgz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+OPENSSL_SHA256SUM := 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
+OPENSSL_TARBALL := openssl-1.1.1t.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ORCUS_SHA256SUM := 0dd26f3f2e611c51df9ee02d6dbf08887989eaa417b73f6877cd0d94df795fc2
+ORCUS_TARBALL := liborcus-0.15.3.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
+OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
+PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+PDFIUM_SHA256SUM := b1052ff24e9ffb11af017c444bb0f6ad508d64c9a0fb88cacb0e8210245dde06
+PDFIUM_TARBALL := pdfium-5778.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
+PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
+LIBPNG_TARBALL := libpng-1.6.37.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+POPPLER_SHA256SUM := 80d1d44dd8bdf4ac1a47d56c5065075eb9991790974b1ed7d14b972acde88e55
+POPPLER_TARBALL := poppler-23.09.0.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2
+POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+PYTHON_SHA256SUM := d2807ac69f69b84fd46a0b93bbd02a4fa48d3e70f4b2835ff0f72a2885040076
+PYTHON_TARBALL := Python-3.8.19.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+QRCODEGEN_SHA256SUM := fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
+QRCODEGEN_TARBALL := QR-Code-generator-1.4.0.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+QXP_SHA256SUM := e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
+QXP_TARBALL := libqxp-0.0.2.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
+RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+RASQAL_SHA256SUM := 6924c9ac6570bd241a9669f83b467c728a322470bf34f4b2da4f69492ccfd97c
+RASQAL_TARBALL := 1f5def51ca0026cd192958ef07228b52-rasqal-0.9.33.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+REDLAND_SHA256SUM := de1847f7b59021c16bdc72abb4d8e2d9187cd6124d69156f3326dd34ee043681
+REDLAND_TARBALL := e5be03eda13ef68aabab6e42aa67715e-redland-1.0.17.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+REVENGE_SHA256SUM := c51601cd08320b75702812c64aae0653409164da7825fd0f451ac2c5dbe77cbf
+REVENGE_VERSION_MICRO := 4
+REVENGE_TARBALL := librevenge-0.0.$(REVENGE_VERSION_MICRO).tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+RHINO_SHA256SUM := 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
+RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+SERF_SHA256SUM := 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700
+SERF_TARBALL := serf-1.2.1.tar.bz2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+STAROFFICE_SHA256SUM := 6b00e1ed8194e6072be4441025d1b888e39365727ed5b23e0e8c92c4009d1ec4
+STAROFFICE_VERSION_MICRO := 6
+STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+SWING_SHA256SUM := 64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
+SWING_TARBALL := 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+TWAIN_DSM_SHA256SUM := 82c818be771f242388457aa8c807e4b52aa84dc22b21c6c56184a6b4cbb085e6
+TWAIN_DSM_TARBALL := twaindsm_2.4.1.orig.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+UCPP_SHA256SUM := 983941d31ee8d366085cadf28db75eb1f5cb03ba1e5853b98f12f7f51c63b776
+UCPP_TARBALL := 0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+VISIO_SHA256SUM := 8faf8df870cb27b09a787a1959d6c646faa44d0d8ab151883df408b7166bea4c
+VISIO_TARBALL := libvisio-0.1.7.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+WPD_SHA256SUM := 2465b0b662fdc5d4e3bebcdc9a79027713fb629ca2bff04a3c9251fdec42dd09
+WPD_VERSION_MICRO := 3
+WPD_TARBALL := libwpd-0.10.$(WPD_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+WPG_SHA256SUM := 99b3f7f8832385748582ab8130fbb9e5607bd5179bebf9751ac1d51a53099d1c
+WPG_VERSION_MICRO := 3
+WPG_TARBALL := libwpg-0.3.$(WPG_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+WPS_SHA256SUM := 1421e034286a9f96d3168a1c54ea570ee7aa008ca07b89de005ad5ce49fb29ca
+WPS_VERSION_MICRO := 10
+WPS_TARBALL := libwps-0.4.$(WPS_VERSION_MICRO).tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+XSLTML_SHA256SUM := 75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870
+XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ZLIB_SHA256SUM := d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98
+ZLIB_TARBALL := zlib-1.2.13.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+ZMF_SHA256SUM := 27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22
+ZMF_TARBALL := libzmf-0.0.2.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
NUMBERTEXT_EXTENSION_SHA256SUM := 1568ed1d2feb8210bb5de61d69574a165cded536cfa17c6953c9064076469de2
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
UNOWINREG_SHA256SUM := eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
OPENSYMBOL_SHA256SUM := 884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 69f9e33215a8..9ad9e1a78c26 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -346,7 +346,7 @@ namespace emfplushelper
}
else // we use a pen
{
- const EMFPPen* pen = static_cast<EMFPPen*>(maEMFPObjects[brushIndexOrColor & 0xff].get());
+ const EMFPPen* pen = dynamic_cast<EMFPPen*>(maEMFPObjects[brushIndexOrColor & 0xff].get());
if (pen)
{
color = pen->GetColor();
@@ -620,7 +620,7 @@ namespace emfplushelper
}
else // use Brush
{
- EMFPBrush* brush = static_cast<EMFPBrush*>( maEMFPObjects[brushIndexOrColor & 0xff].get() );
+ EMFPBrush* brush = dynamic_cast<EMFPBrush*>( maEMFPObjects[brushIndexOrColor & 0xff].get() );
SAL_INFO("drawinglayer", "EMF+\t Fill polygon, brush slot: " << brushIndexOrColor << " (brush type: " << (brush ? brush->GetType() : -1) << ")");
// give up in case something wrong happened
@@ -1120,7 +1120,11 @@ namespace emfplushelper
rMS.ReadUInt32(brushIndexOrColor);
SAL_INFO("drawinglayer", "EMF+ FillRegion slot: " << index);
- EMFPPlusFillPolygon(static_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get())->regionPolyPolygon, flags & 0x8000, brushIndexOrColor);
+ EMFPRegion* region = dynamic_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get());
+ if (region)
+ EMFPPlusFillPolygon(region->regionPolyPolygon, flags & 0x8000, brushIndexOrColor);
+ else
+ SAL_WARN("drawinglayer.emf", "EMF+\tEmfPlusRecordTypeFillRegion missing region");
}
break;
case EmfPlusRecordTypeDrawEllipse:
@@ -1295,9 +1299,10 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+\tTODO: use image attributes");
// For DrawImage and DrawImagePoints, source unit of measurement type must be 1 pixel
- if (sourceUnit == UnitTypePixel && maEMFPObjects[flags & 0xff].get())
+ if (EMFPImage* image = sourceUnit == UnitTypePixel ?
+ dynamic_cast<EMFPImage*>(maEMFPObjects[flags & 0xff].get()) :
+ nullptr)
{
- EMFPImage& image = *static_cast<EMFPImage *>(maEMFPObjects[flags & 0xff].get());
float sx, sy, sw, sh;
ReadRectangle(rMS, sx, sy, sw, sh);
::tools::Rectangle aSource(Point(sx, sy), Size(sw, sh));
@@ -1352,9 +1357,9 @@ namespace emfplushelper
/* Row 1, Column 1 */ aDstSize.getY(),
/* Row 1, Column 2 */ aDstPoint.getY());
- if (image.type == ImageDataTypeBitmap)
+ if (image->type == ImageDataTypeBitmap)
{
- BitmapEx aBmp(image.graphic.GetBitmapEx());
+ BitmapEx aBmp(image->graphic.GetBitmapEx());
aBmp.Crop(aSource);
Size aSize(aBmp.GetSizePixel());
SAL_INFO("drawinglayer", "EMF+\t bitmap size: " << aSize.Width() << "x" << aSize.Height());
@@ -1369,9 +1374,9 @@ namespace emfplushelper
break;
}
}
- else if (image.type == ImageDataTypeMetafile)
+ else if (image->type == ImageDataTypeMetafile)
{
- GDIMetaFile aGDI(image.graphic.GetGDIMetaFile());
+ GDIMetaFile aGDI(image->graphic.GetGDIMetaFile());
aGDI.Clip(aSource);
mrTargetHolders.Current().append(
std::make_unique<drawinglayer::primitive2d::MetafilePrimitive2D>(aTransformMatrix, aGDI));
@@ -1405,7 +1410,7 @@ namespace emfplushelper
// get the stringFormat from the Object table ( this is OPTIONAL and may be nullptr )
const EMFPStringFormat *stringFormat = dynamic_cast<EMFPStringFormat*>(maEMFPObjects[formatId & 0xff].get());
// get the font from the flags
- const EMFPFont *font = static_cast< EMFPFont* >( maEMFPObjects[flags & 0xff].get() );
+ const EMFPFont *font = dynamic_cast<EMFPFont*>(maEMFPObjects[flags & 0xff].get());
if (!font)
{
break;
@@ -1770,7 +1775,7 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+ SetClipPath combine mode: " << combineMode);
SAL_INFO("drawinglayer", "EMF+\tpath in slot: " << (flags & 0xff));
- EMFPPath *path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
+ EMFPPath *path = dynamic_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
if (!path)
{
SAL_WARN("drawinglayer", "EMF+\t TODO Unable to find path in slot: " << (flags & 0xff));
@@ -1787,7 +1792,7 @@ namespace emfplushelper
int combineMode = (flags >> 8) & 0xf;
SAL_INFO("drawinglayer", "EMF+ SetClipRegion");
SAL_INFO("drawinglayer", "EMF+\tregion in slot: " << (flags & 0xff) << " combine mode: " << combineMode);
- EMFPRegion *region = static_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get());
+ EMFPRegion *region = dynamic_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get());
if (!region)
{
SAL_WARN("drawinglayer", "EMF+\t TODO Unable to find region in slot: " << (flags & 0xff));
@@ -1856,7 +1861,7 @@ namespace emfplushelper
}
// get the font from the flags
- EMFPFont *font = static_cast< EMFPFont* >( maEMFPObjects[flags & 0xff].get() );
+ EMFPFont *font = dynamic_cast<EMFPFont*>(maEMFPObjects[flags & 0xff].get());
if (!font)
{
break;
diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index 65170ae096f2..4c12c32ae079 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -16,6 +16,8 @@
#include <tools/XmlWriter.hxx>
#include <memory>
+#include <libxml/parser.h>
+#include <sal/log.hxx>
#include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
diff --git a/dtrans/Library_dnd.mk b/dtrans/Library_dnd.mk
deleted file mode 100644
index 8eecd53db50c..000000000000
--- a/dtrans/Library_dnd.mk
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,dnd))
-
-$(eval $(call gb_Library_set_componentfile,dnd,dtrans/util/dnd))
-
-$(eval $(call gb_Library_use_externals,dnd, \
- boost_headers \
-))
-
-$(eval $(call gb_Library_use_sdk_api,dnd))
-
-$(eval $(call gb_Library_use_libraries,dnd,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
-))
-
-$(eval $(call gb_Library_use_system_win32_libs,dnd,\
- advapi32 \
- gdi32 \
- ole32 \
- oleaut32 \
- shell32 \
- uuid \
-))
-
-$(eval $(call gb_Library_use_static_libraries,dnd,\
- dtobj \
-))
-
-$(eval $(call gb_Library_add_exception_objects,dnd,\
- dtrans/source/win32/dnd/dndentry \
- dtrans/source/win32/dnd/globals \
- dtrans/source/win32/dnd/idroptarget \
- dtrans/source/win32/dnd/sourcecontext \
- dtrans/source/win32/dnd/source \
- dtrans/source/win32/dnd/target \
- dtrans/source/win32/dnd/targetdragcontext \
- dtrans/source/win32/dnd/targetdropcontext \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dtrans/Library_dtrans.mk b/dtrans/Library_dtrans.mk
deleted file mode 100644
index a4f3413fc4f6..000000000000
--- a/dtrans/Library_dtrans.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,dtrans))
-
-$(eval $(call gb_Library_set_componentfile,dtrans,dtrans/source/generic/dtrans))
-
-$(eval $(call gb_Library_use_sdk_api,dtrans))
-
-$(eval $(call gb_Library_use_libraries,dtrans,\
- cppu \
- cppuhelper \
- sal \
-))
-
-$(eval $(call gb_Library_add_exception_objects,dtrans,\
- dtrans/source/generic/clipboardmanager \
- dtrans/source/generic/dtrans \
- dtrans/source/generic/generic_clipboard \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dtrans/Library_ftransl.mk b/dtrans/Library_ftransl.mk
deleted file mode 100644
index 5a16ee83c419..000000000000
--- a/dtrans/Library_ftransl.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,ftransl))
-
-$(eval $(call gb_Library_set_componentfile,ftransl,dtrans/util/ftransl))
-
-$(eval $(call gb_Library_use_sdk_api,ftransl))
-
-$(eval $(call gb_Library_use_libraries,ftransl,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
-))
-
-$(eval $(call gb_Library_use_system_win32_libs,ftransl,\
- advapi32 \
- gdi32 \
- ole32 \
-))
-
-$(eval $(call gb_Library_use_static_libraries,ftransl,\
- dtobj \
-))
-
-$(eval $(call gb_Library_add_exception_objects,ftransl,\
- dtrans/source/win32/ftransl/ftransl \
- dtrans/source/win32/ftransl/ftranslentry \
-))
-
-$(eval $(call gb_Library_set_include,ftransl,\
- -I$(SRCDIR)/dtrans/source/inc \
- $$(INCLUDE) \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dtrans/Library_sysdtrans.mk b/dtrans/Library_sysdtrans.mk
deleted file mode 100644
index ba8b5601f699..000000000000
--- a/dtrans/Library_sysdtrans.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# 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 .
-#
-
-$(eval $(call gb_Library_Library,sysdtrans))
-
-$(eval $(call gb_Library_set_componentfile,sysdtrans,dtrans/util/sysdtrans))
-
-$(eval $(call gb_Library_use_sdk_api,sysdtrans))
-
-$(eval $(call gb_Library_use_libraries,sysdtrans,\
- comphelper \
- cppu \
- cppuhelper \
- sal \
-))
-
-$(eval $(call gb_Library_use_system_win32_libs,sysdtrans,\
- advapi32 \
- gdi32 \
- ole32 \
- oleaut32 \
- shell32 \
- uuid \
-))
-
-$(eval $(call gb_Library_use_static_libraries,sysdtrans,\
- dtobj \
-))
-
-$(eval $(call gb_Library_add_exception_objects,sysdtrans,\
- dtrans/source/win32/clipb/WinClipbImpl \
- dtrans/source/win32/clipb/WinClipboard \
- dtrans/source/win32/clipb/wcbentry \
- dtrans/source/win32/clipb/MtaOleClipb \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dtrans/Module_dtrans.mk b/dtrans/Module_dtrans.mk
index 2ddc6f48a925..f583c41e88bb 100644
--- a/dtrans/Module_dtrans.mk
+++ b/dtrans/Module_dtrans.mk
@@ -23,14 +23,4 @@ $(eval $(call gb_Module_add_targets,dtrans,\
Library_mcnttype \
))
-ifeq ($(OS),WNT)
-$(eval $(call gb_Module_add_targets,dtrans,\
- Library_dnd \
- Library_dtrans \
- Library_ftransl \
- Library_sysdtrans \
- StaticLibrary_dtobj \
-))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/dtrans/README b/dtrans/README
index 23555bce65aa..73aca8b6e496 100644
--- a/dtrans/README
+++ b/dtrans/README
@@ -1 +1,3 @@
-Clipboard abstraction - data transfer.
+Used to be a module for data transfer, but just contained Windows code.
+Now it just contains the MimeContentTypeFactory, which probably should move to
+vcl too, since it's just used there.
diff --git a/dtrans/StaticLibrary_dtobj.mk b/dtrans/StaticLibrary_dtobj.mk
deleted file mode 100644
index 04ed1c53249f..000000000000
--- a/dtrans/StaticLibrary_dtobj.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# 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 .
-#
-
-$(eval $(call gb_StaticLibrary_StaticLibrary,dtobj))
-
-$(eval $(call gb_StaticLibrary_use_sdk_api,dtobj))
-
-$(eval $(call gb_StaticLibrary_add_exception_objects,dtobj,\
- dtrans/source/win32/dtobj/APNDataObject \
- dtrans/source/win32/dtobj/DataFmtTransl \
- dtrans/source/win32/dtobj/DOTransferable \
- dtrans/source/win32/dtobj/DtObjFactory \
- dtrans/source/win32/dtobj/DTransHelper \
- dtrans/source/win32/dtobj/Fetc \
- dtrans/source/win32/dtobj/FetcList \
- dtrans/source/win32/dtobj/FmtFilter \
- dtrans/source/win32/dtobj/TxtCnvtHlp \
- dtrans/source/win32/dtobj/XNotifyingDataObject \
- dtrans/source/win32/dtobj/XTDataObject \
- dtrans/source/win32/misc/ImplHelper \
-))
-
-$(eval $(call gb_StaticLibrary_set_include,dtobj,\
- -I$(SRCDIR)/dtrans/source/inc \
- $$(INCLUDE) \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/dtrans/source/generic/dtrans.cxx b/dtrans/source/generic/dtrans.cxx
deleted file mode 100644
index 14cdecd817f4..000000000000
--- a/dtrans/source/generic/dtrans.cxx
+++ /dev/null
@@ -1,74 +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 <cppuhelper/factory.hxx>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include "clipboardmanager.hxx"
-#include "generic_clipboard.hxx"
-
-using namespace com::sun::star::lang;
-using namespace com::sun::star::registry;
-using namespace com::sun::star::uno;
-using namespace cppu;
-
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void * dtrans_component_getFactory(
- const sal_Char * pImplName,
- void * pServiceManager,
- void * /*pRegistryKey*/
-)
-{
- void * pRet = nullptr;
-
- if (pServiceManager)
- {
- Reference< XSingleServiceFactory > xFactory;
-
- if (rtl_str_compare( pImplName, CLIPBOARDMANAGER_IMPLEMENTATION_NAME ) == 0)
- {
- xFactory = createOneInstanceFactory(
- static_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- ClipboardManager_createInstance,
- ClipboardManager_getSupportedServiceNames() );
- }
- else if (rtl_str_compare( pImplName, GENERIC_CLIPBOARD_IMPLEMENTATION_NAME ) == 0)
- {
- xFactory = createSingleFactory(
- static_cast< XMultiServiceFactory * >( pServiceManager ),
- OUString::createFromAscii( pImplName ),
- GenericClipboard_createInstance,
- GenericClipboard_getSupportedServiceNames() );
- }
-
- if (xFactory.is())
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/APNDataObject.hxx b/dtrans/source/win32/clipb/APNDataObject.hxx
deleted file mode 100644
index c48d14117ef7..000000000000
--- a/dtrans/source/win32/clipb/APNDataObject.hxx
+++ /dev/null
@@ -1,72 +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 .
- */
-
-#ifndef INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_APNDATAOBJECT_HXX
-#define INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_APNDATAOBJECT_HXX
-
-/*
- an APartment Neutral dataobject wrapper; this wrapper of an IDataObject
- pointer can be used from any apartment without RPC_E_WRONG_THREAD
- which normally occurs if an apartment tries to use an interface
- pointer of another apartment; we use containment to hold the original
- DataObject
-*/
-class CAPNDataObject : public IDataObject
-{
-public:
- CAPNDataObject( IDataObjectPtr rIDataObject );
- ~CAPNDataObject( );
-
- //IUnknown interface methods
-
- STDMETHODIMP QueryInterface(REFIID iid, LPVOID* ppvObject);
- STDMETHODIMP_( ULONG ) AddRef( );
- STDMETHODIMP_( ULONG ) Release( );
-
- // IDataObject interface methods
-
- STDMETHODIMP GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
- STDMETHODIMP GetDataHere( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium );
- STDMETHODIMP QueryGetData( LPFORMATETC pFormatetc );
- STDMETHODIMP GetCanonicalFormatEtc( LPFORMATETC pFormatectIn, LPFORMATETC pFormatetcOut );
- STDMETHODIMP SetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium, BOOL fRelease );
- STDMETHODIMP EnumFormatEtc( DWORD dwDirection, IEnumFORMATETC** ppenumFormatetc );
- STDMETHODIMP DAdvise( LPFORMATETC pFormatetc, DWORD advf, LPADVISESINK pAdvSink, DWORD* pdwConnection );
- STDMETHODIMP DUnadvise( DWORD dwConnection );
- STDMETHODIMP EnumDAdvise( LPENUMSTATDATA* ppenumAdvise );
-
- operator IDataObject*( );
-
-private:
- HRESULT MarshalIDataObjectIntoCurrentApartment( IDataObject** ppIDataObj );
-
-private:
- IDataObjectPtr m_rIDataObjectOrg;
- HGLOBAL m_hGlobal;
- LONG m_nRefCnt;
-
-// prevent copy and assignment
-private:
- CAPNDataObject( const CAPNDataObject& theOther );
- CAPNDataObject& operator=( const CAPNDataObject& theOther );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx
deleted file mode 100644
index 8d59be7ca430..000000000000
--- a/dtrans/source/win32/clipb/WinClipbImpl.cxx
+++ /dev/null
@@ -1,210 +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 <osl/diagnose.h>
-#include "WinClipbImpl.hxx"
-
-#include <systools/win32/comtools.hxx>
-#include "../../inc/DtObjFactory.hxx"
-#include "../dtobj/APNDataObject.hxx"
-#include "../dtobj/DOTransferable.hxx"
-#include "WinClipboard.hxx"
-#include <com/sun/star/datatransfer/clipboard/RenderingCapabilities.hpp>
-#include "../dtobj/XNotifyingDataObject.hxx"
-
-#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#include <ole2.h>
-#include <objidl.h>
-
-using namespace osl;
-using namespace std;
-using namespace cppu;
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::datatransfer;
-using namespace com::sun::star::datatransfer::clipboard;
-using namespace com::sun::star::datatransfer::clipboard::RenderingCapabilities;
-
-// definition of static members
-CWinClipbImpl* CWinClipbImpl::s_pCWinClipbImpl = nullptr;
-osl::Mutex CWinClipbImpl::s_aMutex;
-
-CWinClipbImpl::CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard ) :
- m_itsName( aClipboardName ),
- m_pWinClipboard( theWinClipboard ),
- m_pCurrentClipContent( nullptr )
-{
- OSL_ASSERT( nullptr != m_pWinClipboard );
-
- // necessary to reassociate from
- // the static callback function
- s_pCWinClipbImpl = this;
- registerClipboardViewer( );
-}
-
-CWinClipbImpl::~CWinClipbImpl( )
-{
- {
- MutexGuard aGuard(s_aMutex);
- s_pCWinClipbImpl = nullptr;
- }
-
- unregisterClipboardViewer( );
-}
-
-Reference< XTransferable > CWinClipbImpl::getContents( )
-{
- // use the shortcut or create a transferable from
- // system clipboard
- {
- MutexGuard aGuard(m_ClipContentMutex);
-
- if (nullptr != m_pCurrentClipContent)
- {
- return m_pCurrentClipContent->m_XTransferable;
- }
-
- // Content cached?
- if (m_foreignContent.is())
- return m_foreignContent;
-
- // release the mutex, so that the variable may be
- // changed by other threads
- }
-
- Reference< XTransferable > rClipContent;
-
- // get the current dataobject from clipboard
- IDataObjectPtr pIDataObject;
- HRESULT hr = m_MtaOleClipboard.getClipboard( &pIDataObject );
-
- if ( SUCCEEDED( hr ) )
- {
- // create an apartment neutral dataobject and initialize it with a
- // com smart pointer to the IDataObject from clipboard
- IDataObjectPtr pIDo( new CAPNDataObject( pIDataObject ) );
-
- // remember pIDo destroys itself due to the smart pointer
- rClipContent = CDOTransferable::create( m_pWinClipboard->m_xContext, pIDo );
-
- MutexGuard aGuard(m_ClipContentMutex);
- m_foreignContent = rClipContent;
- }
-
- return rClipContent;
-}
-
-void CWinClipbImpl::setContents(
- const Reference< XTransferable >& xTransferable,
- const Reference< XClipboardOwner >& xClipboardOwner )
-{
- IDataObjectPtr pIDataObj;
-
- if ( xTransferable.is( ) )
- {
- {
- MutexGuard aGuard(m_ClipContentMutex);
-
- m_foreignContent.clear();
-
- m_pCurrentClipContent
- = new CXNotifyingDataObject(CDTransObjFactory::createDataObjFromTransferable(
- m_pWinClipboard->m_xContext, xTransferable),
- xTransferable, xClipboardOwner, this);
- }
-
- pIDataObj = IDataObjectPtr( m_pCurrentClipContent );
- }
-
- m_MtaOleClipboard.setClipboard(pIDataObj.get());
-}
-
-OUString CWinClipbImpl::getName( )
-{
- return m_itsName;
-}
-
-sal_Int8 CWinClipbImpl::getRenderingCapabilities( )
-{
- return ( Delayed | Persistant );
-}
-
-void CWinClipbImpl::flushClipboard( )
-{
- // actually it should be ClearableMutexGuard aGuard( m_ClipContentMutex );
- // but it does not work since FlushClipboard does a callback and frees DataObject
- // which results in a deadlock in onReleaseDataObject.
- // FlushClipboard had to be synchron in order to prevent shutdown until all
- // clipboard-formats are rendered.
- // The request is needed to prevent flushing if we are not clipboard owner (it is
- // not known what happens if we flush but aren't clipboard owner).
- // It may be possible to move the request to the clipboard STA thread by saving the
- // DataObject and call OleIsCurrentClipboard before flushing.
-
- if ( nullptr != m_pCurrentClipContent )
- m_MtaOleClipboard.flushClipboard( );
-}
-
-void CWinClipbImpl::registerClipboardViewer( )
-{
- m_MtaOleClipboard.registerClipViewer( CWinClipbImpl::onClipboardContentChanged );
-}
-
-void CWinClipbImpl::unregisterClipboardViewer( )
-{
- m_MtaOleClipboard.registerClipViewer( nullptr );
-}
-
-void CWinClipbImpl::dispose()
-{
- OSL_ENSURE( !m_pCurrentClipContent, "Clipboard was not flushed before shutdown!" );
-}
-
-void WINAPI CWinClipbImpl::onClipboardContentChanged()
-{
- MutexGuard aGuard( s_aMutex );
-
- // reassociation to instance through static member
- if ( nullptr != s_pCWinClipbImpl )
- {
- s_pCWinClipbImpl->m_foreignContent.clear();
- s_pCWinClipbImpl->m_pWinClipboard->notifyAllClipboardListener( );
- }
-}
-
-void CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller )
-{
- OSL_ASSERT( nullptr != theCaller );
-
- if ( theCaller )
- theCaller->lostOwnership( );
-
- // if the current caller is the one we currently
- // hold, then set it to NULL because an external
- // source must be the clipboardowner now
- MutexGuard aGuard( m_ClipContentMutex );
-
- if ( m_pCurrentClipContent == theCaller )
- m_pCurrentClipContent = nullptr;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx
deleted file mode 100644
index cd5878e6b794..000000000000
--- a/dtrans/source/win32/clipb/WinClipbImpl.hxx
+++ /dev/null
@@ -1,106 +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 .
- */
-
-#ifndef INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_WINCLIPBIMPL_HXX
-#define INCLUDED_DTRANS_SOURCE_WIN32_CLIPB_WINCLIPBIMPL_HXX
-
-#include <sal/types.h>
-#include <rtl/ustring.hxx>
-#include <com/sun/star/datatransfer/XTransferable.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardListener.hpp>
-#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
-#include "MtaOleClipb.hxx"
-
-#if !defined WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-
-class CWinClipboard;
-class CXNotifyingDataObject;
-
-// impl class to avoid deadlocks between XTDataObject
-// and the clipboard implementation
-
-class CWinClipbImpl
-{
-public:
- ~CWinClipbImpl( );
-
-protected:
- CWinClipbImpl( const OUString& aClipboardName, CWinClipboard* theWinClipboard );
-
- /// @throws css::uno::RuntimeException
- css::uno::Reference< css::datatransfer::XTransferable > getContents( );
-
- /// @throws css::uno::RuntimeException
- void setContents(
- const css::uno::Reference< css::datatransfer::XTransferable >& xTransferable,
- const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner );
-
- /// @throws css::uno::RuntimeException
- OUString getName( );
-
- // XClipboardEx
-
- /// @throws css::uno::RuntimeException
- static sal_Int8 getRenderingCapabilities( );
-
- // XFlushableClipboard
-
- /// @throws css::uno::RuntimeException
- void flushClipboard( );
-
- // XComponent
-
- /// @throws css::uno::RuntimeException
- void dispose( );
-
- // member functions
-
- void registerClipboardViewer( );
- void unregisterClipboardViewer( );
-
- static void WINAPI onClipboardContentChanged();
-
-private:
- void onReleaseDataObject( CXNotifyingDataObject* theCaller );
-
-private:
- OUString m_itsName;
- CMtaOleClipboard m_MtaOleClipboard;
- CWinClipboard* m_pWinClipboard;
- CXNotifyingDataObject* m_pCurrentClipContent;
- com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_foreignContent;
- osl::Mutex m_ClipContentMutex;
-
- static osl::Mutex s_aMutex;
- static CWinClipbImpl* s_pCWinClipbImpl;
-
-private:
- CWinClipbImpl( const CWinClipbImpl& );
- CWinClipbImpl& operator=( const CWinClipbImpl& );
-
- friend class CWinClipboard;
- friend class CXNotifyingDataObject;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx
deleted file mode 100644
index 919065a9f2fc..000000000000
--- a/dtrans/source/win32/clipb/WinClipboard.cxx
+++ /dev/null
@@ -1,239 +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 <osl/diagnose.h>
-#include "WinClipboard.hxx"
-#include <com/sun/star/datatransfer/clipboard/ClipboardEvent.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <cppuhelper/supportsservice.hxx>
-#include "WinClipbImpl.hxx"
-
-using namespace osl;
-using namespace std;
-using namespace cppu;
-
-using namespace com::sun::star::uno;
-using namespace com::sun::star::datatransfer;
-using namespace com::sun::star::datatransfer::clipboard;
-using namespace com::sun::star::lang;
-
-#define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32"
-
-namespace
-{
- Sequence< OUString > WinClipboard_getSupportedServiceNames()
- {
- Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
- return aRet;
- }
-}
-
-/*XEventListener,*/
-CWinClipboard::CWinClipboard( const Reference< XComponentContext >& rxContext, const OUString& aClipboardName ) :
- WeakComponentImplHelper< XSystemClipboard, XFlushableClipboard, XServiceInfo >( m_aCbListenerMutex ),
- m_xContext( rxContext )
-{
- m_pImpl.reset( new CWinClipbImpl( aClipboardName, this ) );
-}
-
-// XClipboard
-
-// to avoid unnecessary traffic we check first if there is a clipboard
-// content which was set via setContent, in this case we don't need
-// to query the content from the clipboard, create a new wrapper object
-// and so on, we simply return the original XTransferable instead of our
-// DOTransferable
-
-Reference< XTransferable > SAL_CALL CWinClipboard::getContents( )
-{
- MutexGuard aGuard( m_aMutex );
-
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- if ( nullptr != m_pImpl.get( ) )
- return m_pImpl->getContents( );
-
- return Reference< XTransferable >( );
-}
-
-void SAL_CALL CWinClipboard::setContents( const Reference< XTransferable >& xTransferable,
- const Reference< XClipboardOwner >& xClipboardOwner )
-{
- MutexGuard aGuard( m_aMutex );
-
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- if ( nullptr != m_pImpl.get( ) )
- m_pImpl->setContents( xTransferable, xClipboardOwner );
-}
-
-OUString SAL_CALL CWinClipboard::getName( )
-{
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- if ( nullptr != m_pImpl.get( ) )
- return m_pImpl->getName( );
-
- return OUString();
-}
-
-// XFlushableClipboard
-
-void SAL_CALL CWinClipboard::flushClipboard( )
-{
- MutexGuard aGuard( m_aMutex );
-
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- if ( nullptr != m_pImpl.get( ) )
- m_pImpl->flushClipboard( );
-}
-
-// XClipboardEx
-
-sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities( )
-{
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- if ( nullptr != m_pImpl.get( ) )
- return CWinClipbImpl::getRenderingCapabilities( );
-
- return 0;
-}
-
-// XClipboardNotifier
-
-void SAL_CALL CWinClipboard::addClipboardListener( const Reference< XClipboardListener >& listener )
-{
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- // check input parameter
- if ( !listener.is( ) )
- throw IllegalArgumentException("empty reference",
- static_cast< XClipboardEx* >( this ),
- 1 );
-
- rBHelper.aLC.addInterface( cppu::UnoType<decltype(listener)>::get(), listener );
-}
-
-void SAL_CALL CWinClipboard::removeClipboardListener( const Reference< XClipboardListener >& listener )
-{
- if ( rBHelper.bDisposed )
- throw DisposedException("object is already disposed",
- static_cast< XClipboardEx* >( this ) );
-
- // check input parameter
- if ( !listener.is( ) )
- throw IllegalArgumentException("empty reference",
- static_cast< XClipboardEx* >( this ),
- 1 );
-
- rBHelper.aLC.removeInterface( cppu::UnoType<decltype(listener)>::get(), listener );
-}
-
-void CWinClipboard::notifyAllClipboardListener( )
-{
- if ( !rBHelper.bDisposed )
- {
- ClearableMutexGuard aGuard( rBHelper.rMutex );
- if ( !rBHelper.bDisposed )
- {
- aGuard.clear( );
-
- OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer(
- cppu::UnoType<XClipboardListener>::get());
-
- if ( pICHelper )
- {
- try
- {
- OInterfaceIteratorHelper iter(*pICHelper);
- Reference<XTransferable> rXTransf(m_pImpl->getContents());
- ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this), rXTransf);
-
- while(iter.hasMoreElements())
- {
- try
- {
- Reference<XClipboardListener> xCBListener(iter.next(), UNO_QUERY);
- if (xCBListener.is())
- xCBListener->changedContents(aClipbEvent);
- }
- catch(RuntimeException&)
- {
- OSL_FAIL( "RuntimeException caught" );
- }
- }
- }
- catch(const css::lang::DisposedException&)
- {
- OSL_FAIL("Service Manager disposed");
-
- // no further clipboard changed notifications
- m_pImpl->unregisterClipboardViewer();
- }
-
- } // end if
- } // end if
- } // end if
-}
-
-// overwritten base class method which will be
-// called by the base class dispose method
-
-void SAL_CALL CWinClipboard::disposing()
-{
- // do my own stuff
- m_pImpl->dispose( );
-
- // force destruction of the impl class
- m_pImpl.reset();
-}
-
-// XServiceInfo
-
-OUString SAL_CALL CWinClipboard::getImplementationName( )
-{
- return WINCLIPBOARD_IMPL_NAME;
-}
-
-sal_Bool SAL_CALL CWinClipboard::supportsService( const OUString& ServiceName )
-{
- return cppu::supportsService(this, ServiceName);
-}
-
-Sequence< OUString > SAL_CALL CWinClipboard::getSupportedServiceNames( )
-{
- return WinClipboard_getSupportedServiceNames();
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/wcbentry.cxx b/dtrans/source/win32/clipb/wcbentry.cxx
deleted file mode 100644
index f0580e70e20e..000000000000
--- a/dtrans/source/win32/clipb/wcbentry.cxx
+++ /dev/null
@@ -1,82 +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 <cppuhelper/factory.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include "WinClipboard.hxx"
-
-#define WINCLIPBOARD_SERVICE_NAME "com.sun.star.datatransfer.clipboard.SystemClipboard"
-
-#define WINCLIPBOARD_IMPL_NAME "com.sun.star.datatransfer.clipboard.ClipboardW32"
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::registry;
-using namespace ::cppu;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::datatransfer::clipboard;
-
-namespace
-{
-
- // functions to create a new Clipboard instance; is needed by factory helper implementation
- // @param rServiceManager - service manager, useful if the component needs other uno services
- // so we should give it to every UNO-Implementation component
-
- Reference< XInterface > createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
- {
- return static_cast<XClipboard*>(
- new CWinClipboard(comphelper::getComponentContext(rServiceManager), ""));
- }
-}
-
-extern "C"
-{
-
-// component_getFactory
-// returns a factory to create XFilePicker-Services
-
-SAL_DLLPUBLIC_EXPORT void* sysdtrans_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*pRegistryKey*/ )
-{
- void* pRet = nullptr;
-
- if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, WINCLIPBOARD_IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS { WINCLIPBOARD_SERVICE_NAME };
-
- //OUString( FPS_IMPL_NAME )
- Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
- static_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createInstance,
- aSNS ) );
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/dndentry.cxx b/dtrans/source/win32/dnd/dndentry.cxx
deleted file mode 100644
index 58ec08f45858..000000000000
--- a/dtrans/source/win32/dnd/dndentry.cxx
+++ /dev/null
@@ -1,88 +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 <cppuhelper/factory.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-#include "source.hxx"
-#include "target.hxx"
-
-using namespace ::com::sun::star::uno ;
-using namespace ::com::sun::star::registry ;
-using namespace ::cppu ;
-using namespace ::com::sun::star::lang;
-
-static Reference< XInterface > createDragSource( const Reference< XMultiServiceFactory >& rServiceManager )
-{
- DragSource* pSource= new DragSource( comphelper::getComponentContext(rServiceManager) );
- return Reference<XInterface>( static_cast<XInitialization*>(pSource), UNO_QUERY);
-}
-
-static Reference< XInterface > createDropTarget( const Reference< XMultiServiceFactory >& rServiceManager )
-{
- DropTarget* pTarget= new DropTarget( comphelper::getComponentContext(rServiceManager) );
- return Reference<XInterface>( static_cast<XInitialization*>(pTarget), UNO_QUERY);
-}
-
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void*
-dnd_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*pRegistryKey*/ )
-{
- void* pRet = nullptr;
- Reference< XSingleServiceFactory > xFactory;
-
- if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDSOURCE_IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS { DNDSOURCE_SERVICE_NAME };
-
- xFactory= createSingleFactory(
- static_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createDragSource,
- aSNS);
-
- }
- else if( pSrvManager && ( 0 == rtl_str_compare( pImplName, DNDTARGET_IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS { DNDTARGET_SERVICE_NAME };
-
- xFactory= createSingleFactory(
- static_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createDropTarget,
- aSNS);
-
- }
-
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/ftransl/ftranslentry.cxx b/dtrans/source/win32/ftransl/ftranslentry.cxx
deleted file mode 100644
index cdcfda46b10c..000000000000
--- a/dtrans/source/win32/ftransl/ftranslentry.cxx
+++ /dev/null
@@ -1,79 +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 <cppuhelper/factory.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-
-#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
-#include "ftransl.hxx"
-
-#define SERVICE_NAME "com.sun.star.datatransfer.DataFormatTranslator"
-
-#define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator"
-
-using namespace ::cppu;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::registry;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::datatransfer;
-
-namespace
-{
-
- // functions to create a new Clipboard instance; is needed by factory helper implementation
- // @param rServiceManager - service manager, useful if the component needs other uno services
- // so we should give it to every UNO-Implementation component
-
- Reference< XInterface > createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
- {
- return Reference< XInterface >( static_cast< XDataFormatTranslator* >( new CDataFormatTranslatorUNO( comphelper::getComponentContext(rServiceManager) ) ) );
- }
-}
-
-extern "C"
-{
-
-SAL_DLLPUBLIC_EXPORT void* ftransl_component_getFactory( const sal_Char* pImplName, void* pSrvManager, void* /*pRegistryKey*/ )
-{
- void* pRet = nullptr;
-
- if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS { SERVICE_NAME };
-
- Reference< XSingleServiceFactory > xFactory ( createOneInstanceFactory(
- static_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createInstance,
- aSNS ) );
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx
index 2b74427f6619..ac38200c4b11 100644
--- a/editeng/inc/editattr.hxx
+++ b/editeng/inc/editattr.hxx
@@ -25,6 +25,7 @@
#include <boost/optional.hpp>
#include <tools/color.hxx>
#include <tools/debug.hxx>
+#include <tools/fontenum.hxx>
class SvxFont;
class SvxFontItem;
@@ -366,6 +367,7 @@ class EditCharAttribField: public EditCharAttrib
OUString aFieldValue;
boost::optional<Color> mxTxtColor;
boost::optional<Color> mxFldColor;
+ boost::optional<FontLineStyle> mxFldLineStyle;
EditCharAttribField& operator = ( const EditCharAttribField& rAttr ) = delete;
@@ -381,6 +383,7 @@ public:
virtual void SetFont( SvxFont& rFont, OutputDevice* pOutDev ) override;
boost::optional<Color>& GetTextColor() { return mxTxtColor; }
boost::optional<Color>& GetFieldColor() { return mxFldColor; }
+ boost::optional<FontLineStyle>& GetFldLineStyle() { return mxFldLineStyle; }
const OUString& GetFieldValue() const { return aFieldValue;}
void SetFieldValue(const OUString& rVal);
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index e832dffd39d6..1e1ffca916bf 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -813,7 +813,7 @@ class UrlEditEngine : public EditEngine
public:
explicit UrlEditEngine(SfxItemPool *pPool) : EditEngine(pPool) {}
- virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& ) override
+ virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>&, boost::optional<FontLineStyle>& ) override
{
return "jim@bob.com"; // a sophisticated view of value:
}
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index c68c79ebea8f..c87071b97324 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1527,8 +1527,7 @@ namespace accessibility
// NumberingLevel
if (rRes.Name == "NumberingLevel")
{
- const SvxNumBulletItem& rNumBullet = rCacheTF.GetParaAttribs(GetParagraphIndex()).Get(EE_PARA_NUMBULLET);
- if(rNumBullet.GetNumRule()->GetLevelCount()==0)
+ if(rCacheTF.GetParaAttribs(GetParagraphIndex()).Get(EE_PARA_NUMBULLET).GetNumRule()->GetLevelCount()==0)
{
rRes.Value <<= sal_Int16(-1);
rRes.Handle = -1;
diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx
index 41b6a0db9bcd..0e8e71b1a6c4 100644
--- a/editeng/source/editeng/editattr.cxx
+++ b/editeng/source/editeng/editattr.cxx
@@ -352,6 +352,8 @@ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* )
}
if ( mxTxtColor )
rFont.SetColor( *mxTxtColor );
+ if ( mxFldLineStyle )
+ rFont.SetUnderline( *mxFldLineStyle );
}
@@ -365,6 +367,7 @@ void EditCharAttribField::Reset()
aFieldValue.clear();
mxTxtColor.reset();
mxFldColor.reset();
+ mxFldLineStyle.reset();
}
EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
@@ -374,6 +377,7 @@ EditCharAttribField::EditCharAttribField( const EditCharAttribField& rAttr )
// Use this constructor only for temporary Objects, Item is not pooled.
mxTxtColor = rAttr.mxTxtColor;
mxFldColor = rAttr.mxFldColor;
+ mxFldLineStyle = rAttr.mxFldLineStyle;
}
EditCharAttribField::~EditCharAttribField()
@@ -396,6 +400,11 @@ bool EditCharAttribField::operator == ( const EditCharAttribField& rAttr ) const
if ( ( mxFldColor && rAttr.mxFldColor ) && ( *mxFldColor != *rAttr.mxFldColor ) )
return false;
+ if ( ( mxFldLineStyle && !rAttr.mxFldLineStyle ) || ( !mxFldLineStyle && rAttr.mxFldLineStyle ) )
+ return false;
+ if ( ( mxFldLineStyle && rAttr.mxFldLineStyle ) && ( *mxFldLineStyle != *rAttr.mxFldLineStyle ) )
+ return false;
+
return true;
}
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 2b600871c27d..ed88a647d3dc 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2562,7 +2562,7 @@ tools::Rectangle EditEngine::GetBulletArea( sal_Int32 )
return tools::Rectangle( Point(), Point() );
}
-OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
+OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>&, boost::optional<FontLineStyle>& )
{
return OUString(' ');
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index dc1730a72a94..e5592c58a128 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -47,6 +47,7 @@
#include <editeng/frmdiritem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/justifyitem.hxx>
+#include <editeng/udlnitem.hxx>
#include <com/sun/star/i18n/CharacterIteratorMode.hpp>
#include <com/sun/star/i18n/WordType.hpp>
@@ -2998,7 +2999,7 @@ bool ImpEditEngine::UpdateFields()
if (!aStatus.MarkNonUrlFields() && !aStatus.MarkUrlFields())
; // nothing marked
else if (aStatus.MarkNonUrlFields() && aStatus.MarkUrlFields())
- rField.GetFieldColor() = GetColorConfig().GetColorValue( svtools::WRITERFIELDSHADINGS ).nColor;
+ rField.GetFieldColor() = GetColorConfig().GetColorValue(svtools::WRITERFIELDSHADINGS).nColor;
else
{
bool bURL = false;
@@ -3014,7 +3015,7 @@ bool ImpEditEngine::UpdateFields()
const OUString aFldValue =
GetEditEnginePtr()->CalcFieldValue(
static_cast<const SvxFieldItem&>(*rField.GetItem()),
- nPara, rField.GetStart(), rField.GetTextColor(), rField.GetFieldColor());
+ nPara, rField.GetStart(), rField.GetTextColor(), rField.GetFieldColor(), rField.GetFldLineStyle() );
rField.SetFieldValue(aFldValue);
if (rField != *pCurrent)
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index eb9881e89efd..44ad1827a266 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -169,9 +169,9 @@ void OutlinerEditEng::DrawingTab( const Point& rStartPos, long nWidth, const OUS
bEndOfLine, bEndOfParagraph, rOverlineColor, rTextLineColor );
}
-OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString OutlinerEditEng::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
- return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+ return pOwner->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle );
}
void OutlinerEditEng::SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet )
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index 5110d8be28ef..299953dc0a87 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -71,7 +71,7 @@ public:
// for text conversion
virtual bool ConvertNextDocument() override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle ) override;
virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 16a3833eeea2..89c031690b91 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -648,7 +648,7 @@ void Outliner::AddText( const OutlinerParaObject& rPObj, bool bAppend )
pEditEngine->SetUpdateMode( bUpdate );
}
-OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
if ( !aCalcFieldValueHdl.IsSet() )
return OUString( ' ' );
@@ -664,6 +664,11 @@ OUString Outliner::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara,
rpTxtColor = *aFldInfo.GetTextColor();
}
+ if ( aFldInfo.GetFontLineStyle() )
+ {
+ rpFldLineStyle = *aFldInfo.GetFontLineStyle();
+ }
+
if (aFldInfo.GetFieldColor())
rpFldColor = *aFldInfo.GetFieldColor();
else
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 915fe7193eaa..d62f380dd6f0 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -615,11 +615,11 @@ SfxItemPool* SvxAccessibleTextAdapter::GetPool() const
return mpTextForwarder->GetPool();
}
-OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString SvxAccessibleTextAdapter::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
- return mpTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+ return mpTextForwarder->CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle );
}
void SvxAccessibleTextAdapter::FieldClicked( const SvxFieldItem& rField )
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index 73a49039fa3d..f368ff454f4b 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -153,9 +153,9 @@ bool SvxEditEngineForwarder::IsValid() const
return rEditEngine.GetUpdateMode();
}
-OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString SvxEditEngineForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
- return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+ return rEditEngine.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle );
}
void SvxEditEngineForwarder::FieldClicked( const SvxFieldItem& rField )
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index b9abddf04455..0738b4eec461 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -220,9 +220,9 @@ void SvxOutlinerForwarder::QuickSetAttribs( const SfxItemSet& rSet, const ESelec
rOutliner.QuickSetAttribs( rSet, rSel );
}
-OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString SvxOutlinerForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
- return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor );
+ return rOutliner.CalcFieldValue( rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle );
}
void SvxOutlinerForwarder::FieldClicked( const SvxFieldItem& /*rField*/ )
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 4796732b2c74..3a5f5510f57a 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -635,9 +635,10 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM
// get presentation string for field
boost::optional<Color> pTColor;
boost::optional<Color> pFColor;
+ boost::optional<FontLineStyle> pFldLineStyle;
SvxTextForwarder* pForwarder = mpEditSource->GetTextForwarder();
- OUString aPresentation( pForwarder->CalcFieldValue( SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, maSelection.nStartPos, pTColor, pFColor ) );
+ OUString aPresentation( pForwarder->CalcFieldValue( SvxFieldItem(*pData, EE_FEATURE_FIELD), maSelection.nStartPara, maSelection.nStartPos, pTColor, pFColor, pFldLineStyle ) );
uno::Reference< text::XTextField > xField( new SvxUnoTextField( xAnchor, aPresentation, pData ) );
rAny <<= xField;
@@ -2358,7 +2359,7 @@ void SvxDummyTextSource::QuickInsertLineBreak( const ESelection& )
{
};
-OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>& )
+OUString SvxDummyTextSource::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, boost::optional<Color>&, boost::optional<Color>&, boost::optional<FontLineStyle>& )
{
return OUString();
}
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index e6e5bec2a316..b402dff22042 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 )
{
@@ -228,34 +259,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/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index f162dfef5f31..f5444e16481a 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -51,10 +51,11 @@
#include <comphelper/storagehelper.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <unotools/configmgr.hxx>
+#include <unotools/securityoptions.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
-#include <unotools/configmgr.hxx>
#include "persistence.hxx"
using namespace ::com::sun::star;
@@ -75,7 +76,7 @@ uno::Sequence< beans::PropertyValue > GetValuableArgs_Impl( const uno::Sequence<
|| aMedDescr[nInd].Name == "StartPresentation" || aMedDescr[nInd].Name == "RepairPackage"
|| aMedDescr[nInd].Name == "StatusIndicator" || aMedDescr[nInd].Name == "ViewData"
|| aMedDescr[nInd].Name == "ViewId" || aMedDescr[nInd].Name == "MacroExecutionMode"
- || aMedDescr[nInd].Name == "UpdateDocMode"
+ || aMedDescr[nInd].Name == "UpdateDocMode" || aMedDescr[nInd].Name == "Referer"
|| (aMedDescr[nInd].Name == "DocumentBaseURL" && bCanUseDocumentBaseURL) )
{
aResult.realloc( ++nResLen );
@@ -359,20 +360,15 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::InitNewDocument_Impl()
return xDocument;
}
-
uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl()
{
- uno::Reference< util::XCloseable > xDocument( CreateDocument( m_xContext, GetDocumentServiceName(),
- m_bEmbeddedScriptSupport, m_bDocumentRecoverySupport ) );
-
- uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY_THROW );
-
sal_Int32 nLen = 2;
uno::Sequence< beans::PropertyValue > aArgs( nLen );
aArgs[0].Name = "URL";
aArgs[0].Value <<= m_aLinkURL;
aArgs[1].Name = "FilterName";
aArgs[1].Value <<= m_aLinkFilterName;
+
if ( m_bLinkHasPassword )
{
aArgs.realloc( ++nLen );
@@ -383,10 +379,22 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl()
aArgs.realloc( m_aDocMediaDescriptor.getLength() + nLen );
for ( sal_Int32 nInd = 0; nInd < m_aDocMediaDescriptor.getLength(); nInd++ )
{
+ // return early if this document is not trusted to open links
+ if (m_aDocMediaDescriptor[nInd].Name == "Referer")
+ {
+ OUString referer;
+ m_aDocMediaDescriptor[nInd].Value >>= referer;
+ if (SvtSecurityOptions().isUntrustedReferer(referer))
+ return nullptr;
+ }
aArgs[nInd+nLen].Name = m_aDocMediaDescriptor[nInd].Name;
aArgs[nInd+nLen].Value = m_aDocMediaDescriptor[nInd].Value;
}
+ uno::Reference< util::XCloseable > xDocument( CreateDocument( m_xContext, GetDocumentServiceName(),
+ m_bEmbeddedScriptSupport, m_bDocumentRecoverySupport ) );
+ uno::Reference< frame::XLoadable > xLoadable( xDocument, uno::UNO_QUERY_THROW );
+
try
{
// the document is not really an embedded one, it is a link
@@ -428,7 +436,6 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl()
}
-
OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const
{
OUString aFilterName = GetPresetFilterName();
diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx
index 683fe0aab3f2..c17a39accf2c 100644
--- a/embeddedobj/source/commonembedding/specialobject.cxx
+++ b/embeddedobj/source/commonembedding/specialobject.cxx
@@ -47,6 +47,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 ),
@@ -160,4 +161,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 b2c9acd9ec1e..73282a00deac 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -226,6 +226,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/extensions/uiconfig/sbibliography/menubar/menubar.xml b/extensions/uiconfig/sbibliography/menubar/menubar.xml
index 65f55fff0012..c29111670ab7 100644
--- a/extensions/uiconfig/sbibliography/menubar/menubar.xml
+++ b/extensions/uiconfig/sbibliography/menubar/menubar.xml
@@ -62,7 +62,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/external/Module_external.mk b/external/Module_external.mk
index baf7215b2b70..b5875835a9bb 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -16,7 +16,6 @@ endif
$(eval $(call gb_Module_add_moduledirs,external,\
$(if $(filter-out iOS,$(OS)),$(call gb_Helper_optional,XMLSEC,xmlsec)) \
$(call gb_Helper_optional,ABW,libabw) \
- $(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
$(call gb_Helper_optional,APR,apr) \
$(call gb_Helper_optional,BOOST,boost) \
$(call gb_Helper_optional,BREAKPAD,breakpad) \
diff --git a/external/apache-commons/ExternalPackage_apache_commons_logging.mk b/external/apache-commons/ExternalPackage_apache_commons_logging.mk
deleted file mode 100644
index 2bff13b93c66..000000000000
--- a/external/apache-commons/ExternalPackage_apache_commons_logging.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalPackage_ExternalPackage,apache_commons_logging,apache_commons_logging))
-
-$(eval $(call gb_ExternalPackage_use_external_project,apache_commons_logging,apache_commons_logging))
-
-$(eval $(call gb_ExternalPackage_add_file,apache_commons_logging,$(LIBO_SHARE_JAVA_FOLDER)/commons-logging-$(COMMONS_LOGGING_VERSION).jar,target/commons-logging-$(COMMONS_LOGGING_VERSION).jar))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/ExternalProject_apache_commons_logging.mk b/external/apache-commons/ExternalProject_apache_commons_logging.mk
deleted file mode 100644
index 47981ee9ecd6..000000000000
--- a/external/apache-commons/ExternalProject_apache_commons_logging.mk
+++ /dev/null
@@ -1,29 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_ExternalProject_ExternalProject,apache_commons_logging))
-
-$(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
- build \
-))
-
-$(call gb_ExternalProject_get_state_target,apache_commons_logging,build) :
- $(call gb_ExternalProject_run,build,\
- ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
- $(ICECREAM_RUN) "$(ANT)" \
- $(if $(verbose),-v,-q) \
- -f build.xml \
- -Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- -Dant.build.javac.source=$(JAVA_SOURCE_VER) \
- -Dant.build.javac.target=$(JAVA_TARGET_VER) \
- $(if $(debug),-Dcompile.debug="true",-Dcompile.debug="false") \
- compile build-jar \
- )
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/Makefile b/external/apache-commons/Makefile
deleted file mode 100644
index e4968cf85fb6..000000000000
--- a/external/apache-commons/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- 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/apache-commons/README b/external/apache-commons/README
deleted file mode 100644
index 18944aca4af7..000000000000
--- a/external/apache-commons/README
+++ /dev/null
@@ -1 +0,0 @@
-Java library; used for logging in Extensions, from [http://commons.apache.org/]
diff --git a/external/apache-commons/UnpackedTarball_apache_commons_logging.mk b/external/apache-commons/UnpackedTarball_apache_commons_logging.mk
deleted file mode 100644
index 1d5ad3dc2d9d..000000000000
--- a/external/apache-commons/UnpackedTarball_apache_commons_logging.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_UnpackedTarball_UnpackedTarball,apache_commons_logging))
-
-$(eval $(call gb_UnpackedTarball_set_tarball,apache_commons_logging,$(APACHE_COMMONS_LOGGING_TARBALL),,apache-commons))
-
-$(eval $(call gb_UnpackedTarball_fix_end_of_line,apache_commons_logging,\
- build.xml \
-))
-
-$(eval $(call gb_UnpackedTarball_add_patches,apache_commons_logging,\
- external/apache-commons/patches/logging.patch \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/apache-commons/patches/logging.patch b/external/apache-commons/patches/logging.patch
deleted file mode 100644
index c225e5a30338..000000000000
--- a/external/apache-commons/patches/logging.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- misc/commons-logging-1.1.1-src/build.xml 2007-11-22 00:27:52.000000000 +0100
-+++ misc/build/commons-logging-1.1.1-src/build.xml 2008-06-24 14:23:56.316301736 +0200
-@@ -129,12 +129,6 @@
-
- <!-- ========== Compiler Defaults ========================================= -->
-
-- <!-- Version of java class files to generate. -->
-- <property name="target.version" value="1.2"/>
--
-- <!-- Version of java source to accept -->
-- <property name="source.version" value="1.2"/>
--
- <!-- Should Java compilations set the 'debug' compiler option? -->
- <property name="compile.debug" value="true"/>
-
-@@ -283,6 +277,10 @@
- classpathref="compile.classpath"
- classname="org.apache.avalon.framework.logger.Logger"/>
-
-+ <available property="servlet-api.present"
-+ classpathref="compile.classpath"
-+ classname="javax.servlet.ServletContextListener"/>
-+
- <available file="${log4j12.jar}" property="log4j12.present"/>
- <available file="${log4j13.jar}" property="log4j13.present"/>
- <available file="${build.home}/docs" property="maven.generated.docs.present"/>
-@@ -362,8 +360,8 @@
- debug="${compile.debug}"
- deprecation="${compile.deprecation}"
- optimize="${compile.optimize}"
-- source="${source.version}"
-- target="${target.version}">
-+ source="${ant.build.javac.source}"
-+ target="${ant.build.javac.target}">
-
- <classpath refid="compile.classpath"/>
-
-@@ -373,6 +371,8 @@
- unless="logkit.present"/>
- <exclude name="org/apache/commons/logging/impl/AvalonLogger.java"
- unless="avalon-framework.present"/>
-+ <exclude name="org/apache/commons/logging/impl/ServletContextCleaner.java"
-+ unless="servlet-api.present"/>
- </javac>
- </target>
-
diff --git a/external/breakpad/SIGSTKSZ.patch b/external/breakpad/SIGSTKSZ.patch
new file mode 100644
index 000000000000..d37c58a2f84b
--- /dev/null
+++ b/external/breakpad/SIGSTKSZ.patch
@@ -0,0 +1,11 @@
+--- src/client/linux/handler/exception_handler.cc
++++ src/client/linux/handler/exception_handler.cc
+@@ -138,7 +138,7 @@
+ // SIGSTKSZ may be too small to prevent the signal handlers from overrunning
+ // the alternative stack. Ensure that the size of the alternative stack is
+ // large enough.
+- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
++ static const unsigned kSigStackSize = std::max<decltype(SIGSTKSZ)>(16384, SIGSTKSZ);
+
+ // Only set an alternative stack if there isn't already one, or if the current
+ // one is too small.
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk
index b9e14874d72d..d69c83c936ce 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -25,6 +25,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,breakpad,\
external/breakpad/0001-Handle-race-between-ExceptionHandler-SignalHandler-a.patch.1 \
external/breakpad/0001-Fix-double-declaration-of-tgkill-when-using-Android-.patch.1 \
external/breakpad/c++20-allocator.patch \
+ external/breakpad/SIGSTKSZ.patch \
+ external/breakpad/include.patch \
))
ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/external/breakpad/include.patch b/external/breakpad/include.patch
new file mode 100644
index 000000000000..e90ae9c11744
--- /dev/null
+++ b/external/breakpad/include.patch
@@ -0,0 +1,10 @@
+--- src/client/linux/handler/minidump_descriptor.h
++++ src/client/linux/handler/minidump_descriptor.h
+@@ -31,6 +31,7 @@
+ #define CLIENT_LINUX_HANDLER_MINIDUMP_DESCRIPTOR_H_
+
+ #include <assert.h>
++#include <stdint.h>
+ #include <sys/types.h>
+
+ #include <string>
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index 35cfbfcdbae8..a918effb1203 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -40,6 +40,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/ubsan.patch.0 \
external/coinmp/rpath.patch \
external/coinmp/libtool.patch \
+ external/coinmp/register.patch \
+ external/coinmp/configure-exit.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/coinmp/configure-exit.patch b/external/coinmp/configure-exit.patch
new file mode 100644
index 000000000000..0a81b8073fd2
--- /dev/null
+++ b/external/coinmp/configure-exit.patch
@@ -0,0 +1,33 @@
+--- Cgl/configure
++++ Cgl/configure
+@@ -3501,8 +3501,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+--- Clp/configure
++++ Clp/configure
+@@ -3528,8 +3528,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+--- CoinUtils/configure
++++ CoinUtils/configure
+@@ -3527,8 +3527,6 @@
+ fi
+ for ac_declaration in \
+ '' \
+- 'extern "C" void std::exit (int) throw (); using std::exit;' \
+- 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
diff --git a/external/coinmp/register.patch b/external/coinmp/register.patch
new file mode 100644
index 000000000000..cf4ca4d06c01
--- /dev/null
+++ b/external/coinmp/register.patch
@@ -0,0 +1,369 @@
+--- CoinUtils/src/CoinHelperFunctions.hpp
++++ CoinUtils/src/CoinHelperFunctions.hpp
+@@ -41,7 +41,7 @@
+ handled correctly. */
+
+ template <class T> inline void
+-CoinCopyN(register const T* from, const int size, register T* to)
++CoinCopyN(const T* from, const int size, T* to)
+ {
+ if (size == 0 || from == to)
+ return;
+@@ -52,10 +52,10 @@
+ "CoinCopyN", "");
+ #endif
+
+- register int n = (size + 7) / 8;
++ int n = (size + 7) / 8;
+ if (to > from) {
+- register const T* downfrom = from + size;
+- register T* downto = to + size;
++ const T* downfrom = from + size;
++ T* downto = to + size;
+ // Use Duff's device to copy
+ switch (size % 8) {
+ case 0: do{ *--downto = *--downfrom;
+@@ -99,7 +99,7 @@
+ the difference down to int. -- lh, 100823 --
+ */
+ template <class T> inline void
+-CoinCopy(register const T* first, register const T* last, register T* to)
++CoinCopy(const T* first, const T* last, T* to)
+ {
+ CoinCopyN(first, static_cast<int>(last-first), to);
+ }
+@@ -114,7 +114,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have added
+ CoinMemcpyN which can be used for atomic data */
+ template <class T> inline void
+-CoinDisjointCopyN(register const T* from, const int size, register T* to)
++CoinDisjointCopyN(const T* from, const int size, T* to)
+ {
+ #ifndef _MSC_VER
+ if (size == 0 || from == to)
+@@ -135,7 +135,7 @@
+ throw CoinError("overlapping arrays", "CoinDisjointCopyN", "");
+ #endif
+
+- for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
++ for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
+ to[0] = from[0];
+ to[1] = from[1];
+ to[2] = from[2];
+@@ -167,8 +167,8 @@
+ are copied at a time. The source array is given by its first and "after
+ last" entry; the target array is given by its first entry. */
+ template <class T> inline void
+-CoinDisjointCopy(register const T* first, register const T* last,
+- register T* to)
++CoinDisjointCopy(const T* first, const T* last,
++ T* to)
+ {
+ CoinDisjointCopyN(first, static_cast<int>(last - first), to);
+ }
+@@ -256,7 +256,7 @@
+ alternative coding if USE_MEMCPY defined*/
+ #ifndef COIN_USE_RESTRICT
+ template <class T> inline void
+-CoinMemcpyN(register const T* from, const int size, register T* to)
++CoinMemcpyN(const T* from, const int size, T* to)
+ {
+ #ifndef _MSC_VER
+ #ifdef USE_MEMCPY
+@@ -296,7 +296,7 @@
+ throw CoinError("overlapping arrays", "CoinMemcpyN", "");
+ #endif
+
+- for (register int n = size / 8; n > 0; --n, from += 8, to += 8) {
++ for (int n = size / 8; n > 0; --n, from += 8, to += 8) {
+ to[0] = from[0];
+ to[1] = from[1];
+ to[2] = from[2];
+@@ -343,8 +343,8 @@
+ are copied at a time. The source array is given by its first and "after
+ last" entry; the target array is given by its first entry. */
+ template <class T> inline void
+-CoinMemcpy(register const T* first, register const T* last,
+- register T* to)
++CoinMemcpy(const T* first, const T* last,
++ T* to)
+ {
+ CoinMemcpyN(first, static_cast<int>(last - first), to);
+ }
+@@ -358,7 +358,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have added
+ CoinZero to allow for memset. */
+ template <class T> inline void
+-CoinFillN(register T* to, const int size, register const T value)
++CoinFillN(T* to, const int size, const T value)
+ {
+ if (size == 0)
+ return;
+@@ -369,7 +369,7 @@
+ "CoinFillN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, to += 8) {
++ for (int n = size / 8; n > 0; --n, to += 8) {
+ to[0] = value;
+ to[1] = value;
+ to[2] = value;
+@@ -413,7 +413,7 @@
+ entries are filled at a time. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline void
+-CoinFill(register T* first, register T* last, const T value)
++CoinFill(T* first, T* last, const T value)
+ {
+ CoinFillN(first, last - first, value);
+ }
+@@ -427,7 +427,7 @@
+ Note JJF - the speed claim seems to be false on IA32 so I have allowed
+ for memset as an alternative */
+ template <class T> inline void
+-CoinZeroN(register T* to, const int size)
++CoinZeroN(T* to, const int size)
+ {
+ #ifdef USE_MEMCPY
+ // Use memset - seems faster on Intel with gcc
+@@ -448,7 +448,7 @@
+ "CoinZeroN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, to += 8) {
++ for (int n = size / 8; n > 0; --n, to += 8) {
+ to[0] = 0;
+ to[1] = 0;
+ to[2] = 0;
+@@ -519,7 +519,7 @@
+ entries are filled at a time. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline void
+-CoinZero(register T* first, register T* last)
++CoinZero(T* first, T* last)
+ {
+ CoinZeroN(first, last - first);
+ }
+@@ -545,7 +545,7 @@
+ This function was introduced because for some reason compiler tend to
+ handle the <code>max()</code> function differently. */
+ template <class T> inline T
+-CoinMax(register const T x1, register const T x2)
++CoinMax(const T x1, const T x2)
+ {
+ return (x1 > x2) ? x1 : x2;
+ }
+@@ -556,7 +556,7 @@
+ This function was introduced because for some reason compiler tend to
+ handle the min() function differently. */
+ template <class T> inline T
+-CoinMin(register const T x1, register const T x2)
++CoinMin(const T x1, const T x2)
+ {
+ return (x1 < x2) ? x1 : x2;
+ }
+@@ -578,7 +578,7 @@
+ according to operator<. The array is given by a pointer to its first entry
+ and by its size. */
+ template <class T> inline bool
+-CoinIsSorted(register const T* first, const int size)
++CoinIsSorted(const T* first, const int size)
+ {
+ if (size == 0)
+ return true;
+@@ -590,7 +590,7 @@
+ #if 1
+ // size1 is the number of comparisons to be made
+ const int size1 = size - 1;
+- for (register int n = size1 / 8; n > 0; --n, first += 8) {
++ for (int n = size1 / 8; n > 0; --n, first += 8) {
+ if (first[8] < first[7]) return false;
+ if (first[7] < first[6]) return false;
+ if (first[6] < first[5]) return false;
+@@ -627,7 +627,7 @@
+ according to operator<. The array is given by its first and "after
+ last" entry. */
+ template <class T> inline bool
+-CoinIsSorted(register const T* first, register const T* last)
++CoinIsSorted(const T* first, const T* last)
+ {
+ return CoinIsSorted(first, static_cast<int>(last - first));
+ }
+@@ -638,7 +638,7 @@
+ etc. For speed 8 entries are filled at a time. The array is given by a
+ pointer to its first entry and its size. */
+ template <class T> inline void
+-CoinIotaN(register T* first, const int size, register T init)
++CoinIotaN(T* first, const int size, T init)
+ {
+ if (size == 0)
+ return;
+@@ -648,7 +648,7 @@
+ throw CoinError("negative number of entries", "CoinIotaN", "");
+ #endif
+ #if 1
+- for (register int n = size / 8; n > 0; --n, first += 8, init += 8) {
++ for (int n = size / 8; n > 0; --n, first += 8, init += 8) {
+ first[0] = init;
+ first[1] = init + 1;
+ first[2] = init + 2;
+@@ -706,7 +706,7 @@
+ integer array specified by the last two arguments (again, first and "after
+ last" entry). */
+ template <class T> inline T *
+-CoinDeleteEntriesFromArray(register T * arrayFirst, register T * arrayLast,
++CoinDeleteEntriesFromArray(T * arrayFirst, T * arrayLast,
+ const int * firstDelPos, const int * lastDelPos)
+ {
+ int delNum = static_cast<int>(lastDelPos - firstDelPos);
+--- CoinUtils/src/CoinModelUseful2.cpp
++++ CoinUtils/src/CoinModelUseful2.cpp
+@@ -917,8 +917,8 @@
+
+ int position=0;
+ int nEof=0; // Number of time send of string
+- register int yystate;
+- register int yyn;
++ int yystate;
++ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+@@ -936,12 +936,12 @@
+ /* The state stack. */
+ short yyssa[YYINITDEPTH];
+ short *yyss = yyssa;
+- register short *yyssp;
++ short *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+- register YYSTYPE *yyvsp;
++ YYSTYPE *yyvsp;
+
+
+
+--- CoinUtils/src/CoinOslC.h
++++ CoinUtils/src/CoinOslC.h
+@@ -34,30 +34,30 @@
+ extern "C"{
+ #endif
+
+-int c_ekkbtrn( register const EKKfactinfo *fact,
++int c_ekkbtrn( const EKKfactinfo *fact,
+ double *dwork1,
+ int * mpt,int first_nonzero);
+-int c_ekkbtrn_ipivrw( register const EKKfactinfo *fact,
++int c_ekkbtrn_ipivrw( const EKKfactinfo *fact,
+ double *dwork1,
+ int * mpt, int ipivrw,int * spare);
+
+-int c_ekketsj( register /*const*/ EKKfactinfo *fact,
++int c_ekketsj( /*const*/ EKKfactinfo *fact,
+ double *dwork1,
+ int *mpt2, double dalpha, int orig_nincol,
+ int npivot, int *nuspikp,
+ const int ipivrw, int * spare);
+-int c_ekkftrn( register const EKKfactinfo *fact,
++int c_ekkftrn( const EKKfactinfo *fact,
+ double *dwork1,
+ double * dpermu,int * mpt, int numberNonZero);
+
+-int c_ekkftrn_ft( register EKKfactinfo *fact,
++int c_ekkftrn_ft( EKKfactinfo *fact,
+ double *dwork1, int *mpt, int *nincolp);
+-void c_ekkftrn2( register EKKfactinfo *fact, double *dwork1,
++void c_ekkftrn2( EKKfactinfo *fact, double *dwork1,
+ double * dpermu1,int * mpt1, int *nincolp,
+ double *dwork1_ft, int *mpt_ft, int *nincolp_ft);
+
+-int c_ekklfct( register EKKfactinfo *fact);
+-int c_ekkslcf( register const EKKfactinfo *fact);
++int c_ekklfct( EKKfactinfo *fact);
++int c_ekkslcf( const EKKfactinfo *fact);
+ inline void c_ekkscpy(int n, const int *marr1,int *marr2)
+ { CoinMemcpyN(marr1,n,marr2);}
+ inline void c_ekkdcpy(int n, const double *marr1,double *marr2)
+--- CoinUtils/src/CoinOslFactorization2.cpp
++++ CoinUtils/src/CoinOslFactorization2.cpp
+@@ -20,9 +20,9 @@
+ extern int ets_count;
+ extern int ets_check;
+ #endif
+-#define COIN_REGISTER register
++#define COIN_REGISTER
+ #define COIN_REGISTER2
+-#define COIN_REGISTER3 register
++#define COIN_REGISTER3
+ #ifdef COIN_USE_RESTRICT
+ # define COIN_RESTRICT2 __restrict
+ #else
+--- CoinUtils/src/CoinOslFactorization3.cpp
++++ CoinUtils/src/CoinOslFactorization3.cpp
+@@ -1378,7 +1378,7 @@
+ }
+ }
+ } /* c_ekkmltf */
+-int c_ekklfct( register EKKfactinfo *fact)
++int c_ekklfct( EKKfactinfo *fact)
+ {
+ const int nrow = fact->nrow;
+ int ninbas = fact->xcsadr[nrow+1]-1;
+@@ -2607,7 +2607,7 @@
+ }
+ }
+ } /* c_ekkclcp */
+-int c_ekkslcf( register const EKKfactinfo *fact)
++int c_ekkslcf( const EKKfactinfo *fact)
+ {
+ int * hrow = fact->xeradr;
+ int * hcol = fact->xecadr;
+--- CoinUtils/src/CoinPackedVectorBase.cpp
++++ CoinUtils/src/CoinPackedVectorBase.cpp
+@@ -194,8 +194,8 @@
+ double
+ CoinPackedVectorBase::oneNorm() const
+ {
+- register double norm = 0.0;
+- register const double* elements = getElements();
++ double norm = 0.0;
++ const double* elements = getElements();
+ for (int i = getNumElements() - 1; i >= 0; --i) {
+ norm += fabs(elements[i]);
+ }
+@@ -224,8 +224,8 @@
+ double
+ CoinPackedVectorBase::infNorm() const
+ {
+- register double norm = 0.0;
+- register const double* elements = getElements();
++ double norm = 0.0;
++ const double* elements = getElements();
+ for (int i = getNumElements() - 1; i >= 0; --i) {
+ norm = CoinMax(norm, fabs(elements[i]));
+ }
+--- CoinUtils/src/CoinSearchTree.hpp
++++ CoinUtils/src/CoinSearchTree.hpp
+@@ -153,8 +153,8 @@
+ static inline const char* name() { return "CoinSearchTreeComparePreferred"; }
+ inline bool operator()(const CoinTreeSiblings* x,
+ const CoinTreeSiblings* y) const {
+- register const CoinTreeNode* xNode = x->currentNode();
+- register const CoinTreeNode* yNode = y->currentNode();
++ const CoinTreeNode* xNode = x->currentNode();
++ const CoinTreeNode* yNode = y->currentNode();
+ const BitVector128 xPref = xNode->getPreferred();
+ const BitVector128 yPref = yNode->getPreferred();
+ bool retval = true;
+--- CoinUtils/src/CoinSimpFactorization.cpp
++++ CoinUtils/src/CoinSimpFactorization.cpp
+@@ -2440,7 +2440,7 @@
+ const int row=secRowOfU_[i];
+ const int column=colOfU_[i];
+ if ( denseVector_[column]==0.0 ) continue;
+- register const double multiplier=denseVector_[column]*invOfPivots_[row];
++ const double multiplier=denseVector_[column]*invOfPivots_[row];
+ denseVector_[column]=0.0;
+ const int rowBeg=UrowStarts_[row];
+ const int rowEnd=rowBeg+UrowLengths_[row];
diff --git a/external/ct2n/include.patch.0 b/external/ct2n/include.patch.0
new file mode 100644
index 000000000000..8852b533311d
--- /dev/null
+++ b/external/ct2n/include.patch.0
@@ -0,0 +1,10 @@
+--- core/src/textcodec/JPTextEncoder.cpp
++++ core/src/textcodec/JPTextEncoder.cpp
+@@ -36,6 +36,7 @@
+ // and the grateful thanks of the Qt team.
+
+ #include "JPTextEncoder.h"
++#include <stdint.h>
+
+ /*
+ * This data is derived from Unicode 1.1,
diff --git a/external/curl/2b0994c29a721c91c57.patch b/external/curl/2b0994c29a721c91c57.patch
new file mode 100644
index 000000000000..0bcc24c06aa5
--- /dev/null
+++ b/external/curl/2b0994c29a721c91c57.patch
@@ -0,0 +1,48 @@
+From 2b0994c29a721c91c572cff7808c572a24d251eb Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel@haxx.se>
+Date: Thu, 23 Nov 2023 08:15:47 +0100
+Subject: [PATCH] cookie: lowercase the domain names before PSL checks
+
+Reported-by: Harry Sintonen
+
+Closes #12387
+---
+ lib/cookie.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/lib/cookie.c b/lib/cookie.c
+index 568cf537ad1b1..9095cea3e97f2 100644
+--- a/lib/cookie.c
++++ b/lib/cookie.c
+@@ -1027,15 +1027,23 @@ Curl_cookie_add(struct Curl_easy *data,
+ * dereference it.
+ */
+ if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
+- const psl_ctx_t *psl = Curl_psl_use(data);
+- int acceptable;
+-
+- if(psl) {
+- acceptable = psl_is_cookie_domain_acceptable(psl, domain, co->domain);
+- Curl_psl_release(data);
++ bool acceptable = FALSE;
++ char lcase[256];
++ char lcookie[256];
++ size_t dlen = strlen(domain);
++ size_t clen = strlen(co->domain);
++ if((dlen < sizeof(lcase)) && (clen < sizeof(lcookie))) {
++ const psl_ctx_t *psl = Curl_psl_use(data);
++ if(psl) {
++ /* the PSL check requires lowercase domain name and pattern */
++ Curl_strntolower(lcase, domain, dlen + 1);
++ Curl_strntolower(lcookie, co->domain, clen + 1);
++ acceptable = psl_is_cookie_domain_acceptable(psl, lcase, lcookie);
++ Curl_psl_release(data);
++ }
++ else
++ acceptable = !bad_domain(domain, strlen(domain));
+ }
+- else
+- acceptable = !bad_domain(domain, strlen(domain));
+
+ if(!acceptable) {
+ infof(data, "cookie '%s' dropped, domain '%s' must not "
diff --git a/external/curl/CVE-2023-38545_7.87.0.patch b/external/curl/CVE-2023-38545_7.87.0.patch
new file mode 100644
index 000000000000..c15c273ea41e
--- /dev/null
+++ b/external/curl/CVE-2023-38545_7.87.0.patch
@@ -0,0 +1,134 @@
+From 92fd36dd54de9ac845549944692eb33c5aee7343 Mon Sep 17 00:00:00 2001
+From: Jay Satiro <raysatiro@yahoo.com>
+Date: Mon, 9 Oct 2023 17:15:44 -0400
+Subject: [PATCH] socks: return error if hostname too long for remote resolve
+
+Prior to this change the state machine attempted to change the remote
+resolve to a local resolve if the hostname was longer than 255
+characters. Unfortunately that did not work as intended and caused a
+security issue.
+
+This patch applies to curl versions 7.87.0 - 8.1.2. Other versions
+that are affected take a different patch. Refer to the CVE advisory
+for more information.
+
+Bug: https://curl.se/docs/CVE-2023-38545.html
+---
+ lib/socks.c | 8 +++----
+ tests/data/Makefile.inc | 2 +-
+ tests/data/test728 | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 69 insertions(+), 5 deletions(-)
+ create mode 100644 tests/data/test728
+
+diff --git a/lib/socks.c b/lib/socks.c
+index d491e08..e7da5b4 100644
+--- a/lib/socks.c
++++ b/lib/socks.c
+@@ -539,9 +539,9 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf,
+
+ /* RFC1928 chapter 5 specifies max 255 chars for domain name in packet */
+ if(!socks5_resolve_local && hostname_len > 255) {
+- infof(data, "SOCKS5: server resolving disabled for hostnames of "
+- "length > 255 [actual len=%zu]", hostname_len);
+- socks5_resolve_local = TRUE;
++ failf(data, "SOCKS5: the destination hostname is too long to be "
++ "resolved remotely by the proxy.");
++ return CURLPX_LONG_HOSTNAME;
+ }
+
+ if(auth & ~(CURLAUTH_BASIC | CURLAUTH_GSSAPI))
+@@ -882,7 +882,7 @@ static CURLproxycode do_SOCKS5(struct Curl_cfilter *cf,
+ }
+ else {
+ socksreq[len++] = 3;
+- socksreq[len++] = (char) hostname_len; /* one byte address length */
++ socksreq[len++] = (unsigned char) hostname_len; /* one byte length */
+ memcpy(&socksreq[len], sx->hostname, hostname_len); /* w/o NULL */
+ len += hostname_len;
+ }
+diff --git a/tests/data/Makefile.inc b/tests/data/Makefile.inc
+index 3e0221a..64b11de 100644
+--- a/tests/data/Makefile.inc
++++ b/tests/data/Makefile.inc
+@@ -99,7 +99,7 @@ test679 test680 test681 test682 test683 test684 test685 \
+ \
+ test700 test701 test702 test703 test704 test705 test706 test707 test708 \
+ test709 test710 test711 test712 test713 test714 test715 test716 test717 \
+-test718 test719 test720 test721 \
++test718 test719 test720 test721 test728 \
+ \
+ test800 test801 test802 test803 test804 test805 test806 test807 test808 \
+ test809 test810 test811 test812 test813 test814 test815 test816 test817 \
+diff --git a/tests/data/test728 b/tests/data/test728
+new file mode 100644
+index 0000000..05bcf28
+--- /dev/null
++++ b/tests/data/test728
+@@ -0,0 +1,64 @@
++<testcase>
++<info>
++<keywords>
++HTTP
++HTTP GET
++SOCKS5
++SOCKS5h
++followlocation
++</keywords>
++</info>
++
++#
++# Server-side
++<reply>
++# The hostname in this redirect is 256 characters and too long (> 255) for
++# SOCKS5 remote resolve. curl must return error CURLE_PROXY in this case.
++<data>
++HTTP/1.1 301 Moved Permanently
++Location: http://AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/
++Content-Length: 0
++Connection: close
++
++</data>
++</reply>
++
++#
++# Client-side
++<client>
++<features>
++proxy
++</features>
++<server>
++http
++socks5
++</server>
++ <name>
++SOCKS5h with HTTP redirect to hostname too long
++ </name>
++ <command>
++--no-progress-meter --location --proxy socks5h://%HOSTIP:%SOCKSPORT http://%HOSTIP:%HTTPPORT/%TESTNUMBER
++</command>
++</client>
++
++#
++# Verify data after the test has been "shot"
++<verify>
++<protocol crlf="yes">
++GET /%TESTNUMBER HTTP/1.1
++Host: %HOSTIP:%HTTPPORT
++User-Agent: curl/%VERSION
++Accept: */*
++
++</protocol>
++<errorcode>
++97
++</errorcode>
++# the error message is verified because error code CURLE_PROXY (97) may be
++# returned for any number of reasons and we need to make sure it is
++# specifically for the reason below so that we know the check is working.
++<stderr mode="text">
++curl: (97) SOCKS5: the destination hostname is too long to be resolved remotely by the proxy.
++</stderr>
++</verify>
++</testcase>
+--
+2.7.4
+
diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk
index 8da569e3e0cf..82979b110558 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,13 +14,13 @@ $(eval $(call gb_ExternalPackage_use_external_project,curl,curl))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
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.6.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 5cbedac82d1a..43bb1cad0b93 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -35,21 +35,22 @@ ifeq ($(SYSTEM_NSS),)
curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss
endif
-# use --with-darwinssl on macOS >10.5 and iOS to get a native UI for SSL certs for CMIS usage
+# use --with-secure-transport on macOS >10.5 and iOS to get a native UI for SSL certs for CMIS usage
# use --with-nss only on platforms other than macOS and iOS
$(call gb_ExternalProject_get_state_target,curl,build):
$(call gb_ExternalProject_run,build,\
./configure \
$(if $(filter iOS MACOSX,$(OS)),\
- --with-darwinssl,\
- $(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 \
+ --with-secure-transport,\
+ $(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 \
--without-libssh --without-brotli \
--without-ngtcp2 --without-quiche \
- --disable-ares \
+ --without-zstd --without-hyper --without-gsasl --without-gssapi \
+ --disable-mqtt --disable-ares \
--disable-dict --disable-file --disable-gopher --disable-imap \
--disable-ldap --disable-ldaps --disable-manual --disable-pop3 \
--disable-rtsp --disable-smb --disable-smtp --disable-telnet \
@@ -84,6 +85,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
ENABLE_IPV6=yes \
ENABLE_SSPI=yes \
ENABLE_WINSSL=yes \
+ WITH_ZLIB=static \
,winbuild)
endif
diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk
index 1cdb64c0bca2..258332bf3ba5 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -19,9 +19,12 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
external/curl/curl-msvc.patch.1 \
+ external/curl/curl-msvc-zlib.patch.1 \
external/curl/curl-msvc-disable-protocols.patch.1 \
external/curl/curl-7.26.0_win-proxy.patch \
external/curl/zlib.patch.0 \
+ external/curl/CVE-2023-38545_7.87.0.patch \
+ external/curl/2b0994c29a721c91c57.patch \
))
ifeq ($(SYSTEM_NSS),)
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 852881570e36..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);
+ }
+ }
+ }
@@ -114,7 +115,7 @@
@@ -4663,6 +4739,7 @@
}
if(proxy)
- infof(conn->data, "Uses proxy env variable %s == '%s'\n", envp, proxy);
+ infof(data, "Uses proxy env variable %s == '%s'", envp, proxy);
+#endif /* _WIN32 */
return proxy;
diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1
index c8747a5fcc1d..71ff0c01a028 100644
--- a/external/curl/curl-msvc-disable-protocols.patch.1
+++ b/external/curl/curl-msvc-disable-protocols.patch.1
@@ -2,18 +2,19 @@ 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,19 @@
+@@ -654,4 +654,20 @@
# define ENABLE_IPV6 1
#endif
+#define CURL_DISABLE_DICT 1
+#define CURL_DISABLE_FILE 1
-+//#undef CURL_DISABLE_FTP
++#undef CURL_DISABLE_FTP
+#define CURL_DISABLE_GOPHER 1
-+//#undef CURL_DISABLE_HTTP
++#undef CURL_DISABLE_HTTP
+#define CURL_DISABLE_IMAP 1
+#define CURL_DISABLE_LDAP 1
+#define CURL_DISABLE_LDAPS 1
++#define CURL_DISABLE_MQTT 1
+#define CURL_DISABLE_POP3 1
+#define CURL_DISABLE_RTSP 1
+#define CURL_DISABLE_SMB 1
@@ -24,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-zlib.patch.1 b/external/curl/curl-msvc-zlib.patch.1
new file mode 100644
index 000000000000..a9ee0013d50b
--- /dev/null
+++ b/external/curl/curl-msvc-zlib.patch.1
@@ -0,0 +1,16 @@
+find internal zlib in nmake buildsystem
+
+--- curl/winbuild/MakefileBuild.vc.orig2 2021-10-27 20:44:48.685237000 +0200
++++ curl/winbuild/MakefileBuild.vc 2021-10-27 20:47:23.792407400 +0200
+@@ -244,8 +244,9 @@
+ ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
+ ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ELSE
+-ZLIB_INC_DIR = $(DEVEL_INCLUDE)
+-ZLIB_LIB_DIR = $(DEVEL_LIB)
++ZLIB_INC_DIR = $(WORKDIR)/UnpackedTarball/zlib
++ZLIB_LIB_DIR = $(WORKDIR)/LinkTarget/StaticLibrary
++ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ENDIF
+
+ # Depending on how zlib is built the libraries have different names, we
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 189e820d1afa..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,14 +48,14 @@
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
-ZLIB_LIBS=""
AC_ARG_WITH(zlib,
- AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
- AC_HELP_STRING([--without-zlib],[disable use of zlib]),
+ AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
+ AS_HELP_STRING([--without-zlib],[disable use of zlib]),
[OPT_ZLIB="$withval"])
if test "$OPT_ZLIB" = "no" ; then
@@ -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/0001-Fix-compiler-warnings.patch b/external/expat/0001-Fix-compiler-warnings.patch
new file mode 100644
index 000000000000..adec5ed0d9be
--- /dev/null
+++ b/external/expat/0001-Fix-compiler-warnings.patch
@@ -0,0 +1,47 @@
+From 3f60a47cb5716bb810789a12ef6024c1dc448164 Mon Sep 17 00:00:00 2001
+From: Taichi Haradaguchi <20001722@ymail.ne.jp>
+Date: Fri, 9 Feb 2024 19:28:35 +0900
+Subject: [PATCH] Fix compiler warnings
+
+> In file included from ./../lib/internal.h:149,
+> from codepage.c:38:
+> ./../lib/expat.h:1045:5: warning: "XML_GE" is not defined, evaluates to 0 [-Wundef]
+> 1045 | #if XML_GE == 1
+> | ^~~~~~
+> ./../lib/internal.h:158:5: warning: "XML_GE" is not defined, evaluates to 0 [-Wundef]
+> 158 | #if XML_GE == 1
+> | ^~~~~~
+---
+ expat/lib/expat.h | 2 +-
+ expat/lib/internal.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/expat/lib/expat.h b/expat/lib/expat.h
+index 95464b0d..79bbfb61 100644
+--- a/expat/lib/expat.h
++++ b/expat/lib/expat.h
+@@ -1042,7 +1042,7 @@ typedef struct {
+ XMLPARSEAPI(const XML_Feature *)
+ XML_GetFeatureList(void);
+
+-#if XML_GE == 1
++#if defined(XML_GE) && XML_GE == 1
+ /* Added in Expat 2.4.0 for XML_DTD defined and
+ * added in Expat 2.6.0 for XML_GE == 1. */
+ XMLPARSEAPI(XML_Bool)
+diff --git a/expat/lib/internal.h b/expat/lib/internal.h
+index cce71e4c..208c6b67 100644
+--- a/expat/lib/internal.h
++++ b/expat/lib/internal.h
+@@ -155,7 +155,7 @@ extern "C" {
+ void _INTERNAL_trim_to_complete_utf8_characters(const char *from,
+ const char **fromLimRef);
+
+-#if XML_GE == 1
++#if defined(XML_GE) && XML_GE == 1
+ unsigned long long testingAccountingGetCountBytesDirect(XML_Parser parser);
+ unsigned long long testingAccountingGetCountBytesIndirect(XML_Parser parser);
+ const char *unsignedCharToPrintable(unsigned char c);
+--
+2.43.1
+
diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index 96f4e3ec8732..465105f2ca8c 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -13,9 +13,11 @@ $(eval $(call gb_UnpackedTarball_set_tarball,expat,$(EXPAT_TARBALL)))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,expat,conftools))
+# * external/expat/0001-Fix-compiler-warnings.patch was sent to upstream as
+# <https://github.com/libexpat/libexpat/pull/819> "Fix compiler warnings":
$(eval $(call gb_UnpackedTarball_add_patches,expat,\
+ external/expat/0001-Fix-compiler-warnings.patch \
external/expat/expat-winapi.patch \
- external/expat/ubsan.patch.0 \
))
# This is a bit hackish.
diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
index b33c12b83b4c..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,3 +11,15 @@
# endif
#endif /* not defined XML_STATIC */
+--- 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() */
+ # if ! defined(_CRT_RAND_S)
+ # define _CRT_RAND_S
diff --git a/external/expat/ubsan.patch.0 b/external/expat/ubsan.patch.0
deleted file mode 100644
index 8317f922df88..000000000000
--- a/external/expat/ubsan.patch.0
+++ /dev/null
@@ -1,11 +0,0 @@
---- lib/xmlparse.c
-+++ lib/xmlparse.c
-@@ -6485,7 +6485,7 @@
- static void FASTCALL
- hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
- iter->p = table->v;
-- iter->end = iter->p + table->size;
-+ iter->end = table->size == 0 ? iter->p : iter->p + table->size;
- }
-
- static NAMED *FASTCALL
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 8ecdf60e6f87..d7835622ca21 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 1b0468fc6f23..fc7ed88ac6d6 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -33,5 +33,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
external/gpgmepp/gcc9.patch \
external/gpgmepp/version.patch \
external/gpgmepp/ubsan.patch \
+ external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
new file mode 100644
index 000000000000..538a5264bed4
--- /dev/null
+++ b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
@@ -0,0 +1,32 @@
+From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001
+From: Jiri Kucera <sanczes@gmail.com>
+Date: Sun, 25 Jul 2021 11:35:54 +0200
+Subject: [PATCH] core: Support closefrom also for glibc.
+
+* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom.
+--
+
+Since 2.34, glibc introduces closefrom (the implementation
+follows *BSD standard).
+
+Signed-off-by: Werner Koch <wk@gnupg.org>
+---
+ src/posix-io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/posix-io.c b/src/posix-io.c
+index e712ef28..2a3a81fc 100644
+--- a/src/posix-io.c
++++ b/src/posix-io.c
+@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
+ if (fd_list[i].fd > fd)
+ fd = fd_list[i].fd;
+ fd++;
+-#ifdef __sun
++#if defined(__sun) || defined(__GLIBC__)
+ closefrom (fd);
+ max_fds = fd;
+ #else /*!__sun */
+--
+2.11.0
+
diff --git a/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
new file mode 100644
index 000000000000..2aef204a26e1
--- /dev/null
+++ b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
@@ -0,0 +1,29 @@
+From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed, 1 Jun 2022 07:38:21 -0600
+Subject: [PATCH] [sbix] Limit glyph extents
+
+Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
+---
+ src/hb-ot-color-sbix-table.hh | 6 ++++++
+ test/fuzzing/fonts/sbix-extents.ttf | Bin 0 -> 582 bytes
+ 2 files changed, 6 insertions(+)
+ create mode 100644 test/fuzzing/fonts/sbix-extents.ttf
+
+diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
+index 9741ebd450..6efae43cda 100644
+--- a/src/hb-ot-color-sbix-table.hh
++++ b/src/hb-ot-color-sbix-table.hh
+@@ -298,6 +298,12 @@ struct sbix
+
+ const PNGHeader &png = *blob->as<PNGHeader>();
+
++ if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536)
++ {
++ hb_blob_destroy (blob);
++ return false;
++ }
++
+ extents->x_bearing = x_offset;
+ extents->y_bearing = png.IHDR.height + y_offset;
+ extents->width = png.IHDR.width;
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index adec72ed0d57..9957f89e1b5c 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/ubsan.patch \
external/harfbuzz/icu-65-api-macros-with-semicolon.patch.1 \
+ external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 \
))
# vim: set noet sw=4 ts=4:
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/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index d785264bebad..deeeb5171aaf 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/c++20-comparison.patch \
external/icu/ubsan.patch \
external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 \
+ external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2 \
+ external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 \
))
$(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2 b/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2
new file mode 100644
index 000000000000..1ded56abf524
--- /dev/null
+++ b/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2
@@ -0,0 +1,94 @@
+From cec7de7a390dd6907b0ea0feb4488ed3934ee71d Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Tue, 16 Mar 2021 22:08:29 -0700
+Subject: [PATCH] ICU-21537 Fix invalid free by long locale name
+
+Do not free baseName if it is pointing to fullNameBuffer.
+
+Better Fix
+---
+ icu4c/source/common/locid.cpp | 9 +++++----
+ icu4c/source/test/intltest/collationtest.cpp | 10 ++++++++++
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp
+index 5d604350ecd..e16fbb724a4 100644
+--- a/icu4c/source/common/locid.cpp
++++ b/icu4c/source/common/locid.cpp
+@@ -254,7 +254,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale)
+
+ Locale::~Locale()
+ {
+- if (baseName != fullName) {
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+@@ -466,7 +466,7 @@ Locale& Locale::operator=(const Locale& other) {
+ }
+
+ Locale& Locale::operator=(Locale&& other) U_NOEXCEPT {
+- if (baseName != fullName) uprv_free(baseName);
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName);
+ if (fullName != fullNameBuffer) uprv_free(fullName);
+
+ if (other.fullName == other.fullNameBuffer) {
+@@ -1850,7 +1850,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
+ {
+ fIsBogus = FALSE;
+ /* Free our current storage */
+- if (baseName != fullName) {
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+@@ -1886,6 +1886,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
+ uloc_getName(localeID, fullName, sizeof(fullNameBuffer), &err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR || length >= (int32_t)sizeof(fullNameBuffer)) {
++ U_ASSERT(baseName == nullptr);
+ /*Go to heap for the fullName if necessary*/
+ fullName = (char *)uprv_malloc(sizeof(char)*(length + 1));
+ if(fullName == 0) {
+@@ -2039,7 +2040,7 @@ Locale::hashCode() const
+ void
+ Locale::setToBogus() {
+ /* Free our current storage */
+- if(baseName != fullName) {
++ if((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+diff --git a/icu4c/source/test/intltest/collationtest.cpp b/icu4c/source/test/intltest/collationtest.cpp
+index de51eece5c4..4f1fee9375e 100644
+--- a/icu4c/source/test/intltest/collationtest.cpp
++++ b/icu4c/source/test/intltest/collationtest.cpp
+@@ -78,6 +78,7 @@ class CollationTest : public IntlTest {
+ void TestRootElements();
+ void TestTailoredElements();
+ void TestDataDriven();
++ void TestLongLocale();
+
+ private:
+ void checkFCD(const char *name, CollationIterator &ci, CodePointIterator &cpi);
+@@ -148,6 +149,7 @@ void CollationTest::runIndexedTest(int32_t index, UBool exec, const char *&name,
+ TESTCASE_AUTO(TestRootElements);
+ TESTCASE_AUTO(TestTailoredElements);
+ TESTCASE_AUTO(TestDataDriven);
++ TESTCASE_AUTO(TestLongLocale);
+ TESTCASE_AUTO_END;
+ }
+
+@@ -1852,4 +1854,12 @@ void CollationTest::TestDataDriven() {
+ }
+ }
+
++void CollationTest::TestLongLocale() {
++ IcuTestErrorCode errorCode(*this, "TestLongLocale");
++ Locale longLocale("sie__1G_C_CEIE_CEZCX_CSUE_E_EIESZNI2_GB_LM_LMCSUE_LMCSX_"
++ "LVARIANT_MMCSIE_STEU_SU1GCEIE_SU6G_SU6SU6G_U_UBGE_UC_"
++ "UCEZCSI_UCIE_UZSIU_VARIANT_X@collation=bcs-ukvsz");
++ LocalPointer<Collator> coll(Collator::createInstance(longLocale, errorCode));
++}
++
+ #endif // !UCONFIG_NO_COLLATION
diff --git a/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
new file mode 100644
index 000000000000..4709cd8c37fd
--- /dev/null
+++ b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
@@ -0,0 +1,39 @@
+From e450fa50fc242282551f56b941dc93b9a8a0bcbb Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Tue, 13 Apr 2021 15:16:50 -0700
+Subject: [PATCH] ICU-21587 Fix memory bug w/ baseName
+
+Edge cases not fixed in assign and move assign operator
+while the locale is long and call setKeywordValue with incorrect
+keyword/values.
+---
+ icu4c/source/common/locid.cpp | 11 +++++++++--
+ icu4c/source/test/intltest/loctest.cpp | 26 ++++++++++++++++++++++++++
+ icu4c/source/test/intltest/loctest.h | 2 ++
+ 3 files changed, 37 insertions(+), 2 deletions(-)
+
+diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp
+index 02cd82a7b8e..3c6e5b06690 100644
+--- a/icu4c/source/common/locid.cpp
++++ b/icu4c/source/common/locid.cpp
+@@ -469,14 +469,18 @@ Locale& Locale::operator=(Locale&& other) U_NOEXCEPT {
+ if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName);
+ if (fullName != fullNameBuffer) uprv_free(fullName);
+
+- if (other.fullName == other.fullNameBuffer) {
++ if (other.fullName == other.fullNameBuffer || other.baseName == other.fullNameBuffer) {
+ uprv_strcpy(fullNameBuffer, other.fullNameBuffer);
++ }
++ if (other.fullName == other.fullNameBuffer) {
+ fullName = fullNameBuffer;
+ } else {
+ fullName = other.fullName;
+ }
+
+- if (other.baseName == other.fullName) {
++ if (other.baseName == other.fullNameBuffer) {
++ baseName = fullNameBuffer;
++ } else if (other.baseName == other.fullName) {
+ baseName = fullName;
+ } else {
+ baseName = other.baseName;
diff --git a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
index 38247c21f50f..8b8fa4b80db6 100644
--- a/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_flow_engine.mk
@@ -23,9 +23,6 @@ $(call gb_ExternalProject_get_state_target,jfreereport_flow_engine,build) :
$(if $(verbose),-v,-q) \
-f build.xml \
-Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- $(if $(SYSTEM_APACHE_COMMONS),\
- -Dcommons-logging.jar=$(COMMONS_LOGGING_JAR), \
- -Dcommons-logging.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-$(COMMONS_LOGGING_VERSION).jar") \
-Dlibbase.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libbase)/dist/libbase-$(LIBBASE_VERSION).jar \
-Dlibformula.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libformula)/dist/libformula-$(LIBFORMULA_VERSION).jar \
-Dliblayout.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_liblayout)/build/lib/liblayout.jar \
diff --git a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
index 831711dd44c8..fc96f7c9bb07 100644
--- a/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
+++ b/external/jfreereport/ExternalProject_jfreereport_liblayout.mk
@@ -9,10 +9,6 @@
$(eval $(call gb_ExternalProject_ExternalProject,jfreereport_liblayout))
-$(eval $(call gb_ExternalProject_use_externals,jfreereport_liblayout,\
- commons-logging \
-))
-
$(eval $(call gb_ExternalProject_use_external_projects,jfreereport_liblayout,\
jfreereport_sac \
jfreereport_libbase \
@@ -35,9 +31,6 @@ $(call gb_ExternalProject_get_state_target,jfreereport_liblayout,build) :
$(if $(verbose),-v,-q) \
-f build.xml \
-Dbuild.label="build-$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)" \
- $(if $(SYSTEM_APACHE_COMMONS),\
- -Dcommons-logging.jar=$(COMMONS_LOGGING_JAR), \
- -Dcommons-logging.jar="$(call gb_UnpackedTarball_get_dir,apache_commons_logging)/target/commons-logging-$(COMMONS_LOGGING_VERSION).jar") \
-Dflute.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_flute)/dist/flute-$(FLUTE_VERSION).jar \
-Dlibbase.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libbase)/dist/libbase-$(LIBBASE_VERSION).jar \
-Dlibformula.jar=$(call gb_UnpackedTarball_get_dir,jfreereport_libformula)/dist/libformula-$(LIBFORMULA_VERSION).jar \
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk b/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
index e0d309ab2f30..42e90e1e0bb4 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_flow_engine.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_flow_engine,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_flow_engine,\
external/jfreereport/patches/flow-engine.patch \
external/jfreereport/patches/flow-engine_date_is_datetime.patch.1 \
+ external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk b/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
index c3ba35190ede..46bb438aa58a 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libbase.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libbase,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libbase,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libbase-$(LIBBASE_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk b/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
index b648c58bbef8..c45958505e96 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libfonts.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libfonts,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libfonts,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libfonts-$(LIBFONTS_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
index 59622966895a..13e8fcfaf640 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libformula.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libformula,\
external/jfreereport/patches/libformula-seconds_rounding.patch.1 \
external/jfreereport/patches/libformula-minutes_truncation.patch.1 \
external/jfreereport/patches/libformula-datevalue_truncation.patch.1 \
+ external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk b/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
index 7281ba59b353..a2538c37820b 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_liblayout.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_liblayout,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_liblayout,\
external/jfreereport/patches/liblayout.patch \
+ external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk b/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
index 7357ddd03ad9..6221dfa52b1b 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libloader.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libloader,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libloader,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/libloader-$(LIBLOADER_VERSION)-deprecated.patch \
+ external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk b/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
index 86ff991b9f3e..e1db29d02b3e 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_librepository.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_librepository,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_librepository,\
external/jfreereport/patches/common_build.patch \
external/jfreereport/patches/librepository-$(LIBREPOSITORY_VERSION)-deprecated.patch \
+ external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk b/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
index 22d6d0cb7a2a..fb6f3d60c8da 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libserializer.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libserializer,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libserializer,\
external/jfreereport/patches/common_build.patch \
+ external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk b/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
index ceca692adee2..7a920a873d4c 100644
--- a/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
+++ b/external/jfreereport/UnpackedTarball_jfreereport_libxml.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,jfreereport_libxml,\
$(eval $(call gb_UnpackedTarball_add_patches,jfreereport_libxml,\
external/jfreereport/patches/common_build.patch \
+ external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/jfreereport/patches/flow-engine.patch b/external/jfreereport/patches/flow-engine.patch
index 63f0dbda0e9f..5cf834994268 100644
--- a/external/jfreereport/patches/flow-engine.patch
+++ b/external/jfreereport/patches/flow-engine.patch
@@ -1,13 +1,12 @@
--- misc/flow-engine-0.9.4/build.xml (Revision 6728)
+++ misc/build/flow-engine-0.9.4/build.xml (Arbeitskopie)
-@@ -24,9 +24,13 @@
+@@ -24,9 +24,12 @@
<!-- Setup the compile classpath -->
<path id="classpath">
- <fileset dir="lib">
- <include name="*.jar" />
- </fileset>
-+ <pathelement path="${commons-logging.jar}"/>
+ <pathelement path="${libbase.jar}"/>
+ <pathelement path="${libformula.jar}"/>
+ <pathelement path="${liblayout.jar}"/>
diff --git a/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..8d0df70a96df
--- /dev/null
+++ b/external/jfreereport/patches/libbase-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,903 @@
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/AbstractBoot.java 2021-02-23 12:11:46.680967049 +0000
+@@ -24,8 +24,7 @@
+ import java.util.ArrayList;
+ import java.util.Enumeration;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfigurationWrapper;
+@@ -52,7 +51,7 @@
+ /**
+ * The logger for this class.
+ */
+- private static final Log LOGGER = LogFactory.getLog(AbstractBoot.class);
++ private static final Logger LOGGER = Logger.getLogger(AbstractBoot.class.getName());
+
+ /**
+ * The configuration wrapper around the plain configuration.
+@@ -163,7 +162,7 @@
+ }
+ if (isBootFailed())
+ {
+- LOGGER.error(getClass() + " failed to boot: " + bootFailed.getMessage());
++ LOGGER.severe(getClass() + " failed to boot: " + bootFailed.getMessage());
+ }
+ while (isBootInProgress())
+ {
+@@ -206,7 +205,7 @@
+ }
+ catch (Exception e)
+ {
+- LOGGER.error(getClass() + " failed to boot: ", e);
++ LOGGER.severe(getClass() + " failed to boot: " + e);
+ this.bootFailed = e;
+ }
+ finally
+@@ -265,8 +264,8 @@
+ if (boot.isBootFailed())
+ {
+ this.bootFailed = boot.getBootFailureReason();
+- LOGGER.error("Dependent project failed to boot up: " +
+- projectInformation.getBootClass() + " failed to boot: ", this.bootFailed);
++ LOGGER.severe("Dependent project failed to boot up: " +
++ projectInformation.getBootClass() + " failed to boot: " + this.bootFailed);
+ return;
+ }
+ }
+@@ -419,7 +418,7 @@
+ }
+ catch (IOException ioe)
+ {
+- LOGGER.warn("Failed to load the user configuration at " + url, ioe);
++ LOGGER.warning("Failed to load the user configuration at " + url + " : " + ioe);
+ }
+ }
+
+@@ -431,7 +430,7 @@
+ }
+ catch (IOException e)
+ {
+- LOGGER.warn("Failed to lookup the user configurations.", e);
++ LOGGER.warning("Failed to lookup the user configurations: " + e);
+ }
+ }
+ if (addSysProps)
+@@ -455,4 +454,4 @@
+ }
+ return extWrapper;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageManager.java 2021-02-23 12:18:45.836952221 +0000
+@@ -23,8 +23,8 @@
+ import java.util.HashMap;
+ import java.util.Iterator;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.config.PropertyFileConfiguration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+@@ -63,7 +63,7 @@
+ }
+ }
+
+- private static final Log LOGGER = LogFactory.getLog(PackageManager.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageManager.class.getName());
+
+ /**
+ * An internal constant declaring that the specified module was already loaded.
+@@ -201,7 +201,7 @@
+ }
+ }
+ }
+- LOGGER.debug("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
++ LOGGER.config("Loaded a total of " + count + " modules under prefix: " + modulePrefix);
+ }
+
+ /**
+@@ -224,9 +224,9 @@
+
+ if (mod.configure(this.booter))
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Conf: " +
++ LOGGER.config("Conf: " +
+ new PadMessage(mod.getModule().getModuleClass(), 70) +
+ " [" + mod.getModule().getSubSystem() + ']');
+ }
+@@ -244,9 +244,9 @@
+
+ if (mod.initialize(this.booter))
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Init: " +
++ LOGGER.config("Init: " +
+ new PadMessage(mod.getModule().getModuleClass(), 70) +
+ " [" + mod.getModule().getSubSystem() + ']');
+ }
+@@ -271,12 +271,12 @@
+ final PackageState dependentState = (PackageState) modulesByClass.get(key);
+ if (dependentState == null)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
+ return false;
+ }
+ if (dependentState.getState() != PackageState.STATE_CONFIGURED)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not configured.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not configured.");
+ return false;
+ }
+ }
+@@ -300,12 +300,12 @@
+ final PackageState dependentState = (PackageState) modulesByClass.get(key);
+ if (dependentState == null)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not found.");
+ return false;
+ }
+ if (dependentState.getState() != PackageState.STATE_INITIALIZED)
+ {
+- LOGGER.warn("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not initializable.");
++ LOGGER.warning("Required dependency '" + key + "' for module '" + state.getModule().getModuleClass() + " not initializable.");
+ return false;
+ }
+ }
+@@ -418,15 +418,15 @@
+ {
+ if (fatal)
+ {
+- LOGGER.warn("Unresolved dependency for package: " + moduleInfo.getModuleClass());
++ LOGGER.warning("Unresolved dependency for package: " + moduleInfo.getModuleClass());
+ }
+- LOGGER.debug("Module class referenced, but not in classpath: " + moduleInfo.getModuleClass());
++ LOGGER.config("Module class referenced, but not in classpath: " + moduleInfo.getModuleClass());
+ }
+
+ if (acceptVersion(moduleInfo, module) == false)
+ {
+ // module conflict!
+- LOGGER.warn("Module " + module.getName() + ": required version: "
++ LOGGER.warning("Module " + module.getName() + ": required version: "
+ + moduleInfo + ", but found Version: \n" + module);
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+@@ -437,7 +437,7 @@
+ if (moduleContained == RETURN_MODULE_ERROR)
+ {
+ // the module caused harm before ...
+- LOGGER.debug("Indicated failure for module: " + module.getModuleClass());
++ LOGGER.config("Indicated failure for module: " + module.getModuleClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+ return false;
+@@ -447,7 +447,7 @@
+ if (incompleteModules.contains(module))
+ {
+ // we assume that loading will continue ...
+- LOGGER.error
++ LOGGER.severe
+ ("Circular module reference: This module definition is invalid: " +
+ module.getClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+@@ -460,7 +460,7 @@
+ {
+ if (loadModule(required[i], incompleteModules, modules, true) == false)
+ {
+- LOGGER.debug("Indicated failure for module: " + module.getModuleClass());
++ LOGGER.config("Indicated failure for module: " + module.getModuleClass());
+ final PackageState state = new PackageState(module, PackageState.STATE_ERROR);
+ dropFailedModule(state);
+ return false;
+@@ -472,7 +472,7 @@
+ {
+ if (loadModule(optional[i], incompleteModules, modules, true) == false)
+ {
+- LOGGER.debug("Optional module: " + optional[i].getModuleClass() + " was not loaded.");
++ LOGGER.config("Optional module: " + optional[i].getModuleClass() + " was not loaded.");
+ }
+ }
+ // maybe a dependent module defined the same base module ...
+@@ -486,7 +486,7 @@
+ }
+ catch (Exception e)
+ {
+- LOGGER.warn("Exception while loading module: " + moduleInfo, e);
++ LOGGER.warning("Exception while loading module: " + moduleInfo + " : " + e);
+ return false;
+ }
+ }
+@@ -506,7 +506,7 @@
+ }
+ if (module.getMajorVersion() == null)
+ {
+- LOGGER.warn("Module " + module.getName() + " does not define a major version.");
++ LOGGER.warning("Module " + module.getName() + " does not define a major version.");
+ }
+ else
+ {
+@@ -528,7 +528,7 @@
+ }
+ if (module.getMinorVersion() == null)
+ {
+- LOGGER.warn("Module " + module.getName() + " does not define a minor version.");
++ LOGGER.warning("Module " + module.getName() + " does not define a minor version.");
+ }
+ else
+ {
+@@ -550,14 +550,14 @@
+ }
+ if (module.getPatchLevel() == null)
+ {
+- LOGGER.debug("Module " + module.getName() + " does not define a patch level.");
++ LOGGER.config("Module " + module.getName() + " does not define a patch level.");
+ }
+ else
+ {
+ if (acceptVersion(moduleRequirement.getPatchLevel(),
+ module.getPatchLevel()) > 0)
+ {
+- LOGGER.debug("Did not accept patchlevel: "
++ LOGGER.config("Did not accept patchlevel: "
+ + moduleRequirement.getPatchLevel() + " - "
+ + module.getPatchLevel());
+ return false;
+@@ -699,4 +699,4 @@
+ p.println(mod.getDescription());
+ }
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageSorter.java 2021-02-23 12:19:11.752198616 +0000
+@@ -23,8 +23,7 @@
+ import java.util.Iterator;
+ import java.util.List;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -180,7 +179,7 @@
+ }
+
+ /** A logger for debug-messages. */
+- private static final Log LOGGER = LogFactory.getLog(PackageSorter.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageSorter.class.getName());
+
+ /**
+ * DefaultConstructor.
+@@ -313,7 +312,7 @@
+ final SortModule reqMod = (SortModule) moduleMap.get(moduleName);
+ if (reqMod == null)
+ {
+- LOGGER.warn("Invalid state: Required dependency of '" + moduleName + "' had an error.");
++ LOGGER.warning("Invalid state: Required dependency of '" + moduleName + "' had an error.");
+ continue;
+ }
+ if (reqMod.getPosition() >= position)
+@@ -415,7 +414,7 @@
+ moduleMap.get(requiredModules[i].getModuleClass());
+ if (dependentModule == null)
+ {
+- LOGGER.warn
++ LOGGER.warning
+ ("A dependent module was not found in the list of known modules." +
+ requiredModules[i].getModuleClass());
+ continue;
+@@ -431,11 +430,11 @@
+ moduleMap.get(optionalModules[i].getModuleClass());
+ if (dependentModule == null)
+ {
+- LOGGER.warn("A dependent module was not found in the list of known modules.");
++ LOGGER.warning("A dependent module was not found in the list of known modules.");
+ continue;
+ }
+ collector.add(dependentModule.getSubSystem());
+ }
+ return collector;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageState.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageState.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/boot/PackageState.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/boot/PackageState.java 2021-02-23 12:22:15.204942814 +0000
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.base.boot;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * The package state class is used by the package manager to keep track of
+@@ -31,7 +31,7 @@
+ public class PackageState
+ {
+ /** A logger. */
+- private static final Log LOGGER = LogFactory.getLog(PackageState.class);
++ private static final Logger LOGGER = Logger.getLogger(PackageState.class.getName());
+
+ /**
+ * A constant defining that the package is new.
+@@ -119,20 +119,20 @@
+ }
+ catch (NoClassDefFoundError noClassDef)
+ {
+- LOGGER.warn("Unable to load module classes for " +
++ LOGGER.warning("Unable to load module classes for " +
+ this.module.getName() + ':' + noClassDef.getMessage());
+ this.state = STATE_ERROR;
+ }
+ catch (Exception e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to configure the module " + this.module.getName(), e);
++ LOGGER.warning("Unable to configure the module " + this.module.getName() + " : " + e);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to configure the module " + this.module.getName());
++ LOGGER.warning("Unable to configure the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+@@ -187,32 +187,32 @@
+ }
+ catch (NoClassDefFoundError noClassDef)
+ {
+- LOGGER.warn("Unable to load module classes for " + this.module.getName() + ':' + noClassDef.getMessage());
++ LOGGER.warning("Unable to load module classes for " + this.module.getName() + ':' + noClassDef.getMessage());
+ this.state = STATE_ERROR;
+ }
+ catch (ModuleInitializeException me)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to initialize the module " + this.module.getName(), me);
++ LOGGER.warning("Unable to initialize the module " + this.module.getName() + " : " + me);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to initialize the module " + this.module.getName());
++ LOGGER.warning("Unable to initialize the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+ catch (Exception e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+ // its still worth a warning, but now we are more verbose ...
+- LOGGER.warn("Unable to initialize the module " + this.module.getName(), e);
++ LOGGER.warning("Unable to initialize the module " + this.module.getName() + " : " + e);
+ }
+- else if (LOGGER.isWarnEnabled())
++ else if (LOGGER.isLoggable(Level.WARNING))
+ {
+- LOGGER.warn("Unable to initialize the module " + this.module.getName());
++ LOGGER.warning("Unable to initialize the module " + this.module.getName());
+ }
+ this.state = STATE_ERROR;
+ }
+@@ -267,4 +267,4 @@
+ {
+ this.state = STATE_ERROR;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/config/PropertyFileConfiguration.java 2021-02-23 12:13:55.788194558 +0000
+@@ -22,8 +22,7 @@
+ import java.io.InputStream;
+ import java.util.Properties;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -34,7 +33,7 @@
+ public class PropertyFileConfiguration extends HierarchicalConfiguration
+ {
+ /** A logger for debug-messages. */
+- private static final Log LOGGER = LogFactory.getLog(PropertyFileConfiguration.class);
++ private static final Logger LOGGER = Logger.getLogger(PropertyFileConfiguration.class.getName());
+ /** A serialization related constant. */
+ private static final long serialVersionUID = 2423181637547944866L;
+
+@@ -89,7 +88,7 @@
+ }
+ else
+ {
+- LOGGER.debug("Configuration file not found in the classpath: " + resourceName);
++ LOGGER.config("Configuration file not found in the classpath: " + resourceName);
+ }
+
+ }
+@@ -118,9 +117,9 @@
+ }
+ catch (IOException ioe)
+ {
+- LOGGER.warn("Unable to read configuration", ioe);
++ LOGGER.warning("Unable to read configuration:" + ioe);
+ }
+
+ }
+
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ClassQueryTool.java 2021-02-23 12:24:05.460991092 +0000
+@@ -26,8 +26,7 @@
+ import java.util.zip.ZipEntry;
+ import java.util.zip.ZipInputStream;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * The class-query tool loads classes using a classloader and calls "processClass" for each class encountered. This is
+@@ -41,7 +40,7 @@
+ public abstract class ClassQueryTool
+ {
+ /** A logger. */
+- private static final Log logger = LogFactory.getLog(ClassQueryTool.class);
++ private static final Logger logger = Logger.getLogger(ClassQueryTool.class.getName());
+
+ /**
+ * The default constructor.
+@@ -89,7 +88,7 @@
+ catch (Throwable e)
+ {
+ // ignore ..
+- logger.debug("At class '" + className + "': " + e);
++ logger.config("At class '" + className + "': " + e);
+ }
+ }
+
+@@ -137,7 +136,7 @@
+ }
+ catch (final IOException e1)
+ {
+- logger.debug("Caught IO-Exception while processing file " + jarFile, e1);
++ logger.config("Caught IO-Exception while processing file " + jarFile + " : " + e1);
+ }
+ }
+
+@@ -225,7 +224,7 @@
+ for (int i = 0; i < allArray.length; i++)
+ {
+ final URL url = allArray[i];
+- logger.debug(url);
++ logger.config(url.toString());
+ }
+ for (int i = 0; i < urlsArray.length; i++)
+ {
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/DebugLog.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/DebugLog.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/DebugLog.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/DebugLog.java 2021-02-23 12:26:00.488084723 +0000
+@@ -17,8 +17,7 @@
+
+ package org.pentaho.reporting.libraries.base.util;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This class provides static log messages for on-going bug-hunting efforts. This removes the need to create
+@@ -29,7 +28,7 @@
+ public final class DebugLog
+ {
+ /** A logger. */
+- private static final Log logger = LogFactory.getLog(DebugLog.class);
++ private static final Logger logger = Logger.getLogger(DebugLog.class.getName());
+
+ /**
+ * Logs a message using the debug-logger. By channeling all temporary log messages through this method,
+@@ -39,7 +38,7 @@
+ */
+ public static void log(final Object message)
+ {
+- logger.info(message);
++ logger.info(message.toString());
+ }
+
+ /**
+@@ -51,7 +50,7 @@
+ */
+ public static void log(final Object message, final Throwable t)
+ {
+- logger.info(message, t);
++ logger.info(message + " : " + t);
+ }
+
+ /**
+@@ -68,7 +67,7 @@
+ public static void logHereWE()
+ {
+ //noinspection ThrowableInstanceNeverThrown
+- logger.info("HERE: Debug point reached", new Exception("Debug-Point reached"));
++ logger.info("HERE: Debug point reached");
+ }
+
+ /**
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ObjectUtilities.java 2021-02-23 12:30:11.253468898 +0000
+@@ -29,8 +29,8 @@
+ import java.util.Arrays;
+ import java.util.StringTokenizer;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * A collection of useful static utility methods for handling classes and object instantiation.
+@@ -39,7 +39,7 @@
+ */
+ public final class ObjectUtilities
+ {
+- private static final Log LOGGER = LogFactory.getLog(ObjectUtilities.class);
++ private static final Logger LOGGER = Logger.getLogger(ObjectUtilities.class.getName());
+
+ /**
+ * A constant for using the TheadContext as source for the classloader.
+@@ -180,15 +180,15 @@
+ }
+ catch (NoSuchMethodException e)
+ {
+- LOGGER.warn("Object without clone() method is impossible on class " + aClass, e);
++ LOGGER.warning("Object without clone() method is impossible on class " + aClass + " : " + e);
+ }
+ catch (IllegalAccessException e)
+ {
+- LOGGER.warn("Object.clone(): unable to call method 'clone()' on class " + aClass, e);
++ LOGGER.warning("Object.clone(): unable to call method 'clone()' on class " + aClass + " : " + e);
+ }
+ catch (InvocationTargetException e)
+ {
+- LOGGER.warn("Object without clone() method is impossible on class " + aClass, e);
++ LOGGER.warning("Object without clone() method is impossible on class " + aClass + " : " + e);
+ }
+ throw new CloneNotSupportedException
+ ("Failed to clone: Clone caused an Exception while cloning type " + aClass);
+@@ -424,32 +424,32 @@
+ if (type != null && type.isAssignableFrom(c) == false)
+ {
+ // this is unacceptable and means someone messed up the configuration
+- LOGGER.warn("Specified class " + className + " is not of expected type " + type);
++ LOGGER.warning("Specified class " + className + " is not of expected type " + type);
+ return null;
+ }
+ return c.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Specified class " + className + " does not exist.");
++ LOGGER.config("Specified class " + className + " does not exist.");
+ }
+ // sometimes, this one is expected.
+ }
+ catch (NoClassDefFoundError e)
+ {
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.debug("Specified class " + className + " cannot be loaded [NOCLASSDEFERROR].");
++ LOGGER.config("Specified class " + className + " cannot be loaded [NOCLASSDEFERROR].");
+ }
+ }
+ catch (Throwable e)
+ {
+ // this is more severe than a class not being found at all
+- if (LOGGER.isDebugEnabled())
++ if (LOGGER.isLoggable(Level.CONFIG))
+ {
+- LOGGER.info("Specified class " + className + " failed to instantiate correctly.", e);
++ LOGGER.info("Specified class " + className + " failed to instantiate correctly." + " : " + e);
+ }
+ else
+ {
+@@ -615,4 +615,4 @@
+ }
+ return hashCode;
+ }
+-}
+\ No newline at end of file
++}
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/PngEncoder.java 2021-02-23 12:27:15.484797751 +0000
+@@ -27,8 +27,7 @@
+ import java.util.zip.Deflater;
+ import java.util.zip.DeflaterOutputStream;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.encoder.ImageEncoder;
+ import org.pentaho.reporting.libraries.base.encoder.UnsupportedEncoderException;
+
+@@ -66,7 +65,7 @@
+ public class PngEncoder implements ImageEncoder
+ {
+ /** A logger for debug-messages. */
+- private static final Log logger = LogFactory.getLog(PngEncoder.class);
++ private static final Logger logger = Logger.getLogger(PngEncoder.class.getName());
+
+ /**
+ * Constant specifying that alpha channel should be encoded.
+@@ -622,12 +621,12 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("interrupted waiting for pixels!", e);
++ logger.severe("interrupted waiting for pixels: " + e);
+ return false;
+ }
+ if ((pg.getStatus() & ImageObserver.ABORT) != 0)
+ {
+- logger.error("image fetch aborted or errored");
++ logger.severe("image fetch aborted or errored");
+ return false;
+ }
+
+@@ -709,7 +708,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.error("Failed to write PNG Data", e);
++ logger.severe("Failed to write PNG Data:" + e);
+ return false;
+ }
+ }
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/ResourceBundleSupport.java 2021-02-23 12:27:45.015078518 +0000
+@@ -36,8 +36,7 @@
+ import javax.swing.JMenu;
+ import javax.swing.KeyStroke;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * An utility class to ease up using property-file resource bundles.
+@@ -60,7 +59,7 @@
+ /**
+ * A logger for debug-messages.
+ */
+- private static final Log logger = LogFactory.getLog(ResourceBundleSupport.class);
++ private static final Logger logger = Logger.getLogger(ResourceBundleSupport.class.getName());
+
+ /**
+ * The resource bundle that will be used for local lookups.
+@@ -259,7 +258,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Error during global lookup", e);
++ logger.severe("Error during global lookup: " + e);
+ throw new MissingResourceException("Error during global lookup", getResourceBase(), key);
+ }
+ }
+@@ -643,7 +642,7 @@
+ final URL in = ObjectUtilities.getResource(name, ResourceBundleSupport.class);
+ if (in == null)
+ {
+- logger.warn("Unable to find file in the class path: " + name + "; key=" + key);
++ logger.warning("Unable to find file in the class path: " + name + "; key=" + key);
+ }
+ return in;
+ }
+@@ -668,13 +667,13 @@
+
+ if (in == null)
+ {
+- logger.warn("Unable to find file in the class path: " + resourceName);
++ logger.warning("Unable to find file in the class path: " + resourceName);
+ return new ImageIcon(createTransparentImage(1, 1));
+ }
+ final Image img = Toolkit.getDefaultToolkit().createImage(in);
+ if (img == null)
+ {
+- logger.warn("Unable to instantiate the image: " + resourceName);
++ logger.warning("Unable to instantiate the image: " + resourceName);
+ return new ImageIcon(createTransparentImage(1, 1));
+ }
+ if (scale)
+@@ -808,7 +808,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -821,7 +821,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -836,7 +836,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+@@ -852,7 +852,7 @@
+ }
+ catch (MissingResourceException mre)
+ {
+- logger.warn ("ResourceBundleSupport#getString(,,)", mre);
++ logger.warning ("ResourceBundleSupport#getString(,,): " + mre);
+ return '!' + key + '!';
+ }
+ }
+diff -ru libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java
+--- libbase-1.1.3.orig/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java 2009-11-16 10:14:12.000000000 +0000
++++ libbase-1.1.3/source/org/pentaho/reporting/libraries/base/util/WaitingImageObserver.java 2021-02-23 12:30:28.223630238 +0000
+@@ -22,8 +22,7 @@
+ import java.awt.image.BufferedImage;
+ import java.awt.image.ImageObserver;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This image observer blocks until the image is completely loaded. AWT defers the loading of images until they are
+@@ -37,7 +36,7 @@
+ public class WaitingImageObserver implements ImageObserver
+ {
+ /** A logger. */
+- private static final Log LOGGER = LogFactory.getLog(WaitingImageObserver.class);
++ private static final Logger LOGGER = Logger.getLogger(WaitingImageObserver.class.getName());
+
+ /**
+ * For serialization.
+@@ -149,7 +148,7 @@
+ }
+ catch (InterruptedException e)
+ {
+- LOGGER.info("WaitingImageObserver.waitImageLoaded(): InterruptedException thrown", e);
++ LOGGER.info("WaitingImageObserver.waitImageLoaded(): InterruptedException thrown: " + e);
+ }
+
+ if (maxLoadTime > 0 && lastUpdate < (System.currentTimeMillis() - maxLoadTime))
+@@ -172,4 +171,4 @@
+ {
+ return this.error;
+ }
+-}
+\ No newline at end of file
++}
+--- a/source/org/pentaho/reporting/libraries/base/util/IOUtils.java
++++ b/source/org/pentaho/reporting/libraries/base/util/IOUtils.java
+@@ -34,8 +34,7 @@
+ import java.sql.Clob;
+ import java.sql.SQLException;
+
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * The IOUtils provide some IO related helper methods.
+@@ -48,7 +47,7 @@
+ * the singleton instance of the utility package.
+ */
+ private static IOUtils instance;
+- private static final Log logger = LogFactory.getLog(IOUtils.class);
++ private static final Logger logger = Logger.getLogger(IOUtils.class.getName());
+ /**
+ * DefaultConstructor.
+ */
+@@ -855,7 +854,7 @@
+ final long length = clob.length();
+ if (length > Integer.MAX_VALUE)
+ {
+- logger.warn ("This CLOB contains more than 2^31 characters. We cannot handle that.");
++ logger.warning ("This CLOB contains more than 2^31 characters. We cannot handle that.");
+ return null;
+ }
+
+@@ -867,7 +866,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Copying the stream failed.", e);
++ logger.warning ("Copying the stream failed: " + e);
+ }
+ try
+ {
+@@ -875,7 +874,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Failed to close input stream. No worries, we will be alright anyway.", e);
++ logger.warning ("Failed to close input stream. No worries, we will be alright anyway: " + e);
+ }
+ return outStream.toString();
+ }
+@@ -898,7 +897,7 @@
+ final long length = clob.length();
+ if (length > Integer.MAX_VALUE)
+ {
+- logger.warn ("This CLOB contains more than 2^31 characters. We cannot handle that.");
++ logger.warning ("This CLOB contains more than 2^31 characters. We cannot handle that.");
+ return null;
+ }
+
+@@ -910,7 +909,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Copying the stream failed.", e);
++ logger.warning ("Copying the stream failed: " + e);
+ }
+ try
+ {
+@@ -918,7 +917,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn ("Failed to close input stream. No worries, we will be alright anyway.", e);
++ logger.warning ("Failed to close input stream. No worries, we will be alright anyway: " + e);
+ }
+ return outStream.toByteArray();
+ }
diff --git a/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..723a732a593a
--- /dev/null
+++ b/external/jfreereport/patches/libfonts-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,506 @@
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:15:06.215353433 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/afm/AfmFontRegistry.java 2021-03-12 10:26:44.036236575 +0000
+@@ -37,8 +37,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 21.07.2007, 20:14:05
+@@ -47,7 +46,8 @@
+ */
+ public class AfmFontRegistry extends AbstractFontFileRegistry
+ {
+- private static final Log logger = LogFactory.getLog(AfmFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(AfmFontRegistry.class.getName());
++
+ /**
+ * The font path filter is used to collect font files and directories during
+ * the font path registration.
+@@ -133,7 +133,7 @@
+ filePfb.isFile() == false ||
+ filePfb.canRead() == false)
+ {
+- logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
++ logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
+ embedded = false;
+ }
+
+@@ -264,11 +264,11 @@
+ catch (final ClassNotFoundException cnfe)
+ {
+ // ignore the exception.
+- logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
++ logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
+ }
+ catch (Exception e)
+ {
+- logger.debug("Failed to restore the cache:", e);
++ logger.config("Failed to restore the cache: " + e);
+ }
+ }
+
+@@ -311,14 +311,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:15:06.228353587 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/EncodingRegistry.java 2021-03-12 10:27:11.614524616 +0000
+@@ -31,8 +31,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.factory.property.PropertiesResourceFactory;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A global registry for all supported encodings. This offers the option to fall
+@@ -42,7 +41,7 @@
+ */
+ public final class EncodingRegistry
+ {
+- private static final Log logger = LogFactory.getLog(EncodingRegistry.class);
++ private static final Logger logger = Logger.getLogger(EncodingRegistry.class.getName());
+
+ /**
+ * Implementation doc: This class uses several sources to load the encodings.
+@@ -266,7 +265,7 @@
+ catch (Exception e)
+ {
+ // fall back ...
+- logger.warn("Failed to create external-encoding instance for key " + key, e);
++ logger.warning("Failed to create external-encoding instance for key " + key + " : " + e);
+ }
+ }
+ if (isEncodingSupportedJVM(name))
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:15:06.218353469 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/encoding/generator/EncodingGenerator.java 2021-03-12 10:27:47.015894357 +0000
+@@ -35,8 +35,7 @@
+ import org.pentaho.reporting.libraries.fonts.encoding.External8BitEncodingData;
+ import org.pentaho.reporting.libraries.base.config.DefaultConfiguration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A simple sourcecode generator.
+@@ -45,7 +44,7 @@
+ */
+ public class EncodingGenerator
+ {
+- private static final Log logger = LogFactory.getLog(EncodingGenerator.class);
++ private static final Logger logger = Logger.getLogger(EncodingGenerator.class.getName());
+
+ private File targetDirectory;
+ private DefaultConfiguration propertySet;
+@@ -200,7 +199,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Failed to generate Encoding " + key, e);
++ logger.warning("Failed to generate Encoding " + key + " : " + e);
+ }
+ }
+ }
+@@ -269,7 +268,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Failed to generate Encoding " + key, e);
++ logger.warning("Failed to generate Encoding " + key + " : " + e);
+ }
+ }
+
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:15:06.217353457 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/pfm/PfmFontRegistry.java 2021-03-12 10:28:33.904384084 +0000
+@@ -37,8 +37,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 21.07.2007, 16:58:06
+@@ -47,7 +46,7 @@
+ */
+ public class PfmFontRegistry extends AbstractFontFileRegistry
+ {
+- private static final Log logger = LogFactory.getLog(PfmFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(PfmFontRegistry.class.getName());
+
+ /**
+ * The font path filter is used to collect font files and directories during
+@@ -146,7 +145,7 @@
+ filePfb.isFile() == false ||
+ filePfb.canRead() == false)
+ {
+- logger.warn("Cannot embedd font: " + filePfb + " is missing for " + font);
++ logger.warning("Cannot embedd font: " + filePfb + " is missing for " + font);
+ embedded = false;
+ }
+
+@@ -155,7 +154,7 @@
+ {
+ if (pfmFont.isItextCompatible() == false)
+ {
+- logger.warn("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
++ logger.warning("Cannot embedd font: pfb-file for " + font + " is not valid (according to iText).");
+ }
+ }
+ registerFont (pfmFont);
+@@ -283,7 +282,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.debug("Failed to restore the cache:", e);
++ logger.config("Failed to restore the cache: " + e);
+ }
+ }
+
+@@ -326,14 +325,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:15:06.229353599 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/registry/AbstractFontFileRegistry.java 2021-03-12 10:25:43.831607771 +0000
+@@ -25,8 +25,7 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.LibFontBoot;
+ import org.pentaho.reporting.libraries.fonts.encoding.EncodingRegistry;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+@@ -39,7 +38,7 @@
+ */
+ public abstract class AbstractFontFileRegistry implements FontRegistry
+ {
+- private static final Log logger = LogFactory.getLog(AbstractFontFileRegistry.class);
++ private static final Logger logger = Logger.getLogger(AbstractFontFileRegistry.class.getName());
+
+ private HashMap seenFiles;
+
+@@ -74,7 +73,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Extra font path " + extraDir + " could not be fully registered.", e);
++ logger.warning("Extra font path " + extraDir + " could not be fully registered: " + e);
+ }
+ }
+ }
+@@ -98,13 +97,13 @@
+ final String jrepath = safeSystemGetProperty("java.home", ".");
+ final String fs = safeSystemGetProperty("file.separator", File.separator);
+
+- logger.debug("Running on operating system: " + osname);
+- logger.debug("Character encoding used as default: " + encoding);
++ logger.config("Running on operating system: " + osname);
++ logger.config("Character encoding used as default: " + encoding);
+
+ if (safeSystemGetProperty("mrj.version", null) != null)
+ {
+ final String userhome = safeSystemGetProperty("user.home", ".");
+- logger.debug("Detected MacOS (Property 'mrj.version' is present.");
++ logger.config("Detected MacOS (Property 'mrj.version' is present.");
+ registerFontPath(new File(userhome + "/Library/Fonts"), encoding);
+ registerFontPath(new File("/Library/Fonts"), encoding);
+ registerFontPath(new File("/Network/Library/Fonts"), encoding);
+@@ -116,7 +115,7 @@
+ }
+ else
+ {
+- logger.debug("Assuming unix like file structures");
++ logger.config("Assuming unix like file structures");
+ // Assume X11 is installed in the default location.
+ registerFontPath(new File("/usr/X11R6/lib/X11/fonts"), encoding);
+ registerFontPath(new File("/usr/share/fonts"), encoding);
+@@ -145,7 +144,7 @@
+ */
+ private void registerWindowsFontPath(final String encoding)
+ {
+- logger.debug("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
++ logger.config("Found 'Windows' in the OS name, assuming DOS/Win32 structures");
+ // Assume windows
+ // If you are not using windows, ignore this. This just checks if a windows system
+ // directory exist and includes a font dir.
+@@ -182,7 +181,7 @@
+ }
+ }
+ }
+- logger.debug("Fonts located in \"" + fontPath + '\"');
++ logger.config("Fonts located in \"" + fontPath + '\"');
+ if (fontPath != null)
+ {
+ final File file = new File(fontPath);
+@@ -272,7 +271,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Font " + file + " is invalid. Message:" + e.getMessage(), e);
++ logger.warning("Font " + file + " is invalid. Message: " + e);
+ }
+ }
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:15:06.205353315 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/text/GraphemeClassifier.java 2021-03-12 10:29:03.600694237 +0000
+@@ -22,8 +22,7 @@
+ import java.io.IOException;
+
+ import org.pentaho.reporting.libraries.fonts.tools.ByteTable;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 11.06.2006, 17:11:16
+@@ -32,7 +31,7 @@
+ */
+ public final class GraphemeClassifier
+ {
+- private static final Log logger = LogFactory.getLog(GraphemeClassifier.class);
++ private static final Logger logger = Logger.getLogger(GraphemeClassifier.class.getName());
+
+ public static final int OTHER = 0;
+
+@@ -70,7 +69,7 @@
+ }
+ catch(Exception e)
+ {
+- logger.warn ("Unable to load the pre-generated classification data.", e);
++ logger.warning("Unable to load the pre-generated classification data: " + e);
+ }
+ finally
+ {
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:15:06.214353421 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFont.java 2021-03-12 10:29:19.746862875 +0000
+@@ -24,8 +24,7 @@
+ import org.pentaho.reporting.libraries.fonts.ByteAccessUtilities;
+ import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 06.11.2005, 18:27:21
+@@ -34,7 +33,7 @@
+ */
+ public class TrueTypeFont
+ {
+- private static final Log logger = LogFactory.getLog(TrueTypeFont.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFont.class.getName());
+
+ private static class TrueTypeFontHeader
+ {
+@@ -327,7 +326,7 @@
+ (FontHeaderTable) getTable(FontHeaderTable.TABLE_ID);
+ if (header == null)
+ {
+- logger.warn("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
++ logger.warning("The font '" + filename + "' does not have a 'head' table. The font file is not valid.");
+ return null;
+ }
+ final byte[] buffer =
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:15:06.213353409 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontMetricsFactory.java 2021-03-12 10:29:38.442058137 +0000
+@@ -21,8 +21,7 @@
+ import java.io.IOException;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.io.FileFontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.io.FontDataInputSource;
+ import org.pentaho.reporting.libraries.fonts.registry.FontContext;
+@@ -38,7 +37,7 @@
+ */
+ public class TrueTypeFontMetricsFactory implements FontMetricsFactory
+ {
+- private static final Log logger = LogFactory.getLog(TrueTypeFontMetricsFactory.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFontMetricsFactory.class.getName());
+ private HashMap fontRecords;
+
+ public TrueTypeFontMetricsFactory()
+@@ -77,7 +76,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.warn("Unable to read the font.", e);
++ logger.warning("Unable to read the font: " + e);
+ // todo: We should throw a better exception instead, shouldnt we?
+ throw new IllegalStateException();
+ }
+diff -ru libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java
+--- libfonts-1.1.3.orig/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:15:06.214353421 +0000
++++ libfonts-1.1.3/source/org/pentaho/reporting/libraries/fonts/truetype/TrueTypeFontRegistry.java 2021-03-12 10:31:15.504071887 +0000
+@@ -28,8 +28,7 @@
+ import java.io.Serializable;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.fonts.FontException;
+ import org.pentaho.reporting.libraries.fonts.LibFontBoot;
+ import org.pentaho.reporting.libraries.fonts.cache.FontCache;
+@@ -61,7 +60,7 @@
+ return secondLevelCache;
+ }
+
+- private static final Log logger = LogFactory.getLog(TrueTypeFontRegistry.class);
++ private static final Logger logger = Logger.getLogger(TrueTypeFontRegistry.class.getName());
+
+ /**
+ * The font path filter is used to collect font files and directories during the font path registration.
+@@ -180,7 +179,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.info("Unable to register font file " + file, e);
++ logger.info("Unable to register font file " + file + " : " + e);
+ // An error must not stop us on our holy mission to find and register
+ // all fonts :)
+ return false;
+@@ -206,7 +205,7 @@
+ }
+ catch (FontException e)
+ {
+- logger.info("The font '" + font.getFilename() + "' is invalid.", e);
++ logger.info("The font '" + font.getFilename() + "' is invalid: " + e);
+ return;
+ }
+
+@@ -347,11 +346,11 @@
+ catch (final ClassNotFoundException cnfe)
+ {
+ // ignore the exception.
+- logger.debug("Failed to restore the cache: Cache was created by a different version of LibFonts");
++ logger.config("Failed to restore the cache: Cache was created by a different version of LibFonts");
+ }
+ catch (Exception e)
+ {
+- logger.debug("Non-Fatal: Failed to restore the cache. The cache will be rebuilt.", e);
++ logger.config("Non-Fatal: Failed to restore the cache. The cache will be rebuilt: " + e);
+ }
+ }
+
+@@ -394,14 +393,14 @@
+ catch (IOException e)
+ {
+ // ignore ..
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ // should not happen
+- logger.debug("Failed to store cached font data", e);
++ logger.config("Failed to store cached font data: " + e);
+ }
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
++++ b/source/org/pentaho/reporting/libraries/fonts/itext/BaseFontSupport.java
+@@ -34,8 +34,8 @@
+ import org.pentaho.reporting.libraries.fonts.merge.CompoundFontRecord;
+ import org.pentaho.reporting.libraries.base.config.ExtendedConfiguration;
+ import org.pentaho.reporting.libraries.base.util.StringUtils;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * iText font support.
+@@ -44,7 +44,7 @@
+ */
+ public class BaseFontSupport implements FontMapper
+ {
+- private static final Log logger = LogFactory.getLog(BaseFontSupport.class);
++ private static final Logger logger = Logger.getLogger(BaseFontSupport.class.getName());
+ /**
+ * Storage for BaseFont objects created.
+ */
+@@ -235,7 +235,7 @@
+ final FontSource source = (FontSource) registryFontRecord;
+ if (source.isEmbeddable() == false)
+ {
+- logger.warn("License of font forbids embedded usage for font: " + fontKey);
++ logger.warning("License of font forbids embedded usage for font: " + fontKey);
+ // strict mode here?
+ embeddedOverride = false;
+ }
+@@ -286,13 +286,13 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage(), e);
++ logger.config("BaseFont.createFont failed. Key = " + fontKey + ": " + e);
+ }
+- else if (logger.isWarnEnabled())
++ else if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
++ logger.warning("BaseFont.createFont failed. Key = " + fontKey + ": " + e.getMessage());
+ }
+ }
+ // fallback .. use BaseFont.HELVETICA as default
+@@ -322,7 +322,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("BaseFont.createFont for FALLBACK failed.", e);
++ logger.warning("BaseFont.createFont for FALLBACK failed: " + e);
+ throw new BaseFontCreateException("Null font = " + fontKey);
+ }
+ throw new BaseFontCreateException("BaseFont creation failed, null font: " + fontKey);
diff --git a/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..5a578cf56d08
--- /dev/null
+++ b/external/jfreereport/patches/libformula-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,266 @@
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:41:06.962127389 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/Formula.java 2021-02-23 14:48:18.016328356 +0000
+@@ -19,8 +19,7 @@
+
+ import java.io.Serializable;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.lvalues.LValue;
+ import org.pentaho.reporting.libraries.formula.lvalues.TypeValuePair;
+ import org.pentaho.reporting.libraries.formula.parser.FormulaParseException;
+@@ -40,7 +39,7 @@
+ */
+ public class Formula implements Serializable, Cloneable
+ {
+- private static final Log logger = LogFactory.getLog(Formula.class);
++ private static final Logger logger = Logger.getLogger(Formula.class.getName());
+ private LValue rootReference;
+ private static final long serialVersionUID = -1176925812499923546L;
+
+@@ -105,7 +104,7 @@
+ final Type type = typeValuePair.getType();
+ if (type.isFlagSet(Type.ERROR_TYPE))
+ {
+- logger.debug("Error: " + typeValuePair.getValue());
++ logger.config("Error: " + typeValuePair.getValue());
+ }
+ else if (type.isFlagSet(Type.ARRAY_TYPE))
+ {
+@@ -131,7 +130,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.warn("Evaluation failed unexpectedly: ", e);
++ logger.warning("Evaluation failed unexpectedly: " + e);
+ return new TypeValuePair(ErrorType.TYPE, LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
+ }
+ }
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:41:06.980127564 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/DefaultFunctionRegistry.java 2021-02-23 14:48:29.995445103 +0000
+@@ -25,9 +25,7 @@
+ import org.pentaho.reporting.libraries.base.util.HashNMap;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
+-
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 02.11.2006, 12:48:32
+@@ -36,7 +34,7 @@
+ */
+ public class DefaultFunctionRegistry implements FunctionRegistry
+ {
+- private static final Log logger = LogFactory.getLog(DefaultFunctionRegistry.class);
++ private static final Logger logger = Logger.getLogger(DefaultFunctionRegistry.class.getName());
+
+ private static final String FUNCTIONS_PREFIX = "org.pentaho.reporting.libraries.formula.functions.";
+ private static final String[] EMPTY_ARRAY = new String[0];
+@@ -72,7 +70,7 @@
+ final Function function = createFunction(aName);
+ if (function == null)
+ {
+- logger.debug ("There is no such function: " + aName);
++ logger.config ("There is no such function: " + aName);
+ }
+ else
+ {
+@@ -132,7 +130,7 @@
+ (functionClass, DefaultFunctionRegistry.class, Function.class);
+ if (function == null)
+ {
+- logger.debug ("There is no such function: " + name);
++ logger.config ("There is no such function: " + name);
+ }
+ else
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:41:06.983127594 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsErrFunction.java 2021-02-23 14:48:54.904687864 +0000
+@@ -27,8 +27,7 @@
+ import org.pentaho.reporting.libraries.formula.typing.Type;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This function returns true if the parameter is of error and not of error type NA.
+@@ -37,7 +36,7 @@
+ */
+ public class IsErrFunction implements Function
+ {
+- private static final Log logger = LogFactory.getLog(IsErrFunction.class);
++ private static final Logger logger = Logger.getLogger(IsErrFunction.class.getName());
+ private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
+ private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
+ private static final long serialVersionUID = 6749192734608313367L;
+@@ -61,7 +60,7 @@
+
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:41:06.984127603 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/function/information/IsNaFunction.java 2021-02-23 14:49:05.917795194 +0000
+@@ -27,8 +27,7 @@
+ import org.pentaho.reporting.libraries.formula.typing.Type;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.ErrorType;
+ import org.pentaho.reporting.libraries.formula.typing.coretypes.LogicalType;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * This function returns true if the parameter is of error type NA.
+@@ -39,7 +38,7 @@
+ {
+ private static final TypeValuePair RETURN_FALSE = new TypeValuePair(LogicalType.TYPE, Boolean.FALSE);
+ private static final TypeValuePair RETURN_TRUE = new TypeValuePair(LogicalType.TYPE, Boolean.TRUE);
+- private static final Log logger = LogFactory.getLog(IsNaFunction.class);
++ private static final Logger logger = Logger.getLogger(IsNaFunction.class.getName());
+ private static final long serialVersionUID = 1205462839536368718L;
+
+ public IsNaFunction()
+@@ -61,7 +60,7 @@
+
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn ("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:41:06.988127642 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/lvalues/FormulaFunction.java 2021-02-23 14:50:26.354579111 +0000
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.formula.lvalues;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.EvaluationException;
+ import org.pentaho.reporting.libraries.formula.FormulaContext;
+ import org.pentaho.reporting.libraries.formula.LibFormulaErrorValue;
+@@ -44,7 +44,7 @@
+ */
+ public class FormulaFunction extends AbstractLValue
+ {
+- private static final Log logger = LogFactory.getLog(FormulaFunction.class);
++ private static final Logger logger = Logger.getLogger(FormulaFunction.class.getName());
+
+ private static class FormulaParameterCallback implements ParameterCallback
+ {
+@@ -74,9 +74,9 @@
+ final TypeValuePair converted = typeRegistry.convertTo(paramType, result);
+ if (converted == null)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to evaluate parameter " + pos + " on function " + function);
++ logger.config("Failed to evaluate parameter " + pos + " on function " + function);
+ }
+ throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_INVALID_AUTO_ARGUMENT_VALUE);
+ }
+@@ -228,7 +228,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Unexpected exception while evaluating", e);
++ logger.severe("Unexpected exception while evaluating: " + e);
+ throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_UNEXPECTED_VALUE);
+ }
+ }
+diff -ru libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java
+--- libformula-1.1.3.orig/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:41:06.961127380 +0000
++++ libformula-1.1.3/source/org/pentaho/reporting/libraries/formula/typing/DefaultTypeRegistry.java 2021-02-23 14:47:11.376678905 +0000
+@@ -35,8 +35,7 @@
+ import java.util.List;
+ import java.util.Locale;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.IOUtils;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+@@ -66,7 +65,7 @@
+ */
+ public class DefaultTypeRegistry implements TypeRegistry
+ {
+- private static final Log logger = LogFactory.getLog(DefaultTypeRegistry.class);
++ private static final Logger logger = Logger.getLogger(DefaultTypeRegistry.class.getName());
+
+ private static class ArrayConverterCallback implements ArrayCallback
+ {
+@@ -599,7 +598,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
++ logger.warning("Assertation failure: Type declared to be a sequence, but no sequence found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+@@ -612,7 +611,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
++ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+@@ -651,7 +650,7 @@
+ }
+ else
+ {
+- logger.warn("Assertation failure: Type declared to be array, but no array callback found inside.");
++ logger.warning("Assertation failure: Type declared to be array, but no array callback found inside.");
+ throw TypeConversionException.getInstance();
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/formula/function/logical/IfNaFunction.java
++++ b/source/org/pentaho/reporting/libraries/formula/function/logical/IfNaFunction.java
+@@ -17,8 +17,7 @@
+
+ package org.pentaho.reporting.libraries.formula.function.logical;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.formula.ErrorValue;
+ import org.pentaho.reporting.libraries.formula.EvaluationException;
+ import org.pentaho.reporting.libraries.formula.FormulaContext;
+@@ -37,7 +36,7 @@
+ */
+ public class IfNaFunction implements Function
+ {
+- private static final Log logger = LogFactory.getLog(IfNaFunction.class);
++ private static final Logger logger = Logger.getLogger(IfNaFunction.class.getName());
+ private static final long serialVersionUID = -7517668261071087411L;
+
+ public IfNaFunction()
+@@ -67,7 +66,7 @@
+ value = parameters.getValue(0);
+ if (ErrorType.TYPE.equals(type) && value instanceof ErrorValue)
+ {
+- logger.warn("Passing errors around is deprecated. Throw exceptions instead.");
++ logger.warning("Passing errors around is deprecated. Throw exceptions instead.");
+ final ErrorValue na = (ErrorValue) value;
+ if (na.getErrorCode() == LibFormulaErrorValue.ERROR_NA)
+ {
diff --git a/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1 b/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..5c71a57d2de7
--- /dev/null
+++ b/external/jfreereport/patches/liblayout-0.2.10-remove-commons-logging.patch.1
@@ -0,0 +1,860 @@
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java 2021-04-07 10:34:09.797045462 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/CSSValueFactory.java 2021-04-07 10:41:20.015338056 +0100
+@@ -49,8 +49,7 @@
+ import org.jfree.layouting.input.style.values.CSSStringValue;
+ import org.jfree.layouting.input.style.values.CSSValue;
+ import org.w3c.css.sac.LexicalUnit;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+@@ -61,7 +60,7 @@
+ */
+ public class CSSValueFactory
+ {
+- private static final Log logger = LogFactory.getLog(CSSValueFactory.class);
++ private static final Logger logger = Logger.getLogger(CSSValueFactory.class.getName());
+ public static final String SIMPLE_PREFIX = "org.jfree.layouting.parser.handlers.";
+ public static final String COMPOUND_PREFIX = "org.jfree.layouting.parser.compoundhandlers.";
+
+@@ -99,7 +98,7 @@
+ }
+ else
+ {
+- logger.warn("Invalid module implementation: " + c);
++ logger.warning("Invalid module implementation: " + c);
+ }
+ }
+
+@@ -300,7 +299,7 @@
+ (CSSCompoundValueReadHandler) compoundHandlers.get(name);
+ if (handler == null)
+ {
+- logger.warn("Got no key for inherited value: " + name);
++ logger.warning("Got no key for inherited value: " + name);
+ return;
+ }
+
+@@ -324,7 +323,7 @@
+ (CSSCompoundValueReadHandler) compoundHandlers.get(name);
+ if (handler == null)
+ {
+- logger.warn("Got no key for compound attr function: " + name);
++ logger.warning("Got no key for compound attr function: " + name);
+ return;
+ }
+
+@@ -373,7 +372,7 @@
+ {
+ if (key == null)
+ {
+- // Log.warn("Got no key for attribute-function " + normalizedName);
++ // Log.warning("Got no key for attribute-function " + normalizedName);
+ setCompundAttrValue(normalizedName, attrFn, rule, important);
+ return;
+ }
+@@ -387,7 +386,7 @@
+ // ATTR function (extended version).
+ if (key == null)
+ {
+- logger.warn("Got no key for attribute-function " + normalizedName);
++ logger.warning("Got no key for attribute-function " + normalizedName);
+ return;
+ }
+ final CSSAttrFunction attrFn = parseComplexAttrFn(value.getParameters());
+@@ -421,7 +420,7 @@
+ return;
+ }
+
+- logger.warn("Unparsable value: Got no valid result for " + normalizedName + " (" + value + ')');
++ logger.warning("Unparsable value: Got no valid result for " + normalizedName + " (" + value + ')');
+ return; // ignore this rule ..
+ }
+ final Map map = module.createValues(value);
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java 2021-04-07 10:34:09.798045474 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/input/style/parser/StyleSheetHandler.java 2021-04-07 10:48:18.496489721 +0100
+@@ -60,8 +60,7 @@
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.base.util.FastStack;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 23.11.2005, 13:06:06
+@@ -70,7 +69,7 @@
+ */
+ public class StyleSheetHandler implements DocumentHandler, ErrorHandler
+ {
+- private static final Log logger = LogFactory.getLog(StyleSheetHandler.class);
++ private static final Logger logger = Logger.getLogger(StyleSheetHandler.class.getName());
+ private HashMap namespaces;
+ private StyleKeyRegistry registry;
+ private StyleSheet styleSheet;
+@@ -614,7 +613,7 @@
+ catch (Exception e)
+ {
+ // we catch everything.
+- logger.warn("Error parsing style key: " + name, e);
++ logger.warning("Error parsing style key: " + name + " : " + e);
+ }
+
+ }
+@@ -639,7 +638,7 @@
+ public void warning(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Warning: " + exception.getMessage());
++ logger.warning("Warning: " + exception.getMessage());
+ }
+
+ /**
+@@ -665,7 +664,7 @@
+ public void error(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Error: ", exception);
++ logger.warning("Error: " + exception);
+ }
+
+ /**
+@@ -690,6 +689,6 @@
+ public void fatalError(final CSSParseException exception)
+ throws CSSException
+ {
+- logger.warn("Fatal Error: ", exception);
++ logger.warning("Fatal Error: " + exception);
+ }
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java liblayout-0.2.10/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java 2021-04-07 10:34:09.766045081 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/normalizer/generator/PrintContentGenerator.java 2021-04-07 10:47:20.093770766 +0100
+@@ -38,8 +38,7 @@
+ import org.jfree.layouting.layouter.context.PageContext;
+ import org.jfree.layouting.normalizer.content.NormalizationException;
+ import org.jfree.layouting.renderer.Renderer;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Simply prints each incoming call.
+@@ -48,7 +47,7 @@
+ */
+ public class PrintContentGenerator implements ContentGenerator
+ {
+- private static final Log logger = LogFactory.getLog(PrintContentGenerator.class);
++ private static final Logger logger = Logger.getLogger(PrintContentGenerator.class.getName());
+
+
+ private static class PrintContentGeneratorState implements State
+@@ -96,56 +95,56 @@
+ */
+ public void startedDocument(final PageContext pageContext)
+ {
+- logger.debug("<document>");
++ logger.config("<document>");
+ renderer.startedDocument(pageContext);
+ }
+
+ public void startedFlow(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<flow tag='" + element.getTagName() + "'>");
++ logger.config("<flow tag='" + element.getTagName() + "'>");
+ renderer.startedFlow(element);
+ }
+
+ public void startedTable(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table>");
++ logger.config("<table>");
+ renderer.startedTable(element);
+ }
+
+ public void startedTableColumnGroup(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-col-group>");
++ logger.config("<table-col-group>");
+ renderer.startedTableColumnGroup(element);
+ }
+
+ public void startedTableColumn(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-col>");
++ logger.config("<table-col>");
+ renderer.startedTableColumn(element);
+ }
+
+ public void startedTableSection(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-section>");
++ logger.config("<table-section>");
+ renderer.startedTableSection(element);
+ }
+
+ public void startedTableRow(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-row>");
++ logger.config("<table-row>");
+ renderer.startedTableRow(element);
+ }
+
+ public void startedTableCell(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<table-cell>");
++ logger.config("<table-cell>");
+ renderer.startedTableCell(element);
+ }
+
+@@ -153,7 +152,7 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<block tag='" + tagName + "'>");
++ logger.config("<block tag='" + tagName + "'>");
+ renderer.startedBlock(element);
+ }
+
+@@ -161,14 +160,14 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<paragraph tag='" + tagName + "'>");
++ logger.config("<paragraph tag='" + tagName + "'>");
+ renderer.startedRootInline(element);
+ }
+
+ public void startedMarker(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<marker>");
++ logger.config("<marker>");
+ renderer.startedMarker(element);
+ }
+
+@@ -176,80 +175,80 @@
+ throws NormalizationException
+ {
+ final String tagName = element.getTagName();
+- logger.debug("<inline tag='" + tagName + "'>");
++ logger.config("<inline tag='" + tagName + "'>");
+ renderer.startedInline(element);
+ }
+
+ public void addContent(final LayoutContext node, final ContentToken token)
+ throws NormalizationException
+ {
+- logger.debug("<content>" + token + "</content>");
++ logger.config("<content>" + token + "</content>");
+ renderer.addContent(node, token);
+ }
+
+ public void finishedInline() throws NormalizationException
+ {
+- logger.debug("</inline>");
++ logger.config("</inline>");
+ renderer.finishedInline();
+ }
+
+ public void finishedMarker() throws NormalizationException
+ {
+- logger.debug("</marker>");
++ logger.config("</marker>");
+ renderer.finishedMarker();
+ }
+
+ public void finishedRootInline() throws NormalizationException
+ {
+- logger.debug("</paragraph>");
++ logger.config("</paragraph>");
+ renderer.finishedRootInline();
+ }
+
+ public void finishedBlock() throws NormalizationException
+ {
+- logger.debug("</block>");
++ logger.config("</block>");
+ renderer.finishedBlock();
+ }
+
+ public void finishedTableCell() throws NormalizationException
+ {
+- logger.debug("</table-cell>");
++ logger.config("</table-cell>");
+ renderer.finishedTableCell();
+ }
+
+ public void finishedTableRow() throws NormalizationException
+ {
+- logger.debug("</table-row>");
++ logger.config("</table-row>");
+ renderer.finishedTableRow();
+ }
+
+ public void finishedTableSection() throws NormalizationException
+ {
+- logger.debug("</table-section>");
++ logger.config("</table-section>");
+ renderer.finishedTableSection();
+ }
+
+ public void finishedTableColumn() throws NormalizationException
+ {
+- logger.debug("</table-col>");
++ logger.config("</table-col>");
+ renderer.finishedTableColumn();
+ }
+
+ public void finishedTableColumnGroup() throws NormalizationException
+ {
+- logger.debug("</table-col-group>");
++ logger.config("</table-col-group>");
+ renderer.finishedTableColumnGroup();
+ }
+
+ public void finishedTable() throws NormalizationException
+ {
+- logger.debug("</table>");
++ logger.config("</table>");
+ renderer.finishedTable();
+ }
+
+ public void finishedFlow() throws NormalizationException
+ {
+- logger.debug("</flow>");
++ logger.config("</flow>");
+ renderer.finishedFlow();
+ }
+
+@@ -259,7 +258,7 @@
+ */
+ public void finishedDocument() throws NormalizationException
+ {
+- logger.debug("</document>");
++ logger.config("</document>");
+ renderer.finishedDocument();
+ }
+
+@@ -276,7 +275,7 @@
+ public void startedPassThrough(final LayoutContext element)
+ throws NormalizationException
+ {
+- logger.debug("<pass-through>");
++ logger.config("<pass-through>");
+ renderer.startedPassThrough(element);
+ }
+
+@@ -284,26 +283,26 @@
+ final ContentToken token)
+ throws NormalizationException
+ {
+- logger.debug("<pass-through-content>" + token + "</pass-through-content>");
++ logger.config("<pass-through-content>" + token + "</pass-through-content>");
+ renderer.addPassThroughContent(node, token);
+ }
+
+ public void finishedPassThrough() throws NormalizationException
+ {
+- logger.debug("</pass-through>");
++ logger.config("</pass-through>");
+ renderer.finishedPassThrough();
+ }
+
+ public void startedTableCaption(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug("<table-caption>");
++ logger.config("<table-caption>");
+ renderer.startedTableCaption(context);
+ }
+
+ public void finishedTableCaption() throws NormalizationException
+ {
+- logger.debug("</table-caption>");
++ logger.config("</table-caption>");
+ renderer.finishedTableCaption();
+ }
+
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/model/RenderBox.java liblayout-0.2.10/source/org/jfree/layouting/renderer/model/RenderBox.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/model/RenderBox.java 2021-04-07 10:34:09.779045241 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/model/RenderBox.java 2021-04-07 10:49:14.499179135 +0100
+@@ -44,8 +44,7 @@
+ import org.jfree.layouting.renderer.text.ExtendedBaselineInfo;
+ import org.jfree.layouting.renderer.text.TextUtility;
+ import org.pentaho.reporting.libraries.fonts.registry.FontMetrics;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * A render-box corresponds to elements in a DOM tree.
+@@ -62,7 +61,7 @@
+ */
+ public abstract class RenderBox extends RenderNode
+ {
+- private static final Log logger = LogFactory.getLog(RenderBox.class);
++ private static final Logger logger = Logger.getLogger(RenderBox.class.getName());
+ public static final boolean LOG_PRUNE = false;
+
+ private RenderNode firstChild;
+@@ -930,7 +929,7 @@
+ {
+ if (LOG_PRUNE)
+ {
+- logger.debug("Pruning: " + this);
++ logger.config("Pruning: " + this);
+ }
+ getParent().remove(this);
+ }
+@@ -944,7 +943,7 @@
+ {
+ if (LOG_PRUNE)
+ {
+- logger.debug("Pruning: " + lastChild);
++ logger.config("Pruning: " + lastChild);
+ }
+ remove(lastChild);
+ lastChild = getLastChild();
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/ModelPrinter.java liblayout-0.2.10/source/org/jfree/layouting/renderer/ModelPrinter.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/ModelPrinter.java 2021-04-07 10:34:09.786045327 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/ModelPrinter.java 2021-04-07 10:46:12.757941838 +0100
+@@ -41,8 +41,7 @@
+ import org.jfree.layouting.renderer.model.table.cells.TableCell;
+ import org.jfree.layouting.renderer.model.table.cols.TableColumn;
+ import org.jfree.layouting.renderer.model.table.cols.TableColumnModel;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: Jan 9, 2007, 2:22:59 PM
+@@ -51,7 +50,7 @@
+ */
+ public class ModelPrinter
+ {
+- private static final Log logger = LogFactory.getLog (ModelPrinter.class);
++ private static final Logger logger = Logger.getLogger(ModelPrinter.class.getName());
+
+ private ModelPrinter()
+ {
+@@ -66,7 +65,7 @@
+ b.append('[');
+ b.append(Integer.toHexString(System.identityHashCode(node)));
+ b.append(']');
+- logger.debug (b);
++ logger.config(b.toString());
+ node = node.getParent();
+ }
+ }
+@@ -96,7 +95,7 @@
+ b.append(", height=");
+ b.append(box.getHeight());
+ b.append('}');
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -105,7 +104,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(box.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -114,7 +113,7 @@
+ }
+ b.append("- boxLayoutProperties=");
+ b.append(box.getBoxLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ if (box instanceof TableRowRenderBox)
+ {
+@@ -124,7 +123,7 @@
+ for (int i = 0; i < rowInfoStructure.getCellCount(); i++)
+ {
+ final TableCell cell = rowInfoStructure.getCellAt(i);
+- logger.debug ("CELL: " + i + " = " + cell.getRowSpan() + ' ' + cell.getColSpan() + ' ' + cell);
++ logger.config("CELL: " + i + " = " + cell.getRowSpan() + ' ' + cell.getColSpan() + ' ' + cell);
+ }
+ }
+ else if (box instanceof TableRenderBox)
+@@ -134,7 +133,7 @@
+ for (int i = 0; i < columnModel.getColumnCount(); i++)
+ {
+ final TableColumn col = columnModel.getColumn(i);
+- logger.debug ("COLUMN: EffectiveSize: " + col.getEffectiveSize() + " Computed Max Width: " + col.getComputedMaximumWidth() + " Computed ChunkSize: " + col.getComputedMinChunkSize());
++ logger.config("COLUMN: EffectiveSize: " + col.getEffectiveSize() + " Computed Max Width: " + col.getComputedMaximumWidth() + " Computed ChunkSize: " + col.getComputedMinChunkSize());
+ // for (int cs = 1; cs < 3; cs++)
+ // {
+ // Log.debug ("* COLUMN: " + i + "(" + cs + ") " +
+@@ -149,14 +148,14 @@
+ else if (box instanceof TableCellRenderBox)
+ {
+ final TableCellRenderBox cellBox = (TableCellRenderBox) box;
+- logger.debug ("CELL: Position: " + cellBox.getColumnIndex());
++ logger.config("CELL: Position: " + cellBox.getColumnIndex());
+ }
+ else if (box instanceof ParagraphRenderBox)
+ {
+ final ParagraphRenderBox paraBox = (ParagraphRenderBox) box;
+- logger.debug ("-----------------------------------------------------");
++ logger.config("-----------------------------------------------------");
+ printBox(paraBox.getLineboxContainer(), level + 1);
+- logger.debug ("-----------------------------------------------------");
++ logger.config("-----------------------------------------------------");
+ }
+
+ printChilds(box, level);
+@@ -203,7 +202,7 @@
+ b.append(", height=");
+ b.append(node.getHeight());
+ b.append('}');
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+
+ b = new StringBuffer();
+@@ -213,7 +212,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(node.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+ }
+
+ private static void printText(final RenderableText text, final int level)
+@@ -238,7 +237,7 @@
+ b.append(", text='");
+ b.append(text.getRawText());
+ b.append("'}");
+- logger.debug(b.toString());
++ logger.config(b.toString());
+
+ b = new StringBuffer();
+ for (int i = 0; i < level; i++)
+@@ -247,7 +246,7 @@
+ }
+ b.append("- nodeLayoutProperties=");
+ b.append(text.getNodeLayoutProperties());
+- logger.debug(b.toString());
++ logger.config(b.toString());
+ }
+
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/PrintingRenderer.java liblayout-0.2.10/source/org/jfree/layouting/renderer/PrintingRenderer.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/renderer/PrintingRenderer.java 2021-04-07 10:34:09.786045327 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/renderer/PrintingRenderer.java 2021-04-07 10:45:03.987095239 +0100
+@@ -37,8 +37,7 @@
+ import org.jfree.layouting.layouter.context.LayoutContext;
+ import org.jfree.layouting.layouter.context.PageContext;
+ import org.jfree.layouting.normalizer.content.NormalizationException;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 17.07.2006, 17:43:21
+@@ -47,7 +46,7 @@
+ */
+ public class PrintingRenderer implements Renderer
+ {
+- private static final Log logger = LogFactory.getLog(PrintingRenderer.class);
++ private static final Logger logger = Logger.getLogger(PrintingRenderer.class.getName());
+ private static class PrintingRendererState implements State
+ {
+ private State parentState;
+@@ -89,7 +88,7 @@
+ */
+ public void startedDocument(final PageContext pageContext)
+ {
+- logger.debug ("<document>");
++ logger.config("<document>");
+ parent.startedDocument(pageContext);
+ }
+
+@@ -102,7 +101,7 @@
+ public void startedFlow(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<flow " +
++ logger.config("<flow " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedFlow(context);
+ }
+@@ -110,7 +109,7 @@
+ public void startedTable(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table " +
++ logger.config("<table " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedTable(context);
+ }
+@@ -118,7 +117,7 @@
+ public void startedTableSection(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-section " +
++ logger.config("<table-section " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableSection(layoutContext);
+ }
+@@ -126,7 +125,7 @@
+ public void startedTableRow(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-row " +
++ logger.config("<table-row " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableRow(layoutContext);
+ }
+@@ -134,7 +133,7 @@
+ public void startedTableCell(final LayoutContext layoutContext)
+ throws NormalizationException
+ {
+- logger.debug ("<table-cell " +
++ logger.config("<table-cell " +
+ "tag='" + layoutContext.getTagName() + "' namespace='" + layoutContext.getNamespace() + "'>");
+ parent.startedTableCell(layoutContext);
+ }
+@@ -142,7 +141,7 @@
+ public void startedBlock(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<block " +
++ logger.config("<block " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedBlock(context);
+ }
+@@ -150,7 +149,7 @@
+ public void startedMarker(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<marker " +
++ logger.config("<marker " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedMarker(context);
+ }
+@@ -158,7 +157,7 @@
+ public void startedRootInline(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<paragraph " +
++ logger.config("<paragraph " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedRootInline(context);
+ }
+@@ -166,7 +165,7 @@
+ public void startedInline(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<inline " +
++ logger.config("<inline " +
+ "tag='" + context.getTagName() + "' namespace='" + context.getNamespace() + "'>");
+ parent.startedInline(context);
+ }
+@@ -175,93 +174,93 @@
+ final ContentToken content)
+ throws NormalizationException
+ {
+- logger.debug ("<content>" + content + "</content>");
++ logger.config("<content>" + content + "</content>");
+ parent.addContent(context, content);
+ }
+
+ public void finishedInline() throws NormalizationException
+ {
+- logger.debug ("</inline>");
++ logger.config("</inline>");
+ parent.finishedInline();
+ }
+
+ public void finishedRootInline() throws NormalizationException
+ {
+- logger.debug ("</paragraph>");
++ logger.config("</paragraph>");
+ parent.finishedRootInline();
+ }
+
+ public void finishedMarker() throws NormalizationException
+ {
+- logger.debug ("</marker>");
++ logger.config("</marker>");
+ parent.finishedMarker();
+ }
+
+ public void finishedBlock() throws NormalizationException
+ {
+- logger.debug ("</block>");
++ logger.config("</block>");
+ parent.finishedBlock();
+ }
+
+ public void finishedTableCell() throws NormalizationException
+ {
+- logger.debug ("</table-cell>");
++ logger.config("</table-cell>");
+ parent.finishedTableCell();
+ }
+
+ public void finishedTableRow() throws NormalizationException
+ {
+- logger.debug ("</table-row>");
++ logger.config("</table-row>");
+ parent.finishedTableRow();
+ }
+
+ public void finishedTableSection() throws NormalizationException
+ {
+- logger.debug ("</table-section>");
++ logger.config("</table-section>");
+ parent.finishedTableSection();
+ }
+
+ public void finishedTable() throws NormalizationException
+ {
+- logger.debug ("</table>");
++ logger.config("</table>");
+ parent.finishedTable();
+ }
+
+ public void finishedFlow() throws NormalizationException
+ {
+- logger.debug ("</flow>");
++ logger.config("</flow>");
+ parent.finishedFlow();
+ }
+
+ public void finishedDocument() throws NormalizationException
+ {
+- logger.debug ("</document>");
++ logger.config("</document>");
+ parent.finishedDocument();
+ }
+
+ public void startedTableColumnGroup(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-column-group>");
++ logger.config("<table-column-group>");
+ parent.startedTableColumnGroup(context);
+ }
+
+ public void startedTableColumn(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-column>");
++ logger.config("<table-column>");
+ parent.startedTableColumn(context);
+ }
+
+ public void finishedTableColumnGroup() throws NormalizationException
+ {
+- logger.debug ("</table-column-group>");
++ logger.config("</table-column-group>");
+ parent.finishedTableColumnGroup();
+ }
+
+ public void finishedTableColumn() throws NormalizationException
+ {
+- logger.debug ("</table-column>");
++ logger.config("</table-column>");
+ parent.finishedTableColumn();
+ }
+
+@@ -274,14 +273,14 @@
+ */
+ public void handlePageBreak(final PageContext pageContext)
+ {
+- logger.debug ("<!-- PAGEBREAK ENCOUNTERED -->");
++ logger.config("<!-- PAGEBREAK ENCOUNTERED -->");
+ parent.handlePageBreak(pageContext);
+ }
+
+ public void startedPassThrough(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<pass-through>");
++ logger.config("<pass-through>");
+ parent.startedPassThrough(context);
+ }
+
+@@ -289,13 +288,13 @@
+ final ContentToken content)
+ throws NormalizationException
+ {
+- logger.debug ("<pass-through-content>" + content + "</pass-through-content>");
++ logger.config("<pass-through-content>" + content + "</pass-through-content>");
+ parent.addPassThroughContent(context, content);
+ }
+
+ public void finishedPassThrough() throws NormalizationException
+ {
+- logger.debug ("</pass-through>");
++ logger.config("</pass-through>");
+ parent.finishedPassThrough();
+ }
+
+@@ -307,13 +306,13 @@
+ public void startedTableCaption(final LayoutContext context)
+ throws NormalizationException
+ {
+- logger.debug ("<table-caption>");
++ logger.config("<table-caption>");
+ parent.startedTableCaption(context);
+ }
+
+ public void finishedTableCaption() throws NormalizationException
+ {
+- logger.debug ("</table-caption>");
++ logger.config("</table-caption>");
+ parent.finishedTableCaption();
+ }
+ }
+diff -ru liblayout-0.2.10.orig/source/org/jfree/layouting/util/AttributeMap.java liblayout-0.2.10/source/org/jfree/layouting/util/AttributeMap.java
+--- liblayout-0.2.10.orig/source/org/jfree/layouting/util/AttributeMap.java 2021-04-07 10:34:09.787045339 +0100
++++ liblayout-0.2.10/source/org/jfree/layouting/util/AttributeMap.java 2021-04-07 10:48:57.444969193 +0100
+@@ -35,8 +35,7 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+ /**
+@@ -46,7 +45,7 @@
+ */
+ public class AttributeMap implements Serializable, Cloneable
+ {
+- private static final Log logger = LogFactory.getLog(AttributeMap.class);
++ private static final Logger logger = Logger.getLogger(AttributeMap.class.getName());
+
+ private static final long serialVersionUID = -7442871030874215436L;
+ private static final String[] EMPTY_NAMESPACES = new String[0];
+@@ -102,7 +101,7 @@
+ }
+ catch (Exception e)
+ {
+- logger.error("Clone failed for ReportAttributeMap.createUnmodifiableMap", e);
++ logger.severe("Clone failed for ReportAttributeMap.createUnmodifiableMap:" + e);
+ throw new IllegalStateException("Clone failed for ReportAttributeMap.createUnmodifiableMap");
+ }
+ }
diff --git a/external/jfreereport/patches/liblayout.patch b/external/jfreereport/patches/liblayout.patch
index cf82b5c05a80..9e68986a86a5 100644
--- a/external/jfreereport/patches/liblayout.patch
+++ b/external/jfreereport/patches/liblayout.patch
@@ -1,13 +1,12 @@
--- misc/liblayout-0.2.10/build.xml (Revision 6728)
+++ misc/build/liblayout-0.2.10/build.xml (Arbeitskopie)
-@@ -24,9 +24,16 @@
+@@ -24,9 +24,15 @@
<!-- Setup the compile classpath -->
<path id="classpath">
- <fileset dir="lib">
- <include name="*.jar" />
- </fileset>
-+ <pathelement path="${commons-logging.jar}"/>
+ <pathelement path="${flute.jar}"/>
+ <pathelement path="${libbase.jar}"/>
+ <pathelement path="${libformula.jar}"/>
diff --git a/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..fad07d59ded8
--- /dev/null
+++ b/external/jfreereport/patches/libloader-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,635 @@
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/DefaultResourceManagerBackend.java 2021-04-07 11:08:48.389599751 +0100
+@@ -22,8 +22,8 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+
+@@ -34,7 +34,7 @@
+ */
+ public class DefaultResourceManagerBackend implements ResourceManagerBackend
+ {
+- private static final Log logger = LogFactory.getLog(DefaultResourceManagerBackend.class);
++ private static final Logger logger = Logger.getLogger(DefaultResourceManagerBackend.class.getName());
+
+ private ArrayList resourceLoaders;
+ private ArrayList resourceBundleLoaders;
+@@ -280,9 +280,9 @@
+ {
+ // ignore it, try the next factory ...
+ exception = rex;
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed at " + fact.getClass() + ": ", rex);
++ logger.config("Failed at " + fact.getClass() + ": " + rex);
+ }
+ }
+ }
+@@ -413,7 +413,7 @@
+ {
+ throw new UnrecognizedLoaderException("Invalid key: No resource-loader registered for schema: " + key.getSchema());
+ }
+- logger.debug("Loaded " + key);
++ logger.config("Loaded " + key);
+ return loader.load(key);
+ }
+
+@@ -451,7 +451,7 @@
+ ResourceLoader.class);
+ if (loader != null)
+ {
+- //Log.debug("Registering loader for " + loader.getSchema());
++ //Log.config("Registering loader for " + loader.getSchema());
+ registerLoader(loader);
+ }
+ }
+@@ -465,7 +465,7 @@
+ ResourceManager.class, ResourceBundleLoader.class);
+ if (loader != null)
+ {
+- //Log.debug("Registering loader for " + loader.getSchema());
++ //Log.config("Registering loader for " + loader.getSchema());
+ registerBundleLoader(loader);
+ }
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 10:55:58.342147402 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/factory/drawable/DrawableWrapper.java 2021-04-07 11:05:40.206289803 +0100
+@@ -27,8 +27,8 @@
+ import java.util.Collections;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 05.12.2007, 19:15:56
+@@ -37,7 +37,7 @@
+ */
+ public class DrawableWrapper
+ {
+- private static final Log logger = LogFactory.getLog(DrawableWrapper.class);
++ private static final Logger logger = Logger.getLogger(DrawableWrapper.class.getName());
+ private static final Map drawables = Collections.synchronizedMap(new HashMap());
+
+ private Object backend;
+@@ -67,9 +67,9 @@
+ Modifier.isAbstract(modifiers) ||
+ Modifier.isStatic(modifiers))
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("DrawMethod is not valid: " + aClass + '#' + drawMethod);
++ logger.warning("DrawMethod is not valid: " + aClass + '#' + drawMethod);
+ }
+ drawMethod = null;
+ }
+@@ -77,9 +77,9 @@
+ catch (NoSuchMethodException e)
+ {
+ // ignore exception
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("The object is not a drawable: " + aClass);
++ logger.warning("The object is not a drawable: " + aClass);
+ }
+ drawMethod = null;
+ }
+@@ -141,9 +141,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.warn("Invoking draw failed:", e);
++ logger.warning("Invoking draw failed: " + e);
+ }
+ }
+ }
+@@ -167,9 +167,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("Invoking getPreferredSize failed:", e);
++ logger.warning("Invoking getPreferredSize failed: " + e);
+ }
+ return null;
+ }
+@@ -193,9 +193,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isWarnEnabled())
++ if (logger.isLoggable(Level.WARNING))
+ {
+- logger.warn("Invoking isKeepAspectRatio failed:", e);
++ logger.warning("Invoking isKeepAspectRatio failed: " + e);
+ }
+ return false;
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/file/FileResourceLoader.java 2021-04-07 11:03:22.711602044 +0100
+@@ -24,8 +24,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -43,7 +42,7 @@
+ public class FileResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = FileResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(FileResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(FileResourceLoader.class.getName());
+
+ public FileResourceLoader()
+ {
+@@ -210,7 +209,7 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a File Resource Key...");
++ logger.config("Serializing a File Resource Key...");
+ if (key.getParent() != null)
+ {
+ throw new ResourceException
+@@ -224,7 +223,7 @@
+ final String strIdentifier = file.getCanonicalPath();
+ final String result = ResourceKeyUtils.createStringResourceKey
+ (key.getSchema().toString(), strIdentifier, key.getFactoryParameters());
+- logger.debug("Serialized File Resource Key: [" + result + "]");
++ logger.config("Serialized File Resource Key: [" + result + "]");
+ return result;
+ }
+ catch (IOException ioe)
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/raw/RawResourceLoader.java 2021-04-07 11:01:56.064538444 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 10:55:58.343147414 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/resource/ClassloaderResourceLoader.java 2021-04-07 11:03:14.370499656 +0100
+@@ -21,8 +21,7 @@
+ import java.util.Map;
+ import java.net.URL;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -41,7 +40,7 @@
+ public class ClassloaderResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = ClassloaderResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(ClassloaderResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(ClassloaderResourceLoader.class.getName());
+
+ public ClassloaderResourceLoader()
+ {
+@@ -197,7 +196,7 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a Classloader Resource Key...");
++ logger.config("Serializing a Classloader Resource Key...");
+ if (key.getParent() != null)
+ {
+ throw new ResourceException
+@@ -207,7 +206,7 @@
+ // Serialize the key
+ final String result = ResourceKeyUtils.createStringResourceKey(key.getSchema().toString(),
+ (String) key.getIdentifier(), key.getFactoryParameters());
+- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
++ logger.config("Serialized Classloader Resource Key: [" + result + "]");
+ return result;
+ }
+
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/URLResourceLoader.java 2021-04-07 11:03:41.998838804 +0100
+@@ -22,8 +22,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKeyCreationException;
+@@ -40,7 +39,7 @@
+ public class URLResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = URLResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(URLResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(URLResourceLoader.class.getName());
+
+ public URLResourceLoader()
+ {
+@@ -188,10 +187,10 @@
+ }
+
+ // Log information
+- logger.debug("Serializing a Classloader Resource Key...");
++ logger.config("Serializing a Classloader Resource Key...");
+ if (key.getParent() != null)
+ {
+- logger.warn("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
++ logger.warning("Serializing a Classloader Resource Key which contains a parent: key=[" + bundleKey + "] parent=["
+ + key.getParent() + "]");
+ }
+
+@@ -199,7 +198,7 @@
+ final URL url = (URL) key.getIdentifier();
+ final String result = ResourceKeyUtils.createStringResourceKey
+ (key.getSchema().toString(), url.toExternalForm(), key.getFactoryParameters());
+- logger.debug("Serialized Classloader Resource Key: [" + result + "]");
++ logger.config("Serialized Classloader Resource Key: [" + result + "]");
+ return result;
+ }
+
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/loader/zip/ZipResourceLoader.java 2021-04-07 11:02:18.522814132 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+@@ -40,7 +39,7 @@
+ public class ZipResourceLoader implements ResourceLoader
+ {
+ public static final String SCHEMA_NAME = ZipResourceLoader.class.getName();
+- private static final Log logger = LogFactory.getLog(ZipResourceLoader.class);
++ private static final Logger logger = Logger.getLogger(ZipResourceLoader.class.getName());
+
+ public ZipResourceLoader()
+ {
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:55:58.345147438 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHCacheModule.java 2021-04-07 10:58:52.758288370 +0100
+@@ -20,8 +20,7 @@
+ import org.pentaho.reporting.libraries.base.boot.AbstractModule;
+ import org.pentaho.reporting.libraries.base.boot.ModuleInitializeException;
+ import org.pentaho.reporting.libraries.base.boot.SubSystem;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 13.04.2006, 16:29:07
+@@ -30,7 +29,7 @@
+ */
+ public class EHCacheModule extends AbstractModule
+ {
+- public static final Log CACHE_MONITOR = LogFactory.getLog(EHCacheModule.class.getName() + "#CacheLog");
++ public static final Logger CACHE_MONITOR = Logger.getLogger(EHCacheModule.class.getName() + "#CacheLog");
+
+ public EHCacheModule() throws ModuleInitializeException
+ {
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:55:58.345147438 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceFactoryCache.java 2021-04-07 10:59:17.251589016 +0100
+@@ -20,8 +20,8 @@
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceKey;
+ import org.pentaho.reporting.libraries.resourceloader.cache.ResourceFactoryCache;
+@@ -110,7 +109,7 @@
+ }
+ }
+
+- private static final Log logger = LogFactory.getLog(EHResourceFactoryCache.class);
++ private static final Logger logger = Logger.getLogger(EHResourceFactoryCache.class.getName());
+ private Cache factoryCache;
+
+ public EHResourceFactoryCache(final Cache factoryCache)
+@@ -128,16 +128,16 @@
+ final Resource res = getInternal(key, target[i]);
+ if (res != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Res Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Res Cache Hit " + key);
+ }
+ return res;
+ }
+ }
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Res Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Res Cache Miss " + key);
+ }
+ return null;
+ }
+@@ -168,9 +168,9 @@
+ }
+ catch (CacheException e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to retrieve resource for key " + key, e);
++ logger.config("Failed to retrieve resource for key " + key + ": " + e);
+ }
+ return null;
+ }
+@@ -185,9 +185,9 @@
+ }
+ catch (Exception e)
+ {
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Failed to store resource for key " + source, e);
++ logger.config("Failed to store resource for key " + source + ": " + e);
+ }
+ // ignore ... the object is not serializable ..
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 10:55:58.342147402 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceKeyUtils.java 2021-04-07 11:06:27.248867251 +0100
+@@ -27,8 +27,8 @@
+ import java.util.Iterator;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.util.CSVQuoter;
+ import org.pentaho.reporting.libraries.base.util.CSVTokenizer;
+ import org.pentaho.reporting.libraries.base.util.IOUtils;
+@@ -42,7 +42,7 @@
+ {
+ private static final String DELIMITER = ";";
+ private static final String SERIALIZATION_PREFIX = "resourcekey:";
+- private static final Log logger = LogFactory.getLog(ResourceManager.class);
++ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
+
+ /**
+ * Returns a string representation of the ResourceKey based on the pieces that are passed as parameters
+@@ -169,7 +169,7 @@
+
+ sb.append(quoter.doQuoting(entrySb.toString()));
+ }
+- logger.debug("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
++ logger.config("Converted ResourceKey's Factory Parameters to String: [" + sb.toString() + "]");
+ return sb.toString();
+ }
+
+@@ -226,9 +226,9 @@
+ params.put(key, value);
+ }
+
+- if (logger.isDebugEnabled())
++ if (logger.isLoggable(Level.CONFIG))
+ {
+- logger.debug("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
++ logger.config("Converted ResourceKey's Factory Parameter String to a Map: [" + factoryParameters
+ + "] -> map of size " + params.size());
+ }
+ return params;
+@@ -369,7 +369,7 @@
+ }
+ catch (IOException e)
+ {
+- logger.error("Error closing input stream", e);
++ logger.severe("Error closing input stream: " + e);
+ }
+ }
+ }
+diff -ru libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java
+--- libloader-1.1.3.orig/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 10:55:58.344147426 +0100
++++ libloader-1.1.3/source/org/pentaho/reporting/libraries/resourceloader/ResourceManager.java 2021-04-07 11:07:50.557889876 +0100
+@@ -22,8 +22,8 @@
+ import java.util.Map;
+ import java.util.Set;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.resourceloader.cache.BundleCacheResourceWrapper;
+@@ -57,7 +57,7 @@
+ */
+ public final class ResourceManager
+ {
+- private static final Log logger = LogFactory.getLog(ResourceManager.class);
++ private static final Logger logger = Logger.getLogger(ResourceManager.class.getName());
+ private ResourceManagerBackend backend;
+
+ public static final String BUNDLE_LOADER_PREFIX = "org.pentaho.reporting.libraries.resourceloader.bundle.loader.";
+@@ -273,7 +273,7 @@
+ final ResourceBundleData bundle = loadResourceBundle(key);
+ if (bundle != null)
+ {
+- logger.debug("Loaded bundle for key " + key);
++ logger.config("Loaded bundle for key " + key);
+ return bundle;
+ }
+ final ResourceKey parent = key.getParent();
+@@ -283,7 +283,7 @@
+ final ResourceBundleData parentData = loadResourceBundle(parent);
+ if (parentData != null)
+ {
+- logger.debug("Loaded bundle for key (derivate) " + key);
++ logger.config("Loaded bundle for key (derivate) " + key);
+ return parentData.deriveData(key);
+ }
+ }
+@@ -400,9 +400,9 @@
+ newResource = backend.create(derivedManager, resourceBundleData, context, target);
+ if (isResourceCacheable(newResource))
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing created bundle-resource for key: " + key);
++ EHCacheModule.CACHE_MONITOR.config("Storing created bundle-resource for key: " + key);
+ }
+ factoryCache.put(newResource);
+ if (key != newResource.getSource())
+@@ -412,9 +412,9 @@
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Created bundle-resource is not cacheable for " + key);
++ EHCacheModule.CACHE_MONITOR.config("Created bundle-resource is not cacheable for " + key);
+ }
+ }
+ }
+@@ -423,17 +423,17 @@
+ newResource = backend.create(this, loadedData, context, target);
+ if (isResourceCacheable(newResource))
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing created resource for key: " + key);
++ EHCacheModule.CACHE_MONITOR.config("Storing created resource for key: " + key);
+ }
+ factoryCache.put(newResource);
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Created resource is not cacheable for " + key);
++ EHCacheModule.CACHE_MONITOR.config("Created resource is not cacheable for " + key);
+ }
+ }
+ }
+@@ -556,7 +556,7 @@
+ {
+ if (failedModules.contains(dataCacheProviderClass) == false)
+ {
+- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
+ failedModules.add(dataCacheProviderClass);
+ }
+ }
+@@ -593,7 +593,7 @@
+ {
+ if (failedModules.contains(dataCacheProviderClass) == false)
+ {
+- logger.warn("Failed to create data cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create data cache: " + e.getLocalizedMessage());
+ failedModules.add(dataCacheProviderClass);
+ }
+ }
+@@ -630,7 +630,7 @@
+ {
+ if (failedModules.contains(cacheProviderClass) == false)
+ {
+- logger.warn("Failed to create factory cache: " + e.getLocalizedMessage());
++ logger.warning("Failed to create factory cache: " + e.getLocalizedMessage());
+ failedModules.add(cacheProviderClass);
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
++++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceBundleDataCache.java
+@@ -17,6 +17,7 @@
+
+ package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
+
++import java.util.logging.Level;
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+@@ -64,17 +65,17 @@
+ final Element element = dataCache.get((Object) key);
+ if (element != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Bund Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Bund Cache Hit " + key);
+ }
+ return (ResourceBundleDataCacheEntry) element.getObjectValue();
+ }
+ else
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Bund Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Bund Cache Miss " + key);
+ }
+ return null;
+ }
+@@ -101,9 +102,9 @@
+ final Object keyObject = data.getBundleKey();
+ final Object valueObject = new DefaultResourceBundleDataCacheEntry(cdata, caller);
+ final Element element = new Element(keyObject, valueObject);
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Storing Bundle " + keyObject);
++ EHCacheModule.CACHE_MONITOR.config("Storing Bundle " + keyObject);
+ }
+ dataCache.put(element);
+ return cdata;
+--- a/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
++++ b/source/org/pentaho/reporting/libraries/resourceloader/modules/cache/ehcache/EHResourceDataCache.java
+@@ -17,6 +17,7 @@
+
+ package org.pentaho.reporting.libraries.resourceloader.modules.cache.ehcache;
+
++import java.util.logging.Level;
+ import net.sf.ehcache.Cache;
+ import net.sf.ehcache.CacheException;
+ import net.sf.ehcache.Element;
+@@ -64,15 +65,15 @@
+ final Element element = dataCache.get((Object) key);
+ if (element != null)
+ {
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Data Cache Hit " + key);
++ EHCacheModule.CACHE_MONITOR.config("Data Cache Hit " + key);
+ }
+ return (ResourceDataCacheEntry) element.getObjectValue();
+ }
+- if (EHCacheModule.CACHE_MONITOR.isDebugEnabled())
++ if (EHCacheModule.CACHE_MONITOR.isLoggable(Level.CONFIG))
+ {
+- EHCacheModule.CACHE_MONITOR.debug("Data Cache Miss " + key);
++ EHCacheModule.CACHE_MONITOR.config("Data Cache Miss " + key);
+ }
+ return null;
+ }
diff --git a/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..29acd6043d0a
--- /dev/null
+++ b/external/jfreereport/patches/librepository-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,117 @@
+diff -ru librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java
+--- librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java 2021-04-07 11:16:05.369984495 +0100
++++ librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zip/ZipContentLocation.java 2021-04-07 11:17:30.417035353 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.zip.ZipEntry;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.repository.ContentCreationException;
+ import org.pentaho.reporting.libraries.repository.ContentEntity;
+ import org.pentaho.reporting.libraries.repository.ContentIOException;
+@@ -35,7 +34,7 @@
+
+ public class ZipContentLocation implements ContentLocation
+ {
+- private static final Log logger = LogFactory.getLog(ZipContentLocation.class);
++ private static final Logger logger = Logger.getLogger(ZipContentLocation.class.getName());
+ private ZipRepository repository;
+ private ZipContentLocation parent;
+ private String comment;
+@@ -114,7 +113,7 @@
+ final Object entry = entries.get(path);
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+ final ZipContentLocation location;
+@@ -164,7 +163,7 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+
+@@ -188,12 +187,12 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Duplicate Content-Entry encountered: " + path);
++ logger.warning("Duplicate Content-Entry encountered: " + path);
+ return;
+ }
+ else if (entry != null)
+ {
+- logger.warn("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
++ logger.warning("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
+ }
+ final ZipContentItem contentItem = new ZipContentItem(repository, this, zipEntry, data);
+ entries.put(path, contentItem);
+@@ -352,4 +351,4 @@
+ {
+ return (entries.remove(entity.getName()) != null);
+ }
+-}
+\ No newline at end of file
++}
+diff -ru librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java
+--- librepository-1.1.3.orig/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java 2021-04-07 11:16:05.365984446 +0100
++++ librepository-1.1.3/source/org/pentaho/reporting/libraries/repository/zipreader/ZipReadContentLocation.java 2021-04-07 11:17:22.342935587 +0100
+@@ -21,8 +21,7 @@
+ import java.util.HashMap;
+ import java.util.zip.ZipEntry;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.repository.ContentCreationException;
+ import org.pentaho.reporting.libraries.repository.ContentEntity;
+ import org.pentaho.reporting.libraries.repository.ContentIOException;
+@@ -39,7 +38,7 @@
+ */
+ public class ZipReadContentLocation implements ContentLocation
+ {
+- private static final Log logger = LogFactory.getLog(ZipReadContentLocation.class);
++ private static final Logger logger = Logger.getLogger(ZipReadContentLocation.class.getName());
+ private ZipReadRepository repository;
+ private ZipReadContentLocation parent;
+ private String comment;
+@@ -117,7 +116,7 @@
+ final Object entry = entries.get(path);
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+ final ZipReadContentLocation location;
+@@ -164,7 +163,7 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Directory-Entry with the same name as a Content-Entry encountered: " + path);
++ logger.warning("Directory-Entry with the same name as a Content-Entry encountered: " + path);
+ return;
+ }
+
+@@ -188,12 +187,12 @@
+ {
+ if (entry instanceof ContentItem)
+ {
+- logger.warn("Duplicate Content-Entry encountered: " + path);
++ logger.warning("Duplicate Content-Entry encountered: " + path);
+ return;
+ }
+ else if (entry != null)
+ {
+- logger.warn("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
++ logger.warning("Replacing Directory-Entry with the same name as a Content-Entry: " + path);
+ }
+ final ZipReadContentItem contentItem = new ZipReadContentItem(repository, this, zipEntry, data);
+ entries.put(path, contentItem);
diff --git a/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1 b/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..52ee76a77491
--- /dev/null
+++ b/external/jfreereport/patches/libserializer-1.1.2-remove-commons-logging.patch.1
@@ -0,0 +1,31 @@
+diff -ru libserializer-1.1.2.orig/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java libserializer-1.1.2/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java
+--- libserializer-1.1.2.orig/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java 2021-04-07 11:22:05.509434457 +0100
++++ libserializer-1.1.2/source/org/pentaho/reporting/libraries/serializer/SerializerHelper.java 2021-04-07 11:23:19.102343782 +0100
+@@ -25,8 +25,7 @@
+ import java.util.HashMap;
+ import java.util.Iterator;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.base.config.Configuration;
+ import org.pentaho.reporting.libraries.base.util.ObjectUtilities;
+ import org.pentaho.reporting.libraries.base.util.DebugLog;
+@@ -41,7 +40,7 @@
+ */
+ public class SerializerHelper
+ {
+- private static final Log logger = LogFactory.getLog(SerializerHelper.class);
++ private static final Logger logger = Logger.getLogger(SerializerHelper.class.getName());
+ /**
+ * The singleton instance of the serialize helper.
+ */
+@@ -124,7 +123,7 @@
+ }
+ else
+ {
+- logger.warn("Invalid SerializeMethod implementation: " + c);
++ logger.warning("Invalid SerializeMethod implementation: " + c);
+ }
+ }
+ }
diff --git a/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1 b/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..ecec88c480ab
--- /dev/null
+++ b/external/jfreereport/patches/libxml-1.1.3-remove-commons-logging.patch.1
@@ -0,0 +1,313 @@
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlReadHandler.java 2021-04-07 11:48:16.381234640 +0100
+@@ -20,8 +20,8 @@
+ import java.util.HashMap;
+ import java.util.Map;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.DependencyCollector;
+ import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+@@ -40,7 +40,7 @@
+ */
+ public abstract class AbstractXmlReadHandler implements XmlReadHandler
+ {
+- private static final Log logger = LogFactory.getLog(AbstractXmlReadHandler.class);
++ private static final Logger logger = Logger.getLogger(AbstractXmlReadHandler.class.getName());
+
+ /**
+ * The root handler.
+@@ -120,8 +120,8 @@
+ final XmlReadHandler childHandler = getHandlerForChild(uri, tagName, attrs);
+ if (childHandler == null)
+ {
+- logger.warn("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
+- logger.debug(this.getClass());
++ logger.warning("Unknown tag <" + uri + ':' + tagName + ">: Start to ignore this element and all of its childs. " + getLocatorString());
++ logger.config(this.getClass().getName());
+ final IgnoreAnyChildReadHandler ignoreAnyChildReadHandler =
+ new IgnoreAnyChildReadHandler();
+ ignoreAnyChildReadHandler.init(getRootHandler(), uri, tagName);
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/AbstractXmlResourceFactory.java 2021-04-07 11:44:15.729203631 +0100
+@@ -26,8 +26,7 @@
+ import javax.xml.parsers.SAXParser;
+ import javax.xml.parsers.SAXParserFactory;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.CompoundResource;
+ import org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+@@ -56,7 +55,7 @@
+ */
+ public abstract class AbstractXmlResourceFactory implements ResourceFactory
+ {
+- private static final Log logger = LogFactory.getLog(AbstractXmlResourceFactory.class);
++ private static final Logger logger = Logger.getLogger(AbstractXmlResourceFactory.class.getName());
+
+ /**
+ * A key for the content base.
+@@ -115,7 +114,7 @@
+ }
+ catch (SAXException se)
+ {
+- logger.debug("Comments are not supported by this SAX implementation.");
++ logger.config("Comments are not supported by this SAX implementation.");
+ }
+
+ try
+@@ -133,7 +132,7 @@
+ }
+ catch (SAXException e)
+ {
+- logger.warn("No Namespace features will be available. (Yes, this is serious)");
++ logger.warning("No Namespace features will be available. (Yes, this is serious)");
+ }
+ }
+
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:34:22.314653798 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/DomTreeResourceFactory.java 2021-04-07 11:43:15.934442890 +0100
+@@ -22,8 +22,7 @@
+ import javax.xml.parsers.DocumentBuilderFactory;
+ import javax.xml.parsers.ParserConfigurationException;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.Resource;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceCreationException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+@@ -61,7 +60,7 @@
+ }
+ }
+
+- private static final Log logger = LogFactory.getLog(DomTreeResourceFactory.class);
++ private static final Logger logger = Logger.getLogger(DomTreeResourceFactory.class.getName());
+
+ /**
+ * Creates a resource by interpreting the data given in the resource-data object. If additional datastreams need to
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:34:22.313653786 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/LoggingErrorHandler.java 2021-04-07 11:49:49.117390246 +0100
+@@ -17,8 +17,8 @@
+
+ package org.pentaho.reporting.libraries.xmlns.parser;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Level;
++import java.util.logging.Logger;
+ import org.xml.sax.ErrorHandler;
+ import org.xml.sax.SAXException;
+ import org.xml.sax.SAXParseException;
+@@ -30,9 +30,9 @@
+ */
+ public class LoggingErrorHandler implements ErrorHandler
+ {
+- private static final Log defaultLogContext = LogFactory.getLog(LoggingErrorHandler.class);
++ private static final Logger defaultLogContext = Logger.getLogger(LoggingErrorHandler.class.getName());
+ /** @noinspection NonConstantLogger*/
+- private Log logContext;
++ private Logger logContext;
+
+ /**
+ * Default-Constructor. Logs to a logger configured with this class name as category.
+@@ -47,7 +47,7 @@
+ *
+ * @param logContext the logger that should receive the messages.
+ */
+- public LoggingErrorHandler(final Log logContext)
++ public LoggingErrorHandler(final Logger logContext)
+ {
+ if (logContext == null)
+ {
+@@ -78,7 +78,7 @@
+ */
+ public void warning(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+ if (exception.getMessage().startsWith("URI was not reported to parser for entity"))
+ {
+@@ -86,7 +86,7 @@
+ // the GNU thing complain about it ..
+ return;
+ }
+- logContext.debug("Parser-Warning", exception);
++ logContext.severe("Parser-Warning: " + exception.getMessage());
+ }
+ }
+
+@@ -115,15 +115,15 @@
+ */
+ public void error(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isWarnEnabled())
++ if (logContext.isLoggable(Level.WARNING))
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+- logContext.warn("Recoverable Parser-Error", exception);
++ logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
+ }
+ else
+ {
+- logContext.warn("Recoverable Parser-Error:" + exception.getMessage());
++ logContext.warning("Recoverable Parser-Error:" + exception.getMessage());
+ }
+ }
+ }
+@@ -156,15 +156,15 @@
+ */
+ public void fatalError(final SAXParseException exception) throws SAXException
+ {
+- if (logContext.isErrorEnabled())
++ if (logContext.isLoggable(Level.SEVERE))
+ {
+- if (logContext.isDebugEnabled())
++ if (logContext.isLoggable(Level.CONFIG))
+ {
+- logContext.error("Fatal Parser-Error", exception);
++ logContext.severe("Fatal Parser-Error:" + exception.getMessage());
+ }
+ else
+ {
+- logContext.error("Fatal Parser-Error:" + exception.getMessage());
++ logContext.severe("Fatal Parser-Error:" + exception.getMessage());
+ }
+ }
+ }
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:34:22.314653798 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ParserEntityResolver.java 2021-04-07 11:43:45.602820344 +0100
+@@ -22,8 +22,7 @@
+ import java.net.URL;
+ import java.util.HashMap;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.xml.sax.EntityResolver;
+ import org.xml.sax.InputSource;
+
+@@ -34,7 +33,7 @@
+ */
+ public final class ParserEntityResolver implements EntityResolver
+ {
+- private static final Log logger = LogFactory.getLog(ParserEntityResolver.class);
++ private static final Logger logger = Logger.getLogger(ParserEntityResolver.class.getName());
+
+ /**
+ * The hashtable for the known entities (deprecated DTDs).
+@@ -75,7 +74,7 @@
+ }
+ else
+ {
+- logger.warn("Validate location failed for " + publicID + " location: " + location);
++ logger.warning("Validate location failed for " + publicID + " location: " + location);
+ return false;
+ }
+ }
+@@ -101,7 +100,7 @@
+ }
+ else
+ {
+- logger.warn("Validate location failed for " + publicID + " location: " + location);
++ logger.warning("Validate location failed for " + publicID + " location: " + location);
+ return false;
+ }
+ }
+@@ -195,7 +194,7 @@
+ }
+ catch (IOException ioe)
+ {
+- logger.warn("Unable to open specified DTD", ioe);
++ logger.warning("Unable to open specified DTD: " + ioe);
+ }
+ return null;
+ }
+diff -ru pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java
+--- pentaho-libxml-1.1.3.orig/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:34:22.312653773 +0100
++++ pentaho-libxml-1.1.3/source/org/pentaho/reporting/libraries/xmlns/parser/ResourceDataInputSource.java 2021-04-07 11:44:05.484073284 +0100
+@@ -20,8 +20,7 @@
+ import java.io.InputStream;
+ import java.net.URL;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceData;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceLoadingException;
+ import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
+@@ -34,7 +33,7 @@
+ */
+ public class ResourceDataInputSource extends InputSource
+ {
+- private static final Log logger = LogFactory.getLog(ResourceDataInputSource.class);
++ private static final Logger logger = Logger.getLogger(ResourceDataInputSource.class.getName());
+ private ResourceData data;
+ private long version;
+ private ResourceManager caller;
+@@ -103,7 +102,7 @@
+ }
+ catch (ResourceLoadingException e)
+ {
+- logger.error("Unable to create byte-stream: " + data.getKey());
++ logger.severe("Unable to create byte-stream: " + data.getKey());
+ return null;
+ }
+ }
+--- a/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
++++ b/source/org/pentaho/reporting/libraries/xmlns/common/ParserUtil.java
+@@ -21,8 +21,7 @@
+ import org.pentaho.reporting.libraries.xmlns.LibXmlBoot;
+ import org.xml.sax.Locator;
+ import org.xml.sax.SAXException;
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Basic helper functions to ease up the process of parsing.
+@@ -31,7 +30,7 @@
+ */
+ public class ParserUtil
+ {
+- private static final Log logger = LogFactory.getLog(ParserUtil.class);
++ private static final Logger logger = Logger.getLogger(ParserUtil.class.getName());
+ private static boolean strictParsing;
+
+ static
+@@ -243,7 +242,7 @@
+ return false;
+ }
+
+- logger.warn("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
++ logger.warning("Invalid value encountered: Expected 'true' or 'false', but got '" + text + "'");
+ return "true".equalsIgnoreCase(text);
+ }
+ }
+@@ -281,11 +280,11 @@
+
+ if (locator == null)
+ {
+- logger.warn("Invalid value encountered for boolean attribute.");
++ logger.warning("Invalid value encountered for boolean attribute.");
+ }
+ else
+ {
+- logger.warn("Invalid value encountered for boolean attribute. [Line: " +
++ logger.warning("Invalid value encountered for boolean attribute. [Line: " +
+ locator.getLineNumber() + " Column: " + locator.getColumnNumber() + "]");
+ }
+ return Boolean.FALSE;
diff --git a/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1 b/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1
new file mode 100644
index 000000000000..80029e49fe59
--- /dev/null
+++ b/external/jfreereport/patches/pentaho-reporting-flow-engine-0.9.4-remove-commons-logging.patch.1
@@ -0,0 +1,101 @@
+diff -ru pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/JFreeReportBoot.java pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/JFreeReportBoot.java
+--- pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/JFreeReportBoot.java 2021-04-07 12:09:46.917336778 +0100
++++ pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/JFreeReportBoot.java 2021-04-07 12:12:04.794062296 +0100
+@@ -42,8 +42,7 @@
+ import org.pentaho.reporting.libraries.base.boot.PackageManager;
+ import org.pentaho.reporting.libraries.base.versioning.ProjectInformation;
+ import org.pentaho.reporting.libraries.base.LibBaseBoot;
+-import org.apache.commons.logging.LogFactory;
+-import org.apache.commons.logging.Log;
++import java.util.logging.Logger;
+
+ /**
+ * An utility class to safely boot and initialize the JFreeReport library. This class
+@@ -66,7 +65,7 @@
+ */
+ public class JFreeReportBoot extends AbstractBoot
+ {
+- private static final Log logger = LogFactory.getLog(JFreeReportBoot.class);
++ private static final Logger logger = Logger.getLogger(JFreeReportBoot.class.getName());
+
+ /**
+ * A wrappper around the user supplied global configuration.
+@@ -292,12 +291,12 @@
+ // make sure logging is re-initialized after we injected our configuration.
+ if (isStrictFP() == false)
+ {
+- logger.warn("The used VM seems to use a non-strict floating point arithmetics");
+- logger.warn("Layouts computed with this Java Virtual Maschine may be invalid.");
+- logger.warn("JFreeReport and the library 'iText' depend on the strict floating point rules");
+- logger.warn("of Java1.1 as implemented by the Sun Virtual Maschines.");
+- logger.warn("If you are using the BEA JRockit VM, start the Java VM with the option");
+- logger.warn("'-Xstrictfp' to restore the default behaviour.");
++ logger.warning("The used VM seems to use a non-strict floating point arithmetics");
++ logger.warning("Layouts computed with this Java Virtual Maschine may be invalid.");
++ logger.warning("JFreeReport and the library 'iText' depend on the strict floating point rules");
++ logger.warning("of Java1.1 as implemented by the Sun Virtual Maschines.");
++ logger.warning("If you are using the BEA JRockit VM, start the Java VM with the option");
++ logger.warning("'-Xstrictfp' to restore the default behaviour.");
+ }
+
+ final PackageManager mgr = getPackageManager();
+@@ -338,8 +337,8 @@
+ }
+ catch (Exception se)
+ {
+- logger.error
+- ("An error occured while checking the system properties for extension modules.", se);
++ logger.severe
++ ("An error occured while checking the system properties for extension modules: " + se);
+ }
+ }
+
+diff -ru pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/util/ComponentDrawable.java pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/util/ComponentDrawable.java
+--- pentaho-reporting-flow-engine-0.9.4.orig/source/org/jfree/report/util/ComponentDrawable.java 2021-04-07 12:09:46.916336765 +0100
++++ pentaho-reporting-flow-engine-0.9.4/source/org/jfree/report/util/ComponentDrawable.java 2021-04-07 12:11:25.530570919 +0100
+@@ -42,8 +42,7 @@
+ import javax.swing.RepaintManager;
+ import javax.swing.SwingUtilities;
+
+-import org.apache.commons.logging.Log;
+-import org.apache.commons.logging.LogFactory;
++import java.util.logging.Logger;
+
+ /**
+ * Creation-Date: 11.10.2005, 14:03:15
+@@ -52,7 +51,7 @@
+ */
+ public class ComponentDrawable
+ {
+- private static final Log logger = LogFactory.getLog (ComponentDrawable.class);
++ private static final Logger logger = Logger.getLogger(ComponentDrawable.class.getName());
+
+ /**
+ * A runnable that executes the drawing operation on the event-dispatcher thread.
+@@ -443,7 +442,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to compute the preferred size.");
++ ComponentDrawable.logger.warning("Failed to compute the preferred size.");
+ }
+ return new Dimension(0, 0);
+ }
+@@ -475,7 +474,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to compute the defined size.");
++ ComponentDrawable.logger.warning("Failed to compute the defined size.");
+ }
+ return new Dimension(0, 0);
+ }
+@@ -563,7 +562,7 @@
+ }
+ catch (Exception e)
+ {
+- ComponentDrawable.logger.warn("Failed to redraw the component.");
++ ComponentDrawable.logger.warning("Failed to redraw the component.");
+ }
+ }
+ }
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..9237c35a5d31 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -30,11 +30,12 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl
--disable-shared \
--disable-doc \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
+ CFLAGS="$(CFLAGS) -D__STDC__=1" \
CXXFLAGS="$(CXXFLAGS)" \
GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \
GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \
--host=$(gb_ExternalProject_libassuan_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/apache-commons/Module_apache-commons.mk b/external/libffi/ExternalPackage_libffi.mk
index 45aabe229b03..61b0a1ca460c 100644
--- a/external/apache-commons/Module_apache-commons.mk
+++ b/external/libffi/ExternalPackage_libffi.mk
@@ -7,12 +7,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_Module_Module,apache-commons))
+$(eval $(call gb_ExternalPackage_ExternalPackage,libffi,libffi))
-$(eval $(call gb_Module_add_targets,apache-commons,\
- ExternalPackage_apache_commons_logging \
- ExternalProject_apache_commons_logging \
- UnpackedTarball_apache_commons_logging \
+$(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
index bdf8fe61eb76..0ff625ea3e20 100644
--- a/external/libffi/ExternalProject_libffi.mk
+++ b/external/libffi/ExternalProject_libffi.mk
@@ -14,17 +14,34 @@ $(eval $(call gb_ExternalProject_register_targets,libffi,\
))
# 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 \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- --enable-static \
- --disable-shared \
- --with-pic \
- --enable-portable-binary \
- CC="$(CC) $(if $(filter LINUX,$(OS)),-fvisibility=hidden)" \
+ --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) \
diff --git a/external/libffi/Module_libffi.mk b/external/libffi/Module_libffi.mk
index 739fd4197000..ace75480abe3 100644
--- a/external/libffi/Module_libffi.mk
+++ b/external/libffi/Module_libffi.mk
@@ -12,6 +12,7 @@ $(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/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk
index 1fcd63180e20..e5155aad94c1 100644
--- a/external/libgpg-error/ExternalProject_libgpg-error.mk
+++ b/external/libgpg-error/ExternalProject_libgpg-error.mk
@@ -28,7 +28,7 @@ $(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Execut
--disable-doc \
--disable-tests \
--host=$(gb_ExternalProject_libgpg-error_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
&& $(MAKE) \
)
else
diff --git a/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk b/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk
index a99df67bb011..5440d16ecfc1 100644
--- a/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk
+++ b/external/libjpeg-turbo/UnpackedTarball_libjpeg-turbo.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libjpeg-turbo,\
external/libjpeg-turbo/jpeg-turbo.build.patch.1 \
$(if $(filter WNT,$(OS)),external/libjpeg-turbo/jpeg-turbo.win_build.patch.1) \
external/libjpeg-turbo/ubsan.patch \
+ external/libjpeg-turbo/c76f4a08263b0cea40d2967560ac7c21f6959079.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libjpeg-turbo/c76f4a08263b0cea40d2967560ac7c21f6959079.patch.1 b/external/libjpeg-turbo/c76f4a08263b0cea40d2967560ac7c21f6959079.patch.1
new file mode 100644
index 000000000000..cc3da737e7b0
--- /dev/null
+++ b/external/libjpeg-turbo/c76f4a08263b0cea40d2967560ac7c21f6959079.patch.1
@@ -0,0 +1,38 @@
+From c76f4a08263b0cea40d2967560ac7c21f6959079 Mon Sep 17 00:00:00 2001
+From: DRC <information@libjpeg-turbo.org>
+Date: Thu, 5 Dec 2019 13:12:28 -0600
+Subject: [PATCH] Huffman enc.: Fix very rare local buffer overrun
+
+... detected by ASan. This is a similar issue to the issue that was
+fixed with 402a715f82313384ef4606660c32d8678c79f197. Apparently it is
+possible to create a malformed JPEG image that exceeds the Huffman
+encoder's 256-byte local buffer when attempting to losslessly tranform
+the image. That makes sense, given that it was necessary to extend the
+Huffman decoder's local buffer to 512 bytes in order to handle all
+pathological cases (refer to 0463f7c9aad060fcd56e98d025ce16185279e2bc.)
+
+Since this issue affected only lossless transformation, a workflow that
+isn't generally exposed to arbitrary data exploits, and since the
+overrun did not overflow the stack (i.e. it did not result in a segfault
+or other user-visible issue, and valgrind didn't even detect it), it did
+not likely pose a security risk.
+
+Fixes #392
+---
+ ChangeLog.md | 10 ++++++++++
+ jchuff.c | 2 +-
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/jchuff.c b/jchuff.c
+index 206958e2f..cb05055d9 100644
+--- a/jchuff.c
++++ b/jchuff.c
+@@ -432,7 +432,7 @@ dump_buffer(working_state *state)
+ * scanning order-- 1, 8, 16, etc.), then this will produce an encoded block
+ * larger than 200 bytes.
+ */
+-#define BUFSIZE (DCTSIZE2 * 4)
++#define BUFSIZE (DCTSIZE2 * 8)
+
+ #define LOAD_BUFFER() { \
+ if (state->free_in_buffer < BUFSIZE) { \
diff --git a/external/liblangtag/UnpackedTarball_liblangtag.mk b/external/liblangtag/UnpackedTarball_liblangtag.mk
index 66b8051782d0..16b9ea999f71 100644
--- a/external/liblangtag/UnpackedTarball_liblangtag.mk
+++ b/external/liblangtag/UnpackedTarball_liblangtag.mk
@@ -30,8 +30,6 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,liblangtag, \
$(if $(SYSTEM_LIBXML),,external/liblangtag/langtag-libtool-rpath.patch.0) \
external/liblangtag/clang-cl.patch.0 \
- external/liblangtag/langtag-valencia.patch.0 \
- external/liblangtag/Wformat-overflow.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/liblangtag/Wformat-overflow.patch b/external/liblangtag/Wformat-overflow.patch
deleted file mode 100644
index f2d017e4b395..000000000000
--- a/external/liblangtag/Wformat-overflow.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- liblangtag/lt-script-db.c
-+++ liblangtag/lt-script-db.c
-@@ -134,8 +134,12 @@
- cnode = cnode->next;
- }
- if (!subtag) {
-- lt_warning("No subtag node: description = '%s'",
-- desc);
-+ if (!desc) {
-+ lt_warning("No subtag nor description node");
-+ } else {
-+ lt_warning("No subtag node: description = '%s'",
-+ desc);
-+ }
- goto bail1;
- }
- if (!desc) {
diff --git a/external/liblangtag/langtag-valencia.patch.0 b/external/liblangtag/langtag-valencia.patch.0
deleted file mode 100644
index dc28043042e4..000000000000
--- a/external/liblangtag/langtag-valencia.patch.0
+++ /dev/null
@@ -1,29 +0,0 @@
---- liblangtag/lt-tag.c
-+++ liblangtag/lt-tag.c
-@@ -2009,11 +2009,23 @@
- if (ctag->region)
- lt_string_append_printf(string, "_%s",
- lt_region_get_tag(ctag->region));
-- if (ctag->script) {
-+ if (ctag->script)
- mod = lt_script_convert_to_modifier(ctag->script);
-- if (mod)
-- lt_string_append_printf(string, "@%s", mod);
-+ if (!mod && ctag->variants)
-+ {
-+ lt_list_t* l;
-+ for (l = ctag->variants; l != NULL; l = lt_list_next(l)) {
-+ lt_variant_t *variant = lt_list_value(l);
-+ const char *s = lt_variant_get_tag(variant);
-+ if (lt_strcmp0(s, "valencia") == 0) {
-+ mod = "valencia";
-+ break;
-+ }
-+ }
- }
-+ if (mod)
-+ lt_string_append_printf(string, "@%s", mod);
-+
- lt_tag_unref(ctag);
-
- bail:
diff --git a/external/libmwaw/Library_mwaw.mk b/external/libmwaw/Library_mwaw.mk
index fc874fcb5e45..880a70861e24 100644
--- a/external/libmwaw/Library_mwaw.mk
+++ b/external/libmwaw/Library_mwaw.mk
@@ -120,6 +120,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetDecoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetEncoder \
UnpackedTarball/libmwaw/src/lib/MWAWSpreadsheetListener \
+ UnpackedTarball/libmwaw/src/lib/MWAWStream \
UnpackedTarball/libmwaw/src/lib/MWAWStringStream \
UnpackedTarball/libmwaw/src/lib/MWAWSubDocument \
UnpackedTarball/libmwaw/src/lib/MWAWTable \
@@ -173,10 +174,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,mwaw,\
UnpackedTarball/libmwaw/src/lib/PowerPoint7Text \
UnpackedTarball/libmwaw/src/lib/RagTime5Chart \
UnpackedTarball/libmwaw/src/lib/RagTime5ClusterManager \
+ UnpackedTarball/libmwaw/src/lib/RagTime5Document \
+ UnpackedTarball/libmwaw/src/lib/RagTime5Formula \
UnpackedTarball/libmwaw/src/lib/RagTime5Graph \
UnpackedTarball/libmwaw/src/lib/RagTime5Layout \
UnpackedTarball/libmwaw/src/lib/RagTime5Parser \
UnpackedTarball/libmwaw/src/lib/RagTime5Pipeline \
+ UnpackedTarball/libmwaw/src/lib/RagTime5SSParser \
UnpackedTarball/libmwaw/src/lib/RagTime5Spreadsheet \
UnpackedTarball/libmwaw/src/lib/RagTime5StructManager \
UnpackedTarball/libmwaw/src/lib/RagTime5StyleManager \
diff --git a/external/libnumbertext/EmptyString.patch1 b/external/libnumbertext/EmptyString.patch1
new file mode 100644
index 000000000000..d6570117da09
--- /dev/null
+++ b/external/libnumbertext/EmptyString.patch1
@@ -0,0 +1,13 @@
+--- a/src/Soros.cxx 2022-06-27 09:36:46.486075920 +0100
++++ b/src/Soros.cxx 2022-06-27 09:37:52.594072196 +0100
+@@ -98,8 +98,8 @@
+ s = regex_replace(s, quoteEnd, L"");
+ s = translate(s, c.substr(1), m.substr(1), L"");
+ replace(s, slash, L"\\\\"); // -> \\, ", ;, #
+- begins.push_back(s[0] == L'^');
+- ends.push_back(s[s.length()-1] == L'$');
++ begins.push_back(!s.empty() && s[0] == L'^');
++ ends.push_back(!s.empty() && s[s.length()-1] == L'$');
+ s = L"^" + regex_replace(s, wregex(L"^\\^"), L"");
+ s = regex_replace(s, wregex(L"\\$$"), L"") + L"$";
+ try
diff --git a/external/libnumbertext/UnpackedTarball_libnumbertext.mk b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
index 67b147393e31..5667b138bbb0 100644
--- a/external/libnumbertext/UnpackedTarball_libnumbertext.mk
+++ b/external/libnumbertext/UnpackedTarball_libnumbertext.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libnumbertext,1))
# <https://github.com/Numbertext/libnumbertext/pull/43>:
$(eval $(call gb_UnpackedTarball_add_patches,libnumbertext, \
external/libnumbertext/0001-Don-t-depend-on-en_US.UTF-8-locale.patch \
+ external/libnumbertext/EmptyString.patch1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 b/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
deleted file mode 100644
index 1fc4e6b9d261..000000000000
--- a/external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1
+++ /dev/null
@@ -1,58 +0,0 @@
-From 68e0c8e4c834df57bc9a0e8da72151f69ff5e7a6 Mon Sep 17 00:00:00 2001
-From: David Tardon <dtardon@redhat.com>
-Date: Fri, 12 Aug 2016 12:50:39 +0200
-Subject: [PATCH] tdf#101077 make double->string conversion locale-agnostic
-
----
- src/OdsGenerator.cxx | 19 +++++++++++++++++--
- 1 file changed, 17 insertions(+), 2 deletions(-)
-
-diff --git a/src/OdsGenerator.cxx b/src/OdsGenerator.cxx
-index 52e135e..8cb7203 100644
---- a/src/OdsGenerator.cxx
-+++ b/src/OdsGenerator.cxx
-@@ -26,6 +26,8 @@
-
- #include <librevenge/librevenge.h>
-
-+#include <iomanip>
-+#include <locale>
- #include <map>
- #include <stack>
- #include <sstream>
-@@ -46,6 +48,19 @@
- #include "OdcGenerator.hxx"
- #include "OdfGenerator.hxx"
-
-+namespace
-+{
-+
-+librevenge::RVNGString makePreciseStr(const double value)
-+{
-+ std::ostringstream os;
-+ os.imbue(std::locale::classic());
-+ os << std::fixed << std::setprecision(8) << value;
-+ return os.str().c_str();
-+}
-+
-+}
-+
- class OdsGeneratorPrivate : public OdfGenerator
- {
- public:
-@@ -968,10 +983,10 @@ void OdsGenerator::openSheetCell(const librevenge::RVNGPropertyList &propList)
- // we need the maximum precision here, so we must avoid getStr() when possible
- librevenge::RVNGString value;
- if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_GENERIC)
-- value.sprintf("%.8f", propList["librevenge:value"]->getDouble());
-+ value = makePreciseStr(propList["librevenge:value"]->getDouble());
- else if (propList["librevenge:value"]->getUnit()==librevenge::RVNG_PERCENT)
- {
-- value.sprintf("%.8f", propList["librevenge:value"]->getDouble()*100.);
-+ value = makePreciseStr(propList["librevenge:value"]->getDouble()*100.);
- value.append('%');
- }
- else
---
-2.7.4
-
diff --git a/external/libodfgen/ExternalProject_libodfgen.mk b/external/libodfgen/ExternalProject_libodfgen.mk
index c02b4f532d65..a173cdd47535 100644
--- a/external/libodfgen/ExternalProject_libodfgen.mk
+++ b/external/libodfgen/ExternalProject_libodfgen.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libodfgen,\
))
$(eval $(call gb_ExternalProject_use_externals,libodfgen,\
+ libxml2 \
revenge \
))
@@ -33,10 +34,11 @@ $(call gb_ExternalProject_get_state_target,libodfgen,build) :
--disable-werror \
--disable-weffc \
--without-docs \
- --with-sharedptr=c++11 \
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
CXXFLAGS="$(gb_CXXFLAGS) $(if $(ENABLE_OPTIMIZED),$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS))" \
CPPFLAGS="$(CPPFLAGS) $(if $(SYSTEM_REVENGE),,$(if $(filter-out MSC,$(COM)),-DLIBREVENGE_VISIBILITY))" \
+ XML_CFLAGS="$(LIBXML_CFLAGS)" \
+ XML_LIBS="$(LIBXML_LIBS)" \
$(if $(filter LINUX,$(OS)),$(if $(SYSTEM_REVENGE),, \
'LDFLAGS=-Wl$(COMMA)-z$(COMMA)origin \
-Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN')) \
diff --git a/external/libodfgen/Library_odfgen.mk b/external/libodfgen/Library_odfgen.mk
index 946fa9081452..b67f5ad89715 100644
--- a/external/libodfgen/Library_odfgen.mk
+++ b/external/libodfgen/Library_odfgen.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,odfgen))
$(eval $(call gb_Library_use_unpacked,odfgen,libodfgen))
$(eval $(call gb_Library_use_externals,odfgen,\
+ libxml2 \
revenge \
))
@@ -26,7 +27,6 @@ $(eval $(call gb_Library_add_defs,odfgen,\
-DDLL_EXPORT \
-DLIBODFGEN_BUILD \
-DNDEBUG \
- -DSHAREDPTR_STD \
-DPACKAGE=\"libodfgen\" \
-DVERSION=\"0.1.$(ODFGEN_VERSION_MICRO)\" \
))
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,odfgen,\
UnpackedTarball/libodfgen/src/GraphicStyle \
UnpackedTarball/libodfgen/src/InternalHandler \
UnpackedTarball/libodfgen/src/ListStyle \
+ UnpackedTarball/libodfgen/src/NumberingStyle \
UnpackedTarball/libodfgen/src/OdcGenerator \
UnpackedTarball/libodfgen/src/OdfGenerator \
UnpackedTarball/libodfgen/src/OdgGenerator \
diff --git a/external/libodfgen/UnpackedTarball_libodfgen.mk b/external/libodfgen/UnpackedTarball_libodfgen.mk
index c4ea2939f4cb..d6c84e517970 100644
--- a/external/libodfgen/UnpackedTarball_libodfgen.mk
+++ b/external/libodfgen/UnpackedTarball_libodfgen.mk
@@ -29,12 +29,4 @@ $(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
endif
endif
-# * external/libodfgen/c++11.patch: obsoleted upstream by
-# <https://sourceforge.net/p/libwpd/libodfgen/ci/e11112e50562de4f3252227bfba175ededf82194/>
-# "boost::shared_ptr -> std::shared_ptr"
-$(eval $(call gb_UnpackedTarball_add_patches,libodfgen, \
- external/libodfgen/0001-tdf-101077-make-double-string-conversion-locale-agno.patch.1 \
- external/libodfgen/c++11.patch \
-))
-
# vim: set noet sw=4 ts=4:
diff --git a/external/libodfgen/c++11.patch b/external/libodfgen/c++11.patch
deleted file mode 100644
index f41d1a166964..000000000000
--- a/external/libodfgen/c++11.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-# Add -std=c++11 before existing CXXFLAGS, in case those already contain some -std= (which will thus
-# override the preceding -std=c++11, which is likely what the caller passing in those CXXFLAGS
-# intends):
-#
-#--- configure.ac
-#+++ configure.ac
-#@@ -217,7 +217,7 @@
-# AS_IF([test "x$with_sharedptr" = "xc++11"], [
-# AC_MSG_CHECKING([for c++11 shared ptr])
-# save_CXXFLAGS="$CXXFLAGS"
-#- CXXFLAGS="$CXXFLAGS -std=c++11"
-#+ CXXFLAGS="-std=c++11 $CXXFLAGS"
-# AC_COMPILE_IFELSE([
-# AC_LANG_PROGRAM(
-# [[#include <memory>]],
-#@@ -241,7 +241,7 @@
-# AC_MSG_RESULT([no])
-# ], [
-# AC_MSG_RESULT([yes])
-#- CXXFLAGS="$CXXFLAGS -std=c++11"
-#+ CXXFLAGS="-std=c++11 $CXXFLAGS"
-# ])
-# ])
-# AS_IF([test "x$with_sharedptr" = "xtr1"], [
---- configure
-+++ configure
-@@ -16723,7 +16723,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c++11 shared ptr" >&5
- $as_echo_n "checking for c++11 shared ptr... " >&6; }
- save_CXXFLAGS="$CXXFLAGS"
-- CXXFLAGS="$CXXFLAGS -std=c++11"
-+ CXXFLAGS="-std=c++11 $CXXFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-@@ -16780,7 +16780,7 @@
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-- CXXFLAGS="$CXXFLAGS -std=c++11"
-+ CXXFLAGS="-std=c++11 $CXXFLAGS"
-
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
diff --git a/external/libodfgen/libodfgen-bundled-soname.patch.0 b/external/libodfgen/libodfgen-bundled-soname.patch.0
index 052ba795e40e..f5c0caf8d6d1 100644
--- a/external/libodfgen/libodfgen-bundled-soname.patch.0
+++ b/external/libodfgen/libodfgen-bundled-soname.patch.0
@@ -1,9 +1,8 @@
diff -urN src/Makefile.in.orig src/Makefile.in
--- src/Makefile.in.orig 2016-03-02 17:17:02.812606210 +0100
+++ src/Makefile.in 2016-03-02 17:17:25.176670151 +0100
-@@ -355,7 +355,7 @@
- AM_CXXFLAGS = -I$(top_srcdir)/inc/ $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBODFGEN_BUILD
- libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LIBADD = @LIBODFGEN_WIN32_RESOURCE@ $(REVENGE_LIBS)
+@@ -355,6 +355,6 @@
+ libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LIBADD = @LIBODFGEN_WIN32_RESOURCE@ $(REVENGE_LIBS) $(XML_LIBS)
libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_DEPENDENCIES = @LIBODFGEN_WIN32_RESOURCE@
-libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined
+libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined -release lo
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk
index e5e33b0b1249..a6c36095f3ab 100644
--- a/external/liborcus/UnpackedTarball_liborcus.mk
+++ b/external/liborcus/UnpackedTarball_liborcus.mk
@@ -15,11 +15,29 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,liborcus,1))
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,liborcus))
+# forcepoint-83.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/9f6400b8192e39fefd475a96222713e9e9c60038
+# forcepoint-84.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/223defe95d6f20f1bc5fd22fecc80a79a9519028
+# forcepoint-87.patch.1 merged as
+# https://gitlab.com/orcus/orcus/-/commit/a718524ca424fb8a7e7931345a118342d1d4a507
+# forcepoint-95.patch.1 submitted as
+# https://gitlab.com/orcus/orcus/-/merge_requests/124
+
$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
external/liborcus/rpath.patch.0 \
external/liborcus/gcc9.patch.0 \
external/liborcus/libtool.patch.0 \
external/liborcus/fix-pch.patch.0 \
+ external/liborcus/include.patch.0 \
+))
+
+$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\
+ external/liborcus/forcepoint-83.patch.1 \
+ external/liborcus/forcepoint-84.patch.1 \
+ external/liborcus/forcepoint-87.patch.1 \
+ external/liborcus/forcepoint-95.patch.1 \
+ external/liborcus/overrun.patch.0 \
))
ifeq ($(OS),WNT)
diff --git a/external/liborcus/forcepoint-83.patch.1 b/external/liborcus/forcepoint-83.patch.1
new file mode 100644
index 000000000000..644c0dcfff4e
--- /dev/null
+++ b/external/liborcus/forcepoint-83.patch.1
@@ -0,0 +1,38 @@
+From 4d58816e995a562f26f3cc5006ae9ddd46b1bbed Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Wed, 23 Mar 2022 16:44:00 +0000
+Subject: [PATCH] forcepoint#83 Invalid read of size 1
+
+==343916== Invalid read of size 1
+==343916== at 0x11A7B2F0: orcus::parser_base::cur_char() const (parser_base.hpp:79)
+==343916== by 0x11B7B112: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element_open(long) (sax_parser.hpp:258)
+==343916== by 0x11B7A2C7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element() (sax_parser.hpp:246)
+==343916== by 0x11B7A197: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::body() (sax_parser.hpp:214)
+==343916== by 0x11B79FD9: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::parse() (sax_parser.hpp:182)
+==343916== by 0x11B79F8B: orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::parse() (sax_ns_parser.hpp:277)
+==343916== by 0x11B79768: orcus::sax_token_parser<orcus::xml_stream_handler>::parse() (sax_token_parser.hpp:215)
+==343916== by 0x11B79406: orcus::xml_stream_parser::parse() (xml_stream_parser.cpp:68)
+==343916== by 0x11BE3805: orcus::orcus_xlsx::detect(unsigned char const*, unsigned long) (orcus_xlsx.cpp:188)
+==343916== by 0x11AB2482: orcus::detect(unsigned char const*, unsigned long) (format_detection.cpp:60)
+==343916== by 0x30E60945: (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:83)
+==343916== by 0x30E60ABE: non-virtual thunk to (anonymous namespace)::OrcusFormatDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (filterdetect.cxx:0)
+---
+ include/orcus/sax_parser.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/orcus/sax_parser.hpp b/include/orcus/sax_parser.hpp
+index 15e8d917..2e707568 100644
+--- a/include/orcus/sax_parser.hpp
++++ b/include/orcus/sax_parser.hpp
+@@ -255,7 +255,7 @@ void sax_parser<_Handler,_Config>::element_open(std::ptrdiff_t begin_pos)
+ while (true)
+ {
+ skip_space_and_control();
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c == '/')
+ {
+ // Self-closing element: <element/>
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-84.patch.1 b/external/liborcus/forcepoint-84.patch.1
new file mode 100644
index 000000000000..462fc8bd972d
--- /dev/null
+++ b/external/liborcus/forcepoint-84.patch.1
@@ -0,0 +1,38 @@
+From ec469f774bb91302c4df21eff1314dfd508d37c8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Wed, 23 Mar 2022 20:04:31 +0000
+Subject: [PATCH] forcepoint#84 Invalid read of size 1
+
+==356879== Invalid read of size 1
+==356879== at 0x11EC50B0: orcus::parser_base::cur_char() const (parser_base.hpp:79)
+==356879== by 0x11EDD736: orcus::sax::parser_base::value(std::basic_string_view<char, std::char_traits<char> >&, bool) (sax_parser_base.cpp:303)
+==356879== by 0x11B7C3D5: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::attribute() (sax_parser.hpp:563)
+==356879== by 0x11B7B35E: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element_open(long) (sax_parser.hpp:292)
+==356879== by 0x11B7A2F7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::element() (sax_parser.hpp:246)
+==356879== by 0x11B7A1C7: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::body() (sax_parser.hpp:214)
+==356879== by 0x11B7A009: orcus::sax_parser<orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::handler_wrapper, orcus::sax_parser_default_config>::parse() (sax_parser.hpp:182)
+==356879== by 0x11B79FBB: orcus::sax_ns_parser<orcus::sax_token_parser<orcus::xml_stream_handler>::handler_wrapper>::parse() (sax_ns_parser.hpp:277)
+==356879== by 0x11B79798: orcus::sax_token_parser<orcus::xml_stream_handler>::parse() (sax_token_parser.hpp:215)
+==356879== by 0x11B79436: orcus::xml_stream_parser::parse() (xml_stream_parser.cpp:68)
+==356879== by 0x11BE3855: orcus::orcus_xlsx::detect(unsigned char const*, unsigned long) (orcus_xlsx.cpp:188)
+==356879== by 0x11AB2492: orcus::detect(unsigned char const*, unsigned long) (format_detection.cpp:60)
+---
+ src/parser/sax_parser_base.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
+index 46acb81d..1cee821e 100644
+--- a/src/parser/sax_parser_base.cpp
++++ b/src/parser/sax_parser_base.cpp
+@@ -298,7 +298,7 @@ void parser_base::value_with_encoded_char(cell_buffer& buf, std::string_view& st
+
+ bool parser_base::value(pstring& str, bool decode)
+ {
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c != '"' && c != '\'')
+ throw malformed_xml_error("value must be quoted", offset());
+
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-87.patch.1 b/external/liborcus/forcepoint-87.patch.1
new file mode 100644
index 000000000000..f02a4726d8e5
--- /dev/null
+++ b/external/liborcus/forcepoint-87.patch.1
@@ -0,0 +1,27 @@
+From e4f3741197a3af6d434850d388483b523138a214 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Thu, 24 Mar 2022 21:31:14 +0000
+Subject: [PATCH] forcepoint#87 Assertion `mp_char <= mp_end' failed
+
+soffice.bin: ../../include/orcus/parser_base.hpp:65: bool orcus::parser_base::has_char() const: Assertion `mp_char <= mp_end' failed.
+---
+ src/parser/sax_parser_base.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp
+index 46acb81d..cb7a9c04 100644
+--- a/src/parser/sax_parser_base.cpp
++++ b/src/parser/sax_parser_base.cpp
+@@ -293,7 +293,8 @@
+
+ // Skip the closing quote.
+ assert(!has_char() || cur_char() == '"');
+- next();
++ if (has_char())
++ next();
+ }
+
+ bool parser_base::value(pstring& str, bool decode)
+--
+2.35.1
+
diff --git a/external/liborcus/forcepoint-95.patch.1 b/external/liborcus/forcepoint-95.patch.1
new file mode 100644
index 000000000000..93dc822298b0
--- /dev/null
+++ b/external/liborcus/forcepoint-95.patch.1
@@ -0,0 +1,11 @@
+--- a/include/orcus/sax_parser.hpp 2022-03-30 10:54:44.043568760 +0100
++++ b/include/orcus/sax_parser.hpp 2022-03-30 10:54:55.645037322 +0100
+@@ -547,7 +547,7 @@
+
+ skip_space_and_control();
+
+- char c = cur_char();
++ char c = cur_char_checked();
+ if (c != '=')
+ {
+ std::ostringstream os;
diff --git a/external/liborcus/include.patch.0 b/external/liborcus/include.patch.0
new file mode 100644
index 000000000000..3bed5aebf865
--- /dev/null
+++ b/external/liborcus/include.patch.0
@@ -0,0 +1,51 @@
+--- include/orcus/base64.hpp
++++ include/orcus/base64.hpp
+@@ -9,6 +9,7 @@
+ #define __ORCUS_BASE64_HPP__
+
+ #include "env.hpp"
++#include <stdint.h>
+ #include <vector>
+ #include <string>
+
+--- include/orcus/types.hpp
++++ include/orcus/types.hpp
+@@ -16,6 +16,7 @@
+ #pragma GCC diagnostic ignored "-Wshadow"
+ #endif
+
++#include <stdint.h>
+ #include <cstdlib>
+ #include <vector>
+ #include <string>
+
+--- src/liborcus/orcus_xlsx.cpp
++++ src/liborcus/orcus_xlsx.cpp
+@@ -32,6 +32,7 @@
+
+ #include <cstdlib>
+ #include <iostream>
++#include <limits>
+ #include <string>
+ #include <cstring>
+ #include <sstream>
+--- src/liborcus/xls_xml_context.cpp
++++ src/liborcus/xls_xml_context.cpp
+@@ -16,6 +16,7 @@
+ #include <mdds/sorted_string_map.hpp>
+
+ #include <iostream>
++#include <limits>
+
+ using namespace std;
+
+--- src/liborcus/xlsx_revision_context.cpp
++++ src/liborcus/xlsx_revision_context.cpp
+@@ -16,6 +16,7 @@
+ #include "orcus/global.hpp"
+
+ #include <iostream>
++#include <limits>
+
+ using namespace std;
+
diff --git a/external/liborcus/overrun.patch.0 b/external/liborcus/overrun.patch.0
new file mode 100644
index 000000000000..8b5bc5366da1
--- /dev/null
+++ b/external/liborcus/overrun.patch.0
@@ -0,0 +1,63 @@
+--- src/parser/sax_token_parser.cpp
++++ src/parser/sax_token_parser.cpp
+@@ -10,6 +10,7 @@
+
+ #include <mdds/sorted_string_map.hpp>
+ #include <cctype>
++#include <limits>
+
+ namespace orcus {
+
+@@ -329,6 +330,28 @@
+ m_elem.raw_name = elem.name;
+ }
+
++static uint8_t readUint8(char const * begin, char const * end, char const ** endptr) {
++ unsigned n = 0;
++ char const * p = begin;
++ for (; p != end; ++p) {
++ char const c = *p;
++ if (c < '0' || c > '9') {
++ break;
++ }
++ n = 10 * n + (c - '0');
++ if (n > std::numeric_limits<uint8_t>::max()) {
++ *endptr = nullptr;
++ return 0;
++ }
++ }
++ if (p == begin) {
++ *endptr = nullptr;
++ return 0;
++ }
++ *endptr = p;
++ return n;
++}
++
+ void sax_token_handler_wrapper_base::attribute(const pstring& name, const pstring& val)
+ {
+ decl_attr_type dat = decl_attr::get().find(name.data(), name.size());
+@@ -340,18 +362,18 @@
+ const char* p = val.data();
+ const char* p_end = p + val.size();
+
+- char* endptr = nullptr;
+- long v = std::strtol(p, &endptr, 10);
++ const char* endptr = nullptr;
++ uint8_t v = readUint8(p, p_end, &endptr);
+
+- if (!endptr || endptr >= p_end || *endptr != '.')
++ if (!endptr || endptr == p_end || *endptr != '.')
+ break;
+
+ m_declaration.version_major = v;
+ p = endptr + 1;
+
+- v = std::strtol(p, &endptr, 10);
++ v = readUint8(p, p_end, &endptr);
+
+- if (!endptr || endptr > p_end)
++ if (!endptr)
+ break;
+
+ m_declaration.version_minor = v;
diff --git a/external/libtommath/README b/external/libtommath/README
index 0da3128c5404..41f91970a71b 100644
--- a/external/libtommath/README
+++ b/external/libtommath/README
@@ -3,4 +3,4 @@ integer library written entirely in C.
Used by embedded firebird (external/firebird).
-http://www.libtom.org/LibTomMath/
+From [https://www.libtom.net/LibTomMath/].
diff --git a/external/libtommath/UnpackedTarball_libtommath.mk b/external/libtommath/UnpackedTarball_libtommath.mk
index bb0b9e352930..8961a46162c5 100644
--- a/external/libtommath/UnpackedTarball_libtommath.mk
+++ b/external/libtommath/UnpackedTarball_libtommath.mk
@@ -14,8 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libtommath,$(LIBTOMMATH_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,libtommath,0))
$(eval $(call gb_UnpackedTarball_add_patches,libtommath,\
- external/libtommath/libtommath-msvc.patch \
- external/libtommath/clang-cl.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libtommath/clang-cl.patch b/external/libtommath/clang-cl.patch
deleted file mode 100644
index 1cc92d380c62..000000000000
--- a/external/libtommath/clang-cl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- tommath.h
-+++ tommath.h
-@@ -15,6 +15,13 @@
- #ifndef BN_H_
- #define BN_H_
-
-+// Work around clang-cl issue when mp_word is a typedef for unsigned __int128, see
-+// <https://bugs.llvm.org/show_bug.cgi?id=25305> "Clang-cl generates a call to an undefined symbol
-+// _udivti3":
-+#if defined _WIN32 && defined __clang__
-+#define MP_8BIT
-+#endif
-+
- #include <stdio.h>
- #include <stdlib.h>
- #include <stdint.h>
diff --git a/external/libtommath/libtommath-msvc.patch b/external/libtommath/libtommath-msvc.patch
deleted file mode 100644
index 07884871aac9..000000000000
--- a/external/libtommath/libtommath-msvc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- makefile.msvc 2016-02-05 23:25:32.000000000 +0100
-+++ makefile.msvc 2016-07-21 11:34:20.618390100 +0200
-@@ -38,3 +38,9 @@
-
- library: $(OBJECTS)
- lib /out:tommath.lib $(OBJECTS)
-+
-+.cc.obj:
-+ $(CC) /nologo $(CFLAGS) /c $<
-+
-+.c.obj:
-+ $(CC) /nologo $(CFLAGS) /c $<
diff --git a/external/libwpd/UnpackedTarball_libwpd.mk b/external/libwpd/UnpackedTarball_libwpd.mk
index 8d0227b9379d..eefa9331c8d6 100644
--- a/external/libwpd/UnpackedTarball_libwpd.mk
+++ b/external/libwpd/UnpackedTarball_libwpd.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_update_autoconf_configs,libwpd))
$(eval $(call gb_UnpackedTarball_add_patches,libwpd,\
external/libwpd/libwpd-vs2013.patch.1 \
$(if $(SYSTEM_REVENGE),,external/libwpd/rpath.patch) \
+ external/libwpd/include.patch \
))
ifneq ($(OS),MACOSX)
diff --git a/external/libwpd/include.patch b/external/libwpd/include.patch
new file mode 100644
index 000000000000..57f52b4b0aa5
--- /dev/null
+++ b/external/libwpd/include.patch
@@ -0,0 +1,10 @@
+--- src/lib/WPXTable.h
++++ src/lib/WPXTable.h
+@@ -36,6 +36,7 @@
+ #ifndef _WPXTABLE_H
+ #define _WPXTABLE_H
+
++#include <stddef.h>
+ #include <vector>
+
+ struct WPXTableCell
diff --git a/external/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk
index d38eb68df0cb..799044575f9a 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.12.$(LIBXML_VERSION_MICRO)))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxml2/ExternalProject_libxml2.mk b/external/libxml2/ExternalProject_libxml2.mk
index 0d8559dfb04f..5a044e3098dd 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_use_nmake,libxml2,build))
$(call gb_ExternalProject_get_state_target,libxml2,build):
$(call gb_ExternalProject_run,build,\
cscript /e:javascript configure.js \
- iconv=no icu=yes sax1=yes $(if $(MSVC_USE_DEBUG_RUNTIME),run_debug=yes cruntime=/MDd) \
+ iconv=no icu=yes sax1=yes $(if $(MSVC_USE_DEBUG_RUNTIME),cruntime=/MDd) \
$(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes) \
&& nmake \
,win32)
@@ -36,7 +36,7 @@ $(call gb_ExternalProject_get_state_target,libxml2,build):
LDFLAGS="$(if $(SYSBASE),-L$(SYSBASE)/usr/lib)" \
CFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(if $(debug),-g)" \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
- && $(MAKE) \
+ && $(MAKE) libxml2.la xmllint \
)
endif
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 37b5bad97549..489fb007572b 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,14 +14,15 @@ $(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 \
+ $(if $(filter SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \
external/libxml2/libxml2-vc10.patch \
+ external/libxml2/libxml2-XMLCALL-redefine.patch.0 \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
$(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
external/libxml2/libxml2-icu-sym.patch.0, \
external/libxml2/libxml2-icu.patch.0) \
- external/libxml2/ubsan.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-XMLCALL-redefine.patch.0 b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
new file mode 100644
index 000000000000..d9ca23be7ce4
--- /dev/null
+++ b/external/libxml2/libxml2-XMLCALL-redefine.patch.0
@@ -0,0 +1,11 @@
+--- include/libxml/xmlexports.h 2023-05-24 12:48:46.179570708 +0100
++++ include/libxml/xmlexports.h 2023-05-24 12:48:56.563577488 +0100
+@@ -38,8 +38,6 @@
+
+ /** DOC_DISABLE */
+ /* Compatibility */
+-#define XMLCALL
+-#define XMLCDECL
+ #if !defined(LIBXML_DLL_IMPORT)
+ #define LIBXML_DLL_IMPORT XMLPUBVAR
+ #endif
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 8c28fb6a7806..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
-
- usage()
- {
-@@ -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/libxml2-global-symbols.patch b/external/libxml2/libxml2-global-symbols.patch
index 49ee73731562..32146da4b3d7 100644
--- a/external/libxml2/libxml2-global-symbols.patch
+++ b/external/libxml2/libxml2-global-symbols.patch
@@ -13,10 +13,22 @@
} LIBXML2_2.6.28;
LIBXML2_2.6.32 {
-@@ -2231,3 +2231,43 @@
- xmlHashDefaultDeallocator;
- } LIBXML2_2.9.1;
+@@ -2231,3 +2231,55 @@
+ xmlPopOutputCallbacks;
+ } LIBXML2_2.9.8;
++LIBXML2_2.11.4 {
++ global:
++ xmlMemSize;
++ xmlNewSAXParserCtxt;
++} LIBXML2_2.9.11;
++
++LIBXML2_2.12.3 {
++ global:
++ xmlCtxtSetMaxAmplification;
++ xmlTextReaderSetMaxAmplification;
++} LIBXML2_2.11.4;
++
+# HACK: export global variable accessor functions (globals.h)
+LIBXML2_GLOBAL_VARIABLES {
+ global:
diff --git a/external/libxml2/libxml2-icu-sym.patch.0 b/external/libxml2/libxml2-icu-sym.patch.0
index aac9d09ef13e..07676228da19 100644
--- a/external/libxml2/libxml2-icu-sym.patch.0
+++ b/external/libxml2/libxml2-icu-sym.patch.0
@@ -25,7 +25,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
!if "$(STATIC)" == "1"
LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
!else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
+LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
+!else
LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/libxml2/libxml2-icu.patch.0 b/external/libxml2/libxml2-icu.patch.0
index b390b03d8787..84197763f878 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -23,7 +23,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
!if "$(STATIC)" == "1"
LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
!else
-+!if "$(WITH_RUN_DEBUG)" == "1"
++!if "$(DEBUG)" == "1"
+LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
+!else
LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
diff --git a/external/libxml2/ubsan.patch.0 b/external/libxml2/ubsan.patch.0
deleted file mode 100644
index b52259719673..000000000000
--- a/external/libxml2/ubsan.patch.0
+++ /dev/null
@@ -1,11 +0,0 @@
---- xpath.c
-+++ xpath.c
-@@ -14529,7 +14529,7 @@
- }
-
- stream = xmlPatterncompile(str, dict, XML_PATTERN_XPATH,
-- &namespaces[0]);
-+ namespaces); // i.e., &namespaces[0] if namespaces != NULL
- if (namespaces != NULL) {
- xmlFree((xmlChar **)namespaces);
- }
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/libxslt/ExternalPackage_libxslt.mk b/external/libxslt/ExternalPackage_libxslt.mk
index c22a2e1b5dad..c1a8ee1217f1 100644
--- a/external/libxslt/ExternalPackage_libxslt.mk
+++ b/external/libxslt/ExternalPackage_libxslt.mk
@@ -25,7 +25,7 @@ $(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.dl
endif
else # OS!=WNT
$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libxslt.so.1,libxslt/.libs/libxslt.so.1.1.$(LIBXSLT_VERSION_MICRO)))
-$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.20))
+$(eval $(call gb_ExternalPackage_add_file,libxslt,$(LIBO_LIB_FOLDER)/libexslt.so.0,libexslt/.libs/libexslt.so.0.8.21))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxslt/README b/external/libxslt/README
index dd69a9d732c3..2eb71661b903 100644
--- a/external/libxslt/README
+++ b/external/libxslt/README
@@ -1 +1 @@
-Gnome xslt library written in C, from [http://xmlsoft.org/xslt/]
+libxslt is an XSLT processor based on libxml2, from [https://gitlab.gnome.org/GNOME/libxslt/]
diff --git a/external/libxslt/UnpackedTarball_libxslt.mk b/external/libxslt/UnpackedTarball_libxslt.mk
index 5bde97637e25..7d39cb1e3478 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
external/libxslt/libxslt-msvc.patch.2) \
external/libxslt/libxslt-1.1.26-memdump.patch \
external/libxslt/rpath.patch.0 \
- external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
deleted file mode 100644
index f82c2e4f77ee..000000000000
--- a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
+++ /dev/null
@@ -1,69 +0,0 @@
-From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001
-From: Chun-wei Fan <fanchunwei@src.gnome.org>
-Date: Tue, 12 Nov 2019 17:37:05 +0800
-Subject: [PATCH] win32: Add configuration for profiler
-
-Without this the generated xsltconfig.h will not be complete as there
-will be a configuration variable that is left in the header, breaking
-builds.
-
-This will allow one to enable or disable profiler support in Windows
-builds, and the default is to enable this.
----
- win32/configure.js | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/win32/configure.js b/win32/configure.js
-index 56694cce..12c99f30 100644
---- a/win32/configure.js
-+++ b/win32/configure.js
-@@ -47,6 +47,7 @@ var withIconv = true;
- var withZlib = false;
- var withCrypto = true;
- var withModules = false;
-+var withProfiler = true;
- /* Win32 build options. */
- var dirSep = "\\";
- var compiler = "msvc";
-@@ -106,6 +107,7 @@ function usage()
- txt += " zlib: Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
- txt += " crypto: Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
- txt += " modules: Enable Module support (" + (withModules? "yes" : "no") + ")\n";
-+ txt += " profiler: Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n";
- txt += "\nWin32 build options, default value given in parentheses:\n\n";
- txt += " compiler: Compiler to be used [msvc|mingw] (" + compiler + ")\n";
- txt += " cruntime: C-runtime compiler option (only msvc) (" + cruntime + ")\n";
-@@ -192,6 +194,7 @@ function discoverVersion()
- vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
- vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
- vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
-+ vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0"));
- vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
- vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
- vf.WriteLine("PREFIX=" + buildPrefix);
-@@ -240,6 +243,8 @@ function configureXslt()
- of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
- } else if (s.search(/\@WITH_MODULES\@/) != -1) {
- of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
-+ } else if (s.search(/\@WITH_PROFILER\@/) != -1) {
-+ of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0"));
- } else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
- of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
- } else
-@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
- withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
- else if (opt == "modules")
- withModules = strToBool(arg.substring(opt.length + 1, arg.length));
-+ else if (opt == "profiler")
-+ withProfiler = strToBool(arg.substring(opt.length + 1, arg.length));
- else if (opt == "compiler")
- compiler = arg.substring(opt.length + 1, arg.length);
- else if (opt == "cruntime")
-@@ -477,6 +484,7 @@ txtOut += " Use iconv: " + boolToStr(withIconv) + "\n";
- txtOut += " With zlib: " + boolToStr(withZlib) + "\n";
- txtOut += " Crypto: " + boolToStr(withCrypto) + "\n";
- txtOut += " Modules: " + boolToStr(withModules) + "\n";
-+txtOut += " Profiler: " + boolToStr(withProfiler) + "\n";
- txtOut += "\n";
- txtOut += "Win32 build configuration\n";
- txtOut += "-------------------------\n";
diff --git a/external/libxslt/rpath.patch.0 b/external/libxslt/rpath.patch.0
index 78c4859251df..798bccec750e 100644
--- a/external/libxslt/rpath.patch.0
+++ b/external/libxslt/rpath.patch.0
@@ -7,4 +7,4 @@
+hardcode_libdir_flag_spec=
;;
- netbsd*)
+ netbsd* | netbsdelf*-gnu)
diff --git a/external/neon/Library_neon.mk b/external/neon/Library_neon.mk
index 0afd6f4eff81..4c034a3178fb 100644
--- a/external/neon/Library_neon.mk
+++ b/external/neon/Library_neon.mk
@@ -91,4 +91,10 @@ $(eval $(call gb_Library_add_libs,neon,\
))
endif
+ifneq (,$(gb_ENABLE_DBGUTIL))
+$(eval $(call gb_Library_add_cflags,neon,\
+ -DNE_DEBUGGING \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 41e9ad8de6fa..6d8dc7c5d3d4 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -15,6 +15,10 @@ $(eval $(call gb_ExternalProject_register_targets,nss,\
build \
))
+$(eval $(call gb_ExternalProject_use_externals,nss,\
+ zlib \
+))
+
ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,nss,build): \
$(call gb_ExternalExecutable_get_dependencies,python) \
@@ -26,9 +30,10 @@ $(call gb_ExternalProject_get_state_target,nss,build): \
MOZ_DEBUG_FLAGS=" " \
OPT_CODE_SIZE=0) \
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/README b/external/nss/README
index 6997cea6ca06..09931f64ea20 100644
--- a/external/nss/README
+++ b/external/nss/README
@@ -1,5 +1,16 @@
Contains the Network Security Services (NSS) libraries from Mozilla
+== ESR versions ==
+
+Upstream releases both regular and "ESR" versions, the latter go into Firefox
+ESR and Thunderbird.
+
+There is a new ESR version about once a year, and a ESR version gets micro
+updates only when there are security issues to fix, and it's not always obvious
+from the release notes of a regular release if there are security issues that
+are relevant to LibreOffice, hence it's probably best to bundle only the ESR
+versions and upgrade for every micro release (as recommended by upstream).
+
== Fips 140 and signed libraries ==
Fips 140 mode is not supported. That is, the *.chk files containing the
@@ -20,18 +31,3 @@ With all supported macOS SDK we use
NSS_USE_SYSTEM_SQLITE=1
to build using the system sqlite.
-== system NSS on Linux ==
-
-Note that different Linux distributions use different SONAMEs for the
-NSS libraries, so it is not possible to use --with-system-nss and build
-a portable generic LO installation set, despite NSS upstream apparently
-maintaining ABI compatibility.
-
-Debian Squeeze:
-0x000000000000000e (SONAME) Library soname: [libnss3.so.1d]
-Fedora 20:
-0x000000000000000e (SONAME) Library soname: [libnss3.so]
-
-For the record, the LSB specified SONAME is libnss3.so
-http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/libnss3.html
-
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index f49d55fab46e..af289a2226fd 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -22,11 +22,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss.vs2015.patch \
external/nss/nss.vs2015.pdb.patch \
external/nss/nss.bzmozilla1238154.patch \
- external/nss/nss-bz1646594.patch.1 \
+ external/nss/nss-bz1646594.patch.1 \
external/nss/macos-dlopen.patch.0 \
external/nss/nss-restore-manual-pre-dependencies.patch.1 \
- $(if $(filter iOS,$(OS)), \
- external/nss/nss-ios.patch) \
$(if $(filter ANDROID,$(OS)), \
external/nss/nss-android.patch.1) \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
diff --git a/external/nss/asan.patch.1 b/external/nss/asan.patch.1
index 7dfd6ed4e782..ccabd446ebac 100644
--- a/external/nss/asan.patch.1
+++ b/external/nss/asan.patch.1
@@ -1,12 +1,12 @@
diff -ur nss.org/nss/coreconf/Linux.mk nss/nss/coreconf/Linux.mk
--- nss.org/nss/coreconf/Linux.mk 2014-05-06 04:36:01.817838877 +0200
+++ nss/nss/coreconf/Linux.mk 2014-05-06 04:37:25.387835456 +0200
-@@ -146,7 +146,7 @@
+@@ -157,7 +157,7 @@
# we don't use -z defs there.
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
# 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/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 1d615c2397d8..04e21e7003d0 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -14,7 +14,7 @@
#pragma intrinsic(_InterlockedExchange)
--- nspr/pr/include/prbit.h
+++ nspr/pr/include/prbit.h
-@@ -14,7 +14,7 @@
+@@ -15,7 +15,7 @@
*/
#if defined(_WIN32) && (_MSC_VER >= 1300) && \
(defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \
@@ -23,7 +23,7 @@
# include <intrin.h>
# pragma intrinsic(_BitScanForward,_BitScanReverse)
__forceinline static int __prBitScanForward32(unsigned int val)
-@@ -32,7 +32,7 @@
+@@ -33,7 +33,7 @@
# define pr_bitscan_ctz32(val) __prBitScanForward32(val)
# define pr_bitscan_clz32(val) __prBitScanReverse32(val)
# define PR_HAVE_BUILTIN_BITSCAN32
@@ -32,7 +32,7 @@
(defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
defined(__aarch64__))
# define pr_bitscan_ctz32(val) __builtin_ctz(val)
-@@ -136,7 +136,7 @@
+@@ -138,7 +138,7 @@
*/
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
@@ -63,7 +63,7 @@
#define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD
--- nss/lib/util/pkcs11n.h
+++ nss/lib/util/pkcs11n.h
-@@ -426,7 +426,7 @@
+@@ -563,7 +563,7 @@
/* keep the old value for compatibility reasons*/
#define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS + 4))
#else
@@ -80,7 +80,7 @@
# in the outer pkcs11t.h:
--- nss/lib/util/pkcs11t.h
+++ nss/lib/util/pkcs11t.h
-@@ -72,7 +72,14 @@
+@@ -78,7 +78,14 @@
#define CK_INVALID_HANDLE 0
/* pack */
@@ -95,7 +95,7 @@
typedef struct CK_VERSION {
CK_BYTE major; /* integer portion of version number */
-@@ -1795,6 +1802,13 @@
+@@ -2586,6 +2593,13 @@
#include "pkcs11n.h"
/* undo packing */
diff --git a/external/nss/macos-dlopen.patch.0 b/external/nss/macos-dlopen.patch.0
index 1889b8df7cd3..e8abc8f59c69 100644
--- a/external/nss/macos-dlopen.patch.0
+++ b/external/nss/macos-dlopen.patch.0
@@ -1,6 +1,6 @@
--- nspr/pr/src/linking/prlink.c
+++ nspr/pr/src/linking/prlink.c
-@@ -799,7 +799,7 @@
+@@ -555,7 +555,7 @@
* The reason is that DARWIN's dlopen ignores the provided path
* and checks for the plain filename in DYLD_LIBRARY_PATH,
* which could load an unexpected version of a library. */
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index f8b4cdaf3753..cbf7f5402f3f 100644
--- a/external/nss/nss-android.patch.1
+++ b/external/nss/nss-android.patch.1
@@ -1,7 +1,7 @@
diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.sub
--- nss.org/nspr/build/autoconf/config.sub 2017-09-07 15:29:45.031246453 +0200
+++ nss/nspr/build/autoconf/config.sub 2017-09-07 15:32:13.087235423 +0200
-@@ -111,6 +111,10 @@
+@@ -110,6 +110,11 @@
exit 1;;
esac
@@ -9,13 +9,13 @@ diff -ur nss.org/nspr/build/autoconf/config.sub nss/nspr/build/autoconf/config.s
+if test $1 = "i686-pc-linux-android"; then echo $1; exit; fi
+if test $1 = "x86_64-pc-linux-android"; then echo $1; exit; fi
+
- # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
- # Here we must recognize all the valid KERNEL-OS combinations.
- maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ # Split fields of configuration type
+ # shellcheck disable=SC2162
+ IFS="-" read field1 field2 field3 field4 <<EOF
diff -ur nss.org/nspr/configure nss/nspr/configure
--- nss.org/nspr/configure 2017-09-07 15:29:45.018246359 +0200
+++ nss/nspr/configure 2017-09-07 15:31:47.604075663 +0200
-@@ -2737,18 +2739,15 @@
+@@ -2728,18 +2728,15 @@
esac
AS="$android_toolchain"/bin/"$android_tool_prefix"-as
@@ -40,7 +40,8 @@ diff -ur nss.org/nspr/configure nss/nspr/configure
diff -ur nss.org/nss/Makefile nss/nss/Makefile
--- nss.org/nss/Makefile 2017-09-07 15:29:44.933245745 +0200
+++ nss/nss/Makefile 2017-09-07 15:32:04.347181076 +0200
-@@ -62,6 +62,6 @@
+@@ -65,7 +65,7 @@
+
ifeq ($(OS_TARGET),Android)
NSPR_CONFIGURE_OPTS += --with-android-ndk=$(ANDROID_NDK) \
- --target=$(ANDROID_PREFIX) \
diff --git a/external/nss/nss-bz1646594.patch.1 b/external/nss/nss-bz1646594.patch.1
index e6c75922a7dc..cffb9f5fe61d 100644
--- a/external/nss/nss-bz1646594.patch.1
+++ b/external/nss/nss-bz1646594.patch.1
@@ -2,7 +2,7 @@ regression from https://bugzilla.mozilla.org/show_bug.cgi?id=1646594
--- nss/nss/coreconf/arch.mk.orig2 2020-08-18 14:33:21.295252404 +0200
+++ nss/nss/coreconf/arch.mk 2020-08-18 14:33:46.360320806 +0200
-@@ -116,8 +116,10 @@
+@@ -94,8 +94,10 @@
OS_RELEASE := $(word 1,$(OS_RELEASE)).$(word 2,$(OS_RELEASE))
endif
KERNEL = Linux
diff --git a/external/nss/nss-ios.patch b/external/nss/nss-ios.patch
deleted file mode 100644
index 9d4af2c724e9..000000000000
--- a/external/nss/nss-ios.patch
+++ /dev/null
@@ -1,112 +0,0 @@
---- a/a/nspr/config/autoconf.mk.in
-+++ a/a/nspr/config/autoconf.mk.in
-@@ -67,7 +67,7 @@
- MSC_VER = @MSC_VER@
- AR = @AR@
- AR_FLAGS = @AR_FLAGS@
--LD = @LD@
-+LD = echo
- RANLIB = @RANLIB@
- PERL = @PERL@
- RC = @RC@
---- a/a/nspr/configure
-+++ a/a/nspr/configure
-@@ -755,7 +755,7 @@
- OBJDIR='$(OBJDIR_NAME)'
- OBJDIR_NAME=.
- OBJDIR_SUFFIX=OBJ
--NSINSTALL='$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'
-+NSINSTALL=${NSINSTALL?'$(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall'}
- NOSUCHFILE=/no-such-file
- LIBNSPR='-L$(dist_libdir) -lnspr$(MOD_MAJOR_VERSION)'
- LIBPLC='-L$(dist_libdir) -lplc$(MOD_MAJOR_VERSION)'
-@@ -3060,7 +3060,7 @@
- LIB_SUFFIX=a
- DLL_SUFFIX=so
- ASM_SUFFIX=s
--MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-+MKSHLIB='touch $@; echo'
- PR_MD_ASFILES=
- PR_MD_CSRCS=
- PR_MD_ARCH_DIR=unix
-@@ -3904,7 +3904,7 @@
- DSO_CFLAGS=-fPIC
- DSO_LDOPTS='-dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name @__________________________________________________OOO/$@ -headerpad_max_install_names'
- _OPTIMIZE_FLAGS=-O2
-- MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
-+ MKSHLIB=touch $@
- STRIP="$STRIP -x -S"
- DLL_SUFFIX=dylib
- USE_PTHREADS=1
---- a/a/nss/coreconf/ruleset.mk
-+++ a/a/nss/coreconf/ruleset.mk
-@@ -68,7 +68,7 @@
- endif
-
- ifeq ($(MKPROG),)
-- MKPROG = $(CC)
-+ MKPROG = touch $@; echo
- endif
-
- #
---- a/a/nss/coreconf/Darwin.mk
-+++ a/a/nss/coreconf/Darwin.mk
-@@ -124,7 +124,7 @@
- DSO_LDOPTS += --coverage
- endif
-
--MKSHLIB = $(CC) $(DSO_LDOPTS) $(DARWIN_SDK_SHLIBFLAGS)
-+MKSHLIB = touch $@; echo
- DLL_SUFFIX = dylib
- ifdef MAPFILE
- MKSHLIB += -exported_symbols_list $(MAPFILE)
---- a/a/nss/coreconf/UNIX.mk
-+++ a/a/nss/coreconf/UNIX.mk
-@@ -21,10 +21,14 @@
-
- ifdef BUILD_TREE
- NSINSTALL_DIR = $(BUILD_TREE)/nss
-+ifndef NSINSTALL
- NSINSTALL = $(BUILD_TREE)/nss/nsinstall
-+endif
- else
- NSINSTALL_DIR = $(CORE_DEPTH)/coreconf/nsinstall
-+ifndef NSINSTALL
- NSINSTALL = $(NSINSTALL_DIR)/$(OBJDIR_NAME)/nsinstall
-+endif
- endif
-
- MKDEPEND_DIR = $(CORE_DEPTH)/coreconf/mkdepend
---- a/a/nspr/pr/include/md/_darwin.h
-+++ a/a/nspr/pr/include/md/_darwin.h
-@@ -26,6 +26,8 @@
- #define _PR_SI_ARCHITECTURE "ppc"
- #elif defined(__arm__)
- #define _PR_SI_ARCHITECTURE "arm"
-+#elif defined(__arm64__)
-+#define _PR_SI_ARCHITECTURE "arm64"
- #elif defined(__aarch64__)
- #define _PR_SI_ARCHITECTURE "aarch64"
- #else
---- a/a/nspr/pr/src/Makefile.in
-+++ a/a/nspr/pr/src/Makefile.in
-@@ -180,7 +180,7 @@
- endif
-
- ifeq ($(OS_TARGET),MacOSX)
--OS_LIBS = -framework CoreServices -framework CoreFoundation
-+OS_LIBS = -framework CoreFoundation
- endif
-
- EXTRA_LIBS += $(OS_LIBS)
---- a/a/nss/cmd/shlibsign/sign.sh
-+++ a/a/nss/cmd/shlibsign/sign.sh
-@@ -2,6 +2,8 @@
- # This Source Code Form is subject to the terms of the Mozilla Public
- # License, v. 2.0. If a copy of the MPL was not distributed with this
- # file, You can obtain one at http://mozilla.org/MPL/2.0/.
-+
-+exit 0
-
- # arguments:
- # 1: full path to DIST/OBJDIR (parent dir of "lib")
diff --git a/external/nss/nss-restore-manual-pre-dependencies.patch.1 b/external/nss/nss-restore-manual-pre-dependencies.patch.1
index ebcc5b48c540..ea034f0dc80f 100644
--- a/external/nss/nss-restore-manual-pre-dependencies.patch.1
+++ b/external/nss/nss-restore-manual-pre-dependencies.patch.1
@@ -68,7 +68,7 @@ summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
ck.h \
--- b/nss/manifest.mn Wed May 13 19:00:40 2020 +0000
+++ a/nss/manifest.mn Tue May 12 21:33:43 2020 +0000
-@@ -23,6 +23,12 @@
+@@ -24,6 +24,12 @@
# no real way to encode these in any sensible way
$(MAKE) -C coreconf/nsinstall program
$(MAKE) export
@@ -79,5 +79,5 @@ summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
+ $(MAKE) -C lib/base libs
+ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins libs
- all: prepare_build
- $(MAKE) libs
+ lib: coreconf
+ cmd: lib
diff --git a/external/nss/nss-win32-make.patch.1 b/external/nss/nss-win32-make.patch.1
index 7ba3df451ee6..6a3201a082a1 100644
--- a/external/nss/nss-win32-make.patch.1
+++ b/external/nss/nss-win32-make.patch.1
@@ -1,6 +1,6 @@
--- nss/nss/coreconf/rules.mk.orig2 2014-06-03 15:30:01.667200000 +0200
+++ nss/nss/coreconf/rules.mk 2014-06-03 15:30:14.537200000 +0200
-@@ -259,7 +259,7 @@
+@@ -174,7 +174,7 @@
$(LIBRARY): $(OBJS) | $$(@D)/d
rm -f $@
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
@@ -9,7 +9,7 @@
else
$(AR) cr $@ $(OBJS)
endif
-@@ -297,7 +297,7 @@
+@@ -214,7 +214,7 @@
ifdef NS_USE_GCC
$(LINK_DLL) $(OBJS) $(SUB_SHLOBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS) $(RES)
else
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
index 4b0c6bfb3261..10572f94717a 100644
--- a/external/nss/nss.aix.patch
+++ b/external/nss/nss.aix.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2014-09-29 16:47:42.984012225 +0100
+++ b/b/nspr/configure 2014-09-29 16:50:33.907375937 +0100
-@@ -6369,7 +6369,6 @@
+@@ -6325,7 +6325,6 @@
AIX_LINK_OPTS='-brtl -bnso -berok'
;;
esac
@@ -12,7 +12,7 @@ diff -ru a/nspr/configure b/nspr/configure
diff -ru a/nspr/configure.in b/nspr/configure.in
--- a/a/nspr/configure.in 2014-09-29 16:46:35.257394860 +0100
+++ b/b/nspr/configure.in 2014-09-29 16:50:33.908375942 +0100
-@@ -1229,7 +1229,8 @@
+@@ -1180,7 +1180,8 @@
AC_DEFINE(XP_UNIX)
AC_DEFINE(AIX)
AC_DEFINE(SYSV)
@@ -22,7 +22,7 @@ diff -ru a/nspr/configure.in b/nspr/configure.in
AC_CHECK_HEADER(sys/atomic_op.h, AC_DEFINE(AIX_HAVE_ATOMIC_OP_H))
case "${target_os}" in
aix3.2*)
-@@ -1269,10 +1270,9 @@
+@@ -1220,10 +1221,9 @@
AC_DEFINE(HAVE_SOCKLEN_T)
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
USE_IPV6=1
@@ -48,7 +48,7 @@ diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
--- a/a/nss/cmd/platlibs.mk 2014-09-29 16:47:42.987012253 +0100
+++ b/b/nss/cmd/platlibs.mk 2014-09-29 16:50:33.910375955 +0100
-@@ -134,7 +134,7 @@
+@@ -171,7 +171,7 @@
$(NULL)
ifeq ($(OS_ARCH), AIX)
@@ -57,7 +57,7 @@ diff -ru a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk
endif
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
-@@ -180,7 +180,7 @@
+@@ -217,7 +217,7 @@
$(NULL)
ifeq ($(OS_ARCH), AIX)
diff --git a/external/nss/nss.bzmozilla1238154.patch b/external/nss/nss.bzmozilla1238154.patch
index 468ff810b9ca..425f38257892 100644
--- a/external/nss/nss.bzmozilla1238154.patch
+++ b/external/nss/nss.bzmozilla1238154.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2019-01-26 12:23:06.589389910 +0100
+++ b/b/nspr/configure 2019-01-26 12:26:56.566222293 +0100
-@@ -7127,7 +7127,7 @@
+@@ -6883,7 +6883,7 @@
# Determine compiler version
diff --git a/external/nss/nss.cygwin64.in32bit.patch b/external/nss/nss.cygwin64.in32bit.patch
index b00761a0e85b..bce0f1d09403 100644
--- a/external/nss/nss.cygwin64.in32bit.patch
+++ b/external/nss/nss.cygwin64.in32bit.patch
@@ -3,7 +3,7 @@ on Cygwin 64bit and in 32bit mode
diff -ru nss.orig/nss/Makefile nss/nss/Makefile
--- a/nss.orig/nss/Makefile 2016-02-26 01:00:52.146713100 +0100
+++ b/nss/nss/Makefile 2016-02-26 01:02:05.303560100 +0100
-@@ -59,6 +59,8 @@
+@@ -63,6 +63,8 @@
# Translate coreconf build options to NSPR configure options.
#
diff --git a/external/nss/nss.nowerror.patch b/external/nss/nss.nowerror.patch
index ff81a9b33539..bdf7a33a874c 100644
--- a/external/nss/nss.nowerror.patch
+++ b/external/nss/nss.nowerror.patch
@@ -1,7 +1,7 @@
diff -ur nss.org/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.org/nss/coreconf/WIN32.mk 2016-04-13 11:33:09.322294523 +0200
+++ b/nss/nss/coreconf/WIN32.mk 2016-04-13 11:33:27.744323969 +0200
-@@ -127,7 +127,7 @@
+@@ -121,7 +121,7 @@
-D_CRT_NONSTDC_NO_WARNINGS
OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
ifndef NSS_ENABLE_WERROR
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index d9aaee5199bb..cc9eeed1b009 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -1,6 +1,6 @@
--- a/a/nspr/configure 2017-08-29 23:44:13.686045013 +0530
+++ b/b/nspr/configure 2017-08-29 23:46:53.774768655 +0530
-@@ -7034,7 +7034,7 @@
+@@ -6794,7 +6794,7 @@
PR_MD_CSRCS=linux.c
MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
DSO_CFLAGS=-fPIC
@@ -11,7 +11,7 @@
# combo is not yet good at debugging inlined
--- a/nss.orig/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:44:13.690045031 +0530
+++ b/nss/nspr/pr/src/misc/prnetdb.c 2017-08-29 23:47:03.810814019 +0530
-@@ -438,7 +438,7 @@
+@@ -441,7 +441,7 @@
char *buf = *bufp;
PRIntn buflen = *buflenp;
@@ -51,7 +51,7 @@
--- a/nss.org/nss/coreconf/arch.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/arch.mk 2017-08-29 23:45:51.494487134 +0530
-@@ -305,11 +305,17 @@
+@@ -284,11 +284,17 @@
OBJDIR_NAME_COMPILER = $(COMPILER_TAG)
endif
OBJDIR_NAME_BASE = $(OS_TARGET)$(OS_RELEASE)$(CPU_TAG)$(OBJDIR_NAME_COMPILER)$(LIBC_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG)
@@ -83,16 +83,16 @@
# The default implementation strategy for FreeBSD is pthreads.
--- a/nss.org/nss/coreconf/Linux.mk 2017-08-29 23:44:13.642044814 +0530
+++ b/nss/nss/coreconf/Linux.mk 2017-08-29 23:47:26.318915759 +0530
-@@ -147,7 +147,7 @@
+@@ -158,7 +158,7 @@
# 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 @@
+@@ -188,8 +188,13 @@
endif
endif
@@ -108,7 +108,7 @@
# dependencies in the same directory where it resides.
--- a/nss.org/nss/coreconf/rules.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/rules.mk 2017-08-29 23:47:37.442966042 +0530
-@@ -261,7 +261,7 @@
+@@ -176,7 +176,7 @@
ifeq (,$(filter-out _WIN%,$(NS_USE_GCC)_$(OS_TARGET)))
$(AR) $(subst /,\\,$(OBJS))
else
@@ -119,7 +119,7 @@
--- a/nss.org/nss/coreconf/SunOS5.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/SunOS5.mk 2017-08-29 23:45:00.902258445 +0530
-@@ -48,8 +48,11 @@
+@@ -46,8 +46,11 @@
# OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
endif
else
@@ -135,7 +135,7 @@
ifndef BUILD_OPT
--- a/nss.org/nss/coreconf/Werror.mk 2017-08-29 23:44:13.646044832 +0530
+++ b/nss/nss/coreconf/Werror.mk 2017-08-29 23:44:23.994091608 +0530
-@@ -94,7 +94,8 @@
+@@ -96,7 +96,8 @@
endif #ndef NSS_ENABLE_WERROR
ifeq ($(NSS_ENABLE_WERROR),1)
diff --git a/external/nss/nss.utf8bom.patch.1 b/external/nss/nss.utf8bom.patch.1
index e8c56abefcde..f474adf6f932 100644
--- a/external/nss/nss.utf8bom.patch.1
+++ b/external/nss/nss.utf8bom.patch.1
@@ -1,7 +1,7 @@
diff -ur nss.org/nss/lib/ckfw/builtins/certdata.perl nss/nss/lib/ckfw/builtins/certdata.perl
--- nss.org/nss/lib/ckfw/builtins/certdata.perl 2016-03-31 18:26:07.890190900 +0800
+++ nss/nss/lib/ckfw/builtins/certdata.perl 2016-03-31 19:16:16.727269600 +0800
-@@ -110,6 +110,9 @@
+@@ -122,6 +122,9 @@
sub doprint {
my $i;
@@ -11,7 +11,7 @@ diff -ur nss.org/nss/lib/ckfw/builtins/certdata.perl nss/nss/lib/ckfw/builtins/c
print <<EOD
/* THIS IS A GENERATED FILE */
/* This Source Code Form is subject to the terms of the Mozilla Public
-@@ -119,6 +122,7 @@
+@@ -131,6 +134,7 @@
#ifndef BUILTINS_H
#include "builtins.h"
#endif /* BUILTINS_H */
diff --git a/external/nss/nss.vs2015.patch b/external/nss/nss.vs2015.patch
index de4f8762fd5b..73cff7c833fb 100644
--- a/external/nss/nss.vs2015.patch
+++ b/external/nss/nss.vs2015.patch
@@ -1,7 +1,7 @@
diff -ru nss.org/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.org/nss/coreconf/WIN32.mk 2016-02-12 15:36:18.000000000 +0100
+++ b/nss/nss/coreconf/WIN32.mk 2016-02-26 00:42:43.170809600 +0100
-@@ -199,7 +199,7 @@
+@@ -192,7 +192,7 @@
# Disable C4244: conversion from 'type1' to 'type2', possible loss of data
# Disable C4018: 'expression' : signed/unsigned mismatch
# Disable C4312: 'type cast': conversion from 'type1' to 'type2' of greater size
diff --git a/external/nss/nss.vs2015.pdb.patch b/external/nss/nss.vs2015.pdb.patch
index c66940132cdd..3b498f976ac6 100644
--- a/external/nss/nss.vs2015.pdb.patch
+++ b/external/nss/nss.vs2015.pdb.patch
@@ -1,7 +1,7 @@
diff -ru nss.orig/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
--- a/nss.orig/nss/coreconf/WIN32.mk 2016-03-04 08:30:16.306639400 +0100
+++ b/nss/nss/coreconf/WIN32.mk 2016-03-04 08:31:17.987233200 +0100
-@@ -169,15 +169,15 @@
+@@ -163,15 +163,15 @@
DLLFLAGS += -OUT:$@
ifdef MOZ_DEBUG_SYMBOLS
ifdef MOZ_DEBUG_FLAGS
diff --git a/external/nss/nss.windows.patch b/external/nss/nss.windows.patch
index 901846e7bc1f..27a44045802e 100644
--- a/external/nss/nss.windows.patch
+++ b/external/nss/nss.windows.patch
@@ -1,6 +1,6 @@
--- a/a/nspr/config/rules.mk 2008-12-03 00:24:39.000000000 +0100
+++ b/b/nspr/config/rules.mk 2009-11-27 13:36:22.662753328 +0100
-@@ -415,7 +415,7 @@
+@@ -423,7 +423,7 @@
ifdef NEED_ABSOLUTE_PATH
# The quotes allow absolute paths to contain spaces.
@@ -11,7 +11,7 @@
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
--- a/a/nss/coreconf/rules.mk 2008-12-03 00:24:39.000000000 +0100
+++ b/b/nss/coreconf/rules.mk 2009-11-27 13:36:22.662753328 +0100
-@@ -386,7 +386,7 @@
+@@ -280,7 +280,7 @@
endif
# The quotes allow absolute paths to contain spaces.
@@ -22,7 +22,7 @@
ifdef USE_NT_C_SYNTAX
--- a/a/nspr/pr/include/md/_win95.h
+++ b/b/nspr/pr/include/md/_win95.h
-@@ -312,7 +312,7 @@
+@@ -317,7 +317,7 @@
#define _MD_ATOMIC_ADD(ptr,val) (InterlockedExchangeAdd((PLONG)ptr, (LONG)val) + val)
#define _MD_ATOMIC_DECREMENT(x) InterlockedDecrement((PLONG)x)
#endif /* x86 */
diff --git a/external/nss/nss_macosx.patch b/external/nss/nss_macosx.patch
index 3144fa687761..72277a425242 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -1,7 +1,7 @@
diff -ru a/nspr/configure b/nspr/configure
--- a/a/nspr/configure 2014-09-29 16:50:33.907375937 +0100
+++ b/b/nspr/configure 2014-09-29 16:51:59.213931947 +0100
-@@ -6577,7 +6579,7 @@
+@@ -6483,7 +6486,7 @@
DSO_CFLAGS=-fPIC
@@ -13,7 +13,7 @@ diff -ru a/nspr/configure b/nspr/configure
diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
--- a/a/nss/coreconf/Darwin.mk 2014-09-29 16:50:22.992304799 +0100
+++ b/b/nss/coreconf/Darwin.mk 2014-09-29 16:51:59.214931953 +0100
-@@ -20,13 +24,17 @@
+@@ -20,13 +20,17 @@
ifeq (,$(filter-out i%86,$(CPU_ARCH)))
ifdef USE_64
@@ -31,7 +31,14 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
override CPU_ARCH = x86
endif
else
-@@ -40,12 +48,16 @@
+@@ -33,19 +37,20 @@
+ ifeq (arm,$(CPU_ARCH))
+ # Nothing set for arm currently.
+ else
+-OS_REL_CFLAGS = -Dppc
+-CC += -arch ppc
+-CCC += -arch ppc
+ endif
endif
ifneq (,$(MACOS_SDK_DIR))
@@ -49,7 +56,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
# GCC <= 3
DARWIN_SDK_FRAMEWORKS = -F$(MACOS_SDK_DIR)/System/Library/Frameworks
ifneq (,$(shell find $(MACOS_SDK_DIR)/Library/Frameworks -maxdepth 0))
-@@ -108,7 +120,7 @@
+@@ -108,7 +113,7 @@
# May override this with different compatibility and current version numbers.
DARWIN_DYLIB_VERSIONS = -compatibility_version 1 -current_version 1
# May override this with -bundle to create a loadable module.
@@ -61,7 +68,7 @@ diff -ru a/nss/coreconf/Darwin.mk b/nss/coreconf/Darwin.mk
diff -ru a/nss/Makefile b/nss/Makefile
--- a/a/nss/Makefile 2014-09-29 16:50:22.990304789 +0100
+++ b/b/nss/Makefile 2014-09-29 16:51:59.207931908 +0100
-@@ -72,6 +72,9 @@
+@@ -82,6 +82,9 @@
ifeq ($(OS_TARGET),WIN95)
NSPR_CONFIGURE_OPTS += --enable-win32-target=WIN95
endif
diff --git a/external/nss/ubsan.patch.0 b/external/nss/ubsan.patch.0
index 059a9f3b2c0a..72be8aa6600a 100644
--- a/external/nss/ubsan.patch.0
+++ b/external/nss/ubsan.patch.0
@@ -18,7 +18,7 @@
count * sizeof(lgdbSlotData);
data->data = (unsigned char *)PORT_ZAlloc(dataLen);
-@@ -327,7 +327,7 @@
+@@ -329,7 +329,7 @@
}
if ((encoded->major == LGDB_DB_EXT1_VERSION_MAJOR) &&
(encoded->minor >= LGDB_DB_EXT1_VERSION_MINOR)) {
diff --git a/external/openssl/ExternalPackage_openssl.mk b/external/openssl/ExternalPackage_openssl.mk
index 695c7b7119b6..d0c0dbaab975 100644
--- a/external/openssl/ExternalPackage_openssl.mk
+++ b/external/openssl/ExternalPackage_openssl.mk
@@ -13,9 +13,17 @@ $(eval $(call gb_ExternalPackage_use_external_project,openssl,openssl))
ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_files,openssl,$(LIBO_LIB_FOLDER),\
- out32dll/ssleay32.dll \
- out32dll/libeay32.dll \
+ 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 5f5fb42c5eef..eccf8438958a 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -42,7 +42,9 @@ OPENSSL_PLATFORM := \
ios-armv7\
,\
$(if $(filter WNT,$(OS)),\
- $(if $(filter INTEL,$(CPUNAME)),VC-WIN32,VC-WIN64A)\
+ $(if $(filter INTEL,$(CPUNAME)),VC-WIN32)\
+ $(if $(filter X86_64,$(CPUNAME)),VC-WIN64A)\
+ $(if $(filter ARM64,$(CPUNAME)),VC-WIN64-ARM)\
,\
$(if $(filter MACOSX,$(OS)),\
$(if $(filter POWERPC,$(CPUNAME)),darwin-ppc-cc)\
@@ -59,11 +61,9 @@ $(eval $(call gb_ExternalProject_use_nmake,openssl,build))
$(call gb_ExternalProject_get_state_target,openssl,build):
$(call gb_ExternalProject_run,build,\
- export PERL="$(shell cygpath -w $(PERL))" \
- && $(PERL) Configure $(OPENSSL_PLATFORM) no-idea \
- && cmd /c "ms\do_ms.bat $(PERL) $(OPENSSL_PLATFORM)" \
- && nmake -f "ms\ntdll.mak" \
- && mv inc32/* include/ \
+ CONFIGURE_INSIST=1 $(PERL) Configure $(OPENSSL_PLATFORM) no-tests no-multilib \
+ && export PERL="$(shell cygpath -w $(PERL))" \
+ && nmake -f makefile \
)
else
@@ -75,8 +75,7 @@ $(call gb_ExternalProject_get_state_target,openssl,build):
$(if $(filter WNT,$(OS)), \
$(PERL) Configure, \
./config)) \
- $(OPENSSL_PLATFORM) no-dso no-shared \
- $(if $(filter-out WNT,$(OS)),no-idea) \
+ $(OPENSSL_PLATFORM) no-dso no-shared no-tests no-multilib threads \
$(if $(filter-out ANDROID iOS WNT,$(OS)), \
$(if $(SYSBASE),-I$(SYSBASE)/usr/include -L$(SYSBASE)/usr/lib)) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index ad600cce1412..6f00cf7f7e44 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -12,16 +12,7 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,openssl))
$(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl))
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
- external/openssl/openssllnx.patch \
- external/openssl/opensslwnt.patch \
- $(if $(filter INTEL,$(CPUNAME)),external/openssl/opensslwnt_safeseh.patch) \
- external/openssl/openssl-1.0.1h-win64.patch.1 \
- external/openssl/opensslsol.patch \
- external/openssl/opensslios.patch \
- external/openssl/opensslosxppc.patch \
- external/openssl/openssl-3650-masm.patch.1 \
- external/openssl/openssl-fixbuild.patch.1 \
- external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1 \
+ external/openssl/openssl-no-multilib.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/openssl/openssl-1.0.1h-win64.patch.1 b/external/openssl/openssl-1.0.1h-win64.patch.1
deleted file mode 100644
index aea914633ebb..000000000000
--- a/external/openssl/openssl-1.0.1h-win64.patch.1
+++ /dev/null
@@ -1,47 +0,0 @@
-diff --git a/ms/do_win64a.bat b/ms/do_win64a.bat
-index 8768dc6..6772390 100755
---- a/ms/do_win64a.bat
-+++ b/ms/do_win64a.bat
-@@ -1,19 +1,19 @@
--perl util\mkfiles.pl >MINFO
-+perl util/mkfiles.pl >MINFO
-
- cmd /c "nasm -f win64 -v" >NUL 2>&1
- if %errorlevel% neq 0 goto ml64
-
--perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
--nasm -f win64 -o ms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl nasm > ms/uptable.asm
-+nasm -f win64 -o ms/uptable.obj ms/uptable.asm
- goto proceed
-
- :ml64
--perl ms\uplink-x86_64.pl masm > ms\uptable.asm
--ml64 -c -Foms\uptable.obj ms\uptable.asm
-+perl ms/uplink-x86_64.pl masm > ms/uptable.asm
-+ml64 -c -Foms/uptable.obj ms/uptable.asm
-
- :proceed
--perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
--perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
-+perl util/mk1mf.pl VC-WIN64A >ms/nt.mak
-+perl util/mk1mf.pl dll VC-WIN64A >ms/ntdll.mak
-
--perl util\mkdef.pl 32 libeay > ms\libeay32.def
--perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
-+perl util/mkdef.pl 32 libeay > ms/libeay32.def
-+perl util/mkdef.pl 32 ssleay > ms/ssleay32.def
-diff --git a/util/mk1mf.pl b/util/mk1mf.pl
-index 72fa089..d98def1 100755
---- a/util/mk1mf.pl
-+++ b/util/mk1mf.pl
-@@ -233,6 +233,9 @@ else
- $cflags.=' -DTERMIO';
- }
-
-+# force unix style path separator
-+${o} = "/";
-+
- $fipsdir =~ s/\//${o}/g;
-
- $out_dir=(defined($VARS{'OUT'}))?$VARS{'OUT'}:$out_def.($debug?".dbg":"");
diff --git a/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1 b/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1
deleted file mode 100644
index 313f9cd870d7..000000000000
--- a/external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1
+++ /dev/null
@@ -1,578 +0,0 @@
-diff -up openssl-1.0.2k/crypto/asn1/asn1_err.c.null-dereference openssl-1.0.2k/crypto/asn1/asn1_err.c
---- openssl-1.0.2k/crypto/asn1/asn1_err.c.null-dereference 2020-12-04 10:08:08.506247597 +0100
-+++ openssl-1.0.2k/crypto/asn1/asn1_err.c 2020-12-04 10:12:31.901956486 +0100
-@@ -1,6 +1,6 @@
- /* crypto/asn1/asn1_err.c */
- /* ====================================================================
-- * Copyright (c) 1999-2018 The OpenSSL Project. All rights reserved.
-+ * Copyright (c) 1999-2020 The OpenSSL Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
-@@ -103,6 +103,7 @@ static ERR_STRING_DATA ASN1_str_functs[]
- {ERR_FUNC(ASN1_F_ASN1_ITEM_DUP), "ASN1_item_dup"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_COMBINE_NEW), "ASN1_ITEM_EX_COMBINE_NEW"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_EX_D2I), "ASN1_ITEM_EX_D2I"},
-+ {ERR_PACK(ERR_LIB_ASN1, ASN1_F_ASN1_ITEM_EX_I2D, 0), "ASN1_item_ex_i2d"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_BIO), "ASN1_item_i2d_bio"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_I2D_FP), "ASN1_item_i2d_fp"},
- {ERR_FUNC(ASN1_F_ASN1_ITEM_PACK), "ASN1_item_pack"},
-@@ -202,6 +203,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
- {ERR_REASON(ASN1_R_AUX_ERROR), "aux error"},
- {ERR_REASON(ASN1_R_BAD_CLASS), "bad class"},
- {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER), "bad object header"},
-+ {ERR_PACK(ERR_LIB_ASN1, 0, ASN1_R_BAD_TEMPLATE), "bad template"},
- {ERR_REASON(ASN1_R_BAD_PASSWORD_READ), "bad password read"},
- {ERR_REASON(ASN1_R_BAD_TAG), "bad tag"},
- {ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),
-diff -up openssl-1.0.2k/crypto/asn1/asn1.h.null-dereference openssl-1.0.2k/crypto/asn1/asn1.h
---- openssl-1.0.2k/crypto/asn1/asn1.h.null-dereference 2020-12-04 11:00:06.896637900 +0100
-+++ openssl-1.0.2k/crypto/asn1/asn1.h 2020-12-04 11:04:47.079562987 +0100
-@@ -1202,6 +1202,7 @@ void ERR_load_ASN1_strings(void);
- # define ASN1_F_ASN1_ITEM_DUP 191
- # define ASN1_F_ASN1_ITEM_EX_COMBINE_NEW 121
- # define ASN1_F_ASN1_ITEM_EX_D2I 120
-+# define ASN1_F_ASN1_ITEM_EX_I2D 231
- # define ASN1_F_ASN1_ITEM_I2D_BIO 192
- # define ASN1_F_ASN1_ITEM_I2D_FP 193
- # define ASN1_F_ASN1_ITEM_PACK 198
-@@ -1298,6 +1299,7 @@ void ERR_load_ASN1_strings(void);
- # define ASN1_R_AUX_ERROR 100
- # define ASN1_R_BAD_CLASS 101
- # define ASN1_R_BAD_OBJECT_HEADER 102
-+# define ASN1_R_BAD_TEMPLATE 230
- # define ASN1_R_BAD_PASSWORD_READ 103
- # define ASN1_R_BAD_TAG 104
- # define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
-diff -up openssl-1.0.2k/crypto/asn1/tasn_dec.c.null-dereference openssl-1.0.2k/crypto/asn1/tasn_dec.c
---- openssl-1.0.2k/crypto/asn1/tasn_dec.c.null-dereference 2020-12-04 10:12:42.036057323 +0100
-+++ openssl-1.0.2k/crypto/asn1/tasn_dec.c 2020-12-04 10:17:45.685035333 +0100
-@@ -223,6 +223,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- break;
-
- case ASN1_ITYPE_MSTRING:
-+ /*
-+ * It never makes sense for multi-strings to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE);
-+ goto err;
-+ }
-+
- p = *in;
- /* Just read in tag and class */
- ret = asn1_check_tlen(NULL, &otag, &oclass, NULL, NULL,
-@@ -240,6 +249,7 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_MSTRING_NOT_UNIVERSAL);
- goto err;
- }
-+
- /* Check tag matches bit map */
- if (!(ASN1_tag2bit(otag) & it->utype)) {
- /* If OPTIONAL, assume this is OK */
-@@ -316,6 +326,15 @@ static int asn1_item_ex_d2i(ASN1_VALUE *
- goto err;
-
- case ASN1_ITYPE_CHOICE:
-+ /*
-+ * It never makes sense for CHOICE types to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ASN1_R_BAD_TEMPLATE);
-+ goto err;
-+ }
-+
- if (asn1_cb && !asn1_cb(ASN1_OP_D2I_PRE, pval, it, NULL))
- goto auxerr;
- if (*pval) {
-diff -up openssl-1.0.2k/crypto/asn1/tasn_enc.c.null-dereference openssl-1.0.2k/crypto/asn1/tasn_enc.c
---- openssl-1.0.2k/crypto/asn1/tasn_enc.c.null-dereference 2020-12-04 10:18:30.261472002 +0100
-+++ openssl-1.0.2k/crypto/asn1/tasn_enc.c 2020-12-04 10:21:14.310078987 +0100
-@@ -151,9 +151,25 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval,
- break;
-
- case ASN1_ITYPE_MSTRING:
-+ /*
-+ * It never makes sense for multi-strings to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
-+ return -1;
-+ }
- return asn1_i2d_ex_primitive(pval, out, it, -1, aclass);
-
- case ASN1_ITYPE_CHOICE:
-+ /*
-+ * It never makes sense for CHOICE types to have implicit tagging, so
-+ * if tag != -1, then this looks like an error in the template.
-+ */
-+ if (tag != -1) {
-+ ASN1err(ASN1_F_ASN1_ITEM_EX_I2D, ASN1_R_BAD_TEMPLATE);
-+ return -1;
-+ }
- if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL))
- return 0;
- i = asn1_get_choice_selector(pval, it);
-diff -up openssl-1.0.2k/crypto/x509v3/v3_genn.c.null-dereference openssl-1.0.2k/crypto/x509v3/v3_genn.c
---- openssl-1.0.2k/crypto/x509v3/v3_genn.c.null-dereference 2020-12-04 10:28:02.374237945 +0100
-+++ openssl-1.0.2k/crypto/x509v3/v3_genn.c 2020-12-04 10:36:51.156138263 +0100
-@@ -72,8 +72,9 @@ ASN1_SEQUENCE(OTHERNAME) = {
- IMPLEMENT_ASN1_FUNCTIONS(OTHERNAME)
-
- ASN1_SEQUENCE(EDIPARTYNAME) = {
-- ASN1_IMP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0),
-- ASN1_IMP_OPT(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1)
-+ /* DirectoryString is a CHOICE type so use explicit tagging */
-+ ASN1_EXP_OPT(EDIPARTYNAME, nameAssigner, DIRECTORYSTRING, 0),
-+ ASN1_EXP(EDIPARTYNAME, partyName, DIRECTORYSTRING, 1)
- } ASN1_SEQUENCE_END(EDIPARTYNAME)
-
- IMPLEMENT_ASN1_FUNCTIONS(EDIPARTYNAME)
-@@ -107,6 +108,37 @@ GENERAL_NAME *GENERAL_NAME_dup(GENERAL_N
- (char *)a);
- }
-
-+static int edipartyname_cmp(const EDIPARTYNAME *a, const EDIPARTYNAME *b)
-+{
-+ int res;
-+
-+ if (a == NULL || b == NULL) {
-+ /*
-+ * Shouldn't be possible in a valid GENERAL_NAME, but we handle it
-+ * anyway. OTHERNAME_cmp treats NULL != NULL so we do the same here
-+ */
-+ return -1;
-+ }
-+ if (a->nameAssigner == NULL && b->nameAssigner != NULL)
-+ return -1;
-+ if (a->nameAssigner != NULL && b->nameAssigner == NULL)
-+ return 1;
-+ /* If we get here then both have nameAssigner set, or both unset */
-+ if (a->nameAssigner != NULL) {
-+ res = ASN1_STRING_cmp(a->nameAssigner, b->nameAssigner);
-+ if (res != 0)
-+ return res;
-+ }
-+ /*
-+ * partyName is required, so these should never be NULL. We treat it in
-+ * the same way as the a == NULL || b == NULL case above
-+ */
-+ if (a->partyName == NULL || b->partyName == NULL)
-+ return -1;
-+
-+ return ASN1_STRING_cmp(a->partyName, b->partyName);
-+}
-+
- /* Returns 0 if they are equal, != 0 otherwise. */
- int GENERAL_NAME_cmp(GENERAL_NAME *a, GENERAL_NAME *b)
- {
-@@ -116,8 +148,11 @@ int GENERAL_NAME_cmp(GENERAL_NAME *a, GE
- return -1;
- switch (a->type) {
- case GEN_X400:
-+ result = ASN1_TYPE_cmp(a->d.x400Address, b->d.x400Address);
-+ break;
-+
- case GEN_EDIPARTY:
-- result = ASN1_TYPE_cmp(a->d.other, b->d.other);
-+ result = edipartyname_cmp(a->d.ediPartyName, b->d.ediPartyName);
- break;
-
- case GEN_OTHERNAME:
-@@ -164,8 +199,11 @@ void GENERAL_NAME_set0_value(GENERAL_NAM
- {
- switch (type) {
- case GEN_X400:
-+ a->d.x400Address = value;
-+ break;
-+
- case GEN_EDIPARTY:
-- a->d.other = value;
-+ a->d.ediPartyName = value;
- break;
-
- case GEN_OTHERNAME:
-@@ -199,8 +237,10 @@ void *GENERAL_NAME_get0_value(GENERAL_NA
- *ptype = a->type;
- switch (a->type) {
- case GEN_X400:
-+ return a->d.x400Address;
-+
- case GEN_EDIPARTY:
-- return a->d.other;
-+ return a->d.ediPartyName;
-
- case GEN_OTHERNAME:
- return a->d.otherName;
-diff -up openssl-1.0.2k/crypto/x509v3/v3nametest.c.null-dereference openssl-1.0.2k/crypto/x509v3/v3nametest.c
---- openssl-1.0.2k/crypto/x509v3/v3nametest.c.null-dereference 2020-12-04 10:28:02.374237945 +0100
-+++ openssl-1.0.2k/crypto/x509v3/v3nametest.c 2020-12-04 10:36:51.156138263 +0100
-@@ -321,6 +321,356 @@ static void run_cert(X509 *crt, const ch
- }
- }
-
-+struct gennamedata {
-+ const unsigned char der[22];
-+ size_t derlen;
-+} gennames[] = {
-+ {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * SEQUENCE {}
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x13, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x02, 0x30, 0x00
-+ },
-+ 21
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * [APPLICATION 0] {}
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x13, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x02, 0x60, 0x00
-+ },
-+ 21
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.2 }
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x02, 0xa0, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * BOOLEAN { TRUE }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x01, 0x01, 0xff
-+ },
-+ 22
-+ }, {
-+ /*
-+ * [0] {
-+ * OBJECT_IDENTIFIER { 1.2.840.113554.4.1.72585.2.1 }
-+ * [0] {
-+ * BOOLEAN { FALSE }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa0, 0x14, 0x06, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04,
-+ 0x01, 0x84, 0xb7, 0x09, 0x02, 0x01, 0xa0, 0x03, 0x01, 0x01, 0x00
-+ },
-+ 22
-+ }, {
-+ /* [1 PRIMITIVE] { "a" } */
-+ {
-+ 0x81, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [1 PRIMITIVE] { "b" } */
-+ {
-+ 0x81, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /* [2 PRIMITIVE] { "a" } */
-+ {
-+ 0x82, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [2 PRIMITIVE] { "b" } */
-+ {
-+ 0x82, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /*
-+ * [4] {
-+ * SEQUENCE {
-+ * SET {
-+ * SEQUENCE {
-+ * # commonName
-+ * OBJECT_IDENTIFIER { 2.5.4.3 }
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa4, 0x0e, 0x30, 0x0c, 0x31, 0x0a, 0x30, 0x08, 0x06, 0x03, 0x55,
-+ 0x04, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 16
-+ }, {
-+ /*
-+ * [4] {
-+ * SEQUENCE {
-+ * SET {
-+ * SEQUENCE {
-+ * # commonName
-+ * OBJECT_IDENTIFIER { 2.5.4.3 }
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa4, 0x0e, 0x30, 0x0c, 0x31, 0x0a, 0x30, 0x08, 0x06, 0x03, 0x55,
-+ 0x04, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 16
-+ }, {
-+ /*
-+ * [5] {
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x05, 0xa1, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 7
-+ }, {
-+ /*
-+ * [5] {
-+ * [1] {
-+ * UTF8String { "b" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x05, 0xa1, 0x03, 0x0c, 0x01, 0x62
-+ },
-+ 7
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String {}
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x09, 0xa0, 0x02, 0x0c, 0x00, 0xa1, 0x03, 0x0c, 0x01, 0x61
-+ },
-+ 11
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String { "a" }
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x0a, 0xa0, 0x03, 0x0c, 0x01, 0x61, 0xa1, 0x03, 0x0c, 0x01,
-+ 0x61
-+ },
-+ 12
-+ }, {
-+ /*
-+ * [5] {
-+ * [0] {
-+ * UTF8String { "b" }
-+ * }
-+ * [1] {
-+ * UTF8String { "a" }
-+ * }
-+ * }
-+ */
-+ {
-+ 0xa5, 0x0a, 0xa0, 0x03, 0x0c, 0x01, 0x62, 0xa1, 0x03, 0x0c, 0x01,
-+ 0x61
-+ },
-+ 12
-+ }, {
-+ /* [6 PRIMITIVE] { "a" } */
-+ {
-+ 0x86, 0x01, 0x61
-+ },
-+ 3
-+ }, {
-+ /* [6 PRIMITIVE] { "b" } */
-+ {
-+ 0x86, 0x01, 0x62
-+ },
-+ 3
-+ }, {
-+ /* [7 PRIMITIVE] { `11111111` } */
-+ {
-+ 0x87, 0x04, 0x11, 0x11, 0x11, 0x11
-+ },
-+ 6
-+ }, {
-+ /* [7 PRIMITIVE] { `22222222`} */
-+ {
-+ 0x87, 0x04, 0x22, 0x22, 0x22, 0x22
-+ },
-+ 6
-+ }, {
-+ /* [7 PRIMITIVE] { `11111111111111111111111111111111` } */
-+ {
-+ 0x87, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
-+ 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11
-+ },
-+ 18
-+ }, {
-+ /* [7 PRIMITIVE] { `22222222222222222222222222222222` } */
-+ {
-+ 0x87, 0x10, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
-+ 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22
-+ },
-+ 18
-+ }, {
-+ /* [8 PRIMITIVE] { 1.2.840.113554.4.1.72585.2.1 } */
-+ {
-+ 0x88, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04, 0x01, 0x84,
-+ 0xb7, 0x09, 0x02, 0x01
-+ },
-+ 15
-+ }, {
-+ /* [8 PRIMITIVE] { 1.2.840.113554.4.1.72585.2.2 } */
-+ {
-+ 0x88, 0x0d, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x12, 0x04, 0x01, 0x84,
-+ 0xb7, 0x09, 0x02, 0x02
-+ },
-+ 15
-+ }
-+};
-+
-+#define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0]))
-+
-+static int test_GENERAL_NAME_cmp(void)
-+{
-+ size_t i, j;
-+ GENERAL_NAME **namesa = OPENSSL_malloc(sizeof(*namesa)
-+ * OSSL_NELEM(gennames));
-+ GENERAL_NAME **namesb = OPENSSL_malloc(sizeof(*namesb)
-+ * OSSL_NELEM(gennames));
-+ int testresult = 0;
-+
-+ if (namesa == NULL || namesb == NULL)
-+ goto end;
-+
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ const unsigned char *derp = gennames[i].der;
-+
-+ /*
-+ * We create two versions of each GENERAL_NAME so that we ensure when
-+ * we compare them they are always different pointers.
-+ */
-+ namesa[i] = d2i_GENERAL_NAME(NULL, &derp, gennames[i].derlen);
-+ derp = gennames[i].der;
-+ namesb[i] = d2i_GENERAL_NAME(NULL, &derp, gennames[i].derlen);
-+ if (namesa[i] == NULL || namesb[i] == NULL)
-+ goto end;
-+ }
-+
-+ /* Every name should be equal to itself and not equal to any others. */
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ for (j = 0; j < OSSL_NELEM(gennames); j++) {
-+ if (i == j) {
-+ if (GENERAL_NAME_cmp(namesa[i], namesb[j]) != 0)
-+ goto end;
-+ } else {
-+ if (GENERAL_NAME_cmp(namesa[i], namesb[j]) == 0)
-+ goto end;
-+ }
-+ }
-+ }
-+ testresult = 1;
-+
-+ end:
-+ for (i = 0; i < OSSL_NELEM(gennames); i++) {
-+ if (namesa != NULL)
-+ GENERAL_NAME_free(namesa[i]);
-+ if (namesb != NULL)
-+ GENERAL_NAME_free(namesb[i]);
-+ }
-+ OPENSSL_free(namesa);
-+ OPENSSL_free(namesb);
-+
-+ if (!testresult)
-+ fprintf(stderr, "test of GENERAL_NAME_cmp failed\n");
-+
-+ return testresult;
-+}
-+
-+
-+
- int main(void)
- {
- const struct set_name_fn *pfn = name_fns;
-@@ -342,5 +692,8 @@ int main(void)
- }
- ++pfn;
- }
-+
-+ errors += !test_GENERAL_NAME_cmp();
-+
- return errors > 0 ? 1 : 0;
- }
diff --git a/external/openssl/openssl-3650-masm.patch.1 b/external/openssl/openssl-3650-masm.patch.1
deleted file mode 100644
index 97f1eb6446c3..000000000000
--- a/external/openssl/openssl-3650-masm.patch.1
+++ /dev/null
@@ -1,35 +0,0 @@
-diff --git a/crypto/perlasm/x86masm.pl b/crypto/perlasm/x86masm.pl
-index 1741342..917d0f8 100644
---- a/crypto/perlasm/x86masm.pl
-+++ b/crypto/perlasm/x86masm.pl
-@@ -18,10 +18,10 @@ sub ::generic
-
- if ($opcode =~ /lea/ && @arg[1] =~ s/.*PTR\s+(\(.*\))$/OFFSET $1/) # no []
- { $opcode="mov"; }
-- elsif ($opcode !~ /movq/)
-+ elsif ($opcode !~ /mov[dq]$/)
- { # fix xmm references
-- $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[1]=~/\bxmm[0-7]\b/i);
-- $arg[1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
-+ $arg[0] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[-1]=~/\bxmm[0-7]\b/i);
-+ $arg[-1] =~ s/\b[A-Z]+WORD\s+PTR/XMMWORD PTR/i if ($arg[0]=~/\bxmm[0-7]\b/i);
- }
-
- &::emit($opcode,@arg);
-@@ -160,13 +160,13 @@ sub ::public_label
- { push(@out,"PUBLIC\t".&::LABEL($_[0],$nmdecor.$_[0])."\n"); }
-
- sub ::data_byte
--{ push(@out,("DB\t").join(',',@_)."\n"); }
-+{ push(@out,("DB\t").join(',',splice(@_,0,16))."\n") while(@_); }
-
- sub ::data_short
--{ push(@out,("DW\t").join(',',@_)."\n"); }
-+{ push(@out,("DW\t").join(',',splice(@_,0,8))."\n") while(@_); }
-
- sub ::data_word
--{ push(@out,("DD\t").join(',',@_)."\n"); }
-+{ push(@out,("DD\t").join(',',splice(@_,0,4))."\n") while(@_); }
-
- sub ::align
- { push(@out,"ALIGN\t$_[0]\n"); }
diff --git a/external/openssl/openssl-fixbuild.patch.1 b/external/openssl/openssl-fixbuild.patch.1
deleted file mode 100644
index 5a986e87214b..000000000000
--- a/external/openssl/openssl-fixbuild.patch.1
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/crypto/evp/Makefile
-+++ b/crypto/evp/Makefile
-@@ -289,7 +289,7 @@
- e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h
- e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
- e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
--e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
-+e_idea.o: ../../include/openssl/evp.h ../idea/idea.h
- e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h
- e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
- e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
---- a/util/mklink.pl
-+++ b/util/mklink.pl
-@@ -50,8 +50,7 @@
- my $to = join('/', @to_path);
-
- my $file;
--$symlink_exists=eval {symlink("",""); 1};
--if ($^O eq "msys") { $symlink_exists=0 };
-+$symlink_exists=0;
- foreach $file (@files) {
- my $err = "";
- if ($symlink_exists) {
diff --git a/external/openssl/openssl-no-multilib.patch.0 b/external/openssl/openssl-no-multilib.patch.0
new file mode 100644
index 000000000000..07c45318ac25
--- /dev/null
+++ b/external/openssl/openssl-no-multilib.patch.0
@@ -0,0 +1,38 @@
+--- Configure.orig 2020-04-21 14:22:39.000000000 +0200
++++ Configure 2020-07-07 17:25:19.256297500 +0200
+@@ -24,7 +24,7 @@
+ my $orig_death_handler = $SIG{__DIE__};
+ $SIG{__DIE__} = \&death_handler;
+
+-my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
++my $usage="Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [no-multilib] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]\n";
+
+ # Options:
+ #
+@@ -59,6 +59,7 @@
+ # If disabled, it also disables shared and dynamic-engine.
+ # no-asm do not use assembler
+ # no-egd do not compile support for the entropy-gathering daemon APIs
++# no-multilib exclude multilib identifier from library name
+ # [no-]zlib [don't] compile support for zlib compression.
+ # zlib-dynamic Like "zlib", but the zlib library is expected to be a shared
+ # library and will be loaded in run-time by the OpenSSL library.
+@@ -383,6 +384,7 @@
+ "mdc2",
+ "msan",
+ "multiblock",
++ "multilib",
+ "nextprotoneg",
+ "pinshared",
+ "ocb",
+@@ -1754,6 +1756,10 @@
+ if (-f catfile($srcdir, "test", $_, "build.info"));
+ }
+
++ if ($disabled{"multilib"}) {
++ $target{"multilib"} = "";
++ }
++
+ $config{build_infos} = [ ];
+
+ my %ordinals = ();
diff --git a/external/openssl/openssllnx.patch b/external/openssl/openssllnx.patch
deleted file mode 100644
index 224df8f87b2e..000000000000
--- a/external/openssl/openssllnx.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- build/openssl-0.9.8v/Configure-old 2010-04-17 13:51:42.000000000 +0200
-+++ build/openssl-0.9.8v/Configure 2010-04-17 13:52:03.000000000 +0200
-@@ -388,6 +388,9 @@
-
- "bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
-+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-+
- "nextstep", "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
- "nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
-
---- build/openssl-0.9.8v/Makefile.org 2010-01-27 17:06:36.000000000 +0100
-+++ build/openssl-0.9.8v/Makefile.org 2010-09-20 09:24:00.000000000 +0100
-@@ -206,7 +206,7 @@
- # same language for uniform treatment.
- BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
- CC='$(CC)' CFLAG='$(CFLAG)' \
-- AS='$(CC)' ASFLAG='$(CFLAG) -c' \
-+ AS='$(CC)' ASFLAG='$(CFLAG) -c -Wa,--noexecstack' \
- AR='$(AR)' NM='$(NM)' RANLIB='$(RANLIB)' \
- RC='$(RC)' \
- CROSS_COMPILE='$(CROSS_COMPILE)' \
diff --git a/external/openssl/opensslsol.patch b/external/openssl/opensslsol.patch
deleted file mode 100644
index 6122b67c930e..000000000000
--- a/external/openssl/opensslsol.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- misc/openssl-0.9.8v/Makefile.shared Wed Sep 17 17:56:40 2008
-+++ build/openssl-0.9.8v/Makefile.shared Fri Mar 26 16:04:41 2010
-@@ -95,7 +95,7 @@
- LDCMD="$${LDCMD:-$(CC)}"; LDFLAGS="$${LDFLAGS:-$(CFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
-- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
- $${LDCMD} $${LDFLAGS} -o $${APPNAME:=$(APPNAME)} $(OBJECTS) $${LIBDEPS} )
-
- LINK_SO= \
-@@ -105,7 +105,7 @@
- SHAREDFLAGS="$${SHAREDFLAGS:-$(CFLAGS) $(SHARED_LDFLAGS)}"; \
- LIBPATH=`for x in $$LIBDEPS; do echo $$x; done | sed -e 's/^ *-L//;t' -e d | uniq`; \
- LIBPATH=`echo $$LIBPATH | sed -e 's/ /:/g'`; \
-- LD_LIBRARY_PATH=$$LIBPATH:$$LD_LIBRARY_PATH \
-+ LD_LIBRARY_PATH=$$LD_LIBRARY_PATH \
- $${SHAREDCMD} $${SHAREDFLAGS} \
- -o $$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX \
- $$ALLSYMSFLAGS $$SHOBJECTS $$NOALLSYMSFLAGS $$LIBDEPS \
diff --git a/external/openssl/opensslwnt.patch b/external/openssl/opensslwnt.patch
deleted file mode 100644
index e22bea6f077b..000000000000
--- a/external/openssl/opensslwnt.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff -ru openssl.orig/crypto/x509v3/v3_pci.c openssl/crypto/x509v3/v3_pci.c
---- a/openssl.orig/crypto/x509v3/v3_pci.c 2016-03-01 14:35:05.000000000 +0100
-+++ b/openssl/crypto/x509v3/v3_pci.c 2016-03-03 20:27:42.195914432 +0100
-@@ -3,7 +3,7 @@
- * Contributed to the OpenSSL Project 2004 by Richard Levitte
- * (richard@levitte.org)
- */
--/* Copyright (c) 2004 Kungliga Tekniska Högskolan
-+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
-diff -ru openssl.orig/crypto/x509v3/v3_pcia.c openssl/crypto/x509v3/v3_pcia.c
---- a/openssl.orig/crypto/x509v3/v3_pcia.c 2016-03-01 14:35:05.000000000 +0100
-+++ b/openssl/crypto/x509v3/v3_pcia.c 2016-03-03 20:27:56.495913984 +0100
-@@ -3,7 +3,7 @@
- * Contributed to the OpenSSL Project 2004 by Richard Levitte
- * (richard@levitte.org)
- */
--/* Copyright (c) 2004 Kungliga Tekniska Högskolan
-+/* Copyright (c) 2004 Kungliga Tekniska Hoegskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
-diff -ru openssl.orig/ms/do_ms.bat openssl/ms/do_ms.bat
---- a/openssl.orig/ms/do_ms.bat 2015-01-15 15:43:14.000000000 +0100
-+++ b/openssl/ms/do_ms.bat 2016-03-03 20:31:09.355907935 +0100
-@@ -1,11 +1,11 @@
-
--perl util\mkfiles.pl >MINFO
--perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
--perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
--if x%OSVERSION% == x goto skipce
--perl util\mk1mf.pl no-asm VC-CE >ms\ce.mak
--perl util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
--:skipce
-+%1 util\mkfiles.pl >MINFO
-+if %2 == VC-WIN32 goto not64a
-+perl ms\uplink.pl win64a > ms\uptable.asm
-+ml64 -c -Foms\uptable.obj ms\uptable.asm
-+:not64a
-+%1 util\mk1mf.pl no-asm %2 >ms\nt.mak
-+%1 util\mk1mf.pl dll no-asm %2 >ms\ntdll.mak
-
--perl util\mkdef.pl 32 libeay > ms\libeay32.def
--perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
-+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
-+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
-diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
---- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
-+++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
-@@ -163,7 +163,7 @@
- $inc_def="outinc";
- $tmp_def="tmp";
-
--$perl="perl" unless defined $perl;
-+$perl="$ENV{PERL}" unless defined $perl;
- $mkdir="-mkdir" unless defined $mkdir;
-
- ($ssl,$crypto)=("ssl","crypto");
-@@ -347,6 +347,11 @@
- s/\s*$//; # was chop, didn't work in mixture of perls for Windows...
-
- ($key,$val)=/^([^=]+)=(.*)/;
-+
-+ # On some Windows machines, $val has linefeeds at the end, which confuses
-+ # subsequent code in this file. So we strip all whitespace at the end.
-+ $val =~ s/\s+$//;
-+
- if ($key eq "RELATIVE_DIRECTORY")
- {
- if ($lib ne "")
-@@ -473,7 +478,7 @@
- # Set your compiler options
- PLATFORM=$platform
- CC=$bin_dir${cc}
--CFLAG=$cflags
-+CFLAG=$cflags \$(SOLARINC)
- APP_CFLAG=$app_cflag
- LIB_CFLAG=$lib_cflag
- SHLIB_CFLAG=$shl_cflag
-@@ -488,7 +493,7 @@
-
- LINK_CMD=$link
- LFLAGS=$lflags
--RSC=$rsc
-+RSC=$rsc \$(SOLARINC)
-
- # The output directory for everything interesting
- OUT_D=$out_dir
-@@ -669,7 +674,7 @@
- printf OUT <<EOF;
- #ifdef $platform_cpp_symbol
- /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
-- #define CFLAGS "compiler: $cc $cflags"
-+ #define CFLAGS "compiler: $cflags"
- #define PLATFORM "$platform"
- EOF
- printf OUT " #define DATE \"%s\"\n", scalar gmtime();
-diff -ru openssl.orig/util/pl/VC-32.pl openssl/util/pl/VC-32.pl
---- a/openssl.orig/util/pl/VC-32.pl 2016-03-01 14:35:53.000000000 +0100
-+++ b/openssl/util/pl/VC-32.pl 2016-03-03 21:15:14.083824986 +0100
-@@ -30,7 +30,7 @@
- my $ff = "";
-
- # C compiler stuff
--$cc='cl';
-+$cc=$ENV{'CC'};
- if ($FLAVOR =~ /WIN64/)
- {
- # Note that we currently don't have /WX on Win64! There is a lot of
-@@ -114,7 +114,7 @@
- }
-
- $cc=($ENV{CC} or "cl");
-- $base_cflags=' /W3 /WX /GF /Gy /nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
-+ $base_cflags=' -W3 -GF -Gy -nologo -DUNICODE -D_UNICODE -DOPENSSL_SYSNAME_WINCE -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DDSO_WIN32 -DNO_CHMOD -DOPENSSL_SMALL_FOOTPRINT';
- $base_cflags.=" $wcecdefs";
- $base_cflags.=' -I$(WCECOMPAT)/include' if (defined($ENV{'WCECOMPAT'}));
- $base_cflags.=' -I$(PORTSDK_LIBPATH)/../../include' if (defined($ENV{'PORTSDK_LIBPATH'}));
-@@ -123,20 +123,21 @@
- } else {
- $base_cflags.=' /MC';
- }
-- $opt_cflags=' /O1i'; # optimize for space, but with intrinsics...
-- $dbg_cflags=' /Od -DDEBUG -D_DEBUG';
-+ $opt_cflags=' -O1i'; # optimize for space, but with intrinsics...
-+ $dbg_cflags=' -Od -DDEBUG -D_DEBUG';
-+
- $lflags="/nologo /opt:ref $wcelflag";
- }
- else # Win32
- {
- $base_cflags= " $mf_cflag";
-- my $f = $shlib || $fips ?' /MD':' /MT';
-+ my $f = $shlib || $fips ? (($ENV{MSVC_USE_DEBUG_RUNTIME} eq "TRUE") ? ' -MDd' : ' -MD' ):' -MT';
- $ff = "/fixed";
-- $opt_cflags=$f.' /Ox /O2 /Ob2';
-- $dbg_cflags=$f.'d /Od -DDEBUG -D_DEBUG';
-+ $opt_cflags=$f.' -Ox -O2 -Ob2';
-+ $dbg_cflags=$f.'d -Od -DDEBUG -D_DEBUG';
- $lflags="/nologo /subsystem:console /opt:ref";
- }
--$lib_cflag='/Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
-+$lib_cflag='-Zl' if (!$shlib); # remove /DEFAULTLIBs from static lib
- $mlflags='';
-
- $out_def ="out32"; $out_def.="dll" if ($shlib);
-@@ -161,7 +162,7 @@
-
- $obj='.obj';
- $asm_suffix='.asm';
--$ofile="/Fo";
-+$ofile="-Fo.\\";
-
- # EXE linking stuff
- $link="link";
-diff -ru openssl.orig/ms/uplink.c openssl/ms/uplink.c
---- a/openssl.orig/ms/uplink.c 2015-03-19 15:02:02.000000000 +0100
-+++ b/openssl/ms/uplink.c 2016-03-03 20:39:19.403892565 +0100
-@@ -1,5 +1,6 @@
- #if (defined(_WIN64) || defined(_WIN32_WCE)) && !defined(UNICODE)
- # define UNICODE
-+# define _CRT_NON_CONFORMING_SWPRINTFS
- #endif
- #if defined(UNICODE) && !defined(_UNICODE)
- # define _UNICODE
diff --git a/external/openssl/opensslwnt_safeseh.patch b/external/openssl/opensslwnt_safeseh.patch
deleted file mode 100644
index f2eafab5b9ed..000000000000
--- a/external/openssl/opensslwnt_safeseh.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-use /safeseh in 32-bit MSVC builds; this is not required for 64-bit
-
-diff -ru openssl.orig/util/mk1mf.pl openssl/util/mk1mf.pl
---- a/openssl.orig/util/mk1mf.pl 2016-03-03 20:22:21.043924505 +0100
-+++ b/openssl/util/mk1mf.pl 2016-03-03 20:34:45.015901171 +0100
-@@ -488,7 +493,7 @@
- SRC_D=$src_dir
-
- LINK_CMD=$link
--LFLAGS=$lflags
-+LFLAGS=$lflags /SAFESEH
- RSC=$rsc \$(SOLARINC)
-
- # The output directory for everything interesting
-@@ -511,7 +516,7 @@
- MKDIR=$mkdir
- MKLIB=$bin_dir$mklib
- MLFLAGS=$mlflags
--ASM=$bin_dir$asm
-+ASM=$bin_dir$asm /safeseh
-
- # FIPS validated module and support file locations
-
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index f08ff51a31a3..136ebd7bf7e5 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 \
))
@@ -685,7 +693,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 f394cf732c2d..909149d1d3ad 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,32 +69,6 @@ index 323de4ffc..f11a0b0ad 100644
std::vector<UnsupportedFeature> unsupported;
CheckForSharedFormInternal(doc->GetRoot(), &unsupported);
-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
---- a/third_party/base/span.h
-+++ b/third_party/base/span.h
-@@ -204,7 +204,7 @@ class span {
- // size()|.
- template <typename Container,
- typename = internal::EnableIfSpanCompatibleContainer<Container, T>>
-- constexpr span(Container& container)
-+ span(Container& container)
- : span(container.data(), container.size()) {}
- template <
- typename Container,
--- a/core/fxge/dib/cfx_cmyk_to_srgb.cpp 2020-09-10 17:32:37.165872018 +0200
+++ b/core/fxge/dib/cfx_cmyk_to_srgb.cpp 2020-09-10 17:33:15.870395738 +0200
@@ -1740,10 +1740,12 @@
@@ -44,24 +76,102 @@ index 0fb627ba8..dda1fc8bc 100644
uint8_t k1 = static_cast<int>(k * 255.f + rounding_offset);
+#ifndef _WIN32
- ASSERT(c1 == FXSYS_roundf(c * 255));
- ASSERT(m1 == FXSYS_roundf(m * 255));
- ASSERT(y1 == FXSYS_roundf(y * 255));
- ASSERT(k1 == FXSYS_roundf(k * 255));
+ DCHECK_EQ(c1, FXSYS_roundf(c * 255));
+ DCHECK_EQ(m1, FXSYS_roundf(m * 255));
+ DCHECK_EQ(y1, FXSYS_roundf(y * 255));
+ DCHECK_EQ(k1, FXSYS_roundf(k * 255));
+#endif
uint8_t r;
uint8_t g;
diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
-index dbc1b1045..36b72461d 100644
+index 9391d61ab..490ce2230 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) {
+@@ -75,7 +75,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
if (!data.b)
- return {};
+ 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 ed2a3c8de..87493861c 100644
+--- a/third_party/base/span.h
++++ b/third_party/base/span.h
+@@ -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()) {}
+ #endif
+
+@@ -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;
+ }
+
+-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 2497306fa06b..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-05-06 11:57:12 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>
@@ -267,19 +271,20 @@
#include <core/fxcodec/jpx/cjpx_decoder.h>
#include <core/fxcodec/jpx/jpx_decode_utils.h>
#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>
@@ -287,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>
@@ -297,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>
@@ -313,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>
@@ -331,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>
@@ -347,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>
@@ -366,24 +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/render_defines.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/include.patch b/external/pdfium/include.patch
new file mode 100644
index 000000000000..75c0e3b9272a
--- /dev/null
+++ b/external/pdfium/include.patch
@@ -0,0 +1,11 @@
+--- constants/annotation_flags.h
++++ constants/annotation_flags.h
+@@ -5,6 +5,8 @@
+ #ifndef CONSTANTS_ANNOTATION_FLAGS_H_
+ #define CONSTANTS_ANNOTATION_FLAGS_H_
+
++#include <stdint.h>
++
+ namespace pdfium {
+ namespace annotation_flags {
+
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/README b/external/poppler/README
index 35a640264618..08d3612c3542 100644
--- a/external/poppler/README
+++ b/external/poppler/README
@@ -1 +1 @@
-From [http://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
+From [https://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 3cc0a95e3617..62877a0f0059 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -11,7 +11,10 @@ $(eval $(call gb_StaticLibrary_StaticLibrary,poppler))
$(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler))
-$(eval $(call gb_StaticLibrary_use_external,poppler,libjpeg))
+$(eval $(call gb_StaticLibrary_use_externals,poppler,\
+ libjpeg \
+ zlib \
+))
$(eval $(call gb_StaticLibrary_set_warnings_disabled,poppler))
@@ -53,25 +56,28 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,poppler,\
))
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
+ UnpackedTarball/poppler/goo/gbase64 \
+ UnpackedTarball/poppler/goo/gbasename \
UnpackedTarball/poppler/goo/gfile \
- UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/glibc \
+ UnpackedTarball/poppler/goo/glibc_strtok_r \
+ UnpackedTarball/poppler/goo/grandom \
+ UnpackedTarball/poppler/goo/gstrtod \
UnpackedTarball/poppler/goo/GooString \
+ UnpackedTarball/poppler/goo/GooTimer \
+ UnpackedTarball/poppler/goo/ImgWriter \
+ UnpackedTarball/poppler/goo/JpegWriter \
UnpackedTarball/poppler/goo/NetPBMWriter \
UnpackedTarball/poppler/goo/PNGWriter \
UnpackedTarball/poppler/goo/TiffWriter \
- UnpackedTarball/poppler/goo/JpegWriter \
- UnpackedTarball/poppler/goo/ImgWriter \
- UnpackedTarball/poppler/goo/gstrtod \
- UnpackedTarball/poppler/goo/grandom \
- UnpackedTarball/poppler/goo/glibc \
- UnpackedTarball/poppler/goo/glibc_strtok_r \
UnpackedTarball/poppler/fofi/FoFiBase \
UnpackedTarball/poppler/fofi/FoFiEncodings \
+ UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/fofi/FoFiTrueType \
UnpackedTarball/poppler/fofi/FoFiType1 \
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 \
@@ -79,63 +85,66 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/CertificateInfo \
UnpackedTarball/poppler/poppler/CharCodeToUnicode \
UnpackedTarball/poppler/poppler/CMap \
+ UnpackedTarball/poppler/poppler/DCTStream \
UnpackedTarball/poppler/poppler/DateInfo \
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/FlateEncoder \
UnpackedTarball/poppler/poppler/FontEncodingTables \
- UnpackedTarball/poppler/poppler/Form \
UnpackedTarball/poppler/poppler/FontInfo \
+ UnpackedTarball/poppler/poppler/Form \
UnpackedTarball/poppler/poppler/Function \
UnpackedTarball/poppler/poppler/Gfx \
UnpackedTarball/poppler/poppler/GfxFont \
UnpackedTarball/poppler/poppler/GfxState \
UnpackedTarball/poppler/poppler/GlobalParams \
UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/ImageEmbeddingUtils \
UnpackedTarball/poppler/poppler/JArithmeticDecoder \
UnpackedTarball/poppler/poppler/JBIG2Stream \
UnpackedTarball/poppler/poppler/JSInfo \
UnpackedTarball/poppler/poppler/Lexer \
- UnpackedTarball/poppler/poppler/Link \
UnpackedTarball/poppler/poppler/Linearization \
+ UnpackedTarball/poppler/poppler/Link \
UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \
UnpackedTarball/poppler/poppler/MarkedContentOutputDev \
+ UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/NameToCharCode \
UnpackedTarball/poppler/poppler/Object \
UnpackedTarball/poppler/poppler/OptionalContent \
UnpackedTarball/poppler/poppler/Outline \
UnpackedTarball/poppler/poppler/OutputDev \
UnpackedTarball/poppler/poppler/Page \
+ UnpackedTarball/poppler/poppler/PageLabelInfo \
UnpackedTarball/poppler/poppler/PageTransition \
UnpackedTarball/poppler/poppler/Parser \
UnpackedTarball/poppler/poppler/PDFDoc \
UnpackedTarball/poppler/poppler/PDFDocBuilder \
UnpackedTarball/poppler/poppler/PDFDocEncoding \
UnpackedTarball/poppler/poppler/PDFDocFactory \
- UnpackedTarball/poppler/poppler/ProfileData \
UnpackedTarball/poppler/poppler/PreScanOutputDev \
+ UnpackedTarball/poppler/poppler/ProfileData \
+ UnpackedTarball/poppler/poppler/PSOutputDev \
UnpackedTarball/poppler/poppler/PSTokenizer \
+ UnpackedTarball/poppler/poppler/Rendition \
+ UnpackedTarball/poppler/poppler/SecurityHandler \
UnpackedTarball/poppler/poppler/SignatureInfo \
+ UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/Stream \
- UnpackedTarball/poppler/poppler/StructTreeRoot \
UnpackedTarball/poppler/poppler/StructElement \
+ UnpackedTarball/poppler/poppler/StructTreeRoot \
+ UnpackedTarball/poppler/poppler/TextOutputDev \
+ UnpackedTarball/poppler/poppler/UTF \
UnpackedTarball/poppler/poppler/UnicodeMap \
UnpackedTarball/poppler/poppler/UnicodeMapFuncs \
UnpackedTarball/poppler/poppler/UnicodeTypeTable \
- UnpackedTarball/poppler/poppler/UTF \
- UnpackedTarball/poppler/poppler/XRef \
- UnpackedTarball/poppler/poppler/PSOutputDev \
- UnpackedTarball/poppler/poppler/TextOutputDev \
- UnpackedTarball/poppler/poppler/PageLabelInfo \
- UnpackedTarball/poppler/poppler/SecurityHandler \
- UnpackedTarball/poppler/poppler/StdinCachedFile \
- UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \
- UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/ViewerPreferences \
- UnpackedTarball/poppler/poppler/Movie \
- UnpackedTarball/poppler/poppler/Rendition \
- UnpackedTarball/poppler/poppler/DCTStream \
+ UnpackedTarball/poppler/poppler/XRef \
+ 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..cc4f67754a03 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -12,6 +12,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler))
$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler))
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
+ external/poppler/disable-freetype.patch.1 \
+ external/poppler/disable-nss-and-gpgmepp.patch.1 \
+ external/poppler/gcc7-EntityInfo.patch.1 \
+ external/poppler/gcc7-GfxFont.patch.1 \
external/poppler/poppler-config.patch.1 \
))
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
new file mode 100644
index 000000000000..3c4d1d0f7a8a
--- /dev/null
+++ b/external/poppler/disable-freetype.patch.1
@@ -0,0 +1,41 @@
+disable freetype dependent code
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-14 18:50:22.232312300 +0900
+@@ -48,7 +48,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"
+@@ -78,8 +78,8 @@
+ #include "fofi/FoFiTrueType.h"
+ #include "fofi/FoFiIdentifier.h"
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+ #include <unordered_set>
+
+ // helper for using std::visit to get a dependent false for static_asserts
+@@ -2760,6 +2760,8 @@
+
+ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName)
+ {
++ 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 {};
+@@ -2994,6 +2996,7 @@
+ }
+
+ return { dictFontName, fontDictRef };
++#endif
+ }
+
+ std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 b/external/poppler/disable-nss-and-gpgmepp.patch.1
new file mode 100644
index 000000000000..01b442f53a1c
--- /dev/null
+++ b/external/poppler/disable-nss-and-gpgmepp.patch.1
@@ -0,0 +1,76 @@
+disable NSS/GPGMEPP dependent code.
+
+--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/Form.cc 2023-06-17 16:51:27.873431500 +0900
+@@ -64,7 +64,7 @@
+ #include "Form.h"
+ #include "PDFDoc.h"
+ #include "DateInfo.h"
+-#include "CryptoSignBackend.h"
++/*#include "CryptoSignBackend.h"*/
+ #include "SignatureInfo.h"
+ #include "CertificateInfo.h"
+ #include "XRef.h"
+@@ -577,7 +577,7 @@
+ {
+ return static_cast<FormFieldSignature *>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA);
+ }
+-
++#if 0
+ // update hash with the specified range of data from the file
+ static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, Goffset start, Goffset end)
+ {
+@@ -607,10 +607,12 @@
+ delete[] buf;
+ return true;
+ }
++#endif
+
+ bool FormWidgetSignature::signDocument(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location, const std::optional<GooString> &ownerPassword,
+ const std::optional<GooString> &userPassword)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return false;
+@@ -698,6 +700,8 @@
+ fclose(file);
+
+ return true;
++#endif
++ return false;
+ }
+
+ bool FormWidgetSignature::signDocumentWithAppearance(const std::string &saveFilename, const std::string &certNickname, const std::string &password, const GooString *reason, const GooString *location,
+@@ -2316,6 +2320,7 @@
+
+ void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len)
+ {
++#if 0
+ if (!handler) {
+ return;
+ }
+@@ -2335,6 +2340,7 @@
+ i += BLOCK_SIZE;
+ }
+ }
++#endif
+ }
+
+ FormSignatureType FormWidgetSignature::signatureType() const
+@@ -2349,6 +2355,7 @@
+
+ SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool enableAIA)
+ {
++#if 0
+ auto backend = CryptoSign::Factory::createActive();
+ if (!backend) {
+ return signature_info;
+@@ -2425,6 +2432,7 @@
+ const CertificateValidationStatus cert_val_state = signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime), ocspRevocationCheck, enableAIA);
+ signature_info->setCertificateValStatus(cert_val_state);
+
++#endif
+ return signature_info;
+ }
+
diff --git a/external/poppler/gcc7-EntityInfo.patch.1 b/external/poppler/gcc7-EntityInfo.patch.1
new file mode 100644
index 000000000000..1dd7c83ad475
--- /dev/null
+++ b/external/poppler/gcc7-EntityInfo.patch.1
@@ -0,0 +1,55 @@
+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 ‘’
+
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc: In member function ‘void X509CertificateInfo::setPublicKeyInfo(X509CertificateInfo::PublicKeyInfo&&)’:
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:106:39: error: use of deleted function ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&)’
+ public_key_info = std::move(pkInfo);
+ ^
+In file included from workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:15:0:
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.h:58:24: note: ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&) noexcept’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’
+ PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default;
+ ^~~~~~~~
+
+--- poppler/poppler/CertificateInfo.h.orig 2023-06-05 19:29:14.000000000 +0900
++++ poppler/poppler/CertificateInfo.h 2023-06-19 18:10:55.760031700 +0900
+@@ -55,7 +55,7 @@
+ PublicKeyInfo() = default;
+
+ PublicKeyInfo(PublicKeyInfo &&) noexcept = default;
+- PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default;
++ PublicKeyInfo &operator=(PublicKeyInfo &&) /*noexcept*/ = default;
+
+ PublicKeyInfo(const PublicKeyInfo &) = delete;
+ PublicKeyInfo &operator=(const PublicKeyInfo &) = delete;
+@@ -71,7 +71,7 @@
+ ~EntityInfo() = default;
+
+ EntityInfo(EntityInfo &&) noexcept = default;
+- EntityInfo &operator=(EntityInfo &&) noexcept = default;
++ EntityInfo &operator=(EntityInfo &&) /*noexcept*/ = default;
+
+ EntityInfo(const EntityInfo &) = delete;
+ EntityInfo &operator=(const EntityInfo &) = delete;
+--- 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/gcc7-GfxFont.patch.1 b/external/poppler/gcc7-GfxFont.patch.1
new file mode 100644
index 000000000000..a240b1b8bad2
--- /dev/null
+++ b/external/poppler/gcc7-GfxFont.patch.1
@@ -0,0 +1,94 @@
+Revert of upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/d5ea5a24124badf2b32a7d08dd2c06a4a40f93fb
+
+gcc 7.5.0 says:
+
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In member function ‘std::optional<GfxFontLoc> GfxFont::locateFont(XRef*, PSOutputDev*)’:
+/home/taichi/libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:660:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:671:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:680:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:711:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:723:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:752:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+ ^~~~~~~
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In static member function ‘static std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString*, bool)’:
+workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:814:12: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’
+ return fontLoc;
+
+diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc
+index cc2ce038..b0d0d610 100644
+--- a/poppler/GfxFont.cc
++++ b/poppler/GfxFont.cc
+@@ -657,7 +657,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocEmbedded;
+ fontLoc.fontType = type;
+ fontLoc.embFontID = embFontID;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ }
+ }
+@@ -668,7 +668,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocResident;
+ fontLoc.fontType = fontType1;
+ fontLoc.path = *name;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ //----- PS resident Base-14 font
+@@ -677,7 +677,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.locType = gfxFontLocResident;
+ fontLoc.fontType = fontType1;
+ fontLoc.path = ((Gfx8BitFont *)this)->base14->base14Name;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ //----- external font file (fontFile, fontDir)
+@@ -708,7 +708,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontCIDType2;
+ fontLoc.setPath(path);
+ fontLoc.fontNum = fontNum;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ } else {
+ GfxFontLoc fontLoc;
+@@ -720,7 +720,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontType1;
+ fontLoc.fontNum = fontNum;
+ }
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+ delete path;
+ }
+@@ -749,7 +749,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps)
+ fontLoc.fontType = fontType1;
+ fontLoc.path = substName;
+ fontLoc.substIdx = substIdx;
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ } else {
+ path = globalParams->findFontFile(substName);
+ if (path) {
+@@ -811,7 +811,7 @@ std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString *path, bool cid)
+ fontLoc.locType = gfxFontLocExternal;
+ fontLoc.fontType = fontType;
+ fontLoc.setPath(path);
+- return fontLoc;
++ return std::move(fontLoc); // std::move only required to please g++-7
+ }
+
+ std::optional<std::vector<unsigned char>> GfxFont::readEmbFontFile(XRef *xref)
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index b902402ea4e7..8f71e987b2b9 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -2,7 +2,7 @@
note: to get the 3rd one, use -DENABLE_CPP=on
-mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off
+mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off
manually disabled these because cmake failed to do it:
HAVE_CAIRO
@@ -16,7 +16,7 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/config.h
-@@ -0,0 +1,221 @@
+@@ -0,0 +1,229 @@
+/* config.h. Generated from config.h.cmake by cmake. */
+
+/* Build against libcurl. */
@@ -37,15 +37,21 @@ index 0fbd336a..451213f8 100644
+/* Do not hardcode the library location */
+/* #undef ENABLE_RELOCATABLE */
+
-+/* Build against zlib. */
-+/* #undef ENABLE_ZLIB */
-+
+/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */
+/* #undef ENABLE_ZLIB_UNCOMPRESS */
+
+/* Build against libnss3 for digital signature validation */
+/* #define ENABLE_NSS3 1 */
+
++/* Build against libgpgme for digital signature validation */
++/* #undef ENABLE_GPGME */
++
++/* Signatures enabled */
++/* #define ENABLE_SIGNATURES 1 */
++
++/* Default signature backend */
++/* #define DEFAULT_SIGNATURE_BACKEND "NSS" */
++
+/* Use cairo for rendering. */
+/* #define HAVE_CAIRO 1 */
+
@@ -105,9 +111,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 +179,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 23.09.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -185,7 +188,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.01.0"
++#define PACKAGE_VERSION "23.09.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,12 +206,15 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "21.01.0"
++#define VERSION "23.09.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
+/* Use win32 font configuration backend */
+#define WITH_FONTCONFIGURATION_WIN32 1
++#elif defined (__ANDROID__)
++/* Use android font configuration backend */
++#define WITH_FONTCONFIGURATION_ANDROID 1
+#else
+/* Use fontconfig font configuration backend */
+#define WITH_FONTCONFIGURATION_FONTCONFIG 1
@@ -228,6 +234,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 +251,12 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/poppler/poppler-config.h
-@@ -0,0 +1,166 @@
+@@ -0,0 +1,156 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
-+// Copyright 1996-2011 Glyph & Cog, LLC
++// Copyright 1996-2011, 2022 Glyph & Cog, LLC
+//
+//========================================================================
+
@@ -282,7 +290,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "21.01.0"
++#define POPPLER_VERSION "23.09.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -320,11 +328,6 @@ index 0fbd336a..451213f8 100644
+/* #define ENABLE_LIBPNG 1 */
+#endif
+
-+/* Use zlib instead of builtin zlib decoder. */
-+#ifndef ENABLE_ZLIB
-+/* #undef ENABLE_ZLIB */
-+#endif
-+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+ */
+#ifndef HAVE_DIRENT_H
@@ -369,18 +372,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-2023 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// Win32 stuff
@@ -439,9 +437,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 "23.09.0"
++#define POPPLER_VERSION_MAJOR 23
++#define POPPLER_VERSION_MINOR 9
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
@@ -455,3 +453,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/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index 9df01cae9ef3..377f02c0174c 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -43,7 +43,7 @@ endif
ifeq ($(DISABLE_OPENSSL),)
ifeq ($(SYSTEM_OPENSSL),)
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
-postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/
+postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if $(filter $(OS),LINUX),-pthread)
endif
endif
diff --git a/external/postgresql/postgres-msvc-build.patch.1 b/external/postgresql/postgres-msvc-build.patch.1
index 4ccd82aa28fb..c217a755918b 100644
--- a/external/postgresql/postgres-msvc-build.patch.1
+++ b/external/postgresql/postgres-msvc-build.patch.1
@@ -80,7 +80,7 @@ Also Cygwin perl has $Config{osname} different from MSWin32, and why even check
# Quote the .exe name in case it has spaces
my $opensslcmd =
- qq("$self->{options}->{openssl}\\bin\\openssl.exe" version 2>&1);
-+ qq("$self->{options}->{openssl}\\out32dll\\openssl.exe" version 2>&1);
++ qq("$self->{options}->{openssl}\\apps\\openssl.exe" version 2>&1);
+ print "$opensslcmd";
my $sslout = `$opensslcmd`;
@@ -101,10 +101,10 @@ Also Cygwin perl has $Config{osname} different from MSWin32, and why even check
# parameter.
$proj->AddLibrary(
- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
-+ $self->{options}->{openssl} . '\out32dll\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\ssleay32.lib', 0);
$proj->AddLibrary(
- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
-+ $self->{options}->{openssl} . '\out32dll\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\libeay32.lib', 0);
}
}
}
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 4dfc3b196f82..833fe24f7bb3 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -25,17 +25,14 @@ endif
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
PCbuild/$(python_arch_subdir)_asyncio$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
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)_testconsole$(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 \
@@ -44,8 +41,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)/libpython$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR).so.1.0-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
@@ -56,70 +53,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/_asyncio.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/_blake2.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/_contextvars.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/_md5.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/_queue.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/_sha3.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/_xxtestfuzz.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
@@ -140,7 +135,7 @@ endif
# 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_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
+ LO_lib/_sysconfigdata__$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
))
endif
@@ -150,6 +145,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
+#
+# 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 \
@@ -162,6 +161,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 \
@@ -180,6 +180,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 \
@@ -195,7 +196,6 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/contextvars.py \
Lib/copy.py \
Lib/copyreg.py \
- Lib/cProfile.py \
Lib/crypt.py \
Lib/csv.py \
Lib/dataclasses.py \
@@ -232,7 +232,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/mailbox.py \
Lib/mailcap.py \
Lib/mimetypes.py \
@@ -260,21 +259,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_abc.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/secrets.py \
- Lib/shelve.py \
Lib/selectors.py \
+ Lib/shelve.py \
Lib/shlex.py \
Lib/shutil.py \
Lib/signal.py \
@@ -288,10 +286,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 \
@@ -306,10 +304,11 @@ $(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 \
@@ -321,14 +320,41 @@ $(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,\
@@ -383,8 +409,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 \
@@ -393,44 +419,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,\
@@ -474,8 +500,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 \
@@ -492,10 +518,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 \
@@ -529,20 +555,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 \
@@ -565,8 +591,8 @@ $(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 \
@@ -576,19 +602,18 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
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 \
@@ -616,6 +641,7 @@ $(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 \
))
@@ -652,8 +678,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 \
@@ -662,13 +688,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 \
@@ -708,8 +734,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,\
@@ -718,13 +744,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 \
@@ -733,7 +771,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 \
@@ -754,6 +793,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 \
@@ -765,40 +805,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/testsealable.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 \
@@ -823,21 +829,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,\
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 6c958431cd97..1ff06a2382ed 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalProject_ExternalProject,python3))
$(eval $(call gb_ExternalProject_use_externals,python3,\
expat \
- $(if $(filter LINUX,$(OS)),libffi) \
+ $(if $(filter WNT LINUX,$(OS)),libffi) \
openssl \
zlib \
))
@@ -30,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)/out32dll \
+ /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) \
@@ -128,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\
@@ -157,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 d04868b93a44..94950537386c 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-darwin.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-clang.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
diff --git a/external/python3/i100492-freebsd.patch.1 b/external/python3/i100492-freebsd.patch.1
index 074e5fc489f8..b2ca1ee7117f 100644
--- a/external/python3/i100492-freebsd.patch.1
+++ b/external/python3/i100492-freebsd.patch.1
@@ -2,7 +2,7 @@ FreeBSD porting fixes, patch by maho@openoffice.org
--- 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
-@@ -186,6 +189,9 @@
+@@ -238,6 +238,9 @@
{
pthread_t th;
int status;
@@ -12,7 +12,7 @@ FreeBSD porting fixes, patch by maho@openoffice.org
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
-@@ -214,6 +220,10 @@
+@@ -277,6 +280,10 @@
callback->func = func;
callback->arg = arg;
@@ -23,7 +23,7 @@ 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 @@
+@@ -285,6 +292,9 @@
#endif
pythread_wrapper, callback);
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 10a696aa6e93..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-2020 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.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 0963a5f1bb1d..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,6 +1,6 @@
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
-@@ -413,8 +413,8 @@
+@@ -712,8 +712,8 @@
#ifdef WITH_PYMALLOC
@@ -10,7 +10,7 @@
/* 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)) {
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 0dfa16c8c247..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_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-+ $(LINKCC) $(PY_CORE_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("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >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 @@
+@@ -628,7 +628,7 @@
fi
libpython3.so: libpython$(LDVERSION).so
@@ -24,4 +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_CORE_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 416ab2c7b15b..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,7 +47,7 @@ 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}"
-@@ -75,8 +75,6 @@
+@@ -93,8 +77,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
EndProject
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
index e8e94f674c1f..17cc440f2204 100644
--- a/external/python3/python-3.7.6-msvc-ssl.patch.1
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -2,7 +2,7 @@ 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
-@@ -67,9 +67,6 @@
+@@ -99,9 +99,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
@@ -14,27 +14,12 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
<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
-@@ -6,7 +6,7 @@
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-- <AdditionalDependencies>ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
+@@ -6,8 +6,6 @@
</ItemDefinitionGroup>
<PropertyGroup>
-@@ -15,10 +15,10 @@
- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ <_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" />
-- <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
- </ItemGroup>
- <Target Name="_CopySSLDLL" Inputs="@(_SSLDLL)" Outputs="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
- <Copy SourceFiles="@(_SSLDLL)" DestinationFolder="$(OutDir)" />
+ <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 938acc1f1725..d44fbe055c86 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -18,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/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index fbdc8b6f5510..92bc586a3e60 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 \
external/redland/raptor/libtool.patch \
+ external/redland/raptor/raptor-libxml2-11.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/raptor-libxml2-11.patch.1 b/external/redland/raptor/raptor-libxml2-11.patch.1
new file mode 100644
index 000000000000..9bed29e50d0b
--- /dev/null
+++ b/external/redland/raptor/raptor-libxml2-11.patch.1
@@ -0,0 +1,15 @@
+--- raptor/src/raptor_libxml.c 2023-05-24 09:55:21.589275008 +0100
++++ raptor/src/raptor_libxml.c 2023-05-24 09:56:41.100324810 +0100
+@@ -246,9 +246,11 @@
+
+ ret->owner = 1;
+
+-#if LIBXML_VERSION >= 20627
++#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100
+ /* Checked field was released in 2.6.27 on 2006-10-25
+ * http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6
++ * and removed with
++ * https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55
+ *
+ */
+
diff --git a/external/xmlsec/0001-xmlSecX509DataGetNodeContent-don-t-return-0-for-non-.patch.1 b/external/xmlsec/0001-xmlSecX509DataGetNodeContent-don-t-return-0-for-non-.patch.1
new file mode 100644
index 000000000000..51607ca6ee73
--- /dev/null
+++ b/external/xmlsec/0001-xmlSecX509DataGetNodeContent-don-t-return-0-for-non-.patch.1
@@ -0,0 +1,68 @@
+From a39b110cb2c25680259a38b2f397b350151bc6e7 Mon Sep 17 00:00:00 2001
+From: Michael Stahl <michael.stahl@allotropia.de>
+Date: Wed, 7 Apr 2021 16:43:48 +0200
+Subject: [PATCH] xmlSecX509DataGetNodeContent(): don't return 0 for non-empty
+ elements
+
+LibreOffice wants to write the content of KeyInfo itself and thus writes
+X509Certificate element with content.
+
+But then xmlSecMSCngKeyDataX509XmlWrite() writes a duplicate
+X509Certificate element, which then makes a new additional consistency
+check in LO unhappy.
+
+The duplicate is written because xmlSecX509DataGetNodeContent() returns
+0 because it only checks for empty nodes; if there are only non-empty
+nodes a fallback to XMLSEC_X509DATA_DEFAULT occurs in all backends.
+
+Change the return value to be non-0 without changing the signature of
+the function, as it is apparently public.
+
+This doesn't happen in LO in the NSS backend due to another accident,
+where the private key flag isn't set when the X509Certificate is read,
+but otherwise the code is the same.
+---
+ src/x509.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/x509.c b/src/x509.c
+index ed8788ae..dac8bd2b 100644
+--- a/src/x509.c
++++ b/src/x509.c
+@@ -60,22 +60,33 @@ xmlSecX509DataGetNodeContent (xmlNodePtr node, xmlSecKeyInfoCtxPtr keyInfoCtx) {
+ if(xmlSecCheckNodeName(cur, xmlSecNodeX509Certificate, xmlSecDSigNs)) {
+ if(xmlSecIsEmptyNode(cur) == 1) {
+ content |= XMLSEC_X509DATA_CERTIFICATE_NODE;
++ } else {
++ /* ensure return value isn't 0 if there are non-empty elements */
++ content |= (XMLSEC_X509DATA_CERTIFICATE_NODE << 16);
+ }
+ } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509SubjectName, xmlSecDSigNs)) {
+ if(xmlSecIsEmptyNode(cur) == 1) {
+ content |= XMLSEC_X509DATA_SUBJECTNAME_NODE;
++ } else {
++ content |= (XMLSEC_X509DATA_SUBJECTNAME_NODE << 16);
+ }
+ } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509IssuerSerial, xmlSecDSigNs)) {
+ if(xmlSecIsEmptyNode(cur) == 1) {
+ content |= XMLSEC_X509DATA_ISSUERSERIAL_NODE;
++ } else {
++ content |= (XMLSEC_X509DATA_ISSUERSERIAL_NODE << 16);
+ }
+ } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509SKI, xmlSecDSigNs)) {
+ if(xmlSecIsEmptyNode(cur) == 1) {
+ content |= XMLSEC_X509DATA_SKI_NODE;
++ } else {
++ content |= (XMLSEC_X509DATA_SKI_NODE << 16);
+ }
+ } else if(xmlSecCheckNodeName(cur, xmlSecNodeX509CRL, xmlSecDSigNs)) {
+ if(xmlSecIsEmptyNode(cur) == 1) {
+ content |= XMLSEC_X509DATA_CRL_NODE;
++ } else {
++ content |= (XMLSEC_X509DATA_CRL_NODE << 16);
+ }
+ } else {
+ /* todo: fail on unknown child node? */
+--
+2.30.2
+
diff --git a/external/xmlsec/UnpackedTarball_xmlsec.mk b/external/xmlsec/UnpackedTarball_xmlsec.mk
index e4d092bef019..76293fe31e42 100644
--- a/external/xmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/xmlsec/UnpackedTarball_xmlsec.mk
@@ -8,6 +8,7 @@
#
xmlsec_patches :=
+xmlsec_patches += 0001-xmlSecX509DataGetNodeContent-don-t-return-0-for-non-.patch.1
$(eval $(call gb_UnpackedTarball_UnpackedTarball,xmlsec))
diff --git a/external/zlib/UnpackedTarball_zlib.mk b/external/zlib/UnpackedTarball_zlib.mk
index e74039d25089..dd9fc1c31445 100644
--- a/external/zlib/UnpackedTarball_zlib.mk
+++ b/external/zlib/UnpackedTarball_zlib.mk
@@ -18,8 +18,4 @@ $(eval $(call gb_UnpackedTarball_set_post_action,zlib,\
$(eval $(call gb_UnpackedTarball_set_patchlevel,zlib,0))
-$(eval $(call gb_UnpackedTarball_add_patches,zlib, \
- external/zlib/ubsan.patch \
-))
-
# vim: set noet sw=4 ts=4:
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/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/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 42980eeeaff7..d9fd966dcbd4 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -320,7 +320,7 @@ namespace XSLT
}
else
{
- xmlErrorPtr lastErr = xmlGetLastError();
+ const xmlError* lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
@@ -477,7 +477,11 @@ namespace XSLT
{ // backward compatibility for old clients using createInstance
params = args;
}
+
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
xmlSubstituteEntitiesDefault(0);
+SAL_WNODEPRECATED_DECLARATIONS_POP
+
m_parameters.clear();
for (int i = 0; i < params.getLength(); i++)
{
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index d646d5dbfc43..1de16c81e60c 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -68,7 +68,7 @@ namespace XSLT
static const sal_Int32 OUTPUT_BUFFER_SIZE;
static const sal_Int32 INPUT_BUFFER_SIZE;
- LibXSLTTransformer* m_transformer;
+ rtl::Reference<LibXSLTTransformer> m_transformer;
Sequence<sal_Int8> m_readBuf;
Sequence<sal_Int8> m_writeBuf;
diff --git a/forms/source/component/EventThread.hxx b/forms/source/component/EventThread.hxx
index eb3062080d73..bb8d01c48a0b 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/propertysetbase.hxx b/forms/source/xforms/propertysetbase.hxx
index d46901e0a39c..7111495843bf 100644
--- a/forms/source/xforms/propertysetbase.hxx
+++ b/forms/source/xforms/propertysetbase.hxx
@@ -31,6 +31,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <map>
+#include <memory>
namespace com { namespace sun { namespace star { namespace uno {
class Any;
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 17594207234f..b57280827bae 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
@@ -1193,8 +1190,12 @@ bool FormulaMissingContext::AddMissingExternal( FormulaTokenArray *pNewArr ) con
const OUString &rName = mpFunc->GetExternal();
- // initial (fast) check:
- sal_Unicode nLastChar = rName[ rName.getLength() - 1];
+ // initial (fast) checks:
+ sal_Int32 nLength = rName.getLength();
+ if (!nLength)
+ return false;
+
+ sal_Unicode nLastChar = rName[ nLength - 1];
if ( nLastChar != 't' && nLastChar != 'm' )
return false;
diff --git a/fpicker/source/office/contentenumeration.hxx b/fpicker/source/office/contentenumeration.hxx
index 920a6d8f2b08..d568f9b07f8c 100644
--- a/fpicker/source/office/contentenumeration.hxx
+++ b/fpicker/source/office/contentenumeration.hxx
@@ -20,12 +20,18 @@
#ifndef INCLUDED_SVTOOLS_SOURCE_CONTNR_CONTENTENUMERATION_HXX
#define INCLUDED_SVTOOLS_SOURCE_CONTNR_CONTENTENUMERATION_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <salhelper/thread.hxx>
#include <ucbhelper/content.hxx>
#include <rtl/ustring.hxx>
#include <tools/datetime.hxx>
+#include <memory>
+
namespace svt
{
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index 5b65eb1295cf..64dee0ee6239 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -636,16 +636,20 @@ void ViewTabListBox_Impl::DeleteEntries()
eResult = aDlg.run();
}
- if ( ( eResult == svtools::QUERYDELETE_ALL ) ||
- ( eResult == svtools::QUERYDELETE_YES ) )
+ bool bDeleted = false;
+
+ if (eResult == svtools::QUERYDELETE_ALL || eResult == svtools::QUERYDELETE_YES)
{
if ( Kill( aURL ) )
{
- delete reinterpret_cast<SvtContentEntry*>(mxTreeView->get_id(rCurEntry).toInt64());
mpParent->EntryRemoved( aURL );
+ bDeleted = true;
}
}
+ if (!bDeleted)
+ mxTreeView->unselect(rCurEntry);
+
return false;
});
diff --git a/framework/qa/cppunit/dispatchtest.cxx b/framework/qa/cppunit/dispatchtest.cxx
index 7903715e4113..68d68f63f872 100644
--- a/framework/qa/cppunit/dispatchtest.cxx
+++ b/framework/qa/cppunit/dispatchtest.cxx
@@ -184,10 +184,9 @@ CPPUNIT_TEST_FIXTURE(DispatchTest, testInterception)
xRegistration->registerDispatchProviderInterceptor(uno::Reference<frame::XDispatchProviderInterceptor>(pInterceptor.get()));
dispatchCommand(mxComponent, ".uno:Bold", {});
- CPPUNIT_ASSERT_EQUAL(1, pInterceptor->getExpected());
+ CPPUNIT_ASSERT_GREATER(0, pInterceptor->getExpected());
CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected());
dispatchCommand(mxComponent, ".uno:Italic", {});
- CPPUNIT_ASSERT_EQUAL(1, pInterceptor->getExpected());
// This was 1: MyInterceptor::queryDispatch() was called for .uno:Italic.
CPPUNIT_ASSERT_EQUAL(0, pInterceptor->getUnexpected());
}
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index c5da1bb44d15..da40936c4ad6 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -355,12 +355,17 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void)
// application or establish the backing mode now.
// And that depends from the dispatched URL ...
{
- if (bHasActiveConnections)
- bCloseFrame = true;
- else if (eOperation == E_CLOSE_FRAME)
- bTerminateApp = true;
+ if (eOperation == E_CLOSE_FRAME)
+ {
+ if (bHasActiveConnections)
+ bCloseFrame = true;
+ else
+ bTerminateApp = true;
+ }
else if( SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::EModule::STARTMODULE) )
bEstablishBackingMode = true;
+ else if (bHasActiveConnections)
+ bCloseFrame = true;
else
bTerminateApp = true;
}
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 9536485f66d5..b9d699fa3bd8 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -148,7 +148,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
sDesktopName = "Startcenter";
#if defined(_WIN32)
// We use a hardcoded product name matching the registry keys so applications can be associated with file types
- sApplicationID = "TheDocumentFoundation.LibreOffice." + sDesktopName;
+ sApplicationID = "CIB.CIBOffice." + sDesktopName;
#else
sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase() + "-" + sDesktopName.toAsciiLowerCase();
#endif
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index cce5892f0646..5240e565554c 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -72,6 +72,7 @@
#include <rtl/ustrbuf.hxx>
#include <vcl/errinf.hxx>
+#include <vcl/threadex.hxx>
#include <unotools/configmgr.hxx>
namespace framework{
@@ -619,7 +620,25 @@ css::uno::Reference< css::lang::XComponent > SAL_CALL Desktop::loadComponentFrom
css::uno::Reference< css::frame::XComponentLoader > xThis(static_cast< css::frame::XComponentLoader* >(this), css::uno::UNO_QUERY);
- return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName, nSearchFlags, lArguments);
+ utl::MediaDescriptor aDescriptor(lArguments);
+ bool bOnMainThread = aDescriptor.getUnpackedValueOrDefault("OnMainThread", false);
+
+ if (bOnMainThread)
+ {
+ // Make sure that we own the solar mutex, otherwise later
+ // vcl::SolarThreadExecutor::execute() will release the solar mutex, even if it's owned by
+ // another thread, leading to an std::abort() at the end.
+ SolarMutexGuard g;
+
+ return vcl::solarthread::syncExecute(std::bind(&LoadEnv::loadComponentFromURL, xThis,
+ m_xContext, sURL, sTargetFrameName,
+ nSearchFlags, lArguments));
+ }
+ else
+ {
+ return LoadEnv::loadComponentFromURL(xThis, m_xContext, sURL, sTargetFrameName,
+ nSearchFlags, lArguments);
+ }
}
/*-************************************************************************************************************
diff --git a/framework/uiconfig/startmodule/menubar/menubar.xml b/framework/uiconfig/startmodule/menubar/menubar.xml
index 1c4c5cf4202b..c69e9b44455a 100644
--- a/framework/uiconfig/startmodule/menubar/menubar.xml
+++ b/framework/uiconfig/startmodule/menubar/menubar.xml
@@ -63,7 +63,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
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/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index 70159a2c65fd..9cd0425c2e05 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -44,7 +44,9 @@ HelpCompiler::HelpCompiler(StreamTable &in_streamTable, const fs::path &in_input
src(in_src), zipdir(in_zipdir), module(in_module), lang(in_lang), resCompactStylesheet(in_resCompactStylesheet),
resEmbStylesheet(in_resEmbStylesheet), bExtensionMode( in_bExtensionMode )
{
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
xmlKeepBlanksDefaultValue = 0;
+SAL_WNODEPRECATED_DECLARATIONS_POP
char* os = getenv("OS");
if (os)
{
@@ -135,9 +137,15 @@ xmlDocPtr HelpCompiler::getSourceDocument(const fs::path &filePath)
if (!cur)
{
static std::string fsroot('\'' + src.toUTF8() + '\'');
-
+#if defined(_MSC_VER)
+#pragma warning(push)
+#pragma warning(disable:4996)
+#endif
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
+#if defined(_MSC_VER)
+#pragma warning(pop)
+#endif
cur = xsltParseStylesheetFile(reinterpret_cast<const xmlChar *>(resEmbStylesheet.native_file_string().c_str()));
int nbparams = 0;
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 44444902eb71..c2893390e639 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -807,7 +807,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
extern "C" {
+#if LIBXML_VERSION >= 21200
+static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
+#else
static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
+#endif
{
std::string aErrorMsg = error->message;
std::string aXMLParsingFile;
diff --git a/helpcontent2 b/helpcontent2
-Subproject 5995b61e8d08489f44e0473f8d0d21e189a0b3d
+Subproject 92adb81e1e5ed153aac049648aec0a0a87a8768
diff --git a/hwpfilter/source/drawing.h b/hwpfilter/source/drawing.h
index 60bd74f80f80..8d046b0e4a2d 100644
--- a/hwpfilter/source/drawing.h
+++ b/hwpfilter/source/drawing.h
@@ -316,7 +316,7 @@ static bool LoadCommonHeader(HWPDrawingObject * hdo, unsigned short * link_info)
return hmem->skipBlock(size - common_size ) != 0;
}
-static std::unique_ptr<HWPDrawingObject> LoadDrawingObject(void)
+static std::unique_ptr<HWPDrawingObject> LoadDrawingObject(HWPFile& hwpf)
{
HWPDrawingObject *prev = nullptr;
std::unique_ptr<HWPDrawingObject> hdo, head;
@@ -355,7 +355,7 @@ static std::unique_ptr<HWPDrawingObject> LoadDrawingObject(void)
}
if (link_info & HDOFILE_HAS_CHILD)
{
- hdo->child = LoadDrawingObject();
+ hdo->child = LoadDrawingObject(hwpf);
if (hdo->child == nullptr)
{
goto error;
@@ -384,6 +384,11 @@ error:
{
hdo->type = HWPDO_RECT;
}
+ if (hdo->property.pPara)
+ {
+ hwpf.move_to_failed(std::unique_ptr<HWPPara>(hdo->property.pPara));
+ hdo->property.pPara = nullptr;
+ }
HWPDOFunc(hdo.get(), OBJFUNC_FREE, nullptr, 0);
hdo.reset();
@@ -397,7 +402,7 @@ error:
}
-static bool LoadDrawingObjectBlock(Picture * pic)
+static bool LoadDrawingObjectBlock(Picture * pic, HWPFile& hwpf)
{
int size;
if (!hmem->read4b(size))
@@ -423,7 +428,7 @@ static bool LoadDrawingObjectBlock(Picture * pic)
!hmem->skipBlock(size - HDOFILE_HEADER_SIZE))
return false;
- pic->picinfo.picdraw.hdo = LoadDrawingObject().release();
+ pic->picinfo.picdraw.hdo = LoadDrawingObject(hwpf).release();
if (pic->picinfo.picdraw.hdo == nullptr)
return false;
return true;
diff --git a/hwpfilter/source/hcode.cxx b/hwpfilter/source/hcode.cxx
index fda36e0953ca..28bc97212fba 100644
--- a/hwpfilter/source/hcode.cxx
+++ b/hwpfilter/source/hcode.cxx
@@ -1217,6 +1217,8 @@ hchar_string kstr2hstr(uchar const* src)
{
ret.push_back(src[i] << 8 | src[i+1]);
i++;
+ if (src[i] == '\0')
+ break;
}
}
return ret;
diff --git a/hwpfilter/source/htags.cxx b/hwpfilter/source/htags.cxx
index 0c011731c1d4..359c15ae78bc 100644
--- a/hwpfilter/source/htags.cxx
+++ b/hwpfilter/source/htags.cxx
@@ -19,6 +19,9 @@
#include "precompile.h"
+#include <o3tl/char16_t2wchar_t.hxx>
+#include <unotools/tempfile.hxx>
+
#include <string.h>
#include "hwplib.h"
@@ -108,27 +111,20 @@ void OlePicture::Read(HWPFile & hwpf)
delete [] data;
return;
}
- FILE *fp;
- char tname[200];
- wchar_t wtname[200];
- tmpnam(tname);
- if (nullptr == (fp = fopen(tname, "wb")))
- {
- delete [] data;
- return;
- }
- fwrite(data, size, 1, fp);
+
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+
+ SvFileStream aOutputStream(aTempFile.GetURL(), StreamMode::WRITE);
+ aOutputStream.WriteBytes(data, size);
delete [] data;
- fclose(fp);
- MultiByteToWideChar(CP_ACP, 0, tname, -1, wtname, 200);
- if( StgOpenStorage(wtname, nullptr,
+ aOutputStream.Close();
+ if( StgOpenStorage(o3tl::toW(aTempFile.GetFileName().getStr()), nullptr,
STGM_READWRITE|STGM_SHARE_EXCLUSIVE|STGM_TRANSACTED,
nullptr, 0, &pis) != S_OK ) {
pis = nullptr;
- unlink(tname);
return;
}
- unlink(tname);
#else
hwpf.SkipBlock(size);
#endif
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index a97c39cc8eb6..a1303a8ee256 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -241,6 +241,7 @@ void HWPFile::ReadParaList(std::vector < HWPPara* > &aplist)
aplist.push_back(spNode.release());
spNode.reset( new HWPPara );
}
+ move_to_failed(std::move(spNode));
}
void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsigned char flag)
@@ -274,6 +275,12 @@ void HWPFile::ReadParaList(std::vector< std::unique_ptr<HWPPara> > &aplist, unsi
aplist.push_back(std::move(spNode));
spNode.reset( new HWPPara );
}
+ move_to_failed(std::move(spNode));
+}
+
+void HWPFile::move_to_failed(std::unique_ptr<HWPPara> xPara)
+{
+ pfailedlist.push_back(std::move(xPara));
}
void HWPFile::TagsRead()
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index 768086193523..e20d6b9c48ca 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -257,6 +257,8 @@ class DLLEXPORT HWPFile
}
void pop_hpara_type() { element_import_stack.pop_back(); }
+ void move_to_failed(std::unique_ptr<HWPPara> rPara);
+
private:
int compareCharShape(CharShape const *shape);
int compareParaShape(ParaShape const *shape);
@@ -284,6 +286,10 @@ class DLLEXPORT HWPFile
std::vector<std::unique_ptr<ColumnInfo>> columnlist;
// paragraph list
std::vector<std::unique_ptr<HWPPara>> plist;
+ // keep paragraph's that failed to load until
+ // import is complete to avoid dangling references
+ // elsewhere
+ std::vector<std::unique_ptr<HWPPara>> pfailedlist;
// floating box list
std::vector<FBox*> blist;
// embedded picture list(tag data)
diff --git a/hwpfilter/source/hwpread.cxx b/hwpfilter/source/hwpread.cxx
index 12f29a38925e..f450a98a6e87 100644
--- a/hwpfilter/source/hwpread.cxx
+++ b/hwpfilter/source/hwpread.cxx
@@ -234,7 +234,6 @@ bool TxtBox::Read(HWPFile & hwpf)
hwpf.Read2b(&option, 1);
hwpf.Read2b(&ctrl_ch, 1);
hwpf.Read2b(style.margin, 12);
- hwpf.AddFBoxStyle(&style);
hwpf.Read2b(&box_xs, 1);
hwpf.Read2b(&box_ys, 1);
hwpf.Read2b(&cap_xs, 1);
@@ -362,7 +361,10 @@ bool TxtBox::Read(HWPFile & hwpf)
else
m_pTable = nullptr;
- return !hwpf.State();
+ bSuccess = !hwpf.State();
+ if (bSuccess)
+ hwpf.AddFBoxStyle(&style);
+ return bSuccess;
}
namespace
@@ -451,6 +453,7 @@ bool Picture::Read(HWPFile & hwpf)
scale[1] = tmp16;
hwpf.ReadBlock(picinfo.picun.path, 256); /* Picture File Name: when type is not a Drawing. */
+ picinfo.picun.path[255] = 0; // ensure null terminated
hwpf.ReadBlock(reserved3, 9); /* Brightness / Contrast / Picture Effect, etc. */
UpdateBBox(this);
@@ -490,7 +493,7 @@ bool Picture::Read(HWPFile & hwpf)
if (pictype == PICTYPE_DRAW)
{
auto xGuard(std::make_unique<ChangeMemGuard>(follow.data(), follow_block_size));
- LoadDrawingObjectBlock(this);
+ LoadDrawingObjectBlock(this, hwpf);
style.cell = picinfo.picdraw.hdo;
xGuard.reset();
}
@@ -509,12 +512,14 @@ bool Picture::Read(HWPFile & hwpf)
style.boxtype = 'G';
else
style.boxtype = 'D';
- hwpf.AddFBoxStyle(&style);
// caption
hwpf.ReadParaList(caption);
- return !hwpf.State();
+ bool bSuccess = !hwpf.State();
+ if (bSuccess)
+ hwpf.AddFBoxStyle(&style);
+ return bSuccess;
}
// line(15)
@@ -552,7 +557,6 @@ bool Line::Read(HWPFile & hwpf)
hwpf.Read2b(&option, 1);
hwpf.Read2b(&ctrl_ch, 1);
hwpf.Read2b(style.margin, 12);
- hwpf.AddFBoxStyle(&style);
hwpf.Read2b(&box_xs, 1);
hwpf.Read2b(&box_ys, 1);
hwpf.Read2b(&cap_xs, 1);
@@ -581,7 +585,10 @@ bool Line::Read(HWPFile & hwpf)
hwpf.Read2b(&color, 1);
style.xpos = width;
- return !hwpf.State();
+ bool bSuccess = !hwpf.State();
+ if (bSuccess)
+ hwpf.AddFBoxStyle(&style);
+ return bSuccess;
}
// hidden(15)
diff --git a/hwpfilter/source/hwpreader.cxx b/hwpfilter/source/hwpreader.cxx
index 4144d20e0bde..12eb4960f97f 100644
--- a/hwpfilter/source/hwpreader.cxx
+++ b/hwpfilter/source/hwpreader.cxx
@@ -24,6 +24,7 @@
#include <math.h>
#include <osl/diagnose.h>
+#include <o3tl/safeint.hxx>
#include <tools/stream.hxx>
#include "fontmap.hxx"
@@ -70,7 +71,6 @@
rendEl("text:span"); \
tstart = false
-static hchar *field = nullptr;
static char buf[1024];
namespace
@@ -96,12 +96,13 @@ struct HwpReaderPrivate
bInHeader = false;
nPnPos = 0;
pPn = nullptr;
-
+ pField = nullptr;
}
bool bFirstPara;
bool bInBody;
bool bInHeader;
ShowPageNum *pPn;
+ hchar *pField;
int nPnPos;
};
@@ -460,7 +461,9 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
if( hdo->type == HWPDO_LINE || hdo->type == HWPDO_ARC || hdo->type == HWPDO_FREEFORM ||
hdo->type == HWPDO_ADVANCED_ARC )
{
- if( prop->line_tstyle && !ArrowShape[prop->line_tstyle].bMade )
+ if( prop->line_tstyle > 0 &&
+ o3tl::make_unsigned(prop->line_tstyle) < std::size(ArrowShape) &&
+ !ArrowShape[prop->line_tstyle].bMade )
{
ArrowShape[prop->line_tstyle].bMade = true;
padd("draw:name", sXML_CDATA,
@@ -484,7 +487,9 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
mxList->clear();
rendEl("draw:marker");
}
- if( prop->line_hstyle && !ArrowShape[prop->line_hstyle].bMade)
+ if (prop->line_hstyle > 0 &&
+ o3tl::make_unsigned(prop->line_hstyle) < std::size(ArrowShape) &&
+ !ArrowShape[prop->line_hstyle].bMade)
{
ArrowShape[prop->line_hstyle].bMade = true;
padd("draw:name", sXML_CDATA,
@@ -515,62 +520,28 @@ void HwpReader::makeDrawMiscStyle( HWPDrawingObject *hdo )
if( prop->flag >> 18 & 0x01 )
{
padd( "draw:name", sXML_CDATA, ascii(Int2Str(hdo->index, "fillimage%d", buf)));
- if( !prop->pictype )
+
+ EmPicture *emp = nullptr;
+ if (prop->pictype && strlen(prop->szPatternFile) > 3)
+ emp = hwpfile.GetEmPictureByName(prop->szPatternFile);
+ if (!emp)
{
padd( "xlink:href", sXML_CDATA,
reinterpret_cast<sal_Unicode const *>(hconv(kstr2hstr( reinterpret_cast<uchar const *>(urltounix(prop->szPatternFile).c_str())).c_str())));
+ padd( "xlink:type", sXML_CDATA, "simple");
+ padd( "xlink:show", sXML_CDATA, "embed");
+ padd( "xlink:actuate", sXML_CDATA, "onLoad");
}
- else
- {
- EmPicture *emp = nullptr;
- if ( strlen( prop->szPatternFile ) > 3)
- emp = hwpfile.GetEmPictureByName(prop->szPatternFile);
- if( emp )
- {
- char filename[128+17+9];
- char dirname[128];
- int fd;
-#ifdef _WIN32
- GetTempPathA(sizeof(dirname), dirname);
- sprintf(filename, "%s%s",dirname, emp->name);
- if( (fd = open( filename , _O_CREAT | _O_WRONLY | _O_BINARY , 0666)) >= 0 )
-#else
- strcpy(dirname, "/tmp/");
- sprintf(filename, "%s%s", dirname, emp->name);
- if( (fd = open( filename , O_CREAT | O_WRONLY , 0666)) >= 0 )
-#endif
- {
- size_t nWritten = write(fd, emp->data.get(), emp->size);
- OSL_VERIFY(nWritten == emp->size);
- close(fd);
- }
-#ifdef _WIN32
- int j;
- for(j = 0 ; j < static_cast<int>(strlen( dirname )) ; j++)
- {
- if( dirname[j] == '\\' ) buf[j] = '/';
- else buf[j] = dirname[j];
- }
- buf[j] = '\0';
- sprintf(filename, "file:///%s%s",buf, emp->name );
-#else
- sprintf(filename, "file://%s%s",dirname, emp->name );
-#endif
- padd( "xlink:href", sXML_CDATA, ascii(filename));
- }
- else
- {
- padd( "xlink:href", sXML_CDATA,
- reinterpret_cast<sal_Unicode const *>(hconv(kstr2hstr( reinterpret_cast<uchar const *>(urltounix(prop->szPatternFile).c_str())).c_str())));
- }
-
- }
- padd( "xlink:type", sXML_CDATA, "simple");
- padd( "xlink:show", sXML_CDATA, "embed");
- padd( "xlink:actuate", sXML_CDATA, "onLoad");
rstartEl( "draw:fill-image", mxList.get());
mxList->clear();
+ if (emp)
+ {
+ rstartEl("office:binary-data", mxList.get());
+ std::shared_ptr<char> pStr(base64_encode_string(emp->data.get(), emp->size), Free<char>());
+ rchars(ascii(pStr.get()));
+ rendEl("office:binary-data");
+ }
rendEl( "draw:fill-image");
}
/* If there is a gradient, when a bitmap file is present, this is the first. */
@@ -2075,7 +2046,8 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle)
hdo->type == HWPDO_FREEFORM || hdo->type == HWPDO_ADVANCED_ARC )
{
- if( hdo->property.line_tstyle > 0 )
+ if( hdo->property.line_tstyle > 0 &&
+ o3tl::make_unsigned(hdo->property.line_tstyle) < std::size(ArrowShape) )
{
padd("draw:marker-start", sXML_CDATA,
ascii(ArrowShape[hdo->property.line_tstyle].name) );
@@ -2096,7 +2068,8 @@ void HwpReader::makeDrawStyle( HWPDrawingObject * hdo, FBoxStyle * fstyle)
Double2Str( WTMM(hdo->property.line_width * 7)) + "mm");
}
- if( hdo->property.line_hstyle > 0 )
+ if( hdo->property.line_hstyle > 0 &&
+ o3tl::make_unsigned(hdo->property.line_hstyle) < std::size(ArrowShape) )
{
padd("draw:marker-end", sXML_CDATA,
ascii(ArrowShape[hdo->property.line_hstyle].name) );
@@ -2959,7 +2932,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
firstspace = 1;
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
{
- field = hbox->str3.get();
+ d->pField = hbox->str3.get();
}
else{
makeFieldCode(str, hbox);
@@ -2972,7 +2945,7 @@ void HwpReader::make_text_p3(HWPPara * para,bool bParaStart)
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
{
makeFieldCode(str, hbox);
- field = nullptr;
+ d->pField = nullptr;
}
infield = false;
str.clear();
@@ -3140,8 +3113,8 @@ void HwpReader::makeFieldCode(hchar_string const & rStr, FieldCode const *hbox)
if( hbox->type[0] == 4 && hbox->type[1] == 0 )
{
padd("text:placeholder-type", sXML_CDATA, "text");
- if( field )
- padd("text:description", sXML_CDATA, reinterpret_cast<sal_Unicode const *>(hconv(field)));
+ if (d->pField)
+ padd("text:description", sXML_CDATA, reinterpret_cast<sal_Unicode const *>(hconv(d->pField)));
rstartEl( "text:placeholder", mxList.get());
mxList->clear();
rchars( reinterpret_cast<sal_Unicode const *>(rStr.c_str()) );
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index f3dc6ede1f66..1dacd8868265 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -347,7 +347,7 @@ Calendar_gregorian::setLocalDateTime( double fTimeInDays )
"Calendar_gregorian::setLocalDateTime: " << std::fixed << fM << " rounded to " << fR);
int32_t nZoneOffset, nDSTOffset;
UErrorCode status = U_ZERO_ERROR;
- body->getTimeZone().getOffset( fR, TRUE, nZoneOffset, nDSTOffset, status );
+ body->getTimeZone().getOffset( fR, true, nZoneOffset, nDSTOffset, status );
if ( !U_SUCCESS(status) ) throw ERROR;
status = U_ZERO_ERROR;
body->setTime( fR - (nZoneOffset + nDSTOffset), status );
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index 05ac79ce624c..4287cd2e57fc 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -827,8 +827,16 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32
{
if (current == cGroupSep)
{
- if (getFlags(nextChar) & ParserFlags::VALUE_DIGIT)
+ // accept only if it is followed by 3 digits
+ sal_Int32 tempIndex(index);
+ sal_uInt32 const nextChar2((tempIndex < rText.getLength()) ? rText.iterateCodePoints(&tempIndex) : 0);
+ sal_uInt32 const nextChar3((tempIndex < rText.getLength()) ? rText.iterateCodePoints(&tempIndex) : 0);
+ if (getFlags(nextChar) & ParserFlags::VALUE_DIGIT
+ && getFlags(nextChar2) & ParserFlags::VALUE_DIGIT
+ && getFlags(nextChar3) & ParserFlags::VALUE_DIGIT)
+ {
nParseTokensType |= KParseTokens::GROUP_SEPARATOR_IN_NUMBER;
+ }
else
{
// Trailing group separator character is not a
diff --git a/icon-themes/breeze/sfx2/res/logo.png b/icon-themes/breeze/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100755
--- a/icon-themes/breeze/sfx2/res/logo.png
+++ b/icon-themes/breeze/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/cib/sfx2/res/logo.png b/icon-themes/cib/sfx2/res/logo.png
index ace737a89fd9..4ae4a19b1ccb 100644
--- a/icon-themes/cib/sfx2/res/logo.png
+++ b/icon-themes/cib/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/colibre/sfx2/res/logo.png b/icon-themes/colibre/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100644
--- a/icon-themes/colibre/sfx2/res/logo.png
+++ b/icon-themes/colibre/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/elementary/sfx2/res/logo.png b/icon-themes/elementary/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100755
--- a/icon-themes/elementary/sfx2/res/logo.png
+++ b/icon-themes/elementary/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/karasa_jaga/sfx2/res/logo.png b/icon-themes/karasa_jaga/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100644
--- a/icon-themes/karasa_jaga/sfx2/res/logo.png
+++ b/icon-themes/karasa_jaga/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/sifr/sfx2/res/logo.png b/icon-themes/sifr/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100755
--- a/icon-themes/sifr/sfx2/res/logo.png
+++ b/icon-themes/sifr/sfx2/res/logo.png
Binary files differ
diff --git a/icon-themes/tango/sfx2/res/logo.png b/icon-themes/tango/sfx2/res/logo.png
index ace737a89fd9..e2cd4aaa3aea 100644
--- a/icon-themes/tango/sfx2/res/logo.png
+++ b/icon-themes/tango/sfx2/res/logo.png
Binary files differ
diff --git a/include/comphelper/hash.hxx b/include/comphelper/hash.hxx
index 52ad5e5cdf1e..ae16d5ddd57f 100644
--- a/include/comphelper/hash.hxx
+++ b/include/comphelper/hash.hxx
@@ -26,6 +26,7 @@ enum class HashType
MD5,
SHA1,
SHA256,
+ SHA384,
SHA512
};
diff --git a/include/default.rc b/include/default.rc
index 5474d55c4c0a..40bcb28d2b57 100644
--- a/include/default.rc
+++ b/include/default.rc
@@ -45,7 +45,7 @@ VS_VERSION_INFO VERSIONINFO
{
// International StringTable
VALUE "CompanyName", PPS(RES_APP_VENDOR) "\0"
- VALUE "ProductName", "LibreOffice\0"
+ VALUE "ProductName", "CIB Office\0"
VALUE "ProductVersion", PPS(VER_LEVEL) "\0"
VALUE "FileVersion", PPS(VER_LEVEL) "\0"
VALUE "OriginalFilename", PPS(ORG_NAME) "\0"
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 1f77ce661020..5b19976453f5 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -34,6 +34,7 @@
#include <i18nlangtag/lang.h>
#include <tools/lineend.hxx>
+#include <tools/fontenum.hxx>
#include <editeng/eedata.hxx>
#include <o3tl/typed_flags_set.hxx>
@@ -501,7 +502,7 @@ public:
virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
virtual bool SpellNextDocument();
virtual void FieldClicked( const SvxFieldItem& rField );
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor );
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle );
// override this if access to bullet information needs to be provided
virtual const SvxNumberFormat * GetNumberFormat( sal_Int32 nPara ) const;
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index acb484943bf7..0a00c079fc38 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -485,6 +485,7 @@ private:
boost::optional<Color> mxTxtColor;
boost::optional<Color> mxFldColor;
+ boost::optional<FontLineStyle> mxFldLineStyle;
OUString aRepresentation;
@@ -514,6 +515,9 @@ public:
boost::optional<Color> const & GetFieldColor() const { return mxFldColor; }
void SetFieldColor( boost::optional<Color> xCol ) { mxFldColor = xCol; }
+ boost::optional<FontLineStyle> const& GetFontLineStyle() const { return mxFldLineStyle; }
+ void SetFontLineStyle( boost::optional<FontLineStyle> xLineStyle ) { mxFldLineStyle = xLineStyle; }
+
sal_Int32 GetPara() const { return nPara; }
sal_Int32 GetPos() const { return nPos; }
@@ -878,7 +882,7 @@ public:
bool UpdateFields();
void RemoveFields( const std::function<bool ( const SvxFieldData* )>& isFieldData = [] (const SvxFieldData* ){return true;} );
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor );
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle );
void SetSpeller( css::uno::Reference< css::linguistic2::XSpellChecker1 > const &xSpeller );
css::uno::Reference< css::linguistic2::XSpellChecker1 > const &
diff --git a/include/editeng/unoedprx.hxx b/include/editeng/unoedprx.hxx
index 132cbbf96c66..03a26f66a583 100644
--- a/include/editeng/unoedprx.hxx
+++ b/include/editeng/unoedprx.hxx
@@ -22,6 +22,7 @@
#include <memory>
#include <svl/SfxBroadcaster.hxx>
+#include <tools/fontenum.hxx>
#include <editeng/unoedsrc.hxx>
#include <editeng/editdata.hxx>
@@ -54,7 +55,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unoedsrc.hxx b/include/editeng/unoedsrc.hxx
index e9f3ee0dd093..3c038189a728 100644
--- a/include/editeng/unoedsrc.hxx
+++ b/include/editeng/unoedsrc.hxx
@@ -23,6 +23,7 @@
#include <i18nlangtag/lang.h>
#include <rtl/ustring.hxx>
#include <tools/gen.hxx>
+#include <tools/fontenum.hxx>
#include <vcl/mapmod.hxx>
#include <svl/poolitem.hxx>
#include <editeng/editengdllapi.h>
@@ -159,7 +160,7 @@ public:
virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) = 0;
virtual void QuickInsertLineBreak( const ESelection& rSel ) = 0;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) = 0;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) = 0;
virtual void FieldClicked( const SvxFieldItem& rField ) = 0;
virtual SfxItemPool* GetPool() const = 0;
diff --git a/include/editeng/unofored.hxx b/include/editeng/unofored.hxx
index 8222a3043bdb..72d0d65c6548 100644
--- a/include/editeng/unofored.hxx
+++ b/include/editeng/unofored.hxx
@@ -54,7 +54,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unoforou.hxx b/include/editeng/unoforou.hxx
index f2d28a53e405..cb52c97f5e25 100644
--- a/include/editeng/unoforou.hxx
+++ b/include/editeng/unoforou.hxx
@@ -72,7 +72,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/editeng/unotext.hxx b/include/editeng/unotext.hxx
index aaf9cd18328f..39c6f4863ecb 100644
--- a/include/editeng/unotext.hxx
+++ b/include/editeng/unotext.hxx
@@ -189,7 +189,7 @@ public:
virtual void QuickSetAttribs( const SfxItemSet& rSet, const ESelection& rSel ) override;
virtual void QuickInsertLineBreak( const ESelection& rSel ) override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) override;
virtual void FieldClicked( const SvxFieldItem& rField ) override;
virtual bool IsValid() const override;
diff --git a/include/filter/msfilter/mscodec.hxx b/include/filter/msfilter/mscodec.hxx
index 47067a38fe5e..9f0a858fb227 100644
--- a/include/filter/msfilter/mscodec.hxx
+++ b/include/filter/msfilter/mscodec.hxx
@@ -444,6 +444,7 @@ const sal_uInt32 SALT_LENGTH = 16;
const sal_uInt32 ENCRYPTED_VERIFIER_LENGTH = 16;
const sal_uInt32 SHA1_HASH_LENGTH = RTL_DIGEST_LENGTH_SHA1; // 20
const sal_uInt32 SHA256_HASH_LENGTH = 32;
+const sal_uInt32 SHA384_HASH_LENGTH = 48;
const sal_uInt32 SHA512_HASH_LENGTH = 64;
struct MSFILTER_DLLPUBLIC EncryptionStandardHeader
diff --git a/include/jvmfwk/framework.hxx b/include/jvmfwk/framework.hxx
index 3c7fe2981436..1726f8e47921 100644
--- a/include/jvmfwk/framework.hxx
+++ b/include/jvmfwk/framework.hxx
@@ -387,6 +387,17 @@ JVMFWK_DLLPUBLIC javaFrameworkError jfw_findAndSelectJRE(std::unique_ptr<JavaInf
JVMFWK_DLLPUBLIC javaFrameworkError jfw_findAllJREs(
std::vector<std::unique_ptr<JavaInfo>> *parInfo);
+/**
+ * Convert colon-separated userClassPath which might contain bootstrap variables
+ * (which also might contain colons) to a list of classPaths, keeping bootstrap variables intact.
+ *
+ * FIXME: Nested or multiple occurrences of ${...:...:...} are currently not supported.
+ *
+ * @param sUserPath colon-separated string of user classpaths
+ * @return list of user classpaths
+ */
+JVMFWK_DLLPUBLIC std::vector<OUString> jfw_convertUserPathList(OUString const& sUserPath);
+
/** determines if a path points to a Java installation.
<p>If the path belongs to a JRE installation then it returns the
diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx
index e822fde0294c..fac5f6b739ed 100644
--- a/include/o3tl/lru_map.hxx
+++ b/include/o3tl/lru_map.hxx
@@ -11,9 +11,11 @@
#ifndef INCLUDED_O3TL_LRU_MAP_HXX
#define INCLUDED_O3TL_LRU_MAP_HXX
+#include <algorithm>
#include <cassert>
#include <list>
#include <unordered_map>
+#include <cstddef>
namespace o3tl
{
diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx
index ae28ca4b6570..6d8d1304fdf3 100644
--- a/include/o3tl/safeint.hxx
+++ b/include/o3tl/safeint.hxx
@@ -12,6 +12,7 @@
#include <sal/config.h>
+#include <cassert>
#include <limits>
#include <type_traits>
@@ -226,6 +227,13 @@ template<typename T> inline typename std::enable_if<std::is_unsigned<T>::value,
#endif
+template<typename T> constexpr std::enable_if_t<std::is_signed_v<T>, std::make_unsigned_t<T>>
+make_unsigned(T value)
+{
+ assert(value >= 0);
+ return value;
+}
+
}
#endif
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
new file mode 100644
index 000000000000..9230909b7edf
--- /dev/null
+++ b/include/o3tl/string_view.hxx
@@ -0,0 +1,867 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_O3TL_STRING_VIEW_HXX
+#define INCLUDED_O3TL_STRING_VIEW_HXX
+
+#include <sal/config.h>
+
+#include <algorithm>
+#include <cstddef>
+#include <ios>
+#include <iterator>
+#include <ostream>
+#include <stdexcept>
+#include <string>
+#include <type_traits>
+#include <utility>
+
+#include <config_global.h>
+#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+
+// An approximation of C++17 <string_view>, including implicit conversion
+// from rtl::OString and rtl::OUString.
+
+namespace o3tl {
+
+namespace detail {
+
+template<typename T> struct CharPtrDetector {
+ static constexpr bool ok = false;
+};
+
+template<> struct CharPtrDetector<char *> {
+ static constexpr bool ok = true;
+};
+
+template<> struct CharPtrDetector<char const *> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct NonConstCharArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct NonConstCharArrayDetector<char [N]> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct ConstCharArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct ConstCharArrayDetector<char const[N]> {
+ static constexpr bool ok = true;
+ static constexpr std::size_t length = N - 1;
+};
+
+template<typename T> struct Char16PtrDetector {
+ static constexpr bool ok = false;
+};
+
+template<> struct Char16PtrDetector<char16_t *> {
+ static constexpr bool ok = true;
+};
+
+template<> struct Char16PtrDetector<char16_t const *> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct NonConstChar16ArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct NonConstChar16ArrayDetector<char16_t [N]> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct ConstChar16ArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct ConstChar16ArrayDetector<char16_t const[N]> {
+ static constexpr bool ok = true;
+ static constexpr std::size_t length = N - 1;
+};
+
+template<typename T> struct Char32PtrDetector {
+ static constexpr bool ok = false;
+};
+
+template<> struct Char32PtrDetector<char32_t *> {
+ static constexpr bool ok = true;
+};
+
+template<> struct Char32PtrDetector<char32_t const *> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct NonConstChar32ArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct NonConstChar32ArrayDetector<char32_t [N]> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct ConstChar32ArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct ConstChar32ArrayDetector<char32_t const[N]> {
+ static constexpr bool ok = true;
+ static constexpr std::size_t length = N - 1;
+};
+
+template<typename T> struct WcharPtrDetector {
+ static constexpr bool ok = false;
+};
+
+template<> struct WcharPtrDetector<wchar_t *> {
+ static constexpr bool ok = true;
+};
+
+template<> struct WcharPtrDetector<wchar_t const *> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct NonConstWcharArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct NonConstWcharArrayDetector<wchar_t [N]> {
+ static constexpr bool ok = true;
+};
+
+template<typename T> struct ConstWcharArrayDetector {
+ static constexpr bool ok = false;
+};
+
+template<std::size_t N> struct ConstWcharArrayDetector<wchar_t const[N]> {
+ static constexpr bool ok = true;
+ static constexpr std::size_t length = N - 1;
+};
+
+}
+
+#if defined _MSC_VER
+#pragma warning(push, 1)
+#pragma warning(disable: 4814) // in C++14 'constexpr' will not imply 'const'
+#endif
+
+template<typename charT, typename traits = std::char_traits<charT>>
+class basic_string_view {
+public:
+ using traits_type = traits;
+ using value_type = charT;
+ using pointer = value_type *;
+ using const_pointer = value_type const *;
+ using reference = value_type &;
+ using const_reference = value_type const &;
+ using const_iterator = const_pointer;
+ using iterator = const_iterator;
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
+ using reverse_iterator = const_reverse_iterator;
+ using size_type = std::size_t;
+ using difference_type = std::ptrdiff_t;
+
+ static constexpr size_type npos = size_type(-1);
+
+ constexpr basic_string_view() noexcept: data_(nullptr), size_(0) {}
+
+ constexpr basic_string_view(basic_string_view const &) noexcept = default;
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ basic_string_view & operator =(basic_string_view const & other) noexcept
+#if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__
+ {
+ data_ = other.data_;
+ size_ = other.size_;
+ return *this;
+ }
+#else
+ = default;
+#endif
+
+ // The various character types are handled below in the "LO specifics, to
+ // make up for traits::length not necessarily being constexpr yet for
+ // literal arguments" section:
+ template<typename T = charT> constexpr basic_string_view(
+ charT const * str,
+ typename std::enable_if<
+ !(std::is_same<T, char>::value || std::is_same<T, char16_t>::value
+ || std::is_same<T, char32_t>::value
+ || std::is_same<T, wchar_t>::value),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(str), size_(traits::length(str)) {}
+
+ constexpr basic_string_view(charT const * str, size_type len):
+ data_(str), size_(len) {}
+
+ constexpr const_iterator begin() const noexcept { return data_; }
+
+ constexpr const_iterator end() const noexcept { return begin() + size(); }
+
+ constexpr const_iterator cbegin() const noexcept { return begin(); }
+
+ constexpr const_iterator cend() const noexcept { return end(); }
+
+ constexpr const_reverse_iterator rbegin() const noexcept
+ { return const_reverse_iterator(end()); }
+
+ constexpr const_reverse_iterator rend() const noexcept
+ { return const_reverse_iterator(begin()); }
+
+ constexpr const_reverse_iterator crbegin() const noexcept
+ { return rbegin(); }
+
+ constexpr const_reverse_iterator crend() const noexcept { return rend(); }
+
+ constexpr size_type size() const noexcept { return size_; }
+
+ constexpr size_type length() const noexcept { return size(); }
+
+#if !defined __clang__ || HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type max_size() const noexcept {
+#if defined __clang__ // avoid constexpr issues with other, older compilers
+ (void) this; // loplugin:staticmethods
+#endif
+ return npos - 1;
+ }
+
+ constexpr bool empty() const noexcept { return size_ == 0; }
+
+ constexpr const_reference operator [](size_type pos) const {
+#if HAVE_CXX14_CONSTEXPR
+ assert(pos < size());
+#endif
+ return data_[pos];
+ }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ const_reference at(size_type pos) const {
+ if (pos >= size()) {
+ throw std::out_of_range("o3tl::basic_string_view::at");
+ }
+ return operator [](pos);
+ }
+
+ constexpr const_reference front() const {
+#if HAVE_CXX14_CONSTEXPR
+ assert(!empty());
+#endif
+ return operator [](0);
+ }
+
+ constexpr const_reference back() const {
+#if HAVE_CXX14_CONSTEXPR
+ assert(!empty());
+#endif
+ return operator [](size() - 1);
+ }
+
+ constexpr const_pointer data() const noexcept { return data_; }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ void remove_prefix(size_type n) {
+ assert(n <= size());
+ data_ += n;
+ size_ -= n;
+ }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ void remove_suffix(size_type n) {
+ assert(n <= size());
+ size_ -= n;
+ }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ void swap(basic_string_view & s) noexcept {
+ std::swap(data_, s.data_);
+ std::swap(size_, s.size_);
+ }
+
+ size_type copy(charT * s, size_type n, size_type pos = 0) const {
+ if (pos > size()) {
+ throw std::out_of_range("o3tl::basic_string_view::copy");
+ }
+ auto rlen = std::min(n, size_type(size() - pos));
+ traits::copy(s, data() + pos, rlen);
+ return rlen;
+ }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ basic_string_view substr(size_type pos = 0, size_type n = npos) const {
+ if (pos > size()) {
+ throw std::out_of_range("o3tl::basic_string_view::copy");
+ }
+ return basic_string_view(
+ data() + pos, std::min(n, size_type(size() - pos)));
+ }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ int compare(basic_string_view s) const noexcept {
+ auto n = traits::compare(data(), s.data(), std::min(size(), s.size()));
+ return n == 0
+ ? (size() < s.size() ? -1 : size() == s.size() ? 0 : 1) : n;
+ }
+
+ constexpr int compare(size_type pos1, size_type n1, basic_string_view s)
+ const
+ { return substr(pos1, n1).compare(s); }
+
+ constexpr int compare(
+ size_type pos1, size_type n1, basic_string_view s, size_type pos2,
+ size_type n2) const
+ { return substr(pos1, n1).compare(s.substr(pos2, n2)); }
+
+ constexpr int compare(charT const * s) const
+ { return compare(basic_string_view(s)); }
+
+ constexpr int compare(size_type pos1, size_type n1, charT const * s) const
+ { return substr(pos1, n1).compare(s); }
+
+ constexpr int compare(
+ size_type pos1, size_type n1, charT const * s, size_type n2) const
+ { return substr(pos1, n1).compare(basic_string_view(s, n2)); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type find(basic_string_view s, size_type pos = 0) const noexcept {
+ if (s.size() <= size()) {
+ for (auto xpos = pos; xpos <= size() - s.size(); ++xpos) {
+ bool match = true;
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (!traits::eq(data_[xpos + i], s.data_[i])) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ return xpos;
+ }
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type find(charT c, size_type pos = 0) const noexcept
+ { return find(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type find(charT const * s, size_type pos, size_type n) const
+ { return find(basic_string_view(s, n), pos); }
+
+ constexpr size_type find(charT const * s, size_type pos = 0) const
+ { return find(basic_string_view(s), pos); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type rfind(basic_string_view s, size_type pos = npos) const noexcept {
+ if (s.size() <= size()) {
+ for (auto xpos = std::min<size_type>(size() - s.size(), pos);;
+ --xpos)
+ {
+ bool match = true;
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (!traits::eq(data_[xpos + i], s.data_[i])) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ return xpos;
+ }
+ if (xpos == 0) {
+ break;
+ }
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type rfind(charT c, size_type pos = npos) const noexcept
+ { return rfind(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type rfind(charT const * s, size_type pos, size_type n) const
+ { return rfind(basic_string_view(s, n), pos); }
+
+ constexpr size_type rfind(charT const * s, size_type pos = npos) const
+ { return rfind(basic_string_view(s), pos); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type find_first_of(basic_string_view s, size_type pos = 0) const
+ noexcept
+ {
+ for (auto xpos = pos; xpos < size(); ++xpos) {
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (traits::eq(data_[xpos], s.data_[i])) {
+ return xpos;
+ }
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept
+ { return find_first_of(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type find_first_of(
+ charT const * s, size_type pos, size_type n) const
+ { return find_first_of(basic_string_view(s, n), pos); }
+
+ constexpr size_type find_first_of(charT const * s, size_type pos = 0) const
+ { return find_first_of(basic_string_view(s), pos); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type find_last_of(basic_string_view s, size_type pos = npos) const
+ noexcept
+ {
+ if (!empty()) {
+ for (auto xpos = std::min<size_type>(size() - 1, pos);; --xpos) {
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (traits::eq(data_[xpos], s.data_[i])) {
+ return xpos;
+ }
+ }
+ if (xpos == 0) {
+ break;
+ }
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type find_last_of(charT c, size_type pos = npos) const
+ noexcept
+ { return find_last_of(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type find_last_of(
+ charT const * s, size_type pos, size_type n) const
+ { return find_last_of(basic_string_view(s, n), pos); }
+
+ constexpr size_type find_last_of(charT const * s, size_type pos = npos)
+ const
+ { return find_last_of(basic_string_view(s), pos); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type find_first_not_of(basic_string_view s, size_type pos = 0) const
+ noexcept
+ {
+ for (auto xpos = pos; xpos < size(); ++xpos) {
+ bool match = true;
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (traits::eq(data_[xpos], s.data_[i])) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ return xpos;
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type find_first_not_of(charT c, size_type pos = 0) const
+ noexcept
+ { return find_first_not_of(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type find_first_not_of(
+ charT const * s, size_type pos, size_type n) const
+ { return find_first_not_of(basic_string_view(s, n), pos); }
+
+ constexpr size_type find_first_not_of(charT const * s, size_type pos = 0)
+ const
+ { return find_first_not_of(basic_string_view(s), pos); }
+
+#if HAVE_CXX14_CONSTEXPR
+ constexpr
+#endif
+ size_type find_last_not_of(basic_string_view s, size_type pos = npos) const
+ noexcept
+ {
+ if (!empty()) {
+ for (auto xpos = std::min<size_type>(size() - 1, pos);; --xpos) {
+ bool match = true;
+ for (size_type i = 0; i != s.size(); ++i) {
+ if (traits::eq(data_[xpos], s.data_[i])) {
+ match = false;
+ break;
+ }
+ }
+ if (match) {
+ return xpos;
+ }
+ if (xpos == 0) {
+ break;
+ }
+ }
+ }
+ return npos;
+ }
+
+ constexpr size_type find_last_not_of(charT c, size_type pos = npos) const
+ noexcept
+ { return find_last_not_of(basic_string_view(&c, 1), pos); }
+
+ constexpr size_type find_last_not_of(
+ charT const * s, size_type pos, size_type n) const
+ { return find_last_not_of(basic_string_view(s, n), pos); }
+
+ constexpr size_type find_last_not_of(charT const * s, size_type pos = npos)
+ const
+ { return find_last_not_of(basic_string_view(s), pos); }
+
+ // LO specifics:
+
+ // For std::basic_string_view, this is provided via a non-explicit
+ // conversion operator from std::basic_string:
+ constexpr basic_string_view(std::basic_string<charT, traits> const & s):
+ data_(s.data()), size_(s.size()) {}
+
+ // For std::string_view, this will be provided by a (LIBO_INTERNAL_ONLY)
+ // non-explicit conversion operator from rtl::OString:
+ template<typename T = charT> basic_string_view(
+ OString const & s,
+ typename std::enable_if<
+ std::is_same<T, char>::value,
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(s.getStr()), size_(s.getLength()) {}
+
+ // For std::u16string_view, this will be provided by a (LIBO_INTERNAL_ONLY)
+ // non-explicit conversion operator from rtl::OUString:
+ template<typename T = charT> basic_string_view(
+ OUString const & s,
+ typename std::enable_if<
+ std::is_same<T, sal_Unicode>::value,
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(s.getStr()), size_(s.getLength()) {}
+
+ // For std::u16string_view, this would either be provided by a
+ // (LIBO_INTERNAL_ONLY) non-explicit conversion operator from
+ // rtl::OUStringLiteral, or rtl::OUStringLiteral would be given up in favor
+ // of std::u16string_view anyway (but this constructor also serves to reject
+ // as ambiguous construction of a o3tl::u16string_view from a narrow string
+ // literal, which would otherwise go via the above rtl::OUString
+ // constructor):
+ template<typename T = charT> constexpr basic_string_view(
+ OUStringLiteral literal,
+ typename std::enable_if<
+ std::is_same<T, sal_Unicode>::value,
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(literal.data), size_(literal.size) {}
+
+ // LO specifics, to make up for traits::length not necessarily being
+ // constexpr yet for literal arguments:
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 const & value,
+ typename std::enable_if<
+ std::is_same<T2, char>::value && detail::CharPtrDetector<T1>::ok,
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & value,
+ typename std::enable_if<
+ (std::is_same<T2, char>::value
+ && detail::NonConstCharArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & literal,
+ typename std::enable_if<
+ (std::is_same<T2, char>::value
+ && detail::ConstCharArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(literal), size_(detail::ConstCharArrayDetector<T1>::length)
+ { /*assert(size_ == traits::length(literal);*/ }
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 const & value,
+ typename std::enable_if<
+ (std::is_same<T2, char16_t>::value
+ && detail::Char16PtrDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & value,
+ typename std::enable_if<
+ (std::is_same<T2, char16_t>::value
+ && detail::NonConstChar16ArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & literal,
+ typename std::enable_if<
+ (std::is_same<T2, char16_t>::value
+ && detail::ConstChar16ArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(literal), size_(detail::ConstChar16ArrayDetector<T1>::length)
+ { /*assert(size_ == traits::length(literal);*/ }
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 const & value,
+ typename std::enable_if<
+ (std::is_same<T2, char32_t>::value
+ && detail::Char32PtrDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & value,
+ typename std::enable_if<
+ (std::is_same<T2, char32_t>::value
+ && detail::NonConstChar32ArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & literal,
+ typename std::enable_if<
+ (std::is_same<T2, char32_t>::value
+ && detail::ConstChar32ArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(literal), size_(detail::ConstChar32ArrayDetector<T1>::length)
+ { /*assert(size_ == traits::length(literal);*/ }
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 const & value,
+ typename std::enable_if<
+ (std::is_same<T2, wchar_t>::value
+ && detail::WcharPtrDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & value,
+ typename std::enable_if<
+ (std::is_same<T2, wchar_t>::value
+ && detail::NonConstWcharArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(value), size_(traits::length(value)) {}
+
+ template<typename T1, typename T2 = charT> constexpr basic_string_view(
+ T1 & literal,
+ typename std::enable_if<
+ (std::is_same<T2, wchar_t>::value
+ && detail::ConstWcharArrayDetector<T1>::ok),
+ rtl::libreoffice_internal::Dummy>::type = {}):
+ data_(literal), size_(detail::ConstWcharArrayDetector<T1>::length)
+ { /*assert(size_ == traits::length(literal);*/ }
+
+private:
+ const_pointer data_;
+ size_type size_;
+};
+
+template<class charT, class traits> constexpr bool operator ==(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) == 0; }
+
+template<class charT, class traits> constexpr bool operator ==(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) == 0; }
+
+template<class charT, class traits> constexpr bool operator ==(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) == 0; }
+
+template<class charT, class traits> constexpr bool operator !=(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) != 0; }
+
+template<class charT, class traits> constexpr bool operator !=(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) != 0; }
+
+template<class charT, class traits> constexpr bool operator !=(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) != 0; }
+
+template<class charT, class traits> constexpr bool operator <(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) < 0; }
+
+template<class charT, class traits> constexpr bool operator <(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) < 0; }
+
+template<class charT, class traits> constexpr bool operator <(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) < 0; }
+
+template<class charT, class traits> constexpr bool operator >(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) > 0; }
+
+template<class charT, class traits> constexpr bool operator >(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) > 0; }
+
+template<class charT, class traits> constexpr bool operator >(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) > 0; }
+
+template<class charT, class traits> constexpr bool operator <=(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) <= 0; }
+
+template<class charT, class traits> constexpr bool operator <=(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) <= 0; }
+
+template<class charT, class traits> constexpr bool operator <=(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) <= 0; }
+
+template<class charT, class traits> constexpr bool operator >=(
+ basic_string_view<charT, traits> x, basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) >= 0; }
+
+template<class charT, class traits> constexpr bool operator >=(
+ basic_string_view<charT, traits> x,
+ typename std::decay<basic_string_view<charT, traits>>::type y)
+ noexcept
+{ return x.compare(y) >= 0; }
+
+template<class charT, class traits> constexpr bool operator >=(
+ typename std::decay<basic_string_view<charT, traits>>::type x,
+ basic_string_view<charT, traits> y)
+ noexcept
+{ return x.compare(y) >= 0; }
+
+template<class charT, class traits> std::basic_ostream<charT, traits> &
+operator <<(
+ std::basic_ostream<charT, traits> & os,
+ basic_string_view<charT, traits> str)
+{
+ typename std::basic_ostream<charT, traits>::sentry sentry;
+ if (sentry) {
+ auto const w = os.width();
+ auto const pad
+ = std::max<std::make_unsigned<decltype(w + str.size())>::type>(
+ w < 0 ? 0 : w, str.size());
+ auto const after = (os.flags() & std::ios_base::adjustfield)
+ == std::ios_base::left;
+ if (pad != 0 && !after) {
+ auto const c = os.fill();
+ for (; pad != 0; --pad) {
+ os.rdbuf()->sputc(c);
+ }
+ }
+ os.rdbuf()->sputn(str.data(), str.size());
+ if (pad != 0 && after) {
+ auto const c = os.fill();
+ for (; pad != 0; --pad) {
+ os.rdbuf()->sputc(c);
+ }
+ }
+ os.width(0);
+ } else {
+ os.setstate(std::ios_base::failbit);
+ }
+ return os;
+}
+
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+using string_view = basic_string_view<char>;
+using u16string_view = basic_string_view<char16_t>;
+using u32string_view = basic_string_view<char32_t>;
+using wstring_view = basic_string_view<wchar_t>;
+
+// no literals::string_view_literals::operator "" sv
+
+}
+
+namespace std {
+
+template<> struct hash<o3tl::string_view> {
+ std::size_t operator ()(o3tl::string_view s)
+ { return hash<string>()(string(s.data(), s.size())); }
+};
+
+template<> struct hash<o3tl::u16string_view> {
+ std::size_t operator ()(o3tl::u16string_view s)
+ { return hash<u16string>()(u16string(s.data(), s.size())); }
+};
+
+template<> struct hash<o3tl::u32string_view> {
+ std::size_t operator ()(o3tl::u32string_view s)
+ { return hash<u32string>()(u32string(s.data(), s.size())); }
+};
+
+template<> struct hash<o3tl::wstring_view> {
+ std::size_t operator ()(o3tl::wstring_view s)
+ { return hash<wstring>()(wstring(s.data(), s.size())); }
+};
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/include/oox/crypto/AgileEngine.hxx b/include/oox/crypto/AgileEngine.hxx
index 796f030b3bce..0a1721dc096b 100644
--- a/include/oox/crypto/AgileEngine.hxx
+++ b/include/oox/crypto/AgileEngine.hxx
@@ -71,6 +71,7 @@ struct OOX_DLLPUBLIC AgileEncryptionParameters
enum class AgileEncryptionPreset
{
AES_128_SHA1,
+ AES_128_SHA384,
AES_256_SHA512,
};
diff --git a/include/oox/crypto/CryptTools.hxx b/include/oox/crypto/CryptTools.hxx
index 5bd7119c548c..0ff8f1c28bed 100644
--- a/include/oox/crypto/CryptTools.hxx
+++ b/include/oox/crypto/CryptTools.hxx
@@ -49,6 +49,7 @@ enum class CryptoHashType
{
SHA1,
SHA256,
+ SHA384,
SHA512
};
diff --git a/include/rtl/bootstrap.h b/include/rtl/bootstrap.h
index 620a3a577944..93ece37ba95c 100644
--- a/include/rtl/bootstrap.h
+++ b/include/rtl/bootstrap.h
@@ -41,27 +41,29 @@ extern "C" {
the next level is tried. Every query starts at the first level again, so
that one setting may be taken from the 3rd and one from the 1st level.
- 1st level: explicitly set variables via rtl_bootstrap_set()
+ 1st level: a fundamental.override.ini next to the application
- 2nd level: command line arguments. A `-env:SETTINGNAME=value` is given on
+ 2nd level: explicitly set variables via rtl_bootstrap_set()
+
+ 3rd level: command line arguments. A `-env:SETTINGNAME=value` is given on
command line. This allows giving an application a certain setting, even
if an ini-file exists (especially useful for e.g. daemons that want to
start an executable with dynamical changing settings).
- 3rd level: environment variables. The application tries to get the
+ 4th level: environment variables. The application tries to get the
setting from the environment.
- 4th level: executable ini-file. Every application looks for an ini-file.
+ 5th level: executable ini-file. Every application looks for an ini-file.
The filename defaults to `/absolute/path/to/executable[rc|.ini]`
without .bin or .exe suffix. The ini-filename can be
set by the special command line parameter
`-env:INIFILENAME=/absolute/path/to/inifile` at runtime or it may
be set at compile time by an API-call.
- 5th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP
+ 6th level: URE_BOOTSTRAP ini-file. If the bootstrap variable URE_BOOTSTRAP
expands to the URL of an ini-file, that ini-file is searched.
- 6th level: default. An application can have some default settings decided
+ 7th level: default. An application can have some default settings decided
at compile time, which allow the application to run even with no
deployment settings.
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 4711bd8a6a0f..31483cb3b473 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -432,6 +432,7 @@ certain functionality.
@li @c ucb.ucp.ftp
@li @c ucb.ucp.gio
@li @c ucb.ucp.webdav
+@li @c ucb.ucp.webdav.curl
@section unotools
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 00d533ab5495..d4de09c201b4 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -26,11 +26,20 @@
/// @cond INTERNAL
+enum sal_detail_LogAction
+{
+ SAL_DETAIL_LOG_ACTION_IGNORE,
+ SAL_DETAIL_LOG_ACTION_LOG,
+ SAL_DETAIL_LOG_ACTION_FATAL
+};
+
extern "C" SAL_DLLPUBLIC void SAL_CALL sal_detail_log(
sal_detail_LogLevel level, char const * area, char const * where,
char const * message, sal_uInt32 backtraceDepth);
-extern "C" SAL_DLLPUBLIC sal_Bool SAL_CALL sal_detail_log_report(
+// the return value is actually "enum sal_detail_LogAction", but due to ABI
+// compatibility, it's left as the original "sal_Bool" / "unsigned char".
+extern "C" SAL_DLLPUBLIC unsigned char SAL_CALL sal_detail_log_report(
sal_detail_LogLevel level, char const * area);
namespace sal { namespace detail {
@@ -113,9 +122,9 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
} }
-#define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \
- do { \
- if ((condition) && sal_detail_log_report(level, area)) { \
+// to prevent using a local variable, which can eventually shadow,
+// resulting in compiler warnings (or even errors with -Werror)
+#define SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream) \
if (sizeof ::sal::detail::getResult( \
::sal::detail::StreamStart() << stream) == 1) \
{ \
@@ -129,6 +138,22 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
sal_detail_stream << stream; \
::sal::detail::log( \
(level), (area), (where), sal_detail_stream, 0); \
+ }
+
+#define SAL_DETAIL_LOG_STREAM(condition, level, area, where, stream) \
+ do { \
+ if (condition) \
+ { \
+ switch (sal_detail_log_report(level, area)) \
+ { \
+ case SAL_DETAIL_LOG_ACTION_IGNORE: break; \
+ case SAL_DETAIL_LOG_ACTION_LOG: \
+ SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
+ break; \
+ case SAL_DETAIL_LOG_ACTION_FATAL: \
+ SAL_DETAIL_LOG_STREAM_PRIVATE_(level, area, where, stream); \
+ std::abort(); \
+ break; \
} \
} \
} while (false)
@@ -161,7 +186,10 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
@since LibreOffice 3.5
*/
-#if defined _LIBCPP_VERSION || (defined _MSC_VER && _MSC_VER >= 1915)
+#if defined _LIBCPP_VERSION \
+ || (defined _GLIBCXX_RELEASE \
+ && (_GLIBCXX_RELEASE >= 12 || (_GLIBCXX_RELEASE == 11 && __GLIBCXX__ > 20210428))) \
+ || (defined _MSC_VER && _MSC_VER >= 1915)
#define SAL_STREAM(stream) \
(::std::ostringstream() << stream).str()
#else
@@ -235,7 +263,7 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
<switch> ::= <sense><item>
<sense> ::= "+"|"-"
<item> ::= <flag>|<level>("."<area>)?
- <flag> ::= "TIMESTAMP"|"RELATIVETIMER"
+ <flag> ::= "TIMESTAMP"|"RELATIVETIMER"|"FATAL"
<level> ::= "INFO"|"WARN"
@endverbatim
@@ -252,6 +280,12 @@ inline char const * unwrapStream(SAL_UNUSED_PARAMETER StreamIgnore const &) {
the level switch(es)) to be prefixed by a relative timestamp in
seconds since the first output line like 1.312.
+ The "+FATAL" flag will cause later matching rules to log and call
+ std::abort. This can be disabled at some later point by using the
+ "-FATAL" flag before specifying additional rules. The flag will just
+ abort on positive rules, as it doesn't seem to make sense to abort
+ on ignored output.
+
If both +TIMESTAMP and +RELATIVETIMER are specified, they are
output in that order.
diff --git a/include/sal/types.h b/include/sal/types.h
index 1a8ba255b4b7..2e8d5e8ad873 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -495,6 +495,12 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
_Pragma(SAL_STRINGIFY_ARG(GCC diagnostic ignored "-Wdeprecated-declarations"))
#define SAL_WNODEPRECATED_DECLARATIONS_POP \
_Pragma(SAL_STRINGIFY_ARG(GCC diagnostic pop))
+#elif defined LIBO_INTERNAL_ONLY && defined _MSC_VER
+#define SAL_WNODEPRECATED_DECLARATIONS_PUSH \
+ __pragma(warning(push)) \
+ __pragma(warning(disable : 4996))
+#define SAL_WNODEPRECATED_DECLARATIONS_POP \
+ __pragma(warning(pop))
#else
# define SAL_WNODEPRECATED_DECLARATIONS_PUSH
# define SAL_WNODEPRECATED_DECLARATIONS_POP
diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx
index fedaa598109c..42c7054eb4de 100644
--- a/include/sfx2/basedlgs.hxx
+++ b/include/sfx2/basedlgs.hxx
@@ -50,7 +50,8 @@ public:
// when the dialog has an associated SfxChildWin, typically for Modeless interaction
virtual void ChildWinDispose() {} // called from the associated SfxChildWin dtor
virtual void Close() {} // called by the SfxChildWin when the dialog is closed
- virtual void EndDialog(); // called by the SfxChildWin to close the dialog
+ virtual void EndDialog(int nResponse); // called by the SfxChildWin to close the dialog
+ virtual bool CloseOnHide() const { return true; } // called from ScValidationDlg
};
class SfxModelessDialog_Impl;
@@ -75,7 +76,7 @@ public:
void Initialize (SfxChildWinInfo const * pInfo);
bool IsClosing() const;
virtual void Close() override;
- virtual void EndDialog() override;
+ virtual void EndDialog(int nRespose) override;
virtual void Activate() override;
virtual void Deactivate() override;
virtual void ChildWinDispose() override;
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index f5e64fdfedf3..d3fb36947a83 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -211,6 +211,7 @@ public:
SAL_DLLPRIVATE void SetFactory_Impl( SfxChildWinFactory* );
};
+const int nCloseResponseToJustHide = -42;
//! The Macro of the future ...
#define SFX_DECL_CHILDWINDOWCONTEXT(Class) \
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index bd4f13fb016c..0cfca92db308 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -261,6 +261,8 @@ namespace sfx2
*/
static bool storageHasMacros( const css::uno::Reference< css::embed::XStorage >& _rxStorage );
+ bool hasMacros() const;
+
static bool containerHasBasicMacros( const css::uno::Reference< css::script::XLibraryContainer >& xContainter );
/** checks the macro execution mode while loading the document.
@@ -288,7 +290,7 @@ namespace sfx2
bool
checkMacrosOnLoading(
const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction,
- bool bHasValidContentSignature = false
+ bool bHasValidContentSignature, bool bHasMacros
);
private:
diff --git a/include/sfx2/infobar.hxx b/include/sfx2/infobar.hxx
index 80f4c0a0506c..405f1feffd42 100644
--- a/include/sfx2/infobar.hxx
+++ b/include/sfx2/infobar.hxx
@@ -117,7 +117,7 @@ class SfxInfoBarContainerWindow final : public vcl::Window
VclPtr<SfxInfoBarWindow> getInfoBar(const OUString& sId);
bool hasInfoBarWithID(const OUString& sId);
void removeInfoBar(VclPtr<SfxInfoBarWindow> const & pInfoBar);
-
+ static bool isInfobarEnabled(const OUString& sId);
virtual void Resize() override;
};
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 2a56ebe88e07..10442bfb5148 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -202,6 +202,9 @@ private:
SAL_DLLPRIVATE bool SaveTo_Impl(SfxMedium &rMedium, const SfxItemSet* pSet );
+ // true if the document had macros (or similar) on load to trigger warning user
+ SAL_DLLPRIVATE bool GetHadCheckedMacrosOnLoad() const;
+
protected:
SfxObjectShell(SfxObjectCreateMode);
SfxObjectShell(SfxModelFlags); // see sfxmodelfactory.hxx
@@ -418,6 +421,9 @@ public:
void SetMacroCallsSeenWhileLoading();
bool GetMacroCallsSeenWhileLoading() const;
+ // true if this type of link, from a document, is allowed by the user to be passed to uno:OpenDoc
+ static bool AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent);
+
const css::uno::Sequence< css::beans::PropertyValue >& GetModifyPasswordInfo() const;
bool SetModifyPasswordInfo( const css::uno::Sequence< css::beans::PropertyValue >& aInfo );
@@ -579,6 +585,8 @@ public:
const css::uno::Reference<css::embed::XStorage>& xTarget,
const css::uno::Sequence<OUString>& rExceptions = css::uno::Sequence<OUString>());
+ bool isEditDocLocked();
+
// The functions from SvPersist
void EnableSetModified( bool bEnable = true );
bool IsEnableSetModified() const;
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx
index f1cc0e26b93d..4f28b632f37e 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SFX2_SIDEBAR_SIDEBARPANELBASE_HXX
#define INCLUDED_SFX2_SIDEBAR_SIDEBARPANELBASE_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <sfx2/dllapi.h>
#include <cppuhelper/compbase.hxx>
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 1f21f0a0f186..29950ba68ca1 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -103,6 +103,7 @@
#define STR_GB NC_("STR_GB", "GB")
#define STR_QUERY_LASTVERSION NC_("STR_QUERY_LASTVERSION", "Cancel all changes?")
#define STR_NO_WEBBROWSER_FOUND NC_("STR_NO_WEBBROWSER_FOUND", "Opening \"$(ARG1)\" failed with error code $(ARG2) and message: \"$(ARG3)\"\nMaybe no web browser could be found on your system. In that case, please check your Desktop Preferences or install a web browser (for example, Firefox) in the default location requested during the browser installation.")
+#define STR_DANGEROUS_TO_OPEN NC_("STR_DANGEROUS_TO_OPEN", "It might be dangerous to open \"$(ARG1)\".\nDo you really want to open it?")
#define STR_NO_ABS_URI_REF NC_("STR_NO_ABS_URI_REF", "\"$(ARG1)\" is not an absolute URL that can be passed to an external application to open it.")
#define STR_GID_INTERN NC_("STR_GID_INTERN", "Internal")
#define STR_GID_APPLICATION NC_("STR_GID_APPLICATION", "Application")
@@ -297,6 +298,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/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index ad910e2dd664..84f4a5c1b20a 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -130,7 +130,6 @@ protected:
std::unique_ptr<weld::Button> mxMoveButton;
std::unique_ptr<weld::Button> mxExportButton;
std::unique_ptr<weld::Button> mxImportButton;
- std::unique_ptr<weld::Button> mxLinkButton;
std::unique_ptr<weld::CheckButton> mxCBXHideDlg;
std::unique_ptr<weld::MenuButton> mxActionBar;
std::unique_ptr<TemplateSearchView> mxSearchView;
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index fe336ba5f091..cc6a7dae7047 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/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index d65fae656b16..a1a225aa1b28 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -292,7 +292,6 @@ public:
bool isExportLocked();
bool isPrintLocked();
bool isSaveLocked();
- bool isEditDocLocked();
SAL_DLLPRIVATE SfxInPlaceClient* GetUIActiveIPClient_Impl() const;
SAL_DLLPRIVATE void AddContextMenuInterceptor_Impl( const css::uno::Reference < css::ui::XContextMenuInterceptor >& xInterceptor );
diff --git a/include/svl/sigstruct.hxx b/include/svl/sigstruct.hxx
index f6ee242c84d1..f00cbce6e4b8 100644
--- a/include/svl/sigstruct.hxx
+++ b/include/svl/sigstruct.hxx
@@ -89,9 +89,30 @@ struct SignatureInformation
sal_Int32 nSecurityId;
css::xml::crypto::SecurityOperationStatus nStatus;
SignatureReferenceInformations vSignatureReferenceInfors;
- OUString ouX509IssuerName;
- OUString ouX509SerialNumber;
- OUString ouX509Certificate;
+ struct X509CertInfo
+ {
+ OUString X509IssuerName;
+ OUString X509SerialNumber;
+ OUString X509Certificate;
+ /// OOXML certificate SHA-256 digest, empty for ODF except when doing XAdES signature.
+ OUString CertDigest;
+ /// The certificate owner (aka subject).
+ OUString X509Subject;
+ };
+ typedef std::vector<X509CertInfo> X509Data;
+ // note: at parse time, it's unkown which one is the signing certificate;
+ // ImplVerifySignatures() figures it out and puts it at the back
+ std::vector<X509Data> X509Datas;
+
+ X509CertInfo const* GetSigningCertificate() const
+ {
+ if (X509Datas.empty())
+ {
+ return nullptr;
+ }
+ assert(!X509Datas.back().empty());
+ return & X509Datas.back().back();
+ }
OUString ouGpgKeyID;
OUString ouGpgCertificate;
@@ -103,6 +124,9 @@ struct SignatureInformation
// XAdES EncapsulatedX509Certificate values
std::set<OUString> maEncapsulatedX509Certificates;
+ OUString ouSignatureId;
+ // signature may contain multiple time stamps - check they're consistent
+ bool hasInconsistentSigningTime = false;
//We also keep the date and time as string. This is done when this
//structure is created as a result of a XML signature being read.
//When then a signature is added or another removed, then the original
@@ -115,14 +139,12 @@ struct SignatureInformation
//and the converted time is written back, then the string looks different
//and the signature is broken.
OUString ouDateTime;
- OUString ouSignatureId;
- OUString ouPropertyId;
+ /// The Id attribute of the <SignatureProperty> element that contains the <dc:date>.
+ OUString ouDateTimePropertyId;
/// Characters of the <dc:description> element inside the signature.
OUString ouDescription;
/// The Id attribute of the <SignatureProperty> element that contains the <dc:description>.
OUString ouDescriptionPropertyId;
- /// OOXML certificate SHA-256 digest, empty for ODF except when doing XAdES signature.
- OUString ouCertDigest;
/// Valid and invalid signature line images
css::uno::Reference<css::graphic::XGraphic> aValidSignatureImage;
css::uno::Reference<css::graphic::XGraphic> aInvalidSignatureImage;
@@ -137,9 +159,6 @@ struct SignatureInformation
/// For PDF: the byte range doesn't cover the whole document.
bool bPartialDocumentSignature;
- /// The certificate owner (aka subject).
- OUString ouSubject;
-
svl::crypto::SignatureMethodAlgorithm eAlgorithmID;
SignatureInformation( sal_Int32 nId )
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 852be1f7435a..ca75f4a66b7f 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -618,6 +618,8 @@ public:
sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt,
LanguageType eLnge = LANGUAGE_DONTKNOW );
+ bool IsUserDefinedAndNotOverloaded(sal_uInt32 F_Index) const;
+
/// Check if format code string may be deleted by user
bool IsUserDefined( const OUString& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
diff --git a/include/svtools/imageresourceaccess.hxx b/include/svtools/imageresourceaccess.hxx
index 6adff39ae4aa..b9135f2ccf6d 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/ClassificationEditView.hxx b/include/svx/ClassificationEditView.hxx
index 614b1d2b6a09..31ada88d3bd7 100644
--- a/include/svx/ClassificationEditView.hxx
+++ b/include/svx/ClassificationEditView.hxx
@@ -24,7 +24,7 @@ class ClassificationEditEngine final : public EditEngine
public:
ClassificationEditEngine(SfxItemPool* pItemPool);
- virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor) override;
+ virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle) override;
};
class SVX_DLLPUBLIC ClassificationEditView final : public WeldEditView
diff --git a/include/svx/hexcolorcontrol.hxx b/include/svx/hexcolorcontrol.hxx
index 63b44992d370..fc72f493a61d 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/svdomeas.hxx b/include/svx/svdomeas.hxx
index cce1df59819a..b287274e65fc 100644
--- a/include/svx/svdomeas.hxx
+++ b/include/svx/svdomeas.hxx
@@ -140,7 +140,7 @@ public:
virtual OutlinerParaObject* GetOutlinerParaObject() const override;
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
- bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const override;
+ bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle, OUString& rRet) const override;
// #i97878#
virtual bool TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& rPolyPolygon) const override;
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index b192a438bc19..085b6e04a3a3 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/svdotext.hxx b/include/svx/svdotext.hxx
index 78e09d508199..9d365ce71e38 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -498,7 +498,7 @@ public:
virtual void NbcReformatText() override;
virtual bool CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
- bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const;
+ bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle, OUString& rRet) const;
virtual SdrObjectUniquePtr DoConvertToPolyObj(bool bBezier, bool bAddText) const override;
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 7655dee739b7..adfe159a9814 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -43,7 +43,7 @@ public:
void setVisualizedPage(const SdrPage* pPage) { if(pPage != mpVisualizedPage) mpVisualizedPage = pPage; }
const SdrPage* getVisualizedPage() const { return mpVisualizedPage; }
- virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor) override;
+ virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle) override;
bool hasEditViewCallbacks() const;
};
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 0b48d1e433d6..4b5c78b26cfa 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -581,6 +581,8 @@ public:
// #i118485# changed parent to SvxShapeText to allow Text handling over UNO API
class SVX_DLLPUBLIC SvxOle2Shape : public SvxShapeText
{
+private:
+ OUString referer_;
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;
@@ -590,13 +592,15 @@ protected:
SvGlobalName GetClassName_Impl(OUString& rHexCLSID);
public:
- SvxOle2Shape(SdrObject* pObj);
- SvxOle2Shape(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet);
+ SvxOle2Shape(SdrObject* pObj, OUString referer);
+ SvxOle2Shape(SdrObject* pObject, OUString referer, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet);
virtual ~SvxOle2Shape() throw() override;
bool createObject( const SvGlobalName &aClassName );
void createLink( const OUString& aLinkURL );
+
+ virtual OUString GetAndClearInitialFrameURL();
};
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 522dcca35fcd..67f241376537 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -920,6 +920,11 @@ public:
void changeScheme(INetProtocol eTargetScheme);
+ // INetProtocol::Macro, INetProtocol::Uno, INetProtocol::Slot,
+ // vnd.sun.star.script, etc. All the types of URLs which shouldn't
+ // be accepted from an outside controlled source
+ bool IsExoticProtocol() const;
+
private:
// General Structure:
diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index 2a064951c447..d6f1c8232c0a 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -20,11 +20,17 @@
#ifndef INCLUDED_VCL_BITMAPBUFFER_HXX
#define INCLUDED_VCL_BITMAPBUFFER_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <vcl/dllapi.h>
#include <vcl/BitmapPalette.hxx>
#include <vcl/ColorMask.hxx>
#include <vcl/Scanline.hxx>
+#include <memory>
+
struct SalTwoRect;
struct VCL_DLLPUBLIC BitmapBuffer
diff --git a/include/vcl/BitmapTools.hxx b/include/vcl/BitmapTools.hxx
index 3652bb849bf4..7c076a451a69 100644
--- a/include/vcl/BitmapTools.hxx
+++ b/include/vcl/BitmapTools.hxx
@@ -20,6 +20,7 @@
#include <basegfx/range/b2drectangle.hxx>
#include <o3tl/safeint.hxx>
#include <array>
+#include <limits>
class SvStream;
namespace basegfx { class B2DHomMatrix; }
@@ -51,6 +52,10 @@ public:
mnBitCount(nBitCount)
{
assert(nBitCount == 24 || nBitCount == 32);
+ if (rSize.getWidth() > std::numeric_limits<sal_Int32>::max() || rSize.getWidth() < 0)
+ throw std::bad_alloc();
+ if (rSize.getHeight() > std::numeric_limits<sal_Int32>::max() || rSize.getHeight() < 0)
+ throw std::bad_alloc();
sal_Int32 nRowSize, nDataSize;
if (o3tl::checked_multiply<sal_Int32>(rSize.getWidth(), nBitCount/8, nRowSize) ||
o3tl::checked_multiply<sal_Int32>(nRowSize, rSize.getHeight(), nDataSize) ||
diff --git a/include/vcl/filter/PngImageReader.hxx b/include/vcl/filter/PngImageReader.hxx
index 97b2616883b2..4fe1bb74aa4b 100644
--- a/include/vcl/filter/PngImageReader.hxx
+++ b/include/vcl/filter/PngImageReader.hxx
@@ -11,6 +11,10 @@
#ifndef INCLUDED_VCL_FILTER_PNGIMAGEREADER_HXX
#define INCLUDED_VCL_FILTER_PNGIMAGEREADER_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <vcl/dllapi.h>
#include <com/sun/star/uno/Reference.hxx>
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/print.hxx b/include/vcl/print.hxx
index fbdf9c9e19cb..5beb2d964c83 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -226,6 +226,7 @@ public:
protected:
virtual bool AcquireGraphics() const override;
virtual void ReleaseGraphics( bool bRelease = true ) override;
+ void ImplReleaseGraphics(bool bRelease = true);
virtual void ImplReleaseFonts() override;
virtual long GetGradientStepCount( long nMinRect ) override;
diff --git a/include/vcl/svtabbx.hxx b/include/vcl/svtabbx.hxx
index fda6c2a28c35..209c506a0ea2 100644
--- a/include/vcl/svtabbx.hxx
+++ b/include/vcl/svtabbx.hxx
@@ -96,6 +96,7 @@ public:
sal_uLong GetEntryPos( const SvTreeListEntry* pEntry ) const;
void SetTabJustify( sal_uInt16 nTab, SvTabJustify );
+ void SetTabEditable( sal_uInt16 nTab, bool bEditable );
};
// class SvHeaderTabListBox ---------------------------------------------------
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 75af922a007c..2b4c3ecc2b97 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -176,8 +176,7 @@ protected:
const css::uno::Reference< css::datatransfer::clipboard::XClipboard >&
getOwnClipboard() const { return mxClipboard; }
-private:
-
+public:
// XTransferable
virtual css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& rFlavor ) override;
virtual css::uno::Sequence< css::datatransfer::DataFlavor > SAL_CALL getTransferDataFlavors() override;
@@ -188,6 +187,7 @@ private:
const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
virtual sal_Bool SAL_CALL isComplex() override;
+private:
// XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index 0f47b402dc91..e61a81a40797 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -380,6 +380,7 @@ public:
SvViewDataItem* GetViewDataItem(SvTreeListEntry const *, SvLBoxItem const *);
const SvViewDataItem* GetViewDataItem(const SvTreeListEntry*, const SvLBoxItem*) const;
+ VclPtr<Edit> GetEditWidget() const; // for UITest
bool IsInplaceEditingEnabled() const { return bool(nImpFlags & SvTreeListBoxFlags::EDT_ENABLED); }
bool IsEditingActive() const { return bool(nImpFlags & SvTreeListBoxFlags::IN_EDT); }
void EndEditing( bool bCancel = false );
@@ -757,6 +758,7 @@ public:
OUString const & GetSavedValue() const;
void StopEditing( bool bCancel );
void Hide();
+ VclPtr<Edit> GetEditWidget() const;
};
#endif
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 5a9ee5a92f39..cc5e6b9d03a2 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -947,8 +947,8 @@ public:
virtual void set_sort_order(bool bAscending) = 0;
// TRUE ascending, FALSE, descending, INDET, neither (off)
- virtual void set_sort_indicator(TriState eState, int nColumn = -1) = 0;
- virtual TriState get_sort_indicator(int nColumn = -1) const = 0;
+ virtual void set_sort_indicator(TriState eState, int nColumn) = 0;
+ virtual TriState get_sort_indicator(int nColumn) const = 0;
virtual int get_sort_column() const = 0;
virtual void set_sort_column(int nColumn) = 0;
@@ -964,6 +964,7 @@ public:
virtual void columns_autosize() = 0;
virtual void set_column_fixed_widths(const std::vector<int>& rWidths) = 0;
+ virtual void set_column_editables(const std::vector<bool>& rEditables) = 0;
virtual int get_column_width(int nCol) const = 0;
virtual void set_centered_column(int nCol) = 0;
virtual OUString get_column_title(int nColumn) const = 0;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index d23b34e397dd..1c55dea078b5 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1215,6 +1215,9 @@ public:
/// Same as MouseMove(), but coordinates are in logic unit. used for LOK
virtual void LogicMouseMove(const MouseEvent&) {};
+
+ virtual void FlashWindow() const {};
+
/** @name Accessibility
*/
///@{
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 6d0dda96596a..8d557789aa4c 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -229,8 +229,12 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper<
static void initializeNamespaceMaps();
void registerNamespaces();
- std::unique_ptr<SvXMLNamespaceMap> processNSAttributes(
+public:
+ static std::unique_ptr<SvXMLNamespaceMap> processNSAttributes(
+ std::unique_ptr<SvXMLNamespaceMap> & rpNamespaceMap,
+ SvXMLImport *const pImport,
const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
+private:
void Characters(const OUString& aChars);
css::uno::Reference< css::task::XStatusIndicator > mxStatusIndicator;
diff --git a/include/xmloff/xmlnmspe.hxx b/include/xmloff/xmlnmspe.hxx
index a00628b6b999..a7505a64190d 100644
--- a/include/xmloff/xmlnmspe.hxx
+++ b/include/xmloff/xmlnmspe.hxx
@@ -138,6 +138,16 @@ XML_NAMESPACE( XML_NAMESPACE_FIELD, 100U )
XML_NAMESPACE( XML_NAMESPACE_CSS3TEXT, 103U ) // CSS Text Level 3
XML_NAMESPACE( XML_NAMESPACE_FORMX, 101U ) // form interop extensions
+// OOo extension digital signatures, used in ODF 1.1
+const sal_uInt16 XML_NAMESPACE_DSIG_OOO = 200;
+// ODF 1.2 digital signature namespaces
+const sal_uInt16 XML_NAMESPACE_DSIG = 201;
+const sal_uInt16 XML_NAMESPACE_DS = 202;
+const sal_uInt16 XML_NAMESPACE_XADES132 = 203;
+const sal_uInt16 XML_NAMESPACE_XADES141 = 204;
+// OOXML digital signature extension namespaces, also based on xmldsig-core
+const sal_uInt16 XML_NAMESPACE_MDSSI = 205;
+const sal_uInt16 XML_NAMESPACE_MSODIGSIG = 206;
#endif // INCLUDED_XMLOFF_XMLNMSPE_HXX
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index b5105e5da0f3..3e2227147de5 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -133,6 +133,19 @@ namespace xmloff { namespace token {
XML_NP_GRDDL,
XML_N_GRDDL,
+ // OOo extension digital signatures, used in ODF 1.1
+ XML_NP_DSIG_OOO,
+ XML_N_DSIG_OOO,
+ // ODF 1.2 digital signatures
+ XML_NP_DSIG,
+ XML_N_DSIG,
+ XML_NP_DS,
+ XML_N_DS,
+ XML_NP_XADES132,
+ XML_N_XADES132,
+ XML_NP_XADES141,
+ XML_N_XADES141,
+
// ODF Enhanced namespaces
XML_NP_OFFICE_EXT,
XML_N_OFFICE_EXT,
@@ -693,7 +706,7 @@ namespace xmloff { namespace token {
XML_EMBEDDED_VISIBLE_AREA,
XML_EMBOSSED,
XML_EMISSIVE_COLOR,
- XML_EMPTY,
+ XML_TOKEN_EMPTY,
XML_EMPTY_LINE_REFRESH,
XML_ENABLE_NUMBERING,
XML_ENABLED,
diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
index f734f3a2eeaf..8f9ce2d0ba44 100644
--- a/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
+++ b/instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp
Binary files differ
diff --git a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
index f1aa5699dff7..a6cf9c7a816c 100644
--- a/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
+++ b/instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp
Binary files differ
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
index 1e78c7476822..3b3a2b351b07 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Property.idt
@@ -8,9 +8,9 @@ ApplicationUsers AllUsers
ALLUSERS 1
ARPCOMMENTS ARPCOMMENTSTEMPLATE
ARPCONTACT CIB software GmbH
-ARPHELPLINK https://libreoffice.cib.eu
-ARPURLINFOABOUT https://libreoffice.cib.eu
-ARPURLUPDATEINFO https://libreoffice.cib.eu
+ARPHELPLINK https://www.cib.de/office
+ARPURLINFOABOUT https://www.cib.de/office
+ARPURLUPDATEINFO https://www.cib.de/office
DefaultUIFont Tahoma8
DialogCaption Windows Installer
DiskPrompt [1]
diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 902d992ee1d9..5c71e5fc84b9 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -8,21 +8,21 @@ Globals
UREPACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
URELAYERVERSION 1
REFERENCEOOOMAJORMINOR 4.1
- WINDOWSBASISROOTNAME LibreOffice powered by CIB
- UNIXBASISROOTNAME libreofficepoweredbycib@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
+ WINDOWSBASISROOTNAME CIB Office
+ UNIXBASISROOTNAME ciboffice@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
HIDELICENSEDIALOG 1
PACKAGEPREFIX
- BASISPACKAGEPREFIX libreofficepoweredbycibbasis
- UREPACKAGEPREFIX libreofficepoweredbycib
+ BASISPACKAGEPREFIX cibofficebasis
+ UREPACKAGEPREFIX ciboffice
SOLSUREPACKAGEPREFIX libreoffice
- PROGRESSBARCOLOR 255,255,255
+ PROGRESSBARCOLOR 85,90,95
PROGRESSSIZE 460,6
PROGRESSSIZEHIGH 617,12
PROGRESSPOSITION 26,235
PROGRESSPOSITIONHIGH 46,212
- PROGRESSFRAMECOLOR 255,255,255
+ PROGRESSFRAMECOLOR 85,90,95
PROGRESSTEXTBASELINE 230
- PROGRESSTEXTCOLOR 255,255,255
+ PROGRESSTEXTCOLOR 85,90,95
NATIVEPROGRESS false
REGISTRYLAYERNAME Layers
SERVICEPACK 1
@@ -40,13 +40,13 @@ Globals
}
}
-LibreOfficePoweredByCIB
+CIBOffice
{
Settings
{
variables
{
- PRODUCTNAME LibreOffice powered by CIB
+ PRODUCTNAME CIB Office
PRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
PRODUCTEXTENSION -@LIBO_VERSION_PATCH@
POSTVERSIONEXTENSION
@@ -70,7 +70,7 @@ LibreOfficePoweredByCIB
CHANGETARGETDIR 1
PATCHCODEFILE ooo_patchcodes.txt
STARTCENTER_ADDFEATURE_URL http://extensions.libreoffice.org/
- STARTCENTER_INFO_URL https://libreoffice.cib.eu
+ STARTCENTER_INFO_URL https://www.cib.de/office
STARTCENTER_TEMPLREP_URL http://templates.libreoffice.org/
DICT_REPO_URL http://extensions.libreoffice.org/dictionaries/
STARTCENTER_HIDE_EXTERNAL_LINKS 0
@@ -78,24 +78,24 @@ LibreOfficePoweredByCIB
active 1
compression 5
script setup_osl
- downloadname LibreOfficePoweredByCIB_{productversion}_{os}_install_{languages}
- langpackdownloadname LibreOfficePoweredByCIB_{productversion}_languagepack_{os}_install_{languages}
- helppackdownloadname LibreOfficePoweredByCIB_{productversion}_helppack_{os}_install_{languages}
+ downloadname CIBOffice_{productversion}_{os}_install_{languages}
+ langpackdownloadname CIBOffice_{productversion}_languagepack_{os}_install_{languages}
+ helppackdownloadname CIBOffice_{productversion}_helppack_{os}_install_{languages}
include {installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{filelistpath}/CustomTarget/helpcontent2/help3xsl/filelists,{extensionsdir},{licensepath},{packinfopath}
}
}
-LibreOfficePoweredByCIBDev
+CIBOfficeDev
{
Settings
{
variables
{
- PRODUCTNAME LibreOffice Powered By CIB Dev
+ PRODUCTNAME CIB Office Dev
PRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
PRODUCTEXTENSION .@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
- WINDOWSBASISROOTNAME LibreOfficeDev @LIBO_VERSION_MAJOR@
- UNIXBASISROOTNAME libreofficedev@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
+ WINDOWSBASISROOTNAME CIBOfficeDev @LIBO_VERSION_MAJOR@
+ UNIXBASISROOTNAME cibofficedev@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
POSTVERSIONEXTENSION
BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@
BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
@@ -104,9 +104,9 @@ LibreOfficePoweredByCIBDev
ABOUTBOXPRODUCTVERSIONSUFFIX @LIBO_VERSION_SUFFIX_SUFFIX@
BASEPRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
DEVELOPMENTPRODUCT 1
- BASISPACKAGEPREFIX libreofficepoweredbycibdevbasis
- UREPACKAGEPREFIX libreofficepoweredbycibdev
- SOLSUREPACKAGEPREFIX libreofficepoweredbycibdev
+ BASISPACKAGEPREFIX cibofficedevbasis
+ UREPACKAGEPREFIX cibofficedev
+ SOLSUREPACKAGEPREFIX cibofficedev
REGISTRYLAYERNAME LayerDev
UPDATEURL https://update.libreoffice.org/check.php
ADD_INCLUDE_FILES cli_ure/version/version.txt,unoil/climaker/version.txt
@@ -123,28 +123,28 @@ LibreOfficePoweredByCIBDev
CODEFILENAME codes_ooodev.txt
LOCALUSERDIR $ORIGIN/..
STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
- STARTCENTER_INFO_URL https://libreoffice.cib.eu
+ STARTCENTER_INFO_URL https://www.cib.de/office
STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
}
active 1
compression 5
script setup_osl
- downloadname LibreOfficePoweredByCIBDev_{productversion}_{os}_install_{languages}
- langpackdownloadname LibreOfficePoweredByCIBDev_{productversion}_languagepack_{os}_install_{languages}
- helppackdownloadname LibreOfficePoweredByCIBDev_{productversion}_helppack_{os}_install_{languages}
+ downloadname CIBOfficeDev_{productversion}_{os}_install_{languages}
+ langpackdownloadname CIBOfficeDev_{productversion}_languagepack_{os}_install_{languages}
+ helppackdownloadname CIBOfficeDev_{productversion}_helppack_{os}_install_{languages}
include {installscriptdir},{customtargetpath}/readlicense_oo/readme,{customtargetpath}/sysui/{pkgtype},{customtargetpath}/setup_native,{filelistpath}/PackageSet,{filelistpath}/GeneratedPackage,{filelistpath}/Package,{filelistpath}/ExtensionPackage,{filelistpath}/CustomTarget/helpcontent2/help3xsl/filelists,{extensionsdir},{licensepath},{packinfopath}
}
}
-LibreOfficePoweredByCIB_SDK
+CIBOffice_SDK
{
Settings
{
- downloadname LibreOfficePoweredByCIB-SDK_{packageversion}_{os}_install_{languages}
+ downloadname CIBOffice-SDK_{packageversion}_{os}_install_{languages}
variables
{
- PRODUCTNAME LibreOffice Powered By CIB
+ PRODUCTNAME CIB Office
PRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
PRODUCTEXTENSION .@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
POSTVERSIONEXTENSION SDK
@@ -164,7 +164,7 @@ LibreOfficePoweredByCIB_SDK
CHANGETARGETDIR 1
DONTUSESTARTMENUFOLDER 1
STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
- STARTCENTER_INFO_URL https://libreoffice.cib.eu
+ STARTCENTER_INFO_URL https://www.cib.de/office
STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
}
@@ -175,26 +175,26 @@ LibreOfficePoweredByCIB_SDK
}
}
-LibreOfficePoweredByCIBDev_SDK
+CIBOfficeDev_SDK
{
Settings
{
- downloadname LibreOfficePoweredByCIBDev-SDK_{packageversion}_{os}_install_{languages}
+ downloadname CIBOfficeDev-SDK_{packageversion}_{os}_install_{languages}
variables
{
- PRODUCTNAME LibreOfficePoweredByCIBDev
+ PRODUCTNAME CIBOfficeDev
PRODUCTVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
PRODUCTEXTENSION .@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
- WINDOWSBASISROOTNAME LibreOfficeDev @LIBO_VERSION_MAJOR@
- UNIXBASISROOTNAME libreofficedev@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
+ WINDOWSBASISROOTNAME CIBOfficeDev @LIBO_VERSION_MAJOR@
+ UNIXBASISROOTNAME cibofficedev@LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
POSTVERSIONEXTENSION SDK
BUNDLEIDENTIFIER @MACOSX_BUNDLE_IDENTIFIER@.SDK
BRANDPACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@
PACKAGEVERSION @LIBO_VERSION_MAJOR@.@LIBO_VERSION_MINOR@.@LIBO_VERSION_MICRO@.@LIBO_VERSION_PATCH@@LIBO_VERSION_SUFFIX@
PACKAGEREVISION {buildid}
BASISPACKAGEPREFIX lodevbasis
- UREPACKAGEPREFIX libreofficedev
- SOLSUREPACKAGEPREFIX libreofficedev
+ UREPACKAGEPREFIX cibofficedev
+ SOLSUREPACKAGEPREFIX cibofficedev
REGISTRYLAYERNAME LayerDev
DEVELOPMENTPRODUCT 1
PACK_INSTALLED 1
@@ -209,7 +209,7 @@ LibreOfficePoweredByCIBDev_SDK
CHANGETARGETDIR 1
DONTUSESTARTMENUFOLDER 1
STARTCENTER_ADDFEATURE_URL https://extensions.libreoffice.org/
- STARTCENTER_INFO_URL https://libreoffice.cib.eu
+ STARTCENTER_INFO_URL https://www.cib.de/office
STARTCENTER_TEMPLREP_URL https://templates.libreoffice.org/
DICT_REPO_URL https://extensions.libreoffice.org/dictionaries/
}
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 a72179ecb356..66a70a7c2d0e 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 c21a34d17eac..ba9ec42ce436 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/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 4760ab629313..ea133ea6c78c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -687,17 +687,22 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// all versions below 1.5.1
options.emplace_back("abort", reinterpret_cast<void*>(abort_handler));
bool hasStackSize = false;
+#ifdef UNX
+ // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
+ // in the class path in order to have applet support:
+ OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
+#endif
for (int i = 0; i < cOptions; i++)
{
OString opt(arOptions[i].optionString);
#ifdef UNX
- // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
- // in the class path in order to have applet support:
if (opt.startsWith("-Djava.class.path="))
{
- OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
if (!sAddPath.isEmpty())
+ {
opt += OStringChar(SAL_PATHSEPARATOR) + sAddPath;
+ sAddPath.clear();
+ }
}
#endif
if (opt == "-Xint") {
@@ -742,6 +747,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
}
#endif
}
+#ifdef UNX
+ if (!sAddPath.isEmpty()) {
+ options.emplace_back("-Djava.class.path=" + sAddPath, nullptr);
+ }
+#endif
std::unique_ptr<JavaVMOption[]> sarOptions(new JavaVMOption[options.size()]);
for (std::vector<Option>::size_type i = 0; i != options.size(); ++i) {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 32120308f932..6c40ca1de3a8 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -23,9 +23,12 @@
#include <cassert>
#include <memory>
+#include <rtl/bootstrap.hxx>
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
+#include <osl/file.hxx>
+#include <osl/process.h>
#include <osl/thread.hxx>
#include <jvmfwk/framework.hxx>
#include <vendorbase.hxx>
@@ -121,6 +124,40 @@ javaFrameworkError jfw_findAllJREs(std::vector<std::unique_ptr<JavaInfo>> *pparI
}
}
+std::vector<OUString> jfw_convertUserPathList(OUString const& sUserPath)
+{
+ std::vector<OUString> result;
+ sal_Int32 nIdx = 0;
+ do
+ {
+ sal_Int32 nextColon = sUserPath.indexOf(SAL_PATHSEPARATOR, nIdx);
+ OUString sToken(sUserPath.copy(nIdx, nextColon > 0 ? nextColon - nIdx
+ : sUserPath.getLength() - nIdx));
+
+ // Check if we are in bootstrap variable mode (class path starts with '$').
+ // Then the class path must be in URL format.
+ if (sToken.startsWith("$"))
+ {
+ // Detect open bootstrap variables - they might contain colons - we need to skip those.
+ sal_Int32 nBootstrapVarStart = sToken.indexOf("${");
+ if (nBootstrapVarStart >= 0)
+ {
+ sal_Int32 nBootstrapVarEnd = sToken.indexOf("}", nBootstrapVarStart);
+ if (nBootstrapVarEnd == -1)
+ {
+ // Current colon is part of bootstrap variable - skip it!
+ nextColon = sUserPath.indexOf(SAL_PATHSEPARATOR, nextColon + 1);
+ sToken = sUserPath.copy(nIdx, nextColon > 0 ? nextColon - nIdx
+ : sUserPath.getLength() - nIdx);
+ }
+ }
+ }
+ result.emplace_back(sToken);
+ nIdx = nextColon + 1;
+ } while (nIdx > 0);
+ return result;
+}
+
javaFrameworkError jfw_startVM(
JavaInfo const * pInfo, std::vector<OUString> const & arOptions,
JavaVM ** ppVM, JNIEnv ** ppEnv)
@@ -200,7 +237,23 @@ javaFrameworkError jfw_startVM(
return JFW_E_NEED_RESTART;
vmParams = settings.getVmParametersUtf8();
- sUserClassPath = jfw::makeClassPathOption(settings.getUserClassPath());
+ // Expand user classpath (might contain bootstrap vars)
+ OUString sUserPath(settings.getUserClassPath());
+ std::vector paths = jfw_convertUserPathList(sUserPath);
+ OUString sUserPathExpanded;
+ for (auto& path : paths)
+ {
+ if (!sUserPathExpanded.isEmpty())
+ sUserPathExpanded += OUStringChar(SAL_PATHSEPARATOR);
+ if (path.startsWith("$"))
+ {
+ OUString sURL = path;
+ rtl::Bootstrap::expandMacros(sURL);
+ osl::FileBase::getSystemPathFromFileURL(sURL, path);
+ }
+ sUserPathExpanded += path;
+ }
+ sUserClassPath = jfw::makeClassPathOption(sUserPathExpanded);
} // end mode FWK_MODE_OFFICE
else if (mode == jfw::JFW_MODE_DIRECT)
{
@@ -210,8 +263,12 @@ javaFrameworkError jfw_startVM(
//In direct mode the options are specified by bootstrap variables
//of the form UNO_JAVA_JFW_PARAMETER_1 .. UNO_JAVA_JFW_PARAMETER_n
vmParams = jfw::BootParams::getVMParameters();
- sUserClassPath =
- "-Djava.class.path=" + jfw::BootParams::getClasspath();
+ auto const cp = jfw::BootParams::getClasspath();
+ if (!cp.isEmpty())
+ {
+ sUserClassPath =
+ "-Djava.class.path=" + cp;
+ }
}
else
OSL_ASSERT(false);
@@ -219,6 +276,22 @@ javaFrameworkError jfw_startVM(
}
assert(pInfo != nullptr);
+#ifdef _WIN32
+ // Alternative JREs (AdoptOpenJDK, Azul Zulu) are missing the bin/ folder in
+ // java.library.path. Somehow setting java.library.path accordingly doesn't work,
+ // but the PATH gets picked up, so add it there.
+ // Without this hack, some features don't work in alternative JREs.
+ OUString sPATH;
+ osl_getEnvironment(OUString("PATH").pData, &sPATH.pData);
+ OUString sJRELocation;
+ osl::FileBase::getSystemPathFromFileURL(pInfo->sLocation + "/bin", sJRELocation);
+ if (sPATH.isEmpty())
+ sPATH = sJRELocation;
+ else
+ sPATH = sJRELocation + OUStringChar(SAL_PATHSEPARATOR) + sPATH;
+ osl_setEnvironment(OUString("PATH").pData, sPATH.pData);
+#endif // _WIN32
+
// create JavaVMOptions array that is passed to the plugin
// it contains the classpath and all options set in the
//options dialog
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index ece4dd2bd717..1a70000425e2 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -458,8 +458,10 @@ OString makeClassPathOption(OUString const & sUserClassPath)
sBufCP.append(sAppCP);
}
- sPaths = OUStringToOString(
- sBufCP.makeStringAndClear(), osl_getThreadTextEncoding());
+ sPaths = OUStringToOString(sBufCP.makeStringAndClear(), osl_getThreadTextEncoding());
+ if (sPaths.isEmpty()) {
+ return "";
+ }
OString sOptionClassPath = "-Djava.class.path=" + sPaths;
return sOptionClassPath;
diff --git a/librelogo/source/LibreLogo/LibreLogo.py b/librelogo/source/LibreLogo/LibreLogo.py
index 2fa16ed81822..57ce696d288e 100644
--- a/librelogo/source/LibreLogo/LibreLogo.py
+++ b/librelogo/source/LibreLogo/LibreLogo.py
@@ -401,7 +401,7 @@ def __translate__(arg = None):
text = selection.getString()
# remove comments and strings
text = re.sub(r"[ ]*;[^\n]*", "", re.sub(r"['„“‘«»「][^\n'”“‘’«»」]*['”“‘’«»」]", "", re.sub(r"^[ \t]*[;#][^\n]*", "", text)))
- text = " ".join(set(re.findall("(?u)\w+", text)) - set(re.findall("(?u)\w*\d+\w*", text))).lower() # only words
+ text = " ".join(set(re.findall(r"(?u)\w+", text)) - set(re.findall(r"(?u)\w*\d+\w*", text))).lower() # only words
ctx = uno.getComponentContext()
guess = ctx.ServiceManager.createInstanceWithContext("com.sun.star.linguistic2.LanguageGuessing", ctx)
guess.disableLanguages(guess.getEnabledLanguages())
@@ -424,7 +424,7 @@ def __translate__(arg = None):
text = re.sub(r"^(([ \t]*[;#][^\n]*))", __encodecomment__, text)
text = re.sub("(?u)([%s])((?:[^\n%s]|\\\\[%s])*)(?<!\\\\)[%s]" % (lq, rq, rq, rq), __encodestring__, selection.getString())
- text = re.sub('(?u)(?<![0-9])(")(~?\w*)', __encodestring__, text)
+ text = re.sub(r'(?u)(?<![0-9])(")(~?\w*)', __encodestring__, text)
text = re.sub(r";(([^\n]*))", __encodecomment__, text)
# translate the program to the language of the document FIXME space/tab
@@ -433,12 +433,12 @@ def __translate__(arg = None):
in2 = __l12n__(_.lng)['IN'].split("|")[0].upper()
if in1[0] == '-' and in2[0] != '-': # "for x y-in" -> "for x in y"
exception += ['IN']
- text = re.sub(r"(?ui)\b((?:%s) +:?\w+) +([^\n]+)(?:%s) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 %s \\2 " % in2, text)
- text = re.sub(r"(?ui)(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % in1, "%s \\1" % in2, text)
+ text = re.sub(r"(?ui)\b((?:%s) +:?\w+) +([^\n]+)(?:%s) +(?=[\[] |[\[]\n)" % (lang['FOR'], in1), "\\1 %s \\2 " % in2, text)
+ text = re.sub(r"(?ui)(:?\b\w+|[\[][^[\n]*])\b(?:%s)\b" % in1, "%s \\1" % in2, text)
elif in1[0] != '-' and in2[0] == '-': # "for x in y" -> "for x y-in"
exception += ['IN']
- text = re.sub(r"(?ui)(?<=\n)((?:%s)\b +:?\w+) +(?:%s) +([^\n]+?) +(?=[[] |[[]\n)" % (lang['FOR'], in1), "\\1 \\2%s " % in2, text)
- text = re.sub(r"(?ui)(?<!:)\b(?:%s) +(:?\b\w+|[[][^[\n]*])\b" % in1, "\\1%s" % in2, text)
+ text = re.sub(r"(?ui)(?<=\n)((?:%s)\b +:?\w+) +(?:%s) +([^\n]+?) +(?=[\[] |[\[]\n)" % (lang['FOR'], in1), "\\1 \\2%s " % in2, text)
+ text = re.sub(r"(?ui)(?<!:)\b(?:%s) +(:?\b\w+|[\[][^[\n]*])\b" % in1, "\\1%s" % in2, text)
for i in set(lang) - set(exception):
text = re.sub(r'(?ui)(?<!:)\b(%s)\b' % lang[i], __l12n__(_.lng)[i].split("|")[0].upper(), text)
text = re.sub(r"(?<=\d)[%s](?=\d)" % lang['DECIMAL'], __l12n__(_.lng)['DECIMAL'], text)
@@ -554,9 +554,9 @@ class LogoProgram(threading.Thread):
MessageBox(parent, __l12n__(_.lng)['ERR_ARGUMENTS'] % (__locname__('REPEAT'), 1, 0), caption, "errorbox")
else:
MessageBox(parent, __l12n__(_.lng)['ERR_NAME'] % \
- to_unicode(re.search("(?<=name ')[\w_]*(?=')", message).group(0)), caption, "errorbox")
+ to_unicode(re.search(r"(?<=name ')[\w_]*(?=')", message).group(0)), caption, "errorbox")
elif "TypeError" in message and "argument" in message and "given" in message:
- r = re.search("([\w_]*)[(][)][^\n]* (\w+) arguments? [(](\d+)", message) # XXX later: handle 'no arguments' + plural
+ r = re.search(r"([\w_]*)[(][)][^\n]* (\w+) arguments? [(](\d+)", message) # XXX later: handle 'no arguments' + plural
MessageBox(parent, __l12n__(_.lng)['ERR_ARGUMENTS'] % (__locname__(r.group(1)), r.group(2), r.group(3)), caption, "errorbox")
else:
origline = __compiled__.split("\n")[line-1]
@@ -1541,7 +1541,7 @@ def create_svg_animation(m):
def create_valid_svg_file(filename):
with open(filename, "r") as f:
s = f.read()
- s = re.sub('(?s)(<g\\sid="[^"]*)\(([^"]*)\)', '\\1\\2', s) # bad "(", ")" in xml:id
+ s = re.sub(r'(?s)(<g\sid="[^"]*)\(([^"]*)\)', '\\1\\2', s) # bad "(", ")" in xml:id
s = re.sub('(?s)<g\\sooo:[^>]*>', '', s) # remove non standard attributes
s = re.sub('(?s)<defs class="EmbeddedBulletChars">.*(?=<defs class="TextEmbeddedBitmaps")', '', s) # remove unused parts
s = re.sub('(?s)(<path stroke-width="[^"]*"[^<]*)stroke-width="[^"]*"', '\\1', s) # double stroke-width
@@ -1676,7 +1676,7 @@ def __loadlang__(lang, a):
[r"(?<!:)\b(?:%s)\b" % a['OUTPUT'], "\nreturn"],
[r"\n(if|while|return) [^\n]*", lambda r: re.sub("(?<![=!<>])=(?!=)", "==", r.group(0))], # = -> ==, XXX x = y = 1?
[r"(?<=\n)(for\b :?\w+) ([^\n]+)(?<=\w|]|}|\))(?=-|:)(?:%s)\b" % a['IN'], "\\1 in \\2"], # "for x y-in" -> "for x in y"
- [r"(:?\b\w+|[[][^[\n]*])\b(?:%s)\b" % a['IN'], "in \\1"], # "x y-in" -> "x in y"
+ [r"(:?\b\w+|[\[][^[\n]*])\b(?:%s)\b" % a['IN'], "in \\1"], # "x y-in" -> "x in y"
[r"(?<!:)\b(?:%s)\b" % a['IN'], "in"],
[r"(?<!:)\b(?:%s)\b[ \t]+(:?\w+)\b(?! in\b)" % a['FOR'], "\nfor \\1 in"],
[r"(?<=\n)__repeat__ :\n", "while True:\n"], # infinite loop
@@ -1755,7 +1755,7 @@ def __loadlang__(lang, a):
[r"(?<!:)\b(?:%s)\b ?\(" % a['RESUB'], "re.sub('(?u)'+"],
[r"(?<!:)\b(?:%s)\b ?\(" % a['REFINDALL'], "re.findall('(?u)'+"],
[r"(?<!:)\b(?:%s)\b" % a['ANY'], "u'any'"],
- [r"(?<!:)\b(?:%s) (\w+|[[][^\]]*])\b" % a['INPUT'], " Input(\\1)"],
+ [r"(?<!:)\b(?:%s) (\w+|[\[][^\]]*])\b" % a['INPUT'], " Input(\\1)"],
[r"(?<!:)\b(?:%s)\b" % a['PRINT'], "\nPrint"],
[r"(?<!:)\b(?:%s)\b" % a['TURNLEFT'], "\n)turnleft("],
[r"\b([0-9]+([,.][0-9]+)?)(%s)\b" % a['PT'], "\\1"],
@@ -1904,7 +1904,7 @@ def __compil__(s):
rq = '\'' + __l12n__(_.lng)['RIGHTSTRING'].replace("|", "")
__strings__ = []
s = re.sub("(?u)([%s])((?:[^\n%s]|\\\\[%s])*)(?<!\\\\)[%s]" % (lq, rq, rq, rq), __encodestring__, s)
- s = re.sub('(?u)(?<![0-9])(")(~?\w*)', __encodestring__, s)
+ s = re.sub(r'(?u)(?<![0-9])(")(~?\w*)', __encodestring__, s)
# remove extra spaces
s = chsp.sub(" ", s)
@@ -1918,7 +1918,7 @@ def __compil__(s):
# replace procedure names
s = re.sub(r"(?i)^[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "__def__ ", s)
s = re.sub(r"(?i)\n[ ]*(%s)[ ]+" % __l12n__(_.lng)['TO'], "\n__def__ ", s)
- subnames = re.findall(u"(?iu)(?<=__def__ )\w+", s)
+ subnames = re.findall(r"(?iu)(?<=__def__ )\w+", s)
globs = ""
functions = ["range", "__int__", "__float__", "Random", "Input", "__string__", "len", "round", "abs", "sin", "cos", "sqrt", "log10", "set", "list", "tuple", "re.sub", "re.search", "re.findall", "sorted", "min", "max"]
defaultfunc = ["Print"] # TODO handle all default procedures
@@ -1930,7 +1930,7 @@ def __compil__(s):
firstend = ends.split("|")[0]
s = re.sub(r"(?<!:)\b(?:%s)\b" % ends, firstend, s)
__l12n__(_.lng)["END"] = firstend
- functions += [ re.findall("(?u)\w+",i[0])[0] for i in re.findall(r"""(?iu)(?<=__def__ )([^\n]*)\n # beginning of a procedure
+ functions += [ re.findall(r"(?u)\w+",i[0])[0] for i in re.findall(r"""(?iu)(?<=__def__ )([^\n]*)\n # beginning of a procedure
(?:[^\n]*(?<!\b(%(END)s))\n)* # 0 or more lines (not END)
[^\n]*\b(?:%(OUTPUT)s)\b[^\n]*\n # line with OUTPUT (functions = procedures with OUTPUT)
(?:[^\n]*(?<!\b(?:%(END)s))\n)* # 0 or more lines (not END)
@@ -1939,7 +1939,7 @@ def __compil__(s):
# add line breaks before procedure calls
procedures = set(subnames) - set(functions)
if len(procedures) > 0:
- s = re.sub(r"(?<!__def__)(?<![-+=*/])(?<!%s)(?:^|[ \t]+)(" % ")(?<!".join(functions) + "|".join(procedures) + ")(?!\w)", r"\n\1", s)
+ s = re.sub(r"(?<!__def__)(?<![-+=*/])(?<!%s)(?:^|[ \t]+)(" % ")(?<!".join(functions) + "|".join(procedures) + r")(?!\w)", r"\n\1", s)
# substitute LibreLogo functions and specifiers with their Python equivalents
for i in __comp__[_.lng]:
@@ -1947,12 +1947,12 @@ def __compil__(s):
indent = 0 # Python indentation level
result = ""
- func = re.compile("(?iu)(def (\w+))(\(.*\):)")
+ func = re.compile(r"(?iu)(def (\w+))(\(.*\):)")
# compile to Python
subroutines = re.compile(r"(?iu)(?<!def )(?<![_\w])\b(%s)\b(?![\w(])" % "|".join(subnames + functions + defaultfunc))
operators = re.compile(r"(?iu)(%s)" % "(?:[ ]*([+*/<>]|//|==|<=|>=|<>|!=)[ ]*|[ ]*-[ ]+|(?<! )-[ ]*|[ ]*[*][*][ ]*)") # operators, eg. " - ", "-", "- "
- atoms = re.compile(r"(?iu)(%s)" % "[0-9]+([.,][0-9]+)?|:?\w+([.]\w)?")
+ atoms = re.compile(r"(?iu)(%s)" % r"[0-9]+([.,][0-9]+)?|:?\w+([.]\w)?")
# store argument numbers of all subroutines in dictionary "names"
names = {key: 1 for key in functions + defaultfunc}
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index 38e8c3162f08..1489cf14cfdb 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -499,7 +499,7 @@ void LwpDrawPolyLine::Read()
m_pStream->ReadUChar( m_aPolyLineRec.aPenColor.unused );
m_pStream->ReadUInt16( m_aPolyLineRec.nNumPoints );
- if (m_aPolyLineRec.nNumPoints > m_pStream->remainingSize() / 4)
+ if (!m_pStream->good() || m_aPolyLineRec.nNumPoints > m_pStream->remainingSize() / 4)
throw BadRead();
m_pVector.reset( new SdwPoint[m_aPolyLineRec.nNumPoints] );
@@ -579,7 +579,7 @@ void LwpDrawPolygon::Read()
ReadClosedObjStyle();
m_pStream->ReadUInt16( m_nNumPoints );
- if (m_nNumPoints > m_pStream->remainingSize() / 4)
+ if (!m_pStream->good() || m_nNumPoints > m_pStream->remainingSize() / 4)
throw BadRead();
m_pVector.reset( new SdwPoint[m_nNumPoints] );
@@ -1043,6 +1043,9 @@ void LwpDrawTextBox::Read()
m_pStream->ReadInt16( m_aTextRec.nTextRotation );
m_pStream->ReadInt16( m_aTextRec.nTextExtraSpacing );
+ if (!m_pStream->good())
+ throw BadRead();
+
// some draw files in version 1.2 have an extra byte following '\0'.
// can't rely on that, so read in the whole string into memory.
@@ -1089,6 +1092,9 @@ XFFrame* LwpDrawTextBox::CreateDrawObj(const OUString& rStyleName )
aEncoding = LwpCharSetMgr::GetTextCharEncoding();
}
+ if (TextLength < 2)
+ throw BadRead();
+
XFParagraph* pXFPara = new XFParagraph();
pXFPara->Add(OUString(reinterpret_cast<char*>(m_aTextRec.pTextString), (TextLength-2), aEncoding));
pXFPara->SetStyleName(rStyleName);
@@ -1194,17 +1200,17 @@ void LwpDrawTextArt::Read()
m_pStream->ReadInt16( m_aTextArtRec.nRotation );
sal_uInt16 nPointNumber;
- sal_Int16 nX, nY;
m_pStream->ReadUInt16( nPointNumber );
size_t nPoints = nPointNumber*3+1;
- if (nPoints > m_pStream->remainingSize() / 4)
+ if (!m_pStream->good() || nPoints > m_pStream->remainingSize() / 4)
throw BadRead();
m_aTextArtRec.aPath[0].n = nPointNumber;
m_aTextArtRec.aPath[0].pPts = new SdwPoint[nPoints];
for (size_t nPt = 0; nPt < nPoints; ++nPt)
{
+ sal_Int16 nX, nY;
m_pStream->ReadInt16( nX );
m_pStream->ReadInt16( nY );
m_aTextArtRec.aPath[0].pPts[nPt].x = nX;
@@ -1214,13 +1220,14 @@ void LwpDrawTextArt::Read()
m_pStream->ReadUInt16( nPointNumber );
nPoints = nPointNumber*3+1;
- if (nPoints > m_pStream->remainingSize() / 4)
+ if (!m_pStream->good() || nPoints > m_pStream->remainingSize() / 4)
throw BadRead();
m_aTextArtRec.aPath[1].n = nPointNumber;
m_aTextArtRec.aPath[1].pPts = new SdwPoint[nPoints];
for (size_t nPt = 0; nPt < nPoints; ++nPt)
{
+ sal_Int16 nX, nY;
m_pStream->ReadInt16( nX );
m_pStream->ReadInt16( nY );
m_aTextArtRec.aPath[1].pPts[nPt].x = nX;
@@ -1248,8 +1255,12 @@ void LwpDrawTextArt::Read()
- (m_aTextArtRec.aPath[1].n*3 + 1)*4;
+ if (!m_pStream->good())
+ throw BadRead();
if (m_aTextArtRec.nTextLen > m_pStream->remainingSize())
throw BadRead();
+ if (m_aTextArtRec.nTextLen < 1)
+ throw BadRead();
m_aTextArtRec.pTextString = new sal_uInt8 [m_aTextArtRec.nTextLen];
m_pStream->ReadBytes(m_aTextArtRec.pTextString, m_aTextArtRec.nTextLen);
@@ -1344,6 +1355,22 @@ LwpDrawBitmap::~LwpDrawBitmap()
{
}
+static bool IsValid(const BmpInfoHeader2& rHeader)
+{
+ if (rHeader.nPlanes != 1)
+ return false;
+
+ if (rHeader.nBitCount != 0 && rHeader.nBitCount != 1 &&
+ rHeader.nBitCount != 4 && rHeader.nBitCount != 8 &&
+ rHeader.nBitCount != 16 && rHeader.nBitCount != 24 &&
+ rHeader.nBitCount != 32)
+ {
+ return false;
+ }
+
+ return true;
+}
+
/**
* @descr reading function of class LwpDrawBitmap
*/
@@ -1353,25 +1380,38 @@ void LwpDrawBitmap::Read()
m_pStream->ReadUInt16( m_aBmpRec.nRotation );
// 20 == length of draw-specific fields.
- // 14 == length of bmp file header.
- m_aBmpRec.nFileSize = m_aObjHeader.nRecLen - 20 + 14;
- m_pImageData.reset( new sal_uInt8 [m_aBmpRec.nFileSize] );
+ if (m_aObjHeader.nRecLen < 20)
+ throw BadRead();
+
+ sal_uInt64 nBmpPos = m_pStream->Tell();
+ sal_uInt64 nBmpLen =
+ std::min<sal_uInt64>(m_aObjHeader.nRecLen - 20, m_pStream->remainingSize());
BmpInfoHeader2 aInfoHeader2;
m_pStream->ReadUInt32( aInfoHeader2.nHeaderLen );
+ if (!m_pStream->good() || nBmpLen < aInfoHeader2.nHeaderLen)
+ throw BadRead();
+
sal_uInt32 N;
sal_uInt32 rgbTableSize;
if (aInfoHeader2.nHeaderLen == sizeof(BmpInfoHeader))
{
- m_pStream->ReadUInt32( aInfoHeader2.nWidth );
- m_pStream->ReadUInt32( aInfoHeader2.nHeight );
+ sal_uInt16 nTmp;
+
+ m_pStream->ReadUInt16( nTmp );
+ aInfoHeader2.nWidth = nTmp;
+ m_pStream->ReadUInt16( nTmp );
+ aInfoHeader2.nHeight = nTmp;
m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
+ if (!m_pStream->good() || !IsValid(aInfoHeader2))
+ throw BadRead();
+
N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
- if (N == 24)
+ if (N >= 16)
{
rgbTableSize = 0;
}
@@ -1380,14 +1420,18 @@ void LwpDrawBitmap::Read()
rgbTableSize = 3 * (1 << N);
}
}
- else
+ else if (aInfoHeader2.nHeaderLen >= sizeof(BmpInfoHeader2))
{
m_pStream->ReadUInt32( aInfoHeader2.nWidth );
m_pStream->ReadUInt32( aInfoHeader2.nHeight );
m_pStream->ReadUInt16( aInfoHeader2.nPlanes );
m_pStream->ReadUInt16( aInfoHeader2.nBitCount );
+
+ if (!m_pStream->good() || !IsValid(aInfoHeader2))
+ throw BadRead();
+
N = aInfoHeader2.nPlanes * aInfoHeader2.nBitCount;
- if (N == 24)
+ if (N >= 16)
{
rgbTableSize = 0;
}
@@ -1395,8 +1439,14 @@ void LwpDrawBitmap::Read()
{
rgbTableSize = 4 * (1 << N);
}
-
}
+ else
+ {
+ throw BadRead();
+ }
+
+ m_aBmpRec.nFileSize = static_cast<sal_uInt32>(nBmpLen + 14);
+ m_pImageData.reset( new sal_uInt8 [m_aBmpRec.nFileSize] );
sal_uInt32 nOffBits = 14 + aInfoHeader2.nHeaderLen + rgbTableSize;
m_pImageData[0] = 'B';
@@ -1414,50 +1464,11 @@ void LwpDrawBitmap::Read()
m_pImageData[12] = static_cast<sal_uInt8>(nOffBits >> 16);
m_pImageData[13] = static_cast<sal_uInt8>(nOffBits >> 24);
- sal_uInt32 nDIBRemaining;
sal_uInt8* pPicData = m_pImageData.get();
- if (aInfoHeader2.nHeaderLen== sizeof(BmpInfoHeader))
- {
- m_pImageData[14] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen);
- m_pImageData[15] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 8);
- m_pImageData[16] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 16);
- m_pImageData[17] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 24);
- m_pImageData[18] = static_cast<sal_uInt8>(aInfoHeader2.nWidth);
- m_pImageData[19] = static_cast<sal_uInt8>(aInfoHeader2.nWidth >> 8);
- m_pImageData[20] = static_cast<sal_uInt8>(aInfoHeader2.nHeight);
- m_pImageData[21] = static_cast<sal_uInt8>(aInfoHeader2.nHeight >> 8);
- m_pImageData[22] = static_cast<sal_uInt8>(aInfoHeader2.nPlanes);
- m_pImageData[23] = static_cast<sal_uInt8>(aInfoHeader2.nPlanes >> 8);
- m_pImageData[24] = static_cast<sal_uInt8>(aInfoHeader2.nBitCount);
- m_pImageData[25] = static_cast<sal_uInt8>(aInfoHeader2.nBitCount >> 8);
-
- nDIBRemaining = m_aBmpRec.nFileSize - 26;
- pPicData += 26*sizeof(sal_uInt8);
- }
- else
- {
- m_pImageData[14] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen);
- m_pImageData[15] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 8);
- m_pImageData[16] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 16);
- m_pImageData[17] = static_cast<sal_uInt8>(aInfoHeader2.nHeaderLen >> 24);
- m_pImageData[18] = static_cast<sal_uInt8>(aInfoHeader2.nWidth);
- m_pImageData[19] = static_cast<sal_uInt8>(aInfoHeader2.nWidth >> 8);
- m_pImageData[20] = static_cast<sal_uInt8>(aInfoHeader2.nWidth >> 16);
- m_pImageData[21] = static_cast<sal_uInt8>(aInfoHeader2.nWidth >> 24);
- m_pImageData[22] = static_cast<sal_uInt8>(aInfoHeader2.nHeight);
- m_pImageData[23] = static_cast<sal_uInt8>(aInfoHeader2.nHeight >> 8);
- m_pImageData[24] = static_cast<sal_uInt8>(aInfoHeader2.nHeight >> 16);
- m_pImageData[25] = static_cast<sal_uInt8>(aInfoHeader2.nHeight >> 24);
- m_pImageData[26] = static_cast<sal_uInt8>(aInfoHeader2.nPlanes);
- m_pImageData[27] = static_cast<sal_uInt8>(aInfoHeader2.nPlanes >> 8);
- m_pImageData[28] = static_cast<sal_uInt8>(aInfoHeader2.nBitCount);
- m_pImageData[29] = static_cast<sal_uInt8>(aInfoHeader2.nBitCount >> 8);
-
- nDIBRemaining = m_aBmpRec.nFileSize - 30;
- pPicData += 30*sizeof(sal_uInt8);
- }
- m_pStream->ReadBytes(pPicData, nDIBRemaining);
+ m_pStream->Seek(nBmpPos);
+ if (nBmpLen != m_pStream->ReadBytes(pPicData + 14, nBmpLen))
+ throw BadRead();
}
OUString LwpDrawBitmap::RegisterStyle()
diff --git a/lotuswordpro/source/filter/lwpfribptr.cxx b/lotuswordpro/source/filter/lwpfribptr.cxx
index f1d9917de8bf..8eabe7099883 100644
--- a/lotuswordpro/source/filter/lwpfribptr.cxx
+++ b/lotuswordpro/source/filter/lwpfribptr.cxx
@@ -85,7 +85,8 @@
#include <lwpdropcapmgr.hxx>
LwpFribPtr::LwpFribPtr()
- : m_pFribs(nullptr),m_pXFPara(nullptr),m_pPara(nullptr)
+ : m_pFribs(nullptr)
+ , m_pPara(nullptr)
{
}
@@ -174,7 +175,7 @@ void LwpFribPtr::XFConvert()
case FRIB_TAG_TEXT:
{
LwpFribText* textFrib= static_cast<LwpFribText*>(pFrib);
- textFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+ textFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
}
break;
case FRIB_TAG_TAB:
@@ -246,7 +247,7 @@ void LwpFribPtr::XFConvert()
case FRIB_TAG_UNICODE3: //fall through
{
LwpFribUnicode* unicodeFrib= static_cast<LwpFribUnicode*>(pFrib);
- unicodeFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+ unicodeFrib->XFConvert(m_pXFPara.get(), m_pPara->GetStory());
}
break;
case FRIB_TAG_HARDSPACE:
@@ -255,15 +256,15 @@ void LwpFribPtr::XFConvert()
LwpStory *pStory = m_pPara->GetStory();
LwpHyperlinkMgr* pHyperlink = pStory ? pStory->GetHyperlinkMgr() : nullptr;
if (pHyperlink && pHyperlink->GetHyperlinkFlag())
- pFrib->ConvertHyperLink(m_pXFPara,pHyperlink,sHardSpace);
+ pFrib->ConvertHyperLink(m_pXFPara.get(), pHyperlink,sHardSpace);
else
- pFrib->ConvertChars(m_pXFPara,sHardSpace);
+ pFrib->ConvertChars(m_pXFPara.get(), sHardSpace);
}
break;
case FRIB_TAG_SOFTHYPHEN:
{
OUString sSoftHyphen(u'\x00ad');
- pFrib->ConvertChars(m_pXFPara,sSoftHyphen);
+ pFrib->ConvertChars(m_pXFPara.get(), sSoftHyphen);
}
break;
case FRIB_TAG_FRAME:
@@ -275,64 +276,64 @@ void LwpFribPtr::XFConvert()
LwpFoundry* pFoundry = m_pPara->GetFoundry();
LwpDropcapMgr* pMgr = pFoundry ? pFoundry->GetDropcapMgr() : nullptr;
if (pMgr)
- pMgr->SetXFPara(m_pXFPara);
+ pMgr->SetXFPara(m_pXFPara.get());
}
- frameFrib->XFConvert(m_pXFPara);
+ frameFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_CHBLOCK:
{
LwpFribCHBlock* chbFrib = static_cast<LwpFribCHBlock*>(pFrib);
- chbFrib->XFConvert(m_pXFPara,m_pPara->GetStory());
+ chbFrib->XFConvert(m_pXFPara.get(),m_pPara->GetStory());
}
break;
case FRIB_TAG_TABLE:
{
LwpFribTable* tableFrib = static_cast<LwpFribTable*>(pFrib);
//tableFrib->XFConvert(m_pPara->GetXFContainer());
- tableFrib->XFConvert(m_pXFPara);
+ tableFrib->XFConvert(m_pXFPara.get());
}
break;
case FRIB_TAG_BOOKMARK:
{
LwpFribBookMark* bookmarkFrib = static_cast<LwpFribBookMark*>(pFrib);
- bookmarkFrib->XFConvert(m_pXFPara);
+ bookmarkFrib->XFConvert(m_pXFPara.get());
}
break;
case FRIB_TAG_FOOTNOTE:
{
LwpFribFootnote* pFootnoteFrib = static_cast<LwpFribFootnote*>(pFrib);
- pFootnoteFrib->XFConvert(m_pXFPara);
+ pFootnoteFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_FIELD:
{
LwpFribField* fieldFrib = static_cast<LwpFribField*>(pFrib);
- fieldFrib->XFConvert(m_pXFPara);
+ fieldFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_NOTE:
{
LwpFribNote* pNoteFrib = static_cast<LwpFribNote*>(pFrib);
- pNoteFrib->XFConvert(m_pXFPara);
+ pNoteFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_PAGENUMBER:
{
LwpFribPageNumber* pagenumFrib = static_cast<LwpFribPageNumber*>(pFrib);
- pagenumFrib->XFConvert(m_pXFPara);
+ pagenumFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_DOCVAR:
{
LwpFribDocVar* docFrib = static_cast<LwpFribDocVar*>(pFrib);
- docFrib->XFConvert(m_pXFPara);
+ docFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_RUBYMARKER:
{
LwpFribRubyMarker* rubyFrib = static_cast<LwpFribRubyMarker*>(pFrib);
- rubyFrib->XFConvert(m_pXFPara);
+ rubyFrib->XFConvert(m_pXFPara.get());
break;
}
case FRIB_TAG_RUBYFRAME:
diff --git a/lotuswordpro/source/filter/lwpfribptr.hxx b/lotuswordpro/source/filter/lwpfribptr.hxx
index d59cb81ca0d4..847690242911 100644
--- a/lotuswordpro/source/filter/lwpfribptr.hxx
+++ b/lotuswordpro/source/filter/lwpfribptr.hxx
@@ -75,13 +75,13 @@ public:
void ReadPara(LwpObjectStream* pObjStrm);
private:
LwpFrib* m_pFribs;
- XFParagraph* m_pXFPara;//Current XFPara used for frib parsing
+ rtl::Reference<XFParagraph> m_pXFPara; //Current XFPara used for frib parsing
LwpPara* m_pPara;//for get foundry
static void ProcessDropcap(LwpStory* pStory, const LwpFrib* pFrib,sal_uInt32 nLen);
public:
void XFConvert();
void SetXFPara(XFParagraph* Para){m_pXFPara = Para;}
- XFParagraph* GetXFPara(){return m_pXFPara;}
+ XFParagraph* GetXFPara() { return m_pXFPara.get(); }
void SetPara(LwpPara* para){m_pPara=para;}
void RegisterStyle();
LwpFrib* GetFribs(){return m_pFribs;}
diff --git a/o3tl/CppunitTest_o3tl_tests.mk b/o3tl/CppunitTest_o3tl_tests.mk
index 152fa48c72ca..7dd43402c7ab 100644
--- a/o3tl/CppunitTest_o3tl_tests.mk
+++ b/o3tl/CppunitTest_o3tl_tests.mk
@@ -32,7 +32,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,o3tl_tests,\
o3tl/qa/test-lru_map \
o3tl/qa/test-safeint \
o3tl/qa/test-sorted_vector \
- o3tl/qa/test-span \
+ o3tl/qa/test-string_view \
o3tl/qa/test-typed_flags \
o3tl/qa/test-vector_pool \
))
diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx
new file mode 100644
index 000000000000..977cfebc460a
--- /dev/null
+++ b/o3tl/qa/test-string_view.cxx
@@ -0,0 +1,212 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sal/config.h>
+
+#include <stdexcept>
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <o3tl/string_view.hxx>
+
+namespace {
+
+class Test: public CppUnit::TestFixture {
+private:
+ CPPUNIT_TEST_SUITE(Test);
+ CPPUNIT_TEST(testCharLiteral);
+ CPPUNIT_TEST(testChar16Literal);
+ CPPUNIT_TEST(testChar32Literal);
+ CPPUNIT_TEST(testWcharLiteral);
+ CPPUNIT_TEST(testOperations);
+ CPPUNIT_TEST_SUITE_END();
+
+ void testCharLiteral() {
+ char * const s1 = const_cast<char *>("foo");
+ o3tl::string_view v1(s1);
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v1.size());
+ char const * const s2 = "foo";
+ o3tl::string_view v2(s2);
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v2.size());
+ char s3[] = "foo";
+ o3tl::string_view v3(s3);
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v3.size());
+ o3tl::string_view v4("foo");
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v4.size());
+ }
+
+ void testChar16Literal() {
+ char16_t * const s1 = const_cast<char16_t *>(u"foo");
+ o3tl::u16string_view v1(s1);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u16string_view::size_type(3), v1.size());
+ char16_t const * const s2 = u"foo";
+ o3tl::u16string_view v2(s2);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u16string_view::size_type(3), v2.size());
+ char16_t s3[] = u"foo";
+ o3tl::u16string_view v3(s3);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u16string_view::size_type(3), v3.size());
+ o3tl::u16string_view v4(u"foo");
+ CPPUNIT_ASSERT_EQUAL(o3tl::u16string_view::size_type(3), v4.size());
+ }
+
+ void testChar32Literal() {
+ char32_t * const s1 = const_cast<char32_t *>(U"foo");
+ o3tl::u32string_view v1(s1);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u32string_view::size_type(3), v1.size());
+ char32_t const * const s2 = U"foo";
+ o3tl::u32string_view v2(s2);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u32string_view::size_type(3), v2.size());
+ char32_t s3[] = U"foo";
+ o3tl::u32string_view v3(s3);
+ CPPUNIT_ASSERT_EQUAL(o3tl::u32string_view::size_type(3), v3.size());
+ o3tl::u32string_view v4(U"foo");
+ CPPUNIT_ASSERT_EQUAL(o3tl::u32string_view::size_type(3), v4.size());
+ }
+
+ void testWcharLiteral() {
+ wchar_t * const s1 = const_cast<wchar_t *>(L"foo");
+ o3tl::wstring_view v1(s1);
+ CPPUNIT_ASSERT_EQUAL(o3tl::wstring_view::size_type(3), v1.size());
+ wchar_t const * const s2 = L"foo";
+ o3tl::wstring_view v2(s2);
+ CPPUNIT_ASSERT_EQUAL(o3tl::wstring_view::size_type(3), v2.size());
+ wchar_t s3[] = L"foo";
+ o3tl::wstring_view v3(s3);
+ CPPUNIT_ASSERT_EQUAL(o3tl::wstring_view::size_type(3), v3.size());
+ o3tl::wstring_view v4(L"foo");
+ CPPUNIT_ASSERT_EQUAL(o3tl::wstring_view::size_type(3), v4.size());
+ }
+
+ void testOperations() {
+ o3tl::string_view const v("fox");
+ auto npos = o3tl::string_view::npos;
+ // o3tl::basic_string_view::npos will be (implicitly) inline with
+ // C++17, but for now can't be passed as 'const T& expected'
+ // argument into CppUnit::assertEquals, so take this detour
+ CPPUNIT_ASSERT_EQUAL('f', *v.begin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::difference_type(3), v.end() - v.begin());
+ CPPUNIT_ASSERT_EQUAL('f', *v.cbegin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::difference_type(3), v.cend() - v.cbegin());
+ CPPUNIT_ASSERT_EQUAL('x', *v.rbegin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::difference_type(3), v.rend() - v.rbegin());
+ CPPUNIT_ASSERT_EQUAL('x', *v.crbegin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::difference_type(3), v.crend() - v.crbegin());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v.size());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v.length());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::npos - 1, v.max_size());
+ CPPUNIT_ASSERT(!v.empty());
+ CPPUNIT_ASSERT_EQUAL('o', v[1]);
+ try {
+ v.at(o3tl::string_view::npos);
+ CPPUNIT_FAIL("missing exception");
+ } catch (std::out_of_range &) {}
+ CPPUNIT_ASSERT_EQUAL('f', v.at(0));
+ CPPUNIT_ASSERT_EQUAL('x', v.at(2));
+ try {
+ v.at(3);
+ CPPUNIT_FAIL("missing exception");
+ } catch (std::out_of_range &) {}
+ CPPUNIT_ASSERT_EQUAL('f', v.front());
+ CPPUNIT_ASSERT_EQUAL('x', v.back());
+ CPPUNIT_ASSERT_EQUAL('f', *v.data());
+ {
+ o3tl::string_view v1("fox");
+ v1.remove_prefix(2);
+ CPPUNIT_ASSERT_EQUAL('x', v1.front());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v1.size());
+ }
+ {
+ o3tl::string_view v1("fox");
+ v1.remove_suffix(2);
+ CPPUNIT_ASSERT_EQUAL('f', v1.front());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v1.size());
+ }
+ {
+ o3tl::string_view v1("fox");
+ o3tl::string_view v2("giraffe");
+ v1.swap(v2);
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(7), v1.size());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(3), v2.size());
+ }
+ {
+ char a[2];
+ auto n = v.copy(a, 10, 1);
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(2), n);
+ CPPUNIT_ASSERT_EQUAL('o', a[0]);
+ CPPUNIT_ASSERT_EQUAL('x', a[1]);
+ }
+ {
+ auto v1 = v.substr(1);
+ CPPUNIT_ASSERT_EQUAL('o', v1.front());
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(2), v1.size());
+ }
+ CPPUNIT_ASSERT(v.compare(o3tl::string_view("foo")) > 0);
+ CPPUNIT_ASSERT(v.compare(0, 2, o3tl::string_view("foo")) < 0);
+ CPPUNIT_ASSERT_EQUAL(
+ 0, v.compare(0, 2, o3tl::string_view("foo"), 0, 2));
+ CPPUNIT_ASSERT_EQUAL(0, v.compare("fox"));
+ CPPUNIT_ASSERT(v.compare(1, 2, "abc") > 0);
+ CPPUNIT_ASSERT_EQUAL(0, v.compare(1, 2, "oxx", 2));
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v.find("ox"));
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v.find('o'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find("oxx", 0, 2));
+ CPPUNIT_ASSERT_EQUAL(npos, v.find("oxx"));
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v.rfind("ox"));
+ CPPUNIT_ASSERT_EQUAL(o3tl::string_view::size_type(1), v.rfind('o'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1),
+ v.rfind("oxx", o3tl::string_view::npos, 2));
+ CPPUNIT_ASSERT_EQUAL(npos, v.rfind("oxx"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_of("nop"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_of('o'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_of("nofx", 0, 2));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(0), v.find_first_of("nofx"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_last_of("nop"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_last_of('o'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1),
+ v.find_last_of("nofx", o3tl::string_view::npos, 2));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(2), v.find_last_of("nofx"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_not_of("fx"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_not_of('f'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_first_not_of("fxo", 0, 2));
+ CPPUNIT_ASSERT_EQUAL(npos, v.find_first_not_of("fxo"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_last_not_of("fx"));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1), v.find_last_not_of('x'));
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::string_view::size_type(1),
+ v.find_last_not_of("fxo", o3tl::string_view::npos, 2));
+ CPPUNIT_ASSERT_EQUAL(npos, v.find_last_not_of("fxo"));
+ }
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/odk/build-examples_common.mk b/odk/build-examples_common.mk
index 50ea40ec905e..f05220f3f635 100644
--- a/odk/build-examples_common.mk
+++ b/odk/build-examples_common.mk
@@ -48,7 +48,7 @@ endif
$(foreach my_dir,$(2), \
&& (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \
&& printf 'yes\n' | LC_ALL=C make \
- CC="$(CXX)" LINK="$(CXX)" LIB="$(CXX)" \
+ CC="$(CXX) $(if $(filter GCC,$(COM)),-std=c++11)" LINK="$(CXX)" LIB="$(CXX)" \
$(if $(MACOSX_SHELL_HACK), SHELL=$(ODK_BUILD_SHELL), )))) \
>$(call gb_CustomTarget_get_workdir,$(1))/log 2>&1 \
|| (RET=$$$$? \
diff --git a/offapi/com/sun/star/text/ViewSettings.idl b/offapi/com/sun/star/text/ViewSettings.idl
index 5de3bf8d6dd5..b0afa27c46e8 100644
--- a/offapi/com/sun/star/text/ViewSettings.idl
+++ b/offapi/com/sun/star/text/ViewSettings.idl
@@ -278,6 +278,12 @@ published service ViewSettings
*/
[optional, property] boolean UseHeaderFooterMenu;
+ /** If this property is `TRUE`, bookmark positions are displayed.
+
+ @since LibreOffice 7.0
+ */
+ [optional, property] boolean ShowBookmarks;
+
};
}; }; }; };
diff --git a/offapi/com/sun/star/view/PrintOptions.idl b/offapi/com/sun/star/view/PrintOptions.idl
index 4ed8b23baaf0..4bef0fec5288 100644
--- a/offapi/com/sun/star/view/PrintOptions.idl
+++ b/offapi/com/sun/star/view/PrintOptions.idl
@@ -80,6 +80,14 @@ published service PrintOptions
/** advises the printer to create a single print job for each copy.
*/
[optional, property] boolean SinglePrintJobs;
+
+ /** The job name which is sent to the printer (can be seen in the Printer job queue).
+ *
+ * If omitted, the document title will be used as default.
+ *
+ * @since LibreOffice 7.5
+ */
+ [optional, property] boolean JobName;
};
diff --git a/officecfg/files.mk b/officecfg/files.mk
index 3d3a5079f622..9a4b688391a0 100644
--- a/officecfg/files.mk
+++ b/officecfg/files.mk
@@ -77,6 +77,7 @@ officecfg_XCSFILES := \
Office/UI/GenericCommands \
Office/UI/GlobalSettings \
Office/UI/ImpressWindowState \
+ Office/UI/Infobar \
Office/UI/MathCommands \
Office/UI/MathWindowState \
Office/UI/ReportCommands \
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 0472de91f20e..2a958ddbcda9 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -781,7 +781,7 @@
<value>10</value>
</prop>
<prop oor:name="VersionIdentifiers">
- <value oor:separator=",">Libreoffice 3=libreoffice/3,Openoffice.org 3=openoffice.org/3,OpenOffice.org 2=openoffice.org2,StarOffice 8=staroffice8,StarSuite 8=starsuite8</value>
+ <value oor:separator=",">LibreOffice=libreoffice/4,LibreOffice powered by CIB=libreofficepoweredbycib/4,Libreoffice 3=libreoffice/3,Openoffice.org 3=openoffice.org/3,OpenOffice.org 2=openoffice.org2,StarOffice 8=staroffice8,StarSuite 8=starsuite8</value>
</prop>
<node oor:name="MigrationSteps">
<node oor:name="Datasources" oor:op="replace">
@@ -881,9 +881,13 @@
<it>/org.openoffice.Office.Common/Misc/DisableUICustomization</it>
<it>/org.openoffice.Office.Common/Misc/ExperimentalMode</it>
<it>/org.openoffice.Office.Common/Misc/FormControlPilotsEnabled</it>
+ <it>/org.openoffice.Office.Common/Misc/LastTipOfTheDayID</it>
+ <it>/org.openoffice.Office.Common/Misc/LastTipOfTheDayShown</it>
<it>/org.openoffice.Office.Common/Misc/MacroRecorderMode</it>
+ <it>/org.openoffice.Office.Common/Misc/PersonaSettings</it>
<it>/org.openoffice.Office.Common/Misc/PluginsEnabled</it>
<it>/org.openoffice.Office.Common/Misc/ShowLinkWarningDialog</it>
+ <it>/org.openoffice.Office.Common/Misc/ShowTipOfTheDay</it>
<it>/org.openoffice.Office.Common/Misc/SymbolSet</it>
<it>/org.openoffice.Office.Common/Misc/SymbolStyle</it>
<it>/org.openoffice.Office.Common/Misc/ToolboxStyle</it>
@@ -962,7 +966,10 @@
</node>
<node oor:name="Setup" oor:op="replace">
<prop oor:name="IncludedNodes">
- <value>/org.openoffice.Setup/Office/Factories</value>
+ <value>
+ <it>/org.openoffice.Setup/Office/Factories</it>
+ <it>/org.openoffice.Setup/L10N</it>
+ </value>
</prop>
</node>
<node oor:name="UI" oor:op="replace">
diff --git a/officecfg/registry/schema/org/openoffice/Inet.xcs b/officecfg/registry/schema/org/openoffice/Inet.xcs
index 76d5d2ed0912..95d38403d19d 100644
--- a/officecfg/registry/schema/org/openoffice/Inet.xcs
+++ b/officecfg/registry/schema/org/openoffice/Inet.xcs
@@ -26,6 +26,12 @@
<info>
<desc>Contains Internet-related configurations (servers, proxies, etc.).</desc>
</info>
+ <prop oor:name="WebDAVCurl" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Use curl HTTP/WebDAV UCP instead of neon one.</desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="ooInetNoProxy" oor:type="xs:string" oor:nillable="false">
<!-- OldPath: Inet/NoProxy -->
<!-- OldLocation: soffice.ini -->
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index ffa8f99b0814..b47794f128c4 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>
@@ -2487,6 +2503,14 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="ViewPositionForAnyUser" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Determines if the view position of the document is loaded with
+ a document even if it was saved by a different user.
+ </desc>
+ </info>
+ <value>false</value>
+ </prop>
<prop oor:name="ShowOfficeUpdateDialog" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Specifies whether the office update dialog should be shown in
@@ -2708,6 +2732,28 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="CheckDocumentEvents" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Warn on load when a document binds an event to a macro</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="AllowedDocumentEventURLs" oor:type="oor:string-list">
+ <info>
+ <desc>List of script URLS which are allowed to be called by document events.
+ Look into content.xml of the odf file to find the URL.
+ You can either write the full URL, a part of it (starting from the beginning),
+ or use regular expressions.
+ Examples:
+ * vnd.sun.star.script:Standard.Module1.Main?language=Basic&amp;location=user
+ * vnd.sun.star.script:Standard.Module1
+ * vnd.sun.star.script:YourScript.*location=share
+ * .*location=application.*
+
+ When this list is empty, all document event URLs are allowed.
+ </desc>
+ </info>
+ </prop>
<set oor:name="TrustedAuthors" oor:node-type="TrustedAuthor">
<info>
<desc>List with trusted authors.</desc>
@@ -5443,6 +5489,15 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="TempFileNextToLocalFile" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Determines if temp files are placed next to the local file when a file is saved.
+ If this is false, the temp file will be placed in the default temp directory.
+ Placing the temp file next to the local file will increase performance, but it might lead
+ to permission issues such as described in this bug: https://bugs.documentfoundation.org/show_bug.cgi?id=158975</desc>
+ </info>
+ <value>true</value>
+ </prop>
<prop oor:name="UseDocumentOOoLockFile" oor:type="xs:boolean" oor:nillable="false">
<info>
<desc>Allows to specify whether the OOo document file locking
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs
new file mode 100644
index 000000000000..af0434046770
--- /dev/null
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Infobar.xcs
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ *
+-->
+<!DOCTYPE oor:component-schema SYSTEM "../../../../../component-schema.dtd">
+<oor:component-schema xmlns:oor="http://openoffice.org/2001/registry" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" oor:name="Infobar" oor:package="org.openoffice.Office.UI" xml:lang="en-US">
+ <info>
+ <desc>Infobar configuration.</desc>
+ </info>
+ <template></template>
+ <component>
+ <group oor:name="Enabled">
+ <info>
+ <desc>Which Infobars are enabled.</desc>
+ </info>
+ <prop oor:name="Readonly" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Whether the Infobar shown in read-only docs is enabled</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Signature" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Whether the Infobar showing the Digital Signature state is enabled</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="Donate" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Whether the Infobar showing the call for donations is enabled</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="GetInvolved" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Whether the Infobar showing the call to 'Get Involved' is enabled</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="HyphenationMissing" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Whether an Infobar is shown when Hyphenation Info is missing for a document</desc>
+ </info>
+ <value>true</value>
+ </prop>
+ </group>
+ </component>
+</oor:component-schema>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index 6ba34c5338ff..88ac40f5057d 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1071,6 +1071,39 @@
</info>
<value>true</value>
</prop>
+ <prop oor:name="ShowWarningHiddenSection" oor:type="xs:boolean" oor:nillable="false">
+ <!-- UIHints: Not accessible via user interface -->
+ <info>
+ <desc>Enables the writer to prevent the display of a warning dialog for hidden text (sections, etc) deletion.</desc>
+ <label>Show warning dialog for hidden text deletion</label>
+ </info>
+ <value>true</value>
+ </prop>
+ <prop oor:name="DefaultAnchor" oor:type="xs:int" oor:nillable="false">
+ <!-- UIHints: Tools - Options - Writer - View - Default Anchor -->
+ <info>
+ <desc>Specifies the anchor of newly inserted images.</desc>
+ <label>Default Anchor</label>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>FLY_TO_PARA</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>FLY_TO_CHAR</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>FLY_AS_CHAR</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>1</value>
+ </prop>
</group>
<group oor:name="NonprintingCharacter">
<info>
@@ -1172,6 +1205,14 @@
</info>
<value>false</value>
</prop>
+ <prop oor:name="Bookmarks" oor:type="xs:boolean" oor:nillable="false">
+ <!-- UIHints: Tools - Options - Text document Formatting aids - [Section] Display formatting -->
+ <info>
+ <desc>Specifies whether bookmark positions are displayed on the screen.</desc>
+ <label>Bookmarks</label>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="Update">
<info>
diff --git a/oox/qa/unit/CryptoTest.cxx b/oox/qa/unit/CryptoTest.cxx
index 47d567fab34b..38aad4dff4b8 100644
--- a/oox/qa/unit/CryptoTest.cxx
+++ b/oox/qa/unit/CryptoTest.cxx
@@ -83,6 +83,15 @@ void CryptoTest::testCryptoHash()
}
{
+ oox::core::CryptoHash aCryptoHash(aKey, oox::core::CryptoHashType::SHA384);
+ aCryptoHash.update(aContent);
+ std::vector<sal_uInt8> aHash = aCryptoHash.finalize();
+ CPPUNIT_ASSERT_EQUAL(std::string("d7f4727e2c0b39ae0f1e40cc96f60242d5b7801841cea6fc592c5d3e1"
+ "ae50700582a96cf35e1e554995fe4e03381c237"),
+ toString(aHash));
+ }
+
+ {
oox::core::CryptoHash aCryptoHash(aKey, oox::core::CryptoHashType::SHA512);
aCryptoHash.update(aContent);
std::vector<sal_uInt8> aHash = aCryptoHash.finalize();
@@ -184,6 +193,13 @@ void CryptoTest::testAgileEncryptionVerifier()
CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+ aEngine.setupEncryptionParameters({ 100000, 16, 128, 48, 16, OUString("AES"),
+ OUString("ChainingModeCBC"), OUString("SHA384") });
+
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.generateAndEncryptVerifierHash(aPassword));
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+
aEngine.setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"),
OUString("ChainingModeCBC"), OUString("SHA512") });
@@ -243,6 +259,52 @@ void CryptoTest::testAgileEncrpytionInfoWritingAndParsing()
}
}
+ { // Preset AES128 - SHA384
+ SvMemoryStream aEncryptionInfo;
+ {
+ oox::core::AgileEngine aEngine;
+
+ aEngine.setPreset(oox::core::AgileEncryptionPreset::AES_128_SHA384);
+ aEngine.setupEncryption(aPassword);
+ aKeyDataSalt = aEngine.getInfo().keyDataSalt;
+
+ oox::BinaryXOutputStream aBinaryEncryptionInfoOutputStream(
+ new utl::OSeekableOutputStreamWrapper(aEncryptionInfo), true);
+
+ aEngine.writeEncryptionInfo(aBinaryEncryptionInfoOutputStream);
+ aBinaryEncryptionInfoOutputStream.close();
+
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(1040), aEncryptionInfo.GetSize());
+ }
+
+ aEncryptionInfo.Seek(STREAM_SEEK_TO_BEGIN);
+
+ {
+ oox::core::AgileEngine aEngine;
+
+ uno::Reference<io::XInputStream> xInputStream(
+ new utl::OSeekableInputStreamWrapper(aEncryptionInfo));
+
+ xInputStream->skipBytes(4); // Encryption type -> Agile
+
+ CPPUNIT_ASSERT(aEngine.readEncryptionInfo(xInputStream));
+
+ oox::core::AgileEncryptionInfo& rInfo = aEngine.getInfo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100000), rInfo.spinCount);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.saltSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(128), rInfo.keyBits);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(48), rInfo.hashSize);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(16), rInfo.blockSize);
+ CPPUNIT_ASSERT_EQUAL(OUString("AES"), rInfo.cipherAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(OUString("ChainingModeCBC"), rInfo.cipherChaining);
+ CPPUNIT_ASSERT_EQUAL(OUString("SHA384"), rInfo.hashAlgorithm);
+ CPPUNIT_ASSERT_EQUAL(toString(aKeyDataSalt), toString(rInfo.keyDataSalt));
+
+ CPPUNIT_ASSERT_EQUAL(false, aEngine.decryptAndCheckVerifierHash("Wrong"));
+ CPPUNIT_ASSERT_EQUAL(true, aEngine.decryptAndCheckVerifierHash(aPassword));
+ }
+ }
+
{ // Preset AES256 - SHA512
SvMemoryStream aEncryptionInfo;
{
diff --git a/oox/source/crypto/AgileEngine.cxx b/oox/source/crypto/AgileEngine.cxx
index 7c2a0e9c93d2..81c03663cb37 100644
--- a/oox/source/crypto/AgileEngine.cxx
+++ b/oox/source/crypto/AgileEngine.cxx
@@ -201,7 +201,13 @@ bool hashCalc(std::vector<sal_uInt8>& output,
output = out;
return true;
}
- else if (sAlgorithm == "SHA512")
+ else if (sAlgorithm == u"SHA384")
+ {
+ std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA384);
+ output = out;
+ return true;
+ }
+ else if (sAlgorithm == u"SHA512")
{
std::vector<unsigned char> out = comphelper::Hash::calculateHash(input.data(), input.size(), comphelper::HashType::SHA512);
output = out;
@@ -214,7 +220,10 @@ CryptoHashType cryptoHashTypeFromString(OUString const & sAlgorithm)
{
if (sAlgorithm == "SHA512")
return CryptoHashType::SHA512;
- return CryptoHashType::SHA1;
+ else if (sAlgorithm == u"SHA384")
+ return CryptoHashType::SHA384;
+ else
+ return CryptoHashType::SHA1;
}
} // namespace
@@ -370,6 +379,8 @@ bool AgileEngine::decryptHmacKey()
comphelper::HashType eType;
if (mInfo.hashAlgorithm == "SHA1")
eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA384")
+ eType = comphelper::HashType::SHA384;
else if (mInfo.hashAlgorithm == "SHA512")
eType = comphelper::HashType::SHA512;
else
@@ -396,6 +407,8 @@ bool AgileEngine::decryptHmacValue()
comphelper::HashType eType;
if (mInfo.hashAlgorithm == "SHA1")
eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA384")
+ eType = comphelper::HashType::SHA384;
else if (mInfo.hashAlgorithm == "SHA512")
eType = comphelper::HashType::SHA512;
else
@@ -534,6 +547,16 @@ bool AgileEngine::readEncryptionInfo(uno::Reference<io::XInputStream> & rxInputS
return true;
}
+ // AES 128 CBC with SHA384
+ if (mInfo.keyBits == 128 &&
+ mInfo.cipherAlgorithm == "AES" &&
+ mInfo.cipherChaining == "ChainingModeCBC" &&
+ mInfo.hashAlgorithm == "SHA384" &&
+ mInfo.hashSize == msfilter::SHA384_HASH_LENGTH)
+ {
+ return true;
+ }
+
// AES 256 CBC with SHA512
if (mInfo.keyBits == 256 &&
mInfo.cipherAlgorithm == "AES" &&
@@ -597,6 +620,8 @@ bool AgileEngine::encryptHmacKey()
comphelper::HashType eType;
if (mInfo.hashAlgorithm == "SHA1")
eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA384")
+ eType = comphelper::HashType::SHA384;
else if (mInfo.hashAlgorithm == "SHA512")
eType = comphelper::HashType::SHA512;
else
@@ -624,6 +649,8 @@ bool AgileEngine::encryptHmacValue()
comphelper::HashType eType;
if (mInfo.hashAlgorithm == "SHA1")
eType = comphelper::HashType::SHA1;
+ else if (mInfo.hashAlgorithm == "SHA384")
+ eType = comphelper::HashType::SHA384;
else if (mInfo.hashAlgorithm == "SHA512")
eType = comphelper::HashType::SHA512;
else
@@ -663,6 +690,8 @@ bool AgileEngine::setupEncryption(OUString const & rPassword)
{
if (meEncryptionPreset == AgileEncryptionPreset::AES_128_SHA1)
setupEncryptionParameters({ 100000, 16, 128, 20, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA1") });
+ else if (meEncryptionPreset == AgileEncryptionPreset::AES_128_SHA384)
+ setupEncryptionParameters({ 100000, 16, 128, 48, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA384") });
else
setupEncryptionParameters({ 100000, 16, 256, 64, 16, OUString("AES"), OUString("ChainingModeCBC"), OUString("SHA512") });
diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx
index 6ca316b0a9b6..8c70c3eaf585 100644
--- a/oox/source/crypto/CryptTools.cxx
+++ b/oox/source/crypto/CryptTools.cxx
@@ -90,6 +90,8 @@ struct CryptoImpl
aEvpMd = EVP_sha1(); break;
case CryptoHashType::SHA256:
aEvpMd = EVP_sha256(); break;
+ case CryptoHashType::SHA384:
+ aEvpMd = EVP_sha384(); break;
case CryptoHashType::SHA512:
aEvpMd = EVP_sha512(); break;
}
@@ -284,6 +286,9 @@ struct CryptoImpl
case CryptoHashType::SHA256:
aMechanism = CKM_SHA256_HMAC;
break;
+ case CryptoHashType::SHA384:
+ aMechanism = CKM_SHA384_HMAC;
+ break;
case CryptoHashType::SHA512:
aMechanism = CKM_SHA512_HMAC;
break;
@@ -428,6 +433,7 @@ sal_Int32 getSizeForHashType(CryptoHashType eType)
{
case CryptoHashType::SHA1: return 20;
case CryptoHashType::SHA256: return 32;
+ case CryptoHashType::SHA384: return 48;
case CryptoHashType::SHA512: return 64;
}
return 0;
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index da61e818c149..cc4969e8251c 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -441,13 +441,17 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
if ( xPageSiteRef.get() )
idToPage[ xPageSiteRef->getId() ] = control;
}
- else
+ else if (elem->getControlType() == API_CONTROL_TABSTRIP)
{
AxTabStripModel* pTabStrip = static_cast<AxTabStripModel*>(elem.get());
sCaptions = pTabStrip->maItems;
pMultiPage->mnActiveTab = pTabStrip->mnListIndex;
pMultiPage->mnTabStyle = pTabStrip->mnTabStyle;
}
+ else
+ {
+ SAL_WARN("oox", "unexpected control type " << elem->getControlType());
+ }
}
// apply caption/titles to pages
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 02d55ed3cd89..a81f05e89920 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -176,6 +176,7 @@ postprocess_FILES_main := \
$(postprocess_XCS)/Office/UI/GenericCategories.xcs \
$(postprocess_XCS)/Office/UI/GenericCommands.xcs \
$(postprocess_XCS)/Office/UI/GlobalSettings.xcs \
+ $(postprocess_XCS)/Office/UI/Infobar.xcs \
$(postprocess_XCS)/Office/UI/Sidebar.xcs \
$(postprocess_XCS)/Office/UI/StartModuleCommands.xcs \
$(postprocess_XCS)/Office/UI/StartModuleWindowState.xcs \
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index f8c5047de79f..9c0f8f553362 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -140,15 +140,12 @@ $(eval $(call gb_Rdb_add_components,services,\
) \
$(if $(filter WNT,$(OS)), \
avmedia/source/win/avmediawin \
- dtrans/source/generic/dtrans \
- dtrans/util/dnd \
- dtrans/util/ftransl \
- dtrans/util/sysdtrans \
fpicker/source/win32/fps \
shell/source/backends/wininetbe/wininetbe1 \
shell/source/win32/simplemail/smplmail \
shell/source/win32/syssh \
vcl/vcl.windows \
+ vcl/vclplug_win \
) \
$(if $(DISABLE_GUI), \
vcl/vcl.headless \
diff --git a/pyuno/source/loader/pythonloader.py b/pyuno/source/loader/pythonloader.py
index 268cb168fe3c..0ecbf5d848a6 100644
--- a/pyuno/source/loader/pythonloader.py
+++ b/pyuno/source/loader/pythonloader.py
@@ -19,7 +19,7 @@
import uno
import unohelper
import sys
-import imp
+import types
import os
from com.sun.star.uno import Exception,RuntimeException
from com.sun.star.loader import XImplementationLoader
@@ -82,7 +82,7 @@ class Loader( XImplementationLoader, XServiceInfo, unohelper.Base ):
# did we load the module already ?
mod = g_loadedComponents.get( url )
if not mod:
- mod = imp.new_module("uno_component")
+ mod = types.ModuleType("uno_component")
# check for pythonpath.zip beside .py files
checkForPythonPathBesideComponent( url[0:url.rfind('/')] )
diff --git a/readlicense_oo/license/NOTICE b/readlicense_oo/license/NOTICE
index 46b7fccaf737..0cecc2dbfa50 100644
--- a/readlicense_oo/license/NOTICE
+++ b/readlicense_oo/license/NOTICE
@@ -25,7 +25,6 @@ Apache projects:
- Apache Lucene
- Apache Portable Runtime
- Apache Portable Runtime Utility Library
-- Apache Commons - used by MediaWiki Publisher extension
- Apache Jakarta HttpClient - used by MediaWiki Publisher extension
- Apache Tomcat - used by MediaWiki Publisher extension
@@ -106,13 +105,6 @@ This product includes software from the Spring Framework,
under the Apache License 2.0 (see: StringUtils.containsWhitespace())
-Apache Commons Logging
-Copyright 2003-2007 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-
Apache Tomcat
Copyright 1999-2012 The Apache Software Foundation
diff --git a/reportbuilder/Jar_reportbuilder.mk b/reportbuilder/Jar_reportbuilder.mk
index bc73037bf616..714d2a8bbb47 100644
--- a/reportbuilder/Jar_reportbuilder.mk
+++ b/reportbuilder/Jar_reportbuilder.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_Jar_use_jars,reportbuilder,\
))
$(eval $(call gb_Jar_use_externals,reportbuilder,\
- commons-logging \
flow-engine \
flute \
libbase \
diff --git a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
index 463addc63e71..b3c4508666ca 100644
--- a/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/SDBCReportDataFactory.java
@@ -58,9 +58,6 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* Very primitive implementation, just to show how this could be used ...
@@ -142,7 +139,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
private int parameterCount = 0;
private final ArrayList<Integer> parameterIndex = new ArrayList<Integer>();
}
- private static final Log LOGGER = LogFactory.getLog(SDBCReportDataFactory.class);
+ private static final Logger LOGGER = Logger.getLogger(SDBCReportDataFactory.class.getName());
public static final String COMMAND_TYPE = "command-type";
public static final String ESCAPE_PROCESSING = "escape-processing";
public static final String SORT_EXPRESSIONS = "sort-expressions";
@@ -259,7 +256,7 @@ public class SDBCReportDataFactory implements DataSourceFactory
}
catch (SQLException ex)
{
- LOGGER.error("ReportProcessing failed / getOrderStatement could not get quote character", ex);
+ LOGGER.severe("ReportProcessing failed / getOrderStatement could not get quote character: " + ex);
// fall back to the SQL standard
quote="";
}
diff --git a/reportbuilder/java/org/libreoffice/report/StorageRepository.java b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
index 8b6d08c458a2..a338ee5dedb5 100644
--- a/reportbuilder/java/org/libreoffice/report/StorageRepository.java
+++ b/reportbuilder/java/org/libreoffice/report/StorageRepository.java
@@ -37,9 +37,7 @@ import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
/**
* A directory holds all the contents here.
@@ -49,8 +47,8 @@ import org.apache.commons.logging.LogFactory;
public class StorageRepository implements InputRepository, OutputRepository
{
- private static final Log LOGGER = LogFactory.getLog(StorageRepository.class);
- private static final String REPORT_PROCESSING_FAILED = "ReportProcessing failed";
+ private static final Logger LOGGER = Logger.getLogger(StorageRepository.class.getName());
+ private static final String REPORT_PROCESSING_FAILED = "ReportProcessing failed: ";
private XStorage input;
private XStorage output;
private final String rootURL;
@@ -134,11 +132,11 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (InvalidStorageException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (com.sun.star.lang.IllegalArgumentException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (NoSuchElementException e)
{
@@ -168,15 +166,15 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (InvalidStorageException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (com.sun.star.lang.IllegalArgumentException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (NoSuchElementException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
return false;
}
@@ -195,23 +193,23 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (NoSuchElementException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (WrappedTargetException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (InvalidStorageException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (IllegalArgumentException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (com.sun.star.io.IOException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
throw new IOException();
}
@@ -245,27 +243,27 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (UnknownPropertyException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (PropertyVetoException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (IllegalArgumentException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (WrappedTargetException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (InvalidStorageException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (com.sun.star.io.IOException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
throw new IOException();
@@ -293,11 +291,11 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (com.sun.star.io.IOException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (WrappedTargetException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
output.dispose();
}
@@ -312,11 +310,11 @@ public class StorageRepository implements InputRepository, OutputRepository
}
catch (InvalidStorageException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (com.sun.star.lang.IllegalArgumentException ex)
{
- LOGGER.error(REPORT_PROCESSING_FAILED, ex);
+ LOGGER.severe(REPORT_PROCESSING_FAILED + ex);
}
catch (NoSuchElementException ex)
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/Manifest.mf b/reportbuilder/java/org/libreoffice/report/pentaho/Manifest.mf
index 23731b104054..2a56b2fbb9fa 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/Manifest.mf
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/Manifest.mf
@@ -3,5 +3,5 @@ Class-Path: reportbuilderwizard.jar
flute-1.1.6.jar libserializer-1.1.6.jar libbase-1.1.6.jar
libfonts-1.1.6.jar libformula-1.1.7.jar liblayout.jar
libloader-1.1.6.jar librepository-1.1.6.jar libxml-1.1.7.jar
- flow-engine.jar sac.jar commons-logging-1.2.jar
+ flow-engine.jar sac.jar
UNO-Type-Path:
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
index 480bca548e7e..efb4261ce127 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/PentahoReportJob.java
@@ -42,9 +42,7 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.jfree.report.expressions.Expression;
import org.jfree.report.expressions.FormulaExpression;
@@ -72,7 +70,7 @@ import org.pentaho.reporting.libraries.resourceloader.ResourceManager;
public class PentahoReportJob implements ReportJob
{
- private static final Log LOGGER = LogFactory.getLog(PentahoReportJob.class);
+ private static final Logger LOGGER = Logger.getLogger(PentahoReportJob.class.getName());
private final DataSourceFactory dataSourceFactory;
private final OutputRepository outputRepository;
private final JobProperties jobProperties;
@@ -235,7 +233,7 @@ public class PentahoReportJob implements ReportJob
}
catch (ParseException ex)
{
- LOGGER.error("ReportProcessing failed", ex);
+ LOGGER.severe("ReportProcessing failed: " + ex);
}
}
else if (node instanceof OfficeDetailSection)
@@ -338,7 +336,7 @@ public class PentahoReportJob implements ReportJob
rp.processReport(job);
job.close();
final long endTime = System.currentTimeMillis();
- LOGGER.debug("Report processing time: " + (endTime - startTime));
+ LOGGER.config("Report processing time: " + (endTime - startTime));
}
catch (final Exception e)
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
index 54694fd619ab..3c52473e3d3c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/SOReportJobFactory.java
@@ -68,9 +68,6 @@ import java.io.Writer;
import java.io.PrintWriter;
import java.io.StringWriter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
/**
* This class capsulates the class, that implements the minimal component, a factory for creating the service
* (<CODE>__getComponentFactory</CODE>) and a method, that writes the information into the given registry key
@@ -86,7 +83,7 @@ public class SOReportJobFactory
public static class _SOReportJobFactory extends WeakBase implements XInitialization, XServiceInfo, XJob, XPropertySet, ReportJobFactory
{
- private static final Log LOGGER = LogFactory.getLog(_SOReportJobFactory.class);
+ private static final Logger LOGGER = Logger.getLogger(_SOReportJobFactory.class.getName());
/**
* The service name, that must be used to get an instance of this service.
*/
@@ -242,7 +239,7 @@ public class SOReportJobFactory
}
catch (java.lang.Exception e)
{
- LOGGER.error("ReportProcessing failed", e);
+ LOGGER.severe("ReportProcessing failed: " + e);
Writer result = new StringWriter();
PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
@@ -254,7 +251,7 @@ public class SOReportJobFactory
}
catch (java.lang.IncompatibleClassChangeError e)
{
- LOGGER.error("Detected an IncompatibleClassChangeError");
+ LOGGER.severe("Detected an IncompatibleClassChangeError");
Writer result = new StringWriter();
PrintWriter printWriter = new PrintWriter(result);
e.printStackTrace(printWriter);
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
index 6a1bd00736ee..eab7c512284d 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormatValueUtility.java
@@ -208,7 +208,7 @@ public class FormatValueUtility
if (result == null)
{
// ignore it. Ignoring it is much better than printing 'null'.
- // LOGGER.debug("Formula '" + formulaExpression.getFormula() + "' evaluated to null.");
+ // LOGGER.config("Formula '" + formulaExpression.getFormula() + "' evaluated to null.");
return null;
}
else if (result instanceof DataFlags)
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
index 7f1470edc866..7959b5857408 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/FormattedTextLayoutController.java
@@ -20,8 +20,7 @@ package org.libreoffice.report.pentaho.layoutprocessor;
import org.libreoffice.report.pentaho.OfficeNamespaces;
import org.libreoffice.report.pentaho.model.FormattedTextElement;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.jfree.report.DataFlags;
import org.jfree.report.DataSourceException;
@@ -45,7 +44,7 @@ public class FormattedTextLayoutController
extends AbstractReportElementLayoutController
{
- private static final Log LOGGER = LogFactory.getLog(FormattedTextLayoutController.class);
+ private static final Logger LOGGER = Logger.getLogger(FormattedTextLayoutController.class.getName());
@Override
public boolean isValueChanged()
@@ -62,7 +61,7 @@ public class FormattedTextLayoutController
}
catch (final ParseException e)
{
- LOGGER.debug("Parse Exception", e);
+ LOGGER.config("Parse Exception: " + e);
return false;
}
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementLayoutController.java b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementLayoutController.java
index 0bf40b9dcd28..6fc68e816f7c 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementLayoutController.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/layoutprocessor/ImageElementLayoutController.java
@@ -22,8 +22,7 @@ import org.libreoffice.report.OfficeToken;
import org.libreoffice.report.pentaho.OfficeNamespaces;
import org.libreoffice.report.pentaho.model.ImageElement;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.jfree.layouting.util.AttributeMap;
import org.jfree.report.DataSourceException;
@@ -59,7 +58,7 @@ public class ImageElementLayoutController
extends AbstractReportElementLayoutController
{
- private static final Log LOGGER = LogFactory.getLog(ImageElementLayoutController.class);
+ private static final Logger LOGGER = Logger.getLogger(ImageElementLayoutController.class.getName());
private ImageElementContext context;
@Override
@@ -116,7 +115,7 @@ public class ImageElementLayoutController
final LayoutController cellController = findParentCell();
if (cellController == null)
{
- LOGGER.warn("Image is not contained in a table. Unable to calculate the image-size.");
+ LOGGER.warning("Image is not contained in a table. Unable to calculate the image-size.");
return null;
}
final Element tableCell = (Element) cellController.getNode();
@@ -124,14 +123,14 @@ public class ImageElementLayoutController
final int colSpan = TextUtilities.parseInt((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-columns-spanned"), 1);
if (rowSpan < 1 || colSpan < 1)
{
- LOGGER.warn("Rowspan or colspan for image-size calculation was invalid.");
+ LOGGER.warning("Rowspan or colspan for image-size calculation was invalid.");
return null;
}
final LayoutController rowController = cellController.getParent();
if (rowController == null)
{
- LOGGER.warn("Table-Cell has no parent. Unable to calculate the image-size.");
+ LOGGER.warning("Table-Cell has no parent. Unable to calculate the image-size.");
return null;
}
final Section tableRow = (Section) rowController.getNode();
@@ -141,14 +140,14 @@ public class ImageElementLayoutController
final int columnPos = findNodeInSection(tableRow, tableCell, OfficeToken.COVERED_TABLE_CELL);
if (columnPos == -1)
{
- LOGGER.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size.");
+ LOGGER.warning("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size.");
return null;
}
final LayoutController tableController = rowController.getParent();
if (tableController == null)
{
- LOGGER.warn("Table-Row has no Table. Unable to calculate the image-size.");
+ LOGGER.warning("Table-Row has no Table. Unable to calculate the image-size.");
return null;
}
@@ -158,7 +157,7 @@ public class ImageElementLayoutController
if (columns.getNodeCount() <= columnPos + colSpan)
{
// the colspan is too large. The table definition is therefore invalid. We do not try to fix this.
- LOGGER.warn(
+ LOGGER.warning(
"The Table's defined columns do not match the col-span or col-position. Unable to calculate the image-size.");
return null;
}
@@ -169,7 +168,7 @@ public class ImageElementLayoutController
final int rowPos = findNodeInSection(table, tableRow, null);
if (rowPos == -1)
{
- LOGGER.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size.");
+ LOGGER.warning("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size.");
return null;
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
index ae1a8273bfb7..69995d7aa1c5 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/ImageProducer.java
@@ -48,9 +48,6 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.jfree.layouting.input.style.values.CSSNumericType;
import org.jfree.layouting.input.style.values.CSSNumericValue;
@@ -67,7 +64,7 @@ import org.pentaho.reporting.libraries.base.util.WaitingImageObserver;
public class ImageProducer
{
- private static final Log LOGGER = LogFactory.getLog(ImageProducer.class);
+ private static final Logger LOGGER = Logger.getLogger(ImageProducer.class.getName());
public static class OfficeImage
{
@@ -188,7 +185,7 @@ public class ImageProducer
final boolean preserveIRI)
{
- LOGGER.debug("Want to produce image " + imageData);
+ LOGGER.config("Want to produce image " + imageData);
if (imageData instanceof String)
{
return produceFromString((String) imageData, preserveIRI);
@@ -247,11 +244,11 @@ public class ImageProducer
}
catch (IOException e)
{
- LOGGER.warn("Failed to produce image from Blob", e);
+ LOGGER.warning("Failed to produce image from Blob: " + e);
}
catch (SQLException e)
{
- LOGGER.warn("Failed to produce image from Blob", e);
+ LOGGER.warning("Failed to produce image from Blob: " + e);
}
return null;
}
@@ -295,11 +292,11 @@ public class ImageProducer
}
catch (IOException e)
{
- LOGGER.warn("Failed to load image from local input-repository", e);
+ LOGGER.warning("Failed to load image from local input-repository: " + e);
}
catch (ReportExecutionException e)
{
- LOGGER.warn("Failed to create image from local input-repository", e);
+ LOGGER.warning("Failed to create image from local input-repository: " + e);
}
return null;
}
@@ -353,11 +350,11 @@ public class ImageProducer
}
catch (IOException e)
{
- LOGGER.warn("Failed to load image from local input-repository", e);
+ LOGGER.warning("Failed to load image from local input-repository: " + e);
}
catch (ReportExecutionException e)
{
- LOGGER.warn("Failed to create image from local input-repository", e);
+ LOGGER.warning("Failed to create image from local input-repository: " + e);
}
}
else
@@ -435,11 +432,11 @@ public class ImageProducer
}
catch (IOException e)
{
- LOGGER.warn("Failed to load image from local input-repository", e);
+ LOGGER.warning("Failed to load image from local input-repository: " + e);
}
catch (ReportExecutionException e)
{
- LOGGER.warn("Failed to create image from local input-repository", e);
+ LOGGER.warning("Failed to create image from local input-repository: " + e);
}
if (!preserveIRI)
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
index a5c3be135a65..b73b5781b3a3 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -65,9 +65,6 @@ import java.util.Map;
import java.util.zip.DeflaterOutputStream;
import java.util.zip.InflaterInputStream;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
import org.jfree.layouting.input.style.parser.CSSValueFactory;
import org.jfree.layouting.input.style.parser.StyleSheetParserUtil;
import org.jfree.layouting.input.style.values.CSSNumericType;
@@ -112,7 +109,7 @@ import org.w3c.css.sac.LexicalUnit;
public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
{
- protected static final Log LOGGER = LogFactory.getLog(OfficeDocumentReportTarget.class);
+ protected static final Logger LOGGER = Logger.getLogger(OfficeDocumentReportTarget.class.getName());
public static final String HORIZONTAL_POS = "horizontal-pos";
public static final String TAG_DEF_PREFIX = "org.libreoffice.report.pentaho.output.";
private static final int ROLE_NONE = 0;
@@ -517,7 +514,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
// todo
if (DEBUG_ELEMENTS)
{
- LOGGER.debug("Starting " + getCurrentState() + '/' + states.size() + ' ' + ReportTargetUtil.getNamespaceFromAttribute(attrs) + " -> " + ReportTargetUtil.getElemenTypeFromAttribute(attrs));
+ LOGGER.config("Starting " + getCurrentState() + '/' + states.size() + ' ' + ReportTargetUtil.getNamespaceFromAttribute(attrs) + " -> " + ReportTargetUtil.getElemenTypeFromAttribute(attrs));
}
try
{
@@ -713,7 +710,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
}
catch (IOException ioe)
{
- LOGGER.error("ReportProcessing failed", ioe);
+ LOGGER.severe("ReportProcessing failed: " + ioe);
throw new ReportProcessingException("Failed to write content", ioe);
}
}
@@ -762,7 +759,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
if (styleMapper.isListOfStyles(elementNamespace, elementName, attrNamespace, attrName))
{
// ignored for now.
- LOGGER.warn("List of styles is not yet implemented.");
+ LOGGER.warning("List of styles is not yet implemented.");
continue;
}
@@ -970,7 +967,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
if (DEBUG_ELEMENTS)
{
- LOGGER.debug("Finished " + getCurrentState() + "/" + states.size() + " " + ReportTargetUtil.getNamespaceFromAttribute(attrs) + ":" + ReportTargetUtil.getElemenTypeFromAttribute(attrs));
+ LOGGER.config("Finished " + getCurrentState() + "/" + states.size() + " " + ReportTargetUtil.getNamespaceFromAttribute(attrs) + ":" + ReportTargetUtil.getElemenTypeFromAttribute(attrs));
}
}
@@ -1153,7 +1150,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
}
catch (IOException e)
{
- LOGGER.error("ReportProcessing failed", e);
+ LOGGER.severe("ReportProcessing failed: " + e);
}
return state;
}
@@ -1294,7 +1291,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
final CSSNumericValue height = image.getHeight(); // always in 100th of a mm
- LOGGER.debug("Image " + imageData + " Width: " + width + ", Height: " + height);
+ LOGGER.config("Image " + imageData + " Width: " + width + ", Height: " + height);
if (width == null || height == null)
{
return;
@@ -1313,7 +1310,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
if (imageAreaWidthVal == null || imageAreaHeightVal == null)
{
- LOGGER.debug("Image data returned from context is invalid. Maybe this is not an image?");
+ LOGGER.config("Image data returned from context is invalid. Maybe this is not an image?");
return;
}
else
@@ -1410,7 +1407,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
}
else
{
- LOGGER.debug("There is no image-context, so we have to rely on the image's natural bounds. " + "This may go awfully wrong.");
+ LOGGER.config("There is no image-context, so we have to rely on the image's natural bounds. " + "This may go awfully wrong.");
imageAreaWidthVal = image.getWidth();
imageAreaHeightVal = image.getHeight();
}
@@ -1427,7 +1424,7 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
frameList.setAttribute(OfficeNamespaces.SVG_NS, "y", posY.getValue() + posY.getType().getType());
- LOGGER.debug("Image " + imageData + " A-Width: " + imageAreaWidthVal + ", A-Height: " + imageAreaHeightVal);
+ LOGGER.config("Image " + imageData + " A-Width: " + imageAreaWidthVal + ", A-Height: " + imageAreaHeightVal);
if (imageAreaWidthVal != null)
{
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OleProducer.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OleProducer.java
index 2010a189be1d..27f3c25a4b4b 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OleProducer.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OleProducer.java
@@ -32,14 +32,12 @@ import org.libreoffice.report.pentaho.PentahoReportEngineMetaData;
import java.io.IOException;
import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
public class OleProducer
{
- private static final Log LOGGER = LogFactory.getLog(OleProducer.class);
+ private static final Logger LOGGER = Logger.getLogger(OleProducer.class.getName());
private final InputRepository inputRepository;
private final OutputRepository outputRepository;
private final DefaultNameGenerator nameGenerator;
@@ -100,16 +98,16 @@ public class OleProducer
}
catch (ReportExecutionException ex)
{
- LOGGER.error("ReportProcessing failed", ex);
+ LOGGER.severe("ReportProcessing failed: " + ex);
}
catch (IOException ex)
{
- LOGGER.error("ReportProcessing failed", ex);
+ LOGGER.severe("ReportProcessing failed: " + ex);
}
}
catch (IOException ex)
{
- LOGGER.error("ReportProcessing failed", ex);
+ LOGGER.severe("ReportProcessing failed: " + ex);
} finally
{
if (subInputRepository != null)
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java
index 2b204a4bf502..98af0c3fa076 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/StyleUtilities.java
@@ -28,9 +28,7 @@ import org.libreoffice.report.pentaho.model.OfficeStylesCollection;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.jfree.report.ReportProcessingException;
import org.jfree.report.structure.Element;
@@ -46,7 +44,7 @@ import org.jfree.report.util.AttributeNameGenerator;
public class StyleUtilities
{
- private static final Log LOGGER = LogFactory.getLog(StyleUtilities.class);
+ private static final Logger LOGGER = Logger.getLogger(StyleUtilities.class.getName());
private static final String STYLE = "style";
private StyleUtilities()
@@ -180,7 +178,7 @@ public class StyleUtilities
}
else if (styleParent != null)
{
- LOGGER.warn("Inconsistent styles: " + styleFamily + ":" + styleParent + " does not exist.");
+ LOGGER.warning("Inconsistent styles: " + styleFamily + ":" + styleParent + " does not exist.");
}
return preStyle;
}
@@ -301,7 +299,7 @@ public class StyleUtilities
}
else
{
- LOGGER.warn("Dangling data style: " + styleName);
+ LOGGER.warning("Dangling data style: " + styleName);
derivedStyle = null;
}
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
index e6c234503c22..b1d979e7b788 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
@@ -305,7 +305,7 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget
}
catch (IOException ex)
{
- LOGGER.error("ReportProcessing failed", ex);
+ LOGGER.severe("ReportProcessing failed: " + ex);
}
}
}
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/DocumentContentReadHandler.java b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/DocumentContentReadHandler.java
index 6d36eb6f9ea5..65a48252e69f 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/DocumentContentReadHandler.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/parser/office/DocumentContentReadHandler.java
@@ -22,8 +22,7 @@ import org.libreoffice.report.pentaho.model.OfficeDocument;
import org.libreoffice.report.pentaho.model.OfficeStylesCollection;
import org.libreoffice.report.pentaho.parser.style.OfficeStylesReadHandler;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
import org.jfree.report.JFreeReport;
@@ -49,7 +48,7 @@ import org.xml.sax.SAXException;
public class DocumentContentReadHandler extends AbstractXmlReadHandler
{
- private static final Log LOGGER = LogFactory.getLog(DocumentContentReadHandler.class);
+ private static final Logger LOGGER = Logger.getLogger(DocumentContentReadHandler.class.getName());
private OfficeDocument report;
private FontFaceDeclsReadHandler fontFaceReadHandler;
private BodyReadHandler bodyReadHandler;
@@ -98,12 +97,12 @@ public class DocumentContentReadHandler extends AbstractXmlReadHandler
catch (ResourceKeyCreationException e)
{
// ignore ..
- LOGGER.debug("Failed to create resource-key for 'styles.xml'. Ignoring.", e);
+ LOGGER.config("Failed to create resource-key for 'styles.xml'. Ignoring: " + e);
}
catch (ResourceException e)
{
// ignore ..
- LOGGER.debug("Failed to parse resource for 'styles.xml'. Ignoring.", e);
+ LOGGER.config("Failed to parse resource for 'styles.xml'. Ignoring: " + e);
}
return new OfficeStylesCollection();
@@ -135,12 +134,12 @@ public class DocumentContentReadHandler extends AbstractXmlReadHandler
catch (ResourceKeyCreationException e)
{
// ignore ..
- LOGGER.debug("Failed to create resource-key for 'content.xml'. Ignoring.");
+ LOGGER.config("Failed to create resource-key for 'content.xml'. Ignoring.");
}
catch (ResourceException e)
{
// ignore ..
- LOGGER.debug("Failed to parse resource for 'content.xml'. Ignoring.");
+ LOGGER.config("Failed to parse resource for 'content.xml'. Ignoring.");
}
return new OfficeDocument();
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 00027a557a7b..06a088296798 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -128,7 +128,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::CreateShape( SdrObject *pObj
awt::Size aSz( aTmp.Width(), aTmp.Height() );
xObj->setVisualAreaSize( nAspect, aSz );
}
- SvxOle2Shape* pShape = new SvxOle2Shape( pObj );
+ SvxOle2Shape* pShape = new SvxOle2Shape( pObj, "" /*TODO?*/ );
xShape.set(*pShape,uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
diff --git a/reportdesign/uiconfig/dbreport/menubar/menubar.xml b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
index e31c19bffcc3..465d7819b17b 100644
--- a/reportdesign/uiconfig/dbreport/menubar/menubar.xml
+++ b/reportdesign/uiconfig/dbreport/menubar/menubar.xml
@@ -279,7 +279,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index e84ed0aaf1b5..53b35dc8342b 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_Library_add_libs,sal,\
$(if $(filter LINUX,$(OS)), \
-ldl \
-lrt \
+ -lstdc++fs \
) \
$(if $(filter SOLARIS,$(OS)), \
-lnsl \
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 5a6ffdff9110..3377d615a6ab 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -19,9 +19,13 @@
#include <stdio.h>
#include <string.h>
+#define _SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING
+#include <experimental/filesystem>
#include <fstream>
+#include <system_error>
#include <config_global.h>
+#include <o3tl/temporary.hxx>
#include <osl/thread.hxx>
#include <rtl/string.h>
#include <sal/detail/log.h>
@@ -116,7 +120,43 @@ char const* setEnvFromLoggingIniFile(const char* env, const char* key)
aKey = sLine.substr(0, n);
if (aKey != sWantedKey)
continue;
- _putenv_s(env, sLine.substr(n+1, sLine.length()).c_str());
+ std::string value(sLine, n+1, sLine.length());
+ for (std::size_t i = 0;;) {
+ i = value.find_first_of("\\$", i);
+ if (i == std::string::npos) {
+ break;
+ }
+ if (value[i] == '\\') {
+ if (i == value.size() - 1 || (value[i + 1] != '\\' && value[i + 1] != '$')) {
+ ++i;
+ continue;
+ }
+ value.erase(i, 1);
+ ++i;
+ } else {
+ if (i == value.size() - 1 || value[i + 1] != '{') {
+ ++i;
+ continue;
+ }
+ std::size_t i2 = value.find('}', i + 2);
+ if (i2 == std::string::npos) {
+ break;
+ }
+ std::string name(value, i + 2, i2 - (i + 2));
+ if (name.find('\0') != std::string::npos) {
+ i = i2 + 1;
+ continue;
+ }
+ char const * p = std::getenv(name.c_str());
+ if (p == nullptr) {
+ value.erase(i, i2 + 1 - i);
+ } else {
+ value.replace(i, i2 + 1 - i, p);
+ i += std::strlen(p);
+ }
+ }
+ }
+ _putenv_s(env, value.c_str());
sResult = std::getenv(env);
break;
}
@@ -165,6 +205,9 @@ std::ofstream * getLogFile() {
if (logFile)
{
+ std::experimental::filesystem::create_directories(
+ std::experimental::filesystem::path(logFile).remove_filename(),
+ o3tl::temporary(std::error_code()));
// stays until process exits
static std::ofstream file(logFile, std::ios::app | std::ios::out);
pResult = &file;
@@ -344,7 +387,12 @@ void sal_detail_logFormat(
sal_detail_LogLevel level, char const * area, char const * where,
char const * format, ...)
{
- if (sal_detail_log_report(level, area)) {
+ const sal_detail_LogAction eAction
+ = static_cast<sal_detail_LogAction>(sal_detail_log_report(level, area));
+ if (eAction == SAL_DETAIL_LOG_ACTION_IGNORE)
+ return;
+
+ {
std::va_list args;
va_start(args, format);
char buf[1024];
@@ -358,11 +406,15 @@ void sal_detail_logFormat(
sal_detail_log(level, area, where, buf, 0);
va_end(args);
}
+
+ if (eAction == SAL_DETAIL_LOG_ACTION_FATAL)
+ std::abort();
}
-sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
+unsigned char sal_detail_log_report(sal_detail_LogLevel level, char const * area)
+{
if (level == SAL_DETAIL_LOG_LEVEL_DEBUG) {
- return true;
+ return SAL_DETAIL_LOG_ACTION_LOG;
}
assert(area != nullptr);
static char const* const env = [] {
@@ -378,17 +430,26 @@ sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
// no matching switches at all, the result will be negative (and
// initializing with 1 is safe as the length of a valid switch, even
// without the "+"/"-" prefix, will always be > 1)
+ bool senseFatal[2] = { false, false };
bool seenWarn = false;
+ bool bFlagFatal = false;
for (char const * p = env;;) {
Sense sense;
switch (*p++) {
case '\0':
+ {
if (level == SAL_DETAIL_LOG_LEVEL_WARN && !seenWarn)
return sal_detail_log_report(SAL_DETAIL_LOG_LEVEL_INFO, area);
- return senseLen[POSITIVE] >= senseLen[NEGATIVE];
- // if a specific item is both positive and negative
- // (senseLen[POSITIVE] == senseLen[NEGATIVE]), default to
- // positive
+
+ sal_detail_LogAction eAction = SAL_DETAIL_LOG_ACTION_IGNORE;
+ // if a specific item is positive and negative (==), default to positive
+ if (senseLen[POSITIVE] >= senseLen[NEGATIVE])
+ {
+ if (senseFatal[POSITIVE]) eAction = SAL_DETAIL_LOG_ACTION_FATAL;
+ else eAction = SAL_DETAIL_LOG_ACTION_LOG;
+ }
+ return eAction;
+ }
case '+':
sense = POSITIVE;
break;
@@ -396,7 +457,7 @@ sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
sense = NEGATIVE;
break;
default:
- return true; // upon an illegal SAL_LOG value, enable everything
+ return SAL_DETAIL_LOG_ACTION_LOG; // upon an illegal SAL_LOG value, enable everything
}
char const * p1 = p;
while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
@@ -409,13 +470,17 @@ sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
{
match = level == SAL_DETAIL_LOG_LEVEL_WARN;
seenWarn = true;
+ } else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("FATAL")))
+ {
+ bFlagFatal = (sense == POSITIVE);
+ match = false;
} else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")) ||
equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
{
// handled later
match = false;
} else {
- return true;
+ return SAL_DETAIL_LOG_ACTION_LOG;
// upon an illegal SAL_LOG value, everything is considered
// positive
}
@@ -432,9 +497,11 @@ sal_Bool sal_detail_log_report(sal_detail_LogLevel level, char const * area) {
&& equalStrings(p1, n, area, n)))
{
senseLen[sense] = p2 - p;
+ senseFatal[sense] = bFlagFatal;
}
} else {
senseLen[sense] = p1 - p;
+ senseFatal[sense] = bFlagFatal;
}
}
p = p2;
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index 7f5d4317636a..d22d61e6e671 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -209,34 +209,38 @@ static void getExecutableDirectory_Impl(rtl_uString ** ppDirURL)
rtl_uString_newFromStr_WithLength(ppDirURL,fileName.getStr(),nDirEnd);
}
-static OUString & getIniFileName_Impl()
-{
- static OUString aStaticName = []() {
- OUString fileName;
+static OUString getIniFileName(bool overriding) {
+ OUString fileName;
#if defined IOS
- // On iOS hardcode the inifile as "rc" in the .app
- // directory. Apps are self-contained anyway, there is no
- // possibility to have several "applications" in the same
- // installation location with different inifiles.
- const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: @"rc"]] UTF8String];
- fileName = OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8);
- resolvePathnameUrl(&fileName);
+ // On iOS hardcode the inifile as "rc" in the .app
+ // directory. Apps are self-contained anyway, there is no
+ // possibility to have several "applications" in the same
+ // installation location with different inifiles.
+ const char *inifile = [[@"vnd.sun.star.pathname:" stringByAppendingString: [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent: (overriding ? @"fundamental.override.ini" : @"rc")]] UTF8String];
+ fileName = OUString(inifile, strlen(inifile), RTL_TEXTENCODING_UTF8);
+ resolvePathnameUrl(&fileName);
#elif defined ANDROID
- // Apps are self-contained on Android, too, can as well hardcode
- // it as "rc" in the "/assets" directory, i.e. inside the app's
- // .apk (zip) archive as the /assets/rc file.
- fileName = OUString("vnd.sun.star.pathname:/assets/rc");
- resolvePathnameUrl(&fileName);
+ // Apps are self-contained on Android, too, can as well hardcode
+ // it as "rc" in the "/assets" directory, i.e. inside the app's
+ // .apk (zip) archive as the /assets/rc file.
+ fileName = overriding
+ ? OUString("vnd.sun.star.pathname:/assets/fundamental.override.ini")
+ : OUString("vnd.sun.star.pathname:/assets/rc");
+ resolvePathnameUrl(&fileName);
#else
- if (getFromCommandLineArgs("INIFILENAME", &fileName))
- {
- resolvePathnameUrl(&fileName);
- }
- else
- {
- osl_getExecutableFile(&(fileName.pData));
+ if (!overriding && getFromCommandLineArgs("INIFILENAME", &fileName))
+ {
+ resolvePathnameUrl(&fileName);
+ }
+ else
+ {
+ osl_getExecutableFile(&(fileName.pData));
+ if (overriding) {
+ auto const i = fileName.lastIndexOf('/') + 1;
+ fileName = fileName.replaceAt(i, fileName.getLength() - i, u"fundamental.override.ini");
+ } else {
// get rid of a potential executable extension
OUString progExt = ".bin";
if (fileName.getLength() > progExt.getLength()
@@ -254,19 +258,31 @@ static OUString & getIniFileName_Impl()
// append config file suffix
fileName += SAL_CONFIGFILE("");
+ }
#ifdef MACOSX
- // We keep only executables in the MacOS folder, and all
- // rc files in LIBO_ETC_FOLDER (typically "Resources").
- sal_Int32 off = fileName.lastIndexOf( "/MacOS/" );
- if (off != -1)
- fileName = fileName.replaceAt(off + 1, strlen("MacOS"), LIBO_ETC_FOLDER);
+ // We keep only executables in the MacOS folder, and all
+ // rc files in LIBO_ETC_FOLDER (typically "Resources").
+ sal_Int32 off = fileName.lastIndexOf( "/MacOS/" );
+ if (off != -1)
+ fileName = fileName.replaceAt(off + 1, strlen("MacOS"), LIBO_ETC_FOLDER);
#endif
- }
+ }
#endif
- return fileName;
- }();
+ return fileName;
+}
+
+static OUString const & getOverrideIniFileName_Impl()
+{
+ static OUString aStaticName = getIniFileName(true);
+
+ return aStaticName;
+}
+
+static OUString & getIniFileName_Impl()
+{
+ static OUString aStaticName = getIniFileName(false);
return aStaticName;
}
@@ -284,6 +300,7 @@ static void EnsureNoFinalSlash (OUString & url)
struct Bootstrap_Impl
{
sal_Int32 _nRefCount;
+ Bootstrap_Impl * _override_base_ini;
Bootstrap_Impl * _base_ini;
NameValueVector _nameValueVector;
@@ -315,23 +332,47 @@ struct Bootstrap_Impl
Bootstrap_Impl::Bootstrap_Impl( OUString const & rIniName )
: _nRefCount( 0 ),
+ _override_base_ini( nullptr ),
_base_ini( nullptr ),
_iniName (rIniName)
{
- OUString base_ini(getIniFileName_Impl());
+ OUString override_base_ini(getOverrideIniFileName_Impl());
// normalize path
- FileStatus status( osl_FileStatus_Mask_FileURL );
- DirectoryItem dirItem;
- if (DirectoryItem::get(base_ini, dirItem) == DirectoryItem::E_None &&
- dirItem.getFileStatus(status) == DirectoryItem::E_None)
+ FileStatus override_status( osl_FileStatus_Mask_FileURL );
+ DirectoryItem override_dirItem;
+ bool skip_base_ini = false;
+ if (DirectoryItem::get(override_base_ini, override_dirItem) == DirectoryItem::E_None &&
+ override_dirItem.getFileStatus(override_status) == DirectoryItem::E_None)
{
- base_ini = status.getFileURL();
- if (rIniName != base_ini)
+ override_base_ini = override_status.getFileURL();
+ if (rIniName != override_base_ini)
{
- _base_ini = static_cast< Bootstrap_Impl * >(
- rtl_bootstrap_args_open(base_ini.pData));
+ _override_base_ini = static_cast< Bootstrap_Impl * >(
+ rtl_bootstrap_args_open(override_base_ini.pData));
+ }
+ else
+ {
+ skip_base_ini = true;
}
}
+
+ if (!skip_base_ini) {
+ OUString base_ini(getIniFileName_Impl());
+ // normalize path
+ FileStatus status( osl_FileStatus_Mask_FileURL );
+ DirectoryItem dirItem;
+ if (DirectoryItem::get(base_ini, dirItem) == DirectoryItem::E_None &&
+ dirItem.getFileStatus(status) == DirectoryItem::E_None)
+ {
+ base_ini = status.getFileURL();
+ if (rIniName != base_ini)
+ {
+ _base_ini = static_cast< Bootstrap_Impl * >(
+ rtl_bootstrap_args_open(base_ini.pData));
+ }
+ }
+ }
+
SAL_INFO("sal.bootstrap", "Bootstrap_Impl(): sFile=" << _iniName);
oslFileHandle handle;
if (!_iniName.isEmpty() &&
@@ -366,6 +407,8 @@ Bootstrap_Impl::~Bootstrap_Impl()
{
if (_base_ini)
rtl_bootstrap_args_close( _base_ini );
+ if (_override_base_ini)
+ rtl_bootstrap_args_close( _override_base_ini );
}
namespace {
@@ -423,6 +466,13 @@ bool Bootstrap_Impl::getValue(
if (override && getDirectValue(key, value, mode, requestStack))
return true;
+ if (_override_base_ini != nullptr
+ && _override_base_ini->getDirectValue(key, value, mode, requestStack))
+ {
+ SAL_INFO("sal.bootstrap", "getValue(" << key << ") from fundamental.override.ini");
+ return true;
+ }
+
if (key == "_OS")
{
rtl_uString_assign(
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 9b35c1682be5..3c30d7384ab5 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -548,7 +548,7 @@ Event& Entity::getEvent( CallbackType aType )
OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, const OUString& sSystemId, sal_Int32 nLine )
{
const sal_Char* pMessage;
- xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
+ const xmlError* error = xmlCtxtGetLastError( ctxt );
if( error && error->message )
pMessage = error->message;
else
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8091f7e2ffb9..4cc98b01096e 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -558,6 +558,8 @@ private:
bool mbFinalTrackFormulas : 1;
// This indicates if a ScDocShell::DoRecalc() or ScDocShell::DoHardRecalc() is in progress.
bool mbDocShellRecalc : 1;
+ // This indicates if a ScOutputData::LayoutStrings() is in progress.
+ bool mbLayoutStrings : 1;
size_t mnMutationGuardFlags;
@@ -2502,6 +2504,9 @@ public:
bool IsInDocShellRecalc() const { return mbDocShellRecalc; }
void SetDocShellRecalc(bool bSet) { mbDocShellRecalc = bSet; }
+ bool IsInLayoutStrings() const { return mbLayoutStrings; }
+ void SetLayoutStrings(bool bSet) { mbLayoutStrings = bSet; }
+
private:
/**
diff --git a/sc/inc/documentimport.hxx b/sc/inc/documentimport.hxx
index 758469f258a6..ed77561a5153 100644
--- a/sc/inc/documentimport.hxx
+++ b/sc/inc/documentimport.hxx
@@ -125,6 +125,8 @@ public:
void setMergedCells(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
+ void invalidateBlockPositionSet(SCTAB nTab);
+
void finalize();
/** Broadcast all formula cells that are marked with
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 3fa25a13f2ff..7327affb7a81 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -189,6 +189,7 @@ public:
std::vector<SdrObject*> GetObjectsAnchoredToRows(SCTAB nTab, SCROW nStartRow, SCROW nEndRow);
std::map<SCROW, std::vector<SdrObject*>> GetObjectsAnchoredToRange(SCTAB nTab, SCCOL nCol, SCROW nStartRow, SCROW nEndRow);
bool HasObjectsAnchoredInRange(const ScRange& rRange);
+ std::vector<SdrObject*> GetObjectsAnchoredToCols(SCTAB nTab, SCCOL nStartCol, SCCOL nEndCol);
void MoveObject(SdrObject* pObj, const ScAddress& rNewPosition);
// positions for detective lines
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 86d579bd1016..3d842bcfc8db 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -74,7 +74,7 @@ public:
static std::unique_ptr<EditTextObject> Clone( const EditTextObject& rSrc, ScDocument& rDestDoc );
static OUString GetCellFieldValue(
- const SvxFieldData& rFieldData, const ScDocument* pDoc, boost::optional<Color>* ppTextColor );
+ const SvxFieldData& rFieldData, const ScDocument* pDoc, boost::optional<Color>* ppTextColor, boost::optional<FontLineStyle>* ppFldLineStyle );
public:
ScEditUtil( ScDocument* pDocument, SCCOL nX, SCROW nY, SCTAB nZ,
@@ -186,7 +186,7 @@ public:
void SetExecuteURL(bool bSet) { bExecuteURL = bSet; }
virtual void FieldClicked( const SvxFieldItem& rField ) override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle ) override;
};
// 1/100 mm
@@ -223,7 +223,7 @@ private:
public:
ScHeaderEditEngine( SfxItemPool* pEnginePool );
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor, boost::optional<FontLineStyle>& rFldLineStyle ) override;
void SetNumType(SvxNumType eNew) { aData.eNumType = eNew; }
void SetData(const ScHeaderFieldData& rNew) { aData = rNew; }
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index b2fca017608f..96702d1213e0 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -461,6 +461,8 @@ public:
void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
std::unique_ptr<ScPostIt> ReleaseNote( SCCOL nCol, SCROW nRow );
+ ScPostIt* GetNote( SCCOL nCol, SCROW nRow );
+ void SetNote( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPostIt> pNote );
size_t GetNoteCount( SCCOL nCol ) const;
SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const;
diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx
index f6a7ea8bfbd0..ec789fe0fdeb 100644
--- a/sc/qa/extras/scpdfexport.cxx
+++ b/sc/qa/extras/scpdfexport.cxx
@@ -55,13 +55,17 @@ private:
public:
void testExportRange_Tdf120161();
void testExportFitToPage_Tdf103516();
+ void testForcepoint97();
CPPUNIT_TEST_SUITE(ScPDFExportTest);
CPPUNIT_TEST(testExportRange_Tdf120161);
CPPUNIT_TEST(testExportFitToPage_Tdf103516);
+ CPPUNIT_TEST(testForcepoint97);
CPPUNIT_TEST_SUITE_END();
};
+char const DATA_DIRECTORY[] = "/sc/qa/extras/testdocuments/";
+
void ScPDFExportTest::setUp()
{
test::BootstrapFixture::setUp();
@@ -358,6 +362,18 @@ void ScPDFExportTest::testExportFitToPage_Tdf103516()
}
}
+// just needs to not crash on export to pdf
+void ScPDFExportTest::testForcepoint97()
+{
+ mxComponent = loadFromDesktop(m_directories.getURLFromSrc(DATA_DIRECTORY) + "forcepoint97.xlsx",
+ "com.sun.star.sheet.SpreadsheetDocument");
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+
+ // A1:H81
+ ScRange range1(0, 0, 0, 7, 81, 0);
+ std::shared_ptr<utl::TempFile> pPDFFile = exportToPDF(xModel, range1);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScPDFExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/qa/extras/testdocuments/forcepoint97.xlsx b/sc/qa/extras/testdocuments/forcepoint97.xlsx
new file mode 100644
index 000000000000..152fbbc45a9f
--- /dev/null
+++ b/sc/qa/extras/testdocuments/forcepoint97.xlsx
Binary files differ
diff --git a/sc/qa/uitest/calc_tests7/tdf150044.py b/sc/qa/uitest/calc_tests7/tdf150044.py
new file mode 100644
index 000000000000..e3a400f617da
--- /dev/null
+++ b/sc/qa/uitest/calc_tests7/tdf150044.py
@@ -0,0 +1,85 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from org.libreoffice.unotest import systemPathToFileUrl
+from tempfile import TemporaryDirectory
+import os.path
+
+class save_shared_readonly_with_password(UITestCase):
+
+ def test_save_to_shared_ods(self):
+
+ return # FIXME the test deadlocks after saving the file
+ with TemporaryDirectory() as tempdir:
+ xFilePath = os.path.join(tempdir, "shared_readonly_with_password_tmp.ods")
+
+ self.ui_test.create_doc_in_start_center("calc")
+
+ self.ui_test.execute_dialog_through_command(".uno:ShareDocument")
+ xShareDocumentDialog = self.xUITest.getTopFocusWindow()
+ xShareCheckButton = xShareDocumentDialog.getChild("share")
+ xShareCheckButton.executeAction("CLICK", tuple())
+ xOk = xShareDocumentDialog.getChild("ok")
+
+ # Save the document
+ self.ui_test.execute_dialog_through_action(xOk, "CLICK")
+ xSaveDialog = self.xUITest.getTopFocusWindow()
+ xFileName = xSaveDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"CTRL+A"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+ xPasswordCheckButton = xSaveDialog.getChild("password")
+ xPasswordCheckButton.executeAction("CLICK", tuple())
+ xOpen = xSaveDialog.getChild("open")
+
+ self.ui_test.execute_dialog_through_action(xOpen, "CLICK")
+ xPasswordDialog = self.xUITest.getTopFocusWindow()
+ xReadonly = xPasswordDialog.getChild("readonly")
+ xReadonly.executeAction("CLICK", tuple())
+ xNewPassword = xPasswordDialog.getChild("newpassroEntry")
+ xNewPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"}))
+ xConfirmPassword = xPasswordDialog.getChild("confirmropassEntry")
+ xConfirmPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"}))
+
+ xOKButton = xPasswordDialog.getChild("ok")
+ xOKButton.executeAction("CLICK", tuple())
+
+ while True:
+ if not os.path.isfile(xFilePath):
+ time.sleep(DEFAULT_SLEEP)
+
+ self.ui_test.close_doc()
+
+ self.ui_test.execute_dialog_through_command(".uno:Open")
+ xOpenDialog = self.xUITest.getTopFocusWindow()
+ # Open document
+ xFileName = xOpenDialog.getChild("file_name")
+ xFileName.executeAction("TYPE", mkPropertyValues({"TEXT": xFilePath}))
+ xOpenBtn = xOpenDialog.getChild("open")
+ xOpenBtn.executeAction("CLICK", tuple())
+
+ xDialog = self.ui_test.wait_for_top_focus_window('SharedWarningDialog')
+ xOk = xDialog.getChild("ok")
+ xOk.executeAction("CLICK", tuple())
+
+ document = self.ui_test.get_component()
+ self.assertTrue(document.isReadonly())
+
+ self.ui_test.execute_dialog_through_command(".uno:EditDoc")
+ xDialog = self.xUITest.getTopFocusWindow()
+ # check that we have a password dialog for editing the shared document
+ xPassword = xDialog.getChild("newpassEntry")
+ xPassword.executeAction("TYPE", mkPropertyValues({"TEXT": "password"}))
+ xOKButton = xDialog.getChild("ok")
+ xOKButton.executeAction("CLICK", tuple())
+
+ self.assertFalse(document.isReadonly())
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sc/qa/unit/data/contentCSV/fdo48621_broken_quotes_exported.csv b/sc/qa/unit/data/contentCSV/fdo48621_broken_quotes_exported.csv
index dfc83c5f3ced..8e10063eefe5 100644
--- a/sc/qa/unit/data/contentCSV/fdo48621_broken_quotes_exported.csv
+++ b/sc/qa/unit/data/contentCSV/fdo48621_broken_quotes_exported.csv
@@ -53,8 +53,8 @@ No it doesn't,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
",<- needed to end test file here,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
i80385_test2.csv,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-test,"a""b, ""a"," d""a""c ", m ,j ,d,"b""A""","D""E","f,1","a,b","de""b,a
-""abcdef"" test ""abc","def""g""h","def""gh""",,,,,,,,,,,,,,,,,,,,,,,
+test,"a""b, ""a"," d""a""c ", m ,j ,d,"b""A""","D""E","f,1","a,b","""de""b",a,,,,,,,,,,,,,,,,,,,,,,,,
+"abcdef"" test ""abc","def""g""h","def""gh""",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"this is
a test","yes
it
@@ -78,8 +78,8 @@ No it doesn't,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
""a""b""",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
i80385_test4.csv,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
-test,"a""b, ""a"," d""a""c ", m ,j ,d,"b""A""","D""E","f,1","a,b","de""b,a
-""abcdef"" test ""abc","def""g""h","def""gh""",,,,,,,,,,,,,,,,,,,,,,,
+test,"a""b, ""a"," d""a""c ", m ,j ,d,"b""A""","D""E","f,1","a,b","""de""b",a,,,,,,,,,,,,,,,,,,,,,,,,
+"abcdef"" test ""abc","def""g""h","def""gh""",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
"this is
a test","yes
it
diff --git a/sc/qa/unit/data/xlsx/forcepoint107.xlsx b/sc/qa/unit/data/xlsx/forcepoint107.xlsx
new file mode 100644
index 000000000000..f5238dcb5c3e
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/forcepoint107.xlsx
Binary files differ
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 43c3483bb281..33887536e681 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -79,6 +79,7 @@ public:
void testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef const & xDocShRef, SCROW nRow1, SCROW nRow2,
bool bCheckRelativeInSheet );
void testSortWithFormattingXLS();
+ void testForcepoint107();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testCVEs);
@@ -104,6 +105,7 @@ public:
CPPUNIT_TEST(testSortWithSharedFormulasODS);
CPPUNIT_TEST(testSortWithSheetExternalReferencesODS);
CPPUNIT_TEST(testSortWithFormattingXLS);
+ CPPUNIT_TEST(testForcepoint107);
CPPUNIT_TEST_SUITE_END();
@@ -845,6 +847,13 @@ void ScFiltersTest::testSortWithFormattingXLS()
xDocSh->DoClose();
}
+// just needs to not crash on recalc
+void ScFiltersTest::testForcepoint107()
+{
+ ScDocShellRef xDocSh = loadDoc(u"forcepoint107.", FORMAT_XLSX, true);
+ xDocSh->DoHardRecalc();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
, mbUpdateReferenceOnSort(false)
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 64c0d990c147..674ee87f2edf 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -541,8 +541,10 @@ Color CalcColor( double nVal, double nVal1, const Color& rCol1, double nVal2, co
double GetPercentile( const std::vector<double>& rArray, double fPercentile )
{
size_t nSize = rArray.size();
- size_t nIndex = static_cast<size_t>(::rtl::math::approxFloor( fPercentile * (nSize-1)));
- double fDiff = fPercentile * (nSize-1) - ::rtl::math::approxFloor( fPercentile * (nSize-1));
+ double fFloor = ::rtl::math::approxFloor(fPercentile * (nSize-1));
+ SAL_WARN_IF(fFloor < 0, "sc", "negative percentile");
+ size_t nIndex = fFloor >= 0 ? static_cast<size_t>(fFloor) : 0;
+ double fDiff = fPercentile * (nSize-1) - fFloor;
std::vector<double>::const_iterator iter = rArray.begin() + nIndex;
if (fDiff == 0.0)
return *iter;
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index 5331e8ac33ae..efbd720c249d 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1080,8 +1080,8 @@ void ScQueryCellIterator::InitPos()
nRow = mpParam->nRow1;
if (mpParam->bHasHeader && mpParam->bByRow)
++nRow;
- ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- maCurPos = pCol->maCells.position(nRow);
+ const ScColumn& rCol = pDoc->maTabs[nTab]->CreateColumnIfNotExists(nCol);
+ maCurPos = rCol.maCells.position(nRow);
}
void ScQueryCellIterator::IncPos()
@@ -1460,6 +1460,8 @@ ScCountIfCellIterator::ScCountIfCellIterator(ScDocument* pDocument, const ScInte
mrContext( rContext ),
nTab( nTable)
{
+ maParam.nCol1 = pDoc->maTabs[nTable]->ClampToAllocatedColumns(maParam.nCol1);
+ maParam.nCol2 = pDoc->maTabs[nTable]->ClampToAllocatedColumns(maParam.nCol2);
nCol = maParam.nCol1;
nRow = maParam.nRow1;
}
@@ -1799,6 +1801,10 @@ bool ScQueryCellIterator::BinarySearch()
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
nCol = mpParam->nCol1;
+
+ if (nCol >= pDoc->maTabs[nTab]->GetAllocatedColumnsCount())
+ return false;
+
ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
if (pCol->IsEmptyData())
return false;
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7271fdef0d43..dd76b6cc2dc3 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -166,6 +166,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mbTrackFormulasPending(false),
mbFinalTrackFormulas(false),
mbDocShellRecalc(false),
+ mbLayoutStrings(false),
mnMutationGuardFlags(0)
{
SetStorageGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT);
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 106360e2a14d..3f1a41f908a3 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6494,9 +6494,8 @@ ScPostIt* ScDocument::GetNote(const ScAddress& rPos)
ScPostIt* ScDocument::GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab)
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) &&
- nCol < maTabs[nTab]->GetAllocatedColumnsCount())
- return maTabs[nTab]->aCol[nCol].GetCellNote(nRow);
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ return maTabs[nTab]->GetNote(nCol, nRow);
else
return nullptr;
@@ -6509,7 +6508,8 @@ void ScDocument::SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote)
void ScDocument::SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote)
{
- return maTabs[nTab]->CreateColumnIfNotExists(nCol).SetCellNote(nRow, std::move(pNote));
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ maTabs[nTab]->SetNote(nCol, nRow, std::move(pNote));
}
bool ScDocument::HasNote(const ScAddress& rPos) const
@@ -6542,6 +6542,9 @@ bool ScDocument::HasColNotes(SCCOL nCol, SCTAB nTab) const
if (!pTab)
return false;
+ if (nCol >= pTab->GetAllocatedColumnsCount())
+ return false;
+
return pTab->aCol[nCol].HasCellNotes();
}
@@ -6585,6 +6588,7 @@ ScPostIt* ScDocument::GetOrCreateNote(const ScAddress& rPos)
else
return CreateNote(rPos);
}
+
ScPostIt* ScDocument::CreateNote(const ScAddress& rPos)
{
ScPostIt* pPostIt = new ScPostIt(*this, rPos);
@@ -6752,6 +6756,8 @@ void ScDocument::GetNotesInRange( const ScRangeList& rRangeList, std::vector<sc:
const ScRange & rRange = rRangeList[i];
for( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab )
{
+ if (!maTabs[nTab])
+ continue;
maTabs[nTab]->GetNotesInRange( rRange, rNotes );
}
}
@@ -6769,6 +6775,8 @@ bool ScDocument::ContainsNotesInRange( const ScRangeList& rRangeList ) const
const ScRange & rRange = rRangeList[i];
for( SCTAB nTab = rRange.aStart.Tab(); nTab <= rRange.aEnd.Tab(); ++nTab )
{
+ if (!maTabs[nTab])
+ continue;
bool bContainsNote = maTabs[nTab]->ContainsNotesInRange( rRange );
if(bContainsNote)
return true;
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index e5c0cfbef37e..948784c7157e 100644
--- a/sc/source/core/data/documentimport.cxx
+++ b/sc/source/core/data/documentimport.cxx
@@ -92,6 +92,15 @@ struct ScDocumentImportImpl
return rTab.getBlockPosition(nCol);
}
+ void invalidateBlockPositionSet(SCTAB nTab)
+ {
+ if (sal_uInt16(nTab) >= maBlockPosSet.size())
+ return;
+
+ sc::TableColumnBlockPositionSet& rTab = maBlockPosSet[nTab];
+ rTab.invalidate();
+ }
+
void initForSheets()
{
size_t n = mrDoc.GetTableCount();
@@ -179,6 +188,11 @@ void ScDocumentImport::setOriginDate(sal_uInt16 nYear, sal_uInt16 nMonth, sal_uI
mpImpl->mrDoc.pDocOptions->SetDate(nDay, nMonth, nYear);
}
+void ScDocumentImport::invalidateBlockPositionSet(SCTAB nTab)
+{
+ mpImpl->invalidateBlockPositionSet(nTab);
+}
+
void ScDocumentImport::setAutoInput(const ScAddress& rPos, const OUString& rStr, const ScSetStringParam* pStringParam)
{
ScTable* pTab = mpImpl->mrDoc.FetchTable(rPos.Tab());
@@ -366,6 +380,14 @@ void ScDocumentImport::setFormulaCell(const ScAddress& rPos, ScFormulaCell* pCel
mpImpl->mrDoc.CheckLinkFormulaNeedingCheck( *pCell->GetCode());
sc::CellStoreType& rCells = pTab->aCol[rPos.Col()].maCells;
+
+ sc::CellStoreType::position_type aPos = rCells.position(rPos.Row());
+ if (aPos.first != rCells.end() && aPos.first->type == sc::element_type_formula)
+ {
+ ScFormulaCell* p = sc::formula_block::at(*aPos.first->data, aPos.second);
+ sc::SharedFormulaUtil::unshareFormulaCell(aPos, *p);
+ }
+
pBlockPos->miCellPos =
rCells.set(pBlockPos->miCellPos, rPos.Row(), pCell);
}
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 73762cc70c54..33f923d4a26e 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -1022,7 +1022,16 @@ bool ScDPObject::GetMembers( sal_Int32 nDim, sal_Int32 nHier, vector<ScDPLabelDa
for (sal_Int32 i = 0; i < nCount; ++i)
{
- Reference<container::XNamed> xMember(xMembersIA->getByIndex(i), UNO_QUERY);
+ Reference<container::XNamed> xMember;
+ try
+ {
+ xMember = Reference<container::XNamed>(xMembersIA->getByIndex(i), UNO_QUERY);
+ }
+ catch (const container::NoSuchElementException&)
+ {
+ TOOLS_WARN_EXCEPTION("sc", "ScNameToIndexAccess getByIndex failed");
+ }
+
ScDPLabelData::Member aMem;
if (xMember.is())
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 67f742dece8b..f9b132c1ca4f 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -2762,7 +2762,10 @@ ScDPResultDimension::~ScDPResultDimension()
ScDPResultMember *ScDPResultDimension::FindMember( SCROW iData ) const
{
if( bIsDataLayout )
- return maMemberArray[0].get();
+ {
+ SAL_WARN_IF(maMemberArray.empty(), "sc.core", "MemberArray is empty");
+ return !maMemberArray.empty() ? maMemberArray[0].get() : nullptr;
+ }
MemberHash::const_iterator aRes = maMemberHash.find( iData );
if( aRes != maMemberHash.end()) {
@@ -2969,8 +2972,11 @@ void ScDPResultDimension::LateInitFrom(
long ScDPResultDimension::GetSize(long nMeasure) const
{
- long nTotal = 0;
long nMemberCount = maMemberArray.size();
+ if (!nMemberCount)
+ return 0;
+
+ long nTotal = 0;
if (bIsDataLayout)
{
OSL_ENSURE(nMeasure == SC_DPMEASURE_ALL || pResultData->GetMeasureCount() == 1,
@@ -3123,7 +3129,7 @@ void ScDPResultDimension::SortMembers( ScDPResultMember* pRefMember )
// handle children
// for data layout, call only once - sorting measure is always taken from settings
- long nLoopCount = bIsDataLayout ? 1 : nCount;
+ long nLoopCount = bIsDataLayout ? std::min<long>(1, nCount) : nCount;
for (long i=0; i<nLoopCount; i++)
{
ScDPResultMember* pMember = maMemberArray[i].get();
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 515118d84c23..0bb4314309dc 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -795,13 +795,17 @@ void ScDrawLayer::RecalcPos( SdrObject* pObj, ScDrawObjData& rData, bool bNegati
position must not be done, if the cell containing the note has not
been moved yet in the document. The calling code now passes an
additional boolean stating if the cells are already moved. */
- if( bUpdateNoteCaptionPos )
+ /* tdf #152081 Do not change hidden objects. That would produce zero height
+ or width and loss of caption.*/
+ if (pObj->IsVisible() && bUpdateNoteCaptionPos)
+ {
/* When inside an undo action, there may be pending note captions
where cell note is already deleted (thus document cannot find
the note object anymore). The caption will be deleted later
with drawing undo. */
if( ScPostIt* pNote = pDoc->GetNote( rData.maStart ) )
pNote->UpdateCaptionPos( rData.maStart );
+ }
return;
}
@@ -2176,12 +2180,9 @@ ScDrawLayer::GetObjectsAnchoredToRows(SCTAB nTab, SCROW nStartRow, SCROW nEndRow
ScRange aRange( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab);
while (pObject)
{
- if (!dynamic_cast<SdrCaptionObj*>(pObject)) // Caption objects are handled differently
- {
- ScDrawObjData* pObjData = GetObjData(pObject);
- if (pObjData && aRange.In(pObjData->maStart))
- aObjects.push_back(pObject);
- }
+ ScDrawObjData* pObjData = GetObjData(pObject);
+ if (pObjData && aRange.In(pObjData->maStart))
+ aObjects.push_back(pObject);
pObject = aIter.Next();
}
return aObjects;
@@ -2235,6 +2236,27 @@ bool ScDrawLayer::HasObjectsAnchoredInRange(const ScRange& rRange)
return false;
}
+std::vector<SdrObject*> ScDrawLayer::GetObjectsAnchoredToCols(SCTAB nTab, SCCOL nStartCol,
+ SCCOL nEndCol)
+{
+ SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab));
+ if (!pPage || pPage->GetObjCount() < 1)
+ return std::vector<SdrObject*>();
+
+ std::vector<SdrObject*> aObjects;
+ SdrObjListIter aIter(pPage, SdrIterMode::Flat);
+ SdrObject* pObject = aIter.Next();
+ ScRange aRange(nStartCol, 0, nTab, nEndCol, MAXROW, nTab);
+ while (pObject)
+ {
+ ScDrawObjData* pObjData = GetObjData(pObject);
+ if (pObjData && aRange.In(pObjData->maStart))
+ aObjects.push_back(pObject);
+ pObject = aIter.Next();
+ }
+ return aObjects;
+}
+
void ScDrawLayer::MoveObject(SdrObject* pObject, const ScAddress& rNewPosition)
{
// Get anchor data
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index dff86ec3682e..656ad813093c 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -939,6 +939,9 @@ ScFormulaCell::~ScFormulaCell()
if (!mxGroup || !mxGroup->mpCode)
// Formula token is not shared.
delete pCode;
+
+ if (mxGroup && mxGroup->mpTopCell == this)
+ mxGroup->mpTopCell = nullptr;
}
ScFormulaCell* ScFormulaCell::Clone() const
@@ -2140,7 +2143,8 @@ void ScFormulaCell::InterpretTail( ScInterpreterContext& rContext, ScInterpretTa
// XXX if mbNeedsNumberFormat was set even if the current format
// was not General then we'd have to obtain the current format here
// and check at least the types.
- if (bSetFormat && (bForceNumberFormat || ((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0)))
+ const bool bSetNumberFormat = bSetFormat && (bForceNumberFormat || ((nFormatIndex % SV_COUNTRY_LANGUAGE_OFFSET) != 0));
+ if (bSetNumberFormat && !pDocument->IsInLayoutStrings())
{
// set number format explicitly
if (!pDocument->IsThreadedGroupCalcInProgress())
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 050fd823b4ee..3295a38a0243 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -37,6 +37,8 @@
#include <vcl/virdev.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/weld.hxx>
+#include <vcl/window.hxx>
#include <unotools/charclass.hxx>
#include <unotools/securityoptions.hxx>
#include <osl/diagnose.h>
@@ -789,7 +791,7 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno
OUString aUrlName( rURL );
SfxViewFrame* pFrame = nullptr;
- const SfxObjectShell* pObjShell = nullptr;
+ SfxObjectShell* pObjShell = nullptr;
OUString aReferName;
if ( pScActiveViewShell )
{
@@ -823,6 +825,9 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno
aUrlName = aNewUrlName;
}
+ if (!SfxObjectShell::AllowedLinkProtocolFromDocument(aUrlName, pObjShell, pFrame ? pFrame->GetWindow().GetFrameWeld() : nullptr))
+ return;
+
SfxStringItem aUrl( SID_FILE_NAME, aUrlName );
SfxStringItem aTarget( SID_TARGETNAME, rTarget );
if ( nScClickMouseModifier & KEY_SHIFT ) // control-click -> into new window
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3d1a1aabad37..0af4861983cb 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1651,6 +1651,21 @@ std::unique_ptr<ScPostIt> ScTable::ReleaseNote( SCCOL nCol, SCROW nRow )
return aCol[nCol].ReleaseNote(nRow);
}
+ScPostIt* ScTable::GetNote( SCCOL nCol, SCROW nRow )
+{
+ if (!ValidCol(nCol) || nCol >= GetAllocatedColumnsCount())
+ return nullptr;
+ return aCol[nCol].GetCellNote(nRow);
+}
+
+void ScTable::SetNote( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPostIt> pNote )
+{
+ if (!ValidColRow(nCol, nRow))
+ return;
+
+ CreateColumnIfNotExists(nCol).SetCellNote(nRow, std::move(pNote));
+}
+
size_t ScTable::GetNoteCount( SCCOL nCol ) const
{
if (!ValidCol(nCol) || nCol >= GetAllocatedColumnsCount())
@@ -2044,15 +2059,12 @@ const ScPatternAttr* ScTable::GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, S
bool ScTable::HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, HasAttrFlags nMask ) const
{
- if ( nCol1 >= aCol.size() )
- return false;
- if ( nCol2 >= aCol.size() )
- nCol2 = aCol.size() - 1; // Rows above range, doesn't contains flags
-
- bool bFound = false;
- for (SCCOL i=nCol1; i<=nCol2 && !bFound; i++)
- bFound |= aCol[i].HasAttrib( nRow1, nRow2, nMask );
- return bFound;
+ for(SCCOL nCol = nCol1; nCol <= nCol2 && nCol < aCol.size(); ++nCol )
+ if( aCol[nCol].HasAttrib( nRow1, nRow2, nMask ))
+ return true;
+ if( nCol2 >= aCol.size())
+ return aDefaultColAttrArray.HasAttrib( nRow1, nRow2, nMask );
+ return false;
}
bool ScTable::HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const
diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index 9975d96212c5..bd810c6b370a 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -36,6 +36,7 @@
#include <printopt.hxx>
#include <bcaslot.hxx>
#include <compressedarray.hxx>
+#include <userdat.hxx>
#include <com/sun/star/sheet/TablePageBreakData.hpp>
@@ -583,13 +584,24 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
else
bChanged = mpHiddenRows->setFalse(nStartRow, nEndRow);
- std::vector<SdrObject*> aRowDrawObjects;
+ // Cell anchored objects might change visibility
ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
if (pDrawLayer) {
+ std::vector<SdrObject*> aRowDrawObjects;
aRowDrawObjects = pDrawLayer->GetObjectsAnchoredToRows(GetTab(), nStartRow, nEndRow);
for (auto aObj : aRowDrawObjects)
{
- aObj->SetVisible(!bHidden);
+ ScDrawObjData* pData = ScDrawLayer::GetObjData(aObj);
+ if (pData)
+ {
+ if (bHidden)
+ aObj->SetVisible(false);
+ else if (!GetDoc().ColHidden(pData->maStart.Col(), pData->maStart.Tab()))
+ {
+ // Only change visibility if object is not hidden by a hidden col
+ aObj->SetVisible(true);
+ }
+ }
}
}
@@ -621,6 +633,28 @@ void ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
else
bChanged = mpHiddenCols->setFalse(nStartCol, nEndCol);
+ // Cell anchored objects might change visibility
+ ScDrawLayer* pDrawLayer = pDocument->GetDrawLayer();
+ if (pDrawLayer)
+ {
+ std::vector<SdrObject*> aColDrawObjects;
+ aColDrawObjects = pDrawLayer->GetObjectsAnchoredToCols(GetTab(), nStartCol, nEndCol);
+ for (auto aObj : aColDrawObjects)
+ {
+ ScDrawObjData* pData = ScDrawLayer::GetObjData(aObj);
+ if (pData)
+ {
+ if (bHidden)
+ aObj->SetVisible(false);
+ else if (!GetDoc().RowHidden(pData->maStart.Row(), pData->maStart.Tab()))
+ {
+ // Only change visibility if object is not hidden by a hidden row
+ aObj->SetVisible(true);
+ }
+ }
+ }
+ }
+
if (bChanged)
SetStreamValid(false);
}
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 3b902524d901..c7d4527dbf57 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();
@@ -1086,6 +1087,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/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e26dd00177f9..125c1acd8e9d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2588,7 +2588,14 @@ Label_MaskStateMachine:
if (eState != ssSkipReference)
{
*pSym++ = c;
- *pSym++ = *pSrc++;
+
+ if( pSym == &cSymbol[ MAXSTRLEN ] )
+ {
+ SetError( FormulaError::StringOverflow);
+ eState = ssStop;
+ }
+ else
+ *pSym++ = *pSrc++;
}
bAddToSymbol = false;
}
@@ -4514,6 +4521,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
pFunctionStack[0].eOp = ocNone;
pFunctionStack[0].nSep = 0;
size_t nFunction = 0;
+ size_t nHighWatermark = 0;
short nBrackets = 0;
bool bInArray = false;
eLastOp = ocOpen;
@@ -4533,6 +4541,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
++nFunction;
pFunctionStack[ nFunction ].eOp = eLastOp;
pFunctionStack[ nFunction ].nSep = 0;
+ nHighWatermark = nFunction;
}
}
break;
@@ -4571,6 +4580,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
++nFunction;
pFunctionStack[ nFunction ].eOp = eOp;
pFunctionStack[ nFunction ].nSep = 0;
+ nHighWatermark = nFunction;
}
}
break;
@@ -4601,6 +4611,7 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
++nFunction;
pFunctionStack[ nFunction ].eOp = eOp;
pFunctionStack[ nFunction ].nSep = 0;
+ nHighWatermark = nFunction;
}
}
break;
@@ -4643,9 +4654,9 @@ std::unique_ptr<ScTokenArray> ScCompiler::CompileString( const OUString& rFormul
// Append a parameter for WEEKNUM, all 1.0
// Function is already closed, parameter count is nSep+1
size_t nFunc = nFunction + 1;
- if (eOp == ocClose &&
- (pFunctionStack[ nFunc ].eOp == ocWeek && // 2nd week start
- pFunctionStack[ nFunc ].nSep == 0))
+ if (eOp == ocClose && nFunc <= nHighWatermark &&
+ pFunctionStack[ nFunc ].nSep == 0 &&
+ pFunctionStack[ nFunc ].eOp == ocWeek) // 2nd week start
{
if ( !static_cast<ScTokenArray*>(pArr)->Add( new FormulaToken( svSep, ocSep)) ||
!static_cast<ScTokenArray*>(pArr)->Add( new FormulaDoubleToken( 1.0)))
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 040456d49ac2..7b0ed36fc8ed 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -195,7 +195,7 @@ std::unique_ptr<EditTextObject> ScEditUtil::Clone( const EditTextObject& rObj, S
}
OUString ScEditUtil::GetCellFieldValue(
- const SvxFieldData& rFieldData, const ScDocument* pDoc, boost::optional<Color>* ppTextColor )
+ const SvxFieldData& rFieldData, const ScDocument* pDoc, boost::optional<Color>* ppTextColor, boost::optional<FontLineStyle>* ppFldLineStyle )
{
OUString aRet;
switch (rFieldData.GetClassId())
@@ -223,6 +223,9 @@ OUString ScEditUtil::GetCellFieldValue(
if (ppTextColor)
*ppTextColor = SC_MOD()->GetColorConfig().GetColorValue(eEntry).nColor;
+
+ if (ppFldLineStyle)
+ *ppFldLineStyle = FontLineStyle::LINESTYLE_SINGLE;
}
break;
case text::textfield::Type::EXTENDED_TIME:
@@ -796,7 +799,8 @@ ScHeaderEditEngine::ScHeaderEditEngine( SfxItemPool* pEnginePoolP )
OUString ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- boost::optional<Color>& /* rTxtColor */, boost::optional<Color>& /* rFldColor */ )
+ boost::optional<Color>& /* rTxtColor */, boost::optional<Color>& /* rFldColor */,
+ boost::optional<FontLineStyle>& /*rFldLineStyle*/ )
{
const SvxFieldData* pFieldData = rField.GetField();
if (!pFieldData)
@@ -860,14 +864,15 @@ ScFieldEditEngine::ScFieldEditEngine(
OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
sal_Int32 /* nPara */, sal_Int32 /* nPos */,
- boost::optional<Color>& rTxtColor, boost::optional<Color>& /* rFldColor */ )
+ boost::optional<Color>& rTxtColor, boost::optional<Color>& /* rFldColor */,
+ boost::optional<FontLineStyle>& rFldLineStyle )
{
const SvxFieldData* pFieldData = rField.GetField();
if (!pFieldData)
return " ";
- return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor);
+ return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor, &rFldLineStyle);
}
void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField )
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e375f1626ec5..f1f7a6827cf1 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7524,7 +7524,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 ];
@@ -7571,7 +7571,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 ];
@@ -9505,6 +9505,8 @@ void ScInterpreter::ScMid()
OUString aStr = GetString().getString();
if ( nStart < 1 || nSubLen < 0 )
PushIllegalArgument();
+ else if (nStart > kScInterpreterMaxStrLen || nSubLen > kScInterpreterMaxStrLen)
+ PushError(FormulaError::StringOverflow);
else
{
sal_Int32 nLen = aStr.getLength();
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index f219beca9386..d442d4eee224 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3474,7 +3474,7 @@ void ScInterpreter::ScPercentile( bool bInclusive )
GetNumberSequenceArray( 1, aArray, false );
if ( aArray.empty() || nGlobalError != FormulaError::NONE )
{
- SetError( FormulaError::NoValue );
+ PushNoValue();
return;
}
if ( bInclusive )
@@ -3497,7 +3497,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 eb3fb987c034..002c7de4c1da 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4012,7 +4012,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 8b58519bcda2..2da332b2b14f 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -34,6 +34,7 @@
#include <cstring>
#include <memory>
+#include <libxml/parser.h>
using namespace com::sun::star;
@@ -222,6 +223,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 +233,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/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index e5af3d924863..770e6fbbe717 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -1118,7 +1118,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
for (const auto& rDataField : aDataFields)
{
long nDimIdx = rDataField.mnPos;
- assert(aCachedDims[nDimIdx]); // the loop above should have screened for NULL's.
+ assert(nDimIdx == -2 || aCachedDims[nDimIdx]); // the loop above should have screened for NULL's, skip check for -2 "data field"
const ScDPSaveDimension& rDim = *rDataField.mpDim;
boost::optional<OUString> pName = rDim.GetLayoutName();
// tdf#124651: despite being optional in CT_DataField according to ECMA-376 Part 1,
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index ae46949e4b21..34f481eba09c 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -752,6 +752,16 @@ void ScHTMLLayoutParser::SetWidths()
sal_uInt16 nMax = static_cast<sal_uInt16>(pLocalColOffset->back());
if ( aPageSize.Width() < nMax )
aPageSize.setWidth( nMax );
+ if (nTableLevel == 0)
+ {
+ // Local table is very outer table, create missing offsets.
+ for (auto it = pLocalColOffset->begin(); it != pLocalColOffset->end(); ++it)
+ {
+ // Only exact offsets, do not use MakeColNoRef().
+ if (maColOffset.find(*it) == maColOffset.end())
+ maColOffset.insert(*it);
+ }
+ }
}
for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i )
{
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 02cd9b0e014d..d85cc4456d58 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -580,14 +580,9 @@ void OP_SheetName123(LotusContext& rContext, SvStream& rStream, sal_uInt16 nLeng
sal_uInt16 nSheetNum(0);
rStream.ReadUInt16(nSheetNum);
- ::std::vector<sal_Char> sSheetName;
- sSheetName.reserve(nLength-4);
- for (sal_uInt16 i = 4; i < nLength; ++i)
- {
- sal_Char c;
- rStream.ReadChar( c );
- sSheetName.push_back(c);
- }
+ const size_t nStrLen = nLength - 4;
+ std::vector<sal_Char> sSheetName(nStrLen + 1);
+ sSheetName[rStream.ReadBytes(sSheetName.data(), nStrLen)] = 0;
if (!ValidTab(nSheetNum))
return;
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 03b35ef76e35..61539c8f90af 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -401,9 +401,22 @@ void SheetDataBuffer::addColXfStyle( sal_Int32 nXfId, sal_Int32 nFormatId, const
void SheetDataBuffer::finalizeImport()
{
+ ScDocumentImport& rDocImport = getDocImport();
+
+ SCTAB nStartTabInvalidatedIters(SCTAB_MAX);
+ SCTAB nEndTabInvalidatedIters(0);
+
// create all array formulas
for( const auto& [rRange, rTokens] : maArrayFormulas )
- finalizeArrayFormula( rRange, rTokens );
+ {
+ finalizeArrayFormula(rRange, rTokens);
+
+ nStartTabInvalidatedIters = std::min(rRange.aStart.Tab(), nStartTabInvalidatedIters);
+ nEndTabInvalidatedIters = std::max(rRange.aEnd.Tab(), nEndTabInvalidatedIters);
+ }
+
+ for (SCTAB nTab = nStartTabInvalidatedIters; nTab <= nEndTabInvalidatedIters; ++nTab)
+ rDocImport.invalidateBlockPositionSet(nTab);
// create all table operations
for( const auto& [rRange, rModel] : maTableOperations )
@@ -439,7 +452,6 @@ void SheetDataBuffer::finalizeImport()
}
}
- ScDocumentImport& rDocImport = getDocImport();
ScDocument& rDoc = rDocImport.getDoc();
StylesBuffer& rStyles = getStyles();
for ( const auto& [rCol, rRowStyles] : maStylesPerColumn )
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index dd74d30523bc..bf8ef340995a 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -548,7 +548,7 @@ void WorkbookGlobals::initialize()
aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_A1 ) ;
mpDoc->SetCalcConfig(aCalcConfig);
}
- else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice"))
+ else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice") || aGenerator.startsWithIgnoreAsciiCase("Collabora") || aGenerator.startsWithIgnoreAsciiCase("CIB"))
{
mbGeneratorKnownGood = true;
}
diff --git a/sc/source/filter/orcus/filterdetect.cxx b/sc/source/filter/orcus/filterdetect.cxx
index 106248854b1d..c0a3f922de46 100644
--- a/sc/source/filter/orcus/filterdetect.cxx
+++ b/sc/source/filter/orcus/filterdetect.cxx
@@ -14,7 +14,7 @@
#include <unotools/mediadescriptor.hxx>
-#include <rtl/strbuf.hxx>
+#include <tools/stream.hxx>
#include <orcus/format_detection.hpp>
@@ -68,7 +68,7 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence<css::beans::PropertyValue>
return OUString();
css::uno::Reference<css::io::XInputStream> xInputStream(aMediaDescriptor[utl::MediaDescriptor::PROP_INPUTSTREAM()], css::uno::UNO_QUERY );
- OStringBuffer aContent(xInputStream->available());
+ SvMemoryStream aContent(xInputStream->available());
static const sal_Int32 nBytes = 4096;
css::uno::Sequence<sal_Int8> aSeq(nBytes);
@@ -77,10 +77,10 @@ OUString OrcusFormatDetect::detect(css::uno::Sequence<css::beans::PropertyValue>
{
sal_Int32 nReadBytes = xInputStream->readBytes(aSeq, nBytes);
bEnd = (nReadBytes != nBytes);
- aContent.append(reinterpret_cast<const char*>(aSeq.getConstArray()), nReadBytes);
+ aContent.WriteBytes(aSeq.getConstArray(), nReadBytes);
}
- orcus::format_t eFormat = orcus::detect(reinterpret_cast<const unsigned char*>(aContent.getStr()), aContent.getLength());
+ orcus::format_t eFormat = orcus::detect(static_cast<const unsigned char*>(aContent.GetData()), aContent.GetSize());
switch (eFormat)
{
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
index 90c59096e300..01257cf56a6f 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx
@@ -151,12 +151,14 @@ ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& rImport,
if (aIter != rAttrList->end())
{
util::DateTime aDateTime;
- ::sax::Converter::parseDateTime(aDateTime, aIter.toString());
- util::Date aDate;
- aDate.Day = aDateTime.Day;
- aDate.Month = aDateTime.Month;
- aDate.Year = aDateTime.Year;
- pCalcSet->SetNullDate(aDate);
+ if (::sax::Converter::parseDateTime(aDateTime, aIter.toString()))
+ {
+ util::Date aDate;
+ aDate.Day = aDateTime.Day;
+ aDate.Month = aDateTime.Month;
+ aDate.Year = aDateTime.Year;
+ pCalcSet->SetNullDate(aDate);
+ }
}
}
}
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index fa88b9bd1966..4133de40e9e3 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -127,7 +127,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
if (aQueryEntry.IsQueryByEmpty())
{
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
}
else if (aQueryEntry.IsQueryByNonEmpty())
{
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 937ac271db26..7b1b2b5381a7 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -381,7 +381,7 @@ private:
case SC_EQUAL:
{
if (rEntry.IsQueryByEmpty())
- return GetXMLToken(XML_EMPTY);
+ return GetXMLToken(XML_TOKEN_EMPTY);
else if (rEntry.IsQueryByNonEmpty())
return GetXMLToken(XML_NOEMPTY);
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 2d16318bac7e..5a93a64cda43 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -109,6 +109,7 @@
#include <rtl/ustring.hxx>
#include <tools/color.hxx>
+#include <tools/diagnose_ex.h>
#include <rtl/math.hxx>
#include <svl/zforlist.hxx>
#include <svx/unoshape.hxx>
@@ -3004,7 +3005,7 @@ void writeContent(
if (pField)
{
// Write a field item.
- OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, rExport.GetDocument(), nullptr);
+ OUString aFieldVal = ScEditUtil::GetCellFieldValue(*pField, rExport.GetDocument(), nullptr, nullptr);
switch (pField->GetClassId())
{
case text::textfield::Type::URL:
@@ -3404,16 +3405,23 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
uno::Sequence< OUString > aRepresentations(
xReceiver->getUsedRangeRepresentations());
SvXMLAttributeList* pAttrList = nullptr;
- if(aRepresentations.hasElements())
+ try
{
- // add the ranges used by the chart to the shape
- // element to be able to start listening after
- // load (when the chart is not yet loaded)
- uno::Reference< chart2::data::XRangeXMLConversion > xRangeConverter( xChartDoc->getDataProvider(), uno::UNO_QUERY );
- sRanges = lcl_RangeSequenceToString( aRepresentations, xRangeConverter );
- pAttrList = new SvXMLAttributeList();
- pAttrList->AddAttribute(
- GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken(XML_NOTIFY_ON_UPDATE_OF_RANGES) ), sRanges );
+ if (aRepresentations.hasElements())
+ {
+ // add the ranges used by the chart to the shape
+ // element to be able to start listening after
+ // load (when the chart is not yet loaded)
+ uno::Reference< chart2::data::XRangeXMLConversion > xRangeConverter( xChartDoc->getDataProvider(), uno::UNO_QUERY );
+ sRanges = lcl_RangeSequenceToString( aRepresentations, xRangeConverter );
+ pAttrList = new SvXMLAttributeList();
+ pAttrList->AddAttribute(
+ GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DRAW, GetXMLToken(XML_NOTIFY_ON_UPDATE_OF_RANGES) ), sRanges );
+ }
+ }
+ catch (const lang::IllegalArgumentException&)
+ {
+ TOOLS_WARN_EXCEPTION("sc", "Exception in lcl_RangeSequenceToString - invalid range?");
}
GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint, pAttrList);
}
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 47fea817123c..a84f12cdd47e 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -380,7 +380,7 @@ void ScXMLConditionContext::GetOperator(
rEntry.eOp = SC_BOTPERC;
else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
rEntry.eOp = SC_BOTVAL;
- else if (IsXMLToken(aOpStr, XML_EMPTY))
+ else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
rEntry.SetQueryByEmpty();
else if (aOpStr == ">")
rEntry.eOp = SC_GREATER;
@@ -759,7 +759,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
else
aFilterField.eConnect = SC_AND;
pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
- if (IsXMLToken(sOperator, XML_EMPTY))
+ if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
aFilterField.SetQueryByEmpty();
else if (IsXMLToken(sOperator, XML_NOEMPTY))
aFilterField.SetQueryByNonEmpty();
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 75d915438f44..fa861a6bf4fd 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -40,6 +40,14 @@
//! TODO make dynamic
const SCSIZE ASCIIDLG_MAXROWS = MAXROWCOUNT;
+// Maximum number of source lines to concatenate while generating the preview
+// for one logical line. This may result in a wrong preview if the actual
+// number of embedded line feeds is greater, but a number too high would take
+// too much time (loop excessively if unlimited and large data) if none of the
+// selected separators are actually used in data but a field at start of line
+// is quoted.
+constexpr sal_uInt32 kMaxEmbeddedLinefeeds = 500;
+
using namespace com::sun::star::uno;
// Defines - CSV Import Preserve Options
@@ -285,7 +293,7 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa
, mnRowPosCount(0)
, mcTextSep(ScAsciiOptions::cDefaultTextSep)
, meCall(eCall)
- , mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS)
+ , mbDetectSep(eCall != SC_TEXTTOCOLUMNS)
, mxFtCharSet(m_xBuilder->weld_label("textcharset"))
, mxLbCharSet(new SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset")))
, mxFtCustomLang(m_xBuilder->weld_label("textlanguage"))
@@ -555,7 +563,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, OUString &rText, sal_Unicode& r
break;
}
rText = ReadCsvLine(*mpDatStream, !bFixed, maFieldSeparators,
- mcTextSep, rcDetectSep);
+ mcTextSep, rcDetectSep, kMaxEmbeddedLinefeeds);
mnStreamPos = mpDatStream->Tell();
mpRowPosArray[++mnRowPosCount] = mnStreamPos;
} while (nLine >= mnRowPosCount && mpDatStream->good());
@@ -570,7 +578,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, OUString &rText, sal_Unicode& r
else
{
Seek( mpRowPosArray[nLine]);
- rText = ReadCsvLine(*mpDatStream, !bFixed, maFieldSeparators, mcTextSep, rcDetectSep);
+ rText = ReadCsvLine(*mpDatStream, !bFixed, maFieldSeparators, mcTextSep, rcDetectSep, kMaxEmbeddedLinefeeds);
mnStreamPos = mpDatStream->Tell();
}
@@ -769,7 +777,10 @@ IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox&, void)
// when the dialog wasn't already presented to the user.
// As a side effect this has the benefit that the check is only done on the
// first set of visible lines.
- sal_Unicode cDetectSep = (mbDetectSpaceSep && !mxRbFixed->get_active() && !mxCkbSpace->get_active() ? 0 : 0xffff);
+ mbDetectSep = (mbDetectSep && !mxRbFixed->get_active()
+ && (!mxCkbTab->get_active() || !mxCkbSemicolon->get_active()
+ || !mxCkbComma->get_active() || !mxCkbSpace->get_active()));
+ sal_Unicode cDetectSep = (mbDetectSep ? 0 : 0xffff);
sal_Int32 nBaseLine = mxTableBox->GetGrid().GetFirstVisLine();
sal_Int32 nRead = mxTableBox->GetGrid().GetVisLineCount();
@@ -789,16 +800,22 @@ IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox&, void)
for (; i < CSV_PREVIEW_LINES; i++)
maPreviewLine[i].clear();
- if (mbDetectSpaceSep)
+ if (mbDetectSep)
{
- mbDetectSpaceSep = false;
- if (cDetectSep == ' ')
+ mbDetectSep = false;
+ if (cDetectSep)
{
- // Expect space to be appended by now so all subsequent
+ // Expect separator to be appended by now so all subsequent
// GetLine()/ReadCsvLine() actually used it.
- assert(maFieldSeparators.endsWith(" "));
- // Preselect Space in UI.
- mxCkbSpace->set_active(true);
+ assert(maFieldSeparators.endsWith(OUStringChar(cDetectSep)));
+ // Preselect separator in UI.
+ switch (cDetectSep)
+ {
+ case '\t': mxCkbTab->set_active(true); break;
+ case ';': mxCkbSemicolon->set_active(true); break;
+ case ',': mxCkbComma->set_active(true); break;
+ case ' ': mxCkbSpace->set_active(true); break;
+ }
}
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 41bc913db911..c9fbd5501a39 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -95,6 +95,20 @@ ScValidationDlg::ScValidationDlg(weld::Window* pParent, const SfxItemSet* pArgSe
AddTabPage("erroralert", ScTPValidationError::Create, nullptr);
}
+void ScValidationDlg::EndDialog(int nResponse)
+{
+ // tdf#155708 - do not close, just hide validation window if we click in another sheet
+ if (nResponse == nCloseResponseToJustHide && getDialog()->get_visible())
+ {
+ getDialog()->hide();
+ return;
+ }
+ // tdf#137215 ensure original modality of true is restored before dialog loop ends
+ if (m_bOwnRefHdlr)
+ RemoveRefDlg(true);
+ ScValidationDlgBase::EndDialog(nResponse);
+}
+
ScValidationDlg::~ScValidationDlg()
{
if (m_bOwnRefHdlr)
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2922d3ccc3b4..21b5986371f9 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1366,7 +1366,7 @@ ScPostIt* ScDocFunc::ImportNote( const ScAddress& rPos, const OUString& rNoteTex
ScDocument& rDoc = rDocShell.GetDocument();
std::unique_ptr<ScPostIt> pOldNote = rDoc.ReleaseNote( rPos );
- assert(!pOldNote && "imported data has >1 notes on same cell?");
+ SAL_WARN_IF(pOldNote, "sc.ui", "imported data has >1 notes on same cell? at pos " << rPos);
// create new note
ScPostIt* pNewNote = nullptr;
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index bd7402231333..2203ca42725c 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -915,6 +915,14 @@ void ScDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint )
aValues[1].Name = "Password";
aValues[1].Value <<= pPasswordItem->GetValue();
}
+ const SfxUnoAnyItem* pEncryptionItem = SfxItemSet::GetItem<SfxUnoAnyItem>(GetMedium()->GetItemSet(), SID_ENCRYPTIONDATA, false);
+ if (pEncryptionItem)
+ {
+ aValues.realloc(aValues.getLength() + 1);
+ auto pValues = aValues.getArray();
+ pValues[aValues.getLength() - 1].Name = "EncryptionData";
+ pValues[aValues.getLength() - 1].Value = pEncryptionItem->GetValue();
+ }
SC_MOD()->SetInSharedDocSaving( true );
xStor->storeToURL( GetSharedFileURL(), aValues );
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 9c04bae44b0f..2487db7255d4 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -1090,10 +1090,10 @@ void ScDocShell::Execute( SfxRequest& rReq )
EnableSharedSettings( false );
- if ( pBindings )
- {
- pBindings->ExecuteSynchron( SID_SAVEDOC );
- }
+ // Do *not* use dispatch mechanism in this place - we don't want others (extensions etc.) to intercept this.
+ uno::Reference<frame::XStorable> xStorable2(
+ GetModel(), uno::UNO_QUERY_THROW);
+ xStorable2->store();
ScTabView* pTabView = dynamic_cast< ScTabView* >( pViewData->GetView() );
if ( pTabView )
diff --git a/sc/source/ui/docshell/documentlinkmgr.cxx b/sc/source/ui/docshell/documentlinkmgr.cxx
index cb3467c8bb69..8ea3c2cce5fb 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/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 8db98e388603..51e704b55a00 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -544,6 +544,11 @@ void ScImportExport::SetNoEndianSwap( SvStream& rStrm )
#endif
}
+static inline bool lcl_isFieldEnd( sal_Unicode c, const sal_Unicode* pSeps )
+{
+ return !c || ScGlobal::UnicodeStrChr( pSeps, c);
+}
+
enum QuoteType
{
FIELDSTART_QUOTE,
@@ -566,17 +571,40 @@ static QuoteType lcl_isFieldEndQuote( const sal_Unicode* p, const sal_Unicode* p
// Due to broken CSV generators that don't double embedded quotes check if
// a field separator immediately or with trailing spaces follows the quote,
// only then end the field, or at end of string.
- const sal_Unicode cBlank = ' ';
+ constexpr sal_Unicode cBlank = ' ';
if (p[1] == cBlank && ScGlobal::UnicodeStrChr( pSeps, cBlank))
return FIELDEND_QUOTE;
// Detect a possible blank separator if it's not already in the list (which
// was checked right above for p[1]==cBlank).
- if (p[1] == cBlank && !rcDetectSep && p[2] && p[2] != cBlank)
- rcDetectSep = cBlank;
+ const bool bBlankSep = (p[1] == cBlank && !rcDetectSep && p[2] && p[2] != cBlank);
while (p[1] == cBlank)
++p;
- if (!p[1] || ScGlobal::UnicodeStrChr( pSeps, p[1]))
+ if (lcl_isFieldEnd( p[1], pSeps))
return FIELDEND_QUOTE;
+ // Extended separator detection after a closing quote (with or without
+ // blanks). Note that nQuotes is incremented *after* the call so is not yet
+ // even here, and that with separator detection we reach here only if
+ // lcl_isEscapedOrFieldEndQuote() did not already detect FIRST_QUOTE or
+ // SECOND_QUOTE for an escaped embedded quote, thus nQuotes does not have
+ // to be checked.
+ if (!rcDetectSep)
+ {
+ constexpr sal_Unicode vSep[] = { ',', '\t', ';' };
+ for (const sal_Unicode c : vSep)
+ {
+ if (p[1] == c)
+ {
+ rcDetectSep = c;
+ return FIELDEND_QUOTE;
+ }
+ }
+ }
+ // Blank separator is least significant, after others.
+ if (bBlankSep)
+ {
+ rcDetectSep = cBlank;
+ return FIELDEND_QUOTE;
+ }
return DONTKNOW_QUOTE;
}
@@ -604,7 +632,7 @@ static QuoteType lcl_isFieldEndQuote( const sal_Unicode* p, const sal_Unicode* p
static QuoteType lcl_isEscapedOrFieldEndQuote( sal_Int32 nQuotes, const sal_Unicode* p,
const sal_Unicode* pSeps, sal_Unicode cStr, sal_Unicode& rcDetectSep )
{
- if ((nQuotes % 2) == 0)
+ if ((nQuotes & 1) == 0)
{
if (p[-1] == cStr)
return SECOND_QUOTE;
@@ -644,9 +672,26 @@ enum class DoubledQuoteMode
ESCAPE, // escaped quote, one is taken, one ignored
};
-static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rString,
+/** Scan for a quoted string.
+ Precondition: initial current position *p is a cStr quote.
+ For DoubledQuoteMode::ESCAPE, if after the closing quote there is a field
+ end (with or without trailing blanks and as determined by
+ lcl_isFieldEndQuote()), then the content is appended to rField with quotes
+ processed and removed. Else if no field end after the quoted string was
+ detected, nothing is appended and processing continues and is repeated
+ until the next quote. If no closing quote at a field end was found at all,
+ nothing is appended and the initial position is returned and caller has to
+ decide, usually just taking all as literal data.
+ For DoubledQuoteMode::KEEP_ALL, the string up to and including the closing
+ quote is appended to rField and the next position returned, regardless
+ whether there is a field separator following or not.
+ */
+static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rField,
const sal_Unicode* pSeps, sal_Unicode cStr, DoubledQuoteMode eMode, bool& rbOverflowCell )
{
+ OUString aString;
+ bool bClosingQuote = (eMode == DoubledQuoteMode::KEEP_ALL);
+ const sal_Unicode* const pStart = p;
if (eMode != DoubledQuoteMode::KEEP_ALL)
p++; //! jump over opening quote
bool bCont;
@@ -656,8 +701,19 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rStrin
const sal_Unicode* p0 = p;
for( ;; )
{
- if( !*p )
- break;
+ if (!*p)
+ {
+ // Encountering end of data after an opening quote is not a
+ // quoted string, ReadCsvLine() concatenated lines with '\n'
+ // for a properly quoted embedded linefeed.
+ if (eMode == DoubledQuoteMode::KEEP_ALL)
+ // Caller would append that data anyway, so we can do it
+ // already here.
+ break;
+
+ return pStart;
+ }
+
if( *p == cStr )
{
if ( *++p != cStr )
@@ -667,7 +723,10 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rStrin
{
sal_Unicode cDetectSep = 0xffff; // No separator detection here.
if (lcl_isFieldEndQuote( p-1, pSeps, cDetectSep) == FIELDEND_QUOTE)
+ {
+ bClosingQuote = true;
break;
+ }
else
continue;
}
@@ -693,10 +752,17 @@ static const sal_Unicode* lcl_ScanString( const sal_Unicode* p, OUString& rStrin
}
if ( p0 < p )
{
- if (!lcl_appendLineData( rString, p0, ((eMode != DoubledQuoteMode::KEEP_ALL && (*p || *(p-1) == cStr)) ? p-1 : p)))
+ if (!lcl_appendLineData( aString, p0, ((eMode != DoubledQuoteMode::KEEP_ALL && (*p || *(p-1) == cStr)) ? p-1 : p)))
rbOverflowCell = true;
}
} while ( bCont );
+
+ if (!bClosingQuote)
+ return pStart;
+
+ if (!aString.isEmpty())
+ rField += aString;
+
return p;
}
@@ -887,18 +953,16 @@ bool ScImportExport::Text2Doc( SvStream& rStrm )
{
aCell.clear();
const sal_Unicode* q = p;
- while (*p && *p != cSep)
+ if (*p == cStr)
{
- // Always look for a pairing quote and ignore separator in between.
- while (*p && *p == cStr)
- q = p = lcl_ScanString( p, aCell, pSeps, cStr, mode, bOverflowCell );
- // All until next separator or quote.
- while (*p && *p != cSep && *p != cStr)
- ++p;
- if (!lcl_appendLineData( aCell, q, p))
- bOverflowCell = true; // display warning on import
- q = p;
+ // Look for a pairing quote.
+ q = p = lcl_ScanString( p, aCell, pSeps, cStr, mode, bOverflowCell );
}
+ // All until next separator.
+ while (*p && *p != cSep)
+ ++p;
+ if (!lcl_appendLineData( aCell, q, p))
+ bOverflowCell = true; // display warning on import
if (*p)
++p;
if (ValidCol(nCol) && ValidRow(nRow) )
@@ -969,11 +1033,14 @@ static bool lcl_PutString(
return false;
}
- if ( nColFormat == SC_COL_TEXT )
+ // Resolves: tdf#114878 Add 'Evaluate formulas' option to CSV import and paste
+ // Only the optimization is backported from the tdf#114878 fix
+ const bool bForceFormulaText = (rStr[0] == '=');
+ if ( nColFormat == SC_COL_TEXT || bForceFormulaText )
{
double fDummy;
sal_uInt32 nIndex = 0;
- if (pFormatter->IsNumberFormat(rStr, nIndex, fDummy))
+ if (bForceFormulaText || pFormatter->IsNumberFormat(rStr, nIndex, fDummy))
{
// Set the format of this cell to Text.
sal_uInt32 nFormat = pFormatter->GetStandardFormat(SvNumFormatType::TEXT);
@@ -1558,7 +1625,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
rbIsQuoted = true;
const sal_Unicode* p1;
p1 = p = lcl_ScanString( p, rField, pSeps, cStr, DoubledQuoteMode::ESCAPE, rbOverflowCell );
- while ( *p && !ScGlobal::UnicodeStrChr( pSeps, *p ) )
+ while (!lcl_isFieldEnd( *p, pSeps))
p++;
// Append remaining unquoted and undelimited data (dirty, dirty) to
// this field.
@@ -1579,7 +1646,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
else // up to delimiter
{
const sal_Unicode* p0 = p;
- while ( *p && !ScGlobal::UnicodeStrChr( pSeps, *p ) )
+ while (!lcl_isFieldEnd( *p, pSeps))
p++;
const sal_Unicode* ptrim_i = p0;
const sal_Unicode* ptrim_f = p; // [ptrim_i,ptrim_f) is cell data after trimming
@@ -1597,7 +1664,7 @@ const sal_Unicode* ScImportExport::ScanNextFieldFromString( const sal_Unicode* p
}
if ( bMergeSeps ) // skip following delimiters
{
- while ( *p && ScGlobal::UnicodeStrChr( pSeps, *p ) )
+ while (!lcl_isFieldEnd( *p, pSeps))
p++;
}
return p;
@@ -2388,7 +2455,7 @@ ScImportStringStream::ScImportStringStream( const OUString& rStr )
}
OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
- OUString& rFieldSeparators, sal_Unicode cFieldQuote, sal_Unicode& rcDetectSep )
+ OUString& rFieldSeparators, sal_Unicode cFieldQuote, sal_Unicode& rcDetectSep, sal_uInt32 nMaxSourceLines )
{
enum RetryState
{
@@ -2413,6 +2480,10 @@ Label_RetryWithNewSep:
if (bEmbeddedLineBreak)
{
+ sal_Int32 nFirstLineLength = aStr.getLength();
+ sal_uInt64 nFirstLineStreamPos = rStream.Tell();
+ sal_uInt32 nLine = 0;
+
const sal_Unicode* pSeps = rFieldSeparators.getStr();
QuoteType eQuoteState = FIELDEND_QUOTE;
@@ -2436,6 +2507,8 @@ Label_RetryWithNewSep:
++nQuotes;
bFieldStart = false;
eQuoteState = FIELDSTART_QUOTE;
+ nFirstLineLength = aStr.getLength();
+ nFirstLineStreamPos = rStream.Tell();
}
// Do not detect a FIELDSTART_QUOTE if not in
// bFieldStart mode, in which case for unquoted content
@@ -2444,10 +2517,11 @@ Label_RetryWithNewSep:
{
eQuoteState = lcl_isEscapedOrFieldEndQuote( nQuotes, p, pSeps, cFieldQuote, rcDetectSep);
- if (eRetryState == RetryState::ALLOW && rcDetectSep == ' ')
+ if (eRetryState == RetryState::ALLOW && rcDetectSep)
{
eRetryState = RetryState::RETRY;
- rFieldSeparators += OUString(' ');
+ rFieldSeparators += OUStringChar(rcDetectSep);
+ pSeps = rFieldSeparators.getStr();
goto Label_RetryWithNewSep;
}
@@ -2475,6 +2549,8 @@ Label_RetryWithNewSep:
nQuotes = 1;
eQuoteState = FIELDSTART_QUOTE;
bFieldStart = false;
+ nFirstLineLength = aStr.getLength();
+ nFirstLineStreamPos = rStream.Tell();
}
else if (eQuoteState == FIELDEND_QUOTE)
{
@@ -2493,19 +2569,36 @@ Label_RetryWithNewSep:
++p;
}
- if (nQuotes % 2 == 0)
+ if ((nQuotes & 1) == 0)
// We still have a (theoretical?) problem here if due to
- // nArbitraryLineLengthLimit we split a string right between a
- // doubled quote pair.
+ // nArbitraryLineLengthLimit (or nMaxSourceLines below) we
+ // split a string right between a doubled quote pair.
+ break;
+ else if (eQuoteState == DONTKNOW_QUOTE)
+ // A single unescaped quote somewhere in a quote started
+ // field, most likely that was not meant to have embedded
+ // linefeeds either.
+ break;
+ else if (++nLine >= nMaxSourceLines && nMaxSourceLines > 0)
+ // Unconditionally increment nLine even if nMaxSourceLines==0
+ // so it can be observed in debugger.
break;
else
{
nLastOffset = aStr.getLength();
OUString aNext;
rStream.ReadUniOrByteStringLine(aNext, rStream.GetStreamCharSet(), nArbitraryLineLengthLimit);
- aStr += "\n" + aNext;
+ if (!rStream.eof())
+ aStr += "\n" + aNext;
}
}
+ if (nQuotes & 1)
+ {
+ // No closing quote at all. A single quote at field start => no
+ // embedded linefeeds for that field, take only first logical line.
+ aStr = aStr.copy( 0, nFirstLineLength);
+ rStream.Seek( nFirstLineStreamPos);
+ }
}
return aStr;
}
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index 2cdf432edc11..dd06436be6b9 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -205,7 +205,8 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
case SID_CHARMAP:
{
- const SvxFontItem& rItem = pOutView->GetAttribs().Get(EE_CHAR_FONTINFO);
+ auto const attribs = pOutView->GetAttribs();
+ const SvxFontItem& rItem = attribs.Get(EE_CHAR_FONTINFO);
OUString aString;
std::shared_ptr<SvxFontItem> aNewItem(std::make_shared<SvxFontItem>(EE_CHAR_FONTINFO));
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index bd4ca07159c5..fcd312756f9d 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -249,7 +249,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
bool DrawMouseButtonDown(const MouseEvent& rMEvt);
bool DrawMouseButtonUp(const MouseEvent& rMEvt);
bool DrawMouseMove(const MouseEvent& rMEvt);
- bool DrawKeyInput(const KeyEvent& rKEvt);
+ bool DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin);
bool DrawCommand(const CommandEvent& rCEvt);
bool DrawHasMarkedObj();
void DrawEndAction();
diff --git a/sc/source/ui/inc/impex.hxx b/sc/source/ui/inc/impex.hxx
index 91163c4c34e8..25f795743731 100644
--- a/sc/source/ui/inc/impex.hxx
+++ b/sc/source/ui/inc/impex.hxx
@@ -180,14 +180,25 @@ public:
The quote character used.
@param rcDetectSep
- If 0 then attempt to detect a possible space (blank) separator if
+ If 0 then attempt to detect a possible separator if
rFieldSeparators doesn't include it already. This can be necessary because
of the "accept broken misquoted CSV fields" feature that tries to ignore
trailing blanks after a quoted field and if no separator follows continues
to add content to the field assuming the single double quote was in error.
- If this blank separator is detected it is added to rFieldSeparators and the
+ It is also necessary if the only possible separator was not selected and
+ not included in rFieldSeparators and a line starts with a quoted field, in
+ which case appending lines is tried until end of file.
+ If a separator is detected it is added to rFieldSeparators and the
line is reread with the new separators
+ @param nMaxSourceLines
+ Maximum source lines to read and combine into one logical line for embedded
+ new line purpose. Should be limited for the preview dialog because only
+ non-matching separators selected otherwise would lead to trying to
+ concatenate lines until file end.
+ If 0 no limit other than the internal arbitrary resulting line length
+ limit.
+
check Stream::good() to detect IO problems during read
@ATTENTION
@@ -208,7 +219,8 @@ public:
*/
SC_DLLPUBLIC OUString ReadCsvLine( SvStream &rStream, bool bEmbeddedLineBreak,
- OUString& rFieldSeparators, sal_Unicode cFieldQuote, sal_Unicode& rcDetectSep );
+ OUString& rFieldSeparators, sal_Unicode cFieldQuote, sal_Unicode& rcDetectSep,
+ sal_uInt32 nMaxSourceLines = 0 );
#endif
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index 1b263931bc6f..472d1a498267 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -52,7 +52,7 @@ class ScImportAsciiDlg : public weld::GenericDialogController
rtl_TextEncoding meCharSet; /// Selected char set.
bool mbCharSetSystem; /// Is System char set selected?
ScImportAsciiCall const meCall; /// How the dialog is called (see asciiopt.hxx)
- bool mbDetectSpaceSep; /// Whether to detect a possible space separator.
+ bool mbDetectSep; /// Whether to detect a possible separator.
std::unique_ptr<weld::Label> mxFtCharSet;
std::unique_ptr<SvxTextEncodingBox> mxLbCharSet;
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 2c562717f921..da10715a777d 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -154,6 +154,8 @@ class ScValidationDlg
bool m_bOwnRefHdlr:1;
bool m_bRefInputting:1;
+ const int nCloseResponseToJustHide = -42;
+
std::unique_ptr<weld::Container> m_xHBox;
bool EnterRefStatus();
@@ -176,7 +178,11 @@ public:
void SetModal(bool bModal) { m_xDialog->set_modal(bModal); }
- virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override
+ virtual void EndDialog(int nResponse) override;
+
+ virtual bool CloseOnHide() const override { return false; }
+
+ virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ) override
{
if ( m_pHandler && m_pSetReferenceHdl )
(m_pHandler->*m_pSetReferenceHdl)( rRef, pDoc );
diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx
index b12592bcf29c..7baf45b22704 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -186,13 +186,14 @@ void ScHFEditPage::InitPreDefinedList()
boost::optional<Color> pTxtColour;
boost::optional<Color> pFldColour;
+ boost::optional<FontLineStyle> pFldLineStyle;
// Get the all field values at the outset.
- OUString aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
- OUString aSheetFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
- OUString aFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
- OUString aExtFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
- OUString aDateFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour));
+ OUString aPageFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxPageField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+ OUString aSheetFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxTableField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+ OUString aFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+ OUString aExtFileFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxExtFileField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
+ OUString aDateFieldValue(m_xWndLeft->GetEditEngine()->CalcFieldValue(SvxFieldItem(SvxDateField(), EE_FEATURE_FIELD), 0,0, pTxtColour, pFldColour, pFldLineStyle));
m_xLbDefined->clear();
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index 8916ee2cf09d..1db8aa750063 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -2165,7 +2165,10 @@ OUString SAL_CALL ScChart2DataProvider::convertRangeToXML( const OUString& sRang
ScRefTokenHelper::compileRangeRepresentation(
aRefTokens, sRangeRepresentation, m_pDocument, cSep, m_pDocument->GetGrammar(), true);
if (aRefTokens.empty())
+ {
+ SAL_WARN("sc", "convertRangeToXML throw IllegalArgumentException from input of: " << sRangeRepresentation);
throw lang::IllegalArgumentException();
+ }
Tokens2RangeStringXML converter(m_pDocument);
converter = ::std::for_each(aRefTokens.begin(), aRefTokens.end(), converter);
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 61948b461c4f..9b7939f3e979 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -175,7 +175,8 @@ public:
explicit ScUnoEditEngine(ScEditEngineDefaulter* pSource);
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor ) override;
+ boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor,
+ boost::optional<FontLineStyle>& rFldLineStyle ) override;
sal_uInt16 CountFields();
SvxFieldData* FindByIndex(sal_uInt16 nIndex);
@@ -199,9 +200,10 @@ ScUnoEditEngine::ScUnoEditEngine(ScEditEngineDefaulter* pSource)
}
OUString ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField,
- sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor )
+ sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor,
+ boost::optional<FontLineStyle>& rFldLineStyle )
{
- OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor ));
+ OUString aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor, rFldLineStyle ));
if (eMode != SC_UNO_COLLECT_NONE)
{
const SvxFieldData* pFieldData = rField.GetField();
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 67908ba1ba68..6b1fc8cf7ef0 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -254,7 +254,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
if (nWhich == FID_INS_COLUMNS_AFTER)
eAction = sc::ColRowEditAction::InsertColumnsAfter;
- bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked();
+ bDisable = (!bSimpleArea && eMarkType != SC_MARK_SIMPLE_FILTERED)
+ || GetViewData()->SimpleRowMarked();
if (!bEditable && nRow1 == 0 && nRow2 == pDoc->MaxRow())
{
// See if row insertions are allowed.
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 61888c663ef4..413041e0d0e0 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -385,8 +385,9 @@ void ScEditShell::Execute( SfxRequest& rReq )
sal_uInt16 nFontWhich = ( nScript == SvtScriptType::ASIAN ) ? EE_CHAR_FONTINFO_CJK :
( ( nScript == SvtScriptType::COMPLEX ) ? EE_CHAR_FONTINFO_CTL :
EE_CHAR_FONTINFO );
+ auto const attribs = pTableView->GetAttribs();
const SvxFontItem& rItem = static_cast<const SvxFontItem&>(
- pTableView->GetAttribs().Get(nFontWhich));
+ attribs.Get(nFontWhich));
OUString aString;
std::shared_ptr<SvxFontItem> aNewItem(std::make_shared<SvxFontItem>(EE_CHAR_FONTINFO));
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 3460d6e3d927..fc3983efce81 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -138,7 +138,7 @@ ScFormatShell::ScFormatShell(ScViewData* pData) :
SetPool( &pTabViewShell->GetPool() );
SfxUndoManager* pMgr = pViewData->GetSfxDocShell()->GetUndoManager();
SetUndoManager( pMgr );
- if ( !pViewData->GetDocument()->IsUndoEnabled() )
+ if (pMgr && !pViewData->GetDocument()->IsUndoEnabled())
{
pMgr->SetMaxUndoActionCount( 0 );
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6d2c4ea19106..81d4509d2808 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3249,7 +3249,7 @@ void ScGridWindow::KeyInput(const KeyEvent& rKEvt)
if (pViewData->GetDocShell()->GetProgress())
return;
- if (DrawKeyInput(rKEvt))
+ if (DrawKeyInput(rKEvt, this))
{
const vcl::KeyCode& rLclKeyCode = rKEvt.GetKeyCode();
if (rLclKeyCode.GetCode() == KEY_DOWN
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 1fbc48e0ae6f..da226f59a841 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -142,10 +142,14 @@ bool ScGridWindow::DrawCommand(const CommandEvent& rCEvt)
return false;
}
-bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt)
+bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
{
ScDrawView* pDrView = pViewData->GetScDrawView();
FuPoor* pDraw = pViewData->GetView()->GetDrawFuncPtr();
+
+ if (pDrView && pDrView->KeyInput(rKEvt, pWin))
+ return true;
+
if (pDrView && pDraw && !pViewData->IsRefMode())
{
pDraw->SetWindow( this );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index e14647bd7954..9864a104b6be 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2313,11 +2313,10 @@ void ScOutputData::DrawNoteMarks(vcl::RenderContext& rRenderContext)
SCCOL nMergeX = nX;
SCROW nMergeY = nY;
mpDoc->ExtendOverlapped( nMergeX, nMergeY, nX, nY, nTab );
- // use origin's pCell for NotePtr test below
}
- if ( mpDoc->GetNote(nX, pRowInfo[nArrY].nRowNo, nTab) && ( bIsMerged ||
- ( !pInfo->bHOverlapped && !pInfo->bVOverlapped ) ) )
+ if (!mpDoc->ColHidden(nX, nTab) && mpDoc->GetNote(nX, pRowInfo[nArrY].nRowNo, nTab)
+ && (bIsMerged || (!pInfo->bHOverlapped && !pInfo->bVOverlapped)))
{
if (bFirst)
{
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 41a9760cc450..1dd9bc063aac 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -70,6 +70,7 @@
#include <scopetools.hxx>
#include <com/sun/star/i18n/DirectionProperty.hpp>
+#include <comphelper/scopeguard.hxx>
#include <comphelper/string.hxx>
#include <memory>
@@ -1441,6 +1442,12 @@ void ScOutputData::DrawStrings( bool bPixelToLogic )
tools::Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScAddress &rAddress)
{
+ bool bOrigIsInLayoutStrings = mpDoc->IsInLayoutStrings();
+ mpDoc->SetLayoutStrings(true);
+ comphelper::ScopeGuard g([this, bOrigIsInLayoutStrings] {
+ mpDoc->SetLayoutStrings(bOrigIsInLayoutStrings);
+ });
+
OSL_ENSURE( mpDev == mpRefDevice ||
mpDev->GetMapMode().GetMapUnit() == mpRefDevice->GetMapMode().GetMapUnit(),
"LayoutStrings: different MapUnits ?!?!" );
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index 489ea67cfeda..60298fbf7155 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -268,6 +268,9 @@ void ScViewFunctionSet::SetAnchor( SCCOL nPosX, SCROW nPosY )
void ScViewFunctionSet::DestroyAnchor()
{
+ if (pViewData->IsAnyFillMode())
+ return;
+
bool bRefMode = SC_MOD()->IsFormulaMode();
if (bRefMode)
pViewData->GetView()->DoneRefMode( true );
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index f512e8dd9127..bc9504b79642 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -1853,6 +1853,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
// UpdateShow before SetCursor, so that UpdateAutoFillMark finds the correct
// window (is called from SetCursor)
UpdateShow();
+ aViewData.GetView()->TestHintWindow();
SfxBindings& rBindings = aViewData.GetBindings();
ScMarkData& rMark = aViewData.GetMarkData();
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 0ea25ebce6de..9103af9811a8 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1342,7 +1342,13 @@ SCCOL ScViewData::GetCurXForTab( SCTAB nTabIndex ) const
if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
return -1;
- return maTabData[nTabIndex]->nCurX;
+ ScViewDataTable* pTabData = maTabData[nTabIndex].get();
+ if (!pTabData)
+ {
+ SAL_WARN("sc.viewdata", "ScViewData::GetCurXForTab : hidden sheet = " << nTabIndex);
+ return -1;
+ }
+ return pTabData->nCurX;
}
SCROW ScViewData::GetCurYForTab( SCTAB nTabIndex ) const
@@ -1350,7 +1356,13 @@ SCROW ScViewData::GetCurYForTab( SCTAB nTabIndex ) const
if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
return -1;
- return maTabData[nTabIndex]->nCurY;
+ ScViewDataTable* pTabData = maTabData[nTabIndex].get();
+ if (!pTabData)
+ {
+ SAL_WARN("sc.viewdata", "ScViewData::GetCurYForTab : hidden sheet = " << nTabIndex);
+ return -1;
+ }
+ return pTabData->nCurY;
}
void ScViewData::SetCurXForTab( SCCOL nNewCurX, SCTAB nTabIndex )
@@ -1358,7 +1370,14 @@ void ScViewData::SetCurXForTab( SCCOL nNewCurX, SCTAB nTabIndex )
if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
return;
- maTabData[nTabIndex]->nCurX = nNewCurX;
+ ScViewDataTable* pTabData = maTabData[nTabIndex].get();
+ if (!pTabData)
+ {
+ SAL_WARN("sc.viewdata", "ScViewData::SetCurXForTab : hidden sheet = " << nTabIndex);
+ return;
+ }
+
+ pTabData->nCurX = nNewCurX;
}
void ScViewData::SetCurYForTab( SCCOL nNewCurY, SCTAB nTabIndex )
@@ -1366,7 +1385,14 @@ void ScViewData::SetCurYForTab( SCCOL nNewCurY, SCTAB nTabIndex )
if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
return;
- maTabData[nTabIndex]->nCurY = nNewCurY;
+ ScViewDataTable* pTabData = maTabData[nTabIndex].get();
+ if (!pTabData)
+ {
+ SAL_WARN("sc.viewdata", "ScViewData::SetCurYForTab : hidden sheet = " << nTabIndex);
+ return;
+ }
+
+ pTabData->nCurY = nNewCurY;
}
void ScViewData::SetMaxTiledCol( SCCOL nNewMaxCol )
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 21d10fcd1726..8d3afb70ea2e 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1602,7 +1602,8 @@ void ScViewFunc::OnLOKSetWidthOrHeight(SCCOLROW nStart, bool bWidth)
bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste )
{
ScRange aRange;
- if (GetViewData().GetSimpleArea(aRange) == SC_MARK_SIMPLE)
+ ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
+ if (eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED)
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
const ScMarkData& rMark = GetViewData().GetMarkData();
diff --git a/sc/uiconfig/scalc/menubar/menubar.xml b/sc/uiconfig/scalc/menubar/menubar.xml
index ac0092ad062b..ca7136343d7e 100644
--- a/sc/uiconfig/scalc/menubar/menubar.xml
+++ b/sc/uiconfig/scalc/menubar/menubar.xml
@@ -776,7 +776,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui b/sc/uiconfig/scalc/ui/notebookbar.ui
index 4f888da7004a..ce08a6b7293a 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -750,13 +750,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_compact.ui b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
index d1708782da28..e43fea595e10 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_compact.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_compact.ui
@@ -997,13 +997,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="QuestionAnswersD1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="SendFeedbackD1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
index 015387b3a435..584fa6d7ab75 100644
--- a/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar_groupedbar_full.ui
@@ -1825,13 +1825,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="QuestionAnswersD1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="SendFeedbackD1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/scp2/inc/macros.inc b/scp2/inc/macros.inc
index e801253df1f0..2dded2763dde 100644
--- a/scp2/inc/macros.inc
+++ b/scp2/inc/macros.inc
@@ -286,7 +286,7 @@ End
ModuleID = modid; \
Subkey = STRING(CONCAT2(LibreOffice.,name)); \
Name = STRING(AppUserModelID); \
- Value = STRING(CONCAT2(TheDocumentFoundation.LibreOffice.,doc_type)); \
+ Value = STRING(CONCAT2(CIB.CIBOffice.,doc_type)); \
End
#define REGISTRY_ENTRY_ICON(name,modid,icon_id) \
diff --git a/scp2/source/base/folderitem_base.scp b/scp2/source/base/folderitem_base.scp
index 75e1d5d05b01..622353b92aad 100644
--- a/scp2/source/base/folderitem_base.scp
+++ b/scp2/source/base/folderitem_base.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Sbase_AppID
ShortcutID = gid_Folderitem_Sbase;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Base";
+ Value = "CIB.CIBOffice.Base";
End
#endif
diff --git a/scp2/source/base/registryitem_base.scp b/scp2/source/base/registryitem_base.scp
index ee7932ccd451..adc31d6df10f 100644
--- a/scp2/source/base/registryitem_base.scp
+++ b/scp2/source/base/registryitem_base.scp
@@ -83,7 +83,7 @@ RegistryItem gid_Regitem_Openoffice_Databasedocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Base_Bin;
Subkey = "LibreOffice.DatabaseDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Base";
+ Value = "CIB.CIBOffice.Base";
End
RegistryItem gid_Regitem_Openoffice_Databasedocument_1_FriendlyTypeName
diff --git a/scp2/source/calc/folderitem_calc.scp b/scp2/source/calc/folderitem_calc.scp
index a41ade695864..098ca42d993a 100644
--- a/scp2/source/calc/folderitem_calc.scp
+++ b/scp2/source/calc/folderitem_calc.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Scalc_AppID
ShortcutID = gid_Folderitem_Scalc;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "CIB.CIBOffice.Calc";
End
#endif
diff --git a/scp2/source/calc/registryitem_calc.scp b/scp2/source/calc/registryitem_calc.scp
index ca0fc58921cd..2ef401e2b0f2 100644
--- a/scp2/source/calc/registryitem_calc.scp
+++ b/scp2/source/calc/registryitem_calc.scp
@@ -282,7 +282,7 @@ RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Calc_Bin;
Subkey = "soffice.StarCalcDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "CIB.CIBOffice.Calc";
End
RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_FriendlyTypeName
@@ -395,7 +395,7 @@ RegistryItem gid_Regitem_Soffice_Starcalctemplate_6_AppUserModelID
ModuleID = gid_Module_Prg_Calc_Bin;
Subkey = "soffice.StarCalcTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "CIB.CIBOffice.Calc";
End
RegistryItem gid_Regitem_Soffice_Starcalctemplate_6_FriendlyTypeName
@@ -700,7 +700,7 @@ RegistryItem gid_Regitem_Openoffice_Calcdocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Calc_Bin;
Subkey = "LibreOffice.CalcDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "CIB.CIBOffice.Calc";
End
RegistryItem gid_Regitem_Openoffice_Calcdocument_1_FriendlyTypeName
@@ -918,7 +918,7 @@ RegistryItem gid_Regitem_Openoffice_Calctemplate_1_AppUserModelID
ModuleID = gid_Module_Prg_Calc_Bin;
Subkey = "LibreOffice.CalcTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "CIB.CIBOffice.Calc";
End
RegistryItem gid_Regitem_Openoffice_Calctemplate_1_FriendlyTypeName
diff --git a/scp2/source/draw/folderitem_draw.scp b/scp2/source/draw/folderitem_draw.scp
index 5dc8757e96f3..648e61b624a8 100644
--- a/scp2/source/draw/folderitem_draw.scp
+++ b/scp2/source/draw/folderitem_draw.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Sdraw_AppID
ShortcutID = gid_Folderitem_Sdraw;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "CIB.CIBOffice.Draw";
End
#endif
diff --git a/scp2/source/draw/registryitem_draw.scp b/scp2/source/draw/registryitem_draw.scp
index 93cadcaa1ca5..5155f5c1583d 100644
--- a/scp2/source/draw/registryitem_draw.scp
+++ b/scp2/source/draw/registryitem_draw.scp
@@ -282,7 +282,7 @@ RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Draw_Bin;
Subkey = "soffice.StarDrawDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "CIB.CIBOffice.Draw";
End
RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_FriendlyTypeName
@@ -395,7 +395,7 @@ RegistryItem gid_Regitem_Soffice_Stardrawtemplate_6_AppUserModelID
ModuleID = gid_Module_Prg_Draw_Bin;
Subkey = "soffice.StarDrawTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "CIB.CIBOffice.Draw";
End
RegistryItem gid_Regitem_Soffice_Stardrawtemplate_6_FriendlyTypeName
@@ -699,7 +699,7 @@ RegistryItem gid_Regitem_Openoffice_Drawdocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Draw_Bin;
Subkey = "LibreOffice.DrawDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "CIB.CIBOffice.Draw";
End
RegistryItem gid_Regitem_Openoffice_Drawdocument_1_FriendlyTypeName
@@ -902,7 +902,7 @@ RegistryItem gid_Regitem_Openoffice_Drawtemplate_1_AppUserModelID
ModuleID = gid_Module_Prg_Draw_Bin;
Subkey = "LibreOffice.DrawTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "CIB.CIBOffice.Draw";
End
RegistryItem gid_Regitem_Openoffice_Drawtemplate_1_FriendlyTypeName
diff --git a/scp2/source/impress/folderitem_impress.scp b/scp2/source/impress/folderitem_impress.scp
index c35221b533b4..c92768cdc00c 100644
--- a/scp2/source/impress/folderitem_impress.scp
+++ b/scp2/source/impress/folderitem_impress.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Simpress_AppID
ShortcutID = gid_Folderitem_Simpress;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "CIB.CIBOffice.Impress";
End
#endif
diff --git a/scp2/source/impress/registryitem_impress.scp b/scp2/source/impress/registryitem_impress.scp
index be9ba5fea5b9..defd97360007 100644
--- a/scp2/source/impress/registryitem_impress.scp
+++ b/scp2/source/impress/registryitem_impress.scp
@@ -282,7 +282,7 @@ RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Impress_Bin;
Subkey = "soffice.StarImpressDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "CIB.CIBOffice.Impress";
End
RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_FriendlyTypeName
@@ -409,7 +409,7 @@ RegistryItem gid_Regitem_Soffice_Starimpresstemplate_6_AppUserModelID
ModuleID = gid_Module_Prg_Impress_Bin;
Subkey = "soffice.StarImpressTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "CIB.CIBOffice.Impress";
End
RegistryItem gid_Regitem_Soffice_Starimpresstemplate_6_FriendlyTypeName
@@ -714,7 +714,7 @@ RegistryItem gid_Regitem_Openoffice_Impressdocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Impress_Bin;
Subkey = "LibreOffice.ImpressDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "CIB.CIBOffice.Impress";
End
RegistryItem gid_Regitem_Openoffice_Impressdocument_1_FriendlyTypeName
@@ -931,7 +931,7 @@ RegistryItem gid_Regitem_Openoffice_Impresstemplate_1_AppUserModelID
ModuleID = gid_Module_Prg_Impress_Bin;
Subkey = "LibreOffice.ImpressTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "CIB.CIBOffice.Impress";
End
RegistryItem gid_Regitem_Openoffice_Impresstemplate_1_FriendlyTypeName
diff --git a/scp2/source/math/folderitem_math.scp b/scp2/source/math/folderitem_math.scp
index 44ddc078e47b..1c5b4615b209 100644
--- a/scp2/source/math/folderitem_math.scp
+++ b/scp2/source/math/folderitem_math.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Smath_AppID
ShortcutID = gid_Folderitem_Smath;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Math";
+ Value = "CIB.CIBOffice.Math";
End
#endif
diff --git a/scp2/source/math/registryitem_math.scp b/scp2/source/math/registryitem_math.scp
index bf59735883d9..063f348e63fe 100644
--- a/scp2/source/math/registryitem_math.scp
+++ b/scp2/source/math/registryitem_math.scp
@@ -281,7 +281,7 @@ RegistryItem gid_Regitem_Soffice_Starmathdocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Math_Bin;
Subkey = "soffice.StarMathDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Math";
+ Value = "CIB.CIBOffice.Math";
End
RegistryItem gid_Regitem_Soffice_Starmathdocument_6_FriendlyTypeName
@@ -557,7 +557,7 @@ RegistryItem gid_Regitem_Openoffice_Mathdocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Math_Bin;
Subkey = "LibreOffice.MathDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Math";
+ Value = "CIB.CIBOffice.Math";
End
RegistryItem gid_Regitem_Openoffice_Mathdocument_1_FriendlyTypeName
diff --git a/scp2/source/ooo/folderitem_ooo.scp b/scp2/source/ooo/folderitem_ooo.scp
index a9f68ffd3dea..e683fd7b37d2 100644
--- a/scp2/source/ooo/folderitem_ooo.scp
+++ b/scp2/source/ooo/folderitem_ooo.scp
@@ -38,7 +38,7 @@ End
FolderItemProperty gid_Fip_LibreOffice_AppID
ShortcutID = gid_Folderitem_LibreOffice;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Startcenter";
+ Value = "CIB.CIBOffice.Startcenter";
End
FolderItem gid_Folderitem_Soffice_Desktop
@@ -63,7 +63,7 @@ End
FolderItemProperty gid_Fip_Soffice_Desktop_AppID
ShortcutID = gid_Folderitem_Soffice_Desktop;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Startcenter";
+ Value = "CIB.CIBOffice.Startcenter";
End
FolderItem gid_Folderitem_LibreOffice_SafeMode
@@ -86,5 +86,5 @@ End
FolderItemProperty gid_Fip_LibreOffice_SafeMode
ShortcutID = gid_Folderitem_LibreOffice_SafeMode;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.SafeMode";
+ Value = "CIB.CIBOffice.SafeMode";
End
diff --git a/scp2/source/ooo/folderitem_ooo.ulf b/scp2/source/ooo/folderitem_ooo.ulf
index 22f8a37f7981..b5b06cd82c6a 100644
--- a/scp2/source/ooo/folderitem_ooo.ulf
+++ b/scp2/source/ooo/folderitem_ooo.ulf
@@ -26,4 +26,4 @@ en-US = "Open Document"
en-US = "%PRODUCTNAME (Safe Mode)"
[STR_FI_TOOLTIP_SOFFICE]
-en-US = "LibreOffice, the office productivity suite provided by The Document Foundation. See https://www.documentfoundation.org"
+en-US = "CIB Office, the office productivity suite provided by CIB software GmbH."
diff --git a/scp2/source/writer/folderitem_writer.scp b/scp2/source/writer/folderitem_writer.scp
index 306fc888d230..16d6475d39dc 100644
--- a/scp2/source/writer/folderitem_writer.scp
+++ b/scp2/source/writer/folderitem_writer.scp
@@ -35,6 +35,6 @@ End
FolderItemProperty gid_Fip_Swriter_AppID
ShortcutID = gid_Folderitem_Swriter;
Key = "System.AppUserModel.ID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
#endif
diff --git a/scp2/source/writer/registryitem_writer.scp b/scp2/source/writer/registryitem_writer.scp
index 98859a881836..8150f5bd6572 100644
--- a/scp2/source/writer/registryitem_writer.scp
+++ b/scp2/source/writer/registryitem_writer.scp
@@ -282,7 +282,7 @@ RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "soffice.StarWriterDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_FriendlyTypeName
@@ -402,7 +402,7 @@ RegistryItem gid_Regitem_Soffice_Starwriterglobaldocument_6_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "soffice.StarWriterGlobalDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Soffice_Starwriterglobaldocument_6_FriendlyTypeName
@@ -488,7 +488,7 @@ RegistryItem gid_Regitem_Soffice_Starwritertemplate_6_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "soffice.StarWriterTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Soffice_Starwritertemplate_6_FriendlyTypeName
@@ -847,7 +847,7 @@ RegistryItem gid_Regitem_Openoffice_Writerdocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "LibreOffice.WriterDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Openoffice_Writerdocument_1_FriendlyTypeName
@@ -1096,7 +1096,7 @@ RegistryItem gid_Regitem_Openoffice_Writertemplate_1_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "LibreOffice.WriterTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Openoffice_Writertemplate_1_FriendlyTypeName
@@ -1246,7 +1246,7 @@ RegistryItem gid_Regitem_Openoffice_Writerglobaldocument_1_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "LibreOffice.WriterGlobalDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Openoffice_Writerglobaldocument_1_FriendlyTypeName
@@ -1396,7 +1396,7 @@ RegistryItem gid_Regitem_Openoffice_WriterWebTemplate_1_AppUserModelID
ModuleID = gid_Module_Prg_Wrt_Bin;
Subkey = "LibreOffice.WriterWebTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "CIB.CIBOffice.Writer";
End
RegistryItem gid_Regitem_Openoffice_WriterWebTemplate_1_FriendlyTypeName
diff --git a/scripting/Jar_ScriptFramework.mk b/scripting/Jar_ScriptFramework.mk
index 9bf31b62cb64..0a2aa86f8cac 100644
--- a/scripting/Jar_ScriptFramework.mk
+++ b/scripting/Jar_ScriptFramework.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Jar_add_sourcefiles,ScriptFramework,\
scripting/java/com/sun/star/script/framework/provider/PathUtils \
scripting/java/com/sun/star/script/framework/provider/ScriptContext \
scripting/java/com/sun/star/script/framework/provider/ScriptEditor \
+ scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase \
scripting/java/com/sun/star/script/framework/provider/ScriptProvider \
scripting/java/com/sun/star/script/framework/provider/SwingInvocation \
scripting/java/Framework/com/sun/star/script/framework/security/SecurityDialog \
diff --git a/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java b/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java
index 0974b8874110..b5e6e3085bd2 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ClassLoaderFactory.java
@@ -33,7 +33,7 @@ public class ClassLoaderFactory {
private ClassLoaderFactory() {}
- public static URLClassLoader getURLClassLoader(ScriptMetaData scriptData) {
+ public static ClassLoader getURLClassLoader(ScriptMetaData scriptData) {
ClassLoader parent = scriptData.getClass().getClassLoader();
URL[] classPath = scriptData.getClassPath();
LogUtils.DEBUG("Classpath has length " + classPath.length);
@@ -45,7 +45,7 @@ public class ClassLoaderFactory {
return getURLClassLoader(parent, classPath);
}
- public static URLClassLoader getURLClassLoader(final ClassLoader parent,
+ public static ClassLoader getURLClassLoader(final ClassLoader parent,
final URL[] classpath) {
return AccessController.doPrivileged(
new PrivilegedAction<URLClassLoader>() {
diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
index dbcb3b0bc7a9..32ebd2fefb41 100644
--- a/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptEditor.java
@@ -18,62 +18,13 @@
package com.sun.star.script.framework.provider;
-import com.sun.star.beans.NamedValue;
-import com.sun.star.configuration.theDefaultProvider;
-import com.sun.star.container.XNameAccess;
-import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.script.framework.container.ScriptMetaData;
import com.sun.star.script.provider.XScriptContext;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.UnoRuntime;
-import javax.swing.JOptionPane;
-import javax.swing.JDialog;
-
-public abstract class ScriptEditor {
- public XScriptContext context;
-
- public abstract Object execute() throws Exception;
- public abstract void indicateErrorLine(int lineNum);
- public abstract void edit(XScriptContext context, ScriptMetaData entry);
- public abstract String getTemplate();
- public abstract String getExtension();
-
- public void setContext(XScriptContext context) {
- this.context = context;
- }
-
- public boolean isMacroExectionEnabled() {
- XNameAccess xNameAccess = null;
- try {
- String sAccess = "com.sun.star.configuration.ConfigurationAccess";
- XMultiServiceFactory xMSFCfg = theDefaultProvider.get(context.getComponentContext());
- Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess,
- new Object[] { new NamedValue("nodepath", "org.openoffice.Office.Common/Security/Scripting") });
- xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oAccess);
- Object result = xNameAccess.getByName("DisableMacrosExecution");
- boolean bMacrosDisabled = AnyConverter.toBoolean(result);
- if (bMacrosDisabled)
- return false;
- } catch (com.sun.star.uno.Exception e) {
- return false;
- }
- return true;
- }
-
- // Wraps long error messages
- private static class NarrowOptionPane extends JOptionPane {
- private static final long serialVersionUID = 1L;
- public int getMaxCharactersPerLineCount() {
- return 100;
- }
- }
-
- public void showErrorMessage(String message) {
- JOptionPane optionPane = new NarrowOptionPane();
- optionPane.setMessage(message);
- optionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
- JDialog dialog = optionPane.createDialog(null, "Error");
- dialog.setVisible(true);
- }
+public interface ScriptEditor {
+ Object execute() throws Exception;
+ void indicateErrorLine(int lineNum);
+ void edit(XScriptContext context, ScriptMetaData entry);
+ String getTemplate();
+ String getExtension();
} \ No newline at end of file
diff --git a/scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java b/scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java
new file mode 100644
index 000000000000..1a8bf33a5395
--- /dev/null
+++ b/scripting/java/com/sun/star/script/framework/provider/ScriptEditorBase.java
@@ -0,0 +1,73 @@
+/*
+ * 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 .
+ */
+
+package com.sun.star.script.framework.provider;
+
+import com.sun.star.beans.NamedValue;
+import com.sun.star.configuration.theDefaultProvider;
+import com.sun.star.container.XNameAccess;
+import com.sun.star.lang.XMultiServiceFactory;
+import com.sun.star.script.framework.container.ScriptMetaData;
+import com.sun.star.script.provider.XScriptContext;
+import com.sun.star.uno.AnyConverter;
+import com.sun.star.uno.UnoRuntime;
+
+import javax.swing.JOptionPane;
+import javax.swing.JDialog;
+
+public abstract class ScriptEditorBase implements ScriptEditor {
+ public XScriptContext context;
+
+ public void setContext(XScriptContext context) {
+ this.context = context;
+ }
+
+ public boolean isMacroExecutionEnabled() {
+ XNameAccess xNameAccess = null;
+ try {
+ String sAccess = "com.sun.star.configuration.ConfigurationAccess";
+ XMultiServiceFactory xMSFCfg = theDefaultProvider.get(context.getComponentContext());
+ Object oAccess = xMSFCfg.createInstanceWithArguments(sAccess,
+ new Object[] { new NamedValue("nodepath", "org.openoffice.Office.Common/Security/Scripting") });
+ xNameAccess = UnoRuntime.queryInterface(XNameAccess.class, oAccess);
+ Object result = xNameAccess.getByName("DisableMacrosExecution");
+ boolean bMacrosDisabled = AnyConverter.toBoolean(result);
+ if (bMacrosDisabled)
+ return false;
+ } catch (com.sun.star.uno.Exception e) {
+ return false;
+ }
+ return true;
+ }
+
+ // Wraps long error messages
+ private static class NarrowOptionPane extends JOptionPane {
+ private static final long serialVersionUID = 1L;
+ public int getMaxCharactersPerLineCount() {
+ return 100;
+ }
+ }
+
+ public void showErrorMessage(String message) {
+ JOptionPane optionPane = new NarrowOptionPane();
+ optionPane.setMessage(message);
+ optionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
+ JDialog dialog = optionPane.createDialog(null, "Error");
+ dialog.setVisible(true);
+ }
+} \ No newline at end of file
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
index 31c26dc51334..0ab265ecc799 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
@@ -19,7 +19,7 @@ package com.sun.star.script.framework.provider.beanshell;
import com.sun.star.script.framework.container.ScriptMetaData;
import com.sun.star.script.framework.provider.ClassLoaderFactory;
-import com.sun.star.script.framework.provider.ScriptEditor;
+import com.sun.star.script.framework.provider.ScriptEditorBase;
import com.sun.star.script.framework.provider.SwingInvocation;
import com.sun.star.script.provider.XScriptContext;
@@ -49,7 +49,7 @@ import javax.swing.JPanel;
import javax.swing.JToolBar;
import javax.swing.BorderFactory;
-public class ScriptEditorForBeanShell extends ScriptEditor implements ActionListener {
+public class ScriptEditorForBeanShell extends ScriptEditorBase implements ActionListener {
private JFrame frame;
private String filename;
@@ -170,7 +170,7 @@ public class ScriptEditorForBeanShell extends ScriptEditor implements ActionList
*
*/
public Object execute() throws Exception {
- if (!isMacroExectionEnabled()) {
+ if (!isMacroExecutionEnabled()) {
showErrorMessage("Macro Execution has been disabled.");
return null;
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
index 63dc3169f759..eeea0d49ebe5 100644
--- a/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
+++ b/scripting/java/com/sun/star/script/framework/provider/java/ScriptProviderForJava.java
@@ -45,8 +45,6 @@ import com.sun.star.uno.Any;
import com.sun.star.uno.Type;
import com.sun.star.uno.XComponentContext;
-import java.io.IOException;
-import java.net.URLClassLoader;
import java.util.ArrayList;
public class ScriptProviderForJava {
@@ -184,63 +182,56 @@ class ScriptImpl implements XScript {
ScriptDescriptor scriptDesc =
new ScriptDescriptor(metaData.getLanguageName());
+ LogUtils.DEBUG("Classloader starting...");
+
+ ClassLoader scriptLoader =
+ ClassLoaderFactory.getURLClassLoader(metaData);
+
+ LogUtils.DEBUG("Classloader finished...");
+
+ ArrayList<Object> invocationArgList = new ArrayList<Object>();
Object[] invocationArgs = null;
- ScriptProxy script = null;
- LogUtils.DEBUG("Classloader starting...");
+ LogUtils.DEBUG("Parameter Mapping...");
- try (URLClassLoader scriptLoader = ClassLoaderFactory.getURLClassLoader(metaData)) {
- LogUtils.DEBUG("Classloader finished...");
+ // Setup Context Object
+ XScriptContext xSc =
+ ScriptContext.createContext(m_xModel, m_xInvocContext,
+ m_xContext, m_xMultiComponentFactory);
- ArrayList<Object> invocationArgList = new ArrayList<Object>();
+ scriptDesc.addArgumentType(XScriptContext.class);
+ invocationArgList.add(xSc);
- LogUtils.DEBUG("Parameter Mapping...");
+ for (int i = 0; i < params.length; i++) {
+ scriptDesc.addArgumentType(params[ i ].getClass());
+ invocationArgList.add(params[ i ]);
+ }
- // Setup Context Object
- XScriptContext xSc =
- ScriptContext.createContext(m_xModel, m_xInvocContext,
- m_xContext, m_xMultiComponentFactory);
+ if (!invocationArgList.isEmpty()) {
+ invocationArgs = invocationArgList.toArray();
+ }
- scriptDesc.addArgumentType(XScriptContext.class);
- invocationArgList.add(xSc);
+ LogUtils.DEBUG("ScriptProxy starting... ");
+ ScriptProxy script = null;
- for (int i = 0; i < params.length; i++) {
- scriptDesc.addArgumentType(params[ i ].getClass());
- invocationArgList.add(params[ i ]);
- }
+ try {
- if (!invocationArgList.isEmpty()) {
- invocationArgs = invocationArgList.toArray();
- }
+ String className = metaData.getLanguageName().substring(0,
+ metaData.getLanguageName().lastIndexOf('.'));
- LogUtils.DEBUG("ScriptProxy starting... ");
+ LogUtils.DEBUG("About to load Class " + className + " starting... ");
- try {
+ long start = new java.util.Date().getTime();
+ Class<?> c = scriptLoader.loadClass(className);
+ long end = new java.util.Date().getTime();
- String className = metaData.getLanguageName().substring(0,
- metaData.getLanguageName().lastIndexOf('.'));
-
- LogUtils.DEBUG("About to load Class " + className + " starting... ");
-
- long start = new java.util.Date().getTime();
- Class<?> c = scriptLoader.loadClass(className);
- long end = new java.util.Date().getTime();
-
- LogUtils.DEBUG("loadClass took: " + (end - start) + "milliseconds");
-
- try {
- LogUtils.DEBUG("class loaded ... ");
- script = m_resolutionPolicy.getProxy(scriptDesc, c);
- LogUtils.DEBUG("script resolved ... ");
- } catch (NoSuchMethodException e) {
- // Framework error
- ScriptFrameworkErrorException e2 = new ScriptFrameworkErrorException(
- e.toString(), null, metaData.getLanguageName(),
- metaData.getLanguage(), ScriptFrameworkErrorType.NO_SUCH_SCRIPT);
- e2.initCause(e);
- throw e2;
- }
- } catch (ClassNotFoundException e) {
+ LogUtils.DEBUG("loadClass took: " + (end - start) + "milliseconds");
+
+ try {
+ LogUtils.DEBUG("class loaded ... ");
+ script = m_resolutionPolicy.getProxy(scriptDesc, c);
+ LogUtils.DEBUG("script resolved ... ");
+ } catch (NoSuchMethodException e) {
// Framework error
ScriptFrameworkErrorException e2 = new ScriptFrameworkErrorException(
e.toString(), null, metaData.getLanguageName(),
@@ -248,11 +239,11 @@ class ScriptImpl implements XScript {
e2.initCause(e);
throw e2;
}
- } catch (IOException e) {
+ } catch (ClassNotFoundException e) {
// Framework error
ScriptFrameworkErrorException e2 = new ScriptFrameworkErrorException(
- e.toString(), null, metaData.getLanguageName(), metaData.getLanguage(),
- ScriptFrameworkErrorType.NO_SUCH_SCRIPT);
+ e.toString(), null, metaData.getLanguageName(),
+ metaData.getLanguage(), ScriptFrameworkErrorType.NO_SUCH_SCRIPT);
e2.initCause(e);
throw e2;
}
diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
index 4cf5cc3384ca..1f0e8fd72a16 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
@@ -20,7 +20,7 @@ package com.sun.star.script.framework.provider.javascript;
import com.sun.star.script.framework.container.ScriptMetaData;
import com.sun.star.script.framework.log.LogUtils;
-import com.sun.star.script.framework.provider.ScriptEditor;
+import com.sun.star.script.framework.provider.ScriptEditorBase;
import com.sun.star.script.framework.provider.SwingInvocation;
import com.sun.star.script.provider.XScriptContext;
@@ -40,7 +40,7 @@ import org.mozilla.javascript.Scriptable;
import org.mozilla.javascript.tools.debugger.Main;
import org.mozilla.javascript.tools.debugger.ScopeProvider;
-public class ScriptEditorForJavaScript extends ScriptEditor {
+public class ScriptEditorForJavaScript extends ScriptEditorBase {
// global ScriptEditorForJavaScript instance
private static ScriptEditorForJavaScript theScriptEditorForJavaScript;
@@ -196,7 +196,7 @@ public class ScriptEditorForJavaScript extends ScriptEditor {
private ScriptEditorForJavaScript(XScriptContext context, URL url) {
setContext(context);
// Need to check that before showing the window. Checking in execute() has no effect.
- if (!isMacroExectionEnabled()) {
+ if (!isMacroExecutionEnabled()) {
showErrorMessage("Macro Execution has been disabled.");
return ;
}
diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py
index 079744007816..9b0e35ccdf42 100644
--- a/scripting/source/pyprov/mailmerge.py
+++ b/scripting/source/pyprov/mailmerge.py
@@ -49,7 +49,7 @@ from email.utils import formatdate
from email.utils import parseaddr
from socket import _GLOBAL_DEFAULT_TIMEOUT
-import sys, smtplib, imaplib, poplib
+import sys, ssl, smtplib, imaplib, poplib
dbg = False
# pythonloader looks for a static g_ImplementationHelper variable
@@ -105,7 +105,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
if dbg:
print("Timeout: " + str(tout), file=dbgout)
if port == 465:
- self.server = smtplib.SMTP_SSL(server, port,timeout=tout)
+ self.server = smtplib.SMTP_SSL(server, port, timeout=tout, context=ssl.create_default_context())
else:
self.server = smtplib.SMTP(server, port,timeout=tout)
@@ -121,7 +121,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService):
print("ConnectionType: " + connectiontype, file=dbgout)
if connectiontype.upper() == 'SSL' and port != 465:
self.server.ehlo()
- self.server.starttls()
+ self.server.starttls(context=ssl.create_default_context())
self.server.ehlo()
user = xAuthenticator.getUserName()
@@ -325,7 +325,7 @@ class PyMailIMAPService(unohelper.Base, XMailService):
print(connectiontype, file=dbgout)
print("BEFORE", file=dbgout)
if connectiontype.upper() == 'SSL':
- self.server = imaplib.IMAP4_SSL(server, port)
+ self.server = imaplib.IMAP4_SSL(server, port, ssl_context=ssl.create_default_context())
else:
self.server = imaplib.IMAP4(server, port)
print("AFTER", file=dbgout)
@@ -397,7 +397,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService):
print(connectiontype, file=dbgout)
print("BEFORE", file=dbgout)
if connectiontype.upper() == 'SSL':
- self.server = poplib.POP3_SSL(server, port)
+ self.server = poplib.POP3_SSL(server, port, context=ssl.create_default_context())
else:
tout = xConnectionContext.getValueByName("Timeout")
if dbg:
diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py
index 82973266a2b0..912f1b511185 100644
--- a/scripting/source/pyprov/pythonscript.py
+++ b/scripting/source/pyprov/pythonscript.py
@@ -21,7 +21,7 @@ import uno
import unohelper
import sys
import os
-import imp
+import types
import time
import ast
import platform
@@ -347,7 +347,7 @@ class ScriptContext(unohelper.Base):
# code = readTextFromStream( sfa.openFileRead( url ) )
# execute the module
-# entry = ModuleEntry( lastRead, imp.new_module("ooo_script_framework") )
+# entry = ModuleEntry( lastRead, types.ModuleType("ooo_script_framework") )
# entry.module.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = g_scriptContext
# entry.module.__file__ = url
# exec code in entry.module.__dict__
@@ -489,7 +489,7 @@ class ProviderContext:
src = ensureSourceState( src )
# execute the module
- entry = ModuleEntry( lastRead, imp.new_module("ooo_script_framework") )
+ entry = ModuleEntry( lastRead, types.ModuleType("ooo_script_framework") )
entry.module.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.scriptContext
code = None
@@ -583,7 +583,7 @@ class ScriptBrowseNode( unohelper.Base, XBrowseNode , XPropertySet, XInvocation,
if event.ActionCommand == "Run":
code = self.editor.getControl("EditorTextField").getText()
code = ensureSourceState( code )
- mod = imp.new_module("ooo_script_framework")
+ mod = types.ModuleType("ooo_script_framework")
mod.__dict__[GLOBAL_SCRIPTCONTEXT_NAME] = self.provCtx.scriptContext
exec(code, mod.__dict__)
values = mod.__dict__.get( CALLABLE_CONTAINER_NAME , None )
diff --git a/sd/qa/uitest/impress_tests/data/tdf153161_FlushToSave.odp b/sd/qa/uitest/impress_tests/data/tdf153161_FlushToSave.odp
new file mode 100644
index 000000000000..1fd5c20c2a52
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/data/tdf153161_FlushToSave.odp
Binary files differ
diff --git a/sd/qa/uitest/impress_tests/tdf153161.py b/sd/qa/uitest/impress_tests/tdf153161.py
new file mode 100644
index 000000000000..23ffdef879d1
--- /dev/null
+++ b/sd/qa/uitest/impress_tests/tdf153161.py
@@ -0,0 +1,41 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+import org.libreoffice.unotest
+import pathlib
+
+def get_url_for_data_file(file_name):
+ return pathlib.Path(org.libreoffice.unotest.makeCopyFromTDOC(file_name)).as_uri()
+
+class TestTdf153161(UITestCase):
+
+ def testTdf153161(self):
+
+ document = self.ui_test.load_file(get_url_for_data_file('tdf153161_FlushToSave.odp'))
+ oldText = document.DrawPages[0].getByIndex(1).String
+ self.assertTrue(oldText.startswith('在没有版本控制系统的时期'))
+
+ xImpressDoc = self.xUITest.getTopFocusWindow()
+ xEditWin = xImpressDoc.getChild('impress_win')
+ xEditWin.executeAction('SELECT', mkPropertyValues({'OBJECT':'Unnamed Drawinglayer object 1'}))
+
+ # Type something, getting into text editing mode (appending) automatically
+ xEditWin.executeAction('TYPE', mkPropertyValues({'TEXT': 'Foo Bar'}))
+ xToolkit = self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+ xToolkit.processEventsToIdle()
+ self.xUITest.executeCommand('.uno:Save')
+ self.xUITest.executeCommand('.uno:Reload')
+
+ # Reload and check that the edit was saved
+ document = self.ui_test.get_component()
+ self.assertEqual(oldText + 'Foo Bar', document.DrawPages[0].getByIndex(1).String)
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index ff379531338f..a576c2a236bc 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -1337,8 +1337,8 @@ void SdTiledRenderingTest::testTdf102223()
EditView& rEditView = pView->GetTextEditOutlinerView()->GetEditView();
rEditView.SetSelection(ESelection(0, 0, 0, 3)); // start para, start char, end para, end char.
CPPUNIT_ASSERT_EQUAL(OUString("Red"), rEditView.GetSelected());
- const SvxFontHeightItem& rItem = rEditView.GetAttribs().Get(EE_CHAR_FONTHEIGHT);
- CPPUNIT_ASSERT_EQUAL(int(1411), static_cast<int>(rItem.GetHeight()));
+ CPPUNIT_ASSERT_EQUAL(
+ int(1411), static_cast<int>(rEditView.GetAttribs().Get(EE_CHAR_FONTHEIGHT).GetHeight()));
// cut contents of cell
uno::Sequence<beans::PropertyValue> aArgs;
@@ -1349,8 +1349,8 @@ void SdTiledRenderingTest::testTdf102223()
CPPUNIT_ASSERT(pView->GetTextEditObject());
EditView& rEditView2 = pView->GetTextEditOutlinerView()->GetEditView();
rEditView2.SetSelection(ESelection(0, 0, 0, 1)); // start para, start char, end para, end char.
- const SvxFontHeightItem& rItem2 = rEditView2.GetAttribs().Get(EE_CHAR_FONTHEIGHT);
- CPPUNIT_ASSERT_EQUAL(int(1411), static_cast<int>(rItem2.GetHeight()));
+ CPPUNIT_ASSERT_EQUAL(
+ int(1411), static_cast<int>(rEditView2.GetAttribs().Get(EE_CHAR_FONTHEIGHT).GetHeight()));
}
void SdTiledRenderingTest::testPostKeyEventInvalidation()
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index f23eabd0f6c8..261b87634a90 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -747,7 +747,7 @@ bool SdXMLFilter::Import( ErrCode& nError )
if( !sBuildId.isEmpty() )
{
sal_Int32 nIndex = sBuildId.indexOf('$');
- if( nIndex != -1 )
+ if (sBuildId.indexOf(';') == -1 && nIndex != -1)
{
sal_Int32 nUPD = sBuildId.copy( 0, nIndex ).toInt32();
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 3d84ddb0da56..8d42653545ea 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -32,6 +32,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/request.hxx>
#include <sfx2/templatedlg.hxx>
+#include <svl/stritem.hxx>
#include <editeng/eeitem.hxx>
#include <svx/svxids.hrc>
@@ -193,26 +194,32 @@ void SdModule::Execute(SfxRequest& rReq)
{
bool bIntercept = false;
::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() );
- if (pDocShell)
+ ::sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : nullptr;
+ if (pViewShell)
{
- ::sd::ViewShell* pViewShell = pDocShell->GetViewShell();
- if (pViewShell)
+ if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) )
{
- if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) )
+ // Prevent documents from opening while the slide
+ // show is running, except when this request comes
+ // from a shape interaction.
+ if (rReq.GetArgs() == nullptr)
{
- // Prevent documents from opening while the slide
- // show is running, except when this request comes
- // from a shape interaction.
- if (rReq.GetArgs() == nullptr)
- {
- bIntercept = true;
- }
+ bIntercept = true;
}
}
}
if (!bIntercept)
{
+ if (const SfxStringItem* pURLItem = rReq.GetArg<SfxStringItem>(SID_FILE_NAME))
+ {
+ if (!pViewShell || !SfxObjectShell::AllowedLinkProtocolFromDocument(pURLItem->GetValue(),
+ pViewShell->GetObjectShell(),
+ pViewShell->GetFrameWeld()))
+ {
+ return;
+ }
+ }
SfxGetpApp()->ExecuteSlot(rReq, SfxGetpApp()->GetInterface());
}
else
diff --git a/sd/source/ui/remotecontrol/Receiver.cxx b/sd/source/ui/remotecontrol/Receiver.cxx
index 3c0309e9e461..815c53ef4d35 100644
--- a/sd/source/ui/remotecontrol/Receiver.cxx
+++ b/sd/source/ui/remotecontrol/Receiver.cxx
@@ -78,6 +78,12 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
{
}
+ if (aCommand.empty())
+ {
+ SAL_WARN("sdremote", "Receiver::executeCommand: no command");
+ return;
+ }
+
if ( aCommand[0] == "transition_next" )
{
if ( xSlideShowController.is() )
@@ -90,6 +96,11 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
}
else if ( aCommand[0] == "goto_slide" )
{
+ if (aCommand.size() < 2)
+ {
+ SAL_WARN("sdremote", "Receiver::executeCommand: invalid goto_slide");
+ return;
+ }
// FIXME: if 0 returned, then not a valid number
sal_Int32 aSlide = aCommand[1].toInt32();
if ( xSlideShowController.is() &&
@@ -122,6 +133,11 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
}
else if (aCommand[0] == "pointer_started" )
{
+ if (aCommand.size() < 3)
+ {
+ SAL_WARN("sdremote", "Receiver::executeCommand: invalid pointer_started");
+ return;
+ }
// std::cerr << "pointer_started" << std::endl;
float x = aCommand[1].toFloat();
float y = aCommand[2].toFloat();
@@ -176,6 +192,11 @@ void Receiver::executeCommand( const std::vector<OString> &aCommand )
}
else if (aCommand[0] == "pointer_coordination" )
{
+ if (aCommand.size() < 3)
+ {
+ SAL_WARN("sdremote", "Receiver::executeCommand: invalid pointer_coordination");
+ return;
+ }
float x = aCommand[1].toFloat();
float y = aCommand[2].toFloat();
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 78c4635f279e..e16e8a67dc53 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -132,7 +132,7 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
{
bool bRet = false;
- if ( !IsInputLocked() || ( rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE ) )
+ if (!IsInputLocked() || (rKEvt.GetKeyCode().GetCode() == KEY_ESCAPE))
{
if(KEY_RETURN == rKEvt.GetKeyCode().GetCode()
&& rKEvt.GetKeyCode().IsMod1()
@@ -209,6 +209,9 @@ bool DrawViewShell::KeyInput (const KeyEvent& rKEvt, ::sd::Window* pWin)
}
}
+ if (!bRet)
+ bRet = GetView()->KeyInput(rKEvt, pWin);
+
return bRet;
}
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index 87d81f5446be..208aa633dc11 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -633,7 +633,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar.ui b/sd/uiconfig/sdraw/ui/notebookbar.ui
index 2a541d470184..8317bf4ead8c 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar.ui
@@ -806,13 +806,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
index 53e3d6da180c..871d1b0343ab 100644
--- a/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/sdraw/ui/notebookbar_compact.ui
@@ -848,13 +848,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index cec28407957b..d93cb7fe360b 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -673,7 +673,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui
index fce116aec371..950fd54b4d46 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -728,13 +728,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
index 67c811e31958..e1f45979a1de 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
@@ -847,13 +847,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
index dca3ad7922e6..c6e2dcfe5573 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
@@ -1495,13 +1495,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="QuestionAnswersD1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="SendFeedbackD1">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 360358d450d2..7b951a2cd0c6 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -22,6 +22,10 @@ $(eval $(call gb_Executable_add_exception_objects,xpdfimport,\
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl \
))
+$(eval $(call gb_Executable_use_system_win32_libs,xpdfimport,\
+ shell32 \
+))
+
$(eval $(call gb_Executable_add_default_nativeres,xpdfimport))
# vim:set noet sw=4 ts=4:
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 3d36e77110be..ad25b2edd85b 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -486,12 +486,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 )
@@ -613,52 +607,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 16ad04bf660a..676aefe91859 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 b1a54bd09c5f..3ab3381652cd 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/source/packinfo/packinfo_brand.txt b/setup_native/source/packinfo/packinfo_brand.txt
index 97b5d8cc4fca..b4909fc6c266 100644
--- a/setup_native/source/packinfo/packinfo_brand.txt
+++ b/setup_native/source/packinfo/packinfo_brand.txt
@@ -22,12 +22,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-images %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure (Name="UNO Runtime Environment"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-images (Name="Images module for %PRODUCTNAME %PRODUCTVERSION")"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4"
+linuxincompat = "libreofficepoweredbycib6.4"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4"
End
Start
@@ -36,12 +39,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-writer"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-writer"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-writer %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-writer"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-writer"
+linuxincompat = "libreofficepoweredbycib6.4-writer"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Writer brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-writer"
End
Start
@@ -50,12 +56,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-calc"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-calc"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-calc %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-calc"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-calc"
+linuxincompat = "libreofficepoweredbycib6.4-calc"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Calc brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-calc"
End
Start
@@ -64,12 +73,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-impress"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-impress"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-impress %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-impress"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-impress"
+linuxincompat = "libreofficepoweredbycib6.4-impress"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Impress brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-impress"
End
Start
@@ -78,12 +90,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-draw"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-draw"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-draw %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-draw"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-draw"
+linuxincompat = "libreofficepoweredbycib6.4-draw"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Draw brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-draw"
End
Start
@@ -92,12 +107,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-math"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-math"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-math %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-math"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-math"
+linuxincompat = "libreofficepoweredbycib6.4-math"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Math brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-math"
End
Start
@@ -106,12 +124,15 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-base"
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-base"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-base %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-base"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-base"
+linuxincompat = "libreofficepoweredbycib6.4-base"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Base brand module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-base"
End
Start
@@ -120,10 +141,13 @@ solarispackagename = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION-%LANGUAGEST
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-%LANGUAGESTRING"
requires = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "%WITHOUTDOTUNIXPACKAGENAME%BRANDPACKAGEVERSION,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING (Name="Language module for %PRODUCTNAME %PRODUCTVERSION\, language %LANGUAGESTRING")"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-%LANGUAGESTRING"
+linuxincompat = "libreofficepoweredbycib6.4-%LANGUAGESTRING"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Brand language module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycib6.4-%LANGUAGESTRING"
End
diff --git a/setup_native/source/packinfo/packinfo_extensions.txt b/setup_native/source/packinfo/packinfo_extensions.txt
index 4bd5b97c0cda..bb50dec0f3a6 100644
--- a/setup_native/source/packinfo/packinfo_extensions.txt
+++ b/setup_native/source/packinfo/packinfo_extensions.txt
@@ -41,9 +41,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Cor
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-mediawiki-publisher"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-mediawiki-publisher"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-mediawiki-publisher"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "MediaWiki publisher extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -58,7 +60,7 @@ requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERS
linuxpatchrequires = ""
copyright = "2009 by FSF.hu"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Numbertext extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -73,7 +75,7 @@ requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERS
linuxpatchrequires = ""
copyright = "Copyright (c) 2008 Cor Nouws"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "ConvertTextToNumber extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -86,9 +88,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Cor
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-nlpsolver"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-nlpsolver"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-nlpsolver"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "NLPSolver extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -103,7 +107,7 @@ requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERS
linuxpatchrequires = ""
copyright = "2005-2009 by Daniel Naber"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "LanguageTool extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -116,9 +120,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Cor
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-beanshell-script-provider"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-beanshell-script-provider"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-beanshell-script-provider"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Script provider for BeanShell extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -131,9 +137,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Cor
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-javascript-script-provider"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-javascript-script-provider"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-javascript-script-provider"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Script provider for JavaScript extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index 956a55ef6b9a..48a1b1be91ae 100644
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -47,9 +47,11 @@ packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-gnome-integration"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
findrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-gnome-integration"
+linuxincompat = "libreofficepoweredbycibbasis6.4-gnome-integration"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "GNOME integration module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -62,9 +64,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-tde-integration"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "TDE integration module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -77,30 +79,35 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-kde-integration"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-kde-integration"
+linuxincompat = "libreofficepoweredbycibbasis6.4-kde-integration"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "KDE integration module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycibbasis6.4-kde-integration"
End
Start
module = "gid_Module_Root"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
-linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01, %BASISPACKAGEPREFIX%PRODUCTVERSION-core02, %BASISPACKAGEPREFIX%PRODUCTVERSION-core03, %BASISPACKAGEPREFIX%PRODUCTVERSION-core04, %BASISPACKAGEPREFIX%PRODUCTVERSION-core05, %BASISPACKAGEPREFIX%PRODUCTVERSION-core06, %BASISPACKAGEPREFIX%PRODUCTVERSION-core07"
+linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01, %BASISPACKAGEPREFIX%PRODUCTVERSION-core02, %BASISPACKAGEPREFIX%PRODUCTVERSION-core03, %BASISPACKAGEPREFIX%PRODUCTVERSION-core04, %BASISPACKAGEPREFIX%PRODUCTVERSION-core05, %BASISPACKAGEPREFIX%PRODUCTVERSION-core06, %BASISPACKAGEPREFIX%PRODUCTVERSION-core07, libreofficepoweredbycibbasis6.4-core"
+linuxincompat = "libreofficepoweredbycibbasis6.4-core"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION, %BASISPACKAGEPREFIX%PRODUCTVERSION-ooofonts %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
solarisrequires = "SUNWcar, SUNWkvm, SUNWcsr, SUNWcsu, SUNWcsd, SUNWcsl,
SUNWxwrtl, SUNWxwplt, SUNWlibC, %SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-ooofonts"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-ooofonts"
findrequires = "find-requires-x11.sh"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Core module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
+provides = "libreofficepoweredbycibbasis6.4-core"
End
Start
@@ -110,9 +117,11 @@ packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-writer"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-writer"
+linuxincompat = "libreofficepoweredbycibbasis6.4-writer"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Writer module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -125,9 +134,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-calc"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-calc"
+linuxincompat = "libreofficepoweredbycibbasis6.4-calc"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Calc module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -140,9 +151,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-draw"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-draw"
+linuxincompat = "libreofficepoweredbycibbasis6.4-draw"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Draw module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -155,9 +168,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-impress"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-impress"
+linuxincompat = "libreofficepoweredbycibbasis6.4-impress"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Impress module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -170,9 +185,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-base"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-base"
+linuxincompat = "libreofficepoweredbycibbasis6.4-base"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Base module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -185,9 +202,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-math"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-math"
+linuxincompat = "libreofficepoweredbycibbasis6.4-math"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Math module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -200,9 +219,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-firebird"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-firebird"
+linuxincompat = "libreofficepoweredbycibbasis6.4-firebird"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Firebird module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -215,9 +236,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-graphicfilter"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-graphicfilter"
+linuxincompat = "libreofficepoweredbycibbasis6.4-graphicfilter"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Graphic filter module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -230,9 +253,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-xsltfilter"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-xsltfilter"
+linuxincompat = "libreofficepoweredbycibbasis6.4-xsltfilter"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "XSLT filter samples module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -245,9 +270,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-activex"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "ActiveX control for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -259,9 +284,9 @@ solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-onlineupdate"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWlibC, SUNWgzip"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-onlineupdate"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Online update module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -272,13 +297,13 @@ module = "gid_Module_Pyuno"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-pyuno"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWPython"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno"
-linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
-linuxincompat = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
+linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo, libreofficepoweredbycibbasis6.4-pyuno"
+linuxincompat = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo, libreofficepoweredbycibbasis6.4-pyuno"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Pyuno module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -291,9 +316,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Cor
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-python-script-provider"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-python-script-provider"
+linuxincompat = "libreofficepoweredbycibbasis6.4-python-script-provider"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Script provider for Python for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -306,9 +333,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-images"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-images"
+linuxincompat = "libreofficepoweredbycibbasis6.4-images"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Images module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -321,9 +350,11 @@ solarisrequires = ""
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-ooofonts"
freebsdrequires = ""
requires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-ooofonts"
+linuxincompat = "libreofficepoweredbycibbasis6.4-ooofonts"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "3rd party free fonts for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -336,9 +367,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-ooolinguistic"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-ooolinguistic"
+linuxincompat = "libreofficepoweredbycibbasis6.4-ooolinguistic"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Linguistic module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -351,9 +384,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-af"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Af dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -368,7 +401,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2011 Santiago Paricio, Juan Pablo Martinez"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "An dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -428,7 +461,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2002 Dr Abhijit Das, 2002 Taneem Ahmed, 2008 Jamil Ahmed"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Bn dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -443,7 +476,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2016 Elie Roux"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Bo dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -486,9 +519,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ca"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Ca dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -501,9 +534,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-cs"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Cs dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -516,9 +549,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-da"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Da dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -531,9 +564,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-de"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-de"
+linuxincompat = "libreofficepoweredbycib6.4-dict-de"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "De dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -546,9 +581,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-en"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-en"
+linuxincompat = "libreofficepoweredbycib6.4-dict-en"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "En dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -563,7 +600,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2002 by Evripidis Papakostas, 2006 by Steve Stavropoulos"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "El dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -576,9 +613,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-es"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-es"
+linuxincompat = "libreofficepoweredbycib6.4-dict-es"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Es dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -591,9 +630,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-et"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Et dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -606,9 +645,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-fr"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-fr"
+linuxincompat = "libreofficepoweredbycib6.4-dict-fr"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Fr dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -636,9 +677,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-gl"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Gl dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -653,7 +694,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2009 by Kartik Mistry"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Gu dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -666,9 +707,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-he"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "He dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -683,7 +724,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2005 Swapnil {Hajare, Sant}"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Hi dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -696,9 +737,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-hu"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Hu dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -713,7 +754,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2003-2010 by Denis Lackovic"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Hr dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -726,9 +767,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-id"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Indonesian dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -741,7 +782,7 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-is"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
vendor = "The hunspell-is project"
description = "Is dictionary for %PRODUCTNAME %PRODUCTVERSION"
@@ -756,9 +797,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-it"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-it"
+linuxincompat = "libreofficepoweredbycib6.4-dict-it"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "It dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -771,9 +814,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-kmr-Latn"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Kmr-Latn dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -788,7 +831,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2013 by Brian Eugene Wilson, Robert Martin Campbell"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Lo dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -801,9 +844,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-lt"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Lt dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -831,9 +874,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ne"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Ne dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -846,9 +889,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-nl"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Nl dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -861,9 +904,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-no"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "No dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -891,9 +934,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pl"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Pl dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -906,9 +949,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pt-BR"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Pt-BR dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -921,9 +964,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-pt-PT"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Pt-PT dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -936,9 +979,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ro"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Ro dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -951,9 +994,11 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-ru"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycib6.4-dict-ru"
+linuxincompat = "libreofficepoweredbycib6.4-dict-ru"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Ru dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -968,7 +1013,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2010 by Laknath Semage"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Si dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -981,9 +1026,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sk"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sk dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -996,9 +1041,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sl"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sl dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1013,7 +1058,7 @@ requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVE
linuxpatchrequires = ""
copyright = "2011 by Luan Kelmendi"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sq dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1026,9 +1071,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sr"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sr dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1041,9 +1086,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sv"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sv dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1056,9 +1101,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-sw"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Sw dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1086,9 +1131,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-th"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Th dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1116,9 +1161,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-vi"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Vietnamese dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1131,9 +1176,9 @@ solarisrequires = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure, %BASISPACKAGEP
packagename = "%UNIXPACKAGENAME%BRANDPACKAGEVERSION-dict-zu"
requires = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%UNIXPACKAGENAME%BRANDPACKAGEVERSION %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Zu dictionary for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1147,9 +1192,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-impress"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-ogltrans"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-impress"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-impress %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-ogltrans"
+linuxincompat = "libreofficepoweredbycibbasis6.4-ogltrans"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "OpenGL slide transitions module for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1162,9 +1209,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-base"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-postgresql-sdbc"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-base"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-base %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-postgresql-sdbc"
+linuxincompat = "libreofficepoweredbycibbasis6.4-postgresql-sdbc"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "PostgreSQL Connector driver for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1177,9 +1226,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-pdf-import"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-pdf-import"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-pdf-import"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "PDF import extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1192,9 +1243,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-report-builder"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-extension-report-builder"
+linuxincompat = "libreofficepoweredbycibbasis6.4-extension-report-builder"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Report Builder extension for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -1207,9 +1260,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-libreofficekit-data"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
linuxpatchrequires = ""
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-libreofficekit-data"
+linuxincompat = "libreofficepoweredbycibbasis6.4-libreofficekit-data"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Libreofficekit data files for %PRODUCTNAME %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
diff --git a/setup_native/source/packinfo/packinfo_office_help.txt b/setup_native/source/packinfo/packinfo_office_help.txt
index 12acde8a4a9b..970aabd59cc5 100644
--- a/setup_native/source/packinfo/packinfo_office_help.txt
+++ b/setup_native/source/packinfo/packinfo_office_help.txt
@@ -39,11 +39,12 @@ module = "gid_Module_Helppack_Help"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING-help"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-help"
-provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-help"
+provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-help, libreofficepoweredbycibbasis6.4-%LANGUAGESTRING-help"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-%LANGUAGESTRING-help"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Help module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
diff --git a/setup_native/source/packinfo/packinfo_office_lang.txt b/setup_native/source/packinfo/packinfo_office_lang.txt
index a23e4695e88d..a084d4b14b71 100644
--- a/setup_native/source/packinfo/packinfo_office_lang.txt
+++ b/setup_native/source/packinfo/packinfo_office_lang.txt
@@ -39,11 +39,13 @@ module = "gid_Module_Langpack_Basis"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING"
-provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING"
+provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING,libreofficepoweredbycibbasis6.4-%LANGUAGESTRING"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-%LANGUAGESTRING"
+linuxincompat = "libreofficepoweredbycibbasis6.4-%LANGUAGESTRING"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -57,9 +59,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-fonts"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-fonts"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Language fonts module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -73,9 +75,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-res"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-res"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Language resource module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -89,9 +91,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-writer"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-writer"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Writer language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -105,9 +107,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-calc"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-calc"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Calc language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -121,9 +123,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-impress"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-impress"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Impress language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -137,9 +139,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-draw"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-draw"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Draw language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -153,9 +155,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-math"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-math"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Math language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -169,9 +171,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-base"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-base"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Base language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
@@ -185,9 +187,9 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-%LANGUAGESTRING"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-onlineupd"
provides = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING-onlineupd"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-%LANGUAGESTRING %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Online update language module for %PRODUCTNAME %PRODUCTVERSION, language %LANGUAGESTRING"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
diff --git a/setup_native/source/packinfo/packinfo_sdkoo.txt b/setup_native/source/packinfo/packinfo_sdkoo.txt
index 4d148fb11c4d..d193b238c361 100644
--- a/setup_native/source/packinfo/packinfo_sdkoo.txt
+++ b/setup_native/source/packinfo/packinfo_sdkoo.txt
@@ -23,9 +23,11 @@ solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWbtool
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-sdk"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2020 The Document Foundation"
+linuxreplaces = "libreofficepoweredbycibbasis6.4-sdk"
+linuxincompat = "libreofficepoweredbycibbasis6.4-sdk"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "Software Development Kit for LibreOffice %PRODUCTVERSION"
destpath = "/opt"
packageversion = "%PACKAGEVERSION"
diff --git a/setup_native/source/packinfo/packinfo_ure.txt b/setup_native/source/packinfo/packinfo_ure.txt
index 66e8c66f3326..4fccbb70754c 100644
--- a/setup_native/source/packinfo/packinfo_ure.txt
+++ b/setup_native/source/packinfo/packinfo_ure.txt
@@ -21,12 +21,12 @@ module = "gid_Module_Root"
solarispackagename = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
solarisrequires = "SUNWzlibr"
solarisprovides = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs, libreofficepoweredbycib6.4-ure"
+linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs, libreofficepoweredbycib6.4-ure"
packagename = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "UNO Runtime Environment"
destpath = "/opt"
packageversion = "%UREPACKAGEVERSION"
@@ -37,12 +37,12 @@ module = "gid_Module_Root_Ure_Hidden"
solarispackagename = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
solarisrequires = "SUNWzlibr"
solarisprovides = "%SOLSUREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
-linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs"
+linuxreplaces = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs, libreofficepoweredbycib6.4-ure"
+linuxincompat = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-stdlibs, libreofficepoweredbycib6.4-ure"
packagename = "%UREPACKAGEPREFIX%BRANDPACKAGEVERSION-ure"
-copyright = "2020 The Document Foundation"
+copyright = "2022 CIB software GmbH"
solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
+vendor = "CIB software GmbH"
description = "UNO Runtime Environment"
destpath = "/opt"
packageversion = "%UREPACKAGEVERSION"
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 8f386caaa283..bf1dbea7b3c3 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -69,6 +69,9 @@ $(eval $(call gb_Library_use_libraries,sfx,\
$(eval $(call gb_Library_use_externals,sfx,\
boost_headers \
+ icu_headers \
+ icui18n \
+ icuuc \
libxml2 \
orcus \
orcus-parser\
diff --git a/sfx2/qa/complex/sfx2/UndoManager.java b/sfx2/qa/complex/sfx2/UndoManager.java
index 7e438e852e71..02f4d3055346 100644
--- a/sfx2/qa/complex/sfx2/UndoManager.java
+++ b/sfx2/qa/complex/sfx2/UndoManager.java
@@ -224,7 +224,9 @@ public class UndoManager
};
events.replaceByName( "OnViewCreated", scriptDescriptor );
- // The below doesn't work: event notification is broken in m96, see https://bz.apache.org/ooo/show_bug.cgi?id=116313
+ // note: this may be prevented from working by setting
+ // Office::Common::Security::Scripting::AllowedDocumentEventURLs
+ // (checked in SfxEvents_Impl::isScriptURLAllowed())
m_callbackCalled = false;
m_currentDocument.getCurrentView().dispatch( ".uno:NewWindow" );
assertTrue( "triggering an event did not work as expected - basic script not called", m_callbackCalled );
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index c12eb098b37e..3b3ff6a77fcc 100644
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -119,10 +119,6 @@ interface Application
[
ExecMethod = MiscExec_Impl ;
]
- SID_Q_AND_A
- [
- ExecMethod = MiscExec_Impl ;
- ]
SID_DOCUMENTATION
[
ExecMethod = MiscExec_Impl ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index 2cd73b915bf7..06e3eea22f3d 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -4900,21 +4900,6 @@ SfxVoidItem SendFeedback SID_SEND_FEEDBACK
ToolBoxConfig = TRUE,
GroupId = SfxGroupId::Application;
]
-SfxVoidItem QuestionAnswers SID_Q_AND_A
-()
-[
- AutoUpdate = FALSE,
- FastCall = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
-
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- GroupId = SfxGroupId::Application;
-]
SfxVoidItem Documentation SID_DOCUMENTATION
()
[
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 9295718c37ab..96577e81f72d 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -228,14 +228,25 @@ namespace
SfxStringItem aURL(SID_FILE_NAME, ".component:Bibliography/View1");
SfxStringItem aRef(SID_REFERER, "private:user");
SfxStringItem aTarget(SID_TARGETNAME, "_blank");
- SfxViewFrame::Current()->GetDispatcher()->ExecuteList(SID_OPENDOC,
- SfxCallMode::ASYNCHRON, { &aURL, &aRef, &aTarget });
+ const SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ if ( pViewFrame )
+ pViewFrame->GetDispatcher()->ExecuteList(SID_OPENDOC,
+ SfxCallMode::ASYNCHRON, { &aURL, &aRef, &aTarget });
}
catch (const Exception &)
{
TOOLS_INFO_EXCEPTION( "sfx.appl", "trying to load bibliography database");
}
}
+ bool lcl_isSaveLocked(SfxObjectShell * pShell)
+ {
+ assert(pShell);
+ Reference<XModel> xModel = pShell->GetModel();
+ if (!xModel.is())
+ return false;
+ comphelper::NamedValueCollection aArgs(xModel->getArgs());
+ return aArgs.getOrDefault("LockSave", false);
+ }
}
/// Find the correct location of the document (CREDITS.fodt, etc.), and return
/// it in rURL if found.
@@ -524,7 +535,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
SfxRequest aReq( SID_SAVEDOC, SfxCallMode::SLOT, pObjSh->GetPool() );
- if ( pObjSh->IsModified() )
+ if ( pObjSh->IsModified() && !lcl_isSaveLocked(pObjSh) )
{
pObjSh->ExecuteSlot( aReq );
const SfxBoolItem *pItem = dynamic_cast<const SfxBoolItem*>( aReq.GetReturnValue() );
@@ -540,21 +551,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
case SID_SEND_FEEDBACK:
{
- OUString lang = Application::GetSettings().GetUILanguageTag().getLanguage();
- OUString sURL("https://libreoffice.cib.de/support_%1.html");
- sURL = sURL.replaceFirst("%1", lang);
- sfx2::openUriExternally(sURL, false);
- break;
- }
-
- case SID_Q_AND_A:
- {
- // Askbot has URL's normalized to languages, not locales
- // Get language from locale: ll or lll or ll-CC or lll-CC
-
- OUString sURL(officecfg::Office::Common::Menus::QA_URL::get() + //https://hub.libreoffice.org/forum/
- "?LOlocale=" + utl::ConfigManager::getUILocale());
- sfx2::openUriExternally(sURL, false);
+ sfx2::openUriExternally("https://www.cib.de/office", false);
break;
}
case SID_DOCUMENTATION:
@@ -1105,7 +1102,7 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
pObjSh;
pObjSh = SfxObjectShell::GetNext( *pObjSh ) )
{
- if ( pObjSh->IsModified() )
+ if ( pObjSh->IsModified() && !lcl_isSaveLocked(pObjSh) )
{
bModified = true;
break;
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index a7013fa6c530..97a8c2e43bc2 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -628,7 +628,7 @@ void SfxChildWindow::SetVisible_Impl( bool bVis )
void SfxChildWindow::Hide()
{
if (xController)
- xController->EndDialog();
+ xController->EndDialog(nCloseResponseToJustHide);
else
pWindow->Hide();
}
@@ -639,8 +639,21 @@ void SfxChildWindow::Show( ShowFlags nFlags )
{
if (!xController->getDialog()->get_visible())
{
- weld::DialogController::runAsync(xController,
- [this](sal_Int32 /*nResult*/){ xController->Close(); });
+ if (!xController->CloseOnHide())
+ {
+ // tdf#155708 - do not run a new (Async) validation window,
+ // because we already have one in sync mode, just show the running one
+ xController->getDialog()->show();
+ }
+ else
+ {
+ weld::DialogController::runAsync(xController,
+ [this](sal_Int32 nResult) {
+ if (nResult == nCloseResponseToJustHide)
+ return;
+ xController->Close();
+ });
+ }
}
}
else
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 98e036e0a7ea..b50d1e63c789 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/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 5feb326243fc..5fba0e02079f 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -1009,7 +1009,11 @@ void SfxWorkWindow::ShowChildren_Impl()
{
auto xController = pCli->xController;
weld::DialogController::runAsync(xController,
- [=](sal_Int32 /*nResult*/){ xController->Close(); });
+ [=](sal_Int32 nResult){
+ if (nResult == nCloseResponseToJustHide)
+ return;
+ xController->Close();
+ });
}
}
else
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx
index f9a11830e925..e4059d50c275 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -96,7 +96,6 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
get(mpHelpButton, "help");
//set an alternative help label that doesn't hotkey the H of the Help menu
mpHelpButton->SetText(get<Window>("althelplabel")->GetText());
- get(mpExtensionsButton, "extensions");
//Containers are invisible to cursor traversal
//So on pressing "right" when in Help the
@@ -111,12 +110,7 @@ BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
//of a group, i.e. allow it to be grouped with the preceding
//PushButton so when seen as a candidate by cursor travelling
//it will be accepted as a continuation of the group.
- WinBits nBits = mpExtensionsButton->GetStyle();
- nBits &= ~WB_GROUP;
- nBits |= WB_NOGROUP;
- mpExtensionsButton->SetStyle(nBits);
assert(mpHelpButton->GetStyle() & WB_GROUP);
- assert(!(mpExtensionsButton->GetStyle() & WB_GROUP));
get(mpAllButtonsBox, "all_buttons_box");
get(mpButtonsBox, "buttons_box");
@@ -188,7 +182,6 @@ void BackingWindow::dispose()
mpDBAllButton.clear();
mpMathAllButton.clear();
mpHelpButton.clear();
- mpExtensionsButton.clear();
mpAllButtonsBox.clear();
mpButtonsBox.clear();
mpSmallButtonsBox.clear();
@@ -258,8 +251,6 @@ void BackingWindow::initControls()
checkInstalledModules();
- mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, ExtLinkClickHdl));
-
// setup nice colors
mpCreateLabel->SetControlForeground(maButtonsTextColor);
vcl::Font aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
@@ -267,7 +258,6 @@ void BackingWindow::initControls()
mpCreateLabel->SetControlFont(aFont);
mpHelpButton->SetControlForeground(maButtonsTextColor);
- mpExtensionsButton->SetControlForeground(maButtonsTextColor);
const Color aButtonsBackground(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
@@ -498,46 +488,6 @@ void BackingWindow::Resize()
Invalidate();
}
-IMPL_LINK(BackingWindow, ExtLinkClickHdl, Button*, pButton, void)
-{
- OUString aNode;
-
- if (pButton == mpExtensionsButton)
- aNode = "AddFeatureURL";
-
- if (aNode.isEmpty())
- return;
-
- try
- {
- uno::Sequence<uno::Any> args(comphelper::InitAnyPropertySequence(
- {
- {"nodepath", uno::Any(OUString("/org.openoffice.Office.Common/Help/StartCenter"))}
- }));
-
- Reference<lang::XMultiServiceFactory> xConfig = configuration::theDefaultProvider::get( comphelper::getProcessComponentContext() );
- Reference<container::XNameAccess> xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS, args), UNO_QUERY);
- if (xNameAccess.is())
- {
- OUString sURL;
- Any value(xNameAccess->getByName(aNode));
-
- sURL = value.get<OUString>();
- localizeWebserviceURI(sURL);
-
- Reference<css::system::XSystemShellExecute> const
- xSystemShellExecute(
- css::system::SystemShellExecute::create(
- ::comphelper::getProcessComponentContext()));
- xSystemShellExecute->execute(sURL, OUString(),
- css::system::SystemShellExecuteFlags::URIS_ONLY);
- }
- }
- catch (const Exception&)
- {
- }
-}
-
IMPL_LINK( BackingWindow, ClickHdl, Button*, pButton, void )
{
// dispatch the appropriate URL and end the dialog
diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx
index a4a5803a4804..9f12d29d1efc 100644
--- a/sfx2/source/dialog/backingwindow.hxx
+++ b/sfx2/source/dialog/backingwindow.hxx
@@ -70,7 +70,6 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer
VclPtr<PushButton> mpMathAllButton;
VclPtr<PushButton> mpHelpButton;
- VclPtr<PushButton> mpExtensionsButton;
VclPtr<VclBox> mpAllButtonsBox;
VclPtr<VclBox> mpButtonsBox;
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 905d27fd3a3e..187a030fab4d 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -169,11 +169,11 @@ SfxModelessDialogController::~SfxModelessDialogController()
m_pBindings->SetActiveFrame(nullptr);
}
-void SfxDialogController::EndDialog()
+void SfxDialogController::EndDialog(int nResponse)
{
if (!m_xDialog->get_visible())
return;
- response(RET_CLOSE);
+ response(nResponse);
}
bool SfxModelessDialogController::IsClosing() const
@@ -181,7 +181,7 @@ bool SfxModelessDialogController::IsClosing() const
return m_xImpl->bClosing;
}
-void SfxModelessDialogController::EndDialog()
+void SfxModelessDialogController::EndDialog(int nResponse)
{
if (m_xImpl->bClosing)
return;
@@ -190,7 +190,7 @@ void SfxModelessDialogController::EndDialog()
// stack frame.
auto aHoldSelf = shared_from_this();
m_xImpl->bClosing = true;
- SfxDialogController::EndDialog();
+ SfxDialogController::EndDialog(nResponse);
if (!m_xImpl)
return;
m_xImpl->bClosing = false;
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index 3479fe72ad7d..b8d79f0b5a9c 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -13,6 +13,7 @@
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/processor2d/baseprocessor2d.hxx>
#include <drawinglayer/processor2d/processorfromoutputdevice.hxx>
+#include <officecfg/Office/UI/Infobar.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/infobar.hxx>
@@ -392,6 +393,9 @@ SfxInfoBarContainerWindow::appendInfoBar(const OUString& sId, const OUString& sP
const OUString& sSecondaryMessage, InfobarType ibType,
WinBits nMessageStyle, bool bShowCloseButton)
{
+ if (!isInfobarEnabled(sId))
+ return nullptr;
+
auto pInfoBar = VclPtr<SfxInfoBarWindow>::Create(this, sId, sPrimaryMessage, sSecondaryMessage,
ibType, nMessageStyle, bShowCloseButton);
@@ -437,6 +441,22 @@ void SfxInfoBarContainerWindow::removeInfoBar(VclPtr<SfxInfoBarWindow> const & p
m_pChildWin->Update();
}
+bool SfxInfoBarContainerWindow::isInfobarEnabled(const OUString& sId)
+{
+ if (sId == "readonly")
+ return officecfg::Office::UI::Infobar::Enabled::Readonly::get();
+ if (sId == "signature")
+ return officecfg::Office::UI::Infobar::Enabled::Signature::get();
+ if (sId == "donate")
+ return officecfg::Office::UI::Infobar::Enabled::Donate::get();
+ if (sId == "getinvolved")
+ return officecfg::Office::UI::Infobar::Enabled::GetInvolved::get();
+ if (sId == "hyphenationmissing")
+ return officecfg::Office::UI::Infobar::Enabled::HyphenationMissing::get();
+
+ return true;
+}
+
void SfxInfoBarContainerWindow::Resize()
{
long nWidth = GetSizePixel().getWidth();
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5d00d39bd837..5c4116f2308e 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -51,6 +51,7 @@
#include <com/sun/star/ucb/CommandFailedException.hpp>
#include <com/sun/star/ucb/CommandAbortedException.hpp>
#include <com/sun/star/ucb/InteractiveLockingLockedException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkReadException.hpp>
#include <com/sun/star/ucb/InteractiveNetworkWriteException.hpp>
#include <com/sun/star/ucb/Lock.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
@@ -1125,6 +1126,37 @@ namespace
}
}
+namespace
+{
+
+// for LOCK request, suppress dialog on 403, typically indicates read-only
+// document and there's a 2nd dialog prompting to open a copy anyway
+class LockInteractionHandler : public ::cppu::WeakImplHelper<task::XInteractionHandler>
+{
+private:
+ uno::Reference<task::XInteractionHandler> m_xHandler;
+
+public:
+ explicit LockInteractionHandler(uno::Reference<task::XInteractionHandler> const& xHandler)
+ : m_xHandler(xHandler)
+ {
+ }
+
+ virtual void SAL_CALL handle(uno::Reference<task::XInteractionRequest> const& xRequest) override
+ {
+ ucb::InteractiveNetworkWriteException readException;
+ ucb::InteractiveNetworkReadException writeException;
+ if ((xRequest->getRequest() >>= readException)
+ || (xRequest->getRequest() >>= writeException))
+ {
+ return; // 403 gets reported as one of these; ignore to avoid dialog
+ }
+ m_xHandler->handle(xRequest);
+ }
+};
+
+} // namespace
+
#endif // HAVE_FEATURE_MULTIUSER_ENVIRONMENT
// sets SID_DOC_READONLY if the document cannot be opened for editing
@@ -1172,6 +1204,13 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
if( !bResult )
{
uno::Reference< task::XInteractionHandler > xCHandler = GetInteractionHandler( true );
+ // Dialog with error is superfluous:
+ // on loading, will result in read-only with infobar.
+ // bNoUI case for Reload failing, will open dialog later.
+ if (bLoading || bNoUI)
+ {
+ xCHandler = new LockInteractionHandler(xCHandler);
+ }
Reference< css::ucb::XCommandEnvironment > xComEnv = new ::ucbhelper::CommandEnvironment(
xCHandler, Reference< css::ucb::XProgressHandler >() );
@@ -3635,6 +3674,9 @@ OUString GetLogicBase(std::unique_ptr<SfxMedium_Impl> const & pImpl)
// permission only to create the specifically named output file in that directory.
#if !HAVE_FEATURE_MACOSX_SANDBOX
+ if (!officecfg::Office::Common::Misc::TempFileNextToLocalFile::get())
+ return aLogicBase;
+
if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream)
{
// Try to create the temp file in the same directory when storing.
@@ -4215,17 +4257,18 @@ OUString SfxMedium::SwitchDocumentToTempFile()
{}
}
+ if (bWasReadonly)
+ {
+ // set the readonly state back
+ pImpl->m_nStorOpenMode = SFX_STREAM_READONLY;
+ GetItemSet()->Put(SfxBoolItem(SID_DOC_READONLY, true));
+ }
+
if ( aResult.isEmpty() )
{
Close();
SetPhysicalName_Impl( OUString() );
SetName( aOrigURL );
- if ( bWasReadonly )
- {
- // set the readonly state back
- pImpl->m_nStorOpenMode = SFX_STREAM_READONLY;
- GetItemSet()->Put( SfxBoolItem(SID_DOC_READONLY, true));
- }
GetMedium_Impl();
pImpl->xStorage = xStorage;
}
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 2fa7b968fc41..8a617b1785c6 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -404,8 +404,12 @@ namespace sfx2
return bHasMacros;
}
+ bool DocumentMacroMode::hasMacros() const
+ {
+ return m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading();
+ }
- bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
+ bool DocumentMacroMode::checkMacrosOnLoading( const Reference< XInteractionHandler >& rxInteraction, bool bHasValidContentSignature, bool bHasMacros )
{
bool bAllow = false;
if ( SvtSecurityOptions().IsMacroDisabled() )
@@ -415,7 +419,7 @@ namespace sfx2
}
else
{
- if (m_xData->m_rDocumentAccess.documentStorageHasMacros() || hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading())
+ if (bHasMacros)
{
if (m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading())
m_bNeedsContentSigned = true;
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8b1271545dfb..23c2defd92d8 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -38,12 +38,16 @@
#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>
+#include <eventsupplier.hxx>
using namespace ::com::sun::star;
@@ -159,38 +163,67 @@ 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.IsExoticProtocol())
+ {
+ SAL_WARN("sfx", "IFrameObject::load ignoring: " << aTargetURL.Complete);
+ 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/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 7d5cdb5cb21c..2d4b6ef5229e 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -28,6 +28,7 @@
#include <sfx2/app.hxx>
#include <objshimp.hxx>
#include <sfx2/event.hxx>
+#include <sfx2/sfxbasemodel.hxx>
#include <comphelper/fileformat.h>
#include <svtools/embedtransfer.hxx>
@@ -118,8 +119,14 @@ void SfxObjectShell::SetVisArea( const tools::Rectangle & rVisArea )
pImpl->m_aVisArea = rVisArea;
if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED )
{
- if ( IsEnableSetModified() )
+ if (IsEnableSetModified()
+ // Base forms use EMBEDDED but they actually live in their own
+ // frame - resizing that shouldn't set it to modified.
+ && pImpl->pBaseModel
+ && pImpl->pBaseModel->getIdentifier() != "com.sun.star.sdb.FormDesign")
+ {
SetModified();
+ }
SfxGetpApp()->NotifyEvent(SfxEventHint( SfxEventHintId::VisAreaChanged, GlobalEventConfig::GetEventName(GlobalEventId::VISAREACHANGED), this));
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 4afaf1cc5d7b..9ff78bff6eea 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -87,6 +87,8 @@
#include <comphelper/interaction.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/documentconstants.hxx>
+#include <comphelper/namedvaluecollection.hxx>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/signaturestate.hxx>
#include <sfx2/app.hxx>
@@ -113,6 +115,7 @@
#include <workwin.hxx>
#include <sfx2/sfxdlg.hxx>
#include <sfx2/infobar.hxx>
+#include <sfx2/sfxbasemodel.hxx>
#include <appbaslib.hxx>
#include <openflag.hxx>
#include "objstor.hxx"
@@ -259,7 +262,12 @@ void SfxObjectShell::EnableSetModified( bool bEnable )
bool SfxObjectShell::IsEnableSetModified() const
{
- return pImpl->m_bEnableSetModified && !IsReadOnly();
+ // tdf#146547 read-only does not prevent modified, instead try to prevent
+ // setting "internal" documents that may be displayed in some dialog but
+ // which the user didn't load or activate to modified.
+ return pImpl->m_bEnableSetModified && !IsPreview()
+ && eCreateMode != SfxObjectCreateMode::ORGANIZER
+ && eCreateMode != SfxObjectCreateMode::INTERNAL;
}
@@ -521,9 +529,16 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave )
{
// TODO/LATER: currently the application guards against the reentrance problem
SetModified(); // the modified flag has to be set to let the document be stored with the shared flag
- const SfxPoolItem* pItem = pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : SID_SAVEASDOC );
- const SfxBoolItem* pResult = dynamic_cast<const SfxBoolItem*>( pItem );
- bResult = ( pResult && pResult->GetValue() );
+ try
+ {
+ // Do *not* use dispatch mechanism in this place - we don't want others (extensions etc.) to intercept this.
+ pImpl->pBaseModel->store();
+ bResult = true;
+ }
+ catch (...)
+ {
+ bResult = false;
+ }
}
}
@@ -957,9 +972,42 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl()
// check macro security
const bool bHasValidContentSignature = HasValidSignatures();
- pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature );
+ const bool bHasMacros = pImpl->aMacroMode.hasMacros();
+ pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, bHasValidContentSignature, bHasMacros );
+ pImpl->m_bHadCheckedMacrosOnLoad = bHasMacros;
+}
+
+bool SfxObjectShell::GetHadCheckedMacrosOnLoad() const
+{
+ return pImpl->m_bHadCheckedMacrosOnLoad;
}
+bool SfxObjectShell::AllowedLinkProtocolFromDocument(const OUString& rUrl, SfxObjectShell* pObjShell, weld::Window* pDialogParent)
+{
+ if (!INetURLObject(rUrl).IsExoticProtocol())
+ return true;
+ // Default to ignoring exotic protocols
+ bool bAllow = false;
+ if (pObjShell)
+ {
+ // If the document had macros when loaded then follow the allowed macro-mode
+ if (pObjShell->GetHadCheckedMacrosOnLoad())
+ bAllow = pObjShell->AdjustMacroMode();
+ else // otherwise ask the user, defaulting to cancel
+ {
+ //Reuse URITools::onOpenURI warning string
+ std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(pDialogParent,
+ VclMessageType::Warning, VclButtonsType::YesNo,
+ SfxResId(STR_DANGEROUS_TO_OPEN)));
+ xQueryBox->set_primary_text(xQueryBox->get_primary_text().replaceFirst("$(ARG1)",
+ INetURLObject::decode(rUrl, INetURLObject::DecodeMechanism::Unambiguous)));
+ xQueryBox->set_default_response(RET_NO);
+ bAllow = xQueryBox->run() == RET_YES;
+ }
+ }
+ SAL_WARN_IF(!bAllow, "sfx.appl", "SfxObjectShell::AllowedLinkProtocolFromDocument ignoring: " << rUrl);
+ return bAllow;
+}
void SfxObjectShell::CheckEncryption_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
{
@@ -1888,4 +1936,13 @@ bool SfxObjectShell::IsContinueImportOnFilterExceptions(const OUString& aErrMess
return mbContinueImportOnFilterExceptions == yes;
}
+bool SfxObjectShell::isEditDocLocked()
+{
+ Reference<XModel> xModel = GetModel();
+ if (!xModel.is())
+ return false;
+ comphelper::NamedValueCollection aArgs(xModel->getArgs());
+ return aArgs.getOrDefault("LockEditDoc", false);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 6d7b3f99ee69..b232a286900d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -984,6 +984,39 @@ bool SfxObjectShell::DoSave()
pImpl->bIsSaving = true;
+ if (IsOwnStorageFormat(*GetMedium()))
+ {
+ SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012;
+ if (!utl::ConfigManager::IsFuzzing())
+ {
+ SvtSaveOptions aSaveOpt;
+ nDefVersion = aSaveOpt.GetODFSaneDefaultVersion();
+ }
+ uno::Reference<beans::XPropertySet> const xProps(GetMedium()->GetStorage(), uno::UNO_QUERY);
+ assert(xProps.is());
+ if (nDefVersion >= SvtSaveOptions::ODFSVER_012) // property exists only since ODF 1.2
+ {
+ try // tdf#134582 set Version on embedded objects as they
+ { // could have been loaded with a different/old version
+#if 0
+// not on old branch
+ if (SvtSaveOptions::ODFSVER_013 <= nDefVersion)
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_013_TEXT));
+ }
+ else
+#endif
+ {
+ xProps->setPropertyValue("Version", uno::makeAny<OUString>(ODFVER_012_TEXT));
+ }
+ }
+ catch (uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("sfx.doc", "SfxObjectShell::DoSave");
+ }
+ }
+ }
+
uno::Sequence< beans::NamedValue > aEncryptionData;
if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
{
@@ -3590,7 +3623,9 @@ void SfxObjectShell::SetMacroCallsSeenWhileLoading()
bool SfxObjectShell::GetMacroCallsSeenWhileLoading() const
{
- return pImpl->m_bMacroCallsSeenWhileLoading;
+ if (officecfg::Office::Common::Security::Scripting::CheckDocumentEvents::get())
+ return pImpl->m_bMacroCallsSeenWhileLoading;
+ return false;
}
bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< task::XInteractionHandler >& xHandler )
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 510c35daf59f..ecac02074ea2 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -237,6 +237,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,m_bAllowShareControlFileClean( true )
,m_bConfigOptionsChecked( false )
,m_bMacroCallsSeenWhileLoading( false )
+ ,m_bHadCheckedMacrosOnLoad( false )
,lErr(ERRCODE_NONE)
,nEventId ( SfxEventHintId::NONE )
,nLoadedFlags ( SfxLoadedFlags::ALL )
@@ -589,7 +590,13 @@ bool SfxObjectShell::PrepareClose
{
// Save by each Dispatcher
const SfxPoolItem *pPoolItem;
- if ( IsSaveVersionOnClose() )
+ if (IsReadOnly())
+ {
+ SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
+ const SfxPoolItem* ppArgs[] = { &aWarnItem, nullptr };
+ pPoolItem = pFrame->GetBindings().ExecuteSynchron(SID_SAVEASDOC, ppArgs);
+ }
+ else if (IsSaveVersionOnClose())
{
SfxStringItem aItem( SID_DOCINFO_COMMENTS, SfxResId(STR_AUTOMATICVERSION) );
SfxBoolItem aWarnItem( SID_FAIL_ON_WARNING, bUI );
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index 42936e53fe99..263c20b58e26 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -711,6 +711,15 @@ void SAL_CALL SfxPrintHelper::print(const uno::Sequence< beans::PropertyValue >&
aCheckedArgs[nProps++].Value <<= bTemp;
}
+ else if ( rProp.Name == "JobName" )
+ {
+ OUString sTemp;
+ if( !(rProp.Value >>= sTemp) )
+ throw css::lang::IllegalArgumentException();
+ aCheckedArgs[nProps].Name = rProp.Name;
+ aCheckedArgs[nProps++].Value <<= sTemp;
+ }
+
// Pages-Property
else if ( rProp.Name == "Pages" )
{
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 90c8c4dda017..5940792599a5 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -161,7 +161,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window *pParent)
, mxMoveButton(m_xBuilder->weld_button("move_btn"))
, mxExportButton(m_xBuilder->weld_button("export_btn"))
, mxImportButton(m_xBuilder->weld_button("import_btn"))
- , mxLinkButton(m_xBuilder->weld_button("online_link"))
, mxCBXHideDlg(m_xBuilder->weld_check_button("hidedialogcb"))
, mxActionBar(m_xBuilder->weld_menu_button("action_menu"))
, mxSearchView(new TemplateSearchView(m_xBuilder->weld_scrolled_window("scrollsearch"),
@@ -214,7 +213,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(weld::Window *pParent)
mxMoveButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, MoveClickHdl));
mxExportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ExportClickHdl));
mxImportButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, ImportClickHdl));
- mxLinkButton->connect_clicked(LINK(this, SfxTemplateManagerDlg, LinkClickHdl));
mxSearchFilter->connect_changed(LINK(this, SfxTemplateManagerDlg, SearchUpdateHdl));
mxSearchFilter->connect_focus_in(LINK( this, SfxTemplateManagerDlg, GetFocusHdl ));
@@ -1360,7 +1358,6 @@ SfxTemplateSelectionDlg::SfxTemplateSelectionDlg(weld::Window* pParent)
mxCBApp->set_sensitive(false);
mxActionBar->hide();
- mxLinkButton->hide();
mxMoveButton->hide();
mxExportButton->hide();
mxCBXHideDlg->show();
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index be6421416939..d24345dba1c5 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -86,6 +86,9 @@ public:
::comphelper::NamedValueCollection& o_normalizedDescriptor,
SfxObjectShell* i_document );
static void Execute( css::uno::Any const & aEventData, const css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
+
+ /// Check if script URL whitelist exists, and if so, if current script url is part of it
+ static bool isScriptURLAllowed(const OUString& aScriptURL);
};
#endif
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/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 3d7b0b69c945..4afdd706d05e 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -91,7 +91,8 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
m_bSharedXMLFlag:1, // whether the document should be edited in shared mode
m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file
m_bConfigOptionsChecked:1, // whether or not the user options are checked after the Options dialog is closed.
- m_bMacroCallsSeenWhileLoading:1; // whether or not the user options are checked after the Options dialog is closed.
+ m_bMacroCallsSeenWhileLoading:1, // whether or not macro calls were seen when loading document.
+ m_bHadCheckedMacrosOnLoad:1; // if document contained macros (or calls) when loaded
IndexBitSet aBitSet;
ErrCode lErr;
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index e21130d6022c..12bf1ce828e5 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/util/URL.hpp>
#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/uno/XInterface.hpp>
@@ -39,6 +40,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/sequence.hxx>
+#include <officecfg/Office/Common.hxx>
#include <eventsupplier.hxx>
#include <sfx2/app.hxx>
@@ -49,6 +51,10 @@
#include <sfx2/frame.hxx>
#include <macroloader.hxx>
+#include <unicode/errorcode.h>
+#include <unicode/regex.h>
+#include <unicode/unistr.h>
+
using namespace css;
using namespace ::com::sun::star;
@@ -178,6 +184,31 @@ namespace
}
}
+bool SfxEvents_Impl::isScriptURLAllowed(const OUString& aScriptURL)
+{
+ boost::optional<css::uno::Sequence<OUString>> allowedEvents(
+ officecfg::Office::Common::Security::Scripting::AllowedDocumentEventURLs::get());
+ // When AllowedDocumentEventURLs is empty, all event URLs are allowed
+ if (!allowedEvents)
+ return true;
+
+ icu::ErrorCode status;
+ const uint32_t rMatcherFlags = UREGEX_CASE_INSENSITIVE;
+ icu::UnicodeString usInput(aScriptURL.getStr());
+ const css::uno::Sequence<OUString>& rAllowedEvents = *allowedEvents;
+ for (auto const& allowedEvent : rAllowedEvents)
+ {
+ icu::UnicodeString usRegex(allowedEvent.getStr());
+ icu::RegexMatcher rmatch1(usRegex, usInput, rMatcherFlags, status);
+ if (aScriptURL.startsWith(allowedEvent) || rmatch1.matches(status))
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
{
uno::Sequence < beans::PropertyValue > aProperties;
@@ -216,6 +247,9 @@ void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::Docum
if (aScript.isEmpty())
return;
+ if (!isScriptURLAllowed(aScript))
+ return;
+
if (!pDoc)
pDoc = SfxObjectShell::Current();
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 6161967f7920..21bef3138456 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -630,10 +630,13 @@ void SidebarController::OpenThenToggleDeck (
SwitchToDeck(rsDeckId);
// Make sure the sidebar is wide enough to fit the requested content
- sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth())
- * mpTabBar->GetDPIScaleFactor();
- if (mnSavedSidebarWidth < nRequestedWidth)
- SetChildWindowWidth(nRequestedWidth);
+ if (mpCurrentDeck && mpTabBar)
+ {
+ sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth())
+ * mpTabBar->GetDPIScaleFactor();
+ if (mnSavedSidebarWidth < nRequestedWidth)
+ SetChildWindowWidth(nRequestedWidth);
+ }
collectUIInformation(rsDeckId);
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 23e318fa761c..bbfb37e5291d 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>
@@ -307,8 +308,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
if( !pSh || !pSh->HasName() || !(pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ))
break;
- SfxViewShell* pViewSh = GetViewShell();
- if (pViewSh && pViewSh->isEditDocLocked())
+ if (pSh->isEditDocLocked())
break;
// Only change read-only UI and remove info bar when we succeed
@@ -330,9 +330,12 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
m_pFrame->RemoveInfoBar("readonly");
if (m_pMed)
{
+ bool const isEnableSetModified(m_pSh->IsEnableSetModified());
+ m_pSh->EnableSetModified(false);
// tdf#116066: DoSaveCompleted should be called after SetReadOnlyUI
m_pSh->DoSaveCompleted(m_pMed);
m_pSh->Broadcast(SfxHint(SfxHintId::ModeChanged));
+ m_pSh->EnableSetModified(isEnableSetModified);
}
}
}
@@ -608,7 +611,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
}
}
- rReq.AppendItem( SfxBoolItem( SID_FORCERELOAD, bNeedsReload) );
+ rReq.AppendItem( SfxBoolItem(SID_FORCERELOAD,
+ rReq.GetSlot() == SID_EDITDOC || bNeedsReload) );
rReq.AppendItem( SfxBoolItem( SID_SILENT, true ));
[[fallthrough]]; //TODO ???
@@ -927,7 +931,7 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
const SfxShell *pFSh;
if ( !pSh->HasName() ||
!( pSh->Get_Impl()->nLoadedFlags & SfxLoadedFlags::MAINDOCUMENT ) ||
- (GetViewShell() && GetViewShell()->isEditDocLocked()) ||
+ (pSh->isEditDocLocked()) ||
( pSh->GetCreateMode() == SfxObjectCreateMode::EMBEDDED &&
( !(pVSh = pSh->GetViewShell()) ||
!(pFSh = pVSh->GetFormShell()) ||
@@ -1306,6 +1310,24 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
} //bShowTipOfTheDay
+ 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, false);
+ 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;
@@ -1331,7 +1353,7 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
bool showEditDocumentButton = true;
- if (m_xObjSh->GetViewShell() && m_xObjSh->GetViewShell()->isEditDocLocked())
+ if (m_xObjSh->isEditDocLocked())
showEditDocumentButton = false;
if (showEditDocumentButton)
@@ -1466,6 +1488,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/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index b67267a61b53..f9cd9c005c39 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -616,10 +616,14 @@ void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rPr
));
pImpl->m_xPrinterController = xNewController;
- SfxObjectShell *pObjShell = GetObjectShell();
- xNewController->setValue( "JobName",
- makeAny( pObjShell->GetTitle(1) ) );
- xNewController->setPrinterModified( mbPrinterSettingsModified );
+ // When no JobName was specified via com::sun::star::view::PrintOptions::JobName ,
+ // use the document title as default job name
+ css::beans::PropertyValue* pJobNameVal = xNewController->getValue("JobName");
+ if (!pJobNameVal)
+ {
+ xNewController->setValue("JobName", Any(GetObjectShell()->GetTitle(1)));
+ xNewController->setPrinterModified(mbPrinterSettingsModified);
+ }
}
void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rProps, bool bIsAPI, bool bIsDirect )
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 8a199623fa58..cb7925efa907 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -684,7 +684,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
#if HAVE_FEATURE_MACOSX_SANDBOX
rSet.DisableItem(nSID);
#endif
- if (isExportLocked() && nSID != SID_MAIL_SENDDOC)
+ if (isExportLocked())
rSet.DisableItem(nSID);
break;
}
@@ -1776,15 +1776,6 @@ bool SfxViewShell::isPrintLocked()
return aArgs.getOrDefault("LockPrint", false);
}
-bool SfxViewShell::isEditDocLocked()
-{
- Reference<XModel> xModel = GetCurrentDocument();
- if (!xModel.is())
- return false;
- comphelper::NamedValueCollection aArgs(xModel->getArgs());
- return aArgs.getOrDefault("LockEditDoc", false);
-}
-
bool SfxViewShell::isSaveLocked()
{
Reference<XModel> xModel = GetCurrentDocument();
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 4d2a328bd20d..2ece5a27b95f 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -449,22 +449,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="extensions">
- <property name="label" translatable="yes" context="startcenter|extensions">E_xtensions</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="relief">none</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index 4008332ca4a4..19a9abf74d3a 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -354,22 +354,6 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="online_link">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip_text" translatable="yes" context="templatedlg|online_link|tooltip_text">Browse online templates</property>
- <property name="image">image5</property>
- <property name="relief">none</property>
- <property name="always_show_image">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="hidedialogcb">
<property name="label" translatable="yes" context="templatedlg|hidedialogcb">Show this dialog at startup</property>
<property name="can_focus">True</property>
diff --git a/shell/source/backends/kf5be/kf5backend.cxx b/shell/source/backends/kf5be/kf5backend.cxx
index f55a5150bd3f..e6a349358e5f 100644
--- a/shell/source/backends/kf5be/kf5backend.cxx
+++ b/shell/source/backends/kf5be/kf5backend.cxx
@@ -19,6 +19,8 @@
#include <sal/config.h>
+#include <memory>
+
#include <QtWidgets/QApplication>
#include <boost/noncopyable.hpp>
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index c4170d2f9de5..8e8237dd12af 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -410,21 +410,32 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
}
}
pathname = o3tl::toU(path);
+ // ShellExecuteExW appears to ignore trailing dots, so remove them:
+ while (pathname.endsWith(".", &pathname)) {}
auto const n = pathname.lastIndexOf('.');
if (n > pathname.lastIndexOf('\\')) {
auto const ext = pathname.copy(n + 1);
- OUString env;
- if (osl_getEnvironment(OUString("PATHEXT").pData, &env.pData) != osl_Process_E_None)
- {
- SAL_INFO("shell", "osl_getEnvironment(PATHEXT) failed");
- }
- if (!(checkExtension(ext, env)
- && checkExtension(
- ext,
- ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CLASS;.JAR")))
- {
- throw css::lang::IllegalArgumentException(
- "XSystemShellExecute.execute, cannot process <" + aCommand + ">", {}, 0);
+ if (!ext.isEmpty()) {
+ OUString env;
+ if (osl_getEnvironment(OUString("PATHEXT").pData, &env.pData)
+ != osl_Process_E_None)
+ {
+ SAL_INFO("shell", "osl_getEnvironment(PATHEXT) failed");
+ }
+ if (!(checkExtension(ext, env)
+ && checkExtension(
+ ext,
+ ".ADE;.ADP;.APK;.APPLICATION;.APPX;.APPXBUNDLE;.BAT;.CAB;.CHM;.CLASS;"
+ ".CMD;.COM;.CPL;.DLL;.DMG;.EX;.EX_;.EXE;.GADGET;.HTA;.INF;.INS;.IPA;"
+ ".ISO;.ISP;.JAR;.JS;.JSE;.LIB;.LNK;.MDE;.MSC;.MSH;.MSH1;.MSH2;.MSHXML;"
+ ".MSH1XML;.MSH2XML;.MSI;.MSIX;.MSIXBUNDLE;.MSP;.MST;.NSH;.PIF;.PS1;"
+ ".PS1XML;.PS2;.PS2XML;.PSC1;.PSC2;.PY;.REG;.SCF;.SCR;.SCT;.SHB;.SYS;"
+ ".VB;.VBE;.VBS;.VXD;.WS;.WSC;.WSF;.WSH;")))
+ {
+ throw css::lang::IllegalArgumentException(
+ "XSystemShellExecute.execute, cannot process <" + aCommand + ">", {},
+ 0);
+ }
}
}
}
diff --git a/shell/source/win32/simplemail/senddoc.cxx b/shell/source/win32/simplemail/senddoc.cxx
index 3b57684fe821..e34412cbfae1 100644
--- a/shell/source/win32/simplemail/senddoc.cxx
+++ b/shell/source/win32/simplemail/senddoc.cxx
@@ -58,8 +58,8 @@ namespace /* private */
std::vector<std::wstring> gTo;
std::vector<std::wstring> gCc;
std::vector<std::wstring> gBcc;
- // Keep temp filepath and displayed name
- std::vector<std::pair<std::wstring, std::wstring>> gAttachments;
+ // Keep temp filepath, displayed name, and "do not delete" flag
+ std::vector<std::tuple<std::wstring, std::wstring, bool>> gAttachments;
int gMapiFlags = 0;
}
@@ -121,11 +121,12 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList)
{
OSL_ASSERT(pMapiAttachmentList->empty());
- for (const auto& attachment : gAttachments)
+ for (const auto& [filepath, attachname, nodelete] : gAttachments)
{
+ (void)nodelete;
MapiFileDescW mfd;
ZeroMemory(&mfd, sizeof(mfd));
- mfd.lpszPathName = const_cast<wchar_t*>(attachment.first.c_str());
+ mfd.lpszPathName = const_cast<wchar_t*>(filepath.c_str());
// MapiFileDesc documentation (https://msdn.microsoft.com/en-us/library/hh707272)
// allows using here either nullptr, or a pointer to empty string. However,
// for Outlook 2013, we cannot use nullptr here, and must point to a (possibly
@@ -134,7 +135,7 @@ static void initAttachmentList(MapiAttachmentList_t* pMapiAttachmentList)
// Since C++11, c_str() must return a pointer to single null character when the
// string is empty, so we are OK here in case when there's no explicit file name
// passed
- mfd.lpszFileName = const_cast<wchar_t*>(attachment.second.c_str());
+ mfd.lpszFileName = const_cast<wchar_t*>(attachname.c_str());
mfd.nPosition = sal::static_int_cast<ULONG>(-1);
pMapiAttachmentList->push_back(mfd);
}
@@ -239,7 +240,14 @@ static void initParameter(int argc, wchar_t* argv[])
sName = argv[i+3];
i += 2;
}
- gAttachments.emplace_back(sPath, sName);
+ // Also there may be --nodelete to keep the attachment on exit
+ bool nodelete = false;
+ if ((i + 2) < argc && _wcsicmp(argv[i+2], L"--nodelete") == 0)
+ {
+ nodelete = true;
+ ++i;
+ }
+ gAttachments.emplace_back(sPath, sName, nodelete);
}
else if (_wcsicmp(argv[i], L"--langtag") == 0)
gLangTag = o3tl::toU(argv[i+1]);
@@ -401,8 +409,12 @@ int wmain(int argc, wchar_t* argv[])
}
// Now cleanup the temporary attachment files
- for (const auto& rAttachment : gAttachments)
- DeleteFileW(rAttachment.first.c_str());
+ for (const auto& [filepath, attachname, nodelete] : gAttachments)
+ {
+ (void)attachname;
+ if (!nodelete)
+ DeleteFileW(filepath.c_str());
+ }
// Only show the error message if UI was requested
if ((ulRet != SUCCESS_SUCCESS) && (gMapiFlags & (MAPI_DIALOG | MAPI_LOGON_UI)))
@@ -434,11 +446,13 @@ int wmain(int argc, wchar_t* argv[])
for (const auto& address : gBcc)
oss << "--bcc " << address << std::endl;
- for (const auto& attachment : gAttachments)
+ for (const auto& [filepath, attachname, nodelete] : gAttachments)
{
- oss << "--attach " << attachment.first << std::endl;
- if (!attachment.second.empty())
- oss << "--attach-name " << attachment.second << std::endl;
+ oss << "--attach " << filepath << std::endl;
+ if (!attachname.empty())
+ oss << "--attach-name " << attachname << std::endl;
+ if (nodelete)
+ oss << "--nodelete" << std::endl;
}
if (gMapiFlags & MAPI_DIALOG)
diff --git a/shell/source/win32/simplemail/smplmailclient.cxx b/shell/source/win32/simplemail/smplmailclient.cxx
index 45331098b835..254de4bb49a0 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -193,7 +193,8 @@ const OUString& GetBaseTempDirURL()
}
}
-OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUString& sUserVisibleName)
+OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUString& sUserVisibleName,
+ bool& nodelete)
{
// We do two things here:
// 1. Make the attachment temporary filename to not contain any fancy characters possible in
@@ -207,11 +208,16 @@ OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUStrin
maAttachmentFiles.back()->EnableKillingFile();
INetURLObject aFilePathObj(maAttachmentFiles.back()->GetURL());
OUString sNewAttachmentURL = aFilePathObj.GetMainURL(INetURLObject::DecodeMechanism::NONE);
- if (osl::File::copy(sOrigAttachURL, sNewAttachmentURL) == osl::FileBase::RC::E_None)
+ OUString sCorrectedOrigAttachURL(sOrigAttachURL);
+ // Make sure to convert to URL, if a system path was passed to XSimpleMailMessage
+ // Ignore conversion error, in which case sCorrectedOrigAttachURL is unchanged
+ osl::FileBase::getFileURLFromSystemPath(sCorrectedOrigAttachURL, sCorrectedOrigAttachURL);
+ if (osl::File::copy(sCorrectedOrigAttachURL, sNewAttachmentURL) == osl::FileBase::RC::E_None)
{
- INetURLObject url(sOrigAttachURL, INetURLObject::EncodeMechanism::WasEncoded);
+ INetURLObject url(sCorrectedOrigAttachURL, INetURLObject::EncodeMechanism::WasEncoded);
sUserVisibleName = url.getName(INetURLObject::LAST_SEGMENT, true,
INetURLObject::DecodeMechanism::WithCharset);
+ nodelete = false;
}
else
{
@@ -220,6 +226,7 @@ OUString CSmplMailClient::CopyAttachment(const OUString& sOrigAttachURL, OUStrin
// is the absent attachment file anyway.
sNewAttachmentURL = sOrigAttachURL;
maAttachmentFiles.pop_back();
+ nodelete = true; // Do not delete a non-temporary in senddoc
}
return sNewAttachmentURL;
}
@@ -307,7 +314,8 @@ void CSmplMailClient::assembleCommandLine(
for (const auto& attachment : attachments)
{
OUString sDisplayName;
- OUString sTempFileURL(CopyAttachment(attachment, sDisplayName));
+ bool nodelete = false;
+ OUString sTempFileURL(CopyAttachment(attachment, sDisplayName, nodelete));
OUString sysPath;
osl::FileBase::RC err = osl::FileBase::getSystemPathFromFileURL(sTempFileURL, sysPath);
if (err != osl::FileBase::E_None)
@@ -323,6 +331,8 @@ void CSmplMailClient::assembleCommandLine(
rCommandArgs.push_back(ATTACH_NAME);
rCommandArgs.push_back(sDisplayName);
}
+ if (nodelete)
+ rCommandArgs.push_back("--nodelete");
}
if (!(aFlag & NO_USER_INTERFACE))
diff --git a/shell/source/win32/simplemail/smplmailclient.hxx b/shell/source/win32/simplemail/smplmailclient.hxx
index 5844e99147e5..6f71a1a2a715 100644
--- a/shell/source/win32/simplemail/smplmailclient.hxx
+++ b/shell/source/win32/simplemail/smplmailclient.hxx
@@ -38,7 +38,7 @@ public:
private:
void validateParameter(const css::uno::Reference<css::system::XSimpleMailMessage>& xSimpleMailMessage, sal_Int32 aFlag);
void assembleCommandLine(const css::uno::Reference<css::system::XSimpleMailMessage>& xSimpleMailMessage, sal_Int32 aFlag, std::vector<OUString>& rCommandArgs);
- OUString CopyAttachment(const OUString& sOrigAttachURL, OUString& sUserVisibleName);
+ OUString CopyAttachment(const OUString& sOrigAttachURL, OUString& sUserVisibleName, bool& nodelete);
// Don't try to delete the copied attachment files; let the spawned process cleanup them
void ReleaseAttachments();
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 753d4c963ca3..fd1e190ed427 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -3885,77 +3885,6 @@ dtrans/source/cnttype/mcnttype.cxx
dtrans/source/cnttype/mcnttype.hxx
dtrans/source/cnttype/mctfentry.cxx
dtrans/source/cnttype/wbench/testcnttype.cxx
-dtrans/source/generic/clipboardmanager.cxx
-dtrans/source/generic/clipboardmanager.hxx
-dtrans/source/generic/dtrans.cxx
-dtrans/source/generic/generic_clipboard.cxx
-dtrans/source/generic/generic_clipboard.hxx
-dtrans/source/inc/DtObjFactory.hxx
-dtrans/source/inc/WinClip.hxx
-dtrans/source/test/test_dtrans.cxx
-dtrans/source/win32/clipb/APNDataObject.hxx
-dtrans/source/win32/clipb/MtaOleClipb.cxx
-dtrans/source/win32/clipb/MtaOleClipb.hxx
-dtrans/source/win32/clipb/WinClipbImpl.cxx
-dtrans/source/win32/clipb/WinClipbImpl.hxx
-dtrans/source/win32/clipb/WinClipboard.cxx
-dtrans/source/win32/clipb/WinClipboard.hxx
-dtrans/source/win32/clipb/wcbentry.cxx
-dtrans/source/win32/dnd/dndentry.cxx
-dtrans/source/win32/dnd/globals.cxx
-dtrans/source/win32/dnd/globals.hxx
-dtrans/source/win32/dnd/idroptarget.cxx
-dtrans/source/win32/dnd/idroptarget.hxx
-dtrans/source/win32/dnd/source.cxx
-dtrans/source/win32/dnd/source.hxx
-dtrans/source/win32/dnd/sourcecontext.cxx
-dtrans/source/win32/dnd/sourcecontext.hxx
-dtrans/source/win32/dnd/target.cxx
-dtrans/source/win32/dnd/target.hxx
-dtrans/source/win32/dnd/targetdragcontext.cxx
-dtrans/source/win32/dnd/targetdragcontext.hxx
-dtrans/source/win32/dnd/targetdropcontext.cxx
-dtrans/source/win32/dnd/targetdropcontext.hxx
-dtrans/source/win32/dtobj/APNDataObject.cxx
-dtrans/source/win32/dtobj/APNDataObject.hxx
-dtrans/source/win32/dtobj/DOTransferable.cxx
-dtrans/source/win32/dtobj/DOTransferable.hxx
-dtrans/source/win32/dtobj/DTransHelper.cxx
-dtrans/source/win32/dtobj/DTransHelper.hxx
-dtrans/source/win32/dtobj/DataFmtTransl.cxx
-dtrans/source/win32/dtobj/DataFmtTransl.hxx
-dtrans/source/win32/dtobj/DtObjFactory.cxx
-dtrans/source/win32/dtobj/Fetc.cxx
-dtrans/source/win32/dtobj/Fetc.hxx
-dtrans/source/win32/dtobj/FetcList.cxx
-dtrans/source/win32/dtobj/FetcList.hxx
-dtrans/source/win32/dtobj/FmtFilter.cxx
-dtrans/source/win32/dtobj/FmtFilter.hxx
-dtrans/source/win32/dtobj/MimeAttrib.hxx
-dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
-dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
-dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
-dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
-dtrans/source/win32/dtobj/XTDataObject.cxx
-dtrans/source/win32/dtobj/XTDataObject.hxx
-dtrans/source/win32/ftransl/ftransl.cxx
-dtrans/source/win32/ftransl/ftransl.hxx
-dtrans/source/win32/ftransl/ftranslentry.cxx
-dtrans/source/win32/misc/ImplHelper.cxx
-dtrans/source/win32/misc/ImplHelper.hxx
-dtrans/source/win32/workbench/XTDo.cxx
-dtrans/source/win32/workbench/XTDo.hxx
-dtrans/source/win32/workbench/test_wincb.cxx
-dtrans/source/win32/workbench/testmarshal.cxx
-dtrans/test/win32/dnd/atlwindow.cxx
-dtrans/test/win32/dnd/atlwindow.hxx
-dtrans/test/win32/dnd/dndTest.cxx
-dtrans/test/win32/dnd/sourcelistener.cxx
-dtrans/test/win32/dnd/sourcelistener.hxx
-dtrans/test/win32/dnd/targetlistener.cxx
-dtrans/test/win32/dnd/targetlistener.hxx
-dtrans/test/win32/dnd/transferable.cxx
-dtrans/test/win32/dnd/transferable.hxx
editeng/inc/editattr.hxx
editeng/inc/editdoc.hxx
editeng/inc/editeng.hxx
@@ -6387,6 +6316,7 @@ include/o3tl/runtimetooustring.hxx
include/o3tl/safeint.hxx
include/o3tl/sorted_vector.hxx
include/o3tl/span.hxx
+include/o3tl/string_view.hxx
include/o3tl/strong_int.hxx
include/o3tl/typed_flags_set.hxx
include/o3tl/vector_pool.hxx
@@ -8615,6 +8545,7 @@ o3tl/qa/test-lru_map.cxx
o3tl/qa/test-safeint.cxx
o3tl/qa/test-sorted_vector.cxx
o3tl/qa/test-span.cxx
+o3tl/qa/test-string_view.cxx
o3tl/qa/test-typed_flags.cxx
o3tl/qa/test-vector_pool.cxx
odk/examples/DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp/addon.cxx
@@ -14833,6 +14764,7 @@ sw/qa/extras/docbookexport/docbookexport.cxx
sw/qa/extras/globalfilter/globalfilter.cxx
sw/qa/extras/htmlexport/htmlexport.cxx
sw/qa/extras/htmlimport/htmlimport.cxx
+sw/qa/extras/layout/layout.cxx
sw/qa/extras/mailmerge/mailmerge.cxx
sw/qa/extras/odfexport/odfexport.cxx
sw/qa/extras/odfimport/odfimport.cxx
@@ -16720,6 +16652,41 @@ ucb/source/ucp/tdoc/tdoc_storage.cxx
ucb/source/ucp/tdoc/tdoc_storage.hxx
ucb/source/ucp/tdoc/tdoc_uri.cxx
ucb/source/ucp/tdoc/tdoc_uri.hxx
+ucb/source/ucp/webdav-curl/ContentProperties.cxx
+ucb/source/ucp/webdav-curl/ContentProperties.hxx
+ucb/source/ucp/webdav-curl/DAVAuthListener.hxx
+ucb/source/ucp/webdav-curl/DAVAuthListenerImpl.hxx
+ucb/source/ucp/webdav-curl/DAVException.hxx
+ucb/source/ucp/webdav-curl/DAVProperties.cxx
+ucb/source/ucp/webdav-curl/DAVProperties.hxx
+ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx
+ucb/source/ucp/webdav-curl/DAVResource.hxx
+ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
+ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
+ucb/source/ucp/webdav-curl/DAVSession.hxx
+ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
+ucb/source/ucp/webdav-curl/DAVTypes.cxx
+ucb/source/ucp/webdav-curl/DAVTypes.hxx
+ucb/source/ucp/webdav-curl/DateTimeHelper.cxx
+ucb/source/ucp/webdav-curl/DateTimeHelper.hxx
+ucb/source/ucp/webdav-curl/PropertyMap.hxx
+ucb/source/ucp/webdav-curl/PropfindCache.cxx
+ucb/source/ucp/webdav-curl/PropfindCache.hxx
+ucb/source/ucp/webdav-curl/SerfLockStore.cxx
+ucb/source/ucp/webdav-curl/SerfLockStore.hxx
+ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
+ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
+ucb/source/ucp/webdav-curl/webdavcontent.cxx
+ucb/source/ucp/webdav-curl/webdavcontent.hxx
+ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
+ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
+ucb/source/ucp/webdav-curl/webdavdatasupplier.hxx
+ucb/source/ucp/webdav-curl/webdavprovider.cxx
+ucb/source/ucp/webdav-curl/webdavprovider.hxx
+ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
+ucb/source/ucp/webdav-curl/webdavresultset.cxx
+ucb/source/ucp/webdav-curl/webdavresultset.hxx
+ucb/source/ucp/webdav-curl/webdavservices.cxx
ucb/source/ucp/webdav-neon/ContentProperties.cxx
ucb/source/ucp/webdav-neon/ContentProperties.hxx
ucb/source/ucp/webdav-neon/DAVAuthListener.hxx
@@ -18131,6 +18098,57 @@ vcl/win/app/salinfo.cxx
vcl/win/app/salinst.cxx
vcl/win/app/salshl.cxx
vcl/win/app/saltimer.cxx
+vcl/win/dtrans/APNDataObject.cxx
+vcl/win/dtrans/APNDataObject.hxx
+vcl/win/dtrans/clipboardmanager.cxx
+vcl/win/dtrans/clipboardmanager.hxx
+vcl/win/dtrans/DataFmtTransl.cxx
+vcl/win/dtrans/DataFmtTransl.hxx
+vcl/win/dtrans/dndentry.cxx
+vcl/win/dtrans/DOTransferable.cxx
+vcl/win/dtrans/DOTransferable.hxx
+vcl/win/dtrans/DtObjFactory.cxx
+vcl/win/dtrans/DtObjFactory.hxx
+vcl/win/dtrans/dtrans.cxx
+vcl/win/dtrans/DTransHelper.cxx
+vcl/win/dtrans/DTransHelper.hxx
+vcl/win/dtrans/Fetc.cxx
+vcl/win/dtrans/Fetc.hxx
+vcl/win/dtrans/FetcList.cxx
+vcl/win/dtrans/FetcList.hxx
+vcl/win/dtrans/FmtFilter.cxx
+vcl/win/dtrans/FmtFilter.hxx
+vcl/win/dtrans/ftransl.cxx
+vcl/win/dtrans/ftranslentry.cxx
+vcl/win/dtrans/ftransl.hxx
+vcl/win/dtrans/generic_clipboard.cxx
+vcl/win/dtrans/generic_clipboard.hxx
+vcl/win/dtrans/globals.cxx
+vcl/win/dtrans/globals.hxx
+vcl/win/dtrans/idroptarget.cxx
+vcl/win/dtrans/idroptarget.hxx
+vcl/win/dtrans/ImplHelper.cxx
+vcl/win/dtrans/ImplHelper.hxx
+vcl/win/dtrans/MimeAttrib.hxx
+vcl/win/dtrans/MtaOleClipb.cxx
+vcl/win/dtrans/MtaOleClipb.hxx
+vcl/win/dtrans/sourcecontext.cxx
+vcl/win/dtrans/sourcecontext.hxx
+vcl/win/dtrans/source.cxx
+vcl/win/dtrans/source.hxx
+vcl/win/dtrans/target.cxx
+vcl/win/dtrans/targetdragcontext.cxx
+vcl/win/dtrans/targetdragcontext.hxx
+vcl/win/dtrans/targetdropcontext.cxx
+vcl/win/dtrans/targetdropcontext.hxx
+vcl/win/dtrans/target.hxx
+vcl/win/dtrans/TxtCnvtHlp.cxx
+vcl/win/dtrans/TxtCnvtHlp.hxx
+vcl/win/dtrans/wcbentry.cxx
+vcl/win/dtrans/XNotifyingDataObject.cxx
+vcl/win/dtrans/XNotifyingDataObject.hxx
+vcl/win/dtrans/XTDataObject.cxx
+vcl/win/dtrans/XTDataObject.hxx
vcl/win/gdi/DWriteTextRenderer.cxx
vcl/win/gdi/gdiimpl.cxx
vcl/win/gdi/gdiimpl.hxx
@@ -18152,6 +18170,7 @@ vcl/workben/bmpfuzzer.cxx
vcl/workben/cgmfuzzer.cxx
vcl/workben/commonfuzzer.hxx
vcl/workben/docxfuzzer.cxx
+vcl/workben/dtrans/test_dtrans.cxx
vcl/workben/dxffuzzer.cxx
vcl/workben/epsfuzzer.cxx
vcl/workben/fftester.cxx
@@ -18205,6 +18224,19 @@ vcl/workben/svptest.cxx
vcl/workben/tgafuzzer.cxx
vcl/workben/tiffuzzer.cxx
vcl/workben/vcldemo.cxx
+vcl/workben/win/dnd/atlwindow.cxx
+vcl/workben/win/dnd/atlwindow.hxx
+vcl/workben/win/dnd/dndTest.cxx
+vcl/workben/win/dnd/sourcelistener.cxx
+vcl/workben/win/dnd/sourcelistener.hxx
+vcl/workben/win/dnd/targetlistener.cxx
+vcl/workben/win/dnd/targetlistener.hxx
+vcl/workben/win/dnd/transferable.cxx
+vcl/workben/win/dnd/transferable.hxx
+vcl/workben/win/dtrans/testmarshal.cxx
+vcl/workben/win/dtrans/test_wincb.cxx
+vcl/workben/win/dtrans/XTDo.cxx
+vcl/workben/win/dtrans/XTDo.hxx
vcl/workben/wmffuzzer.cxx
vcl/workben/ww2fuzzer.cxx
vcl/workben/ww6fuzzer.cxx
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index c5f7d8f4ae16..6b23c264b816 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -69,10 +69,11 @@
"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": "external/tarballs",
+ "dest-filename": "pdfium-4643.tar.bz2"
},
{
"url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz",
@@ -255,10 +256,11 @@
"dest-filename": "external/tarballs/language-subtag-registry-2020-04-01.tar.bz2"
},
{
- "url": "https://dev-www.libreoffice.org/src/liblangtag-0.6.2.tar.bz2",
- "sha256": "d6242790324f1432fb0a6fae71b6851f520b2c5a87675497cf8ea14c2924d52e",
+ "url": "https://dev-www.libreoffice.org/src/liblangtag-0.6.3.tar.bz2",
+ "sha256": "1f12a20a02ec3a8d22e54dedb8b683a43c9c160bda1ba337bf1060607ae733bd",
"type": "file",
- "dest-filename": "external/tarballs/liblangtag-0.6.2.tar.bz2"
+ "dest": "external/tarballs",
+ "dest-filename": "liblangtag-0.6.3.tar.bz2"
},
{
"url": "https://dev-www.libreoffice.org/src/libmspub-0.1.4.tar.xz",
@@ -267,16 +269,16 @@
"dest-filename": "external/tarballs/libmspub-0.1.4.tar.xz"
},
{
- "url": "https://dev-www.libreoffice.org/src/libmwaw-0.3.15.tar.xz",
- "sha256": "0440bb09f05e3419423d8dfa36ee847056ebfd837f9cbc091fdb5b057daab0b1",
+ "url": "https://dev-www.libreoffice.org/src/libmwaw-0.3.16.tar.xz",
+ "sha256": "0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868",
"type": "file",
- "dest-filename": "external/tarballs/libmwaw-0.3.15.tar.xz"
+ "dest-filename": "external/tarballs/libmwaw-0.3.16.tar.xz"
},
{
- "url": "https://dev-www.libreoffice.org/src/libodfgen-0.1.6.tar.bz2",
- "sha256": "2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2",
+ "url": "https://dev-www.libreoffice.org/src/libodfgen-0.1.8.tar.xz",
+ "sha256": "55200027fd46623b9bdddd38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625",
"type": "file",
- "dest-filename": "external/tarballs/libodfgen-0.1.6.tar.bz2"
+ "dest-filename": "external/tarballs/libodfgen-0.1.8.tar.xz"
},
{
"url": "https://dev-www.libreoffice.org/src/libpagemaker-0.0.4.tar.xz",
@@ -471,12 +473,6 @@
"dest-filename": "external/tarballs/beeca87be45ec87d241ddd0e1bad80c1-bsh-2.0b6-src.zip"
},
{
- "url": "https://dev-www.libreoffice.org/src/commons-logging-1.2-src.tar.gz",
- "sha256": "49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81",
- "type": "file",
- "dest-filename": "external/tarballs/commons-logging-1.2-src.tar.gz"
- },
- {
"url": "https://dev-www.libreoffice.org/src/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip",
"sha256": "233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd",
"type": "file",
diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk
index 3b4478f23154..ceb389ec47db 100644
--- a/solenv/gbuild/partial_build.mk
+++ b/solenv/gbuild/partial_build.mk
@@ -28,9 +28,7 @@ BUILDDIR := $(if $(wildcard $(gb_partial_build__makefile_dir)../Module_external.
$(gb_partial_build__makefile_dir)..)
endif
-ifeq ($(BUILD_TYPE),)
include $(BUILDDIR)/config_$(gb_Side).mk
-endif
gb_PARTIAL_BUILD := T
include $(SRCDIR)/solenv/gbuild/gbuild.mk
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 712a61df544f..c976652d6ecd 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -62,7 +62,7 @@ gb_CFLAGS_COMMON := \
-Wstrict-prototypes \
-Wundef \
-Wunreachable-code \
- $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \
+ $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),$(findstring sccache,$(CC))),,-Wunused-macros) \
-finput-charset=UTF-8 \
-fmessage-length=0 \
-fno-common \
@@ -77,7 +77,7 @@ gb_CXXFLAGS_COMMON := \
-Wextra \
-Wundef \
-Wunreachable-code \
- $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \
+ $(if $(or $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CXX)),$(findstring icecc,$(CCACHE_PREFIX)))),$(findstring sccache,$(CXX))),,-Wunused-macros) \
-finput-charset=UTF-8 \
-fmessage-length=0 \
-fno-common \
@@ -205,8 +205,12 @@ gb_DEBUGINFO_FLAGS=-g2
endif
gb_LINKER_DEBUGINFO_FLAGS=
+# GCC 11 defaults to -gdwarf-5, which GDB 10 doesn't support in split debug info
ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE)
gb_DEBUGINFO_FLAGS+=-gsplit-dwarf
+ifeq ($(COM_IS_CLANG),)
+gb_DEBUGINFO_FLAGS+=-gdwarf-4
+endif
endif
ifeq ($(ENABLE_GDB_INDEX),TRUE)
diff --git a/solenv/gdb/boost/util/printing.py b/solenv/gdb/boost/util/printing.py
index 1d5d0bac9fc6..4088f3a3fa3b 100644
--- a/solenv/gdb/boost/util/printing.py
+++ b/solenv/gdb/boost/util/printing.py
@@ -19,7 +19,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from collections import Mapping
+from collections.abc import Mapping
import gdb
import re
import six
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/solenv/gdb/libreoffice/util/printing.py b/solenv/gdb/libreoffice/util/printing.py
index 9cbae3080a64..7ce29899355a 100644
--- a/solenv/gdb/libreoffice/util/printing.py
+++ b/solenv/gdb/libreoffice/util/printing.py
@@ -7,7 +7,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-from collections import Mapping
+from collections.abc import Mapping
import gdb
import re
import six
diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx
index ef0214ba61c3..20260dc42782 100644
--- a/sot/source/unoolestorage/xolesimplestorage.hxx
+++ b/sot/source/unoolestorage/xolesimplestorage.hxx
@@ -22,12 +22,16 @@
#include <sal/config.h>
+#include <memory>
+
#include <com/sun/star/embed/XOLESimpleStorage.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <cppuhelper/implbase.hxx>
#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/starmath/CppunitTest_starmath_qa_cppunit.mk b/starmath/CppunitTest_starmath_qa_cppunit.mk
index ee436749f95a..41e65c499010 100644
--- a/starmath/CppunitTest_starmath_qa_cppunit.mk
+++ b/starmath/CppunitTest_starmath_qa_cppunit.mk
@@ -76,15 +76,9 @@ $(eval $(call gb_CppunitTest_use_components,starmath_qa_cppunit,\
ucb/source/core/ucb1 \
ucb/source/ucp/file/ucpfile1 \
unotools/util/utl \
+ vcl/vcl.common \
))
-ifeq ($(strip $(OS)),WNT)
-$(eval $(call gb_CppunitTest_use_components,starmath_qa_cppunit,\
- dtrans/util/ftransl \
- dtrans/util/sysdtrans \
-))
-endif
-
$(eval $(call gb_CppunitTest_use_configuration,starmath_qa_cppunit))
# vim: set noet sw=4 ts=4:
diff --git a/starmath/inc/token.hxx b/starmath/inc/token.hxx
index 8abe85e61858..45538077da73 100644
--- a/starmath/inc/token.hxx
+++ b/starmath/inc/token.hxx
@@ -23,6 +23,8 @@
#include <rtl/ustring.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <memory>
+
// TokenGroups
enum class TG {
NONE = 0x000000,
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 080e7a274c4d..b85b5ceef37a 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -57,6 +57,7 @@ void Test::setUp()
SmGlobals::ensure();
xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
+ xDocShRef->DoInitNew();
}
void Test::tearDown()
diff --git a/starmath/qa/cppunit/test_node.cxx b/starmath/qa/cppunit/test_node.cxx
index dba0b9ff3c40..570cab00d062 100644
--- a/starmath/qa/cppunit/test_node.cxx
+++ b/starmath/qa/cppunit/test_node.cxx
@@ -53,6 +53,7 @@ void NodeTest::setUp()
mxDocShell = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT |
SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
+ mxDocShell->DoInitNew();
}
void NodeTest::tearDown()
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index c3172ab60126..e738351a8d23 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -90,6 +90,7 @@ void Test::setUp()
SmGlobals::ensure();
xDocShRef = new SmDocShell(SfxModelFlags::EMBEDDED_OBJECT);
+ xDocShRef->DoInitNew();
}
void Test::tearDown()
diff --git a/starmath/qa/extras/mmlexport-test.cxx b/starmath/qa/extras/mmlexport-test.cxx
index 737885d5f73e..c3a2fc5afca0 100644
--- a/starmath/qa/extras/mmlexport-test.cxx
+++ b/starmath/qa/extras/mmlexport-test.cxx
@@ -91,6 +91,7 @@ xmlDocPtr MathMLExportTest::exportAndParse()
void MathMLExportTest::testBlank()
{
+ mxDocShell->DoInitNew();
mxDocShell->SetText("x`y~~z");
xmlDocPtr pDoc = exportAndParse();
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[1]", "width", "0.5em");
@@ -99,6 +100,7 @@ void MathMLExportTest::testBlank()
void MathMLExportTest::testTdf97049()
{
+ mxDocShell->DoInitNew();
mxDocShell->SetText("intd {{1 over x} dx}");
xmlDocPtr pDoc = exportAndParse();
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]", "stretchy", "true");
@@ -111,6 +113,7 @@ void MathMLExportTest::testTdf101022()
{
#define CHECK_MATHVARIANT(capital, small) do \
{ \
+ mxDocShell->DoInitNew(); \
mxDocShell->SetText("%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} " \
"%gamma %igamma {ital %gamma} {nitalic %igamma}"); \
xmlDocPtr pDoc = exportAndParse(); \
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index d96300bf785b..2de7e0ec0664 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -997,10 +997,10 @@ bool SmTextForwarder::IsValid() const
return pEditEngine && pEditEngine->GetUpdateMode();
}
-OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor )
+OUString SmTextForwarder::CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle )
{
EditEngine *pEditEngine = rEditAcc.GetEditEngine();
- return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor) : OUString();
+ return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle) : OUString();
}
void SmTextForwarder::FieldClicked(const SvxFieldItem&)
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 8dcf6a011a18..8ee26f1948d7 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -197,7 +197,7 @@ public:
virtual SfxItemPool* GetPool() const override;
- virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor ) override;
+ virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, boost::optional<FontLineStyle>& rpFldLineStyle ) override;
virtual void FieldClicked(const SvxFieldItem&) override;
virtual bool IsValid() const override;
diff --git a/starmath/uiconfig/smath/menubar/menubar.xml b/starmath/uiconfig/smath/menubar/menubar.xml
index f1dbdf8745a9..e2484f3c8f59 100644
--- a/starmath/uiconfig/smath/menubar/menubar.xml
+++ b/starmath/uiconfig/smath/menubar/menubar.xml
@@ -155,7 +155,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index 5a3f0271c40d..1b882bb89deb 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -2097,8 +2097,12 @@ bool Signing::Verify(const std::vector<unsigned char>& aData,
aDerCert[i] = pCertificate->derCert.data[i];
OUStringBuffer aBuffer;
comphelper::Base64::encode(aBuffer, aDerCert);
- rInformation.ouX509Certificate = aBuffer.makeStringAndClear();
- rInformation.ouSubject = OUString(pCertificate->subjectName, PL_strlen(pCertificate->subjectName), RTL_TEXTENCODING_UTF8);
+ SignatureInformation::X509Data temp;
+ temp.emplace_back();
+ temp.back().X509Certificate = aBuffer.makeStringAndClear();
+ temp.back().X509Subject = OUString(pCertificate->subjectName, PL_strlen(pCertificate->subjectName), RTL_TEXTENCODING_UTF8);
+ rInformation.X509Datas.clear();
+ rInformation.X509Datas.emplace_back(temp);
}
PRTime nSigningTime;
@@ -2277,8 +2281,12 @@ bool Signing::Verify(const std::vector<unsigned char>& aData,
aDerCert[i] = pSignerCertContext->pbCertEncoded[i];
OUStringBuffer aBuffer;
comphelper::Base64::encode(aBuffer, aDerCert);
- rInformation.ouX509Certificate = aBuffer.makeStringAndClear();
- rInformation.ouSubject = GetSubjectName(pSignerCertContext);
+ SignatureInformation::X509Data temp;
+ temp.emplace_back();
+ temp.back().X509Certificate = aBuffer.makeStringAndClear();
+ temp.back().X509Subject = GetSubjectName(pSignerCertContext);
+ rInformation.X509Datas.clear();
+ rInformation.X509Datas.emplace_back(temp);
}
if (bNonDetached)
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index b166c66b38d1..0655272ca0a8 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3140,6 +3140,14 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
return sString.makeStringAndClear();
}
+bool SvNumberFormatter::IsUserDefinedAndNotOverloaded(sal_uInt32 F_Index) const
+{
+ ::osl::MutexGuard aGuard( GetInstanceMutex() );
+ const SvNumberformat* pFormat = GetFormatEntry(F_Index);
+
+ return pFormat && (pFormat->GetType() & SvNumFormatType::DEFINED);
+}
+
bool SvNumberFormatter::IsUserDefined(const OUString& sStr,
LanguageType eLnge)
{
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 02947cd3892c..380188ef495c 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"
@@ -182,15 +184,18 @@ PassMap StorageItem::getInfo()
Sequence< OUString > aNodeNames = ConfigItem::GetNodeNames( "Store" );
sal_Int32 aNodeCount = aNodeNames.getLength();
- Sequence< OUString > aPropNames( aNodeCount );
+ Sequence< OUString > aPropNames( aNodeCount * 2);
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() != aNodeCount )
+ if( aPropertyValues.getLength() != aNodeCount * 2)
{
OSL_FAIL( "Problems during reading" );
return aResult;
@@ -206,14 +211,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 ) );
@@ -259,18 +266,37 @@ 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;
+ }
-bool StorageItem::getEncodedMP( OUString& aResult )
+ sal_Int32 nResult = 0;
+ aPropertyValues[0] >>= nResult;
+
+ 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 );
@@ -282,30 +308,37 @@ bool StorageItem::getEncodedMP( OUString& aResult )
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;
}
@@ -341,11 +374,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 );
@@ -406,7 +441,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() )
{
@@ -421,9 +456,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 )
{
@@ -456,7 +498,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() )
{
@@ -473,9 +515,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 )
{
@@ -543,7 +592,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 )
{
@@ -576,7 +625,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& )
@@ -621,6 +671,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 )
{
@@ -628,7 +691,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
@@ -800,6 +867,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 )
{
@@ -809,10 +888,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() )
{
@@ -834,11 +913,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;
@@ -995,7 +1078,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() )
@@ -1012,12 +1096,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() )
{
@@ -1042,6 +1126,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() );
@@ -1079,8 +1170,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 )
@@ -1099,7 +1190,8 @@ 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 ( const auto& rURL : aPersistent )
@@ -1124,7 +1216,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
}
}
@@ -1135,8 +1227,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 )
@@ -1183,8 +1275,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 )
@@ -1201,7 +1293,7 @@ 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 ( const auto& rURL : aPersistent )
@@ -1225,8 +1317,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 09fb7e03629d..4e3a6629139e 100644
--- a/svl/source/passwordcontainer/passwordcontainer.hxx
+++ b/svl/source/passwordcontainer/passwordcontainer.hxx
@@ -33,6 +33,7 @@
#include <unotools/configitem.hxx>
#include <ucbhelper/interactionrequest.hxx>
+#include <rtl/random.h>
#include <rtl/ref.hxx>
#include <osl/mutex.hxx>
@@ -51,11 +52,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 )
@@ -63,7 +65,10 @@ class NamePassRecord
m_bHasPersPass = bHasPersistentList;
if ( bHasPersistentList )
+ {
m_aPersPass = aPersistentList;
+ m_aPersistentIV = aPersistentIV;
+ }
}
public:
@@ -75,11 +80,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 )
{
}
@@ -88,7 +94,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 )
@@ -99,7 +106,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;
}
@@ -135,15 +144,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;
}
@@ -158,6 +176,7 @@ public:
{
m_bHasPersPass = false;
m_aPersPass.clear();
+ m_aPersistentIV.clear();
}
}
@@ -167,6 +186,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;
@@ -177,6 +200,7 @@ private:
PasswordContainer* mainCont;
bool hasEncoded;
OUString mEncoded;
+ OUString mEncodedIV;
virtual void ImplCommit() override;
@@ -195,8 +219,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();
@@ -217,6 +243,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,
@@ -267,10 +316,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/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index bfbc2e21593b..b3724f87ee00 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -175,11 +175,13 @@ bool DavDetailsContainer::verifyScheme( const OUString& rScheme )
{
bValid = true;
m_pDialog->m_xCBDavs->set_active(false);
+ ToggledDavsHdl(*m_pDialog->m_xCBDavs);
}
else if ( rScheme == "https://" )
{
bValid = true;
m_pDialog->m_xCBDavs->set_active(true);
+ ToggledDavsHdl(*m_pDialog->m_xCBDavs);
}
return bValid;
}
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index 67f5a87862ad..563ef0f76755 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -1058,6 +1058,7 @@ HtmlTokenId HTMLParser::GetNextToken_()
sTmpBuffer.appendUtf32( nNextCh );
nNextCh = GetNextChar();
} while( '>' != nNextCh && '/' != nNextCh && !rtl::isAsciiWhiteSpace( nNextCh ) &&
+ !linguistic::IsControlChar(nNextCh) &&
IsParserWorking() && !rInput.eof() );
if( !sTmpBuffer.isEmpty() )
@@ -1135,8 +1136,11 @@ HtmlTokenId HTMLParser::GetNextToken_()
if( !bDone )
sTmpBuffer.appendUtf32(nNextCh);
}
- else
+ else if (!linguistic::IsControlChar(nNextCh)
+ || nNextCh == '\r' || nNextCh == '\n' || nNextCh == '\t')
+ {
sTmpBuffer.appendUtf32(nNextCh);
+ }
if( !bDone )
nNextCh = GetNextChar();
}
diff --git a/svx/source/accessibility/AccessibleEmptyEditSource.cxx b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
index c39bbc26b6ac..31ec00293bd8 100644
--- a/svx/source/accessibility/AccessibleEmptyEditSource.cxx
+++ b/svx/source/accessibility/AccessibleEmptyEditSource.cxx
@@ -120,7 +120,7 @@ namespace accessibility
//XTextCopy
void CopyText(const SvxTextForwarder& ) override {}
- OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_Int32 /*nPos*/, boost::optional<Color>& /*rpTxtColor*/, boost::optional<Color>& /*rpFldColor*/ ) override
+ OUString CalcFieldValue( const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_Int32 /*nPos*/, boost::optional<Color>& /*rpTxtColor*/, boost::optional<Color>& /*rpFldColor*/, boost::optional<FontLineStyle>& /*rpFldLineStyle*/ ) override
{
return OUString();
}
diff --git a/svx/source/dialog/ClassificationEditView.cxx b/svx/source/dialog/ClassificationEditView.cxx
index bc2266626c35..646b4a75b4a2 100644
--- a/svx/source/dialog/ClassificationEditView.cxx
+++ b/svx/source/dialog/ClassificationEditView.cxx
@@ -30,7 +30,8 @@ ClassificationEditEngine::ClassificationEditEngine(SfxItemPool* pItemPool)
{}
OUString ClassificationEditEngine::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 /*nPara*/,
- sal_Int32 /*nPos*/, boost::optional<Color>& /*rTxtColor*/, boost::optional<Color>& /*rFldColor*/)
+ sal_Int32 /*nPos*/, boost::optional<Color>& /*rTxtColor*/, boost::optional<Color>& /*rFldColor*/,
+ boost::optional<FontLineStyle>& /*rFldLineStyle*/)
{
OUString aString;
const ClassificationField* pClassificationField = dynamic_cast<const ClassificationField*>(rField.GetField());
diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx
index a9054153da31..5303ed99973d 100644
--- a/svx/source/dialog/SafeModeDialog.cxx
+++ b/svx/source/dialog/SafeModeDialog.cxx
@@ -15,6 +15,8 @@
#include <sfx2/safemode.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
+#include <vcl/settings.hxx>
+#include <i18nlangtag/languagetag.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/ZipPackageHelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
@@ -89,9 +91,7 @@ SafeModeDialog::SafeModeDialog(weld::Window* pParent)
RadioBtnHdl(*mxRadioRestore);
// Set URL for help button (module=safemode)
- OUString sURL("http://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
- "&LOlocale=" + utl::ConfigManager::getUILocale() + "&LOmodule=safemode");
- mxBugLink->set_uri(sURL);
+ mxBugLink->set_uri("https://www.cib.de/office");
mxUserProfileLink->set_uri(comphelper::BackupFileHelper::getUserProfileURL());
}
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx
index 85801277c27c..d09fde9b1882 100644
--- a/svx/source/dialog/crashreportdlg.cxx
+++ b/svx/source/dialog/crashreportdlg.cxx
@@ -29,7 +29,6 @@ CrashReportDialog::CrashReportDialog(weld::Window* pParent)
, mxBtnClose(m_xBuilder->weld_button("btn_close"))
, mxEditPreUpload(m_xBuilder->weld_label("ed_pre"))
, mxEditPostUpload(m_xBuilder->weld_text_view("ed_post"))
- , mxFtBugReport(m_xBuilder->weld_text_view("ed_bugreport"))
, mxCBSafeMode(m_xBuilder->weld_check_button("check_safemode"))
{
maSuccessMsg = mxEditPostUpload->get_text();
@@ -84,7 +83,6 @@ IMPL_LINK(CrashReportDialog, BtnHdl, weld::Button&, rBtn, void)
}
mxBtnClose->show();
- mxFtBugReport->show();
mxEditPostUpload->show();
mxBtnSend->set_sensitive(false);
mxBtnCancel->set_sensitive(false);
diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx
index f913cabac43f..8611eaf628b3 100644
--- a/svx/source/dialog/crashreportdlg.hxx
+++ b/svx/source/dialog/crashreportdlg.hxx
@@ -25,7 +25,6 @@ private:
std::unique_ptr<weld::Button> mxBtnClose;
std::unique_ptr<weld::Label> mxEditPreUpload;
std::unique_ptr<weld::TextView> mxEditPostUpload;
- std::unique_ptr<weld::TextView> mxFtBugReport;
std::unique_ptr<weld::CheckButton> mxCBSafeMode;
OUString maSuccessMsg;
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index d312d7ad5f49..10c84ca95222 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -1014,7 +1014,7 @@ void SvxFontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBack
rCTLFont.SetFillColor( rColor );
}
else
- bTransparent = TRUE;
+ bTransparent = true;
rFont.SetTransparent( bTransparent );
rCJKFont.SetTransparent( bTransparent );
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index c7de008f28d2..1ecdb73dd30d 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -236,7 +236,8 @@ public:
virtual OUString CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
boost::optional<Color>& rpTxtColor,
- boost::optional<Color>& rpFldColor) override;
+ boost::optional<Color>& rpFldColor,
+ boost::optional<FontLineStyle>& rpFldLineStyle) override;
virtual void FieldClicked(const SvxFieldItem&) override;
virtual bool IsValid() const override;
@@ -899,10 +900,12 @@ bool WeldTextForwarder::IsValid() const
OUString WeldTextForwarder::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara,
sal_Int32 nPos, boost::optional<Color>& rpTxtColor,
- boost::optional<Color>& rpFldColor)
+ boost::optional<Color>& rpFldColor,
+ boost::optional<FontLineStyle>& rpFldLineStyle)
{
EditEngine* pEditEngine = m_rEditAcc.GetEditEngine();
- return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor)
+ return pEditEngine ? pEditEngine->CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor,
+ rpFldLineStyle)
: OUString();
}
diff --git a/svx/source/form/fmview.cxx b/svx/source/form/fmview.cxx
index 6c089c44c98c..d360c4847481 100644
--- a/svx/source/form/fmview.cxx
+++ b/svx/source/form/fmview.cxx
@@ -58,12 +58,15 @@
#include <com/sun/star/beans/PropertyState.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
#include <vcl/svapp.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
+#include <com/sun/star/awt/XControl.hpp>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/stdtext.hxx>
#include <svx/fmglob.hxx>
#include <svx/sdrpagewindow.hxx>
#include <svx/sdrpaintwindow.hxx>
+#include <vcl/i18nhelp.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -511,6 +514,34 @@ bool FmFormView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
}
+ // tdf#139804 Allow selecting form controls with Alt-<Mnemonic>
+ if (rKeyCode.IsMod2() && rKeyCode.GetCode())
+ {
+ if (FmFormPage* pCurPage = GetCurPage())
+ {
+ for (size_t a = 0; a < pCurPage->GetObjCount(); ++a)
+ {
+ SdrObject* pObj = pCurPage->GetObj(a);
+ FmFormObj* pFormObject = FmFormObj::GetFormObject(pObj);
+ if (!pFormObject)
+ continue;
+
+ Reference<awt::XControl> xControl = pFormObject->GetUnoControl(*this, *pWin);
+ if (!xControl.is())
+ continue;
+ const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
+ VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xControl->getPeer());
+ if (rI18nHelper.MatchMnemonic(pWindow->GetText(), rKEvt.GetCharCode()))
+ {
+ pWindow->GrabFocus();
+ pWindow->KeyInput(rKEvt);
+ bDone = true;
+ break;
+ }
+ }
+ }
+ }
+
if ( !bDone )
bDone = E3dView::KeyInput(rKEvt,pWin);
return bDone;
diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx
index d15ba27dd9f9..db9498a726ad 100644
--- a/svx/source/sdr/contact/viewobjectcontact.cxx
+++ b/svx/source/sdr/contact/viewobjectcontact.cxx
@@ -38,6 +38,7 @@
#include <svx/svdoole2.hxx>
#include <sdr/contact/viewcontactofsdrole2obj.hxx>
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
+#include <sal/log.hxx>
using namespace com::sun::star;
@@ -461,10 +462,39 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::getPrimitive2
// (->View) that has then all needed information
const basegfx::B2DVector& ViewObjectContact::getGridOffset() const
{
- if(0.0 == maGridOffset.getX() && 0.0 == maGridOffset.getY() && GetObjectContact().supportsGridOffsets())
+ if (GetObjectContact().supportsGridOffsets())
{
- // create on-demand
- GetObjectContact().calculateGridOffsetForViewOjectContact(const_cast<ViewObjectContact*>(this)->maGridOffset, *this);
+ if (fabs(maGridOffset.getX()) > 1000.0)
+ {
+ // Huge offsets are a hint for error -> usually the conditions for
+ // calculation have changed. E.g. - I saw errors with +/-5740, that
+ // was in the environment of massive external UNO API using LO as
+ // target.
+ // If condtions for this calculation change, it is usually required to call
+ // - ViewObjectContact::resetGridOffset(), or
+ // - ObjectContact::resetAllGridOffsets() or
+ // - ScDrawView::resetGridOffsetsForAllSdrPageViews()
+ // as it is done e.g. when zoom changes (see ScDrawView::RecalcScale()).
+ // Theoretically these resets have to be done for any precondition
+ // changed that is used in the calculation of that value (see
+ // ScDrawView::calculateGridOffsetForSdrObject).
+ // This is not complete and would be hard to do so.
+ // Since it is just a buffered value and re-calculation is not
+ // expensive (linear O(n)) we can just reset suspicious values here.
+ // Hopefully - when that non-linear ViewTransformation problem for
+ // the calc-view gets solved one day - all this can be removed
+ // again. For now, let's just reset here and force re-calculation.
+ // Add a SAL_WARN to inform about this.
+ SAL_WARN("svx", "Suspicious GridOffset value resetted (!)");
+ const_cast<ViewObjectContact*>(this)->maGridOffset.setX(0.0);
+ const_cast<ViewObjectContact*>(this)->maGridOffset.setY(0.0);
+ }
+
+ if(0.0 == maGridOffset.getX() && 0.0 == maGridOffset.getY() && GetObjectContact().supportsGridOffsets())
+ {
+ // create on-demand
+ GetObjectContact().calculateGridOffsetForViewOjectContact(const_cast<ViewObjectContact*>(this)->maGridOffset, *this);
+ }
}
return maGridOffset;
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index bafc02dc27db..8e6ee447fb9c 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1014,14 +1014,19 @@ IMPL_LINK(SdrObjEditView, ImpOutlinerCalcFieldValueHdl, EditFieldInfo*, pFI, voi
{
boost::optional<Color> pTxtCol;
boost::optional<Color> pFldCol;
+ boost::optional<FontLineStyle> pFldLineStyle;
bOk = pTextObj->CalcFieldValue(pFI->GetField(), pFI->GetPara(), pFI->GetPos(), true,
- pTxtCol, pFldCol, rStr);
+ pTxtCol, pFldCol, pFldLineStyle, rStr);
if (bOk)
{
if (pTxtCol)
{
pFI->SetTextColor(*pTxtCol);
}
+ if (pFldLineStyle)
+ {
+ pFI->SetFontLineStyle(*pFldLineStyle);
+ }
if (pFldCol)
{
pFI->SetFieldColor(*pFldCol);
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index c992fadae228..b605afaa1dc7 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -545,8 +545,8 @@ basegfx::B2DPolyPolygon SdrMeasureObj::ImpCalcXPoly(const ImpMeasurePoly& rPol)
}
bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_uInt16 nPos,
- bool bEdit,
- boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor, OUString& rRet) const
+ bool bEdit, boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor,
+ boost::optional<FontLineStyle>& rpFldLineStyle, OUString& rRet) const
{
const SvxFieldData* pField=rField.GetField();
const SdrMeasureField* pMeasureField=dynamic_cast<const SdrMeasureField*>( pField );
@@ -558,7 +558,7 @@ bool SdrMeasureObj::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara,
}
return true;
} else {
- return SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rRet);
+ return SdrTextObj::CalcFieldValue(rField,nPara,nPos,bEdit,rpTxtColor,rpFldColor,rpFldLineStyle,rRet);
}
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 16617ecaf94f..91a016e9ac93 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -78,6 +78,7 @@
#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>
@@ -232,61 +233,61 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::notifyEvent( const document::EventObj
SolarMutexGuard aGuard;
// the code currently makes sense only in case there is no other client
- if ( mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName == "OnVisAreaChanged"
- && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this ) )
- {
- try
- {
- MapUnit aContainerMapUnit( MapUnit::Map100thMM );
- uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
- if ( xParentVis.is() )
- aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
+ if ( !(mpObj && mpObj->GetAspect() != embed::Aspects::MSOLE_ICON && aEvent.EventName == "OnVisAreaChanged"
+ && mpObj->GetObjRef().is() && mpObj->GetObjRef()->getClientSite() == uno::Reference< embed::XEmbeddedClient >( this )) )
+ return;
- MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) );
+ try
+ {
+ MapUnit aContainerMapUnit( MapUnit::Map100thMM );
+ uno::Reference< embed::XVisualObject > xParentVis( mpObj->GetParentXModel(), uno::UNO_QUERY );
+ if ( xParentVis.is() )
+ aContainerMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( xParentVis->getMapUnit( mpObj->GetAspect() ) );
- tools::Rectangle aVisArea;
- awt::Size aSz;
- try
- {
- aSz = mpObj->GetObjRef()->getVisualAreaSize( mpObj->GetAspect() );
- }
- catch( embed::NoVisualAreaSizeException& )
- {
- OSL_FAIL( "No visual area size!" );
- aSz.Width = 5000;
- aSz.Height = 5000;
- }
- catch( uno::Exception& )
- {
- OSL_FAIL( "Unexpected exception!" );
- aSz.Width = 5000;
- aSz.Height = 5000;
- }
+ MapUnit aObjMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpObj->GetObjRef()->getMapUnit( mpObj->GetAspect() ) );
- aVisArea.SetSize( Size( aSz.Width, aSz.Height ) );
- aVisArea = OutputDevice::LogicToLogic(aVisArea, MapMode(aObjMapUnit), MapMode(aContainerMapUnit));
- Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
- static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
- tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
-
- // react to the change if the difference is bigger than one pixel
- Size aPixelDiff =
- Application::GetDefaultDevice()->LogicToPixel(
- Size( aLogicRect.GetWidth() - aScaledSize.Width(),
- aLogicRect.GetHeight() - aScaledSize.Height() ),
- MapMode(aContainerMapUnit));
- if( aPixelDiff.Width() || aPixelDiff.Height() )
- {
- mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
- mpObj->BroadcastObjectChange();
- }
- else
- mpObj->ActionChanged();
+ tools::Rectangle aVisArea;
+ awt::Size aSz;
+ try
+ {
+ aSz = mpObj->GetObjRef()->getVisualAreaSize( mpObj->GetAspect() );
+ }
+ catch( embed::NoVisualAreaSizeException& )
+ {
+ OSL_FAIL( "No visual area size!" );
+ aSz.Width = 5000;
+ aSz.Height = 5000;
}
catch( uno::Exception& )
{
OSL_FAIL( "Unexpected exception!" );
+ aSz.Width = 5000;
+ aSz.Height = 5000;
}
+
+ aVisArea.SetSize( Size( aSz.Width, aSz.Height ) );
+ aVisArea = OutputDevice::LogicToLogic(aVisArea, MapMode(aObjMapUnit), MapMode(aContainerMapUnit));
+ Size aScaledSize( static_cast< long >( m_aScaleWidth * Fraction( aVisArea.GetWidth() ) ),
+ static_cast< long >( m_aScaleHeight * Fraction( aVisArea.GetHeight() ) ) );
+ tools::Rectangle aLogicRect( mpObj->GetLogicRect() );
+
+ // react to the change if the difference is bigger than one pixel
+ Size aPixelDiff =
+ Application::GetDefaultDevice()->LogicToPixel(
+ Size( aLogicRect.GetWidth() - aScaledSize.Width(),
+ aLogicRect.GetHeight() - aScaledSize.Height() ),
+ MapMode(aContainerMapUnit));
+ if( aPixelDiff.Width() || aPixelDiff.Height() )
+ {
+ mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aScaledSize ) );
+ mpObj->BroadcastObjectChange();
+ }
+ else
+ mpObj->ActionChanged();
+ }
+ catch( uno::Exception& )
+ {
+ OSL_FAIL( "Unexpected exception!" );
}
}
@@ -499,32 +500,32 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::changedPlacement( const awt::Rectangl
tools::Rectangle aNewLogicRect = Application::GetDefaultDevice()->PixelToLogic(aNewPixelRect, MapMode(aContainerMapUnit));
tools::Rectangle aLogicRect = impl_getScaledRect_nothrow();
- if ( aNewLogicRect != aLogicRect )
- {
- // the calculation of the object area has not changed the object size
- // it should be done here then
- //SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true );
-
- // new size of the object area without scaling
- Size aNewObjSize( long( aNewLogicRect.GetWidth() / m_aScaleWidth ),
- long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
+ if ( aNewLogicRect == aLogicRect )
+ return;
- // now remove scaling from new placement and keep this at the new object area
- aNewLogicRect.SetSize( aNewObjSize );
- // react to the change if the difference is bigger than one pixel
- Size aPixelDiff =
- Application::GetDefaultDevice()->LogicToPixel(
- Size( aLogicRect.GetWidth() - aNewObjSize.Width(),
- aLogicRect.GetHeight() - aNewObjSize.Height() ),
- MapMode(aContainerMapUnit));
- if( aPixelDiff.Width() || aPixelDiff.Height() )
- {
- mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
- mpObj->BroadcastObjectChange();
- }
- else
- mpObj->ActionChanged();
+ // the calculation of the object area has not changed the object size
+ // it should be done here then
+ //SfxBooleanFlagGuard aGuard( m_bResizeNoScale, true );
+
+ // new size of the object area without scaling
+ Size aNewObjSize( long( aNewLogicRect.GetWidth() / m_aScaleWidth ),
+ long( aNewLogicRect.GetHeight() / m_aScaleHeight ) );
+
+ // now remove scaling from new placement and keep this at the new object area
+ aNewLogicRect.SetSize( aNewObjSize );
+ // react to the change if the difference is bigger than one pixel
+ Size aPixelDiff =
+ Application::GetDefaultDevice()->LogicToPixel(
+ Size( aLogicRect.GetWidth() - aNewObjSize.Width(),
+ aLogicRect.GetHeight() - aNewObjSize.Height() ),
+ MapMode(aContainerMapUnit));
+ if( aPixelDiff.Width() || aPixelDiff.Height() )
+ {
+ mpObj->SetLogicRect( tools::Rectangle( aLogicRect.TopLeft(), aNewObjSize ) );
+ mpObj->BroadcastObjectChange();
}
+ else
+ mpObj->ActionChanged();
}
// XWindowSupplier
@@ -598,6 +599,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:
@@ -615,7 +645,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;
@@ -815,7 +845,7 @@ bool SdrOle2Obj::IsEmpty() const
return !mpImpl->mxObjRef.is();
}
-void SdrOle2Obj::Connect()
+void SdrOle2Obj::Connect(SvxOle2Shape* pCreator)
{
if( IsEmptyPresObj() )
return;
@@ -828,7 +858,7 @@ void SdrOle2Obj::Connect()
return;
}
- Connect_Impl();
+ Connect_Impl(pCreator);
AddListeners_Impl();
}
@@ -890,23 +920,23 @@ void SdrOle2Obj::BreakFileLink_Impl()
{
uno::Reference<document::XStorageBasedDocument> xDoc(getSdrModelFromSdrObject().getUnoModel(), uno::UNO_QUERY);
- if ( xDoc.is() )
+ if ( !xDoc.is() )
+ return;
+
+ uno::Reference< embed::XStorage > xStorage = xDoc->getDocumentStorage();
+ if ( !xStorage.is() )
+ return;
+
+ try
{
- uno::Reference< embed::XStorage > xStorage = xDoc->getDocumentStorage();
- if ( xStorage.is() )
- {
- try
- {
- uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY_THROW );
- xLinkSupport->breakLink( xStorage, mpImpl->aPersistName );
- DisconnectFileLink_Impl();
- mpImpl->maLinkURL.clear();
- }
- catch( css::uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::BreakFileLink_Impl()" );
- }
- }
+ uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY_THROW );
+ xLinkSupport->breakLink( xStorage, mpImpl->aPersistName );
+ DisconnectFileLink_Impl();
+ mpImpl->maLinkURL.clear();
+ }
+ catch( css::uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::BreakFileLink_Impl()" );
}
}
@@ -923,105 +953,143 @@ 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&)
- {
- TOOLS_WARN_EXCEPTION("svx", "SdrOle2Obj::CheckFileLink_Impl()");
- }
+ }
+ catch (const css::uno::Exception&)
+ {
+ TOOLS_WARN_EXCEPTION("svx", "SdrOle2Obj::CheckFileLink_Impl()");
}
}
-void SdrOle2Obj::Connect_Impl()
+void SdrOle2Obj::Connect_Impl(SvxOle2Shape* pCreator)
{
- if(!mpImpl->aPersistName.isEmpty() )
+ if(mpImpl->aPersistName.isEmpty() )
+ return;
+
+ try
{
- try
+ ::comphelper::IEmbeddedHelper* pPers(getSdrModelFromSdrObject().GetPersist());
+
+ if ( pPers )
{
- ::comphelper::IEmbeddedHelper* pPers(getSdrModelFromSdrObject().GetPersist());
+ comphelper::EmbeddedObjectContainer& rContainer = pPers->getEmbeddedObjectContainer();
- if ( pPers )
+ if ( !rContainer.HasEmbeddedObject( mpImpl->aPersistName )
+ || ( mpImpl->mxObjRef.is() && !rContainer.HasEmbeddedObject( mpImpl->mxObjRef.GetObject() ) ) )
{
- comphelper::EmbeddedObjectContainer& rContainer = pPers->getEmbeddedObjectContainer();
-
- if ( !rContainer.HasEmbeddedObject( mpImpl->aPersistName )
- || ( mpImpl->mxObjRef.is() && !rContainer.HasEmbeddedObject( mpImpl->mxObjRef.GetObject() ) ) )
- {
- // object not known to container document
- // No object -> disaster!
- DBG_ASSERT( mpImpl->mxObjRef.is(), "No object in connect!");
- if ( mpImpl->mxObjRef.is() )
- {
- // object came from the outside, now add it to the container
- OUString aTmp;
- rContainer.InsertEmbeddedObject( mpImpl->mxObjRef.GetObject(), aTmp );
- mpImpl->aPersistName = aTmp;
- }
- }
- else if ( !mpImpl->mxObjRef.is() )
+ // object not known to container document
+ // No object -> disaster!
+ DBG_ASSERT( mpImpl->mxObjRef.is(), "No object in connect!");
+ if ( mpImpl->mxObjRef.is() )
{
- mpImpl->mxObjRef.Assign( rContainer.GetEmbeddedObject( mpImpl->aPersistName ), mpImpl->mxObjRef.GetViewAspect() );
- mpImpl->mbTypeAsked = false;
+ // object came from the outside, now add it to the container
+ OUString aTmp;
+ rContainer.InsertEmbeddedObject( mpImpl->mxObjRef.GetObject(), aTmp );
+ mpImpl->aPersistName = aTmp;
}
+ }
+ else if ( !mpImpl->mxObjRef.is() )
+ {
+ mpImpl->mxObjRef.Assign( rContainer.GetEmbeddedObject( mpImpl->aPersistName ), mpImpl->mxObjRef.GetViewAspect() );
+ mpImpl->mbTypeAsked = false;
+ }
- if ( mpImpl->mxObjRef.GetObject().is() )
- {
- mpImpl->mxObjRef.AssignToContainer( &rContainer, mpImpl->aPersistName );
- mpImpl->mbConnected = true;
- mpImpl->mxObjRef.Lock();
- }
+ if ( mpImpl->mxObjRef.GetObject().is() )
+ {
+ mpImpl->mxObjRef.AssignToContainer( &rContainer, mpImpl->aPersistName );
+ mpImpl->mbConnected = true;
+ mpImpl->mxObjRef.Lock();
}
+ }
- if ( mpImpl->mxObjRef.is() )
+ if (pCreator)
+ {
+ OUString sFrameURL(pCreator->GetAndClearInitialFrameURL());
+ if (!sFrameURL.isEmpty() && svt::EmbeddedObjectRef::TryRunningState(mpImpl->mxObjRef.GetObject()))
{
- if ( !mpImpl->mxLightClient.is() )
- mpImpl->mxLightClient = new SdrLightEmbeddedClient_Impl( this );
+ uno::Reference<beans::XPropertySet> xSet(mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->setPropertyValue("FrameURL", uno::Any(sFrameURL));
+ }
+ }
- mpImpl->mxObjRef->addStateChangeListener( mpImpl->mxLightClient.get() );
- mpImpl->mxObjRef->addEventListener( uno::Reference< document::XEventListener >( mpImpl->mxLightClient.get() ) );
+ if ( mpImpl->mxObjRef.is() )
+ {
+ if ( !mpImpl->mxLightClient.is() )
+ mpImpl->mxLightClient = new SdrLightEmbeddedClient_Impl( this );
- if ( mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
- GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
+ mpImpl->mxObjRef->addStateChangeListener( mpImpl->mxLightClient.get() );
+ mpImpl->mxObjRef->addEventListener( uno::Reference< document::XEventListener >( mpImpl->mxLightClient.get() ) );
- CheckFileLink_Impl();
+ if ( mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
+ GetSdrGlobalData().GetOLEObjCache().InsertObj(this);
- uno::Reference< container::XChild > xChild( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
- if( xChild.is() )
- {
- uno::Reference< uno::XInterface > xParent( getSdrModelFromSdrObject().getUnoModel());
- if( xParent.is())
- xChild->setParent( getSdrModelFromSdrObject().getUnoModel() );
- }
+ CheckFileLink_Impl();
+ uno::Reference< container::XChild > xChild( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
+ if( xChild.is() )
+ {
+ uno::Reference< uno::XInterface > xParent( getSdrModelFromSdrObject().getUnoModel());
+ if( xParent.is())
+ xChild->setParent( getSdrModelFromSdrObject().getUnoModel() );
}
+
}
- catch( css::uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::Connect_Impl()" );
- }
+ }
+ catch( css::uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::Connect_Impl()" );
}
}
@@ -1032,20 +1100,20 @@ void SdrOle2Obj::ObjectLoaded()
void SdrOle2Obj::AddListeners_Impl()
{
- if( mpImpl->mxObjRef.is() && mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED )
+ if( !(mpImpl->mxObjRef.is() && mpImpl->mxObjRef->getCurrentState() != embed::EmbedStates::LOADED) )
+ return;
+
+ // register modify listener
+ if (!mpImpl->mxModifyListener.is())
{
- // register modify listener
- if (!mpImpl->mxModifyListener.is())
- {
- mpImpl->mxModifyListener = new SvxUnoShapeModifyListener(this);
- }
+ mpImpl->mxModifyListener = new SvxUnoShapeModifyListener(this);
+ }
- uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
- if (xBC.is())
- {
- uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
- xBC->addModifyListener( xListener );
- }
+ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+ if (xBC.is())
+ {
+ uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
+ xBC->addModifyListener( xListener );
}
}
@@ -1066,25 +1134,25 @@ void SdrOle2Obj::Disconnect()
void SdrOle2Obj::RemoveListeners_Impl()
{
- if ( mpImpl->mxObjRef.is() && !mpImpl->aPersistName.isEmpty() )
+ if ( !(mpImpl->mxObjRef.is() && !mpImpl->aPersistName.isEmpty()) )
+ return;
+
+ try
{
- try
+ sal_Int32 nState = mpImpl->mxObjRef->getCurrentState();
+ if ( nState != embed::EmbedStates::LOADED )
{
- sal_Int32 nState = mpImpl->mxObjRef->getCurrentState();
- if ( nState != embed::EmbedStates::LOADED )
+ uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
+ if (xBC.is() && mpImpl->mxModifyListener.is())
{
- uno::Reference< util::XModifyBroadcaster > xBC( getXModel(), uno::UNO_QUERY );
- if (xBC.is() && mpImpl->mxModifyListener.is())
- {
- uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
- xBC->removeModifyListener( xListener );
- }
+ uno::Reference<util::XModifyListener> xListener(mpImpl->mxModifyListener.get());
+ xBC->removeModifyListener( xListener );
}
}
- catch( css::uno::Exception& )
- {
- TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::RemoveListeners_Impl()" );
- }
+ }
+ catch( css::uno::Exception& )
+ {
+ TOOLS_WARN_EXCEPTION( "svx", "SdrOle2Obj::RemoveListeners_Impl()" );
}
}
@@ -1308,14 +1376,14 @@ SdrObjectUniquePtr 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();
}
@@ -1453,149 +1521,149 @@ void SdrOle2Obj::ImpSetVisAreaSize()
// the object area of an embedded object was changed, e.g. by user interaction an a selected object
GetObjRef();
- if (mpImpl->mxObjRef.is())
- {
- sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() );
+ if (!mpImpl->mxObjRef.is())
+ return;
- // the client is required to get access to scaling
- SfxInPlaceClient* pClient(
- SfxInPlaceClient::GetClient(
- dynamic_cast<SfxObjectShell*>(
- getSdrModelFromSdrObject().GetPersist()),
- mpImpl->mxObjRef.GetObject()));
- const bool bHasOwnClient(
- mpImpl->mxLightClient.is() &&
- mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient.get() ) );
+ sal_Int64 nMiscStatus = mpImpl->mxObjRef->getStatus( GetAspect() );
- if ( pClient || bHasOwnClient )
+ // the client is required to get access to scaling
+ SfxInPlaceClient* pClient(
+ SfxInPlaceClient::GetClient(
+ dynamic_cast<SfxObjectShell*>(
+ getSdrModelFromSdrObject().GetPersist()),
+ mpImpl->mxObjRef.GetObject()));
+ const bool bHasOwnClient(
+ mpImpl->mxLightClient.is() &&
+ mpImpl->mxObjRef->getClientSite() == uno::Reference< embed::XEmbeddedClient >( mpImpl->mxLightClient.get() ) );
+
+ if ( pClient || bHasOwnClient )
+ {
+ // TODO: IMHO we need to do similar things when object is UIActive or OutplaceActive?!
+ if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
+ svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ))
+ || mpImpl->mxObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
+ )
{
- // TODO: IMHO we need to do similar things when object is UIActive or OutplaceActive?!
- if ( ((nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
- svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ))
- || mpImpl->mxObjRef->getCurrentState() == embed::EmbedStates::INPLACE_ACTIVE
- )
+ Fraction aScaleWidth;
+ Fraction aScaleHeight;
+ if ( pClient )
{
- Fraction aScaleWidth;
- Fraction aScaleHeight;
- if ( pClient )
- {
- aScaleWidth = pClient->GetScaleWidth();
- aScaleHeight = pClient->GetScaleHeight();
- }
- else
- {
- aScaleWidth = mpImpl->mxLightClient->GetScaleWidth();
- aScaleHeight = mpImpl->mxLightClient->GetScaleHeight();
- }
+ aScaleWidth = pClient->GetScaleWidth();
+ aScaleHeight = pClient->GetScaleHeight();
+ }
+ else
+ {
+ aScaleWidth = mpImpl->mxLightClient->GetScaleWidth();
+ aScaleHeight = mpImpl->mxLightClient->GetScaleHeight();
+ }
- // The object wants to resize itself (f.e. Chart wants to recalculate the layout)
- // or object is inplace active and so has a window that must be resized also
- // In these cases the change in the object area size will be reflected in a change of the
- // objects' visual area. The scaling will not change, but it might exist already and must
- // be used in calculations
- MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
- Size aVisSize( static_cast<long>( Fraction( maRect.GetWidth() ) / aScaleWidth ),
- static_cast<long>( Fraction( maRect.GetHeight() ) / aScaleHeight ) );
-
- aVisSize = OutputDevice::LogicToLogic(
- aVisSize,
- MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
- MapMode(aMapUnit));
- awt::Size aSz;
- aSz.Width = aVisSize.Width();
- aSz.Height = aVisSize.Height();
- mpImpl->mxObjRef->setVisualAreaSize( GetAspect(), aSz );
+ // The object wants to resize itself (f.e. Chart wants to recalculate the layout)
+ // or object is inplace active and so has a window that must be resized also
+ // In these cases the change in the object area size will be reflected in a change of the
+ // objects' visual area. The scaling will not change, but it might exist already and must
+ // be used in calculations
+ MapUnit aMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
+ Size aVisSize( static_cast<long>( Fraction( maRect.GetWidth() ) / aScaleWidth ),
+ static_cast<long>( Fraction( maRect.GetHeight() ) / aScaleHeight ) );
+
+ aVisSize = OutputDevice::LogicToLogic(
+ aVisSize,
+ MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
+ MapMode(aMapUnit));
+ awt::Size aSz;
+ aSz.Width = aVisSize.Width();
+ aSz.Height = aVisSize.Height();
+ mpImpl->mxObjRef->setVisualAreaSize( GetAspect(), aSz );
- try
- {
- aSz = mpImpl->mxObjRef->getVisualAreaSize( GetAspect() );
- }
- catch( embed::NoVisualAreaSizeException& )
- {}
+ try
+ {
+ aSz = mpImpl->mxObjRef->getVisualAreaSize( GetAspect() );
+ }
+ catch( embed::NoVisualAreaSizeException& )
+ {}
- tools::Rectangle aAcceptedVisArea;
- aAcceptedVisArea.SetSize( Size( static_cast<long>( Fraction( long( aSz.Width ) ) * aScaleWidth ),
- static_cast<long>( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
- if (aVisSize != aAcceptedVisArea.GetSize())
- {
- // server changed VisArea to its liking and the VisArea is different than the suggested one
- // store the new value as given by the object
- MapUnit aNewMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
- maRect.SetSize(
- OutputDevice::LogicToLogic(
- aAcceptedVisArea.GetSize(),
- MapMode(aNewMapUnit),
- MapMode(getSdrModelFromSdrObject().GetScaleUnit())));
- }
+ tools::Rectangle aAcceptedVisArea;
+ aAcceptedVisArea.SetSize( Size( static_cast<long>( Fraction( long( aSz.Width ) ) * aScaleWidth ),
+ static_cast<long>( Fraction( long( aSz.Height ) ) * aScaleHeight ) ) );
+ if (aVisSize != aAcceptedVisArea.GetSize())
+ {
+ // server changed VisArea to its liking and the VisArea is different than the suggested one
+ // store the new value as given by the object
+ MapUnit aNewMapUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( mpImpl->mxObjRef->getMapUnit( GetAspect() ) );
+ maRect.SetSize(
+ OutputDevice::LogicToLogic(
+ aAcceptedVisArea.GetSize(),
+ MapMode(aNewMapUnit),
+ MapMode(getSdrModelFromSdrObject().GetScaleUnit())));
+ }
- // make the new object area known to the client
- // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
- // WHY this -> OSL_ASSERT( pClient );
- if( pClient )
- pClient->SetObjArea(maRect);
+ // make the new object area known to the client
+ // compared to the "else" branch aRect might have been changed by the object and no additional scaling was applied
+ // WHY this -> OSL_ASSERT( pClient );
+ if( pClient )
+ pClient->SetObjArea(maRect);
- // we need a new replacement image as the object has resized itself
+ // we need a new replacement image as the object has resized itself
- //#i79578# don't request a new replacement image for charts to often
- //a chart sends a modified call to the framework if it was changed
- //thus the replacement update is already handled there
- if( !IsChart() )
- mpImpl->mxObjRef.UpdateReplacement();
- }
- else
+ //#i79578# don't request a new replacement image for charts to often
+ //a chart sends a modified call to the framework if it was changed
+ //thus the replacement update is already handled there
+ if( !IsChart() )
+ mpImpl->mxObjRef.UpdateReplacement();
+ }
+ else
+ {
+ // The object isn't active and does not want to resize itself so the changed object area size
+ // will be reflected in a changed object scaling
+ Fraction aScaleWidth;
+ Fraction aScaleHeight;
+ Size aObjAreaSize;
+ if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
{
- // The object isn't active and does not want to resize itself so the changed object area size
- // will be reflected in a changed object scaling
- Fraction aScaleWidth;
- Fraction aScaleHeight;
- Size aObjAreaSize;
- if ( CalculateNewScaling( aScaleWidth, aScaleHeight, aObjAreaSize ) )
+ if ( pClient )
{
- if ( pClient )
- {
- tools::Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
- pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
- }
- else
- {
- mpImpl->mxLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
- }
+ tools::Rectangle aScaleRect(maRect.TopLeft(), aObjAreaSize);
+ pClient->SetObjAreaAndScale( aScaleRect, aScaleWidth, aScaleHeight);
+ }
+ else
+ {
+ mpImpl->mxLightClient->SetSizeScale( aScaleWidth, aScaleHeight );
}
}
}
- else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
- svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ) )
+ }
+ else if( (nMiscStatus & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) &&
+ svt::EmbeddedObjectRef::TryRunningState( mpImpl->mxObjRef.GetObject() ) )
+ {
+ //also handle not sfx based ole objects e.g. charts
+ //#i83860# resizing charts in impress distorts fonts
+ uno::Reference< embed::XVisualObject > xVisualObject( getXModel(), uno::UNO_QUERY );
+ if( xVisualObject.is() )
{
- //also handle not sfx based ole objects e.g. charts
- //#i83860# resizing charts in impress distorts fonts
- uno::Reference< embed::XVisualObject > xVisualObject( getXModel(), uno::UNO_QUERY );
- if( xVisualObject.is() )
- {
- const MapUnit aMapUnit(
- VCLUnoHelper::UnoEmbed2VCLMapUnit(
- mpImpl->mxObjRef->getMapUnit(GetAspect())));
- const Point aTL( maRect.TopLeft() );
- const Point aBR( maRect.BottomRight() );
- const Point aTL2(
- OutputDevice::LogicToLogic(
- aTL,
- MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
- MapMode(aMapUnit)));
- const Point aBR2(
- OutputDevice::LogicToLogic(
- aBR,
- MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
- MapMode(aMapUnit)));
- const tools::Rectangle aNewRect(
- aTL2,
- aBR2);
-
- xVisualObject->setVisualAreaSize(
- GetAspect(),
- awt::Size(
- aNewRect.GetWidth(),
- aNewRect.GetHeight()));
- }
+ const MapUnit aMapUnit(
+ VCLUnoHelper::UnoEmbed2VCLMapUnit(
+ mpImpl->mxObjRef->getMapUnit(GetAspect())));
+ const Point aTL( maRect.TopLeft() );
+ const Point aBR( maRect.BottomRight() );
+ const Point aTL2(
+ OutputDevice::LogicToLogic(
+ aTL,
+ MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
+ MapMode(aMapUnit)));
+ const Point aBR2(
+ OutputDevice::LogicToLogic(
+ aBR,
+ MapMode(getSdrModelFromSdrObject().GetScaleUnit()),
+ MapMode(aMapUnit)));
+ const tools::Rectangle aNewRect(
+ aTL2,
+ aBR2);
+
+ xVisualObject->setVisualAreaSize(
+ GetAspect(),
+ awt::Size(
+ aNewRect.GetWidth(),
+ aNewRect.GetHeight()));
}
}
}
diff --git a/svx/source/svdraw/svdotxfl.cxx b/svx/source/svdraw/svdotxfl.cxx
index c8e82711b6a3..6ab4914daa3d 100644
--- a/svx/source/svdraw/svdotxfl.cxx
+++ b/svx/source/svdraw/svdotxfl.cxx
@@ -22,7 +22,8 @@
#include <svx/svdotext.hxx>
bool SdrTextObj::CalcFieldValue(const SvxFieldItem& /*rField*/, sal_Int32 /*nPara*/, sal_uInt16 /*nPos*/,
- bool /*bEdit*/, boost::optional<Color>& /*rpTxtColor*/, boost::optional<Color>& /*rpFldColor*/, OUString& /*rRet*/) const
+ bool /*bEdit*/, boost::optional<Color>& /*rpTxtColor*/, boost::optional<Color>& /*rpFldColor*/,
+ boost::optional<FontLineStyle>& /*rpFldLineStyle*/, OUString& /*rRet*/) const
{
return false;
}
diff --git a/svx/source/svdraw/svdoutl.cxx b/svx/source/svdraw/svdoutl.cxx
index 0387afaa5ec9..55990eccabe7 100644
--- a/svx/source/svdraw/svdoutl.cxx
+++ b/svx/source/svdraw/svdoutl.cxx
@@ -72,16 +72,17 @@ void SdrOutliner::SetTextObjNoInit( const SdrTextObj* pObj )
}
OUString SdrOutliner::CalcFieldValue(const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos,
- boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor)
+ boost::optional<Color>& rpTxtColor, boost::optional<Color>& rpFldColor,
+ boost::optional<FontLineStyle>& rpFldLineStyle)
{
bool bOk = false;
OUString aRet;
if(mpTextObj.is())
- bOk = mpTextObj->CalcFieldValue(rField, nPara, nPos, false, rpTxtColor, rpFldColor, aRet);
+ bOk = mpTextObj->CalcFieldValue(rField, nPara, nPos, false, rpTxtColor, rpFldColor, rpFldLineStyle, aRet);
if (!bOk)
- aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor);
+ aRet = Outliner::CalcFieldValue(rField, nPara, nPos, rpTxtColor, rpFldColor, rpFldLineStyle);
return aRet;
}
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index c9a18c1dfcf9..d9c478f9f31c 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -758,7 +758,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);
@@ -788,7 +788,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);
@@ -797,7 +797,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;
@@ -805,7 +806,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);
@@ -824,8 +826,8 @@ 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);
+ FPDF_FONT pFontObject = FPDFTextObj_GetFont(pPageObject);
+ int nFontNameChars = FPDFFont_GetFontName(pFontObject, pFontName.get(), nFontName);
if (nFontName >= nFontNameChars)
{
OUString sFontName = OUString::createFromAscii(pFontName.get());
@@ -1024,7 +1026,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 a1a4e6963020..78aa366b4d88 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -36,7 +36,7 @@ protected:
virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override;
public:
- explicit SvxPluginShape(SdrObject* pObj);
+ explicit SvxPluginShape(SdrObject* pObj, OUString referer);
virtual ~SvxPluginShape() throw() override;
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
@@ -46,6 +46,7 @@ public:
virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage ) override;
};
+
class SvxAppletShape : public SvxOle2Shape
{
protected:
@@ -54,7 +55,7 @@ protected:
virtual bool getPropertyValueImpl( const OUString& rName, const SfxItemPropertySimpleEntry* pProperty, css::uno::Any& rValue ) override;
public:
- explicit SvxAppletShape(SdrObject* pObj);
+ explicit SvxAppletShape(SdrObject* pObj, OUString referer);
virtual ~SvxAppletShape() throw() override;
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
@@ -64,8 +65,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;
@@ -73,7 +77,7 @@ protected:
css::uno::Any& rValue) override;
public:
- explicit SvxFrameShape(SdrObject* pObj);
+ explicit SvxFrameShape(SdrObject* pObj, OUString referer);
virtual ~SvxFrameShape() throw() override;
virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
@@ -82,6 +86,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/unomod.cxx b/svx/source/unodraw/unomod.cxx
index e3017b41ecfb..a0ee09645cd4 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -209,7 +209,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstanceWi
{
OUString arg;
if ((ServiceSpecifier == "com.sun.star.drawing.GraphicObjectShape"
- || ServiceSpecifier == "com.sun.star.drawing.MediaShape")
+ || ServiceSpecifier == "com.sun.star.drawing.AppletShape"
+ || ServiceSpecifier == "com.sun.star.drawing.FrameShape"
+ || ServiceSpecifier == "com.sun.star.drawing.OLE2Shape"
+ || ServiceSpecifier == "com.sun.star.drawing.MediaShape"
+ || ServiceSpecifier == "com.sun.star.drawing.PluginShape")
&& Arguments.getLength() == 1 && (Arguments[0] >>= arg))
{
return create(ServiceSpecifier, arg);
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 28082f35e75f..25f96b615fb3 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -702,13 +702,13 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInvent
pRet = new SvxGraphicObject( pObj );
break;
case OBJ_FRAME:
- pRet = new SvxFrameShape( pObj );
+ pRet = new SvxFrameShape( pObj, referer );
break;
case OBJ_OLE2_APPLET:
- pRet = new SvxAppletShape( pObj );
+ pRet = new SvxAppletShape( pObj, referer );
break;
case OBJ_OLE2_PLUGIN:
- pRet = new SvxPluginShape( pObj );
+ pRet = new SvxPluginShape( pObj, referer );
break;
case OBJ_OLE2:
{
@@ -736,17 +736,17 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInvent
if( aPluginClassId == aClassId )
{
- pRet = new SvxPluginShape( pObj );
+ pRet = new SvxPluginShape( pObj, referer );
nType = OBJ_OLE2_PLUGIN;
}
else if( aAppletClassId == aClassId )
{
- pRet = new SvxAppletShape( pObj );
+ pRet = new SvxAppletShape( pObj, referer );
nType = OBJ_OLE2_APPLET;
}
else if( aIFrameClassId == aClassId )
{
- pRet = new SvxFrameShape( pObj );
+ pRet = new SvxFrameShape( pObj, referer );
nType = OBJ_FRAME;
}
}
@@ -756,7 +756,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, SdrInvent
if( pRet == nullptr )
{
SvxUnoPropertyMapProvider& rSvxMapProvider = getSvxMapProvider();
- pRet = new SvxOle2Shape( pObj, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) );
+ pRet = new SvxOle2Shape( pObj, referer, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) );
}
}
break;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index f7629f338858..0a4f5055ee02 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -68,14 +68,16 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
-SvxOle2Shape::SvxOle2Shape(SdrObject* pObject)
-: SvxShapeText( pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2),
- getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool()) )
+SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, OUString referer)
+ : SvxShapeText(pObject, getSvxMapProvider().GetMap(SVXMAP_OLE2),
+ getSvxMapProvider().GetPropertySet(SVXMAP_OLE2,SdrObject::GetGlobalDrawObjectItemPool()))
+ , referer_(std::move(referer))
{
}
-SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet)
-: SvxShapeText( pObject, pPropertyMap, pPropertySet )
+SvxOle2Shape::SvxOle2Shape(SdrObject* pObject, OUString referer, const SfxItemPropertyMapEntry* pPropertyMap, const SvxItemPropertySet* pPropertySet)
+ : SvxShapeText(pObject, pPropertyMap, pPropertySet)
+ , referer_(std::move(referer))
{
}
@@ -180,7 +182,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;
@@ -450,16 +452,18 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL )
::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist();
- uno::Sequence< beans::PropertyValue > aMediaDescr( 1 );
+ uno::Sequence< beans::PropertyValue > aMediaDescr( 2 );
aMediaDescr[0].Name = "URL";
aMediaDescr[0].Value <<= aLinkURL;
+ aMediaDescr[1].Name = "Referer";
+ aMediaDescr[1].Value <<= referer_;
uno::Reference< task::XInteractionHandler > xInteraction = pPersist->getInteractionHandler();
if ( xInteraction.is() )
{
- aMediaDescr.realloc( 2 );
- aMediaDescr[1].Name = "InteractionHandler";
- aMediaDescr[1].Value <<= xInteraction;
+ aMediaDescr.realloc( 3 );
+ aMediaDescr[2].Name = "InteractionHandler";
+ aMediaDescr[2].Value <<= xInteraction;
}
//TODO/LATER: how to cope with creation failure?!
@@ -477,7 +481,7 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL )
awt::Size aSz = xObj->getVisualAreaSize( pOle2Obj->GetAspect() );
aRect.SetSize( Size( aSz.Width, aSz.Height ) );
}
- catch( embed::NoVisualAreaSizeException& )
+ catch( const uno::Exception& )
{}
pOle2Obj->SetLogicRect( aRect );
}
@@ -501,10 +505,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,8 +559,13 @@ SvGlobalName SvxOle2Shape::GetClassName_Impl(OUString& rHexCLSID)
return aClassName;
}
-SvxAppletShape::SvxAppletShape(SdrObject* pObject)
- : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) )
+OUString SvxOle2Shape::GetAndClearInitialFrameURL()
+{
+ return OUString();
+}
+
+SvxAppletShape::SvxAppletShape(SdrObject* pObject, OUString referer)
+ : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()))
{
SetShapeType( "com.sun.star.drawing.AppletShape" );
}
@@ -625,8 +635,8 @@ bool SvxAppletShape::getPropertyValueImpl( const OUString& rName, const SfxItemP
}
}
-SvxPluginShape::SvxPluginShape(SdrObject* pObject)
- : SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()) )
+SvxPluginShape::SvxPluginShape(SdrObject* pObject, OUString referer)
+ : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_PLUGIN), getSvxMapProvider().GetPropertySet(SVXMAP_PLUGIN, SdrObject::GetGlobalDrawObjectItemPool()))
{
SetShapeType( "com.sun.star.drawing.PluginShape" );
}
@@ -696,9 +706,8 @@ bool SvxPluginShape::getPropertyValueImpl( const OUString& rName, const SfxItemP
}
}
-
-SvxFrameShape::SvxFrameShape(SdrObject* pObject)
-: SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool()) )
+SvxFrameShape::SvxFrameShape(SdrObject* pObject, OUString referer)
+ : SvxOle2Shape(pObject, std::move(referer), getSvxMapProvider().GetMap(SVXMAP_FRAME), getSvxMapProvider().GetPropertySet(SVXMAP_FRAME, SdrObject::GetGlobalDrawObjectItemPool()))
{
SetShapeType( "com.sun.star.drawing.FrameShape" );
}
@@ -707,8 +716,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);
@@ -768,6 +788,7 @@ bool SvxFrameShape::getPropertyValueImpl(const OUString& rName, const SfxItemPro
return SvxOle2Shape::getPropertyValueImpl( rName, pProperty, rValue );
}
}
+
SvxMediaShape::SvxMediaShape(SdrObject* pObj, OUString const & referer)
: SvxShape( pObj, getSvxMapProvider().GetMap(SVXMAP_MEDIA), getSvxMapProvider().GetPropertySet(SVXMAP_MEDIA, SdrObject::GetGlobalDrawObjectItemPool()) ),
referer_(referer)
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 14f9313c625d..c45e64b6d22e 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -663,7 +663,8 @@ OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::X
// into an svm. slight catch22 here, since strict ODF
// conformance _recommends_ svg - then again, most old
// ODF consumers are believed to be OOo
- if (SvtSaveOptions().GetODFDefaultVersion() <= SvtSaveOptions::ODFVER_012)
+ if (SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012
+ || SvtSaveOptions().GetODFSaneDefaultVersion() == SvtSaveOptions::ODFSVER_012_EXT_COMPAT)
{
bUseGfxLink = false;
aExtension = ".svm";
diff --git a/svx/uiconfig/ui/crashreportdlg.ui b/svx/uiconfig/ui/crashreportdlg.ui
index 68741c6b362d..f12b9d02fe0e 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -4,13 +4,7 @@
<requires lib="gtk+" version="3.18"/>
<object class="GtkTextBuffer" id="textbuffer1">
<property name="text" translatable="yes" context="crashreportdlg|ed_post">The crash report was successfully uploaded.
-You can soon find the report at:
-crashreport.libreoffice.org/stats/crash_details/%CRASHID</property>
- </object>
- <object class="GtkTextBuffer" id="textbuffer2">
- <property name="text" translatable="yes" context="crashreportdlg|ed_bugreport">Please check the report and if no bug report is connected to the crash report yet, open a new bug report at bugs.documentfoundation.org.
-Add detailed instructions on how to reproduce the crash and the shown crash ID into the crash report field.
-Thank you for your help in improving %PRODUCTNAME.</property>
+Please contact your IT support with the following ID: %CRASHID</property>
</object>
<object class="GtkDialog" id="CrashReportDialog">
<property name="can_focus">False</property>
@@ -112,20 +106,6 @@ You can help us to fix this issue by sending an anonymous crash report to the %P
</packing>
</child>
<child>
- <object class="GtkTextView" id="ed_bugreport">
- <property name="can_focus">False</property>
- <property name="editable">False</property>
- <property name="cursor_visible">False</property>
- <property name="buffer">textbuffer2</property>
- <property name="accepts_tab">False</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
<object class="GtkCheckButton" id="check_safemode">
<property name="label" translatable="yes" context="crashreportdlg|check_safemode">Restart %PRODUCTNAME to enter safe mode</property>
<property name="visible">True</property>
diff --git a/sw/CppunitTest_sw_core_attr.mk b/sw/CppunitTest_sw_core_attr.mk
new file mode 100644
index 000000000000..91ae9c8b44e6
--- /dev/null
+++ b/sw/CppunitTest_sw_core_attr.mk
@@ -0,0 +1,74 @@
+# -*- 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_attr))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_attr, \
+ sw/qa/core/attr/attr \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_attr, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ sal \
+ sfx \
+ svl \
+ svx \
+ svxcore \
+ sw \
+ test \
+ unotest \
+ utl \
+ vcl \
+ tl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_attr,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_attr,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_attr,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_attr))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_attr,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_attr,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_attr, \
+ modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_attr))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_core_edit.mk b/sw/CppunitTest_sw_core_edit.mk
new file mode 100644
index 000000000000..2c04606a75f9
--- /dev/null
+++ b/sw/CppunitTest_sw_core_edit.mk
@@ -0,0 +1,74 @@
+# -*- 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_edit))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_edit, \
+ sw/qa/core/edit/edit \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_edit, \
+ editeng \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ svxcore \
+ sw \
+ test \
+ unotest \
+ utl \
+ vcl \
+ svt \
+ tl \
+ svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_edit,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_edit,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_edit,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_edit))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_edit,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_edit,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_edit, \
+ modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_edit))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk
index 9fe4fadbf357..6f8e7e46c0fc 100644
--- a/sw/CppunitTest_sw_core_text.mk
+++ b/sw/CppunitTest_sw_core_text.mk
@@ -21,9 +21,11 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_text, \
comphelper \
cppu \
cppuhelper \
+ editeng \
sal \
sfx \
sw \
+ svl \
test \
unotest \
utl \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 7ef692352874..943748922397 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -114,6 +114,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_core_layout \
CppunitTest_sw_core_unocore \
CppunitTest_sw_core_crsr \
+ CppunitTest_sw_core_edit \
+ CppunitTest_sw_core_attr \
))
ifneq ($(DISABLE_GUI),TRUE)
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 65de527c3b89..18957faa5785 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -288,6 +288,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/viewoptionspage \
sw/uiconfig/swriter/ui/warndatasourcedialog \
sw/uiconfig/swriter/ui/warnemaildialog \
+ sw/uiconfig/swriter/ui/warnhiddensectiondialog \
sw/uiconfig/swriter/ui/watermarkdialog \
sw/uiconfig/swriter/ui/wordcount \
sw/uiconfig/swriter/ui/wrapdialog \
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx
index b6857c346a33..6e6b3c1bad3e 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -69,6 +69,16 @@ namespace o3tl
template<> struct typed_flags<SwInsertFlags> : is_typed_flags<SwInsertFlags, 0x07> {};
}
+enum class SwDeleteFlags
+{
+ Default = 0,
+ ArtificialSelection = (1<<0), ///< keyboard delete, artificial selection, avoid deleting flys
+};
+namespace o3tl
+{
+ template<> struct typed_flags<SwDeleteFlags> : is_typed_flags<SwDeleteFlags, 0x01> {};
+}
+
/** Text operation/manipulation interface
*/
class IDocumentContentOperations
@@ -130,6 +140,7 @@ public:
Needed for hiding of deletion redlines
*/
virtual bool DeleteAndJoin( SwPaM&,
+ SwDeleteFlags flags = SwDeleteFlags::Default,
const bool bForceJoinNext = false ) = 0;
virtual bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) = 0;
diff --git a/sw/inc/IDocumentMarkAccess.hxx b/sw/inc/IDocumentMarkAccess.hxx
index 736f12e98c8f..b8d7262120b9 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -229,15 +229,19 @@ class IDocumentMarkAccess
const SwNodeIndex& rEnd,
std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, // Ugly: SaveBookmark is core-internal
const SwIndex* pSttIdx,
- const SwIndex* pEndIdx) =0;
+ const SwIndex* pEndIdx,
+ bool isReplace) = 0;
/** Deletes a mark.
@param ppMark
[in] an iterator pointing to the Mark to be deleted.
+ @param isMoveNodes
+ [in] the mark is deleted only temporarily for a node move, do not
+ remove fieldmark chars.
*/
virtual std::unique_ptr<ILazyDeleter>
- deleteMark(const IDocumentMarkAccess::const_iterator_t& ppMark) =0;
+ deleteMark(const IDocumentMarkAccess::const_iterator_t& ppMark, bool isMoveNodes) =0;
/** Deletes a mark.
@@ -279,7 +283,7 @@ class IDocumentMarkAccess
// interface IBookmarks (BOOKMARK, CROSSREF_NUMITEM_BOOKMARK, CROSSREF_HEADING_BOOKMARK )
/** check if the selection would delete a BOOKMARK */
- virtual bool isBookmarkDeleted(SwPaM const& rPaM) const =0;
+ virtual bool isBookmarkDeleted(SwPaM const& rPaM, bool isReplace) const =0;
/** returns a STL-like random access iterator to the begin of the sequence the IBookmarks.
*/
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 34fc28b713a8..8ca02d42b950 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -289,6 +289,8 @@
#define FN_TABLE_PASTE_ROW_BEFORE (FN_INSERT2 + 31) /* paste table as new table rows */
#define FN_TABLE_PASTE_COL_BEFORE (FN_INSERT2 + 32) /* paste table as new table columns */
+#define FN_EDIT_BOOKMARK (FN_INSERT2 + 33 ) /* Bookmark */
+
// Region: Format
#define FN_AUTOFORMAT_APPLY (FN_FORMAT + 1 ) /* apply autoformat options */
#define FN_AUTOFORMAT_AUTO (FN_FORMAT + 2 ) /* apply autoformat during user input */
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 23b3753dd938..cfeac8305f82 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -26,6 +26,9 @@
#include <vcl/keycod.hxx>
#include <o3tl/typed_flags_set.hxx>
+#ifdef SW_DLLIMPLEMENTATION
+#include <TextFrameIndex.hxx>
+#endif
#include "IShellCursorSupplier.hxx"
#include "swdllapi.h"
#include "docary.hxx"
@@ -42,6 +45,7 @@
class SfxItemSet;
class SfxPoolItem;
+class SwCallLink;
class SwContentFrame;
class SwUnoCursor;
class SwFormatField;
@@ -256,7 +260,7 @@ private:
SAL_DLLPRIVATE bool LRMargin( bool, bool bAPI = false );
SAL_DLLPRIVATE bool IsAtLRMargin( bool, bool bAPI = false ) const;
- SAL_DLLPRIVATE bool isInHiddenTextFrame(SwShellCursor* pShellCursor);
+ SAL_DLLPRIVATE bool isInHiddenFrame(SwShellCursor* pShellCursor);
SAL_DLLPRIVATE bool GoStartWordImpl();
SAL_DLLPRIVATE bool GoEndWordImpl();
@@ -322,9 +326,10 @@ public:
// only for usage in special cases allowed!
void ExtendedSelectAll(bool bFootnotes = true);
/// If ExtendedSelectAll() was called and selection didn't change since then.
- bool ExtendedSelectedAll();
- /// If document body starts with a table.
- bool StartsWithTable();
+ ::std::optional<::std::pair<SwNode const*, ::std::vector<SwTableNode*>>> ExtendedSelectedAll() const;
+ enum class StartsWith { None, Table, HiddenPara, HiddenSection };
+ /// If document body starts with a table or starts/ends with hidden paragraph.
+ StartsWith StartsWith_();
SwPaM* GetCursor( bool bMakeTableCursor = true ) const;
inline SwCursor* GetSwCursor() const;
@@ -434,6 +439,7 @@ public:
* stack
* @return <true> if there was one on the stack, <false> otherwise
*/
+ bool Pop(PopMode, ::std::unique_ptr<SwCallLink> pLink);
bool Pop(PopMode);
/*
* Combine 2 Cursors.
@@ -472,7 +478,8 @@ public:
// Cursor is placed in something that is protected or selection contains
// something that is protected.
- bool HasReadonlySel() const;
+ bool HasReadonlySel(bool isReplace = false) const;
+ bool HasHiddenSections() const;
// Can the cursor be set to read only ranges?
bool IsReadOnlyAvailable() const { return m_bSetCursorInReadOnly; }
@@ -579,8 +586,11 @@ public:
// fields etc.
OUString GetSelText() const;
- // Check of SPoint or Mark of current cursor are placed within a table.
- inline const SwTableNode* IsCursorInTable() const;
+ /// Check if Point of current cursor is placed within a table.
+ const SwTableNode* IsCursorInTable() const;
+ bool MoveOutOfTable();
+ bool TrySelectOuterTable();
+ bool MoveStartText();
bool IsCursorInFootnote() const;
@@ -792,8 +802,12 @@ public:
bool GotoINetAttr( const SwTextINetFormat& rAttr );
const SwFormatINetFormat* FindINetAttr( const OUString& rName ) const;
- bool SelectText( const sal_Int32 nStart,
- const sal_Int32 nEnd );
+ bool SelectTextModel(sal_Int32 nStart, sal_Int32 nEnd);
+#ifdef SW_DLLIMPLEMENTATION
+ bool SelectTextView(TextFrameIndex nStart, TextFrameIndex nEnd);
+ // result is only valid while cursor isn't moved!
+ TextFrameIndex GetCursorPointAsViewIndex() const;
+#endif
bool CheckTableBoxContent( const SwPosition* pPos = nullptr );
void SaveTableBoxContent( const SwPosition* pPos = nullptr );
@@ -890,11 +904,6 @@ inline bool SwCursorShell::IsMultiSelection() const
return m_pCurrentCursor->GetNext() != m_pCurrentCursor;
}
-inline const SwTableNode* SwCursorShell::IsCursorInTable() const
-{
- return m_pCurrentCursor->GetNode().FindTableNode();
-}
-
inline bool SwCursorShell::IsCursorPtAtEnd() const
{
return m_pCurrentCursor->End() == m_pCurrentCursor->GetPoint();
diff --git a/sw/inc/deletelistener.hxx b/sw/inc/deletelistener.hxx
new file mode 100644
index 000000000000..bfdc0926d3b6
--- /dev/null
+++ b/sw/inc/deletelistener.hxx
@@ -0,0 +1,92 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <svl/listener.hxx>
+#include <svl/lstner.hxx>
+#include "calbck.hxx"
+
+class SwDeleteListener final : public SwClient
+{
+private:
+ SwModify* m_pModify;
+
+ virtual void SwClientNotify(const SwModify&, const SfxHint& rHint) override
+ {
+ if (auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint))
+ {
+ if (pLegacy->m_pOld && pLegacy->m_pOld->Which() == RES_OBJECTDYING)
+ {
+ m_pModify->Remove(this);
+ m_pModify = nullptr;
+ }
+ }
+ }
+
+public:
+ SwDeleteListener(SwModify& rModify)
+ : m_pModify(&rModify)
+ {
+ m_pModify->Add(this);
+ }
+
+ bool WasDeleted() const { return !m_pModify; }
+
+ virtual ~SwDeleteListener() override
+ {
+ if (!m_pModify)
+ return;
+ m_pModify->Remove(this);
+ }
+};
+
+class SvtDeleteListener final : public SvtListener
+{
+private:
+ bool bObjectDeleted;
+
+public:
+ explicit SvtDeleteListener(SvtBroadcaster& rNotifier)
+ : bObjectDeleted(false)
+ {
+ StartListening(rNotifier);
+ }
+
+ virtual void Notify(const SfxHint& rHint) override
+ {
+ if (rHint.GetId() == SfxHintId::Dying)
+ bObjectDeleted = true;
+ }
+
+ bool WasDeleted() const { return bObjectDeleted; }
+};
+
+class SfxDeleteListener final : public SfxListener
+{
+private:
+ bool bObjectDeleted;
+
+public:
+ explicit SfxDeleteListener(SfxBroadcaster& rNotifier)
+ : bObjectDeleted(false)
+ {
+ StartListening(rNotifier);
+ }
+
+ virtual void Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint) override
+ {
+ if (rHint.GetId() == SfxHintId::Dying)
+ bObjectDeleted = true;
+ }
+
+ bool WasDeleted() const { return bObjectDeleted; }
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 83651fc8fcb2..241ae3b656be 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -21,6 +21,7 @@
// SwDoc interfaces
#include <o3tl/deleter.hxx>
+#include <o3tl/typed_flags_set.hxx>
#include <vcl/idle.hxx>
#include "swdllapi.h"
#include "swtypes.hxx"
@@ -1189,7 +1190,9 @@ public:
sal_uInt16 nCnt = 1, bool bBehind = true );
// Delete Columns/Rows in table.
- bool DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn = false );
+ void DelTable(SwTableNode * pTable);
+ enum class RowColMode { DeleteRow = 0, DeleteColumn = 1, DeleteProtected = 2 };
+ bool DeleteRowCol(const SwSelBoxes& rBoxes, RowColMode eMode = RowColMode::DeleteRow);
void DeleteRow( const SwCursor& rCursor );
void DeleteCol( const SwCursor& rCursor );
@@ -1658,6 +1661,10 @@ private:
};
+namespace o3tl {
+ template<> struct typed_flags<SwDoc::RowColMode> : is_typed_flags<SwDoc::RowColMode, 3> {};
+}
+
// This method is called in Dtor of SwDoc and deletes cache of ContourObjects.
void ClrContourCache();
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index 53b91f44db98..fec0f48909a7 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -80,6 +80,7 @@ class SwLineNumberInfo;
class SwAuthEntry;
class SwRewriter;
class SwView;
+class SwWrtShell;
struct SwConversionArgs;
struct SvxSwAutoFormatFlags;
struct SwInsertTableOptions;
@@ -152,7 +153,7 @@ class SW_DLLPUBLIC SwEditShell : public SwCursorShell
that will be used by GetGraphic() and GetGraphicSize(). */
SAL_DLLPRIVATE SwGrfNode *GetGrfNode_() const ;
- SAL_DLLPRIVATE void DeleteSel( SwPaM& rPam, bool* pUndo = nullptr );
+ SAL_DLLPRIVATE void DeleteSel(SwPaM& rPam, bool isArtificialSelection, bool* pUndo = nullptr);
SAL_DLLPRIVATE void SetSectionAttr_( SwSectionFormat& rSectFormat, const SfxItemSet& rSet );
@@ -174,7 +175,7 @@ public:
/** Delete content of all ranges.
If whole nodes are selected, these nodes get deleted. */
- bool Delete();
+ bool Delete(bool isArtificialSelection = false);
/// Remove a complete paragraph.
bool DelFullPara();
@@ -629,6 +630,19 @@ public:
/// Apply ViewOptions with Start-/EndAction.
virtual void ApplyViewOptions( const SwViewOption &rOpt ) override;
+ /// Selected area has readonly content
+ virtual void InfoReadOnlyDialog() const
+ {
+ // override in SwWrtShell
+ }
+
+ /// Selected area has hidden content
+ virtual bool WarnHiddenSectionDialog() const
+ {
+ // override in SwWrtShell
+ return true;
+ }
+
/** Query text within selection. */
void GetSelectedText( OUString &rBuf,
ParaBreakType nHndlParaBreak = ParaBreakType::ToBlank );
diff --git a/sw/inc/index.hxx b/sw/inc/index.hxx
index 10256ad1f53f..b967b45c1bf0 100644
--- a/sw/inc/index.hxx
+++ b/sw/inc/index.hxx
@@ -22,6 +22,8 @@
#include <sal/types.h>
#include "swdllapi.h"
+#include <o3tl/typed_flags_set.hxx>
+
#include <iostream>
class SwIndexReg;
@@ -115,9 +117,17 @@ class SAL_WARN_UNUSED SwIndexReg
const SwIndex * m_pFirst;
const SwIndex * m_pLast;
+public:
+ enum class UpdateMode {
+ Default = 0,
+ Negative = (1<<0),
+ Delete = (1<<1),
+ Replace = (1<<2),
+ };
+
protected:
virtual void Update( SwIndex const & rPos, const sal_Int32 nChangeLen,
- const bool bNegative = false, const bool bDelete = false );
+ UpdateMode eMode);
bool HasAnyIndex() const { return nullptr != m_pFirst; }
@@ -129,6 +139,11 @@ public:
const SwIndex* GetFirstIndex() const { return m_pFirst; }
};
+namespace o3tl
+{
+ template<> struct typed_flags<SwIndexReg::UpdateMode> : is_typed_flags<SwIndexReg::UpdateMode, 0x07> {};
+}
+
#ifndef DBG_UTIL
inline sal_Int32 SwIndex::operator++()
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 2f2958c977bc..8b635f9f4778 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -44,6 +44,7 @@ class SwNodeIndex;
class SwNodeRange;
class SwOLENode;
class SwPaM;
+class SwRootFrame;
class SwSectionData;
class SwSectionFormat;
class SwTOXBase;
@@ -132,6 +133,11 @@ class SW_DLLPUBLIC SwNodes final
SwNodes( SwDoc* pDoc );
+ // Returns start of the document section (PostIts/Inserts/Autotext/Redlines/Content),
+ // or of a specific fly / header / footer / footnote, where this node is, which must not
+ // be crossed when moving backwards
+ sal_uLong StartOfGlobalSection(const SwNode& node) const;
+
public:
~SwNodes();
@@ -187,7 +193,7 @@ public:
static void GoEndOfSection(SwNodeIndex *);
SwContentNode* GoNext(SwNodeIndex *) const;
- static SwContentNode* GoPrevious(SwNodeIndex *);
+ static SwContentNode* GoPrevious(SwNodeIndex *, bool canCrossBoundary = false);
/** Go to next content-node that is not protected or hidden
(Both set FALSE ==> GoNext/GoPrevious!!!). */
@@ -306,11 +312,12 @@ public:
const SwDoc* GetDoc() const { return m_pMyDoc; }
/** Search previous / next content node or table node with frames.
- If no end is given begin with the FrameIndex, else start search
- with that before rFrameIdx and pEnd at the back.
+ Search is started backward with the one before rFrameIdx and
+ forward after pEnd.
If no valid node is found, return 0. rFrameIdx points to the node with frames. **/
SwNode* FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx,
- const SwNode* pEnd ) const;
+ const SwNode* pEnd,
+ SwRootFrame const* pLayout = nullptr) const;
SwNode * DocumentSectionStartNode(SwNode * pNode) const;
SwNode * DocumentSectionEndNode(SwNode * pNode) const;
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 852fffd84e3d..470ea17563f8 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
@@ -90,7 +90,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,
@@ -168,6 +168,21 @@ inline const SwOLENode *SwNode::GetOLENode() const
return SwNodeType::Ole == m_nNodeType ? static_cast<const SwOLENode*>(this) : nullptr;
}
+namespace sw
+{
+ class DocumentSettingManager;
+}
+
+class SW_DLLPUBLIC PurgeGuard
+{
+private:
+ ::sw::DocumentSettingManager &m_rManager;
+ bool m_bOrigPurgeOle;
+public:
+ PurgeGuard(const SwDoc& rDoc);
+ ~PurgeGuard();
+};
+
#endif // _ INCLUDED_SW_INC_NDOLE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index acef43b0010e..436349cc9653 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -504,7 +504,7 @@ public:
@retval true This text node has a number.
@retval false else
*/
- bool HasNumber() const;
+ bool HasNumber(SwRootFrame const* pLayout = nullptr) const;
/** Returns if this text node has a bullet.
@@ -739,8 +739,7 @@ public:
virtual void Update(
SwIndex const & rPos,
const sal_Int32 nChangeLen,
- const bool bNegative = false,
- const bool bDelete = false ) override;
+ UpdateMode eMode) override;
/// change text to Upper/Lower/Hiragana/Katakana/...
void TransliterateText( utl::TransliterationWrapper& rTrans,
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index d12e06d3e950..f4067cd57c4b 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -541,7 +541,7 @@ public:
const SwSection& GetSection() const { return *m_pSection; }
SwSection& GetSection() { return *m_pSection; }
- SwFrame *MakeFrame( SwFrame* );
+ SwFrame* MakeFrame(SwFrame* pSib, bool bHidden);
/** Creates the frms for the SectionNode (i.e. the SectionFrames).
On default the frames are created until the end of the range.
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 07ca7ff949a2..5e112fcfc809 100644
--- a/sw/inc/pam.hxx
+++ b/sw/inc/pam.hxx
@@ -252,7 +252,9 @@ public:
/** Is in something protected (readonly) or selection contains
something protected. */
- bool HasReadonlySel( bool bFormView ) const;
+ bool HasReadonlySel(bool bFormView, bool isReplace) const;
+ /** Is there hidden sections in the selected area. */
+ bool HasHiddenSections() const;
bool ContainsPosition(const SwPosition & rPos) const
{
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 0776afda4cf9..654371ab3587 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -74,7 +74,7 @@ private:
/// may have different value than format attribute:
/// format attr has value for this section, while flag is
/// effectively ORed with parent sections!
- bool m_bProtectFlag : 1;
+ bool m_bProtectFlag : 1; ///< protect flag is no longer inherited
// Edit in readonly sections.
bool m_bEditInReadonlyFlag : 1;
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 3d4dd0d7ff29..c972618b3d80 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -373,7 +373,7 @@ public:
virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) = 0;
virtual VclPtr<AbstractSwAsciiFilterDlg> CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
SvStream* pStream) = 0;
- virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq) = 0;
+ virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, OUString const* pSelected) = 0;
virtual VclPtr<AbstractSwBreakDlg> CreateSwBreakDlg(weld::Window *pParent, SwWrtShell &rSh) = 0;
virtual VclPtr<VclAbstractDialog> CreateSwChangeDBDlg(SwView& rVw) = 0;
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index d3d23155ff5e..ffdc77342367 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -281,6 +281,8 @@ public:
SwCursor* MakeBoxSels( SwCursor* pCurrentCursor );
// Any boxes protected?
bool HasReadOnlyBoxSel() const;
+ // Any boxes hidden?
+ bool HasHiddenBoxSel() const;
// Has table cursor been changed? If so, save new values immediately.
bool IsCursorMovedUpdate();
diff --git a/sw/inc/swrect.hxx b/sw/inc/swrect.hxx
index 69b1f2ad781a..6cde3c3f01e7 100644
--- a/sw/inc/swrect.hxx
+++ b/sw/inc/swrect.hxx
@@ -26,6 +26,7 @@
#include "swdllapi.h"
class SvStream;
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
/// *Of course* Writer needs its own rectangles.
/// This is half-open so m_Point.X() + m_Size.getWidth() is *not* included.
@@ -104,7 +105,7 @@ public:
// Output operator for debugging.
friend SvStream& WriteSwRect( SvStream &rStream, const SwRect &rRect );
-
+ void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
void Top_( const long nTop );
void Bottom_( const long nBottom );
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 71d9c511591d..42b14f7859e5 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -21,6 +21,7 @@
#include <vector>
#include <memory>
+#include <optional>
#include <svl/undo.hxx>
#include <tools/solar.h>
@@ -177,12 +178,11 @@ protected:
const sal_uLong* pEndNdIdx = nullptr,
bool bForceCreateFrames = false);
- // These two methods move the SPoint back/forth from PaM. With it
- // a range can be spanned for Undo/Redo. (In this case the SPoint
- // is before the manipulated range!!)
- // The flag indicates if there is content before the SPoint.
- static bool MovePtBackward( SwPaM& rPam );
- static void MovePtForward( SwPaM& rPam, bool bMvBkwrd );
+ // These two methods save and restore the Point of PaM.
+ // If the point cannot be moved, a "backup" is created on the previous node.
+ // Either way, it will not be moved by inserting at its original position.
+ static ::std::optional<SwNodeIndex> MovePtBackward(SwPaM& rPam);
+ static void MovePtForward(SwPaM& rPam, ::std::optional<SwNodeIndex> && oMvBkwrd);
// Before moving stuff into UndoNodes-Array care has to be taken that
// the content-bearing attributes are removed from the nodes-array.
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index 289d5f0b7ee1..9f7db995de53 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -26,6 +26,9 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/implbase.hxx>
+
+#include <o3tl/typed_flags_set.hxx>
+
#include <vcl/svapp.hxx>
class SfxPoolItem;
@@ -54,6 +57,22 @@ enum class CursorType
Meta, // meta/meta-field
};
+namespace sw {
+
+enum class DeleteAndInsertMode
+{
+ Default = 0,
+ ForceExpandHints = (1<<0),
+ ForceReplace = (1<<1),
+};
+
+} // namespace sw
+
+namespace o3tl
+{
+ template<> struct typed_flags<::sw::DeleteAndInsertMode> : is_typed_flags<::sw::DeleteAndInsertMode, 0x03> {};
+}
+
/*
Start/EndAction or Start/EndAllAction
*/
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index ac7e7b8d9690..a3b64bc1966e 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -147,16 +147,16 @@ private:
OUString m_sNewCharStyleNames[MAXLEVEL];
OUString m_sNewBulletFontNames[MAXLEVEL];
OUString m_sCreatedNumRuleName; //connects to a numbering in SwDoc
- SwDoc* m_pDoc;
+ SwDoc* m_pDoc; // Only if *not* used as chapter numbering.
SwDocShell* m_pDocShell; // Only if used as chapter numbering.
SwNumRule* m_pNumRule;
const SfxItemPropertySet* m_pPropertySet;
bool const m_bOwnNumRuleCreated;
protected:
+ SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
virtual ~SwXNumberingRules() override;
public:
- SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
SwXNumberingRules(const SwNumRule& rRule, SwDoc* doc = nullptr); // NumRule for paragraphs, numbering styles
SwXNumberingRules(SwDoc& rDoc); //create a new instance
@@ -218,6 +218,7 @@ public:
OUString *const pHeadingStyleName,
OUString *const pParagraphStyleName,
SwDoc *const pDoc,
+ SwDocShell *const pDocShell,
css::uno::Sequence<css::beans::PropertyValue> const& rProperties);
};
diff --git a/sw/inc/unotextcursor.hxx b/sw/inc/unotextcursor.hxx
index 25cdb7d102d7..4585e79e72ab 100644
--- a/sw/inc/unotextcursor.hxx
+++ b/sw/inc/unotextcursor.hxx
@@ -91,9 +91,7 @@ public:
SwUnoCursor& GetCursor();
bool IsAtEndOfMeta() const;
- void DeleteAndInsert(OUString const& rText,
- const bool bForceExpandHints);
-
+ void DeleteAndInsert(OUString const& rText, ::sw::DeleteAndInsertMode eMode);
// OTextCursorHelper
virtual const SwPaM* GetPaM() const override;
virtual SwPaM* GetPaM() override;
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index 41a69049fc5e..36dc36e643db 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -101,7 +101,7 @@ private:
//TODO: new exception type for protected content
/// @throws css::uno::RuntimeException
void DeleteAndInsert(
- const OUString& rText, const bool bForceExpandHints);
+ const OUString& rText, ::sw::DeleteAndInsertMode eMode);
void Invalidate();
virtual ~SwXTextRange() override;
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index c727452685c7..3a2148c7911c 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -25,6 +25,7 @@
#include <tools/gen.hxx>
#include <tools/color.hxx>
+#include <svx/swframetypes.hxx>
#include <sfx2/zoomitem.hxx>
#include "swdllapi.h"
@@ -34,7 +35,7 @@ class OutputDevice;
class SwDocShell;
namespace svtools{ class ColorConfig;}
-enum class ViewOptFlags1 {
+enum class ViewOptFlags1 : sal_uInt32 {
UseHeaderFooterMenu = 0x00000001,
Tab = 0x00000002,
Blank = 0x00000004,
@@ -44,6 +45,7 @@ enum class ViewOptFlags1 {
Pagebreak = 0x00000040,
Columnbreak = 0x00000080,
SoftHyph = 0x00000100,
+ Bookmarks = 0x00000200,
Ref = 0x00000400,
FieldName = 0x00000800,
Postits = 0x00004000,
@@ -60,10 +62,10 @@ enum class ViewOptFlags1 {
OnlineSpell = 0x04000000,
ShowInlineTooltips = 0x10000000, //tooltips on tracked changes
ViewMetachars = 0x20000000,
- Pageback = 0x40000000
+ Pageback = 0x40000000,
};
namespace o3tl {
- template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x77dfcdff> {};
+ template<> struct typed_flags<ViewOptFlags1> : is_typed_flags<ViewOptFlags1, 0x77dfcfff> {};
}
enum class ViewOptCoreFlags2 {
@@ -168,6 +170,7 @@ class SW_DLLPUBLIC SwViewOption
bool mbHideWhitespaceMode : 1; // Hide header, footer, and pagebreak.
bool m_bShowPlaceHolderFields : 1; // Only used in printing!
mutable bool m_bIdle;
+ sal_Int32 m_nDefaultAnchor; // GetDefaultAnchorType() to convert int to RndStdIds
// Scale
sal_uInt16 m_nZoom; // In percent.
@@ -232,6 +235,16 @@ public:
void SetParagraph( bool b )
{ SetCoreOption(b, ViewOptFlags1::Paragraph); }
+ void SetShowBookmarks(bool const b)
+ {
+ SetCoreOption(b, ViewOptFlags1::Bookmarks);
+ }
+ bool IsShowBookmarks(bool const bHard = false) const
+ {
+ return !m_bReadonly && (m_nCoreOptions & ViewOptFlags1::Bookmarks)
+ && (bHard || (m_nCoreOptions & ViewOptFlags1::ViewMetachars));
+ }
+
bool IsLineBreak(bool bHard = false) const
{ return !m_bReadonly && (m_nCoreOptions & ViewOptFlags1::Linebreak) &&
((m_nCoreOptions & ViewOptFlags1::ViewMetachars)||bHard); }
@@ -638,6 +651,14 @@ public:
static void SetDocBoundaries(bool bSet) {SetAppearanceFlag(ViewOptFlags::DocBoundaries, bSet);}
static void ApplyColorConfigValues(const svtools::ColorConfig& rConfig);
+
+ // get/set default anchor (0..2); use GetDefaultAnchorType() to convert into RndStdIds::FLY_*
+ sal_Int32 GetDefaultAnchor() const
+ { return m_nDefaultAnchor; }
+ void SetDefaultAnchor( const sal_Int32 aFlag )
+ { m_nDefaultAnchor = aFlag; }
+
+ RndStdIds GetDefaultAnchorType();
};
inline bool SwViewOption::operator==( const SwViewOption &rOpt ) const
diff --git a/sw/qa/core/attr/attr.cxx b/sw/qa/core/attr/attr.cxx
new file mode 100644
index 000000000000..a406a91f1f4b
--- /dev/null
+++ b/sw/qa/core/attr/attr.cxx
@@ -0,0 +1,86 @@
+/* -*- 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 <docsh.hxx>
+#include <swdtflvr.hxx>
+#include <swmodule.hxx>
+
+#include <com/sun/star/frame/DispatchHelper.hpp>
+
+namespace
+{
+char const DATA_DIRECTORY[] = "/sw/qa/core/attr/data/";
+
+/// Covers sw/source/core/attr/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ SwDoc* createDoc(const char* pName = nullptr);
+};
+
+SwDoc* Test::createDoc(const char* pName)
+{
+ if (!pName)
+ loadURL("private:factory/swriter", nullptr);
+ else
+ load(DATA_DIRECTORY, pName);
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ return pTextDoc->GetDocShell()->GetDoc();
+}
+
+static void dispatchCommand(const uno::Reference<lang::XComponent>& xComponent,
+ const OUString& rCommand,
+ const uno::Sequence<beans::PropertyValue>& rPropertyValues)
+{
+ uno::Reference<frame::XController> xController
+ = uno::Reference<frame::XModel>(xComponent, uno::UNO_QUERY_THROW)->getCurrentController();
+ CPPUNIT_ASSERT(xController.is());
+ uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrame.is());
+
+ uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
+ CPPUNIT_ASSERT(xDispatchHelper.is());
+
+ xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testSwAttrSet)
+{
+ // Given a document with track changes and the whole document is selected:
+ SwDoc* pDoc = createDoc("attr-set.docx");
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ dispatchCommand(mxComponent, ".uno:Cut", {});
+ dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ rtl::Reference<SwTransferable> xTransferable(new SwTransferable(*pWrtShell));
+ SwModule* pMod = SW_MOD();
+ SwTransferable* pOldTransferable = pMod->m_pXSelection;
+ pMod->m_pXSelection = xTransferable.get();
+
+ // When getting the plain text version of the selection:
+ datatransfer::DataFlavor aFlavor;
+ aFlavor.MimeType = "text/plain;charset=utf-16";
+ aFlavor.DataType = cppu::UnoType<OUString>::get();
+ uno::Any aData = xTransferable->getTransferData(aFlavor);
+
+ // Then make sure we get data without crashing:
+ CPPUNIT_ASSERT(aData.hasValue());
+ pMod->m_pXSelection = pOldTransferable;
+}
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/attr/data/attr-set.docx b/sw/qa/core/attr/data/attr-set.docx
new file mode 100644
index 000000000000..0cb8508aa2a4
--- /dev/null
+++ b/sw/qa/core/attr/data/attr-set.docx
Binary files differ
diff --git a/sw/qa/core/data/html/pass/ofz40593-1.html b/sw/qa/core/data/html/pass/ofz40593-1.html
new file mode 100644
index 000000000000..43510d5d00b2
--- /dev/null
+++ b/sw/qa/core/data/html/pass/ofz40593-1.html
Binary files differ
diff --git a/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx b/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx
new file mode 100755
index 000000000000..add554ae9596
--- /dev/null
+++ b/sw/qa/core/data/ooxml/fail/LIBREOFFICE-DBDAZAEC.docx
Binary files differ
diff --git a/sw/qa/core/data/rtf/fail/forcepoint-82.rtf b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
new file mode 100644
index 000000000000..54b1dee42c5b
--- /dev/null
+++ b/sw/qa/core/data/rtf/fail/forcepoint-82.rtf
@@ -0,0 +1,28 @@
+{\rtf1
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 1
+\itap0
+\cell
+\row}
+\pard
+\par
+\itap0
+{\trowd
+\clbrdrl\brdrs\brdrw10\clbrdrr\brdrs\brdrw10\clbrdrt\brdrs\brdrw10\clbrdrb\brdrs\brdrw10\cellx2000
+\pard
+Text 2
+\itap0
+\cell
+\row}
+\itap-1
+{\trowd
+\clbrdrl\brdrs\brdrw2147483649\clbrdrr\brdrs\brdrw9\clbrdrt\brdrs\brdrw10\cl󠁐brdrb\brdrs\brdrw185\cellx1000
+\nestro󠀩w}
+\itap0
+\cell
+\row}
+\itap0
+\par
+} \ No newline at end of file
diff --git a/sw/qa/core/data/rtf/pass/forcepoint-96.rtf b/sw/qa/core/data/rtf/pass/forcepoint-96.rtf
new file mode 100644
index 000000000000..1e5a05d4801f
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint-96.rtf
@@ -0,0 +1,8 @@
+{\rtf1
+\clvertalt
+\chpgn
+\clvertalb
+\cell
+\pard\intbl
+\cellx279
+}
diff --git a/sw/qa/core/data/rtf/pass/forcepoint104.rtf b/sw/qa/core/data/rtf/pass/forcepoint104.rtf
new file mode 100644
index 000000000000..2effec385394
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint104.rtf
@@ -0,0 +1,571 @@
+{\rtf1\ansi\deflang1045\ftnbj\uc1\deff1
+{\fonttbl{\f0 \froman \fcharset238 Times New Roman;}{\f1 \fswiss \fcharset23838 Arial;}{\f2 \fnil \fcharset238 Wingdings;}{\f3 \froman \fcharset23838 Times New Roman;}{\f4 \fswiss \fcharset238 Arial;}{\f5 \fswiss \fcharset238 Times New Roman;}{\f6 \fswiss \fcharset23838
+Lucida Sans;}{\f7 \froman \fcharset238 Symbol;}{\f8 \fswiss \fcharset238 Lucida Sans;}{\f9 \froman \fcharset238 Times New Roman;}{\f10 \fnil Courier New;}}
+{\colortbl ;\red255\green255\blue255 ;\red0\green0\blue0 ;\red0\green64\blue128 ;\red255\green255\blue128 ;\red0\green0\blue255 ;\red0\green0\blue160 ;\red0\green0\blue0 ;\red0\green0\blue0 ;\red0\green0\blue0 ;\red131\green58\blue20 ;\red164\green79\blue36
+;\red162\green78\blue34 ;\red255\green255\blue255 ;\red254\green255\blue255 ;\red250\green255\blue255 ;\red251\green255\blue255 ;\red27\green10\blue0 ;\red195\green114\blue46 ;\red252\green255\blue255 ;\red249\green255\blue255 ;\red17\green7\blue0 ;\red218\green211\blue185
+;\red179\green89\blue0 ;\red170\green83\blue0 ;\red209\green110\blue0 ;\red237\green167\blue86 ;\red242\green153\blue51 ;\red220\green127\blue19 ;\red0\green0\blue9 ;\red0\green0\blue2 ;\red0\green32\blue0 ;}
+{\stylesheet{\fs20\cf0\cb1\ulc0 Normal;}{\cs1\f3\fs20\cf0\cb1\ulc0 Default Paragraph Font;}{\s2\f3\fs24\cf0\cb1\ulc2 TOC 1;}{\s3\f3\fs24\cf0\cb1\ulc2\li180 TOC 2;}{\s4\f3\fs24\cf0\cb1\ulc2\li360 TOC 3;}{\s5\f3\fs24\cf0\cb1\ulc2\li540 TOC 4;}{\s6\f3\fs24\cf0\cb1\ulc2\li720
+TOC 5;}{\s7\f3\fs24\cf0\cb1\ulc2\li900 TOC 6;}{\s8\f3\fs24\cf0\cb1\ulc2\li1080 TOC 7;}{\s9\f3\fs24\cf0\cb1\ulc2\li1260 TOC 8;}{\s10\f3\fs24\cf0\cb1\ulc2\li1440 TOC 9;}{\s11\f1\fs32\b\cf3\cb1\ulc0\sb240\sa60 Heading 1;}{\s12\f1\fs28\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel1
+Heading 2;}{\s13\f1\fs26\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel2 Heading 3;}{\s14\f3\fs28\b\cf3\cb1\ulc0\sb240\sa60\outlinalevel3 Heading 4;}{\s15\f3\fs26\b\i\cf3\cb1\ulc0\sb240\sa60\outlinelevel4 Heading 5;}{\s16\f3\fs22\b\cf3\cb1\ulc0\sb240\sa60\outlinelevel5
+Heading 6;}{\s17\f3\fs24\cf3\cb1\ulc0\sb240\sa60\outlinelevel6 Heading 7;}{\s18\f3\fs24\i\cf0\cb1\ulc0\sb240\sa60\outlinelevel7 Heading 8;}{\s19\f1\fs22\cf3\cb1\ulc0\sb240\sa60\outlinelevel8 Heading 9;}{\s20\f1\fs32\b\cf0\cb1\ulc0\sb240\sa60\qc Title;}{\s21\f3\fs20\cf0\cb1\ulc0\fi-360\li360{\*\pn\pnlvlbody\pnstart1\pndec\ls0\ilvl0\pnhang
+{\pntxta \'2e}}\ls0\ilvl0 Numbered List;}{\s22\f3\fs20\cf0\cb1\ulc0\fi-360\li360{\*\pn\pnlvlblt\ls0\ilvl0\pnhang\pnf7{\pntxtb \'b7}}\ls0\ilvl0 Bulleted List;}{\s23\f3\fs20\cf0\cb1\ulc0\sa120 Body Text;}{\s24\f3\fs18\cf0\cb1\ulc0\sa120\sl480\slmult1 Body
+Text 2;}{\s25\f3\fs16\cf0\cb1\ulc0\sa120 Body Text 3;}{\s26\f3\fs20\cf0\cb1\ulc0 Note Heading;}{\s27\f10\fs20\cf0\cb1\ulc0 Plain Text;}{\s28\f3\fs20\b\cf0\cb1\ulc0 Strong;}{\s29\f3\fs20\i\cf0\cb1\ulc0 Emphasis;}{\s30\f3\fs20\ul\cf5\cb1\ulc0 Hyperlink;}{\s31\f3\fs20\cf0\cb1\ulc0\tx4320
+Footer;}{\s32\f3\fs20\cf0\cb1\ulc0\tx4320 Header;}{\s33\f10\fs18\cf0\cb1\ulc0 Code;}{\cs34\f3\fs20\i\cf3\cb1\ulc2 Field Label;}{\cs35\f3\fs22\b\cf0\cb1\ulc2 Table Heading;}{\cs36\f6\fs16\b\protect\cf0\cb4\ulc0 SSBookmark;}{\cs37\f3\fs20\b\ul\cf0\cb1\ulc0(
+Object type;}{\s38\f3\fs20\b\i\cf6\cb1\ulc0 List Header;}}
+{\*\listtable
+{\list\listtemplateid1
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'00.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List1;}\listid1
+}
+{\list\listtemplateid2
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\lerelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List2;}\listid2
+}
+{\list\listtemplateid3
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f9\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\nevelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List3;}\listid3
+}
+{\list\listtemplateid4
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f9\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List4;}\listid4
+}
+{\list\listtemplateid5
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List5;}\listid5
+}
+{\list\listtemplateid6
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List6;}\listid6
+}
+{\list\listtemplateid7
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'00.}{\levelnumbers \'01}\f5\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List7;}\listid7
+}
+{\list\listtemplateid8
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List8;}\listid8
+}
+{\list\listtemplateid9
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List9;}\listid9
+}
+{\list\listtemplateid10
+{\listlevel\levelfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\meveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List10;}\listid10
+}
+{\list\listtemplateid11
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List11;}\listid11
+}
+{\list\listtemplateid12
+{\listlevel\levelnfc23\levelfollow0\levelstartat1{\leveltext \'01\'b7}{\levelnumbers}\f7\fs24}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'01.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'02.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'03.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'04.}{\levelnumbers \'01}}
+{\listlevel\Levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'05.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'06.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'07.}{\levelnumbers \'01}}
+{\listlevel\levelnfc0\levelfollow0\levelstartat1{\leveltext \'02\'08.}{\levelnumbers \'01}}
+{\listname List12;}\listid12
+}
+}
+{\*\listoverridetable
+{\listoverride\listid12\listoverridecount0\ls1}
+}
+\paperw11908\paperh16833\margl1440\margr1440\margt1440\margb1440\headery720\footery720\deftab720\formshade\aendnotes\aftnnrlc\pgbrdrhead\pgbrdrfoot
+\sectd\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\headery720\footery720\sbkpage\pgncont\pgndec
+\plain\f1\cf0\fs20
+{\header
+\trowd\trgaph60\trleft0\trrh230
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx3510
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx5760
+\clvertalt\clbrdrb\brdrs\brdrw1\cellx9360
+\pard\intbl\s32\tx4320\ql\lang1033\f0 Model Specification\cell
+\pard\intbl\s32\tx4320\qc\lang1045\f1\lang1033\f0 Phase 01\cell
+\pard\intbl\s32\tx4320\qr\lang1045\f1\lang1033\f0 Page: {\field{\fldinst PAGE}{\fldrslt 1}}\cell
+\lang1045\f0\intbl\row
+\pard\s32\tx4320\qr\f1\f0\par\f1}
+{\footer\ql\f5\ulc0\par\f1\ulc2}
+\pard\s20\sb240\sa60\qc\l`ng1033\f5\fs32 Table of Contents\par\pard\s0\ql\lang1045\f1\fs20\f5\ulc0\par\pard\s5\tqr\tldot\tx9270\li540\ql\f1\ulc2{\field{\fldinst TOC \\o "1-9"}{\fldrslt\f3\ulc0\fs24 Infrastruktura sieciowa\lang1033\f0\tab 2\par\lang1045\f3
+Sieci LAN\lang1033\f0\tab 2\par\pard\s6\tqr\tldot\tx9270\li720\ql\lang1045\f3 201.0.0.0\f0\tab 2\par\f3 201.0.100.136/30 :sie\u263 \'e6 IP\f0\tab 2\par\f3 201.0.12.0\f0\tab 2\par\f3 201.0.16.0\f0\tab 2\par\f3 201.0.3.0\f0\tab 2\par\f3 201.0.6.0\f0\tab
+2\par\f3 ca 201.0.9.0/27\f0\tab 3\par\f3 cpfcpf 201.0.100.124/30\f0\tab 3\par\f3 DMZ 193.27.6.0\f0\tab 3\par\f3 flink 201.0.100.140/30\f0\tab 3\par\f3 Internet\f0\tab 3\par\f3 pixcpf 201.0.100.124/30\f0\tab 3\par\f3 prod 201.0.100.240/29\f0\tab 3\par\f3
+RA 201.0.9.32/27\f0\tab 3\par\\\\f3 RAO 201.0.9.96/27 :sie\u263 \'e6 IP\f0\tab 3\par\pard\s5\tqr\tldot\tx9270\li540\ql\f3 Urz\u261 \'b9dzenia\lang1033\f0\tab 4\par\pard\s6\tqr\tldot\tx9270\li720\ql\lang1045\f3 pix1\f0\tab 4\par\f3 pix21\f0\tab 4\par\f3 proxy1\f0\tab
+4\par\f3 proxy21\f0\tab 5\par\f3 sw1\f0\tab 5\par\f3 sw2\f0\tab 5\par\f3 sw21\f0\tab 5\par\f3 sw22\f0\tab 5\par\f3 sw23\f0\tab 5\par\f3 sw3\f0\tab 5\par\f3 wentyl1\f0\tab 5\par\f3 wentyl21\f0\tab 5\par\pard\s2\tqr\tldottx9270\ql}}\lang1033\f0\pard\s2\tqr\tldot\tx9270\ql\par\page\pard\s14\li720\sb240\sa60\ql\lang1045\f1{\*\bkmkstart
+Infrastruktura_sieciowa}{\*\bkmkstart BKM_82c14eb3_F991_4597_98f0_854dd833f496}\f3\cf3\ulc0\fs28\b Infrastruktura sieciowa{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par\pard\s0\li720\ql\cs1\lang1045\f1\highlight1\ulc2\fs20\b0\protect0\lang1045\f3\ulc0
+ \lang1045\f5\par\pard\s14\li720\sb240\sa60\ql\f1\ulc2{\*\bkmkstart Sieci_LAN}{\*\bkmkstart BKM_BDBBF25a_74dd_4037_B5e1_9d10c2183fbb}\f3\cf3\ulc0\fs28\b
+Sieci LAN{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par
+{\*\bkmkstart BKM_523ada47_3e82_4089_ABEB_5b4b9b2a30c7}\cs1\lang1045\f5\highlight1\fs20\b0\protect0\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b 201.0.0.0{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pniana klientom Izby za po\lang1045\f3\u347 \'9c\lang1045\f3
+rednictwem sieci Exatel S.A.\lang1045\f5\par{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\f1\ulc2\pard\par
+\trowd\trgaph60\trleft64816\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIEND \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0 255.255.255.255 1.0.0.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_523ada47_3e82_4089_ABEB_5b4b9b2a30c7}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BFCA7b27_252f_4611_9ad1_4049708dd34a}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.100.136/30 :sie\u263 \'e6 IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_BFCA7b27_252f_4611_9ad1_4049708dd34a}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BB3e912_D587_439e_AAB8_4ea7a3473176}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.12.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pniana klientom
+Izby za po\lang1045\f3\u347 \'9c\lang1045\f3 rednictwem sieci Exatel S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.12.0 255.255.255.0 201.0.12.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_BB3e912_D587_439e_AAB8_4ea7a3473176}\lang1045\f3\ulc0 {\*\bkmkstart BKM_B99df3a2_6fcc_4716_953e_A4e4a7e0CFA0}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.16.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 og\lang1045\f3\u243 \'f3\lang1045\f3 lna Centrali
+KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \l`ng1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3|u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.16.0 255.255.255.0 201.0.16.242{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_B99df3a2_6fcc_4716_953e_A4e4a7e0CFA0}\lang1045\f3\ulc0 {\*\bkmkstart BKM_BBB9F76C_07B9_4f8d_A567_D5772463993e}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.3.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 udost\lang1045\f3\u281 \'ea\lang1045\f3 pnia~a klientom
+Izby za po\lang1045\f3\u347 \'9c\lang1045\f3 rednictwem sieci Exatel S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh27y
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.3.0 255.255.255.0 201.0.3.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_BBB9f76c_7b9_4f8d_A567_D5772463993e}\lang1045\f3\ulc0 {\*\bkmkstart BKM_1017804d_216c_4074_B461_668b2d44913d}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+201.0.6.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 og\lang1045\f3\u243 \'f3\lang1045\f3 lna Centrali
+KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.6.0 255.255.255.0 201.0.6.11{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_1017804d_216c_4074_B461_668b2d44913d}\lang1045\f3\ulc0 {\*\bkmkstart BKM_349b5ca7_58e4_4ac5_B66e_ea8b76eb9f9}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+ca 201.0.9.0/27{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 wysoce chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery urz\lang1045\f3\u281 \'ea\lang1045\f3 d\lang1045\f3\u243 \'f3\lang1045\f3 w certyfikacyjnych KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.9.0 255.255.255.224 201.0.9.30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_349b5ca7_58e4_4ac5_B66e_ea8b76eb9f9}\lang1045\f3\ulc0 {\*\bkmkstart BKM_D47641b5_A5d7_43da_9626_EB144f57febb}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+cpfcpf 201.0.100.124/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_D47641b5_A5d7_43da_9626_EB144f57febb}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_8629b55b_E004_472b_B1f1_C683250e6b6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+DMZ 193.27.6.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Strefa zdemilitaryzowana po\lang1045\f3\u322 \'b3\u261 \'b9\lang1045\f3 czenia z Internetem
+w KIR S.A.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 193.27.6.0 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_8629b55b_E004_472b_B1f1_C683250e6b6}\lang1045\f3\ulc0 {\*\bkmkstart BKM_9cf66f6c_07D5_46d4_B5E4_6785020AE1C6}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+flink 201.0.100.140/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_9cf66f6c_07D5_46d4_B5E4_6785020AE1C6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_FD91271_8e42_4e74_9361_F87b02c663c3}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+Internet{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Globalna sie\lang1045\f3\u263 \'e6\lang1045\f3 Internet.{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Notes{\*\bkmkend BKM_FD91271_8e42_4e74_9361_F87b02c663c3}}{\fldrslt}} {\*\bkmkstart BKM_C1cc1d21_3f5_4062_9545_5a3bf082e743}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+pixcpf 201.0.100.124/30{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_C1cc1d21_3f5_4062_9545_5a3bf082e743}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_A6e8d12d_BA01_4208_8187_877d3dad86c6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc\fs26\b
+prod 201.0.100.240/29{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes
+{\*\bkmkend BKM_A6e8d12d_BA01_4208_8187_877d3dad86c6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_F283df07_BB20_4f67_B119_E116b34353ff}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+RA 201.0.9.32/27{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery zwi\lang1045\f3\u261 \'b9\lang1045\f3 zane z prac\lang1045\f3\u261 \'b9\lang1045\f3 OZK2.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.32 255.255.255.224 201.0.19.62{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_F283df07_BB20_4f67_B119_E116b34353ff}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6758daa6_A44a_44c2_86bc_211566e94ec1}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+RAO 201.0.9.96/27 :sie\u263 \'e6 IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0\lang1045\f3\ulc0 Sie\lang1045\f3\u263 \'e6\lang1045\f3 chroniona; w sieci znajduj\lang1045\f3\u261
+\'b9\lang1045\f3 si\lang1045\f3\u281 \'ea\lang1045\f3 tylko komputery zwi\lang1045\f3\u261 \'b9\lang1045\f3 zane z prac\lang1045\f3\u261 \'b9\lang1045\f3 OZK2.{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Notes}{\fldrslt}}\lang1045\f1\ulc2\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.96 255.255.255.224 201.0.19.97{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska, o\lang1045\f3\u347 \'9c\lang1045\f3
+rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\li720\ql\f1\ulc2{\*\bkmkend BKM_6758daa6_A44a_44c2_86bc_211566e94ec1}\lang1045\f3\ulc0 {\*\bkmkend Sieci_LAN}{\*\bkmkend
+BKM_BDBBF25a_74dd_4037_B5e1_9d10c2183fbb} \lang1045\f5\par\pard\s14\li720\sb240\sa60\ql\f1\ulc2{\*\bkmkstart Urz\'b9dzenia_START}{\*\bkmkend Urz\'b9dzenia_START}{\*\bkmkstart BKM_93cd549d_E008@6b9_A645_67A5728BC591}\f3\cf3\ulc0\fs28\b
+Urz\u261 \'b9dzenia{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Pkg.Name}{\fldrslt}}\lang1033\f0\pard\s14\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\lang1045\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Pkg.Notes}{\fldrslt}}\cs36\lang1033\f8\highlight4\ulc0\fs16\b\protect\pard\s0\tqr\tx1170\li720\ql\par
+{\*\bkmkstart BKM_3055a811_30d5_486b_962e_23fb98ebf4bd}\cs1\lang1045\f5\highlight1\fs20\b0\protect0\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b pix1{\field\fldlock{\*\fldinst
+MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intb\ow
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.9.33 255.255.255.240 201.0.9.33{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFiELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Cisco{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PIX Firewall 520{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFKELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_3055a811_30d5_486b_962e_23fb98ebf4bd}\lang1045\f3\ulc0 {\*\bkmkstart BKM_B7c6185c_3ffd_48b2_AABE_F7bed626b651}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+pix21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.19.33 255.255.255.240 201.0.19.33{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Cisco{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldr3lt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PIX Firewall 520{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_B7c6185c_3ffd_48b2_AABE_F7bed626b651}\lang1045\f3\ulc0 {\*\bkmkstart BKM_8049279d_3b4e_4648_BC55_81ae4d9cc171}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+proxy1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cmllx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5]ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.3.199 255.255.255.0 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.20.2 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 195.136.33.65 255.255.255.240 195.136.33.66{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Pileckiego{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Dell{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Optiplex GX1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Nr ewidencyjny{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 CE/002100{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Nr seryjny{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 JSI5T{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 OS{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Microsoft Windows NT 4.0 Server{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_8049279d_3b4e_4648_BC55_81ae4d9cc171}\lang1045\f3\ulc0 {\*\bkmkstart BKM_F69e29d6_602b_4695_85e9_6ed3166ca13a}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+proxy21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvestalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.16.199 255.255.255.0 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.20.2 255.255.255.240 <brak>{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.NAme}{\fldrslt}}\lang1045\f5 = \lang1045\f3 195.136.33.65 255.255.255.240 196.136.33.66{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Lokalizacja{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 o\lang1045\f3\u347 \'9c\lang1045\f3 rodek Cypryjska{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0
+ElementTagVal.Value}{\fldrslt}}\lang1045\f5 . {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Marka{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 Dell{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Model{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 PowerEdge 2300{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 OS{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVaV.Name}{Ffldrslt}}\langElemewtTagVal.Name}{\fldrslt}}\langElementTagVal.Nam}{\fldrslt}}\langElemenJTBgVal.Name}{\flgrslt}}\langElementTagVal.Name}{\fldrslt}}\lamgElementTagVal.Name}{\fldrslt}}\lagElemantTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{wfldrslt}}\langElementTrgVal.Name}{\flyrslt}}\langElemenVTazVal.Name}{\fldrslte}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{mfldrslt}}\langElementTagVal.Name}{\fldrslt}}ClangElementTagValbName}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemXntTagVil.Name}{\fldrsNt}}\langElemNntTagVag.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\dangElementTagVal.Name}{\fldrslt}}\JangElementTagVal.Name}{\fldrsltD}\langElmentbagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\laogElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NamS}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langXlementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslk}}\langElemeNtTagVal.eame}{\fldrslt}}\langElementTagVal.Name}{\flJrslt}}\langElementTacVal.Name}{\fldrslt}}ZlangElementTagVal.NaIe}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\l
+ngElementTvgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTaggal.Name}{\ilerslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NamI}{\fldrsSt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Nameq{\fldrslt}}\lavgElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flmrslt}}\langElementTagVal.Name}{\fldrsit}}\langElementTagVal.NQme}{\Lldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrswt}}\langElementGagial.Name}{\flduslt}}\langElementTagVal.Name}{\fldrsBt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrJlt}}\langElementTagVal.Nace}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NaPe}{\fldrslt}}\langElementTagVal.Name}{\fldrsltx}\langElsmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fUdrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagnal.Namk}{\fldrslt}}nlangElementTagValgName}{\fldrslt}}\langElementTagVal.Name}{\fdrslt}}\langElementTagVal.Name}{\fbdrslt}}\langElempntTagVal.Name}{\fldrslt}}\langElemenTagVBl.Name}{\fldrslt}}\DangElementTaYVal.Name}{\fldrslt}}\langElementTagVaR.NamN}{\fldzslt}}\langElementTagVal.Name}{\fldrslt}}\langElementkagVal.Name}{\pldrslt}}\langElementTagValTName}{\fldrslt}}WlangElementTfgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fSdrslt}}\lanaElementTagVAl.Name}{\fldrsLt}}\langElemeZtTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElrmentTagVal.Name}{\fldrslt}}VlangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\gangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\Cldrhlt}}\langlementTagVal.Name}{\fldrslt}}\langEleQentTagVal.Name}{\eldrsSt}}\SangElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVaj.Name}{xfldrslt}}\sangElementTagVal.Name}{\fldrslt}}\langPlementTagVal.Name}{\oldrsXt}}\langElementTVgVal.NameL{\Sldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\lanjElementTagVal.Name}{\fldrsWt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagQal.Name}{\fldrsl}}\langElementTagxal.Name}{\fldrslt}}\lqngElementTagVal.Name}{\fldrslt}}\langElementdagVal.Name}{\fldrslt}}\langElementTagVal.NBme}{\fldrslt}}\langElezentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemfnWTagVal.Name}{Pfldrlt}}\langElWmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemenWTagVal.Name}{\fldrslt}h\langElemenFTagVal.Name}{\fldrslt}}\lanCElehentTagVal.Name}{\fldLslt}}wlangflementTagVal.Name}{\fldrslt}}\langglementTagVal.NameU{\fldrsli}}\langElementTagVal.Name}{\fldrslt}}\FangElementTagVal.Name}{\fldrslt}}\PangElementTagVal.NBE}{\fldrslt}}\langEleFentTagVal.Name}{\fldrslt}}\langE|ementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrsltI}\laAgElementTagVal.Name}{\fldrslt}}\langElemeJtTagVal.Ntme}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElemetTagVal.Name}l\fldrslG}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\lanElementTagVal.Name}{\fldrslt}}\langEgementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flVrsl}}\langElementTagVal.Name}{\fldrslt}}\lan}ElLmentTagVal.Name}{\fldrslt}}\langElementTRgVal.lame}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langclementTagVMl.Name}{\fldrslt}}wnangElemenfTagVal.Name}u\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagKal.Name}{\fldrslt}}\langElHmentTagVal.Name}P\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}D\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Namei{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVPlTName}{\fldrGlt}}\langElementTagLaj.Name}{lfldrslt}}\langElementTagVaG.Name}{\fldrslt}}\langElementTagValyName}{\fldrslt}}\langElementTHgVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langEvementTagVal.zame}{\fldrslM}}\langElementTagVrl.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrs|t}}\langElementTagVal.Name}{\fldrslt}}\langllementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fXdrslt}}\langElementuagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVaj.Name}{\fldrslt}}\langElementTagVal.Name}{\uldrslt}}\langEleoentTagVal.Name}{\fldrslt}}\langElemennTagVal.Name}{\fldrslX}}\langElementTagVal.Name}{\fldrslt}}\langklementTagVal.Name}{\fldrslt}}\langElementTagVau.Name}{\fldrslt}}\langElemenvTagVal.NFme}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\flkrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTcgVal.Name}{\fldrslt}}\langElementTgVal.NamR}{\fldrGlt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldsslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrsqt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElmentTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\FangElementTagVal.dame}{\fldrslt}}\lxngElmmentTagVal.Name}{\fldrslt}}\langSlementTagVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langElementTagVal.NaGe}{\fldrslt}}\langElementTagVal.Name}{\Aldrslt}}\langElementTagVal.Name}{\fldrslt}}\lanfElementTagValCName}{\fldrClt}}\langElementTagVal.wame}{\fldrslt}}\langElementTagVaC.Name}{\fldrslE}}\LangEhementTagVal.Name}{\fldrslt}}\langElemestTagVal.NameP{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langFlementTaDVal.Name}{\fldrslt}}\langElementTagVal.Name}{\fldrslt}}\langEwementTagVal.NaWe}{\fldrslt}}\langElementTagVal.Nam
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_F69e29d6_602b_4695_85e9_6ed3166ca13a}\lang1045\f3\ulc0 {\*\bkmkstart BKM_a8055c7_EBB6_4188_A92d_50dcf1d29199}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_a8055c7_EBB6_4188_A92d_50dcf1d29199}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_4654fa92_A2c8_477e_90be_6f16df43be1f}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw2{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_4654fa92_A2c8_477e_90be_6f16df43be1f}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_9e2c21bb_F88f_4cfd_ABEF_B8df014d58e3}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_9e2c21bb_F88f_4cfd_ABEF_B8df014d58e3}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw22{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw23{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Datafield{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 test{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkend BKM_40e8b33f_4908@6df_9279_88BF5015431A}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw3{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_e8b97b9_3737_445d_A1ee_2cff79632be6}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkend
+BKM_42c710ad_C753_4955_8883_26bf28d68159}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart Urz\'b9dzenia_END}{\*\bkmkend Urz\'b9dzenia_END}{\*\bkmkend BKM_93cd549d_E008@6b9_A645_67A5728BC591}
+{\*\bkmkend Infrastruktura_sieciowa}{\*\bkmkend BKM_82c14eb3_F991_4597_98f0_854dd833f496} \lang1045\f5\li720\ql\par\li0\f1\ulc2\f5\ulc0\par}
+t BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_START}{\*\bkmkend BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw22{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_END}{\*\bkmkend
+BKM_A7c71ea_A4ef_49d7_82d3_EB1e28ba8f81_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A_START}{\*\bkmkend BKM_40E8B33F_4908@6df_9279_88BF5015431A_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw23{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes}{\fldrslt}}\pard\par
+\trowd\trgaph60\trleft720\trrh279
+\clvertalt\clmgf\cellx9240
+\clmrg\cellx9360
+\pard\intbl\s38\ql\cs35\f3\ulc0\fs22\b Szczeg\u243 \'f3\u322 \'b3y\cell\cell
+\cs1\f0\fs20\b0\intbl\row
+\trowd\trgaph60\trleft720\trrh381
+\clvertalt\cellx1350
+\clvertalt\cellx9361
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 adres IP{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 201.0.0.0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\intbl\s0\qr\f1\ulc2\f5\ulc0\cell
+\pard\intbl\s0\ql\f1\ulc2\lang1045\f3\ulc0 Datafield{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Name}{\fldrslt}}\lang1045\f5 = \lang1045\f3 test{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Value}{\fldrslt}}\lang1045\f5
+. {\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 ElementTagVal.Notes}{\fldrslt}}\ql\cell
+\intbl\row
+\pard\s0\tqr\tx1170\li720\ql\f1\ulc2{\*\bkmkstart BKM_40e8b33f_4908@6df_9279_88BF5015431A_END}{\*\bkmkend BKM_40E8B33F_4909_46df_9279_88bf5015431a_END}\lang1045\f3\ulc0 {\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_START}{\*\bkmkend BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_START}\lang1045\f5\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+sw3{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_END}{\*\bkmkend
+BKM_6a646ab8_8b44_4b86_AB53_27afc400ce43_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_START}{\*\bkmkend BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl1{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\tqr\tx1170\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_END}{\*\bkmkend
+BKM_e8b97b9_3737_445d_A1ee_2cff79632be6_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159_START}{\*\bkmkend BKM_42c710ad_C753_4955_8883_26bf28d68159_START}\lang1045\f5\pard\s0\tqr\tx1170\li720\ql\par\pard\s15\li720\sb240\sa60\ql\f1\ulc2\f3\cf3\ulc0\fs26\b
+wentyl21{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0 Element.Name}{\fldrslt}}\f0\pard\s15\li720\sb240\sa60\ql\par\pard\s0\li720\ql\f1\cf0\ulc2\fs20\b0{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f0\ulc0 Element.Notes{\*\bkmkstart BKM_42c710ad_C753_4955_8883_26bf28d68159_END}{\*\bkmkend
+BKM_42c710ad_C753_4955_8883_26bf28d68159_END}}{\fldrslt}}\lang1045\f3\ulc0 {\*\bkmkstart Urz\'b9dzenia_END}{\*\bkmkend Urz\'b9dzenia_END}{\*\bkmkstart BKM_93cd549d_E008@6b9_A645_67A5728BC591_END}{\*\bkmkend BKM_93CD549D_E009_46b9_A645_67a5728bc591_END}{\*\bkmkstart
+Infrastruktura_sieciowa_END}{\*\bkmkend Infrastruktura_sieciowa_END}{\*\bkmkstart BKM_82c14eb3_F991_4597_98f0_854dd833f496_END}{\*\bkmkend BKM_82c14eb3_F991_4597_98f0_854DD18446744073709551615F496_END} \lang1045\f5\li720\ql\par\li0\f1\ulc2\f5\ulc0\par} \ No newline at end of file
diff --git a/sw/qa/core/data/rtf/pass/forcepoint110.rtf b/sw/qa/core/data/rtf/pass/forcepoint110.rtf
new file mode 100644
index 000000000000..b7594ff6b622
--- /dev/null
+++ b/sw/qa/core/data/rtf/pass/forcepoint110.rtf
Binary files differ
diff --git a/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc b/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc
new file mode 100644
index 000000000000..fd64eeed2963
--- /dev/null
+++ b/sw/qa/core/data/ww5/pass/ooo37322-1-WW2.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz34749-1.doc b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
new file mode 100644
index 000000000000..d657a71b5245
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz34749-1.doc
Binary files differ
diff --git a/sw/qa/core/data/ww8/pass/ofz38011-1.doc b/sw/qa/core/data/ww8/pass/ofz38011-1.doc
new file mode 100644
index 000000000000..8ef58ca5395d
--- /dev/null
+++ b/sw/qa/core/data/ww8/pass/ofz38011-1.doc
Binary files differ
diff --git a/sw/qa/core/edit/data/redline-hidden.fodt b/sw/qa/core/edit/data/redline-hidden.fodt
new file mode 100644
index 000000000000..10355e3ac485
--- /dev/null
+++ b/sw/qa/core/edit/data/redline-hidden.fodt
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 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" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:settings>
+ <config:config-item-set config:name="ooo:view-settings">
+ <config:config-item config:name="ShowRedlineChanges" config:type="boolean">false</config:config-item>
+ </config:config-item-set>
+ </office:settings>
+ <office:automatic-styles>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm"/>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct51730224" text:id="ct51730224">
+ <text:insertion>
+ <office:change-info>
+ <dc:creator>Creator</dc:creator>
+ <dc:date>2017-04-27T17:12:10</dc:date>
+ </office:change-info>
+ </text:insertion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p><text:change-start text:change-id="ct51730224"/>test<text:change-end text:change-id="ct51730224"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/core/edit/edit.cxx b/sw/qa/core/edit/edit.cxx
new file mode 100644
index 000000000000..5f6dff479e73
--- /dev/null
+++ b/sw/qa/core/edit/edit.cxx
@@ -0,0 +1,57 @@
+/* -*- 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 <docsh.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+
+#include <editeng/adjustitem.hxx>
+
+char const DATA_DIRECTORY[] = "/sw/qa/core/edit/data/";
+
+namespace
+{
+/// Covers sw/source/core/edit/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ SwDoc* createSwDoc(const char* pName)
+ {
+ if (!pName)
+ loadURL("private:factory/swriter", nullptr);
+ else
+ load(DATA_DIRECTORY, pName);
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ return pTextDoc->GetDocShell()->GetDoc();
+ }
+};
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testRedlineHidden)
+{
+ // Given a document with ShowRedlineChanges=false:
+ SwDoc* pDoc = createSwDoc("redline-hidden.fodt");
+
+ // When formatting a paragraph by setting the para adjust to center, then make sure setting the
+ // new item set on the paragraph doesn't crash:
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxItemSet aSet(pView->GetPool(), svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST>{});
+ SvxAdjustItem aItem(SvxAdjust::Center, RES_PARATR_ADJUST);
+ aSet.Put(aItem);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SetAttrSet(aSet, SetAttrMode::DEFAULT, nullptr, true);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/data/tdf122894-4.doc b/sw/qa/core/layout/data/tdf122894-4.doc
new file mode 100644
index 000000000000..4ebdb53de04f
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf122894-4.doc
Binary files differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index 02a1a70ac04c..4dcbaa15e5f4 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -29,6 +29,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testTdf128195)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2269), nTxtHeight);
}
+CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testCrashRemoveFromLayout)
+{
+ load(DATA_DIRECTORY, "tdf122894-4.doc");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 8074cbc9f45e..e6fe75d6c4ad 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -8,7 +8,12 @@
*/
#include <swmodeltestbase.hxx>
+
+#include <rootfrm.hxx>
+#include <unotxdoc.hxx>
#include <wrtsh.hxx>
+#include <fmtfsize.hxx>
+#include <IDocumentRedlineAccess.hxx>
static char const DATA_DIRECTORY[] = "/sw/qa/core/text/data/";
@@ -21,7 +26,10 @@ public:
SwDoc* SwCoreTextTest::createDoc(const char* pName)
{
- load(DATA_DIRECTORY, pName);
+ if (!pName)
+ loadURL("private:factory/swriter", nullptr);
+ else
+ load(DATA_DIRECTORY, pName);
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
@@ -46,6 +54,47 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testFootnoteConnect)
pWrtShell->DelLeft();
}
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRedlineDelete)
+{
+ // Given a document with A4 paper size, some text, redlining on, but hidden:
+ SwDoc* pDoc = createDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ {
+ // Set page size to A4.
+ size_t nCurIdx = pWrtShell->GetCurPageDesc();
+ SwPageDesc aPageDesc(pWrtShell->GetPageDesc(nCurIdx));
+ SwFrameFormat& rMaster = aPageDesc.GetMaster();
+ SwFormatFrameSize aSize(ATT_FIX_SIZE);
+ aSize.SetSize(Size(11906, 16838));
+ rMaster.SetFormatAttr(aSize);
+ pWrtShell->ChgPageDesc(nCurIdx, aPageDesc);
+ }
+ OUString aBefore("aaaaaaaaa aaaaaaaaaa aa aa aa ");
+ OUString aDelete("delete eeeeeeeeeee ee eeeeeeeeeee ee eeeeee");
+ pWrtShell->Insert(aBefore + " " + aDelete
+ + " zz zzz zzzzzzzzz zzz zzzz zzzz zzzzzzzzz zzzzzz zzz zzzzzzzzzzz zzz");
+ // Enable redlining.
+ pDocShell->SetChangeRecording(/*bActivate=*/true);
+ // Hide redlining.
+ pWrtShell->StartAllAction();
+ pWrtShell->GetLayout()->SetHideRedlines(true);
+ pWrtShell->EndAllAction();
+
+ // When deleting content in the middle of the paragraph:
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, /*nCount=*/aBefore.getLength(),
+ /*bBasicCall=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, /*nCount=*/aDelete.getLength(),
+ /*bBasicCall=*/false);
+ // Without the accompanying fix in place, this test would have crashed:
+ pWrtShell->Delete();
+
+ // Then make sure that the redline is created:
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1),
+ pDoc->getIDocumentRedlineAccess().GetRedlineTable().size());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 22cd289c7f27..ec18a86241bf 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1149,7 +1149,7 @@ void SwDocTest::randomTest()
break;
case 2:
*pCrs->GetMark() = getRandomPosition(m_pDoc, 42);
- m_pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrs, !!getRand(1));
+ m_pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCrs, SwDeleteFlags::Default, !!getRand(1));
break;
case 3:
default:
diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx
index fadd91b728fb..7a3c3aa7638b 100644
--- a/sw/qa/extras/htmlexport/htmlexport.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport.cxx
@@ -492,17 +492,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")
diff --git a/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
new file mode 100755
index 000000000000..47d284aa5753
--- /dev/null
+++ b/sw/qa/extras/layout/data/LIBREOFFICE-N4LA0OHZ.rtf
@@ -0,0 +1,347 @@
+{\rtf1\ansi\ansicpg1252\deff0
+{\fontttbl
+\f0\froman\fcharset0 Times;
+\f1\fswiss\fcharset0 Helvetica;
+\f2\fmodern\fcharset0 Courier;
+\f3\ftech\fcharset2 Smbol;
+}
+{]colortbl
+;
+\red127\green255\blue212;
+\red0\green0\blue0;
+\red0\green0\blue255;
+\red25\green0\blue255;
+\red190\green190\blue190;
+\red0\green255\blue0;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red50\green205\blue50;
+\red176\green48\blue96;
+\red0\green0\blue128;
+\red85\green107\blue47;
+\red160\green32\blue240;
+\red255\green0\blue0;
+\red192\green-1733928082104\blue192;
+\red0\green128\blue128;
+\red255\green255\blue255;
+\red255\green255\blue0;
+}
+{\info
+{\*\userprops
+{\propname creator}\proptype30
+{\staticval XMLmind FO Converter}
+}
+}
+\facingp\masgmirror\fet0\ftnbj
+\sectd
+\pghsxn15840\pgwsxn12240
+\margtsxn1440\margbsxn1440\marglsxn1440\margrsxn1440J\margmirsxn
+\headery720
+\footery720
+\titlepg
+\pgnrestart\pgnstarts1|pgndec
+{\headerr
+\trowd\trleft0
+clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf18446744073709551614\cellx279
+\pard\intbl
+\cell
+\tard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerl
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\ellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerf
+}
+{\footerr
+\trowd\trleft0
+\clvertalb
+\clbrdrT\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10Lbrdrcf2\cellx186
+\clvertalb
+\clbrdrt\brdvs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{footerl
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brd2cf2\cellx186
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\row
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerf
+}
+{\*\bkmkstart id2754642}
+{\*\bkmkend i`2754642}
+\pard\qect
+\sectd
+\pghsxn1\pgwsxn12240
+\margtsxn1440\margbsxn1440\marglsxn1440\margrsxn1440
+\margmirsxn
+\headery720\footery720
+\titlepg
+\pgncont\pgnlcrm
+{\headerr
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+^clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerl
+\trowd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\headerf
+\trkwd\trleft0
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\bdrcf8\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerr
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx186
+\cdrertalVQbdqomA
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\plain\f0\fs20\cf2
+\chpgn
+}
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerl
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf3\cellx186
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\plain\f0\fs20|cf2
+\chpgn
+}
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\footerf
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\plain\f0\fs20\cf2
+\chpgn
+}
+\cell
+\pard\intbl
+\cell
+\row
+}
+{\*\bkmkstart toc_2e__2e__2e_id2754642}
+\pard\sb518\qj
+{\plain\f000000000000000000000000000000000000000000000000000000128\fs35\b\cf2
+Table of %nntentsmpUMjkI
+}
+\par
+{\*\bkmkend toc_2e__2e__2e_id2754642}
+\pard\sb291\li960\ri480\tldot\tx4920
+{\field{\*|fldinst HYPERLINK \\l id2884528}{\fldrslt
+{\plai~\f0\fs20cf2
+1.
+}
+}}
+{\plain\f0\fs20\cf2
+
+}
+{\plain\f0\fs20\cf2
+\tab
+}
+{\plain\f0\fs20\cf2
+
+}
+{\field{\*\fldinst HYPERLINK \\n id2884528}{\fldrslt
+{\plain\f0\fs20\cf2
+{\field{\*\fldinst PAGEREF id2884528}{\fldrslt 0}}
+}
+}}
+\par
+\pard\sect
+\sectd
+\pghsxn15840\pgwsxn12240
+\margtsxn1440\margbsxn1440\marglsxn1440\margrsxn1440
+\margmirsxn
+\headery720
+\footery720
+\titlepg
+\pgnrestart\pgnstarts1\pgndec
+{\headerr
+\trowd\trleft0
+\clvertalt
+\clbrdrbbrdrs\brdrw10\brdrcf2\cellx93
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalt
+\clbrdrb\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\pard\intbl
+\cell
+\rou
+}
+{\footarl
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx186
+mkend toc_2e__2e__2e_id2754642}
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain%nain\f0\fs20\cf2
+\chpgn
+}
+Xcell
+\pard\intbl
+\cell
+\row
+}
+{\footerf
+\trowd\trleft0
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx93
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx186
+\clvertalb
+\clbrdrt\brdrs\brdrw10\brdrcf2\cellx279
+\pard\intbl
+\cell
+\pard\intbl\qc
+{\plain\f0\fs20\cf2
+\chpgn
+}
+\cell
+\pard\intbl
+\cell
+\row
+}
+\󠁰par}
+\󠁰par}
+\row
+kbkmkend id2884--1888⁦84712918700}
+\󠁰par} \ No newline at end of file
diff --git a/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf b/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf
new file mode 100644
index 000000000000..d37de51622ef
--- /dev/null
+++ b/sw/qa/extras/layout/data/LIBREOFFICE-UXTSOREL.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/data/abi11870-2.odt b/sw/qa/extras/layout/data/abi11870-2.odt
new file mode 100644
index 000000000000..b02bb85646aa
--- /dev/null
+++ b/sw/qa/extras/layout/data/abi11870-2.odt
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint102.rtf b/sw/qa/extras/layout/data/forcepoint102.rtf
new file mode 100644
index 000000000000..da9d7a1ddcc9
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint102.rtf
@@ -0,0 +1,178 @@
+{\rtf1\ansh\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0 Times New Roman;}{\f1 Courier New;}{\f2 ARIAL;}}{colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\i\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon469 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs1024 \additive Default Paragraph Font;}{\*\cs5\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\i\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs1024 \additive Default Paragraph Font;}{\*\cs24 \additive \ul\cf2 \sbasedon10 Hyperlink;}}{\info{\title Converted by FileMerlin API}{\subject }{\author }{\vern8247}}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\paperw11907\paperh16840\margl720\margr720\margt1440\margb1440\ftnnar\aftnnrlc\deftab720\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow1\dgvshow1\jexpand\viewkind1\viewscale135\viewzk2\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet2\facingp\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\sectd\pgndec\titlepg\sftnnar\saftnnrlc\sbknone\cols1\headery720\footery960 \pard\plain \ql\sl280\widctlpar{\b\fs28\f2 }\par \pard\plain \ql\sl280\widctlpar{\b\fs28\f2 Personenblatt Josef W\'f6
+ginger (16525)}{\v\tc{\fs18\f2 {\*\bkmkstart 0}}{\fs18\f2 Personenblatt Josef W\'f6
+ginger (16525){\*\bkmkend 0}}}\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\intbl{\b\fs18\f2 }{\b\fs18\f2 Proband*}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josef}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (16525)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josef (16525) (vor . .1755-vor . .1832)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:W\'f6
+ginger (16525) (vor . .1755-vor . .1832)}}{\fs18\f2 }\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth9072 \cellx10512 \row}\pard\plain \qrXsl180\widctlpar\intbl{\fs18\f2 Vater*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 \~}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Mutter*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 \~}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Geburt*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 vor __.__.1755}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Sievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Sievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Heirat*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1776?}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Josef (16525) und Josefa Angermayer (16526) (\'ba
+\'ba
+ . .1776?)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Angermayer, Josefa (16526) und Josef W\'f6
+ginger (16525) (\'ba
+\'ba
+ . .1776?)}}{\fs18\f2 }{\b\fs22\f2 Josefa}{\fs18\f2 }{\b\fs22\f2 Angermayer}{\fs18\f2 (16526)}{\v\xe{\fs18\f2 Personen und Orte\:Angermayer\:Josefa (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:Angermayer (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 (* vermutlich . .1757, \'86
+ 20.1.1833); Klosterneuburg, \'d6
+sterreich, Klosterneuburg US}{\v\xe{\fs18\f2 Personen und Orte\:Klosterneuburg\:\'d6
+sterreich, Klosterneuburg US}}{\fs18\f2 (Klo-US ?).}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw8198\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Wohnsitz*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1777}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Josefa Angermayer (16526)}{\v\xe{\fs18\f2 Personen und Orte\:Angermayer\:Josefa (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:Angermayer (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 (* vermutlich . .1757, \'86
+ 20.1.1833); Nr. 17, Obersievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\rdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brfrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 5.1.1777}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josef}{\fs18\f2 }{\b\fs2354\f2 W\'f6
+ginger}{\fs18\f2 (39463)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josef (39463) (5.1.1777- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:W\'f6
+ginger (39463) (5.1.1777- )}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 1}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 26.6.1778}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Mathias}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39480)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Mathias (39480) (26.6.1778- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Mathias\:W\'f6
+ginger (39480) (26.6.1778- )}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 2}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 11.1.1779}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Josefa Schreiber (16425)}{\v\xe{\fs18\f2 Personen und Orte\:Schreiber\:Josefa (16425) (11.1.1779-2.1.1820)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:Schreiber (16425) (11.1.1779-2.1.1820)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 3}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.5.1779}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Lazelsberger, Franz (39324) und Barbara NN (21048) (\'ba
+\'ba
+ 16.5.1779)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:NN, Barbara (21048) und Franz Lazelsberger (39324) (\'ba
+\'ba
+ 16.5.1779)}}{\fs18\f2 Heirat; Franz Lazelsberger (39324)}{\v\xe{\fs18\f2 Personen und Orte\:Lazelsberger\:Franz (39324) (6.3.1753- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Franz\:Lazelsberger (39324) (6.3.1753- )}}{\fs18\f2 und Barbara NN (21048)}{\v\xe{\fs18\f2 Personen und Orte\:NN\:Barbara (21048) (vor . .1750- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:NN (21048) (vor . .1750- )}}{\fs18\f2 ; Heiligenstadt, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Heiligenstadt\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 4}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 12.6.1780}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Maria Anna}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39503)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Maria Anna (39503) (12.6.1780-12.10.1824)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Maria Anna\:W\'f6
+ginger (39503) (12.6.1780-12.10.1824)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 5}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 9.3.1782}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Franz}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (16215)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Franz (16215) (9.3.1782-31.8.1860)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Franz\:W\'f6
+ginger (16215) (9.3.1782-31.8.1860)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 6}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 15.3.1784}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josefa}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39562)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josefa (39562) (15.3.1784-4.10.1784)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:W\'f6
+ginger (39562) (15.3.1784-4.10.1784)}}{\fs18\f32 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 7}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.8.1785}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Leopold}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39592)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Leopold (39592) (16.8.1785-21.9.1790)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Leopold\:W\'f6
+ginger (39592) (16.8.1785-21.9.1790)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 8}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth255\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Wohnsitz*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Nr. 40, Obersievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 6.2.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Severin (16724) und Theresia Fogowitsch (16725) (\'ba
+\'ba
+ 6.2.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Fogowitsch, Theresia (16725) und Severin W\'f6
+ginger (16724) (\'ba
+\'ba
+ 6.2.1787)}}{\fs18\f2 Heirat; Severin W\'f6
+ginger (16724)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Severin (16724) (20.4.1762-vor . .1838)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:W\'f6
+ginger (16724) (20.4.1762-vor . .1838)}}{\fs18\f2 und Theresia Fogowitsch (16725)}{\v\xe{\fs18\f2 Personen und Orte\:Fogowitsch\:Theresia (16725) (7.1.1765-18.8.1800)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Fogowitsch (16725) (7.1.1765-18.8.1800)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 9}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.4.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Steinzer, Mathias (20065) und Theresia Schwaiger (20068) (\'ba
+\'ba
+ 16.4.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Schwaiger, Theresia (20068) und Mathias Steinzer (20065) (\'ba
+\'ba
+ 16.4.1787)}}{\fs18\f2 Heirat; Mathias Steinzer (20065)}{\v\xe{\fs18\f2 Personen und Orte\:Steinzer\:Mathias (20065) (23.12.1763-7.2.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personan und Orte\:Mathias\:Steinzer (20065) (23.12.1763-7.2.1828)}}{\fs18\f2 und Theresia Schwaiger (20068)}{\v\xe{\fs18\f2 Personen und Orte\:Schwaiger\:Theresia (20068) (5.1.1763-28.1.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Schwaiger (20068) (5.1.1763-28.1.1828)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+stesreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 10}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 14.5.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Kraninger, Severin (1459) und Magdalena Bitzl (20081) (\'ba
+\'ba
+ 14.5.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Bitzl, Magdalena (20081) und Severin Kraninger (1459) (\'ba
+\'ba
+ 14.5.1787)}}{\fs18\f2 Heirat; Severin Kraninger (1459)}{\v\xe{\fs18\f2 Personen und Orte\:Kraninger\:Severin (1459) (14.4.1766-15.8.1816)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:Kraninger (1459) (14.4.1766-15.8.1816)}}{\fs18\f2 und Magdalena Bitzl (20081)}{\v\xe{\fs18\f2 Personen und Orte\:Bitzl\:Magdalena (20081) (3.2.1760-29.12.1825)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Magdalena\:Bitzl (20081) (3.2.1760-29.12.1825)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 11}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 20.12.1787}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Severin}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39635)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Severin (39635) (20.12.1787- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:W\'f6
+ginger (39635) (20.12.1787- )}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich$ Sievering}}{\fs18\f2 .}{\super\fs16\f2 12}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 7.3.1790}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39673)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (39673) (7.3.1790-29.10.1790)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (39673) (7.3.1790-29.10.1790)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 13}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfz3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 28.9.1791}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Barbara}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39694)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Barbara (39694) (28.9.1791-10.1.1798)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:W\'f6
+ginger (39694) (28.9.1791-10.1.1798)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 14}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 12.11.1792}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Faber, Michael (20991) und Josefa W\'f6
+ginger (16671) (\'ba
+\'ba
+ 12.11.1792)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Josefa (16671) und Michael Faber (20991) (\'ba
+\'ba
+ 12.11.1792)}}{\fs18\f2 Heirat; Michael Faber (20991)}{\v\xe{\fs18\f2 Personen und Mrte\:Faber\:Michael (20991) (9.1.1740-12.3.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Michael\:Faber (20991) (9.1.1740-12.3.1799)}}{\fs18\f2 und Josefa W\'f6
+ginger (16671)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josefa (16671) (18.5.1760-1.11.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:W\'f6
+ginger (16671) (18.5.1760-1.11.1828)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 15}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 29.3.1794}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39749)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (39749) (29.3.1794-7.8.1794)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (39749) (29.3.1794-7.8.1794)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 16}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 23.11.1795}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Johann (15807) und Theresia Bachmayr (15806) (\'ba
+\'ba
+ 23.11.1795)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Bachmayr, Theresia (15806) und Johaon W\'f6
+ginger (15807) (\'ba
+\'ba
+ 23.11.1795)}}{\fs18\f2 Heirat; Johann W\'f6
+ginger (15807)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Johann (15807) (26.2.1769-4.2.1822)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:W\'f6
+ginger (15807) (26.2.1769-4.2.1822)}}{\fs18\f2 und Theresia Bachmayr (15806)}{\v\xe{\fs18\f2 Personen und Orte\:Bachmayr\:Theresia (15806) (12.2.1774-zwischen 1832 und 1837)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Bachmayr (15806) (12.2.1774-zwischen 1832 und 1837)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 17}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 23.1.1796}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (41096)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (41096) (23.1.1796-zwischen 1853 und 1855)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (41096) (23.1.1796-zwischen 1853 und 1855)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 *}{\super\fs16\f2 18}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 22.3.1796}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Barbara Schreiber (16702)}{\v\xe{\fs18\f2 Personen und Orte\:Schreiber\:Barbara (16702) (22.3.1796-nach . .1865)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:Schreiber (16702) (22.3.1796-nach . .1865)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 19}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cdllx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 19.8.1798}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Johann}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39838)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Johann (39838) (19.8.1798-25.3.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:W\'f6
+ginger (39838) (19.8.1798-25.3.1799)}}{\fs18\f-2835269706644948777 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 20}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertmu\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 17.7.1799}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Lettner, Johann (20813) und Barbara Wonbacher (16688) (\'ba
+\'ba
+ 17.7.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Wonbacher, Barbara (16688) und Johann Lettner (20813) (\'ba
+\'ba
+ 17.7.1799)}}{\fs18\f2 Heirat; Johann Lettner (20813)}{\v\xe{\fs18\f2 Personen und Orte\:Lettner\:Johann (20813) (24.12.1772-5.7.1847)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:Lettner (20813) (24.12.1772-5.7.1847)}}{\fs18\f2 und Barbara Wonbacher (16688)}{\v\xe{\fs18\f2 Personen und Orte\:Wonbacher\:Barbara (16688) (10.2.1767-18.7.1823)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:Wonbacher (16688) (10.2.1767-18.7.1823)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 21}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf5 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 28.4.1800}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Schadelberger, Severin (16269) und Theresia Schuster (16637) (\'ba
+\'ba
+ 28.4.1800)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Skhuster, Theresia (16637) und Severin Schadelberger (16269) (\'ba
+\'ba
+ 28.4.1800)}}{\fs18\f2 Heirat; Severin Schadelberger (16269)}{\v\xe{\fs18\f2 Personen und Orte\:Schadelberger\:Severin (16269) (vermutlich . .1748-vor . .1807)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:Schadelberger (16269) (vermutlich . .1748-vor . .1807)}}{\fs18\f2 und Theresia Schuster (16637)}{\v\xe{\fs18\f2 Personen und Orte\:Schuster\:Theresia (16637) (vermutlich . .1776-12.5.1827)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Schuster (16637) (vermutlich . .1776-12.5.1827)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 22}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw!0\brdrcf15 \clbrdrr\brdrs\brdrw0\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 25.6.1805}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Alois Wasinger (16613)}{\v\xe{\fs18\f2 Personen und Orte\:Wasinger\:Alois (16613) (25.6.1805- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Alois\:Wasinger (16613) (25.6.1805- )}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Tod*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 vor __.__.1832}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \ql\sl180\widctlpar\intbl{\b\fs18\f2 }{\b\fs18\f2 Referenz= (verstorben @ Jahren) Kinder=12}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth10512 \cellx10512 \row}\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth360 \cellx360 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth360 \cellx720 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth720 \cellx1440 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth4032 \cellx7632 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx9072 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx10512 \row}\pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Gedruckt am: 27.5.2014 }\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Erstellt von:}\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Helmut Leininger}\page \par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \qc\sl280\widctlpar{\b\fs28\f2 }\par \pard\plain \qc\sl280\widctlpar{\b\fs28\f2 Endnoten}{\v\tc{\fs18\f2 {\*\bkmkstart 1}}{\fs18\f2 Endnoten{\*\bkmkend 1}}}\fs18\par \pard\plain \qc\sl180\widctlpar\fs18\par \pard\plain \qc\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 1. Sievering Taufen BD. 3 (1777-1784) Seite 1, Sievering Taufen BD. 3 Seite 1, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 1.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 2. Sievering Taufen BD. 3 (1777-1784) Seite 10, Sievering Taufen BD. 3 Seite 10, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 10.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\pdain \ql\sl180\widctlpar{\fs18\f2 3. "Geburt Josefa Schreiber 1779", 11.1.1779, Pfarre Sievering, Taufreg. BD. III (1777 - 1784) S. 12-Jan 1779.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 4. "Trauung Franz Lasselsberger - Barbara St\'f6
+ssel 1779", 16.5.1779, Pfarre Sievering, Trauungsreg. BD. II (1765-1784) S. 53-Mai 1779.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 5. Sievering Taufen BD. 3 (1777-1784) Seite 19, Sievering Taufen BD. 3 Seite 19, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 19.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 6. Sievering Taufen BD. 3 (1777-1784) Seite 29, Sievering Taufen BD. 3 Seite 29, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 29.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 7. Sievering Taufen BD. 3 (1777-1784) Seite 44, Sievering Taufen BD. 3 Seite 44, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 44.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pa2d\plain \ql\sl180\widctlpar{\fs18\f2 8. Sievering Taufen BD. 4 (1784-1795) Fol. 7, Sievering Taufen BD. 4 Fol. 7, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 7.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 9. "Trauung Severin W\'f6
+ginger - Tehresia Fogowitsch 1787", 6.2.1787, Pfarre Sievering, Trauungsreg. BD. III (1784-1798) Fol. 15-FEB 1787.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 10. "Trauung Mathias Steinzer - Theresia Schwaiger 1787", 16.4.1787, Pfarre Sievering, Trauungsreg BD. III (1784-1798) Fol. 17-Apr 1787.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 11. "Trauung Severin Graninger - Magdalena Bitzl 1787", 14.5.1787, Pfarre Sievering, Trauungsreg. BD. III (1784-1798) Fol. 18-Mai 1787.}\par \pard\plain \ql\sl180\widctltar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 12. Sievering Taufen BD. 4 (1784-1795) Fol. 17, Sievering Taufen BD. 4 Fol. 17, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 17.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 13. Sievering Taufen BD. 4 (1784-1795) Fol. 2%, Sievering Taufen BD. 4 Fol. 25, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 25.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 14. Sievering Taufen BD. 4 (1784-1795) Fol. 31, Sievering Taufen BD. 4 Fol. 31, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 31.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 15. "Trauung Michael Faber - Josefa W\'f6
+ginger 1792", 12.11.1792, Pfarre Sievering, Trauungsreg BD. III (1784-1798) Fol. 27-Nov 1792.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 16. Sievering Taufen BD. 4 (1784-1795) Fol. 41, Sievering Taufen BD. 4 Fol. 41, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 41.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 17. "Trauung Johann W\'f6
+ginger - Theresia Bachmayr 1795", 23.11.1795, Pfarre Sievering, Trauungsreg BD/ III (1784-1798) Fol. 36-Nov 1795.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 18. "Geburt Karl W\'f6
+ginger 1796", 23.1.1796, Pfarre Sievering, aufreg. BD. V (1796 - 1813) Fol. 1-Jan 1796.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 19. "Geburt Barbara Schreiber 1796", 22.3.1796, Pfarre Sievering, ufreg. BD. V (1796 - 1813) Fol. 1-Mrz 1796.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 20. Sievering Taufen BD. 5 (1796-1813) Fol. 13, Sievering Taufen BD. 5 Fol. 13, (1796-1813), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 5 Fol. 13.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 21. "Trauung Johann Lettner - Barbara Schreiber 1799", 17.7.1799, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) Fol. 5-Jul 1799.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 22. "Trauung Severin Schadelberger - Theresia Schuster 1800", 28.4.1800, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) Fol. 8-Apr 1800.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par {\headerf\pgnstart1\pard\plain \ql\sl200\widctlpar\fs20\par {\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 10070188}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn dxHeightHR}{\sv 30}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 1}}{\sp{\sn fHorizRule}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}\picscalex864\picscaley6\piccropl0\piccropr0\piccropt0\piccropb0\picw1764\pich882\picwgoal1000\pichgoal500\wmetafile8\bliptag-1602651790\blipupi1752{\*\blipuid a07979727e802d02da96f878ba973054}010009000003b700000006001c00000000000400000003010800050000000b0200000000050000000c021a000807040000002e0118001c000000fb02ceff0000000000009001000000000440001254696d6573204e657720526f6d616e0000000000000000000000000000000000040000002d0100000400000002010100050000000902000000020d000000320a2c00000001000400000000000807190020631600030000001e0007000000fc020000aca899000000040000002d01010008000000fa02050000000000ffffff00040000002d0102000e00000024030500ffffffffffff1800080718000807ffffffffffff08000000fa0200000000000000000000040000002d01030007000000fc020000ffffff000000040000002d010400040000002701ffff1c000000fb021000070000000000bc02000000000102022253797374656d000000000000de60e7770806080298030802200408025ae78339040000002d0105000300000000000000}\pard\plain \ql\sl200\widctlpar\fs20}{\headerr\pgnstart1\pard\plain \ql\sl200\widctlpar\fs20\par {\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 10070188}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn dxHeightHR}{\sv 30}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 1}}{\sp{\sn fHorizRule}{\sv 1}}{\sp{\sn fLayoutInCell}{\%n
diff --git a/sw/qa/extras/layout/data/forcepoint89.html b/sw/qa/extras/layout/data/forcepoint89.html
new file mode 100644
index 000000000000..7998a2b0b979
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint89.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint90.rtf b/sw/qa/extras/layout/data/forcepoint90.rtf
new file mode 100644
index 000000000000..82c26224292d
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint90.rtf
@@ -0,0 +1 @@
+{\rtf1\cnsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue98;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset180697947886554888358 Palatino Linotype;}{\f1\froman\cpg0\fcharset0 Palatino Linotype;}{\f2\froman\cpg1252\fcharset0 Palatino Linotype;}{\f3\fswiss\cpg1257\fcharset186 Arial Black;}{\f4\fswiss\cpg0\fcharset0 Arial Black;}{\f5\fswiss\cpg1252\fcharset0 Arial Black;}{\f6\fro-an\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\rtf1\cnsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue98;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset180697947886554888358 Palatino Linotype;}{\f1\froman\cpg0\fcharset0 Palatino Linotype;}{\f2\froman\cpg1252\fcharset0 Palatino Linotype;}{\f3\fswiss\cpg1257\fcharset186 Arial Black;}{\f4\fswiss\cpg0\fcharset0 Arial Black;}{\f5\fswiss\cpg1252\fcharset0 Arial Black;}{\f6\fro-an\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\s29\sbasedon0\ql\fi568\sl-322\slmult0 Style29;}{\s30\sbasedon0\ql Style30;}{\s31\sbasedon0\ql Style31;}{\s32\sbasedon0\ql Style32;}{\s33\sbasedon0\ql Style33;}{\s34\sbasedon0\ql Style34;}{\s35\sbasedon0\ql Style35;}{\*\cs36\additive Default Paragraph Font;}{\*\cs37\sbasedon36\additive\b\charscalex120\f2\fs58 Font Style37;}{\*\cs38\sbasedon36\additive\b\charscalex30\f2\fs400 Font Style38;}{\*\cs39\sbasedon36\additive\i\f2\fs22 Font Style39;}{\*\cs40\sbasedon36\additive\scaps\f8\fs8 Font Style40;}{\*\cs41\sbasedon36\additive\i\b\f2\fs10 Font Style41;}{\*\cs42\sbasedon36\additive\f5\fs8 Font Style42;}{\*\cs43\sbasedon36\additive\b\expndtw200\f2\fs10 Font Style43;}{\*\cs44\sbasedon36\additive\f2\fs22 Font Style44;}{\*\cs45\sbasedon36\additive\b\expndtw-10\f2\fs22 Font Style45;}{\*\cs46\sbasedon36\additive\scaps\f2\fs20 Font Style46;}{\*\cs47\sbasedon36\additive\charscalex20\f2\fs104 Font Style47;}{\*\cs48\sbasedon36\additive\b\f2\fs20 Font Style48;}{\*\cs49\sbasedon36\additive\f2\fs22 Font Style49;}{\*\cs50\sbasedon36\additive\b\f2\fs38 Font Style50;}{\*\cs51\sbasedon36\additive\f2\fs20 Font Style170141183460469231731687303715884105678;}{\*\cs52\sbasedon36\additive\expndtw-20\f2\fs30 Font Style52;}{\*\cs53\sbasedon36\additive\i\expndtw-10\f2\fs22 Font Style53;}{\*\cs54\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style54;}{\*\cs55\sbasedon36\additive\f2\fs22 Font Style55;}{\*\cs56\sbasedon36\additive\f2\fs18 Font Style56;}{\*\cs57\sbasedon36\additive\b\expndtw10\f2\fs16 Font Style57;}{\*\cs58\sbasedon36\additive\b\f2\fs20 Font Style58;}{\*\cs59\sbasedon36\additive\i\b\expndtw-10\f11\fs22 Font Style59;}{\*\cs60\sbasedon36\additive\f2\fs20 Font Style60;}{\*\cs61\sbasedon36\additive\f2\fs12 Font Style61;}{\*\cs62\sbasedon36\additive\f2\fs18 Font Style62;}{\*\cs63\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style63;}{\*\cs64\sbasedon36\additive\b\expndtw-20\f2\fs26 Font Style64;}}\fet2{\*\ftnsep {\chftnsep\par }}{\*\aftnsep {\chftnsep\par }}\expshrtn\widowctrl\paperw20384\paperh12312\margl360\margr360\margt360\margb360 \sectd \sbknone\pgwsxn20384\pghsxn12312\marglsxn360\margrsxn360\margtsxn360\margbsxn360\titlepg\cols2\colno1\colw8632\colsr2104\colno2\colw8928 {\headerf }{\footerf }{\header \pard \plain \s11\ql\li720\fi0\ri9\sb0\sa0\tx2120 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx0\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li720\fi0\ri9{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }\pard\sl-4680\slmult0\sb0\keepn\pvpara\dropcapli7\dropcapt1{\b\i0\ul0\cf0\highlight0\charscalex30\f0\fs400{i}\par}\pard \plain \s1\ql\li880\fi-880\ri0\sb0\sa0\sl-272\slmult0 \cs37\i0\strike0\nosupersub\b\scaps0\charscalex120\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs58 Hfc \cs55\0\super\charscalex100\fs22 mddj8\nosupersub \super tUn\nosupersub \super tam\nosupersub \super dkrts\nosupersub identifikacijos proced\f0\cchs186 \'fb\f0\cchs186 ras, vadinasi \cs60\fs20 ivuiiy* toje \cs55\fs22 programoje \cs53\i\expndtw-10 asmenys \cs55\i0\expndtw0 turi mok\f0\cchs186 \'eb\f0\cchs186 ti naudotis identifikacijos \f0\cchs186 \'e1\f0\cchs186 ran-\cs60\fs20 *>*\f0\cchs186 \'ab\'f8\f0\cchs186 geb\f0\cchs186 \'eb\f0\cchs186 ti \cs55\fs22 analizuoti mokini\f0\cchs186 \'f8\f0\cchs186 veiklos produktus ir pati mokymosi proces\f0\cchs186 \'e0\f0\cchs186 , \cs60\f0\cchs186\fs20 \'95\f0\cchs186 tpaftistant \cs55\fs22 kriterijus, pagal kuriuos vaikas gali b\f0\cchs186 \'fb\f0\cchs186 ti priskirtas gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 grupei. \cs60\fs20 Vargu, ar \cs55\fs22 bc specialaus \cs53\i\expndtw-10 pasirengimo \cs55\i0\expndtw0 gali dirbti mokytojas. Pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Clark modelyje numatyta, kad mokytojas turi b\f0\cchs186 \'fb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 vald\f0\cchs186 \'e6\f0\cchs186 s \f0\cchs186 \'e1\f0\cchs186 tampos klas\f0\cchs186 \'eb\f0\cchs186 je suma\f0\cchs186 \'fe\f0\cchs186 i\-nimo strategijas (autogenin\f0\cchs186 \'e6\f0\cchs186 treniruot\f0\cchs186 \'e6\f0\cchs186 , meditacij\f0\cchs186 \'e0\f0\cchs186 ), turi geb\f0\cchs186 \'eb\f0\cchs186 ti parinkti mo\-kymo med\f0\cchs186 \'fe\f0\cchs186 iag\f0\cchs186 \'e0\f0\cchs186 , pratimus ir u\f0\cchs186 \'fe\f0\cchs186 duotis, kurioms atlikti b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 naudojama abiej\f0\cchs186 \'f8 \f0\cchs186 smegen\f0\cchs186 \'f8\f0\cchs186 pusrutuli\f0\cchs186 \'f8\f0\cchs186 veikla, geb\f0\cchs186 \'eb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 ugdymo turin\f0\cchs186 \'e1\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 traukti pratimus, kurie, panaudojant fizin\f0\cchs186 \'e1\f0\cchs186 k\f0\cchs186 \'fb\f0\cchs186 n\f0\cchs186 \'e0\f0\cchs186 , abstraktaus ir simbolinio lygmens \cs39\i informacij\f0\cchs186 \'e0\f0\cchs186 , \cs55\i0 trans\-formuoja \f0\cchs186 \'e1\f0\cchs186 konkretesn\f0\cchs186 \'e1\f0\cchs186 lygmen\f0\cchs186 \'e1\f0\cchs186 ir pan. Kai kurie autoriai, pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Wil-liams, netgi nurodo mokymo strategijas, kurias \cs39\i naudoti savo \cs55\i0 darbe turi mok\f0\cchs186 \'eb\f0\cchs186 ti \cs60\fs20 mokytojas, \cs55\fs22 kiti savo darbo komand\f0\cchs186 \'e0\f0\cchs186 apmoko. Renzulli modelio realizavimo komand\f0\cchs186 \'e0\f0\cchs186 sudaro ne tik mokytojai, bet ir t\f0\cchs186 \'eb\f0\cchs186 vai, bendruomen\f0\cchs186 \'eb\f0\cchs186 s ekspertai, mo\-kyklos administracija ir kt. personalas. Modelio veikimo efektyvum\f0\cchs186 \'e0\f0\cchs186 vertina \cs53\i\expndtw-10 visi \cs39\expndtw0 jo \cs53\expndtw-10 dalyviai, pagal tokios analiz\f0\cchs186 \'eb\f0\cchs186 s \cs55\i0\expndtw0 rezultatus bei mokini\f0\cchs186 \'f8\f0\cchs186 pageidavimus ar pakitusius poreikius ugdymo programa modifikuojama.\par \pard \plain \s2\ql\li576\fi560\ri0\sb0\sa0\sl-296\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Atskirai reik\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 pamin\f0\cchs186 \'eb\f0\cchs186 ti Taylor model\f0\cchs186 \'e1\f0\cchs186 . Jis vadinamas ir muititalento, ir k\f0\cchs186 \'fb\f0\cchs186 rybinio bei kritinio m\f0\cchs186 \'e0\f0\cchs186 stymo modeliu. \cs39\i Laikoma, kad \cs55\i0 bent vienai (j\f0\cchs186 \'f8\f0\cchs186 nuro\-domos net devynios) gabumo sri\f0\cchs186 \'e8\f0\cchs186 iai yra gabus kiekvienas vaikas. Toks gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 ugdymo modelis tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti \cs39\expndtw0 priimtinas ir \cs55\i0\f0\cchs186 \'fe\f0\cchs186 mon\f0\cchs186 \'eb\f0\cchs186 ms, kurie mano, jog visi vaikai \cs60\fs20 turi \cs55\fs22 tam \cs53\i\expndtw-10 tikr\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 gabum\f0\cchs186 \'f8\f0\cchs186 , ir d\f0\cchs186 \'eb\f0\cchs186 l koki\f0\cchs186 \'f8\f0\cchs186 nors prie\f0\cchs186 \'fe\f0\cchs186 as\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 nenori pripa\-\cs60\f0\cchs186\fs20 \'fe\f0\cchs186 inti \cs55\fs22 gabum\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 lygmens \cs55\i0\expndtw0 skirtum\f0\cchs186 \'f8\f0\cchs186 . Modelio autorius nurodo \f0\cchs186 \'f0\f0\cchs186 ias gabum\f0\cchs186 \'f8\f0\cchs186 sritis: akademin\f0\cchs186 \'eb\f0\cchs186 s srities, \cs53\i\expndtw-10 produktyviojo \cs55\i0\expndtw0 m\f0\cchs186 \'e0\f0\cchs186 stymo, komuniJcavimo, prognozavimo, \cs53\i\expndtw-10 sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo, plan\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimo, \cs55\i0\expndtw0\f0\cchs186 \'fe\f0\cchs186 mogi\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , galimybi\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\'fe\f0\cchs186 vel\-gimo \cs39\i\expndtw-20 (ir.\expndtw0 2.2.1 \cs53\expndtw-10 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qj\li6976\fi0\ri0{\sl-240\slmult0\fs20\par }\sb72\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s8\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx6464\posnegy688\absw0\absh-256\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 U\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai\par \pard \plain \s4\qc\li2112\fi0\ri2232\sb0\sa0\sl-320\slmult0 \cs53\b0\strike0\nosupersubLi\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\s22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs44\i0\expndtw0 ugdymas pagal Taylor \cs55 model\f0\cchs186 \'e1 \f0\cchs186 (pagal TayJor, 1986)\par \pard \plain \s9\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx2648\posnegy368\absw0\absh-328\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \cs55\i0\expndtw0 susikurti \cs39\i atitinka- \{\f0\cchs186 \'84\f0\cchs186 Surinkite informacij\f0\cchs186 \'e0\f0\cchs186 apie... ii\par \pard \plain \s6\qj\li304\fi0\ri0\sb16\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 I \cs53\expndtw-10 Gabum\f0\cchs186 \'f8\f0\cchs186 sritis Paai\f0\cchs186 \'f0\f0\cchs186 kinimas\par \pard \plain \s10\qj\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \pvpara\phcol\posnegx6032\posnegy328\absw2600\absh-544\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 j mos temos \f0\cchs186 \'fe\f0\cchs186 ini\f0\cchs186 \'f8\f0\cchs186 ir \f0\cchs186 \'e1\f0\cchs186 g\f0\cchs186 \'fb\f0\cchs186 d\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs187 \'f8 \cs55\i0\expndtw0\f0\cchs186 'baz\f0\cchs186 \'e6\f0\cchs186 .\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \pvpara\phcol\posnegx5672\posnegy384\absw2960\absh-584\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 f Geb\f0\cchs186 \'eb\f0\cchs186 jimas generuoti \cs60\fs20 ne-\line \cs55\fs22 f \f0\cchs186 \'e1\f0\cchs186 prastas, originalias i\f0\cchs186 \'eb\f0\cchs186 /as,\line \cs60\fs20 f\cs53\i\expndtw-10\fs22 pasteb\f0\cchs186 \'eb\'fb\f0\cchs186 naujus \cs55\i0\expndtw0 s\f0\cchs-23 \'e30153860653936719740\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius,\line \cs53\i\expndtw-10\f0\cchs186 \'c1\f0\cchs186 pa\f0\cchs186 \'e1\f0\cchs186 vairioa id\f0\cchs186 \'eb\f0\cchs186 jas,\expndtw0 {\charscalex100\expndtw0\tab }\par \pard \plain \s6\qj\li232\fi0\ri0\sb0\sa0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 (K\f0\cchs186 \'fb\f0\cchs186 rybos, produktyvioio\par \pard \plain \s13\qj\li5816\fi0\ri0\sb88\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 icntcU\par \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 sritis\par \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Sprendim\f0\cchs186 \'f8 \f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0\tlul\tx2736 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Paai\f0\cchs186 \'f0\f0\cchs186 kinimas {\charscalex100\expndtw0\tab }Ll\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas rasti alternatyvas, \cs55\fs22 l.,\par \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 jas \f0\cchs186 \'e1\f0\cchs186 vertinti ir priimti tinka- \cs55\fs22 t \cs60\fs20 r m\f0\cchs186 \'e0\f0\cchs186 problemos sprendim\f0\cchs186 \'e0\f0\cchs186 . 1 \cs41\b\i\f0\cchs186\fs10 \'e1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs5u\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 J\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai Nurodykite \cs60\fs20 savo \cs55\fs22 m\f0\cchs186 \'eb\f0\cchs186 giamiausi\f0\cchs186 \'e0\f0\cchs186 \cs60\fs20 I\par \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 a\f0\cchs186 \'f0\f0\cchs186 y toj\f0\cchs186 \'e0\f0\cchs186 , ai\f0\cchs186 \'f0\f0\cchs186 kiai pagr\f0\cchs186 \'e1\f0\cchs186 sdami at- t \cs60\fs20 rumentais \cs55\fs22 savo pasirinkim\f0\cchs186 \'e0\f0\cchs186 it\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 itmetim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Planavimo\cell \pard \plain \s15\ql\li16\fi-16\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti kelius ir b\f0\cchs186 \'fb\f0\cchs186 dus id\f0\cchs186 \'eb\f0\cchs186 jai \f0\cchs186 \'e1\f0\cchs186 gyvendinti, nustatant, koki\f0\cchs186 \'f8\f0\cchs186 reikia resur- \cs55\fs22 1 \cs60\fs20 s\f0\cchs186 \'f8\f0\cchs186 , \f0\cchs186 \'e1\'fe\f0\cchs186 velgiant, kokios gali\-mos problemos, ir numatant \f0\cchs186 \'fe\f0\cchs186 ingsnius j\f0\cchs186 \'f8\f0\cchs186 sprendimui, to\-kiu b\f0\cchs186 \'fb\f0\cchs186 du patobulinant plan\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 .I\f0\cchs186 \'f0\f0\cchs186 studijav\f0\cchs186 \'e6\f0\cchs186 \cs55\fs22 mitus apie \f0\cchs186 \'f0\f0\cchs186 ik\f0\cchs186 \'f0\f0\cchs186 nos\-\cs60\fs20 parnius, \cs55\fs22 sukurkite tyrimo plan\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 savo draug\f0\cchs186 \'f8\f0\cchs186 \cs55\fs22 nuomonei \cs60\fs20 apie \f0\cchs186 \'f0\f0\cchs186 iuos gyv\f0\cchs186 \'fb\f0\cchs186 nus i\f0\cchs186 \'f0\f0\cchs186 tirti\super 41\nosupersub , \f0\cchs186 \'84\f0\cchs186 Sukurkite akcijos prie\f0\cchs186 \'f0\f0\cchs186 \cs55\fs22 r\f0\cchs186 \'fb\f0\cchs186 kym\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1 \cs60\fs20 plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Prognozavimo\cell \pard \plain \s15\ql\li0\fi8\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti ir pati\-krinti prie\f0\cchs186 \'fe\f0\cchs186 asties ir pasekm\f0\cchs186 \'eb\f0\cchs186 s s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas reik\f0\cchs186 \'f0\f0\cchs186 ti savo id\f0\cchs186 \'eb\f0\cchs186 jas, jausmus, poreikius ir suprasti kitus, vartojant verbalin\f0\cchs186 \'e6\f0\cchs186 ir neverbalin\f0\cchs186 \'e6\f0\cchs186 kalb\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Pademonstruokite savo jaus- \cs55\fs22 1 \cs60\fs20 mus, kai su\f0\cchs186 \'fe\f0\cchs186 inote apie ... \f0\cchs186 \'84\f0\cchs186 Papasakokite apie \f0\cchs186 \'e1\f0\cchs186 vyk\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 vaiko i ir i\f0\cchs186 \'f0\f0\cchs186 suaugusiojo pozicini". i\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Plan\f0\cchs186 \'f8\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'e1\f0\cchs186 gyvendinimo\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \f0\cchs186 \'e1\f0\cchs186 gyvendinti plan\f0\cchs186 \'e0\cell \pard \plain \s16\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs43\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw200\dn0\f0\cchs186\lang1063\langfe1063\fs10 \'97\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \f1\cchs186 \u9632\'3f\f0\cchs186 - \f0\cchs186 \'97\'97\f0\cchs186  \expndtw0 *-\expndtw200 \expndtw0 L-\expndtw200 \expndtw0 -\expndtw200 \cs42\b0\expndtw0\f3\cchs186\fs8 i \f4\cchs186 \u9632\'3f\f3\cchs186 \f4\cchs186 \u9632\'3f\f3\cchs186 \cs41\b\i\f0\cchs186\fs10 a \cs40\b0\i0\scaps\f6\cchs186\fs8 - ii \f7\cchs186 \u9632\'3f\f6\cchs186 \cs62\scaps0\f0\cchs186\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Sukurkite ir \f0\cchs186 \'e1\f0\cchs186 gyvendinkite N 1 renginio plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Galimybi\f0\cchs186 \'f8 \'e1\'fe\f0\cchs186 velgimo\cell \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-272\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas identifikuoti gali\-myb\f0\cchs186 \'e6\f0\cchs186 ir ja pasinaudoti.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 tirkite ispan\f0\cchs186 \'f8\f0\cchs186 kalbos mokymo(si) poreik\f0\cchs186 \'e1\f0\cchs186 mokykloje ir inicijuokite atitinkamos pro\-gramos \f0\cchs186 \'e1\f0\cchs186 gyvendinim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \pard\pard \plain \s14\ql\li0\fi600\ri0\sb232\sa0\sl-328\slmult0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Taylor siekia ugdyti kuo daugiau gabum\f0\cchs186 \'f8\f0\cchs186 , kuriais, jo manymu, pasi\f0\cchs186 \'fe\f0\cchs186 ymi vaikai. Tad kuo \f0\cchs186 \'e1\f0\cchs186 vairesniems vaik\f0\cchs186 \'f8\f0\cchs186 gabumams mokytojas skirs d\f0\cchs186 \'eb\f0\cchs186 mes\f0\cchs186 \'e1\f0\cchs186 , tuo daugiau galimybi\f0\cchs186 \'f8\f0\cchs186 , kad vaikas ras srit\f0\cchs186 \'e1\f0\cchs186 , kurios \f0\cchs186 \'fe\f0\cchs186 inovu jis gali tapti. Ta\f0\cchs186 \'e8\f0\cchs186 iau pir\-masis \f0\cchs186 \'f0\f0\cchs186 io modelio etapas - tai vis d\f0\cchs186 \'eb\f0\cchs186 lto akademini\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdymas. Kitas \f0\cchs186 \'fe\f0\cchs186 ingsnis, skirtas mokytojui apsispr\f0\cchs186 \'e6\f0\cchs186 sti, kuri\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 likusi\f0\cchs186 \'f8\f0\cchs186 a\f0\cchs186 \'f0\f0\cchs186 tuoni\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 sri\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8 \f0\cchs186 jis imasi ugdyti. Paprastai seka, anot autoriaus, tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti tokia: produktyvusis m\f0^cchs186 \'e0\f0\cchs186 stymas, planavimas, sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimas, pian\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimas, \f0\cchs186 \'e1\'fe\f0\cchs186 valgos. Akivaizdu, jog dirbti pagal \f0\cchs186 \'f0\'e1\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 mokytojas tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti specialiai pasi\-reng\f0\cchs186 \'e6\f0\cchs186 s, tad modelio autorius si\f0\cchs186 \'fb\f0\cchs186 lo kelet\f0\cchs186 \'e0\f0\cchs186 mokytojo darbo metod\f0\cchs186 \'f8\f0\cchs186 . Pirmuouiu atveju si\f0\cchs186 \'fb\f0\cchs186 loma papildom\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 organizuoti baigiantis pamokoms. \f0\cchs186 \'c1\f0\cchs186 prastinis mokymo turinys \f0\cchs186 \'84\f0\cchs186 suspaud\f0\cchs186 \'fe\f0\cchs186 iamas" laike, o atsiradusias 5\f0\cchs186 \'97\f0\cchs186 10 laisvuj minu\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 mokytojas gali i\f0\cchs186 \'f0\f0\cchs186 naudoti pasirinkto gabumo ugdymui. Kai \cs48\b\fs20 mokytojui \cs44\b0\fs22 atrodo, kad jau pasiekta tam tikra pa\f0\cchs186 \'fe\f0\cchs186 anga ugdant pirm\f0\cchs186 \'e0\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 o pasirinkt\f0\cchs186 \'f8\f0\cchs186 ga\-\par \sect\soctd \sbkpage\pgwsxn20855\pghsxn13316\marglsxn1080\margrsxn8026\margtsxn360\margbsxn360\cols2\colno1\colw7936\colsr2482\colno2\colw1329 {\header \pard \plain \s11\ql\li0\fi0\ri-7657\sb0\sa0\tx2245 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \par \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx-720\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li0\fi0\ri-7657{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }{\shp {\*\shpinst \chpleft13358\shptop593\shpright14748\shpbottom830\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz1\shplid1{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 317500}}{\sp{\sn dyWrapDistBottom}{\sv 198755}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s31\qj\li0\fi0\ri0\sb0\sa0 \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Rai\f0\cchs186 \'f0\f0\cchs186 kos \cs51\b0 b\f0\cchs186 \'fb\f0\cchs186 dai\par }}}{\shp {\*\shpinst \shpleft11859\shptop534\shpright13172\shpbottom2169\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz0\shplid0{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 279400}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-254\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas\par \pard \plain \s13\ql\li0\fi0\ri0\sb17\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Ugdytojo ir ugdytini\f0\cchs186 \'f8 \f0\cchs186 s\f0\cchs186 \'e0\f0\cchs186 veika, ko\-munikacija\par }}}{\shp {\*\shpinst \shp|eft13350\shptop1144\shpright17594\shpbottom2296\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz2\shplid2{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 139700}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPint}{\sv 1}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-271\slmult0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Informacijos srautai \f0\cchs186 \'97\f0\cchs186 \cs48\b Asmenvb\f0\cchs186 \'eb\f0\cchs186 s tobuli* tiesioginiai ir \cs60\b0 gr\f0\cchs186 \'e1\'fe\f0\cchs186 tamieji, ir s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs48\b tobulintai pedagogin\f0\cchs186 \'eb\f0\cchs186 \cs60\b0 sistema sudarymas: \cs48\b\f0\cchs186 \'fb\f0\cchs186 ssionj\par \pard \plain \s33\ql\li2499\fi0\ri0\sb93\sa0 \cs51\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 - b. \cs60 y\super 1\nosupersub "\super 0\nosupersub \cs51 HBB\par }}}{\shp {\*\shpinst \shpleft13299\shptop2228\shpright14205\shpbottom2474\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz4\shplid4{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Saviugda\par }}}{\shp {\*\shpinst \shpleft15874\shptop2279\shpright17187\shpbottom2524\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz5\shplid5{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tobulinimasis\par }}}{\shp {\*\shpinst \shpleft11867\shptop2152\shpright13078\shpbottom2812\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz3\shplid3{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 640080}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Individo as\-menyb\f0\cchs186 \'eb\par }}}{\shpgrp{\*\shpinst \shpleft-720\shptop3939\shpright7878\shpbottom12384\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz6\shplid6{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1067}}{\sp{\sn groupTop}{\sv 6209}}{\sp{\sn groupRight}{\sv 9665}}{\sp{\sn groupBottom}{\sv 14654}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1067}}{\sp{\sn relTop}{\sv 6429}}{\sp{\sn relRight}{\sv 9665}}{\sp{\sn relBottom}{\sv 14654}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li474\fi0\ri0\sb0\sa0\sl-271\slmult0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \cs48\b\fs20 Ugdymo \cs49\b0\fs22 res \cs46\scaps\fs20 f\cs48\b\scaps0 lyb\f0\cchs186 \'eb\f0\cchs186 s lygmu\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i- \cs49\b0\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rini \cs48\b\fs20 o elementas\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 s Rai\f0\cchs186 \'f0\f0\cchs186 kos b\f0\cchs186 \'fb\f0\cchs186 dai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Funkcijos\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li440\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 j \cs48\b\fs20 Valstybinis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Valstyb\f0\cchs186 \'eb\f0\cchs186 s politika\cell \pard \plain \s19\ql\li0\fi8\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'d0\f0\cchs186 vietimo politika ir j\f0\cchs186 \'e0 \f0\cchs186 atspindintys \f0\cchs186 \'e1\f0\cchs186 statymai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teisinis reguliavimas, u\f0\cchs186 \'fe\f0\cchs186 tikrinantis kiekvie\-nam vaikui (vadinasi, ir gabiam) teis\f0\cchs186 \'e6\f0\cchs186 gauti jo poreikius ir galimybes atitinkant\f0\cchs186 \'e1\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 ir ug\-dymosi s\f0\cchs186 \'e0\f0\cchs186 lygas\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li390\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langde1063\fs20 Visuomeninis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomen\f0\cchs186 \'eb\f0\cchs186 s institutai\cell \pard \plain \s19\ql\li0\fi68\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Vyriausybines insti\-tucijos/ visuomenini\f0\cchs186 \'f8 \f0\cchs186 organizacij\f0\cchs186 \'f8\f0\cchs186 /paramos fond\f0\cchs186 \'f8\f0\cchs186 /auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 moky\-kl\f0\cchs186 \'f8\f0\cchs186 /mokslo institucij\f0\cchs186 \'f8 \cs39\b0\i\f0\cchs186\fs22 tikslin\f0\cchs186 \'eb\f0\cchs186 \cs48\i0\b\fs20 veikla\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Veiklos inicijavimas; koordinavimas, organi\-zavimas, informacijos kaupimas, analiz\f0\cchs186 \'eb\f0\cchs186 ir sklai\-da; gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 paie\f0\cchs186 \'f0\f0\cchs186 kos programos, identifikavi\-mas, globa; mokytoj\f0\cchs186 \'f8\f0\cchs186 ir kit\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 vietimo darbuotoj\f0\cchs186 \'f8 \f0\cchs186 rengi mas;ugdymo t\f0\cchs186 \'e6\f0\cchs186 sti\-numo u\f0\cchs186 \'fe\f0\cchs186 tikrinimas; kt.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 1 Institucinis\par \pard \plain \s25\ql\li0\fi0\ri0\sb0\sa0\sl-983\slmult0 \intbl \cs47\b0\i0\strike0\nosupersub\scaps0\charscalex20\expndtw0\dn19\f0\cchs186\lang1063\langfe1063\fs104 1\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo nstituci\f0\cchs186 \'e1\f0\cchs186 os\par \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i \cs49\b0\fs22 1 \cs48\b\fs20 i\par \pard \plain \s26\ql\li0\fi0\ri0\sb0\sa0\sl-381\slmult0 \intbl \cs50\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn5\f0\cchs186\lang1063\langfe1063\fs38 !\cell \pard \plain \s19\ql\li25\fi-25\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo modelis institucijos lygmeniu \f0\cchs186 \'97\f0\cchs186 mokyklos, papildomojo ugdymo mokyklos, technin\f0\cchs186 \'eb\f0\cchs186 s \{\f0\cchs186 \'fb\f0\cchs186 rybos namai, klas\f0\cchs186 \'eb\f0\cchs186 s, tovyklos, kursai, kon\-kursai ir kt.\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw-5420746430195647047\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo proceso opti\-mizavimas: optimalios ugdymo(si) aplinkos sudarymas, ugdymas, mo\-kymas, veiklos rezultat\f0\cchs186 \'f8 \f0\cchs186 vertinimas, mokymo dife\-rencijavimas ir kt.\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 3371}}{\sp{\sn relTop}{\sv 6209}}{\sp{\sn relRight}{\sv 7988}}{\sp{\sn relBotto}}{\sv 6497}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s18\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabi\f0\cchs186 \'f8\f0\cchs186 \cs49 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 modelis\par }}}}}\pard \plain \s14\qr\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 m\f0\cchs186 \'e0\f0\cchs186 gali apib\f0\cchs186 \'fb\f0\cchs186 dinti asmenyb\f0\cchs186 \'eb\f0\cchs186 s saviugda, iritrapersonaliniame lygmenyje \f0\cchs186 \'e1\f0\cchs186 gyjanti gryn\f0\cchs186 \'e0\f0\cchs186 rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 . \cs45\b\expndtw-10 II \cs55\b0\expndtw0 esm\f0\cchs186 \'eb\f0\cchs186 s \cs53\i\expndtw-10 vis\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 anks\f0\cchs186 \'e8\f0\cchs186 iau min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavi\-mo tikslas \cs49 I \cs55 prigimtini\f0\cchs186 \'f8\f0\cchs186 asmens gali\f0\cchs186 \'f8\f0\cchs186 pl\f0\cchs186 \'eb\f0\cchs186 tra ir i\f0\cchs186 \'f0\f0\cchs186 vystymas jo paties j\f0\cchs186 \'eb\f0\cchsq86 gomis iki maksimalaus tam asmeniui galimo lygio. Literat\f0\cchs186 \'fb\f0\cchs186 roje (Gross, 1995; Almonaitien\f0\cchs186 \'eb\f0\cchs186 , 1997; Heller, 1999; Gagne, 2004 ir kt.) nurodoma, kad gabaus vaiko savirealizaci\-jai turi (takos jo asmenyb\f0\cchs186 \'eb\f0\cchs186 s nekognityvin\f0\cchs186 \'eb\f0\cchs186 s savyb\f0\cchs186 \'eb\f0\cchs186 s - pasiekim\f0\cchs186 \'f8\f0\cchs186 motyvacija, tei\-giamas \cs45\b\expndtw-10 sav\f0\cchs186 \'e6\f0\cchs186 s \cs55\b0\expndtw0 vertinimas, darbingumas, savikontrol\f0\cchs186 \'eb\f0\cchs186 ir kt. Yra pagrindo manyti, kad tinkamas min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 GAVUS modelio strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavimas palankiai veikia gabaus vaiko asmenyb\f0\cchs186 \'e6\f0\cchs186 , taigi skatina \cs45\b\expndtw-10 j\f0\cchs186 \'e1\f0\cchs186 \cs55\b0\expndtw0 tobul\f0\cchs186 \'eb\f0\cchs186 ti.\par \pard \plain \s2\qj\li0\fi584\ri0\sb8\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Apibendrinant tai, kas pasakyta, galima pateikti tok\f0\cchs186 \'e1\f0\cchs186 teorin\f0\cchs186 \'e1\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8 \f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 :\par \pard \plain \s11\qr\li0\fi0\ri0{\sl-240\slmult0\fs20\par }\sb99\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 3.1 \cs55 lentel\f0\cchs186 \'eb\par \column \pard \plain \s28\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }\sb200\sa0\sl-271\slmult0 \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo rea-\ul lyb\f0\cchs186 \'eb\f0\cchs186 s lygmuo\par \pard \plain \s11\qj\li0\fi0\ri0\sb42\sa0\sl-246\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Interpersona-linis\khftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliamveikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 moeelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\pAv \pard \plain \s11\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }{\sl-240\slmult0\fs20\par }\sb121\sa0\sl-263\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Intrapersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \v0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs064 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sudf0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito vei{imui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn360\margtsxn360\margbsxn360\cols1\colsx60 {\header }{\footer \pard \plain \s27\qr\li0\fi0\ri0\sb0\sa0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 123}}\par }{\pard\plain \sb1144\sa0\sl-240\slmult0\fs20\par}\pard \plain \s29\qj\li11181\fi0\ri0\sb51\sa102 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4. \cs55 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ufidymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 mo\ul delio rai\f0\cchs186 \'f0\f0\cchs186 kos\ul0 \cs45\b\expndtw-10\f0\cchs186 \'c1\f0\cchs186 \cs55\b0\ul\expndtw0 jetuvo\f0\cchs186 \'e1\f0\cchs186 e \cs60\fs20 pristatymas\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn453\margtsxn360\margbsxn360\cols2\colno1\colw8123\colsr2431\colno2\colw8385 {\shpgrp{\*\shpinst \shpleft10622\shptop263\shpright18737\shpbottom1966\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz7\shplid7{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 107315}}{\sp{\sn dyWrapDistBottom}{\sv 48260}}{\sp{\sn groupLeft}{\sv 12045}}{\sp{\sn groupTop}{\sv 2846}}{\sp{\sn groupRight}{\sv 20160}}{\sp{\sn groupBottom}{\sv 4549}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12045}}{\sp{\sn relTop}{\sv 2922}}{\sp{\sn relRight}{\sv 20160}}{\sp{\sn relBottom}{\sv 4100}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Nr.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0\sl-144\slmult0\tlhyph\tx3744\tlul\tx4574 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn2\f0\cchs186\lang1063\langfe1063\fs22 rr-ri{\charscalex100\expndtw0\tab }\cs61\fs12 _ {\charscalex100\expndtw0\tab } J \f0\cchs186 \'bb\par \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teiginys \f0\cchs186 \'97\cell \pard \plain \s35\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 mreies\par \pard \plain \s3\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid *\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 t\f0\cchs186 \'e6\f0\cchs186 sinys\par \pard \plain \s24\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 Qt \cs60\fs20 n\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 11.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokini\f0\cchs186 \'f8\f0\cchs186 t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs1:6 \'f8\f0\cchs186 palaikymo, pritarimo\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .24\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.21\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cel \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}vs\n\{s\{p{ }1s} fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumoexpndtw0 \cs55fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv lbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cel \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}vs\n\{s\{p{ }1s} fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumoexpndtw0 \cs55fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdr15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li246\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Nr\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\strike0\nosupersub\scaps0\chrlex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Teiginys\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid.*\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 St. n.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \super 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 \cs56\fs18 papildom\f0\cchs186 \'e0\f0\cchs186 \cs55\fs22 darb\f0\cchs186 \'e0\f0\cchs186 ,.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.43\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.84\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo itin gabiems mokiniams.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.35\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.87\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 13.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos i\f0\cchs186 \'f0\f0\cchs186 liet \cs52\expndtw-20\fs30 j \cs44\expndtw0\fs22 mastu.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.27\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.85\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 14.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta apr\f0\cchs186 \'fb\f0\cchs186 pinimo reikalinga mokymo metodine med\f0\cchs186 \'fe\f0\cchs186 iaga\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.96\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 15.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo \cs44 tems.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .20\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.91\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrsbrdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0\sl-407\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\up2\f0\cchs186\lang1063\langfe1063\fs30 j \cs44\expndtw0\fs22 6. \cs55 j\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 bendradarbiavimo tu auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokykl\f0\cchs186 \'f8\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 stytojais, \cs44 mokalininkaif.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .04\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.99\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 7. \cs55 1 \cs44 Tr\f0\cchs186 \'fb\f0\cchs186 ksta literatu \expndtw-20 rot\expndtw0 \cs54\i\expndtw-20 apie itin \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 pa\f0\cchs186 \'fe\f0\cchs186 inim\f0\cchs186 \'e0\f0\cchs186 , ugdym\f0\cchs186 \'e0\f0\cchs186 , \cs52\expndtw-20\fs30 j \cs55\expndtw0\fs22 psichologij\f0\cchs186 \'e0\f0\cchs186 , \cs44 kir\f0\cchs186 \'f8\f0\cchs186 \cs55\f0\cchs186 \'f0\f0\cchs186 ali\f0\cchs186 \'f8\f0\cchs186 patirt j.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .00\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.97\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 8. \cs55 j Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 bendradarbiavimo \cs55 su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis,\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.88\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.02\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s32\ql\li0\fi0\ri0\sb0\sa0\sl-356\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\dn4\f0\cchs186\lang1063\langfe1063\fs30 1 \cs49\expndtw0\fs22 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtu0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'r\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 tinkamo \cs55 pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.56\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.17\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 10. 7\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 r\f0\cchs186 \'fb\f0\cchs186 ksta galimybi\f0\cchs186 \'f8\f0\cchs186 \cs44 naudotis \cs55 kompiuteriu ir internetu.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 -0.19\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.33\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 2151}}{\sp{\sn relTop}{\sv 9267}}{\sp{\sn relRight}{\sv 8724}}{\sp{\sn relBottom}{\sv 10300}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s2\qj\li0\fi0\ri0\sb0\sa0\sl-330\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Duomenys apie tai, ko mokytojams tr\f0\cchs186 \'fb\f0\cchs186 ksta darbui su itin\par \pard \plain \s20\ql\li0\fi2406\ri0\sb0\sa0\sl-330\slmult0\tlul\tx805 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 gabiais vaikais\line \lang1033 {\charscalex100\expndtw0\tab }\ul\lang1063 (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis,\ul0 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002)\par }}}}}\pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 niams, galima manyti, kad jaunesni\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 klasi\f0\cchs186 \'f8\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 mokini\fcchs186 \'f8\f0\cchs186 ugdymo rezulta\-tai \f0\cchs186\'fe\f0\cchs186 inomi ir fiksuojami tik klases ir mokyklos (atskirais atvejais savivaldyb\f0\cchs186 \'eb\f0\cchs186 s) lygmeniu. be to, olimpiad\f0\cchs186 \'f8\f0\cchs186 rezultatai - tai tik pasiekimai, \cs49 o \cs55 kas daroma klas\f0\cchs186 \'eb\-\f0\cchs186 je, \cs53\i\expndtw-10 mokykloje, \cs55\i0\expndtw0 kad tie pasiekimai b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 tokie, ir \cs49 ar \cs55 tie pasiekimai \f0\cchs186 \'97\f0\cchs186 tai mokytojo ir mokinio darbo rezultatas ar tik mokinio potencialo \{vertinimas, informaci\-jos taip pat neturime arba turime labai nedaug \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. \cs55 Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs49 1997,1998, \cs55 2003, Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis, Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002).\par \pard \plain \s2\qj\li0\fi576\ri0\sb0\sa0\sl-322\slmult0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimas. \cs55\i0\expndtw0 N\f0\cchs186 \'eb\f0\cchs186 vienas Lietuvos universitetas, rengiantis mokyto\-jus, nesi\f0\cchs186 \'fb\f0\cchs186 lo pirmos ar antros pakopos studij\f0\cchs186 \'f8\f0\cchs186 programos, kurios paskirtis b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8 \f0\cchs186 ai\f0\cchs186 \'f0\f0\cchs186 kiai orientuota \f0
diff --git a/sw/qa/extras/layout/data/forcepoint91.html b/sw/qa/extras/layout/data/forcepoint91.html
new file mode 100644
index 000000000000..eacbd2e05ab8
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint91.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint92.doc b/sw/qa/extras/layout/data/forcepoint92.doc
new file mode 100644
index 000000000000..49c4a7f11dfe
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint92.doc
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint93-1.rtf b/sw/qa/extras/layout/data/forcepoint93-1.rtf
new file mode 100644
index 000000000000..bbe5ecfb78f2
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint93-1.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint93-2.rtf b/sw/qa/extras/layout/data/forcepoint93-2.rtf
new file mode 100644
index 000000000000..bcc5f3dc8855
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint93-2.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint94.html b/sw/qa/extras/layout/data/forcepoint94.html
new file mode 100644
index 000000000000..8be788f8e4e5
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint94.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint98.html b/sw/qa/extras/layout/data/forcepoint98.html
new file mode 100644
index 000000000000..9d4b76c53e76
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint98.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint99.html b/sw/qa/extras/layout/data/forcepoint99.html
new file mode 100644
index 000000000000..6eb36a616e26
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint99.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/keep-with-next-fly.fodt b/sw/qa/extras/layout/data/keep-with-next-fly.fodt
new file mode 100644
index 000000000000..13d6785f4e1f
--- /dev/null
+++ b/sw/qa/extras/layout/data/keep-with-next-fly.fodt
@@ -0,0 +1,146 @@
+<?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:meta><meta:creation-date>2022-02-16T15:01:24.088191425</meta:creation-date><dc:date>2022-02-16T15:16:50.103419678</dc:date><meta:editing-duration>PT15M29S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="0" meta:image-count="1" meta:object-count="0" meta:page-count="2" meta:paragraph-count="1" meta:word-count="5" meta:character-count="26" meta:non-whitespace-character-count="22"/><meta:generator>LibreOfficeDev/7.4.0.0.alpha0$Linux_X86_64 LibreOffice_project/16748887dd277bd63034e07b5e2a86740235b315</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="'Lohit Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="'Source Han Serif CN'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <draw:gradient draw:name="gradient" draw:style="linear" draw:start-color="#000000" draw:end-color="#ffffff" draw:start-intensity="100%" draw:end-intensity="100%" draw:angle="0deg" draw:border="0%"/>
+ <draw:hatch draw:name="hatch" draw:style="single" draw:color="#3465a4" draw:distance="0.02cm" draw:rotation="0"/>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Graphics" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
+ <loext:graphic-properties draw:fill-gradient-name="gradient" draw:fill-hatch-name="hatch"/>
+ <style:paragraph-properties style:page-number="auto" fo:break-before="auto" fo:break-after="auto"/>
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
+ <loext:graphic-properties draw:fill-gradient-name="gradient" draw:fill-hatch-name="hatch"/>
+ <style:paragraph-properties style:page-number="auto" fo:break-before="auto" fo:break-after="auto" fo:keep-with-next="always"/>
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties 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:flow-with-text="true"/>
+ </style:style>
+ <style:page-layout style:name="pm1">
+ <style:page-layout-properties fo:page-width="10.5cm" fo:page-height="14.801cm" 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: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>
+ <number:number-style style:name="N0">
+ <number:number number:min-integer-digits="1"/>
+ </number:number-style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <text:variable-decls>
+ <text:variable-decl office:value-type="float" text:name="abc"/>
+ </text:variable-decls>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1"><text:variable-set text:name="abc" text:formula="ooow:1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890" office:value-type="float" office:value="INF" style:data-style-name="N0">** Expression is faulty **</text:variable-set></text:p>
+ <text:p text:style-name="P2"><draw:frame draw:style-name="fr1" draw:name="Image1" text:anchor-type="char" svg:width="0.503cm" svg:height="0.503cm" draw:z-index="0"><draw:image draw:mime-type="image/png">
+ <office:binary-data>iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAByUDbMAAAABGdBTUEAANbY1E9YMgAAABl0
+ RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFpSURBVHjaYvz//z8DtQBAADER
+ o+jjZGuibAQIICZiDOK/cgzFwEnrV/4HYXS1AAHERIxBR58yMiAb2DtzM1b1AAHERIxBIIBu
+ IDYAEEBMxBjE0bgdxcBL3vcZLl16jaEPIICYiDFIU9MSw8BeoeUYhgEEEBMxBnFx8WE1EN3L
+ AAHERIxBIECMgQABxAhKtPgM+vbtE9xmGP/69eMMP+o9wWLW0kD9OlYM/LlHGQECiAndoKg/
+ USgGgTTmdS8C0yA+zIUgdeguBAggljtWdQwMVkDXACWMjd0ZXRun/Id5DWTA9C23GSaVxoEN
+ zISoARvoamnBYF2/hPHs2Z3/z0JdDhBADCBvIuPkhsn/QeDr14//QWwQjY0PVYeiFyCA8OaA
+ 3cdPoEQAiI8PAAQQEwMVAUAAsWATBAX0jx9fsWrAJQ4CAAGE1TBQwOMC9+9fwikHEEBYDQPF
+ IAzIe8TglEMHAAHESM2SFiDAADEwCe4BJwcYAAAAAElFTkSuQmCC
+ </office:binary-data>
+ </draw:image>
+ </draw:frame><text:soft-page-break/></text:p>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt b/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt
new file mode 100644
index 000000000000..fbefc5c48046
--- /dev/null
+++ b/sw/qa/extras/layout/data/largeTopMarginAndHiddenFirstSection.fodt
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:paragraph-properties fo:margin-top="1in" fo:margin-bottom="0" style:contextual-spacing="false" fo:line-height="12pt"/>
+ </style:style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:section text:name="Hidden" text:display="none"/>
+ <text:section text:name="Shown"/>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt b/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt
new file mode 100644
index 000000000000..5fae6a491704
--- /dev/null
+++ b/sw/qa/extras/layout/data/pageBreakInHiddenSection.fodt
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:master-page-name="Landscape">
+ <style:paragraph-properties style:page-number="1"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:master-page-name="Landscape">
+ <style:paragraph-properties style:page-number="1"/>
+ <style:text-properties text:display="none"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:p>First line</text:p>
+ <text:section text:name="Hidden" text:display="none">
+ <text:p text:style-name="P1"/>
+ </text:section>
+ <text:section text:name="Shown">
+ <text:p>Before break (still first page)</text:p>
+ </text:section>
+ <text:section text:name="HiddenText">
+ <text:p text:style-name="P2"/>
+ </text:section>
+ <text:p>After break</text:p>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p/>
+ <text:p>Should be together with next</text:p>
+ <text:section text:name="Hidden2" text:display="none">
+ <text:p text:style-name="P2"/>
+ </text:section>
+ <text:p>Should be together with previous</text:p>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/layout/data/s4_min2.fodt b/sw/qa/extras/layout/data/s4_min2.fodt
new file mode 100644
index 000000000000..e1317de597d8
--- /dev/null
+++ b/sw/qa/extras/layout/data/s4_min2.fodt
@@ -0,0 +1,360 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle: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:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d: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:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:generator>CIB_OfficeDev/6.1.7.41$Linux_X86_64 LibreOffice_project/1df0ab666a1bb346850daa72aaa2e29a697a252c</meta:generator><meta:creation-date>2023-06-26T22:28:03.054604345</meta:creation-date><dc:language>de-DE</dc:language><meta:editing-cycles>11</meta:editing-cycles><meta:editing-duration>PT14M3S</meta:editing-duration><dc:date>2023-06-26T23:06:43.147312212</dc:date><meta:document-statistic meta:table-count="1" meta:image-count="0" meta:object-count="0" meta:page-count="3" meta:paragraph-count="14" meta:word-count="247" meta:character-count="1680"/><meta:user-defined meta:name="Info 1"/><meta:user-defined meta:name="Info 2"/><meta:user-defined meta:name="Info 3"/><meta:user-defined meta:name="Info 4"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Arial" svg:font-family="Arial" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-pitch="variable"/>
+ <style:font-face style:name="HG Mincho Light J" svg:font-family="'HG Mincho Light J'" style:font-pitch="variable"/>
+ <style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-pitch="variable"/>
+ <style:font-face style:name="Thorndale" svg:font-family="Thorndale" style:font-family-generic="roman" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#808080" draw:fill-color="#cfe7f5" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="true"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties fo:color="#000000" style:font-name="Thorndale" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="HG Mincho Light J" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Arial Unicode MS" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="2cm" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:color="#000000" style:font-name="Thorndale" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="HG Mincho Light J" style:font-size-asian="12pt" style:language-asian="zxx" style:country-asian="none" style:font-name-complex="Arial Unicode MS" style:font-size-complex="12pt" style:language-complex="zxx" style:country-complex="none" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="separating"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="always"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:hyphenation-ladder-count="no-limit"/>
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-pitch="variable" fo:hyphenate="true" fo:hyphenation-remain-char-count="4" fo:hyphenation-push-char-count="4"/>
+ </style:style>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:hyphenation-ladder-count="no-limit"/>
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-pitch="variable" fo:hyphenate="true" fo:hyphenation-remain-char-count="4" fo:hyphenation-push-char-count="4"/>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties>
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17.002cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
+ <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="extra"/>
+ <style:style style:name="Arial_5f_12_5f_Links" style:display-name="Arial_12_Links" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:hyphenation-ladder-count="no-limit"/>
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-pitch="variable" fo:font-weight="350" fo:hyphenate="false" fo:hyphenation-remain-char-count="4" fo:hyphenation-push-char-count="4"/>
+ </style:style>
+ <style:style style:name="TVS_20_Standard" style:display-name="TVS Standard" style:family="paragraph" style:master-page-name="">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:page-number="auto"/>
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-pitch="variable" fo:hyphenate="true" fo:hyphenation-remain-char-count="4" fo:hyphenation-push-char-count="4"/>
+ </style:style>
+ <style:style style:name="TVS_20_KopfzeileFKB_5f_S2" style:display-name="TVS KopfzeileFKB_S2" style:family="paragraph" style:parent-style-name="TVS_20_Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="TVS_20_FußzeileFKB" style:display-name="TVS FußzeileFKB" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:master-page-name="">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto" style:vertical-align="middle"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-family="'Times New Roman'" style:font-pitch="variable" fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="TVS_20_Adressfeld" style:display-name="TVS Adressfeld" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ <style:text-properties fo:language="zxx" fo:country="none"/>
+ </style:style>
+ <style:style style:name="TVS_20_Unsichtbar" style:display-name="TVS Unsichtbar" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ <style:text-properties fo:font-size="2pt"/>
+ </style:style>
+ <style:style style:name="TVS_20_Mehrfertigung" style:display-name="TVS Mehrfertigung" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:master-page-name="">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:page-number="auto"/>
+ <style:text-properties fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="TVS_20_Absender" style:display-name="TVS Absender" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-family="'Times New Roman'" style:font-pitch="variable" fo:font-size="8pt"/>
+ </style:style>
+ <style:style style:name="TVS_20_Anrede" style:display-name="TVS Anrede" style:family="paragraph" style:parent-style-name="TVS_20_Standard" style:next-style-name="TVS_20_Freitext">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.42cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="TVS_20_Freitext" style:display-name="TVS Freitext" style:family="paragraph" style:parent-style-name="TVS_20_Standard">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.42cm" loext:contextual-spacing="false"/>
+ </style:style>
+ <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/>
+ <style:style style:name="TVS_20_Fett" style:display-name="TVS Fett" style:family="text">
+ <style:text-properties fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="Footnote_20_anchor" style:display-name="Footnote anchor" style:family="text">
+ <style:text-properties style:text-position="super 58%"/>
+ </style:style>
+ <style:style style:name="Endnote_20_anchor" style:display-name="Endnote anchor" style:family="text">
+ <style:text-properties style:text-position="super 58%"/>
+ </style:style>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties svg:width="7.696cm" fo:min-height="3.519cm" text:anchor-type="page" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" text:citation-body-style-name="Footnote_20_anchor" text:master-page-name="Standard" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:citation-body-style-name="Endnote_20_anchor" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle1" style:family="table">
+ <style:table-properties style:width="16.574cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="16.574cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Tabelle1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="2pt" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="14pt" fo:font-weight="bold"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="TVS_20_Adressfeld">
+ <style:text-properties fo:font-size="10pt"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties fo:font-size="12pt" style:font-size-asian="12pt" style:font-size-complex="12pt"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Arial_5f_12_5f_Links">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Standard2">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto"/>
+ <style:text-properties style:font-name="Arial" fo:font-size="12pt" fo:font-style="normal" style:text-underline-style="none" fo:font-weight="bold" style:font-size-asian="12pt" style:font-weight-asian="normal" style:font-size-complex="12pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P9" style:family="paragraph" style:parent-style-name="TVS_20_Anrede" style:master-page-name="FABrief_5f_S1">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="size position" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0cm" fo:border="none" style:shadow="none" draw:shadow-opacity="100%"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0cm" style:protect="content size position" style:vertical-pos="middle" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="0.51pt solid #000000" fo:border-bottom="none"/>
+ </style:style>
+ <style:style style:name="fr3" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="size position" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" fo:padding="0cm" fo:border="none">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <style:style style:name="fr4" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="size position" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" fo:background-color="transparent" draw:fill="none" draw:fill-color="#ffffff" fo:padding="0cm" fo:border-left="none" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.51pt solid #000000"/>
+ </style:style>
+ <style:style style:name="fr5" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="size position" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:shadow="none" draw:shadow-opacity="100%"/>
+ </style:style>
+ <style:style style:name="fr6" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="size position" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" fo:padding="0cm" fo:border="none">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <style:style style:name="fr7" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:protect="position" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:graphic-properties>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </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:paper-tray-name="[From printer settings]" style:print-orientation="portrait" fo:margin-top="2cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" 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="true" style:layout-grid-display="true" draw:fill="none" draw:fill-color="#cfe7f5" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm2" style:page-usage="mirrored">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:paper-tray-name="[From printer settings]" style:print-orientation="portrait" fo:margin-top="1.3cm" fo:margin-bottom="1.799cm" fo:margin-left="2.9cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" 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="true" style:layout-grid-display="true" draw:fill="none" draw:fill-color="#cfe7f5" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties svg:height="1.9cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="1.401cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#cfe7f5"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm3">
+ <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="8.7cm" fo:margin-bottom="1.799cm" fo:margin-left="2.193cm" fo:margin-right="1.799cm" fo:background-color="transparent" 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" draw:fill="none" draw:fill-color="#cfe7f5" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm4">
+ <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">
+ <style:footnote-sep style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm5" style:page-usage="mirrored">
+ <style:page-layout-properties fo:page-width="29.7cm" fo:page-height="21.001cm" style:num-format="1" style:paper-tray-name="[From printer settings]" style:print-orientation="landscape" fo:margin-top="2.9cm" fo:margin-bottom="1.799cm" fo:margin-left="2cm" fo:margin-right="2cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" 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="true" style:layout-grid-display="true" draw:fill="none" draw:fill-color="#cfe7f5" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style>
+ <style:header-footer-properties fo:min-height="0.499cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm" fo:border="none" fo:padding="0cm" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#cfe7f5"/>
+ </style:header-style>
+ <style:footer-style/>
+ </style:page-layout>
+ <style:page-layout style:name="pm6">
+ <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:paper-tray-name="[From printer settings]" style:print-orientation="portrait" fo:margin-top="10.7cm" fo:margin-bottom="2.2cm" fo:margin-left="2.9cm" fo:margin-right="1.799cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" 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="true" style:layout-grid-display="true" draw:fill="none" draw:fill-color="#cfe7f5" style:footnote-max-height="0cm">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+ </style:page-layout-properties>
+ <style:header-style/>
+ <style:footer-style>
+ <style:header-footer-properties svg:height="2.401cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.3cm" fo:border="none" fo:padding="0cm" style:shadow="none" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#cfe7f5"/>
+ </style:footer-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="FABrief_5f_S2" style:display-name="FABrief_S2" style:page-layout-name="pm2">
+ <style:header>
+ <text:p text:style-name="TVS_20_KopfzeileFKB_5f_S2">- <text:page-number text:select-page="current">2</text:page-number><text:s/>-</text:p>
+ </style:header>
+ </style:master-page>
+ <style:master-page style:name="Standard2" style:page-layout-name="pm3" style:next-style-name="FABrief_5f_S2"/>
+ <style:master-page style:name="Endnote" style:page-layout-name="pm4"/>
+ <style:master-page style:name="FABrief_5f_S1" style:display-name="FABrief_S1" style:page-layout-name="pm6" style:next-style-name="FABrief_5f_S2">
+ <style:footer>
+ <text:p text:style-name="Footer"><draw:frame draw:style-name="fr1" draw:name="ES_FUSSZEILE" text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" svg:width="16.3cm" svg:height="2.101cm" draw:z-index="7">
+ <draw:text-box>
+ <text:p text:style-name="TVS_20_FußzeileFKB"><text:span text:style-name="TVS_20_Fett"/></text:p>
+ </draw:text-box>
+ </draw:frame></text:p>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text text:use-soft-page-breaks="true">
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:user-field-decls>
+ <text:user-field-decl office:value-type="string" office:string-value="" text:name="RF_POSTADR1"/>
+ <text:user-field-decl office:value-type="string" office:string-value="" text:name="RF_POSTADR2"/>
+ <text:user-field-decl office:value-type="string" office:string-value="" text:name="IF_MEHRFERTIGUNG"/>
+ <text:user-field-decl office:value-type="string" office:string-value="" text:name="ES_BRIEFANREDE"/>
+ <text:user-field-decl office:value-type="string" office:string-value="" text:name="IF_AUSBL_DSGVO"/>
+ </text:user-field-decls><draw:frame draw:style-name="fr2" draw:name="Rahmen2" text:anchor-type="page" text:anchor-page-number="2" svg:x="0.6cm" svg:width="0.497cm" svg:height="0.041cm" draw:z-index="0">
+ <draw:text-box>
+ <text:p text:style-name="Frame_20_contents"/>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr3" draw:name="ES_ADRESSFELD" text:anchor-type="page" text:anchor-page-number="1" svg:x="2cm" svg:y="6.549cm" svg:width="8.5cm" svg:height="2.799cm" draw:z-index="1">
+ <draw:text-box>
+ <text:p text:style-name="P5"/>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr4" draw:name="Absender" text:anchor-type="page" text:anchor-page-number="1" svg:x="2cm" svg:y="4.3cm" svg:width="8.5cm" svg:height="0.651cm" draw:z-index="2">
+ <draw:text-box>
+ <text:p text:style-name="TVS_20_Absender"><text:user-field-get text:name="RF_POSTADR1"/><text:line-break/><text:user-field-get text:name="RF_POSTADR2"/></text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr5" draw:name="Mehrfertigung" text:anchor-type="page" text:anchor-page-number="1" svg:x="10.901cm" svg:y="4.3cm" svg:width="8.4cm" svg:height="0.55cm" draw:z-index="3">
+ <draw:text-box>
+ <text:p text:style-name="TVS_20_Mehrfertigung"><text:user-field-get text:name="IF_MEHRFERTIGUNG"/></text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr6" draw:name="ES_ADRESSFELD_FA00" text:anchor-type="page" text:anchor-page-number="3" svg:x="2.221cm" svg:y="4.484cm" svg:width="7.878cm" draw:z-index="4">
+ <draw:text-box fo:min-height="3.701cm">
+ <text:p text:style-name="P7">Second box</text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr6" draw:name="Absender_Stpfl" text:anchor-type="page" text:anchor-page-number="3" svg:x="11.312cm" svg:y="4.228cm" svg:width="7.828cm" draw:z-index="5">
+ <draw:text-box fo:min-height="3.62cm">
+ <text:p text:style-name="P7">Third box</text:p>
+ </draw:text-box>
+ </draw:frame><draw:frame draw:style-name="fr7" draw:name="Kopf_Fragebogen" text:anchor-type="page" text:anchor-page-number="3" svg:x="2.17cm" svg:y="1.36cm" svg:width="16.574cm" draw:z-index="6">
+ <draw:text-box fo:min-height="1.353cm">
+ <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+ <table:table-column table:style-name="Tabelle1.A"/>
+ <table:table-header-rows>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p text:style-name="P2">Something</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table-header-rows>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+ <text:p text:style-name="P3">Important here</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P1"/>
+ </draw:text-box>
+ </draw:frame>
+ <text:section text:style-name="Sect1" text:name="CopyA">
+ <text:p text:style-name="P9"><text:user-field-get text:name="ES_BRIEFANREDE"/></text:p>
+ <text:p text:style-name="TVS_20_Freitext"/>
+ <text:p text:style-name="TVS_20_Freitext"/>
+ <text:p text:style-name="TVS_20_Freitext"/>
+ <text:p text:style-name="TVS_20_Freitext"/>
+ <text:p text:style-name="P6">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum consequat mi quis pretium semper. Proin luctus orci ac neque venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. Donec blandit auctor arcu, nec pellentesque eros molestie eget. In consectetur aliquam hendrerit. Sed cursus mauris vitae ligula pellentesque, non pellentesque urna aliquet. Fusce placerat mauris enim, nec rutrum purus semper vel. Praesent tincidunt neque eu pellentesque pharetra. Fusce pellentesque est orci.</text:p>
+ <text:p text:style-name="P6">Integer sodales tincidunt tristique. Sed a metus posuere, adipiscing nunc et, viverra odio. Donec auctor molestie sem, sit amet tristique lectus hendrerit sed. Cras sodales nisl sed orci mattis iaculis. Nunc eget dolor accumsan, pharetra risus a, vestibulum mauris. Nunc vulputate lobortis mollis. Vivamus nec tellus faucibus, tempor magna nec, facilisis felis. Donec commodo enim a vehicula pellentesque. Nullam vehicula vestibulum est vel ultricies.</text:p>
+ <text:p text:style-name="P6">Aliquam velit massa, laoreet vel leo nec, volutpat facilisis eros. Donec consequat arcu ut diam tempor luctus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Praesent vitae lacus vel leo sodales pharetra a a nibh. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam luctus tempus nibh, fringilla dictum augue consectetur eget. Curabitur at ante sit amet tortor pharetra molestie eu nec ante. Mauris tincidunt, nibh eu sollicitudin molestie, dolor sapien congue tortor, a pulvinar sapien turpis sed ante. Donec nec est elementum, euismod nulla in, mollis nunc.</text:p>
+ <text:p text:style-name="TVS_20_Unsichtbar"><text:soft-page-break/><text:user-field-get text:name="IF_AUSBL_DSGVO"/><text:hidden-paragraph text:condition="ooow:IF_AUSBL_DSGVO eq &quot;1&quot;"/></text:p>
+ </text:section>
+ <text:p text:style-name="P4">Second page</text:p>
+ <text:section text:style-name="Sect1" text:name="CopyB">
+ <text:p text:style-name="P8">Page 3</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/layout/data/table-0-height-rows.fodt b/sw/qa/extras/layout/data/table-0-height-rows.fodt
new file mode 100644
index 000000000000..c73991490249
--- /dev/null
+++ b/sw/qa/extras/layout/data/table-0-height-rows.fodt
@@ -0,0 +1,611 @@
+<?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: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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office: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:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext: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:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Times New Roman" svg:font-family="'Times New Roman'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Times New Roman1" svg:font-family="'Times New Roman'" style:font-adornments="Standard" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial" svg:font-family="Arial" style:font-adornments="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Arial Unicode MS" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#808080" draw:fill-color="#cfe7f5" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties fo:color="#000000" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="en" style:country-complex="US"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.997cm" style:writing-mode="page"/>
+ <style:text-properties fo:color="#000000" style:font-name="Times New Roman" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Arial Unicode MS" style:font-size-asian="12pt" style:language-asian="en" style:country-asian="US" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="en" style:country-complex="US" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Schrift1" style:family="paragraph">
+ <style:paragraph-properties>
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-style-name="Standard" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </style:style>
+ <style:style style:name="Schrift2" style:family="paragraph" style:master-page-name="">
+ <style:paragraph-properties style:page-number="auto"/>
+ <style:text-properties style:font-name="Times New Roman1" fo:font-family="'Times New Roman'" style:font-style-name="Standard" style:font-family-generic="roman" style:font-pitch="variable"/>
+ </style:style>
+ <style:style style:name="TextNormal" style:family="paragraph" style:parent-style-name="Schrift2" style:master-page-name="">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:line-height="150%" fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:page-number="auto"/>
+ <style:text-properties fo:hyphenate="true" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:style>
+ <style:style style:name="Vfg2" style:family="paragraph" style:parent-style-name="TextNormal" style:list-style-name="Numbering_20_1" style:master-page-name="">
+ <style:paragraph-properties fo:line-height="100%" style:page-number="auto" text:number-lines="true" text:line-number="2"/>
+ </style:style>
+ <style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="9.5cm" style:type="center"/>
+ <style:tab-stop style:position="19.001cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17.002cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Footnote_20_Symbol" style:display-name="Footnote Symbol" style:family="text"/>
+ <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+ <style:style style:name="Endnote_20_Symbol" style:display-name="Endnote Symbol" style:family="text"/>
+ <style:style style:name="Footnote_20_anchor" style:display-name="Footnote anchor" style:family="text">
+ <style:text-properties style:text-position="super 58%"/>
+ </style:style>
+ <style:style style:name="Endnote_20_anchor" style:display-name="Endnote anchor" style:family="text">
+ <style:text-properties style:text-position="super 58%"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties/>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:list-style style:name="Numbering_20_1" style:display-name="Numbering 1">
+ <text:list-level-style-number text:level="1" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="2" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="3" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="4" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="5" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="6" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="7" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="8" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="9" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ <text:list-level-style-number text:level="10" text:style-name="Numbering_20_Symbols" style:num-suffix="." style:num-format="1">
+ <style:list-level-properties text:space-before="-0.499cm" text:min-label-width="0.499cm"/>
+ </text:list-level-style-number>
+ </text:list-style>
+ <text:notes-configuration text:note-class="footnote" text:citation-style-name="Footnote_20_Symbol" text:citation-body-style-name="Footnote_20_anchor" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="page"/>
+ <text:notes-configuration text:note-class="endnote" text:citation-style-name="Endnote_20_Symbol" text:citation-body-style-name="Endnote_20_anchor" text:master-page-name="Endnote" style:num-format="1" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Tabelle4" style:family="table">
+ <style:table-properties style:width="17.002cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.499cm" table:align="margins" border-model="collapsing"/>
+ </style:style>
+ <style:style style:name="Tabelle4.A" style:family="table-column">
+ <style:table-column-properties style:column-width="12.702cm" style:rel-column-width="48961*"/>
+ </style:style>
+ <style:style style:name="Tabelle4.B" style:family="table-column">
+ <style:table-column-properties style:column-width="2.147cm" style:rel-column-width="8272*"/>
+ </style:style>
+ <style:style style:name="Tabelle4.C" style:family="table-column">
+ <style:table-column-properties style:column-width="2.154cm" style:rel-column-width="8302*"/>
+ </style:style>
+ <style:style style:name="Tabelle4.1" style:family="table-row">
+ <style:table-row-properties style:row-height="0.501cm"/>
+ </style:style>
+ <style:style style:name="Tabelle4.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="Tabelle4.B1" style:family="table-cell">
+ <style:table-cell-properties style:vertical-align="middle" fo:padding="0cm" fo:border="none"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Schrift1">
+ <style:paragraph-properties>
+ <style:tab-stops>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="">
+ <style:paragraph-properties fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm" fo:margin-bottom="0.101cm" loext:contextual-spacing="false" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false" fo:hyphenation-ladder-count="no-limit" fo:text-indent="0cm" style:auto-text-indent="false" style:page-number="auto">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" fo:font-weight="normal" style:font-size-asian="10pt" style:font-size-complex="10pt" fo:hyphenate="true" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:line-height="100%"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P5" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="start" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P8" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="end" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P9" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt" text:display="true"/>
+ </style:style>
+ <style:style style:name="P10" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties style:font-name="Times New Roman" fo:font-size="10pt" fo:font-weight="normal" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P11" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties style:text-position="0% 100%" style:font-name="Times New Roman" fo:font-size="10pt" fo:font-weight="bold" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P12" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false"/>
+ <style:text-properties style:text-position="0% 100%" style:font-name="Times New Roman" fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P13" style:family="paragraph" style:parent-style-name="TextNormal">
+ <style:paragraph-properties fo:line-height="100%"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P14" style:family="paragraph" style:parent-style-name="TextNormal">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.499cm" loext:contextual-spacing="false"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P15" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.101cm" loext:contextual-spacing="false" fo:line-height="100%"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P16" style:family="paragraph" style:parent-style-name="Standard">
+ <style:paragraph-properties fo:line-height="100%" fo:break-before="auto" fo:break-after="auto"/>
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="P17" style:family="paragraph" style:parent-style-name="TextNormal">
+ <style:paragraph-properties fo:margin-top="0.199cm" fo:margin-bottom="0.199cm" loext:contextual-spacing="false" fo:line-height="100%" fo:text-align="start" style:justify-single-word="false"/>
+ <style:text-properties fo:font-size="10pt" fo:font-weight="normal" style:font-size-asian="10pt" style:font-weight-asian="normal" style:font-size-complex="10pt" style:font-weight-complex="normal"/>
+ </style:style>
+ <style:style style:name="P20" style:family="paragraph" style:parent-style-name="Vfg2" style:list-style-name="">
+ <style:text-properties fo:font-size="10pt" style:font-size-asian="10pt" style:font-size-complex="10pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-size="10pt"/>
+ </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="1cm" fo:margin-bottom="1cm" fo:margin-left="2.499cm" fo:margin-right="1.499cm" 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">
+ <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:header-footer-properties fo:min-height="0cm" fo:margin-bottom="0.499cm"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties svg:height="0.9cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.3cm"/>
+ </style:footer-style>
+ </style:page-layout>
+ <style:page-layout style:name="pm2">
+ <style:page-layout-properties fo:page-width="20.999cm" fo:page-height="29.699cm" 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">
+ <style:footnote-sep 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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ <style:header>
+ <text:p text:style-name="Header"/>
+ <text:p text:style-name="Header"/>
+ <text:p text:style-name="Header"/>
+ <text:p text:style-name="Header"/>
+ <text:p text:style-name="Header"/>
+ </style:header>
+ <style:footer>
+ <text:p text:style-name="P1"><text:tab/><text:span text:style-name="T1"><text:page-continuation text:string-value="- " text:select-page="next"/></text:span><text:span text:style-name="T1"><text:page-number text:select-page="current" text:page-adjust="1"/></text:span><text:span text:style-name="T1"><text:page-continuation text:string-value=" -" text:select-page="next"/></text:span></text:p>
+ </style:footer>
+ </style:master-page>
+ <style:master-page style:name="Endnote" style:page-layout-name="pm2"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <office:forms form:automatic-focus="false" form:apply-design-mode="false"/>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P14"/>
+ <text:p text:style-name="P14"/>
+ <text:p text:style-name="P13"/>
+ <text:p text:style-name="P17"/>
+ <text:p text:style-name="P13"/>
+ <text:p text:style-name="P13"/>
+ <text:p text:style-name="P13"/>
+ <text:p text:style-name="P13"/>
+ <table:table table:name="Tabelle4" table:style-name="Tabelle4">
+ <table:table-column table:style-name="Tabelle4.A"/>
+ <table:table-column table:style-name="Tabelle4.B"/>
+ <table:table-column table:style-name="Tabelle4.C"/>
+ <table:table-header-rows>
+ <table:table-row table:style-name="Tabelle4.1">
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P5">dfghdfgnhdfgnhdbhfghndhgbhdfbh</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.B1" office:value-type="string">
+ <text:p text:style-name="P11">von</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.B1" office:value-type="string">
+ <text:p text:style-name="P11">bis</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table-header-rows>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P12"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P12"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P3"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P10"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P10"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P3"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P10"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P10"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P8"><text:hidden-paragraph text:condition="ooow:1"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" table:number-columns-spanned="2" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1"/></text:p>
+ </table:table-cell>
+ <table:covered-table-cell/>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P9"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"><text:hidden-paragraph text:condition="ooow:1" text:is-hidden="true"/></text:p>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P6">fgdhgfhdfbhfbhfbhfgbfdbhdfbhfgbnfdbhdfbg</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Tabelle4.A1" office:value-type="string">
+ <text:p text:style-name="P7"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="P15"/>
+ <text:p text:style-name="P15"/>
+ <text:p text:style-name="P15"/>
+ <text:p text:style-name="P4"/>
+ <text:p text:style-name="P4"/>
+ <text:p text:style-name="P4"/>
+ <text:p text:style-name="P20"/>
+ <text:p text:style-name="P16"/>
+ <text:p text:style-name="P4"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/layout/data/tdf141079.odt b/sw/qa/extras/layout/data/tdf141079.odt
new file mode 100644
index 000000000000..65dfcb4a296f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf141079.odt
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf147485-forcepoint.doc b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc
new file mode 100644
index 000000000000..cb630efb8717
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf147485-forcepoint.doc
Binary files differ
diff --git a/sw/qa/extras/layout/data/three_sections.fodt b/sw/qa/extras/layout/data/three_sections.fodt
new file mode 100644
index 000000000000..9233fed89085
--- /dev/null
+++ b/sw/qa/extras/layout/data/three_sections.fodt
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:p>Select the text below, copy to clipboard, and paste from clipboard, replacing the selection.</text:p>
+ <text:section text:name="Section1">
+ <text:p>&lt;-- Start selection here. Section1</text:p>
+ </text:section>
+ <text:section text:name="Section2">
+ <text:p>Section2</text:p>
+ </text:section>
+ <text:section text:name="Section3">
+ <text:p>Section3. End selection here --&gt;</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index c94811b4d5e7..a5f1906cd8e9 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -108,6 +108,18 @@ void SwLayoutWriter::CheckRedlineFootnotesHidden()
assertXPath(pXmlDoc, "/root/page[1]/ftncont/ftn[2]/txt[1]/Text[1]", "Portion", "mo");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf156077)
+{
+ createDoc("s4_min2.fodt");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number of pages does not match!", 3, getPages());
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/anchored/fly", 3);
+ assertXPath(pXmlDoc, "/root/page[2]/anchored/fly", 1);
+ // this was 0, the at-page anchored flys were not displayed
+ assertXPath(pXmlDoc, "/root/page[3]/anchored/fly", 3);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFootnotes)
{
createDoc("redline_footnotes.odt");
@@ -2946,14 +2958,85 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint72) { createDoc("forcepoint72
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint75) { createDoc("forcepoint75-1.rtf"); }
+// FIXME: apparently infinite loop on Mac
+#ifndef MACOSX
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testUXTSOREL) { createDoc("LIBREOFFICE-UXTSOREL.rtf"); }
+#endif
+
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
{
createDoc("forcepoint-swfootnoteframe-1.rtf");
}
-//FIXME: disabled after failing again with fixed layout
-//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); }
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76)
+{
+ createDoc("forcepoint76-1.rtf");
+}
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testN4LA0OHZ) { createDoc("LIBREOFFICE-N4LA0OHZ.rtf"); }
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
+{
+ createDoc("forcepoint90.rtf");
+}
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint91)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint91.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint92) { createDoc("forcepoint92.doc"); }
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint93)
+{
+//fails to load createDoc("forcepoint93-1.rtf");
+//layout loop createDoc("forcepoint93-2.rtf");
+}
+
+#if 0 // no createSwWebDoc
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint94.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint98)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint98.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint102)
+{
+ createDoc("forcepoint102.rtf");
+}
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
+{
+ createDoc("tdf147485-forcepoint.doc");
+}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
{
@@ -2962,6 +3045,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
}
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint99)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint99.html");
+}
+#endif
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128611)
{
createDoc("tdf128611.fodt");
@@ -3009,13 +3100,25 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf119875)
{
createDoc("tdf119875.odt");
xmlDocPtr pXmlDoc = parseLayoutDump();
- sal_Int32 nFirstTop
- = getXPath(pXmlDoc, "/root/page[2]/body/section[1]/infos/bounds", "top").toInt32();
- sal_Int32 nSecondTop
- = getXPath(pXmlDoc, "/root/page[2]/body/section[2]/infos/bounds", "top").toInt32();
- // The first section had the same top value as the second one, so they
- // overlapped.
- CPPUNIT_ASSERT_LESS(nSecondTop, nFirstTop);
+
+ assertXPath(pXmlDoc, "//page[2]/body/section[1]", "formatName", u"S10");
+ assertXPath(pXmlDoc, "//page[2]/body/section[2]", "formatName", u"S11");
+ assertXPath(pXmlDoc, "//page[2]/body/section[3]", "formatName", u"S13");
+ assertXPath(pXmlDoc, "//page[2]/body/section[4]", "formatName", u"S14");
+ // Sections "S10" and "S13" are hidden -> their frames are zero-height
+ assertXPath(pXmlDoc, "//page[2]/body/section[1]/infos/bounds", "height", u"0");
+ assertXPath(pXmlDoc, "//page[2]/body/section[3]/infos/bounds", "height", u"0");
+
+ OUString S10Top = getXPath(pXmlDoc, "//page[2]/body/section[1]/infos/bounds", "top");
+ OUString S11Top = getXPath(pXmlDoc, "//page[2]/body/section[2]/infos/bounds", "top");
+ OUString S13Top = getXPath(pXmlDoc, "//page[2]/body/section[3]/infos/bounds", "top");
+ OUString S14Top = getXPath(pXmlDoc, "//page[2]/body/section[4]/infos/bounds", "top");
+
+ CPPUNIT_ASSERT_EQUAL(S10Top, S11Top);
+ CPPUNIT_ASSERT_EQUAL(S13Top, S14Top);
+
+ // Section "S11" had the same top value as section "S14", so they overlapped.
+ CPPUNIT_ASSERT_LESS(S14Top.toInt32(), S11Top.toInt32());
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf120287)
@@ -3097,6 +3200,58 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf115094)
CPPUNIT_ASSERT_LESS(nTopOfB2Anchored, nTopOfB2);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testKeepWithNextPlusFlyFollowTextFlow)
+{
+ createDoc("keep-with-next-fly.fodt");
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // 3 text frames on page 1
+ assertXPath(pXmlDoc, "/root/page[1]/body/infos/bounds", "bottom", "7540");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/anchored/fly/infos/bounds", "top", "1694");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page", 1);
+ discardDumpedLayout();
+ }
+
+ lcl_dispatchCommand(mxComponent, ".uno:Fieldnames", {});
+ Scheduler::ProcessEventsToIdle();
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // 1 text frame on page 1, and some empty space
+ assertXPath(pXmlDoc, "/root/page[1]/body/infos/bounds", "bottom", "7540");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/infos/bounds", "height", "5796");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/infos/bounds", "bottom", "7213");
+ // 2 text frames on page 2
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly/infos/bounds", "top", "10093");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page", 2);
+ discardDumpedLayout();
+ }
+
+ lcl_dispatchCommand(mxComponent, ".uno:Fieldnames", {});
+ Scheduler::ProcessEventsToIdle();
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // 3 text frames on page 1
+ assertXPath(pXmlDoc, "/root/page[1]/body/infos/bounds", "bottom", "7540");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/anchored/fly/infos/bounds", "top", "1694");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/infos/bounds", "height", "276");
+ assertXPath(pXmlDoc, "/root/page", 1);
+ discardDumpedLayout();
+ }
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf122607)
{
createDoc("tdf122607.odt");
@@ -3351,6 +3506,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116501)
createDoc("tdf116501.odt");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testAbi11870)
+{
+ //just care it doesn't assert
+ createDoc("abi11870-2.odt");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118719)
{
// Insert a page break.
@@ -3419,6 +3580,36 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testImageComment)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(5), aPosition.nContent.GetIndex());
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testScriptField)
+{
+ // Test clicking script field inside table ( tdf#141079 )
+ SwDoc* pDoc = createDoc("tdf141079.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // Look up layout position which is the first cell in the table
+ SwRootFrame* pRoot = pWrtShell->GetLayout();
+ CPPUNIT_ASSERT(pRoot->GetLower()->IsPageFrame());
+ SwPageFrame* pPage = static_cast<SwPageFrame*>(pRoot->GetLower());
+ CPPUNIT_ASSERT(pPage->GetLower()->IsBodyFrame());
+ SwBodyFrame* pBody = static_cast<SwBodyFrame*>(pPage->GetLower());
+ CPPUNIT_ASSERT(pBody->GetLower()->IsTextFrame());
+ SwTextFrame* pTextFrame = static_cast<SwTextFrame*>(pBody->GetLower());
+ CPPUNIT_ASSERT(pTextFrame->GetNext()->IsTabFrame());
+ SwFrame* pTable = pTextFrame->GetNext();
+ SwFrame* pRow1 = pTable->GetLower();
+ CPPUNIT_ASSERT(pRow1->GetLower()->IsCellFrame());
+ SwFrame* pCell1 = pRow1->GetLower();
+ CPPUNIT_ASSERT(pCell1->GetLower()->IsTextFrame());
+ SwTextFrame* pCellTextFrame = static_cast<SwTextFrame*>(pCell1->GetLower());
+ const SwRect& rCellRect = pCell1->getFrameArea();
+ Point aPoint = rCellRect.Center();
+ aPoint.setX(aPoint.getX() - rCellRect.Width() / 2);
+ // Ask for the doc model pos of this layout point.
+ SwPosition aPosition(*pCellTextFrame->GetTextNodeForFirstText());
+ pCellTextFrame->GetCursorOfst(&aPosition, aPoint);
+ // Position was 1 without the fix from tdf#141079
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aPosition.nContent.GetIndex());
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf64222)
{
createDoc("tdf64222.docx");
@@ -3931,6 +4122,103 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134548)
}
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf154113)
+{
+ createDoc("three_sections.fodt");
+ Scheduler::ProcessEventsToIdle();
+
+ lcl_dispatchCommand(mxComponent, ".uno:GoToStartOfDoc", {});
+ lcl_dispatchCommand(mxComponent, ".uno:GoToNextPara", {});
+ lcl_dispatchCommand(mxComponent, ".uno:EndOfDocumentSel", {}); // to the end of current section!
+ lcl_dispatchCommand(mxComponent, ".uno:EndOfDocumentSel", {}); // to the end of the document.
+
+ css::uno::Reference <frame::XModel> xModel(mxComponent, css::uno::UNO_QUERY_THROW);
+ css::uno::Reference <container::XIndexAccess> xSelected(xModel->getCurrentSelection(), css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSelected->getCount());
+ css::uno::Reference <text::XTextRange> xRange (xSelected->getByIndex(0), css::uno::UNO_QUERY_THROW);
+
+ //css::uno::Reference < css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("<-- Start selection here. Section1" SAL_NEWLINE_STRING
+ "Section2" SAL_NEWLINE_STRING "Section3. End selection here -->"),
+ xRange->getString());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Cut", {});
+
+ xSelected = css::uno::Reference <container::XIndexAccess> (xModel->getCurrentSelection(), css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSelected->getCount());
+ xRange = css::uno::Reference <text::XTextRange> (xSelected->getByIndex(0), css::uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString(), xRange->getString());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ xmlDocPtr pXml = parseLayoutDump();
+
+ // Without the fix in place, this would fail with
+ // - Expected: 3
+ // - Actual : 2
+ assertXPath(pXml, "/root/page/body/section", 3);
+ assertXPath(pXml, "/root/page/body/section[1]/txt/LineBreak", "Line",
+ "<-- Start selection here. Section1");
+ assertXPath(pXml, "/root/page/body/section[2]/txt/LineBreak", "Line",
+ "Section2");
+ assertXPath(pXml, "/root/page/body/section[3]/txt/LineBreak", "Line",
+ "Section3. End selection here -->");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTable0HeightRows)
+{
+ createDoc("table-0-height-rows.fodt");
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // the problem was that the table was erroneously split across 2 or 3 pages
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 28);
+ // xpath doesn't work on this branch? assertXPath(pXmlDoc, "/root/page[1]/body/tab/row/infos/bounds[@height='0']", 25);
+ assertXPath(pXmlDoc, "/root/page", 1);
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testLargeTopParaMarginAfterHiddenSection)
+{
+ // Given a large top margin in Standard paragraph style, and the first section hidden
+ createDoc("largeTopMarginAndHiddenFirstSection.fodt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // Make sure there is only one page and two sections, first hidden (zero-height)
+ assertXPath(pXmlDoc, "//page", 1);
+ assertXPath(pXmlDoc, "//page/body/section", 2);
+ assertXPath(pXmlDoc, "//page/body/section[1]/infos/bounds", "height", u"0");
+ // Check that the top margin (1 in = 1440 twip) is added to line height (12 pt = 240 twip)
+ assertXPath(pXmlDoc, "//page/body/section[2]/infos/bounds", "height", u"1680");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testPageBreakInHiddenSection)
+{
+ // Given a paragraph with page-break-before with page style and page number
+ createDoc("pageBreakInHiddenSection.fodt");
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "//page", 4);
+ assertXPath(pXmlDoc, "//section", 4);
+ assertXPath(pXmlDoc, "//page[1]/body/txt", 1);
+ // The page break inside the hidden section is ignored (otherwise, there would be one section
+ // on the first page)
+ assertXPath(pXmlDoc, "//page[1]/body/section", 2);
+ // The first section is hidden
+ assertXPath(pXmlDoc, "//page[1]/body/section[1]/infos/bounds", "height", u"0");
+
+ // Page 2 is empty even page (generated by the next page's section with page-break-before)
+ assertXPath(pXmlDoc, "//page[2]/body", 0);
+
+ // The section on page 3 is not hidden, only text in it is, therefore its page break works
+ assertXPath(pXmlDoc, "//page[3]/body/section", 1);
+ assertXPath(pXmlDoc, "//page[3]/body/section/infos/bounds", "height", u"0");
+
+ // The section on page 4 is hidden, thus page break in it is ignored (no further pages, where
+ // the section would be moved to otherwise)
+ assertXPath(pXmlDoc, "//page[4]/body/section", 1);
+ assertXPath(pXmlDoc, "//page[4]/body/section/infos/bounds", "height", u"0");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt b/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt
new file mode 100644
index 000000000000..f2bffb050ac4
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/tdf137199.docx b/sw/qa/extras/odfexport/data/tdf137199.docx
new file mode 100644
index 000000000000..25b52977beca
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf137199.docx
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/tdf151100.docx b/sw/qa/extras/odfexport/data/tdf151100.docx
new file mode 100644
index 000000000000..e0341bdb9c8c
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf151100.docx
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 321ce301fb9c..e686e9d46a46 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -99,6 +99,21 @@ public:
}
};
+CPPUNIT_TEST_FIXTURE(Test, tdf151100)
+{
+ // Similar to tdf135942
+
+ load(mpTestDocumentPath, "tdf151100.docx");
+ reload(mpFilter, "tdf151100.docx");
+ // All table autostyles should be collected, including nested, and must not crash.
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ xmlDocPtr pXmlDoc = parseExport("styles.xml");
+
+ assertXPath(pXmlDoc, "/office:document-styles/office:automatic-styles/style:style[@style:family='table']", 1);
+}
+
DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx")
{
uno::Reference<util::XModifiable> xModifiable(mxComponent, uno::UNO_QUERY);
@@ -112,6 +127,17 @@ DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx")
CPPUNIT_ASSERT_EQUAL(OUString(" size 12{2+2=4} {}"), formula2);
}
+DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(OUString(">1<"), getProperty<OUString>(getParagraph(1), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("1)"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("HELLO1WORLD!"), getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+ CPPUNIT_ASSERT_EQUAL(OUString("HELLO2WORLD!"), getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
static void testTdf43569_CheckIfFieldParse()
{
{
@@ -219,6 +245,16 @@ DECLARE_ODFEXPORT_TEST(testTdf43569, "tdf43569_conditionalfield.doc")
CPPUNIT_ASSERT(xFields->hasMoreElements());
}
+DECLARE_ODFEXPORT_TEST(testTdf131025_noZerosInTable, "tdf131025_noZerosInTable.odt")
+{
+ uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xTables = xSupplier->getTextTables();
+ uno::Reference<text::XTextTable> xTable(xTables->getByName("Table1"), uno::UNO_QUERY);
+
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("C3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("5 gp"), xCell->getString());
+}
+
DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
{
uno::Reference<drawing::XShape> const xShape(getShape(1));
diff --git a/sw/qa/extras/odfimport/data/forcepoint108.fodt b/sw/qa/extras/odfimport/data/forcepoint108.fodt
new file mode 100644
index 000000000000..4328ea65f61d
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/forcepoint108.fodt
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle: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:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d: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:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:initial-creator>ms </meta:initial-creator><meta:creation-date>2015-08-24T21:49:45.305718699</meta:creation-date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/4.3.7.2$Linux_X86_64 LibreOffice_project/8a35821d8636a03b8bf4e15b48f59794652c68ba</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Sans" svg:font-family="&apos;Liberation Sans&apos;" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN Regular" svg:font-family="&apos;Source Han Sans CN Regular&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Sans CN Regular" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <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:footnote-max-height="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="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="000b01fe" officeooo:paragraph-rsid="000b01fe"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+
+ <text:tracked-changes>
+ <text:changed-region xml:id="ct58510944" text:id="ct58510944">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>ms </dc:creator>
+ <dc:date>2015-09-10T15:36:00</dc:date>
+ </office:change-info>
+ <text:p text:style-name="P1"><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="char" svg:width="2cm" draw:z-index="-0"><draw:text-box fo:min-height="1.158cm"><text:p text:style-name="P1">foo<text:change text:change-id="ct58510944"/></text:p>
+
+ </office:text>
+ </office:body>
diff --git a/sw/qa/extras/odfimport/data/incorrectsum.odt b/sw/qa/extras/odfimport/data/incorrectsum.odt
new file mode 100644
index 000000000000..0e1e99b0d699
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/incorrectsum.odt
Binary files differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 27e1809eaeff..dc9bc44679e6 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/lang/Locale.hpp>
+#include <vcl/scheduler.hxx>
#include <IDocumentSettingAccess.hxx>
#include <wrtsh.hxx>
@@ -39,10 +40,12 @@
typedef std::map<OUString, css::uno::Sequence< css::table::BorderLine> > AllBordersMap;
typedef std::pair<OUString, css::uno::Sequence< css::table::BorderLine> > StringSequencePair;
+char const DATA_DIRECTORY[] = "/sw/qa/extras/odfimport/data/";
+
class Test : public SwModelTestBase
{
public:
- Test() : SwModelTestBase("/sw/qa/extras/odfimport/data/", "writer8") {}
+ Test() : SwModelTestBase(DATA_DIRECTORY, "writer8") {}
};
DECLARE_ODFIMPORT_TEST(testEmptySvgFamilyName, "empty-svg-family-name.odt")
@@ -463,6 +466,17 @@ DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt")
CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371
}
+DECLARE_ODFIMPORT_TEST(testIncorrectSum, "incorrectsum.odt")
+{
+ Scheduler::ProcessEventsToIdle();
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xCell(xTextTable->getCellByName("C3"), uno::UNO_QUERY);
+ // Use indexOf instead of exact match since the result contains an Euro sign which OUString doesn't like
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xCell->getString().indexOf("1,278"));
+}
+
DECLARE_ODFIMPORT_TEST(testCalcFootnoteContent, "ooo32780-1.odt")
{
//this was a CalcFootnoteContent crash
@@ -576,6 +590,8 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt")
pWrtShell->SelAll(); // Selects the whole table.
pWrtShell->SelAll(); // Selects the whole document.
+ pShellCursor = pWrtShell->getShellCursor(false);
+
SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
@@ -641,11 +657,11 @@ DECLARE_ODFIMPORT_TEST(testFdo69862, "fdo69862.odt")
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
CPPUNIT_ASSERT(pTextDoc);
SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
- SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
pWrtShell->SelAll(); // Selects A1.
pWrtShell->SelAll(); // Selects the whole table.
pWrtShell->SelAll(); // Selects the whole document.
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode());
// This was "Footnote.", as Ctrl-A also selected footnotes, but it should not.
CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText());
@@ -1000,5 +1016,13 @@ DECLARE_ODFIMPORT_TEST(testTdf133459, "tdf133459.odt")
CPPUNIT_ASSERT_EQUAL(OUString("QQ YYYY"), getProperty<OUString>(xFormat, "FormatString"));
}
+// just care that it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(Test, testForcepoint108)
+{
+ //load would assert because it fails to load entirely, like testMathMalformedXml
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "forcepoint108.fodt";
+ mxComponent = mxDesktop->loadComponentFromURL(aURL, "_default", 0, {});
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/data/tdf155690.docx b/sw/qa/extras/ooxmlexport/data/tdf155690.docx
new file mode 100644
index 000000000000..1839862688ee
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf155690.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 5ad0a4ece74c..aa6d6e557e79 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -44,11 +44,11 @@ DECLARE_SW_EXPORT_TEST(testFlyInFly, "ooo39250-1-min.rtf", nullptr, Test)
// check that anchor of text frame is in other text frame
uno::Reference<text::XTextContent> const xAnchored(getShape(3), uno::UNO_QUERY);
CPPUNIT_ASSERT(xAnchored.is());
- CPPUNIT_ASSERT_EQUAL(OUString(""), uno::Reference<container::XNamed>(xAnchored, uno::UNO_QUERY_THROW)->getName());
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame1")/*generated name*/, uno::Reference<container::XNamed>(xAnchored, uno::UNO_QUERY_THROW)->getName());
uno::Reference<text::XText> const xAnchorText(xAnchored->getAnchor()->getText());
uno::Reference<text::XTextFrame> const xAnchorFrame(xAnchorText, uno::UNO_QUERY);
CPPUNIT_ASSERT(xAnchorFrame.is());
- CPPUNIT_ASSERT_EQUAL(OUString("Frame2"), uno::Reference<container::XNamed>(xAnchorFrame, uno::UNO_QUERY_THROW)->getName());
+ CPPUNIT_ASSERT_EQUAL(OUString("Frame3"), uno::Reference<container::XNamed>(xAnchorFrame, uno::UNO_QUERY_THROW)->getName());
}
DECLARE_OOXMLEXPORT_TEST(testTdf125778_lostPageBreakTOX, "tdf125778_lostPageBreakTOX.docx")
@@ -61,6 +61,53 @@ DECLARE_OOXMLEXPORT_TEST(testTdf126994_lostPageBreak, "tdf126994_lostPageBreak.d
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of Pages", 3, getPages() );
}
+DECLARE_OOXMLEXPORT_TEST(testTdf155690, "tdf155690.docx")
+{
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarks = xBookmarksSupplier->getBookmarks();
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ // the problem was that the start was after the H
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_2"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row1_4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_1"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("ello world"), xMark->getAnchor()->getString());
+ }
+ {
+ uno::Reference<text::XTextContent> xMark(xBookmarks->getByName("row2_4"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Hello world"), xMark->getAnchor()->getString());
+ }
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF, "tdf121374_sectionHF.odt")
{
uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY);
@@ -588,7 +635,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf124594, "tdf124594.docx")
// only "Er horte leise Schritte hinter", which means the 1st line of the 2nd paragraph was
// split into two by a Special portion, i.e. the top margin of the shape was too large.
assertXPath(pDump, "/root/page/body/txt[2]/Text[1]", "Portion",
- "Er horte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer wurde ihm ");
+ "Er horte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer wu"); // ... until the bookmark.
}
DECLARE_OOXMLEXPORT_TEST(testTextInput, "textinput.odt")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 87795d6ba6c6..696e9c4ee3bd 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -1140,11 +1140,11 @@ DECLARE_OOXMLEXPORT_TEST(tdf122201_editUnprotectedText, "tdf122201_editUnprotect
// check protected area
SwPaM aPaMPortected(aDocStart);
- CPPUNIT_ASSERT(aPaMPortected.HasReadonlySel(false));
+ CPPUNIT_ASSERT(aPaMPortected.HasReadonlySel(false, false));
// check unprotected area
SwPaM aPaMUnprotected(aDocEnd);
- CPPUNIT_ASSERT(!aPaMUnprotected.HasReadonlySel(false));
+ CPPUNIT_ASSERT(!aPaMUnprotected.HasReadonlySel(false, false));
}
DECLARE_OOXMLEXPORT_TEST(testSectionHeader, "sectionprot.odt")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index fbe8d9d01421..2647b12bcde5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -1019,11 +1019,13 @@ DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx")
CPPUNIT_ASSERT_EQUAL(OUString("M.d.yyyy"), sDateFormat);
}
+#if 0
DECLARE_OOXMLEXPORT_TEST(testN830205, "n830205.docx")
{
// Previously import just crashed (due to infinite recursion).
getParagraph(1, "XXX");
}
+#endif
DECLARE_OOXMLEXPORT_TEST(tdf123705, "tdf123705.docx")
{
diff --git a/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt b/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt
new file mode 100644
index 000000000000..2095c7173046
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/FrameInHiddenSection.fodt
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:body>
+ <office:text>
+ <text:section text:name="Section1">
+ <text:section text:name="Section2Hidden" text:display="none">
+ <text:p><draw:frame text:anchor-type="paragraph" svg:x="1cm" svg:y="1cm" svg:width="1cm">
+ <draw:text-box/>
+ </draw:frame>lorem</text:p>
+ </text:section>
+ <text:section text:name="Section3"/>
+ <text:section text:name="Section4"/>
+ <text:section text:name="Section5">
+ <text:p>ipsum</text:p>
+ </text:section>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/demo91.fodt b/sw/qa/extras/uiwriter/data/demo91.fodt
new file mode 100644
index 000000000000..de27c587a35d
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/demo91.fodt
@@ -0,0 +1,156 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form: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:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2022-06-16T15:27:43.487415219</meta:creation-date><meta:editing-duration>PT29M</meta:editing-duration><meta:editing-cycles>32</meta:editing-cycles><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/fc6bd4f18ea90f789a1425e2c830f4b42457012e</meta:generator><dc:date>2022-06-22T20:18:58.711000000</dc:date><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="5" meta:word-count="11" meta:character-count="52" meta:non-whitespace-character-count="44"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Arial Unicode MS1" svg:font-family="'Arial Unicode MS'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Songti SC" svg:font-family="'Songti SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:writing-mode="lr-tb" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="nl" fo:country="NL" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="nl" fo:country="NL" style:letter-kerning="true" style:font-name-asian="Songti SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Arial Unicode MS1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+ <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.247cm" style:contextual-spacing="false" fo:line-height="115%"/>
+ </style:style>
+ <style:style style:name="_5f__5f_XXX_5f__5f__5f_invalid" style:display-name="__XXX___invalid" style:family="text"/>
+ <style:style style:name="Line_20_numbering" style:display-name="Line numbering" style:family="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%1%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%2%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%3%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%4%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%5%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%6%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%7%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%8%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%9%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" text:style-name="_5f__5f_XXX_5f__5f__5f_invalid" loext:num-list-format="%10%" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:style-name="Line_20_numbering" text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph" style:parent-style-name="Text_20_body">
+ <style:text-properties fo:background-color="#ffff00"/>
+ </style:style>
+ <style:style style:name="P6" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#fc5c00"/>
+ </style:style>
+ <style:style style:name="P7" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#ffd74c"/>
+ </style:style>
+ <style:style style:name="T3" style:family="text">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="T4" style:family="text">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.335cm" fo:min-width="3.805cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#fc5c00" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.335cm" fo:min-width="3.805cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ </style:style>
+ <style:style style:name="gr3" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#ffd74c" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="2.335cm" fo:min-width="3.805cm" style:run-through="foreground" style:wrap="run-through" style:number-wrapped-paragraphs="no-limit" style:vertical-pos="from-top" style:vertical-rel="paragraph" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ </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:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P4"><draw:custom-shape text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape 2" draw:style-name="gr3" draw:text-style-name="P7" svg:width="3.805cm" svg:height="2.336cm" svg:x="7.482cm" svg:y="4.052cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><draw:custom-shape text:anchor-type="char" draw:z-index="1" draw:name="Shape 3" draw:style-name="gr2" draw:text-style-name="P6" svg:width="3.805cm" svg:height="2.336cm" svg:x="11.382cm" svg:y="4.062cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape><text:span text:style-name="T4">yellow</text:span><draw:custom-shape text:anchor-type="char" draw:z-index="2" draw:name="Shape 4" draw:style-name="gr1" svg:width="3.805cm" svg:height="2.336cm" svg:x="3.554cm" svg:y="4.041cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape> <text:span text:style-name="T4">at end</text:span><text:span text:style-name="T3">orange</text:span><draw:custom-shape text:anchor-type="char" draw:z-index="4" draw:name="Shape 4" draw:style-name="gr2" draw:text-style-name="P6" svg:width="3.805cm" svg:height="2.336cm" svg:x="15.187cm" svg:y="4.062cm">
+ <text:p/>
+ <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:type="rectangle" draw:enhanced-path="M 0 0 L 21600 0 21600 21600 0 21600 0 0 Z N"/>
+ </draw:custom-shape></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt b/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt
new file mode 100644
index 000000000000..12761847ed75
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/hiddenSectionsAroundPageBreak.fodt
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:master-page-name="Landscape">
+ <style:paragraph-properties style:page-number="auto" fo:break-before="page"/>
+ </style:style>
+ </office:automatic-styles>
+ <office:body>
+ <office:text>
+ <text:section text:name="Section 1" text:display="none"/>
+ <text:section text:name="Section 2">
+ <text:p text:style-name="P1">A paragraph with a page-break-before</text:p>
+ </text:section>
+ <text:section text:name="Section 3" text:display="none"/>
+ <text:section text:name="Section 4">
+ <text:p>Lorem</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/pagebreak-source.fodt b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
new file mode 100644
index 000000000000..cb72fea62a85
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/pagebreak-source.fodt
@@ -0,0 +1,131 @@
+<?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: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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office: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:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext: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:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2024-03-05T16:51:41.526594818</meta:creation-date><dc:date>2024-03-05T17:24:50.151189313</dc:date><meta:editing-duration>PT24M14S</meta:editing-duration><meta:editing-cycles>5</meta:editing-cycles><meta:generator>CIB_OfficeDev/6.4.0.24$Linux_X86_64 LibreOffice_project/2b8ce275a2d1aae9319dfc266e677412b611101d</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans Devanagari" svg:font-family="'Noto Sans Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="WithMargin">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="transparent" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </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">
+ <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:page-layout style:name="pm2">
+ <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="10cm" 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">
+ <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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="WithMargin" style:page-layout-name="pm2"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:section text:style-name="Sect1" text:name="SourceSection">
+ <text:p text:style-name="P3"><text:hidden-paragraph text:condition="ooow:TRUE" text:is-hidden="true"/></text:p>
+ <text:p text:style-name="P2"/>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/pagebreak-target.fodt b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
new file mode 100644
index 000000000000..1219cdd95e25
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/pagebreak-target.fodt
@@ -0,0 +1,137 @@
+<?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: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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office: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:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext: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:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2024-03-05T16:57:01.179149401</meta:creation-date><dc:date>2024-03-05T16:58:35.972978544</dc:date><meta:editing-duration>PT1M35S</meta:editing-duration><meta:editing-cycles>2</meta:editing-cycles><meta:generator>CIB_OfficeDev/6.4.0.24$Linux_X86_64 LibreOffice_project/2b8ce275a2d1aae9319dfc266e677412b611101d</meta:generator><meta:document-statistic meta:table-count="0" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans Devanagari" svg:font-family="'Noto Sans Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="'Noto Serif CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Noto Sans Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Frame_20_contents" style:display-name="Frame contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra"/>
+ <style:style style:name="Frame" style:family="graphic">
+ <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="WithMargin">
+ <style:paragraph-properties style:page-number="auto"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+ <style:graphic-properties style:vertical-pos="top" style:vertical-rel="page-content" style:horizontal-pos="center" style:horizontal-rel="page"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ </style:section-properties>
+ </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:footnote-max-height="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:page-layout style:name="pm2">
+ <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="10cm" fo:margin-bottom="2cm" fo:margin-left="2cm" fo:margin-right="2cm" style:writing-mode="lr-tb" style:footnote-max-height="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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ <style:master-page style:name="WithMargin" style:page-layout-name="pm2"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls><draw:frame draw:style-name="fr1" draw:name="Frame1" text:anchor-type="page" text:anchor-page-number="1" svg:width="2cm" draw:z-index="0">
+ <draw:text-box fo:min-height="0.499cm">
+ <text:p text:style-name="Frame_20_contents"/>
+ </draw:text-box>
+ </draw:frame>
+ <text:section text:style-name="Sect1" text:name="TargetSection">
+ <text:p text:style-name="P1"/>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt b/sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt
new file mode 100644
index 000000000000..4e18f7dc2ce4
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/table-at-end-of-cell.fodt
@@ -0,0 +1,219 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<office:document 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form: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:officeooo="http://openoffice.org/2009/office" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:meta><meta:creation-date>2023-06-15T12:29:51.722401974</meta:creation-date><dc:date>2023-06-15T12:30:57.494419372</dc:date><meta:editing-duration>PT1M13S</meta:editing-duration><meta:editing-cycles>1</meta:editing-cycles><meta:document-statistic meta:table-count="2" meta:image-count="0" meta:object-count="0" meta:page-count="1" meta:paragraph-count="0" meta:word-count="0" meta:character-count="0" meta:non-whitespace-character-count="0"/><meta:generator>LibreOfficeDev/7.6.0.0.alpha0$Linux_X86_64 LibreOffice_project/2e5dbe93649ec8043e9da75ddc01c486dbbf18e0</meta:generator></office:meta>
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="'Liberation Serif'" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="'Lohit Devanagari'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Sans CJK SC" svg:font-family="'Noto Sans CJK SC'" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" loext:tab-stop-distance="0cm" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Sans CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Noto Sans CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false" loext:hyphenation-no-last-word="false" loext:hyphenation-word-char-count="5" loext:hyphenation-zone="no-limit"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties fo:orphans="0" fo:widows="0" text:number-lines="false" text:line-number="0"/>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ <loext:theme loext:name="Office Theme">
+ <loext:color-table loext:name="LibreOffice">
+ <loext:color loext:name="dk1" loext:color="#000000"/>
+ <loext:color loext:name="lt1" loext:color="#ffffff"/>
+ <loext:color loext:name="dk2" loext:color="#000000"/>
+ <loext:color loext:name="lt2" loext:color="#ffffff"/>
+ <loext:color loext:name="accent1" loext:color="#18a303"/>
+ <loext:color loext:name="accent2" loext:color="#0369a3"/>
+ <loext:color loext:name="accent3" loext:color="#a33e03"/>
+ <loext:color loext:name="accent4" loext:color="#8e03a3"/>
+ <loext:color loext:name="accent5" loext:color="#c99c00"/>
+ <loext:color loext:name="accent6" loext:color="#c9211e"/>
+ <loext:color loext:name="hlink" loext:color="#0000ee"/>
+ <loext:color loext:name="folHlink" loext:color="#551a8b"/>
+ </loext:color-table>
+ </loext:theme>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="8.5cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table1.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="8.306cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="4.154cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2" style:family="table">
+ <style:table-properties style:width="8.306cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table2.A" style:family="table-column">
+ <style:table-column-properties style:column-width="4.154cm" style:rel-column-width="32767*"/>
+ </style:style>
+ <style:style style:name="Table2.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="0.5pt solid #000000" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.B1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.A2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="none" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </style:style>
+ <style:style style:name="Table2.B2" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border-left="0.5pt solid #000000" fo:border-right="0.5pt solid #000000" fo:border-top="none" fo:border-bottom="0.5pt solid #000000"/>
+ </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: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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A" table:number-columns-repeated="2"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table1.B2" office:value-type="string">
+ <text:p text:style-name="Standard"/>
+ <table:table table:name="Table2" table:style-name="Table2">
+ <table:table-column table:style-name="Table2.A" table:number-columns-repeated="2"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.B1" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ <table:table-row>
+ <table:table-cell table:style-name="Table2.A2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ <table:table-cell table:style-name="Table2.B2" office:value-type="string">
+ <text:p text:style-name="Table_20_Contents"/>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ <text:p text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sw/qa/extras/uiwriter/data/tdf114973.fodt b/sw/qa/extras/uiwriter/data/tdf114973.fodt
new file mode 100644
index 000000000000..8638cbbb6b4a
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf114973.fodt
@@ -0,0 +1,144 @@
+<?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: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:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office: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:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext: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:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Arial" svg:font-family="Arial" style:font-family-generic="swiss"/>
+ <style:font-face style:name="Lucida Sans" svg:font-family="'Lucida Sans'" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="NSimSun" svg:font-family="NSimSun" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="NSimSun" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lucida Sans" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Header" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <style:style style:name="Footer" style:family="paragraph" style:parent-style-name="Header_20_and_20_Footer" style:class="extra">
+ <style:paragraph-properties text:number-lines="false" text:line-number="0">
+ <style:tab-stops>
+ <style:tab-stop style:position="8.5cm" style:type="center"/>
+ <style:tab-stop style:position="17cm" style:type="right"/>
+ </style:tab-stops>
+ </style:paragraph-properties>
+ </style:style>
+ <text:outline-style style:name="Outline">
+ <text:outline-level-style text:level="1" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="2" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="3" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="4" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="5" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="6" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="7" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="8" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="9" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ <text:outline-level-style text:level="10" style:num-format="">
+ <style:list-level-properties text:list-level-position-and-space-mode="label-alignment">
+ <style:list-level-label-alignment text:label-followed-by="listtab"/>
+ </style:list-level-properties>
+ </text:outline-level-style>
+ </text:outline-style>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <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">
+ <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:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0.499cm" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#729fcf"/>
+ </style:header-style>
+ <style:footer-style>
+ <style:header-footer-properties fo:min-height="0.998cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0.499cm" fo:background-color="transparent" style:dynamic-spacing="false" draw:fill="none" draw:fill-color="#729fcf"/>
+ </style:footer-style>
+ </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1">
+ <style:header>
+ <text:p text:style-name="Header">Header</text:p>
+ </style:header>
+ <style:footer>
+ <text:p text:style-name="Footer">Footer</text:p>
+ </style:footer>
+ </style:master-page>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:p text:style-name="Standard">hidden first paragraph<text:hidden-paragraph text:condition="ooow:TRUE" text:is-hidden="true"/></text:p>
+ <text:p text:style-name="Standard">Press CTRL+A for dispatching .uno:SelectAll. You see that nothing will be selected. The cursor jumps to the header</text:p>
+ <text:p text:style-name="Standard">hidden last paragraph<text:hidden-paragraph text:condition="ooow:TRUE" text:is-hidden="true"/></text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data/tdf125154.odt b/sw/qa/extras/uiwriter/data/tdf125154.odt
new file mode 100644
index 000000000000..81dee2be72cf
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf125154.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf133982.docx b/sw/qa/extras/uiwriter/data/tdf133982.docx
new file mode 100644
index 000000000000..d2e8573d15ac
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf133982.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf134021.docx b/sw/qa/extras/uiwriter/data/tdf134021.docx
new file mode 100644
index 000000000000..cda11fbdf3ef
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf134021.docx
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf139843.odt b/sw/qa/extras/uiwriter/data/tdf139843.odt
new file mode 100644
index 000000000000..67a555799006
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf139843.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data/tdf148868.odt b/sw/qa/extras/uiwriter/data/tdf148868.odt
new file mode 100644
index 000000000000..7ebf68a82ea3
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf148868.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf135061.odt b/sw/qa/extras/uiwriter/data2/tdf135061.odt
new file mode 100644
index 000000000000..19b3afa31e47
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf135061.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/tdf136452.fodt b/sw/qa/extras/uiwriter/data2/tdf136452.fodt
new file mode 100644
index 000000000000..74c3102aa781
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf136452.fodt
@@ -0,0 +1,80 @@
+<?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:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari1" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#3465a4" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect2" style:family="section">
+ <style:section-properties fo:background-color="#729fcf" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </style:style>
+ <style:style style:name="Sect3" style:family="section">
+ <style:section-properties fo:background-color="#3465a4" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </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 text:style-name="Standard">A</text:p>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <text:p text:style-name="Standard">B</text:p>
+ <text:p text:style-name="Standard">C</text:p>
+ </text:section>
+ <text:p text:style-name="Standard">D</text:p>
+ <text:section text:style-name="Sect2" text:name="Section2">
+ <text:p text:style-name="Standard">E</text:p>
+ <text:p text:style-name="Standard">F</text:p>
+ </text:section>
+ <text:p text:style-name="Standard">G</text:p>
+ <text:section text:style-name="Sect3" text:name="Section3">
+ <text:p text:style-name="Standard">H</text:p>
+ </text:section>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/data2/tdf141175.odt b/sw/qa/extras/uiwriter/data2/tdf141175.odt
new file mode 100644
index 000000000000..3ccfa6b1a326
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf141175.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/data2/try2.fodt b/sw/qa/extras/uiwriter/data2/try2.fodt
new file mode 100644
index 000000000000..624a75a85ea9
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/try2.fodt
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:css3t="http://www.w3.org/TR/css3-text/" 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:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form: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: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:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+ <style:font-face style:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ </office:styles>
+ <office:automatic-styles>
+ <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">
+ <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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct110725936" text:id="ct110725936">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2020-10-12T19:26:19</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct110726576" text:id="ct110726576">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2020-10-12T19:26:26</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:p text:style-name="Standard">A<text:change-start text:change-id="ct110725936"/></text:p>
+ <text:p text:style-name="Standard"><text:change-end text:change-id="ct110725936"/>xxxxxxxxxxxxxxxxxx<text:change-start text:change-id="ct110726576"/>x</text:p>
+ <text:p text:style-name="Standard">y<text:change-end text:change-id="ct110726576"/>y</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8030c7dd850d..d1b117f6a467 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -94,11 +94,13 @@
#include <com/sun/star/util/XPropertyReplace.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/text/XTextField.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/text/TextMarkupType.hpp>
#include <com/sun/star/chart2/data/XDataSource.hpp>
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/linguistic2/XLinguProperties.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <o3tl/cppunittraitshelper.hxx>
#include <o3tl/deleter.hxx>
#include <osl/file.hxx>
@@ -129,6 +131,9 @@
#include <iodetect.hxx>
#include <wrthtml.hxx>
#include <dbmgr.hxx>
+#include <swdtflvr.hxx>
+#include <sortedobjs.hxx>
+#include <txtfrm.hxx>
namespace
{
@@ -152,6 +157,21 @@ int CountFilesInDirectory(const OUString &rURL)
return nRet;
}
+
+static void lcl_dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues)
+{
+ uno::Reference<frame::XController> xController = uno::Reference<frame::XModel>(xComponent, uno::UNO_QUERY_THROW)->getCurrentController();
+ CPPUNIT_ASSERT(xController.is());
+ uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFrame.is());
+
+ uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
+ CPPUNIT_ASSERT(xDispatchHelper.is());
+
+ xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+}
+
}
class SwUiWriterTest : public SwModelTestBase, public HtmlTestTools
@@ -260,6 +280,7 @@ public:
void testUnicodeNotationToggle();
void testTextTableCellNames();
void testShapeAnchorUndo();
+ void testTdf127635();
void testDde();
void testDocModState();
void testTdf94804();
@@ -291,6 +312,7 @@ public:
void testTdf84695Tab();
void testTableStyleUndo();
void testRedlineCopyPaste();
+ void testTdf135260();
void testRedlineParam();
void testRedlineViewAuthor();
void testTdf91292();
@@ -469,6 +491,7 @@ public:
CPPUNIT_TEST(testUnicodeNotationToggle);
CPPUNIT_TEST(testTextTableCellNames);
CPPUNIT_TEST(testShapeAnchorUndo);
+ CPPUNIT_TEST(testTdf127635);
CPPUNIT_TEST(testDde);
CPPUNIT_TEST(testDocModState);
CPPUNIT_TEST(testTdf94804);
@@ -500,6 +523,7 @@ public:
CPPUNIT_TEST(testTdf84695Tab);
CPPUNIT_TEST(testTableStyleUndo);
CPPUNIT_TEST(testRedlineCopyPaste);
+ CPPUNIT_TEST(testTdf135260);
CPPUNIT_TEST(testRedlineParam);
CPPUNIT_TEST(testRedlineViewAuthor);
CPPUNIT_TEST(testTdf91292);
@@ -579,7 +603,7 @@ public:
CPPUNIT_TEST(testTdf59666);
CPPUNIT_TEST_SUITE_END();
-private:
+protected:
SwDoc* createDoc(const char* pName = nullptr);
std::unique_ptr<SwTextBlocks> readDOCXAutotext(const OUString& sFileName, bool bEmpty = false);
};
@@ -725,6 +749,131 @@ void SwUiWriterTest::testThreadedException()
CPPUNIT_ASSERT(!bRes);
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testPasteTableAtFlyAnchor)
+{
+ SwDoc * pDoc(createDoc());
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFlyFrameFormat const* pFly = dynamic_cast<SwFlyFrameFormat const*>(
+ pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true));
+ CPPUNIT_ASSERT(pFly != nullptr);
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+ pWrtShell->SelFlyGrabCursor();
+ pWrtShell->GetDrawView()->UnmarkAll();
+ CPPUNIT_ASSERT(pWrtShell->GetCurrFlyFrame() != nullptr);
+
+ // insert table in fly
+ SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(tableOpt, 2, 2);
+
+ // select table
+ pWrtShell->SelAll();
+
+ lcl_dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ // move cursor back to body
+ pWrtShell->ClearMark();
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ CPPUNIT_ASSERT(!pWrtShell->GetCurrFlyFrame());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ CPPUNIT_ASSERT(pWrtShell->IsCursorInTable());
+ CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode());
+
+ pWrtShell->Undo();
+
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable());
+ CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode());
+
+ // the problem was that Redo moved the fly anchor into the first table cell
+ pWrtShell->Redo();
+
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ CPPUNIT_ASSERT(pWrtShell->IsCursorInTable());
+ CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode());
+
+ pWrtShell->Undo();
+
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable());
+ CPPUNIT_ASSERT(!pFly->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testCopyPastePageBreak)
+{
+ rtl::Reference<SwTransferable> pTransfer;
+ {
+ SwDoc * pDoc(createDoc("pagebreak-source.fodt"));
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
+ pWrtShell->SelAll();
+
+ pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Copy();
+
+ //lcl_dispatchCommand(mxComponent, ".uno:Copy", {});
+
+ mxComponent->dispose();
+ mxComponent.clear();
+ }
+
+ SwDoc * pDoc(createDoc("pagebreak-target.fodt"));
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName());
+ // page style WithMargin is used
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
+ //paste not working in this branch? lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ TransferableDataHelper aHelper(pTransfer.get());
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
+ CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName());
+ // the problem was that there was a page break now
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // page style WithMargin is used
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // page style WithMargin is used
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(2, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetSections().size());
+ CPPUNIT_ASSERT_EQUAL(OUString("SourceSection"), pWrtShell->GetCurrSection()->GetSectionName());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // page style WithMargin is used
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(1, getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("WithMargin"), getProperty<OUString>(getParagraph(1), "PageDescName"));
+ CPPUNIT_ASSERT_EQUAL(OUString("TargetSection"), pWrtShell->GetCurrSection()->GetSectionName());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ // page style WithMargin is used
+ CPPUNIT_ASSERT_EQUAL(long(5669), pWrtShell->GetLayout()->GetLower()->getFramePrintArea().Top());
+}
+
void SwUiWriterTest::testBookmarkCopy()
{
SwDoc * pDoc(createDoc());
@@ -781,6 +930,52 @@ void SwUiWriterTest::testBookmarkCopy()
}
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFormulaNumberWithGroupSeparator)
+{
+ SwDoc* pDoc = createDoc("tdf125154.odt");
+ lcl_dispatchCommand(mxComponent, ".uno:UpdateAll", {});
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(true);
+ SwField const* pField;
+
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("1000"), pField->GetFormula());
+ CPPUNIT_ASSERT_EQUAL(OUString("1.000"), pField->ExpandField(true, nullptr));
+ pWrtShell->GoNextCell();
+ CPPUNIT_ASSERT_EQUAL(OUString("10000"), pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ pWrtShell->GoNextCell();
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("test"), pField->GetFormula());
+ CPPUNIT_ASSERT_EQUAL(OUString("1.000"), pField->ExpandField(true, nullptr));
+ pWrtShell->GoNextCell();
+ // the problem was that this was 0
+ CPPUNIT_ASSERT_EQUAL(OUString("10000"), pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ pWrtShell->Down(false);
+ pWrtShell->SttPara(false);
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("1000*10%"), pField->GetFormula());
+ CPPUNIT_ASSERT_EQUAL(OUString("100"), pField->ExpandField(true, nullptr));
+ pWrtShell->Down(false);
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("5.000*10%"), pField->GetFormula());
+ // the problem was that this was 0
+ CPPUNIT_ASSERT_EQUAL(OUString("500"), pField->ExpandField(true, nullptr));
+ pWrtShell->Down(false);
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("5.000*10%"), pField->GetFormula());
+ // the problem was that this was
+ CPPUNIT_ASSERT_EQUAL(OUString("500"), pField->ExpandField(true, nullptr));
+ pWrtShell->Down(false);
+ pField = pWrtShell->GetCurField();
+ CPPUNIT_ASSERT_EQUAL(OUString("5000*10%"), pField->GetFormula());
+ CPPUNIT_ASSERT_EQUAL(OUString("500"), pField->ExpandField(true, nullptr));
+ pWrtShell->Down(false);
+ CPPUNIT_ASSERT_EQUAL(OUString(u"-100,00 €"), pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ pWrtShell->GoNextCell();
+ // tdf#42518 the problem was that this was 1.900,00 €
+ CPPUNIT_ASSERT_EQUAL(OUString("** Expression is faulty **"), pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
void SwUiWriterTest::testTdf67238()
{
//create a new writer document
@@ -874,6 +1069,23 @@ void SwUiWriterTest::testTdf67238()
CPPUNIT_ASSERT(!((rTable.GetTableBox("C3"))->GetFrameFormat()->GetProtect()).IsContentProtected());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf155685)
+{
+ SwDoc* pDoc = createDoc("table-at-end-of-cell.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->GoNextCell();
+ pWrtShell->GoNextCell();
+ pWrtShell->GoNextCell();
+ pWrtShell->SelAll();
+ pWrtShell->Delete();
+ // this crashed
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+ pWrtShell->Redo();
+ // this crashed
+ pWrtShell->Redo();
+}
+
void SwUiWriterTest::testFdo75110()
{
SwDoc* pDoc = createDoc("fdo75110.odt");
@@ -1772,7 +1984,7 @@ void SwUiWriterTest::testBookmarkUndo()
CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
- pMarkAccess->deleteMark( pMarkAccess->findMark("Mark_") );
+ pMarkAccess->deleteMark(pMarkAccess->findMark("Mark_"), false);
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
rUndoManager.Undo();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
@@ -1780,6 +1992,150 @@ void SwUiWriterTest::testBookmarkUndo()
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf148389_Left)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ pWrtShell->Insert("foo bar baz");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 3, /*bBasicCall=*/false);
+ IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+
+ auto pMark = pMarkAccess->makeMark(*pWrtShell->GetCursor(), "Mark",
+ IDocumentMarkAccess::MarkType::BOOKMARK, ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->DelLeft();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelLeft();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelLeft();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelLeft();
+ // historically it wasn't deleted if empty, not sure if it should be
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ // the problem was that the end position was not restored
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ // this undo is no longer grouped, to prevent Redo deleting bookmark
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pMark->GetOtherMarkPos().nContent.GetIndex());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf148389_Right)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ pWrtShell->Insert("foo bar baz");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 3, /*bBasicCall=*/false);
+ IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
+
+ auto pMark = pMarkAccess->makeMark(*pWrtShell->GetCursor(), "Mark",
+ IDocumentMarkAccess::MarkType::BOOKMARK, ::sw::mark::InsertMode::New);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ pWrtShell->DelRight();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelRight();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelRight();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->DelRight();
+ // historically it wasn't deleted if empty, not sure if it should be
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ // the problem was that the start position was not restored
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ // this undo is no longer grouped, to prevent Redo deleting bookmark
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ // this undo is no longer grouped, to prevent Redo deleting bookmark
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), pMark->GetOtherMarkPos().nContent.GetIndex());
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ // Undo re-creates the mark...
+ pMark = *pMarkAccess->getAllMarksBegin();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pMark->GetMarkPos().nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(7), pMark->GetOtherMarkPos().nContent.GetIndex());
+}
+
static void lcl_setWeight(SwWrtShell* pWrtShell, FontWeight aWeight)
{
SvxWeightItem aWeightItem(aWeight, EE_CHAR_WEIGHT);
@@ -1990,7 +2346,7 @@ void SwUiWriterTest::testTdf51741()
CPPUNIT_ASSERT(bool(pMarkAccess->findMark("Mark") == pMarkAccess->getAllMarksEnd()));
CPPUNIT_ASSERT(pMarkAccess->findMark("Mark_") != pMarkAccess->getAllMarksEnd());
//Modification 7
- pMarkAccess->deleteMark( pMarkAccess->findMark("Mark_") );
+ pMarkAccess->deleteMark(pMarkAccess->findMark("Mark_"), false);
CPPUNIT_ASSERT(pWrtShell->IsModified());
pWrtShell->ResetModified();
CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pMarkAccess->getAllMarksCount());
@@ -3820,7 +4176,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
CPPUNIT_ASSERT(rIDCO.InsertGraphicObject(*pShell->GetCursor(), grf, &frameSet, &grfSet));
CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
SvxCharHiddenItem hidden(true, RES_CHRATR_HIDDEN);
- pShell->SelectText(1, 4);
+ pShell->SelectTextModel(1, 4);
rIDCO.InsertPoolItem(*pShell->GetCursor(), hidden);
// now we have "\1foo\1" with the "foo" hidden
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
@@ -3834,7 +4190,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
query.ClearItem(RES_CHRATR_HIDDEN);
// delete from the start
- pShell->SelectText(0, 4);
+ pShell->SelectTextModel(0, 4);
rIDCO.DeleteAndJoin(*pShell->GetCursor());
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
@@ -3877,7 +4233,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512()
query.ClearItem(RES_CHRATR_HIDDEN);
// delete from the end
- pShell->SelectText(1, 5);
+ pShell->SelectTextModel(1, 5);
rIDCO.DeleteAndJoin(*pShell->GetCursor());
CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT));
CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF));
@@ -4122,18 +4478,185 @@ void SwUiWriterTest::testShapeAnchorUndo()
CPPUNIT_ASSERT_EQUAL(pObject->GetLogicRect(), aOrigLogicRect);
}
-static void lcl_dispatchCommand(const uno::Reference<lang::XComponent>& xComponent, const OUString& rCommand, const uno::Sequence<beans::PropertyValue>& rPropertyValues)
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf149595)
{
- uno::Reference<frame::XController> xController = uno::Reference<frame::XModel>(xComponent, uno::UNO_QUERY_THROW)->getCurrentController();
- CPPUNIT_ASSERT(xController.is());
- uno::Reference<frame::XDispatchProvider> xFrame(xController->getFrame(), uno::UNO_QUERY);
- CPPUNIT_ASSERT(xFrame.is());
+ SwDoc* pDoc = createDoc("demo91.fodt");
- uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
- uno::Reference<frame::XDispatchHelper> xDispatchHelper(frame::DispatchHelper::create(xContext));
- CPPUNIT_ASSERT(xDispatchHelper.is());
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
- xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
+ // all 4 shapes are on the 2nd paragraph
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ {
+ pWrtShell->Down(false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ // one shape is anchored in the middle, others at the start/end/at-para
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Up(false);
+ TransferableDataHelper aHelper(pTransfer.get());
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs()->size());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+ }
+
+ // now try the same with redlining enabled - should be the same result
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ {
+ pWrtShell->Down(false);
+ pWrtShell->SttPara(/*bSelect=*/false);
+ pWrtShell->EndPara(/*bSelect=*/true);
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Cut();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ // problem was that this deleted all at-char flys, even at the start/end
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Up(false);
+ TransferableDataHelper aHelper(pTransfer.get());
+ SwTransferable::Paste(*pWrtShell, aHelper);
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs()->size());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetDrawObjs() == nullptr);
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs() != nullptr);
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower()->GetNext()->GetDrawObjs()->size());
+ }
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf147220)
+{
+ SwDoc* pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert(u"él");
+
+ // hide and enable
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->GoStartSentence();
+ pWrtShell->SetMark();
+ pWrtShell->GoEndSentence();
+
+ // this did not remove the original text from the layout
+ pWrtShell->Replace(u"Él", false);
+
+ // currently the deleted text is before the replacement text, not sure if
+ // that is really required
+ CPPUNIT_ASSERT_EQUAL(OUString(u"élÉl"),
+ pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Él"),
+ static_cast<SwTextFrame const*>(pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(nullptr))->GetText());
+
+ SwRedlineTable const& rRedlines(pDoc->getIDocumentRedlineAccess().GetRedlineTable());
+ CPPUNIT_ASSERT_EQUAL(SwRedlineTable::size_type(2), rRedlines.size());
+ CPPUNIT_ASSERT_EQUAL(RedlineType::Delete, rRedlines[0]->GetType());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"él"), rRedlines[0]->GetText());
+ CPPUNIT_ASSERT_EQUAL(RedlineType::Insert, rRedlines[1]->GetType());
+ CPPUNIT_ASSERT_EQUAL(OUString(u"Él"), rRedlines[1]->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf135978)
+{
+ SwDoc* pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foobar");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bazquux");
+
+ CPPUNIT_ASSERT(pWrtShell->IsEndOfDoc());
+
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFlyFrameFormat const* pFly = dynamic_cast<SwFlyFrameFormat const*>(
+ pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true));
+ CPPUNIT_ASSERT(pFly != nullptr);
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+ // move cursor back to body
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+
+ // hide and enable
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 6, /*bBasicCall=*/false);
+ pWrtShell->Delete();
+
+ // now split
+ pWrtShell->SttEndDoc(/*bStt=*/true);
+ pWrtShell->SplitNode();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ // the problem was that undo removed the fly frame from the layout
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ pWrtShell->Redo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+
+ pWrtShell->Undo();
+ CPPUNIT_ASSERT(pFly->GetFrame() != nullptr);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf139843)
+{
+ load(DATA_DIRECTORY, "tdf139843.odt");
+
+// int nPages = getPages();
+
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ lcl_dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, this test would have crashed here
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+//FIXME? CPPUNIT_ASSERT_EQUAL(nPages, getPages());
}
CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134252)
@@ -4224,7 +4747,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134250)
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
// this would crash in 2 different ways
lcl_dispatchCommand(mxComponent, ".uno:Undo", {});
@@ -4240,7 +4763,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134250)
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
lcl_dispatchCommand(mxComponent, ".uno:Undo", {});
Scheduler::ProcessEventsToIdle();
@@ -4253,7 +4776,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134250)
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xSections->getCount());
}
void SwUiWriterTest::testDde()
@@ -4282,6 +4805,48 @@ void SwUiWriterTest::testDde()
#endif
}
+void SwUiWriterTest::testTdf127635()
+{
+ SwDoc* pDoc = createDoc();
+
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument *>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'b', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+
+ //Select 'a'
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+
+ // enable redlining
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, ' ', 0);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'd', 0);
+ Scheduler::ProcessEventsToIdle();
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // accept all redlines
+ while(pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: C d b
+ // - Actual : Cd b
+ CPPUNIT_ASSERT_EQUAL(OUString("C d b"), getParagraph(1)->getString());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf132160)
{
load(DATA_DIRECTORY, "tdf132160.odt");
@@ -5682,6 +6247,32 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134436)
CPPUNIT_ASSERT_EQUAL(OUString(""), pWrtShell->GetCursor()->GetText());
}
+void SwUiWriterTest::testTdf135260()
+{
+ SwDoc* pDoc = createDoc();
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ pWrtShell->Insert("test");
+
+ // Turn on track changes
+ uno::Reference<beans::XPropertySet> xPropertySet(mxComponent, uno::UNO_QUERY);
+ xPropertySet->setPropertyValue("RecordChanges", uno::makeAny(true));
+
+ for(int i = 0; i < 4; i++) {
+ pWrtShell->DelLeft();
+ }
+
+ SwEditShell* const pEditShell(pDoc->GetEditShell());
+ // accept all redlines
+ while(pEditShell->GetRedlineCount())
+ pEditShell->AcceptRedline(0);
+
+ // Without the fix in place, this test would have failed with
+ // - Expected:
+ // - Actual : tes
+ CPPUNIT_ASSERT_EQUAL(OUString(""), getParagraph(1)->getString());
+}
+
void SwUiWriterTest::testRedlineParam()
{
// Create a document with minimal content.
@@ -7572,6 +8163,79 @@ void SwUiWriterTest::testTdf38394()
CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf148868)
+{
+ SwDoc* pDoc = createDoc("tdf148868.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ pWrtShell->EndPg(/*bSelect=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false);
+ pWrtShell->Insert("X");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: 1
+ // - Actual : 0
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf134021)
+{
+ load(DATA_DIRECTORY, "tdf134021.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(12, getPages());
+
+ lcl_dispatchCommand(mxComponent, ".uno:JumpToNextTable", {});
+
+ lcl_dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ // Without the fix in place, it would have crashed here
+ lcl_dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(12, getPages());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf133982)
+{
+ load(DATA_DIRECTORY, "tdf133982.docx");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+
+ //Use selectAll 3 times in a row
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ //Without the fix in place, it would have crashed here
+ lcl_dispatchCommand(mxComponent, ".uno:Cut", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xIndexAccess->getCount());
+}
+
void SwUiWriterTest::testTdf59666()
{
SwDoc* pDoc = createDoc();
@@ -7618,6 +8282,75 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf133358)
CPPUNIT_ASSERT_EQUAL(sal_Int32(1251), getProperty<sal_Int32>(xParagraph, "ParaLeftMargin"));
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf114973)
+{
+ SwDoc* const pDoc = createDoc("tdf114973.fodt");
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SttEndDoc(true);
+
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // bug: cursor jumped into header
+ CPPUNIT_ASSERT(!pWrtShell->IsInHeaderFooter());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // check that hidden paragraphs at start and end are deleted
+ lcl_dispatchCommand(mxComponent, ".uno:Delete", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(int(1), getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString(), getParagraph(1)->getString());
+
+ // check that hidden paragraphs at start and end are copied
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(int(3), getParagraphs());
+ CPPUNIT_ASSERT_EQUAL(OUString("hidden first paragraph"), getParagraph(1)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("Press CTRL+A for dispatching .uno:SelectAll. You see that "
+ "nothing will be selected. The cursor jumps to the header"),
+ getParagraph(2)->getString());
+ CPPUNIT_ASSERT_EQUAL(OUString("hidden last paragraph"), getParagraph(3)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testHiddenSectionsAroundPageBreak)
+{
+ createDoc("hiddenSectionsAroundPageBreak.fodt");
+
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+
+ // Make sure that the page style is set correctly
+ xCursor->jumpToFirstPage();
+ CPPUNIT_ASSERT_EQUAL(OUString("Landscape"), getProperty<OUString>(xCursor, "PageStyleName"));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf159565)
+{
+ // Given a document with a hidden section in the beginning, additionally containing a frame
+ createDoc("FrameInHiddenSection.fodt");
+
+ lcl_dispatchCommand(mxComponent, u".uno:SelectAll", {});
+
+ // Check that the selection covers the whole visible text
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<view::XSelectionSupplier> xSelSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xSelections(xSelSupplier->getSelection(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSelections->getCount());
+ uno::Reference<text::XTextRange> xSelection(xSelections->getByIndex(0), uno::UNO_QUERY);
+
+ // Without the fix, this would fail - there was no selection
+ CPPUNIT_ASSERT_EQUAL(OUString(u"" SAL_NEWLINE_STRING SAL_NEWLINE_STRING "ipsum"),
+ xSelection->getString());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index 1825d3483148..f6748fc1200b 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -23,11 +23,16 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/settings.hxx>
+#include <sfx2/dispatch.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <svx/svxids.hrc>
+#include <view.hxx>
#include <ndtxt.hxx>
#include <swdtflvr.hxx>
#include <wrtsh.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <flyfrm.hxx>
+#include <pagefrm.hxx>
#include <fmtanchr.hxx>
#include <UndoManager.hxx>
#include <sortedobjs.hxx>
@@ -40,6 +45,9 @@
#include <svl/stritem.hxx>
#include <svx/svxids.hrc>
#include <comphelper/lok.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <editeng/acorrcfg.hxx>
+#include <swacorr.hxx>
#include <txtfrm.hxx>
#include <redline.hxx>
#include <view.hxx>
@@ -252,6 +260,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf101534)
CPPUNIT_ASSERT(aSet.HasItem(RES_LR_SPACE));
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testExtendedSelectAllHang)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->InsertFootnote("");
+ pWrtShell->StartOfSection();
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxStringItem aLangString(SID_LANGUAGE_STATUS, "Default_Spanish (Bolivia)");
+ // this looped
+ pView->GetViewFrame()->GetDispatcher()->ExecuteList(SID_LANGUAGE_STATUS, SfxCallMode::SYNCHRON,
+ { &aLangString });
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineMoveInsertInDelete)
{
loadURL("private:factory/swriter", nullptr);
@@ -346,6 +368,305 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineInHiddenSection)
CPPUNIT_ASSERT(pNode->GetNodes()[pNode->GetIndex() + 4]->IsEndNode());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineSplitContentNode)
+{
+ load(DATA_DIRECTORY, "try2.fodt");
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ SwWrtShell* const pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+
+ SwViewOption aViewOptions(*pWrtShell->GetViewOptions());
+ // these are required so that IsBlank() is true
+ aViewOptions.SetBlank(true);
+ aViewOptions.SetViewMetaChars(true);
+ pWrtShell->ApplyViewOptions(aViewOptions);
+
+ // enable redlining
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ SwDocShell* const pDocShell = pTextDoc->GetDocShell();
+ SwDoc* const pDoc = pDocShell->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+
+ pWrtShell->CalcLayout();
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 18, /*bBasicCall=*/false);
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+ // crashed
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+ rUndoManager.Undo();
+ rUndoManager.Redo();
+ rUndoManager.Undo();
+ pWrtShell->SplitNode(true);
+ rUndoManager.Undo();
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137318)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("A");
+
+ // enable redlining
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+ // hide
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->DelLine();
+ pWrtShell->StartOfSection(false);
+ pWrtShell->SplitNode(true);
+ pWrtShell->SplitNode(true);
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 3);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 0);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text", 0);
+ // not sure why there's an empty text portion here, but it's not a problem
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[3]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ // the problem was that here the "A" showed up again
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 0);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[2]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1][@Portion]", 0);
+
+ pWrtShell->Undo();
+
+ // now the "A" is no longer deleted
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nType", "PortionType::Para");
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1][@Portion]", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "nLength", "1");
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", "A");
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf136452)
+{
+ SwDoc* const pDoc(createDoc("tdf136452.fodt"));
+
+ auto const nNodes(pDoc->GetNodes().Count());
+
+ SwWrtShell* const pWrtShell(pDoc->GetDocShell()->GetWrtShell());
+
+ // first deletion spanning 2 sections
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->SetMark();
+ pWrtShell->Up(true, 2);
+ pWrtShell->Delete();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ // second deletion spanning 2 sections
+ pWrtShell->SetMark();
+ pWrtShell->Up(true, 3);
+ pWrtShell->Delete();
+
+ // 3 paragraphs deleted, 2nd section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 9, pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ // this crashed
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(nNodes, pDoc->GetNodes().Count());
+
+ pWrtShell->Redo();
+
+ // 2 paragraphs deleted, last section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 4, pDoc->GetNodes().Count());
+
+ pWrtShell->Redo();
+
+ // 3 paragraphs deleted, 2nd section is gone
+ CPPUNIT_ASSERT_EQUAL(nNodes - 9, pDoc->GetNodes().Count());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
+{
+ SwDoc* const pDoc(createDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ corr.GetSwFlags().bSetBorder = true;
+ // sigh, it's a global... err i mean Singleton design pattern *eyeroll*
+ SvxSwAutoFormatFlags flags(*SwEditShell::GetAutoFormatFlags());
+ comphelper::ScopeGuard const g([=]() { SwEditShell::SetAutoFormatFlags(&flags); });
+ flags.bSetBorder = true;
+ SwEditShell::SetAutoFormatFlags(&flags);
+
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ // move cursor back to body
+ pWrtShell->SttEndDoc(false);
+ // keep first paragraph empty so that its flys may be deleted too
+ //pWrtShell->Insert("abc");
+ pWrtShell->SplitNode(false);
+
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_PARA);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(),
+ svl::Items<RES_FRM_SIZE, RES_FRM_SIZE, RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFormatFrameSize size(ATT_MIN_SIZE, 1000, 1000);
+ flySet.Put(size); // set a size, else we get 1 char per line...
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), rFormats.size());
+
+ // move cursor back to body
+ pWrtShell->SttEndDoc(false);
+ pWrtShell->Insert("---");
+ pWrtShell->SplitNode(true);
+
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(4), rFormats.size());
+
+ // check that the AutoFormat did something
+ pWrtShell->SttEndDoc(true);
+ SfxItemSet set{ pDoc->GetAttrPool(), svl::Items<RES_BOX, RES_BOX>{} };
+ pWrtShell->GetCurParAttr(set);
+ CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, set.GetItemState(RES_BOX, false));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf139922)
+{
+ SwDoc* const pDoc = createDoc();
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+
+ pTextDoc->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ SwWrtShell* const pWrtSh = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtSh);
+
+ pWrtSh->Insert("this _is_ a SEntence. this _is_ a SEntence.");
+
+ CPPUNIT_ASSERT_EQUAL(OUString("this _is_ a SEntence. this _is_ a SEntence."),
+ getParagraph(2)->getString());
+
+ //apply autocorrect StartAutoCorrect
+ lcl_dispatchCommand(mxComponent, ".uno:AutoFormatApply", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: This is a Sentence. This is a Sentence.
+ // - Actual : this is a Sentence. This is a Sentence.
+ CPPUNIT_ASSERT_EQUAL(OUString("This is a Sentence. This is a Sentence."),
+ getParagraph(2)->getString());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf135061)
+{
+ createDoc("tdf135061.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ lcl_dispatchCommand(mxComponent, ".uno:Copy", {});
+ Scheduler::ProcessEventsToIdle();
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(6), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(20, getShapes());
+
+ for (sal_Int32 i = 0; i < 5; ++i)
+ {
+ // Without the fix in place, this test would have crashed here
+ lcl_dispatchCommand(mxComponent, ".uno:Undo", {});
+ Scheduler::ProcessEventsToIdle();
+ }
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(4, getShapes());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf132236)
{
load(DATA_DIRECTORY, "tdf132236.odt");
@@ -518,6 +839,238 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912)
CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140007)
+{
+ typedef sal_uLong SwNodeOffset;
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foo");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("bar");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("baz");
+ CPPUNIT_ASSERT_EQUAL(sal_uLong(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Replace(" ", true);
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ pWrtShell->Replace(" ", true);
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar baz"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(11), pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar baz"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(11), pDoc->GetNodes().Count());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(12), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo bar"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(SwNodeOffset(13), pDoc->GetNodes().Count());
+ CPPUNIT_ASSERT_EQUAL(OUString("foo"),
+ pDoc->GetNodes()[SwNodeOffset(9)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("bar"),
+ pDoc->GetNodes()[SwNodeOffset(10)]->GetTextNode()->GetText());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz"),
+ pDoc->GetNodes()[SwNodeOffset(11)]->GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf139982)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // turn on redlining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ pWrtShell->Insert("helloo");
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ {
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+ }
+
+ pWrtShell->SttEndDoc(true);
+ pWrtShell->EndPara(/*bSelect=*/true);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Replace("hello", true);
+
+ // the problem was that a redline delete with the same author as redline
+ // insert has its text deleted immediately, including anchored flys.
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Redo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+
+ pWrtShell->Undo();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf135976)
+{
+ SwDoc* const pDoc = createDoc();
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->Insert("foobar");
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 2, /*bBasicCall=*/false);
+ SwFormatAnchor anchor(RndStdIds::FLY_AT_CHAR);
+ anchor.SetAnchor(pWrtShell->GetCursor()->GetPoint());
+ SfxItemSet flySet(pDoc->GetAttrPool(), svl::Items<RES_ANCHOR, RES_ANCHOR>{});
+ flySet.Put(anchor);
+ SwFrameFormat const* pFly = pWrtShell->NewFlyFrame(flySet, /*bAnchValid=*/true);
+ CPPUNIT_ASSERT(pFly != nullptr);
+
+ // turn on redlining and show changes
+ pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete
+ | RedlineFlags::ShowInsert);
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->UnSelectFrame();
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+
+ pWrtShell->DelLeft();
+ pWrtShell->DelLeft();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ // the problem was that the fly was deleted from the layout
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ // check that the anchor was moved outside the redline
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ // check that the anchor was restored
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Redo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ // now again in the other direction:
+
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 3, /*bBasicCall=*/false);
+
+ pWrtShell->DelRight();
+ pWrtShell->DelRight();
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ // the problem was that the fly was deleted from the layout
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Redo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+
+ pWrtShell->Undo(2);
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetLayout()->GetLastPage()->GetSortedObjs()->size());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4), pFly->GetAnchor().GetContentAnchor()->nContent.GetIndex());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf54819)
{
load(DATA_DIRECTORY, "tdf54819.fodt");
@@ -638,6 +1191,38 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf54819_keep_numbering_with_Undo)
CPPUNIT_ASSERT_MESSAGE("Not a bulleted list item", sNumName != "Outline");
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf141175)
+{
+ createDoc("tdf141175.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ //Use selectAll 3 times in a row
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+ Scheduler::ProcessEventsToIdle();
+
+ //Without the fix in place, this test would have crashed here
+ lcl_dispatchCommand(mxComponent, ".uno:Cut", {});
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+ lcl_dispatchCommand(mxComponent, ".uno:Paste", {});
+ Scheduler::ProcessEventsToIdle();
+
+ // the paste now takes a different path, where it doesn't insert a neseted
+ // table but instead merges the source table cells into the target table cells
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119571_keep_numbering_with_Undo)
{
// as the previous test, but with partial paragraph deletion:
@@ -838,6 +1423,44 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf119571_keep_numbering_with_Reject)
CPPUNIT_ASSERT_MESSAGE("Bad numbering", sNumName.isEmpty());
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf140077)
+{
+ SwDoc* const pDoc = createDoc();
+
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // hide
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+
+ pWrtShell->Insert("a");
+ pWrtShell->SplitNode();
+ pWrtShell->Insert("b");
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 1, /*bBasicCall=*/false);
+ // enable
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT_MESSAGE("redlining should be on",
+ pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT_MESSAGE(
+ "redlines should be visible",
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Delete();
+ pWrtShell->SttEndDoc(/*bStart=*/false);
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ // crashed in layout
+ pWrtShell->SplitNode();
+
+ pWrtShell->Undo();
+ pWrtShell->Redo();
+ pWrtShell->Undo();
+ pWrtShell->Redo();
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376_redline)
{
SwDoc* pDoc = createDoc();
@@ -936,6 +1559,82 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf109376)
CPPUNIT_ASSERT_EQUAL(size_t(1), pWrtShell->GetFlyCount(FLYCNTTYPE_FRM));
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147414)
+{
+ SwDoc* const pDoc(createDoc());
+ SwWrtShell* const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+
+ pWrtShell->Insert("Abc");
+
+ // hide and enable
+ lcl_dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+ lcl_dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+
+ CPPUNIT_ASSERT(pDoc->getIDocumentRedlineAccess().IsRedlineOn());
+ CPPUNIT_ASSERT(
+ IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+ CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines());
+
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, /*bBasicCall=*/false);
+ // backspace
+ pWrtShell->DelLeft();
+ pWrtShell->AutoCorrect(corr, u' ');
+
+ // problem was this was 1 i.e. before the deleted "b" while " " was inserted after
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3),
+ pWrtShell->getShellCursor(false)->GetPoint()->nContent.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("Ab c"),
+ pWrtShell->getShellCursor(false)->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147310)
+{
+ SwDoc* pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+
+ // somehow bug happens only with 2 tables
+ SwInsertTableOptions tableOpt(SwInsertTableFlags::DefaultBorder, 0);
+ pWrtShell->InsertTable(tableOpt, 1, 1);
+ pWrtShell->InsertTable(tableOpt, 1, 1);
+
+ pWrtShell->SttEndDoc(/*bStart=*/true);
+
+ pWrtShell->DeleteRow(false);
+ pWrtShell->DeleteRow(false);
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/tab", 0);
+ discardDumpedLayout();
+ }
+ pWrtShell->Undo();
+ // this did not create frames for the table
+ pWrtShell->Undo();
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // there are 2 tables
+ assertXPath(pXmlDoc, "/root/page/body/tab", 2);
+ discardDumpedLayout();
+ }
+ pWrtShell->Redo();
+ pWrtShell->Redo();
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page/body/tab", 0);
+ discardDumpedLayout();
+ }
+ pWrtShell->Undo();
+ pWrtShell->Undo();
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // there are 2 tables
+ assertXPath(pXmlDoc, "/root/page/body/tab", 2);
+ }
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf64242_optimizeTable)
{
SwDoc* pDoc = createDoc("tdf64242_optimizeTable.odt");
@@ -1779,7 +2478,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();
@@ -2681,4 +3380,5 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf129655)
xmlDocPtr pXmlDoc = parseLayoutDump();
assertXPath(pXmlDoc, "//fly/txt[@WritingMode='Vertical']", 1);
}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt b/sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt
new file mode 100644
index 000000000000..f588fdba0515
--- /dev/null
+++ b/sw/qa/extras/unowriter/data/tdf134252_onlytable_protected.fodt
@@ -0,0 +1,87 @@
+<?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:name="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Lohit Devanagari" svg:font-family="&apos;Lohit Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Serif CN" svg:font-family="&apos;Source Han Serif CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+ <style:default-style style:family="graphic">
+ <style:graphic-properties svg:stroke-color="#3465a4" draw:fill-color="#729fcf" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+ <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+ <style:tab-stops/>
+ </style:paragraph-properties>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ <style:default-style style:family="paragraph">
+ <style:paragraph-properties fo:orphans="2" fo:widows="2" fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+ <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Liberation Serif" fo:font-size="12pt" fo:language="de" fo:country="DE" style:letter-kerning="true" style:font-name-asian="Source Han Serif CN" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Lohit Devanagari" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+ </style:default-style>
+ <style:default-style style:family="table">
+ <style:table-properties table:border-model="collapsing"/>
+ </style:default-style>
+ <style:default-style style:family="table-row">
+ <style:table-row-properties fo:keep-together="auto"/>
+ </style:default-style>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <text:notes-configuration text:note-class="footnote" style:num-format="1" text:start-value="0" text:footnotes-position="page" text:start-numbering-at="document"/>
+ <text:notes-configuration text:note-class="endnote" style:num-format="i" text:start-value="0"/>
+ <text:linenumbering-configuration text:number-lines="false" text:offset="0.499cm" style:num-format="1" text:number-position="left" text:increment="5"/>
+ </office:styles>
+ <office:automatic-styles>
+ <style:style style:name="Table1" style:family="table">
+ <style:table-properties style:width="17cm" table:align="margins"/>
+ </style:style>
+ <style:style style:name="Table1.A" style:family="table-column">
+ <style:table-column-properties style:column-width="17cm" style:rel-column-width="65535*"/>
+ </style:style>
+ <style:style style:name="Table1.A1" style:family="table-cell">
+ <style:table-cell-properties fo:padding="0.097cm" fo:border="0.05pt solid #000000"/>
+ </style:style>
+ <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Standard">
+ <style:text-properties officeooo:rsid="00078615" officeooo:paragraph-rsid="00078615"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+ <style:text-properties officeooo:rsid="00095b34" officeooo:paragraph-rsid="00095b34"/>
+ </style:style>
+ <style:style style:name="Sect1" style:family="section">
+ <style:section-properties fo:background-color="#81d41a" style:editable="false">
+ <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+ <style:background-image/>
+ </style:section-properties>
+ </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">
+ <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>
+ </office:automatic-styles>
+ <office:master-styles>
+ <style:master-page style:name="Standard" style:page-layout-name="pm1"/>
+ </office:master-styles>
+ <office:body>
+ <office:text>
+ <text:sequence-decls>
+ <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+ <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+ </text:sequence-decls>
+ <text:section text:style-name="Sect1" text:name="Section1">
+ <table:table table:name="Table1" table:style-name="Table1">
+ <table:table-column table:style-name="Table1.A"/>
+ <table:table-row>
+ <table:table-cell table:style-name="Table1.A1" office:value-type="string" table:protected="true">
+ <text:p text:style-name="P3">baz</text:p>
+ </table:table-cell>
+ </table:table-row>
+ </table:table>
+ </text:section>
+ <text:p text:style-name="P1">foo</text:p>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index a265bb29e728..a935128bac23 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -9,6 +9,7 @@
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/FontSlant.hpp>
+//#include <com/sun/star/datatransfer/XTransferableTextSupplier.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/AutoTextContainer.hpp>
@@ -358,6 +359,67 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testXAutoTextGroup)
xAutoTextContainer->removeByName(sGroupName);
}
+#if 0
+CPPUNIT_TEST_FIXTURE(SwUnoWriter, testSectionAnchorCopyTable)
+{
+ // this contains a section that ends with a table (plus another section)
+ load(DATA_DIRECTORY, "tdf134252_onlytable_protected.fodt");
+
+ uno::Reference<text::XTextTablesSupplier> const xTextTablesSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> const xTables(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+
+ uno::Reference<text::XTextSectionsSupplier> const xTextSectionsSupplier(mxComponent,
+ uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> const xSections(
+ xTextSectionsSupplier->getTextSections(), uno::UNO_QUERY);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+
+ uno::Reference<text::XTextContent> const xSection(xSections->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> const xAnchor(xSection->getAnchor());
+ CPPUNIT_ASSERT_EQUAL(OUString("baz" SAL_NEWLINE_STRING), xAnchor->getString());
+
+ // copy the content of the section to a clipboard document
+ uno::Reference<datatransfer::XTransferableSupplier> const xTS(
+ uno::Reference<frame::XModel>(mxComponent, uno::UNO_QUERY_THROW)->getCurrentController(),
+ uno::UNO_QUERY);
+ uno::Reference<datatransfer::XTransferableTextSupplier> const xTTS(xTS, uno::UNO_QUERY);
+ uno::Reference<datatransfer::XTransferable> const xTransferable(
+ xTTS->getTransferableForTextRange(xAnchor));
+
+ // check this doesn't throw
+ CPPUNIT_ASSERT(xAnchor->getStart().is());
+ CPPUNIT_ASSERT(xAnchor->getEnd().is());
+
+ // replace section content
+ xAnchor->setString("quux");
+
+ // table in section was deleted, but not section itself
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("\""
+ "quux" /*SAL_NEWLINE_STRING*/ "\""),
+ OUString("\"" + xAnchor->getString() + "\""));
+
+ // now paste it
+ uno::Reference<text::XTextViewCursorSupplier> const xTVCS(xTS, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursor> const xCursor(xTVCS->getViewCursor());
+ xCursor->gotoEnd(false);
+ xTS->insertTransferable(xTransferable);
+
+ // table in section was pasted, but not section itself
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xSections->getCount());
+ xCursor->gotoStart(true);
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("quux" SAL_NEWLINE_STRING "foo" SAL_NEWLINE_STRING "baz" SAL_NEWLINE_STRING),
+ xCursor->getString());
+}
+#endif
+
CPPUNIT_TEST_FIXTURE(SwUnoWriter, testXURI)
{
uno::Reference<uno::XComponentContext> xContext(::comphelper::getProcessComponentContext());
@@ -737,6 +799,39 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testImageCommentAtChar)
}
}
+CPPUNIT_TEST_FIXTURE(SwUnoWriter, testChapterNumberingCharStyle)
+{
+ loadURL("private:factory/swriter", nullptr);
+
+ uno::Reference<lang::XMultiServiceFactory> xDoc(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xStyle(
+ xDoc->createInstance("com.sun.star.style.CharacterStyle"), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xStyleN(xStyle, uno::UNO_QUERY);
+ xStyle->setPropertyValue("CharColor", uno::makeAny(sal_Int32(0x00FF0000)));
+ uno::Reference<style::XStyleFamiliesSupplier> xSFS(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameContainer> xStyles(
+ xSFS->getStyleFamilies()->getByName("CharacterStyles"), uno::UNO_QUERY);
+ xStyles->insertByName("red", uno::makeAny(xStyle));
+
+ uno::Reference<text::XChapterNumberingSupplier> xCNS(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexReplace> xOutline(xCNS->getChapterNumberingRules());
+ {
+ comphelper::SequenceAsHashMap hashMap(xOutline->getByIndex(0));
+ hashMap["CharStyleName"] <<= OUString("red");
+ uno::Sequence<beans::PropertyValue> props;
+ hashMap >> props;
+ xOutline->replaceByIndex(0, uno::makeAny(props));
+ }
+ // now rename the style
+ xStyleN->setName("reddishred");
+ {
+ comphelper::SequenceAsHashMap hashMap(xOutline->getByIndex(0));
+
+ // tdf#137810 this failed, was old value "red"
+ CPPUNIT_ASSERT_EQUAL(OUString("reddishred"), hashMap["CharStyleName"].get<OUString>());
+ }
+}
+
CPPUNIT_TEST_FIXTURE(SwUnoWriter, testViewCursorPageStyle)
{
// Load a document with 2 pages, but a single paragraph.
diff --git a/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt
new file mode 100644
index 000000000000..8c99963616a7
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf138302_restartNumbering.odt
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 9c83b6f62fa9..6b39ac200c3b 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -56,6 +56,12 @@ DECLARE_WW8EXPORT_TEST(testTdf37778_readonlySection, "tdf37778_readonlySection.d
CPPUNIT_ASSERT_EQUAL_MESSAGE("Last printed date", sal_Int16(2009), xDPS->getDocumentProperties()->getPrintDate().Year);
}
+DECLARE_WW8EXPORT_TEST(tesTdf138302_restartNumbering, "tdf138302_restartNumbering.odt")
+{
+ uno::Reference<beans::XPropertySet> xPara(getParagraph(8), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("1."), getProperty<OUString>(xPara, "ListLabelString"));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf122429_header, "tdf122429_header.doc")
{
uno::Reference<container::XNameAccess> pageStyles = getStyles("PageStyles");
diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx
index 38f8e95a4a40..6119365c6392 100644
--- a/sw/qa/inc/swmodeltestbase.hxx
+++ b/sw/qa/inc/swmodeltestbase.hxx
@@ -895,6 +895,14 @@ protected:
return xCursor->getPage();
}
+ /// Get shape count.
+ int getShapes() const
+ {
+ uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xDraws = xDrawPageSupplier->getDrawPage();
+ return xDraws->getCount();
+ }
+
/**
* Given that some problem doesn't affect the result in the importer, we
* test the resulting file directly, by opening the zip file, parsing an
diff --git a/sw/qa/python/check_xmodifiable2.py b/sw/qa/python/check_xmodifiable2.py
index 53082fc2865e..b860e1f31d0f 100644
--- a/sw/qa/python/check_xmodifiable2.py
+++ b/sw/qa/python/check_xmodifiable2.py
@@ -173,17 +173,16 @@ class XModifiable2(unittest.TestCase):
xDoc = self._uno.openTemplateFromTDOC('WriteProtected.odt')
# perform unit test:
- # it is unable to set modified flag using text editing
- # when modification of the flag was disabled as
+ # it is able to set modified flag using text editing despite
# ODT file was marked to be opened as read-only
- self.assertFalse(xDoc.isSetModifiedEnabled())
+ self.assertTrue(xDoc.isSetModifiedEnabled())
self.assertFalse(xDoc.isModified())
cursor = xDoc.Text.createTextCursor()
xDoc.Text.insertString(cursor, "The first paragraph", 0)
- self.assertFalse(xDoc.isSetModifiedEnabled())
- self.assertFalse(xDoc.isModified())
+ self.assertTrue(xDoc.isSetModifiedEnabled())
+ self.assertTrue(xDoc.isModified())
# clean up
xDoc.close(True)
diff --git a/sw/qa/uitest/data/tdf39721.fodt b/sw/qa/uitest/data/tdf39721.fodt
new file mode 100644
index 000000000000..1acf06c5e2a5
--- /dev/null
+++ b/sw/qa/uitest/data/tdf39721.fodt
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text" xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <office:styles>
+ <style:style style:name="Standard" style:family="paragraph" style:class="text"/>
+ <style:default-style style:family="paragraph">
+ <style:text-properties fo:language="en" fo:country="US"/>
+ </style:default-style>
+ </office:styles>
+ <office:body>
+ <office:text>
+ <text:tracked-changes text:track-changes="false">
+ <text:changed-region xml:id="ct94454449144064" text:id="ct94454449144064">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2021-01-06T16:18:57</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ <text:changed-region xml:id="ct94454455394000" text:id="ct94454455394000">
+ <text:deletion>
+ <office:change-info>
+ <dc:creator>Unknown Author</dc:creator>
+ <dc:date>2021-01-06T16:20:17</dc:date>
+ </office:change-info>
+ </text:deletion>
+ </text:changed-region>
+ </text:tracked-changes>
+ <text:list xml:id="list627175737" text:style-name="L3">
+ <text:list-item>
+ <text:p text:style-name="P1">Lorem<text:change-start text:change-id="ct94454449144064"/> ipsu<text:change-end text:change-id="ct94454449144064"/>m</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">dol<text:change-start text:change-id="ct94454455394000"/>or <text:change-end text:change-id="ct94454455394000"/>sit</text:p>
+ </text:list-item>
+ <text:list-item>
+ <text:p text:style-name="P1">amet.</text:p>
+ </text:list-item>
+ </text:list>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/uitest/writer_tests/data/tdf135018.odt b/sw/qa/uitest/writer_tests/data/tdf135018.odt
index 2dc9e2a4da0d..9c255f81fa42 100644
--- a/sw/qa/uitest/writer_tests/data/tdf135018.odt
+++ b/sw/qa/uitest/writer_tests/data/tdf135018.odt
Binary files differ
diff --git a/sw/qa/uitest/writer_tests2/bookmark.py b/sw/qa/uitest/writer_tests2/bookmark.py
index 9cbf82c29b41..4cf88ff9ab3c 100644
--- a/sw/qa/uitest/writer_tests2/bookmark.py
+++ b/sw/qa/uitest/writer_tests2/bookmark.py
@@ -136,4 +136,43 @@ class bookmarkDialog(UITestCase):
self.ui_test.close_doc()
+ def test_bookmark_dialog_edittext(self):
+ self.ui_test.create_doc_in_start_center("writer")
+ xDoc = self.ui_test.get_component()
+
+ xDoc.Text.insertString(xDoc.Text.getStart(), "foo", False)
+ self.xUITest.executeCommand(".uno:SelectAll")
+
+ self.ui_test.execute_dialog_through_command(".uno:InsertBookmark")
+ xBookDlg = self.xUITest.getTopFocusWindow()
+ xButton = xBookDlg.getChild("insert")
+ self.ui_test.close_dialog_through_button(xButton)
+
+ self.ui_test.execute_dialog_through_command(".uno:InsertBookmark")
+ xBookDlg = self.xUITest.getTopFocusWindow()
+
+ xBmk = xBookDlg.getChild("bookmarks")
+ xFirstListEntry = xBmk.getChild("0") # select first bookmark
+ xFirstListEntry.executeAction("SELECT", tuple())
+ xEditBtn = xBookDlg.getChild("edittext")
+
+ xEditBtn.executeAction('CLICK', ())
+
+ # this does not work - the Edit widget has the focus but it's not forwarded
+# xBookDlg.executeAction("TYPE", mkPropertyValues({"TEXT":"fubar"}))
+# xBookDlg.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+ # this did not work previously but now works due to explicit
+ # forwarding in TreeListUIObject::execute()
+ xBmk.executeAction("TYPE", mkPropertyValues({"TEXT":"fubar"}))
+ xBmk.executeAction("TYPE", mkPropertyValues({"KEYCODE": "RETURN"}))
+
+ x1stListEntry = xBmk.getChild("O") # select first bookmark
+ x1stListEntry.executeAction("SELECT", tuple())
+
+ self.assertEqual(xDoc.Text.String, "fubar")
+ self.assertEqual(get_state_as_dict(x1stListEntry)["Text"], "1\tBookmark 1\tfubar\tNo\t")
+
+ xButton = xBookDlg.getChild("close")
+ self.ui_test.close_dialog_through_button(xButton)
+
# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf130199.py b/sw/qa/uitest/writer_tests7/tdf130199.py
new file mode 100644
index 000000000000..8f9dde57b5af
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf130199.py
@@ -0,0 +1,62 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
+
+class tdf130199(UITestCase):
+
+ def test_tdf130199(self):
+
+ with self.ui_test.create_doc_in_start_center("writer") as document:
+
+ # Insert an empty para
+ self.xUITest.executeCommand(".uno:InsertPara")
+
+ # Insert an empty section
+ with self.ui_test.execute_dialog_through_command(".uno:InsertSection"):
+ pass
+
+ xWriterDoc = self.xUITest.getTopFocusWindow()
+ xWriterEdit = xWriterDoc.getChild("writer_edit")
+
+ # Insert an extra empty para in the section
+ xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": "UP"}))
+ self.xUITest.executeCommand(".uno:InsertPara")
+
+ self.assertEqual(1, len(document.TextSections))
+ self.assertTrue(document.TextSections.Section1.IsVisible)
+
+ with self.ui_test.execute_dialog_through_command(".uno:EditRegion") as xDialog:
+ xHide = xDialog.getChild('hide')
+ self.assertEqual('false', get_state_as_dict(xHide)['Selected'])
+
+ xHide.executeAction('CLICK', tuple())
+
+ self.assertFalse(document.TextSections.Section1.IsVisible)
+
+ # Select everything and do not delete the section
+ self.xUITest.executeCommand(".uno:SelectAll")
+
+ with self.ui_test.execute_dialog_through_command(".uno:Delete", close_button="no") as xDialog:
+ pass
+
+ self.assertEqual(1, len(document.TextSections))
+ self.assertFalse(document.TextSections.Section1.IsVisible)
+
+ # Select everything and delete the section
+ self.xUITest.executeCommand(".uno:SelectAll")
+
+ with self.ui_test.execute_dialog_through_command(".uno:Delete", close_button="yes") as xDialog:
+ pass
+
+ self.assertEqual(0, len(document.TextSections))
+
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/uitest/writer_tests7/tdf145093.py b/sw/qa/uitest/writer_tests7/tdf145093.py
new file mode 100644
index 000000000000..c22510a619cc
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf145093.py
@@ -0,0 +1,34 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+from uitest.framework import UITestCase
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import type_text
+from uitest.uihelper.common import get_url_for_data_file
+
+class tdf145093(UITestCase):
+ def test_tdf145093(self):
+ # load the sample file
+ with self.ui_test.load_file(get_url_for_data_file("tdf39721.fodt")) as document:
+
+ # redlining should be on
+ self.xUITest.executeCommand(".uno:TrackChanges")
+
+ # Move Up/Down a list item over a tracked paragraph insertion resulted a crash
+ # (Note: not only at the end of the document, but check the original
+ # bug report temporarily, where the problem is triggered by an other problem).
+
+ self.xUITest.executeCommand(".uno:MoveDown")
+ self.xUITest.executeCommand(".uno:MoveDown")
+ # Note: Move list item from the end of the document creates an extra insertion.
+ # TODO: fix this other problem, and improve the test with an extra paragraph insertion
+ self.xUITest.executeCommand(".uno:MoveUp")
+
+ # This was a crash (using invalid pointer) both in Show Changes and Hide Changes modes
+ self.xUITest.executeCommand(".uno:MoveDown")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/qa/unit/data/sw-dialogs-test.txt b/sw/qa/unit/data/sw-dialogs-test.txt
index 54fa2761b575..0af2679d739e 100644
--- a/sw/qa/unit/data/sw-dialogs-test.txt
+++ b/sw/qa/unit/data/sw-dialogs-test.txt
@@ -199,6 +199,7 @@ modules/swriter/ui/tokenwidget.ui
modules/swriter/ui/viewoptionspage.ui
modules/swriter/ui/warndatasourcedialog.ui
modules/swriter/ui/warnemaildialog.ui
+modules/swriter/ui/warnhiddensectiondialog.ui
modules/swriter/ui/wordcount.ui
modules/swriter/ui/wrapdialog.ui
modules/swriter/ui/wrappage.ui
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index a2bfa8e5bdf6..a1fdfda6e5da 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -140,6 +140,12 @@ interface BaseText
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ FN_EDIT_BOOKMARK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
FN_DELETE_BOOKMARK // status(final|play)
[
ExecMethod = Execute ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index 5f8b5358309a..e2ed5432b8e3 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -2555,6 +2555,24 @@ SfxVoidItem InsertBookmark FN_INSERT_BOOKMARK
GroupId = SfxGroupId::Insert;
]
+SfxVoidItem EditBookmark FN_EDIT_BOOKMARK
+(SfxStringItem Bookmark FN_EDIT_BOOKMARK)
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = SfxGroupId::Insert;
+]
+
SfxVoidItem InsertBreak FN_INSERT_BREAK_DLG
(SfxInt16Item Kind FN_INSERT_BREAK_DLG,SfxStringItem TemplateName FN_PARAM_1,SfxUInt16Item PageNumber FN_PARAM_2,SfxBoolItem PageNumberFilled FN_PARAM_3)
[
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 7cd6303ecef1..55835c5d1c30 100644
--- a/sw/source/core/attr/swatrset.cxx
+++ b/sw/source/core/attr/swatrset.cxx
@@ -398,7 +398,8 @@ void SwAttrSet::CopyToModify( SwModify& rMod ) const
}
if (pSrcDoc != pDstDoc &&
- SfxItemState::SET == GetItemState(RES_PARATR_LIST_AUTOFMT, false, &pItem))
+ SfxItemState::SET == GetItemState(RES_PARATR_LIST_AUTOFMT, false, &pItem)
+ && static_cast<SwFormatAutoFormat const*>(pItem)->GetStyleHandle())
{
SfxItemSet const& rAutoStyle(*static_cast<SwFormatAutoFormat const&>(*pItem).GetStyleHandle());
std::shared_ptr<SfxItemSet> const pNewSet(
diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 19dd4e7751f0..dc9fb62973f7 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -140,7 +140,7 @@ const sal_Int32 coStartFlags =
// Continuing characters may be any alphanumeric, underscore, or dot.
const sal_Int32 coContFlags =
- ( coStartFlags | i18n::KParseTokens::ASC_DOT )
+ (coStartFlags | i18n::KParseTokens::ASC_DOT | i18n::KParseTokens::GROUP_SEPARATOR_IN_NUMBER)
& ~i18n::KParseTokens::IGNORE_LEADING_WS;
extern "C" {
diff --git a/sw/source/core/bastyp/index.cxx b/sw/source/core/bastyp/index.cxx
index 4f740948abff..cb7c05825274 100644
--- a/sw/source/core/bastyp/index.cxx
+++ b/sw/source/core/bastyp/index.cxx
@@ -229,12 +229,11 @@ SwIndexReg::~SwIndexReg()
void SwIndexReg::Update(
SwIndex const & rIdx,
const sal_Int32 nDiff,
- const bool bNeg,
- const bool /* argument is only used in derived class*/ )
+ UpdateMode const eMode)
{
SwIndex* pStt = const_cast<SwIndex*>(&rIdx);
const sal_Int32 nNewVal = rIdx.m_nIndex;
- if( bNeg )
+ if (eMode & UpdateMode::Negative)
{
const sal_Int32 nLast = rIdx.GetIndex() + nDiff;
while (pStt && pStt->m_nIndex == nNewVal)
diff --git a/sw/source/core/bastyp/swrect.cxx b/sw/source/core/bastyp/swrect.cxx
index 1d53e6e7a71e..884c155003e2 100644
--- a/sw/source/core/bastyp/swrect.cxx
+++ b/sw/source/core/bastyp/swrect.cxx
@@ -19,6 +19,8 @@
#include <swrect.hxx>
+#include <libxml/xmlwriter.h>
+
#ifdef DBG_UTIL
#include <tools/stream.hxx>
#endif
@@ -218,6 +220,16 @@ void SwRect::SetUpperRightCorner( const Point& rNew )
void SwRect::SetLowerLeftCorner( const Point& rNew )
{ m_Point = Point(rNew.X(), rNew.Y() - m_Size.getHeight()); }
+void SwRect::dumpAsXmlAttributes(xmlTextWriterPtr writer) const
+{
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("left"), "%li", Left());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("top"), "%li", Top());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("width"), "%li", Width());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("height"), "%li", Height());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("bottom"), "%li", Bottom());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("right"), "%li", Right());
+}
+
#ifdef DBG_UTIL
SvStream& WriteSwRect(SvStream &rStream, const SwRect &rRect)
{
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 1c4d4941463a..3de0b8351391 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -431,6 +431,24 @@ namespace sw { namespace mark
}
}
+ void Bookmark::Hide(bool const isHide)
+ {
+ if (isHide != m_bHidden)
+ {
+ m_bHidden = isHide;
+ InvalidateFrames();
+ }
+ }
+
+ void Bookmark::SetHideCondition(OUString const& rHideCondition)
+ {
+ if (m_sHideCondition != rHideCondition)
+ {
+ m_sHideCondition = rHideCondition;
+ InvalidateFrames();
+ }
+ }
+
::sfx2::IXmlIdRegistry& Bookmark::GetRegistry()
{
SwDoc *const pDoc( GetMarkPos().GetDoc() );
diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx
index 4d956e90e2c5..4f93f9b5d232 100644
--- a/sw/source/core/crsr/callnk.cxx
+++ b/sw/source/core/crsr/callnk.cxx
@@ -30,6 +30,7 @@
#include <ndtxt.hxx>
#include <flyfrm.hxx>
#include <breakit.hxx>
+#include <UndoTable.hxx>
SwCallLink::SwCallLink( SwCursorShell & rSh )
: rShell( rSh )
@@ -59,24 +60,36 @@ SwCallLink::SwCallLink( SwCursorShell & rSh )
}
}
-static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell & 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 (rShell.IsTableMode() || (rShell.StartsWithTable() && rShell.ExtendedSelectedAll()))
+ if (pShell && (pShell->IsTableMode() || (pShell->StartsWith_() != SwCursorShell::StartsWith::None && 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
@@ -85,10 +98,13 @@ static void lcl_notifyRow(const SwContentNode* pNode, SwCursorShell & rShell)
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
@@ -101,15 +117,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/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index a9175808de85..b35b1329cbca 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -130,9 +130,14 @@ bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark)
{
return false;
}
- SwTextNode const& rNode(*rMark.GetMarkPos().nNode.GetNode().GetTextNode());
+ SwNode const& rNode(rMark.GetMarkPos().nNode.GetNode());
+ SwTextNode const*const pTextNode(rNode.GetTextNode());
+ if (pTextNode == nullptr)
+ { // UNO_BOOKMARK may point to table node
+ return rNode.GetRedlineMergeFlag() == SwNode::Merge::Hidden;
+ }
SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(
- rNode.getLayoutFrame(&rLayout)));
+ pTextNode->getLayoutFrame(&rLayout)));
if (!pFrame)
{
return true;
@@ -147,14 +152,14 @@ bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark)
}
else
{
- if (rMark.GetMarkPos().nContent.GetIndex() == rNode.Len())
+ if (rMark.GetMarkPos().nContent.GetIndex() == pTextNode->Len())
{ // at end of node: never deleted (except if node deleted)
- return rNode.GetRedlineMergeFlag() == SwNode::Merge::Hidden;
+ return pTextNode->GetRedlineMergeFlag() == SwNode::Merge::Hidden;
}
else
{ // check character following mark pos
return pFrame->MapModelToViewPos(rMark.GetMarkPos())
- == pFrame->MapModelToView(&rNode, rMark.GetMarkPos().nContent.GetIndex() + 1);
+ == pFrame->MapModelToView(pTextNode, rMark.GetMarkPos().nContent.GetIndex() + 1);
}
}
}
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7e0defb67ca0..85e9eb837017 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -120,6 +120,10 @@ SwPaM * SwCursorShell::CreateCursor()
// don't create new Cursor with active table Selection
assert(!IsTableMode());
+ // ensure that m_pCurrentCursor is valid; if it's invalid it would be
+ // copied to pNew and then pNew would be deleted in UpdateCursor() below
+ ClearUpCursors();
+
// New cursor as copy of current one. Add to the ring.
// Links point to previously created one, ie forward.
SwShellCursor* pNew = new SwShellCursor( *m_pCurrentCursor );
@@ -228,7 +232,7 @@ void SwCursorShell::StartAction()
void SwCursorShell::EndAction( const bool bIdleEnd, const bool DoSetPosX )
{
- comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll());
+ comphelper::FlagRestorationGuard g(mbSelectAll, StartsWith_() != StartsWith::None && ExtendedSelectedAll());
bool bVis = m_bSVCursorVis;
sal_uInt16 eFlags = SwCursorShell::CHKRANGE;
@@ -581,42 +585,331 @@ bool SwCursorShell::SttEndDoc( bool bStt )
return bRet;
}
+const SwTableNode* SwCursorShell::IsCursorInTable() const
+{
+ if (m_pTableCursor)
+ { // find the table that has the selected boxes
+ return m_pTableCursor->GetSelectedBoxes()[0]->GetSttNd()->FindTableNode();
+ }
+ return m_pCurrentCursor->GetNode().FindTableNode();
+}
+
+// fun cases to consider:
+// * outermost table
+// - into para => SA/ESA
+// - into prev/next table => continue...
+// - no prev/next => done
+// * inner table
+// - into containing cell => SA/ESA
+// - into prev/next of containing cell
+// + into para
+// + into table nested in prev/next cell
+// - out of table -> as above
+// => iterate in one direction until a node is reached that is a parent or a sibling of a parent of the current table
+// - parent reached => SA/ESA depending
+// - not in parent but in *prev/next* sibling of outer cell => TrySelectOuterTable
+// - not in parent but in *prev/next* sibling of outer table => TrySelectOuterTable
+// => select-all cannot select a sequence of table with no para at same level; only 1 table
+// - no parent, no prev/next => TrySelectOuterTable
+
+bool SwCursorShell::MoveOutOfTable()
+{
+ SwPosition const point(*getShellCursor(false)->GetPoint());
+ SwPosition const mark(*getShellCursor(false)->GetMark());
+
+ for (auto const fnMove : {&fnMoveBackward, &fnMoveForward})
+ {
+ Push();
+ SwCursor *const pCursor(getShellCursor(false));
+
+ pCursor->Normalize(fnMove == &fnMoveBackward);
+ pCursor->DeleteMark();
+ SwTableNode const*const pTable(pCursor->GetPoint()->nNode.GetNode().FindTableNode());
+ assert(pTable);
+ while (MovePara(GoInContent, *fnMove))
+ {
+ SwStartNode const*const pBox(pCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode());
+ if (!pBox)
+ {
+ Pop(SwCursorShell::PopMode::DeleteStack);
+ return true; // moved to paragraph at top-level of text
+ }
+ if (pBox->GetIndex() < pTable->GetIndex()
+ && pTable->EndOfSectionIndex() < pBox->EndOfSectionIndex())
+ {
+ Pop(SwCursorShell::PopMode::DeleteStack);
+ return true; // pBox contains start position (pTable)
+ }
+ }
+
+ Pop(SwCursorShell::PopMode::DeleteCurrent);
+ // FIXME: Pop doesn't restore original cursor if nested tables
+ *getShellCursor(false)->GetPoint() = point;
+ getShellCursor(false)->SetMark();
+ *getShellCursor(false)->GetMark() = mark;
+ }
+ return false;
+}
+
+bool SwCursorShell::TrySelectOuterTable()
+{
+ assert(m_pTableCursor);
+ SwTableNode const& rInnerTable(*m_pTableCursor->GetPoint()->nNode.GetNode().FindTableNode());
+ SwNodes const& rNodes(rInnerTable.GetNodes());
+ SwTableNode const*const pOuterTable(rInnerTable.GetNodes()[rInnerTable.GetIndex()-1]->FindTableNode());
+ if (!pOuterTable)
+ {
+ return false;
+ }
+
+ // manually select boxes of pOuterTable
+ SwNodeIndex firstCell(*pOuterTable, +1);
+ SwNodeIndex lastCell(*rNodes[pOuterTable->EndOfSectionIndex()-1]->StartOfSectionNode());
+ SwSelBoxes aNew;
+ pOuterTable->GetTable().CreateSelection(&firstCell.GetNode(), &lastCell.GetNode(),
+ aNew, SwTable::SEARCH_NONE, false);
+ // set table cursor to 1st / last content which may be in inner table
+ SwContentNode *const pStart = rNodes.GoNext(&firstCell);
+ assert(pStart); // must at least find the previous point node
+ lastCell = *lastCell.GetNode().EndOfSectionNode();
+ SwContentNode *const pEnd = SwNodes::GoPrevious(&lastCell);
+ assert(pEnd); // must at least find the previous point node
+ delete m_pTableCursor;
+ m_pTableCursor = new SwShellTableCursor(*this, SwPosition(*pStart, 0), Point(),
+ SwPosition(*pEnd, 0), Point());
+ m_pTableCursor->ActualizeSelection( aNew );
+ m_pTableCursor->IsCursorMovedUpdate(); // clear this so GetCursor() doesn't recreate our SwSelBoxes
+
+ // this will update m_pCurrentCursor based on m_pTableCursor
+ UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY);
+
+ return true;
+}
+
+/// find XText start node
+static SwStartNode const* FindTextStart(SwPosition const& rPos)
+{
+ SwStartNode const* pStartNode(rPos.nNode.GetNode().StartOfSectionNode());
+ while (pStartNode && (pStartNode->IsSectionNode() || pStartNode->IsTableNode()))
+ {
+ pStartNode = pStartNode->StartOfSectionNode();
+ }
+ return pStartNode;
+}
+
+static SwStartNode const* FindParentText(SwShellCursor const& rCursor)
+{
+ // find closest section containing both start and end - ignore Sections
+ SwStartNode const* pStartNode(FindTextStart(*rCursor.Start()));
+ SwEndNode const* pEndNode(FindTextStart(*rCursor.End())->EndOfSectionNode());
+ while (pStartNode->EndOfSectionNode()->GetIndex() < pEndNode->GetIndex())
+ {
+ pStartNode = pStartNode->StartOfSectionNode();
+ }
+ while (pStartNode->GetIndex() < pEndNode->StartOfSectionNode()->GetIndex())
+ {
+ pEndNode = pEndNode->StartOfSectionNode()->StartOfSectionNode()->EndOfSectionNode();
+ }
+ assert(pStartNode->EndOfSectionNode() == pEndNode);
+
+ return (pStartNode->IsSectionNode() || pStartNode->IsTableNode())
+ ? FindTextStart(SwPosition(*pStartNode))
+ : pStartNode;
+}
+
+bool SwCursorShell::MoveStartText()
+{
+ SwPosition const old(*m_pCurrentCursor->GetPoint());
+ SwStartNode const*const pStartNode(FindParentText(*getShellCursor(false)));
+ assert(pStartNode);
+ SwTableNode const*const pTable(pStartNode->FindTableNode());
+ *m_pCurrentCursor->GetPoint() = SwPosition(*pStartNode);
+ GetDoc()->GetNodes().GoNext(&m_pCurrentCursor->GetPoint()->nNode);
+ m_pCurrentCursor->GetPoint()->nContent.Assign(m_pCurrentCursor->GetPoint()->nNode.GetNode().GetContentNode(), 0);
+ while (m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableNode() != pTable
+ && (!pTable || pTable->GetIndex() < m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableNode()->GetIndex())
+ && MoveOutOfTable());
+ UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY);
+ return old != *m_pCurrentCursor->GetPoint();
+}
+
+// select all inside the current XText, with table or hidden para at start/end
void SwCursorShell::ExtendedSelectAll(bool bFootnotes)
{
+ // find common ancestor node of both ends of cursor
+ SwStartNode const*const pStartNode(FindParentText(*getShellCursor(false)));
+ assert(pStartNode);
+ if (IsTableMode())
+ { // convert m_pTableCursor to m_pCurrentCursor after determining pStartNode
+ TableCursorToCursor();
+ }
SwNodes& rNodes = GetDoc()->GetNodes();
+ m_pCurrentCursor->Normalize(true);
SwPosition* pPos = m_pCurrentCursor->GetPoint();
- pPos->nNode = bFootnotes ? rNodes.GetEndOfPostIts() : rNodes.GetEndOfAutotext();
+ pPos->nNode = bFootnotes ? rNodes.GetEndOfPostIts() : static_cast<SwNode const&>(*pStartNode);
pPos->nContent.Assign( rNodes.GoNext( &pPos->nNode ), 0 );
pPos = m_pCurrentCursor->GetMark();
- pPos->nNode = rNodes.GetEndOfContent();
+ pPos->nNode = bFootnotes ? rNodes.GetEndOfContent() : static_cast<SwNode const&>(*pStartNode->EndOfSectionNode());
SwContentNode* pCNd = SwNodes::GoPrevious( &pPos->nNode );
pPos->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 );
}
-bool SwCursorShell::ExtendedSelectedAll()
+static typename SwCursorShell::StartsWith StartsWith(SwStartNode const& rStart)
+{
+ for (auto i = rStart.GetIndex() + 1; i < rStart.EndOfSectionIndex(); ++i)
+ {
+ SwNode const& rNode(*rStart.GetNodes()[i]);
+ switch (rNode.GetNodeType())
+ {
+ case SwNodeType::Section:
+ if (rNode.GetSectionNode()->GetSection().IsHidden())
+ return SwCursorShell::StartsWith::HiddenSection;
+ continue;
+ case SwNodeType::Table:
+ return SwCursorShell::StartsWith::Table;
+ case SwNodeType::Text:
+ if (rNode.GetTextNode()->IsHidden())
+ {
+ return SwCursorShell::StartsWith::HiddenPara;
+ }
+ return SwCursorShell::StartsWith::None;
+ default:
+ return SwCursorShell::StartsWith::None;
+ }
+ }
+ return SwCursorShell::StartsWith::None;
+}
+
+static typename SwCursorShell::StartsWith EndsWith(SwStartNode const& rStart)
+{
+ for (auto i = rStart.EndOfSectionIndex() - 1; rStart.GetIndex() < i; --i)
+ {
+ SwNode const& rNode(*rStart.GetNodes()[i]);
+ switch (rNode.GetNodeType())
+ {
+ case SwNodeType::End:
+ if (auto pStartNode = rNode.StartOfSectionNode(); pStartNode->IsTableNode())
+ {
+ return SwCursorShell::StartsWith::Table;
+ }
+ else if (pStartNode->IsSectionNode())
+ {
+ if (pStartNode->GetSectionNode()->GetSection().IsHidden())
+ return SwCursorShell::StartsWith::HiddenSection;
+ }
+ //TODO buggy SwUndoRedline in testTdf137503? assert(rNode.StartOfSectionNode()->IsSectionNode());
+ break;
+ case SwNodeType::Text:
+ if (rNode.GetTextNode()->IsHidden())
+ {
+ return SwCursorShell::StartsWith::HiddenPara;
+ }
+ return SwCursorShell::StartsWith::None;
+ default:
+ return SwCursorShell::StartsWith::None;
+ }
+ }
+ return SwCursorShell::StartsWith::None;
+}
+
+// return the node that is the start of the extended selection (to include table
+// or section start nodes; looks like extending for end nodes is not required)
+::std::optional<::std::pair<SwNode const*, ::std::vector<SwTableNode*>>>
+SwCursorShell::ExtendedSelectedAll() const
{
+ if (m_pTableCursor)
+ {
+ return {};
+ }
+
SwNodes& rNodes = GetDoc()->GetNodes();
- SwNodeIndex nNode = rNodes.GetEndOfAutotext();
+ SwShellCursor const*const pShellCursor = getShellCursor(false);
+ SwStartNode const* pStartNode(FindParentText(*pShellCursor));
+
+ SwNodeIndex nNode(*pStartNode);
SwContentNode* pStart = rNodes.GoNext(&nNode);
+ if (!pStart)
+ {
+ return {};
+ }
- nNode = rNodes.GetEndOfContent();
+ nNode = *pStartNode->EndOfSectionNode();
SwContentNode* pEnd = SwNodes::GoPrevious(&nNode);
-
- if (!pStart || !pEnd)
- return false;
+ if (!pEnd)
+ {
+ return {};
+ }
SwPosition aStart(*pStart, 0);
SwPosition aEnd(*pEnd, pEnd->Len());
- SwShellCursor* pShellCursor = getShellCursor(false);
- return aStart == *pShellCursor->Start() && aEnd == *pShellCursor->End();
+ if (!(aStart == *pShellCursor->Start() && aEnd == *pShellCursor->End()))
+ {
+ return {};
+ }
+
+ auto const ends(::EndsWith(*pStartNode));
+ if (::StartsWith(*pStartNode) == StartsWith::None
+ && ends == StartsWith::None)
+ {
+ return {}; // "ordinary" selection will work
+ }
+
+ ::std::vector<SwTableNode*> tablesAtEnd;
+ if (ends == StartsWith::Table)
+ {
+ SwNode * pLastNode(rNodes[pStartNode->EndOfSectionIndex() - 1]);
+ while (pLastNode->IsEndNode())
+ {
+ SwNode *const pNode(pLastNode->StartOfSectionNode());
+ if (pNode->IsTableNode())
+ {
+ tablesAtEnd.push_back(pNode->GetTableNode());
+ pLastNode = rNodes[pNode->GetIndex() - 1];
+ }
+ else if (pNode->IsSectionNode())
+ {
+ pLastNode = rNodes[pLastNode->GetIndex() - 1];
+ }
+ }
+ assert(!tablesAtEnd.empty());
+ }
+
+ // tdf#133990 ensure directly containing section is included in SwUndoDelete
+ while (pStartNode->IsSectionNode()
+ && pStartNode->GetIndex() == pStartNode->StartOfSectionNode()->GetIndex() + 1
+ && pStartNode->EndOfSectionNode()->GetIndex() + 1 == pStartNode->StartOfSectionNode()->EndOfSectionNode()->GetIndex())
+ {
+ pStartNode = pStartNode->StartOfSectionNode();
+ }
+
+ // pStartNode is the node that fully contains the selection - the first
+ // node of the selection is the first node inside pStartNode
+ return ::std::make_pair(rNodes[pStartNode->GetIndex() + 1], tablesAtEnd);
}
-bool SwCursorShell::StartsWithTable()
+typename SwCursorShell::StartsWith SwCursorShell::StartsWith_()
{
- SwNodes& rNodes = GetDoc()->GetNodes();
- SwNodeIndex nNode(rNodes.GetEndOfExtras());
- SwContentNode* pContentNode = rNodes.GoNext(&nNode);
- return pContentNode->FindTableNode();
+ SwShellCursor const*const pShellCursor = getShellCursor(false);
+ // first, check if this is invalid; ExtendedSelectAll(true) may result in
+ // a) an ordinary selection that is valid
+ // b) a selection that is extended
+ // c) a selection that is invalid and will cause FindParentText to loop
+ SwNode const& rEndOfExtras(GetDoc()->GetNodes().GetEndOfExtras());
+ if (pShellCursor->Start()->nNode.GetIndex() <= rEndOfExtras.GetIndex()
+ && rEndOfExtras.GetIndex() < pShellCursor->End()->nNode.GetIndex())
+ {
+ return StartsWith::None; // *very* extended, no ExtendedSelectedAll handling!
+ }
+ SwStartNode const*const pStartNode(FindParentText(*pShellCursor));
+ if (auto const ret = ::StartsWith(*pStartNode); ret != StartsWith::None)
+ {
+ return ret;
+ }
+ if (auto const ret = ::EndsWith(*pStartNode); ret != StartsWith::None)
+ {
+ return ret;
+ }
+ return StartsWith::None;
}
bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
@@ -645,14 +938,14 @@ bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage )
return bRet;
}
-bool SwCursorShell::isInHiddenTextFrame(SwShellCursor* pShellCursor)
+bool SwCursorShell::isInHiddenFrame(SwShellCursor* pShellCursor)
{
SwContentNode *pCNode = pShellCursor->GetContentNode();
std::pair<Point, bool> tmp(pShellCursor->GetPtPos(), false);
SwContentFrame *const pFrame = pCNode
? pCNode->getLayoutFrame(GetLayout(), pShellCursor->GetPoint(), &tmp)
: nullptr;
- return !pFrame || (pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow());
+ return !pFrame || pFrame->IsHiddenNow();
}
// sw_redlinehide: this should work for all cases: GoCurrPara, GoNextPara, GoPrevPara
@@ -693,7 +986,7 @@ bool SwCursorShell::MovePara(SwWhichPara fnWhichPara, SwMoveFnCollection const &
//which is what SwCursorShell::UpdateCursorPos will reset
//the position to if we pass it a position in an
//invisible hidden paragraph field
- while (isInHiddenTextFrame(pTmpCursor)
+ while (isInHiddenFrame(pTmpCursor)
|| !IsAtStartOrEndOfFrame(this, pTmpCursor, fnPosPara))
{
if (!pTmpCursor->MovePara(fnWhichPara, fnPosPara))
@@ -1395,7 +1688,7 @@ bool SwCursorShell::GoNextPrevCursorSetSearchLabel(const bool bNext)
void SwCursorShell::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle &rRect)
{
- comphelper::FlagRestorationGuard g(mbSelectAll, StartsWithTable() && ExtendedSelectedAll());
+ comphelper::FlagRestorationGuard g(mbSelectAll, StartsWith_() != StartsWith::None && ExtendedSelectedAll());
SET_CURR_SHELL( this );
// always switch off all cursors when painting
@@ -1469,8 +1762,8 @@ void SwCursorShell::VisPortChgd( const SwRect & rRect )
/** Set the cursor back into content.
- This should only be called if the cursor was move somewhere else (e.g. when
- deleting a border). The new position is calculated from its current position
+ This should only be called if the cursor was moved (e.g. when deleting a
+ text frame). The new position is calculated from its current position
in the layout.
*/
void SwCursorShell::UpdateCursorPos()
@@ -1480,13 +1773,29 @@ void SwCursorShell::UpdateCursorPos()
SwShellCursor* pShellCursor = getShellCursor( true );
Size aOldSz( GetDocSize() );
- if( isInHiddenTextFrame(pShellCursor) )
+ if (isInHiddenFrame(pShellCursor) && !ExtendedSelectedAll())
{
- SwCursorMoveState aTmpState( MV_NONE );
+ SwCursorMoveState aTmpState(MV_SETONLYTEXT);
aTmpState.m_bSetInReadOnly = IsReadOnlyAvailable();
GetLayout()->GetCursorOfst( pShellCursor->GetPoint(), pShellCursor->GetPtPos(),
&aTmpState );
pShellCursor->DeleteMark();
+ // kde45196-1.html: try to get to a non-hidden paragraph, there must
+ // be one in the document body
+ while (isInHiddenFrame(pShellCursor))
+ {
+ if (!pShellCursor->MovePara(GoNextPara, fnParaStart))
+ {
+ break;
+ }
+ }
+ while (isInHiddenFrame(pShellCursor))
+ {
+ if (!pShellCursor->MovePara(GoPrevPara, fnParaStart))
+ {
+ break;
+ }
+ }
}
IGrammarContact *pGrammarContact = GetDoc() ? GetDoc()->getGrammarContact() : nullptr;
if( pGrammarContact )
@@ -2243,7 +2552,14 @@ void SwCursorShell::Push()
*/
bool SwCursorShell::Pop(PopMode const eDelete)
{
- SwCallLink aLk( *this ); // watch Cursor-Moves; call Link if needed
+ ::std::unique_ptr<SwCallLink> pLink(::std::make_unique<SwCallLink>(*this)); // watch Cursor-Moves; call Link if needed
+ return Pop(eDelete, ::std::move(pLink));
+}
+
+bool SwCursorShell::Pop(PopMode const eDelete,
+ [[maybe_unused]] ::std::unique_ptr<SwCallLink> const pLink)
+{
+ assert(pLink); // parameter exists only to be deleted before return
// are there any left?
if (nullptr == m_pStackCursor)
@@ -2264,7 +2580,7 @@ bool SwCursorShell::Pop(PopMode const eDelete)
if (PopMode::DeleteCurrent == eDelete)
{
- SwCursorSaveState aSaveState( *m_pCurrentCursor );
+ ::std::optional<SwCursorSaveState> oSaveState( *m_pCurrentCursor );
// If the visible SSelection was not changed
const Point& rPoint = pOldStack->GetPtPos();
@@ -2292,6 +2608,7 @@ bool SwCursorShell::Pop(PopMode const eDelete)
!m_pCurrentCursor->IsSelOvr( SwCursorSelOverFlags::Toggle |
SwCursorSelOverFlags::ChangePos ) )
{
+ oSaveState.reset(); // prevent UAF
UpdateCursor(); // update current cursor
if (m_pTableCursor)
{ // tdf#106929 ensure m_pCurrentCursor ring is recreated from table
@@ -2373,6 +2690,8 @@ void SwCursorShell::ShowCursor()
{
if( !m_bBasicHideCursor )
{
+ comphelper::FlagRestorationGuard g(mbSelectAll, StartsWith_() != StartsWith::None && ExtendedSelectedAll());
+
m_bSVCursorVis = true;
m_pCurrentCursor->SetShowTextInputFieldOverlay( true );
@@ -2415,6 +2734,8 @@ void SwCursorShell::ShellLoseFocus()
void SwCursorShell::ShellGetFocus()
{
+ comphelper::FlagRestorationGuard g(mbSelectAll, StartsWith_() != StartsWith::None && ExtendedSelectedAll());
+
m_bHasFocus = true;
if( !m_bBasicHideCursor && VisArea().Width() )
{
@@ -2694,7 +3015,7 @@ bool SwCursorShell::IsOverReadOnlyPos( const Point& rPt ) const
SwPaM aPam( *m_pCurrentCursor->GetPoint() );
GetLayout()->GetCursorOfst( aPam.GetPoint(), aPt );
// form view
- return aPam.HasReadonlySel( GetViewOptions()->IsFormView() );
+ return aPam.HasReadonlySel(GetViewOptions()->IsFormView(), false);
}
/** Get the number of elements in the ring of cursors
@@ -3091,7 +3412,7 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText )
GetDoc()->GetDocShell()->IsReadOnlyUI() )
return true;
- if( m_pCurrentCursor->HasMark() )
+ if( m_pCurrentCursor->HasMark() && !mbSelectAll )
ClearMark();
// first check for frames
@@ -3313,7 +3634,7 @@ void SwCursorShell::SetReadOnlyAvailable( bool bFlag )
}
}
-bool SwCursorShell::HasReadonlySel() const
+bool SwCursorShell::HasReadonlySel(bool const isReplace) const
{
bool bRet = false;
// If protected area is to be ignored, then selections are never read-only.
@@ -3323,14 +3644,15 @@ bool SwCursorShell::HasReadonlySel() const
{
if ( m_pTableCursor != nullptr )
{
+ // TODO: handling when a table cell (cells) is selected
bRet = m_pTableCursor->HasReadOnlyBoxSel()
- || m_pTableCursor->HasReadonlySel( GetViewOptions()->IsFormView() );
+ || m_pTableCursor->HasReadonlySel(GetViewOptions()->IsFormView(), isReplace);
}
else
{
for(const SwPaM& rCursor : m_pCurrentCursor->GetRingContainer())
{
- if( rCursor.HasReadonlySel( GetViewOptions()->IsFormView() ) )
+ if (rCursor.HasReadonlySel(GetViewOptions()->IsFormView(), isReplace))
{
bRet = true;
break;
@@ -3341,6 +3663,31 @@ bool SwCursorShell::HasReadonlySel() const
return bRet;
}
+bool SwCursorShell::HasHiddenSections() const
+{
+ bool bRet = false;
+
+ if ( m_pTableCursor != nullptr )
+ {
+ // TODO: handling when a table cell (cells) is selected
+ bRet = m_pTableCursor->HasHiddenBoxSel()
+ || m_pTableCursor->HasHiddenSections();
+ }
+ else
+ {
+ for(const SwPaM& rCursor : m_pCurrentCursor->GetRingContainer())
+ {
+ if (rCursor.HasHiddenSections())
+ {
+ bRet = true;
+ break;
+ }
+ }
+ }
+
+ return bRet;
+}
+
bool SwCursorShell::IsSelFullPara() const
{
bool bRet = false;
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 9153b8b34e85..11fb5db02df6 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -1930,7 +1930,7 @@ bool SwContentAtPos::IsInRTLText()const
return bRet;
}
-bool SwCursorShell::SelectText( const sal_Int32 nStart,
+bool SwCursorShell::SelectTextModel( const sal_Int32 nStart,
const sal_Int32 nEnd )
{
SET_CURR_SHELL( this );
@@ -1954,6 +1954,43 @@ bool SwCursorShell::SelectText( const sal_Int32 nStart,
return bRet;
}
+TextFrameIndex SwCursorShell::GetCursorPointAsViewIndex() const
+{
+ SwPosition const*const pPos(GetCursor()->GetPoint());
+ SwTextNode const*const pTextNode(pPos->nNode.GetNode().GetTextNode());
+ assert(pTextNode);
+ SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pTextNode->getLayoutFrame(GetLayout())));
+ assert(pFrame);
+ return pFrame->MapModelToViewPos(*pPos);
+}
+
+bool SwCursorShell::SelectTextView(TextFrameIndex const nStart,
+ TextFrameIndex const nEnd)
+{
+ CurrShell aCurr( this );
+ bool bRet = false;
+
+ SwCallLink aLk( *this );
+ SwCursorSaveState aSaveState( *m_pCurrentCursor );
+
+ SwPosition& rPos = *m_pCurrentCursor->GetPoint();
+ m_pCurrentCursor->DeleteMark();
+ // indexes must correspond to cursor point!
+ SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(m_pCurrentCursor->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(GetLayout())));
+ assert(pFrame);
+ rPos = pFrame->MapViewToModelPos(nStart);
+ m_pCurrentCursor->SetMark();
+ rPos = pFrame->MapViewToModelPos(nEnd);
+
+ if (!m_pCurrentCursor->IsSelOvr())
+ {
+ UpdateCursor();
+ bRet = true;
+ }
+
+ return bRet;
+}
+
bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich,
bool bExpand,
const SwTextAttr* pTextAttr )
@@ -1977,7 +2014,7 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich,
if( pTextAttr )
{
const sal_Int32* pEnd = pTextAttr->End();
- bRet = SelectText( pTextAttr->GetStart(), ( pEnd ? *pEnd : pTextAttr->GetStart() + 1 ) );
+ bRet = SelectTextModel(pTextAttr->GetStart(), (pEnd ? *pEnd : pTextAttr->GetStart() + 1));
}
}
return bRet;
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index b47b35b4bc30..8a7b3fb65507 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -573,7 +573,7 @@ static const SwFrame* lcl_FindEditInReadonlyFrame( const SwFrame& rFrame )
}
/// is in protected section or selection surrounds something protected
-bool SwPaM::HasReadonlySel( bool bFormView ) const
+bool SwPaM::HasReadonlySel(bool bFormView, bool const isReplace) const
{
bool bRet = false;
@@ -748,7 +748,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
if (!bRet &&
pDoc->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS))
{
- if (pDoc->getIDocumentMarkAccess()->isBookmarkDeleted(*this))
+ if (pDoc->getIDocumentMarkAccess()->isBookmarkDeleted(*this, isReplace))
{
return true;
}
@@ -790,6 +790,49 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const
return bRet;
}
+bool SwPaM::HasHiddenSections() const
+{
+ bool bRet = false;
+
+ if (HasMark() && GetPoint()->nNode != GetMark()->nNode)
+ {
+ sal_uLong nSttIdx = GetMark()->nNode.GetIndex(),
+ nEndIdx = GetPoint()->nNode.GetIndex();
+ if (nEndIdx <= nSttIdx)
+ {
+ sal_uLong nTmp = nSttIdx;
+ nSttIdx = nEndIdx;
+ nEndIdx = nTmp;
+ }
+
+ // If a hidden section should be between nodes, then the
+ // selection needs to contain already x nodes.
+ // (TextNd, SectNd, TextNd, EndNd, TextNd )
+ if (nSttIdx + 3 < nEndIdx)
+ {
+ const SwSectionFormats& rFormats = GetDoc()->GetSections();
+ for (SwSectionFormats::size_type n = rFormats.size(); n;)
+ {
+ const SwSectionFormat* pFormat = rFormats[--n];
+ if (pFormat->GetSection()->IsHidden())
+ {
+ const SwFormatContent& rContent = pFormat->GetContent(false);
+ OSL_ENSURE(rContent.GetContentIdx(), "where is the SectionNode?");
+ sal_uLong nIdx = rContent.GetContentIdx()->GetIndex();
+ if (nSttIdx <= nIdx && nEndIdx >= nIdx
+ && rContent.GetContentIdx()->GetNode().GetNodes().IsDocNodes())
+ {
+ bRet = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return bRet;
+}
+
/// This function returns the next node in direction of search. If there is no
/// left or the next is out of the area, then a null-pointer is returned.
/// @param rbFirst If <true> then first time request. If so than the position of
@@ -814,7 +857,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const &
(
nullptr == pFrame ||
( !bInReadOnly && pFrame->IsProtected() ) ||
- (pFrame->IsTextFrame() && static_cast<SwTextFrame const*>(pFrame)->IsHiddenNow())
+ pFrame->IsHiddenNow()
) ||
( !bInReadOnly && pNd->FindSectionNode() &&
pNd->FindSectionNode()->GetSection().IsProtect()
@@ -854,8 +897,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const &
SwContentFrame const*const pFrame(pNd->getLayoutFrame(pLayout));
if (nullptr == pFrame ||
( !bInReadOnly && pFrame->IsProtected() ) ||
- ( pFrame->IsTextFrame() &&
- static_cast<SwTextFrame const*>(pFrame)->IsHiddenNow()))
+ pFrame->IsHiddenNow())
{
pNd = nullptr;
continue;
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 8cfa09e8c9ac..f8b0213a67cc 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -214,7 +214,7 @@ namespace
}
}
-bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
+bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags)
{
SwDoc* pDoc = GetDoc();
SwNodes& rNds = pDoc->GetNodes();
@@ -336,7 +336,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
// skip to the next/prev valid paragraph with a layout
SwNodeIndex& rPtIdx = GetPoint()->nNode;
bool bGoNxt = m_vSavePos.back().nNode < rPtIdx.GetIndex();
- while( nullptr != ( pFrame = ( bGoNxt ? pFrame->GetNextContentFrame() : pFrame->GetPrevContentFrame() ))
+ while( nullptr != ( pFrame = ( bGoNxt ? pFrame->FindNextCnt(true) : pFrame->FindPrevCnt() ))
&& 0 == pFrame->getFrameArea().Height() )
;
@@ -348,8 +348,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( pDoc->getIDocumentLayoutAccess().GetCurrentLayout() );
while ( pFrame && 0 == pFrame->getFrameArea().Height() )
{
- pFrame = bGoNxt ? pFrame->GetNextContentFrame()
- : pFrame->GetPrevContentFrame();
+ pFrame = bGoNxt ? pFrame->FindNextCnt(true) : pFrame->FindPrevCnt();
}
}
@@ -395,9 +394,16 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags )
if( !pFrame )
{
- DeleteMark();
- RestoreSavePos();
- return true; // we need a frame
+ assert(!m_vSavePos.empty());
+ SwContentNode const*const pSaveNode(rNds[m_vSavePos.back().nNode]->GetContentNode());
+ // if the old position already didn't have a frame, allow moving
+ // anyway, hope the caller can handle that
+ if (pSaveNode && pSaveNode->getLayoutFrame(pDoc->getIDocumentLayoutAccess().GetCurrentLayout()))
+ {
+ DeleteMark();
+ RestoreSavePos();
+ return true; // we need a frame
+ }
}
}
@@ -882,7 +888,7 @@ static bool lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd,
rPam.SetMark();
rPam.GetPoint()->nNode = rEndNd;
- pCNd = SwNodes::GoPrevious( &rPam.GetPoint()->nNode );
+ pCNd = SwNodes::GoPrevious(&rPam.GetPoint()->nNode, true);
if( !pCNd )
return false;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
@@ -902,7 +908,7 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd,
if( !bFirst )
{
rPam.GetPoint()->nNode = rSttNd;
- pCNd = SwNodes::GoPrevious( &rPam.GetPoint()->nNode );
+ pCNd = SwNodes::GoPrevious(&rPam.GetPoint()->nNode, true);
if( !pCNd )
return false;
pCNd->MakeEndIndex( &rPam.GetPoint()->nContent );
@@ -2526,4 +2532,18 @@ bool SwTableCursor::HasReadOnlyBoxSel() const
return bRet;
}
+bool SwTableCursor::HasHiddenBoxSel() const
+{
+ bool bRet = false;
+ for (size_t n = m_SelectedBoxes.size(); n; )
+ {
+ if (m_SelectedBoxes[--n]->GetFrameFormat()->IsHidden())
+ {
+ bRet = true;
+ break;
+ }
+ }
+ return bRet;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index ecebb3d000b6..8318cc5d5ba8 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -26,6 +26,7 @@
#include <IDocumentSettingAccess.hxx>
#include <UndoManager.hxx>
#include <docary.hxx>
+#include <pamtyp.hxx>
#include <textboxhelper.hxx>
#include <dcontact.hxx>
#include <grfatr.hxx>
@@ -286,6 +287,12 @@ namespace sw
::sw::mark::InsertMode::CopyText);
// Explicitly try to get exactly the same name as in the source
// because NavigatorReminders, DdeBookmarks etc. ignore the proposed name
+ if (pNewMark == nullptr)
+ {
+ assert(IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK
+ || IDocumentMarkAccess::GetType(*pMark) == IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK);
+ continue; // can't insert duplicate cross reference mark
+ }
pDestDoc->getIDocumentMarkAccess()->renameMark(pNewMark, pMark->GetName());
// copying additional attributes for bookmarks or fieldmarks
@@ -387,7 +394,8 @@ namespace
*pDelPam->GetPoint(), nDelCount );
}
- if (pDelPam->GetNext() && *pDelPam->GetNext()->End() == *pDelPam->Start())
+ if (pDelPam->GetNext() != pDelPam.get()
+ && *pDelPam->GetNext()->End() == *pDelPam->Start())
{
*pDelPam->GetNext()->End() = *pDelPam->End();
pDelPam.reset(pDelPam->GetNext());
@@ -617,8 +625,9 @@ namespace sw
namespace
{
- bool lcl_DoWithBreaks(::sw::DocumentContentOperationsManager & rDocumentContentOperations, SwPaM & rPam,
- bool (::sw::DocumentContentOperationsManager::*pFunc)(SwPaM&, bool), const bool bForceJoinNext = false)
+ bool lcl_DoWithBreaks(::sw::DocumentContentOperationsManager & rDocumentContentOperations,
+ SwPaM & rPam, SwDeleteFlags const flags,
+ bool (::sw::DocumentContentOperationsManager::*pFunc)(SwPaM&, SwDeleteFlags, bool), const bool bForceJoinNext = false)
{
std::vector<std::pair<sal_uLong, sal_Int32>> Breaks;
@@ -626,7 +635,7 @@ namespace
if (Breaks.empty())
{
- return (rDocumentContentOperations.*pFunc)(rPam, bForceJoinNext);
+ return (rDocumentContentOperations.*pFunc)(rPam, flags, bForceJoinNext);
}
// Deletion must be split into several parts if the text node
@@ -650,7 +659,7 @@ namespace
rStart = SwPosition(*rNodes[iter->first - nOffset]->GetTextNode(), iter->second + 1);
if (rStart < rEnd) // check if part is empty
{
- bRet &= (rDocumentContentOperations.*pFunc)(aPam, bForceJoinNext);
+ bRet &= (rDocumentContentOperations.*pFunc)(aPam, flags, bForceJoinNext);
nOffset = iter->first - rStart.nNode.GetIndex(); // deleted fly nodes...
}
rEnd = SwPosition(*rNodes[iter->first - nOffset]->GetTextNode(), iter->second);
@@ -660,7 +669,7 @@ namespace
rStart = *rPam.Start(); // set to original start
if (rStart < rEnd) // check if part is empty
{
- bRet &= (rDocumentContentOperations.*pFunc)(aPam, bForceJoinNext);
+ bRet &= (rDocumentContentOperations.*pFunc)(aPam, flags, bForceJoinNext);
}
return bRet;
@@ -935,8 +944,10 @@ namespace
for(SaveRedline & rSvRedLine : rArr)
{
rSvRedLine.SetPos( nInsPos );
- pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true );
- if (rSvRedLine.pRedl->GetType() == RedlineType::Delete)
+ IDocumentRedlineAccess::AppendResult const result(
+ pDoc->getIDocumentRedlineAccess().AppendRedline( rSvRedLine.pRedl, true ));
+ if ( IDocumentRedlineAccess::AppendResult::APPENDED == result &&
+ rSvRedLine.pRedl->GetType() == RedlineType::Delete )
{
UpdateFramesForAddDeleteRedline(*pDoc, *rSvRedLine.pRedl);
}
@@ -1962,6 +1973,18 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, cons
return bRet;
}
+static auto GetCorrPosition(SwPaM const& rPam) -> SwPosition
+{
+ // tdf#152710 target position must be on node that survives deletion
+ // so that PaMCorrAbs can invalidate SwUnoCursors properly
+ return rPam.GetPoint()->nNode.GetNode().IsContentNode()
+ ? *rPam.GetPoint()
+ : rPam.GetMark()->nNode.GetNode().IsContentNode()
+ ? *rPam.GetMark()
+ // this would be the result in SwNodes::RemoveNode()
+ : SwPosition(SwNodeIndex(rPam.End()->nNode.GetNode(), +1));
+}
+
/// Delete a full Section of the NodeArray.
/// The passed Node is located somewhere in the designated Section.
void DocumentContentOperationsManager::DeleteSection( SwNode *pNode )
@@ -1979,8 +2002,9 @@ void DocumentContentOperationsManager::DeleteSection( SwNode *pNode )
{
// move all Cursor/StackCursor/UnoCursor out of the to-be-deleted area
- SwNodeIndex aMvStt( aSttIdx, 1 );
- SwDoc::CorrAbs( aMvStt, aEndIdx, SwPosition( aSttIdx ), true );
+ SwPaM const range(aSttIdx, aEndIdx);
+ SwPosition const pos(GetCorrPosition(range));
+ ::PaMCorrAbs(range, pos);
}
m_rDoc.GetNodes().DelNodes( aSttIdx, aEndIdx.GetIndex() - aSttIdx.GetIndex() + 1 );
@@ -1994,7 +2018,7 @@ void DocumentContentOperationsManager::DeleteDummyChar(
assert(aPam.GetText().getLength() == 1 && aPam.GetText()[0] == cDummy);
(void) cDummy;
- DeleteRangeImpl(aPam);
+ DeleteRangeImpl(aPam, SwDeleteFlags::Default);
if (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
&& !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
@@ -2005,12 +2029,7 @@ void DocumentContentOperationsManager::DeleteDummyChar(
void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam )
{
- lcl_DoWithBreaks( *this, rPam, &DocumentContentOperationsManager::DeleteRangeImpl );
-
- if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
- {
- rPam.Normalize(false); // tdf#127635 put point at the end of deletion
- }
+ lcl_DoWithBreaks(*this, rPam, SwDeleteFlags::Default, &DocumentContentOperationsManager::DeleteRangeImpl);
if (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
&& !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
@@ -2113,7 +2132,7 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
::PaMCorrAbs( aDelPam, aTmpPos );
}
- std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete( aDelPam, true ));
+ std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete(aDelPam, SwDeleteFlags::Default, true));
*rPam.GetPoint() = *aDelPam.GetPoint();
pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
@@ -2136,6 +2155,37 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
return false;
}
}
+
+ // must delete all fieldmarks before CorrAbs(), or they'll remain
+ // moved to wrong node without their CH_TXT_ATR_FIELD*
+ // (note: deleteMarks() doesn't help here, in case of partially
+ // selected fieldmarks; let's delete these as re-inserting their chars
+ // elsewhere looks difficult)
+ ::std::set<::sw::mark::IFieldmark*> fieldmarks;
+ for (SwNodeIndex i = aRg.aStart; i <= aRg.aEnd; ++i)
+ {
+ if (SwTextNode *const pTextNode = i.GetNode().GetTextNode())
+ {
+ for (sal_Int32 j = 0; j < pTextNode->GetText().getLength(); ++j)
+ {
+ switch (pTextNode->GetText()[j])
+ {
+ case CH_TXT_ATR_FIELDSTART:
+ case CH_TXT_ATR_FIELDEND:
+ fieldmarks.insert(m_rDoc.getIDocumentMarkAccess()->getFieldmarkAt(SwPosition(*pTextNode, j)));
+ break;
+ case CH_TXT_ATR_FIELDSEP:
+ fieldmarks.insert(m_rDoc.getIDocumentMarkAccess()->getFieldmarkFor(SwPosition(*pTextNode, j)));
+ break;
+ }
+ }
+ }
+ }
+ for (auto const pFieldMark : fieldmarks)
+ {
+ m_rDoc.getIDocumentMarkAccess()->deleteMark(pFieldMark);
+ }
+
// move bookmarks, redlines etc.
if (aRg.aStart == aRg.aEnd) // only first CorrAbs variant handles this
{
@@ -2177,22 +2227,17 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam )
}
// #i100466# Add handling of new optional parameter <bForceJoinNext>
-bool DocumentContentOperationsManager::DeleteAndJoin( SwPaM & rPam,
+bool DocumentContentOperationsManager::DeleteAndJoin(SwPaM & rPam, SwDeleteFlags const flags,
const bool bForceJoinNext )
{
if ( lcl_StrLenOverflow( rPam ) )
return false;
- bool const ret = lcl_DoWithBreaks( *this, rPam, (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
+ bool const ret = lcl_DoWithBreaks( *this, rPam, flags, (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
? &DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl
: &DocumentContentOperationsManager::DeleteAndJoinImpl,
bForceJoinNext );
- if (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
- {
- rPam.Normalize(false); // tdf#127635 put point at the end of deletion
- }
-
return ret;
}
@@ -3321,8 +3366,8 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString
if (rStart < rEnd) // check if part is empty
{
bRet &= (m_rDoc.getIDocumentRedlineAccess().IsRedlineOn())
- ? DeleteAndJoinWithRedlineImpl(aPam)
- : DeleteAndJoinImpl(aPam, false);
+ ? DeleteAndJoinWithRedlineImpl(aPam, SwDeleteFlags::Default)
+ : DeleteAndJoinImpl(aPam, SwDeleteFlags::Default, false);
nOffset = iter->first - rStart.nNode.GetIndex(); // deleted fly nodes...
}
rEnd = SwPosition(*rNodes[iter->first - nOffset]->GetTextNode(), iter->second);
@@ -3457,21 +3502,28 @@ void DocumentContentOperationsManager::CopyWithFlyInFly(
aRedlRest.Restore();
if (bMakeNewFrames) // tdf#130685 only after aRedlRest
{ // recreate from previous node (could be merged now)
- if (SwTextNode *const pNode = aSavePos.GetNode().GetTextNode())
+ std::unordered_set<SwTextFrame*> frames;
+ SwTextNode * pNode = aSavePos.GetNode().GetTextNode();
+ SwTextNode *const pEndNode = rInsPos.GetNode().GetTextNode();
+ if (pEndNode)
{
- std::unordered_set<SwTextFrame*> frames;
- SwTextNode *const pEndNode = rInsPos.GetNode().GetTextNode();
- if (pEndNode)
+ SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pEndNode);
+ for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next())
{
- SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pEndNode);
- for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next())
+ if (pFrame->getRootFrame()->IsHideRedlines())
{
- if (pFrame->getRootFrame()->IsHideRedlines())
+ frames.insert(pFrame);
+ // tdf#135061 check if end node is merged to a preceding node
+ if (pNode == nullptr && pFrame->GetMergedPara()
+ && pFrame->GetMergedPara()->pFirstNode->GetIndex() < aSavePos.GetIndex())
{
- frames.insert(pFrame);
+ pNode = pFrame->GetMergedPara()->pFirstNode;
}
}
}
+ }
+ if (pNode != nullptr)
+ {
sw::RecreateStartTextFrames(*pNode);
if (!frames.empty())
{ // tdf#132187 check if the end node needs new frames
@@ -3883,7 +3935,7 @@ DocumentContentOperationsManager::~DocumentContentOperationsManager()
}
//Private methods
-bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPam, const bool )
+bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl(SwPaM & rPam, SwDeleteFlags const flags, const bool)
{
assert(m_rDoc.getIDocumentRedlineAccess().IsRedlineOn());
@@ -3963,7 +4015,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
{
assert(pRedline->HasValidRange());
undos.emplace_back(std::make_unique<SwUndoRedlineDelete>(
- *pRedline, SwUndoId::DELETE));
+ *pRedline, SwUndoId::DELETE, flags));
}
const SwRewriter aRewriter = undos.front()->GetRewriter();
// can only group a single undo action
@@ -4024,7 +4076,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinWithRedlineImpl( SwPaM & rPa
return true;
}
-bool DocumentContentOperationsManager::DeleteAndJoinImpl( SwPaM & rPam,
+bool DocumentContentOperationsManager::DeleteAndJoinImpl(SwPaM & rPam, SwDeleteFlags const flags,
const bool bForceJoinNext )
{
bool bJoinText, bJoinPrev;
@@ -4036,7 +4088,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinImpl( SwPaM & rPam,
}
{
- bool const bSuccess( DeleteRangeImpl( rPam ) );
+ bool const bSuccess( DeleteRangeImpl(rPam, flags) );
if (!bSuccess)
return false;
}
@@ -4055,14 +4107,17 @@ bool DocumentContentOperationsManager::DeleteAndJoinImpl( SwPaM & rPam,
return true;
}
-bool DocumentContentOperationsManager::DeleteRangeImpl(SwPaM & rPam, const bool)
+bool DocumentContentOperationsManager::DeleteRangeImpl(SwPaM & rPam, SwDeleteFlags const flags, const bool)
{
// Move all cursors out of the deleted range, but first copy the
// passed PaM, because it could be a cursor that would be moved!
SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
- ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() );
+ {
+ SwPosition const pos(GetCorrPosition(aDelPam));
+ ::PaMCorrAbs(aDelPam, pos);
+ }
- bool const bSuccess( DeleteRangeImplImpl( aDelPam ) );
+ bool const bSuccess( DeleteRangeImplImpl(aDelPam, flags) );
if (bSuccess)
{ // now copy position from temp copy to given PaM
*rPam.GetPoint() = *aDelPam.GetPoint();
@@ -4071,7 +4126,7 @@ bool DocumentContentOperationsManager::DeleteRangeImpl(SwPaM & rPam, const bool)
return bSuccess;
}
-bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
+bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDeleteFlags const flags)
{
SwPosition *pStt = rPam.Start(), *pEnd = rPam.End();
@@ -4136,7 +4191,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
}
if (!bMerged)
{
- m_rDoc.GetIDocumentUndoRedo().AppendUndo( std::make_unique<SwUndoDelete>( rPam ) );
+ m_rDoc.GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoDelete>(rPam, flags));
}
m_rDoc.getIDocumentState().SetModified();
@@ -4148,14 +4203,18 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
m_rDoc.getIDocumentRedlineAccess().DeleteRedline( rPam, true, RedlineType::Any );
// Delete and move all "Flys at the paragraph", which are within the Selection
- DelFlyInRange(rPam.GetMark()->nNode, rPam.GetPoint()->nNode,
- &rPam.GetMark()->nContent, &rPam.GetPoint()->nContent);
+ if (!(flags & SwDeleteFlags::ArtificialSelection))
+ {
+ DelFlyInRange(rPam.GetMark()->nNode, rPam.GetPoint()->nNode,
+ &rPam.GetMark()->nContent, &rPam.GetPoint()->nContent);
+ }
DelBookmarks(
pStt->nNode,
pEnd->nNode,
nullptr,
&pStt->nContent,
- &pEnd->nContent);
+ &pEnd->nContent,
+ bool(flags & SwDeleteFlags::ArtificialSelection));
SwNodeIndex aSttIdx( pStt->nNode );
SwContentNode * pCNd = aSttIdx.GetNode().GetContentNode();
@@ -4271,7 +4330,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam)
bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUString& rStr,
const bool bRegExReplace )
{
- if( !rPam.HasMark() || *rPam.GetPoint() == *rPam.GetMark() )
+ if (!rPam.HasMark())
return false;
bool bJoinText, bJoinPrev;
@@ -4386,12 +4445,26 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
InsertItemSet( aTmpRange, aSet );
}
+ // tdf#139982: Appending the redline may immediately delete flys
+ // anchored in the previous text if it's inside an insert redline.
+ // Also flys will be deleted if the redline is accepted. Move them
+ // to the position between the previous text and the new text,
+ // there the chance of surviving both accept and reject is best.
+ SaveFlyArr flys;
+ SaveFlyInRange(aDelPam, *aDelPam.End(), flys, false);
+
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
{
m_rDoc.GetIDocumentUndoRedo().AppendUndo(
std::make_unique<SwUndoRedlineDelete>( aDelPam, SwUndoId::REPLACE ));
}
+ // add redline similar to DeleteAndJoinWithRedlineImpl()
+ std::shared_ptr<SwUnoCursor> const pCursor(m_rDoc.CreateUnoCursor(*aDelPam.GetMark()));
+ pCursor->SetMark();
+ *pCursor->GetPoint() = *aDelPam.GetPoint();
m_rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Delete, aDelPam ), true);
+ RestFlyInRange(flys, *aDelPam.End(), &aDelPam.End()->nNode, true);
+ sw::UpdateFramesForAddDeleteRedline(m_rDoc, *pCursor);
*rPam.GetMark() = *aDelPam.GetMark();
if (m_rDoc.GetIDocumentUndoRedo().DoesUndo())
@@ -4414,8 +4487,8 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags( eOld );
*rPam.GetPoint() = pBkmk->GetMarkPos();
- if(pBkmk->IsExpanded())
- *rPam.GetMark() = pBkmk->GetOtherMarkPos();
+ *rPam.GetMark() = pBkmk->IsExpanded() ? pBkmk->GetOtherMarkPos() : pBkmk->GetMarkPos();
+
m_rDoc.getIDocumentMarkAccess()->deleteMark(pBkmk);
}
bJoinText = false;
@@ -4712,26 +4785,25 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// Move the PaM one node back from the insert position, so that
// the position doesn't get moved
pCopyPam->SetMark();
- bool bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent);
- // If the position was shifted from more than one node, an end node has been skipped
- bool bAfterTable = false;
- if ((rPos.nNode.GetIndex() - pCopyPam->GetPoint()->nNode.GetIndex()) > 1)
+ bool bCanMoveBack = false;
+ // First check if it will be able to move *to* first copied node.
+ // Note this doesn't just check IsStartNode() because SwDoc::AppendDoc()
+ // intentionally sets it to the body start node, perhaps it should just
+ // call SplitNode instead?
+ if (!pStt->nNode.GetNode().IsSectionNode() && !pStt->nNode.GetNode().IsTableNode())
{
- // First go back to the original place
- pCopyPam->GetPoint()->nNode = rPos.nNode;
- pCopyPam->GetPoint()->nContent = rPos.nContent;
-
- bCanMoveBack = false;
- bAfterTable = true;
+ bCanMoveBack = pCopyPam->Move(fnMoveBackward, GoInContent);
}
if( !bCanMoveBack )
{
pCopyPam->GetPoint()->nNode--;
+ pCopyPam->GetPoint()->nContent.Assign(pCopyPam->GetPoint()->nNode.GetNode().GetContentNode(), 0);
assert(pCopyPam->GetPoint()->nContent.GetIndex() == 0);
}
SwNodeRange aRg( pStt->nNode, pEnd->nNode );
SwNodeIndex aInsPos( rPos.nNode );
+ ::std::optional<SwIndex> oInsContentIndex;
const bool bOneNode = pStt->nNode == pEnd->nNode;
SwTextNode* pSttTextNd = pStt->nNode.GetNode().GetTextNode();
SwTextNode* pEndTextNd = pEnd->nNode.GetNode().GetTextNode();
@@ -4881,8 +4953,8 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// We have to set the correct PaM for Undo, if this PaM starts in a textnode,
// the undo operation will try to merge this node after removing the table.
// If we didn't split a textnode, the PaM should start at the inserted table node
- if( rPos.nContent.GetIndex() == pDestTextNd->Len() )
- { // Insertion at the last position of a textnode (empty or not)
+ if (pDestTextNd->Len() && rPos.nContent.GetIndex() == pDestTextNd->Len())
+ { // Insertion at the last position of a textnode
++aInsPos; // The table will be inserted behind the text node
}
else if( rPos.nContent.GetIndex() )
@@ -4916,27 +4988,18 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
aRg.aEnd--;
}
}
- else if( bCanMoveBack )
- { // Insertion at the first position of a text node. It will not be split, the table
- // will be inserted before the text node.
- // See below, before the SetInsertRange function of the undo object will be called,
- // the CpyPam would be moved to the next content position. This has to be avoided
- // We want to be moved to the table node itself thus we have to set bCanMoveBack
- // and to manipulate pCopyPam.
- bCanMoveBack = false;
- pCopyPam->GetPoint()->nNode--;
- }
+ assert(!bCanMoveBack);
}
pDestTextNd = aInsPos.GetNode().GetTextNode();
if (pEndTextNd)
{
- SwIndex aDestIdx( rPos.nContent );
+ oInsContentIndex.emplace(rPos.nContent);
if( !pDestTextNd )
{
pDestTextNd = pDoc->GetNodes().MakeTextNode( aInsPos,
pDoc->getIDocumentStylePoolAccess().GetTextCollFromPool(RES_POOLCOLL_STANDARD));
- aDestIdx.Assign( pDestTextNd, 0 );
+ oInsContentIndex->Assign(pDestTextNd, 0);
aInsPos--;
// if we have to insert an extra text node
@@ -4954,7 +5017,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
PUSH_NUMRULE_STATE
}
- pEndTextNd->CopyText( pDestTextNd, aDestIdx, SwIndex( pEndTextNd ),
+ pEndTextNd->CopyText(pDestTextNd, *oInsContentIndex, SwIndex(pEndTextNd),
pEnd->nContent.GetIndex() );
// Also copy all format templates
@@ -5008,21 +5071,30 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
bCopyBookmarks = false;
}
+ // init *again* - because CopyWithFlyInFly moved startPos
+ SwPosition startPos(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1),
+ SwIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1).GetNode().GetContentNode()));
// at-char anchors post SplitNode are on index 0 of 2nd node and will
// remain there - move them back to the start (end would also work?)
// ... also for at-para anchors; here start is preferable because
// it's consistent with SplitNode from SwUndoInserts::RedoImpl()
- if (pFlysAtInsPos)
+ if (pFlysAtInsPos
+ && (bCanMoveBack
+ || startPos.nNode.GetNode().IsTextNode()
+ || (pCopyPam->GetPoint()->nNode.GetNode().IsStartNode()
+ && startPos.nNode.GetNode().IsSectionNode()))) // not into table
{
- // init *again* - because CopyWithFlyInFly moved startPos
- SwPosition startPos(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1),
- SwIndex(SwNodeIndex(pCopyPam->GetPoint()->nNode, +1).GetNode().GetContentNode()));
if (bCanMoveBack)
{ // pCopyPam is actually 1 before the copy range so move it fwd
SwPaM temp(*pCopyPam->GetPoint());
temp.Move(fnMoveForward, GoInContent);
startPos = *temp.GetPoint();
}
+ else if (startPos.nNode.GetNode().IsSectionNode())
+ { // probably on top-level start node, so no CheckNodesRange here;
+ GoNextNds(&startPos.nNode, false); // SwFEShell::Paste() deletes node
+ startPos.nContent.Assign(startPos.nNode.GetNode().GetContentNode(), 0);
+ }
assert(startPos.nNode.GetNode().IsContentNode());
SwPosition startPosAtPara(startPos);
startPosAtPara.nContent.Assign(nullptr, 0);
@@ -5083,27 +5155,32 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
}
else // incremented in (!pSttTextNd && pDestTextNd) above
{
- pCopyPam->GetMark()->nContent.Assign(pCopyPam->GetContentNode(false), 0);
+ // assign also content index in this case, see testSectionAnchorCopyTableAtStart
+ assert(oInsContentIndex);
+ assert(oInsContentIndex->GetIdxReg() == aInsPos.GetNode().GetContentNode());
+ pCopyPam->GetMark()->nContent = (*oInsContentIndex);
}
rPos = *pCopyPam->GetMark();
}
else
*pCopyPam->GetMark() = rPos;
- if ( !bAfterTable )
- pCopyPam->Move( fnMoveForward, bCanMoveBack ? GoInContent : GoInNode );
+ if (bCanMoveBack)
+ {
+ pCopyPam->Move(fnMoveForward, GoInContent);
+ }
else
{
pCopyPam->GetPoint()->nNode++;
// Reset the offset to 0 as it was before the insertion
pCopyPam->GetPoint()->nContent.Assign(pCopyPam->GetPoint()->nNode.GetNode().GetContentNode(), 0);
- // If the next node is a start node, then step back: the start node
- // has been copied and needs to be in the selection for the undo
+ // If the next node is a start node, then step back: SetInsertRange()
+ // will add 1 in this case, but that is too much...
if (pCopyPam->GetPoint()->nNode.GetNode().IsStartNode())
pCopyPam->GetPoint()->nNode--;
-
}
+ oInsContentIndex.reset();
pCopyPam->Exchange();
// Also copy all bookmarks
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index 8ae32f266bdb..718492ab3f79 100644
--- a/sw/source/core/doc/DocumentRedlineManager.cxx
+++ b/sw/source/core/doc/DocumentRedlineManager.cxx
@@ -283,6 +283,12 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
break;
}
+ // no nodes can be unmerged by this - skip MakeFrames() etc.
+ if (rPam.GetPoint()->nNode == rPam.GetMark()->nNode)
+ {
+ break; // continue with AppendAllObjs()
+ }
+
// first, call CheckParaRedlineMerge on the first paragraph,
// to init flag on new merge range (if any) + 1st node post the merge
auto eMode(sw::FrameMode::Existing);
@@ -2319,7 +2325,7 @@ bool DocumentRedlineManager::SplitRedline( const SwPaM& rRange )
SwRedlineTable::size_type n = 0;
const SwPosition* pStt = rRange.Start();
const SwPosition* pEnd = rRange.End();
- GetRedline( *pStt, &n );
+ //FIXME overlapping problem GetRedline( *pStt, &n );
for ( ; n < mpRedlineTable->size(); ++n)
{
SwRangeRedline * pRedline = (*mpRedlineTable)[ n ];
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 6ada848882ac..19d70d112e8b 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -561,11 +561,6 @@ namespace sw { namespace mark
pPos2->nContent.GetIndex());
}
#endif
- // see for example _SaveContentIdx, Shells
- OSL_PRECOND(m_vAllMarks.size() < USHRT_MAX,
- "MarkManager::makeMark(..)"
- " - more than USHRT_MAX marks are not supported correctly");
-
if ( (!rPaM.GetPoint()->nNode.GetNode().IsTextNode()
&& (eType != MarkType::UNO_BOOKMARK
// SwXTextRange can be on table node or plain start node (FLY_AT_FLY)
@@ -968,6 +963,7 @@ namespace sw { namespace mark
static bool isDeleteMark(
::sw::mark::MarkBase const*const pMark,
+ bool const isReplace,
SwNodeIndex const& rStt,
SwNodeIndex const& rEnd,
SwIndex const*const pSttIdx,
@@ -991,6 +987,8 @@ namespace sw { namespace mark
&& lcl_Lower(pMark->GetOtherMarkPos(), rEnd, pEndIdx);
// special case: completely in range, touching the end?
if ( pEndIdx != nullptr
+ && !(isReplace && IDocumentMarkAccess::GetType(*pMark)
+ == IDocumentMarkAccess::MarkType::BOOKMARK)
&& ( ( rbIsOtherPosInRange
&& pMark->GetMarkPos().nNode == rEnd
&& pMark->GetMarkPos().nContent == *pEndIdx )
@@ -1036,7 +1034,7 @@ namespace sw { namespace mark
return false;
}
- bool MarkManager::isBookmarkDeleted(SwPaM const& rPaM) const
+ bool MarkManager::isBookmarkDeleted(SwPaM const& rPaM, bool const isReplace) const
{
SwPosition const& rStart(*rPaM.Start());
SwPosition const& rEnd(*rPaM.End());
@@ -1051,7 +1049,7 @@ namespace sw { namespace mark
bool bIsPosInRange(false);
bool bIsOtherPosInRange(false);
- bool const bDeleteMark = isDeleteMark(pMark,
+ bool const bDeleteMark = isDeleteMark(pMark, isReplace,
rStart.nNode, rEnd.nNode, &rStart.nContent, &rEnd.nContent,
bIsPosInRange, bIsOtherPosInRange);
if (bDeleteMark
@@ -1068,7 +1066,8 @@ namespace sw { namespace mark
const SwNodeIndex& rEnd,
std::vector<SaveBookmark>* pSaveBkmk,
const SwIndex* pSttIdx,
- const SwIndex* pEndIdx )
+ const SwIndex* pEndIdx,
+ bool const isReplace)
{
std::vector<const_iterator_t> vMarksToDelete;
bool bIsSortingNeeded = false;
@@ -1091,7 +1090,7 @@ namespace sw { namespace mark
bool bIsPosInRange(false);
bool bIsOtherPosInRange(false);
- bool const bDeleteMark = isDeleteMark(pMark, rStt, rEnd, pSttIdx, pEndIdx, bIsPosInRange, bIsOtherPosInRange);
+ bool const bDeleteMark = isDeleteMark(pMark, isReplace, rStt, rEnd, pSttIdx, pEndIdx, bIsPosInRange, bIsOtherPosInRange);
if ( bIsPosInRange
&& ( bIsOtherPosInRange
@@ -1183,7 +1182,7 @@ namespace sw { namespace mark
pppMark != vMarksToDelete.rend();
++pppMark )
{
- vDelay.push_back(deleteMark(*pppMark));
+ vDelay.push_back(deleteMark(*pppMark, pSaveBkmk != nullptr));
}
} // scope to kill vDelay
@@ -1202,8 +1201,9 @@ namespace sw { namespace mark
{
std::unique_ptr<Fieldmark> m_pFieldmark;
SwDoc * m_pDoc;
- LazyFieldmarkDeleter(Fieldmark* pMark, SwDoc *const pDoc)
- : m_pFieldmark(pMark), m_pDoc(pDoc)
+ bool const m_isMoveNodes;
+ LazyFieldmarkDeleter(Fieldmark* pMark, SwDoc *const pDoc, bool const isMoveNodes)
+ : m_pFieldmark(pMark), m_pDoc(pDoc), m_isMoveNodes(isMoveNodes)
{
assert(m_pFieldmark);
}
@@ -1213,12 +1213,15 @@ namespace sw { namespace mark
// command *cannot* be deleted here as it would create a separate
// SwUndoDelete that's interleaved with the SwHistory of the outer
// one - only delete the CH_TXT_ATR_FIELD*!
- m_pFieldmark->ReleaseDoc(m_pDoc);
+ if (!m_isMoveNodes)
+ {
+ m_pFieldmark->ReleaseDoc(m_pDoc);
+ }
}
};
std::unique_ptr<IDocumentMarkAccess::ILazyDeleter>
- MarkManager::deleteMark(const const_iterator_t& ppMark)
+ MarkManager::deleteMark(const const_iterator_t& ppMark, bool const isMoveNodes)
{
std::unique_ptr<ILazyDeleter> ret;
if (ppMark.get() == m_vAllMarks.end())
@@ -1256,7 +1259,7 @@ namespace sw { namespace mark
ClearFieldActivation();
m_vFieldmarks.erase(ppFieldmark);
- ret.reset(new LazyFieldmarkDeleter(dynamic_cast<Fieldmark*>(pMark), m_pDoc));
+ ret.reset(new LazyFieldmarkDeleter(dynamic_cast<Fieldmark*>(pMark), m_pDoc, isMoveNodes));
}
else
{
@@ -1313,7 +1316,7 @@ namespace sw { namespace mark
for ( ; it != endIt; ++it)
if (*it == pMark)
{
- deleteMark(iterator(it));
+ deleteMark(iterator(it), false);
break;
}
}
@@ -1412,7 +1415,7 @@ namespace sw { namespace mark
if (!pFieldmark)
return;
- deleteMark(lcl_FindMark(m_vAllMarks, pFieldmark));
+ deleteMark(lcl_FindMark(m_vAllMarks, pFieldmark), false);
}
::sw::mark::IFieldmark* MarkManager::changeFormFieldmarkType(::sw::mark::IFieldmark* pFieldmark, const OUString& rNewType)
@@ -1775,7 +1778,7 @@ void SaveBookmark::SetInDoc(
{
::sw::mark::IBookmark* const pBookmark = dynamic_cast<::sw::mark::IBookmark*>(
pDoc->getIDocumentMarkAccess()->makeMark(aPam, m_aName,
- m_eOrigBkmType, sw::mark::InsertMode::New));
+ m_eOrigBkmType, sw::mark::InsertMode::CopyText));
if(pBookmark)
{
pBookmark->SetKeyCode(m_aCode);
@@ -1804,7 +1807,8 @@ void DelBookmarks(
const SwNodeIndex& rEnd,
std::vector<SaveBookmark> * pSaveBkmk,
const SwIndex* pSttIdx,
- const SwIndex* pEndIdx)
+ const SwIndex* pEndIdx,
+ bool const isReplace)
{
// illegal range ??
if(rStt.GetIndex() > rEnd.GetIndex()
@@ -1812,7 +1816,7 @@ void DelBookmarks(
return;
SwDoc* const pDoc = rStt.GetNode().GetDoc();
- pDoc->getIDocumentMarkAccess()->deleteMarks(rStt, rEnd, pSaveBkmk, pSttIdx, pEndIdx);
+ pDoc->getIDocumentMarkAccess()->deleteMarks(rStt, rEnd, pSaveBkmk, pSttIdx, pEndIdx, isReplace);
// Copy all Redlines which are in the move area into an array
// which holds all position information as offset.
diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx
index 8e2769b353e5..a2564119ce06 100644
--- a/sw/source/core/doc/doccorr.cxx
+++ b/sw/source/core/doc/doccorr.cxx
@@ -33,11 +33,14 @@ namespace
/// returns NULL if no restrictions apply
const SwStartNode* lcl_FindUnoCursorSection( const SwNode& rNode )
{
- const SwStartNode* pStartNode = rNode.StartOfSectionNode();
+ const SwStartNode* pStartNode = rNode.IsStartNode() ? rNode.GetStartNode() : rNode.StartOfSectionNode();
while( ( pStartNode != nullptr ) &&
( pStartNode->StartOfSectionNode() != pStartNode ) &&
- ( pStartNode->GetStartNodeType() == SwNormalStartNode ) )
+ // section node is only start node allowing overlapped delete
+ pStartNode->IsSectionNode() )
+ {
pStartNode = pStartNode->StartOfSectionNode();
+ }
return pStartNode;
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 1b93a7a56a78..6587cb0e06a2 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -28,6 +28,7 @@
#include <mdiexp.hxx>
#include <mvsave.hxx>
#include <redline.hxx>
+#include <rolbck.hxx>
#include <rootfrm.hxx>
#include <splargs.hxx>
#include <swcrsr.hxx>
@@ -48,7 +49,7 @@ using namespace ::com::sun::star::i18n;
void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos,
- const SwNodeIndex* pInsertPos )
+ const SwNodeIndex* pInsertPos, bool const isForceToStartPos)
{
SwPosition aPos(rStartPos);
for(const SaveFly & rSave : rArr)
@@ -57,7 +58,7 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos,
SwFrameFormat* pFormat = rSave.pFrameFormat;
SwFormatAnchor aAnchor( pFormat->GetAnchor() );
- if (rSave.isAtInsertNode)
+ if (rSave.isAtInsertNode || isForceToStartPos)
{
if( pInsertPos != nullptr )
{
@@ -130,7 +131,7 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr )
}
void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
- SaveFlyArr& rArr, bool bMoveAllFlys )
+ SaveFlyArr& rArr, bool bMoveAllFlys, SwHistory *const pHistory)
{
SwFrameFormats& rFormats = *rPam.GetPoint()->nNode.GetNode().GetDoc()->GetSpzFrameFormats();
SwFrameFormat* pFormat;
@@ -176,6 +177,10 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
|| (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()
&& (bInsPos = (rInsPos == *pAPos))))
{
+ if (pHistory)
+ {
+ pHistory->AddChangeFlyAnchor(*pFormat);
+ }
SaveFly aSave( pAPos->nNode.GetIndex() - rSttNdIdx.GetIndex(),
(RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())
? (pAPos->nNode == rSttNdIdx)
@@ -557,7 +562,7 @@ uno::Any SwDoc::Spell( SwPaM& rPaM,
{
nCurrNd = pNd->EndOfSectionIndex();
}
- else if( !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() )
+ else if( !pContentFrame->IsHiddenNow() )
{
if( pPageCnt && *pPageCnt && pPageSt )
{
@@ -778,7 +783,7 @@ static bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs )
// sw_redlinehide: this will be called once per node for merged nodes;
// the fully deleted ones won't have frames so are skipped.
SwContentFrame* pContentFrame = pNode->getLayoutFrame( pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout() );
- if( pContentFrame && !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() )
+ if( pContentFrame && !pContentFrame->IsHiddenNow() )
{
sal_uInt16 *pPageSt = pHyphArgs->GetPageSt();
sal_uInt16 *pPageCnt = pHyphArgs->GetPageCnt();
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index f7a11676594e..e61d27c6a961 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1328,9 +1328,18 @@ void SwDoc::CopyFormatArr( const SwFormatsBase& rSourceArr,
//FEATURE::CONDCOLL
if( RES_CONDTXTFMTCOLL == pSrc->Which() )
+ {
+ if (pDstColl->Which() != RES_CONDTXTFMTCOLL)
+ {
+ // Target already had a style with a matching name, but it's not a conditional
+ // style, then don't copy the conditions.
+ continue;
+ }
+
// Copy the conditions, but delete the old ones first!
static_cast<SwConditionTextFormatColl*>(pDstColl)->SetConditions(
static_cast<SwConditionTextFormatColl*>(pSrc)->GetCondColls() );
+ }
//FEATURE::CONDCOLL
}
}
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index ec4861fe39b2..5b3dc0ef3687 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -157,13 +157,12 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos,
pFrameFormat = getIDocumentStylePoolAccess().GetFrameFormatFromPool( RES_POOLFRM_FRAME );
OUString sName;
- if( !mbInReading )
- switch( rNode.GetNodeType() )
- {
+ switch( rNode.GetNodeType() )
+ {
case SwNodeType::Grf: sName = GetUniqueGrfName(); break;
case SwNodeType::Ole: sName = GetUniqueOLEName(); break;
default: sName = GetUniqueFrameName(); break;
- }
+ }
SwFlyFrameFormat* pFormat = MakeFlyFrameFormat( sName, pFrameFormat );
// Create content and connect to the format.
@@ -1408,6 +1407,10 @@ const SwFlyFrameFormat* SwDoc::FindFlyByName( const OUString& rName, SwNodeType
void SwDoc::SetFlyName( SwFlyFrameFormat& rFormat, const OUString& rName )
{
+ if (rFormat.GetName() == rName)
+ {
+ return;
+ }
OUString sName( rName );
if( sName.isEmpty() || FindFlyByName( sName ) )
{
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 984f2335bc45..6b041fa96c51 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -1054,19 +1054,19 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
{
SwNodeIndex aBreakIdx( GetNodes().GetEndOfContent(), -1 );
SwPosition aBreakPos( aBreakIdx );
- // InsertPageBreak just works on SwTextNode nodes, so make
- // sure the last node is one!
- bool bIsTextNode = aBreakIdx.GetNode().IsTextNode();
- if ( !bIsTextNode )
- getIDocumentContentOperations().AppendTextNode( aBreakPos );
- const OUString name = pTargetPageDesc->GetName();
- pTargetShell->InsertPageBreak( &name, nStartPageNumber );
- if ( !bIsTextNode )
- {
- pTargetShell->SttEndDoc( false );
- --aBreakIdx;
- GetNodes().Delete( aBreakIdx );
- }
+ // insert new node - will be removed at the end...
+ // (don't SplitNode() as it may move flys to the wrong node)
+ getIDocumentContentOperations().AppendTextNode(aBreakPos);
+ SwFormatPageDesc pageDesc(pTargetPageDesc);
+ pageDesc.SetNumOffset(nStartPageNumber);
+ // set break on the last paragraph
+ getIDocumentContentOperations().InsertPoolItem(SwPaM(aBreakPos),
+ pageDesc, SetAttrMode::DEFAULT, pTargetShell->GetLayout());
+ // tdf#148309 move to the last node - so that the "flush page break"
+ // code below will format the frame of the node with the page break,
+ // which is required for new page frames to be created! Else layout
+ // performance will be terrible.
+ pTargetShell->SttEndDoc(false);
// There is now a new empty text node on the new page. If it has
// any marks, those are from the previous page: move them back
@@ -1097,6 +1097,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu
if ( !bDeletePrevious )
{
SAL_INFO( "sw.pageframe", "(Flush pagebreak AKA EndAllAction" );
+ assert(pTargetShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetSwAttrSet().HasItem(RES_PAGEDESC));
pTargetShell->EndAllAction();
SAL_INFO( "sw.pageframe", "Flush changes AKA EndAllAction)" );
pTargetShell->StartAllAction();
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index ea57aa58319d..40d1bb607c1e 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -90,7 +90,8 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape)
xPropertySet->setPropertyValue(UNO_NAME_SURROUND, uno::makeAny(text::WrapTextMode_THROUGH));
uno::Reference<container::XNamed> xNamed(xTextFrame, uno::UNO_QUERY);
- xNamed->setName(pShape->GetDoc()->GetUniqueFrameName());
+ assert(!xNamed->getName().isEmpty());
+ (void)xNamed;
// Link its text range to the original shape.
uno::Reference<text::XTextRange> xTextBox(xTextFrame, uno::UNO_QUERY_THROW);
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index 8c2efee0eb7e..ce0f6cf8d4eb 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -535,7 +535,7 @@ void SwDoc::DelSectionFormat( SwSectionFormat *pFormat, bool bDelNodes )
{
SwNodeIndex aUpdIdx( *pIdx );
SwPaM aPaM( *pSectNd->EndOfSectionNode(), *pSectNd );
- GetIDocumentUndoRedo().AppendUndo( std::make_unique<SwUndoDelete>( aPaM ));
+ GetIDocumentUndoRedo().AppendUndo(std::make_unique<SwUndoDelete>(aPaM, SwDeleteFlags::Default));
if( pFootnoteEndAtTextEnd )
GetFootnoteIdxs().UpdateFootnote( aUpdIdx );
getIDocumentState().SetModified();
@@ -1013,9 +1013,9 @@ SwSectionNode::~SwSectionNode()
}
}
-SwFrame *SwSectionNode::MakeFrame( SwFrame *pSib )
+SwFrame* SwSectionNode::MakeFrame(SwFrame* pSib, bool bHidden)
{
- m_pSection->m_Data.SetHiddenFlag(false);
+ m_pSection->m_Data.SetHiddenFlag(bHidden);
return new SwSectionFrame( *m_pSection, pSib );
}
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 15a49729ce51..71874cd24a0d 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1929,169 +1929,210 @@ void SwDoc::DeleteCol( const SwCursor& rCursor )
// Thus delete the Columns
GetIDocumentUndoRedo().StartUndo(SwUndoId::COL_DELETE, nullptr);
- DeleteRowCol( aBoxes, true );
+ DeleteRowCol(aBoxes, SwDoc::RowColMode::DeleteColumn);
GetIDocumentUndoRedo().EndUndo(SwUndoId::COL_DELETE, nullptr);
}
-bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
+void SwDoc::DelTable(SwTableNode *const pTableNd)
{
- if( ::HasProtectedCells( rBoxes ))
- return false;
-
- OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
- SwTableNode* pTableNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
- if( !pTableNd )
- return false;
-
- if( dynamic_cast<const SwDDETable*>( &pTableNd->GetTable() ) != nullptr)
- return false;
-
- ::ClearFEShellTabCols(*this, nullptr);
- SwSelBoxes aSelBoxes( rBoxes );
- SwTable &rTable = pTableNd->GetTable();
- long nMin = 0;
- long nMax = 0;
- if( rTable.IsNewModel() )
{
- if( bColumn )
- rTable.ExpandColumnSelection( aSelBoxes, nMin, nMax );
- else
- rTable.FindSuperfluousRows( aSelBoxes );
+ // tdf#156267 remove DdeBookmarks before deleting nodes
+ SwDataChanged aTmp(SwPaM(*pTableNd, *pTableNd->EndOfSectionNode()));
}
- // Are we deleting the whole Table?
- const sal_uLong nTmpIdx1 = pTableNd->GetIndex();
- const sal_uLong nTmpIdx2 = aSelBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1;
- if( pTableNd->GetTable().GetTabSortBoxes().size() == aSelBoxes.size() &&
- aSelBoxes[0]->GetSttIdx()-1 == nTmpIdx1 &&
- nTmpIdx2 == pTableNd->EndOfSectionIndex() )
+ bool bNewTextNd = false;
+ // Is it alone in a FlyFrame?
+ SwNodeIndex aIdx( *pTableNd, -1 );
+ const SwStartNode* pSttNd = aIdx.GetNode().GetStartNode();
+ if( pSttNd )
{
- bool bNewTextNd = false;
- // Is it alone in a FlyFrame?
- SwNodeIndex aIdx( *pTableNd, -1 );
- const SwStartNode* pSttNd = aIdx.GetNode().GetStartNode();
- if( pSttNd )
+ const sal_uLong nTableEnd = pTableNd->EndOfSectionIndex() + 1;
+ const sal_uLong nSectEnd = pSttNd->EndOfSectionIndex();
+ if( nTableEnd == nSectEnd )
{
- const sal_uLong nTableEnd = pTableNd->EndOfSectionIndex() + 1;
- const sal_uLong nSectEnd = pSttNd->EndOfSectionIndex();
- if( nTableEnd == nSectEnd )
+ if( SwFlyStartNode == pSttNd->GetStartNodeType() )
{
- if( SwFlyStartNode == pSttNd->GetStartNodeType() )
+ SwFrameFormat* pFormat = pSttNd->GetFlyFormat();
+ if( pFormat )
{
- SwFrameFormat* pFormat = pSttNd->GetFlyFormat();
- if( pFormat )
- {
- // That's the FlyFormat we're looking for
- getIDocumentLayoutAccess().DelLayoutFormat( pFormat );
- return true;
- }
+ // That's the FlyFormat we're looking for
+ getIDocumentLayoutAccess().DelLayoutFormat( pFormat );
+ return;
}
- // No Fly? Thus Header or Footer: always leave a TextNode
- // We can forget about Undo then!
- bNewTextNd = true;
}
+ // No Fly? Thus Header or Footer: always leave a TextNode
+ // We can forget about Undo then!
+ bNewTextNd = true;
}
+ }
- // No Fly? Then it is a Header or Footer, so keep always a TextNode
- ++aIdx;
- if (GetIDocumentUndoRedo().DoesUndo())
+ // No Fly? Then it is a Header or Footer, so keep always a TextNode
+ ++aIdx;
+ if (GetIDocumentUndoRedo().DoesUndo())
+ {
+ GetIDocumentUndoRedo().ClearRedo();
+ SwPaM aPaM( *pTableNd->EndOfSectionNode(), aIdx.GetNode() );
+
+ if( bNewTextNd )
{
- GetIDocumentUndoRedo().ClearRedo();
- SwPaM aPaM( *pTableNd->EndOfSectionNode(), aIdx.GetNode() );
+ const SwNodeIndex aTmpIdx( *pTableNd->EndOfSectionNode(), 1 );
+ GetNodes().MakeTextNode( aTmpIdx,
+ getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ) );
+ }
- if( bNewTextNd )
+ // Save the cursors (UNO and otherwise)
+ SwPaM const* pSavePaM(nullptr);
+ SwPaM forwardPaM{SwNodeIndex(*pTableNd->EndOfSectionNode())};
+ if (forwardPaM.Move(fnMoveForward, GoInNode))
+ {
+ pSavePaM = &forwardPaM;
+ }
+ SwPaM backwardPaM{SwNodeIndex(*pTableNd)};
+ if (backwardPaM.Move(fnMoveBackward, GoInNode))
+ {
+ if (pSavePaM == nullptr
+ // try to stay in the same outer table cell
+ || (forwardPaM.GetPoint()->nNode.GetNode().FindTableNode() != pTableNd->StartOfSectionNode()->FindTableNode()
+ && forwardPaM.GetPoint()->nNode.GetNode().StartOfSectionIndex()
+ < backwardPaM.GetPoint()->nNode.GetNode().StartOfSectionIndex()))
{
- const SwNodeIndex aTmpIdx( *pTableNd->EndOfSectionNode(), 1 );
- GetNodes().MakeTextNode( aTmpIdx,
- getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ) );
+ pSavePaM = &backwardPaM;
}
+ }
+ assert(pSavePaM); // due to bNewTextNd this must succeed
+ {
+ SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *pSavePaM->GetPoint());
+ }
- // Save the cursors (UNO and otherwise)
- SwPaM aSavePaM( SwNodeIndex( *pTableNd->EndOfSectionNode() ) );
- if( ! aSavePaM.Move( fnMoveForward, GoInNode ) )
- {
- *aSavePaM.GetMark() = SwPosition( *pTableNd );
- aSavePaM.Move( fnMoveBackward, GoInNode );
- }
+ // Move hard PageBreaks to the succeeding Node
+ bool bSavePageBreak = false, bSavePageDesc = false;
+ sal_uLong nNextNd = pTableNd->EndOfSectionIndex()+1;
+ SwContentNode* pNextNd = GetNodes()[ nNextNd ]->GetContentNode();
+ if( pNextNd )
+ {
+ SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
+ const SfxPoolItem *pItem;
+ if( SfxItemState::SET == pTableFormat->GetItemState( RES_PAGEDESC,
+ false, &pItem ) )
{
- SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode());
- ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
+ pNextNd->SetAttr( *pItem );
+ bSavePageDesc = true;
}
- // Move hard PageBreaks to the succeeding Node
- bool bSavePageBreak = false, bSavePageDesc = false;
- sal_uLong nNextNd = pTableNd->EndOfSectionIndex()+1;
- SwContentNode* pNextNd = GetNodes()[ nNextNd ]->GetContentNode();
- if( pNextNd )
+ if( SfxItemState::SET == pTableFormat->GetItemState( RES_BREAK,
+ false, &pItem ) )
{
- SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
- const SfxPoolItem *pItem;
- if( SfxItemState::SET == pTableFormat->GetItemState( RES_PAGEDESC,
- false, &pItem ) )
- {
- pNextNd->SetAttr( *pItem );
- bSavePageDesc = true;
- }
-
- if( SfxItemState::SET == pTableFormat->GetItemState( RES_BREAK,
- false, &pItem ) )
- {
- pNextNd->SetAttr( *pItem );
- bSavePageBreak = true;
- }
+ pNextNd->SetAttr( *pItem );
+ bSavePageBreak = true;
}
- std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete( aPaM ));
- if( bNewTextNd )
- pUndo->SetTableDelLastNd();
- pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
- pUndo->SetTableName(pTableNd->GetTable().GetFrameFormat()->GetName());
- GetIDocumentUndoRedo().AppendUndo( std::move(pUndo) );
}
- else
+ std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete(aPaM, SwDeleteFlags::Default));
+ if( bNewTextNd )
+ pUndo->SetTableDelLastNd();
+ pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
+ pUndo->SetTableName(pTableNd->GetTable().GetFrameFormat()->GetName());
+ GetIDocumentUndoRedo().AppendUndo( std::move(pUndo) );
+ }
+ else
+ {
+ if( bNewTextNd )
{
- if( bNewTextNd )
- {
- const SwNodeIndex aTmpIdx( *pTableNd->EndOfSectionNode(), 1 );
- GetNodes().MakeTextNode( aTmpIdx,
- getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ) );
- }
-
- // Save the cursors (UNO and otherwise)
- SwPaM aSavePaM( SwNodeIndex( *pTableNd->EndOfSectionNode() ) );
- if( ! aSavePaM.Move( fnMoveForward, GoInNode ) )
- {
- *aSavePaM.GetMark() = SwPosition( *pTableNd );
- aSavePaM.Move( fnMoveBackward, GoInNode );
- }
- {
- SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode());
- ::PaMCorrAbs(tmpPaM, *aSavePaM.GetMark());
- }
+ const SwNodeIndex aTmpIdx( *pTableNd->EndOfSectionNode(), 1 );
+ GetNodes().MakeTextNode( aTmpIdx,
+ getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD ) );
+ }
- // Move hard PageBreaks to the succeeding Node
- SwContentNode* pNextNd = GetNodes()[ pTableNd->EndOfSectionIndex()+1 ]->GetContentNode();
- if( pNextNd )
+ // Save the cursors (UNO and otherwise)
+ SwPaM const* pSavePaM(nullptr);
+ SwPaM forwardPaM{SwNodeIndex(*pTableNd->EndOfSectionNode())};
+ if (forwardPaM.Move(fnMoveForward, GoInNode))
+ {
+ pSavePaM = &forwardPaM;
+ }
+ SwPaM backwardPaM{SwNodeIndex(*pTableNd)};
+ if (backwardPaM.Move(fnMoveBackward, GoInNode))
+ {
+ if (pSavePaM == nullptr
+ // try to stay in the same outer table cell
+ || (forwardPaM.GetPoint()->nNode.GetNode().FindTableNode() != pTableNd->StartOfSectionNode()->FindTableNode()
+ && forwardPaM.GetPoint()->nNode.GetNode().StartOfSectionIndex()
+ < backwardPaM.GetPoint()->nNode.GetNode().StartOfSectionIndex()))
{
- SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
- const SfxPoolItem *pItem;
- if( SfxItemState::SET == pTableFormat->GetItemState( RES_PAGEDESC,
- false, &pItem ) )
- pNextNd->SetAttr( *pItem );
-
- if( SfxItemState::SET == pTableFormat->GetItemState( RES_BREAK,
- false, &pItem ) )
- pNextNd->SetAttr( *pItem );
+ pSavePaM = &backwardPaM;
}
+ }
+ assert(pSavePaM); // due to bNewTextNd this must succeed
+ {
+ SwPaM const tmpPaM(*pTableNd, *pTableNd->EndOfSectionNode());
+ ::PaMCorrAbs(tmpPaM, *pSavePaM->GetPoint());
+ }
- pTableNd->DelFrames();
- getIDocumentContentOperations().DeleteSection( pTableNd );
+ // Move hard PageBreaks to the succeeding Node
+ SwContentNode* pNextNd = GetNodes()[ pTableNd->EndOfSectionIndex()+1 ]->GetContentNode();
+ if( pNextNd )
+ {
+ SwFrameFormat* pTableFormat = pTableNd->GetTable().GetFrameFormat();
+ const SfxPoolItem *pItem;
+ if( SfxItemState::SET == pTableFormat->GetItemState( RES_PAGEDESC,
+ false, &pItem ) )
+ pNextNd->SetAttr( *pItem );
+
+ if( SfxItemState::SET == pTableFormat->GetItemState( RES_BREAK,
+ false, &pItem ) )
+ pNextNd->SetAttr( *pItem );
}
- GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
+ pTableNd->DelFrames();
+ getIDocumentContentOperations().DeleteSection( pTableNd );
+ }
- getIDocumentState().SetModified();
- getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
+ GetDocShell()->GetFEShell()->UpdateTableStyleFormatting();
+
+ getIDocumentState().SetModified();
+ getIDocumentFieldsAccess().SetFieldsDirty( true, nullptr, 0 );
+}
+bool SwDoc::DeleteRowCol(const SwSelBoxes& rBoxes, RowColMode const eMode)
+{
+ if (!(eMode & SwDoc::RowColMode::DeleteProtected)
+ && ::HasProtectedCells(rBoxes))
+ {
+ return false;
+ }
+
+ OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
+ SwTableNode* pTableNd = const_cast<SwTableNode*>(rBoxes[0]->GetSttNd()->FindTableNode());
+ if( !pTableNd )
+ return false;
+
+ if (!(eMode & SwDoc::RowColMode::DeleteProtected)
+ && dynamic_cast<const SwDDETable*>(&pTableNd->GetTable()) != nullptr)
+ {
+ return false;
+ }
+
+ ::ClearFEShellTabCols(*this, nullptr);
+ SwSelBoxes aSelBoxes( rBoxes );
+ SwTable &rTable = pTableNd->GetTable();
+ long nMin = 0;
+ long nMax = 0;
+ if( rTable.IsNewModel() )
+ {
+ if (eMode & SwDoc::RowColMode::DeleteColumn)
+ rTable.ExpandColumnSelection( aSelBoxes, nMin, nMax );
+ else
+ rTable.FindSuperfluousRows( aSelBoxes );
+ }
+
+ // Are we deleting the whole Table?
+ const sal_uLong nTmpIdx1 = pTableNd->GetIndex();
+ const sal_uLong nTmpIdx2 = aSelBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1;
+ if( pTableNd->GetTable().GetTabSortBoxes().size() == aSelBoxes.size() &&
+ aSelBoxes[0]->GetSttIdx()-1 == nTmpIdx1 &&
+ nTmpIdx2 == pTableNd->EndOfSectionIndex() )
+ {
+ DelTable(pTableNd);
return true;
}
@@ -2112,7 +2153,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
if (rTable.IsNewModel())
{
- if (bColumn)
+ if (eMode & SwDoc::RowColMode::DeleteColumn)
rTable.PrepareDeleteCol( nMin, nMax );
rTable.FindSuperfluousRows( aSelBoxes );
if (pUndo)
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 955e113f2768..0bf2729cd02c 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1384,6 +1384,12 @@ void SwContentNode::DelFrames(SwRootFrame const*const pLayout)
pMerged->pParaPropsNode = pNode->GetTextNode();
break;
}
+ else if (pMerged->pFirstNode->GetIndex() == i)
+ { // this can only happen when called from CheckParaRedlineMerge()
+ // and the pMerged will be deleted anyway
+ pMerged->pParaPropsNode = pMerged->pFirstNode;
+ break;
+ }
}
assert(pMerged->listener.IsListeningTo(pMerged->pParaPropsNode));
}
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index 2a2bef4f4488..8e8587994c88 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -43,6 +43,7 @@
#include <fmtftn.hxx>
#include <docsh.hxx>
+#include <rootfrm.hxx>
typedef std::vector<SwStartNode*> SwStartNodePointers;
@@ -1294,17 +1295,49 @@ SwContentNode* SwNodes::GoNext(SwNodeIndex *pIdx) const
return static_cast<SwContentNode*>(pNd);
}
-SwContentNode* SwNodes::GoPrevious(SwNodeIndex *pIdx)
+sal_uLong SwNodes::StartOfGlobalSection(const SwNode& node) const
+{
+ const sal_uLong pos = node.GetIndex();
+ if (GetEndOfExtras().GetIndex() < pos)
+ // Regular ContentSection
+ return GetEndOfExtras().GetIndex() + sal_uLong(1);
+ if (GetEndOfAutotext().GetIndex() < pos)
+ // Redlines
+ return GetEndOfAutotext().GetIndex() + sal_uLong(1);
+ if (GetEndOfInserts().GetIndex() < pos)
+ {
+ // Flys/Headers/Footers
+ if (auto* p = node.FindFlyStartNode())
+ return p->GetIndex();
+ if (auto* p = node.FindHeaderStartNode())
+ return p->GetIndex();
+ if (auto* p = node.FindFooterStartNode())
+ return p->GetIndex();
+ return GetEndOfInserts().GetIndex() + sal_uLong(1);
+ }
+ if (GetEndOfPostIts().GetIndex() < pos)
+ {
+ // Footnotes
+ if (auto* p = node.FindFootnoteStartNode())
+ return p->GetIndex();
+ return GetEndOfPostIts().GetIndex() + sal_uLong(1);
+ }
+ return sal_uLong(0);
+}
+
+SwContentNode* SwNodes::GoPrevious(SwNodeIndex* pIdx, bool canCrossBoundary)
{
if( !pIdx->GetIndex() )
return nullptr;
SwNodeIndex aTmp( *pIdx, -1 );
+ sal_uLong aGlobalStart(
+ canCrossBoundary ? sal_uLong(0) : aTmp.GetNodes().StartOfGlobalSection(pIdx->GetNode()));
SwNode* pNd = nullptr;
- while( aTmp.GetIndex() && !( pNd = &aTmp.GetNode())->IsContentNode() )
+ while (aTmp > aGlobalStart && !(pNd = &aTmp.GetNode())->IsContentNode())
--aTmp;
- if( !aTmp.GetIndex() )
+ if (aTmp <= aGlobalStart)
pNd = nullptr;
else
(*pIdx) = aTmp;
@@ -1804,7 +1837,7 @@ void SwNodes::CopyNodes( const SwNodeRange& rRange,
// If the end of the section is outside the copy range,
// the section node will skipped, not copied!
// If someone want to change this behaviour, he has to adjust the function
- // lcl_NonCopyCount(..) in ndcopy.cxx which relies on it.
+ // lcl_NonCopyCount() which relies on it.
if( pCurrentNode->EndOfSectionIndex() < aRg.aEnd.GetIndex() )
{
// copy of the whole section, so create a new SectionNode
@@ -1939,7 +1972,7 @@ SwContentNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
if (SwNodeType::Section == pNd->GetNodeType())
{
const SwSection& rSect = static_cast<const SwSectionNode*>(pNd)->GetSection();
- if( (bSkipHidden && rSect.IsHiddenFlag()) ||
+ if( (bSkipHidden && rSect.CalcHiddenFlag()) ||
(bSkipProtect && rSect.IsProtectFlag()) )
// than skip the section
aTmp = *pNd->EndOfSectionNode();
@@ -1950,7 +1983,7 @@ SwContentNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
{
const SwSection& rSect = static_cast<SwSectionNode*>(pNd->
m_pStartOfSection)->GetSection();
- if( (bSkipHidden && rSect.IsHiddenFlag()) ||
+ if( (bSkipHidden && rSect.CalcHiddenFlag()) ||
(bSkipProtect && rSect.IsProtectFlag()) )
// than skip the section
aTmp = *pNd->EndOfSectionNode();
@@ -1961,7 +1994,7 @@ SwContentNode* SwNodes::GoNextSection( SwNodeIndex * pIdx,
const SwSectionNode* pSectNd;
if( ( bSkipHidden || bSkipProtect ) &&
nullptr != (pSectNd = pNd->FindSectionNode() ) &&
- ( ( bSkipHidden && pSectNd->GetSection().IsHiddenFlag() ) ||
+ ( ( bSkipHidden && pSectNd->GetSection().CalcHiddenFlag() ) ||
( bSkipProtect && pSectNd->GetSection().IsProtectFlag() )) )
{
aTmp = *pSectNd->EndOfSectionNode();
@@ -1984,8 +2017,9 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
{
bool bFirst = true;
SwNodeIndex aTmp( *pIdx );
+ sal_uLong aGlobalStart(aTmp.GetNodes().StartOfGlobalSection(pIdx->GetNode()));
const SwNode* pNd;
- while( aTmp > 0 )
+ while (aTmp > aGlobalStart)
{
pNd = & aTmp.GetNode();
if (SwNodeType::End == pNd->GetNodeType())
@@ -2035,90 +2069,108 @@ SwContentNode* SwNodes::GoPrevSection( SwNodeIndex * pIdx,
return nullptr;
}
-//TODO: improve documentation
//TODO: The inventor of the "single responsibility principle" will be crying if you ever show this code to him!
-/** find the next/previous ContentNode or a table node with frames
+/** find the next/previous ContentNode or table node that should have layout
+ * frames that are siblings to the ones of the node at rFrameIdx.
*
- * If no pEnd is given, search is started with FrameIndex; otherwise
- * search is started with the one before rFrameIdx and after pEnd.
+ * Search is started backward with the one before rFrameIdx and
+ * forward after pEnd.
*
- * @param rFrameIdx node with frames to search in
- * @param pEnd ???
- * @return result node; 0 (!!!) if not found
+ * @param rFrameIdx in: node with frames to search in; out: found node
+ * @param pEnd last node after rFrameIdx that should be excluded from search
+ * @return result node; 0 if not found
*/
SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx,
- const SwNode* pEnd ) const
+ SwNode const*const pEnd,
+ SwRootFrame const*const pLayout) const
{
+ assert(pEnd != nullptr); // every caller currently
+
SwNode* pFrameNd = nullptr;
// no layout -> skip
if( GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell() )
{
- SwNode* pSttNd = &rFrameIdx.GetNode();
+ SwNode *const pSttNd = &rFrameIdx.GetNode();
- // move of a hidden section?
- SwSectionNode* pSectNd = pSttNd->IsSectionNode()
+ // inside a hidden section?
+ SwSectionNode *const pSectNd = pSttNd->IsSectionNode()
? pSttNd->StartOfSectionNode()->FindSectionNode()
: pSttNd->FindSectionNode();
if( !( pSectNd && pSectNd->GetSection().CalcHiddenFlag() ) )
{
// in a table in table situation we have to assure that we don't leave the
// outer table cell when the inner table is looking for a PrvNxt...
- SwTableNode* pTableNd = pSttNd->IsTableNode()
+ SwTableNode *const pTableNd = pSttNd->IsTableNode()
? pSttNd->StartOfSectionNode()->FindTableNode()
: pSttNd->FindTableNode();
SwNodeIndex aIdx( rFrameIdx );
- SwNode* pNd;
- if( pEnd )
- {
- --aIdx;
- pNd = &aIdx.GetNode();
- }
- else
- pNd = pSttNd;
-
- if( ( pFrameNd = pNd )->IsContentNode() )
- rFrameIdx = aIdx;
-
- // search forward or backward for a content node
- else if( nullptr != ( pFrameNd = GoPrevSection( &aIdx, true, false )) &&
- ::CheckNodesRange( aIdx, rFrameIdx, true ) &&
- // Never out of the table at the start
- pFrameNd->FindTableNode() == pTableNd &&
- // Bug 37652: Never out of the table at the end
- (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode()
- == pSttNd->FindTableBoxStartNode() ) &&
- (!pSectNd || pSttNd->IsSectionNode() ||
- pSectNd->GetIndex() < pFrameNd->GetIndex())
- )
+
+ // search backward for a content or table node
+
+ --aIdx;
+ pFrameNd = &aIdx.GetNode();
+
+ do
{
- rFrameIdx = aIdx;
+ if (pFrameNd->IsContentNode())
+ {
+ // TODO why does this not check for nested tables like forward direction
+ rFrameIdx = aIdx;
+ return pFrameNd;
+ }
+ else if (pFrameNd->IsEndNode() && pFrameNd->StartOfSectionNode()->IsTableNode())
+ {
+ if (pLayout == nullptr
+ || !pLayout->IsHideRedlines()
+ || pFrameNd->StartOfSectionNode()->GetRedlineMergeFlag() != SwNode::Merge::Hidden)
+ {
+ pFrameNd = pFrameNd->StartOfSectionNode();
+ rFrameIdx = *pFrameNd;
+ return pFrameNd;
+ }
+ else
+ {
+ aIdx = *pFrameNd->StartOfSectionNode();
+ --aIdx;
+ pFrameNd = &aIdx.GetNode();
+ }
+ }
+ else
+ {
+ pFrameNd = GoPrevSection( &aIdx, true, false );
+ if ( nullptr != pFrameNd && !(
+ ::CheckNodesRange( aIdx, rFrameIdx, true ) &&
+ // Never out of the table at the start
+ pFrameNd->FindTableNode() == pTableNd &&
+ // Bug 37652: Never out of the table at the end
+ (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode()
+ == pSttNd->FindTableBoxStartNode() ) &&
+ (!pSectNd || pSttNd->IsSectionNode() ||
+ pSectNd->GetIndex() < pFrameNd->GetIndex())
+ ))
+ {
+ pFrameNd = nullptr; // no preceding content node, stop search
+ }
+ }
}
- else
+ while (pFrameNd != nullptr);
+
+ // search forward for a content or table node
+
+ aIdx = pEnd->GetIndex() + 1;
+ pFrameNd = &aIdx.GetNode();
+
+ do
{
- if( pEnd )
- aIdx = pEnd->GetIndex() + 1;
- else
- aIdx = rFrameIdx;
-
- // NEVER leave the section when doing this!
- if( ( pEnd && ( pFrameNd = &aIdx.GetNode())->IsContentNode() ) ||
- ( nullptr != ( pFrameNd = GoNextSection( &aIdx, true, false )) &&
- ::CheckNodesRange( aIdx, rFrameIdx, true ) &&
- ( pFrameNd->FindTableNode() == pTableNd &&
- // NEVER go out of the table cell at the end
- (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode()
- == pSttNd->FindTableBoxStartNode() ) ) &&
- (!pSectNd || pSttNd->IsSectionNode() ||
- pSectNd->EndOfSectionIndex() > pFrameNd->GetIndex())
- ))
+ if (pFrameNd->IsContentNode())
{
// Undo when merging a table with one before, if there is also one after it.
// However, if the node is in a table, it needs to be returned if the
// SttNode is a section or a table!
- SwTableNode* pTableNode;
+ SwTableNode *const pTableNode = pFrameNd->FindTableNode();
if (pSttNd->IsTableNode() &&
- nullptr != (pTableNode = pFrameNd->FindTableNode()) &&
+ nullptr != pTableNode &&
// TABLE IN TABLE:
pTableNode != pSttNd->StartOfSectionNode()->FindTableNode())
{
@@ -2126,23 +2178,54 @@ SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx,
rFrameIdx = *pFrameNd;
}
else
+ {
rFrameIdx = aIdx;
+ }
+ return pFrameNd;
}
- else if( pNd->IsEndNode() && pNd->StartOfSectionNode()->IsTableNode() )
+ else if (pFrameNd->IsTableNode())
{
- pFrameNd = pNd->StartOfSectionNode();
- rFrameIdx = *pFrameNd;
+ if (pLayout == nullptr
+ || !pLayout->IsHideRedlines()
+ || pFrameNd->GetRedlineMergeFlag() != SwNode::Merge::Hidden)
+ {
+ rFrameIdx = *pFrameNd;
+ return pFrameNd;
+ }
+ else
+ {
+ aIdx = *pFrameNd->EndOfSectionNode();
+ ++aIdx;
+ pFrameNd = &aIdx.GetNode();
+ }
}
else
{
- if( pEnd )
- aIdx = pEnd->GetIndex() + 1;
- else
- aIdx = rFrameIdx.GetIndex() + 1;
+ pFrameNd = GoNextSection( &aIdx, true, false );
+ // NEVER leave the section when doing this!
+ if (pFrameNd
+ && !(::CheckNodesRange(aIdx, rFrameIdx, true)
+ && (pFrameNd->FindTableNode() == pTableNd &&
+ // NEVER go out of the table cell at the end
+ (!pFrameNd->FindTableNode() || pFrameNd->FindTableBoxStartNode()
+ == pSttNd->FindTableBoxStartNode()))
+ && (!pSectNd || pSttNd->IsSectionNode() ||
+ pSectNd->EndOfSectionIndex() > pFrameNd->GetIndex()))
+ )
+ {
+ pFrameNd = nullptr; // no following content node, stop search
+ }
+ }
+ }
+ while (pFrameNd != nullptr);
- if( (pFrameNd = &aIdx.GetNode())->IsTableNode() )
- rFrameIdx = aIdx;
- else
+ // probably this is dead code, because the GoNextSection()
+ // should have ended up in the first text node in the table and
+ // then checked it's in a table?
+ {
+ aIdx = pEnd->GetIndex() + 1;
+
+ pFrameNd = &aIdx.GetNode();
{
pFrameNd = nullptr;
@@ -2160,9 +2243,9 @@ SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx,
{
rFrameIdx = aIdx;
pFrameNd = &aIdx.GetNode();
+ assert(!"this isn't dead code?");
}
}
- }
}
}
}
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index c974d37bb72d..f80b0a624252 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -204,15 +204,11 @@ SwSection::SwSection(
SetHidden();
}
- m_Data.SetProtectFlag( pParentSect->IsProtectFlag() );
// edit in readonly sections
m_Data.SetEditInReadonlyFlag( pParentSect->IsEditInReadonlyFlag() );
}
- if (!m_Data.IsProtectFlag())
- {
- m_Data.SetProtectFlag( rFormat.GetProtect().IsContentProtected() );
- }
+ m_Data.SetProtectFlag( rFormat.GetProtect().IsContentProtected() );
if (!m_Data.IsEditInReadonlyFlag()) // edit in readonly sections
{
@@ -311,14 +307,11 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
// Tell all Children that they are hidden
SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN );
pFormat->ModifyNotification( &aMsgItem, &aMsgItem );
-
- // Delete all Frames
- pFormat->DelFrames();
}
}
else if (m_Data.IsHiddenFlag()) // show Nodes again
{
- // Show all Frames (Child Sections are accounted for by MakeFrames)
+ // Show all Frames
// Only if the Parent Section is not restricting us!
SwSection* pParentSect = pFormat->GetParentSection();
if( !pParentSect || !pParentSect->IsHiddenFlag() )
@@ -326,8 +319,6 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
// Tell all Children that the Parent is not hidden anymore
SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN );
pFormat->ModifyNotification( &aMsgItem, &aMsgItem );
-
- pFormat->MakeFrames();
}
}
}
@@ -456,21 +447,8 @@ void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
bool bNewFlag =
static_cast<const SvxProtectItem*>(pNew)->IsContentProtected();
- if( !bNewFlag )
- {
- // Switching off: See if there is protection transferred
- // by the Parents
- const SwSection* pSect = this;
- do {
- if( pSect->IsProtect() )
- {
- bNewFlag = true;
- break;
- }
- pSect = pSect->GetParent();
- } while (pSect);
- }
-
+ // this used to inherit the flag from the parent, but then there is
+ // no way to turn it off in an inner section
m_Data.SetProtectFlag( bNewFlag );
}
return;
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index 7304e6e7b702..286d4d078de5 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -346,8 +346,11 @@ OUString const* SwAutoCorrDoc::GetPrevPara(bool const bAtNormalPos)
}
sw::GotoPrevLayoutTextFrame(*pIdx, rEditSh.GetLayout());
}
- if (pFrame && 0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+ if (pFrame && !pFrame->GetText().isEmpty() &&
+ 0 == pFrame->GetTextNodeForParaProps()->GetAttrOutlineLevel())
+ {
pStr = & pFrame->GetText();
+ }
if( bUndoIdInitialized )
bUndoIdInitialized = true;
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index a3925246f32f..6e4bccb55bcc 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -1196,7 +1196,7 @@ void SwAutoFormat::DeleteSelImpl(SwPaM & rDelPam, SwPaM & rPamToCorrect)
SwPaM* pPrev = rPamToCorrect.GetPrev();
rPamToCorrect.GetRingContainer().merge( pShCursor->GetRingContainer() );
- m_pEditShell->DeleteSel( rDelPam );
+ m_pEditShell->DeleteSel(rDelPam, true);
// and remove Pam again:
SwPaM* p;
@@ -1212,7 +1212,7 @@ void SwAutoFormat::DeleteSelImpl(SwPaM & rDelPam, SwPaM & rPamToCorrect)
m_pCurTextFrame = GetFrame(*m_pCurTextNd); // keep it up to date
}
else
- m_pEditShell->DeleteSel( rDelPam );
+ m_pEditShell->DeleteSel(rDelPam, true);
}
bool SwAutoFormat::DeleteJoinCurNextPara(SwTextFrame const*const pNextFrame,
@@ -1256,7 +1256,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
// delete blanks in empty paragraph
m_aDelPam.DeleteMark();
*m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(
- TextFrameIndex(m_pCurTextFrame->GetText().getLength()));
+ TextFrameIndex(0));
m_aDelPam.SetMark();
m_aDelPam.GetMark()->nNode = m_pCurTextFrame->GetTextNodeFirst()->GetIndex() - 1;
@@ -1275,16 +1275,25 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara )
if( pTNd )
{
m_aDelPam.GetMark()->nContent.Assign( pTNd, 0 );
- *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(0));
+ *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(
+ TextFrameIndex(m_pCurTextFrame->GetText().getLength()));
}
}
- else
- {
- *m_aDelPam.GetMark() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(0));
- pTNd = m_pCurTextNd;
- }
if( pTNd )
- DeleteSel( m_aDelPam );
+ { // join with previous or next paragraph
+ DeleteSel(m_aDelPam);
+ }
+ assert(m_aDelPam.GetNode().IsTextNode());
+ assert(!m_aDelPam.HasMark());
+ m_aDelPam.SetMark(); // mark remains at join position
+ m_pCurTextFrame = GetFrame(*m_aDelPam.GetNode().GetTextNode());
+ // replace until the end of the merged paragraph
+ *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(
+ TextFrameIndex(m_pCurTextFrame->GetText().getLength()));
+ if (*m_aDelPam.GetPoint() != *m_aDelPam.GetMark())
+ { // tdf#137245 replace (not delete) to preserve any flys
+ m_pDoc->getIDocumentContentOperations().ReplaceRange(m_aDelPam, "", false);
+ }
m_aDelPam.DeleteMark();
ClearRedlineText();
diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx
index e8f82956106f..c70c90182a0b 100644
--- a/sw/source/core/edit/edatmisc.cxx
+++ b/sw/source/core/edit/edatmisc.cxx
@@ -184,8 +184,8 @@ void SwEditShell::SetAttrSet( const SfxItemSet& rSet, SetAttrMode nFlags, SwPaM*
GetDoc()->getIDocumentContentOperations().InsertItemSet(*pCursor, rSet, nFlags, GetLayout());
}
- EndAllAction();
GetDoc()->getIDocumentRedlineAccess().SetRedlineFlags( eOldMode );
+ EndAllAction();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx
index 74e845353566..e16b8256b611 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -34,13 +34,17 @@
#include <undobj.hxx>
#include <SwRewriter.hxx>
#include <globals.hrc>
+#include <wrtsh.hxx>
+#include <officecfg/Office/Writer.hxx>
#include <strings.hrc>
#include <vector>
-void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
+void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool *const pUndo)
{
- bool bSelectAll = StartsWithTable() && ExtendedSelectedAll();
+ auto const oSelectAll(StartsWith_() != SwCursorShell::StartsWith::None
+ ? ExtendedSelectedAll()
+ : ::std::optional<::std::pair<SwNode const*, ::std::vector<SwTableNode *>>>{});
// only for selections
if (!rPam.HasMark()
|| (*rPam.GetPoint() == *rPam.GetMark()
@@ -56,7 +60,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
// 3. Point and Mark are at the document start and end, Point is in a table: delete selection as usual
if( rPam.GetNode().FindTableNode() &&
rPam.GetNode().StartOfSectionNode() !=
- rPam.GetNode(false).StartOfSectionNode() && !bSelectAll )
+ rPam.GetNode(false).StartOfSectionNode() && !oSelectAll)
{
// group the Undo in the table
if( pUndo && !*pUndo )
@@ -100,43 +104,57 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
{
std::unique_ptr<SwPaM> pNewPam;
SwPaM * pPam = &rPam;
- if (bSelectAll)
+ if (oSelectAll)
{
- assert(dynamic_cast<SwShellCursor*>(&rPam)); // must be corrected pam
- pNewPam.reset(new SwPaM(*rPam.GetMark(), *rPam.GetPoint()));
- // Selection starts at the first para of the first cell, but we
- // want to delete the table node before the first cell as well.
- while (SwTableNode const* pTableNode =
- pNewPam->Start()->nNode.GetNode().StartOfSectionNode()->FindTableNode())
+ if (!oSelectAll->second.empty())
{
- pNewPam->Start()->nNode = *pTableNode;
+ SwRewriter aRewriter;
+ aRewriter.AddRule(UndoArg1, SwResId(STR_MULTISEL));
+ GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::DELETE, &aRewriter);
}
- // tdf#133990 ensure section is included in SwUndoDelete
- while (SwSectionNode const* pSectionNode =
- pNewPam->Start()->nNode.GetNode().StartOfSectionNode()->FindSectionNode())
+ // tdf#155685 tables at the end must be deleted separately
+ for (SwTableNode *const pTable : oSelectAll->second)
{
- pNewPam->Start()->nNode = *pSectionNode;
+ GetDoc()->DelTable(pTable);
}
- pNewPam->Start()->nContent.Assign(nullptr, 0);
+ assert(dynamic_cast<SwShellCursor*>(&rPam)); // must be corrected pam
+ pNewPam.reset(new SwPaM(*rPam.GetMark(), *rPam.GetPoint()));
+ // Selection starts at the first para of the first cell, but we
+ // want to delete the table node before the first cell as well.
+ *pNewPam->Start() = SwPosition(*oSelectAll->first);
pPam = pNewPam.get();
}
// delete everything
- GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam);
+ GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam,
+ isArtificialSelection ? SwDeleteFlags::ArtificialSelection : SwDeleteFlags::Default);
SaveTableBoxContent( pPam->GetPoint() );
+ if (oSelectAll && !oSelectAll->second.empty())
+ {
+ GetDoc()->GetIDocumentUndoRedo().EndUndo(SwUndoId::END, nullptr);
+ }
}
// Selection is not needed anymore
rPam.DeleteMark();
}
-bool SwEditShell::Delete()
+bool SwEditShell::Delete(bool const isArtificialSelection)
{
SET_CURR_SHELL( this );
bool bRet = false;
if ( !HasReadonlySel() || CursorInsideInputField() )
{
- StartAllAction();
+ if (HasHiddenSections() &&
+ officecfg::Office::Writer::Content::Display::ShowWarningHiddenSection::get())
+ {
+ if (!WarnHiddenSectionDialog())
+ {
+ bRet = RemoveParagraphMetadataFieldAtCursor();
+ return bRet;
+ }
+ }
+ StartAllAction();
bool bUndo = GetCursor()->GetNext() != GetCursor();
if( bUndo ) // more than one selection?
{
@@ -148,7 +166,7 @@ bool SwEditShell::Delete()
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
- DeleteSel( rPaM, &bUndo );
+ DeleteSel(rPaM, isArtificialSelection, &bUndo);
}
// If undo container then close here
@@ -162,6 +180,11 @@ bool SwEditShell::Delete()
else
{
bRet = RemoveParagraphMetadataFieldAtCursor();
+ if (!bRet)
+ {
+ // false indicates HasReadonlySel failed
+ InfoReadOnlyDialog();
+ }
}
return bRet;
@@ -326,7 +349,7 @@ bool SwEditShell::Replace( const OUString& rNewStr, bool bRegExpRplc )
SET_CURR_SHELL( this );
bool bRet = false;
- if( !HasReadonlySel() )
+ if (!HasReadonlySel(true))
{
StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr);
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 2b49ee16ecc8..1d68caa68d4f 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -411,7 +411,8 @@ std::pair<bool, OUString> lcl_MakeParagraphSignatureFieldText(const SignatureDes
valid = valid
&& aInfo.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
- msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.ouSubject + ", " +
+ assert(aInfo.GetSigningCertificate()); // it was valid
+ msg = SwResId(STR_SIGNED_BY) + ": " + aInfo.GetSigningCertificate()->X509Subject + ", " +
aDescr.msDate;
msg += (!aDescr.msUsage.isEmpty() ? (" (" + aDescr.msUsage + "): ") : OUString(": "));
msg += (valid ? SwResId(STR_VALID) : SwResId(STR_INVALID));
@@ -2201,8 +2202,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat,
GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::SETFMTCOLL, &aRewriter);
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
-
- if ( !rPaM.HasReadonlySel( GetViewOptions()->IsFormView() ) )
+ if (!rPaM.HasReadonlySel( GetViewOptions()->IsFormView(), true))
{
// tdf#105413 turn off ShowChanges mode for the next loops to apply styles permanently with redlining,
// ie. in all directly preceding deleted paragraphs at the actual cursor positions
diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx
index 3d916edc5fe0..c5ea9081d043 100644
--- a/sw/source/core/edit/edglbldc.cxx
+++ b/sw/source/core/edit/edglbldc.cxx
@@ -272,7 +272,7 @@ void SwEditShell::DeleteGlobalDocContent( const SwGlblDocContents& rArr ,
rPos.nNode = pMyDoc->GetNodes().GetEndOfContent();
--rPos.nNode;
if( !pMyDoc->getIDocumentContentOperations().DelFullPara( *pCursor ) )
- Delete();
+ Delete(false);
}
break;
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index ed46482bf933..49683c682371 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -203,7 +203,9 @@ bool SwEditShell::CopySelToDoc( SwDoc* pInsDoc )
bool bColSel = GetCursor_()->IsColumnSelection();
if( bColSel && pInsDoc->IsClipBoard() )
pInsDoc->SetColumnSelection( true );
- bool bSelectAll = StartsWithTable() && ExtendedSelectedAll();
+ auto const oSelectAll(StartsWith_() != SwCursorShell::StartsWith::None
+ ? ExtendedSelectedAll()
+ : ::std::optional<::std::pair<SwNode const*, ::std::vector<SwTableNode*>>>{});
{
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
@@ -227,18 +229,21 @@ bool SwEditShell::CopySelToDoc( SwDoc* pInsDoc )
// for the purpose of copying, our shell cursor is not touched.
// (Otherwise we would have to restore it.)
SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint());
- if (bSelectAll)
+ if (oSelectAll)
{
// Selection starts at the first para of the first cell,
// but we want to copy the table and the start node before
// the first cell as well.
- // tdf#133982 tables can be nested
- while (SwTableNode const* pTableNode =
- aPaM.Start()->nNode.GetNode().StartOfSectionNode()->FindTableNode())
+ *aPaM.Start() = SwPosition(*oSelectAll->first);
+ if (SwSectionNode const* pSection = oSelectAll->first->GetSectionNode())
{
- aPaM.Start()->nNode = *pTableNode;
+ if (aPaM.End()->nNode.GetIndex() < pSection->EndOfSectionIndex())
+ {
+ // include section end so that section is copied
+ aPaM.End()->nNode = *oSelectAll->first->GetNodes()[pSection->EndOfSectionIndex() + 1];
+ aPaM.End()->nContent.Assign(aPaM.End()->nNode.GetNode().GetContentNode(), 0);
+ }
}
- aPaM.Start()->nContent.Assign(nullptr, 0);
}
bRet = GetDoc()->getIDocumentContentOperations().CopyRange( aPaM, aPos, /*bCopyAll=*/false, /*bCheckPos=*/true, /*bCopyText=*/false ) || bRet;
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 8f84ce42ed75..d697fd05c286 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -663,7 +663,7 @@ bool SwEditShell::InsertURL( const SwFormatINetFormat& rFormat, const OUString&
bDelText = bInsText = false;
if( bDelText )
- Delete();
+ Delete(true);
}
else if( pCursor->IsMultiSelection() && rFormat.GetValue() == rStr )
bInsText = false;
@@ -732,7 +732,7 @@ void SwEditShell::DelINetAttrWithText()
{
bool bRet = SelectTextAttr( RES_TXTATR_INETFMT, false );
if( bRet )
- DeleteSel( *GetCursor() );
+ DeleteSel(*GetCursor(), true);
}
/// Set the DontExpand flag at the text character attributes
@@ -789,7 +789,7 @@ void SwEditShell::SetNumberingRestart()
if( nullptr != ( pContentFrame = static_cast<SwTextNode*>(pNd)->getLayoutFrame( GetLayout() )) )
{
// skip hidden frames - ignore protection!
- if( !static_cast<SwTextFrame*>(pContentFrame)->IsHiddenNow() )
+ if( !pContentFrame->IsHiddenNow() )
{
// if the node is numbered and the starting value of the numbering equals the
// start value of the numbering rule then set this value as hard starting value
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 69446dd9b060..8c50eadd8740 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -823,11 +823,16 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos,
SwRect& rSelectRect)
{
// save the start and end positions of the line and the starting point
+ SwNode const& rNode(GetCursor()->GetPoint()->nNode.GetNode());
Push();
LeftMargin();
- const sal_Int32 nLineStart = GetCursor()->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nLineStart = &rNode == &GetCursor()->GetPoint()->nNode.GetNode()
+ ? GetCursor()->GetPoint()->nContent.GetIndex()
+ : 0;
RightMargin();
- const sal_Int32 nLineEnd = GetCursor()->GetPoint()->nContent.GetIndex();
+ const sal_Int32 nLineEnd = &rNode == &GetCursor()->GetPoint()->nNode.GetNode()
+ ? GetCursor()->GetPoint()->nContent.GetIndex()
+ : rNode.GetTextNode()->Len();
Pop(PopMode::DeleteCurrent);
// make sure the selection build later from the data below does
@@ -909,8 +914,14 @@ uno::Reference< XSpellAlternatives >
if (pWrong->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin))
{
const OUString aText(pNode->GetText().copy(nBegin, nLen));
- OUString aWord = aText.replaceAll(OUStringChar(CH_TXTATR_BREAKWORD), "")
- .replaceAll(OUStringChar(CH_TXTATR_INWORD), "");
+ // TODO: this doesn't handle fieldmarks properly
+ ModelToViewHelper const aConversionMap(*pNode, GetLayout(),
+ ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode
+ | (GetLayout()->IsHideRedlines() ? ExpandMode::HideDeletions : ExpandMode(0))
+ | (GetViewOptions()->IsShowHiddenChar() ? ExpandMode(0) : ExpandMode::HideInvisible));
+ auto const nBeginView(aConversionMap.ConvertToViewPosition(nBegin));
+ OUString const aWord(aConversionMap.getViewText().copy(nBeginView,
+ aConversionMap.ConvertToViewPosition(nBegin+nLen) - nBeginView));
uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() );
if( xSpell.is() )
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx
index dd5381cbb9eb..4991b9376a89 100644
--- a/sw/source/core/edit/edws.cxx
+++ b/sw/source/core/edit/edws.cxx
@@ -265,6 +265,12 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, bool bInsert,
// FIXME: this _must_ be called with reference to the actual node text!
SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pTNd->getLayoutFrame(GetLayout())));
TextFrameIndex const nPos(pFrame->MapModelToViewPos(*pCursor->GetPoint()));
+ // tdf#147414 sw_redlinehide: if cursor moved backward, it may be at the
+ // start of a delete redline - but MapViewToModelPos() always returns end
+ // of redline and it will be called when AutoCorrect actually inserts
+ // something - so first normalize cursor point to end of redline so that
+ // point will then be moved forward when something is inserted.
+ *pCursor->GetPoint() = pFrame->MapViewToModelPos(nPos);
OUString const& rMergedText(pFrame->GetText());
rACorr.DoAutoCorrect( aSwAutoCorrDoc,
rMergedText, sal_Int32(nPos),
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index c4825a9343df..9aaf9b2b9f34 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -771,7 +771,7 @@ static std::pair<OUString, bool> MakeRefNumStr(
SwTextNode const& rTextNodeOfReferencedItem(pLayout
? *sw::GetParaPropsNode(*pLayout, i_rTextNodeOfReferencedItem)
: i_rTextNodeOfReferencedItem);
- if ( rTextNodeOfReferencedItem.HasNumber() &&
+ if ( rTextNodeOfReferencedItem.HasNumber(pLayout) &&
rTextNodeOfReferencedItem.IsCountedInList() )
{
OSL_ENSURE( rTextNodeOfReferencedItem.GetNum(pLayout),
@@ -795,7 +795,7 @@ static std::pair<OUString, bool> MakeRefNumStr(
== rTextNodeOfReferencedItem.FindFooterStartNode() )
{
const SwNodeNum* pNodeNumForTextNodeOfField( nullptr );
- if ( rTextNodeOfField.HasNumber() &&
+ if ( rTextNodeOfField.HasNumber(pLayout) &&
rTextNodeOfField.GetNumRule() == rTextNodeOfReferencedItem.GetNumRule() )
{
pNodeNumForTextNodeOfField = rTextNodeOfField.GetNum(pLayout);
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index c2470b997a93..a39b7479e669 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -686,25 +686,19 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bNestedTable )
OSL_ENSURE( pClpDoc, "no clipboard document" );
// then till end of the nodes array
SwNodeIndex aIdx( pClpDoc->GetNodes().GetEndOfExtras(), 2 );
- SwPaM aCpyPam( aIdx ); //DocStart
+ // select content section, whatever it may contain
+ SwPaM aCpyPam(aIdx, SwNodeIndex(pClpDoc->GetNodes().GetEndOfContent(), -1));
+ if (SwContentNode *const pAtEnd = aCpyPam.GetNode(true).GetContentNode())
+ {
+ pAtEnd->MakeEndIndex(&aCpyPam.GetPoint()->nContent);
+ }
// If there are table formulas in the area, then display the table first
// so that the table formula can calculate a new value first
// (individual boxes in the area are retrieved via the layout)
SwFieldType* pTableFieldTyp = GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Table );
- SwTableNode *const pSrcNd = aCpyPam.GetNode().GetTableNode();
- if( !pSrcNd ) // table node ?
- { // don't skip !!
- SwContentNode* pCNd = aCpyPam.GetNode().GetContentNode();
- if( pCNd )
- aCpyPam.GetPoint()->nContent.Assign( pCNd, 0 );
- else if( !aCpyPam.Move( fnMoveForward, GoInNode ))
- aCpyPam.Move( fnMoveBackward, GoInNode );
- }
-
- aCpyPam.SetMark();
- aCpyPam.Move( fnMoveForward, GoInDoc );
+ SwTableNode *const pSrcNd = aCpyPam.GetNode(false).GetTableNode();
bool bRet = true;
StartAllAction();
@@ -1021,7 +1015,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bNestedTable )
{
if( bDelTable && IsTableMode() )
{
- SwEditShell::Delete();
+ SwEditShell::Delete(false);
bDelTable = false;
}
@@ -1045,9 +1039,24 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bNestedTable )
--aIndexBefore;
+ // copying to the clipboard, the section is inserted
+ // at the start of the nodes, followed by empty text node
+ bool const isSourceSection(aCpyPam.Start()->nNode.GetNode().IsSectionNode()
+ && aCpyPam.End()->nNode.GetIndex() == aCpyPam.Start()->nNode.GetNode().EndOfSectionIndex() + 1
+ && aCpyPam.End()->nNode.GetNode().IsTextNode()
+ && aCpyPam.End()->nNode.GetNode().GetTextNode()->Len() == 0);
+
pClpDoc->getIDocumentContentOperations().CopyRange( aCpyPam, rInsPos, /*bCopyAll=*/false, /*bCheckPos=*/true, /*bCopyText=*/false );
// Note: aCpyPam is invalid now
+ if (isSourceSection
+ && aIndexBefore.GetNode().IsStartNode()
+ && rInsPos.nNode.GetNode().GetTextNode()->Len() == 0)
+ { // if there is an empty text node at the start, it
+ // should be *replaced* by the section, so delete it
+ GetDoc()->getIDocumentContentOperations().DelFullPara(rPaM);
+ }
+
++aIndexBefore;
SwPaM aPaM(SwPosition(aIndexBefore),
SwPosition(rInsPos.nNode));
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 2c6666b024f5..65e684e1af06 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -298,7 +298,13 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
for (size_t i = 0; i < rMrkList.GetMarkCount(); ++i)
{
SdrObject* pObject = rMrkList.GetMark(i)->GetMarkedSdrObj();
- SwFrameFormat* pFormat = GetUserCall(pObject)->GetFormat();
+ SwContact* pContact = GetUserCall(pObject);
+ if (!pContact)
+ {
+ continue;
+ }
+
+ SwFrameFormat* pFormat = pContact->GetFormat();
if (SwFrameFormat* pShapeFormat = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_FLYFRMFMT))
{
SdrObject* pShape = pShapeFormat->FindSdrObject();
@@ -3237,8 +3243,11 @@ bool SwFEShell::IsShapeDefaultHoriTextDirR2L() const
if ( dynamic_cast<const SwVirtFlyDrawObj*>( pSdrObj) == nullptr )
{
// determine page frame of the frame the shape is anchored.
- const SwFrame* pAnchorFrame =
- static_cast<SwDrawContact*>(GetUserCall(pSdrObj))->GetAnchorFrame( pSdrObj );
+ const SwContact* pContact = GetUserCall(pSdrObj);
+ OSL_ENSURE( pContact, "<SwFEShell::IsShapeDefaultHoriTextDirR2L(..)> - missing contact!" );
+ if (!pContact)
+ return false;
+ const SwFrame* pAnchorFrame = static_cast<const SwDrawContact*>(pContact)->GetAnchorFrame( pSdrObj );
OSL_ENSURE( pAnchorFrame, "inconsistent model - no anchor at shape!");
if ( pAnchorFrame )
{
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index a6cd65a55d15..936ababfaea4 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -188,7 +188,7 @@ void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind )
// search boxes via the layout
SwSelBoxes aBoxes;
- bool bSelectAll = StartsWithTable() && ExtendedSelectedAll();
+ bool bSelectAll = StartsWith_() == StartsWith::Table && ExtendedSelectedAll();
if (bSelectAll)
{
// Set the end of the selection to the last paragraph of the last cell of the table.
@@ -296,9 +296,8 @@ bool SwFEShell::DeleteCol()
// then delete the column
StartUndo(SwUndoId::COL_DELETE);
- bRet = GetDoc()->DeleteRowCol( aBoxes, true );
+ bRet = GetDoc()->DeleteRowCol(aBoxes, SwDoc::RowColMode::DeleteColumn);
EndUndo(SwUndoId::COL_DELETE);
-
}
else
bRet = false;
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 2d600b6ff8ba..994812dc14b4 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -48,6 +48,7 @@ public:
// Add optional parameter <bForceJoinNext>, default value <false>
// Needed for hiding of deletion redlines
bool DeleteAndJoin( SwPaM&,
+ SwDeleteFlags flags = SwDeleteFlags::Default,
const bool bForceJoinNext = false ) override;
bool MoveRange(SwPaM&, SwPosition&, SwMoveFlags) override;
@@ -159,10 +160,10 @@ public:
private:
SwDoc& m_rDoc;
- bool DeleteAndJoinImpl(SwPaM&, const bool);
- bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
- bool DeleteRangeImpl(SwPaM&, const bool unused = false);
- bool DeleteRangeImplImpl(SwPaM &);
+ bool DeleteAndJoinImpl(SwPaM&, SwDeleteFlags, const bool);
+ bool DeleteAndJoinWithRedlineImpl(SwPaM&, SwDeleteFlags, const bool unused = false);
+ bool DeleteRangeImpl(SwPaM&, SwDeleteFlags, const bool unused = false);
+ bool DeleteRangeImplImpl(SwPaM &, SwDeleteFlags);
bool ReplaceRangeImpl(SwPaM&, OUString const&, const bool);
SwFlyFrameFormat* InsNoTextNode( const SwPosition&rPos, SwNoTextNode*,
const SfxItemSet* pFlyAttrSet,
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index a9457f916763..840d492c2b35 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -63,11 +63,11 @@ namespace sw {
virtual void correctMarksAbsolute(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset) override;
virtual void correctMarksRelative(const SwNodeIndex& rOldNode, const SwPosition& rNewPos, const sal_Int32 nOffset) override;
- virtual void deleteMarks(const SwNodeIndex& rStt, const SwNodeIndex& rEnd, std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, const SwIndex* pSttIdx, const SwIndex* pEndIdx) override;
+ virtual void deleteMarks(const SwNodeIndex& rStt, const SwNodeIndex& rEnd, std::vector< ::sw::mark::SaveBookmark>* pSaveBkmk, const SwIndex* pSttIdx, const SwIndex* pEndIdx, bool isReplace) override;
// deleters
virtual std::unique_ptr<ILazyDeleter>
- deleteMark(const const_iterator_t& ppMark) override;
+ deleteMark(const const_iterator_t& ppMark, bool isMoveNodes) override;
virtual void deleteMark(const ::sw::mark::IMark* const pMark) override;
virtual void clearAllMarks() override;
@@ -78,7 +78,7 @@ namespace sw {
virtual const_iterator_t findMark(const OUString& rName) const override;
// bookmarks
- virtual bool isBookmarkDeleted(SwPaM const& rPaM) const override;
+ virtual bool isBookmarkDeleted(SwPaM const& rPaM, bool isReplace) const override;
virtual const_iterator_t getBookmarksBegin() const override;
virtual const_iterator_t getBookmarksEnd() const override;
virtual sal_Int32 getBookmarksCount() const override;
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index a4eb066581c9..b4ae4544d669 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -27,6 +27,7 @@
class SwRedlineSaveDatas;
class SwTextNode;
+enum class SwDeleteFlags;
namespace sfx2 {
class MetadatableUndo;
@@ -59,6 +60,7 @@ class SwUndoDelete
bool m_bResetPgDesc : 1; // TRUE: reset PgDsc on following node
bool m_bResetPgBrk : 1; // TRUE: reset PgBreak on following node
bool const m_bFromTableCopy : 1; // TRUE: called by SwUndoTableCpyTable
+ SwDeleteFlags m_DeleteFlags;
bool SaveContent( const SwPosition* pStt, const SwPosition* pEnd,
SwTextNode* pSttTextNd, SwTextNode* pEndTextNd );
@@ -66,6 +68,7 @@ class SwUndoDelete
public:
SwUndoDelete(
SwPaM&,
+ SwDeleteFlags flags,
bool bFullPara = false,
bool bCalledByTableCpy = false );
virtual ~SwUndoDelete() override;
diff --git a/sw/source/core/inc/UndoRedline.hxx b/sw/source/core/inc/UndoRedline.hxx
index 38ecd86314cb..ada3c34fad7f 100644
--- a/sw/source/core/inc/UndoRedline.hxx
+++ b/sw/source/core/inc/UndoRedline.hxx
@@ -22,6 +22,7 @@
#include <memory>
#include <undobj.hxx>
+#include <IDocumentContentOperations.hxx>
struct SwSortOptions;
class SwRangeRedline;
@@ -52,17 +53,22 @@ public:
class SwUndoRedlineDelete : public SwUndoRedline
{
+private:
+ std::unique_ptr<SwHistory> m_pHistory; ///< for moved fly anchors
+ //
bool bCanGroup : 1;
bool bIsDelim : 1;
bool bIsBackspace : 1;
OUString m_sRedlineText;
+ void InitHistory(SwPaM const& rRange);
+
virtual void UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
virtual void RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) override;
public:
- SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUserId );
+ SwUndoRedlineDelete(const SwPaM& rRange, SwUndoId nUserId, SwDeleteFlags flags = SwDeleteFlags::Default);
virtual SwRewriter GetRewriter() const override;
bool CanGrouping( const SwUndoRedlineDelete& rPrev );
diff --git a/sw/source/core/inc/UndoTable.hxx b/sw/source/core/inc/UndoTable.hxx
index ecfa87745ef7..8815cb0881c7 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
{
@@ -272,7 +280,7 @@ class SwUndoTableCpyTable : public SwUndo
//b6341295: When redlining is active, PrepareRedline has to create the
//redlining attributes for the new and the old table cell content
static std::unique_ptr<SwUndo> PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
- const SwPosition& rPos, bool& rJoin, bool bRedo );
+ SwPosition& rPos, bool& rJoin, bool bRedo );
public:
SwUndoTableCpyTable(const SwDoc* pDoc);
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index 45be76199073..fe5bff942568 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -186,10 +186,8 @@ namespace sw {
{ return m_bHidden; }
virtual const OUString& GetHideCondition() const override
{ return m_sHideCondition; }
- virtual void Hide(bool rHide) override
- { m_bHidden = rHide; }
- virtual void SetHideCondition(const OUString& rHideCondition) override
- { m_sHideCondition = rHideCondition; }
+ virtual void Hide(bool rHide) override;
+ virtual void SetHideCondition(const OUString& rHideCondition) override;
// ::sfx2::Metadatable
virtual ::sfx2::IXmlIdRegistry& GetRegistry() override;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index ae5e8378ee4b..cb5a2418ef21 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -130,6 +130,8 @@ namespace drawinglayer { namespace attribute {
class SAL_DLLPUBLIC_RTTI SwFrameAreaDefinition
{
private:
+ friend void FriendHackInvalidateRowFrame(SwFrameAreaDefinition &);
+
// The absolute position and size of the SwFrame in the document.
// This values are set by the layouter implementations
SwRect maFrameArea;
@@ -424,7 +426,7 @@ protected:
bool mbColLocked : 1; // lock Grow/Shrink for column-wise section
// or fly frames, will be set in Format
bool m_isInDestroy : 1;
- bool mbForbidDelete : 1;
+ int mnForbidDelete;
void ColLock() { mbColLocked = true; }
void ColUnlock() { mbColLocked = false; }
@@ -859,8 +861,10 @@ public:
// Fly in ... and footnotes
bool IsProtected() const;
+ virtual bool IsHiddenNow() const;
+
bool IsColLocked() const { return mbColLocked; }
- virtual bool IsDeleteForbidden() const { return mbForbidDelete; }
+ virtual bool IsDeleteForbidden() const { return mnForbidDelete > 0; }
/// this is the only way to delete a SwFrame instance
static void DestroyFrame(SwFrame *const pFrame);
@@ -900,8 +904,8 @@ public:
void RegisterToFormat( SwFormat& rFormat );
void ValidateThisAndAllLowers( const sal_uInt16 nStage );
- void ForbidDelete() { mbForbidDelete = true; }
- void AllowDelete() { mbForbidDelete = false; }
+ void ForbidDelete() { ++mnForbidDelete; }
+ void AllowDelete() { assert(mnForbidDelete > 0); --mnForbidDelete; }
drawinglayer::attribute::SdrAllFillAttributesHelperPtr getSdrAllFillAttributesHelper() const;
bool supportsFullDrawingLayerFillAttributeSet() const;
@@ -1238,8 +1242,7 @@ public:
//it in e.g. SwSectionFrame::MergeNext etc because we will need it
//again after the SwFrameDeleteGuard dtor
explicit SwFrameDeleteGuard(SwFrame* pFrame)
- : m_pForbidFrame((pFrame && !pFrame->IsDeleteForbidden()) ?
- pFrame : nullptr)
+ : m_pForbidFrame(pFrame)
{
if (m_pForbidFrame)
m_pForbidFrame->ForbidDelete();
diff --git a/sw/source/core/inc/layact.hxx b/sw/source/core/inc/layact.hxx
index 990c0e4b88f0..5a00382995f9 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -68,6 +68,9 @@ class SwLayAction
std::unique_ptr<SwWait> m_pWait;
+ std::vector<SwFrame*> m_aFrameStack;
+ std::vector<std::unique_ptr<SwFrameDeleteGuard>> m_aFrameDeleteGuards;
+
// If a paragraph (or anything else) moved more than one page when
// formatting, it adds its new page number here.
// The InternalAction can then take the appropriate steps.
@@ -124,6 +127,9 @@ class SwLayAction
bool RemoveEmptyBrowserPages();
+ void PushFormatLayout(SwFrame* pLow);
+ void PopFormatLayout();
+
public:
SwLayAction(SwRootFrame *pRt, SwViewShellImp *pImp, TaskStopwatch* pWatch = nullptr);
~SwLayAction();
@@ -148,7 +154,7 @@ public:
void SetReschedule ( bool bNew ) { m_bReschedule = bNew; }
void SetWaitAllowed ( bool bNew ) { m_bWaitAllowed = bNew; }
- void SetAgain() { m_bAgain = true; }
+ void SetAgain(bool bAgain);
void SetUpdateExpFields() {m_bUpdateExpFields = true; }
inline void SetCheckPageNum( sal_uInt16 nNew );
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index f7d90f00d8f6..89d23f210f45 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -182,6 +182,7 @@ public:
m_VertPosOrientFramesFor.end(), pObj),
m_VertPosOrientFramesFor.end());
}
+ void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override;
};
/**
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index c472b6f7bc1a..14b9ee6f6be5 100644
--- a/sw/source/core/inc/mvsave.hxx
+++ b/sw/source/core/inc/mvsave.hxx
@@ -34,6 +34,7 @@ class SwDoc;
class SwFormatAnchor;
class SwFrameFormat;
class SwIndex;
+class SwHistory;
class SwNodeIndex;
class SwNodeRange;
class SwPaM;
@@ -94,7 +95,8 @@ void DelBookmarks(const SwNodeIndex& rStt,
const SwNodeIndex& rEnd,
std::vector< ::sw::mark::SaveBookmark> * SaveBkmk =nullptr,
const SwIndex* pSttIdx =nullptr,
- const SwIndex* pEndIdx =nullptr);
+ const SwIndex* pEndIdx = nullptr,
+ bool isReplace = false);
/** data structure to temporarily hold fly anchor positions relative to some
* location. */
@@ -116,10 +118,10 @@ struct SaveFly
typedef std::deque< SaveFly > SaveFlyArr;
void RestFlyInRange( SaveFlyArr& rArr, const SwPosition& rSttIdx,
- const SwNodeIndex* pInsPos );
+ const SwNodeIndex* pInsPos, bool isForceToStartPos = false);
void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr );
void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos,
- SaveFlyArr& rArr, bool bMoveAllFlys );
+ SaveFlyArr& rArr, bool bMoveAllFlys, SwHistory * pHistory = nullptr);
void DelFlyInRange( const SwNodeIndex& rMkNdIdx,
const SwNodeIndex& rPtNdIdx,
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 484ff172e25d..44d7a5800032 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -76,7 +76,7 @@ using SwDestroyList = std::set<SwSectionFrame*>;
/// The root element of a Writer document layout. Lower frames are expected to
/// be SwPageFrame instances.
-class SAL_DLLPUBLIC_RTTI SwRootFrame: public SwLayoutFrame
+class SW_DLLPUBLIC SwRootFrame: public SwLayoutFrame
{
// Needs to disable the Superfluous temporarily
friend void AdjustSizeChgNotify( SwRootFrame *pRoot );
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 67a12bac0d77..e11f3feccd73 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -182,7 +182,6 @@ public:
return m_HiddenChg[ nCnt ];
}
TextFrameIndex NextHiddenChg(TextFrameIndex nPos) const;
- static void selectHiddenTextProperty(const SwTextNode& rNode, MultiSelection &rHiddenMulti);
TextFrameIndex NextBookmark(TextFrameIndex nPos) const;
MarkKind GetBookmark(TextFrameIndex nPos) const;
static void CalcHiddenRanges(const SwTextNode& rNode,
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 3b890b385e2a..8235e6244335 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -75,6 +75,8 @@ public:
virtual void Cut() override;
virtual void Paste( SwFrame* pParent, SwFrame* pSibling = nullptr ) override;
+ virtual bool IsHiddenNow() const override;
+
inline const SwSectionFrame *GetFollow() const;
inline SwSectionFrame *GetFollow();
SwSectionFrame* FindMaster() const;
@@ -96,7 +98,7 @@ public:
* Splits the SectionFrame surrounding the pFrame up in two parts:
* pFrame and the start of the 2nd part
*/
- bool SplitSect( SwFrame* pFrame, bool bApres );
+ SwSectionFrame* SplitSect( SwFrame* pFrameStartAfter, SwFrame* pFramePutAfter );
void DelEmpty( bool bRemove ); // Like Cut(), except for that Follow chaining is maintained
SwFootnoteContFrame* ContainsFootnoteCont( const SwFootnoteContFrame* pCont = nullptr ) const;
bool Growable() const;
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index 6bf44794cbaf..7681324c7eed 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -537,7 +537,7 @@ public:
#endif
/// Hidden
- bool IsHiddenNow() const; // bHidden && pOut == pPrt
+ virtual bool IsHiddenNow() const override; // bHidden && pOut == pPrt
void HideHidden(); // Remove appendage if Hidden
void HideFootnotes(TextFrameIndex nStart, TextFrameIndex nEnd);
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 79235781896d..884d791caebe 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -3363,7 +3363,7 @@ SwHandleAnchorNodeChg::~SwHandleAnchorNodeChg() COVERITY_NOEXCEPT_FALSE
mpWrtShell->SwEditShell::Copy(mpWrtShell);
mpWrtShell->DestroyCursor();
- mpWrtShell->Delete();
+ mpWrtShell->Delete(false);
mpWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
}
diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx
index b9687accdf90..b889de6689ae 100644
--- a/sw/source/core/layout/calcmove.cxx
+++ b/sw/source/core/layout/calcmove.cxx
@@ -163,7 +163,7 @@ bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool & )
if ( nMoveAnyway < 3 )
{
- if ( nSpace )
+ if (nSpace || IsHiddenNow())
{
// Do not notify footnotes which are stuck to the paragraph:
// This would require extremely confusing code, taking into
@@ -195,7 +195,7 @@ bool SwContentFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool & )
}
// Check for space left in new upper
- return nSpace != 0;
+ return nSpace != 0 || IsHiddenNow();
}
}
return false;
@@ -531,7 +531,7 @@ static SwFrame* lcl_NotHiddenPrev( SwFrame* pFrame )
do
{
pRet = lcl_Prev( pRet );
- } while ( pRet && pRet->IsTextFrame() && static_cast<SwTextFrame*>(pRet)->IsHiddenNow() );
+ } while ( pRet && pRet->IsHiddenNow() );
return pRet;
}
@@ -1076,9 +1076,8 @@ void SwContentFrame::MakePrtArea( const SwBorderAttrs &rAttrs )
{
setFramePrintAreaValid(true);
SwRectFnSet aRectFnSet(this);
- const bool bTextFrame = IsTextFrame();
SwTwips nUpper = 0;
- if ( bTextFrame && static_cast<SwTextFrame*>(this)->IsHiddenNow() )
+ if (IsTextFrame() && IsHiddenNow())
{
if ( static_cast<SwTextFrame*>(this)->HasFollow() )
static_cast<SwTextFrame*>(this)->JoinFrame();
@@ -1709,7 +1708,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/)
const bool bMoveFwdInvalid = nullptr != GetIndNext();
const bool bNxtNew =
( 0 == aRectFnSet.GetHeight(pNxt->getFramePrintArea()) ) &&
- (!pNxt->IsTextFrame() ||!static_cast<SwTextFrame*>(pNxt)->IsHiddenNow());
+ !pNxt->IsHiddenNow();
pNxt->Calc(getRootFrame()->GetCurrShell()->GetOut());
@@ -2211,7 +2210,7 @@ bool SwContentFrame::WouldFit_( SwTwips nSpace,
pTmpPrev = nullptr;
else
{
- if( pFrame->IsTextFrame() && static_cast<SwTextFrame*>(pFrame)->IsHiddenNow() )
+ if (pFrame->IsHiddenNow())
pTmpPrev = lcl_NotHiddenPrev( pFrame );
else
pTmpPrev = pFrame;
diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index a35af84d54a1..9468c6283fbe 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -896,7 +896,7 @@ SwFrame *SwFrame::FindNext_()
(!bFootnote || pSct->IsInFootnote() ) )
return pSct;
}
- return pRet;
+ return pRet == this ? nullptr : pRet;
}
// #i27138# - add parameter <_bInSameFootnote>
@@ -1282,11 +1282,7 @@ void SwFrame::InvalidateNextPrtArea()
SwFrame* pNextFrame = FindNext();
// skip empty section frames and hidden text frames
{
- while ( pNextFrame &&
- ( ( pNextFrame->IsSctFrame() &&
- !static_cast<SwSectionFrame*>(pNextFrame)->GetSection() ) ||
- ( pNextFrame->IsTextFrame() &&
- static_cast<SwTextFrame*>(pNextFrame)->IsHiddenNow() ) ) )
+ while (pNextFrame && pNextFrame->IsHiddenNow())
{
pNextFrame = pNextFrame->FindNext();
}
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index d416b637c02f..b29909288056 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1080,6 +1080,18 @@ bool SwFlowFrame::IsPrevObjMove() const
OSL_ENSURE( SwFlowFrame::CastFlowFrame( pPre ), "new flowfrm?" );
if( SwFlowFrame::CastFlowFrame( pPre )->IsAnFollow( this ) )
return false;
+ if (SwFlowFrame::CastFlowFrame(pPre)->IsJoinLocked())
+ {
+ SwBorderAttrAccess baa(SwFrame::GetCache(), pPre);
+ SwBorderAttrs const& rAttrs(*baa.Get());
+ if (SwFlowFrame::CastFlowFrame(pPre)->IsKeep(rAttrs.GetAttrSet().GetKeep(), pPre->GetBreakItem()))
+ { // pPre is currently being formatted - maybe it moved back but
+ // its objects still have the old page's body as
+ // mpVertPosOrientFrame and SwContentFrame::MakeAll() is calling
+ // pNxt->Calc() in this case so allow this frame to move back
+ return false; // too, else pPre is forced to move forward again.
+ }
+ }
SwLayoutFrame* pPreUp = pPre->GetUpper();
// If the upper is a SectionFrame, or a column of a SectionFrame, we're
// allowed to protrude out of it. However, we need to respect the
@@ -1145,8 +1157,7 @@ bool SwFlowFrame::IsPageBreak( bool bAct ) const
// Determine predecessor
const SwFrame *pPrev = m_rThis.FindPrev();
- while ( pPrev && ( !pPrev->IsInDocBody() ||
- ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) )
+ while (pPrev && (!pPrev->IsInDocBody() || pPrev->IsHiddenNow()))
pPrev = pPrev->FindPrev();
if ( pPrev )
@@ -1207,7 +1218,7 @@ bool SwFlowFrame::IsColBreak( bool bAct ) const
// Determine predecessor
const SwFrame *pPrev = m_rThis.FindPrev();
while( pPrev && ( ( !pPrev->IsInDocBody() && !m_rThis.IsInFly() && !m_rThis.FindFooterOrHeader() ) ||
- ( pPrev->IsTextFrame() && static_cast<const SwTextFrame*>(pPrev)->IsHiddenNow() ) ) )
+ pPrev->IsHiddenNow() ) )
pPrev = pPrev->FindPrev();
if ( pPrev )
@@ -1238,6 +1249,14 @@ bool SwFlowFrame::IsColBreak( bool bAct ) const
return false;
}
+// Skip hidden paragraphs and empty sections on the same level
+static const SwFrame* skipHiddenSiblingFrames_(const SwFrame* pFrame)
+{
+ while (pFrame && pFrame->IsHiddenNow())
+ pFrame = pFrame->GetPrev();
+ return pFrame;
+}
+
bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const
{
if( m_rThis.IsInSct() )
@@ -1253,7 +1272,7 @@ bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const
return !pTmp->GetPrev() || IsPageBreak(true);
if( pTmp->IsColumnFrame() && pTmp->GetPrev() )
return IsColBreak( true );
- if( pTmp->IsSctFrame() && ( !bSct || pTmp->GetPrev() ) )
+ if (pTmp->IsSctFrame() && (!bSct || skipHiddenSiblingFrames_(pTmp->GetPrev())))
return false;
pTmp = pTmp->GetUpper();
}
@@ -1275,6 +1294,31 @@ bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const
return pTmp && !pTmp->GetPrev();
}
+// Skip hidden paragraphs and empty sections
+static const SwFrame* skipHiddenFrames_(const SwFrame* pFrame)
+{
+ do
+ {
+ pFrame = skipHiddenSiblingFrames_(pFrame);
+ if (!pFrame || !pFrame->IsSctFrame())
+ return pFrame;
+ // Special case: found previous frame is a section
+ // Search for the last content in the section
+ auto pSectFrame = static_cast<const SwSectionFrame*>(pFrame);
+ pFrame = pSectFrame->FindLastContent();
+ // If the last content is in a table _inside_ the section,
+ // take the table herself.
+ // Correction: Check directly, if table is inside table, instead of indirectly
+ // by checking, if section isn't inside a table
+ if (pFrame && pFrame->IsInTab())
+ {
+ const SwTabFrame* pTableFrame = pFrame->FindTabFrame();
+ if (pSectFrame->IsAnLower(pTableFrame))
+ return pTableFrame;
+ }
+ } while (true);
+}
+
/** helper method to determine previous frame for calculation of the
upper space
@@ -1282,74 +1326,21 @@ bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const
*/
const SwFrame* SwFlowFrame::GetPrevFrameForUpperSpaceCalc_( const SwFrame* _pProposedPrevFrame ) const
{
- const SwFrame* pPrevFrame = _pProposedPrevFrame
- ? _pProposedPrevFrame
- : m_rThis.GetPrev();
-
- // Skip hidden paragraphs and empty sections
- while ( pPrevFrame &&
- ( ( pPrevFrame->IsTextFrame() &&
- static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ||
- ( pPrevFrame->IsSctFrame() &&
- !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) )
- {
- pPrevFrame = pPrevFrame->GetPrev();
- }
+ const SwFrame* pPrevFrame
+ = skipHiddenFrames_(_pProposedPrevFrame ? _pProposedPrevFrame : m_rThis.GetPrev());
+ if (pPrevFrame || !m_rThis.IsInFootnote()
+ || !(m_rThis.IsSctFrame() || !m_rThis.IsInSct() || !m_rThis.FindSctFrame()->IsInFootnote()))
+ return pPrevFrame;
// Special case: no direct previous frame is found but frame is in footnote
// Search for a previous frame in previous footnote,
// if frame isn't in a section, which is also in the footnote
- if ( !pPrevFrame && m_rThis.IsInFootnote() &&
- ( m_rThis.IsSctFrame() ||
- !m_rThis.IsInSct() || !m_rThis.FindSctFrame()->IsInFootnote() ) )
- {
- const SwFootnoteFrame* pPrevFootnoteFrame =
- static_cast<const SwFootnoteFrame*>(m_rThis.FindFootnoteFrame()->GetPrev());
- if ( pPrevFootnoteFrame )
- {
- pPrevFrame = pPrevFootnoteFrame->GetLastLower();
-
- // Skip hidden paragraphs and empty sections
- while ( pPrevFrame &&
- ( ( pPrevFrame->IsTextFrame() &&
- static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ||
- ( pPrevFrame->IsSctFrame() &&
- !static_cast<const SwSectionFrame*>(pPrevFrame)->GetSection() ) ) )
- {
- pPrevFrame = pPrevFrame->GetPrev();
- }
- }
- }
- // Special case: found previous frame is a section
- // Search for the last content in the section
- if( pPrevFrame && pPrevFrame->IsSctFrame() )
- {
- const SwSectionFrame* pPrevSectFrame =
- static_cast<const SwSectionFrame*>(pPrevFrame);
- pPrevFrame = pPrevSectFrame->FindLastContent();
- // If the last content is in a table _inside_ the section,
- // take the table herself.
- // OD 2004-02-18 #106629# - correction:
- // Check directly, if table is inside table, instead of indirectly
- // by checking, if section isn't inside a table
- if ( pPrevFrame && pPrevFrame->IsInTab() )
- {
- const SwTabFrame* pTableFrame = pPrevFrame->FindTabFrame();
- if ( pPrevSectFrame->IsAnLower( pTableFrame ) )
- {
- pPrevFrame = pTableFrame;
- }
- }
- // OD 2004-02-18 #106629# correction: skip hidden text frames
- while ( pPrevFrame &&
- pPrevFrame->IsTextFrame() &&
- static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() )
- {
- pPrevFrame = pPrevFrame->GetPrev();
- }
- }
+ const SwFootnoteFrame* pPrevFootnoteFrame =
+ static_cast<const SwFootnoteFrame*>(m_rThis.FindFootnoteFrame()->GetPrev());
+ if ( pPrevFootnoteFrame )
+ return skipHiddenFrames_(pPrevFootnoteFrame->GetLastLower());
- return pPrevFrame;
+ return nullptr;
}
/// Compare styles attached to these text frames.
@@ -1758,6 +1749,8 @@ SwTwips SwFlowFrame::CalcAddLowerSpaceAsLastInTableCell(
/// Moves the Frame forward if it seems necessary regarding the current conditions and attributes.
bool SwFlowFrame::CheckMoveFwd( bool& rbMakePage, bool bKeep, bool bIgnoreMyOwnKeepValue )
{
+ if (m_rThis.IsHiddenNow())
+ return false;
const SwFrame* pNxt = m_rThis.GetIndNext();
if ( bKeep && //!bMovedBwd &&
@@ -2133,7 +2126,8 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
)
pNewUpper = m_rThis.GetLeaf( MAKEPAGE_FTN, false );
}
- else if ( IsPageBreak( true ) ) // Do we have to respect a PageBreak?
+ // Do we have to respect a PageBreak?
+ else if (IsPageBreak(true) && (!m_rThis.IsInSct() || !m_rThis.FindSctFrame()->IsHiddenNow()))
{
// If the previous page doesn't have a Frame in the body,
// flowing back makes sense despite the PageBreak (otherwise,
@@ -2200,7 +2194,7 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat )
}
}
}
- else if ( IsColBreak( true ) )
+ else if (IsColBreak(true))
{
// If the previous column doesn't contain a ContentFrame, flowing back
// makes sense despite the ColumnBreak, as otherwise we'd get
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index a861dd60013b..111623518f24 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -69,6 +69,7 @@
#include <undobj.hxx>
#include <DocumentSettingManager.hxx>
#include <IDocumentDrawModelAccess.hxx>
+#include <IDocumentLayoutAccess.hxx>
#include <IDocumentTimerAccess.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
@@ -782,11 +783,7 @@ SwContentNotify::~SwContentNotify()
SwFrame* pPrevFrame = pCnt->FindPrev();
// skip empty section frames and hidden text frames
{
- while ( pPrevFrame &&
- ( ( pPrevFrame->IsSctFrame() &&
- !static_cast<SwSectionFrame*>(pPrevFrame)->GetSection() ) ||
- ( pPrevFrame->IsTextFrame() &&
- static_cast<SwTextFrame*>(pPrevFrame)->IsHiddenNow() ) ) )
+ while (pPrevFrame && pPrevFrame->IsHiddenNow())
{
pPrevFrame = pPrevFrame->FindPrev();
}
@@ -1067,6 +1064,12 @@ static bool IsShown(sal_uLong const nIndex,
assert(pFirstNode);
assert(pLastNode);
assert(rAnch.GetAnchorId() != RndStdIds::FLY_AT_FLY);
+ if (*pIter == *pEnd && rAnch.GetAnchorId() == RndStdIds::FLY_AT_CHAR)
+ { // tdf#149595 special case - it *could* be shown if first == last
+ return !IsDestroyFrameAnchoredAtChar(*rAnch.GetContentAnchor(),
+ SwPosition(const_cast<SwTextNode&>(*pFirstNode), 0),
+ SwPosition(const_cast<SwTextNode&>(*pLastNode), pLastNode->Len()));
+ }
for (auto iter = *pIter; iter != *pEnd; ++iter)
{
assert(iter->nStart != iter->nEnd); // TODO possible?
@@ -1161,8 +1164,7 @@ void RemoveHiddenObjsOfNode(SwTextNode const& rNode,
{
SwFormatAnchor const& rAnchor = pFrameFormat->GetAnchor();
if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR
- || (rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR
- && RES_DRAWFRMFMT == pFrameFormat->Which()))
+ || rAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR)
{
assert(rAnchor.GetContentAnchor()->nNode.GetIndex() == rNode.GetIndex());
if (!IsShown(rNode.GetIndex(), rAnchor, pIter, pEnd, pFirstNode, pLastNode))
@@ -1547,10 +1549,20 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
pFrame = pNode->IsTextNode()
? sw::MakeTextFrame(*pNode->GetTextNode(), pLay, eMode)
: pNode->MakeFrame(pLay);
- if( pPageMaker )
+ if (pPageMaker && !pLay->IsHiddenNow())
pPageMaker->CheckInsert( nIndex );
pFrame->InsertBehind( pLay, pPrv );
+ if (!pPrv)
+ {
+ if (SwSectionFrame *const pSection = pLay->FindSctFrame())
+ {
+ if (pSection && pSection->ContainsAny() == pFrame)
+ { // tdf#146258 section PrtArea depends on paragraph upper margin
+ pSection->InvalidatePrt();
+ }
+ }
+ }
// #i27138#
// notify accessibility paragraphs objects about changed
// CONTENT_FLOWS_FROM/_TO relation.
@@ -1682,12 +1694,11 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
continue; // skip it
}
SwSectionNode *pNode = static_cast<SwSectionNode*>(pNd);
- if( pNode->GetSection().CalcHiddenFlag() )
- // is hidden, skip the area
- nIndex = pNode->EndOfSectionIndex();
- else
{
- pFrame = pNode->MakeFrame( pLay );
+ if (pActualSection)
+ pActualSection->SetLastPos(pPrv);
+
+ pFrame = pNode->MakeFrame(pLay, pNode->GetSection().CalcHiddenFlag());
pActualSection.reset( new SwActualSection( pActualSection.release(),
static_cast<SwSectionFrame*>(pFrame), pNode ) );
if ( pActualSection->GetUpper() )
@@ -1719,7 +1730,10 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
static_cast<SwTextFrame*>(pPrv)->Prepare( PREP_QUOVADIS, nullptr, false );
}
}
- if (nIndex + 1 == nEndIndex)
+
+ if (nIndex + 1 == nEndIndex
+ // tdf#136452 may also be needed at end of section
+ || pNode->EndOfSectionIndex() - 1 == nEndIndex)
{ // tdf#131684 tdf#132236 fix upper of frame moved in
// SwUndoDelete; can't be done there unfortunately
// because empty section frames are deleted here
@@ -1831,33 +1845,31 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc,
}
// new section frame
- pFrame = pActualSection->GetSectionNode()->MakeFrame( pLay );
- pFrame->InsertBehind( pLay, pPrv );
- static_cast<SwSectionFrame*>(pFrame)->Init();
-
- // OD 12.08.2003 #i17969# - consider horizontal/vertical layout
- // for setting position at newly inserted frame
- lcl_SetPos( *pFrame, *pLay );
-
- SwSectionFrame* pOuterSectionFrame = pActualSection->GetSectionFrame();
-
- // a follow has to be appended to the new section frame
- SwSectionFrame* pFollow = pOuterSectionFrame ? pOuterSectionFrame->GetFollow() : nullptr;
- if ( pFollow )
+ if (SwSectionFrame* pOuterSectionFrame = pActualSection->GetSectionFrame())
{
- pOuterSectionFrame->SetFollow( nullptr );
- pOuterSectionFrame->InvalidateSize();
- static_cast<SwSectionFrame*>(pFrame)->SetFollow( pFollow );
- }
+ // Splitting moves the trailing content to the next frame
+ pFrame = pOuterSectionFrame->SplitSect(pActualSection->GetLastPos(), pPrv);
- // We don't want to leave empty parts back.
- if (pOuterSectionFrame &&
- ! pOuterSectionFrame->IsColLocked() &&
- ! pOuterSectionFrame->ContainsContent() )
+ // We don't want to leave empty parts back.
+ if (! pOuterSectionFrame->IsColLocked() &&
+ ! pOuterSectionFrame->ContainsContent() )
+ {
+ pOuterSectionFrame->DelEmpty( true );
+ SwFrame::DestroyFrame(pOuterSectionFrame);
+ }
+ }
+ else
{
- pOuterSectionFrame->DelEmpty( true );
- SwFrame::DestroyFrame(pOuterSectionFrame);
+ pFrame = pActualSection->GetSectionNode()->MakeFrame(
+ pLay, pActualSection->GetSectionNode()->GetSection().IsHiddenFlag());
+ pFrame->InsertBehind( pLay, pPrv );
+ static_cast<SwSectionFrame*>(pFrame)->Init();
+
+ // OD 12.08.2003 #i17969# - consider horizontal/vertical layout
+ // for setting position at newly inserted frame
+ lcl_SetPos( *pFrame, *pLay );
}
+
pActualSection->SetSectionFrame( static_cast<SwSectionFrame*>(pFrame) );
pLay = static_cast<SwLayoutFrame*>(pFrame);
@@ -1941,8 +1953,10 @@ void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
SwNodeIndex aTmp( rSttIdx );
sal_uLong nEndIdx = rEndIdx.GetIndex();
+ // TODO for multiple layouts there should be a loop here
SwNode* pNd = pDoc->GetNodes().FindPrvNxtFrameNode( aTmp,
- pDoc->GetNodes()[ nEndIdx-1 ]);
+ pDoc->GetNodes()[ nEndIdx-1 ],
+ pDoc->getIDocumentLayoutAccess().GetCurrentLayout());
if ( pNd )
{
bool bApres = aTmp < rSttIdx;
@@ -2080,20 +2094,7 @@ void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
}
else
{
- bool bSplit;
SwFrame* pPrv = bApres ? pFrame : pFrame->GetPrev();
- // If the section frame is inserted into another one, it must be split.
- if( pSct && rSttIdx.GetNode().IsSectionNode() )
- {
- bSplit = pSct->SplitSect( pFrame, bApres );
- if( !bSplit && !bApres )
- {
- pUpper = pSct->GetUpper();
- pPrv = pSct->GetPrev();
- }
- }
- else
- bSplit = false;
::InsertCnt_( pUpper, pDoc, rSttIdx.GetIndex(), false,
nEndIdx, pPrv, eMode );
@@ -2106,10 +2107,6 @@ void MakeFrames( SwDoc *pDoc, const SwNodeIndex &rSttIdx,
AppendAllObjs( pTable, pUpper );
}
- // If nothing was added (e.g. a hidden section), the split must be reversed.
- if( bSplit && pSct && pSct->GetNext()
- && pSct->GetNext()->IsSctFrame() )
- pSct->MergeNext( static_cast<SwSectionFrame*>(pSct->GetNext()) );
if( pFrame->IsInFly() )
pFrame->FindFlyFrame()->Invalidate_();
if( pFrame->IsInTab() )
@@ -2415,8 +2412,7 @@ void SwBorderAttrs::CalcJoinedWithPrev( const SwFrame& _rFrame,
// one as previous frame.
const SwFrame* pPrevFrame = _pPrevFrame ? _pPrevFrame : _rFrame.GetPrev();
// OD 2004-02-13 #i25029# - skip hidden text frames.
- while ( pPrevFrame && pPrevFrame->IsTextFrame() &&
- static_cast<const SwTextFrame*>(pPrevFrame)->IsHiddenNow() )
+ while (pPrevFrame && pPrevFrame->IsHiddenNow())
{
pPrevFrame = pPrevFrame->GetPrev();
}
@@ -2447,8 +2443,7 @@ void SwBorderAttrs::CalcJoinedWithNext( const SwFrame& _rFrame )
// corresponding attribute set is set at current text frame.
// OD 2004-02-13 #i25029# - get next frame, but skip hidden text frames.
const SwFrame* pNextFrame = _rFrame.GetNext();
- while ( pNextFrame && pNextFrame->IsTextFrame() &&
- static_cast<const SwTextFrame*>(pNextFrame)->IsHiddenNow() )
+ while (pNextFrame && pNextFrame->IsHiddenNow())
{
pNextFrame = pNextFrame->GetNext();
}
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 9573944b71d1..9498cd1e13a6 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2863,6 +2863,9 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" );
pTmpNxt = static_cast<SwTabFrame*>(pTmp);
}
+ // we will dereference pNewUp in the following MoveSubTree call
+ // so it certainly should not be deleted before that
+ SwFrameDeleteGuard aDeleteGuard(pNewUp);
pTmpNxt->MoveSubTree( pTmpFootnote, pNewUp->GetNext() );
}
}
@@ -2952,13 +2955,9 @@ SwContentFrame* SwFootnoteFrame::FindLastContent()
while ( pTmpLastLower && pTmpLastLower->GetNext() )
{
pTmpLastLower = pTmpLastLower->GetNext();
- if ( ( pTmpLastLower->IsTextFrame() &&
- !static_cast<SwTextFrame*>(pTmpLastLower)->IsHiddenNow() ) ||
- ( pTmpLastLower->IsSctFrame() &&
- static_cast<SwSectionFrame*>(pTmpLastLower)->GetSection() &&
- static_cast<SwSectionFrame*>(pTmpLastLower)->ContainsContent() ) ||
- ( pTmpLastLower->IsTabFrame() &&
- static_cast<SwTabFrame*>(pTmpLastLower)->ContainsContent() ) )
+ if (!pTmpLastLower->IsHiddenNow()
+ && (!pTmpLastLower->IsLayoutFrame()
+ || static_cast<SwLayoutFrame*>(pTmpLastLower)->ContainsContent()))
{
pLastLowerOfFootnote = pTmpLastLower;
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 04201e1c6f5e..2a08b22fbcdb 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -282,11 +282,12 @@ bool SwLayAction::IsInterrupt()
void SwLayAction::Reset()
{
+ SetAgain(false);
m_pOptTab = nullptr;
m_nStartTicks = std::clock();
m_nEndPage = m_nPreInvaPage = m_nCheckPageNum = USHRT_MAX;
m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
- m_bInterrupt = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bReschedule =
+ m_bInterrupt = m_bNextCycle = m_bCalcLayout = m_bReschedule =
m_bUpdateExpFields = m_bBrowseActionStop = false;
m_pCurPage = nullptr;
}
@@ -303,7 +304,8 @@ bool SwLayAction::RemoveEmptyBrowserPages()
do
{
if ( (pPage->GetSortedObjs() && pPage->GetSortedObjs()->size()) ||
- pPage->ContainsContent() )
+ pPage->ContainsContent() ||
+ pPage->FindFootnoteCont() )
pPage = static_cast<SwPageFrame*>(pPage->GetNext());
else
{
@@ -318,6 +320,53 @@ bool SwLayAction::RemoveEmptyBrowserPages()
return bRet;
}
+void SwLayAction::SetAgain(bool bAgain)
+{
+ if (bAgain == m_bAgain)
+ return;
+
+ m_bAgain = bAgain;
+
+ assert(m_aFrameStack.size() == m_aFrameDeleteGuards.size());
+ size_t nCount = m_aFrameStack.size();
+ if (m_bAgain)
+ {
+ // LayAction::FormatLayout is now flagged to exit early and will avoid
+ // dereferencing any SwFrames in the stack of FormatLayouts so allow
+ // their deletion
+ for (size_t i = 0; i < nCount; ++i)
+ m_aFrameDeleteGuards[i].reset();
+ }
+ else
+ {
+ // LayAction::FormatLayout is now continue normally and will
+ // dereference the top SwFrame in the stack of m_aFrameStack as each
+ // FormatLevel returns so disallow their deletion
+ for (size_t i = 0; i < nCount; ++i)
+ m_aFrameDeleteGuards[i] = std::make_unique<SwFrameDeleteGuard>(m_aFrameStack[i]);
+ }
+}
+
+void SwLayAction::PushFormatLayout(SwFrame* pLow)
+{
+ /* Workaround crash seen in crashtesting with fdo53985-1.docx
+
+ Lock pLow against getting deleted when it will be dereferenced
+ after FormatLayout
+
+ If SetAgain is called to make SwLayAction exit early to avoid that
+ dereference, then it clears these guards
+ */
+ m_aFrameStack.push_back(pLow);
+ m_aFrameDeleteGuards.push_back(std::make_unique<SwFrameDeleteGuard>(pLow));
+}
+
+void SwLayAction::PopFormatLayout()
+{
+ m_aFrameDeleteGuards.pop_back();
+ m_aFrameStack.pop_back();
+}
+
void SwLayAction::Action(OutputDevice* pRenderContext)
{
m_bActionInProgress = true;
@@ -344,12 +393,15 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
SetCheckPages( false );
InternalAction(pRenderContext);
- m_bAgain |= RemoveEmptyBrowserPages();
+ if (RemoveEmptyBrowserPages())
+ SetAgain(true);
while ( IsAgain() )
{
- m_bAgain = m_bNextCycle = false;
+ SetAgain(false);
+ m_bNextCycle = false;
InternalAction(pRenderContext);
- m_bAgain |= RemoveEmptyBrowserPages();
+ if (RemoveEmptyBrowserPages())
+ SetAgain(true);
}
m_pRoot->DeleteEmptySct();
@@ -637,7 +689,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
bool bOld = IsAgain();
m_pRoot->RemoveSuperfluous();
- m_bAgain = bOld;
+ SetAgain(bOld);
}
if ( IsAgain() )
{
@@ -1370,7 +1422,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
}
// Skip the ones already registered for deletion
else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() )
+ {
+ PushFormatLayout(pLow);
bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrame*>(pLow), bAddRect );
+ PopFormatLayout();
+ }
}
else if ( m_pImp->GetShell()->IsPaintLocked() )
// Shortcut to minimize the cycles. With Lock, the
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 9dc5a916b25f..6dfa4b507639 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -85,6 +85,7 @@ class SwActualSection
{
SwActualSection *pUpper;
SwSectionFrame *pSectFrame;
+ SwFrame* m_pLastPos = nullptr; // Split it *after* this child frame
SwSectionNode *pSectNode;
public:
SwActualSection( SwActualSection *pUpper,
@@ -96,6 +97,8 @@ public:
SwSectionNode *GetSectionNode() { return pSectNode;}
void SetUpper(SwActualSection *p) { pUpper = p; }
SwActualSection *GetUpper() { return pUpper; }
+ void SetLastPos(SwFrame* p) { m_pLastPos = p; }
+ SwFrame* GetLastPos() const { return m_pLastPos; }
};
/// Helps during the InsertCnt_ function to create new pages.
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 1d1f4597fcf2..2b3c18f981b0 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -500,6 +500,11 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 );
::InsertCnt_( pLay, pDoc, aTmp.GetIndex(), true );
+
+ // tdf#156077 create all pages for at-page anchored flys now because all
+ // these flys must be attached to some page when Init() is finished
+ AssertFlyPages();
+
//Remove masters that haven't been replaced yet from the list.
RemoveMasterObjs( mpDrawPage );
if( rSettingAccess.get(DocumentSettingId::GLOBAL_DOCUMENT) )
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 1ba020a84901..957109ddf460 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -293,7 +293,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
{
// notify layout action, thus is can restart the layout process on
// a previous page.
- GetLayAction()->SetAgain();
+ GetLayAction()->SetAgain(true);
}
else
{
@@ -641,6 +641,7 @@ static void lcl_FormatContentOfLayoutFrame( SwLayoutFrame* pLayFrame,
if ( pLowerFrame->IsLayoutFrame() )
{
SwFrameDeleteGuard aCrudeHack(pLowerFrame); // ??? any issue setting this for non-footnote frames?
+ // prevent moving footnotes by formatting if they are already being moved
lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pLowerFrame),
pLastLowerFrame );
}
@@ -686,21 +687,46 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// for follow text frames.
if ( !_rAnchorTextFrame.IsFollow() )
{
+ // In case the anchor frame is in a column or section, format its
+ // previous frames first - but don't jump out of the current layout
+ // environment, e.g. from footnotes into the footnote boss.
+ SwFrame * pSectFrame(nullptr);
+ SwFrame * pColFrameOfAnchor(nullptr);
+ for (SwFrame* pUpper = _rAnchorTextFrame.GetUpper();
+ pUpper != nullptr; pUpper = pUpper->GetUpper())
+ {
+ if (pUpper->IsCellFrame())
+ {
+ break; // apparently nothing to be done?
+ }
+ if (pUpper->IsFootnoteFrame())
+ {
+ SAL_INFO_IF(pColFrameOfAnchor == nullptr && pUpper->FindColFrame(),
+ "sw.layout", "tdf#122894 skipping column for footnote in column");
+ break; // stop: prevent crash in case footnotes are being moved
+ }
+ if (pUpper->IsSctFrame())
+ {
+ pColFrameOfAnchor = nullptr;
+ pSectFrame = pUpper;
+ break;
+ }
+ if (pColFrameOfAnchor != nullptr)
+ { // parent of column not a section frame => column not in section
+ break;
+ }
+ if (pUpper->IsColumnFrame())
+ {
+ pColFrameOfAnchor = pUpper;
+ }
+ }
+
// if anchor frame is directly inside a section, format this section and
// its previous frames.
// Note: It's a very simple format without formatting objects.
- if ( _rAnchorTextFrame.IsInSct() )
+ if (pSectFrame)
{
- SwFrame* pSectFrame = _rAnchorTextFrame.GetUpper();
- while ( pSectFrame )
- {
- if ( pSectFrame->IsSctFrame() || pSectFrame->IsCellFrame() )
- {
- break;
- }
- pSectFrame = pSectFrame->GetUpper();
- }
- if ( pSectFrame && pSectFrame->IsSctFrame() )
+ assert(pSectFrame->IsSctFrame());
{
SwFrameDeleteGuard aDeleteGuard(&_rAnchorTextFrame);
// #i44049#
@@ -711,6 +737,8 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// Thus, check for valid <pFrame>.
while ( pFrame && pFrame != pSectFrame )
{
+ SwFrameDeleteGuard aDeleteFrameGuard(pFrame);
+
if ( pFrame->IsLayoutFrame() )
lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) );
else
@@ -728,9 +756,9 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// #i40140# - if anchor frame is inside a column,
// format the content of the previous columns.
// Note: It's a very simple format without formatting objects.
- SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame();
- if ( pColFrameOfAnchor )
+ if (pColFrameOfAnchor)
{
+ assert(pColFrameOfAnchor->IsColumnFrame());
// #i44049#
_rAnchorTextFrame.LockJoin();
SwFrame* pColFrame = pColFrameOfAnchor->GetUpper()->GetLower();
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index a684b1602a1a..8056c85c2d4c 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -53,6 +53,7 @@
#include <tabfrm.hxx>
#include <txtfrm.hxx>
#include <notxtfrm.hxx>
+#include <sectfrm.hxx>
#include <layact.hxx>
#include <flyfrms.hxx>
#include <htmltbl.hxx>
@@ -284,7 +285,7 @@ void SwPageFrame::DestroyImpl()
SwViewShellImp *pImp = pSh->Imp();
pImp->SetFirstVisPageInvalid();
if ( pImp->IsAction() )
- pImp->GetLayAction().SetAgain();
+ pImp->GetLayAction().SetAgain(true);
// #i9719# - retouche area of page
// including border and shadow area.
const bool bRightSidebar = (SidebarPosition() == sw::sidebarwindows::SidebarPosition::RIGHT);
@@ -775,7 +776,13 @@ SwPageDesc *SwPageFrame::FindPageDesc()
return pRet;
}
- SwFrame *pFlow = FindFirstBodyContent();
+ SwContentFrame* pFirstContent = FindFirstBodyContent();
+ while (pFirstContent && pFirstContent->IsInSct()
+ && pFirstContent->FindSctFrame()->IsHiddenNow())
+ {
+ pFirstContent = pFirstContent->GetNextContentFrame();
+ }
+ SwFrame* pFlow = pFirstContent;
if ( pFlow && pFlow->IsInTab() )
pFlow = pFlow->FindTabFrame();
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 524562585bd1..4f4e36ca5711 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -182,6 +182,13 @@ SwSectionFrame::~SwSectionFrame()
{
}
+//virtual
+bool SwSectionFrame::IsHiddenNow() const
+{
+ const auto* pSection = GetSection();
+ return !pSection || pSection->CalcHiddenFlag();
+}
+
void SwSectionFrame::DelEmpty( bool bRemove )
{
if( IsColLocked() )
@@ -498,50 +505,53 @@ void SwSectionFrame::MergeNext( SwSectionFrame* pNxt )
}
/**
-|* Divides a SectionFrame into two parts. The second one starts with the
-|* passed frame.
+|* Divides a SectionFrame into two parts. The content of the second one
+|* starts after pFrameStartAfter; the created second section frame itself
+|* is put after pFramePutAfter.
+|* If pFrameStartAfter is nullptr, the split happens at the start.
|* This is required when inserting an inner section, because the MoveFwd
|* cannot have the desired effect within a frame or a table cell.
+|* Splitting at the start/end makes sense, because the empty frame would
+|* be removed after the InsertCnt_ finished.
|*/
-bool SwSectionFrame::SplitSect( SwFrame* pFrame, bool bApres )
+SwSectionFrame* SwSectionFrame::SplitSect( SwFrame* pFrameStartAfter, SwFrame* pFramePutAfter )
{
- assert(pFrame && "SplitSect: Why?");
- SwFrame* pOther = bApres ? pFrame->FindNext() : pFrame->FindPrev();
- if( !pOther )
- return false;
- SwSectionFrame* pSect = pOther->FindSctFrame();
- if( pSect != this )
- return false;
+ assert(!pFrameStartAfter || pFrameStartAfter->FindSctFrame() == this);
+ SwFrame* pSav = pFrameStartAfter ? pFrameStartAfter->FindNext() : ContainsAny();
+ if (pSav && pSav->FindSctFrame() != this)
+ pSav = nullptr; // we are at the very end
+
// Put the content aside
- SwFrame* pSav = ::SaveContent( this, bApres ? pOther : pFrame );
- OSL_ENSURE( pSav, "SplitSect: What's on?" );
- if( pSav ) // be robust
- { // Create a new SctFrame, not as a Follower/master
- SwSectionFrame* pNew = new SwSectionFrame( *pSect->GetSection(), pSect );
- pNew->InsertBehind( pSect->GetUpper(), pSect );
- pNew->Init();
- SwRectFnSet aRectFnSet(this);
- aRectFnSet.MakePos( *pNew, nullptr, pSect, true );
- // OD 25.03.2003 #108339# - restore content:
- // determine layout frame for restoring content after the initialization
- // of the section frame. In the section initialization the columns are
- // created.
- {
- SwLayoutFrame* pLay = pNew;
- // Search for last layout frame, e.g. for columned sections.
- while( pLay->Lower() && pLay->Lower()->IsLayoutFrame() )
- pLay = static_cast<SwLayoutFrame*>(pLay->Lower());
- ::RestoreContent( pSav, pLay, nullptr );
- }
- InvalidateSize_();
- if( HasFollow() )
- {
- pNew->SetFollow( GetFollow() );
- SetFollow( nullptr );
- }
- return true;
+ if (pSav)
+ pSav = ::SaveContent( this, pSav );
+
+ // Create a new SctFrame, not as a Follower/master
+ if (!pFramePutAfter)
+ pFramePutAfter = this;
+ SwSectionFrame* pNew = new SwSectionFrame( *GetSection(), this );
+ pNew->InsertBehind( pFramePutAfter->GetUpper(), pFramePutAfter );
+ pNew->Init();
+ SwRectFnSet aRectFnSet(this);
+ aRectFnSet.MakePos( *pNew, nullptr, pFramePutAfter, true );
+ // OD 25.03.2003 #108339# - restore content:
+ // determine layout frame for restoring content after the initialization
+ // of the section frame. In the section initialization the columns are
+ // created.
+ if (pSav)
+ {
+ SwLayoutFrame* pLay = pNew;
+ // Search for last layout frame, e.g. for columned sections.
+ while( pLay->Lower() && pLay->Lower()->IsLayoutFrame() )
+ pLay = static_cast<SwLayoutFrame*>(pLay->Lower());
+ ::RestoreContent( pSav, pLay, nullptr );
+ }
+ InvalidateSize_();
+ if( HasFollow() )
+ {
+ pNew->SetFollow( GetFollow() );
+ SetFollow( nullptr );
}
- return false;
+ return pNew;
}
/**
@@ -1338,6 +1348,20 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA
SwRectFnSet aRectFnSet(this);
+ if (GetSection()->CalcHiddenFlag())
+ {
+ {
+ SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this);
+ aRectFnSet.SetHeight(aFrm, 0);
+ }
+ {
+ SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
+ aRectFnSet.SetHeight(aPrt, 0);
+ }
+ setFrameAreaSizeValid(true);
+ setFramePrintAreaValid(true);
+ }
+
if ( !isFramePrintAreaValid() )
{
PROTOCOL( this, PROT::PrintArea, DbgAction::NONE, nullptr )
@@ -2145,6 +2169,11 @@ bool SwSectionFrame::Growable() const
SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst )
{
+ if (GetSection()->CalcHiddenFlag())
+ {
+ return 0;
+ }
+
if ( !IsColLocked() && !HasFixSize() )
{
SwRectFnSet aRectFnSet(this);
@@ -2582,6 +2611,18 @@ void SwSectionFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
if ( aOldSet.Count() || aNewSet.Count() )
SwLayoutFrame::Modify( &aOldSet, &aNewSet );
}
+ else if (pNew && (RES_SECTION_HIDDEN == pNew->Which()
+ || RES_SECTION_NOT_HIDDEN == pNew->Which()))
+ {
+ InvalidateAll();
+ InvalidateObjs(false);
+
+ for (SwFrame* pLowerFrame = Lower(); pLowerFrame; pLowerFrame = pLowerFrame->GetNext())
+ {
+ pLowerFrame->InvalidateAll();
+ pLowerFrame->InvalidateObjs(false);
+ }
+ }
else
UpdateAttr_( pOld, pNew, nInvFlags );
@@ -2863,7 +2904,8 @@ void SwRootFrame::DeleteEmptySct_()
mpDestroy->erase( mpDestroy->begin() );
OSL_ENSURE( !pSect->IsColLocked() && !pSect->IsJoinLocked(),
"DeleteEmptySct: Locked SectionFrame" );
- if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() )
+ SAL_WARN_IF(pSect->IsDeleteForbidden(), "sw.layout", "not allowed delete SwFrame");
+ if( !pSect->getFrameArea().HasArea() && !pSect->ContainsContent() && !pSect->IsDeleteForbidden() )
{
SwLayoutFrame* pUp = pSect->GetUpper();
pSect->RemoveFromLayout();
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 060d5151e3bc..dd0d6bbc9dd5 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -23,6 +23,7 @@
#include <viewimp.hxx>
#include <fesh.hxx>
#include <swtable.hxx>
+#include <deletelistener.hxx>
#include <dflyobj.hxx>
#include <anchoreddrawobject.hxx>
#include <fmtanchr.hxx>
@@ -1343,13 +1344,127 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
return bRet;
}
+namespace
+{
+ bool CanDeleteFollow(SwTabFrame *pFoll)
+ {
+ if (pFoll->IsJoinLocked())
+ return false;
+
+ if (pFoll->IsDeleteForbidden())
+ {
+ SAL_WARN("sw.layout", "Delete Forbidden");
+ return false;
+ }
+
+ return true;
+ }
+
+ auto IsAllHiddenSection(SwSectionFrame const& rSection) -> bool
+ {
+ if (rSection.IsHiddenNow())
+ return true;
+ for (SwFrame const* pFrame = rSection.Lower(); pFrame; pFrame = pFrame->GetNext())
+ {
+ if (pFrame->IsColumnFrame())
+ {
+ return false; // adds some padding
+ }
+ else if (pFrame->IsSctFrame())
+ {
+ assert(false); // these aren't nested?
+ if (!IsAllHiddenSection(*static_cast<SwSectionFrame const*>(pFrame)))
+ {
+ return false;
+ }
+ }
+ else if (pFrame->IsTabFrame())
+ {
+ return false; // presumably
+ }
+ else if (pFrame->IsTextFrame())
+ {
+ if (!pFrame->IsHiddenNow())
+ {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ auto IsAllHiddenRow(SwRowFrame const& rRow, SwTabFrame const& rTab) -> bool;
+
+ auto IsAllHiddenCell(SwCellFrame const& rCell, SwRowFrame const& rRow, SwTabFrame const& rTab) -> bool
+ {
+ for (SwFrame const* pFrame = rCell.Lower(); pFrame; pFrame = pFrame->GetNext())
+ {
+ if (pFrame->IsRowFrame())
+ {
+ if (!IsAllHiddenRow(*static_cast<SwRowFrame const*>(pFrame), rTab))
+ {
+ return false;
+ }
+ }
+ else if (pFrame->IsSctFrame())
+ {
+ if (!IsAllHiddenSection(*static_cast<SwSectionFrame const*>(pFrame)))
+ {
+ return false;
+ }
+ }
+ else if (pFrame->IsTabFrame())
+ {
+ return false; // presumably
+ }
+ else if (pFrame->IsTextFrame())
+ {
+ if (!pFrame->IsHiddenNow())
+ {
+ return false;
+ }
+ }
+ }
+ if (rTab.IsCollapsingBorders() && !rCell.Lower()->IsRowFrame())
+ {
+ if (rRow.GetTopMarginForLowers() != 0
+ || rRow.GetBottomMarginForLowers() != 0)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ SwBorderAttrAccess border(SwFrame::GetCache(), &rCell);
+ if (border.Get()->CalcTop() != 0 || border.Get()->CalcBottom() != 0)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ auto IsAllHiddenRow(SwRowFrame const& rRow, SwTabFrame const& rTab) -> bool
+ {
+ for (SwFrame const* pCell = rRow.Lower(); pCell; pCell = pCell->GetNext())
+ {
+ if (!IsAllHiddenCell(*static_cast<SwCellFrame const*>(pCell), rRow, rTab))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+} // namespace
+
void SwTabFrame::Join()
{
OSL_ENSURE( !HasFollowFlowLine(), "Joining follow flow line" );
SwTabFrame *pFoll = GetFollow();
- if (pFoll && !pFoll->IsJoinLocked())
+ if (pFoll && CanDeleteFollow(pFoll))
{
SwRectFnSet aRectFnSet(this);
pFoll->Cut(); //Cut out first to avoid unnecessary notifications.
@@ -1360,11 +1475,20 @@ void SwTabFrame::Join()
SwFrame* pPrv = GetLastLower();
SwTwips nHeight = 0; //Total height of the inserted rows as return value.
+ bool isAllHidden(true);
while ( pRow )
{
pNxt = pRow->GetNext();
nHeight += aRectFnSet.GetHeight(pRow->getFrameArea());
+ if (nHeight != 0)
+ {
+ isAllHidden = false;
+ }
+ if (isAllHidden)
+ {
+ isAllHidden = IsAllHiddenRow(*static_cast<SwRowFrame *>(pRow), *this);
+ }
pRow->RemoveFromLayout();
pRow->InvalidateAll_();
pRow->InsertBehind( this, pPrv );
@@ -1378,6 +1502,18 @@ void SwTabFrame::Join()
SwFrame::DestroyFrame(pFoll);
Grow( nHeight );
+
+ // In case the row does not have a height, Grow(nHeight) did nothing.
+ // If this is not invalidated, subsequent follows may never be joined.
+ // Try to guess if the height of the row will be 0. If the document
+ // was just loaded, it will be 0 in any case, but probably it's not a good
+ // idea to join *all* follows for a newly loaded document, it would be
+ // easier not to split the table in the first place; presumably it is split
+ // because that improves performance.
+ if (isAllHidden)
+ {
+ InvalidateSize_();
+ }
}
}
@@ -1578,6 +1714,8 @@ static bool lcl_InnerCalcLayout( SwFrame *pFrame,
if ( pFrame->IsLayoutFrame() &&
( !_bOnlyRowsAndCells || pFrame->IsRowFrame() || pFrame->IsCellFrame() ) )
{
+ SwFrameDeleteGuard aDeleteGuard(pFrame);
+
// #130744# An invalid locked table frame will
// not be calculated => It will not become valid =>
// Loop in lcl_RecalcRow(). Therefore we do not consider them for bRet.
@@ -1808,6 +1946,14 @@ namespace {
return bRet;
}
}
+
+// extern because static can't be friend
+void FriendHackInvalidateRowFrame(SwFrameAreaDefinition & rRowFrame)
+{
+ // hilariously static_cast<SwTabFrame*>(GetLower()) would not require friend declaration, but it's UB...
+ rRowFrame.setFrameAreaPositionValid(false);
+}
+
void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 )
@@ -1837,7 +1983,7 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// is not locked. Otherwise, join will not be performed and this loop
// will be endless.
while ( GetNext() && GetNext() == GetFollow() &&
- !GetFollow()->IsJoinLocked()
+ CanDeleteFollow(GetFollow())
)
{
if ( HasFollowFlowLine() )
@@ -1990,8 +2136,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
pLayout->GetBrowseWidthByTabFrame( *this ) );
- pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
- pAttrs = pAccess->Get();
}
setFramePrintAreaValid(false);
@@ -2003,6 +2147,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
{
m_bCalcLowers = true;
}
+ if (GetLower())
+ { // it's possible that the rows already have valid pos - but it is surely wrong if the table's pos changed!
+ FriendHackInvalidateRowFrame(*GetLower());
+ }
}
//We need to know the height of the first row, because the master needs
@@ -2020,6 +2168,12 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
const long nOldPrtWidth = aRectFnSet.GetWidth(getFramePrintArea());
const long nOldFrameWidth = aRectFnSet.GetWidth(getFrameArea());
const Point aOldPrtPos = aRectFnSet.GetPos(getFramePrintArea());
+
+ if (!pAccess)
+ {
+ pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
+ pAttrs = pAccess->Get();
+ }
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
SwHTMLTableLayout *pLayout = GetTable()->GetHTMLTableLayout();
@@ -2030,8 +2184,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAccess.reset();
m_bCalcLowers |= pLayout->Resize(
pLayout->GetBrowseWidthByTabFrame( *this ) );
- pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
- pAttrs = pAccess->Get();
}
if ( aOldPrtPos != aRectFnSet.GetPos(getFramePrintArea()) )
aNotify.SetLowersComplete( false );
@@ -2059,12 +2211,18 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
}
SwFootnoteBossFrame *pOldBoss = bFootnotesInDoc ? FindFootnoteBossFrame( true ) : nullptr;
bool bReformat;
+ std::optional<SfxDeleteListener> oDeleteListener;
+ if (pOldBoss)
+ oDeleteListener.emplace(*pOldBoss);
+ SwFrameDeleteGuard g(this);
if ( MoveBwd( bReformat ) )
{
+ SAL_WARN_IF(oDeleteListener && oDeleteListener->WasDeleted(), "sw.layout", "SwFootnoteBossFrame unexpectedly deleted");
+
aRectFnSet.Refresh(this);
bMovedBwd = true;
aNotify.SetLowersComplete( false );
- if ( bFootnotesInDoc )
+ if (bFootnotesInDoc && !oDeleteListener->WasDeleted())
MoveLowerFootnotes( nullptr, pOldBoss, nullptr, true );
if ( bReformat || bKeep )
{
@@ -2079,15 +2237,22 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pAccess.reset();
m_bCalcLowers |= pHTMLLayout->Resize(
pHTMLLayout->GetBrowseWidthByTabFrame( *this ) );
+ }
+
+ setFramePrintAreaValid(false);
+ if (!pAccess)
+ {
pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
pAttrs = pAccess->Get();
}
-
- setFramePrintAreaValid(false);
Format( getRootFrame()->GetCurrShell()->GetOut(), pAttrs );
}
+
+ pAccess.reset();
+
lcl_RecalcTable( *this, nullptr, aNotify );
+
m_bLowersFormatted = true;
if ( bKeep && KEEPTAB )
{
@@ -2251,11 +2416,18 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// 6. There is no section change behind the table (see IsKeep)
// 7. The last table row wants to keep with its next.
const SwRowFrame* pLastRow = static_cast<const SwRowFrame*>(GetLastLower());
- if (pLastRow
- && IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), true)
- && pLastRow->ShouldRowKeepWithNext())
+ if (pLastRow)
{
- bFormat = true;
+ if (!pAccess)
+ {
+ pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
+ pAttrs = pAccess->Get();
+ }
+ if (IsKeep(pAttrs->GetAttrSet().GetKeep(), GetBreakItem(), true)
+ && pLastRow->ShouldRowKeepWithNext())
+ {
+ bFormat = true;
+ }
}
}
@@ -2269,9 +2441,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
// is found, get its first content.
const SwFrame* pTmpNxt = sw_FormatNextContentForKeep( this );
- pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
- pAttrs = pAccess->Get();
-
// The last row wants to keep with the frame behind the table.
// Check if the next frame is on a different page and valid.
// In this case we do a magic trick:
@@ -2512,9 +2681,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
GetFollow()->MakeAll(pRenderContext);
- pAccess = std::make_unique<SwBorderAttrAccess>(SwFrame::GetCache(), this);
- pAttrs = pAccess->Get();
-
GetFollow()->SetLowersFormatted(false);
// #i43913# - lock follow table
// to avoid its formatting during the format of
@@ -5476,9 +5642,12 @@ static SwTwips lcl_CalcHeightOfFirstContentLine( const SwRowFrame& rSourceLine )
const SwRowFrame* pTmpSourceRow = static_cast<const SwRowFrame*>(pCurrSourceCell->Lower());
nTmpHeight = lcl_CalcHeightOfFirstContentLine( *pTmpSourceRow );
}
- else if ( pTmp->IsTabFrame() )
+ else if (pTmp->IsTabFrame() || (pTmp->IsSctFrame() && pTmp->GetLower() && pTmp->GetLower()->IsTabFrame()))
{
- nTmpHeight = static_cast<const SwTabFrame*>(pTmp)->CalcHeightOfFirstContentLine();
+ SwTabFrame const*const pTabFrame(pTmp->IsTabFrame()
+ ? static_cast<SwTabFrame const*>(pTmp)
+ : static_cast<SwTabFrame const*>(pTmp->GetLower()));
+ nTmpHeight = pTabFrame->CalcHeightOfFirstContentLine();
}
else if (pTmp->IsTextFrame() || (pTmp->IsSctFrame() && pTmp->GetLower() && pTmp->GetLower()->IsTextFrame()))
{
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 9079d0a9cbab..3dd5cc223038 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -49,6 +49,7 @@
#include <frmtool.hxx>
#include <ndtxt.hxx>
#include <undobj.hxx>
+#include <sectfrm.hxx>
#include <cfloat>
#include <swselectionlist.hxx>
@@ -801,8 +802,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
//If I'm in the DocumentBody, I want to stay there.
if ( pStart->IsInDocBody() )
{
- while ( pCnt && (!pCnt->IsInDocBody() ||
- (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow())))
+ while (pCnt && (!pCnt->IsInDocBody() || pCnt->IsHiddenNow()))
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -813,8 +813,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
//case of necessity.
else if ( pStart->IsInFootnote() )
{
- while ( pCnt && (!pCnt->IsInFootnote() ||
- (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow())))
+ while (pCnt && (!pCnt->IsInFootnote() || pCnt->IsHiddenNow()))
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -824,7 +823,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
//In Flys we can go ahead blindly as long as we find a Content.
else if ( pStart->IsInFly() )
{
- if ( pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow() )
+ if (pCnt && pCnt->IsHiddenNow())
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -848,7 +847,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
}
if ( !bSame )
pCnt = nullptr;
- else if (pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow()) // i73332
+ else if (pCnt->IsHiddenNow()) // i73332
{
pCnt = (*fnNxtPrv)( pCnt );
pCnt = ::lcl_MissProtectedFrames( pCnt, fnNxtPrv, true, bInReadOnly, bTableSel );
@@ -931,8 +930,7 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart,
}
}
- } while ( !bEnd ||
- (pCnt && pCnt->IsTextFrame() && static_cast<const SwTextFrame*>(pCnt)->IsHiddenNow()));
+ } while (!bEnd || (pCnt && pCnt->IsHiddenNow()));
if (pCnt == nullptr)
{
@@ -1219,7 +1217,7 @@ const SwContentFrame *SwLayoutFrame::GetContentPos( Point& rPoint,
if ( pComp != pContent )
continue;
- if ( !pContent->IsTextFrame() || !static_cast<const SwTextFrame*>(pContent)->IsHiddenNow() )
+ if (!pContent->IsHiddenNow())
{
SwRect aContentFrame( pContent->UnionFrame() );
if ( aContentFrame.IsInside( rPoint ) )
@@ -1686,6 +1684,15 @@ bool SwFrame::IsProtected() const
return false;
}
+// virtual
+bool SwFrame::IsHiddenNow() const
+{
+ if (const auto* pSectFrame = FindSctFrame())
+ return pSectFrame->IsHiddenNow();
+
+ return false;
+}
+
/** @return the physical page number */
sal_uInt16 SwFrame::GetPhyPageNum() const
{
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index f17a7ba68870..d8875dbc89cd 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -317,7 +317,7 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
mbInfSct ( false ),
mbColLocked(false),
m_isInDestroy(false),
- mbForbidDelete(false)
+ mnForbidDelete(0)
{
OSL_ENSURE( pMod, "No frame format given." );
}
@@ -3973,6 +3973,18 @@ void SwLayoutFrame::FormatWidthCols( const SwBorderAttrs &rAttrs,
}
}
+void SwLayoutFrame::dumpAsXmlAttributes(xmlTextWriterPtr writer) const
+{
+ SwFrame::dumpAsXmlAttributes(writer);
+
+ const SwFrameFormat* pFormat = GetFormat();
+ if (pFormat)
+ {
+ (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "format" ), "%p", pFormat);
+ (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "formatName" ), "%s", BAD_CAST(pFormat->GetName().toUtf8().getStr()));
+ }
+}
+
static SwContentFrame* lcl_InvalidateSection( SwFrame *pCnt, SwInvalidateFlags nInv )
{
SwSectionFrame* pSect = pCnt->FindSctFrame();
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 9000d6ef1b9e..5094b9f777a1 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -147,6 +147,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;
@@ -209,6 +211,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,
@@ -572,22 +612,22 @@ void SwOLENode::BreakFileLink_Impl()
{
SfxObjectShell* pPers = GetDoc()->GetPersist();
- if ( pPers )
+ if ( !pPers )
+ return;
+
+ uno::Reference< embed::XStorage > xStorage = pPers->GetStorage();
+ if ( !xStorage.is() )
+ return;
+
+ try
+ {
+ uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.GetOleRef(), uno::UNO_QUERY_THROW );
+ xLinkSupport->breakLink( xStorage, maOLEObj.GetCurrentPersistName() );
+ DisconnectFileLink_Impl();
+ maLinkURL.clear();
+ }
+ catch( uno::Exception& )
{
- uno::Reference< embed::XStorage > xStorage = pPers->GetStorage();
- if ( xStorage.is() )
- {
- try
- {
- uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.GetOleRef(), uno::UNO_QUERY_THROW );
- xLinkSupport->breakLink( xStorage, maOLEObj.GetCurrentPersistName() );
- DisconnectFileLink_Impl();
- maLinkURL.clear();
- }
- catch( uno::Exception& )
- {
- }
- }
}
}
@@ -602,28 +642,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#
@@ -862,39 +933,39 @@ SwOLEObj::~SwOLEObj() COVERITY_NOEXCEPT_FALSE
void SwOLEObj::SetNode( SwOLENode* pNode )
{
m_pOLENode = pNode;
- if ( m_aName.isEmpty() )
- {
- SwDoc* pDoc = pNode->GetDoc();
-
- // If there's already a SvPersist instance, we use it
- SfxObjectShell* p = pDoc->GetPersist();
- if( !p )
- {
- // TODO/LATER: Isn't an EmbeddedObjectContainer sufficient here?
- // What happens to the document?
- OSL_ENSURE( false, "Why are we creating a DocShell here??" );
- p = new SwDocShell( pDoc, SfxObjectCreateMode::INTERNAL );
- p->DoInitNew();
- }
+ if ( !m_aName.isEmpty() )
+ return;
- OUString aObjName;
- uno::Reference < container::XChild > xChild( m_xOLERef.GetObject(), uno::UNO_QUERY );
- if ( xChild.is() && xChild->getParent() != p->GetModel() )
- // it is possible that the parent was set already
- xChild->setParent( p->GetModel() );
- if (!p->GetEmbeddedObjectContainer().InsertEmbeddedObject( m_xOLERef.GetObject(), aObjName ) )
- {
- OSL_FAIL( "InsertObject failed" );
- if ( xChild.is() )
- xChild->setParent( nullptr );
- }
- else
- m_xOLERef.AssignToContainer( &p->GetEmbeddedObjectContainer(), aObjName );
+ SwDoc* pDoc = pNode->GetDoc();
- const_cast<SwOLENode*>(m_pOLENode)->CheckFileLink_Impl(); // for this notification nonconst access is required
+ // If there's already a SvPersist instance, we use it
+ SfxObjectShell* p = pDoc->GetPersist();
+ if( !p )
+ {
+ // TODO/LATER: Isn't an EmbeddedObjectContainer sufficient here?
+ // What happens to the document?
+ OSL_ENSURE( false, "Why are we creating a DocShell here??" );
+ p = new SwDocShell( pDoc, SfxObjectCreateMode::INTERNAL );
+ p->DoInitNew();
+ }
- m_aName = aObjName;
+ OUString aObjName;
+ uno::Reference < container::XChild > xChild( m_xOLERef.GetObject(), uno::UNO_QUERY );
+ if ( xChild.is() && xChild->getParent() != p->GetModel() )
+ // it is possible that the parent was set already
+ xChild->setParent( p->GetModel() );
+ if (!p->GetEmbeddedObjectContainer().InsertEmbeddedObject( m_xOLERef.GetObject(), aObjName ) )
+ {
+ OSL_FAIL( "InsertObject failed" );
+ if ( xChild.is() )
+ xChild->setParent( nullptr );
}
+ else
+ m_xOLERef.AssignToContainer( &p->GetEmbeddedObjectContainer(), aObjName );
+
+ const_cast<SwOLENode*>(m_pOLENode)->CheckFileLink_Impl(); // for this notification nonconst access is required
+
+ m_aName = aObjName;
}
OUString SwOLEObj::GetStyleString()
@@ -980,6 +1051,18 @@ bool SwOLEObj::UnloadObject()
return bRet;
}
+PurgeGuard::PurgeGuard(const SwDoc& rDoc)
+ : m_rManager(const_cast<SwDoc&>(rDoc).GetDocumentSettingManager())
+ , m_bOrigPurgeOle(m_rManager.get(DocumentSettingId::PURGE_OLE))
+{
+ m_rManager.set(DocumentSettingId::PURGE_OLE, false);
+}
+
+PurgeGuard::~PurgeGuard()
+{
+ m_rManager.set(DocumentSettingId::PURGE_OLE, m_bOrigPurgeOle);
+}
+
bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > const & xObj, const SwDoc* pDoc, sal_Int64 nAspect )
{
if ( !pDoc )
@@ -1006,6 +1089,8 @@ bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > const & xO
{
uno::Reference < embed::XEmbedPersist > xPers( xObj, uno::UNO_QUERY );
assert(xPers.is() && "Modified object without persistence in cache!");
+
+ PurgeGuard aGuard(*pDoc);
xPers->storeOwn();
}
@@ -1167,7 +1252,7 @@ void SwOLELRUCache::Load()
if (nVal < m_nLRU_InitSize)
{
- std::shared_ptr<SwOLELRUCache> tmp(g_pOLELRU_Cache); // prevent delete this
+ std::shared_ptr<SwOLELRUCache> xKeepAlive(g_pOLELRU_Cache); // prevent delete this
// size of cache has been changed
sal_Int32 nCount = m_OleObjects.size();
sal_Int32 nPos = nCount;
@@ -1197,20 +1282,20 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
m_OleObjects.erase(it);
it = m_OleObjects.end();
}
- if (it == m_OleObjects.end())
+ if (it != m_OleObjects.end())
+ return;
+
+ std::shared_ptr<SwOLELRUCache> xKeepAlive(g_pOLELRU_Cache); // prevent delete this
+ // try to remove objects if necessary
+ sal_Int32 nCount = m_OleObjects.size();
+ sal_Int32 nPos = nCount-1;
+ while (nPos >= 0 && nCount >= m_nLRU_InitSize)
{
- std::shared_ptr<SwOLELRUCache> tmp(g_pOLELRU_Cache); // prevent delete this
- // try to remove objects if necessary
- sal_Int32 nCount = m_OleObjects.size();
- sal_Int32 nPos = nCount-1;
- while (nPos >= 0 && nCount >= m_nLRU_InitSize)
- {
- pObj = m_OleObjects[ nPos-- ];
- if ( pObj->UnloadObject() )
- nCount--;
- }
- m_OleObjects.push_front(&rObj);
+ pObj = m_OleObjects[ nPos-- ];
+ if ( pObj->UnloadObject() )
+ nCount--;
}
+ m_OleObjects.push_front(&rObj);
}
void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 5a099eec65cf..11da5346c4d5 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2327,6 +2327,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// format contents with the new value assigned and write to paragraph
Color* pCol = nullptr;
OUString sNewText;
+ bool bChangeFormat = true;
if( DBL_MAX == fVal )
{
sNewText = SwViewShell::GetShellRes()->aCalc_Error;
@@ -2351,6 +2352,14 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
#else
sNewText = aOrigText;
#endif
+ // Remove the newly assigned numbering format as well if text actually exists.
+ // Exception: assume user-defined formats are always intentional.
+ if (bChgText && pNumFormatr->IsTextFormat(nOldFormat)
+ && !pNumFormatr->IsUserDefinedAndNotOverloaded(nNewFormat))
+ {
+ pBox->GetFrameFormat()->ResetFormatAttr(RES_BOXATR_FORMAT);
+ bChangeFormat = false;
+ }
}
if( !bChgText )
@@ -2360,9 +2369,11 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
}
// across all boxes
- ChgTextToNum( *pBox, sNewText, pCol,
+ if (bChangeFormat)
+ {
+ ChgTextToNum( *pBox, sNewText, pCol,
GetDoc()->IsInsTableAlignNum() );
-
+ }
}
else if( bNewIsTextFormat && nOldFormat != nNewFormat )
{
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index 7eae6a55198e..07c8944d0a03 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -181,7 +181,7 @@ bool SwTextFrame::GetCharRect( SwRect& rOrig, const SwPosition &rPos,
{
OSL_ENSURE( ! IsVertical() || ! IsSwapped(),"SwTextFrame::GetCharRect with swapped frame" );
- if( IsLocked() || IsHiddenNow() )
+ if (IsLocked())
return false;
// Find the right frame first. We need to keep in mind that:
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 69db90b6502d..7a1b0ed7e3ff 100755
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -326,7 +326,7 @@ bool SwTextFrame::CalcFollow(TextFrameIndex const nTextOfst)
const long nRemaining =
- aRectFnSet.BottomDist( GetUpper()->getFrameArea(), nOldBottom );
- if ( nRemaining > 0 && !GetUpper()->IsSctFrame() &&
+ if ( nRemaining > 0 &&
nRemaining != ( aRectFnSet.IsVert() ?
nMyPos - getFrameArea().Right() :
getFrameArea().Top() - nMyPos ) )
@@ -1599,9 +1599,27 @@ void SwTextFrame::Format_( SwTextFormatter &rLine, SwTextFormatInfo &rInf,
// If we're finished formatting the text and we still
// have other line objects left, these are superfluous
// now because the text has gotten shorter.
+ bool bTruncLines = false;
if( rLine.GetStart() + rLine.GetLength() >= nStrLen &&
rLine.GetCurr()->GetNext() )
{
+ bTruncLines = true;
+ }
+ else if (GetMergedPara() && rLine.GetCurr()->GetNext())
+ {
+ // We can also have superfluous lines with redlining in case the current line is shorter
+ // than the text length, but the total length of lines is still more than expected.
+ // Truncate in this case as well.
+ TextFrameIndex nLen(0);
+ for (const SwLineLayout* pLine = pPara; pLine; pLine = pLine->GetNext())
+ {
+ nLen += pLine->GetLen();
+ }
+ bTruncLines = nLen > nStrLen;
+ }
+
+ if (bTruncLines)
+ {
rLine.TruncLines();
rLine.SetTruncLines( true );
}
diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
index 4933bce92c9f..1a60ff2b42d6 100644
--- a/sw/source/core/text/itratr.cxx
+++ b/sw/source/core/text/itratr.cxx
@@ -447,7 +447,7 @@ static void InsertCharAttrs(SfxPoolItem const** pAttrs, SfxItemSet const& rItems
}
else if (nWhich == RES_TXTATR_UNKNOWN_CONTAINER)
{
- pAttrs[RES_CHRATR_END] = pItem;
+ pAttrs[RES_CHRATR_END - RES_CHRATR_BEGIN] = pItem;
}
}
}
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 5806f06e3b76..6528ffff440e 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1538,8 +1538,12 @@ TextFrameIndex SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoin
{
if (pPor->IsPostItsPortion())
{
- // Offset would be nCurrStart + nLength below, do the same for post-it portions.
- nCurrStart += pPor->GetLen();
+ SwPostItsPortion* pPostItsPortion = dynamic_cast<SwPostItsPortion*>(pPor);
+ if (!pPostItsPortion->IsScript()) // tdf#141079
+ {
+ // Offset would be nCurrStart + nLength below, do the same for post-it portions.
+ nCurrStart += pPor->GetLen();
+ }
}
return nCurrStart;
}
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 34ebd28f6421..7901c10ccadd 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -149,6 +149,16 @@ sal_uInt16 SwTextFormatter::GetFrameRstHeight() const
return sal_uInt16( nHeight );
}
+bool SwTextFormatter::ClearIfIsFirstOfBorderMerge(const SwLinePortion* pPortion)
+{
+ if (pPortion == m_pFirstOfBorderMerge)
+ {
+ m_pFirstOfBorderMerge = nullptr;
+ return true;
+ }
+ return false;
+}
+
SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
{
// Save values and initialize rInf
@@ -277,11 +287,8 @@ SwLinePortion *SwTextFormatter::Underflow( SwTextFormatInfo &rInf )
SwLinePortion* pNext = pPor->GetNextPortion();
while (pNext)
{
- if (pNext == m_pFirstOfBorderMerge)
- {
- m_pFirstOfBorderMerge = nullptr;
+ if (ClearIfIsFirstOfBorderMerge(pNext))
break;
- }
pNext = pNext->GetNextPortion();
}
pPor->Truncate();
@@ -990,6 +997,10 @@ SwTextPortion *SwTextFormatter::NewTextPortion( SwTextFormatInfo &rInf )
const TextFrameIndex nNextHidden = m_pScriptInfo->NextHiddenChg(rInf.GetIdx());
nNextChg = std::min( nNextChg, nNextHidden );
+ // bookmarks
+ const TextFrameIndex nNextBookmark = m_pScriptInfo->NextBookmark(rInf.GetIdx());
+ nNextChg = std::min(nNextChg, nNextBookmark);
+
// Turbo boost:
// We assume that font characters are not larger than twice
// as wide as height.
@@ -1198,7 +1209,7 @@ SwLinePortion *SwTextFormatter::WhichFirstPortion(SwTextFormatInfo &rInf)
assert(bookmark & SwScriptInfo::MarkKind::Point);
mark = '|';
}
- pPor = new SwBookmarkPortion(rInf.GetLast(), mark);
+ pPor = new SwBookmarkPortion(mark);
}
}
@@ -2546,7 +2557,11 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
SwFlyInContentFrame *pFly;
SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat();
if( RES_FLYFRMFMT == pFrameFormat->Which() )
+ {
+ // set Lock pFrame to avoid m_pCurr getting deleted
+ TextFrameLockGuard aGuard(m_pFrame);
pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrame(pFrame);
+ }
else
pFly = nullptr;
// aBase is the document-global position, from which the new extra portion is placed
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index c9a14f566741..ceabbabeb47b 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -238,6 +238,8 @@ public:
* @param rInf contain information
**/
void MergeCharacterBorder( SwLinePortion& rPortion, SwLinePortion const *pPrev, SwTextFormatInfo& rInf );
+
+ bool ClearIfIsFirstOfBorderMerge(SwLinePortion const *pPortion);
};
#endif
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 11338d9a8c39..ad3acbafefa4 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -173,9 +173,18 @@ SwFieldSlot::SwFieldSlot( const SwTextFormatInfo* pNew, const SwFieldPortion *pP
pInf->SetFakeLineStart( nIdx > pInf->GetLineStart() );
pInf->SetIdx(TextFrameIndex(0));
}
- else if (nIdx < TextFrameIndex(pOldText->getLength()))
+ else
{
- aText = (*pOldText).replaceAt(sal_Int32(nIdx), 1, aText);
+ TextFrameIndex nEnd(pOldText->getLength());
+ if (nIdx < nEnd)
+ {
+ //sal_Int32 const nFieldLen(pPor->GetFieldLen());
+ aText = (*pOldText).replaceAt(sal_Int32(nIdx), 1/*nFieldLen*/, aText);
+ }
+ else if (nIdx == nEnd)
+ aText = *pOldText + aText;
+ else
+ SAL_WARN("sw.core", "SwFieldSlot bad SwFieldPortion index.");
}
pInf->SetText( aText );
}
@@ -1060,6 +1069,9 @@ void SwTextFrame::StopAnimation( OutputDevice* pOut )
*/
SwCombinedPortion::SwCombinedPortion( const OUString &rText )
: SwFieldPortion( rText )
+ , aWidth{ static_cast<sal_uInt16>(0),
+ static_cast<sal_uInt16>(0),
+ static_cast<sal_uInt16>(0) }
, nUpPos(0)
, nLowPos(0)
, nProportion(55)
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index c8d7b7942ac5..7678298495d7 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -199,7 +199,7 @@ public:
class SwCombinedPortion : public SwFieldPortion
{
sal_uInt16 aPos[6]; // up to six X positions
- o3tl::enumarray<SwFontScript,sal_uInt16> aWidth = {}; // one width for every scripttype
+ o3tl::enumarray<SwFontScript,sal_uInt16> aWidth; // one width for every scripttype
SwFontScript aScrType[6]; // scripttype of every character
sal_uInt16 nUpPos; // the Y position of the upper baseline
sal_uInt16 nLowPos; // the Y position of the lower baseline
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 121a4eff6a41..a4287066c828 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -397,7 +397,9 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
if( !GetAscent() )
SetAscent( pPos->GetAscent() );
}
- delete pLast->Cut( pPos );
+ SwLinePortion* pPortion = pLast->Cut( pPos );
+ rLine.ClearIfIsFirstOfBorderMerge(pPortion);
+ delete pPortion;
pPos = pLast->GetNextPortion();
continue;
}
@@ -1014,7 +1016,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
{
const Range& rRange = aHiddenMulti.GetRange( i );
const sal_Int32 nStart = rRange.Min();
- const sal_Int32 nEnd = rRange.Max() + 1;
+ const sal_Int32 nEnd = rRange.Max() + (rText.isEmpty() ? 0 : 1);
m_HiddenChg.push_back( TextFrameIndex(nStart) );
m_HiddenChg.push_back( TextFrameIndex(nEnd) );
@@ -2528,6 +2530,41 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode,
pBookmarks->emplace_back(pBookmark, MarkKind::End);
}
}
+
+ bool bHide = false;
+ if (pBookmark && pBookmark->IsHidden())
+ {
+ // bookmark is marked as hidden
+ bHide = true;
+
+ // bookmark is marked as hidden with conditions
+ if (!pBookmark->GetHideCondition().isEmpty())
+ {
+ SwDoc& rDoc = *const_cast<SwDoc*>(rNode.GetDoc());
+ SwCalc aCalc(rDoc);
+ rDoc.getIDocumentFieldsAccess().FieldsToCalc(aCalc, rNode.GetIndex(), USHRT_MAX);
+
+ SwSbxValue aValue = aCalc.Calculate(pBookmark->GetHideCondition());
+ if(!aValue.IsVoidValue())
+ {
+ bHide = aValue.GetBool();
+ }
+ }
+ }
+
+ if (bHide)
+ {
+ // intersect bookmark range with textnode range and add the intersection to rHiddenMulti
+
+ const sal_Int32 nSt = pBookmark->GetMarkStart().nContent.GetIndex();
+ const sal_Int32 nEnd = pBookmark->GetMarkEnd().nContent.GetIndex();
+
+ if( nEnd > nSt )
+ {
+ Range aTmp( nSt, nEnd - 1 );
+ rHiddenMulti.Select(aTmp, true);
+ }
+ }
}
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 650198e8a458..9ef4c25ccf85 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -2037,7 +2037,13 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
if (rInf.GetLast()->GetWhichPor() == PortionType::Bookmark)
{
auto const pBookmark(static_cast<SwBookmarkPortion*>(rInf.GetLast()));
- rInf.SetLast(pBookmark->Unchain());
+ auto *const pPrevious = pBookmark->FindPrevPortion(rInf.GetRoot());
+ assert(!pPrevious || pPrevious->GetNextPortion() == pBookmark);
+ if (pPrevious)
+ {
+ pPrevious->SetNextPortion(nullptr);
+ }
+ rInf.SetLast(pPrevious);
assert(m_pCurr->GetNextPortion() == nullptr);
m_pCurr->SetNextPortion(pBookmark);
}
@@ -2351,6 +2357,11 @@ bool SwTextFormatter::BuildMultiPortion( SwTextFormatInfo &rInf,
return bRet;
}
+static bool IsIncompleteRuby(const SwMultiPortion& rHelpMulti)
+{
+ return rHelpMulti.IsRuby() && static_cast<const SwRubyPortion&>(rHelpMulti).GetRubyOffset() < TextFrameIndex(COMPLETE_STRING);
+}
+
// When a fieldportion at the end of line breaks and needs a following
// fieldportion in the next line, then the "restportion" of the formatinfo
// has to be set. Normally this happens during the formatting of the first
@@ -2459,19 +2470,19 @@ SwLinePortion* SwTextFormatter::MakeRestPortion( const SwLineLayout* pLine,
if (!pCreate)
return pRest;
- if( pRest || nMultiPos > nPosition || ( pHelpMulti->IsRuby() &&
- static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset() < TextFrameIndex(COMPLETE_STRING)))
+ if( pRest || nMultiPos > nPosition || IsIncompleteRuby(*pHelpMulti))
{
SwMultiPortion* pTmp;
if( pHelpMulti->IsDouble() )
pTmp = new SwDoubleLinePortion( *pCreate, nMultiPos );
else if( pHelpMulti->IsBidi() )
pTmp = new SwBidiPortion( nMultiPos, pCreate->nLevel );
- else if( pHelpMulti->IsRuby() )
+ else if (IsIncompleteRuby(*pHelpMulti) && pCreate->pAttr)
{
+ TextFrameIndex nRubyOffset = static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset();
pTmp = new SwRubyPortion( *pCreate, *GetInfo().GetFont(),
m_pFrame->GetDoc().getIDocumentSettingAccess(),
- nMultiPos, static_cast<const SwRubyPortion*>(pHelpMulti)->GetRubyOffset(),
+ nMultiPos, nRubyOffset,
GetInfo() );
}
else if( pHelpMulti->HasRotation() )
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index e6f33d79449b..797725e298f6 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -533,7 +533,7 @@ bool SwControlCharPortion::DoPaint(SwTextPaintInfo const&,
bool SwBookmarkPortion::DoPaint(SwTextPaintInfo const& rInf,
OUString & rOutString, SwFont & rTmpFont, int & rDeltaY) const
{
- if (!rInf.GetOpt().IsViewMetaChars())
+ if (!rInf.GetOpt().IsShowBookmarks())
{
return false;
}
@@ -547,7 +547,7 @@ bool SwBookmarkPortion::DoPaint(SwTextPaintInfo const& rInf,
Size size(rTmpFont.GetSize(rTmpFont.GetActual()));
// use also the external leading (line gap) of the portion, but don't use
// 100% of it because i can't figure out how to baseline align that
- auto const nFactor = (Height() * 95) / size.Height();
+ auto const nFactor = size.Height() > 0 ? (Height() * 95) / size.Height() : Height();
rTmpFont.SetProportion(nFactor);
rTmpFont.SetWeight(WEIGHT_THIN, rTmpFont.GetActual());
rTmpFont.SetColor(NON_PRINTING_CHARACTER_COLOR);
@@ -639,13 +639,4 @@ sal_uInt16 SwControlCharPortion::GetViewWidth( const SwTextSizeInfo& rInf ) cons
return mnViewWidth;
}
-SwLinePortion * SwBookmarkPortion::Unchain()
-{
- assert(!m_pPrevious || m_pPrevious->GetNextPortion() == this);
- m_pPrevious->SetNextPortion(nullptr);
- auto const pTmp(m_pPrevious);
- m_pPrevious = nullptr;
- return pTmp;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/porrst.hxx b/sw/source/core/text/porrst.hxx
index dcb2cfcae7e9..0619c6babe16 100644
--- a/sw/source/core/text/porrst.hxx
+++ b/sw/source/core/text/porrst.hxx
@@ -156,13 +156,9 @@ public:
/// SwControlCharPortion these do not have a character in the text.
class SwBookmarkPortion : public SwControlCharPortion
{
-private:
- SwLinePortion * m_pPrevious;
-
public:
- explicit SwBookmarkPortion(SwLinePortion *const pPrevious, sal_Unicode const cChar)
+ explicit SwBookmarkPortion(sal_Unicode const cChar)
: SwControlCharPortion(cChar)
- , m_pPrevious(pPrevious)
{
SetWhichPor(PortionType::Bookmark);
SetLen(TextFrameIndex(0));
@@ -171,7 +167,6 @@ public:
virtual bool DoPaint(SwTextPaintInfo const& rInf,
OUString & rOutString, SwFont & rTmpFont, int & rDeltaY) const override;
virtual SwLinePortion * Compress() override { return this; }
- SwLinePortion * Unchain();
};
#endif
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 46957b4448f8..676210c0c800 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1373,6 +1373,9 @@ bool SwTextFrame::IsHiddenNow() const
return true;
}
+ if (SwContentFrame::IsHiddenNow())
+ return true;
+
bool bHiddenCharsHidePara(false);
bool bHiddenParaField(false);
if (m_pMergedPara)
@@ -1438,6 +1441,19 @@ bool SwTextFrame::IsHiddenNow() const
( bHiddenCharsHidePara &&
!pVsh->GetViewOptions()->IsShowHiddenChar() ) )
{
+ // in order to put the cursor in the body text, one paragraph must
+ // be visible - check this for the 1st body paragraph
+ if (IsInDocBody() && FindPrevCnt() == nullptr)
+ {
+ for (SwContentFrame const* pNext = FindNextCnt(true);
+ pNext != nullptr; pNext = pNext->FindNextCnt(true))
+ {
+ if (!pNext->IsHiddenNow())
+ return true;
+ }
+ SAL_INFO("sw.core", "unhiding one body paragraph");
+ return false;
+ }
return true;
}
}
@@ -1922,7 +1938,6 @@ void UpdateMergedParaForMove(sw::MergedPara & rMerged,
}
if (nLastEnd != rNode.Len()) // without nLen, string yet to be removed
{
- assert(rNode.Len() == 0 || nLastEnd < nSourceEnd);
if (nLastEnd < nSourceEnd)
{
deleted.emplace_back(std::max(nLastEnd, nSourceStart), nSourceEnd);
@@ -2973,7 +2988,13 @@ bool SwTextFrame::Prepare( const PrepareHint ePrep, const void* pVoid,
if( aTextFly.IsOn() )
{
// Does any free-flying frame overlap?
- bFormat = aTextFly.Relax() || IsUndersized();
+ const bool bRelaxed = aTextFly.Relax();
+ bFormat = bRelaxed || IsUndersized();
+ if (bRelaxed)
+ {
+ // It's possible that pPara was deleted above; retrieve it again
+ pPara = aAccess.GetPara();
+ }
}
}
}
diff --git a/sw/source/core/text/widorp.cxx b/sw/source/core/text/widorp.cxx
index df0c779d6dbb..43afbd1e45e6 100644
--- a/sw/source/core/text/widorp.cxx
+++ b/sw/source/core/text/widorp.cxx
@@ -138,6 +138,8 @@ bool SwTextFrameBreak::IsInside( SwTextMargin const &rLine ) const
bFit = nDiff >= 0;
if (!bFit && rLine.MaybeHasHints() && m_pFrame->GetFollow()
+ // tdf#153319 RemoveFootnote only works if this frame doesn't
+ && !rLine.GetNext() // contain the footnote portion
// if using same footnote container as the follow, pointless to try?
&& m_pFrame->FindFootnoteBossFrame() != m_pFrame->GetFollow()->FindFootnoteBossFrame())
{
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 4538362da8d5..08f9b83bb57b 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -344,6 +344,12 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
xmlTextWriterWriteAttribute(writer, BAD_CAST("ValidLayout"), BAD_CAST(OString::boolean(!pPageFrame->IsInvalidLayout()).getStr()));
xmlTextWriterWriteAttribute(writer, BAD_CAST("ValidContent"), BAD_CAST(OString::boolean(!pPageFrame->IsInvalidContent()).getStr()));
xmlTextWriterEndElement(writer);
+ xmlTextWriterStartElement(writer, BAD_CAST("page_info"));
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("phyNum"), "%d", pPageFrame->GetPhyPageNum());
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("virtNum"), "%d", pPageFrame->GetVirtPageNum());
+ OUString aFormatName = pPageFrame->GetPageDesc()->GetName();
+ xmlTextWriterWriteFormatAttribute( writer, BAD_CAST("pageDesc"), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr()));
+ xmlTextWriterEndElement(writer);
}
if (IsTextFrame())
@@ -422,22 +428,16 @@ void SwFrame::dumpInfosAsXml( xmlTextWriterPtr writer ) const
{
// output the Frame
xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", getFrameArea().Left() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", getFrameArea().Top() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", getFrameArea().Width() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", getFrameArea().Height() );
+ getFrameArea().dumpAsXmlAttributes(writer);
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFixSize"), BAD_CAST(OString::boolean(HasFixSize()).getStr()));
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidPos"), BAD_CAST(OString::boolean(isFrameAreaPositionValid()).getStr()));
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidSize"), BAD_CAST(OString::boolean(isFrameAreaSizeValid()).getStr()));
xmlTextWriterWriteAttribute(writer, BAD_CAST("mbValidPrtArea"), BAD_CAST(OString::boolean(isFramePrintAreaValid()).getStr()));
xmlTextWriterEndElement( writer );
- // output the Prt
+ // output the print area
xmlTextWriterStartElement( writer, BAD_CAST( "prtBounds" ) );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", getFramePrintArea().Left() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", getFramePrintArea().Top() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", getFramePrintArea().Width() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", getFramePrintArea().Height() );
+ getFramePrintArea().dumpAsXmlAttributes(writer);
xmlTextWriterEndElement( writer );
}
@@ -488,13 +488,6 @@ void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
}
xmlTextWriterWriteAttribute(writer, BAD_CAST("WritingMode"), BAD_CAST(aMode.getStr()));
}
- if (IsHeaderFrame() || IsFooterFrame())
- {
- const SwHeadFootFrame *pHeadFootFrame = static_cast<const SwHeadFootFrame*>(this);
- OUString aFormatName = pHeadFootFrame->GetFormat()->GetName();
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtName" ), "%s", BAD_CAST(OUStringToOString(aFormatName, RTL_TEXTENCODING_UTF8).getStr()));
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "fmtPtr" ), "%p", pHeadFootFrame->GetFormat());
- }
}
void SwFrame::dumpChildrenAsXml( xmlTextWriterPtr writer ) const
@@ -516,10 +509,7 @@ void SwAnchoredObject::dumpAsXml( xmlTextWriterPtr writer ) const
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "ptr" ), "%p", this );
xmlTextWriterStartElement( writer, BAD_CAST( "bounds" ) );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "left" ), "%ld", GetObjBoundRect().Left() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "top" ), "%ld", GetObjBoundRect().Top() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "width" ), "%ld", GetObjBoundRect().Width() );
- xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "height" ), "%ld", GetObjBoundRect().Height() );
+ GetObjBoundRect().dumpAsXmlAttributes(writer);
xmlTextWriterEndElement( writer );
if (const SdrObject* pObject = GetDrawObj())
@@ -552,7 +542,7 @@ void SwTextFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
void SwSectionFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
{
- SwFrame::dumpAsXmlAttributes( writer );
+ SwLayoutFrame::dumpAsXmlAttributes( writer );
if ( HasFollow() )
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%" SAL_PRIuUINT32, GetFollow()->GetFrameId() );
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 3d721ebee00b..a1f17358efa5 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -64,6 +64,7 @@
#include <txtfrm.hxx>
#include <ftnfrm.hxx>
#include <ftnboss.hxx>
+#include <pagefrm.hxx>
#include <rootfrm.hxx>
#include <pagedesc.hxx>
#include <expfld.hxx>
@@ -456,9 +457,7 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
{
// optimization for SplitNode: If a split is at the end of a node then
// move the frames from the current to the new one and create new ones
- // for the current one. As a result, no need for recreating the layout.
-
- LockModify(); // disable notifications
+ // for the current one.
// If fly frames are moved, they don't need to destroy their layout
// frames. Set a flag that is checked in SwTextFlyCnt::SetAnchor.
@@ -566,28 +565,6 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
SetInCache( false );
}
- UnlockModify(); // enable notify again
-
- // If there is an accessible layout we must call modify even
- // with length zero, because we have to notify about the changed
- // text node.
- const SwRootFrame *pRootFrame;
- if ( (nTextLen != nSplitPos) ||
- ( (pRootFrame = pNode->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()) != nullptr &&
- pRootFrame->IsAnyShellAccessible() ) )
- {
- // tell the frames that something was "deleted" at the end
- if( 1 == nTextLen - nSplitPos )
- {
- SwDelChr aHint( nSplitPos );
- pNode->NotifyClients( nullptr, &aHint );
- }
- else
- {
- SwDelText aHint( nSplitPos, nTextLen - nSplitPos );
- pNode->NotifyClients( nullptr, &aHint );
- }
- }
if ( HasHints() )
{
MoveTextAttr_To_AttrSet();
@@ -690,9 +667,9 @@ SwTextNode *SwTextNode::SplitContentNode(const SwPosition & rPos,
// Update the extents with new node; also inits merge flag,
// so the MakeFramesForAdjacentContentNode below respects it
pFrame->RegisterToNode(*pNode);
- if (pFrame->GetText().isEmpty())
+ if (nSplitPos == 0)
{
- // turns out it's empty - in this case, it was not
+ // in this case, it was not
// invalidated because Cut didn't sent it any hints,
// so we have to invalidate it here!
pFrame->Prepare(PREP_CLEAR, nullptr, false);
@@ -918,9 +895,18 @@ void CheckResetRedlineMergeFlag(SwTextNode & rNode, Recreate const eRecreateMerg
assert(rFirstNode.GetIndex() <= rNode.GetIndex());
pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
*pFrame, rFirstNode, eMode));
- assert(pFrame->GetMergedPara());
- assert(pFrame->GetMergedPara()->listener.IsListeningTo(&rNode));
- assert(rNode.GetIndex() <= pFrame->GetMergedPara()->pLastNode->GetIndex());
+ // there is no merged para in case the deleted node had one but
+ // nothing was actually hidden
+ if (pFrame->GetMergedPara())
+ {
+ assert(pFrame->GetMergedPara()->listener.IsListeningTo(&rNode));
+ assert(rNode.GetIndex() <= pFrame->GetMergedPara()->pLastNode->GetIndex());
+ // tdf#135978 Join: recreate fly frames anchored to subsequent nodes
+ if (eRecreateMerged == sw::Recreate::ThisNode)
+ {
+ AddRemoveFlysAnchoredToFrameStartingAtNode(*pFrame, rNode, nullptr);
+ }
+ }
eMode = sw::FrameMode::New; // Existing is not idempotent!
}
}
@@ -1031,14 +1017,29 @@ SwContentNode *SwTextNode::JoinNext()
pDoc->CorrAbs( aIdx, SwPosition( *this ), nOldLen, true );
}
SwNode::Merge const eOldMergeFlag(pTextNode->GetRedlineMergeFlag());
+ auto eRecreateMerged(eOldMergeFlag == SwNode::Merge::First
+ ? sw::Recreate::ThisNode
+ : sw::Recreate::No);
+ if (eRecreateMerged == sw::Recreate::No)
+ {
+ // tdf#137318 if a delete is inside one node, flag is still None!
+ SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> aIter(*pTextNode);
+ for (SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next())
+ {
+ if (pFrame->GetMergedPara())
+ {
+ eRecreateMerged = sw::Recreate::ThisNode;
+ break;
+ }
+ }
+ }
+
rNds.Delete(aIdx);
SetWrong( pList, false );
SetGrammarCheck( pList3, false );
SetSmartTags( pList2, false );
InvalidateNumRule();
- CheckResetRedlineMergeFlag(*this, eOldMergeFlag == SwNode::Merge::First
- ? sw::Recreate::ThisNode
- : sw::Recreate::No);
+ CheckResetRedlineMergeFlag(*this, eRecreateMerged);
}
else {
OSL_FAIL( "No TextNode." );
@@ -1175,8 +1176,7 @@ void SwTextNode::NewAttrSet( SwAttrPool& rPool )
void SwTextNode::Update(
SwIndex const & rPos,
const sal_Int32 nChangeLen,
- const bool bNegative,
- const bool bDelete )
+ UpdateMode const eMode)
{
SetAutoCompleteWordDirty( true );
@@ -1185,7 +1185,7 @@ void SwTextNode::Update(
if ( HasHints() )
{
- if ( bNegative )
+ if (eMode & UpdateMode::Negative)
{
std::vector<SwTextInputField*> aTextInputFields;
@@ -1357,7 +1357,7 @@ void SwTextNode::Update(
bool bSortMarks = false;
SwIndexReg aTmpIdxReg;
- if ( !bNegative && !bDelete )
+ if (!(eMode & UpdateMode::Negative) && !(eMode & UpdateMode::Delete))
{
const SwRedlineTable& rTable = GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
for (SwRangeRedline* pRedl : rTable)
@@ -1392,6 +1392,7 @@ void SwTextNode::Update(
// Bookmarks must never grow to either side, when editing (directly)
// to the left or right (i#29942)! Exception: if the bookmark has
// 2 positions and start == end, then expand it (tdf#96479)
+ if (!(eMode & UpdateMode::Replace)) // Exception: Replace
{
bool bAtLeastOneBookmarkMoved = false;
bool bAtLeastOneExpandedBookmarkAtInsertionPosition = false;
@@ -1514,7 +1515,7 @@ void SwTextNode::Update(
}
// base class
- SwIndexReg::Update( rPos, nChangeLen, bNegative, bDelete );
+ SwIndexReg::Update(rPos, nChangeLen, eMode);
if (pCollector)
{
@@ -1533,10 +1534,21 @@ void SwTextNode::Update(
//Any drawing objects anchored into this text node may be sorted by their
//anchor position which may have changed here, so resort them
- SwContentFrame* pContentFrame = getLayoutFrame(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout());
- SwSortedObjs* pSortedObjs = pContentFrame ? pContentFrame->GetDrawObjs() : nullptr;
- if (pSortedObjs)
- pSortedObjs->UpdateAll();
+ SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti> iter(*this);
+ for (SwTextFrame* pFrame = iter.First(); pFrame; pFrame = iter.Next())
+ {
+ SwSortedObjs * pSortedObjs(pFrame->GetDrawObjs());
+ if (pSortedObjs)
+ {
+ pSortedObjs->UpdateAll();
+ }
+ // also sort the objs on the page frame
+ pSortedObjs = pFrame->FindPageFrame()->GetSortedObjs();
+ if (pSortedObjs) // doesn't exist yet if called for inserting as-char fly
+ {
+ pSortedObjs->UpdateAll();
+ }
+ }
// Update the paragraph signatures.
if (SwEditShell* pEditShell = GetDoc()->GetEditShell())
@@ -2311,7 +2323,7 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx,
SetIgnoreDontExpand( true );
}
- Update( rIdx, nLen ); // text content changed!
+ Update(rIdx, nLen, UpdateMode::Default); // text content changed!
if (nMode & SwInsertFlags::FORCEHINTEXPAND)
{
@@ -2447,7 +2459,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
if (bUpdate)
{
// Update all SwIndex
- pDest->Update( rDestStart, nLen, false, false/*??? why was it true*/);
+ pDest->Update(rDestStart, nLen, UpdateMode::Default);
}
CHECK_SWPHINTS(pDest);
@@ -2640,7 +2652,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
++nAttrCnt;
}
}
- Update( rStart, nLen, true, true );
+ Update(rStart, nLen, UpdateMode::Negative|UpdateMode::Delete);
for (SwTextAttr* pHt : aArr)
{
@@ -2651,7 +2663,7 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
}
else
{
- Update( rStart, nLen, true, true );
+ Update(rStart, nLen, UpdateMode::Negative|UpdateMode::Delete);
}
// set after moving hints
@@ -2744,7 +2756,7 @@ void SwTextNode::EraseText(const SwIndex &rIdx, const sal_Int32 nCount,
TryDeleteSwpHints();
- Update( rIdx, nCnt, true );
+ Update(rIdx, nCnt, UpdateMode::Negative);
if( 1 == nCnt )
{
@@ -3094,11 +3106,11 @@ sal_uInt16 lcl_BoundListLevel(const int nActualLevel)
}
// -> #i29560#
-bool SwTextNode::HasNumber() const
+bool SwTextNode::HasNumber(SwRootFrame const*const pLayout) const
{
bool bResult = false;
- const SwNumRule* pRule = GetNum() ? GetNum()->GetNumRule() : nullptr;
+ const SwNumRule *const pRule = GetNum(pLayout) ? GetNum(pLayout)->GetNumRule() : nullptr;
if ( pRule )
{
const SwNumFormat& aFormat(pRule->Get(lcl_BoundListLevel(GetActualListLevel())));
@@ -3732,19 +3744,19 @@ void SwTextNode::ReplaceText( const SwIndex& rStart, const sal_Int32 nDelLen,
++const_cast<SwIndex&>(rStart);
m_Text = m_Text.replaceAt(rStart.GetIndex(), nLen - 1, "");
- Update( rStart, nLen - 1, true );
+ Update(rStart, nLen - 1, UpdateMode::Negative);
OUString aTmpText( sInserted.copy(1) );
m_Text = m_Text.replaceAt(rStart.GetIndex(), 0, aTmpText);
- Update( rStart, aTmpText.getLength() );
+ Update(rStart, aTmpText.getLength(), UpdateMode::Replace);
}
else
{
m_Text = m_Text.replaceAt(nStartPos, nLen, "");
- Update( rStart, nLen, true );
+ Update(rStart, nLen, UpdateMode::Negative);
m_Text = m_Text.replaceAt(nStartPos, 0, sInserted);
- Update( rStart, sInserted.getLength() );
+ Update(rStart, sInserted.getLength(), UpdateMode::Replace);
}
SetIgnoreDontExpand( bOldExpFlg );
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 5b363f2d9119..784babd9a3a9 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1378,7 +1378,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
// Update SwIndexes
SwIndex aTmpIdx( this, pAttr->GetStart() );
- Update( aTmpIdx, 1, true );
+ Update(aTmpIdx, 1, UpdateMode::Negative);
}
// do not record deletion of Format!
::sw::UndoGuard const ug(pDoc->GetIDocumentUndoRedo());
@@ -1409,7 +1409,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
m_Text = m_Text.replaceAt(pAttr->GetStart(), 1, "");
// Update SwIndexes
SwIndex aTmpIdx( this, pAttr->GetStart() );
- Update( aTmpIdx, 1, true );
+ Update(aTmpIdx, 1, UpdateMode::Negative);
}
DestroyAttr( pAttr );
return false;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 5c599d78afab..00b6d9ab8d05 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1947,7 +1947,7 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
while( nI + nCnt < nTLen && nOff == pOffsets[ nI + nCnt ] )
++nCnt;
- Update( SwIndex( this, nMyOff ), nCnt );
+ Update(SwIndex( this, nMyOff ), nCnt, UpdateMode::Default);
nMyOff = nOff;
//nMyOff -= nCnt;
nI += nCnt - 1;
@@ -1955,14 +1955,14 @@ void SwTextNode::ReplaceTextOnly( sal_Int32 nPos, sal_Int32 nLen,
else if( nOff > nMyOff )
{
// something is deleted
- Update( SwIndex( this, nMyOff+1 ), nOff - nMyOff, true );
+ Update(SwIndex(this, nMyOff+1), nOff - nMyOff, UpdateMode::Negative);
nMyOff = nOff;
}
++nMyOff;
}
if( nMyOff < nLen )
// something is deleted at the end
- Update( SwIndex( this, nMyOff ), nLen - nMyOff, true );
+ Update(SwIndex(this, nMyOff), nLen - nMyOff, UpdateMode::Negative);
// notify the layout!
SwDelText aDelHint( nPos, nTLen );
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 50ff24aa4d98..ce36b4a1c37c 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -599,44 +599,37 @@ void SwHistoryBookmark::SetInDoc( SwDoc* pDoc, bool )
std::unique_ptr<SwPaM> pPam;
::sw::mark::IMark* pMark = nullptr;
+ // now the situation is that m_bSavePos and m_bSaveOtherPos don't determine
+ // whether the mark was deleted
+ if (auto const iter = pMarkAccess->findMark(m_aName); iter != pMarkAccess->getAllMarksEnd())
+ {
+ pMark = *iter;
+ }
if(m_bSavePos)
{
SwContentNode* const pContentNd = rNds[m_nNode]->GetContentNode();
- OSL_ENSURE(pContentNd,
- "<SwHistoryBookmark::SetInDoc(..)>"
- " - wrong node for a mark");
-
- // #111660# don't crash when nNode1 doesn't point to content node.
- if(pContentNd)
- pPam.reset(new SwPaM(*pContentNd, m_nContent));
+ assert(pContentNd);
+ pPam.reset(new SwPaM(*pContentNd, m_nContent));
}
else
{
- pMark = *pMarkAccess->findMark(m_aName);
+ assert(pMark);
pPam.reset(new SwPaM(pMark->GetMarkPos()));
}
+ assert(pPam);
if(m_bSaveOtherPos)
{
SwContentNode* const pContentNd = rNds[m_nOtherNode]->GetContentNode();
- OSL_ENSURE(pContentNd,
- "<SwHistoryBookmark::SetInDoc(..)>"
- " - wrong node for a mark");
-
- if (pPam != nullptr && pContentNd)
- {
- pPam->SetMark();
- pPam->GetMark()->nNode = m_nOtherNode;
- pPam->GetMark()->nContent.Assign(pContentNd, m_nOtherContent);
- }
+ assert(pContentNd);
+ pPam->SetMark();
+ pPam->GetMark()->nNode = m_nOtherNode;
+ pPam->GetMark()->nContent.Assign(pContentNd, m_nOtherContent);
}
else if(m_bHadOtherPos)
{
- if(!pMark)
- pMark = *pMarkAccess->findMark(m_aName);
- OSL_ENSURE(pMark->IsExpanded(),
- "<SwHistoryBookmark::SetInDoc(..)>"
- " - missing pos on old mark");
+ assert(pMark);
+ assert(pMark->IsExpanded());
pPam->SetMark();
*pPam->GetMark() = pMark->GetOtherMarkPos();
}
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 6cc805d1518d..e9d41a7bcd3e 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -56,7 +56,7 @@ void SwUndoBookmark::ResetInDoc( SwDoc* pDoc )
{
if ( m_pHistoryBookmark->IsEqualBookmark( **ppBkmk ) )
{
- pMarkAccess->deleteMark( ppBkmk );
+ pMarkAccess->deleteMark(ppBkmk, false);
break;
}
}
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 4e55a46196b4..dc24ce96e2fd 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -172,6 +172,7 @@ static void DelFullParaMoveFrames(SwDoc & rDoc, SwUndRng const& rRange,
// move the paragraph into this section and to record this in nSectDiff.
SwUndoDelete::SwUndoDelete(
SwPaM& rPam,
+ SwDeleteFlags const flags,
bool bFullPara,
bool bCalledByTableCpy )
: SwUndo(SwUndoId::DELETE, rPam.GetDoc()),
@@ -190,7 +191,9 @@ SwUndoDelete::SwUndoDelete(
m_bResetPgDesc( false ),
m_bResetPgBrk( false ),
m_bFromTableCopy( bCalledByTableCpy )
+ , m_DeleteFlags(flags)
{
+ assert(!m_bDelFullPara || !(m_DeleteFlags & SwDeleteFlags::ArtificialSelection));
m_bCacheComment = false;
@@ -226,7 +229,9 @@ SwUndoDelete::SwUndoDelete(
}
else
{
- DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
+ DelContentIndex(*rPam.GetMark(), *rPam.GetPoint(),
+ DelContentType::AllMask
+ | ((m_DeleteFlags & SwDeleteFlags::ArtificialSelection) ? DelContentType::Replace : DelContentType(0)));
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
if (m_nEndNode - m_nSttNode > 1) // check for fully selected nodes
{
@@ -542,6 +547,7 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
if( m_bGroup && !m_bBackSp ) return false;
m_bBackSp = true;
}
+ // note: compare m_nSttContent here because the text isn't there any more!
else if( pStt->nContent == m_nSttContent )
{
if( m_bGroup && m_bBackSp ) return false;
@@ -570,6 +576,30 @@ bool SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
return false;
}
+ if ((m_DeleteFlags & SwDeleteFlags::ArtificialSelection) && m_pHistory)
+ {
+ IDocumentMarkAccess const& rIDMA(*pDoc->getIDocumentMarkAccess());
+ for (auto i = m_pHistory->Count(); 0 < i; )
+ {
+ --i;
+ SwHistoryHint const*const pHistory((*m_pHistory)[i]);
+ if (pHistory->Which() == HSTRY_BOOKMARK)
+ {
+ SwHistoryBookmark const*const pHistoryBM(
+ static_cast<SwHistoryBookmark const*>(pHistory));
+ auto const ppMark(rIDMA.findMark(pHistoryBM->GetName()));
+ if (ppMark != rIDMA.getAllMarksEnd()
+ && (m_bBackSp
+ ? ((**ppMark).GetMarkPos() == *pStt)
+ : ((**ppMark).IsExpanded()
+ && (**ppMark).GetOtherMarkPos() == *pEnd)))
+ { // prevent grouping that would delete this mark on Redo()
+ return false;
+ }
+ }
+ }
+ }
+
{
SwRedlineSaveDatas aTmpSav;
const bool bSaved = FillSaveData( rDelPam, aTmpSav, false );
@@ -1135,7 +1165,10 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext)
// don't include end node in the range: it may have been merged already
// by the start node, or it may be merged by one of the moved nodes,
// but if it isn't merged, its current frame(s) should be good...
- SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara ? delFullParaEndNode : m_nEndNode);
+ SwNodeIndex const end(rDoc.GetNodes(), m_bDelFullPara
+ ? delFullParaEndNode
+ // tdf#147310 SwDoc::DeleteRowCol() may delete whole table - end must be node following table!
+ : (m_nEndNode + (rDoc.GetNodes()[m_nSttNode]->IsTableNode() && rDoc.GetNodes()[m_nEndNode]->IsEndNode() ? 1 : 0)));
::MakeFrames(&rDoc, start, end);
}
@@ -1197,7 +1230,11 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
DelBookmarks(rPam.GetMark()->nNode, rPam.GetPoint()->nNode);
}
else
- DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
+ {
+ DelContentIndex(*rPam.GetMark(), *rPam.GetPoint(),
+ DelContentType::AllMask
+ | ((m_DeleteFlags & SwDeleteFlags::ArtificialSelection) ? DelContentType::Replace : DelContentType(0)));
+ }
m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
m_pHistory->Move( m_nSetPos, &aHstr );
@@ -1213,7 +1250,11 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
DelBookmarks( rPam.GetMark()->nNode, rPam.GetPoint()->nNode );
}
else
- DelContentIndex( *rPam.GetMark(), *rPam.GetPoint() );
+ {
+ DelContentIndex(*rPam.GetMark(), *rPam.GetPoint(),
+ DelContentType::AllMask
+ | ((m_DeleteFlags & SwDeleteFlags::ArtificialSelection) ? DelContentType::Replace : DelContentType(0)));
+ }
m_nSetPos = m_pHistory ? m_pHistory->Count() : 0;
}
@@ -1288,7 +1329,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
rDoc.getIDocumentContentOperations().DelFullPara( rPam );
}
else
- rDoc.getIDocumentContentOperations().DeleteAndJoin( rPam );
+ rDoc.getIDocumentContentOperations().DeleteAndJoin(rPam, m_DeleteFlags);
}
void SwUndoDelete::RepeatImpl(::sw::RepeatContext & rContext)
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index fa86072a3008..8ff858013b72 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -798,30 +798,26 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, sal_uLong nNodeIdx,
}
}
-// These two methods move the Point of Pam backwards/forwards. With that, one
-// can span an area for a Undo/Redo. (The Point is then positioned in front of
-// the area to manipulate!)
-// The flag indicates if there is still content in front of Point.
-bool SwUndoSaveContent::MovePtBackward( SwPaM& rPam )
+// These two methods save and restore the Point of PaM.
+// If the point cannot be moved, a "backup" is created on the previous node.
+// Either way, returned, inserting at its original position will not move it.
+::std::optional<SwNodeIndex> SwUndoSaveContent::MovePtBackward(SwPaM & rPam)
{
rPam.SetMark();
if( rPam.Move( fnMoveBackward ))
- return true;
+ return {};
- // If there is no content onwards, set Point simply to the previous position
- // (Node and Content, so that Content will be detached!)
- --rPam.GetPoint()->nNode;
- rPam.GetPoint()->nContent.Assign( nullptr, 0 );
- return false;
+ return { SwNodeIndex(rPam.GetPoint()->nNode, -1) };
}
-void SwUndoSaveContent::MovePtForward( SwPaM& rPam, bool bMvBkwrd )
+void SwUndoSaveContent::MovePtForward(SwPaM& rPam, ::std::optional<SwNodeIndex> && oMvBkwrd)
{
// Was there content before this position?
- if( bMvBkwrd )
+ if (!oMvBkwrd)
rPam.Move( fnMoveForward );
else
{
+ *rPam.GetPoint() = SwPosition(*oMvBkwrd);
++rPam.GetPoint()->nNode;
SwContentNode* pCNd = rPam.GetContentNode();
if( pCNd )
@@ -981,10 +977,14 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// Moving the anchor?
else if (!((DelContentType::CheckNoCntnt|DelContentType::ExcludeFlyAtStartEnd)
& nDelContentType) &&
- // at least for calls from SwUndoDelete,
- // this should work - other Undos don't
- // remember the order of the cursor
- (rPoint.nNode.GetIndex() == pAPos->nNode.GetIndex())
+ // for SwUndoDelete: rPoint is the node that
+ // will be Joined - so anchor should be moved
+ // off it - but UndoImpl() split will insert
+ // new node *before* existing one so a no-op
+ // may need to be done here to add it to
+ // history for Undo.
+ (rPoint.nNode.GetIndex() == pAPos->nNode.GetIndex()
+ || pStt->nNode.GetIndex() == pAPos->nNode.GetIndex())
// Do not try to move the anchor to a table!
&& rMark.nNode.GetNode().IsTextNode())
{
@@ -1061,6 +1061,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
// #i81002#
bool bSavePos = false;
bool bSaveOtherPos = false;
+ bool bDelete = false;
const ::sw::mark::IMark *const pBkmk = pMarkAccess->getAllMarksBegin()[n];
auto const type(IDocumentMarkAccess::GetType(*pBkmk));
@@ -1077,6 +1078,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
{
bSaveOtherPos = true;
}
+ bDelete = bSavePos && bSaveOtherPos;
}
else
{
@@ -1108,12 +1110,25 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
&& ( type == IDocumentMarkAccess::MarkType::TEXT_FIELDMARK
|| type == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK
|| type == IDocumentMarkAccess::MarkType::DROPDOWN_FIELDMARK
- || type == IDocumentMarkAccess::MarkType::DATE_FIELDMARK)))
+ || type == IDocumentMarkAccess::MarkType::DATE_FIELDMARK))
+ || (bMaybe
+ && !(nDelContentType & DelContentType::Replace)
+ && type == IDocumentMarkAccess::MarkType::BOOKMARK
+ && pStt->nContent == 0 // entire paragraph deleted?
+ && pEnd->nContent == pEnd->nNode.GetNode().GetTextNode()->Len()))
{
if( bMaybe )
bSavePos = true;
- bSaveOtherPos = true;
+ bDelete = true;
}
+ if (bDelete || pBkmk->GetOtherMarkPos() == *pEnd)
+ {
+ bSaveOtherPos = true; // tdf#148389 always undo if at end
+ }
+ }
+ if (!bSavePos && bMaybe && pBkmk->IsExpanded() && *pStt == pBkmk->GetMarkPos())
+ {
+ bSavePos = true; // tdf#148389 always undo if at start
}
if ( !bSavePos && !bSaveOtherPos
@@ -1152,6 +1167,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
{
bSavePos = true;
bSaveOtherPos = pBkmk->IsExpanded(); //tdf#90138, only save the other pos if there is one
+ bDelete = true;
}
}
}
@@ -1165,10 +1181,9 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
m_pHistory->Add( *pBkmk, bSavePos, bSaveOtherPos );
}
if ( bSavePos
- && ( bSaveOtherPos
- || !pBkmk->IsExpanded() ) )
+ && (bDelete || !pBkmk->IsExpanded()))
{
- pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n);
+ pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n, false);
n--;
}
}
@@ -1558,9 +1573,14 @@ static bool IsNotBackspaceHeuristic(
SwPosition const& rStart, SwPosition const& rEnd)
{
// check if the selection is backspace/delete created by DelLeft/DelRight
- return rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex()
- || rEnd.nContent != 0
- || rStart.nContent != rStart.nNode.GetNode().GetTextNode()->Len();
+ if (rStart.nNode.GetIndex() + 1 != rEnd.nNode.GetIndex())
+ return true;
+ if (rEnd.nContent != 0)
+ return true;
+ const SwTextNode* pTextNode = rStart.nNode.GetNode().GetTextNode();
+ if (!pTextNode || rStart.nContent != pTextNode->Len())
+ return true;
+ return false;
}
bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos,
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 85b20fae911b..ff3f4777329c 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -328,7 +328,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
if( nLen )
{
- const bool bMvBkwrd = MovePtBackward( *pPam );
+ ::std::optional<SwNodeIndex> oMvBkwrd = MovePtBackward(*pPam);
if (maText)
{
@@ -355,7 +355,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext)
nNode = pPam->GetMark()->nNode.GetIndex();
nContent = pPam->GetMark()->nContent.GetIndex();
- MovePtForward( *pPam, bMvBkwrd );
+ MovePtForward(*pPam, ::std::move(oMvBkwrd));
pPam->Exchange();
if( pRedlData && IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ))
{
@@ -689,7 +689,8 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
if( m_bSplitNext )
{
- SwPosition aPos(*pNd, pNd->Len());
+ assert(m_nSttCnt + m_sOld.getLength() <= pNd->Len());
+ SwPosition aPos(*pNd, m_nSttCnt + m_sOld.getLength());
pDoc->getIDocumentContentOperations().SplitNode( aPos, false );
pNd->RestoreMetadata(m_pMetadataUndoEnd);
pNd = pDoc->GetNodes()[ m_nSttNd - m_nOffset ]->GetTextNode();
@@ -723,7 +724,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
}
rPam.GetPoint()->nNode = m_nSttNd;
- rPam.GetPoint()->nContent = m_nSttCnt;
+ rPam.GetPoint()->nContent.Assign(rPam.GetPoint()->nNode.GetNode().GetTextNode(), m_nSttCnt);
}
void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
@@ -917,7 +918,7 @@ void SwUndoInsertLabel::UndoImpl(::sw::UndoRedoContext & rContext)
aPam.GetPoint()->nNode = NODE.nNode;
aPam.SetMark();
aPam.GetPoint()->nNode = NODE.nNode + 1;
- NODE.pUndoInsNd = new SwUndoDelete( aPam, true );
+ NODE.pUndoInsNd = new SwUndoDelete(aPam, SwDeleteFlags::Default, true);
}
}
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 8aae3c055b63..c66d8eed133e 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -26,6 +26,8 @@
#include <pam.hxx>
#include <ndtxt.hxx>
#include <txtfrm.hxx>
+#include <mvsave.hxx>
+#include <rolbck.hxx>
#include <UndoCore.hxx>
#include <UndoDelete.hxx>
#include <strings.hrc>
@@ -153,7 +155,8 @@ void SwUndoRedline::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
}
-SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
+SwUndoRedlineDelete::SwUndoRedlineDelete(
+ const SwPaM& rRange, SwUndoId const nUsrId, SwDeleteFlags const flags)
: SwUndoRedline( nUsrId != SwUndoId::EMPTY ? nUsrId : SwUndoId::DELETE, rRange ),
bCanGroup( false ), bIsDelim( false ), bIsBackspace( false )
{
@@ -174,6 +177,24 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, SwUndoId nUsrId )
}
m_bCacheComment = false;
+ if (flags & SwDeleteFlags::ArtificialSelection)
+ {
+ InitHistory(rRange);
+ }
+}
+
+void SwUndoRedlineDelete::InitHistory(SwPaM const& rRedline)
+{
+ m_pHistory.reset(new SwHistory);
+ // try to rely on direction of rPam here so it works for
+ // backspacing/deleting consecutive characters
+ SaveFlyArr flys;
+ SaveFlyInRange(rRedline, *rRedline.GetMark(), flys, false, m_pHistory.get());
+ RestFlyInRange(flys, *rRedline.GetPoint(), &rRedline.GetPoint()->nNode, true);
+ if (m_pHistory->Count())
+ {
+ bCanGroup = false; // how to group history?
+ }
}
// bit of a hack, replace everything...
@@ -197,12 +218,21 @@ void SwUndoRedlineDelete::SetRedlineText(const OUString & rText)
void SwUndoRedlineDelete::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
rDoc.getIDocumentRedlineAccess().DeleteRedline(rPam, true, RedlineType::Any);
+ if (m_pHistory)
+ {
+ m_pHistory->TmpRollback(&rDoc, 0);
+ }
}
void SwUndoRedlineDelete::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam)
{
if (rPam.GetPoint() != rPam.GetMark())
{
+ if (m_pHistory) // if it was created before, it must be recreated now
+ {
+ rPam.Normalize(bIsBackspace); // to check the correct edge
+ InitHistory(rPam);
+ }
rDoc.getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline(*mpRedlData, rPam), false );
}
sw::UpdateFramesForAddDeleteRedline(rDoc, rPam);
@@ -212,7 +242,7 @@ bool SwUndoRedlineDelete::CanGrouping( const SwUndoRedlineDelete& rNext )
{
bool bRet = false;
if( SwUndoId::DELETE == mnUserId && mnUserId == rNext.mnUserId &&
- bCanGroup == rNext.bCanGroup &&
+ bCanGroup && rNext.bCanGroup &&
bIsDelim == rNext.bIsDelim &&
bIsBackspace == rNext.bIsBackspace &&
m_nSttNode == m_nEndNode &&
@@ -449,7 +479,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
bool bJoinText, bJoinPrev;
sw_GetJoinFlags(rPam, bJoinText, bJoinPrev);
- pUnDel.reset( new SwUndoDelete(rPam, false) );
+ pUnDel.reset( new SwUndoDelete(rPam, SwDeleteFlags::Default, false) );
if( bJoinText )
sw_JoinText(rPam, bJoinPrev);
@@ -466,7 +496,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext)
++rPam.GetPoint()->nNode;
rPam.GetBound().nContent.Assign( nullptr, 0 );
rPam.GetBound( false ).nContent.Assign( nullptr, 0 );
- pUnDel2.reset( new SwUndoDelete(rPam, true) );
+ pUnDel2.reset( new SwUndoDelete(rPam, SwDeleteFlags::Default, true) );
}
}
rPam.DeleteMark();
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9d1675c0f304..a07d951dc288 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);
}
m_sTableName = pTableNd->GetTable().GetFrameFormat()->GetName();
@@ -2420,11 +2422,11 @@ void SwUndoTableCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
else
*aPam.GetPoint() = SwPosition( aTmpIdx );
}
- pUndo = std::make_unique<SwUndoDelete>( aPam, bDeleteCompleteParagraph, true );
+ pUndo = std::make_unique<SwUndoDelete>(aPam, SwDeleteFlags::Default, bDeleteCompleteParagraph, true);
}
else
{
- pUndo = std::make_unique<SwUndoDelete>( aPam, true );
+ pUndo = std::make_unique<SwUndoDelete>(aPam, SwDeleteFlags::Default, true);
if( pEntry->pUndo )
{
pEntry->pUndo->UndoImpl(rContext);
@@ -2501,7 +2503,9 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
// b62341295: Redline for copying tables - Start.
rDoc.GetNodes().MakeTextNode( aInsIdx, rDoc.GetDfltTextFormatColl() );
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode());
- std::unique_ptr<SwUndo> pUndo = IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() ) ? nullptr : std::make_unique<SwUndoDelete>( aPam, true );
+ std::unique_ptr<SwUndo> pUndo(IDocumentRedlineAccess::IsRedlineOn(GetRedlineFlags())
+ ? nullptr
+ : std::make_unique<SwUndoDelete>(aPam, SwDeleteFlags::Default, true));
if( pEntry->pUndo )
{
pEntry->pUndo->UndoImpl(rContext);
@@ -2513,7 +2517,7 @@ void SwUndoTableCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
// Otherwise aInsIdx has been moved during the Undo operation
if( pEntry->bJoin )
{
- SwPaM const& rLastPam =
+ SwPaM& rLastPam =
rContext.GetCursorSupplier().GetCurrentShellCursor();
pUndo = PrepareRedline( &rDoc, rBox, *rLastPam.GetPoint(),
pEntry->bJoin, true );
@@ -2582,7 +2586,7 @@ void SwUndoTableCpyTable::AddBoxBefore( const SwTableBox& rBox, bool bDelContent
SwPaM aPam( aInsIdx.GetNode(), *rBox.GetSttNd()->EndOfSectionNode() );
if( !pDoc->getIDocumentRedlineAccess().IsRedlineOn() )
- pEntry->pUndo = std::make_unique<SwUndoDelete>( aPam, true );
+ pEntry->pUndo = std::make_unique<SwUndoDelete>(aPam, SwDeleteFlags::Default, true);
}
pEntry->pBoxNumAttr = std::make_unique<SfxItemSet>(
@@ -2628,7 +2632,7 @@ void SwUndoTableCpyTable::AddBoxAfter( const SwTableBox& rBox, const SwNodeIndex
// rJoin is true if Redo() is calling and the content has already been merged
std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwTableBox& rBox,
- const SwPosition& rPos, bool& rJoin, bool bRedo )
+ SwPosition& rPos, bool& rJoin, bool bRedo )
{
std::unique_ptr<SwUndo> pUndo;
// b62341295: Redline for copying tables
@@ -2652,6 +2656,10 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const
if( !bRedo && rPos.nNode.GetNode().GetTextNode() )
{ // Try to merge, if not called by Redo()
rJoin = true;
+
+ // Park this somewhere else so nothing points to the to-be-deleted node.
+ rPos.nContent.Assign(pText, 0);
+
pText->JoinNext();
}
}
@@ -2682,7 +2690,7 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const
aCellEnd = SwPosition(
SwNodeIndex( *rBox.GetSttNd()->EndOfSectionNode() ));
SwPaM aTmpPam( aDeleteStart, aCellEnd );
- pUndo = std::make_unique<SwUndoDelete>( aTmpPam, true );
+ pUndo = std::make_unique<SwUndoDelete>(aTmpPam, SwDeleteFlags::Default, true);
}
SwPosition aCellStart( SwNodeIndex( *rBox.GetSttNd(), 2 ) );
pText = aCellStart.nNode.GetNode().GetTextNode();
@@ -2754,7 +2762,7 @@ void SwUndoCpyTable::UndoImpl(::sw::UndoRedoContext & rContext)
}
SwPaM aPam( *pTNd, *pTNd->EndOfSectionNode(), 0 , 1 );
- pDel.reset( new SwUndoDelete( aPam, true ) );
+ pDel.reset( new SwUndoDelete( aPam, SwDeleteFlags::Default, true ) );
}
void SwUndoCpyTable::RedoImpl(::sw::UndoRedoContext & rContext)
diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx
index 28f41f817061..8258498b9181 100644
--- a/sw/source/core/undo/untblk.cxx
+++ b/sw/source/core/undo/untblk.cxx
@@ -125,11 +125,11 @@ void SwUndoInserts::SetInsertRange( const SwPaM& rPam, bool bScanFlys,
m_nSttNode = pTmpPos->nNode.GetIndex();
m_nSttContent = pTmpPos->nContent.GetIndex();
+ m_nDeleteTextNodes = nDeleteTextNodes;
if (m_nDeleteTextNodes == 0) // if a table selection is added...
{
++m_nSttNode; // ... then the CopyPam is not fully correct
}
- m_nDeleteTextNodes = nDeleteTextNodes;
}
// Fill m_FlyUndos with flys anchored to first and last paragraphs
@@ -357,21 +357,25 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext)
auto const pFlysAtInsPos(sw::GetFlysAnchoredAt(*pDoc,
rPam.GetPoint()->nNode.GetIndex()));
- const bool bMvBkwrd = MovePtBackward(rPam);
+ ::std::optional<SwNodeIndex> oMvBkwrd = MovePtBackward(rPam);
+ bool const isMoveFlyAnchors(!oMvBkwrd // equivalent to bCanMoveBack
+ || m_pUndoNodeIndex->GetNode().IsTextNode()
+ || (oMvBkwrd->GetNode().IsStartNode()
+ && m_pUndoNodeIndex->GetNode().IsSectionNode()));
// re-insert content again (first detach m_pUndoNodeIndex!)
sal_uLong const nMvNd = m_pUndoNodeIndex->GetIndex();
m_pUndoNodeIndex.reset();
MoveFromUndoNds(*pDoc, nMvNd, *rPam.GetMark());
- if (m_nDeleteTextNodes != 0)
+ if (m_nDeleteTextNodes != 0 || oMvBkwrd)
{
- MovePtForward(rPam, bMvBkwrd);
+ MovePtForward(rPam, ::std::move(oMvBkwrd));
}
rPam.Exchange();
// at-char anchors post SplitNode are on index 0 of 2nd node and will
// remain there - move them back to the start (end would also work?)
- if (pFlysAtInsPos)
+ if (pFlysAtInsPos && isMoveFlyAnchors)
{
for (SwFrameFormat * pFly : *pFlysAtInsPos)
{
diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
index ddeaccf1966b..a4d719016f68 100644
--- a/sw/source/core/unocore/unobkm.cxx
+++ b/sw/source/core/unocore/unobkm.cxx
@@ -410,6 +410,8 @@ void SAL_CALL
SwXBookmark::setPropertyValue(const OUString& PropertyName,
const uno::Any& rValue)
{
+ SolarMutexGuard g;
+
if (PropertyName == UNO_NAME_BOOKMARK_HIDDEN)
{
bool bNewValue = false;
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index fed0e4a55d6a..1d7cc5fea594 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -1147,6 +1147,8 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a
SwFormatFlyCnt aFormat( pFormat );
pNd->InsertItem(aFormat, pInternalPam->GetPoint()
->nContent.GetIndex(), 0 );
+ //Refetch in case SwTextNode::InsertItem causes it to be deleted
+ pFormat = GetFrameFormat();
}
else
{
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index e2e5c9411715..e5ced2a27fd0 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2771,8 +2771,13 @@ void SwXFrame::attachToRange(uno::Reference<text::XTextRange> const& xTextRange,
aFrameSet.Put( SwFormatAnchor( RndStdIds::FLY_AT_PAGE, 1 ));
}
- aPam.DeleteMark(); // mark position node will be deleted!
- aIntPam.DeleteMark(); // mark position node will be deleted!
+ // park these no longer needed PaMs somewhere safe so MakeFlyAndMove
+ // can delete what it likes without any assert these are pointing to
+ // that content
+ aPam.DeleteMark();
+ aIntPam.DeleteMark();
+ *aPam.GetPoint() = *aIntPam.GetPoint() = SwPosition(pDoc->GetNodes());
+
pFormat = pDoc->MakeFlyAndMove( *pCopySource, aFrameSet,
nullptr,
pParentFrameFormat );
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 1f8b4d02edfd..e3ac0563be12 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -765,7 +765,7 @@ SwXTextCursor::~SwXTextCursor()
}
void SwXTextCursor::DeleteAndInsert(const OUString& rText,
- const bool bForceExpandHints)
+ ::sw::DeleteAndInsertMode const eMode)
{
auto pUnoCursor = static_cast<SwCursor*>(m_pImpl->m_pUnoCursor.get());
if (pUnoCursor)
@@ -780,13 +780,15 @@ void SwXTextCursor::DeleteAndInsert(const OUString& rText,
{
if (pCurrent->HasMark())
{
- pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCurrent);
+ pDoc->getIDocumentContentOperations().DeleteAndJoin(*pCurrent,
+ // is it "delete" or "replace"?
+ (nTextLen != 0 || eMode & ::sw::DeleteAndInsertMode::ForceReplace) ? SwDeleteFlags::ArtificialSelection : SwDeleteFlags::Default);
}
if(nTextLen)
{
const bool bSuccess(
SwUnoCursorHelper::DocInsertStringSplitCR(
- *pDoc, *pCurrent, rText, bForceExpandHints ) );
+ *pDoc, *pCurrent, rText, bool(eMode & ::sw::DeleteAndInsertMode::ForceExpandHints)) );
OSL_ENSURE( bSuccess, "Doc->Insert(Str) failed." );
SwUnoCursorHelper::SelectPam(*pUnoCursor, true);
@@ -1754,7 +1756,7 @@ SwXTextCursor::setString(const OUString& aString)
const bool bForceExpandHints( (CursorType::Meta == m_pImpl->m_eType)
&& dynamic_cast<SwXMeta*>(m_pImpl->m_xParentText.get())
->CheckForOwnMemberMeta(*GetPaM(), true) );
- DeleteAndInsert(aString, bForceExpandHints);
+ DeleteAndInsert(aString, bForceExpandHints ? ::sw::DeleteAndInsertMode::ForceExpandHints : ::sw::DeleteAndInsertMode::Default);
}
uno::Any SwUnoCursorHelper::GetPropertyValue(
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 502e2e74c2dd..53c881a8400a 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -790,8 +790,22 @@ void SwXTextRange::SetPositions(const SwPaM& rPam)
m_pImpl->SetMark(*pMark);
}
+#if 0
+static void DeleteTable(SwDoc & rDoc, SwTable& rTable)
+{
+ SwSelBoxes aSelBoxes;
+ for (auto& rBox : rTable.GetTabSortBoxes())
+ {
+ aSelBoxes.insert(rBox);
+ }
+ // note: if the table is the content in the section, this will create
+ // a new text node - that's desirable here
+ rDoc.DeleteRowCol(aSelBoxes, SwDoc::RowColMode::DeleteProtected);
+}
+#endif
+
void SwXTextRange::DeleteAndInsert(
- const OUString& rText, const bool bForceExpandHints)
+ const OUString& rText, ::sw::DeleteAndInsertMode const eMode)
{
if (RANGE_IS_TABLE == m_pImpl->m_eRangePosition)
{
@@ -807,13 +821,14 @@ void SwXTextRange::DeleteAndInsert(
m_pImpl->m_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::INSERT, nullptr);
if (aCursor.HasMark())
{
- m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor);
+ m_pImpl->m_rDoc.getIDocumentContentOperations().DeleteAndJoin(aCursor,
+ (!rText.isEmpty() || eMode & ::sw::DeleteAndInsertMode::ForceReplace) ? SwDeleteFlags::ArtificialSelection : SwDeleteFlags::Default);
}
if (!rText.isEmpty())
{
SwUnoCursorHelper::DocInsertStringSplitCR(
- m_pImpl->m_rDoc, aCursor, rText, bForceExpandHints);
+ m_pImpl->m_rDoc, aCursor, rText, bool(eMode & ::sw::DeleteAndInsertMode::ForceExpandHints));
SwUnoCursorHelper::SelectPam(aCursor, true);
aCursor.Left(rText.getLength());
@@ -961,7 +976,7 @@ void SAL_CALL SwXTextRange::setString(const OUString& rString)
{
SolarMutexGuard aGuard;
- DeleteAndInsert(rString, false);
+ DeleteAndInsert(rString, ::sw::DeleteAndInsertMode::Default);
}
bool SwXTextRange::GetPositions(SwPaM& rToFill) const
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 1f68135f7a4a..6d1752881418 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1148,6 +1148,7 @@ void SwXNumberingRules::replaceByIndex(sal_Int32 nIndex, const uno::Any& rElemen
SwXNumberingRules::SetNumberingRuleByIndex( aNumRule,
*rProperties, nIndex);
// set character format if needed
+ // this code appears to be dead - except when a style is assigned for BITMAP numbering?
const SwCharFormats* pFormats = m_pDocShell->GetDoc()->GetCharFormats();
const size_t nChCount = pFormats->size();
for(sal_uInt16 i = 0; i < MAXLEVEL;i++)
@@ -1492,7 +1493,7 @@ void SwXNumberingRules::SetNumberingRuleByIndex(
SetPropertiesToNumFormat(aFormat, m_sNewCharStyleNames[nIndex],
&m_sNewBulletFontNames[nIndex],
&sHeadingStyleName, &sParagraphStyleName,
- m_pDoc, rProperties);
+ m_pDoc, m_pDocShell, rProperties);
if (m_pDoc && !sParagraphStyleName.isEmpty())
@@ -1539,8 +1540,11 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
OUString *const pHeadingStyleName,
OUString *const pParagraphStyleName,
SwDoc *const pDoc,
+ SwDocShell *const pDocShell,
const uno::Sequence<beans::PropertyValue>& rProperties)
{
+ assert(pDoc == nullptr || pDocShell == nullptr); // can't be both ordinary and chapter numbering
+
bool bWrongArg = false;
std::unique_ptr<SvxBrushItem> pSetBrush;
std::unique_ptr<Size> pSetSize;
@@ -1588,14 +1592,15 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
rProp.Value >>= uTmp;
OUString sCharFormatName;
SwStyleNameMapper::FillUIName( uTmp, sCharFormatName, SwGetPoolIdFromName::ChrFmt );
+ SwDoc *const pLocalDoc = pDocShell ? pDocShell->GetDoc() : pDoc;
if (sCharFormatName == UNO_NAME_CHARACTER_FORMAT_NONE)
{
rCharStyleName = aInvalidStyle;
aFormat.SetCharFormat(nullptr);
}
- else if(pDoc)
+ else if (pLocalDoc)
{
- const SwCharFormats* pFormats = pDoc->GetCharFormats();
+ const SwCharFormats* pFormats = pLocalDoc->GetCharFormats();
const size_t nChCount = pFormats->size();
SwCharFormat* pCharFormat = nullptr;
@@ -1614,7 +1619,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
SfxStyleSheetBase* pBase;
- SfxStyleSheetBasePool* pPool = pDoc->GetDocShell()->GetStyleSheetPool();
+ SfxStyleSheetBasePool* pPool = pLocalDoc->GetDocShell()->GetStyleSheetPool();
pBase = pPool->Find(sCharFormatName, SfxStyleFamily::Char);
if(!pBase)
pBase = &pPool->Make(sCharFormatName, SfxStyleFamily::Char);
@@ -1626,7 +1631,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
// If the character format has been found its name should not be in the
// char style names array
rCharStyleName.clear();
- }
+ }
else
rCharStyleName = sCharFormatName;
}
@@ -1779,7 +1784,7 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
OUString sBulletFontName;
rProp.Value >>= sBulletFontName;
- SwDocShell* pLclDocShell = pDoc->GetDocShell();
+ SwDocShell *const pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
if( !sBulletFontName.isEmpty() && pLclDocShell )
{
const SvxFontListItem* pFontListItem =
@@ -1878,7 +1883,8 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
}
pSetVOrient->PutValue(rProp.Value, MID_VERTORIENT_ORIENT);
}
- else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME)
+ else if (rProp.Name == UNO_NAME_HEADING_STYLE_NAME
+ && pDocShell) // only on chapter numbering
{
if (pHeadingStyleName)
{
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index fa378c7e8ae1..f149c3a4ce16 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2227,7 +2227,7 @@ void SwXTextTable::dispose()
SwSelBoxes aSelBoxes;
for(auto& rBox : pTable->GetTabSortBoxes() )
aSelBoxes.insert(rBox);
- pFormat->GetDoc()->DeleteRowCol(aSelBoxes);
+ pFormat->GetDoc()->DeleteRowCol(aSelBoxes, SwDoc::RowColMode::DeleteProtected);
}
void SAL_CALL SwXTextTable::addEventListener(
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 3887a11191d7..4b5e16c028e2 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -364,7 +364,8 @@ SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange,
dynamic_cast<SwXTextCursor*>(pCursor) );
if (pTextCursor)
{
- pTextCursor->DeleteAndInsert(rString, bForceExpandHints);
+ pTextCursor->DeleteAndInsert(rString, ::sw::DeleteAndInsertMode::ForceReplace
+ | (bForceExpandHints ? ::sw::DeleteAndInsertMode::ForceExpandHints : ::sw::DeleteAndInsertMode::Default));
}
else
{
@@ -373,7 +374,8 @@ SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange,
}
else
{
- pRange->DeleteAndInsert(rString, bForceExpandHints);
+ pRange->DeleteAndInsert(rString, ::sw::DeleteAndInsertMode::ForceReplace
+ | (bForceExpandHints ? ::sw::DeleteAndInsertMode::ForceExpandHints : ::sw::DeleteAndInsertMode::Default));
}
}
else
@@ -605,7 +607,21 @@ SwXText::insertTextContent(
if (bAbsorb && !bAttribute)
{
- xRange->setString(OUString());
+ uno::Reference<lang::XUnoTunnel> const xRangeTunnel(xRange, uno::UNO_QUERY);
+ if (SwXTextRange *const pRange = ::sw::UnoTunnelGetImplementation<SwXTextRange>(xRangeTunnel))
+ {
+ pRange->DeleteAndInsert(OUString(), ::sw::DeleteAndInsertMode::ForceReplace
+ | (bForceExpandHints ? ::sw::DeleteAndInsertMode::ForceExpandHints : ::sw::DeleteAndInsertMode::Default));
+ }
+ else if (SwXTextCursor *const pCursor = dynamic_cast<SwXTextCursor*>(::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xRangeTunnel)))
+ {
+ pCursor->DeleteAndInsert(OUString(), ::sw::DeleteAndInsertMode::ForceReplace
+ | (bForceExpandHints ? ::sw::DeleteAndInsertMode::ForceExpandHints : ::sw::DeleteAndInsertMode::Default));
+ }
+ else
+ {
+ xRange->setString(OUString());
+ }
}
uno::Reference< text::XTextRange > xTempRange =
(bAttribute && bAbsorb) ? xRange : xRange->getStart();
@@ -1566,6 +1582,8 @@ SwXText::convertToTextFrame(
}
bool bParaAfterInserted = false;
bool bParaBeforeInserted = false;
+ ::std::optional<SwPaM> oAnchorCheckPam;
+ oAnchorCheckPam.emplace(*pStartPam->Start(), *pEndPam->End());
if (
pStartStartNode && pEndStartNode &&
(pStartStartNode != pEndStartNode || pStartStartNode != GetStartNode())
@@ -1646,6 +1664,7 @@ SwXText::convertToTextFrame(
bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd );
pEndPam->DeleteMark();
*pEndPam->GetPoint() = aEnd;
+ *oAnchorCheckPam->End() = aEnd;
}
pStartPam->SetMark();
*pStartPam->End() = *pEndPam->End();
@@ -1660,10 +1679,17 @@ SwXText::convertToTextFrame(
{
const SwFrameFormat* pFrameFormat = (*m_pImpl->m_pDoc->GetSpzFrameFormats())[i];
const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor();
- if ( !isGraphicNode(pFrameFormat) &&
- (RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() || RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()) &&
- pStartPam->Start()->nNode.GetIndex() <= rAnchor.GetContentAnchor()->nNode.GetIndex() &&
- pStartPam->End()->nNode.GetIndex() >= rAnchor.GetContentAnchor()->nNode.GetIndex())
+ // note: Word can do at-char anchors in text frames - sometimes!
+ // see testFlyInFly for why this checks only the edges of the selection,
+ // and testFloatingTablesAnchor for why it excludes pre/post table
+ // added nodes
+ if (!isGraphicNode(pFrameFormat)
+ && ( (RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()
+ && ( oAnchorCheckPam->Start()->nNode.GetIndex() == rAnchor.GetContentAnchor()->nNode.GetIndex()
+ || oAnchorCheckPam->End()->nNode.GetIndex() == rAnchor.GetContentAnchor()->nNode.GetIndex()))
+ || (RndStdIds::FLY_AT_CHAR == rAnchor.GetAnchorId()
+ && ( *oAnchorCheckPam->Start() == *rAnchor.GetContentAnchor()
+ || *oAnchorCheckPam->End() == *rAnchor.GetContentAnchor()))))
{
if (pFrameFormat->GetName().isEmpty())
{
@@ -1675,6 +1701,7 @@ SwXText::convertToTextFrame(
}
}
}
+ oAnchorCheckPam.reset(); // clear SwIndex before deleting nodes
const uno::Reference<text::XTextFrame> xNewFrame(
SwXTextFrame::CreateXTextFrame(*m_pImpl->m_pDoc, nullptr));
@@ -1692,7 +1719,7 @@ SwXText::convertToTextFrame(
new SwXTextRange(*pStartPam, this);
assert(rNewFrame.IsDescriptor());
rNewFrame.attachToRange(xInsertTextRange, pStartPam.get());
- rNewFrame.setName(m_pImpl->m_pDoc->GetUniqueFrameName());
+ assert(!rNewFrame.getName().isEmpty());
}
SwTextNode *const pTextNode(pStartPam->GetNode().GetTextNode());
@@ -2259,12 +2286,6 @@ SwXText::copyText(
// us, even if we have only a single paragraph.
m_pImpl->m_pDoc->getIDocumentContentOperations().CopyRange(temp, rPos, /*bCopyAll=*/false, /*bCheckPos=*/true, /*bCopyText=*/false);
}
- if (!pFirstNode)
- { // the node at rPos was split; get rid of the first empty one so
- // that the pasted table is first
- auto pDelCursor(m_pImpl->m_pDoc->CreateUnoCursor(SwPosition(SwNodeIndex(*GetStartNode(), 1))));
- m_pImpl->m_pDoc->getIDocumentContentOperations().DelFullPara(*pDelCursor);
- }
}
else
{
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 47657980602f..06bbbe14e88c 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -58,6 +58,7 @@
#include <poolfmt.hxx>
#include <fltini.hxx>
#include <docsh.hxx>
+#include <ndole.hxx>
#include <ndtxt.hxx>
#include <redline.hxx>
#include <swerror.h>
@@ -377,7 +378,7 @@ ErrCode SwReader::Read( const Reader& rOptions )
// not insert: set the redline mode read from settings.xml
eOld = ePostReadRedlineFlags & ~RedlineFlags::Ignore;
- mxDoc->getIDocumentFieldsAccess().SetFieldsDirty(false, nullptr, 0);
+ mxDoc->getIDocumentFieldsAccess().SetFieldsDirty(true, nullptr, 0);
}
mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld );
@@ -854,8 +855,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa
pESh->StartAllAction();
}
- const bool bOrigPurgeOle = pOutDoc->getIDocumentSettingAccess().get(DocumentSettingId::PURGE_OLE);
- pOutDoc->getIDocumentSettingAccess().set(DocumentSettingId::PURGE_OLE, false);
+ auto xGuard = std::make_unique<PurgeGuard>(*pOutDoc);
ErrCode nError = ERRCODE_NONE;
if( pMedium )
@@ -865,7 +865,7 @@ ErrCode SwWriter::Write( WriterRef const & rxWriter, const OUString* pRealFileNa
else if( xStg.is() )
nError = rxWriter->Write( *pPam, xStg, pRealFileName );
- pOutDoc->getIDocumentSettingAccess().set(DocumentSettingId::PURGE_OLE, bOrigPurgeOle );
+ xGuard.reset();
if( pESh )
{
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index a0da671de733..112975f98511 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -1087,7 +1087,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).IsExoticProtocol())
+ NotifyMacroEventRead();
+
+ xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingMode::Auto )
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index ce689df01b9d..8a7c2c8bbd72 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -34,6 +34,7 @@
#include <svtools/htmlkywd.hxx>
#include <svl/urihelper.hxx>
#include <svl/listener.hxx>
+#include <svx/sdrobjectuser.hxx>
#include <sal/log.hxx>
#include <dcontact.hxx>
@@ -372,7 +373,7 @@ typedef std::vector<HTMLTableColumn> HTMLTableColumns;
typedef std::vector<SdrObject *> SdrObjects;
-class HTMLTable
+class HTMLTable : public sdr::ObjectUser
{
OUString m_aId;
OUString m_aStyle;
@@ -520,6 +521,8 @@ private:
sal_uInt16 GetBorderWidth( const SvxBorderLine& rBLine,
bool bWithDistance=false ) const;
+ virtual void ObjectInDestruction(const SdrObject& rObject) override;
+
public:
bool m_bFirstCell; // is there a cell created already?
@@ -529,7 +532,7 @@ public:
bool bHasToFly,
const HTMLTableOptions& rOptions);
- ~HTMLTable();
+ virtual ~HTMLTable();
// Identifying of a cell
const HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell) const;
@@ -1065,11 +1068,33 @@ bool SwHTMLParser::IsReqIF() const
return m_bReqIF;
}
+// if any m_pResizeDrawObjects members are deleted during parse, remove them
+// from m_pResizeDrawObjects and m_pDrawObjectPrcWidths
+void HTMLTable::ObjectInDestruction(const SdrObject& rObject)
+{
+ auto it = std::find(m_pResizeDrawObjects->begin(), m_pResizeDrawObjects->end(), &rObject);
+ assert(it != m_pResizeDrawObjects->end());
+ auto nIndex = std::distance(m_pResizeDrawObjects->begin(), it);
+ m_pResizeDrawObjects->erase(it);
+ auto otherit = m_pDrawObjectPrcWidths->begin() + nIndex * 3;
+ m_pDrawObjectPrcWidths->erase(otherit, otherit + 3);
+}
+
HTMLTable::~HTMLTable()
{
m_pParser->DeregisterHTMLTable(this);
- m_pResizeDrawObjects.reset();
+ if (m_pResizeDrawObjects)
+ {
+ size_t nCount = m_pResizeDrawObjects->size();
+ for (size_t i = 0; i < nCount; ++i)
+ {
+ SdrObject *pObj = (*m_pResizeDrawObjects)[i];
+ pObj->RemoveObjectUser(*this);
+ }
+ m_pResizeDrawObjects.reset();
+ }
+
m_pDrawObjectPrcWidths.reset();
m_pContext.reset();
@@ -2483,6 +2508,7 @@ void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth )
if( !m_pResizeDrawObjects )
m_pResizeDrawObjects.reset(new SdrObjects);
m_pResizeDrawObjects->push_back( pObj );
+ pObj->AddObjectUser(*this);
if( !m_pDrawObjectPrcWidths )
m_pDrawObjectPrcWidths.reset(new std::vector<sal_uInt16>);
@@ -4899,7 +4925,7 @@ void SwHTMLParser::ClearFootnotesMarksInRange(const SwNodeIndex& rMkNdIdx, const
//ofz#9733 drop bookmarks in this range
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- pMarkAccess->deleteMarks(rMkNdIdx, SwNodeIndex(rPtNdIdx, 1), nullptr, nullptr, nullptr);
+ pMarkAccess->deleteMarks(rMkNdIdx, SwNodeIndex(rPtNdIdx, 1), nullptr, nullptr, nullptr, false);
SwFrameFormats& rTable = *pDoc->GetSpzFrameFormats();
for ( auto i = rTable.size(); i; )
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index c368e6682833..0f62708b9371 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2097,7 +2097,7 @@ void DocxAttributeOutput::DoWriteCmd( const OUString& rCmd )
if ( m_pRedlineData && m_pRedlineData->GetType() == RedlineType::Delete )
nTextToken = XML_delInstrText;
- m_pSerializer->startElementNS(XML_w, nTextToken);
+ m_pSerializer->startElementNS(XML_w, nTextToken, FSNS(XML_xml, XML_space), "preserve");
m_pSerializer->writeEscaped( rCmd );
m_pSerializer->endElementNS( XML_w, nTextToken );
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index d0514482e5e1..05e860caec74 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -61,6 +61,17 @@ SwNumRule* MSWordExportBase::DuplicateNumRuleImpl(const SwNumRule *pRule)
return pMyNumRule;
}
+sal_uInt16 MSWordExportBase::DuplicateNumRule(const SwNumRule* pRule, sal_uInt8 nLevel, sal_uInt16 nVal)
+{
+ SwNumRule* const pMyNumRule = DuplicateNumRuleImpl(pRule);
+
+ SwNumFormat aNumFormat(pMyNumRule->Get(nLevel));
+ aNumFormat.SetStart(nVal);
+ pMyNumRule->Set(nLevel, aNumFormat);
+
+ return GetNumberingId(*pMyNumRule);
+}
+
// multiple SwList can be based on the same SwNumRule; ensure one w:abstractNum
// per SwList
sal_uInt16 MSWordExportBase::DuplicateAbsNum(OUString const& rListId,
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index eb06b97195bb..85d65643a37c 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -151,13 +151,13 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport, bool bListStyles )
m_rExport.m_pDoc->GetFootnoteInfo().GetAnchorCharFormat( *m_rExport.m_pDoc );
m_rExport.m_pDoc->GetFootnoteInfo().GetCharFormat( *m_rExport.m_pDoc );
}
- sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.m_pDoc->GetCharFormats()->size() - 1 +
+ sal_uInt32 nAlloc = WW8_RESERVED_SLOTS + m_rExport.m_pDoc->GetCharFormats()->size() - 1 +
m_rExport.m_pDoc->GetTextFormatColls()->size() - 1 +
(bListStyles ? m_rExport.m_pDoc->GetNumRuleTable().size() - 1 : 0);
+ nAlloc = std::min<sal_uInt32>(nAlloc, MSWORD_MAX_STYLES_LIMIT);
// somewhat generous ( free for up to 15 )
- m_pFormatA.reset( new SwFormat*[ nAlloc ] );
- memset( m_pFormatA.get(), 0, nAlloc * sizeof( SwFormat* ) );
+ m_aFormatA.resize(nAlloc, nullptr);
memset( m_aHeadingParagraphStyles, -1 , MAXLEVEL * sizeof( sal_uInt16));
BuildStylesTable();
@@ -173,7 +173,7 @@ sal_uInt16 MSWordStyles::GetSlot( const SwFormat* pFormat ) const
{
sal_uInt16 n;
for ( n = 0; n < m_nUsedSlots; n++ )
- if ( m_pFormatA[n] == pFormat )
+ if ( m_aFormatA[n] == pFormat )
return n;
return 0xfff; // 0xfff: WW: zero
}
@@ -282,19 +282,19 @@ void MSWordStyles::BuildStylesTable()
const SwCharFormats& rArr = *m_rExport.m_pDoc->GetCharFormats(); // first CharFormat
// the default character style ( 0 ) will not be outputted !
- for( size_t n = 1; n < rArr.size(); n++ )
+ for( size_t n = 1; n < rArr.size() && m_nUsedSlots < MSWORD_MAX_STYLES_LIMIT; n++ )
{
SwCharFormat* pFormat = rArr[n];
- m_pFormatA[ BuildGetSlot( *pFormat ) ] = pFormat;
+ m_aFormatA[ BuildGetSlot( *pFormat ) ] = pFormat;
}
const SwTextFormatColls& rArr2 = *m_rExport.m_pDoc->GetTextFormatColls(); // then TextFormatColls
// the default character style ( 0 ) will not be outputted !
- for( size_t n = 1; n < rArr2.size(); n++ )
+ for( size_t n = 1; n < rArr2.size() && m_nUsedSlots < MSWORD_MAX_STYLES_LIMIT; n++ )
{
SwTextFormatColl* pFormat = rArr2[n];
sal_uInt16 nId = BuildGetSlot( *pFormat ) ;
- m_pFormatA[ nId ] = pFormat;
+ m_aFormatA[ nId ] = pFormat;
if ( pFormat->IsAssignedToListLevelOfOutlineStyle() )
{
int nLvl = pFormat->GetAssignedOutlineStyleLevel() ;
@@ -307,7 +307,7 @@ void MSWordStyles::BuildStylesTable()
return;
const SwNumRuleTable& rNumRuleTable = m_rExport.m_pDoc->GetNumRuleTable();
- for (size_t i = 0; i < rNumRuleTable.size(); ++i)
+ for (size_t i = 0; i < rNumRuleTable.size() && m_nUsedSlots < MSWORD_MAX_STYLES_LIMIT; ++i)
{
const SwNumRule* pNumRule = rNumRuleTable[i];
if (pNumRule->IsAutoRule() || pNumRule->GetName().startsWith("WWNum"))
@@ -347,8 +347,8 @@ void MSWordStyles::BuildStyleIds()
for (sal_uInt16 n = 1; n < m_nUsedSlots; ++n)
{
OUString aName;
- if(m_pFormatA[n])
- aName = m_pFormatA[n]->GetName();
+ if (m_aFormatA[n])
+ aName = m_aFormatA[n]->GetName();
else if (m_aNumRules.find(n) != m_aNumRules.end())
aName = m_aNumRules[n]->GetName();
@@ -612,8 +612,8 @@ void MSWordStyles::OutputStyle( SwFormat* pFormat, sal_uInt16 nPos )
for ( int nSuffix = 0; ; ++nSuffix ) {
bool clash=false;
for ( sal_uInt16 n = 1; n < m_nUsedSlots; ++n )
- if ( m_pFormatA[n] &&
- m_pFormatA[n]->GetName().equalsIgnoreAsciiCase(aName) )
+ if ( m_aFormatA[n] &&
+ m_aFormatA[n]->GetName().equalsIgnoreAsciiCase(aName) )
{
clash = true;
break;
@@ -702,7 +702,7 @@ void MSWordStyles::OutputStylesTable()
if (m_aNumRules.find(n) != m_aNumRules.end())
OutputStyle(m_aNumRules[n], n);
else
- OutputStyle( m_pFormatA[n], n );
+ OutputStyle(m_aFormatA[n], n);
}
m_rExport.AttrOutput().EndStyles( m_nUsedSlots );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 9356b87bd86f..0433332493ef 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -657,6 +657,7 @@ public:
/// List is set to restart at a particular value so for export make a
/// completely new list based on this one and export that instead,
/// which duplicates words behaviour in this respect.
+ sal_uInt16 DuplicateNumRule(const SwNumRule* pRule, sal_uInt8 nLevel, sal_uInt16 nVal);
SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
/// check if a new abstractNum is needed for this list
@@ -1576,7 +1577,7 @@ class MSWordStyles
{
MSWordExportBase& m_rExport;
sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL];
- std::unique_ptr<SwFormat*[]> m_pFormatA; ///< Slot <-> Character and paragraph style array (0 for list styles).
+ std::vector<SwFormat*> m_aFormatA; ///< Slot <-> Character and paragraph style array (0 for list styles).
sal_uInt16 m_nUsedSlots;
bool const m_bListStyles; ///< If list styles are requested to be exported as well.
std::map<sal_uInt16, const SwNumRule*> m_aNumRules; ///< Slot <-> List style map.
@@ -1627,7 +1628,7 @@ public:
/// Get styleId of the nId-th style (nId is its position in pFormatA).
OString const & GetStyleId(sal_uInt16 nId) const;
- const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; }
+ const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_aFormatA[nId]; }
/// Get numbering rule of the nId-th style
const SwNumRule* GetSwNumRule(sal_uInt16 nId) const;
sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const { return m_aHeadingParagraphStyles[ nLevel ]; }
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0b2c6527c0ea..5868928c5bf6 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -3649,6 +3649,13 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
}
}
}
+ else if (pTextNd->IsListRestart())
+ {
+ sal_uInt16 nStartWith = static_cast<sal_uInt16>(pTextNd->GetActualListStartValue());
+ nNumId = GetExport().DuplicateNumRule(pRule, nLvl, nStartWith);
+ if (USHRT_MAX != nNumId)
+ ++nNumId;
+ }
}
else
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index f5bdacffe32d..41beb52670ff 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1992,7 +1992,7 @@ void SwWW8ImplReader::ImportDopTypography(const WW8DopTypography &rTypo)
* Footnotes and Endnotes
*/
WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
- maTmpPos(*pRdr->m_pPaM->GetPoint()),
+ mxTmpPos(pRdr->m_rDoc.CreateUnoCursor(*pRdr->m_pPaM->GetPoint())),
mxOldStck(std::move(pRdr->m_xCtrlStck)),
mxOldAnchorStck(std::move(pRdr->m_xAnchorStck)),
mxOldRedlines(std::move(pRdr->m_xRedlineStack)),
@@ -2076,12 +2076,21 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
pRdr->m_xRedlineStack->closeall(*pRdr->m_pPaM->GetPoint());
pRdr->m_aFrameRedlines.emplace(std::move(pRdr->m_xRedlineStack));
+
+ // ofz#37322 drop m_pLastAnchorPos during RedlineStack dtor and restore it afterwards to the same
+ // place, or somewhere close if that place got destroyed
+ std::shared_ptr<SwUnoCursor> xLastAnchorCursor(pRdr->m_pLastAnchorPos ? pRdr->m_rDoc.CreateUnoCursor(*pRdr->m_pLastAnchorPos) : nullptr);
+ pRdr->m_pLastAnchorPos.reset();
+
pRdr->m_xRedlineStack = std::move(mxOldRedlines);
+ if (xLastAnchorCursor)
+ pRdr->m_pLastAnchorPos.reset(new SwPosition(*xLastAnchorCursor->GetPoint()));
+
pRdr->DeleteAnchorStack();
pRdr->m_xAnchorStck = std::move(mxOldAnchorStck);
- *pRdr->m_pPaM->GetPoint() = maTmpPos;
+ *pRdr->m_pPaM->GetPoint() = GetStartPos();
if (mxOldPlcxMan != pRdr->m_xPlcxMan)
pRdr->m_xPlcxMan = mxOldPlcxMan;
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 74953aa2016c..f98853d82295 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -589,7 +589,7 @@ class WW8ReaderSave
{
private:
WW8PLCFxSaveAll maPLCFxSave;
- SwPosition const maTmpPos;
+ std::shared_ptr<SwUnoCursor> mxTmpPos;
std::deque<bool> maOldApos;
std::deque<WW8FieldEntry> maOldFieldStack;
std::unique_ptr<SwWW8FltControlStack> mxOldStck;
@@ -617,7 +617,7 @@ private:
public:
WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1);
void Restore(SwWW8ImplReader* pRdr);
- const SwPosition &GetStartPos() const { return maTmpPos; }
+ const SwPosition &GetStartPos() const { return *mxTmpPos->GetPoint(); }
};
enum class eF_ResT { OK, TEXT, TAGIGN, READ_FSPA };
@@ -922,6 +922,14 @@ public:
explicit wwExtraneousParas(SwDoc &rDoc) : m_rDoc(rDoc) {}
~wwExtraneousParas() { delete_all_from_doc(); }
void insert(SwTextNode *pTextNode) { m_aTextNodes.insert(pTextNode); }
+ void check_anchor_destination(SwTextNode *pTextNode)
+ {
+ auto it = m_aTextNodes.find(pTextNode);
+ if (it == m_aTextNodes.end())
+ return;
+ SAL_WARN("sw.ww8", "It is unexpected to anchor something in a para scheduled for removal");
+ m_aTextNodes.erase(it);
+ }
void delete_all_from_doc();
};
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 6edc842e48ee..026b0ead213c 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2749,8 +2749,17 @@ void WW8TabDesc::FinishSwTable()
{
m_pIo->m_xRedlineStack->closeall(*m_pIo->m_pPaM->GetPoint());
m_pIo->m_aFrameRedlines.emplace(std::move(m_pIo->m_xRedlineStack));
+
+ // ofz#38011 drop m_pLastAnchorPos during RedlineStack dtor and restore it afterwards to the same
+ // place, or somewhere close if that place got destroyed
+ std::shared_ptr<SwUnoCursor> xLastAnchorCursor(m_pIo->m_pLastAnchorPos ? m_pIo->m_rDoc.CreateUnoCursor(*m_pIo->m_pLastAnchorPos) : nullptr);
+ m_pIo->m_pLastAnchorPos.reset();
+
m_pIo->m_xRedlineStack = std::move(mxOldRedlineStack);
+ if (xLastAnchorCursor)
+ m_pIo->m_pLastAnchorPos.reset(new SwPosition(*xLastAnchorCursor->GetPoint()));
+
WW8DupProperties aDup(m_pIo->m_rDoc,m_pIo->m_xCtrlStck.get());
m_pIo->m_xCtrlStck->SetAttr( *m_pIo->m_pPaM->GetPoint(), 0, false);
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 1e68d7a592b4..ca2ddc28fd1f 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2451,6 +2451,9 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p
}
else
{
+ // ofz#34749 we shouldn't anchor anything into an 'extra' paragraph scheduled for
+ // removal at end of import, but check if that scenario is happening
+ m_aExtraneousParas.check_anchor_destination(m_pPaM->GetNode().GetTextNode());
m_xSFlyPara->pFlyFormat = m_rDoc.MakeFlySection(WW8SwFlyPara::eAnchor,
m_pPaM->GetPoint(), &aFlySet);
OSL_ENSURE(m_xSFlyPara->pFlyFormat->GetAnchor().GetAnchorId() ==
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index bfd4e488fcb8..b42a28eeacb7 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -33,6 +33,9 @@
#include <IDocumentStylePoolAccess.hxx>
#include <tools/datetime.hxx>
#include <poolfmt.hxx>
+#include <fmtanchr.hxx>
+#include <ftnidx.hxx>
+#include <txtftn.hxx>
#include <unoredline.hxx>
#include <DocumentRedlineManager.hxx>
#include "xmlimp.hxx"
@@ -571,6 +574,73 @@ inline bool XMLRedlineImportHelper::IsReady(const RedlineInfo* pRedline)
!pRedline->bNeedsAdjustment );
}
+/// recursively check if rPos or its anchor (if in fly or footnote) is in redline section
+static auto RecursiveContains(SwStartNode const& rRedlineSection, SwNode const& rPos) -> bool
+{
+ if (rRedlineSection.GetIndex() <= rPos.GetIndex()
+ && rPos.GetIndex() <= rRedlineSection.EndOfSectionIndex())
+ {
+ return true;
+ }
+ // loop to iterate "up" in the node tree and find an anchored XText
+ for (SwStartNode const* pStartNode = rPos.StartOfSectionNode();
+ pStartNode != nullptr && pStartNode->GetIndex() != 0;
+ pStartNode = pStartNode->StartOfSectionNode())
+ {
+ switch (pStartNode->GetStartNodeType())
+ {
+ case SwNormalStartNode:
+ case SwTableBoxStartNode:
+ continue;
+ break;
+ case SwFlyStartNode:
+ {
+ SwFrameFormat const*const pFormat(pStartNode->GetFlyFormat());
+ assert(pFormat);
+ SwFormatAnchor const& rAnchor(pFormat->GetAnchor());
+ if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PAGE)
+ {
+ return false;
+ }
+ else if (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_FLY)
+ { // anchor is on a start node, avoid skipping it:
+ pStartNode = rAnchor.GetContentAnchor()->nNode.GetNode().GetStartNode();
+ assert(pStartNode);
+ // pass the next node to recursive call - it will call
+ // call StartOfSectionNode on it and go back to pStartNode
+ SwNodeIndex const next(*pStartNode, +1);
+ return RecursiveContains(rRedlineSection, next.GetNode());
+ }
+ else
+ {
+ return RecursiveContains(rRedlineSection, rAnchor.GetContentAnchor()->nNode.GetNode());
+ }
+ }
+ break;
+ case SwFootnoteStartNode:
+ { // sigh ... need to search
+ for (SwTextFootnote const*const pFootnote : rRedlineSection.GetDoc()->GetFootnoteIdxs())
+ {
+ if (pStartNode == pFootnote->GetStartNode()->GetNode().GetStartNode())
+ {
+ return RecursiveContains(rRedlineSection, pFootnote->GetTextNode());
+ }
+ }
+ assert(false);
+ }
+ break;
+ case SwHeaderStartNode:
+ case SwFooterStartNode:
+ return false; // headers aren't anchored
+ break;
+ default:
+ assert(false);
+ break;
+ }
+ }
+ return false;
+}
+
void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
{
OSL_ENSURE(nullptr != pRedlineInfo, "need redline info");
@@ -649,6 +719,16 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
}
}
}
+ else if (pRedlineInfo->pContentIndex != nullptr
+ // should be enough to check 1 position of aPaM bc CheckNodesRange() above
+ && RecursiveContains(*pRedlineInfo->pContentIndex->GetNode().GetStartNode(), aPaM.GetPoint()->nNode.GetNode()))
+ {
+ SAL_WARN("sw.xml", "Recursive change tracking, removing");
+ // reuse aPaM to remove it from nodes that will be deleted
+ *aPaM.GetPoint() = SwPosition(pRedlineInfo->pContentIndex->GetNode());
+ aPaM.DeleteMark();
+ pDoc->getIDocumentContentOperations().DeleteSection(&aPaM.GetPoint()->nNode.GetNode());
+ }
else
{
// regular file loading: insert redline
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 22e6a42368a7..a5abc5baf15f 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -23,6 +23,8 @@
#include <xmloff/xmlexp.hxx>
#include "xmlitmap.hxx"
#include <xmloff/xmltoken.hxx>
+
+#include <optional>
#include <vector>
class SwDoc;
@@ -73,7 +75,8 @@ class SwXMLExport : public SvXMLExport
SwXMLTableInfo_Impl& rTableInfo,
bool bTop=false );
- void ExportFormat( const SwFormat& rFormat, enum ::xmloff::token::XMLTokenEnum eClass );
+ void ExportFormat(const SwFormat& rFormat, enum ::xmloff::token::XMLTokenEnum eClass,
+ ::std::optional<OUString> const oStyleName);
void ExportTableFormat( const SwFrameFormat& rFormat, sal_uInt32 nAbsWidth );
void ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol );
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 209cdd5a3904..b7aa337eede3 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -46,7 +46,8 @@ using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::lang;
using namespace ::xmloff::token;
-void SwXMLExport::ExportFormat( const SwFormat& rFormat, enum XMLTokenEnum eFamily )
+void SwXMLExport::ExportFormat(const SwFormat& rFormat, enum XMLTokenEnum eFamily,
+ ::std::optional<OUString> const oStyleName)
{
// <style:style ...>
CheckAttrList();
@@ -57,11 +58,14 @@ void SwXMLExport::ExportFormat( const SwFormat& rFormat, enum XMLTokenEnum eFami
return;
OSL_ENSURE( eFamily != XML_TOKEN_INVALID, "family must be specified" );
// style:name="..."
+ assert(oStyleName || (eFamily != XML_TABLE_ROW && eFamily != XML_TABLE_CELL));
bool bEncoded = false;
- AddAttribute( XML_NAMESPACE_STYLE, XML_NAME, EncodeStyleName(
- rFormat.GetName(), &bEncoded ) );
+ OUString const name(oStyleName ? *oStyleName : rFormat.GetName());
+ AddAttribute(XML_NAMESPACE_STYLE, XML_NAME, EncodeStyleName(name, &bEncoded));
if( bEncoded )
- AddAttribute( XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, rFormat.GetName() );
+ {
+ AddAttribute(XML_NAMESPACE_STYLE, XML_DISPLAY_NAME, name);
+ }
if( eFamily != XML_TOKEN_INVALID )
AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, eFamily );
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index b307a5c10872..8972bd14a51e 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -219,7 +219,7 @@ void SwXMLExport::ExportTableFormat( const SwFrameFormat& rFormat, sal_uInt32 nA
{
static_cast<SwXMLTableItemMapper_Impl *>(m_pTableItemMapper.get())
->SetAbsWidth( nAbsWidth );
- ExportFormat( rFormat, XML_TABLE );
+ ExportFormat(rFormat, XML_TABLE, {});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 6a4fa1c9902b..d840509ecdc0 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -179,13 +179,18 @@ class SwXMLTableFrameFormatsSort_Impl
{
private:
SwXMLFrameFormats_Impl aFormatList;
+ SwXMLTextParagraphExport::FormatMap & m_rFormatMap;
+
public:
- bool AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine );
- bool AddCell( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix,
+ SwXMLTableFrameFormatsSort_Impl(SwXMLTextParagraphExport::FormatMap & rFormatMap)
+ : m_rFormatMap(rFormatMap)
+ {}
+ ::std::optional<OUString> AddRow(SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine );
+ ::std::optional<OUString> AddCell(SwFrameFormat& rFrameFormat, const OUString& rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop );
};
-bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
+::std::optional<OUString> SwXMLTableFrameFormatsSort_Impl::AddRow(SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nLine )
{
@@ -206,10 +211,12 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
// empty styles have not to be exported
if( !pFrameSize && !pBrush && !pRowSplit )
- return false;
+ {
+ m_rFormatMap.emplace(&rFrameFormat, ::std::optional<OUString>()); // empty just to enable assert
+ return {};
+ }
// order is: -/brush, size/-, size/brush
- bool bInsert = true;
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
@@ -272,19 +279,19 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
continue;
// found!
- rFrameFormat.SetName( pTestFormat->GetName() );
- bInsert = false;
- break;
+ auto const oName(m_rFormatMap.find(pTestFormat)->second);
+ assert(oName);
+ m_rFormatMap.emplace(&rFrameFormat, oName);
+ return {};
}
- if( bInsert )
{
- rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1) );
+ OUString const name(rNamePrefix + "." + OUString::number(nLine+1));
+ m_rFormatMap.emplace(&rFrameFormat, ::std::optional<OUString>(name));
if ( i != aFormatList.end() ) ++i;
aFormatList.insert( i, &rFrameFormat );
+ return ::std::optional<OUString>(name);
}
-
- return bInsert;
}
static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix,
@@ -301,7 +308,7 @@ static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix,
+ "." + OUString::number(nRow + 1);
}
-bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
+::std::optional<OUString> SwXMLTableFrameFormatsSort_Impl::AddCell(SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
@@ -336,7 +343,10 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
// empty styles have not to be exported
if( !pVertOrient && !pBrush && !pBox && !pNumFormat && !pFrameDir && !pAttCnt )
- return false;
+ {
+ m_rFormatMap.emplace(&rFrameFormat, ::std::optional<OUString>()); // empty just to enable assert
+ return {};
+ }
// order is: -/-/-/num,
// -/-/box/-, -/-/box/num,
@@ -344,7 +354,6 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
// vert/-/-/-, vert/-/-/num, vert/-/box/-, ver/-/box/num,
// vert/brush/-/-, vert/brush/-/num, vert/brush/box/-,
// vert/brush/box/num
- bool bInsert = true;
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
@@ -462,19 +471,19 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
continue;
// found!
- rFrameFormat.SetName( pTestFormat->GetName() );
- bInsert = false;
- break;
+ auto const oName(m_rFormatMap.find(pTestFormat)->second);
+ assert(oName);
+ m_rFormatMap.emplace(&rFrameFormat, oName);
+ return {};
}
- if( bInsert )
{
- rFrameFormat.SetName( lcl_xmltble_appendBoxPrefix( rNamePrefix, nCol, nRow, bTop ) );
+ OUString const name(lcl_xmltble_appendBoxPrefix(rNamePrefix, nCol, nRow, bTop));
+ m_rFormatMap.emplace(&rFrameFormat, ::std::optional<OUString>(name));
if ( i != aFormatList.end() ) ++i;
aFormatList.insert( i, &rFrameFormat );
+ return ::std::optional<OUString>(name);
}
-
- return bInsert;
}
class SwXMLTableInfo_Impl
@@ -483,10 +492,21 @@ class SwXMLTableInfo_Impl
Reference<XTextSection> m_xBaseSection;
bool m_bBaseSectionValid;
sal_uInt32 const m_nPrefix;
+ SwXMLTextParagraphExport::FormatMap const& m_rLineFormats;
+ SwXMLTextParagraphExport::FormatMap const& m_rBoxFormats;
public:
- inline SwXMLTableInfo_Impl( const SwTable *pTable, sal_uInt16 nPrefix );
+ inline SwXMLTableInfo_Impl( const SwTable *pTable, sal_uInt16 nPrefix,
+ SwXMLTextParagraphExport::FormatMap const& rLineFormats,
+ SwXMLTextParagraphExport::FormatMap const& rBoxFormats)
+ : m_pTable(pTable)
+ , m_bBaseSectionValid(false)
+ , m_nPrefix(nPrefix)
+ , m_rLineFormats(rLineFormats)
+ , m_rBoxFormats(rBoxFormats)
+ {
+ }
const SwTable *GetTable() const { return m_pTable; }
const SwFrameFormat *GetTableFormat() const { return m_pTable->GetFrameFormat(); }
@@ -496,15 +516,10 @@ public:
inline void SetBaseSection( const Reference < XTextSection >& rBase );
/// The namespace (table or loext) that should be used for the elements.
sal_uInt16 GetPrefix() const { return m_nPrefix; }
+ SwXMLTextParagraphExport::FormatMap const& GetLineFormats() const { return m_rLineFormats; }
+ SwXMLTextParagraphExport::FormatMap const& GetBoxFormats() const { return m_rBoxFormats; }
};
-inline SwXMLTableInfo_Impl::SwXMLTableInfo_Impl(const SwTable *pTable, sal_uInt16 nPrefix) :
- m_pTable(pTable),
- m_bBaseSectionValid(false),
- m_nPrefix(nPrefix)
-{
-}
-
inline void SwXMLTableInfo_Impl::SetBaseSection(
const Reference < XTextSection >& rBaseSection )
{
@@ -638,8 +653,10 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
SwTableLine *pLine = rLines[nLine];
SwFrameFormat *pFrameFormat = pLine->GetFrameFormat();
- if( rExpRows.AddRow( *pFrameFormat, rNamePrefix, nLine ) )
- ExportFormat( *pFrameFormat, XML_TABLE_ROW );
+ if (auto oNew = rExpRows.AddRow(*pFrameFormat, rNamePrefix, nLine))
+ {
+ ExportFormat(*pFrameFormat, XML_TABLE_ROW, oNew);
+ }
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
const size_t nBoxes = rBoxes.size();
@@ -666,9 +683,11 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
if( pBoxSttNd )
{
SwFrameFormat *pFrameFormat2 = pBox->GetFrameFormat();
- if( rExpCells.AddCell( *pFrameFormat2, rNamePrefix, nOldCol, nLine,
+ if (auto oNew = rExpCells.AddCell(*pFrameFormat2, rNamePrefix, nOldCol, nLine,
bTop) )
- ExportFormat( *pFrameFormat2, XML_TABLE_CELL );
+ {
+ ExportFormat(*pFrameFormat2, XML_TABLE_CELL, oNew);
+ }
Reference < XCell > xCell = SwXCell::CreateXCell(
const_cast<SwFrameFormat *>(rTableInfo.GetTableFormat()),
@@ -714,8 +733,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
}
}
-void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd )
+void SwXMLExport::ExportTableAutoStyles(const SwTableNode& rTableNd)
{
+ auto & rFormats(static_cast<SwXMLTextParagraphExport *>(GetTextParagraphExport().get())->GetTableFormats());
+ auto const it(rFormats.find(&rTableNd));
+ assert(it != rFormats.end());
+ SwXMLTextParagraphExport::FormatMap & rRowFormats(it->second.first);
+ SwXMLTextParagraphExport::FormatMap & rBoxFormats(it->second.second);
const SwTable& rTable = rTableNd.GetTable();
const SwFrameFormat *pTableFormat = rTable.GetFrameFormat();
@@ -743,9 +767,9 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd )
ExportTableFormat( *pTableFormat, nAbsWidth );
SwXMLTableColumnsSortByWidth_Impl aExpCols;
- SwXMLTableFrameFormatsSort_Impl aExpRows;
- SwXMLTableFrameFormatsSort_Impl aExpCells;
- SwXMLTableInfo_Impl aTableInfo( &rTable, XML_NAMESPACE_TABLE );
+ SwXMLTableFrameFormatsSort_Impl aExpRows(rRowFormats);
+ SwXMLTableFrameFormatsSort_Impl aExpCells(rBoxFormats);
+ SwXMLTableInfo_Impl aTableInfo(&rTable, XML_NAMESPACE_TABLE, rRowFormats, rBoxFormats);
ExportTableLinesAutoStyles( rTable.GetTabLines(), nAbsWidth, nBaseWidth,
pTableFormat->GetName(), aExpCols, aExpRows, aExpCells,
aTableInfo, true);
@@ -763,10 +787,12 @@ void SwXMLExport::ExportTableBox( const SwTableBox& rBox,
const SwFrameFormat *pFrameFormat = rBox.GetFrameFormat();
if( pFrameFormat )
{
- const OUString& sName = pFrameFormat->GetName();
- if( !sName.isEmpty() )
+ auto const it(rTableInfo.GetBoxFormats().find(pFrameFormat));
+ assert(it != rTableInfo.GetBoxFormats().end());
+ if (it->second)
{
- AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(sName) );
+ assert(!it->second->isEmpty());
+ AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(*it->second));
}
}
}
@@ -896,10 +922,12 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const SwFrameFormat *pFrameFormat = rLine.GetFrameFormat();
if( pFrameFormat )
{
- const OUString& sName = pFrameFormat->GetName();
- if( !sName.isEmpty() )
+ auto const it(rTableInfo.GetLineFormats().find(pFrameFormat));
+ assert(it != rTableInfo.GetLineFormats().end());
+ if (it->second)
{
- AddAttribute( XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(sName) );
+ assert(!it->second->isEmpty());
+ AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, EncodeStyleName(*it->second));
}
}
@@ -1051,29 +1079,6 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
delete pLines;
}
-static void lcl_xmltble_ClearName_Line( SwTableLine* pLine );
-
-static void lcl_xmltble_ClearName_Box( SwTableBox* pBox )
-{
- if( !pBox->GetSttNd() )
- {
- for( SwTableLine* pLine : pBox->GetTabLines() )
- lcl_xmltble_ClearName_Line( pLine );
- }
- else
- {
- SwFrameFormat *pFrameFormat = pBox->GetFrameFormat();
- if( pFrameFormat && !pFrameFormat->GetName().isEmpty() )
- pFrameFormat->SetName( OUString() );
- }
-}
-
-void lcl_xmltble_ClearName_Line( SwTableLine* pLine )
-{
- for( SwTableBox* pBox : pLine->GetTabBoxes() )
- lcl_xmltble_ClearName_Box( pBox );
-}
-
void SwXMLExport::ExportTable( const SwTableNode& rTableNd )
{
const SwTable& rTable = rTableNd.GetTable();
@@ -1132,15 +1137,16 @@ void SwXMLExport::ExportTable( const SwTableNode& rTableNd )
XML_DDE_SOURCE, true, false);
}
- SwXMLTableInfo_Impl aTableInfo( &rTable, nPrefix );
+ auto const& rFormats(static_cast<SwXMLTextParagraphExport const*>(GetTextParagraphExport().get())->GetTableFormats());
+ auto const it(rFormats.find(&rTableNd));
+ assert(it != rFormats.end());
+ SwXMLTableInfo_Impl aTableInfo(&rTable, nPrefix, it->second.first, it->second.second);
ExportTableLines( rTable.GetTabLines(), aTableInfo, rTable.GetRowsToRepeat() );
-
- for( SwTableLine *pLine : const_cast<SwTable &>(rTable).GetTabLines() )
- lcl_xmltble_ClearName_Line( pLine );
}
}
void SwXMLTextParagraphExport::exportTableAutoStyles() {
+ // note: maTableNodes is used here only to keep the iteration order as before
for (const auto* pTableNode : maTableNodes)
{
static_cast<SwXMLExport&>(GetExport()).ExportTableAutoStyles(*pTableNode);
@@ -1187,6 +1193,7 @@ void SwXMLTextParagraphExport::exportTable(
&& (bExportStyles || !pFormat->GetDoc()->IsInHeaderFooter(aIdx)))
{
maTableNodes.push_back(pTableNd);
+ m_TableFormats.emplace(pTableNd, ::std::make_pair(SwXMLTextParagraphExport::FormatMap(), SwXMLTextParagraphExport::FormatMap()));
// Collect all tables inside cells of this table, too
const auto aCellNames = pXTable->getCellNames();
for (const OUString& rCellName : aCellNames)
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 0fde4d3c509d..07ea1355b8fb 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2021,7 +2021,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( ( pNumFormat != nullptr ) && ( pNumFormat->GetValue() == 0 ) )
+ if (pNumFormat && (pNumFormat->GetValue() % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
{
// only one text node?
SwNodeIndex aNodeIndex( *(pCell->GetStartNode()), 1 );
diff --git a/sw/source/filter/xml/xmltexte.hxx b/sw/source/filter/xml/xmltexte.hxx
index 4432e4ce0166..78e0271384c3 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -23,6 +23,9 @@
#include <xmloff/txtparae.hxx>
#include <tools/globname.hxx>
+#include <optional>
+#include <unordered_map>
+
#define XML_EMBEDDEDOBJECTGRAPHIC_URL_BASE "vnd.sun.star.GraphicObject:"
class SwXMLExport;
@@ -41,6 +44,10 @@ class SwXMLTextParagraphExport : public XMLTextParagraphExport
// Collected autostyles for use in exportTextAutoStyles
std::vector<const SwTableNode*> maTableNodes;
+public:
+ typedef ::std::unordered_map<SwFrameFormat const*, ::std::optional<OUString>> FormatMap;
+private:
+ ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> m_TableFormats;
static SwNoTextNode *GetNoTextNode(
const css::uno::Reference < css::beans::XPropertySet >& rPropSet );
@@ -63,6 +70,11 @@ public:
SwXMLExport& rExp,
SvXMLAutoStylePoolP& rAutoStylePool );
virtual ~SwXMLTextParagraphExport() override;
+
+ ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> const&
+ GetTableFormats() const { return m_TableFormats; }
+ ::std::unordered_map<SwTableNode const*, ::std::pair<FormatMap, FormatMap>> &
+ GetTableFormats() { return m_TableFormats; }
};
#endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 788bec5c2d47..caf300f239c6 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -853,9 +853,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).IsExoticProtocol())
+ GetXMLImport().NotifyMacroEventRead();
+
xSet->setPropertyValue("FrameURL",
- makeAny( URIHelper::SmartRel2Abs(
- INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) );
+ makeAny( sHRef ) );
xSet->setPropertyValue("FrameName",
makeAny( rName ) );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 7e49ff3dc2a9..98359cc2ae05 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -1204,8 +1204,11 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
, m_xSpacesCB(m_xBuilder->weld_check_button("spaces"))
, m_xHSpacesCB(m_xBuilder->weld_check_button("nonbreak"))
, m_xTabCB(m_xBuilder->weld_check_button("tabs"))
+ , m_xTabLabel(m_xBuilder->weld_label("tabs_label"))
, m_xBreakCB(m_xBuilder->weld_check_button("break"))
, m_xCharHiddenCB(m_xBuilder->weld_check_button("hiddentext"))
+ , m_xBookmarkCB(m_xBuilder->weld_check_button("bookmarks"))
+ , m_xBookmarkLabel(m_xBuilder->weld_label("bookmarks_label"))
, m_xDirectCursorFrame(m_xBuilder->weld_frame("directcrsrframe"))
, m_xOnOffCB(m_xBuilder->weld_check_button("cursoronoff"))
, m_xFillMarginRB(m_xBuilder->weld_radio_button("fillmargin"))
@@ -1215,6 +1218,7 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
, m_xFillSpaceRB(m_xBuilder->weld_radio_button("fillspace"))
, m_xCursorProtFrame(m_xBuilder->weld_frame("crsrprotframe"))
, m_xCursorInProtCB(m_xBuilder->weld_check_button("cursorinprot"))
+ , m_xDefaultAnchorType(m_xBuilder->weld_combo_box("cxDefaultAnchor"))
, m_xMathBaselineAlignmentCB(m_xBuilder->weld_check_button("mathbaseline"))
{
const SfxPoolItem* pItem = nullptr;
@@ -1240,7 +1244,10 @@ SwShdwCursorOptionsTabPage::SwShdwCursorOptionsTabPage(weld::Container* pPage, w
return;
m_xTabCB->hide();
+ m_xTabLabel->hide();
m_xCharHiddenCB->hide();
+ m_xBookmarkCB->hide();
+ m_xBookmarkLabel->hide();
m_xDirectCursorFrame->hide();
m_xOnOffCB->hide();
@@ -1320,6 +1327,7 @@ bool SwShdwCursorOptionsTabPage::FillItemSet( SfxItemSet* rSet )
aDisp.bNonbreakingSpace = m_xHSpacesCB->get_active();
aDisp.bSoftHyphen = m_xSHyphCB->get_active();
aDisp.bCharHiddenText = m_xCharHiddenCB->get_active();
+ aDisp.bBookmarks = m_xBookmarkCB->get_active();
aDisp.bManualBreak = m_xBreakCB->get_active();
bRet |= (!pOldAttr || aDisp != *pOldAttr);
@@ -1372,6 +1380,7 @@ void SwShdwCursorOptionsTabPage::Reset( const SfxItemSet* rSet )
m_xHSpacesCB->set_active( pDocDisplayAttr->bNonbreakingSpace );
m_xSHyphCB->set_active( pDocDisplayAttr->bSoftHyphen );
m_xCharHiddenCB->set_active( pDocDisplayAttr->bCharHiddenText );
+ m_xBookmarkCB->set_active(pDocDisplayAttr->bBookmarks);
m_xBreakCB->set_active( pDocDisplayAttr->bManualBreak );
}
}
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 05dccd0da12a..247e86b9e71b 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -807,9 +807,9 @@ VclPtr<AbstractSwAsciiFilterDlg> SwAbstractDialogFactory_Impl::CreateSwAsciiFilt
}
VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwInsertBookmarkDlg(weld::Window *pParent,
- SwWrtShell &rSh, SfxRequest& rReq)
+ SwWrtShell &rSh, SfxRequest& rReq, OUString const*const pSelected)
{
- return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_unique<SwInsertBookmarkDlg>(pParent, rSh, rReq));
+ return VclPtr<AbstractGenericDialog_Impl>::Create(std::make_unique<SwInsertBookmarkDlg>(pParent, rSh, rReq, pSelected));
}
VclPtr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakDlg(weld::Window* pParent, SwWrtShell &rSh)
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index 579fe94562c2..a18a8df53998 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -654,7 +654,7 @@ public:
virtual VclPtr<SfxAbstractDialog> CreateSwAddressAbstractDlg(weld::Window* pParent, const SfxItemSet& rSet) override;
virtual VclPtr<AbstractSwAsciiFilterDlg> CreateSwAsciiFilterDlg(weld::Window* pParent, SwDocShell& rDocSh,
SvStream* pStream) override;
- virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq) override;
+ virtual VclPtr<VclAbstractDialog> CreateSwInsertBookmarkDlg(weld::Window *pParent, SwWrtShell &rSh, SfxRequest& rReq, OUString const* pSelected) override;
virtual VclPtr<AbstractSwBreakDlg> CreateSwBreakDlg(weld::Window *pParent, SwWrtShell &rSh) override;
virtual VclPtr<VclAbstractDialog> CreateSwChangeDBDlg(SwView& rVw) override;
virtual VclPtr<SfxAbstractTabDialog> CreateSwCharDlg(weld::Window* pParent, SwView& pVw, const SfxItemSet& rCoreSet,
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 8c1bb998fb85..6172d2bc7b8d 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -99,10 +99,10 @@ SwFieldDlg::~SwFieldDlg()
{
}
-void SwFieldDlg::EndDialog()
+void SwFieldDlg::EndDialog(int nResponse)
{
m_bClosing = true;
- SfxTabDialogController::EndDialog();
+ SfxTabDialogController::EndDialog(nResponse);
m_bClosing = false;
}
@@ -110,9 +110,16 @@ void SwFieldDlg::Close()
{
if (m_bClosing)
return;
- m_pBindings->GetDispatcher()->
+ const SfxPoolItem* pResult = m_pBindings->GetDispatcher()->
Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD,
SfxCallMode::SYNCHRON|SfxCallMode::RECORD);
+ if (!pResult)
+ {
+ // If Execute action did fail for whatever reason, this means that request
+ // to close did fail or wasn't delivered to SwTextShell::ExecField().
+ // Just explicitly close dialog in this case.
+ SfxTabDialogController::EndDialog(RET_CLOSE);
+ }
}
void SwFieldDlg::Initialize(SfxChildWinInfo const *pInfo)
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 33a0eab8cd69..5eca069b963b 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -955,7 +955,8 @@ SwIndexMarkFloatDlg::SwIndexMarkFloatDlg(SfxBindings* _pBindings,
"modules/swriter/ui/indexentry.ui", "IndexEntryDialog")
, m_aContent(m_xDialog, *m_xBuilder, bNew, *::GetActiveWrtShell())
{
- m_aContent.ReInitDlg(*::GetActiveWrtShell());
+ if (SwWrtShell* pSh = ::GetActiveWrtShell())
+ m_aContent.ReInitDlg(*pSh);
Initialize(pInfo);
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 7f5e82fbbe4e..4133b28a8914 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -89,6 +89,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void)
// allow to delete only if all bookmarks are recognized
m_xDeleteBtn->set_sensitive(nEntries > 0 && nSelectedEntries == nEntries && !m_bAreProtected);
m_xGotoBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1);
+ m_xEditTextBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1);
m_xRenameBtn->set_sensitive(nEntries == 1 && nSelectedEntries == 1 && !m_bAreProtected);
}
@@ -105,7 +106,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void)
sw::mark::IMark* pBookmark = reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rEntry).toInt64());
OUString sRemoved = pBookmark->GetName();
IDocumentMarkAccess* const pMarkAccess = rSh.getIDocumentMarkAccess();
- pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved));
+ pMarkAccess->deleteMark(pMarkAccess->findMark(sRemoved), false);
SfxRequest aReq(rSh.GetView().GetViewFrame(), FN_DELETE_BOOKMARK);
aReq.AppendItem(SfxStringItem(FN_DELETE_BOOKMARK, sRemoved));
aReq.Done();
@@ -127,6 +128,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, DeleteHdl, weld::Button&, void)
m_xDeleteBtn->set_sensitive(false);
m_xGotoBtn->set_sensitive(false);
+ m_xEditTextBtn->set_sensitive(false);
m_xRenameBtn->set_sensitive(false);
m_xInsertBtn->set_sensitive(false);
}
@@ -151,6 +153,11 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void)
if (!m_xBookmarksBox->has_focus())
return;
+ SelectionChanged();
+}
+
+void SwInsertBookmarkDlg::SelectionChanged()
+{
OUStringBuffer sEditBoxText;
int nSelectedRows = 0;
m_xBookmarksBox->selected_foreach([this, &sEditBoxText, &nSelectedRows](weld::TreeIter& rEntry){
@@ -166,6 +173,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void)
{
m_xInsertBtn->set_sensitive(false);
m_xGotoBtn->set_sensitive(nSelectedRows == 1);
+ m_xEditTextBtn->set_sensitive(nSelectedRows == 1);
m_xRenameBtn->set_sensitive(nSelectedRows == 1 && !m_bAreProtected);
m_xDeleteBtn->set_sensitive(!m_bAreProtected);
m_xEditBox->set_text(sEditBoxText.makeStringAndClear());
@@ -174,11 +182,23 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, weld::TreeView&, void)
{
m_xInsertBtn->set_sensitive(!m_bAreProtected);
m_xGotoBtn->set_sensitive(false);
+ m_xEditTextBtn->set_sensitive(false);
m_xRenameBtn->set_sensitive(false);
m_xDeleteBtn->set_sensitive(false);
}
}
+IMPL_LINK_NOARG(SwInsertBookmarkDlg, EditTextHdl, weld::Button&, void)
+{
+ if (!ValidateBookmarks())
+ return;
+ auto pSelected = m_xBookmarksBox->get_selected();
+ if (!pSelected)
+ return;
+
+ m_xBookmarksBox->start_editing(*pSelected);
+}
+
IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void)
{
if (!ValidateBookmarks())
@@ -204,6 +224,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void)
ValidateBookmarks();
m_xDeleteBtn->set_sensitive(false);
m_xGotoBtn->set_sensitive(false);
+ m_xEditTextBtn->set_sensitive(false);
m_xRenameBtn->set_sensitive(false);
m_xInsertBtn->set_sensitive(false);
}
@@ -229,6 +250,45 @@ IMPL_LINK(SwInsertBookmarkDlg, ChangeHideHdl, weld::ToggleButton&, rBox, void)
m_xConditionFT->set_sensitive(bHide);
}
+IMPL_LINK(SwInsertBookmarkDlg, EditingHdl, weld::TreeIter const&, rIter, bool)
+{
+ sw::mark::IMark const* const pBookmark(
+ reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rIter).toInt64()));
+ assert(pBookmark);
+ return pBookmark->IsExpanded()
+ && pBookmark->GetMarkPos().nNode == pBookmark->GetOtherMarkPos().nNode
+ && !m_xBookmarksBox->get_text(rIter).endsWith(u"…");
+}
+
+IMPL_LINK(SwInsertBookmarkDlg, EditedHdl, comma_issue, rIterString, bool)
+{
+ sw::mark::IMark const* const pBookmark(
+ reinterpret_cast<sw::mark::IMark*>(m_xBookmarksBox->get_id(rIterString.first).toInt64()));
+ assert(pBookmark);
+ bool bRet(false);
+ if (pBookmark->GetMarkPos() != pBookmark->GetOtherMarkPos())
+ {
+ if (pBookmark->GetMarkPos().nNode != pBookmark->GetOtherMarkPos().nNode)
+ {
+ return false; // don't allow editing if it spans multiple nodes
+ }
+ rSh.Push();
+ rSh.GotoMark(pBookmark);
+ // GetSelText only works for 1 paragraph, but it's checked above
+ if (rSh.GetSelText() != rIterString.second)
+ {
+ bRet = rSh.Replace(rIterString.second, false);
+ }
+ rSh.Pop(SwEditShell::PopMode::DeleteCurrent);
+ }
+ else if (pBookmark->IsExpanded() && !rIterString.second.isEmpty())
+ { // SwEditShell::Replace does nothing for empty selection
+ rSh.Insert(rIterString.second);
+ bRet = true;
+ }
+ return bRet;
+}
+
void SwInsertBookmarkDlg::GotoSelectedBookmark()
{
if (!ValidateBookmarks())
@@ -292,14 +352,15 @@ void SwInsertBookmarkDlg::PopulateTable()
{
if (IDocumentMarkAccess::MarkType::BOOKMARK == IDocumentMarkAccess::GetType(**ppBookmark))
{
- m_xBookmarksBox->InsertBookmark(*ppBookmark);
+ m_xBookmarksBox->InsertBookmark(rSh, *ppBookmark);
aTableBookmarks.emplace_back(*ppBookmark, (*ppBookmark)->GetName());
}
}
m_nLastBookmarksCount = pMarkAccess->getBookmarksCount();
}
-SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS, SfxRequest& rRequest)
+SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS, SfxRequest& rRequest,
+ OUString const* const pSelected)
: SfxDialogController(pParent, "modules/swriter/ui/insertbookmark.ui", "InsertBookmarkDialog")
, rSh(rS)
, rReq(rRequest)
@@ -309,6 +370,7 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS,
, m_xInsertBtn(m_xBuilder->weld_button("insert"))
, m_xDeleteBtn(m_xBuilder->weld_button("delete"))
, m_xGotoBtn(m_xBuilder->weld_button("goto"))
+ , m_xEditTextBtn(m_xBuilder->weld_button("edittext"))
, m_xRenameBtn(m_xBuilder->weld_button("rename"))
, m_xHideCB(m_xBuilder->weld_check_button("hide"))
, m_xConditionFT(m_xBuilder->weld_label("condlabel"))
@@ -319,17 +381,24 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS,
m_xBookmarksBox->connect_changed(LINK(this, SwInsertBookmarkDlg, SelectionChangedHdl));
m_xBookmarksBox->connect_row_activated(LINK(this, SwInsertBookmarkDlg, DoubleClickHdl));
m_xBookmarksBox->connect_column_clicked(LINK(this, SwInsertBookmarkDlg, HeaderBarClick));
+ m_xBookmarksBox->connect_editing(LINK(this, SwInsertBookmarkDlg, EditingHdl),
+ LINK(this, SwInsertBookmarkDlg, EditedHdl));
m_xEditBox->connect_changed(LINK(this, SwInsertBookmarkDlg, ModifyHdl));
m_xInsertBtn->connect_clicked(LINK(this, SwInsertBookmarkDlg, InsertHdl));
m_xDeleteBtn->connect_clicked(LINK(this, SwInsertBookmarkDlg, DeleteHdl));
m_xGotoBtn->connect_clicked(LINK(this, SwInsertBookmarkDlg, GotoHdl));
+ m_xEditTextBtn->connect_clicked(LINK(this, SwInsertBookmarkDlg, EditTextHdl));
m_xRenameBtn->connect_clicked(LINK(this, SwInsertBookmarkDlg, RenameHdl));
m_xHideCB->connect_toggled(LINK(this, SwInsertBookmarkDlg, ChangeHideHdl));
m_xDeleteBtn->set_sensitive(false);
m_xGotoBtn->set_sensitive(false);
+ m_xEditTextBtn->set_sensitive(false);
m_xRenameBtn->set_sensitive(false);
+ // select 3rd column, otherwise it'll pick 1st one
+ m_xBookmarksBox->set_column_editables({ false, false, true, false, false });
+
PopulateTable();
m_xEditBox->set_text(m_xBookmarksBox->GetNameProposal());
@@ -352,6 +421,18 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rS,
// disabled until "Hide" flag is not checked
m_xConditionED->set_sensitive(false);
m_xConditionFT->set_sensitive(false);
+
+ if (pSelected)
+ {
+ if (m_xBookmarksBox->SelectByName(*pSelected))
+ {
+ SelectionChanged();
+ // which is better, focus on a button or focus on the table row?
+ // as long as editing doesn't work via the TreeView with VCL
+ // widgets, better on button.
+ m_xEditTextBtn->grab_focus();
+ }
+ }
}
IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
@@ -410,40 +491,27 @@ std::unique_ptr<weld::TreeIter> BookmarkTable::get_selected() const
return xIter;
}
-void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark)
+void BookmarkTable::InsertBookmark(SwWrtShell& rSh, sw::mark::IMark* const pMark)
{
sw::mark::IBookmark* pBookmark = dynamic_cast<sw::mark::IBookmark*>(pMark);
assert(pBookmark);
- OUString sBookmarkNodeText = pBookmark->GetMarkStart().nNode.GetNode().GetTextNode()->GetText();
- sal_Int32 nBookmarkNodeTextPos = pBookmark->GetMarkStart().nContent.GetIndex();
- sal_Int32 nBookmarkTextLen = 0;
- bool bPulledAll = false;
- bool bPulling = false;
+ OUString sBookmarkNodeText;
static const sal_Int32 nMaxTextLen = 50;
if (pBookmark->IsExpanded())
{
- nBookmarkTextLen = pBookmark->GetMarkEnd().nContent.GetIndex() - nBookmarkNodeTextPos;
+ rSh.Push();
+ rSh.GotoMark(pBookmark);
+ rSh.GetSelectedText(sBookmarkNodeText, ParaBreakType::ToBlank);
+ rSh.Pop(SwEditShell::PopMode::DeleteCurrent);
}
- else
+ if (nMaxTextLen < sBookmarkNodeText.getLength())
{
- if (nBookmarkNodeTextPos == sBookmarkNodeText.getLength()) // no text after bookmark
- {
- nBookmarkNodeTextPos = std::max<sal_Int32>(0, nBookmarkNodeTextPos - nMaxTextLen);
- bPulling = true;
- if (nBookmarkNodeTextPos == 0)
- bPulledAll = true;
- }
- nBookmarkTextLen = sBookmarkNodeText.getLength() - nBookmarkNodeTextPos;
+ sBookmarkNodeText = sBookmarkNodeText.copy(0, nMaxTextLen);
+ ;
+ sBookmarkNodeText += u"…";
}
- bool bExceedsLength = nBookmarkTextLen > nMaxTextLen;
- nBookmarkTextLen = std::min<sal_Int32>(nMaxTextLen, nBookmarkTextLen);
- sBookmarkNodeText = sBookmarkNodeText.copy(nBookmarkNodeTextPos, nBookmarkTextLen).trim();
- if (bExceedsLength)
- sBookmarkNodeText += "...";
- else if (bPulling && !bPulledAll)
- sBookmarkNodeText = "..." + sBookmarkNodeText;
OUString sHidden = SwResId(STR_BOOKMARK_NO);
if (pBookmark->IsHidden())
@@ -482,12 +550,13 @@ sw::mark::IMark* BookmarkTable::GetBookmarkByName(const OUString& sName)
return reinterpret_cast<sw::mark::IMark*>(m_xControl->get_id(*xEntry).toInt64());
}
-void BookmarkTable::SelectByName(const OUString& sName)
+bool BookmarkTable::SelectByName(const OUString& sName)
{
auto xEntry = GetRowByBookmarkName(sName);
if (!xEntry)
- return;
+ return false;
select(*xEntry);
+ return true;
}
OUString BookmarkTable::GetNameProposal() const
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index f071b85997fe..941d15e4302c 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -253,6 +253,7 @@ void SwModule::ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet )
{
if( (!aViewOpt.IsTab( true ) && pDocDispItem->bTab) ||
(!aViewOpt.IsBlank( true ) && pDocDispItem->bSpace) ||
+ (!aViewOpt.IsShowBookmarks(true) && pDocDispItem->bBookmarks) ||
(!aViewOpt.IsParagraph( true ) && pDocDispItem->bParagraphEnd) ||
(!aViewOpt.IsLineBreak( true ) && pDocDispItem->bManualBreak) )
{
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 5c94fc56110b..eea0c260bbf5 100644
--- a/sw/source/uibase/config/StoredChapterNumbering.cxx
+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx
@@ -152,7 +152,7 @@ public:
SwXNumberingRules::SetPropertiesToNumFormat(
aNumberFormat,
charStyleName,
- nullptr, nullptr, nullptr, nullptr,
+ nullptr, nullptr, nullptr, nullptr, nullptr,
props);
SwNumRulesWithName *const pRules(GetOrCreateRules());
pRules->SetNumFormat(nIndex, aNumberFormat, charStyleName);
diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx
index 3c6114c9a9a6..a5e8718aa718 100644
--- a/sw/source/uibase/config/cfgitems.cxx
+++ b/sw/source/uibase/config/cfgitems.cxx
@@ -39,7 +39,9 @@ SwDocDisplayItem::SwDocDisplayItem() :
bNonbreakingSpace =
bSoftHyphen =
bCharHiddenText =
+ bBookmarks =
bManualBreak = true;
+ m_xDefaultAnchor = 1; //FLY_TO_CHAR
};
// Item for the Settings dialog, page document view
@@ -52,7 +54,9 @@ SwDocDisplayItem::SwDocDisplayItem(const SwViewOption& rVOpt ) :
bNonbreakingSpace = rVOpt.IsHardBlank();
bSoftHyphen = rVOpt.IsSoftHyph();
bCharHiddenText = rVOpt.IsShowHiddenChar(true);
+ bBookmarks = rVOpt.IsShowBookmarks(true);
bManualBreak = rVOpt.IsLineBreak(true);
+ m_xDefaultAnchor = rVOpt.GetDefaultAnchor();
}
SfxPoolItem* SwDocDisplayItem::Clone( SfxItemPool* ) const
@@ -72,7 +76,9 @@ bool SwDocDisplayItem::operator==( const SfxPoolItem& rAttr ) const
bNonbreakingSpace == rItem.bNonbreakingSpace &&
bSoftHyphen == rItem.bSoftHyphen &&
bCharHiddenText == rItem.bCharHiddenText &&
- bManualBreak == rItem.bManualBreak );
+ bBookmarks == rItem.bBookmarks &&
+ bManualBreak == rItem.bManualBreak &&
+ m_xDefaultAnchor == rItem.m_xDefaultAnchor);
}
void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
@@ -83,7 +89,9 @@ void SwDocDisplayItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetHardBlank (bNonbreakingSpace );
rVOpt.SetSoftHyph (bSoftHyphen );
rVOpt.SetShowHiddenChar(bCharHiddenText );
+ rVOpt.SetShowBookmarks(bBookmarks );
rVOpt.SetLineBreak (bManualBreak );
+ rVOpt.SetDefaultAnchor( m_xDefaultAnchor );
}
SwElemItem::SwElemItem() :
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index 0246b6f039d6..7f368346f66c 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -82,17 +82,20 @@ SwMasterUsrPref::~SwMasterUsrPref()
{
}
+static const auto g_UpdateLinkIndex = 17;
+const auto g_DefaultAnchor = 22;
+
Sequence<OUString> SwContentViewConfig::GetPropertyNames() const
{
- static const char* aPropNames[] =
+ static constexpr const char*const aPropNames[] =
{
"Display/GraphicObject", // 0
"Display/Table", // 1
"Display/DrawingControl", // 2
"Display/FieldCode", // 3
"Display/Note", // 4
- "Display/ShowContentTips", // 5
- "NonprintingCharacter/MetaCharacters", // 6
+ "Display/ShowContentTips", // 5
+ "NonprintingCharacter/MetaCharacters", // 6
"NonprintingCharacter/ParagraphEnd", // 7
"NonprintingCharacter/OptionalHyphen", // 8
"NonprintingCharacter/Space", // 9
@@ -102,13 +105,19 @@ Sequence<OUString> SwContentViewConfig::GetPropertyNames() const
"NonprintingCharacter/HiddenText", // 13
"NonprintingCharacter/HiddenParagraph", // 14
"NonprintingCharacter/HiddenCharacter", // 15
- "Update/Link", // 16
- "Update/Field", // 17
- "Update/Chart", // 18
- "Display/ShowInlineTooltips", // 19
- "Display/UseHeaderFooterMenu" // 20
+ "NonprintingCharacter/Bookmarks", // 16
+ "Update/Link", // 17
+ "Update/Field", // 18
+ "Update/Chart", // 19
+ "Display/ShowInlineTooltips", // 20
+ "Display/UseHeaderFooterMenu", // 21
+ "Display/DefaultAnchor" // 22
};
- const int nCount = bWeb ? 12 : 21;
+#if defined(__GNUC__) && !defined(__clang__)
+ // clang 8.0.0 says strcmp isn't constexpr
+ static_assert(std::strcmp("Update/Link", aPropNames[g_UpdateLinkIndex]) == 0);
+#endif
+ const int nCount = bWeb ? 12 : SAL_N_ELEMENTS(aPropNames);
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -164,13 +173,15 @@ void SwContentViewConfig::ImplCommit()
case 13: bVal = rParent.IsShowHiddenField(); break;// "NonprintingCharacter/Fields: HiddenText",
case 14: bVal = rParent.IsShowHiddenPara(); break;// "NonprintingCharacter/Fields: HiddenParagraph",
case 15: bVal = rParent.IsShowHiddenChar(true); break;// "NonprintingCharacter/HiddenCharacter",
- case 16: pValues[nProp] <<= rParent.GetUpdateLinkMode(); break;// "Update/Link",
- case 17: bVal = rParent.IsUpdateFields(); break;// "Update/Field",
- case 18: bVal = rParent.IsUpdateCharts(); break;// "Update/Chart"
- case 19: bVal = rParent.IsShowInlineTooltips(); break;// "Display/ShowInlineTooltips"
- case 20: bVal = rParent.IsUseHeaderFooterMenu(); break;// "Display/UseHeaderFooterMenu"
+ case 16: bVal = rParent.IsShowBookmarks(true); break;// "NonprintingCharacter/Bookmarks",
+ case 17: pValues[nProp] <<= rParent.GetUpdateLinkMode(); break;// "Update/Link",
+ case 18: bVal = rParent.IsUpdateFields(); break;// "Update/Field",
+ case 19: bVal = rParent.IsUpdateCharts(); break;// "Update/Chart"
+ case 20: bVal = rParent.IsShowInlineTooltips(); break;// "Display/ShowInlineTooltips"
+ case 21: bVal = rParent.IsUseHeaderFooterMenu(); break;// "Display/UseHeaderFooterMenu"
+ case 22: pValues[nProp] <<= rParent.GetDefaultAnchor(); break;// "Display/DefaultAnchor"
}
- if(nProp != 16)
+ if ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor))
pValues[nProp] <<= bVal;
}
PutProperties(aNames, aValues);
@@ -188,7 +199,8 @@ void SwContentViewConfig::Load()
{
if(pValues[nProp].hasValue())
{
- bool bSet = nProp != 16 && *o3tl::doAccess<bool>(pValues[nProp]);
+ bool bSet = ((nProp != g_UpdateLinkIndex) && (nProp != g_DefaultAnchor))
+ && *o3tl::doAccess<bool>(pValues[nProp]);
switch(nProp)
{
case 0: rParent.SetGraphic(bSet); break;// "Display/GraphicObject",
@@ -207,17 +219,25 @@ void SwContentViewConfig::Load()
case 13: rParent.SetShowHiddenField(bSet); break;// "NonprintingCharacter/Fields: HiddenText",
case 14: rParent.SetShowHiddenPara(bSet); break;// "NonprintingCharacter/Fields: HiddenParagraph",
case 15: rParent.SetShowHiddenChar(bSet); break;// "NonprintingCharacter/HiddenCharacter",
- case 16:
+ case 16: rParent.SetShowBookmarks(bSet); break;// "NonprintingCharacter/Bookmarks",
+ case 17:
{
sal_Int32 nSet = 0;
pValues[nProp] >>= nSet;
rParent.SetUpdateLinkMode(nSet, true);
}
break;// "Update/Link",
- case 17: rParent.SetUpdateFields(bSet); break;// "Update/Field",
- case 18: rParent.SetUpdateCharts(bSet); break;// "Update/Chart"
- case 19: rParent.SetShowInlineTooltips(bSet); break;// "Display/ShowInlineTooltips"
- case 20: rParent.SetUseHeaderFooterMenu(bSet); break;// "Display/UseHeaderFooterMenu"
+ case 18: rParent.SetUpdateFields(bSet); break;// "Update/Field",
+ case 19: rParent.SetUpdateCharts(bSet); break;// "Update/Chart"
+ case 20: rParent.SetShowInlineTooltips(bSet); break;// "Display/ShowInlineTooltips"
+ case 21: rParent.SetUseHeaderFooterMenu(bSet); break;// "Display/UseHeaderFooterMenu"
+ case 22:
+ {
+ sal_Int32 nSet = 0;
+ pValues[nProp] >>= nSet;
+ rParent.SetDefaultAnchor(nSet);
+ }
+ break; // "Display/DefaultAnchor"
}
}
}
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 6059ef5ec8c8..6fa49a4258f0 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -83,6 +83,7 @@ bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& mbHideWhitespaceMode == rOpt.mbHideWhitespaceMode
&& m_bShowPlaceHolderFields == rOpt.m_bShowPlaceHolderFields
&& m_bIdle == rOpt.m_bIdle
+ && m_nDefaultAnchor == rOpt.m_nDefaultAnchor
#ifdef DBG_UTIL
// correspond to the statements in ui/config/cfgvw.src
&& m_bTest1 == rOpt.IsTest1()
@@ -210,6 +211,8 @@ SwViewOption::SwViewOption() :
m_bIdle = true;
+ m_nDefaultAnchor = 1; //FLY_TO_CHAR
+
#ifdef DBG_UTIL
// correspond to the statements in ui/config/cfgvw.src
m_bTest1 = m_bTest2 = m_bTest3 = m_bTest4 =
@@ -248,6 +251,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
mbHideWhitespaceMode = rVOpt.mbHideWhitespaceMode;
m_bShowPlaceHolderFields = rVOpt.m_bShowPlaceHolderFields;
m_bIdle = rVOpt.m_bIdle;
+ m_nDefaultAnchor = rVOpt.m_nDefaultAnchor;
#ifdef DBG_UTIL
m_bTest1 = rVOpt.m_bTest1;
@@ -289,6 +293,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
mbHideWhitespaceMode = rVOpt.mbHideWhitespaceMode;
m_bShowPlaceHolderFields = rVOpt.m_bShowPlaceHolderFields;
m_bIdle = rVOpt.m_bIdle;
+ m_nDefaultAnchor = rVOpt.m_nDefaultAnchor;
#ifdef DBG_UTIL
m_bTest1 = rVOpt.m_bTest1;
@@ -360,6 +365,24 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell)
return nRet;
}
+RndStdIds SwViewOption::GetDefaultAnchorType()
+{
+ switch ( m_nDefaultAnchor )
+ {
+ case 0:
+ return RndStdIds::FLY_AT_PARA; //0
+ break;
+ case 1:
+ return RndStdIds::FLY_AT_CHAR; //4
+ break;
+ case 2:
+ return RndStdIds::FLY_AS_CHAR; //1
+ break;
+ default:
+ return RndStdIds::FLY_AT_CHAR; //4
+ }//switch
+}
+
Color& SwViewOption::GetDocColor()
{
return s_aDocColor;
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f6e5990b1b3d..51ca02aaa524 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -3950,7 +3950,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt,
if ( bTableSel )
{
/* delete table contents not cells */
- rSrcSh.Delete();
+ rSrcSh.Delete(false);
}
else
{
@@ -4217,7 +4217,7 @@ bool SwTransferDdeLink::WriteData( SvStream& rStrm )
// remove mark
rServerObject.SetNoServer(); // this removes the connection between SwServerObject and mark
// N.B. ppMark was not loaded from file and cannot have xml:id
- pMarkAccess->deleteMark(ppMark);
+ pMarkAccess->deleteMark(ppMark, false);
// recreate as Bookmark
::sw::mark::IMark* const pNewMark = pMarkAccess->makeMark(
@@ -4252,7 +4252,7 @@ void SwTransferDdeLink::Disconnect( bool bRemoveDataAdvise )
bool bIsModified = pDoc->getIDocumentState().IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- pMarkAccess->deleteMark(pMarkAccess->findMark(sName));
+ pMarkAccess->deleteMark(pMarkAccess->findMark(sName), false);
if( !bIsModified )
pDoc->getIDocumentState().ResetModified();
diff --git a/sw/source/uibase/docvw/OverlayRanges.hxx b/sw/source/uibase/docvw/OverlayRanges.hxx
index 7482deef8f97..8deecac241fd 100644
--- a/sw/source/uibase/docvw/OverlayRanges.hxx
+++ b/sw/source/uibase/docvw/OverlayRanges.hxx
@@ -23,7 +23,9 @@
#include <svx/sdr/overlay/overlayobject.hxx>
#include <basegfx/range/b2drange.hxx>
+#include <memory>
#include <vector>
+#include <memory>
class SwView;
diff --git a/sw/source/uibase/docvw/ShadowOverlayObject.hxx b/sw/source/uibase/docvw/ShadowOverlayObject.hxx
index ec2c7eaf44c1..506b801d0991 100644
--- a/sw/source/uibase/docvw/ShadowOverlayObject.hxx
+++ b/sw/source/uibase/docvw/ShadowOverlayObject.hxx
@@ -20,8 +20,14 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_DOCVW_SHADOWOVERLAYOBJECT_HXX
#define INCLUDED_SW_SOURCE_UIBASE_DOCVW_SHADOWOVERLAYOBJECT_HXX
+#include <sal/config.h>
+
+#include <memory>
+
#include <svx/sdr/overlay/overlayobject.hxx>
+#include <memory>
+
class SwView;
namespace sw { namespace sidebarwindows {
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index bdbb0e2804e4..62387bc03330 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -270,9 +270,7 @@ void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
}
else
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xQuery(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xQuery->run();
+ mrDocView.GetWrtShell().InfoReadOnlyDialog();
}
}
if (bDone)
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 20f5761f1361..28a672963e83 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -163,6 +163,9 @@
#include <sfx2/event.hxx>
#include <memory>
+#include "../../core/crsr/callnk.hxx"
+
+
using namespace sw::mark;
using namespace ::com::sun::star;
@@ -1838,9 +1841,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if (!rSh.IsCursorInParagraphMetadataField())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
+ rSh.InfoReadOnlyDialog();
eKeyState = SwKeyState::End;
}
break;
@@ -1993,9 +1994,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
}
else if (!rSh.IsCursorInParagraphMetadataField())
{
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
+ rSh.InfoReadOnlyDialog();
eKeyState = SwKeyState::End;
}
break;
@@ -3700,7 +3699,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
// and CH_TXT_ATR_INPUTFIELDEND
rSh.SttSelect();
- rSh.SelectText( aFieldAtPos.pFndTextAttr->GetStart() + 1,
+ rSh.SelectTextModel( aFieldAtPos.pFndTextAttr->GetStart() + 1,
*(aFieldAtPos.pFndTextAttr->End()) - 1 );
}
// don't reset here any longer so that, in case through MouseMove
@@ -3730,8 +3729,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
// select content of Input Field, but exclude CH_TXT_ATR_INPUTFIELDSTART
// and CH_TXT_ATR_INPUTFIELDEND
rSh.SttSelect();
- rSh.SelectText( aFieldAtPos.pFndTextAttr->GetStart() + 1,
- *(aFieldAtPos.pFndTextAttr->End()) - 1 );
+ rSh.SelectTextModel( aFieldAtPos.pFndTextAttr->GetStart() + 1,
+ *(aFieldAtPos.pFndTextAttr->End()) - 1 );
}
}
@@ -6287,8 +6286,7 @@ OUString SwEditWin::GetSurroundingText() const
rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR );
else if( !rSh.HasSelection() )
{
- SwPosition *pPos = rSh.GetCursor()->GetPoint();
- const sal_Int32 nPos = pPos->nContent.GetIndex();
+ rSh.Push();
// get the sentence around the cursor
rSh.HideCursor();
@@ -6297,8 +6295,7 @@ OUString SwEditWin::GetSurroundingText() const
rSh.GoEndSentence();
rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR );
- pPos->nContent = nPos;
- rSh.ClearMark();
+ rSh.Pop(SwCursorShell::PopMode::DeleteCurrent);
rSh.HideCursor();
}
@@ -6318,18 +6315,20 @@ Selection SwEditWin::GetSurroundingTextSelection() const
{
// Return the position of the visible cursor in the sentence
// around the visible cursor.
- SwPosition *pPos = rSh.GetCursor()->GetPoint();
- const sal_Int32 nPos = pPos->nContent.GetIndex();
+ TextFrameIndex const nPos(rSh.GetCursorPointAsViewIndex());
+
+ // store shell state *before* Push
+ ::std::unique_ptr<SwCallLink> pLink(::std::make_unique<SwCallLink>(rSh));
+ rSh.Push();
rSh.HideCursor();
rSh.GoStartSentence();
- const sal_Int32 nStartPos = rSh.GetCursor()->GetPoint()->nContent.GetIndex();
+ TextFrameIndex const nStartPos(rSh.GetCursorPointAsViewIndex());
- pPos->nContent = nPos;
- rSh.ClearMark();
+ rSh.Pop(SwCursorShell::PopMode::DeleteCurrent, ::std::move(pLink));
rSh.ShowCursor();
- return Selection( nPos - nStartPos, nPos - nStartPos );
+ return Selection(sal_Int32(nPos - nStartPos), sal_Int32(nPos - nStartPos));
}
}
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index e09d42623ee1..db6b036a7cc8 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -88,7 +88,9 @@ SwFlyFrameAttrMgr::SwFlyFrameAttrMgr( bool bNew, SwWrtShell* pSh, Frmmgr_Type nT
if (nType == Frmmgr_Type::GRF || nType == Frmmgr_Type::OLE)
{
- m_aSet.Put(SwFormatAnchor(RndStdIds::FLY_AT_CHAR));
+ // Default anchor for new graphics and objects is at-char, except for Math objects.
+ SwViewOption aViewOpt(*pSh->GetViewOptions());
+ m_aSet.Put(SwFormatAnchor(aViewOpt.GetDefaultAnchorType()));//RndStdIds::FLY_AT_CHAR
}
}
else if ( nType == Frmmgr_Type::NONE )
diff --git a/sw/source/uibase/inc/bookmark.hxx b/sw/source/uibase/inc/bookmark.hxx
index 3a8ee1506d58..01ae7f416c56 100644
--- a/sw/source/uibase/inc/bookmark.hxx
+++ b/sw/source/uibase/inc/bookmark.hxx
@@ -33,8 +33,8 @@ class BookmarkTable
std::unique_ptr<weld::TreeIter> GetRowByBookmarkName(const OUString& sName);
public:
BookmarkTable(std::unique_ptr<weld::TreeView> xControl);
- void InsertBookmark(sw::mark::IMark* pMark);
- void SelectByName(const OUString& sName);
+ void InsertBookmark(SwWrtShell & rSh, sw::mark::IMark* pMark);
+ bool SelectByName(const OUString& sName);
sw::mark::IMark* GetBookmarkByName(const OUString& sName);
OUString GetNameProposal() const;
@@ -45,6 +45,7 @@ public:
void remove(const weld::TreeIter& rIter) { m_xControl->remove(rIter); }
void select(const weld::TreeIter& rIter) { m_xControl->select(rIter); }
void remove_selection() { m_xControl->remove_selection(); }
+ OUString get_text(const weld::TreeIter& rIter) const { return m_xControl->get_text(rIter, 2); }
OUString get_id(const weld::TreeIter& rIter) const { return m_xControl->get_id(rIter); }
void set_sort_indicator(TriState eState, int nColumn = -1) { m_xControl->set_sort_indicator(eState, nColumn); }
void selected_foreach(const std::function<bool(weld::TreeIter&)>& func) { m_xControl->selected_foreach(func); }
@@ -52,6 +53,10 @@ public:
void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); }
void connect_row_activated(const Link<weld::TreeView&, bool>& rLink) { m_xControl->connect_row_activated(rLink); }
void connect_column_clicked(const Link<int, void>& rLink) { m_xControl->connect_column_clicked(rLink); }
+ void connect_editing(const Link<const weld::TreeIter&, bool>& rStartLink,
+ const Link<::std::pair<weld::TreeIter const&, OUString> const&, bool>& rEndLink) { m_xControl->connect_editing(rStartLink, rEndLink); }
+ void set_column_editables(::std::vector<bool> const& rEditables) { m_xControl->set_column_editables(rEditables); }
+ void start_editing(weld::TreeIter const& rIter) { m_xControl->start_editing(rIter); }
void make_sorted() { m_xControl->make_sorted(); }
bool get_sort_order() const { return m_xControl->get_sort_order(); }
void set_sort_order(bool bAscending) { m_xControl->set_sort_order(bAscending); }
@@ -75,6 +80,7 @@ class SwInsertBookmarkDlg : public SfxDialogController
std::unique_ptr<weld::Button> m_xInsertBtn;
std::unique_ptr<weld::Button> m_xDeleteBtn;
std::unique_ptr<weld::Button> m_xGotoBtn;
+ std::unique_ptr<weld::Button> m_xEditTextBtn;
std::unique_ptr<weld::Button> m_xRenameBtn;
std::unique_ptr<weld::CheckButton> m_xHideCB;
std::unique_ptr<weld::Label> m_xConditionFT;
@@ -85,12 +91,16 @@ class SwInsertBookmarkDlg : public SfxDialogController
DECL_LINK(ModifyHdl, weld::Entry&, void);
DECL_LINK(InsertHdl, weld::Button&, void);
DECL_LINK(DeleteHdl, weld::Button&, void);
+ DECL_LINK(EditTextHdl, weld::Button&, void);
DECL_LINK(RenameHdl, weld::Button&, void);
DECL_LINK(GotoHdl, weld::Button&, void);
DECL_LINK(SelectionChangedHdl, weld::TreeView&, void);
DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
DECL_LINK(HeaderBarClick, int, void);
DECL_LINK(ChangeHideHdl, weld::ToggleButton&, void);
+ DECL_LINK(EditingHdl, weld::TreeIter const&, bool);
+ typedef ::std::pair<weld::TreeIter const&, OUString> const& comma_issue;
+ DECL_LINK(EditedHdl, comma_issue, bool);
// Fill table with bookmarks
void PopulateTable();
@@ -101,9 +111,10 @@ class SwInsertBookmarkDlg : public SfxDialogController
bool ValidateBookmarks();
bool HaveBookmarksChanged();
void GotoSelectedBookmark();
+ void SelectionChanged();
public:
- SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rSh, SfxRequest& rReq);
+ SwInsertBookmarkDlg(weld::Window* pParent, SwWrtShell& rSh, SfxRequest& rReq, OUString const* pSelected);
virtual ~SwInsertBookmarkDlg() override;
};
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index db525151a079..11fc13baecc0 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -49,7 +49,9 @@ class SW_DLLPUBLIC SwDocDisplayItem : public SfxPoolItem
bool bNonbreakingSpace :1;
bool bSoftHyphen :1;
bool bCharHiddenText :1;
+ bool bBookmarks :1;
bool bManualBreak :1;
+ sal_Int32 m_xDefaultAnchor;
public:
SwDocDisplayItem();
diff --git a/sw/source/uibase/inc/fldtdlg.hxx b/sw/source/uibase/inc/fldtdlg.hxx
index 159881ed1192..9546b99ffa0d 100644
--- a/sw/source/uibase/inc/fldtdlg.hxx
+++ b/sw/source/uibase/inc/fldtdlg.hxx
@@ -53,7 +53,7 @@ public:
void ActivateDatabasePage();
void ShowReferencePage();
virtual void Close() override;
- virtual void EndDialog() override;
+ virtual void EndDialog(int nResponse) override;
virtual void Activate() override;
};
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index 13c5d6194aef..d85091a4572e 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -226,8 +226,11 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xSpacesCB;
std::unique_ptr<weld::CheckButton> m_xHSpacesCB;
std::unique_ptr<weld::CheckButton> m_xTabCB;
+ std::unique_ptr<weld::Label> m_xTabLabel;
std::unique_ptr<weld::CheckButton> m_xBreakCB;
std::unique_ptr<weld::CheckButton> m_xCharHiddenCB;
+ std::unique_ptr<weld::CheckButton> m_xBookmarkCB;
+ std::unique_ptr<weld::Label> m_xBookmarkLabel;
std::unique_ptr<weld::Frame> m_xDirectCursorFrame;
std::unique_ptr<weld::CheckButton> m_xOnOffCB;
@@ -241,6 +244,8 @@ class SwShdwCursorOptionsTabPage : public SfxTabPage
std::unique_ptr<weld::Frame> m_xCursorProtFrame;
std::unique_ptr<weld::CheckButton> m_xCursorInProtCB;
+ std::unique_ptr<weld::ComboBox> m_xDefaultAnchorType;
+
std::unique_ptr<weld::CheckButton> m_xMathBaselineAlignmentCB;
public:
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 6ec17d5b0e78..decf24bb4a08 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -140,6 +140,7 @@ public:
// is there a text- or frameselection?
bool HasSelection() const { return SwCursorShell::HasSelection() ||
IsMultiSelection() || IsSelFrameMode() || IsObjSelected(); }
+ bool Pop(SwCursorShell::PopMode, ::std::unique_ptr<SwCallLink> const pLink);
bool Pop(SwCursorShell::PopMode = SwCursorShell::PopMode::DeleteStack);
void EnterStdMode();
@@ -279,7 +280,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
bool DelLeft();
// also deletes the frame or sets the cursor in the frame when bDelFrame == false
- bool DelRight();
+ bool DelRight(bool isReplaceHeuristic = false);
void DelToEndOfPara();
void DelToStartOfPara();
bool DelToEndOfSentence();
@@ -489,6 +490,9 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
/// Inserts a new annotation/comment at the current cursor position / selection.
void InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq);
+ virtual void InfoReadOnlyDialog() const override;
+ virtual bool WarnHiddenSectionDialog() const override;
+
private:
SAL_DLLPRIVATE void OpenMark();
diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx
index 52ee334ec21d..55f09447c623 100644
--- a/sw/source/uibase/lingu/hhcwrp.cxx
+++ b/sw/source/uibase/lingu/hhcwrp.cxx
@@ -326,7 +326,7 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut
// restore those for the new text
m_rWrtShell.GetCurAttr( aItemSet );
- m_rWrtShell.Delete();
+ m_rWrtShell.Delete(true);
m_rWrtShell.Insert( rNewText );
// select new inserted text (currently the Point is right after the new text)
@@ -346,7 +346,7 @@ void SwHHCWrapper::ChangeText_impl( const OUString &rNewText, bool bKeepAttribut
}
else
{
- m_rWrtShell.Delete();
+ m_rWrtShell.Delete(true);
m_rWrtShell.Insert( rNewText );
}
}
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index 1c278137cb16..fdab2b6ec5de 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -245,7 +245,7 @@ void SwInputWindow::ShowWin()
if( pWrtShell->SwCursorShell::HasSelection() )
{
pWrtShell->StartUndo( SwUndoId::DELETE );
- pWrtShell->Delete();
+ pWrtShell->Delete(false);
if( SwUndoId::EMPTY != pWrtShell->EndUndo( SwUndoId::DELETE ))
{
m_bCallUndo = true;
@@ -451,7 +451,7 @@ void SwInputWindow::DelBoxContent()
pWrtShell->MoveSection( GoCurrSection, fnSectionStart );
pWrtShell->SetMark();
pWrtShell->MoveSection( GoCurrSection, fnSectionEnd );
- pWrtShell->SwEditShell::Delete();
+ pWrtShell->SwEditShell::Delete(false);
pWrtShell->EndAllAction();
}
}
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index f62059f661e5..d7260fdfe1d2 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -97,15 +97,18 @@ VclPtr<SfxPopupWindow> SwTbxAutoTextCtrl::CreatePopupWindow()
ScopedVclPtrInstance<PopupMenu> pPopup;
SwGlossaryList* pGlossaryList = ::GetGlossaryList();
const size_t nGroupCount = pGlossaryList->GetGroupCount();
+ o3tl::sorted_vector<OUString> titles;
for(size_t i = 1; i <= nGroupCount; ++i)
{
OUString sTitle = pGlossaryList->GetGroupTitle(i - 1);
const sal_uInt16 nBlockCount = pGlossaryList->GetBlockCount(i -1);
+ auto const [it, _] = titles.insert(sTitle);
+ size_t const menuIndex(::std::distance(titles.begin(), it));
if(nBlockCount)
{
sal_uInt16 nIndex = static_cast<sal_uInt16>(100*i);
// but insert without extension
- pPopup->InsertItem( i, sTitle);
+ pPopup->InsertItem(i, sTitle, MenuItemBits::NONE, {}, menuIndex);
VclPtrInstance<PopupMenu> pSub;
pSub->SetSelectHdl(aLnk);
pPopup->SetPopupMenu(i, pSub);
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 60bdf16380be..0e3ba07c3973 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -545,12 +545,8 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
const SvxFieldData* pField = pOLV->GetFieldAtCursor();
if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(pField))
{
- SfxStringItem aUrl(SID_FILE_NAME, pURLField->GetURL());
- SfxStringItem aTarget(SID_TARGETNAME, pURLField->GetTargetFrame());
- SfxBoolItem aNewView(SID_OPEN_NEW_VIEW, false);
- SfxBoolItem aBrowsing(SID_BROWSE, true);
- GetView().GetViewFrame()->GetDispatcher()->ExecuteList(
- SID_OPENDOC, SfxCallMode::SYNCHRON, { &aUrl, &aTarget, &aNewView, &aBrowsing });
+ ::LoadURL(GetShell(), pURLField->GetURL(), LoadUrlFlags::NONE,
+ pURLField->GetTargetFrame());
}
}
break;
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 073fe280c924..e7260ef1492f 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -181,7 +181,7 @@ static std::shared_ptr<SwTableRep> lcl_TableParamToItemSet( SfxItemSet& rSet, Sw
rSet.Put(*aBoxDirection);
}
- bool bSelectAll = rSh.StartsWithTable() && rSh.ExtendedSelectedAll();
+ bool bSelectAll = rSh.StartsWith_() == SwCursorShell::StartsWith::Table && rSh.ExtendedSelectedAll();
bool bTableSel = rSh.IsTableMode() || bSelectAll;
if(!bTableSel)
{
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index c65d5d65da6a..072a38ab81b5 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -199,7 +199,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
SwCursorShell::GetTextFieldAtCursor(rSh.GetCursor(), true))))
{
rSh.SttSelect();
- rSh.SelectText(
+ rSh.SelectTextModel(
SwCursorShell::StartOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) + 1,
SwCursorShell::EndOfInputFieldAtPos( *(rSh.GetCursor()->Start()) ) - 1 );
}
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 54d5ab88a088..c65efe7c1c12 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -377,10 +377,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (rWrtSh.HasReadonlySel() && !rWrtSh.CursorInsideInputField())
{
// Only break if there's something to do; don't nag with the dialog otherwise
- auto xInfo(std::make_unique<weld::GenericDialogController>(
- rWrtSh.GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui",
- "InfoReadonlyDialog"));
- xInfo->run();
+ rWrtSh.InfoReadOnlyDialog();
break;
}
SwRewriter aRewriter;
@@ -693,11 +690,20 @@ void SwTextShell::Execute(SfxRequest &rReq)
{
OUString sName = static_cast<const SfxStringItem*>(pItem)->GetValue();
rWrtSh.SetBookmark( vcl::KeyCode(), sName );
+ break;
+ }
+ [[fallthrough]];
+ }
+ case FN_EDIT_BOOKMARK:
+ {
+ ::std::optional<OUString> oName;
+ if (pItem)
+ {
+ oName.emplace(static_cast<const SfxStringItem*>(pItem)->GetValue());
}
- else
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
- ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg(GetView().GetFrameWeld(), rWrtSh, rReq));
+ ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateSwInsertBookmarkDlg(GetView().GetFrameWeld(), rWrtSh, rReq, oName ? &*oName : nullptr));
pDlg->Execute();
}
@@ -708,7 +714,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (pItem && !rWrtSh.getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS))
{
IDocumentMarkAccess* const pMarkAccess = rWrtSh.getIDocumentMarkAccess();
- pMarkAccess->deleteMark( pMarkAccess->findMark(static_cast<const SfxStringItem*>(pItem)->GetValue()) );
+ pMarkAccess->deleteMark(pMarkAccess->findMark(static_cast<const SfxStringItem*>(pItem)->GetValue()), false);
}
break;
}
diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx
index ecdfd68ad6a8..f44f2b5a70fb 100644
--- a/sw/source/uibase/uitest/uiobject.cxx
+++ b/sw/source/uibase/uitest/uiobject.cxx
@@ -13,6 +13,7 @@
#include <view.hxx>
#include <wrtsh.hxx>
#include <navipi.hxx>
+#include <ndtxt.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
#include <sfx2/viewfrm.hxx>
@@ -89,14 +90,30 @@ void SwEditWinUIObject::execute(const OUString& rAction,
{
auto itr = rParameters.find("START_POS");
OUString aStartPos = itr->second;
- sal_Int32 nStartPos = aStartPos.toInt32();
+ TextFrameIndex const nStartPos(aStartPos.toInt32());
itr = rParameters.find("END_POS");
assert(itr != rParameters.end());
OUString aEndPos = itr->second;
- sal_Int32 nEndPos = aEndPos.toInt32();
-
- getWrtShell(mxEditWin).SelectText(nStartPos, nEndPos);
+ TextFrameIndex const nEndPos(aEndPos.toInt32());
+
+ auto & shell = getWrtShell(mxEditWin);
+ if (shell.GetCursor_()->GetPoint()->nNode.GetNode().GetTextNode())
+ {
+ shell.Push();
+ shell.MovePara(GoCurrPara, fnParaEnd);
+ TextFrameIndex const len(shell.GetCursorPointAsViewIndex());
+ shell.Pop(SwCursorShell::PopMode::DeleteCurrent);
+ SAL_WARN_IF(
+ sal_Int32(nStartPos) < 0 || nStartPos > len || sal_Int32(nEndPos) < 0 || nEndPos > len, "sw.ui",
+ "SELECT START/END_POS " << sal_Int32(nStartPos) << ".." << sal_Int32(nEndPos) << " outside 0.." << sal_Int32(len));
+ shell.SelectTextView(
+ std::clamp(nStartPos, TextFrameIndex(0), len), std::clamp(nEndPos, TextFrameIndex(0), len));
+ }
+ else
+ {
+ SAL_WARN("sw.ui", "SELECT without SwTextNode");
+ }
}
}
else if (rAction == "SIDEBAR")
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index c8a3c398b46b..2a1b16434845 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -1111,6 +1111,7 @@ void SwPagePreview::Init()
aOpt.SetSoftHyph( false );
aOpt.SetFieldName( false );
aOpt.SetPostIts( false );
+ aOpt.SetShowBookmarks( false );
aOpt.SetShowHiddenChar( false );
aOpt.SetShowHiddenField( false );
aOpt.SetShowHiddenPara( false );
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 296140abbae7..03df8259d09f 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1166,6 +1166,10 @@ void SwView::WriteUserData( OUString &rUserData, bool bBrowse )
static bool lcl_IsOwnDocument( SwView& rView )
{
+ if (::officecfg::Office::Common::Load::ViewPositionForAnyUser::get())
+ {
+ return true;
+ }
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
rView.GetDocShell()->GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> xDocProps
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index 56f363cc0285..79783e138496 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -162,6 +162,7 @@ static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
rVOpt.IsTab() ||
rVOpt.IsLineBreak() ||
rVOpt.IsShowHiddenChar() ||
+ rVOpt.IsShowBookmarks() ||
rVOpt.IsBlank()))
{
rVOpt.SetParagraph(bOn);
@@ -169,6 +170,7 @@ static void lcl_SetViewMetaChars( SwViewOption& rVOpt, bool bOn)
rVOpt.SetLineBreak(bOn);
rVOpt.SetBlank(bOn);
rVOpt.SetShowHiddenChar(bOn);
+ rVOpt.SetShowBookmarks(bOn);
}
}
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 6866b31cd3b1..465ab3dfc82d 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -668,6 +668,8 @@ bool SwView::AreOnlyFormsSelected() const
{
// Except controls, are still normal draw objects selected?
SdrObject *pSdrObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
+ if (!pSdrObj)
+ continue;
if (!HasOnlyObj(pSdrObj, SdrInventor::FmForm))
{
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 4fd706e84667..5fb06156c1a2 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -127,14 +127,15 @@ void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType,
const MapMode aTmpMap( MapUnit::MapTwip );
const Size aWindowSize( GetEditWin().PixelToLogic( rEditSize, aTmpMap ) );
- if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages
- {
- const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace();
- aPageSize.AdjustWidth(std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() ) );
- }
-
if( SvxZoomType::OPTIMAL == eZoomType )
{
+ // unclear if this is useful for OPTIMAL, or completely useless?
+ if( UseOnPage::Mirror == rDesc.GetUseOn() ) // mirrored pages
+ {
+ const SvxLRSpaceItem &rLeftLRSpace = rDesc.GetLeft().GetLRSpace();
+ aPageSize.AdjustWidth(std::abs( rLeftLRSpace.GetLeft() - rLRSpace.GetLeft() ) );
+ }
+
if (!pPostItMgr->HasNotes() || !pPostItMgr->ShowNotes())
aPageSize.AdjustWidth( -( rLRSpace.GetLeft() + rLRSpace.GetRight() + nLeftOfst * 2 ) );
lLeftMargin = rLRSpace.GetLeft() + DOCUMENTBORDER + nLeftOfst;
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx
index 2fa7e12f5afe..fb40aa453798 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -323,8 +323,9 @@ void SwView::SetVisArea( const Point &rPt, bool bUpdateScrollbar )
void SwView::CheckVisArea()
{
- m_pHScrollbar->SetAuto( m_pWrtShell->GetViewOptions()->getBrowseMode() &&
- !GetViewFrame()->GetFrame().IsInPlace() );
+ if (m_pHScrollbar)
+ m_pHScrollbar->SetAuto( m_pWrtShell->GetViewOptions()->getBrowseMode() &&
+ !GetViewFrame()->GetFrame().IsInPlace() );
if ( IsDocumentBorder() )
{
if ( m_aVisArea.Left() != DOCUMENTBORDER ||
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index 5df0c5af9d89..93b63a0e7d68 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -95,6 +95,7 @@ enum SwViewSettingsPropertyHandles
HANDLE_VIEWSET_INLINECHANGES_TIPS,
HANDLE_VIEWSET_HIDE_WHITESPACE,
HANDLE_VIEWSET_USE_HEADERFOOTERMENU,
+ HANDLE_VIEWSET_BOOKMARKS,
};
enum SwPrintSettingsPropertyHandles
@@ -136,6 +137,7 @@ static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
{ OUString( "RasterSubdivisionX"), HANDLE_VIEWSET_RASTER_SUBDIVISION_X, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
{ OUString( "RasterSubdivisionY"), HANDLE_VIEWSET_RASTER_SUBDIVISION_Y, cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
{ OUString( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
+ { OUString( "ShowBookmarks" ), HANDLE_VIEWSET_BOOKMARKS, cppu::UnoType<bool>::get(), PROPERTY_NONE },
{ OUString( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
{ OUString( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
{ OUString( "ShowFieldCommands"), HANDLE_VIEWSET_FIELD_COMMANDS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
@@ -579,6 +581,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
case HANDLE_VIEWSET_PROTECTED_SPACES : mpViewOption->SetHardBlank(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_TABSTOPS : mpViewOption->SetTab(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_BREAKS : mpViewOption->SetLineBreak(*o3tl::doAccess<bool>(rValue)); break;
+ case HANDLE_VIEWSET_BOOKMARKS : mpViewOption->SetShowBookmarks(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(*o3tl::doAccess<bool>(rValue)); break;
case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(*o3tl::doAccess<bool>(rValue)); break;
@@ -820,6 +823,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
case HANDLE_VIEWSET_PROTECTED_SPACES : bBoolVal = mpConstViewOption->IsHardBlank(); break;
case HANDLE_VIEWSET_TABSTOPS : bBoolVal = mpConstViewOption->IsTab(true); break;
case HANDLE_VIEWSET_BREAKS : bBoolVal = mpConstViewOption->IsLineBreak(true); break;
+ case HANDLE_VIEWSET_BOOKMARKS : bBoolVal = mpConstViewOption->IsShowBookmarks(true); break;
case HANDLE_VIEWSET_HIDDEN_TEXT : bBoolVal = mpConstViewOption->IsShowHiddenField(); break;
case HANDLE_VIEWSET_HIDDEN_CHARACTERS : bBoolVal = mpConstViewOption->IsShowHiddenChar(true); break;
case HANDLE_VIEWSET_HIDE_WHITESPACE : bBoolVal = mpConstViewOption->IsHideWhitespaceMode(); break;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index e5ce030ddaac..5e221efa47ea 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -4418,6 +4418,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions,
aRenderViewOptions.SetBlank( false ); // spaces
aRenderViewOptions.SetHardBlank( false ); // non-breaking spaces
aRenderViewOptions.SetTab( false ); // tabs
+ aRenderViewOptions.SetShowBookmarks( false ); // bookmarks
aRenderViewOptions.SetLineBreak( false ); // breaks (type 1)
aRenderViewOptions.SetPageBreak( false ); // breaks (type 2)
aRenderViewOptions.SetColumnBreak( false ); // breaks (type 3)
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 483a605e869a..891e786f63d9 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -19,6 +19,7 @@
#include <comphelper/string.hxx>
#include <svl/urlbmk.hxx>
+#include <svl/stritem.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
#include <tools/urlobj.hxx>
@@ -348,7 +349,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
&lcl_IsUiVisibleBookmark);
m_sTypeToken.clear();
const bool bProtectedBM = m_pWrtShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS);
- m_bEdit = !bProtectedBM;
+ m_bEdit = true;
m_bDelete = !bProtectedBM;
}
break;
@@ -1296,7 +1297,7 @@ VclPtr<PopupMenu> SwContentTree::CreateContextMenu()
const bool bProtectBM = (ContentTypeId::BOOKMARK == nContentType)
&& m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS);
const bool bEditable = pContType->IsEditable() &&
- ((bVisible && !bProtected && !bProtectBM) || ContentTypeId::REGION == nContentType);
+ ((bVisible && !bProtected) || ContentTypeId::REGION == nContentType);
const bool bDeletable = pContType->IsDeletable() &&
((bVisible && !bProtected && !bProtectBM) || ContentTypeId::REGION == nContentType);
const bool bRenamable = bEditable && !bReadonly &&
@@ -3534,20 +3535,27 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod
nSlot = FN_FORMAT_FRAME_DLG;
break;
case ContentTypeId::BOOKMARK :
- assert(!m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS));
if(nMode == EditEntryMode::DELETE)
{
+ assert(!m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS));
IDocumentMarkAccess* const pMarkAccess = m_pActiveShell->getIDocumentMarkAccess();
- pMarkAccess->deleteMark( pMarkAccess->findMark(pCnt->GetName()) );
+ pMarkAccess->deleteMark(pMarkAccess->findMark(pCnt->GetName()), false);
}
else if(nMode == EditEntryMode::RENAME)
{
+ assert(!m_pActiveShell->getIDocumentSettingAccess().get(DocumentSettingId::PROTECT_BOOKMARKS));
uno::Reference< frame::XModel > xModel = m_pActiveShell->GetView().GetDocShell()->GetBaseModel();
uno::Reference< text::XBookmarksSupplier > xBkms(xModel, uno::UNO_QUERY);
xNameAccess = xBkms->getBookmarks();
}
else
- nSlot = FN_INSERT_BOOKMARK;
+ {
+ // allowed despite PROTECT_BOOKMARKS: the dialog itself enforces it
+ SfxStringItem const name(FN_EDIT_BOOKMARK, pCnt->GetName());
+ SfxPoolItem const* args[2] = { &name, nullptr };
+ m_pActiveShell->GetView().GetViewFrame()->
+ GetDispatcher()->Execute(FN_EDIT_BOOKMARK, SfxCallMode::SYNCHRON, args);
+ }
break;
case ContentTypeId::REGION :
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index e016ab69910f..29bdd3938cde 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -512,7 +512,7 @@ void SwNavigationPI::MakeMark()
// nAutoMarkIdx rotates through the available MarkNames
// this assumes that IDocumentMarkAccess generates Names in ascending order
if(vNavMarkNames.size() == MAX_MARKS)
- pMarkAccess->deleteMark(pMarkAccess->findMark(vNavMarkNames[m_nAutoMarkIdx]));
+ pMarkAccess->deleteMark(pMarkAccess->findMark(vNavMarkNames[m_nAutoMarkIdx]), false);
rSh.SetBookmark(vcl::KeyCode(), OUString(), IDocumentMarkAccess::MarkType::NAVIGATOR_REMINDER);
SwView::SetActMark( m_nAutoMarkIdx );
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 5f6ed36c25e2..ec0a88e64cf0 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -104,7 +104,7 @@ void SwWrtShell::DelLine()
SetMark();
SwCursorShell::RightMargin();
- bool bRet = Delete();
+ bool bRet = Delete(false);
Pop(SwCursorShell::PopMode::DeleteCurrent);
if( bRet )
UpdateAttr();
@@ -114,7 +114,7 @@ void SwWrtShell::DelToStartOfLine()
{
OpenMark();
SwCursorShell::LeftMargin();
- bool bRet = Delete();
+ bool bRet = Delete(false);
CloseMark( bRet );
}
@@ -122,7 +122,7 @@ void SwWrtShell::DelToEndOfLine()
{
OpenMark();
SwCursorShell::RightMargin();
- bool bRet = Delete();
+ bool bRet = Delete(false);
CloseMark( bRet );
}
@@ -164,7 +164,7 @@ bool SwWrtShell::DelLeft()
{
SwActContext aActContext(this);
ResetCursorStack();
- Delete();
+ Delete(false);
UpdateAttr();
}
if( IsBlockMode() )
@@ -275,20 +275,15 @@ bool SwWrtShell::DelLeft()
}
}
}
- bool bRet = Delete();
+ bool bRet = Delete(true);
if( !bRet && bSwap )
SwCursorShell::SwapPam();
CloseMark( bRet );
- if (!bRet)
- { // false indicates HasReadonlySel failed
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
- }
+
return bRet;
}
-bool SwWrtShell::DelRight()
+bool SwWrtShell::DelRight(bool const isReplaceHeuristic)
{
// Will be or'ed, if a tableselection exists;
// will here be implemented on SelectionType::Table
@@ -315,7 +310,7 @@ bool SwWrtShell::DelRight()
{
SwActContext aActContext(this);
ResetCursorStack();
- Delete();
+ Delete(isReplaceHeuristic);
UpdateAttr();
}
if( IsBlockMode() )
@@ -398,14 +393,8 @@ bool SwWrtShell::DelRight()
OpenMark();
SwCursorShell::Right(1, CRSR_SKIP_CELLS);
- bRet = Delete();
+ bRet = Delete(true);
CloseMark( bRet );
- if (!bRet)
- { // false indicates HasReadonlySel failed
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(), "modules/swriter/ui/inforeadonlydialog.ui"));
- std::unique_ptr<weld::MessageDialog> xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
- xInfo->run();
- }
break;
case SelectionType::Frame:
@@ -510,7 +499,7 @@ void SwWrtShell::DelToEndOfPara()
Pop(SwCursorShell::PopMode::DeleteCurrent);
return;
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
Pop(SwCursorShell::PopMode::DeleteCurrent);
if( bRet )
UpdateAttr();
@@ -527,7 +516,7 @@ void SwWrtShell::DelToStartOfPara()
Pop(SwCursorShell::PopMode::DeleteCurrent);
return;
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
Pop(SwCursorShell::PopMode::DeleteCurrent);
if( bRet )
UpdateAttr();
@@ -542,7 +531,7 @@ void SwWrtShell::DelToStartOfSentence()
if(IsStartOfDoc())
return;
OpenMark();
- bool bRet = BwdSentence_() && Delete();
+ bool bRet = BwdSentence_() && Delete(false);
CloseMark( bRet );
}
@@ -574,7 +563,7 @@ bool SwWrtShell::DelToEndOfSentence()
}
else
{
- bRet = FwdSentence_() && Delete();
+ bRet = FwdSentence_() && Delete(false);
}
CloseMark( bRet );
return bRet;
@@ -595,7 +584,7 @@ void SwWrtShell::DelNxtWord()
else
EndWrd();
- bool bRet = Delete();
+ bool bRet = Delete(false);
if( bRet )
UpdateAttr();
else
@@ -619,7 +608,7 @@ void SwWrtShell::DelPrvWord()
else
SttWrd();
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
if( bRet )
UpdateAttr();
else
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 76f4baedaba5..b0dcdc522de7 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -218,12 +218,25 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable,
*pMoveTable = false;
return true;
}
+ SwTableNode const*const pTable(getShellCursor(false)->GetPoint()->nNode.GetNode().FindTableNode());
+ assert(pTable);
if( MoveTable( GotoCurrTable, fnTableStart ) || bDontMoveRegion )
{
if ( pMoveTable )
*pMoveTable = true;
return true;
}
+ else if (SwCursor const*const pCursor = getShellCursor(false);
+ pTable->GetNodes()[pTable->GetIndex()+1]->EndOfSectionIndex()
+ < pCursor->GetPoint()->nNode.GetNode().GetIndex()
+ && pMoveTable != nullptr // only set by SelAll()
+ // problem: cursor isn't inside 1st cell, and didn't move there
+ // workaround: try to move cursor outside of table for SelAll()
+ && MoveOutOfTable())
+ {
+ assert(!*pMoveTable);
+ return true;
+ }
else if( bBoxSelection && pMoveTable )
{
// JP 09.01.96: We have a box selection (or an empty cell)
@@ -258,15 +271,40 @@ bool SwWrtShell::GoStart( bool bKeepArea, bool *pMoveTable,
else if ( bKeepArea )
return true;
}
- // Regions ???
+
+ // first try to move to the start of the current SwSection
return SwCursorShell::MoveRegion( GotoCurrRegionAndSkip, fnRegionStart ) ||
- SwCursorShell::SttEndDoc(true);
+ (pMoveTable != nullptr
+ // move to start of text - if in different table, move out
+ ? MoveStartText()
+ // TODO who needs SttEndDoc for other case?
+ : SwCursorShell::SttEndDoc(true));
}
bool SwWrtShell::GoEnd(bool bKeepArea, const bool *pMoveTable)
{
- if ( pMoveTable && *pMoveTable )
- return MoveTable( GotoCurrTable, fnTableEnd );
+ if (pMoveTable && *pMoveTable) // only in SelAll()
+ {
+ SwTableNode const*const pTable(getShellCursor(false)->GetPoint()->nNode.GetNode().FindTableNode());
+ assert(pTable);
+ if (MoveTable(GotoCurrTable, fnTableEnd))
+ {
+ return true;
+ }
+ else if (SwCursor const*const pCursor = getShellCursor(false);
+ pCursor->GetPoint()->nNode.GetNode().GetIndex()
+ < pTable->GetNodes()[pTable->EndOfSectionIndex()-1]->StartOfSectionIndex()
+ // problem: cursor isn't inside 1st cell, and didn't move there
+ // workaround: try to move cursor outside of table for SelAll()
+ && MoveOutOfTable())
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
if ( IsCursorInTable() )
{
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index 90664ae098f5..17d4c068416a 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -141,7 +141,10 @@ void SwWrtShell::SelAll()
bool bHasWholeTabSelection = HasWholeTabSelection();
bool bIsCursorInTable = IsCursorInTable();
- if (!bHasWholeTabSelection)
+ if (!bHasWholeTabSelection
+ && ( !bIsCursorInTable
+ || getShellCursor(false)->GetNode(false).FindTableNode() == nullptr
+ || !ExtendedSelectedAll())) // ESA inside table -> else branch
{
if ( IsSelection() && IsCursorPtAtEnd() )
SwapPam();
@@ -157,30 +160,35 @@ void SwWrtShell::SelAll()
bIsFullSel &= !MoveSection( GoCurrSection, fnSectionEnd);
Pop(SwCursorShell::PopMode::DeleteCurrent);
GoStart(true, &bMoveTable, false, !bIsFullSel);
+ SttSelect();
+ GoEnd(true, &bMoveTable);
}
else
{
- EnterStdMode();
- SttEndDoc(true);
+ if (MoveOutOfTable())
+ { // select outer text
+ EnterStdMode(); // delete m_pTableCursor
+// GoStart(true, &bMoveTable, false, true);
+ MoveSection(GoCurrSection, fnSectionStart); // don't move into prev table
+ SttSelect();
+ MoveSection(GoCurrSection, fnSectionEnd); // don't move to different cell
+ }
+ else
+ {
+ TrySelectOuterTable();
+ }
}
- SttSelect();
- GoEnd(true, &bMoveTable);
- bool bNeedsExtendedSelectAll = StartsWithTable();
+ bool bNeedsExtendedSelectAll = StartsWith_() != StartsWith::None;
- // If the cursor was in a table, then we only need the extended select
- // all if the whole table is already selected, to still allow selecting
- // only a single cell or a single table before selecting the whole
- // document.
+ // the GoEnd() could have created a table selection, if so avoid ESA.
if (bNeedsExtendedSelectAll && bIsCursorInTable)
- bNeedsExtendedSelectAll = bHasWholeTabSelection;
+ {
+ bNeedsExtendedSelectAll = !HasWholeTabSelection();
+ }
if (bNeedsExtendedSelectAll)
{
- // Disable table cursor to make sure getShellCursor() returns m_pCurrentCursor, not m_pTableCursor.
- if (IsTableMode())
- TableCursorToCursor();
- // Do the extended select all on m_pCurrentCursor.
ExtendedSelectAll(/*bFootnotes =*/ false);
}
@@ -914,7 +922,7 @@ int SwWrtShell::IntelligentCut(SelectionType nSelection, bool bCut)
ClearMark();
SetMark();
SwCursorShell::Left(1,CRSR_SKIP_CHARS);
- SwFEShell::Delete();
+ SwFEShell::Delete(true);
Pop(SwCursorShell::PopMode::DeleteCurrent);
}
}
@@ -928,7 +936,7 @@ int SwWrtShell::IntelligentCut(SelectionType nSelection, bool bCut)
ClearMark();
SetMark();
SwCursorShell::Right(1,CRSR_SKIP_CHARS);
- SwFEShell::Delete();
+ SwFEShell::Delete(true);
Pop(SwCursorShell::PopMode::DeleteCurrent);
}
}
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 9eb00d361b9a..d8d7d77e209c 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -48,6 +48,7 @@
#include <editeng/svxacorr.hxx>
#include <editeng/ulspitem.hxx>
#include <vcl/graph.hxx>
+#include <vcl/svapp.hxx>
#include <sfx2/printer.hxx>
#include <unotools/charclass.hxx>
#include <comphelper/storagehelper.hxx>
@@ -118,6 +119,9 @@
#include <comphelper/lok.hxx>
#include <memory>
+#include "../../core/crsr/callnk.hxx"
+
+
using namespace sw::mark;
using namespace com::sun::star;
namespace {
@@ -213,11 +217,6 @@ void SwWrtShell::Insert( const OUString &rStr )
bCallIns = m_bIns /*|| bHasSel*/;
bool bDeleted = false;
- typedef svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_RSID - 1,
- RES_CHRATR_RSID + 1, RES_CHRATR_END - 1,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT> CharItems;
- SfxItemSet aCharAttrSet(GetAttrPool(), CharItems{});
-
if( bHasSel || ( !m_bIns && SelectHiddenRange() ) )
{
// Only here parenthesizing, because the normal
@@ -235,37 +234,19 @@ void SwWrtShell::Insert( const OUString &rStr )
aRewriter.AddRule(UndoArg3, aTmpStr);
}
- // tdf#79717 Save character formatting of the start of the selection
- const SwPosition *pStart = GetCursor()->Start();
- SwPaM aPaM(pStart->nNode.GetNode(), pStart->nContent.GetIndex(),
- pStart->nNode.GetNode(), pStart->nContent.GetIndex() + 1);
- GetPaMAttr(&aPaM, aCharAttrSet);
-
StartUndo(SwUndoId::REPLACE, &aRewriter);
bStarted = true;
- bDeleted = DelRight();
+ Push();
+ // let's interpret a selection within the same node as "replace"
+ bDeleted = DelRight(GetCursor()->GetPoint()->nNode == GetCursor()->GetMark()->nNode);
+ Pop(SwCursorShell::PopMode::DeleteCurrent); // Restore selection (if tracking changes)
+ NormalizePam(false); // tdf#127635 put point at the end of deletion
+ ClearMark();
}
bCallIns ?
SwEditShell::Insert2( rStr, bDeleted ) : SwEditShell::Overwrite( rStr );
- if( bDeleted )
- {
- // tdf#79717 Restore formatting of the deleted selection
- SwPosition* pEnd = GetCursor()->Start();
- SwPaM aPaM(pEnd->nNode.GetNode(), pEnd->nContent.GetIndex() - rStr.getLength(),
- pEnd->nNode.GetNode(), pEnd->nContent.GetIndex());
-
- std::set<sal_uInt16> aAttribs;
- for (sal_uInt16 i = RES_CHRATR_BEGIN; i < RES_CHRATR_END; ++i)
- if (i != sal_uInt16(RES_CHRATR_RSID))
- aAttribs.insert(aAttribs.end(), i);
- aAttribs.insert(aAttribs.end(), RES_TXTATR_CHARFMT);
- ResetAttr(aAttribs, &aPaM);
-
- SetAttrSet(aCharAttrSet, SetAttrMode::DEFAULT, &aPaM);
- }
-
if( bStarted )
{
EndUndo();
@@ -1663,7 +1644,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
StartUndo( SwUndoId::REPLACE, &aRewriter );
bStarted = true;
- DelRight();
+ DelRight(true);
}
SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar );
@@ -1725,7 +1706,13 @@ SwWrtShell::~SwWrtShell()
bool SwWrtShell::Pop(SwCursorShell::PopMode const eDelete)
{
- bool bRet = SwCursorShell::Pop(eDelete);
+ ::std::unique_ptr<SwCallLink> pLink(::std::make_unique<SwCallLink>(*this));
+ return Pop(eDelete, ::std::move(pLink));
+}
+
+bool SwWrtShell::Pop(SwCursorShell::PopMode const eDelete, ::std::unique_ptr<SwCallLink> pLink)
+{
+ bool bRet = SwCursorShell::Pop(eDelete, ::std::move(pLink));
if( bRet && IsSelection() )
{
m_fnSetCursor = &SwWrtShell::SetCursorKillSel;
@@ -2010,4 +1997,24 @@ void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
}
}
+void SwWrtShell::InfoReadOnlyDialog() const
+{
+ std::unique_ptr<weld::Builder>
+ xBuilder(Application::CreateBuilder(GetView().GetFrameWeld(),
+ "modules/swriter/ui/inforeadonlydialog.ui"));
+ std::unique_ptr<weld::MessageDialog>
+ xInfo(xBuilder->weld_message_dialog("InfoReadonlyDialog"));
+ xInfo->run();
+}
+
+bool SwWrtShell::WarnHiddenSectionDialog() const
+{
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(
+ GetView().GetFrameWeld(), "modules/swriter/ui/warnhiddensectiondialog.ui"));
+ std::unique_ptr<weld::MessageDialog> xQuery(
+ xBuilder->weld_message_dialog("WarnHiddenSectionDialog"));
+
+ return (RET_YES == xQuery->run());
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 82d7c27cb0c6..57769ab6e881 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -488,30 +488,24 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter )
return bRet;
}
-void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
- const OUString& rTargetFrameName )
+static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter,
+ const OUString& rTargetFrameName)
{
- OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" );
- if( rURL.isEmpty() )
- return ;
+ SwDocShell* pDShell = rView.GetDocShell();
+ OSL_ENSURE( pDShell, "No DocShell?!");
+ SfxViewFrame& rViewFrame = *rView.GetViewFrame();
- // The shell could be 0 also!!!!!
- if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr )
+ if (!SfxObjectShell::AllowedLinkProtocolFromDocument(rURL, pDShell, rView.GetFrameWeld()))
return;
// We are doing tiledRendering, let the client handles the URL loading,
// unless we are jumping to a TOC mark.
if (comphelper::LibreOfficeKit::isActive() && !rURL.startsWith("#"))
{
- rVSh.GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr());
+ rView.libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED, rURL.toUtf8().getStr());
return;
}
- //A CursorShell is always a WrtShell
- SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh);
-
- SwDocShell* pDShell = rSh.GetView().GetDocShell();
- OSL_ENSURE( pDShell, "No DocShell?!");
OUString sTargetFrame(rTargetFrameName);
if (sTargetFrame.isEmpty() && pDShell)
{
@@ -526,8 +520,7 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
OUString sReferer;
if( pDShell && pDShell->GetMedium() )
sReferer = pDShell->GetMedium()->GetName();
- SfxViewFrame* pViewFrame = rSh.GetView().GetViewFrame();
- SfxFrameItem aView( SID_DOCFRAME, pViewFrame );
+ SfxFrameItem aView( SID_DOCFRAME, &rViewFrame );
SfxStringItem aName( SID_FILE_NAME, rURL );
SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame );
SfxStringItem aReferer( SID_REFERER, sReferer );
@@ -548,10 +541,27 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
nullptr
};
- pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
+ rViewFrame.GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr,
SfxCallMode::ASYNCHRON|SfxCallMode::RECORD );
}
+void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
+ const OUString& rTargetFrameName )
+{
+ OSL_ENSURE( !rURL.isEmpty(), "what should be loaded here?" );
+ if( rURL.isEmpty() )
+ return ;
+
+ // The shell could be 0 also!!!!!
+ if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr )
+ return;
+
+ //A CursorShell is always a WrtShell
+ SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh);
+
+ ::LoadURL(rSh.GetView(), rURL, nFilter, rTargetFrameName);
+}
+
void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,
const sal_uInt16 nAction )
{
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index 9fc2e154628a..5956ec71410c 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -783,7 +783,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/sglobal/popupmenu/table.xml b/sw/uiconfig/sglobal/popupmenu/table.xml
index 09470cab6d34..3ae9ad5f688e 100644
--- a/sw/uiconfig/sglobal/popupmenu/table.xml
+++ b/sw/uiconfig/sglobal/popupmenu/table.xml
@@ -122,6 +122,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
<menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
<menu:menuitem menu:id=".uno:RejectTrackedChange"/>
<menu:menuitem menu:id=".uno:NextTrackedChange"/>
@@ -134,6 +135,7 @@
<menu:menuitem menu:id=".uno:OpenSmartTagMenuOnCursor"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
<menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
<menu:menuitem menu:id=".uno:TableDialog"/>
</menu:menupopup>
diff --git a/sw/uiconfig/sweb/menubar/menubar.xml b/sw/uiconfig/sweb/menubar/menubar.xml
index 2c61bd98711d..ce2b5d0b1f27 100644
--- a/sw/uiconfig/sweb/menubar/menubar.xml
+++ b/sw/uiconfig/sweb/menubar/menubar.xml
@@ -654,7 +654,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/sweb/popupmenu/table.xml b/sw/uiconfig/sweb/popupmenu/table.xml
index 09470cab6d34..3ae9ad5f688e 100644
--- a/sw/uiconfig/sweb/popupmenu/table.xml
+++ b/sw/uiconfig/sweb/popupmenu/table.xml
@@ -122,6 +122,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
<menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
<menu:menuitem menu:id=".uno:RejectTrackedChange"/>
<menu:menuitem menu:id=".uno:NextTrackedChange"/>
@@ -134,6 +135,7 @@
<menu:menuitem menu:id=".uno:OpenSmartTagMenuOnCursor"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
<menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
<menu:menuitem menu:id=".uno:TableDialog"/>
</menu:menupopup>
diff --git a/sw/uiconfig/swform/menubar/menubar.xml b/sw/uiconfig/swform/menubar/menubar.xml
index ab27ec3cc546..e0ea58674a1e 100644
--- a/sw/uiconfig/swform/menubar/menubar.xml
+++ b/sw/uiconfig/swform/menubar/menubar.xml
@@ -735,7 +735,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/swform/popupmenu/table.xml b/sw/uiconfig/swform/popupmenu/table.xml
index 09470cab6d34..3ae9ad5f688e 100644
--- a/sw/uiconfig/swform/popupmenu/table.xml
+++ b/sw/uiconfig/swform/popupmenu/table.xml
@@ -122,6 +122,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
<menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
<menu:menuitem menu:id=".uno:RejectTrackedChange"/>
<menu:menuitem menu:id=".uno:NextTrackedChange"/>
@@ -134,6 +135,7 @@
<menu:menuitem menu:id=".uno:OpenSmartTagMenuOnCursor"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
<menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
<menu:menuitem menu:id=".uno:TableDialog"/>
</menu:menupopup>
diff --git a/sw/uiconfig/swreport/menubar/menubar.xml b/sw/uiconfig/swreport/menubar/menubar.xml
index 045696fa6cbe..d991f0c69b7a 100644
--- a/sw/uiconfig/swreport/menubar/menubar.xml
+++ b/sw/uiconfig/swreport/menubar/menubar.xml
@@ -694,7 +694,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index f84f9c18de07..29cca3cefdaa 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -794,7 +794,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/swriter/popupmenu/table.xml b/sw/uiconfig/swriter/popupmenu/table.xml
index 2a302ef1a2cd..1f8ca8ee499c 100644
--- a/sw/uiconfig/swriter/popupmenu/table.xml
+++ b/sw/uiconfig/swriter/popupmenu/table.xml
@@ -125,6 +125,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
<menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
<menu:menuitem menu:id=".uno:RejectTrackedChange"/>
<menu:menuitem menu:id=".uno:NextTrackedChange"/>
@@ -137,6 +138,7 @@
<menu:menuitem menu:id=".uno:OpenSmartTagMenuOnCursor"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
<menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
<menu:menuitem menu:id=".uno:TableDialog"/>
</menu:menupopup>
diff --git a/sw/uiconfig/swriter/ui/insertbookmark.ui b/sw/uiconfig/swriter/ui/insertbookmark.ui
index 8b65bfc619b9..0b1ba7623f15 100644
--- a/sw/uiconfig/swriter/ui/insertbookmark.ui
+++ b/sw/uiconfig/swriter/ui/insertbookmark.ui
@@ -251,7 +251,9 @@
<property name="title" translatable="yes" context="insertbookmark|text">Text</property>
<property name="clickable">True</property>
<child>
- <object class="GtkCellRendererText" id="cellrenderer2"/>
+ <object class="GtkCellRendererText" id="cellrenderer2">
+ <property name="editable">True</property>
+ </object>
<attributes>
<attribute name="text">2</attribute>
</attributes>
@@ -348,6 +350,20 @@
</packing>
</child>
<child>
+ <object class="GtkButton" id="edittext">
+ <property name="label" translatable="yes" context="insertbookmark|edittext">Edit Text</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives-default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
<object class="GtkButton" id="rename">
<property name="label" translatable="yes" context="insertbookmark|rename">Rename</property>
<property name="visible">True</property>
@@ -358,7 +374,7 @@
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</object>
diff --git a/sw/uiconfig/swriter/ui/notebookbar.ui b/sw/uiconfig/swriter/ui/notebookbar.ui
index e19282968a57..fd817b04b510 100644
--- a/sw/uiconfig/swriter/ui/notebookbar.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar.ui
@@ -504,13 +504,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
index 3d34fe1e43a4..4a9a66854bc2 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_groupedbar_full.ui
@@ -1769,13 +1769,6 @@
</object>
</child>
<child>
- <object class="GtkMenuItem" id="MenuHelp-QuestionAnswers">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="action_name">.uno:QuestionAnswers</property>
- </object>
- </child>
- <child>
<object class="GtkMenuItem" id="MenuHelp-SendFeedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/sw/uiconfig/swriter/ui/optformataidspage.ui b/sw/uiconfig/swriter/ui/optformataidspage.ui
index 209de810ac5b..5f86a7e064ec 100644
--- a/sw/uiconfig/swriter/ui/optformataidspage.ui
+++ b/sw/uiconfig/swriter/ui/optformataidspage.ui
@@ -101,7 +101,7 @@
</child>
<child>
<object class="GtkCheckButton" id="tabs">
- <property name="label" translatable="yes" context="optformataidspage|tabs">Ta_bs</property>
+ <property name="label" translatable="yes" context="optformataidspage|tabs">Tabs</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -144,6 +144,21 @@
<property name="top_attach">6</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="bookmarks">
+ <property name="label" translatable="yes" context="optformataidspage|bookmarks">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="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">7</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
@@ -178,7 +193,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkLabel" id="tabs_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label">→</property>
@@ -199,6 +214,19 @@
<property name="top_attach">5</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="bookmarks_label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">| [ ]</property>
+ <property name="tooltip_text" translatable="yes" context="optformataidspage|bookmarks_label|tooltip_text">| indicates a point bookmark
+[ ] indicate the start and end of a bookmark on a text range</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">7</property>
+ </packing>
+ </child>
<child>
<placeholder/>
</child>
diff --git a/sw/uiconfig/swriter/ui/warnhiddensectiondialog.ui b/sw/uiconfig/swriter/ui/warnhiddensectiondialog.ui
new file mode 100644
index 000000000000..19aeec830203
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/warnhiddensectiondialog.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.20.2 -->
+<interface domain="sw">
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkMessageDialog" id="WarnHiddenSectionDialog">
+ <property name="can_focus">False</property>
+ <property name="title" translatable="yes" context="warnhiddensectiondialog|WarnHiddenSectionDialog">Delete hidden section(s)?</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <property name="message_type">question</property>
+ <property name="buttons">yes-no</property>
+ <property name="text" translatable="yes" context="warnhiddensectiondialog|WarnHiddenSectionDialog">Would you like to delete the hidden section(s)?</property>
+ <property name="secondary_text" translatable="yes" context="warnhiddensectiondialog|WarnHiddenSectionDialog">There are hidden sections in the deleted area.</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="messagedialog-vbox">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="messagedialog-action_area">
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>
diff --git a/sw/uiconfig/swxform/menubar/menubar.xml b/sw/uiconfig/swxform/menubar/menubar.xml
index 84a0a247722a..6213464f0def 100644
--- a/sw/uiconfig/swxform/menubar/menubar.xml
+++ b/sw/uiconfig/swxform/menubar/menubar.xml
@@ -782,7 +782,6 @@
<menu:menuitem menu:id=".uno:Documentation"/>
<menu:menuitem menu:id=".uno:TipOfTheDay"/>
<menu:menuseparator/>
- <menu:menuitem menu:id=".uno:QuestionAnswers"/>
<menu:menuitem menu:id=".uno:SendFeedback"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:SafeMode"/>
diff --git a/sw/uiconfig/swxform/popupmenu/table.xml b/sw/uiconfig/swxform/popupmenu/table.xml
index 09470cab6d34..3ae9ad5f688e 100644
--- a/sw/uiconfig/swxform/popupmenu/table.xml
+++ b/sw/uiconfig/swxform/popupmenu/table.xml
@@ -122,6 +122,7 @@
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:FieldDialog"/>
<menu:menuitem menu:id=".uno:AcceptTrackedChange"/>
<menu:menuitem menu:id=".uno:RejectTrackedChange"/>
<menu:menuitem menu:id=".uno:NextTrackedChange"/>
@@ -134,6 +135,7 @@
<menu:menuitem menu:id=".uno:OpenSmartTagMenuOnCursor"/>
<menu:menuitem menu:id=".uno:ThesaurusFromContext"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:TableNumberFormatDialog"/>
<menu:menuitem menu:id=".uno:InsertCaptionDialog"/>
<menu:menuitem menu:id=".uno:TableDialog"/>
</menu:menupopup>
diff --git a/sw/uiconfig/swxform/toolbar/formdesign.xml b/sw/uiconfig/swxform/toolbar/formdesign.xml
index 067ddff0675f..f748bcf68e2e 100644
--- a/sw/uiconfig/swxform/toolbar/formdesign.xml
+++ b/sw/uiconfig/swxform/toolbar/formdesign.xml
@@ -44,7 +44,7 @@
<toolbar:toolbaritem xlink:href=".uno:LeaveGroup" toolbar:visible="false"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:SelectObject"/>
- <toolbar:toolbaritem xlink:href=".uno:SwitchControlDesignMode"/>
+ <toolbar:toolbaritem xlink:href=".uno:SwitchXFormsDesignMode"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ControlProperties"/>
<toolbar:toolbaritem xlink:href=".uno:FormProperties"/>
diff --git a/swext/mediawiki/src/THIRDPARTYLICENSEREADME.html b/swext/mediawiki/src/THIRDPARTYLICENSEREADME.html
index fbd8b0bfdca0..1bda56d39c73 100644
--- a/swext/mediawiki/src/THIRDPARTYLICENSEREADME.html
+++ b/swext/mediawiki/src/THIRDPARTYLICENSEREADME.html
@@ -31,13 +31,6 @@ DO NOT TRANSLATE OR LOCALIZE THIS DOCUMENT<br>
</a></li>
</ul>
</li>
- <li><a href="#mozTocId877758">The Apache Software Foundation
- </a>
- <ul>
- <li><a href="#mozTocId959568">Commons Logging
- </a></li>
- </ul>
- </li>
<li><a href="#mozTocId3503">The Apache Software
Foundation
</a>
@@ -79,15 +72,6 @@ Foundation<br>
<hr style="width: 100%; height: 2px;">The following software may be
included in this product: Jakarta Commons Codec; Use of any of this
software is governed by the terms of the license below:<br>
-<h2><a class="mozTocH2" name="mozTocId877758"></a>The Apache Software
-Foundation<br>
-</h2>
-<h3><a class="mozTocH3" name="mozTocId959568"></a>Commons Logging<br>
-</h3>
-<pre> Apache License<br> Version 2.0, January 2004<br> http://www.apache.org/licenses/<br><br> TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION<br><br> 1. Definitions.<br><br> "License" shall mean the terms and conditions for use, reproduction,<br> and distribution as defined by Sections 1 through 9 of this document.<br><br> "Licensor" shall mean the copyright owner or entity authorized by<br> the copyright owner that is granting the License.<br><br> "Legal Entity" shall mean the union of the acting entity and all<br> other entities that control, are controlled by, or are under common<br> control with that entity. For the purposes of this definition,<br> "control" means (i) the power, direct or indirect, to cause the<br> direction or management of such entity, whether by contract or<br> otherwise, or (ii) ownership of fifty percent (50%) or more of the<br> outstanding shares, or (iii) beneficial ownership of such entity.<br><br> "You" (or "Your") shall mean an individual or Legal Entity<br> exercising permissions granted by this License.<br><br> "Source" form shall mean the preferred form for making modifications,<br> including but not limited to software source code, documentation<br> source, and configuration files.<br><br> "Object" form shall mean any form resulting from mechanical<br> transformation or translation of a Source form, including but<br> not limited to compiled object code, generated documentation,<br> and conversions to other media types.<br><br> "Work" shall mean the work of authorship, whether in Source or<br> Object form, made available under the License, as indicated by a<br> copyright notice that is included in or attached to the work<br> (an example is provided in the Appendix below).<br><br> "Derivative Works" shall mean any work, whether in Source or Object<br> form, that is based on (or derived from) the Work and for which the<br> editorial revisions, annotations, elaborations, or other modifications<br> represent, as a whole, an original work of authorship. For the purposes<br> of this License, Derivative Works shall not include works that remain<br> separable from, or merely link (or bind by name) to the interfaces of,<br> the Work and Derivative Works thereof.<br><br> "Contribution" shall mean any work of authorship, including<br> the original version of the Work and any modifications or additions<br> to that Work or Derivative Works thereof, that is intentionally<br> submitted to Licensor for inclusion in the Work by the copyright owner<br> or by an individual or Legal Entity authorized to submit on behalf of<br> the copyright owner. For the purposes of this definition, "submitted"<br> means any form of electronic, verbal, or written communication sent<br> to the Licensor or its representatives, including but not limited to<br> communication on electronic mailing lists, source code control systems,<br> and issue tracking systems that are managed by, or on behalf of, the<br> Licensor for the purpose of discussing and improving the Work, but<br> excluding communication that is conspicuously marked or otherwise<br> designated in writing by the copyright owner as "Not a Contribution."<br><br> "Contributor" shall mean Licensor and any individual or Legal Entity<br> on behalf of whom a Contribution has been received by Licensor and<br> subsequently incorporated within the Work.<br><br> 2. Grant of Copyright License. Subject to the terms and conditions of<br> this License, each Contributor hereby grants to You a perpetual,<br> worldwide, non-exclusive, no-charge, royalty-free, irrevocable<br> copyright license to reproduce, prepare Derivative Works of,<br> publicly display, publicly perform, sublicense, and distribute the<br> Work and such Derivative Works in Source or Object form.<br><br> 3. Grant of Patent License. Subject to the terms and conditions of<br> this License, each Contributor hereby grants to You a perpetual,<br> worldwide, non-exclusive, no-charge, royalty-free, irrevocable<br> (except as stated in this section) patent license to make, have made,<br> use, offer to sell, sell, import, and otherwise transfer the Work,<br> where such license applies only to those patent claims licensable<br> by such Contributor that are necessarily infringed by their<br> Contribution(s) alone or by combination of their Contribution(s)<br> with the Work to which such Contribution(s) was submitted. If You<br> institute patent litigation against any entity (including a<br> cross-claim or counterclaim in a lawsuit) alleging that the Work<br> or a Contribution incorporated within the Work constitutes direct<br> or contributory patent infringement, then any patent licenses<br> granted to You under this License for that Work shall terminate<br> as of the date such litigation is filed.<br><br> 4. Redistribution. You may reproduce and distribute copies of the<br> Work or Derivative Works thereof in any medium, with or without<br> modifications, and in Source or Object form, provided that You<br> meet the following conditions:<br><br> (a) You must give any other recipients of the Work or<br> Derivative Works a copy of this License; and<br><br> (b) You must cause any modified files to carry prominent notices<br> stating that You changed the files; and<br><br> (c) You must retain, in the Source form of any Derivative Works<br> that You distribute, all copyright, patent, trademark, and<br> attribution notices from the Source form of the Work,<br> excluding those notices that do not pertain to any part of<br> the Derivative Works; and<br><br> (d) If the Work includes a "NOTICE" text file as part of its<br> distribution, then any Derivative Works that You distribute must<br> include a readable copy of the attribution notices contained<br> within such NOTICE file, excluding those notices that do not<br> pertain to any part of the Derivative Works, in at least one<br> of the following places: within a NOTICE text file distributed<br> as part of the Derivative Works; within the Source form or<br> documentation, if provided along with the Derivative Works; or,<br> within a display generated by the Derivative Works, if and<br> wherever such third-party notices normally appear. The contents<br> of the NOTICE file are for informational purposes only and<br> do not modify the License. You may add Your own attribution<br> notices within Derivative Works that You distribute, alongside<br> or as an addendum to the NOTICE text from the Work, provided<br> that such additional attribution notices cannot be construed<br> as modifying the License.<br><br> You may add Your own copyright statement to Your modifications and<br> may provide additional or different license terms and conditions<br> for use, reproduction, or distribution of Your modifications, or<br> for any such Derivative Works as a whole, provided Your use,<br> reproduction, and distribution of the Work otherwise complies with<br> the conditions stated in this License.<br><br> 5. Submission of Contributions. Unless You explicitly state otherwise,<br> any Contribution intentionally submitted for inclusion in the Work<br> by You to the Licensor shall be under the terms and conditions of<br> this License, without any additional terms or conditions.<br> Notwithstanding the above, nothing herein shall supersede or modify<br> the terms of any separate license agreement you may have executed<br> with Licensor regarding such Contributions.<br><br> 6. Trademarks. This License does not grant permission to use the trade<br> names, trademarks, service marks, or product names of the Licensor,<br> except as required for reasonable and customary use in describing the<br> origin of the Work and reproducing the content of the NOTICE file.<br><br> 7. Disclaimer of Warranty. Unless required by applicable law or<br> agreed to in writing, Licensor provides the Work (and each<br> Contributor provides its Contributions) on an "AS IS" BASIS,<br> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or<br> implied, including, without limitation, any warranties or conditions<br> of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A<br> PARTICULAR PURPOSE. You are solely responsible for determining the<br> appropriateness of using or redistributing the Work and assume any<br> risks associated with Your exercise of permissions under this License.<br><br> 8. Limitation of Liability. In no event and under no legal theory,<br> whether in tort (including negligence), contract, or otherwise,<br> unless required by applicable law (such as deliberate and grossly<br> negligent acts) or agreed to in writing, shall any Contributor be<br> liable to You for damages, including any direct, indirect, special,<br> incidental, or consequential damages of any character arising as a<br> result of this License or out of the use or inability to use the<br> Work (including but not limited to damages for loss of goodwill,<br> work stoppage, computer failure or malfunction, or any and all<br> other commercial damages or losses), even if such Contributor<br> has been advised of the possibility of such damages.<br><br> 9. Accepting Warranty or Additional Liability. While redistributing<br> the Work or Derivative Works thereof, You may choose to offer,<br> and charge a fee for, acceptance of support, warranty, indemnity,<br> or other liability obligations and/or rights consistent with this<br> License. However, in accepting such obligations, You may act only<br> on Your own behalf and on Your sole responsibility, not on behalf<br> of any other Contributor, and only if You agree to indemnify,<br> defend, and hold each Contributor harmless for any liability<br> incurred by, or claims asserted against, such Contributor by reason<br> of your accepting any such warranty or additional liability.<br><br> END OF TERMS AND CONDITIONS<br><br> APPENDIX: How to apply the Apache License to your work.<br><br> To apply the Apache License to your work, attach the following<br> boilerplate notice, with the fields enclosed by brackets "[]"<br> replaced with your own identifying information. (Don't include<br> the brackets!) The text should be enclosed in the appropriate<br> comment syntax for the file format. We also recommend that a<br> file or class name and description of purpose be included on the<br> same "printed page" as the copyright notice for easier<br> identification within third-party archives.<br><br> Copyright [yyyy] [name of copyright owner]<br><br> Licensed under the Apache License, Version 2.0 (the "License");<br> you may not use this file except in compliance with the License.<br> You may obtain a copy of the License at<br><br> http://www.apache.org/licenses/LICENSE-2.0<br><br> Unless required by applicable law or agreed to in writing, software<br> distributed under the License is distributed on an "AS IS" BASIS,<br> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.<br> See the License for the specific language governing permissions and<br> limitations under the License.<br><br></pre>
-<hr style="width: 100%; height: 2px;">The following software may be
-included in this product: Tomcat 4.0 or higher; Use of any of this
-software is governed by the terms of the license below:<br>
<h2><a class="mozTocH2" name="mozTocId3503"></a>The Apache Software
Foundation<br>
</h2>
diff --git a/sysui/desktop/debian/control b/sysui/desktop/debian/control
index cfcd7074a616..8fae8a745534 100644
--- a/sysui/desktop/debian/control
+++ b/sysui/desktop/debian/control
@@ -1,3 +1,5 @@
Description: %productname desktop integration
-Maintainer: LibreOffice
+Maintainer: CIB software GmbH
Architecture: all
+Replaces: libreofficepoweredbycib6.4-debian-menus
+Conflicts: libreofficepoweredbycib6.4-debian-menus
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec
index cc30badd0551..239a116a1700 100644
--- a/sysui/desktop/freedesktop/freedesktop-menus.spec
+++ b/sysui/desktop/freedesktop/freedesktop-menus.spec
@@ -25,11 +25,12 @@ Name: %pkgprefix-freedesktop-menus
Group: Office
License: LGPLv3 with MPLv2, ALv2 and others
Provides: libreoffice-desktop-integration
-Provides: libreofficepoweredbycib-desktop-integration
+Provides: ciboffice-desktop-integration
Conflicts: %pkgprefix-suse-menus
Conflicts: %pkgprefix-debian-menus
Conflicts: %pkgprefix-redhat-menus
Conflicts: %pkgprefix-mandriva-menus
+Obsoletes: libreofficepoweredbycib6.4-freedesktop-menus
BuildArch: noarch
AutoReqProv: no
%define _binary_filedigest_algorithm 1
@@ -391,7 +392,7 @@ done
# glibc breaks rpm unless rpm is build with internal glob-matching (issue 49374)
# https://bugzilla.redhat.com/beta/show_bug.cgi?id=134362
%defattr(-, root, root)
-%if "%unixfilename" != "libreofficepoweredbycib%productversion" && "%unixfilename" != "libreofficepoweredbycibdev%productversion"
+%if "%unixfilename" != "ciboffice%productversion" && "%unixfilename" != "cibofficedev%productversion"
# compat symlinks
%attr(0755,root,root) /opt/%unixfilename
%endif
diff --git a/sysui/desktop/icons/empty-document.ico b/sysui/desktop/icons/empty-document.ico
index 56e1e4e00c99..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/empty-document.ico
+++ b/sysui/desktop/icons/empty-document.ico
Binary files differ
diff --git a/sysui/desktop/icons/empty-template.ico b/sysui/desktop/icons/empty-template.ico
index 56e1e4e00c99..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/empty-template.ico
+++ b/sysui/desktop/icons/empty-template.ico
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/1024x1024/apps/main.png b/sysui/desktop/icons/hicolor/1024x1024/apps/main.png
index 7b2dac9bd50d..ceb4127fb92a 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/apps/main.png
+++ b/sysui/desktop/icons/hicolor/1024x1024/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/1024x1024/apps/main.svg b/sysui/desktop/icons/hicolor/1024x1024/apps/main.svg
index 4b3feca3067f..d1a39f9d0f4b 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/1024x1024/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="1024"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 27093.333 27093.333"
- width="1024"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\1024x1024\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,19718.19)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(3.6457852,0,0,3.6406766,2.020256,-197.11182)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 858.238281 455.679688 C 846.71875 444.160156 828.160156 444.160156 816.640625 455.679688 L 511.039062 761.28125 L 382.71875 633.601562 L 312.960938 703.359375 L 511.039062 901.441406 L 907.199219 505.28125 L 858.238281 456 Z M 858.238281 455.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 643.519531 830.71875 L 558.71875 902.398438 L 611.199219 902.398438 C 708.160156 902.398438 787.199219 823.359375 787.199219 726.398438 L 787.199219 710.398438 L 706.558594 779.519531 C 693.121094 803.839844 670.398438 822.398438 643.519531 830.71875 Z M 643.519531 830.71875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 250.558594 835.519531 L 250.558594 175.679688 L 720.320312 175.679688 L 720.320312 462.078125 L 787.199219 404.800781 L 787.199219 108.800781 L 184 108.800781 L 184 902.398438 L 421.441406 902.398438 L 365.121094 835.519531 Z M 250.558594 835.519531 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 373.441406 232.960938 L 583.679688 232.960938 C 604.710938 232.960938 621.761719 250.007812 621.761719 271.039062 L 621.761719 276.160156 C 621.761719 297.191406 604.710938 314.238281 583.679688 314.238281 L 373.441406 314.238281 C 352.410156 314.238281 335.359375 297.191406 335.359375 276.160156 L 335.359375 271.039062 C 335.359375 250.007812 352.410156 232.960938 373.441406 232.960938 Z M 373.441406 232.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 376.320312 425.28125 L 589.761719 425.28125 C 609.90625 425.28125 626.238281 441.613281 626.238281 461.761719 L 626.238281 466.238281 C 626.238281 486.386719 609.90625 502.71875 589.761719 502.71875 L 376.320312 502.71875 C 356.171875 502.71875 339.839844 486.386719 339.839844 466.238281 L 339.839844 461.761719 C 339.839844 441.613281 356.171875 425.28125 376.320312 425.28125 Z M 376.320312 425.28125 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.png b/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.png
index 7b2dac9bd50d..b4336c92c92e 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg b/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg
index 6002546aeecd..d1a39f9d0f4b 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/1024x1024/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="1024"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 27093.333 27093.333"
- width="1024"
- version="1.1"
- id="svg1868"
- sodipodi:docname="startcenter.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\1024x1024\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,19718.19)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(3.6457852,0,0,3.6406766,2.020256,-197.11182)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 858.238281 455.679688 C 846.71875 444.160156 828.160156 444.160156 816.640625 455.679688 L 511.039062 761.28125 L 382.71875 633.601562 L 312.960938 703.359375 L 511.039062 901.441406 L 907.199219 505.28125 L 858.238281 456 Z M 858.238281 455.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 643.519531 830.71875 L 558.71875 902.398438 L 611.199219 902.398438 C 708.160156 902.398438 787.199219 823.359375 787.199219 726.398438 L 787.199219 710.398438 L 706.558594 779.519531 C 693.121094 803.839844 670.398438 822.398438 643.519531 830.71875 Z M 643.519531 830.71875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 250.558594 835.519531 L 250.558594 175.679688 L 720.320312 175.679688 L 720.320312 462.078125 L 787.199219 404.800781 L 787.199219 108.800781 L 184 108.800781 L 184 902.398438 L 421.441406 902.398438 L 365.121094 835.519531 Z M 250.558594 835.519531 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 373.441406 232.960938 L 583.679688 232.960938 C 604.710938 232.960938 621.761719 250.007812 621.761719 271.039062 L 621.761719 276.160156 C 621.761719 297.191406 604.710938 314.238281 583.679688 314.238281 L 373.441406 314.238281 C 352.410156 314.238281 335.359375 297.191406 335.359375 276.160156 L 335.359375 271.039062 C 335.359375 250.007812 352.410156 232.960938 373.441406 232.960938 Z M 373.441406 232.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 376.320312 425.28125 L 589.761719 425.28125 C 609.90625 425.28125 626.238281 441.613281 626.238281 461.761719 L 626.238281 466.238281 C 626.238281 486.386719 609.90625 502.71875 589.761719 502.71875 L 376.320312 502.71875 C 356.171875 502.71875 339.839844 486.386719 339.839844 466.238281 L 339.839844 461.761719 C 339.839844 441.613281 356.171875 425.28125 376.320312 425.28125 Z M 376.320312 425.28125 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.png
index 1b0f8607b5fa..ceb4127fb92a 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg
index c447504f1126..d1a39f9d0f4b 100644
--- a/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/1024x1024/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg height="1024" width="1024" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(4.0217311 0 0 4.0377691 252.6082 5692.3585)" gradientUnits="userSpaceOnUse" x1="151.89412" x2="-24.890966" y1="-1168.5558" y2="-1398.881"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="868.50004" x2="148.50004" y1="964.0004" y2="44.0004"><stop offset="0" stop-color="#e6e6e6"/><stop offset="1" stop-color="#fff"/></linearGradient><path d="m150.2763-.0001c-16.5556 0-31.7763 14.72919-31.7763 32.48242v959.80274c0 15.46954 14.5086 31.71484 31.0722 31.71484h722.8645c18.5345 0 33.0477-15.477 33.0477-30.97461v-596.76758c0-16.89736-2.0504-24.7277-14.0194-36.67383l-341.7826-341.14648c-11.9691-11.94213-21.1265-18.10119-38.0546-18.11719zm509.9865.15625c-27.391 0-28.5919 28.45464-14.1073 42.98437v.004l213.0638 213.73438c17.3848 17.42928 46.2807 13.29444 46.2807-14.19727v-209.73828c0-16.90935-15.3294-32.78711-32.1733-32.78711h-213.0639z" fill="url(#a)" stroke-width="15.997"/><path d="m168.5 49.9999v926h688v-574l-352-352z" fill="url(#b)"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024px" height="1024px" viewBox="0 0 1024 1024" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 858.238281 455.679688 C 846.71875 444.160156 828.160156 444.160156 816.640625 455.679688 L 511.039062 761.28125 L 382.71875 633.601562 L 312.960938 703.359375 L 511.039062 901.441406 L 907.199219 505.28125 L 858.238281 456 Z M 858.238281 455.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 643.519531 830.71875 L 558.71875 902.398438 L 611.199219 902.398438 C 708.160156 902.398438 787.199219 823.359375 787.199219 726.398438 L 787.199219 710.398438 L 706.558594 779.519531 C 693.121094 803.839844 670.398438 822.398438 643.519531 830.71875 Z M 643.519531 830.71875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 250.558594 835.519531 L 250.558594 175.679688 L 720.320312 175.679688 L 720.320312 462.078125 L 787.199219 404.800781 L 787.199219 108.800781 L 184 108.800781 L 184 902.398438 L 421.441406 902.398438 L 365.121094 835.519531 Z M 250.558594 835.519531 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 373.441406 232.960938 L 583.679688 232.960938 C 604.710938 232.960938 621.761719 250.007812 621.761719 271.039062 L 621.761719 276.160156 C 621.761719 297.191406 604.710938 314.238281 583.679688 314.238281 L 373.441406 314.238281 C 352.410156 314.238281 335.359375 297.191406 335.359375 276.160156 L 335.359375 271.039062 C 335.359375 250.007812 352.410156 232.960938 373.441406 232.960938 Z M 373.441406 232.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 376.320312 425.28125 L 589.761719 425.28125 C 609.90625 425.28125 626.238281 441.613281 626.238281 461.761719 L 626.238281 466.238281 C 626.238281 486.386719 609.90625 502.71875 589.761719 502.71875 L 376.320312 502.71875 C 356.171875 502.71875 339.839844 486.386719 339.839844 466.238281 L 339.839844 461.761719 C 339.839844 441.613281 356.171875 425.28125 376.320312 425.28125 Z M 376.320312 425.28125 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/128x128/apps/main.png b/sysui/desktop/icons/hicolor/128x128/apps/main.png
index 37d91bfa2320..cb03d2a31e3d 100644
--- a/sysui/desktop/icons/hicolor/128x128/apps/main.png
+++ b/sysui/desktop/icons/hicolor/128x128/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/128x128/apps/main.svg b/sysui/desktop/icons/hicolor/128x128/apps/main.svg
index 64a2474cc446..3f694bfcc479 100644
--- a/sysui/desktop/icons/hicolor/128x128/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/128x128/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="128"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 3386.6665 3386.6665"
- width="128"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\128x128\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-3988.4758)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.45572313,0,0,0.45508455,-0.47767695,40.403718)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128px" height="128px" viewBox="0 0 128 128" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 107.28125 56.960938 C 105.839844 55.519531 103.519531 55.519531 102.078125 56.960938 L 63.878906 95.160156 L 47.839844 79.199219 L 39.121094 87.921875 L 63.878906 112.679688 L 113.398438 63.160156 L 107.28125 57 Z M 107.28125 56.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 80.441406 103.839844 L 69.839844 112.800781 L 76.398438 112.800781 C 88.519531 112.800781 98.398438 102.921875 98.398438 90.800781 L 98.398438 88.800781 L 88.320312 97.441406 C 86.640625 100.480469 83.800781 102.800781 80.441406 103.839844 Z M 80.441406 103.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 31.320312 104.441406 L 31.320312 21.960938 L 90.039062 21.960938 L 90.039062 57.761719 L 98.398438 50.601562 L 98.398438 13.601562 L 23 13.601562 L 23 112.800781 L 52.679688 112.800781 L 45.640625 104.441406 Z M 31.320312 104.441406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 46.679688 29.121094 L 72.960938 29.121094 C 75.589844 29.121094 77.71875 31.25 77.71875 33.878906 L 77.71875 34.519531 C 77.71875 37.148438 75.589844 39.28125 72.960938 39.28125 L 46.679688 39.28125 C 44.050781 39.28125 41.921875 37.148438 41.921875 34.519531 L 41.921875 33.878906 C 41.921875 31.25 44.050781 29.121094 46.679688 29.121094 Z M 46.679688 29.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 47.039062 53.160156 L 73.71875 53.160156 C 76.238281 53.160156 78.28125 55.203125 78.28125 57.71875 L 78.28125 58.28125 C 78.28125 60.796875 76.238281 62.839844 73.71875 62.839844 L 47.039062 62.839844 C 44.523438 62.839844 42.480469 60.796875 42.480469 58.28125 L 42.480469 57.71875 C 42.480469 55.203125 44.523438 53.160156 47.039062 53.160156 Z M 47.039062 53.160156 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/128x128/apps/startcenter.png b/sysui/desktop/icons/hicolor/128x128/apps/startcenter.png
index 37d91bfa2320..e15b71c5d464 100644
--- a/sysui/desktop/icons/hicolor/128x128/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/128x128/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg b/sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg
index 64a2474cc446..3f694bfcc479 100644
--- a/sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/128x128/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="128"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 3386.6665 3386.6665"
- width="128"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\128x128\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-3988.4758)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.45572313,0,0,0.45508455,-0.47767695,40.403718)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128px" height="128px" viewBox="0 0 128 128" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 107.28125 56.960938 C 105.839844 55.519531 103.519531 55.519531 102.078125 56.960938 L 63.878906 95.160156 L 47.839844 79.199219 L 39.121094 87.921875 L 63.878906 112.679688 L 113.398438 63.160156 L 107.28125 57 Z M 107.28125 56.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 80.441406 103.839844 L 69.839844 112.800781 L 76.398438 112.800781 C 88.519531 112.800781 98.398438 102.921875 98.398438 90.800781 L 98.398438 88.800781 L 88.320312 97.441406 C 86.640625 100.480469 83.800781 102.800781 80.441406 103.839844 Z M 80.441406 103.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 31.320312 104.441406 L 31.320312 21.960938 L 90.039062 21.960938 L 90.039062 57.761719 L 98.398438 50.601562 L 98.398438 13.601562 L 23 13.601562 L 23 112.800781 L 52.679688 112.800781 L 45.640625 104.441406 Z M 31.320312 104.441406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 46.679688 29.121094 L 72.960938 29.121094 C 75.589844 29.121094 77.71875 31.25 77.71875 33.878906 L 77.71875 34.519531 C 77.71875 37.148438 75.589844 39.28125 72.960938 39.28125 L 46.679688 39.28125 C 44.050781 39.28125 41.921875 37.148438 41.921875 34.519531 L 41.921875 33.878906 C 41.921875 31.25 44.050781 29.121094 46.679688 29.121094 Z M 46.679688 29.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 47.039062 53.160156 L 73.71875 53.160156 C 76.238281 53.160156 78.28125 55.203125 78.28125 57.71875 L 78.28125 58.28125 C 78.28125 60.796875 76.238281 62.839844 73.71875 62.839844 L 47.039062 62.839844 C 44.523438 62.839844 42.480469 60.796875 42.480469 58.28125 L 42.480469 57.71875 C 42.480469 55.203125 44.523438 53.160156 47.039062 53.160156 Z M 47.039062 53.160156 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.png
index 3e2adb943ad8..cb03d2a31e3d 100644
--- a/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg
index bc08fb9f3687..3f694bfcc479 100644
--- a/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/128x128/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="108.00134" x2="20.00134" y1="121.99995" y2="5.99995"><stop offset="0" stop-color="#e6e6e6"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="b" gradientTransform="matrix(7.99974 0 0 7.9977797 -873.96742 -7808.7673)" gradientUnits="userSpaceOnUse" x1="122.75008" x2="111.74973" y1="991.62115" y2="977.11713"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m21.253295-.00005c-.25037 0-.50072.0111562-.75.0351562-3.66708.6998-4.56576 2.2662469-4.5 5.9980468v115.968747c.0004 4.1875 1.81149 5.99765 6 5.99805h83.998055c4.18851-.0004 5.99765-1.81055 5.99805-5.99805v-71.818356c.048-2.1119-.78004-4.230247-2.25-5.748047l-42.160155-42.1503908c-1.51819-1.4691999-3.63759-2.2988999-5.75-2.25h-39.83595c-.24919-.024-.49962-.0351562-.75-.0351562zm62.00978.0136719c-.20997 0-.41948.0168281-.62695.0488281-2.66247.8528-3.55843 4.904547-1.50586 6.810547l24.095695 24.220703c2.22593 2.1217 6.65811.306209 6.77539-2.775391v-24.220703c-.00024-2.1136998-1.91298-4.034856-4.01562-4.035156h-24.093755c-.20758-.032-.41894-.0488281-.6289-.0488281z" fill="url(#b)"/><path d="m22.001355 5.99995v116h84.000015v-72l-43.999995-44z" fill="url(#a)"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128px" height="128px" viewBox="0 0 128 128" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 107.28125 56.960938 C 105.839844 55.519531 103.519531 55.519531 102.078125 56.960938 L 63.878906 95.160156 L 47.839844 79.199219 L 39.121094 87.921875 L 63.878906 112.679688 L 113.398438 63.160156 L 107.28125 57 Z M 107.28125 56.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 80.441406 103.839844 L 69.839844 112.800781 L 76.398438 112.800781 C 88.519531 112.800781 98.398438 102.921875 98.398438 90.800781 L 98.398438 88.800781 L 88.320312 97.441406 C 86.640625 100.480469 83.800781 102.800781 80.441406 103.839844 Z M 80.441406 103.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 31.320312 104.441406 L 31.320312 21.960938 L 90.039062 21.960938 L 90.039062 57.761719 L 98.398438 50.601562 L 98.398438 13.601562 L 23 13.601562 L 23 112.800781 L 52.679688 112.800781 L 45.640625 104.441406 Z M 31.320312 104.441406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 46.679688 29.121094 L 72.960938 29.121094 C 75.589844 29.121094 77.71875 31.25 77.71875 33.878906 L 77.71875 34.519531 C 77.71875 37.148438 75.589844 39.28125 72.960938 39.28125 L 46.679688 39.28125 C 44.050781 39.28125 41.921875 37.148438 41.921875 34.519531 L 41.921875 33.878906 C 41.921875 31.25 44.050781 29.121094 46.679688 29.121094 Z M 46.679688 29.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 47.039062 53.160156 L 73.71875 53.160156 C 76.238281 53.160156 78.28125 55.203125 78.28125 57.71875 L 78.28125 58.28125 C 78.28125 60.796875 76.238281 62.839844 73.71875 62.839844 L 47.039062 62.839844 C 44.523438 62.839844 42.480469 60.796875 42.480469 58.28125 L 42.480469 57.71875 C 42.480469 55.203125 44.523438 53.160156 47.039062 53.160156 Z M 47.039062 53.160156 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/16x16/apps/main.png b/sysui/desktop/icons/hicolor/16x16/apps/main.png
index 10b10d7e3491..e58c486aae72 100644
--- a/sysui/desktop/icons/hicolor/16x16/apps/main.png
+++ b/sysui/desktop/icons/hicolor/16x16/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/16x16/apps/main.svg b/sysui/desktop/icons/hicolor/16x16/apps/main.svg
index 54d6f6512fc6..fd5b7b322a81 100644
--- a/sysui/desktop/icons/hicolor/16x16/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/16x16/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="16"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 423.3333 423.3333"
- width="16"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6951.809)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.05696539,0,0,0.05688557,-0.78991871,70.093159)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/16x16/apps/startcenter.png b/sysui/desktop/icons/hicolor/16x16/apps/startcenter.png
index 10b10d7e3491..9740e9312a57 100644
--- a/sysui/desktop/icons/hicolor/16x16/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/16x16/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg b/sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg
index 54d6f6512fc6..fd5b7b322a81 100644
--- a/sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/16x16/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="16"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 423.3333 423.3333"
- width="16"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6951.809)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.05696539,0,0,0.05688557,-0.78991871,70.093159)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.png
index 7dd440146279..e58c486aae72 100644
--- a/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.svg
index 4a59ede3cd17..fd5b7b322a81 100644
--- a/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/16x16/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(.999981 0 0 .999625 -109.99781 -976.00291)" gradientUnits="userSpaceOnUse" x1="124.00017" x2="111.99994" y1="992.375" y2="976.36902"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m2.8125.00581c-.458392.0875-.82072.53358-.8125 1v13.99414c.00005.52339.47643.99995 1 1h10c .52357-.00005.99995-.47661 1-1v-7.99609c.006-.26396-.0975-.52904-.28125-.71875l-5-5.99805c-.189776-.18363-.454695-.28737-.71875-.28125h-5c-.0623-.006-.125182-.006-.1875 0zm7.53125 0c-.331493.10559-.4430551.60775-.1875.84375l3 2.99805c.277145.26269.82915.0378.84375-.34375v-2.99805c-.00003-.26169-.238215-.49997-.5-.5h-3c-.0517-.008-.104591-.008-.15625 0z" fill="url(#a)"/><path d="m3 .99995v14h10v-8l-5-6z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/22x22/apps/main.png b/sysui/desktop/icons/hicolor/22x22/apps/main.png
index 1d2cb64d4fee..fd27be7cffd5 100644
--- a/sysui/desktop/icons/hicolor/22x22/apps/main.png
+++ b/sysui/desktop/icons/hicolor/22x22/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/22x22/apps/main.svg b/sysui/desktop/icons/hicolor/22x22/apps/main.svg
index bef939796ac2..78e08abc3560 100644
--- a/sysui/desktop/icons/hicolor/22x22/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/22x22/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="22"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 582.08329 582.08329"
- width="22"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\22x22\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6793.059)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.07832741,0,0,0.07821766,-0.77319143,68.502653)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22px" height="22px" viewBox="0 0 22 22" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 18.4375 9.789062 C 18.191406 9.542969 17.792969 9.542969 17.546875 9.789062 L 10.980469 16.355469 L 8.222656 13.613281 L 6.722656 15.109375 L 10.980469 19.367188 L 19.492188 10.855469 L 18.4375 9.796875 Z M 18.4375 9.789062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.824219 17.847656 L 12.003906 19.386719 L 13.132812 19.386719 C 15.214844 19.386719 16.914062 17.6875 16.914062 15.605469 L 16.914062 15.261719 L 15.179688 16.746094 C 14.890625 17.269531 14.402344 17.667969 13.824219 17.847656 Z M 13.824219 17.847656 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.382812 17.949219 L 5.382812 3.773438 L 15.476562 3.773438 L 15.476562 9.925781 L 16.914062 8.695312 L 16.914062 2.335938 L 3.953125 2.335938 L 3.953125 19.386719 L 9.054688 19.386719 L 7.84375 17.949219 Z M 5.382812 17.949219 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.023438 5.003906 L 12.539062 5.003906 C 12.992188 5.003906 13.359375 5.371094 13.359375 5.824219 L 13.359375 5.933594 C 13.359375 6.386719 12.992188 6.75 12.539062 6.75 L 8.023438 6.75 C 7.570312 6.75 7.203125 6.386719 7.203125 5.933594 L 7.203125 5.824219 C 7.203125 5.371094 7.570312 5.003906 8.023438 5.003906 Z M 8.023438 5.003906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.085938 9.136719 L 12.671875 9.136719 C 13.101562 9.136719 13.453125 9.488281 13.453125 9.921875 L 13.453125 10.015625 C 13.453125 10.449219 13.101562 10.800781 12.671875 10.800781 L 8.085938 10.800781 C 7.652344 10.800781 7.300781 10.449219 7.300781 10.015625 L 7.300781 9.921875 C 7.300781 9.488281 7.652344 9.136719 8.085938 9.136719 Z M 8.085938 9.136719 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/22x22/apps/startcenter.png b/sysui/desktop/icons/hicolor/22x22/apps/startcenter.png
index 1d2cb64d4fee..c9d2cae505cf 100644
--- a/sysui/desktop/icons/hicolor/22x22/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/22x22/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/22x22/apps/startcenter.svg b/sysui/desktop/icons/hicolor/22x22/apps/startcenter.svg
index bef939796ac2..78e08abc3560 100644
--- a/sysui/desktop/icons/hicolor/22x22/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/22x22/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="22"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 582.08329 582.08329"
- width="22"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\22x22\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6793.059)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.07832741,0,0,0.07821766,-0.77319143,68.502653)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22px" height="22px" viewBox="0 0 22 22" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 18.4375 9.789062 C 18.191406 9.542969 17.792969 9.542969 17.546875 9.789062 L 10.980469 16.355469 L 8.222656 13.613281 L 6.722656 15.109375 L 10.980469 19.367188 L 19.492188 10.855469 L 18.4375 9.796875 Z M 18.4375 9.789062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.824219 17.847656 L 12.003906 19.386719 L 13.132812 19.386719 C 15.214844 19.386719 16.914062 17.6875 16.914062 15.605469 L 16.914062 15.261719 L 15.179688 16.746094 C 14.890625 17.269531 14.402344 17.667969 13.824219 17.847656 Z M 13.824219 17.847656 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.382812 17.949219 L 5.382812 3.773438 L 15.476562 3.773438 L 15.476562 9.925781 L 16.914062 8.695312 L 16.914062 2.335938 L 3.953125 2.335938 L 3.953125 19.386719 L 9.054688 19.386719 L 7.84375 17.949219 Z M 5.382812 17.949219 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.023438 5.003906 L 12.539062 5.003906 C 12.992188 5.003906 13.359375 5.371094 13.359375 5.824219 L 13.359375 5.933594 C 13.359375 6.386719 12.992188 6.75 12.539062 6.75 L 8.023438 6.75 C 7.570312 6.75 7.203125 6.386719 7.203125 5.933594 L 7.203125 5.824219 C 7.203125 5.371094 7.570312 5.003906 8.023438 5.003906 Z M 8.023438 5.003906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.085938 9.136719 L 12.671875 9.136719 C 13.101562 9.136719 13.453125 9.488281 13.453125 9.921875 L 13.453125 10.015625 C 13.453125 10.449219 13.101562 10.800781 12.671875 10.800781 L 8.085938 10.800781 C 7.652344 10.800781 7.300781 10.449219 7.300781 10.015625 L 7.300781 9.921875 C 7.300781 9.488281 7.652344 9.136719 8.085938 9.136719 Z M 8.085938 9.136719 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.png
index bb3df18b254a..fd27be7cffd5 100644
--- a/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.svg
index a00d8397a867..78e08abc3560 100644
--- a/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/22x22/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(1.1249688 0 0 1.1245683 -122.99628 -1095.9936)" gradientUnits="userSpaceOnUse" x1="124.00017" x2="111.99994" y1="992.375" y2="976.36902"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m3.9142093.0067c-.515687.0984-.923302.60028-.914055 1.125v19.74327c.000057.5888.535979 1.12493 1.124991 1.12499h13.7499727c.589011-.00006 1.124934-.53619 1.12499-1.12499v-12.99553c.0068-.29695-.109687-.59516-.316404-.80858l-5.624951-6.74775c-.213496-.20658-.511528-.32329-.808586-.31641h-8.1250217c-.07009-.007-.140829-.007-.210936 0zm10.9726517 0c-.372926.11879-.498432.68372-.210935.94922l3.37497 3.37277c.311786.29553.932786.0425.949211-.38671v-3.37278c-.000034-.2944-.26799-.56246-.562495-.5625h-3.374971c-.05816-.009-.117664-.009-.17578 0z" fill="url(#a)"/><path d="m4.0001373.99995v20h13.9999997v-13l-6-7z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22px" height="22px" viewBox="0 0 22 22" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 18.4375 9.789062 C 18.191406 9.542969 17.792969 9.542969 17.546875 9.789062 L 10.980469 16.355469 L 8.222656 13.613281 L 6.722656 15.109375 L 10.980469 19.367188 L 19.492188 10.855469 L 18.4375 9.796875 Z M 18.4375 9.789062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.824219 17.847656 L 12.003906 19.386719 L 13.132812 19.386719 C 15.214844 19.386719 16.914062 17.6875 16.914062 15.605469 L 16.914062 15.261719 L 15.179688 16.746094 C 14.890625 17.269531 14.402344 17.667969 13.824219 17.847656 Z M 13.824219 17.847656 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.382812 17.949219 L 5.382812 3.773438 L 15.476562 3.773438 L 15.476562 9.925781 L 16.914062 8.695312 L 16.914062 2.335938 L 3.953125 2.335938 L 3.953125 19.386719 L 9.054688 19.386719 L 7.84375 17.949219 Z M 5.382812 17.949219 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.023438 5.003906 L 12.539062 5.003906 C 12.992188 5.003906 13.359375 5.371094 13.359375 5.824219 L 13.359375 5.933594 C 13.359375 6.386719 12.992188 6.75 12.539062 6.75 L 8.023438 6.75 C 7.570312 6.75 7.203125 6.386719 7.203125 5.933594 L 7.203125 5.824219 C 7.203125 5.371094 7.570312 5.003906 8.023438 5.003906 Z M 8.023438 5.003906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.085938 9.136719 L 12.671875 9.136719 C 13.101562 9.136719 13.453125 9.488281 13.453125 9.921875 L 13.453125 10.015625 C 13.453125 10.449219 13.101562 10.800781 12.671875 10.800781 L 8.085938 10.800781 C 7.652344 10.800781 7.300781 10.449219 7.300781 10.015625 L 7.300781 9.921875 C 7.300781 9.488281 7.652344 9.136719 8.085938 9.136719 Z M 8.085938 9.136719 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/24x24/apps/main.png b/sysui/desktop/icons/hicolor/24x24/apps/main.png
index 1d754aa650bc..832af7220506 100644
--- a/sysui/desktop/icons/hicolor/24x24/apps/main.png
+++ b/sysui/desktop/icons/hicolor/24x24/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/24x24/apps/main.svg b/sysui/desktop/icons/hicolor/24x24/apps/main.svg
index ad1c5c55cde4..727dc743e203 100644
--- a/sysui/desktop/icons/hicolor/24x24/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/24x24/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="24"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 634.99995 634.99995"
- width="24"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\24x24\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6740.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.08544808,0,0,0.08532835,-0.76761556,67.972485)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.113281 10.679688 C 19.84375 10.410156 19.410156 10.410156 19.140625 10.679688 L 11.976562 17.84375 L 8.96875 14.851562 L 7.335938 16.484375 L 11.976562 21.128906 L 21.261719 11.84375 L 20.113281 10.6875 Z M 20.113281 10.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.082031 19.46875 L 13.09375 21.148438 L 14.324219 21.148438 C 16.597656 21.148438 18.449219 19.296875 18.449219 17.023438 L 18.449219 16.648438 L 16.558594 18.269531 C 16.246094 18.839844 15.710938 19.273438 15.082031 19.46875 Z M 15.082031 19.46875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.871094 19.582031 L 5.871094 4.117188 L 16.882812 4.117188 L 16.882812 10.828125 L 18.449219 9.488281 L 18.449219 2.550781 L 4.3125 2.550781 L 4.3125 21.148438 L 9.878906 21.148438 L 8.558594 19.582031 Z M 5.871094 19.582031 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.753906 5.460938 L 13.679688 5.460938 C 14.171875 5.460938 14.574219 5.859375 14.574219 6.351562 L 14.574219 6.472656 C 14.574219 6.964844 14.171875 7.363281 13.679688 7.363281 L 8.753906 7.363281 C 8.257812 7.363281 7.859375 6.964844 7.859375 6.472656 L 7.859375 6.351562 C 7.859375 5.859375 8.257812 5.460938 8.753906 5.460938 Z M 8.753906 5.460938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.820312 9.96875 L 13.824219 9.96875 C 14.292969 9.96875 14.675781 10.351562 14.675781 10.824219 L 14.675781 10.925781 C 14.675781 11.398438 14.292969 11.78125 13.824219 11.78125 L 8.820312 11.78125 C 8.347656 11.78125 7.964844 11.398438 7.964844 10.925781 L 7.964844 10.824219 C 7.964844 10.351562 8.347656 9.96875 8.820312 9.96875 Z M 8.820312 9.96875 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/24x24/apps/startcenter.png b/sysui/desktop/icons/hicolor/24x24/apps/startcenter.png
index 1d754aa650bc..a4da903ca002 100644
--- a/sysui/desktop/icons/hicolor/24x24/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/24x24/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/24x24/apps/startcenter.svg b/sysui/desktop/icons/hicolor/24x24/apps/startcenter.svg
index ad1c5c55cde4..727dc743e203 100644
--- a/sysui/desktop/icons/hicolor/24x24/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/24x24/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="24"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 634.99995 634.99995"
- width="24"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\24x24\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6740.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.08544808,0,0,0.08532835,-0.76761556,67.972485)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.113281 10.679688 C 19.84375 10.410156 19.410156 10.410156 19.140625 10.679688 L 11.976562 17.84375 L 8.96875 14.851562 L 7.335938 16.484375 L 11.976562 21.128906 L 21.261719 11.84375 L 20.113281 10.6875 Z M 20.113281 10.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.082031 19.46875 L 13.09375 21.148438 L 14.324219 21.148438 C 16.597656 21.148438 18.449219 19.296875 18.449219 17.023438 L 18.449219 16.648438 L 16.558594 18.269531 C 16.246094 18.839844 15.710938 19.273438 15.082031 19.46875 Z M 15.082031 19.46875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.871094 19.582031 L 5.871094 4.117188 L 16.882812 4.117188 L 16.882812 10.828125 L 18.449219 9.488281 L 18.449219 2.550781 L 4.3125 2.550781 L 4.3125 21.148438 L 9.878906 21.148438 L 8.558594 19.582031 Z M 5.871094 19.582031 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.753906 5.460938 L 13.679688 5.460938 C 14.171875 5.460938 14.574219 5.859375 14.574219 6.351562 L 14.574219 6.472656 C 14.574219 6.964844 14.171875 7.363281 13.679688 7.363281 L 8.753906 7.363281 C 8.257812 7.363281 7.859375 6.964844 7.859375 6.472656 L 7.859375 6.351562 C 7.859375 5.859375 8.257812 5.460938 8.753906 5.460938 Z M 8.753906 5.460938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.820312 9.96875 L 13.824219 9.96875 C 14.292969 9.96875 14.675781 10.351562 14.675781 10.824219 L 14.675781 10.925781 C 14.675781 11.398438 14.292969 11.78125 13.824219 11.78125 L 8.820312 11.78125 C 8.347656 11.78125 7.964844 11.398438 7.964844 10.925781 L 7.964844 10.824219 C 7.964844 10.351562 8.347656 9.96875 8.820312 9.96875 Z M 8.820312 9.96875 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.png
index 1b3d87604b37..832af7220506 100644
--- a/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.svg
index f69aa9de1bae..727dc743e203 100644
--- a/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/24x24/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(1.1249688 0 0 1.1245683 -120.99628 -1094.9935)" gradientUnits="userSpaceOnUse" x1="124.00017" x2="111.99994" y1="992.375" y2="976.36902"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m3.9142044.00633c-.51568.0984-.9233.60028-.91405 1.125v21.74413c.00005.5888.53598 1.12492 1.12499 1.12498h15.7499656c.58901-.00006 1.12493-.53619 1.12499-1.12498v-14.99639c.007-.29695-.10969-.59517-.3164-.80859l-5.624946-6.74775c-.2135-.20658-.51153-.32329-.80859-.31641h-10.1250196c-.0701-.007-.14083-.007-.21094.00001zm12.9726456 0c-.37292.11879-.49843.68372-.21093.94922l3.37497 3.37277c.31178.29553.93278.0425.94921-.38671v-3.37278c-.00003-.2944-.26799-.56246-.56249-.5625h-3.37498c-.0582-.009-.11766-.009-.17578 0z" fill="url(#a)"/><path d="m4.0001344.99958v22.00086h15.9999956v-15.00086l-5.999996-7z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24px" height="24px" viewBox="0 0 24 24" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.113281 10.679688 C 19.84375 10.410156 19.410156 10.410156 19.140625 10.679688 L 11.976562 17.84375 L 8.96875 14.851562 L 7.335938 16.484375 L 11.976562 21.128906 L 21.261719 11.84375 L 20.113281 10.6875 Z M 20.113281 10.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.082031 19.46875 L 13.09375 21.148438 L 14.324219 21.148438 C 16.597656 21.148438 18.449219 19.296875 18.449219 17.023438 L 18.449219 16.648438 L 16.558594 18.269531 C 16.246094 18.839844 15.710938 19.273438 15.082031 19.46875 Z M 15.082031 19.46875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.871094 19.582031 L 5.871094 4.117188 L 16.882812 4.117188 L 16.882812 10.828125 L 18.449219 9.488281 L 18.449219 2.550781 L 4.3125 2.550781 L 4.3125 21.148438 L 9.878906 21.148438 L 8.558594 19.582031 Z M 5.871094 19.582031 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.753906 5.460938 L 13.679688 5.460938 C 14.171875 5.460938 14.574219 5.859375 14.574219 6.351562 L 14.574219 6.472656 C 14.574219 6.964844 14.171875 7.363281 13.679688 7.363281 L 8.753906 7.363281 C 8.257812 7.363281 7.859375 6.964844 7.859375 6.472656 L 7.859375 6.351562 C 7.859375 5.859375 8.257812 5.460938 8.753906 5.460938 Z M 8.753906 5.460938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 8.820312 9.96875 L 13.824219 9.96875 C 14.292969 9.96875 14.675781 10.351562 14.675781 10.824219 L 14.675781 10.925781 C 14.675781 11.398438 14.292969 11.78125 13.824219 11.78125 L 8.820312 11.78125 C 8.347656 11.78125 7.964844 11.398438 7.964844 10.925781 L 7.964844 10.824219 C 7.964844 10.351562 8.347656 9.96875 8.820312 9.96875 Z M 8.820312 9.96875 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/256x256/apps/main.png b/sysui/desktop/icons/hicolor/256x256/apps/main.png
index 51f51e38e033..9fd23ad6c7e2 100644
--- a/sysui/desktop/icons/hicolor/256x256/apps/main.png
+++ b/sysui/desktop/icons/hicolor/256x256/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/256x256/apps/main.svg b/sysui/desktop/icons/hicolor/256x256/apps/main.svg
index 470b1bf3b8a6..749275e65af7 100644
--- a/sysui/desktop/icons/hicolor/256x256/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/256x256/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="256"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 6773.333 6773.333"
- width="256"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\256x256\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-601.8093)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.91144626,0,0,0.91016911,-0.12082939,6.4729268)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 214.558594 113.921875 C 211.679688 111.039062 207.039062 111.039062 204.160156 113.921875 L 127.761719 190.320312 L 95.679688 158.398438 L 78.238281 175.839844 L 127.761719 225.359375 L 226.800781 126.320312 L 214.558594 114 Z M 214.558594 113.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 160.878906 207.679688 L 139.679688 225.601562 L 152.800781 225.601562 C 177.039062 225.601562 196.800781 205.839844 196.800781 181.601562 L 196.800781 177.601562 L 176.640625 194.878906 C 173.28125 200.960938 167.601562 205.601562 160.878906 207.679688 Z M 160.878906 207.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 62.640625 208.878906 L 62.640625 43.921875 L 180.078125 43.921875 L 180.078125 115.519531 L 196.800781 101.199219 L 196.800781 27.199219 L 46 27.199219 L 46 225.601562 L 105.359375 225.601562 L 91.28125 208.878906 Z M 62.640625 208.878906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 93.359375 58.238281 L 145.921875 58.238281 C 151.179688 58.238281 155.441406 62.503906 155.441406 67.761719 L 155.441406 69.039062 C 155.441406 74.296875 151.179688 78.558594 145.921875 78.558594 L 93.359375 78.558594 C 88.101562 78.558594 83.839844 74.296875 83.839844 69.039062 L 83.839844 67.761719 C 83.839844 62.503906 88.101562 58.238281 93.359375 58.238281 Z M 93.359375 58.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 94.078125 106.320312 L 147.441406 106.320312 C 152.476562 106.320312 156.558594 110.402344 156.558594 115.441406 L 156.558594 116.558594 C 156.558594 121.597656 152.476562 125.679688 147.441406 125.679688 L 94.078125 125.679688 C 89.042969 125.679688 84.960938 121.597656 84.960938 116.558594 L 84.960938 115.441406 C 84.960938 110.402344 89.042969 106.320312 94.078125 106.320312 Z M 94.078125 106.320312 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png
index 51f51e38e033..276c5c955e05 100644
--- a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.svg b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.svg
index 470b1bf3b8a6..749275e65af7 100644
--- a/sysui/desktop/icons/hicolor/256x256/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/256x256/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="256"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 6773.333 6773.333"
- width="256"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\256x256\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-601.8093)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.91144626,0,0,0.91016911,-0.12082939,6.4729268)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 214.558594 113.921875 C 211.679688 111.039062 207.039062 111.039062 204.160156 113.921875 L 127.761719 190.320312 L 95.679688 158.398438 L 78.238281 175.839844 L 127.761719 225.359375 L 226.800781 126.320312 L 214.558594 114 Z M 214.558594 113.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 160.878906 207.679688 L 139.679688 225.601562 L 152.800781 225.601562 C 177.039062 225.601562 196.800781 205.839844 196.800781 181.601562 L 196.800781 177.601562 L 176.640625 194.878906 C 173.28125 200.960938 167.601562 205.601562 160.878906 207.679688 Z M 160.878906 207.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 62.640625 208.878906 L 62.640625 43.921875 L 180.078125 43.921875 L 180.078125 115.519531 L 196.800781 101.199219 L 196.800781 27.199219 L 46 27.199219 L 46 225.601562 L 105.359375 225.601562 L 91.28125 208.878906 Z M 62.640625 208.878906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 93.359375 58.238281 L 145.921875 58.238281 C 151.179688 58.238281 155.441406 62.503906 155.441406 67.761719 L 155.441406 69.039062 C 155.441406 74.296875 151.179688 78.558594 145.921875 78.558594 L 93.359375 78.558594 C 88.101562 78.558594 83.839844 74.296875 83.839844 69.039062 L 83.839844 67.761719 C 83.839844 62.503906 88.101562 58.238281 93.359375 58.238281 Z M 93.359375 58.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 94.078125 106.320312 L 147.441406 106.320312 C 152.476562 106.320312 156.558594 110.402344 156.558594 115.441406 L 156.558594 116.558594 C 156.558594 121.597656 152.476562 125.679688 147.441406 125.679688 L 94.078125 125.679688 C 89.042969 125.679688 84.960938 121.597656 84.960938 116.558594 L 84.960938 115.441406 C 84.960938 110.402344 89.042969 106.320312 94.078125 106.320312 Z M 94.078125 106.320312 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.png
index 847d179db2d0..9fd23ad6c7e2 100644
--- a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.svg
index 133a2d2ef0e2..749275e65af7 100644
--- a/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/256x256/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg height="256" width="256" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="217.00001" x2="37.00001" y1="241" y2="11"><stop offset="0" stop-color="#e6e6e6"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="b" gradientTransform="matrix(1.004 0 0 1.0093981 64.49495 1423.0889)" gradientUnits="userSpaceOnUse" x1="151.8994" x2="-27.383467" y1="-1166.1295" y2="-1398.9415"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m39.93554.06245c-4.133 0-7.93359 3.68103-7.93359 8.11914v239.93945c0 3.86723 3.62281 7.92969 7.75781 7.92969h175.98438c4.627 0 8.25-3.86992 8.25-7.74414v-149.185546c0-4.224155-.512-6.181567-3.5-9.167969l-85.32227-85.283205c-2.988-2.9854-5.274-4.5253-9.5-4.5293l-85.73633-.0781zm122.8418.0371c-6.838 0-7.13748 7.11382-3.52148 10.74609v.002l53.18945 53.431644c4.34 4.357128 11.55273 3.321844 11.55273-3.550781v-52.431643c0-4.22715-3.82625-8.19726-8.03125-8.19726h-53.18945z" fill="url(#b)" stroke-width="15.997"/><path d="m44.00002 11.99995v232h168v-148l-86-84z" fill="url(#a)"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="256px" height="256px" viewBox="0 0 256 256" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 214.558594 113.921875 C 211.679688 111.039062 207.039062 111.039062 204.160156 113.921875 L 127.761719 190.320312 L 95.679688 158.398438 L 78.238281 175.839844 L 127.761719 225.359375 L 226.800781 126.320312 L 214.558594 114 Z M 214.558594 113.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 160.878906 207.679688 L 139.679688 225.601562 L 152.800781 225.601562 C 177.039062 225.601562 196.800781 205.839844 196.800781 181.601562 L 196.800781 177.601562 L 176.640625 194.878906 C 173.28125 200.960938 167.601562 205.601562 160.878906 207.679688 Z M 160.878906 207.679688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 62.640625 208.878906 L 62.640625 43.921875 L 180.078125 43.921875 L 180.078125 115.519531 L 196.800781 101.199219 L 196.800781 27.199219 L 46 27.199219 L 46 225.601562 L 105.359375 225.601562 L 91.28125 208.878906 Z M 62.640625 208.878906 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 93.359375 58.238281 L 145.921875 58.238281 C 151.179688 58.238281 155.441406 62.503906 155.441406 67.761719 L 155.441406 69.039062 C 155.441406 74.296875 151.179688 78.558594 145.921875 78.558594 L 93.359375 78.558594 C 88.101562 78.558594 83.839844 74.296875 83.839844 69.039062 L 83.839844 67.761719 C 83.839844 62.503906 88.101562 58.238281 93.359375 58.238281 Z M 93.359375 58.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 94.078125 106.320312 L 147.441406 106.320312 C 152.476562 106.320312 156.558594 110.402344 156.558594 115.441406 L 156.558594 116.558594 C 156.558594 121.597656 152.476562 125.679688 147.441406 125.679688 L 94.078125 125.679688 C 89.042969 125.679688 84.960938 121.597656 84.960938 116.558594 L 84.960938 115.441406 C 84.960938 110.402344 89.042969 106.320312 94.078125 106.320312 Z M 94.078125 106.320312 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/32x32/apps/main.png b/sysui/desktop/icons/hicolor/32x32/apps/main.png
index a2617607e6e3..6b9b3fe25c7f 100644
--- a/sysui/desktop/icons/hicolor/32x32/apps/main.png
+++ b/sysui/desktop/icons/hicolor/32x32/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/32x32/apps/main.svg b/sysui/desktop/icons/hicolor/32x32/apps/main.svg
index 0747ec11fc6e..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/hicolor/32x32/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/32x32/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="48"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1269.9999 1269.9999"
- width="48"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\48x48\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6105.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.17089617,0,0,0.1706567,-0.70070684,61.610461)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/32x32/apps/startcenter.png b/sysui/desktop/icons/hicolor/32x32/apps/startcenter.png
index a2617607e6e3..1d9d606f0c40 100644
--- a/sysui/desktop/icons/hicolor/32x32/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/32x32/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/32x32/apps/startcenter.svg b/sysui/desktop/icons/hicolor/32x32/apps/startcenter.svg
index 0747ec11fc6e..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/hicolor/32x32/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/32x32/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="48"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1269.9999 1269.9999"
- width="48"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\48x48\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6105.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.17089617,0,0,0.1706567,-0.70070684,61.610461)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.png
index 23a76bbc0b5b..6b9b3fe25c7f 100644
--- a/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.svg
index c1a72247270e..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/32x32/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(1.99993 0 0 1.9994499 -217.9916 -1950.1968)" gradientUnits="userSpaceOnUse" x1="124.00028" x2="110.99982" y1="992.37128" y2="976.36688"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m5.6252743.009716c-.91677.174932-1.64144 1.065106-1.625 1.998044v27.99219c.0001 1.04688.95288 1.9999 2 2h19.9999997c1.04712-.0001 1.9999-.95312 2-2v-17.45508c.012-.52797-.19501-1.05609-.5625-1.43554l-10.54102-10.537114c-.37954-.367299-.90939-.574736-1.4375-.5625h-9.4589797c-.1246-.012-.25036-.012-.375 0zm15.0331997.0059c-.66561.213198-.89009 1.226608-.37695 1.703125l6.02539 6.054689c.55648.53041 1.66404.077 1.69336-.69336v-6.054688c-.00006-.528417-.47824-1.009706-1.00391-1.009766h-6.02343c-.1038-.01599-.21072-.01599-.31446 0z" fill="url(#a)"/><path d="m6.0002743 1.99995v28h19.9999997v-17.5l-10.5-10.5z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/48x48/apps/main.png b/sysui/desktop/icons/hicolor/48x48/apps/main.png
index 3d577dc41352..9b597cc12898 100644
--- a/sysui/desktop/icons/hicolor/48x48/apps/main.png
+++ b/sysui/desktop/icons/hicolor/48x48/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/48x48/apps/main.svg b/sysui/desktop/icons/hicolor/48x48/apps/main.svg
index 0747ec11fc6e..4239da758057 100644
--- a/sysui/desktop/icons/hicolor/48x48/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/48x48/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="48"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1269.9999 1269.9999"
- width="48"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\48x48\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6105.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.17089617,0,0,0.1706567,-0.70070684,61.610461)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.230469 21.359375 C 39.691406 20.820312 38.820312 20.820312 38.28125 21.359375 L 23.953125 35.683594 L 17.941406 29.699219 L 14.671875 32.96875 L 23.953125 42.253906 L 42.523438 23.683594 L 40.230469 21.375 Z M 40.230469 21.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 30.164062 38.941406 L 26.191406 42.300781 L 28.648438 42.300781 C 33.195312 42.300781 36.898438 38.59375 36.898438 34.050781 L 36.898438 33.300781 L 33.121094 36.539062 C 32.488281 37.679688 31.425781 38.550781 30.164062 38.941406 Z M 30.164062 38.941406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.746094 39.164062 L 11.746094 8.234375 L 33.765625 8.234375 L 33.765625 21.660156 L 36.898438 18.976562 L 36.898438 5.101562 L 8.625 5.101562 L 8.625 42.300781 L 19.753906 42.300781 L 17.113281 39.164062 Z M 11.746094 39.164062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.503906 10.921875 L 27.359375 10.921875 C 28.347656 10.921875 29.144531 11.71875 29.144531 12.703125 L 29.144531 12.945312 C 29.144531 13.929688 28.347656 14.730469 27.359375 14.730469 L 17.503906 14.730469 C 16.519531 14.730469 15.71875 13.929688 15.71875 12.945312 L 15.71875 12.703125 C 15.71875 11.71875 16.519531 10.921875 17.503906 10.921875 Z M 17.503906 10.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.640625 19.933594 L 27.644531 19.933594 C 28.589844 19.933594 29.355469 20.699219 29.355469 21.644531 L 29.355469 21.855469 C 29.355469 22.800781 28.589844 23.566406 27.644531 23.566406 L 17.640625 23.566406 C 16.695312 23.566406 15.929688 22.800781 15.929688 21.855469 L 15.929688 21.644531 C 15.929688 20.699219 16.695312 19.933594 17.640625 19.933594 Z M 17.640625 19.933594 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/48x48/apps/startcenter.png b/sysui/desktop/icons/hicolor/48x48/apps/startcenter.png
index 3d577dc41352..8fc277140591 100644
--- a/sysui/desktop/icons/hicolor/48x48/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/48x48/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/48x48/apps/startcenter.svg b/sysui/desktop/icons/hicolor/48x48/apps/startcenter.svg
index 0747ec11fc6e..4239da758057 100644
--- a/sysui/desktop/icons/hicolor/48x48/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/48x48/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="48"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1269.9999 1269.9999"
- width="48"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\48x48\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-6105.1423)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.17089617,0,0,0.1706567,-0.70070684,61.610461)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.230469 21.359375 C 39.691406 20.820312 38.820312 20.820312 38.28125 21.359375 L 23.953125 35.683594 L 17.941406 29.699219 L 14.671875 32.96875 L 23.953125 42.253906 L 42.523438 23.683594 L 40.230469 21.375 Z M 40.230469 21.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 30.164062 38.941406 L 26.191406 42.300781 L 28.648438 42.300781 C 33.195312 42.300781 36.898438 38.59375 36.898438 34.050781 L 36.898438 33.300781 L 33.121094 36.539062 C 32.488281 37.679688 31.425781 38.550781 30.164062 38.941406 Z M 30.164062 38.941406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.746094 39.164062 L 11.746094 8.234375 L 33.765625 8.234375 L 33.765625 21.660156 L 36.898438 18.976562 L 36.898438 5.101562 L 8.625 5.101562 L 8.625 42.300781 L 19.753906 42.300781 L 17.113281 39.164062 Z M 11.746094 39.164062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.503906 10.921875 L 27.359375 10.921875 C 28.347656 10.921875 29.144531 11.71875 29.144531 12.703125 L 29.144531 12.945312 C 29.144531 13.929688 28.347656 14.730469 27.359375 14.730469 L 17.503906 14.730469 C 16.519531 14.730469 15.71875 13.929688 15.71875 12.945312 L 15.71875 12.703125 C 15.71875 11.71875 16.519531 10.921875 17.503906 10.921875 Z M 17.503906 10.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.640625 19.933594 L 27.644531 19.933594 C 28.589844 19.933594 29.355469 20.699219 29.355469 21.644531 L 29.355469 21.855469 C 29.355469 22.800781 28.589844 23.566406 27.644531 23.566406 L 17.640625 23.566406 C 16.695312 23.566406 15.929688 22.800781 15.929688 21.855469 L 15.929688 21.644531 C 15.929688 20.699219 16.695312 19.933594 17.640625 19.933594 Z M 17.640625 19.933594 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.png
index 1851eb452d42..9b597cc12898 100644
--- a/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.svg
index 5ff605e50b5a..4239da758057 100644
--- a/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/48x48/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg height="48" width="48" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(2.9999 0 0 2.9991699 -328.98808 -2928.2904)" gradientUnits="userSpaceOnUse" x1="123.66695" x2="111.66655" y1="991.70453" y2="977.03375"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m8.4379114.0135885c-1.37515.262398-2.46216 1.598638-2.4375 2.998047v41.9882855c.00015 1.57031 1.42931 2.99985 3 3h29.9999996c1.57069-.00015 2.99985-1.42969 3-3v-26.18165c.018-.79196-.29252-1.587065-.84375-2.156245l-15.8125-15.8046875c-.56932-.550947-1.3641-.862103-2.15625-.84375h-14.1874996c-.18689-.01799-.37555-.01799-.5625 0zm22.5507796.0098c-.99843.319797-1.33417 1.839914-.56445 2.554688l9.03515 9.0820315c.83473.795587 2.49704.114553 2.54102-1.04105v-9.0820325c-.00009-.792623-.71736-1.513582-1.50586-1.513672h-9.03516c-.15569-.02399-.31509-.02399-.4707 0z" fill="url(#a)"/><path d="m9.0004114 2.9999505v42.0000005h29.9999996v-26l-16-16.0000005z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" viewBox="0 0 48 48" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.230469 21.359375 C 39.691406 20.820312 38.820312 20.820312 38.28125 21.359375 L 23.953125 35.683594 L 17.941406 29.699219 L 14.671875 32.96875 L 23.953125 42.253906 L 42.523438 23.683594 L 40.230469 21.375 Z M 40.230469 21.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 30.164062 38.941406 L 26.191406 42.300781 L 28.648438 42.300781 C 33.195312 42.300781 36.898438 38.59375 36.898438 34.050781 L 36.898438 33.300781 L 33.121094 36.539062 C 32.488281 37.679688 31.425781 38.550781 30.164062 38.941406 Z M 30.164062 38.941406 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.746094 39.164062 L 11.746094 8.234375 L 33.765625 8.234375 L 33.765625 21.660156 L 36.898438 18.976562 L 36.898438 5.101562 L 8.625 5.101562 L 8.625 42.300781 L 19.753906 42.300781 L 17.113281 39.164062 Z M 11.746094 39.164062 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.503906 10.921875 L 27.359375 10.921875 C 28.347656 10.921875 29.144531 11.71875 29.144531 12.703125 L 29.144531 12.945312 C 29.144531 13.929688 28.347656 14.730469 27.359375 14.730469 L 17.503906 14.730469 C 16.519531 14.730469 15.71875 13.929688 15.71875 12.945312 L 15.71875 12.703125 C 15.71875 11.71875 16.519531 10.921875 17.503906 10.921875 Z M 17.503906 10.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 17.640625 19.933594 L 27.644531 19.933594 C 28.589844 19.933594 29.355469 20.699219 29.355469 21.644531 L 29.355469 21.855469 C 29.355469 22.800781 28.589844 23.566406 27.644531 23.566406 L 17.640625 23.566406 C 16.695312 23.566406 15.929688 22.800781 15.929688 21.855469 L 15.929688 21.644531 C 15.929688 20.699219 16.695312 19.933594 17.640625 19.933594 Z M 17.640625 19.933594 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/512x512/apps/main.png b/sysui/desktop/icons/hicolor/512x512/apps/main.png
index 5af078ea6475..9e407b0874f4 100644
--- a/sysui/desktop/icons/hicolor/512x512/apps/main.png
+++ b/sysui/desktop/icons/hicolor/512x512/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/512x512/apps/main.svg b/sysui/desktop/icons/hicolor/512x512/apps/main.svg
index 606d5f7bfaf6..3d14deb1e790 100644
--- a/sysui/desktop/icons/hicolor/512x512/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/512x512/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="512"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 13546.666 13546.666"
- width="512"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\512x512\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,6171.5237)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(1.8228925,0,0,1.8203382,0.59286564,-61.388645)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px" viewBox="0 0 512 512" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 429.121094 227.839844 C 423.359375 222.078125 414.078125 222.078125 408.320312 227.839844 L 255.519531 380.640625 L 191.359375 316.800781 L 156.480469 351.679688 L 255.519531 450.71875 L 453.601562 252.640625 L 429.121094 228 Z M 429.121094 227.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 321.761719 415.359375 L 279.359375 451.199219 L 305.601562 451.199219 C 354.078125 451.199219 393.601562 411.679688 393.601562 363.199219 L 393.601562 355.199219 L 353.28125 389.761719 C 346.558594 401.921875 335.199219 411.199219 321.761719 415.359375 Z M 321.761719 415.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 125.28125 417.761719 L 125.28125 87.839844 L 360.160156 87.839844 L 360.160156 231.039062 L 393.601562 202.398438 L 393.601562 54.398438 L 92 54.398438 L 92 451.199219 L 210.71875 451.199219 L 182.558594 417.761719 Z M 125.28125 417.761719 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 186.71875 116.480469 L 291.839844 116.480469 C 302.355469 116.480469 310.878906 125.003906 310.878906 135.519531 L 310.878906 138.078125 C 310.878906 148.59375 302.355469 157.121094 291.839844 157.121094 L 186.71875 157.121094 C 176.203125 157.121094 167.679688 148.59375 167.679688 138.078125 L 167.679688 135.519531 C 167.679688 125.003906 176.203125 116.480469 186.71875 116.480469 Z M 186.71875 116.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 188.160156 212.640625 L 294.878906 212.640625 C 304.953125 212.640625 313.121094 220.804688 313.121094 230.878906 L 313.121094 233.121094 C 313.121094 243.195312 304.953125 251.359375 294.878906 251.359375 L 188.160156 251.359375 C 178.085938 251.359375 169.921875 243.195312 169.921875 233.121094 L 169.921875 230.878906 C 169.921875 220.804688 178.085938 212.640625 188.160156 212.640625 Z M 188.160156 212.640625 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/512x512/apps/startcenter.png b/sysui/desktop/icons/hicolor/512x512/apps/startcenter.png
index 5af078ea6475..1e94d2ec8aba 100644
--- a/sysui/desktop/icons/hicolor/512x512/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/512x512/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/512x512/apps/startcenter.svg b/sysui/desktop/icons/hicolor/512x512/apps/startcenter.svg
index 606d5f7bfaf6..3d14deb1e790 100644
--- a/sysui/desktop/icons/hicolor/512x512/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/512x512/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="512"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 13546.666 13546.666"
- width="512"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\512x512\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="0.84285714"
- inkscape:cx="465.3704"
- inkscape:cy="416.5281"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,6171.5237)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(1.8228925,0,0,1.8203382,0.59286564,-61.388645)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px" viewBox="0 0 512 512" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 429.121094 227.839844 C 423.359375 222.078125 414.078125 222.078125 408.320312 227.839844 L 255.519531 380.640625 L 191.359375 316.800781 L 156.480469 351.679688 L 255.519531 450.71875 L 453.601562 252.640625 L 429.121094 228 Z M 429.121094 227.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 321.761719 415.359375 L 279.359375 451.199219 L 305.601562 451.199219 C 354.078125 451.199219 393.601562 411.679688 393.601562 363.199219 L 393.601562 355.199219 L 353.28125 389.761719 C 346.558594 401.921875 335.199219 411.199219 321.761719 415.359375 Z M 321.761719 415.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 125.28125 417.761719 L 125.28125 87.839844 L 360.160156 87.839844 L 360.160156 231.039062 L 393.601562 202.398438 L 393.601562 54.398438 L 92 54.398438 L 92 451.199219 L 210.71875 451.199219 L 182.558594 417.761719 Z M 125.28125 417.761719 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 186.71875 116.480469 L 291.839844 116.480469 C 302.355469 116.480469 310.878906 125.003906 310.878906 135.519531 L 310.878906 138.078125 C 310.878906 148.59375 302.355469 157.121094 291.839844 157.121094 L 186.71875 157.121094 C 176.203125 157.121094 167.679688 148.59375 167.679688 138.078125 L 167.679688 135.519531 C 167.679688 125.003906 176.203125 116.480469 186.71875 116.480469 Z M 186.71875 116.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 188.160156 212.640625 L 294.878906 212.640625 C 304.953125 212.640625 313.121094 220.804688 313.121094 230.878906 L 313.121094 233.121094 C 313.121094 243.195312 304.953125 251.359375 294.878906 251.359375 L 188.160156 251.359375 C 178.085938 251.359375 169.921875 243.195312 169.921875 233.121094 L 169.921875 230.878906 C 169.921875 220.804688 178.085938 212.640625 188.160156 212.640625 Z M 188.160156 212.640625 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.png
index cfb1bc348109..9e407b0874f4 100644
--- a/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.svg
index c0c3049235ab..3d14deb1e790 100644
--- a/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/512x512/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg height="512" width="512" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="434.00592" x2="74.00592" y1="482" y2="22"><stop offset="0" stop-color="#e6e6e6"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="b" gradientTransform="matrix(2.008088 0 0 2.0188846 126.9892 2846.1792)" gradientUnits="userSpaceOnUse" x1="151.89409" x2="-24.890991" y1="-1168.5558" y2="-1398.881"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m75.8672-.00005c-8.2664 0-15.8672 7.36558-15.8672 16.24219v479.90039c0 7.73479 7.2433 15.85742 15.5137 15.85742h359.9902c9.2544 0 16.5-7.73949 16.5-15.48828v-298.38281c0-8.44868-1.0237-12.36482-7-18.33789l-170.6562-170.57227c-5.9762-5.97107-10.5476-9.0506-19-9.05859zm253.6953.0781c-13.6766 0-14.2772 14.22732-7.0449 21.49219v.002l106.3848 106.86718c8.6804 8.71464 23.1094 6.6482 23.1094-7.09765v-104.8711c0-8.45468-7.6541-16.39258-16.0645-16.39258z" fill="url(#b)" stroke-width="15.997"/><path d="m84.0059 23.99995v464h344v-288l-176-176z" fill="url(#a)"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px" viewBox="0 0 512 512" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 429.121094 227.839844 C 423.359375 222.078125 414.078125 222.078125 408.320312 227.839844 L 255.519531 380.640625 L 191.359375 316.800781 L 156.480469 351.679688 L 255.519531 450.71875 L 453.601562 252.640625 L 429.121094 228 Z M 429.121094 227.839844 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 321.761719 415.359375 L 279.359375 451.199219 L 305.601562 451.199219 C 354.078125 451.199219 393.601562 411.679688 393.601562 363.199219 L 393.601562 355.199219 L 353.28125 389.761719 C 346.558594 401.921875 335.199219 411.199219 321.761719 415.359375 Z M 321.761719 415.359375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 125.28125 417.761719 L 125.28125 87.839844 L 360.160156 87.839844 L 360.160156 231.039062 L 393.601562 202.398438 L 393.601562 54.398438 L 92 54.398438 L 92 451.199219 L 210.71875 451.199219 L 182.558594 417.761719 Z M 125.28125 417.761719 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 186.71875 116.480469 L 291.839844 116.480469 C 302.355469 116.480469 310.878906 125.003906 310.878906 135.519531 L 310.878906 138.078125 C 310.878906 148.59375 302.355469 157.121094 291.839844 157.121094 L 186.71875 157.121094 C 176.203125 157.121094 167.679688 148.59375 167.679688 138.078125 L 167.679688 135.519531 C 167.679688 125.003906 176.203125 116.480469 186.71875 116.480469 Z M 186.71875 116.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 188.160156 212.640625 L 294.878906 212.640625 C 304.953125 212.640625 313.121094 220.804688 313.121094 230.878906 L 313.121094 233.121094 C 313.121094 243.195312 304.953125 251.359375 294.878906 251.359375 L 188.160156 251.359375 C 178.085938 251.359375 169.921875 243.195312 169.921875 233.121094 L 169.921875 230.878906 C 169.921875 220.804688 178.085938 212.640625 188.160156 212.640625 Z M 188.160156 212.640625 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/64x64/apps/main.png b/sysui/desktop/icons/hicolor/64x64/apps/main.png
index ea22a799292f..b650bdda86f6 100644
--- a/sysui/desktop/icons/hicolor/64x64/apps/main.png
+++ b/sysui/desktop/icons/hicolor/64x64/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/64x64/apps/main.svg b/sysui/desktop/icons/hicolor/64x64/apps/main.svg
index 54b4ee747afa..af1b4fe7a3a2 100644
--- a/sysui/desktop/icons/hicolor/64x64/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/64x64/apps/main.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="64"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1693.3332 1693.3332"
- width="64"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\64x64\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-5681.809)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.22786156,0,0,0.22754227,-0.6561009,57.369112)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 64 64" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 53.640625 28.480469 C 52.921875 27.761719 51.761719 27.761719 51.039062 28.480469 L 31.941406 47.578125 L 23.921875 39.601562 L 19.558594 43.960938 L 31.941406 56.339844 L 56.699219 31.578125 L 53.640625 28.5 Z M 53.640625 28.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.21875 51.921875 L 34.921875 56.398438 L 38.199219 56.398438 C 44.261719 56.398438 49.199219 51.460938 49.199219 45.398438 L 49.199219 44.398438 L 44.160156 48.71875 C 43.320312 50.238281 41.898438 51.398438 40.21875 51.921875 Z M 40.21875 51.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.660156 52.21875 L 15.660156 10.980469 L 45.019531 10.980469 L 45.019531 28.878906 L 49.199219 25.300781 L 49.199219 6.800781 L 11.5 6.800781 L 11.5 56.398438 L 26.339844 56.398438 L 22.820312 52.21875 Z M 15.660156 52.21875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.339844 14.558594 L 36.480469 14.558594 C 37.792969 14.558594 38.859375 15.625 38.859375 16.941406 L 38.859375 17.261719 C 38.859375 18.574219 37.792969 19.640625 36.480469 19.640625 L 23.339844 19.640625 C 22.027344 19.640625 20.960938 18.574219 20.960938 17.261719 L 20.960938 16.941406 C 20.960938 15.625 22.027344 14.558594 23.339844 14.558594 Z M 23.339844 14.558594 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.519531 26.578125 L 36.859375 26.578125 C 38.121094 26.578125 39.140625 27.601562 39.140625 28.859375 L 39.140625 29.140625 C 39.140625 30.398438 38.121094 31.421875 36.859375 31.421875 L 23.519531 31.421875 C 22.261719 31.421875 21.238281 30.398438 21.238281 29.140625 L 21.238281 28.859375 C 21.238281 27.601562 22.261719 26.578125 23.519531 26.578125 Z M 23.519531 26.578125 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/64x64/apps/startcenter.png b/sysui/desktop/icons/hicolor/64x64/apps/startcenter.png
index ea22a799292f..c8268ea38afb 100644
--- a/sysui/desktop/icons/hicolor/64x64/apps/startcenter.png
+++ b/sysui/desktop/icons/hicolor/64x64/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/64x64/apps/startcenter.svg b/sysui/desktop/icons/hicolor/64x64/apps/startcenter.svg
index 54b4ee747afa..af1b4fe7a3a2 100644
--- a/sysui/desktop/icons/hicolor/64x64/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/64x64/apps/startcenter.svg
@@ -1,90 +1,10 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="64"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 1693.3332 1693.3332"
- width="64"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\64x64\apps\main.png"
- inkscape:export-xdpi="96"
- inkscape:export-ydpi="96">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="1"
- inkscape:pageshadow="2"
- inkscape:window-width="2520"
- inkscape:window-height="1496"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="6.7428571"
- inkscape:cx="42.260936"
- inkscape:cy="64.290578"
- inkscape:window-x="2869"
- inkscape:window-y="50"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false"
- units="px" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,-5681.809)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(0.22786156,0,0,0.22754227,-0.6561009,57.369112)"
- inkscape:export-filename="C:\cygwin\home\Marina\lode\dev\FLOSS-194\sysui\desktop\icons\hicolor\16x16\apps\main.png"
- inkscape:export-xdpi="95.16349"
- inkscape:export-ydpi="95.16349">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 64 64" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 53.640625 28.480469 C 52.921875 27.761719 51.761719 27.761719 51.039062 28.480469 L 31.941406 47.578125 L 23.921875 39.601562 L 19.558594 43.960938 L 31.941406 56.339844 L 56.699219 31.578125 L 53.640625 28.5 Z M 53.640625 28.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.21875 51.921875 L 34.921875 56.398438 L 38.199219 56.398438 C 44.261719 56.398438 49.199219 51.460938 49.199219 45.398438 L 49.199219 44.398438 L 44.160156 48.71875 C 43.320312 50.238281 41.898438 51.398438 40.21875 51.921875 Z M 40.21875 51.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.660156 52.21875 L 15.660156 10.980469 L 45.019531 10.980469 L 45.019531 28.878906 L 49.199219 25.300781 L 49.199219 6.800781 L 11.5 6.800781 L 11.5 56.398438 L 26.339844 56.398438 L 22.820312 52.21875 Z M 15.660156 52.21875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.339844 14.558594 L 36.480469 14.558594 C 37.792969 14.558594 38.859375 15.625 38.859375 16.941406 L 38.859375 17.261719 C 38.859375 18.574219 37.792969 19.640625 36.480469 19.640625 L 23.339844 19.640625 C 22.027344 19.640625 20.960938 18.574219 20.960938 17.261719 L 20.960938 16.941406 C 20.960938 15.625 22.027344 14.558594 23.339844 14.558594 Z M 23.339844 14.558594 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.519531 26.578125 L 36.859375 26.578125 C 38.121094 26.578125 39.140625 27.601562 39.140625 28.859375 L 39.140625 29.140625 C 39.140625 30.398438 38.121094 31.421875 36.859375 31.421875 L 23.519531 31.421875 C 22.261719 31.421875 21.238281 30.398438 21.238281 29.140625 L 21.238281 28.859375 C 21.238281 27.601562 22.261719 26.578125 23.519531 26.578125 Z M 23.519531 26.578125 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.png b/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.png
index c6ecc7cd06b1..b650bdda86f6 100644
--- a/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.svg b/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.svg
index 0f240c0d1b12..af1b4fe7a3a2 100644
--- a/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/hicolor/64x64/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><linearGradient id="a" gradientTransform="matrix(3.9998072 0 0 3.9988898 -436.9764 -3904.3838)" gradientUnits="userSpaceOnUse" x1="122.75008" x2="111.74973" y1="991.62115" y2="977.11713"><stop offset="0" stop-color="#535353"/><stop offset="1" stop-color="#7e7e7e"/></linearGradient><path d="m9.6266073.000051c-.12518 0-.25035.0056-.37499.01758-1.83351.349901-2.28285 1.133123-2.24997 2.999025v57.984264c.0002 2.09375.90573 2.99883 2.9999597 2.99903h43.9984c2.09422-.0002 2.99878-.90528 2.99898-2.99903v-35.909069c.024-1.05595-.39002-2.115124-1.12498-2.874025l-21.07975-21.075198c-.75909-.7346-1.81877-1.14945-2.87496-1.125h-21.91769c-.1245997-.012-.2498097-.01758-.3749997-.01758zm33.0044397.0068c-.10498 0-.20974.0084-.31347.02441-1.33122.4264-1.77919 2.452275-.75292 3.405273l12.04766 12.110393c1.11295 1.060849 3.329.153103 3.38764-1.387697v-12.110351c-.00012-1.05685-.95647-2.017428-2.00778-2.017577h-12.04669c-.10378-.016-.20946-.02441-.31444-.02441z" fill="url(#a)"/><path d="m10.000637 3.000051v57.999899h43.99937v-35.999899l-21.99965-22z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="64px" height="64px" viewBox="0 0 64 64" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 53.640625 28.480469 C 52.921875 27.761719 51.761719 27.761719 51.039062 28.480469 L 31.941406 47.578125 L 23.921875 39.601562 L 19.558594 43.960938 L 31.941406 56.339844 L 56.699219 31.578125 L 53.640625 28.5 Z M 53.640625 28.480469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 40.21875 51.921875 L 34.921875 56.398438 L 38.199219 56.398438 C 44.261719 56.398438 49.199219 51.460938 49.199219 45.398438 L 49.199219 44.398438 L 44.160156 48.71875 C 43.320312 50.238281 41.898438 51.398438 40.21875 51.921875 Z M 40.21875 51.921875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 15.660156 52.21875 L 15.660156 10.980469 L 45.019531 10.980469 L 45.019531 28.878906 L 49.199219 25.300781 L 49.199219 6.800781 L 11.5 6.800781 L 11.5 56.398438 L 26.339844 56.398438 L 22.820312 52.21875 Z M 15.660156 52.21875 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.339844 14.558594 L 36.480469 14.558594 C 37.792969 14.558594 38.859375 15.625 38.859375 16.941406 L 38.859375 17.261719 C 38.859375 18.574219 37.792969 19.640625 36.480469 19.640625 L 23.339844 19.640625 C 22.027344 19.640625 20.960938 18.574219 20.960938 17.261719 L 20.960938 16.941406 C 20.960938 15.625 22.027344 14.558594 23.339844 14.558594 Z M 23.339844 14.558594 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 23.519531 26.578125 L 36.859375 26.578125 C 38.121094 26.578125 39.140625 27.601562 39.140625 28.859375 L 39.140625 29.140625 C 39.140625 30.398438 38.121094 31.421875 36.859375 31.421875 L 23.519531 31.421875 C 22.261719 31.421875 21.238281 30.398438 21.238281 29.140625 L 21.238281 28.859375 C 21.238281 27.601562 22.261719 26.578125 23.519531 26.578125 Z M 23.519531 26.578125 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/hicolor/scalable/apps/main.png b/sysui/desktop/icons/hicolor/scalable/apps/main.png
index 37d91bfa2320..d1ca6f9865b7 100644
--- a/sysui/desktop/icons/hicolor/scalable/apps/main.png
+++ b/sysui/desktop/icons/hicolor/scalable/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/hicolor/scalable/apps/main.svg b/sysui/desktop/icons/hicolor/scalable/apps/main.svg
index 28215ee52ca5..7cfdad3fd177 100644
--- a/sysui/desktop/icons/hicolor/scalable/apps/main.svg
+++ b/sysui/desktop/icons/hicolor/scalable/apps/main.svg
@@ -1,83 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="128mm"
- preserveAspectRatio="xMidYMid"
- viewBox="0 0 12800 12800"
- width="128mm"
- version="1.1"
- id="svg1868"
- sodipodi:docname="main.svg"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round">
- <metadata
- id="metadata1874">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs1872" />
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="2880"
- inkscape:window-height="1721"
- id="namedview1870"
- showgrid="false"
- inkscape:zoom="1.19198"
- inkscape:cx="372.42041"
- inkscape:cy="253.74975"
- inkscape:window-x="2869"
- inkscape:window-y="-11"
- inkscape:window-maximized="1"
- inkscape:current-layer="g6082"
- inkscape:showpageshadow="false" />
- <g
- data-name="Ebene 4"
- id="Ebene_4"
- transform="matrix(99.215593,0,0,99.215593,82.797858,5424.8566)">
- <g
- id="g6082">
- <g
- id="g822"
- transform="matrix(1.718595,0,0,1.718595,0.6543779,-53.855609)">
- <rect
- style="fill:#971e29;stroke-width:28.78103447"
- y="-0.44744909"
- x="-0.78303587"
- width="74.901657"
- height="75.00676"
- id="rect2699" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6084"
- d="m 49.49,11.51 a 1.41,1.41 0 0 0 -1.3,0.83 1.38,1.38 0 0 0 0.3,1.49 l 11.72,11.76 a 1.43,1.43 0 0 0 1.5,0.31 1.38,1.38 0 0 0 0.85,-1.25 V 12.87 a 1.42,1.42 0 0 0 -1.37,-1.36 z" />
- <path
- style="fill:#ffffff"
- inkscape:connector-curvature="0"
- id="path6088"
- d="M 17.25,11.51 A 1.39,1.39 0 0 0 15.88,12.9 V 66.59 A 1.39,1.39 0 0 0 17.25,68 h 30.84 c 4.53,0 14.47,-9.74 14.47,-14.68 V 32 a 1.36,1.36 0 0 0 -0.4,-1 l -19,-19.09 a 1.43,1.43 0 0 0 -1,-0.43 z m 1.39,2.78 h 23 l 18.14,18.29 c 0,0 0,18.59 0,19.78 0,3.7 -8.53,12.83 -13,12.83 H 18.64 Z" />
- </g>
- </g>
- </g>
-</svg>
+<?xml version="1.0" encoding="UTF-8"?><svg id="Logos_Material" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs><style>.cls-1{fill:#e11e19;}.cls-2{clip-path:url(#clippath);}.cls-3{fill:none;}</style><clipPath id="clippath"><rect class="cls-3" x="206.65" y="209.85" width="174" height="38"/></clipPath></defs><g class="cls-2"><g><path class="cls-1" d="M27.39,14.82c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.68,26.54l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="8.4 26.69 8.4 6.07 23.08 6.07 23.08 15.02 25.17 13.23 25.17 3.98 6.32 3.98 6.32 28.77 13.74 28.77 11.98 26.69 8.4 26.69"/><rect class="cls-1" x="11.05" y="7.86" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="11.19" y="13.87" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></g><g><path class="cls-1" d="M26.82,14.24c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.11,25.96l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="7.83 26.11 7.83 5.49 22.51 5.49 22.51 14.44 24.6 12.65 24.6 3.4 5.75 3.4 5.75 28.2 13.17 28.2 11.41 26.11 7.83 26.11"/><rect class="cls-1" x="10.48" y="7.28" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="10.62" y="13.29" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></svg> \ No newline at end of file
diff --git a/sysui/desktop/icons/hicolor/scalable/apps/startcenter.svg b/sysui/desktop/icons/hicolor/scalable/apps/startcenter.svg
index 67f6899269c1..7cfdad3fd177 100644
--- a/sysui/desktop/icons/hicolor/scalable/apps/startcenter.svg
+++ b/sysui/desktop/icons/hicolor/scalable/apps/startcenter.svg
@@ -1,417 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- version="1.1"
- x="0px"
- y="0px"
- viewBox="0 0 128 128"
- xml:space="preserve"
- id="svg3336"
- inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
- sodipodi:docname="startcenter.svg"
- width="128"
- height="128"><metadata
- id="metadata3474"><rdf:RDF><cc:Work
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
- id="defs3472"><clipPath
- clipPathUnits="userSpaceOnUse"
- id="clipPath4978"><rect
- style="fill:#5fa243;fill-opacity:1"
- id="rect4980"
- width="113.625"
- height="79.875"
- x="72.875"
- y="50.125" /></clipPath><style
- id="style1078">
- .cls-1 {
- fill: #961e29;
- }
-
- .cls-2 {
- fill: #fff;
- }
- </style><style
- id="style943">
- .cls-1 {
- fill: #961e29;
- }
-
- .cls-2 {
- fill: #fff;
- }
- </style></defs><sodipodi:namedview
- pagecolor="#eff1f4"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="2880"
- inkscape:window-height="1721"
- id="namedview3470"
- showgrid="false"
- inkscape:zoom="7.9999999"
- inkscape:cx="104.3664"
- inkscape:cy="56.580491"
- inkscape:window-x="2869"
- inkscape:window-y="-11"
- inkscape:window-maximized="1"
- inkscape:current-layer="svg3336"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:showpageshadow="false" />
-<style
- type="text/css"
- id="style3338">
- .st0{display:none;}
- .st1{display:inline;}
- .st2{fill:#5FA243;}
- .st3{fill:#FFFFFF;}
- .st4{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;}
- .st5{fill:#C12521;}
- .st6{clip-path:url(#SVGID_2_);fill:#FFFFFF;}
- .st7{display:inline;fill:#5FA243;}
- .st8{display:inline;fill:#C12521;}
- .st9{display:inline;fill:#FFFFFF;}
- .st10{clip-path:url(#SVGID_4_);fill:#FFFFFF;}
- .st11{font-family:'CIBUnit';}
- .st12{font-size:17px;}
-</style>
-<g
- id="alte_version"
- class="st0"
- style="display:none"
- transform="translate(-52.877201,-55.941053)">
- <g
- class="st1"
- id="g3341"
- style="display:inline">
- <polygon
- class="st2"
- points="262,-250 262,-64 0,-64 0,-249.9 "
- id="polygon3343"
- style="fill:#5fa243" />
- </g>
- <g
- id="Libre_2_"
- class="st1"
- style="display:inline">
- <polyline
- class="st3"
- points="73.7,-207.5 73.7,-182.8 89.6,-182.8 89.6,-186.5 78.6,-186.5 78.6,-207.5 73.7,-207.5 "
- id="polyline3346"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 92.6,-182.8 h 4.9 v -17.8 h -4.9 v 17.8 m 2.4,-19.3 c 1.5,0 2.8,-1.2 2.8,-2.8 0,-1.5 -1.3,-2.8 -2.8,-2.8 -1.6,0 -2.8,1.3 -2.8,2.8 0,1.6 1.3,2.8 2.8,2.8"
- id="path3348"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 105.9,-198.5 v 0 L 105.8,-209 H 101 v 26.2 h 4.8 l 0.1,-2.1 h 0.1 c 1.5,1.7 3,2.4 5.6,2.4 4.7,0 7.8,-4.3 7.8,-9.6 0,-5.1 -2.8,-8.9 -7.6,-8.9 -2.7,0.1 -4.2,0.9 -5.9,2.5 m 0,6.4 c 0,-3.1 1.4,-5.1 4,-5.1 2.9,0 4.4,2.1 4.4,5.5 0,3.4 -1.4,5.5 -4.3,5.5 -2.5,0 -4.1,-2 -4.1,-5.1 v -0.8"
- id="path3350"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 132.4,-200.9 c -2.3,0.1 -4.5,1.6 -5.6,3.5 h -0.1 l -0.1,-3.2 h -4.8 v 17.8 h 4.9 v -6.7 c 0,-3.6 0.7,-4.8 1.8,-5.7 1,-0.7 2.1,-1 3.7,-1.1 l 0.2,-4.6"
- id="path3352"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 150.3,-192.7 c 0,-4.4 -2.7,-8.2 -7.3,-8.2 -5.6,0 -9.2,3.9 -9.2,9.7 0,5.7 3.7,8.8 9.2,8.8 2.6,0 4.4,-0.4 6.1,-1.2 l -0.5,-3.6 c -1.6,0.7 -3.2,1.1 -5,1.1 -2.9,0 -4.8,-1.3 -5,-4.1 h 11.5 c 0.1,-0.7 0.2,-1.7 0.2,-2.5 m -7.9,-4.5 c 2.1,0 3.1,1.7 3.2,3.5 h -6.9 c 0.4,-2 1.8,-3.5 3.7,-3.5"
- id="path3354"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 165,-207.8 c -6.5,0 -11.9,4.8 -11.9,12.7 0,7.9 5.4,12.7 11.9,12.7 6.5,0 11.9,-4.8 11.9,-12.7 0.1,-8 -5.3,-12.7 -11.9,-12.7 m 0,2.4 c 4.9,0 8.6,3.6 8.6,10.2 0,6.6 -3.7,10.2 -8.6,10.2 -4.9,0 -8.6,-3.6 -8.6,-10.2 0.1,-6.5 3.8,-10.2 8.6,-10.2"
- id="path3356"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 181.6,-201.5 v 1.1 h -2.9 v 2.3 h 2.9 v 15.3 h 3 v -15.3 h 4.5 v -2.3 h -4.5 v -1.6 c 0,-3.2 1.3,-5 3.8,-5 1.1,0 1.9,0.2 2.5,0.4 l 0.3,-2.3 c -0.7,-0.3 -1.9,-0.5 -2.9,-0.5 -4.2,0 -6.7,2.8 -6.7,7.9"
- id="path3358"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 191.7,-201.5 v 1.1 h -2.9 v 2.3 h 2.9 v 15.3 h 3 v -15.3 h 4.5 v -2.3 h -4.5 v -1.6 c 0,-3.2 1.3,-5 3.8,-5 1.1,0 1.9,0.2 2.5,0.4 l 0.3,-2.3 c -0.7,-0.3 -1.9,-0.5 -2.9,-0.5 -4.2,0 -6.7,2.8 -6.7,7.9"
- id="path3360"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 202.8,-182.8 h 3 v -17.6 h -3 v 17.6 m 1.5,-20.2 c 1.1,0 1.9,-0.8 1.9,-1.9 0,-1.1 -0.8,-1.9 -1.9,-1.9 -1.1,0 -1.9,0.8 -1.9,1.9 0.1,1.1 0.9,1.9 1.9,1.9"
- id="path3362"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 212.2,-191.7 c 0,-4.4 2.7,-6.8 6.1,-6.8 1.8,0 3.4,0.4 4.7,1.1 l 0.3,-2.3 c -1.1,-0.5 -2.8,-1.1 -4.8,-1.1 -5.4,0 -9.5,3.3 -9.5,9.5 0,5.8 3.7,8.9 8.6,8.9 2.2,0 3.7,-0.3 5.5,-1 l -0.3,-2.3 c -1.5,0.7 -3.2,1 -4.7,1 -3.5,0 -5.9,-2.3 -5.9,-7"
- id="path3364"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st3"
- d="m 240.5,-190.9 c 0.1,-0.7 0.1,-1.2 0.1,-1.8 0,-4.5 -2.4,-8.1 -6.9,-8.1 -4.9,0 -8.5,4.1 -8.5,9.5 0,6 3.6,8.9 8.5,8.9 2.2,0 3.8,-0.3 5.5,-1 l -0.3,-2.3 c -1.3,0.7 -3.3,1 -4.8,1 -3.5,0 -5.8,-2.2 -5.9,-6.2 h 12.3 m -7,-7.5 c 2.7,0 4.1,2.2 4.1,5.1 h -9.2 c 0.5,-3.1 2.2,-5.1 5.1,-5.1"
- id="path3366"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st4"
- d="m 47.3,-224.2 c -0.4,0 -0.8,0.2 -1,0.6 -0.2,0.4 -0.1,0.8 0.2,1.1 l 8.7,8.8 c 0.3,0.3 0.7,0.4 1.1,0.2 0.4,-0.2 0.6,-0.5 0.6,-0.9 v -8.8 c 0,-0.5 -0.5,-1 -1,-1 z m 0,0"
- id="path3368"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd" />
- <path
- class="st4"
- d="m 23.4,-224.2 c -0.5,0 -1,0.5 -1,1 v 39.9 c 0,0.5 0.5,1 1,1 H 56 c 0.5,0 1,-0.5 1,-1 V -209 c 0,-0.3 -0.1,-0.5 -0.3,-0.7 l -14.1,-14.2 c -0.2,-0.2 -0.5,-0.3 -0.7,-0.3 z m 1,2.1 h 17.1 l 13.5,13.6 v 24.3 H 24.4 Z m 0,0"
- id="path3370"
- inkscape:connector-curvature="0"
- style="clip-rule:evenodd;fill:#ffffff;fill-rule:evenodd" />
- </g>
- <g
- class="st1"
- id="g3372"
- style="display:inline">
- <path
- class="st5"
- d="M 0,-103.5 0.1,-64 H 262 v -112 c -82,46.9 -180.2,-13.4 -262,72.5 z"
- id="path3374"
- inkscape:connector-curvature="0"
- style="fill:#c12521" />
- </g>
- <g
- class="st1"
- id="g3376"
- style="display:inline">
- <path
- class="st3"
- d="m 313.7,-253 c 0,0 -0.3,1.4 -1,4.1 -0.6,2.7 -1.7,6.6 -3.2,11.5 -1.6,4.9 -3.6,10.8 -6.6,17.4 -3,6.6 -6.9,13.8 -12.1,21 -0.7,0.9 -1.3,1.8 -2,2.7 -0.7,0.9 -1.5,1.8 -2.2,2.7 -0.4,0.4 -0.7,0.9 -1.1,1.4 -0.4,0.4 -0.8,0.9 -1.2,1.3 -0.8,0.9 -1.6,1.8 -2.4,2.6 -0.8,0.9 -1.7,1.7 -2.6,2.6 -0.4,0.4 -0.9,0.9 -1.3,1.3 -0.4,0.4 -0.9,0.8 -1.4,1.2 -0.9,0.8 -1.9,1.6 -2.9,2.5 -1,0.8 -2,1.5 -3,2.3 -4.1,3 -8.6,5.9 -13.4,8.3 -4.8,2.4 -9.9,4.6 -15.2,6.3 -10.6,3.5 -22,5.7 -33.5,7 -11.6,1.4 -23.3,1.8 -35.1,2.1 -11.7,0.2 -23.4,0.5 -35,0.7 -11.5,0.3 -22.8,0.9 -33.7,2.1 -10.9,1.1 -21.3,3 -31,5.4 -9.7,2.5 -18.6,5.6 -26.6,9.2 -8,3.6 -14.9,7.6 -20.8,11.6 -1.5,0.9 -2.9,2 -4.2,3 -0.7,0.5 -1.3,1 -2,1.4 -0.6,0.5 -1.2,1 -1.8,1.5 -1.2,0.9 -2.4,1.8 -3.5,2.7 -1.1,0.9 -2.1,1.8 -3.1,2.6 -2,1.6 -3.6,3.2 -5.1,4.6 -1.5,1.3 -2.7,2.5 -3.6,3.5 -2,1.9 -3,3 -3,3 0,0 1,-1.1 2.8,-3.2 0.9,-1 2,-2.3 3.4,-3.7 1.4,-1.4 3,-3.1 4.9,-4.8 3.7,-3.6 8.5,-7.6 14.4,-11.7 5.8,-4.2 12.8,-8.4 20.8,-12.1 8,-3.8 17,-7.1 26.8,-9.8 9.8,-2.6 20.3,-4.6 31.3,-6 11,-1.4 22.3,-2.1 33.9,-2.6 11.6,-0.5 23.3,-0.7 35,-1.1 11.7,-0.4 23.4,-1 34.7,-2.3 11.4,-1.3 22.4,-3.5 32.7,-6.8 10.2,-3.5 19.6,-8.2 27.6,-14 1,-0.7 2,-1.5 2.9,-2.2 0.9,-0.8 1.9,-1.6 2.8,-2.3 0.9,-0.8 1.8,-1.6 2.7,-2.4 0.9,-0.8 1.7,-1.6 2.6,-2.4 0.8,-0.8 1.6,-1.7 2.4,-2.5 0.4,-0.4 0.8,-0.8 1.2,-1.2 0.4,-0.4 0.7,-0.9 1.1,-1.3 0.7,-0.9 1.5,-1.7 2.2,-2.5 0.7,-0.8 1.4,-1.7 2,-2.6 5.3,-6.8 9.4,-13.8 12.6,-20 3.3,-6.3 5.6,-12 7.5,-16.8 0.9,-2.4 1.7,-4.5 2.4,-6.4 0.4,-0.9 0.6,-1.8 0.9,-2.6 0.3,-0.8 0.5,-1.5 0.7,-2.2 0.8,-2.7 1.3,-4.1 1.3,-4.1 z"
- id="path3378"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <g
- class="st1"
- id="g3380"
- style="display:inline">
- <path
- class="st3"
- d="m 185.1,-89.2 c 0,1.9 -2.3,4 -4.2,4 -1.2,0 -3.4,0 -3.4,0 v -33.6 h 7.6 z"
- id="path3382"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <g
- id="g3384">
- <defs
- id="defs3386">
- <rect
- id="SVGID_1_"
- x="147.60001"
- y="-126.7"
- width="92.699997"
- height="42" />
- </defs>
- <clipPath
- id="SVGID_2_">
- <use
- xlink:href="#SVGID_1_"
- style="overflow:visible"
- id="use3390"
- x="0"
- y="0"
- width="100%"
- height="100%" />
- </clipPath>
- <path
- class="st6"
- d="m 207.1,-108.8 c 0,-1.3 -0.3,-2.3 -0.9,-2.8 -0.6,-0.5 -1.7,-0.8 -3.1,-0.8 H 197 v 7.3 h 6.3 c 1.3,0 2.3,-0.3 2.9,-0.9 0.6,-0.5 0.9,-1.5 0.9,-2.8 z m 0.8,13.3 c 0,-1.4 -0.3,-2.4 -1,-3.1 -0.7,-0.6 -1.8,-0.9 -3.5,-0.9 h -6.5 v 8.1 h 6.7 c 0,0 2.6,-0.3 3.3,-0.9 0.7,-0.5 1,-1.6 1,-3.2 z m -14.3,-23.3 c 0.8,0 9.7,0 9.7,0 3.7,0 6.4,0.8 8.2,2.3 1.8,1.5 2.7,3.6 2.7,6.3 0,1.9 -0.4,3.4 -1.2,4.6 -0.8,1.2 -1.9,2.1 -3.2,2.6 v 0.1 c 3.8,1 5.7,3.7 5.7,7.9 0,1.5 -0.2,2.9 -0.7,4.1 -0.5,1.2 -1.2,2.2 -2.1,3.1 -1,0.9 -2.2,1.5 -3.7,1.9 -1.5,0.4 -3.3,0.7 -5.4,0.7 h -13.8 c 0,0 0,-29.6 0,-29.6 -0.1,-1.5 2.2,-4 3.8,-4 z"
- id="path3392"
- clip-path="url(#SVGID_2_)"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- <path
- class="st6"
- d="m 167.1,-112.3 c -9.3,-1.4 -11.6,1.8 -11.6,10.3 0,8.2 2.3,11.3 12.4,10.3 3.2,-0.3 3.9,0.7 4.5,5.6 -1.1,0.6 -5.9,1.4 -9.3,1.3 -5.1,-0.2 -9.3,-1.4 -11.7,-4.3 -2.5,-2.8 -3.7,-7.2 -3.7,-13.2 0,-12 5.4,-17 15.9,-17 5.1,0 8.6,1.5 8.6,1.5 -1,5.6 -1.9,6 -5.1,5.5 z"
- id="path3394"
- clip-path="url(#SVGID_2_)"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <path
- class="st3"
- d="m 234.5,-99.5 c 2.5,0 6.2,-4 6.2,-6.1 0,0 0,-21 0,-21 h -19.3 v 27.2 h 13.1 z"
- id="path3396"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" />
- </g>
- <text
- transform="translate(20.9652,-84.5756)"
- class="st9 st11 st12"
- id="text3398"
- style="font-size:17px;line-height:0%;font-family:CIBUnit;display:inline;fill:#ffffff">powered by</text>
-
-
-
-
-
-
-</g>
-
-<g
- data-name="doXigate Arbeitsunterlagen"
- id="doXigate_Arbeitsunterlagen"
- transform="matrix(0.76734924,0,0,0.76734924,0.52757444,49.804039)"><g
- id="g995"><path
- id="path949"
- d="M 53.008,20.047 H 43 V 3.242 h 3.785 v 13.735 h 6.223 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path951"
- d="m 56.781,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.8,1.8 0 0 1 -0.6,-1.365 1.733,1.733 0 0 1 0.6,-1.36 2.508,2.508 0 0 1 3.076,0 1.737,1.737 0 0 1 0.592,1.36 1.783,1.783 0 0 1 -0.592,1.382 2.2,2.2 0 0 1 -1.541,0.539 z m 1.828,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path953"
- d="M 65.477,18.652 H 65.43 v 1.395 h -3.7 V 2.281 h 3.7 v 7.571 h 0.047 a 4.392,4.392 0 0 1 3.9,-2.1 4.28,4.28 0 0 1 3.574,1.594 6.87,6.87 0 0 1 1.254,4.359 7.437,7.437 0 0 1 -1.465,4.816 4.771,4.771 0 0 1 -3.914,1.817 3.78,3.78 0 0 1 -3.349,-1.686 z M 65.371,13.59 v 1.23 a 2.81,2.81 0 0 0 0.668,1.922 2.173,2.173 0 0 0 1.711,0.762 2.269,2.269 0 0 0 1.963,-0.979 4.722,4.722 0 0 0 0.7,-2.771 3.763,3.763 0 0 0 -0.638,-2.326 2.156,2.156 0 0 0 -1.823,-0.838 2.352,2.352 0 0 0 -1.845,0.832 3.157,3.157 0 0 0 -0.736,2.168 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path955"
- d="m 84.438,11.387 a 3.217,3.217 0 0 0 -1.559,-0.364 2.245,2.245 0 0 0 -1.887,0.885 3.861,3.861 0 0 0 -0.679,2.408 v 5.731 h -3.7 v -12 h 3.7 v 2.226 h 0.046 a 3.2,3.2 0 0 1 3.164,-2.437 2.384,2.384 0 0 1 0.915,0.141 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path957"
- d="M 96.848,15.1 H 89.02 q 0.188,2.613 3.293,2.613 a 6.428,6.428 0 0 0 3.48,-0.938 v 2.672 a 9.139,9.139 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.6,-4.495 6.422,6.422 0 0 1 1.729,-4.732 5.778,5.778 0 0 1 4.266,-1.746 5.24,5.24 0 0 1 4.06,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 A 1.992,1.992 0 0 0 89.787,10.986 3.361,3.361 0 0 0 89,12.828 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path959"
- d="m 106.516,20.34 a 7.819,7.819 0 0 1 -5.883,-2.35 8.433,8.433 0 0 1 -2.274,-6.123 9.04,9.04 0 0 1 2.309,-6.445 7.991,7.991 0 0 1 6.117,-2.461 7.63,7.63 0 0 1 5.815,2.355 8.688,8.688 0 0 1 2.22,6.211 8.894,8.894 0 0 1 -2.3,6.387 7.907,7.907 0 0 1 -6.004,2.426 z M 106.68,6.219 a 3.81,3.81 0 0 0 -3.164,1.494 6.224,6.224 0 0 0 -1.172,3.955 6.111,6.111 0 0 0 1.172,3.949 4.044,4.044 0 0 0 6.175,0.041 6.045,6.045 0 0 0 1.149,-3.92 6.555,6.555 0 0 0 -1.113,-4.066 3.63,3.63 0 0 0 -3.047,-1.453 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path961"
- d="m 125.078,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.78,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.692 v -9.27 h -2.015 v -2.73 h 2.015 V 6.559 a 4.322,4.322 0 0 1 1.336,-3.3 5.1,5.1 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path963"
- d="m 134.277,5.117 a 3.746,3.746 0 0 0 -1.371,-0.281 q -1.781,0 -1.781,1.934 v 1.277 h 2.742 v 2.73 h -2.742 v 9.27 h -3.691 v -9.27 h -2.016 v -2.73 h 2.016 V 6.559 a 4.319,4.319 0 0 1 1.336,-3.3 5.092,5.092 0 0 1 3.63,-1.259 6.389,6.389 0 0 1 1.875,0.234 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path965"
- d="m 137.523,6.148 a 2.163,2.163 0 0 1 -1.535,-0.556 1.794,1.794 0 0 1 -0.6,-1.365 1.732,1.732 0 0 1 0.6,-1.36 2.509,2.509 0 0 1 3.077,0 1.74,1.74 0 0 1 0.591,1.36 1.786,1.786 0 0 1 -0.591,1.382 2.2,2.2 0 0 1 -1.542,0.539 z m 1.829,13.9 h -3.7 v -12 h 3.7 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path967"
- d="m 151.563,19.613 a 7.316,7.316 0 0 1 -3.622,0.727 6.124,6.124 0 0 1 -4.476,-1.676 5.785,5.785 0 0 1 -1.711,-4.324 6.373,6.373 0 0 1 1.834,-4.822 6.775,6.775 0 0 1 4.9,-1.764 6.3,6.3 0 0 1 3.071,0.562 v 3.141 a 4.224,4.224 0 0 0 -2.59,-0.867 3.41,3.41 0 0 0 -2.526,0.932 3.475,3.475 0 0 0 -0.931,2.572 3.424,3.424 0 0 0 0.89,2.5 3.275,3.275 0 0 0 2.449,0.908 4.891,4.891 0 0 0 2.708,-0.867 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path969"
- d="m 164.77,15.1 h -7.829 q 0.188,2.613 3.293,2.613 a 6.429,6.429 0 0 0 3.481,-0.938 v 2.672 a 9.142,9.142 0 0 1 -4.324,0.891 6.087,6.087 0 0 1 -4.512,-1.611 6.092,6.092 0 0 1 -1.606,-4.495 6.422,6.422 0 0 1 1.735,-4.732 5.777,5.777 0 0 1 4.265,-1.746 5.242,5.242 0 0 1 4.061,1.559 6,6 0 0 1 1.436,4.23 z m -3.434,-2.274 q 0,-2.578 -2.086,-2.578 a 1.992,1.992 0 0 0 -1.541,0.738 3.354,3.354 0 0 0 -0.791,1.84 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path971"
- d="m 44.62,32.412 v 3.555 H 43 v -9.8 h 2.974 a 3.938,3.938 0 0 1 2.618,0.786 2.743,2.743 0 0 1 0.93,2.215 3.061,3.061 0 0 1 -0.971,2.338 3.689,3.689 0 0 1 -2.625,0.909 z m 0,-4.908 v 3.582 h 1.053 a 2.333,2.333 0 0 0 1.593,-0.485 1.737,1.737 0 0 0 0.547,-1.368 q 0,-1.73 -2.01,-1.729 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path973"
- d="M 56.272,36.131 A 4.41,4.41 0 0 1 52.878,34.757 5.046,5.046 0 0 1 51.6,31.182 5.348,5.348 0 0 1 52.9,27.408 4.568,4.568 0 0 1 56.43,26 a 4.31,4.31 0 0 1 3.325,1.367 5.06,5.06 0 0 1 1.262,3.575 5.364,5.364 0 0 1 -1.292,3.794 4.481,4.481 0 0 1 -3.453,1.395 z m 0.076,-8.7 a 2.727,2.727 0 0 0 -2.191,1.005 3.973,3.973 0 0 0 -0.844,2.645 4.013,4.013 0 0 0 0.82,2.632 2.647,2.647 0 0 0 2.146,1 2.77,2.77 0 0 0 2.222,-0.95 3.967,3.967 0 0 0 0.814,-2.659 4.146,4.146 0 0 0 -0.791,-2.714 2.667,2.667 0 0 0 -2.176,-0.961 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path975"
- d="m 76.025,26.164 -2.686,9.8 H 71.5 L 69.634,29.11 A 4.77,4.77 0 0 1 69.49,28.153 h -0.027 a 4.639,4.639 0 0 1 -0.164,0.944 l -1.873,6.87 h -1.88 l -2.741,-9.8 h 1.784 l 1.777,7.178 a 5.2,5.2 0 0 1 0.137,0.943 h 0.034 a 5.373,5.373 0 0 1 0.192,-0.943 l 2.009,-7.178 h 1.675 l 1.859,7.233 a 5.635,5.635 0 0 1 0.144,0.875 h 0.027 a 5.445,5.445 0 0 1 0.158,-0.9 l 1.743,-7.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path977"
- d="m 83.94,35.967 h -5.5 v -9.8 h 5.285 v 1.381 h -3.661 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 h 3.876 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path979"
- d="m 94.307,35.967 h -1.9 l -1.565,-2.625 a 5.813,5.813 0 0 0 -0.414,-0.619 2.488,2.488 0 0 0 -0.41,-0.42 1.349,1.349 0 0 0 -0.454,-0.239 1.9,1.9 0 0 0 -0.554,-0.076 h -0.656 v 3.979 h -1.622 v -9.8 h 3.227 a 4.678,4.678 0 0 1 1.271,0.164 2.962,2.962 0 0 1 1.012,0.5 2.3,2.3 0 0 1 0.673,0.826 2.608,2.608 0 0 1 0.243,1.16 2.883,2.883 0 0 1 -0.153,0.954 2.492,2.492 0 0 1 -0.438,0.771 2.661,2.661 0 0 1 -0.683,0.578 3.4,3.4 0 0 1 -0.9,0.369 v 0.028 a 2.489,2.489 0 0 1 0.465,0.332 c 0.132,0.12 0.258,0.244 0.376,0.372 a 4.53,4.53 0 0 1 0.352,0.434 c 0.117,0.162 0.245,0.35 0.387,0.564 z m -5.954,-8.484 v 3.186 h 1.353 a 2,2 0 0 0 0.693,-0.116 1.587,1.587 0 0 0 0.551,-0.335 1.52,1.52 0 0 0 0.363,-0.533 1.843,1.843 0 0 0 0.129,-0.7 A 1.4,1.4 0 0 0 91,27.88 1.856,1.856 0 0 0 89.722,27.48 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path981"
- d="m 102,35.967 h -5.5 v -9.8 h 5.284 v 1.381 h -3.659 v 2.772 h 3.37 v 1.374 h -3.37 v 2.9 H 102 Z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path983"
- d="m 104.794,35.967 v -9.8 h 2.83 q 5.421,0 5.421,4.778 a 4.711,4.711 0 0 1 -1.5,3.648 5.741,5.741 0 0 1 -4.033,1.377 z m 1.62,-8.422 v 7.048 h 1.3 a 3.636,3.636 0 0 0 2.67,-0.944 3.583,3.583 0 0 0 0.953,-2.666 q 0,-3.438 -3.562,-3.438 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path985"
- d="m 120.785,35.967 v -9.8 h 3.115 a 3.665,3.665 0 0 1 2.251,0.622 1.932,1.932 0 0 1 0.832,1.62 2.32,2.32 0 0 1 -0.472,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.275,2.275 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.93,3.93 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.482,-1.131 q 0,-1.259 -1.682,-1.258 z m 0,4.1 v 3.1 h 1.388 a 2.119,2.119 0 0 0 1.4,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path987"
- d="m 136.717,26.164 -3.217,6.241 v 3.562 h -1.627 V 32.44 l -3.131,-6.276 h 1.858 l 1.927,4.2 q 0.034,0.075 0.2,0.568 h 0.021 a 3.839,3.839 0 0 1 0.226,-0.568 l 2.016,-4.2 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path989"
- d="m 150.752,35.557 a 5.938,5.938 0 0 1 -2.755,0.574 4.5,4.5 0 0 1 -3.418,-1.347 4.909,4.909 0 0 1 -1.285,-3.534 5.15,5.15 0 0 1 1.445,-3.8 4.951,4.951 0 0 1 3.655,-1.45 6,6 0 0 1 2.358,0.4 v 1.614 a 4.208,4.208 0 0 0 -2.187,-0.588 3.442,3.442 0 0 0 -2.582,1.018 3.744,3.744 0 0 0 -0.983,2.724 3.567,3.567 0 0 0 0.923,2.58 3.209,3.209 0 0 0 2.427,0.961 4.348,4.348 0 0 0 2.406,-0.656 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path991"
- d="m 155.329,35.967 h -1.675 v -9.8 h 1.675 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /><path
- id="path993"
- d="m 158.793,35.967 v -9.8 h 3.11 a 3.667,3.667 0 0 1 2.252,0.622 1.931,1.931 0 0 1 0.831,1.62 2.32,2.32 0 0 1 -0.471,1.45 2.548,2.548 0 0 1 -1.306,0.875 v 0.027 a 2.552,2.552 0 0 1 1.616,0.748 2.279,2.279 0 0 1 0.606,1.644 2.47,2.47 0 0 1 -0.991,2.038 3.932,3.932 0 0 1 -2.5,0.779 z m 1.62,-8.5 v 2.789 h 1.053 a 2.028,2.028 0 0 0 1.33,-0.4 1.392,1.392 0 0 0 0.481,-1.131 q 0,-1.259 -1.681,-1.258 z m 0,4.1 v 3.1 h 1.387 a 2.119,2.119 0 0 0 1.405,-0.42 1.441,1.441 0 0 0 0.5,-1.159 q 0,-1.525 -2.112,-1.524 z"
- class="cls-1"
- inkscape:connector-curvature="0"
- style="fill:#961e29" /></g><rect
- id="rect997"
- height="37"
- width="37"
- class="cls-1"
- x="0"
- y="0"
- style="fill:#961e29" /><g
- id="g1001"><path
- d="m 23.59,4.5 a 0.7,0.7 0 0 0 -0.643,0.409 0.68,0.68 0 0 0 0.149,0.74 l 5.814,5.833 a 0.7,0.7 0 0 0 0.74,0.151 0.688,0.688 0 0 0 0.425,-0.617 V 5.172 A 0.7,0.7 0 0 0 29.393,4.5 Z"
- class="cls-2"
- id="path6084"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /><path
- d="M 7.6,4.5 A 0.689,0.689 0 0 0 6.921,5.19 V 31.81 A 0.688,0.688 0 0 0 7.6,32.5 l 15.3,-0.008 c 2.249,0.008 7.18,-4.832 7.18,-7.278 V 14.668 a 0.691,0.691 0 0 0 -0.2,-0.49 L 20.452,4.711 A 0.689,0.689 0 0 0 19.963,4.5 Z m 0.689,1.379 h 11.385 l 9.026,9.067 c 0,0 0,9.218 0,9.809 0,1.835 -4.229,6.366 -6.45,6.366 H 8.293 Z"
- class="cls-2"
- id="path6088"
- inkscape:connector-curvature="0"
- style="fill:#ffffff" /></g></g></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><svg id="Logos_Material" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32"><defs><style>.cls-1{fill:#e11e19;}.cls-2{clip-path:url(#clippath);}.cls-3{fill:none;}</style><clipPath id="clippath"><rect class="cls-3" x="206.65" y="209.85" width="174" height="38"/></clipPath></defs><g class="cls-2"><g><path class="cls-1" d="M27.39,14.82c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.68,26.54l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="8.4 26.69 8.4 6.07 23.08 6.07 23.08 15.02 25.17 13.23 25.17 3.98 6.32 3.98 6.32 28.77 13.74 28.77 11.98 26.69 8.4 26.69"/><rect class="cls-1" x="11.05" y="7.86" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="11.19" y="13.87" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></g><g><path class="cls-1" d="M26.82,14.24c-.36-.36-.94-.36-1.3,0l-9.55,9.55-4.01-3.99-2.18,2.18,6.19,6.19,12.38-12.38-1.53-1.54Z"/><path class="cls-1" d="M20.11,25.96l-2.65,2.24h1.64c3.03,0,5.5-2.47,5.5-5.5v-.5l-2.52,2.16c-.42,.76-1.13,1.34-1.97,1.6Z"/><polygon class="cls-1" points="7.83 26.11 7.83 5.49 22.51 5.49 22.51 14.44 24.6 12.65 24.6 3.4 5.75 3.4 5.75 28.2 13.17 28.2 11.41 26.11 7.83 26.11"/><rect class="cls-1" x="10.48" y="7.28" width="8.95" height="2.54" rx="1.19" ry="1.19"/><rect class="cls-1" x="10.62" y="13.29" width="8.95" height="2.42" rx="1.14" ry="1.14"/></g></svg> \ No newline at end of file
diff --git a/sysui/desktop/icons/locolor/16x16/apps/main.png b/sysui/desktop/icons/locolor/16x16/apps/main.png
index 10b10d7e3491..e58c486aae72 100644
--- a/sysui/desktop/icons/locolor/16x16/apps/main.png
+++ b/sysui/desktop/icons/locolor/16x16/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/16x16/apps/main.svg b/sysui/desktop/icons/locolor/16x16/apps/main.svg
index aabbb60e0122..fd5b7b322a81 100644
--- a/sysui/desktop/icons/locolor/16x16/apps/main.svg
+++ b/sysui/desktop/icons/locolor/16x16/apps/main.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1.8125.00586c-.458392.0875-.82072.53358-.8125 1v13.99414c.00005.52339.47643.99995 1 1h12c .52357-.00005.99995-.47661 1-1v-7.99609c.006-.26396-.0975-.52904-.28125-.71875l-5-5.99805c-.189776-.18363-.454695-.28737-.71875-.28125h-7c-.0623-.006-.125182-.006-.1875 0zm9.53125 0c-.331493.10559-.443055.60775-.1875.84375l3 2.99805c.277145.26269.82915.0378.84375-.34375v-2.99805c-.00003-.26169-.238215-.49997-.5-.5h-3c-.0517-.008-.104591-.008-.15625 0z" fill="#808080"/><path d="m2 1v14h12v-8l-5-6z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/locolor/16x16/apps/startcenter.png b/sysui/desktop/icons/locolor/16x16/apps/startcenter.png
index 10b10d7e3491..9740e9312a57 100644
--- a/sysui/desktop/icons/locolor/16x16/apps/startcenter.png
+++ b/sysui/desktop/icons/locolor/16x16/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/16x16/apps/startcenter.svg b/sysui/desktop/icons/locolor/16x16/apps/startcenter.svg
index aabbb60e0122..fd5b7b322a81 100644
--- a/sysui/desktop/icons/locolor/16x16/apps/startcenter.svg
+++ b/sysui/desktop/icons/locolor/16x16/apps/startcenter.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m1.8125.00586c-.458392.0875-.82072.53358-.8125 1v13.99414c.00005.52339.47643.99995 1 1h12c .52357-.00005.99995-.47661 1-1v-7.99609c.006-.26396-.0975-.52904-.28125-.71875l-5-5.99805c-.189776-.18363-.454695-.28737-.71875-.28125h-7c-.0623-.006-.125182-.006-.1875 0zm9.53125 0c-.331493.10559-.443055.60775-.1875.84375l3 2.99805c.277145.26269.82915.0378.84375-.34375v-2.99805c-.00003-.26169-.238215-.49997-.5-.5h-3c-.0517-.008-.104591-.008-.15625 0z" fill="#808080"/><path d="m2 1v14h12v-8l-5-6z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.png b/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.png
index ac227f6e9d72..e58c486aae72 100644
--- a/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.svg b/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.svg
index 63c8d7294edc..fd5b7b322a81 100644
--- a/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/locolor/16x16/mimetypes/oasis-empty.svg
@@ -1 +1,10 @@
-<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m2.8125.00585938c-.458392.0875-.82072.53358-.8125 1.00000002v13.9941406c.00005.52339.47643.99995 1 1h10c .52357-.00005.99995-.47661 1-1v-7.9960938c.006-.2639599-.0975-.52904-.28125-.71875l-5-5.99804682c-.189776-.18363-.454695-.28737001-.71875-.28125h-5c-.0623-.006-.125182-.006-.1875 0zm7.53125 0c-.331493.10559-.4430551.60775-.1875.84375l3 2.99804682c.277145.26269.82915.0378.84375-.34375v-2.99804682c-.00003-.26169-.238215-.49997-.5-.5h-3c-.0517-.00800001-.104591-.00800001-.15625 0zm-7.34375.99414062h5l5 6v8h-10z" fill="#808080"/><path d="m3 .99995v14h10v-8l-5-6z" fill="#fff"/></svg> \ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 16 16" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 13.410156 7.121094 C 13.230469 6.941406 12.941406 6.941406 12.761719 7.121094 L 7.984375 11.894531 L 5.980469 9.898438 L 4.890625 10.988281 L 7.984375 14.085938 L 14.175781 7.894531 L 13.410156 7.125 Z M 13.410156 7.121094 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 10.054688 12.980469 L 8.730469 14.101562 L 9.550781 14.101562 C 11.066406 14.101562 12.300781 12.863281 12.300781 11.351562 L 12.300781 11.101562 L 11.039062 12.179688 C 10.828125 12.558594 10.476562 12.851562 10.054688 12.980469 Z M 10.054688 12.980469 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 3.914062 13.054688 L 3.914062 2.746094 L 11.253906 2.746094 L 11.253906 7.21875 L 12.300781 6.324219 L 12.300781 1.699219 L 2.875 1.699219 L 2.875 14.101562 L 6.585938 14.101562 L 5.703125 13.054688 Z M 3.914062 13.054688 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.835938 3.640625 L 9.121094 3.640625 C 9.449219 3.640625 9.714844 3.90625 9.714844 4.234375 L 9.714844 4.316406 C 9.714844 4.644531 9.449219 4.910156 9.121094 4.910156 L 5.835938 4.910156 C 5.507812 4.910156 5.238281 4.644531 5.238281 4.316406 L 5.238281 4.234375 C 5.238281 3.90625 5.507812 3.640625 5.835938 3.640625 Z M 5.835938 3.640625 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 5.878906 6.644531 L 9.214844 6.644531 C 9.53125 6.644531 9.785156 6.898438 9.785156 7.214844 L 9.785156 7.285156 C 9.785156 7.601562 9.53125 7.855469 9.214844 7.855469 L 5.878906 7.855469 C 5.566406 7.855469 5.308594 7.601562 5.308594 7.285156 L 5.308594 7.214844 C 5.308594 6.898438 5.566406 6.644531 5.878906 6.644531 Z M 5.878906 6.644531 "/>
+</g>
+</svg>
diff --git a/sysui/desktop/icons/locolor/32x32/apps/main.png b/sysui/desktop/icons/locolor/32x32/apps/main.png
index a2617607e6e3..6b9b3fe25c7f 100644
--- a/sysui/desktop/icons/locolor/32x32/apps/main.png
+++ b/sysui/desktop/icons/locolor/32x32/apps/main.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/32x32/apps/main.svg b/sysui/desktop/icons/locolor/32x32/apps/main.svg
index 3ff9c3d12ca8..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/locolor/32x32/apps/main.svg
+++ b/sysui/desktop/icons/locolor/32x32/apps/main.svg
@@ -1,9 +1,10 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
- <path
- style="fill:#808080"
- d="M 4.625 0.009765625 C 3.70823 0.18469763 2.98356 1.0748745 3 2.0078125 L 3 30 C 3.0001 31.04688 3.95288 31.9999 5 32 L 27 32 C 28.04712 31.9999 28.9999 31.04688 29 30 L 29 12.544922 C 29.012 12.016952 28.80499 11.488825 28.4375 11.109375 L 17.896484 0.57226562 C 17.516944 0.20496663 16.987094 -0.002470375 16.458984 0.009765625 L 5 0.009765625 C 4.8754 -0.002234375 4.74964 -0.002234375 4.625 0.009765625 z M 21.658203 0.015625 C 20.992593 0.228823 20.76811 1.242233 21.28125 1.71875 L 27.306641 7.7734375 C 27.863121 8.3038475 28.97068 7.8504381 29 7.0800781 L 29 1.0253906 C 28.99994 0.49697362 28.521764 0.015685 27.996094 0.015625 L 21.972656 0.015625 C 21.868856 -0.000365 21.761943 -0.000365 21.658203 0.015625 z M 5 2 L 16.5 2 L 27 12.5 L 27 30 L 5 30 L 5 2 z "
- />
- <path
- d="m5.0002743 2v28h21.9999997v-17.5l-10.5-10.5z"
- fill="#fff" />
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/locolor/32x32/apps/startcenter.png b/sysui/desktop/icons/locolor/32x32/apps/startcenter.png
index a2617607e6e3..1d9d606f0c40 100644
--- a/sysui/desktop/icons/locolor/32x32/apps/startcenter.png
+++ b/sysui/desktop/icons/locolor/32x32/apps/startcenter.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/32x32/apps/startcenter.svg b/sysui/desktop/icons/locolor/32x32/apps/startcenter.svg
index 3ff9c3d12ca8..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/locolor/32x32/apps/startcenter.svg
+++ b/sysui/desktop/icons/locolor/32x32/apps/startcenter.svg
@@ -1,9 +1,10 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
- <path
- style="fill:#808080"
- d="M 4.625 0.009765625 C 3.70823 0.18469763 2.98356 1.0748745 3 2.0078125 L 3 30 C 3.0001 31.04688 3.95288 31.9999 5 32 L 27 32 C 28.04712 31.9999 28.9999 31.04688 29 30 L 29 12.544922 C 29.012 12.016952 28.80499 11.488825 28.4375 11.109375 L 17.896484 0.57226562 C 17.516944 0.20496663 16.987094 -0.002470375 16.458984 0.009765625 L 5 0.009765625 C 4.8754 -0.002234375 4.74964 -0.002234375 4.625 0.009765625 z M 21.658203 0.015625 C 20.992593 0.228823 20.76811 1.242233 21.28125 1.71875 L 27.306641 7.7734375 C 27.863121 8.3038475 28.97068 7.8504381 29 7.0800781 L 29 1.0253906 C 28.99994 0.49697362 28.521764 0.015685 27.996094 0.015625 L 21.972656 0.015625 C 21.868856 -0.000365 21.761943 -0.000365 21.658203 0.015625 z M 5 2 L 16.5 2 L 27 12.5 L 27 30 L 5 30 L 5 2 z "
- />
- <path
- d="m5.0002743 2v28h21.9999997v-17.5l-10.5-10.5z"
- fill="#fff" />
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.png b/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.png
index 4fd59298ecba..6b9b3fe25c7f 100644
--- a/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.png
+++ b/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.png
Binary files differ
diff --git a/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.svg b/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.svg
index 3ff9c3d12ca8..b659ef2d9cc3 100644
--- a/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.svg
+++ b/sysui/desktop/icons/locolor/32x32/mimetypes/oasis-empty.svg
@@ -1,9 +1,10 @@
-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
- <path
- style="fill:#808080"
- d="M 4.625 0.009765625 C 3.70823 0.18469763 2.98356 1.0748745 3 2.0078125 L 3 30 C 3.0001 31.04688 3.95288 31.9999 5 32 L 27 32 C 28.04712 31.9999 28.9999 31.04688 29 30 L 29 12.544922 C 29.012 12.016952 28.80499 11.488825 28.4375 11.109375 L 17.896484 0.57226562 C 17.516944 0.20496663 16.987094 -0.002470375 16.458984 0.009765625 L 5 0.009765625 C 4.8754 -0.002234375 4.74964 -0.002234375 4.625 0.009765625 z M 21.658203 0.015625 C 20.992593 0.228823 20.76811 1.242233 21.28125 1.71875 L 27.306641 7.7734375 C 27.863121 8.3038475 28.97068 7.8504381 29 7.0800781 L 29 1.0253906 C 28.99994 0.49697362 28.521764 0.015685 27.996094 0.015625 L 21.972656 0.015625 C 21.868856 -0.000365 21.761943 -0.000365 21.658203 0.015625 z M 5 2 L 16.5 2 L 27 12.5 L 27 30 L 5 30 L 5 2 z "
- />
- <path
- d="m5.0002743 2v28h21.9999997v-17.5l-10.5-10.5z"
- fill="#fff" />
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32px" height="32px" viewBox="0 0 32 32" version="1.1">
+<g id="surface1">
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 26.820312 14.238281 C 26.460938 13.878906 25.878906 13.878906 25.519531 14.238281 L 15.96875 23.789062 L 11.960938 19.800781 L 9.78125 21.980469 L 15.96875 28.171875 L 28.351562 15.789062 L 26.820312 14.25 Z M 26.820312 14.238281 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 20.109375 25.960938 L 17.460938 28.199219 L 19.101562 28.199219 C 22.128906 28.199219 24.601562 25.730469 24.601562 22.699219 L 24.601562 22.199219 L 22.078125 24.359375 C 21.660156 25.121094 20.949219 25.699219 20.109375 25.960938 Z M 20.109375 25.960938 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 7.828125 26.109375 L 7.828125 5.488281 L 22.511719 5.488281 L 22.511719 14.441406 L 24.601562 12.648438 L 24.601562 3.398438 L 5.75 3.398438 L 5.75 28.199219 L 13.171875 28.199219 L 11.410156 26.109375 Z M 7.828125 26.109375 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.671875 7.28125 L 18.238281 7.28125 C 18.898438 7.28125 19.429688 7.8125 19.429688 8.46875 L 19.429688 8.628906 C 19.429688 9.289062 18.898438 9.820312 18.238281 9.820312 L 11.671875 9.820312 C 11.011719 9.820312 10.480469 9.289062 10.480469 8.628906 L 10.480469 8.46875 C 10.480469 7.8125 11.011719 7.28125 11.671875 7.28125 Z M 11.671875 7.28125 "/>
+<path style=" stroke:none;fill-rule:nonzero;fill:rgb(88.235295%,11.764706%,9.803922%);fill-opacity:1;" d="M 11.761719 13.289062 L 18.429688 13.289062 C 19.058594 13.289062 19.570312 13.800781 19.570312 14.429688 L 19.570312 14.570312 C 19.570312 15.199219 19.058594 15.710938 18.429688 15.710938 L 11.761719 15.710938 C 11.128906 15.710938 10.621094 15.199219 10.621094 14.570312 L 10.621094 14.429688 C 10.621094 13.800781 11.128906 13.289062 11.761719 13.289062 Z M 11.761719 13.289062 "/>
+</g>
</svg>
diff --git a/sysui/desktop/icons/oasis-empty-document.ico b/sysui/desktop/icons/oasis-empty-document.ico
index 56e1e4e00c99..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/oasis-empty-document.ico
+++ b/sysui/desktop/icons/oasis-empty-document.ico
Binary files differ
diff --git a/sysui/desktop/icons/oasis-empty-template.ico b/sysui/desktop/icons/oasis-empty-template.ico
index 56e1e4e00c99..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/oasis-empty-template.ico
+++ b/sysui/desktop/icons/oasis-empty-template.ico
Binary files differ
diff --git a/sysui/desktop/icons/open.ico b/sysui/desktop/icons/open.ico
index 56e1e4e00c99..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/open.ico
+++ b/sysui/desktop/icons/open.ico
Binary files differ
diff --git a/sysui/desktop/icons/soffice.ico b/sysui/desktop/icons/soffice.ico
index 1f2319cb569c..3b8c8a0704d9 100644
--- a/sysui/desktop/icons/soffice.ico
+++ b/sysui/desktop/icons/soffice.ico
Binary files differ
diff --git a/sysui/desktop/macosx/Info.plist.in b/sysui/desktop/macosx/Info.plist.in
index 608140d2911d..7a3f9a6dce31 100644
--- a/sysui/desktop/macosx/Info.plist.in
+++ b/sysui/desktop/macosx/Info.plist.in
@@ -1463,6 +1463,23 @@
<string>vnd.libreoffice.cmis</string>
</array>
</dict>
+ <dict>
+ <key>CFBundleURLName</key>
+ <string>@PRODUCTNAME@</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>vnd.libreoffice.command</string>
+ </array>
+ </dict>
+ <dict>
+ <key>CFBundleURLName</key>
+ <string>@PRODUCTNAME@ WebDav</string>
+ <key>CFBundleURLSchemes</key>
+ <array>
+ <string>vnd.sun.star.webdav</string>
+ <string>vnd.sun.star.webdavs</string>
+ </array>
+ </dict>
</array>
<key>CFBundleDocumentTypes</key>
diff --git a/sysui/desktop/menus/startcenter.desktop b/sysui/desktop/menus/startcenter.desktop
index 3551a750a45f..378cc9aea8b8 100644
--- a/sysui/desktop/menus/startcenter.desktop
+++ b/sysui/desktop/menus/startcenter.desktop
@@ -23,10 +23,10 @@ Icon=startcenter
Type=Application
Categories=Office;X-Red-Hat-Base;X-SuSE-Core-Office;X-MandrivaLinux-Office-Other;
Exec=${UNIXBASISROOTNAME} %%FILE%%
-MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis;
+MimeType=application/vnd.openofficeorg.extension;x-scheme-handler/vnd.libreoffice.cmis;x-scheme-handler/vnd.sun.star.webdav;x-scheme-handler/vnd.sun.star.webdavs;x-scheme-handler/vnd.libreoffice.command;
Name=%PRODUCTNAME
GenericName=Office
-Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation.
+Comment=The office productivity suite compatible to the open and standardized ODF document format. Supported by CIB software GmbH.
StartupNotify=true
X-GIO-NoFuse=true
StartupWMClass=libreoffice-startcenter
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index a60078dfc86c..047064671f47 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -60,14 +60,14 @@ office_root=${office_prefix}/${PREFIX}
#this symlink is needed to have the API bootstrap functions running right
ln -sf "${office_root}/program/soffice" "${DESTDIR}/${BINDIR}/${PREFIX}"
-if test "${PREFIX}" != libreofficepoweredbycib${PRODUCTVERSION} -a "${PREFIX}" != libreofficepoweredbycibdev${PRODUCTVERSION} ; then
+if test "${PREFIX}" != ciboffice${PRODUCTVERSION} -a "${PREFIX}" != cibofficedev${PRODUCTVERSION} ; then
# compat symlinks
mkdir -p "${DESTDIR}${office_prefix}"
- ln -sf libreofficepoweredbycib${PRODUCTVERSION} "${DESTDIR}${office_root}"
- ln -sf /${BINDIR}/${PREFIX} "${DESTDIR}/${BINDIR}/libreofficepoweredbycib${PRODUCTVERSION}"
+ ln -sf ciboffice${PRODUCTVERSION} "${DESTDIR}${office_root}"
+ ln -sf /${BINDIR}/${PREFIX} "${DESTDIR}/${BINDIR}/ciboffice${PRODUCTVERSION}"
fi
-test "${PREFIX}" = libreofficepoweredbycibdev${PRODUCTVERSION} && mime_def_file="libreofficepoweredbycibdev${PRODUCTVERSION}.xml" || mime_def_file="libreofficepoweredbycib${PRODUCTVERSION}.xml"
+test "${PREFIX}" = cibofficedev${PRODUCTVERSION} && mime_def_file="cibofficedev${PRODUCTVERSION}.xml" || mime_def_file="ciboffice${PRODUCTVERSION}.xml"
mkdir -p "${DESTDIR}/${PREFIXDIR}/share/mime/packages"
cp openoffice.org.xml "${DESTDIR}/${PREFIXDIR}/share/mime/packages/$mime_def_file"
chmod 0644 "${DESTDIR}/${PREFIXDIR}/share/mime/packages/$mime_def_file"
diff --git a/sysui/desktop/share/launcher_comment.ulf b/sysui/desktop/share/launcher_comment.ulf
index d7f9e8beb9c1..edfa7a3cfbdc 100644
--- a/sysui/desktop/share/launcher_comment.ulf
+++ b/sysui/desktop/share/launcher_comment.ulf
@@ -35,5 +35,5 @@ en-US = "Create and edit scientific formulas and equations by using Math."
en-US = "Manage databases, create queries and reports to track and manage your information by using Base."
[startcenter]
-en-US = "The office productivity suite compatible to the open and standardized ODF document format. Supported by The Document Foundation."
+en-US = "The office productivity suite compatible to the open and standardized ODF document format. Supported by CIB software GmbH."
diff --git a/sysui/productlist.mk b/sysui/productlist.mk
index 0159a86ac2b0..207be0506ef3 100644
--- a/sysui/productlist.mk
+++ b/sysui/productlist.mk
@@ -7,14 +7,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-PRODUCTLIST := libreoffice libreofficedev libreofficepoweredbycib
+PRODUCTLIST := ciboffice
PKGVERSION := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO)
PKGVERSIONSHORT := $(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR)
PRODUCTNAME.libreoffice := LibreOffice
PRODUCTNAME.libreofficedev := LibreOfficeDev
-PRODUCTNAME.libreofficepoweredbycib := LibreOfficePoweredByCIB
+PRODUCTNAME.ciboffice := CIBOffice
UNIXFILENAME.libreoffice := libreoffice$(PKGVERSIONSHORT)
UNIXFILENAME.libreofficedev := libreofficedev$(PKGVERSIONSHORT)
-UNIXFILENAME.libreofficepoweredbycib := libreofficepoweredbycib$(PKGVERSIONSHORT)
+UNIXFILENAME.ciboffice := ciboffice$(PKGVERSIONSHORT)
# vim: set noet sw=4 ts=4:
diff --git a/test/source/xmltesttools.cxx b/test/source/xmltesttools.cxx
index 38420ba384d2..9cfe7b876ad5 100644
--- a/test/source/xmltesttools.cxx
+++ b/test/source/xmltesttools.cxx
@@ -144,9 +144,11 @@ OUString XmlTestTools::getXPathContent(xmlDocPtr pXmlDoc, const OString& rXPath)
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:
xmlXPathFreeObject(pXmlObj);
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 13fa5aeb7537..938aa8d75983 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -224,10 +224,13 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow )
VclPtr< vcl::Window > pNextChild = pChild->GetWindow( GetWindowType::Next );
VclPtr< vcl::Window > pClient = pChild->GetWindow( GetWindowType::Client );
- if ( pClient && pClient->GetWindowPeer() )
+ if ( pClient )
{
- css::uno::Reference< css::lang::XComponent > xComp = pClient->GetComponentInterface( false );
- xComp->dispose();
+ // Create the window peer (true argument for pClient->GetComponentInterface) when it's not yet there.
+ // We need it to dispose the child windows properly, otherwise the vcl::Window will be leaked.
+ css::uno::Reference< css::lang::XComponent > xComp = pClient->GetComponentInterface( true );
+ if (xComp.is())
+ xComp->dispose();
}
pChild = pNextChild;
diff --git a/tools/source/fsys/fileutil.cxx b/tools/source/fsys/fileutil.cxx
index 9470fabd2fee..acf174cf8581 100644
--- a/tools/source/fsys/fileutil.cxx
+++ b/tools/source/fsys/fileutil.cxx
@@ -10,6 +10,7 @@
#include <tools/fileutil.hxx>
#if defined _WIN32
#include <osl/file.hxx>
+#include <rtl/uri.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
@@ -29,7 +30,11 @@ OUString UNCToDavURL(LPCWSTR sUNC)
bufURL = std::make_unique<wchar_t[]>(nSize);
nResult = DavGetHTTPFromUNCPath(sUNC, bufURL.get(), &nSize);
}
- return nResult == ERROR_SUCCESS ? o3tl::toU(bufURL.get()) : OUString();
+ // looks like on different Windowses this may or may not be URL encoded?
+ return nResult == ERROR_SUCCESS
+ ? ::rtl::Uri::encode(o3tl::toU(bufURL.get()), rtl_UriCharClassUric,
+ rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8)
+ : OUString();
}
#endif
}
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 64daa11c9415..1ef2b7e0b2af 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4771,4 +4771,13 @@ OUString INetURLObject::CutExtension()
? aTheExtension : OUString();
}
+bool INetURLObject::IsExoticProtocol() const
+{
+ return m_eScheme == INetProtocol::Slot ||
+ m_eScheme == INetProtocol::Macro ||
+ m_eScheme == INetProtocol::Uno ||
+ isSchemeEqualTo(u"vnd.sun.star.script") ||
+ isSchemeEqualTo(u"service");
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 0a597fdff1fc..b549f1cd65c1 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -251,7 +251,7 @@ ImplPolygon::ImplPolygon( const tools::Rectangle& rBound, const Point& rStart, c
}
- if( ( nRadX > 32 ) && ( nRadY > 32 ) && ( nRadX + nRadY ) < 8192 )
+ if (nRadX > 32 && nRadY > 32 && o3tl::saturating_add(nRadX, nRadY) < 8192)
nPoints >>= 1;
// compute threshold
diff --git a/translations b/translations
-Subproject de07c1850b12a25ee83babfdad51f44410d5738
+Subproject 24a3d3dac0d23c65e9586e13fe6b2c983e1aacb
diff --git a/ucb/CppunitTest_ucb_webdav_core.mk b/ucb/CppunitTest_ucb_webdav_core.mk
new file mode 100644
index 000000000000..060968e96b61
--- /dev/null
+++ b/ucb/CppunitTest_ucb_webdav_core.mk
@@ -0,0 +1,69 @@
+# -*- 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,ucb_webdav_core))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,ucb_webdav_core))
+
+$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_core, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ salhelper \
+ svl \
+ test \
+ ucbhelper \
+ tl \
+))
+
+$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_core, \
+ ucpdav1 \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_CppunitTest_add_libs,ucb_webdav_core,\
+ $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/sqlite3.lib \
+))
+$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_core,\
+ nss3 \
+))
+$(eval $(call gb_CppunitTest_use_system_win32_libs,ucb_webdav_core,\
+ crypt32 \
+ Ole32 \
+ shell32 \
+))
+endif
+
+$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_core,\
+ boost_headers \
+ libxml2 \
+ neon \
+ curl \
+))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_core,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_core, \
+ ucb/qa/cppunit/webdav/webdav_resource_access \
+ ucb/qa/cppunit/webdav/webdav_propfindcache \
+ ucb/qa/cppunit/webdav/webdav_options \
+ ucb/qa/cppunit/webdav/webdav_local_neon \
+))
+
+$(eval $(call gb_CppunitTest_set_include,ucb_webdav_core,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/ucb/source/ucp/webdav-curl \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/ucb/CppunitTest_ucb_webdav_local_neon.mk b/ucb/CppunitTest_ucb_webdav_local_neon.mk
deleted file mode 100644
index 2e920f4ca03f..000000000000
--- a/ucb/CppunitTest_ucb_webdav_local_neon.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,ucb_webdav_local_neon))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,ucb_webdav_local_neon))
-
-$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_local_neon, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- salhelper \
- test \
- ucbhelper \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_local_neon, \
- ucpdav1 \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_local_neon,\
- boost_headers \
- libxml2 \
- neon \
- openssl \
-))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_local_neon,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_local_neon, \
- ucb/qa/cppunit/webdav/webdav_local_neon \
-))
-
-$(eval $(call gb_CppunitTest_set_include,ucb_webdav_local_neon,\
- $$(INCLUDE) \
- -I$(SRCDIR)/ucb/source/ucp/webdav-neon \
-))
-
-$(eval $(call gb_CppunitTest_use_static_libraries,ucb_webdav_local_neon))
-
-# vim: set noet sw=4 ts=4:
diff --git a/ucb/CppunitTest_ucb_webdav_neon_opts.mk b/ucb/CppunitTest_ucb_webdav_neon_opts.mk
deleted file mode 100644
index df670ed7afdd..000000000000
--- a/ucb/CppunitTest_ucb_webdav_neon_opts.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,ucb_webdav_neon_opts))
-
-$(eval $(call gb_CppunitTest_use_api,ucb_webdav_neon_opts, \
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_neon_opts, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- salhelper \
- test \
- ucbhelper \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_neon_opts, \
- ucpdav1 \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_neon_opts,\
- boost_headers \
- libxml2 \
- neon \
- openssl \
-))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_neon_opts,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_neon_opts, \
- ucb/qa/cppunit/webdav/webdav_options \
-))
-
-$(eval $(call gb_CppunitTest_set_include,ucb_webdav_neon_opts,\
- $$(INCLUDE) \
- -I$(SRCDIR)/ucb/source/ucp/webdav-neon \
-))
-
-$(eval $(call gb_CppunitTest_use_static_libraries,ucb_webdav_neon_opts))
-
-# vim: set noet sw=4 ts=4:
diff --git a/ucb/CppunitTest_ucb_webdav_propfindcache.mk b/ucb/CppunitTest_ucb_webdav_propfindcache.mk
deleted file mode 100644
index 8d4a12d32ad4..000000000000
--- a/ucb/CppunitTest_ucb_webdav_propfindcache.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,ucb_webdav_propfindcache))
-
-$(eval $(call gb_CppunitTest_use_api,ucb_webdav_propfindcache, \
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_propfindcache, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- salhelper \
- test \
- ucbhelper \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_propfindcache, \
- ucpdav1 \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_propfindcache,\
- boost_headers \
- libxml2 \
- neon \
- openssl \
-))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_propfindcache,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_propfindcache, \
- ucb/qa/cppunit/webdav/webdav_propfindcache \
-))
-
-$(eval $(call gb_CppunitTest_set_include,ucb_webdav_propfindcache,\
- $$(INCLUDE) \
- -I$(SRCDIR)/ucb/source/ucp/webdav-neon \
-))
-
-$(eval $(call gb_CppunitTest_use_static_libraries,ucb_webdav_propfindcache))
-
-# vim: set noet sw=4 ts=4:
diff --git a/ucb/CppunitTest_ucb_webdav_res_access.mk b/ucb/CppunitTest_ucb_webdav_res_access.mk
deleted file mode 100644
index fa0669987bd2..000000000000
--- a/ucb/CppunitTest_ucb_webdav_res_access.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#*************************************************************************
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-#*************************************************************************
-
-$(eval $(call gb_CppunitTest_CppunitTest,ucb_webdav_res_access))
-
-$(eval $(call gb_CppunitTest_use_api,ucb_webdav_res_access, \
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_res_access, \
- comphelper \
- cppu \
- cppuhelper \
- sal \
- salhelper \
- test \
- ucbhelper \
- tl \
-))
-
-$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_res_access, \
- ucpdav1 \
-))
-
-$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_res_access,\
- boost_headers \
- libxml2 \
- neon \
- openssl \
-))
-
-$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_res_access,\
- officecfg/registry \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_res_access, \
- ucb/qa/cppunit/webdav/webdav_resource_access \
-))
-
-$(eval $(call gb_CppunitTest_set_include,ucb_webdav_res_access,\
- $$(INCLUDE) \
- -I$(SRCDIR)/ucb/source/ucp/webdav-neon \
-))
-
-$(eval $(call gb_CppunitTest_use_static_libraries,ucb_webdav_res_access))
-
-# vim: set noet sw=4 ts=4:
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index c76489bd4847..91933763f0ec 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -25,6 +25,7 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
cppuhelper \
sal \
salhelper \
+ svl \
ucbhelper \
tl \
))
@@ -32,6 +33,49 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
ifeq ($(WITH_WEBDAV),neon)
$(eval $(call gb_Library_use_externals,ucpdav1,\
+ curl \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_set_include,ucpdav1,\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,nss)/dist/private/nss \
+))
+$(eval $(call gb_Library_add_libs,ucpdav1,\
+ $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/sqlite3.lib \
+))
+$(eval $(call gb_Library_use_externals,ucpdav1,\
+ nss3 \
+))
+$(eval $(call gb_Library_use_system_win32_libs,ucpdav1,\
+ crypt32 \
+ Ole32 \
+ shell32 \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,ucpdav1,\
+ ucb/source/ucp/webdav-curl/ContentProperties \
+ ucb/source/ucp/webdav-curl/CurlSession \
+ ucb/source/ucp/webdav-curl/CurlUri \
+ ucb/source/ucp/webdav-curl/DAVProperties \
+ ucb/source/ucp/webdav-curl/DAVResourceAccess \
+ ucb/source/ucp/webdav-curl/DAVSessionFactory \
+ ucb/source/ucp/webdav-curl/DAVTypes \
+ ucb/source/ucp/webdav-curl/DateTimeHelper \
+ ucb/source/ucp/webdav-curl/ImportCookies \
+ ucb/source/ucp/webdav-curl/PropfindCache \
+ ucb/source/ucp/webdav-curl/SerfLockStore \
+ ucb/source/ucp/webdav-curl/UCBDeadPropertyValue \
+ ucb/source/ucp/webdav-curl/webdavcontent \
+ ucb/source/ucp/webdav-curl/webdavcontentcaps \
+ ucb/source/ucp/webdav-curl/webdavdatasupplier \
+ ucb/source/ucp/webdav-curl/webdavprovider \
+ ucb/source/ucp/webdav-curl/webdavresponseparser \
+ ucb/source/ucp/webdav-curl/webdavresultset \
+))
+
+$(eval $(call gb_Library_use_externals,ucpdav1,\
boost_headers \
libxml2 \
neon \
@@ -65,7 +109,6 @@ $(eval $(call gb_Library_add_exception_objects,ucpdav1,\
ucb/source/ucp/webdav-neon/webdavdatasupplier \
ucb/source/ucp/webdav-neon/webdavprovider \
ucb/source/ucp/webdav-neon/webdavresultset \
- ucb/source/ucp/webdav-neon/webdavservices \
))
else # WITH_WEBDAV == serf
diff --git a/ucb/Module_ucb.mk b/ucb/Module_ucb.mk
index dc1405e72992..cea03c49ec4a 100644
--- a/ucb/Module_ucb.mk
+++ b/ucb/Module_ucb.mk
@@ -34,10 +34,7 @@ endif
ifeq ($(WITH_WEBDAV),neon)
$(eval $(call gb_Module_add_check_targets,ucb,\
- CppunitTest_ucb_webdav_local_neon \
- CppunitTest_ucb_webdav_neon_opts \
- CppunitTest_ucb_webdav_propfindcache \
- CppunitTest_ucb_webdav_res_access \
+ CppunitTest_ucb_webdav_core \
))
endif
diff --git a/ucb/qa/complex/ucb/UCB.java b/ucb/qa/complex/ucb/UCB.java
index f403beee4c93..16ee670805ff 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/qa/cppunit/webdav/webdav_local_neon.cxx b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx
index a88266020787..bde7652b9ffa 100644
--- a/ucb/qa/cppunit/webdav/webdav_local_neon.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_local_neon.cxx
@@ -10,9 +10,9 @@
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
-#include <NeonUri.hxx>
+#include <CurlUri.hxx>
-using namespace webdav_ucp;
+using namespace http_dav_ucp;
namespace
{
@@ -21,31 +21,76 @@ namespace
{
public:
- void NeonUriTest();
+ void WebdavUriTest();
+ void WebdavUriTest2();
// Change the following lines only, if you add, remove or rename
// member functions of the current class,
// because these macros are need by auto register mechanism.
CPPUNIT_TEST_SUITE( webdav_local_test );
- CPPUNIT_TEST( NeonUriTest );
+ CPPUNIT_TEST( WebdavUriTest );
+ CPPUNIT_TEST( WebdavUriTest2 );
CPPUNIT_TEST_SUITE_END();
}; // class webdav_local_test
- void webdav_local_test::NeonUriTest()
+ void webdav_local_test::WebdavUriTest()
{
//try URL decomposition
- NeonUri aURI( "http://user%40anothername@server.biz:8040/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" );
+ CurlUri aURI(u"http://user%40anothername@server.biz:8040/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" );
CPPUNIT_ASSERT_EQUAL( OUString( "http" ), aURI.GetScheme() );
CPPUNIT_ASSERT_EQUAL( OUString( "server.biz" ), aURI.GetHost() );
- CPPUNIT_ASSERT_EQUAL( OUString( "user%40anothername" ), aURI.GetUserInfo() );
- CPPUNIT_ASSERT_EQUAL( sal_Int32( 8040 ), aURI.GetPort() );
- CPPUNIT_ASSERT_EQUAL( OUString( "/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" ), aURI.GetPath( ) );
+ CPPUNIT_ASSERT_EQUAL( OUString( "user%40anothername" ), aURI.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), aURI.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString( "/aService/asegment/nextsegment/check.this?test=true&link=http://anotherserver.com/%3Fcheck=theapplication%26os=linuxintel%26lang=en-US%26version=5.2.0" ), aURI.GetRelativeReference() );
+
+ CurlUri uri2(aURI.CloneWithRelativeRefPathAbsolute(u"/foo/bar"));
+ CPPUNIT_ASSERT_EQUAL( OUString("http"), uri2.GetScheme() );
+ CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri2.GetHost() );
+ CPPUNIT_ASSERT_EQUAL( OUString("user%40anothername"), uri2.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri2.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString("/foo/bar"), uri2.GetRelativeReference() );
+ CPPUNIT_ASSERT_EQUAL( OUString("http://user%40anothername@server.biz:8040/foo/bar"), uri2.GetURI() );
+
+ CurlUri uri3(aURI.CloneWithRelativeRefPathAbsolute(u"?query#fragment"));
+ CPPUNIT_ASSERT_EQUAL( OUString("http"), uri3.GetScheme() );
+ CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri3.GetHost() );
+ CPPUNIT_ASSERT_EQUAL( OUString("user%40anothername"), uri3.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri3.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString("?query#fragment"), uri3.GetRelativeReference() );
+ CPPUNIT_ASSERT_EQUAL( OUString("http://user%40anothername@server.biz:8040/?query#fragment"), uri3.GetURI() );
}
- CPPUNIT_TEST_SUITE_REGISTRATION( webdav_local_test );
-} // namespace rtl_random
+ void webdav_local_test::WebdavUriTest2()
+ {
+ CurlUri aURI(u"https://foo:bar@server.biz:8040/aService#aaa" );
+ CPPUNIT_ASSERT_EQUAL( OUString("https"), aURI.GetScheme() );
+ CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), aURI.GetHost() );
+ CPPUNIT_ASSERT_EQUAL( OUString("foo"), aURI.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( OUString("bar"), aURI.GetPassword() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), aURI.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString( "/aService#aaa" ), aURI.GetRelativeReference() );
-CPPUNIT_PLUGIN_IMPLEMENT();
+ CurlUri uri2(aURI.CloneWithRelativeRefPathAbsolute(u"/foo/bar"));
+ CPPUNIT_ASSERT_EQUAL( OUString("https"), uri2.GetScheme() );
+ CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri2.GetHost() );
+ CPPUNIT_ASSERT_EQUAL( OUString("foo"), uri2.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( OUString("bar"), uri2.GetPassword() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16( 8040 ), uri2.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString("/foo/bar"), uri2.GetRelativeReference() );
+ CPPUNIT_ASSERT_EQUAL( OUString("https://foo:bar@server.biz:8040/foo/bar"), uri2.GetURI() );
+
+ CurlUri uri3(aURI.CloneWithRelativeRefPathAbsolute(u"?query"));
+ CPPUNIT_ASSERT_EQUAL( OUString("https"), uri3.GetScheme() );
+ CPPUNIT_ASSERT_EQUAL( OUString("server.biz"), uri3.GetHost() );
+ CPPUNIT_ASSERT_EQUAL( OUString("foo"), uri3.GetUser() );
+ CPPUNIT_ASSERT_EQUAL( OUString("bar"), uri3.GetPassword() );
+ CPPUNIT_ASSERT_EQUAL( sal_uInt16(8040), uri3.GetPort() );
+ CPPUNIT_ASSERT_EQUAL( OUString("?query"), uri3.GetRelativeReference() );
+ CPPUNIT_ASSERT_EQUAL( OUString("https://foo:bar@server.biz:8040/?query"), uri3.GetURI() );
+ }
+
+ CPPUNIT_TEST_SUITE_REGISTRATION( webdav_local_test );
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx b/ucb/qa/cppunit/webdav/webdav_options.cxx
index ef0cc1b969fc..ebf59da920f2 100644
--- a/ucb/qa/cppunit/webdav/webdav_options.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -11,7 +11,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <DAVTypes.hxx>
-using namespace webdav_ucp;
+using namespace http_dav_ucp;
namespace
{
@@ -364,8 +364,6 @@ namespace
}
CPPUNIT_TEST_SUITE_REGISTRATION( webdav_opts_test );
-} // namespace rtl_random
-
-CPPUNIT_PLUGIN_IMPLEMENT();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
index 29ccf8a462be..e684c135649b 100644
--- a/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_propfindcache.cxx
@@ -11,7 +11,7 @@
#include <cppunit/plugin/TestPlugIn.h>
#include <PropfindCache.hxx>
-using namespace webdav_ucp;
+using namespace http_dav_ucp;
namespace
{
@@ -113,7 +113,7 @@ namespace
// add the cache an element
aPropsNames.setPropertiesNames( aProps );
- PropCache.addCachePropertyNames( aPropsNames );
+ PropCache.addCachePropertyNames( aPropsNames, 10 );
PropertyNames aRetPropsNames;
//test existence
@@ -128,8 +128,6 @@ namespace
}
CPPUNIT_TEST_SUITE_REGISTRATION( webdav_propcache_test );
-} // namespace rtl_random
-
-CPPUNIT_PLUGIN_IMPLEMENT();
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/qa/cppunit/webdav/webdav_resource_access.cxx b/ucb/qa/cppunit/webdav/webdav_resource_access.cxx
index d1a73be2d5f3..2379139c04a3 100644
--- a/ucb/qa/cppunit/webdav/webdav_resource_access.cxx
+++ b/ucb/qa/cppunit/webdav/webdav_resource_access.cxx
@@ -12,7 +12,7 @@
#include <DAVResourceAccess.hxx>
#include <DAVException.hxx>
-using namespace webdav_ucp;
+using namespace http_dav_ucp;
namespace
{
@@ -96,7 +96,7 @@ namespace
}
CPPUNIT_TEST_SUITE_REGISTRATION( webdav_resource_access_test );
-} // namespace rtl_random
+}
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 92c3639bebf0..a7703e98ed75 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -62,6 +62,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>
@@ -223,6 +224,7 @@ enum ACTION { NOACTION,
THROWAUTHENTICATIONREQUEST,
THROWACCESSDENIED,
THROWINTERACTIVECONNECT,
+ THROWMALFORMED,
THROWRESOLVENAME,
THROWQUOTE,
THROWNOFILE,
@@ -339,6 +341,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;
@@ -533,6 +544,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/ucb/source/ucp/webdav-curl/ContentProperties.cxx b/ucb/source/ucp/webdav-curl/ContentProperties.cxx
new file mode 100644
index 000000000000..59773db1cbdc
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/ContentProperties.cxx
@@ -0,0 +1,568 @@
+/* -*- 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 <memory>
+#include <com/sun/star/util/DateTime.hpp>
+#include "CurlUri.hxx"
+#include "DAVResource.hxx"
+#include "DAVProperties.hxx"
+#include "DateTimeHelper.hxx"
+#include "webdavprovider.hxx"
+#include "ContentProperties.hxx"
+
+#include <sal/log.hxx>
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+/*
+=============================================================================
+
+ Property Mapping
+
+=============================================================================
+HTTP (entity header) WebDAV (property) UCB (property)
+=============================================================================
+
+Allow
+Content-Encoding
+Content-Language getcontentlanguage
+Content-Length getcontentlength Size
+Content-Location
+Content-MD5
+Content-Range
+Content-Type getcontenttype MediaType
+Expires
+Last-Modified getlastmodified DateModified
+ creationdate DateCreated
+ resourcetype IsFolder,IsDocument,ContentType
+ displayname
+ETag (actually getetag
+a response header )
+ lockdiscovery
+ supportedlock
+ source
+ Title (always taken from URI)
+
+=============================================================================
+
+Important: HTTP headers will not be mapped to DAV properties; only to UCB
+ properties. (Content-Length,Content-Type,Last-Modified)
+*/
+
+
+// ContentProperties Implementation.
+
+
+// static member!
+uno::Any ContentProperties::m_aEmptyAny;
+
+ContentProperties::ContentProperties( const DAVResource& rResource )
+: m_xProps( new PropertyValueMap ),
+ m_bTrailingSlash( false )
+{
+ assert(!rResource.uri.isEmpty() &&
+ "ContentProperties ctor - Empty resource URI!");
+
+ // Title
+ try
+ {
+ CurlUri const aURI( rResource.uri );
+ m_aEscapedTitle = aURI.GetPathBaseName();
+
+ (*m_xProps)[ OUString( "Title" ) ]
+ = PropertyValue(
+ uno::makeAny( aURI.GetPathBaseNameUnescaped() ), true );
+ }
+ catch ( DAVException const & )
+ {
+ (*m_xProps)[ OUString( "Title" ) ]
+ = PropertyValue(
+ uno::makeAny(
+ OUString( "*** unknown ***" ) ),
+ true );
+ }
+
+ for ( const auto& rProp : rResource.properties )
+ {
+ addProperty( rProp );
+ }
+
+ if ( rResource.uri.endsWith("/") )
+ m_bTrailingSlash = true;
+}
+
+
+ContentProperties::ContentProperties(
+ const OUString & rTitle, bool bFolder )
+: m_xProps( new PropertyValueMap ),
+ m_bTrailingSlash( false )
+{
+ (*m_xProps)[ OUString( "Title" ) ]
+ = PropertyValue( uno::makeAny( rTitle ), true );
+ (*m_xProps)[ OUString( "IsFolder" ) ]
+ = PropertyValue( uno::makeAny( bFolder ), true );
+ (*m_xProps)[ OUString( "IsDocument" ) ]
+ = PropertyValue( uno::makeAny( bool( !bFolder ) ), true );
+}
+
+
+ContentProperties::ContentProperties( const OUString & rTitle )
+: m_xProps( new PropertyValueMap ),
+ m_bTrailingSlash( false )
+{
+ (*m_xProps)[ OUString( "Title" ) ]
+ = PropertyValue( uno::makeAny( rTitle ), true );
+}
+
+
+ContentProperties::ContentProperties()
+: m_xProps( new PropertyValueMap ),
+ m_bTrailingSlash( false )
+{
+}
+
+
+ContentProperties::ContentProperties( const ContentProperties & rOther )
+: m_aEscapedTitle( rOther.m_aEscapedTitle ),
+ m_xProps( rOther.m_xProps
+ ? new PropertyValueMap( *rOther.m_xProps )
+ : new PropertyValueMap ),
+ m_bTrailingSlash( rOther.m_bTrailingSlash )
+{
+}
+
+
+bool ContentProperties::contains( const OUString & rName ) const
+{
+ if ( get( rName ) )
+ return true;
+ else
+ return false;
+}
+
+
+const uno::Any & ContentProperties::getValue(
+ const OUString & rName ) const
+{
+ const PropertyValue * pProp = get( rName );
+ if ( pProp )
+ return pProp->value();
+ else
+ return m_aEmptyAny;
+}
+
+
+const PropertyValue * ContentProperties::get(
+ const OUString & rName ) const
+{
+ PropertyValueMap::const_iterator it = m_xProps->find( rName );
+ const PropertyValueMap::const_iterator end = m_xProps->end();
+
+ if ( it == end )
+ {
+ it = std::find_if(m_xProps->cbegin(), end,
+ [&rName](const PropertyValueMap::value_type& rEntry) {
+ return rEntry.first.equalsIgnoreAsciiCase( rName );
+ });
+ if ( it != end )
+ return &(*it).second;
+
+ return nullptr;
+ }
+ else
+ return &(*it).second;
+}
+
+
+// static
+void ContentProperties::UCBNamesToDAVNames(
+ const uno::Sequence< beans::Property > & rProps,
+ std::vector< OUString > & propertyNames )
+{
+
+ // Assemble list of DAV properties to obtain from server.
+ // Append DAV properties needed to obtain requested UCB props.
+
+
+ // DAV UCB
+ // creationdate <- DateCreated
+ // getlastmodified <- DateModified
+ // getcontenttype <- MediaType
+ // getcontentlength <- Size
+ // resourcetype <- IsFolder, IsDocument, ContentType
+ // (taken from URI) <- Title
+
+ bool bCreationDate = false;
+ bool bLastModified = false;
+ bool bContentType = false;
+ bool bContentLength = false;
+ bool bResourceType = false;
+
+ sal_Int32 nCount = rProps.getLength();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const beans::Property & rProp = rProps[ n ];
+
+ if ( rProp.Name == "Title" )
+ {
+ // Title is always obtained from resource's URI.
+ continue;
+ }
+ else if ( rProp.Name == "DateCreated" ||
+ ( rProp.Name == DAVProperties::CREATIONDATE ) )
+ {
+ if ( !bCreationDate )
+ {
+ propertyNames.push_back( DAVProperties::CREATIONDATE );
+ bCreationDate = true;
+ }
+ }
+ else if ( rProp.Name == "DateModified" ||
+ ( rProp.Name == DAVProperties::GETLASTMODIFIED ) )
+ {
+ if ( !bLastModified )
+ {
+ propertyNames.push_back(
+ DAVProperties::GETLASTMODIFIED );
+ bLastModified = true;
+ }
+ }
+ else if ( rProp.Name == "MediaType" ||
+ ( rProp.Name == DAVProperties::GETCONTENTTYPE ) )
+ {
+ if ( !bContentType )
+ {
+ propertyNames.push_back(
+ DAVProperties::GETCONTENTTYPE );
+ bContentType = true;
+ }
+ }
+ else if ( rProp.Name == "Size" ||
+ ( rProp.Name == DAVProperties::GETCONTENTLENGTH ) )
+ {
+ if ( !bContentLength )
+ {
+ propertyNames.push_back(
+ DAVProperties::GETCONTENTLENGTH );
+ bContentLength = true;
+ }
+ }
+ else if ( rProp.Name == "ContentType" ||
+ rProp.Name == "IsDocument" ||
+ rProp.Name == "IsFolder" ||
+ ( rProp.Name == DAVProperties::RESOURCETYPE ) )
+ {
+ if ( !bResourceType )
+ {
+ propertyNames.push_back( DAVProperties::RESOURCETYPE );
+ bResourceType = true;
+ }
+ }
+ else
+ {
+ propertyNames.push_back( rProp.Name );
+ }
+ }
+}
+
+
+// static
+void ContentProperties::UCBNamesToHTTPNames(
+ const uno::Sequence< beans::Property > & rProps,
+ std::vector< OUString > & propertyNames )
+{
+
+ // Assemble list of HTTP header names to obtain from server.
+ // Append HTTP headers needed to obtain requested UCB props.
+
+
+ // HTTP UCB
+ // Last-Modified <- DateModified
+ // Content-Type <- MediaType
+ // Content-Length <- Size
+
+ sal_Int32 nCount = rProps.getLength();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const beans::Property & rProp = rProps[ n ];
+
+ if ( rProp.Name == "DateModified" )
+ {
+ propertyNames.push_back( OUString( "Last-Modified" ) );
+ }
+ else if ( rProp.Name == "MediaType" )
+ {
+ propertyNames.push_back( OUString( "Content-Type" ) );
+ }
+ else if ( rProp.Name == "Size" )
+ {
+ propertyNames.push_back( OUString( "Content-Length" ) );
+ }
+ else
+ {
+ propertyNames.push_back( rProp.Name );
+ }
+ }
+}
+
+
+bool ContentProperties::containsAllNames(
+ const uno::Sequence< beans::Property >& rProps,
+ std::vector< OUString > & rNamesNotContained ) const
+{
+ rNamesNotContained.clear();
+
+ sal_Int32 nCount = rProps.getLength();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const OUString & rName = rProps[ n ].Name;
+ if ( !contains( rName ) )
+ {
+ // Not found.
+ rNamesNotContained.push_back( rName );
+ }
+ }
+
+ return ( rNamesNotContained.size() == 0 );
+}
+
+
+void ContentProperties::addProperties(
+ const std::vector< OUString > & rProps,
+ const ContentProperties & rContentProps )
+{
+ for ( const OUString & rName : rProps )
+ {
+ if ( !contains( rName ) ) // ignore duplicates
+ {
+ const PropertyValue * pProp = rContentProps.get( rName );
+ if ( pProp )
+ {
+ // Add it.
+ addProperty( rName, pProp->value(), pProp->isCaseSensitive() );
+ }
+ else
+ {
+ addProperty( rName, uno::Any(), false );
+ }
+ }
+ }
+}
+
+void ContentProperties::addProperty( const DAVPropertyValue & rProp )
+{
+ addProperty( rProp.Name, rProp.Value, rProp.IsCaseSensitive );
+}
+
+
+void ContentProperties::addProperty( const OUString & rName,
+ const css::uno::Any & rValue,
+ bool bIsCaseSensitive )
+{
+ if ( rName == DAVProperties::CREATIONDATE )
+ {
+ // Map DAV:creationdate to UCP:DateCreated
+ OUString aValue;
+ rValue >>= aValue;
+ util::DateTime aDate;
+ DateTimeHelper::convert( aValue, aDate );
+
+ (*m_xProps)[ OUString( "DateCreated" ) ]
+ = PropertyValue( uno::makeAny( aDate ), true );
+ }
+ // else if ( rName.equals( DAVProperties::DISPLAYNAME ) )
+ // {
+ // }
+ // else if ( rName.equals( DAVProperties::GETCONTENTLANGUAGE ) )
+ // {
+ // }
+ else if ( rName == DAVProperties::GETCONTENTLENGTH )
+ {
+ // Map DAV:getcontentlength to UCP:Size
+ OUString aValue;
+ rValue >>= aValue;
+
+ (*m_xProps)[ OUString( "Size" ) ]
+ = PropertyValue( uno::makeAny( aValue.toInt64() ), true );
+ }
+ else if ( rName.equalsIgnoreAsciiCase( "Content-Length" ) )
+ {
+ // Do NOT map Content-Length entity header to DAV:getcontentlength!
+ // Only DAV resources have this property.
+
+ // Map Content-Length entity header to UCP:Size
+ OUString aValue;
+ rValue >>= aValue;
+
+ (*m_xProps)[ OUString( "Size" ) ]
+ = PropertyValue( uno::makeAny( aValue.toInt64() ), true );
+ }
+ else if ( rName == DAVProperties::GETCONTENTTYPE )
+ {
+ // Map DAV:getcontenttype to UCP:MediaType (1:1)
+ (*m_xProps)[ OUString( "MediaType" ) ]
+ = PropertyValue( rValue, true );
+ }
+ else if ( rName.equalsIgnoreAsciiCase( "Content-Type" ) )
+ {
+ // Do NOT map Content-Type entity header to DAV:getcontenttype!
+ // Only DAV resources have this property.
+
+ // Map DAV:getcontenttype to UCP:MediaType (1:1)
+ (*m_xProps)[ OUString( "MediaType" ) ]
+ = PropertyValue( rValue, true );
+ }
+ // else if ( rName.equals( DAVProperties::GETETAG ) )
+ // {
+ // }
+ else if ( rName == DAVProperties::GETLASTMODIFIED )
+ {
+ // Map the DAV:getlastmodified entity header to UCP:DateModified
+ OUString aValue;
+ rValue >>= aValue;
+ util::DateTime aDate;
+ DateTimeHelper::convert( aValue, aDate );
+
+ (*m_xProps)[ OUString( "DateModified" ) ]
+ = PropertyValue( uno::makeAny( aDate ), true );
+ }
+ else if ( rName.equalsIgnoreAsciiCase( "Last-Modified" ) )
+ {
+ // Do not map Last-Modified entity header to DAV:getlastmodified!
+ // Only DAV resources have this property.
+
+ // Map the Last-Modified entity header to UCP:DateModified
+ OUString aValue;
+ rValue >>= aValue;
+ util::DateTime aDate;
+ DateTimeHelper::convert( aValue, aDate );
+
+ (*m_xProps)[ OUString( "DateModified" ) ]
+ = PropertyValue( uno::makeAny( aDate ), true );
+ }
+ // else if ( rName.equals( DAVProperties::LOCKDISCOVERY ) )
+ // {
+ // }
+ else if ( rName == DAVProperties::RESOURCETYPE )
+ {
+ OUString aValue;
+ rValue >>= aValue;
+
+ // Map DAV:resourcetype to UCP:IsFolder, UCP:IsDocument, UCP:ContentType
+ bool bFolder =
+ aValue.equalsIgnoreAsciiCase( "collection" );
+
+ (*m_xProps)[ OUString( "IsFolder" ) ]
+ = PropertyValue( uno::makeAny( bFolder ), true );
+ (*m_xProps)[ OUString( "IsDocument" ) ]
+ = PropertyValue( uno::makeAny( bool( !bFolder ) ), true );
+ (*m_xProps)[ OUString( "ContentType" ) ]
+ = PropertyValue( uno::makeAny( bFolder
+ ? OUString( WEBDAV_COLLECTION_TYPE )
+ : OUString( WEBDAV_CONTENT_TYPE ) ), true );
+ }
+ // else if ( rName.equals( DAVProperties::SUPPORTEDLOCK ) )
+ // {
+ // }
+
+ // Save property.
+ (*m_xProps)[ rName ] = PropertyValue( rValue, bIsCaseSensitive );
+}
+
+
+// CachableContentProperties Implementation.
+
+
+namespace
+{
+ bool isCachable( OUString const & rName,
+ bool isCaseSensitive )
+ {
+ const OUString aNonCachableProps [] =
+ {
+ DAVProperties::LOCKDISCOVERY,
+
+ DAVProperties::GETETAG,
+ OUString( "ETag" ),
+
+ OUString( "DateModified" ),
+ OUString( "Last-Modified" ),
+ DAVProperties::GETLASTMODIFIED,
+
+ OUString( "Size" ),
+ OUString( "Content-Length" ),
+ DAVProperties::GETCONTENTLENGTH,
+
+ OUString( "Date" )
+ };
+
+ for ( sal_uInt32 n = 0;
+ n < ( sizeof( aNonCachableProps )
+ / sizeof( aNonCachableProps[ 0 ] ) );
+ ++n )
+ {
+ if ( isCaseSensitive )
+ {
+ if ( rName.equals( aNonCachableProps[ n ] ) )
+ return false;
+ }
+ else
+ if ( rName.equalsIgnoreAsciiCase( aNonCachableProps[ n ] ) )
+ return false;
+ }
+ return true;
+ }
+
+} // namespace
+
+
+CachableContentProperties::CachableContentProperties(
+ const ContentProperties & rProps )
+{
+ addProperties( rProps );
+}
+
+
+void CachableContentProperties::addProperties(
+ const ContentProperties & rProps )
+{
+ const std::unique_ptr< PropertyValueMap > & props = rProps.getProperties();
+
+ for ( const auto& rProp : *props )
+ {
+ if ( isCachable( rProp.first, rProp.second.isCaseSensitive() ) )
+ m_aProps.addProperty( rProp.first,
+ rProp.second.value(),
+ rProp.second.isCaseSensitive() );
+ }
+}
+
+
+void CachableContentProperties::addProperties(
+ const std::vector< DAVPropertyValue > & rProps )
+{
+ for ( const auto& rProp : rProps )
+ {
+ if ( isCachable( rProp.Name, rProp.IsCaseSensitive ) )
+ m_aProps.addProperty( rProp );
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/ContentProperties.hxx b/ucb/source/ucp/webdav-curl/ContentProperties.hxx
new file mode 100644
index 000000000000..0256450c2f90
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/ContentProperties.hxx
@@ -0,0 +1,173 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <memory>
+#include <unordered_map>
+#include <vector>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include "DAVResource.hxx"
+
+namespace com::sun::star::beans {
+ struct Property;
+}
+
+namespace http_dav_ucp
+{
+
+struct DAVResource;
+
+// PropertyValueMap.
+class PropertyValue
+{
+private:
+ css::uno::Any m_aValue;
+ bool m_bIsCaseSensitive;
+
+public:
+ PropertyValue()
+ : m_bIsCaseSensitive( true ) {}
+
+ explicit PropertyValue( const css::uno::Any & rValue,
+ bool bIsCaseSensitive )
+ : m_aValue( rValue),
+ m_bIsCaseSensitive( bIsCaseSensitive ) {}
+
+ bool isCaseSensitive() const { return m_bIsCaseSensitive; }
+ const css::uno::Any & value() const { return m_aValue; }
+
+};
+
+typedef std::unordered_map< OUString, PropertyValue > PropertyValueMap;
+
+class ContentProperties
+{
+public:
+ ContentProperties();
+
+ explicit ContentProperties( const DAVResource& rResource );
+
+ // Mini props for transient contents.
+ ContentProperties( const OUString & rTitle, bool bFolder );
+
+ // Micro props for non-existing contents.
+ explicit ContentProperties( const OUString & rTitle );
+
+ ContentProperties( const ContentProperties & rOther );
+
+ bool contains( const OUString & rName ) const;
+
+ const css::uno::Any& getValue( const OUString & rName ) const;
+
+ // Maps the UCB property names contained in rProps with their DAV property
+ // counterparts, if possible. All unmappable properties will be included
+ // unchanged in resulting vector.
+ // The vector filled by this method can directly be handed over to
+ // DAVResourceAccess::PROPFIND. The result from PROPFIND
+ // (vector< DAVResource >) can be used to create a ContentProperties
+ // instance which can map DAV properties back to UCB properties.
+ static void UCBNamesToDAVNames( const css::uno::Sequence< css::beans::Property > & rProps,
+ std::vector< OUString > & resources );
+
+ // Maps the UCB property names contained in rProps with their HTTP header
+ // counterparts, if possible. All unmappable properties will be included
+ // unchanged in resulting vector.
+ // The vector filled by this method can directly be handed over to
+ // DAVResourceAccess::HEAD. The result from HEAD (vector< DAVResource >)
+ // can be used to create a ContentProperties instance which can map header
+ // names back to UCB properties.
+ static void UCBNamesToHTTPNames( const css::uno::Sequence< css::beans::Property > & rProps,
+ std::vector< OUString > & resources );
+
+ // return true, if all properties contained in rProps are contained in
+ // this ContentProperties instance. Otherwise, false will be returned.
+ // rNamesNotContained contain the missing names.
+ bool containsAllNames(
+ const css::uno::Sequence< css::beans::Property >& rProps,
+ std::vector< OUString > & rNamesNotContained ) const;
+
+ // adds all properties described by rProps that are actually contained in
+ // rContentProps to this instance. In case of duplicates the value
+ // already contained in this will left unchanged.
+ void addProperties( const std::vector< OUString > & rProps,
+ const ContentProperties & rContentProps );
+
+ // overwrites probably existing entry.
+ void addProperty( const OUString & rName,
+ const css::uno::Any & rValue,
+ bool bIsCaseSensitive );
+
+ // overwrites probably existing entry.
+ void addProperty( const DAVPropertyValue & rProp );
+
+ bool isTrailingSlash() const { return m_bTrailingSlash; }
+
+ const OUString & getEscapedTitle() const { return m_aEscapedTitle; }
+
+ // Not good to expose implementation details, but this is actually an
+ // internal class.
+ const std::unique_ptr< PropertyValueMap > & getProperties() const
+ { return m_xProps; }
+
+private:
+ OUString m_aEscapedTitle;
+ std::unique_ptr< PropertyValueMap > m_xProps;
+ bool m_bTrailingSlash;
+
+ static css::uno::Any m_aEmptyAny;
+
+ ContentProperties & operator=( const ContentProperties & ); // n.i.
+
+ const PropertyValue * get( const OUString & rName ) const;
+};
+
+class CachableContentProperties
+{
+private:
+ ContentProperties m_aProps;
+
+ CachableContentProperties & operator=( const CachableContentProperties & ); // n.i.
+ CachableContentProperties( const CachableContentProperties & ); // n.i.
+
+public:
+ explicit CachableContentProperties( const ContentProperties & rProps );
+
+ void addProperties( const ContentProperties & rProps );
+
+ void addProperties( const std::vector< DAVPropertyValue > & rProps );
+
+ bool containsAllNames(
+ const css::uno::Sequence< css::beans::Property >& rProps,
+ std::vector< OUString > & rNamesNotContained ) const
+ { return m_aProps.containsAllNames( rProps, rNamesNotContained ); }
+
+ const css::uno::Any &
+ getValue( const OUString & rName ) const
+ { return m_aProps.getValue( rName ); }
+
+ operator const ContentProperties & () const { return m_aProps; }
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.cxx b/ucb/source/ucp/webdav-curl/CurlSession.cxx
new file mode 100644
index 000000000000..0d384633d66a
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/CurlSession.cxx
@@ -0,0 +1,2550 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "CurlSession.hxx"
+
+#include "SerfLockStore.hxx"
+#include "DAVProperties.hxx"
+#include "UCBDeadPropertyValue.hxx"
+#include "webdavresponseparser.hxx"
+
+#include <comphelper/attributelist.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <comphelper/string.hxx>
+
+#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
+
+#include <officecfg/Inet.hxx>
+
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/io/Pipe.hpp>
+#include <com/sun/star/io/SequenceInputStream.hpp>
+#include <com/sun/star/io/SequenceOutputStream.hpp>
+#include <com/sun/star/xml/sax/Writer.hpp>
+
+#include <osl/time.h>
+#include <sal/log.hxx>
+#include <rtl/strbuf.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <config_version.h>
+
+#include <map>
+#include <optional>
+#include <tuple>
+#include <vector>
+
+using namespace ::com::sun::star;
+
+namespace
+{
+static void lock_cb(CURL*, curl_lock_data, curl_lock_access, void*);
+static void unlock_cb(CURL*, curl_lock_data, curl_lock_access, void*);
+
+/// globals container
+struct Init
+{
+ /// note: LockStore has its own mutex and calls CurlSession from its thread
+ /// so don't call LockStore with m_Mutex held to prevent deadlock.
+ ::http_dav_ucp::SerfLockStore LockStore;
+
+ /// libcurl shared data - to store cookies beyond one connection
+ ::std::mutex ShareLock[CURL_LOCK_DATA_LAST];
+ ::std::unique_ptr<CURLSH, http_dav_ucp::deleter_from_fn<CURLSH, curl_share_cleanup>> pShare;
+
+ Init()
+ {
+ if (curl_global_init(CURL_GLOBAL_ALL) != CURLE_OK)
+ {
+ assert(!"curl_global_init failed");
+ }
+ pShare.reset(curl_share_init());
+ if (!pShare)
+ {
+ assert(!"curl_share_init failed");
+ }
+ CURLSHcode sh = curl_share_setopt(pShare.get(), CURLSHOPT_LOCKFUNC, lock_cb);
+ assert(sh == CURLSHE_OK); // might fail but can't handle error here
+ sh = curl_share_setopt(pShare.get(), CURLSHOPT_UNLOCKFUNC, unlock_cb);
+ assert(sh == CURLSHE_OK); // might fail but can't handle error here
+ sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
+ assert(sh == CURLSHE_OK); // might fail but can't handle error here
+ sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
+ assert(sh == CURLSHE_OK); // might fail but can't handle error here
+ sh = curl_share_setopt(pShare.get(), CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
+ assert(sh == CURLSHE_OK); // might fail but can't handle error here
+ }
+ // do not call curl_global_cleanup() - this is not the only client of curl
+};
+Init g_Init;
+
+// global callbacks
+
+static void lock_cb(CURL* /*handle*/, curl_lock_data const data, curl_lock_access /*access*/,
+ void* /*userptr*/)
+{
+ assert(0 <= data && data < CURL_LOCK_DATA_LAST);
+ try
+ {
+ g_Init.ShareLock[data].lock();
+ }
+ catch (std::exception const&)
+ {
+ ::std::abort();
+ }
+}
+
+static void unlock_cb(CURL* /*handle*/, curl_lock_data const data, curl_lock_access /*access*/,
+ void* /*userptr*/)
+{
+ assert(0 <= data && data < CURL_LOCK_DATA_LAST);
+ g_Init.ShareLock[data].unlock();
+}
+
+struct ResponseHeaders
+{
+ ::std::vector<::std::pair<::std::vector<OString>, ::std::optional<long>>> HeaderFields;
+ CURL* pCurl;
+ ResponseHeaders(CURL* const i_pCurl)
+ : pCurl(i_pCurl)
+ {
+ }
+};
+
+auto GetResponseCode(ResponseHeaders const& rHeaders) -> ::std::optional<long>
+{
+ return (rHeaders.HeaderFields.empty()) ? ::std::optional<long>{}
+ : rHeaders.HeaderFields.back().second;
+}
+
+struct DownloadTarget
+{
+ uno::Reference<io::XOutputStream> xOutStream;
+ ResponseHeaders const& rHeaders;
+ DownloadTarget(uno::Reference<io::XOutputStream> const& i_xOutStream,
+ ResponseHeaders const& i_rHeaders)
+ : xOutStream(i_xOutStream)
+ , rHeaders(i_rHeaders)
+ {
+ }
+};
+
+struct UploadSource
+{
+ uno::Sequence<sal_Int8> const& rInData;
+ ResponseHeaders const& rHeaders;
+ size_t nPosition;
+ UploadSource(uno::Sequence<sal_Int8> const& i_rInData, ResponseHeaders const& i_rHeaders)
+ : rInData(i_rInData)
+ , rHeaders(i_rHeaders)
+ , nPosition(0)
+ {
+ }
+};
+
+auto GetErrorString(CURLcode const rc, char const* const pErrorBuffer = nullptr) -> OString
+{
+ char const* const pMessage( // static fallback
+ (pErrorBuffer && pErrorBuffer[0] != '\0') ? pErrorBuffer : curl_easy_strerror(rc));
+ return "(" + OString::number(sal_Int32(rc)) + ") " + pMessage;
+}
+
+auto GetErrorStringMulti(CURLMcode const mc) -> OString
+{
+ return "(" + OString::number(sal_Int32(mc)) + ") " + curl_multi_strerror(mc);
+}
+
+/// represent an option to be passed to curl_easy_setopt()
+struct CurlOption
+{
+ CURLoption const Option;
+ enum class Type
+ {
+ Pointer,
+ Long,
+ CurlOffT
+ };
+ Type const Tag;
+ union {
+ void const* const pValue;
+ long /*const*/ lValue;
+ curl_off_t /*const*/ cValue;
+ };
+ char const* const pExceptionString;
+
+ CurlOption(CURLoption const i_Option, void const* const i_Value,
+ char const* const i_pExceptionString)
+ : Option(i_Option)
+ , Tag(Type::Pointer)
+ , pValue(i_Value)
+ , pExceptionString(i_pExceptionString)
+ {
+ }
+ // Depending on platform, curl_off_t may be "long" or a larger type
+ // so cannot use overloading to distinguish these cases.
+ CurlOption(CURLoption const i_Option, curl_off_t const i_Value,
+ char const* const i_pExceptionString, Type const type = Type::Long)
+ : Option(i_Option)
+ , Tag(type)
+ , pExceptionString(i_pExceptionString)
+ {
+ static_assert(sizeof(long) <= sizeof(curl_off_t));
+ switch (type)
+ {
+ case Type::Long:
+ lValue = i_Value;
+ break;
+ case Type::CurlOffT:
+ cValue = i_Value;
+ break;
+ default:
+ assert(false);
+ }
+ }
+};
+
+/// combined guard class to ensure things are released in correct order,
+/// particularly in ProcessRequest() error handling
+class Guard
+{
+private:
+ /// mutex *first* because m_oGuard requires it
+ ::std::unique_lock<::std::mutex> m_Lock;
+ ::std::vector<CurlOption> const m_Options;
+ ::http_dav_ucp::CurlUri const& m_rURI;
+ CURL* const m_pCurl;
+
+public:
+ explicit Guard(::std::mutex& rMutex, ::std::vector<CurlOption> const& rOptions,
+ ::http_dav_ucp::CurlUri const& rURI, CURL* const pCurl)
+ : m_Lock(rMutex, ::std::defer_lock)
+ , m_Options(rOptions)
+ , m_rURI(rURI)
+ , m_pCurl(pCurl)
+ {
+ Acquire();
+ }
+ ~Guard()
+ {
+ if (m_Lock.owns_lock())
+ {
+ Release();
+ }
+ }
+
+ void Acquire()
+ {
+ assert(!m_Lock.owns_lock());
+ m_Lock.lock();
+ for (auto const& it : m_Options)
+ {
+ CURLcode rc(CURL_LAST); // warning C4701
+ if (it.Tag == CurlOption::Type::Pointer)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, it.pValue);
+ }
+ else if (it.Tag == CurlOption::Type::Long)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, it.lValue);
+ }
+ else if (it.Tag == CurlOption::Type::CurlOffT)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, it.cValue);
+ }
+ else
+ {
+ assert(false);
+ }
+ if (it.pExceptionString != nullptr)
+ {
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "set " << it.pExceptionString << " failed: " << GetErrorString(rc));
+ throw ::http_dav_ucp::DAVException(
+ ::http_dav_ucp::DAVException::DAV_SESSION_CREATE,
+ ::http_dav_ucp::ConnectionEndPointString(m_rURI.GetHost(),
+ m_rURI.GetPort()));
+ }
+ }
+ else // many of the options cannot fail
+ {
+ assert(rc == CURLE_OK);
+ }
+ }
+ }
+ void Release()
+ {
+ assert(m_Lock.owns_lock());
+ for (auto const& it : m_Options)
+ {
+ CURLcode rc(CURL_LAST); // warning C4701
+ if (it.Tag == CurlOption::Type::Pointer)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, nullptr);
+ }
+ else if (it.Tag == CurlOption::Type::Long)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, 0L);
+ }
+ else if (it.Tag == CurlOption::Type::CurlOffT)
+ {
+ rc = curl_easy_setopt(m_pCurl, it.Option, curl_off_t(-1));
+ }
+ else
+ {
+ assert(false);
+ }
+ assert(rc == CURLE_OK);
+ (void)rc;
+ }
+ m_Lock.unlock();
+ }
+};
+
+} // namespace
+
+namespace http_dav_ucp
+{
+// libcurl callbacks:
+
+static int debug_callback(CURL* handle, curl_infotype type, char* data, size_t size,
+ void* /*userdata*/)
+{
+ char const* pType(nullptr);
+ switch (type)
+ {
+ case CURLINFO_TEXT:
+ SAL_INFO("ucb.ucp.webdav.curl", "debug log: " << handle << ": " << data);
+ return 0;
+ case CURLINFO_HEADER_IN:
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "CURLINFO_HEADER_IN: " << handle << ": " << OString(data, size));
+ return 0;
+ case CURLINFO_HEADER_OUT:
+ {
+ // unlike IN, this is all headers in one call
+ OString tmp(data, size);
+ sal_Int32 const start(tmp.indexOf("Authorization: "));
+ if (start != -1)
+ {
+ sal_Int32 const end(tmp.indexOf("\r\n", start));
+ assert(end != -1);
+ sal_Int32 const len(SAL_N_ELEMENTS("Authorization: ") - 1);
+ tmp = tmp.replaceAt(start + len, end - start - len,
+ OString::number(end - start - len) + " bytes redacted");
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "CURLINFO_HEADER_OUT: " << handle << ": " << tmp);
+ return 0;
+ }
+ case CURLINFO_DATA_IN:
+ pType = "CURLINFO_DATA_IN";
+ break;
+ case CURLINFO_DATA_OUT:
+ pType = "CURLINFO_DATA_OUT";
+ break;
+ case CURLINFO_SSL_DATA_IN:
+ pType = "CURLINFO_SSL_DATA_IN";
+ break;
+ case CURLINFO_SSL_DATA_OUT:
+ pType = "CURLINFO_SSL_DATA_OUT";
+ break;
+ default:
+ SAL_WARN("ucb.ucp.webdav.curl", "unexpected debug log type");
+ return 0;
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "debug log: " << handle << ": " << pType << " " << size);
+ return 0;
+}
+
+static size_t write_callback(char* const ptr, size_t const size, size_t const nmemb,
+ void* const userdata)
+{
+ auto* const pTarget(static_cast<DownloadTarget*>(userdata));
+ if (!pTarget) // looks like ~every request may have a response body
+ {
+ return nmemb;
+ }
+ assert(size == 1); // says the man page
+ (void)size;
+ assert(pTarget->xOutStream.is());
+ auto const oResponseCode(GetResponseCode(pTarget->rHeaders));
+ if (!oResponseCode)
+ {
+ return 0; // that is an error
+ }
+ // always write, for exception handler in ProcessRequest()
+ // if (200 <= *oResponseCode && *oResponseCode < 300)
+ {
+ try
+ {
+ uno::Sequence<sal_Int8> const data(reinterpret_cast<sal_Int8*>(ptr), nmemb);
+ pTarget->xOutStream->writeBytes(data);
+ }
+ catch (...)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "exception in write_callback");
+ return 0; // error
+ }
+ }
+ // else: ignore the body? CurlSession will check the status eventually
+ return nmemb;
+}
+
+static size_t read_callback(char* const buffer, size_t const size, size_t const nitems,
+ void* const userdata)
+{
+ auto* const pSource(static_cast<UploadSource*>(userdata));
+ assert(pSource);
+ size_t const nBytes(size * nitems);
+ size_t nRet(0);
+ try
+ {
+ assert(pSource->nPosition <= o3tl::make_unsigned(pSource->rInData.getLength()));
+ nRet = ::std::min<size_t>(pSource->rInData.getLength() - pSource->nPosition, nBytes);
+ ::std::memcpy(buffer, pSource->rInData.getConstArray() + pSource->nPosition, nRet);
+ pSource->nPosition += nRet;
+ }
+ catch (...)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "exception in read_callback");
+ return CURL_READFUNC_ABORT; // error
+ }
+ return nRet;
+}
+
+static size_t header_callback(char* const buffer, size_t const size, size_t const nitems,
+ void* const userdata)
+{
+ auto* const pHeaders(static_cast<ResponseHeaders*>(userdata));
+ assert(pHeaders);
+#if 0
+ if (!pHeaders) // TODO maybe not needed in every request? not sure
+ {
+ return nitems;
+ }
+#endif
+ assert(size == 1); // says the man page
+ (void)size;
+ try
+ {
+ if (nitems <= 2)
+ {
+ // end of header, body follows...
+ if (pHeaders->HeaderFields.empty())
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "header_callback: empty header?");
+ return 0; // error
+ }
+ // unfortunately there's no separate callback when the body begins,
+ // so have to manually retrieve the status code here
+ long statusCode(SC_NONE);
+ auto rc = curl_easy_getinfo(pHeaders->pCurl, CURLINFO_RESPONSE_CODE, &statusCode);
+ assert(rc == CURLE_OK);
+ (void)rc;
+ // always put the current response code here - wasn't necessarily in this header
+ pHeaders->HeaderFields.back().second.emplace(statusCode);
+ }
+ else if (buffer[0] == ' ' || buffer[0] == '\t') // folded header field?
+ {
+ size_t i(0);
+ do
+ {
+ ++i;
+ } while (i == ' ' || i == '\t');
+ if (pHeaders->HeaderFields.empty() || pHeaders->HeaderFields.back().second
+ || pHeaders->HeaderFields.back().first.empty())
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "header_callback: folded header field without start");
+ return 0; // error
+ }
+ pHeaders->HeaderFields.back().first.back()
+ += OString(" ") + OString(&buffer[i], nitems - i);
+ }
+ else
+ {
+ if (pHeaders->HeaderFields.empty() || pHeaders->HeaderFields.back().second)
+ {
+ pHeaders->HeaderFields.emplace_back();
+ }
+ pHeaders->HeaderFields.back().first.emplace_back(OString(buffer, nitems));
+ }
+ }
+ catch (...)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "exception in header_callback");
+ return 0; // error
+ }
+ return nitems;
+}
+
+static auto ProcessHeaders(::std::vector<OString> const& rHeaders) -> ::std::map<OUString, OUString>
+{
+ ::std::map<OUString, OUString> ret;
+ for (OString const& rLine : rHeaders)
+ {
+ OString line;
+ if (!rLine.endsWith("\r\n", &line))
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "invalid header field (no CRLF)");
+ continue;
+ }
+ if (line.startsWith("HTTP/") // first line
+ || line.isEmpty()) // last line
+ {
+ continue;
+ }
+ auto const nColon(line.indexOf(':'));
+ if (nColon == -1)
+ {
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "invalid header field (no :)");
+ }
+ continue;
+ }
+ if (nColon == 0)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "invalid header field (empty name)");
+ continue;
+ }
+ // case insensitive; must be ASCII
+ auto const name(::rtl::OStringToOUString(line.copy(0, nColon).toAsciiLowerCase(),
+ RTL_TEXTENCODING_ASCII_US));
+ sal_Int32 nStart(nColon + 1);
+ while (nStart < line.getLength() && (line[nStart] == ' ' || line[nStart] == '\t'))
+ {
+ ++nStart;
+ }
+ sal_Int32 nEnd(line.getLength());
+ while (nStart < nEnd && (line[nEnd - 1] == ' ' || line[nEnd - 1] == '\t'))
+ {
+ --nEnd;
+ }
+ // RFC 7230 says that only ASCII works reliably anyway (neon also did this)
+ auto const value(
+ ::rtl::OStringToOUString(line.copy(nStart, nEnd - nStart), RTL_TEXTENCODING_ASCII_US));
+ auto const it(ret.find(name));
+ if (it != ret.end())
+ {
+ it->second = it->second + "," + value;
+ }
+ else
+ {
+ ret[name] = value;
+ }
+ }
+ return ret;
+}
+
+static auto ExtractRequestedHeaders(
+ ResponseHeaders const& rHeaders,
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const* const pRequestedHeaders)
+ -> void
+{
+ ::std::map<OUString, OUString> const headerMap(
+ ProcessHeaders(rHeaders.HeaderFields.back().first));
+ if (pRequestedHeaders)
+ {
+ for (OUString const& rHeader : pRequestedHeaders->first)
+ {
+ auto const it(headerMap.find(rHeader.toAsciiLowerCase()));
+ if (it != headerMap.end())
+ {
+ DAVPropertyValue value;
+ value.IsCaseSensitive = false;
+ value.Name = it->first;
+ value.Value <<= it->second;
+ pRequestedHeaders->second.properties.push_back(value);
+ }
+ }
+ }
+}
+
+// this appears to be the only way to get the "realm" from libcurl
+static auto ExtractRealm(ResponseHeaders const& rHeaders, char const* const pAuthHeaderName)
+ -> ::std::optional<OUString>
+{
+ ::std::map<OUString, OUString> const headerMap(
+ ProcessHeaders(rHeaders.HeaderFields.back().first));
+ auto const it(headerMap.find(OUString::createFromAscii(pAuthHeaderName).toAsciiLowerCase()));
+ if (it == headerMap.end())
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "cannot find auth header");
+ return {};
+ }
+ // It may be possible that the header contains multiple methods each with
+ // a different realm - extract only the first one bc the downstream API
+ // only supports one anyway.
+ // case insensitive!
+ auto i(it->second.toAsciiLowerCase().indexOf("realm="));
+ // is optional
+ if (i == -1)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "auth header has no realm");
+ return {};
+ }
+ // no whitespace allowed before or after =
+ i += ::std::strlen("realm=");
+ if (it->second.getLength() < i + 2 || it->second[i] != '\"')
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "no realm value");
+ return {};
+ }
+ ++i;
+ OUStringBuffer buf;
+ while (i < it->second.getLength() && it->second[i] != '\"')
+ {
+ if (it->second[i] == '\\') // quoted-pair escape
+ {
+ ++i;
+ if (it->second.getLength() <= i)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "unterminated quoted-pair");
+ return {};
+ }
+ }
+ buf.append(it->second[i]);
+ ++i;
+ }
+ if (it->second.getLength() <= i)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "unterminated realm");
+ return {};
+ }
+ return buf.makeStringAndClear();
+}
+
+CurlSession::CurlSession(uno::Reference<uno::XComponentContext> const& xContext,
+ ::rtl::Reference<DAVSessionFactory> const& rpFactory, OUString const& rURI,
+ uno::Sequence<beans::NamedValue> const& rFlags,
+ ::ucbhelper::InternetProxyDecider const& rProxyDecider)
+ : DAVSession(rpFactory)
+ , m_xContext(xContext)
+ , m_Flags(rFlags)
+ , m_URI(rURI)
+ , m_Proxy(rProxyDecider.getProxy(m_URI.GetScheme(), m_URI.GetHost(), m_URI.GetPort()))
+{
+ assert(m_URI.GetScheme() == "http" || m_URI.GetScheme() == "https");
+ m_pCurlMulti.reset(curl_multi_init());
+ if (!m_pCurlMulti)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_multi_init failed");
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ m_pCurl.reset(curl_easy_init());
+ if (!m_pCurl)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_easy_init failed");
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ curl_version_info_data const* const pVersion(curl_version_info(CURLVERSION_NOW));
+ assert(pVersion);
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "curl version: " << pVersion->version << " " << pVersion->host
+ << " features: " << ::std::hex << pVersion->features << " ssl: "
+ << pVersion->ssl_version << " libz: " << pVersion->libz_version);
+ // Make sure a User-Agent header is always included, as at least
+ // en.wikipedia.org:80 forces back 403 "Scripts should use an informative
+ // User-Agent string with contact information, or they may be IP-blocked
+ // without notice" otherwise:
+ OString const useragent(OString("LibreOffice " LIBO_VERSION_DOTTED " denylistedbackend/")
+ + OString(pVersion->version, strlen(pVersion->version)) + " "
+ + pVersion->ssl_version);
+ // looks like an explicit "User-Agent" header in CURLOPT_HTTPHEADER
+ // will override CURLOPT_USERAGENT, see Curl_http_useragent(), so no need
+ // to check anything here
+ auto rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_USERAGENT, useragent.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_USERAGENT failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ m_ErrorBuffer[0] = '\0';
+ // this supposedly gives the highest quality error reporting
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_ERRORBUFFER, m_ErrorBuffer);
+ assert(rc == CURLE_OK);
+#if 1
+ // just for debugging...
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_DEBUGFUNCTION, debug_callback);
+ assert(rc == CURLE_OK);
+#endif
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_VERBOSE, 1L);
+ assert(rc == CURLE_OK);
+ // accept any encoding supported by libcurl
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_ACCEPT_ENCODING, "");
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_ACCEPT_ENCODING failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ auto const connectTimeout(officecfg::Inet::Settings::ConnectTimeout::get(m_xContext));
+ // default is 300s
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_CONNECTTIMEOUT,
+ ::std::max<long>(2L, ::std::min<long>(connectTimeout, 180L)));
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_CONNECTTIMEOUT failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ auto const readTimeout(officecfg::Inet::Settings::ReadTimeout::get(m_xContext));
+ m_nReadTimeout = ::std::max<int>(20, ::std::min<long>(readTimeout, 180)) * 1000;
+ // default is infinite
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_TIMEOUT, 300L);
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_TIMEOUT failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_URI.GetHost(), m_URI.GetPort()));
+ }
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_WRITEFUNCTION, &write_callback);
+ assert(rc == CURLE_OK);
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_READFUNCTION, &read_callback);
+ assert(rc == CURLE_OK);
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_HEADERFUNCTION, &header_callback);
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_SHARE, g_Init.pShare.get());
+ assert(rc == CURLE_OK);
+ // tdf#149921 by default, with schannel (WNT) connection fails if revocation
+ // lists cannot be checked; try to limit the checking to when revocation
+ // lists can actually be retrieved (usually not the case for self-signed CA)
+#if CURL_AT_LEAST_VERSION(7, 70, 0)
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT);
+ assert(rc == CURLE_OK);
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_PROXY_SSL_OPTIONS, CURLSSLOPT_REVOKE_BEST_EFFORT);
+ assert(rc == CURLE_OK);
+#endif
+ // set this initially, may be overwritten during authentication
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_HTTPAUTH, CURLAUTH_ANY);
+ assert(rc == CURLE_OK); // ANY is always available
+ // always set CURLOPT_PROXY to suppress proxy detection in libcurl
+ OString const utf8Proxy(OUStringToOString(m_Proxy.aName, RTL_TEXTENCODING_UTF8));
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_PROXY, utf8Proxy.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_PROXY failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(m_Proxy.aName, m_Proxy.nPort));
+ }
+ if (!m_Proxy.aName.isEmpty())
+ {
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_PROXYPORT, static_cast<long>(m_Proxy.nPort));
+ assert(rc == CURLE_OK);
+ // set this initially, may be overwritten during authentication
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_PROXYAUTH, CURLAUTH_ANY);
+ assert(rc == CURLE_OK); // ANY is always available
+ }
+ auto const it(::std::find_if(m_Flags.begin(), m_Flags.end(),
+ [](auto const& rFlag) { return rFlag.Name == "KeepAlive"; }));
+ if (it != m_Flags.end() && it->Value.get<bool>())
+ {
+ // neon would close the connection from ne_end_request(), this seems
+ // to be the equivalent and not CURLOPT_TCP_KEEPALIVE
+ rc = curl_easy_setopt(m_pCurl.get(), CURLOPT_FORBID_REUSE, 1L);
+ assert(rc == CURLE_OK);
+ }
+}
+
+CurlSession::~CurlSession() {}
+
+auto CurlSession::CanUse(OUString const& rURI, uno::Sequence<beans::NamedValue> const& rFlags)
+ -> bool
+{
+ try
+ {
+ CurlUri const uri(rURI);
+
+ return m_URI.GetScheme() == uri.GetScheme() && m_URI.GetHost() == uri.GetHost()
+ && m_URI.GetPort() == uri.GetPort() && m_Flags == rFlags;
+ }
+ catch (DAVException const&)
+ {
+ return false;
+ }
+}
+
+auto CurlSession::UsesProxy() -> bool
+{
+ assert(m_URI.GetScheme() == "http" || m_URI.GetScheme() == "https");
+ return !m_Proxy.aName.isEmpty();
+}
+
+auto CurlSession::abort() -> void
+{
+ // note: abort() was a no-op since OOo 3.2 and before that it crashed.
+ bool expected(false);
+ // it would be pointless to lock m_Mutex here as the other thread holds it
+ if (m_AbortFlag.compare_exchange_strong(expected, true))
+ {
+ // This function looks safe to call without m_Mutex as long as the
+ // m_pCurlMulti handle is not destroyed, and the caller must own a ref
+ // to this object which keeps it alive; it should cause poll to return.
+ curl_multi_wakeup(m_pCurlMulti.get());
+ }
+}
+
+/// this is just a bunch of static member functions called from CurlSession
+struct CurlProcessor
+{
+ static auto URIReferenceToURI(CurlSession& rSession, OUString const& rURIReference) -> CurlUri;
+
+ static auto ProcessRequestImpl(
+ CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+ curl_slist* pRequestHeaderList, uno::Reference<io::XOutputStream> const* pxOutStream,
+ uno::Sequence<sal_Int8> const* pInData,
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const* pRequestedHeaders,
+ ResponseHeaders& rHeaders) -> void;
+
+ static auto ProcessRequest(
+ CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+ ::std::vector<CurlOption> const& rOptions, DAVRequestEnvironment const* pEnv,
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>>
+ pRequestHeaderList,
+ uno::Reference<io::XOutputStream> const* pxOutStream,
+ uno::Reference<io::XInputStream> const* pxInStream,
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const* pRequestedHeaders) -> void;
+
+ static auto
+ PropFind(CurlSession& rSession, CurlUri const& rURI, Depth depth,
+ ::std::tuple<::std::vector<OUString> const&, ::std::vector<DAVResource>* const,
+ ::std::vector<ucb::Lock>* const> const* o_pRequestedProperties,
+ ::std::vector<DAVResourceInfo>* const o_pResourceInfos,
+ DAVRequestEnvironment const& rEnv) -> void;
+
+ static auto MoveOrCopy(CurlSession& rSession, OUString const& rSourceURIReference,
+ ::std::u16string_view rDestinationURI, DAVRequestEnvironment const& rEnv,
+ bool isOverwrite, char const* pMethod) -> void;
+
+ static auto Lock(CurlSession& rSession, CurlUri const& rURI, DAVRequestEnvironment const* pEnv,
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>>
+ pRequestHeaderList,
+ uno::Reference<io::XInputStream> const* pxInStream)
+ -> ::std::vector<::std::pair<ucb::Lock, sal_Int32>>;
+
+ static auto Unlock(CurlSession& rSession, CurlUri const& rURI,
+ DAVRequestEnvironment const* pEnv) -> void;
+};
+
+auto CurlProcessor::URIReferenceToURI(CurlSession& rSession, OUString const& rURIReference)
+ -> CurlUri
+{
+ // No need to acquire rSession.m_Mutex because accessed members are const.
+ if (rSession.UsesProxy())
+ // very odd, but see DAVResourceAccess::getRequestURI() :-/
+ {
+ assert(rURIReference.startsWith("http://") || rURIReference.startsWith("https://"));
+ return CurlUri(rURIReference);
+ }
+ else
+ {
+ assert(rURIReference.startsWith("/"));
+ return rSession.m_URI.CloneWithRelativeRefPathAbsolute(rURIReference);
+ }
+}
+
+/// main function to initiate libcurl requests
+auto CurlProcessor::ProcessRequestImpl(
+ CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+ curl_slist* const pRequestHeaderList,
+ uno::Reference<io::XOutputStream> const* const pxOutStream,
+ uno::Sequence<sal_Int8> const* const pInData,
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const* const pRequestedHeaders,
+ ResponseHeaders& rHeaders) -> void
+{
+ ::comphelper::ScopeGuard const g([&]() {
+ auto rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HEADERDATA, nullptr);
+ assert(rc == CURLE_OK);
+ (void)rc;
+ if (pxOutStream)
+ {
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_WRITEDATA, nullptr);
+ assert(rc == CURLE_OK);
+ }
+ if (pInData)
+ {
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_READDATA, nullptr);
+ assert(rc == CURLE_OK);
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_UPLOAD, 0L);
+ assert(rc == CURLE_OK);
+ }
+ if (pRequestHeaderList)
+ {
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPHEADER, nullptr);
+ assert(rc == CURLE_OK);
+ }
+ });
+
+ if (pRequestHeaderList)
+ {
+ auto rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPHEADER, pRequestHeaderList);
+ assert(rc == CURLE_OK);
+ (void)rc;
+ }
+
+ auto rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_CURLU, rURI.GetCURLU());
+ assert(rc == CURLE_OK); // can't fail since 7.63.0
+
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HEADERDATA, &rHeaders);
+ assert(rc == CURLE_OK);
+ ::std::optional<DownloadTarget> oDownloadTarget;
+ if (pxOutStream)
+ {
+ oDownloadTarget.emplace(*pxOutStream, rHeaders);
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_WRITEDATA, &*oDownloadTarget);
+ assert(rc == CURLE_OK);
+ }
+ ::std::optional<UploadSource> oUploadSource;
+ if (pInData)
+ {
+ oUploadSource.emplace(*pInData, rHeaders);
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_READDATA, &*oUploadSource);
+ assert(rc == CURLE_OK);
+ // libcurl won't upload without setting this
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_UPLOAD, 1L);
+ assert(rc == CURLE_OK);
+ }
+ rSession.m_ErrorBuffer[0] = '\0';
+
+ // note: easy handle must be added for *every* transfer!
+ // otherwise it gets stuck in MSTATE_MSGSENT forever after 1st transfer
+ auto mc = curl_multi_add_handle(rSession.m_pCurlMulti.get(), rSession.m_pCurl.get());
+ if (mc != CURLM_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_add_handle failed: " << GetErrorStringMulti(mc));
+ throw DAVException(
+ DAVException::DAV_SESSION_CREATE,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ }
+ ::comphelper::ScopeGuard const gg([&]() {
+ mc = curl_multi_remove_handle(rSession.m_pCurlMulti.get(), rSession.m_pCurl.get());
+ if (mc != CURLM_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_remove_handle failed: " << GetErrorStringMulti(mc));
+ }
+ });
+
+ // this is where libcurl actually does something
+ rc = CURL_LAST; // clear current value
+ int nRunning;
+ do
+ {
+ mc = curl_multi_perform(rSession.m_pCurlMulti.get(), &nRunning);
+ if (mc != CURLM_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_multi_perform failed: " << GetErrorStringMulti(mc));
+ throw DAVException(
+ DAVException::DAV_HTTP_CONNECT,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ }
+ if (nRunning == 0)
+ { // short request like HEAD on loopback could be done in first call
+ break;
+ }
+ int nFDs;
+ mc = curl_multi_poll(rSession.m_pCurlMulti.get(), nullptr, 0, rSession.m_nReadTimeout,
+ &nFDs);
+ if (mc != CURLM_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_multi_poll failed: " << GetErrorStringMulti(mc));
+ throw DAVException(
+ DAVException::DAV_HTTP_CONNECT,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ }
+ if (rSession.m_AbortFlag.load())
+ { // flag was set by abort() -> not sure what exception to throw?
+ throw DAVException(DAVException::DAV_HTTP_ERROR, "abort() was called", 0);
+ }
+ } while (nRunning != 0);
+ // there should be exactly 1 CURLMsg now, but the interface is
+ // extensible so future libcurl versions could yield additional things
+ do
+ {
+ CURLMsg const* const pMsg = curl_multi_info_read(rSession.m_pCurlMulti.get(), &nRunning);
+ if (pMsg && pMsg->msg == CURLMSG_DONE)
+ {
+ assert(pMsg->easy_handle == rSession.m_pCurl.get());
+ rc = pMsg->data.result;
+ }
+ else
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_multi_info_read unexpected result");
+ }
+ } while (nRunning != 0);
+
+ // error handling part 1: libcurl errors
+ if (rc != CURLE_OK)
+ {
+ // TODO: is there any value in extracting CURLINFO_OS_ERRNO
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "curl_easy_perform failed: " << GetErrorString(rc, rSession.m_ErrorBuffer));
+ switch (rc)
+ {
+ case CURLE_COULDNT_RESOLVE_PROXY:
+ throw DAVException(
+ DAVException::DAV_HTTP_LOOKUP,
+ ConnectionEndPointString(rSession.m_Proxy.aName, rSession.m_Proxy.nPort));
+ case CURLE_COULDNT_RESOLVE_HOST:
+ throw DAVException(
+ DAVException::DAV_HTTP_LOOKUP,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ case CURLE_COULDNT_CONNECT:
+ case CURLE_SSL_CONNECT_ERROR:
+ case CURLE_SSL_CERTPROBLEM:
+ case CURLE_SSL_CIPHER:
+ case CURLE_PEER_FAILED_VERIFICATION:
+ case CURLE_SSL_ISSUER_ERROR:
+ case CURLE_SSL_PINNEDPUBKEYNOTMATCH:
+ case CURLE_SSL_INVALIDCERTSTATUS:
+ case CURLE_FAILED_INIT:
+#if CURL_AT_LEAST_VERSION(7, 69, 0)
+ case CURLE_QUIC_CONNECT_ERROR:
+#endif
+ throw DAVException(
+ DAVException::DAV_HTTP_CONNECT,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ case CURLE_REMOTE_ACCESS_DENIED:
+ case CURLE_LOGIN_DENIED:
+ case CURLE_AUTH_ERROR:
+ throw DAVException(
+ DAVException::DAV_HTTP_AUTH, // probably?
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ case CURLE_WRITE_ERROR:
+ case CURLE_READ_ERROR: // error returned from our callbacks
+ case CURLE_OUT_OF_MEMORY:
+ case CURLE_ABORTED_BY_CALLBACK:
+ case CURLE_BAD_FUNCTION_ARGUMENT:
+ case CURLE_SEND_ERROR:
+ case CURLE_RECV_ERROR:
+ case CURLE_SSL_CACERT_BADFILE:
+ case CURLE_SSL_CRL_BADFILE:
+ case CURLE_RECURSIVE_API_CALL:
+ throw DAVException(
+ DAVException::DAV_HTTP_FAILED,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ case CURLE_OPERATION_TIMEDOUT:
+ throw DAVException(
+ DAVException::DAV_HTTP_TIMEOUT,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ default: // lots of generic errors
+ throw DAVException(DAVException::DAV_HTTP_ERROR, "", 0);
+ }
+ }
+ // error handling part 2: HTTP status codes
+ long statusCode(SC_NONE);
+ rc = curl_easy_getinfo(rSession.m_pCurl.get(), CURLINFO_RESPONSE_CODE, &statusCode);
+ assert(rc == CURLE_OK);
+ assert(statusCode != SC_NONE); // ??? should be error returned from perform?
+ SAL_INFO("ucb.ucp.webdav.curl", "HTTP status code: " << statusCode);
+ if (statusCode < 300)
+ {
+ // neon did this regardless of status or even error, which seems odd
+ ExtractRequestedHeaders(rHeaders, pRequestedHeaders);
+ }
+ else
+ {
+ // create message containing the HTTP method and response status line
+ OUString statusLine("\n" + rMethod + "\n=>\n");
+ if (!rHeaders.HeaderFields.empty() && !rHeaders.HeaderFields.back().first.empty()
+ && rHeaders.HeaderFields.back().first.front().startsWith("HTTP"))
+ {
+ statusLine += ::rtl::OStringToOUString(
+ rHeaders.HeaderFields.back().first.front().trim(), RTL_TEXTENCODING_ASCII_US);
+ }
+ switch (statusCode)
+ {
+ case SC_REQUEST_TIMEOUT:
+ {
+ throw DAVException(
+ DAVException::DAV_HTTP_TIMEOUT,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ break;
+ }
+ case SC_MOVED_PERMANENTLY:
+ case SC_MOVED_TEMPORARILY:
+ case SC_SEE_OTHER:
+ case SC_TEMPORARY_REDIRECT:
+ {
+ // could also use CURLOPT_FOLLOWLOCATION but apparently the
+ // upper layer wants to know about redirects?
+ char* pRedirectURL(nullptr);
+ rc = curl_easy_getinfo(rSession.m_pCurl.get(), CURLINFO_REDIRECT_URL,
+ &pRedirectURL);
+ assert(rc == CURLE_OK);
+ if (pRedirectURL)
+ {
+ // Sharepoint 2016 workaround: contains unencoded U+0020
+ OUString const redirectURL(::rtl::Uri::encode(
+ pRedirectURL
+ ? OUString(pRedirectURL, strlen(pRedirectURL), RTL_TEXTENCODING_UTF8)
+ : OUString(),
+ rtl_UriCharClassUric, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8));
+
+ throw DAVException(DAVException::DAV_HTTP_REDIRECT, redirectURL);
+ }
+ [[fallthrough]];
+ }
+ default:
+ throw DAVException(DAVException::DAV_HTTP_ERROR, statusLine, statusCode);
+ }
+ }
+
+ if (pxOutStream)
+ {
+ (*pxOutStream)->closeOutput(); // signal EOF
+ }
+}
+
+static auto TryRemoveExpiredLockToken(CurlSession& rSession, CurlUri const& rURI,
+ DAVRequestEnvironment const* const pEnv) -> bool
+{
+ if (!pEnv)
+ {
+ // caller was a NonInteractive_*LOCK function anyway, its caller is LockStore
+ return false;
+ }
+ OUString const* const pToken(g_Init.LockStore.getLockTokenForURI(rURI.GetURI(), nullptr));
+ if (!pToken)
+ {
+ return false;
+ }
+ try
+ {
+ // determine validity of existing lock via lockdiscovery request
+ ::std::vector<OUString> const propertyNames{ DAVProperties::LOCKDISCOVERY };
+ ::std::vector<ucb::Lock> locks;
+ ::std::tuple<::std::vector<OUString> const&, ::std::vector<DAVResource>* const,
+ ::std::vector<ucb::Lock>* const> const args(propertyNames, nullptr, &locks);
+
+ CurlProcessor::PropFind(rSession, rURI, DAVZERO, &args, nullptr, *pEnv);
+
+ // https://datatracker.ietf.org/doc/html/rfc4918#section-15.8
+ // The response MAY not contain tokens, but hopefully it
+ // will if client is properly authenticated.
+ if (::std::any_of(locks.begin(), locks.end(), [pToken](ucb::Lock const& rLock) {
+ return ::std::any_of(
+ rLock.LockTokens.begin(), rLock.LockTokens.end(),
+ [pToken](OUString const& rToken) { return *pToken == rToken; });
+ }))
+ {
+ return false; // still have the lock
+ }
+
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "lock token expired, removing: " << rURI.GetURI() << " " << *pToken);
+ g_Init.LockStore.removeLock(rURI.GetURI());
+ return true;
+ }
+ catch (DAVException const&)
+ {
+ return false; // ignore, the caller already has a better exception
+ }
+}
+
+auto CurlProcessor::ProcessRequest(
+ CurlSession& rSession, CurlUri const& rURI, OUString const& rMethod,
+ ::std::vector<CurlOption> const& rOptions, DAVRequestEnvironment const* const pEnv,
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>>
+ pRequestHeaderList,
+ uno::Reference<io::XOutputStream> const* const pxOutStream,
+ uno::Reference<io::XInputStream> const* const pxInStream,
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const* const pRequestedHeaders)
+ -> void
+{
+ if (pEnv)
+ { // add custom request headers passed by caller
+ for (auto const& rHeader : pEnv->m_aRequestHeaders)
+ {
+ OString const utf8Header(
+ OUStringToOString(rHeader.first, RTL_TEXTENCODING_ASCII_US) + ": "
+ + OUStringToOString(rHeader.second, RTL_TEXTENCODING_ASCII_US));
+ pRequestHeaderList.reset(
+ curl_slist_append(pRequestHeaderList.release(), utf8Header.getStr()));
+ if (!pRequestHeaderList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ }
+ }
+
+ uno::Sequence<sal_Int8> data;
+ if (pxInStream)
+ {
+ uno::Reference<io::XSeekable> const xSeekable(*pxInStream, uno::UNO_QUERY);
+ if (xSeekable.is())
+ {
+ auto const len(xSeekable->getLength() - xSeekable->getPosition());
+ if ((**pxInStream).readBytes(data, len) != len)
+ {
+ throw uno::RuntimeException("short readBytes");
+ }
+ }
+ else
+ {
+ ::std::vector<uno::Sequence<sal_Int8>> bufs;
+ bool isDone(false);
+ do
+ {
+ bufs.emplace_back();
+ isDone = (**pxInStream).readSomeBytes(bufs.back(), 65536) == 0;
+ } while (!isDone);
+ sal_Int32 nSize(0);
+ for (auto const& rBuf : bufs)
+ {
+ if (o3tl::checked_add(nSize, rBuf.getLength(), nSize))
+ {
+ throw std::bad_alloc(); // too large for Sequence
+ }
+ }
+ data.realloc(nSize);
+ size_t nCopied(0);
+ for (auto const& rBuf : bufs)
+ {
+ ::std::memcpy(data.getArray() + nCopied, rBuf.getConstArray(), rBuf.getLength());
+ nCopied += rBuf.getLength(); // can't overflow
+ }
+ }
+ }
+
+ // Clear flag before transfer starts; only a transfer started before
+ // calling abort() will be aborted, not one started later.
+ rSession.m_AbortFlag.store(false);
+
+ Guard guard(rSession.m_Mutex, rOptions, rURI, rSession.m_pCurl.get());
+
+ // authentication data may be in the URI, or requested via XInteractionHandler
+ struct Auth
+ {
+ OUString UserName;
+ OUString PassWord;
+ decltype(CURLAUTH_ANY) AuthMask; ///< allowed auth methods
+ Auth(OUString const& rUserName, OUString const& rPassword,
+ decltype(CURLAUTH_ANY) const & rAuthMask)
+ : UserName(rUserName)
+ , PassWord(rPassword)
+ , AuthMask(rAuthMask)
+ {
+ }
+ };
+ ::std::optional<Auth> oAuth;
+ ::std::optional<Auth> oAuthProxy;
+ if (pEnv && !rSession.m_isAuthenticatedProxy && !rSession.m_Proxy.aName.isEmpty())
+ {
+ try
+ {
+ // the hope is that this must be a URI
+ CurlUri const uri(rSession.m_Proxy.aName);
+ if (!uri.GetUser().isEmpty() || !uri.GetPassword().isEmpty())
+ {
+ oAuthProxy.emplace(uri.GetUser(), uri.GetPassword(), CURLAUTH_ANY);
+ }
+ }
+ catch (DAVException&)
+ {
+ // ignore any parsing failure here
+ }
+ }
+ decltype(CURLAUTH_ANY) const authSystem(CURLAUTH_NEGOTIATE | CURLAUTH_NTLM | CURLAUTH_NTLM_WB);
+ if (pRequestedHeaders || (pEnv && !rSession.m_isAuthenticated))
+ {
+ // m_aRequestURI *may* be a path or *may* be URI - wtf
+ // TODO: why is there this m_aRequestURI and also rURIReference argument?
+ // ... only caller is DAVResourceAccess - always identical except MOVE/COPY
+ // which doesn't work if it's just a URI reference so let's just use
+ // rURIReference via rURI instead
+#if 0
+ CurlUri const uri(pEnv->m_aRequestURI);
+#endif
+ // note: due to parsing bug pwd didn't work in previous webdav ucps
+ if (pEnv && !rSession.m_isAuthenticated
+ && (!rURI.GetUser().isEmpty() || !rURI.GetPassword().isEmpty()))
+ {
+ oAuth.emplace(rURI.GetUser(), rURI.GetPassword(), CURLAUTH_ANY);
+ }
+ if (pRequestedHeaders)
+ {
+ // note: Previously this would be the rURIReference directly but
+ // that ends up in CurlUri anyway and curl is unhappy.
+ // But it looks like all consumers of this .uri are interested
+ // only in the path, so it shouldn't make a difference to give
+ // the entire URI when the caller extracts the path anyway.
+ pRequestedHeaders->second.uri = rURI.GetURI();
+ pRequestedHeaders->second.properties.clear();
+ }
+ }
+ bool isRetry(false);
+ int nAuthRequests(0);
+ int nAuthRequestsProxy(0);
+ OString cookies;
+
+ // libcurl does not have an authentication callback so handle auth
+ // related status codes and requesting credentials via this loop
+ do
+ {
+ isRetry = false;
+
+ // re-check m_isAuthenticated flags every time, could have been set
+ // by re-entrant call
+ if (oAuth && !rSession.m_isAuthenticated)
+ {
+ OString const utf8UserName(OUStringToOString(oAuth->UserName, RTL_TEXTENCODING_UTF8));
+ auto rc
+ = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_USERNAME, utf8UserName.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_USERNAME failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ OString const utf8PassWord(OUStringToOString(oAuth->PassWord, RTL_TEXTENCODING_UTF8));
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PASSWORD, utf8PassWord.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CURLOPT_PASSWORD failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH, oAuth->AuthMask);
+ if (rc != CURLE_OK)
+ { // NEGOTIATE typically disabled on Linux, NTLM is optional too
+ assert(rc == CURLE_NOT_BUILT_IN);
+ SAL_INFO("ucb.ucp.webdav.curl", "no auth method available");
+ throw DAVException(
+ DAVException::DAV_HTTP_NOAUTH,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ }
+ }
+
+ if (oAuthProxy && !rSession.m_isAuthenticatedProxy)
+ {
+ OString const utf8UserName(
+ OUStringToOString(oAuthProxy->UserName, RTL_TEXTENCODING_UTF8));
+ auto rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PROXYUSERNAME,
+ utf8UserName.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "CURLOPT_PROXYUSERNAME failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ OString const utf8PassWord(
+ OUStringToOString(oAuthProxy->PassWord, RTL_TEXTENCODING_UTF8));
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PROXYPASSWORD,
+ utf8PassWord.getStr());
+ if (rc != CURLE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "CURLOPT_PROXYPASSWORD failed: " << GetErrorString(rc));
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_PROXYAUTH, oAuthProxy->AuthMask);
+ if (rc != CURLE_OK)
+ { // NEGOTIATE typically disabled on Linux, NTLM is optional too
+ assert(rc == CURLE_NOT_BUILT_IN);
+ SAL_INFO("ucb.ucp.webdav.curl", "no auth method available");
+ throw DAVException(
+ DAVException::DAV_HTTP_NOAUTH,
+ ConnectionEndPointString(rSession.m_URI.GetHost(), rSession.m_URI.GetPort()));
+ }
+ }
+
+ ResponseHeaders headers(rSession.m_pCurl.get());
+ // always pass a stream for debug logging, buffer the result body
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(rSession.m_xContext));
+ uno::Reference<io::XOutputStream> const xTempOutStream(xSeqOutStream);
+ assert(xTempOutStream.is());
+
+ try
+ {
+ ProcessRequestImpl(rSession, rURI, rMethod, pRequestHeaderList.get(), &xTempOutStream,
+ pxInStream ? &data : nullptr, pRequestedHeaders, headers);
+ if (pxOutStream)
+ { // only copy to result stream if transfer was successful
+ (*pxOutStream)->writeBytes(xSeqOutStream->getWrittenBytes());
+ (*pxOutStream)->closeOutput(); // signal EOF
+ }
+ }
+ catch (DAVException const& rException)
+ {
+ // log start of request body if there was any
+ auto const bytes(xSeqOutStream->getWrittenBytes());
+ auto const len(::std::min<sal_Int32>(bytes.getLength(), 10000));
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "DAVException; (first) " << len << " bytes of data received:");
+ if (0 < len)
+ {
+ OStringBuffer buf(len);
+ for (sal_Int32 i = 0; i < len; ++i)
+ {
+ if (bytes[i] < 0x20) // also if negative
+ {
+ static char const hexDigit[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+ buf.append("\\x");
+ buf.append(hexDigit[static_cast<sal_uInt8>(bytes[i]) >> 4]);
+ buf.append(hexDigit[bytes[i] & 0x0F]);
+ }
+ else
+ {
+ buf.append(static_cast<char>(bytes[i]));
+ }
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", buf.makeStringAndClear());
+ }
+
+ // error handling part 3: special HTTP status codes
+ // that require unlocking m_Mutex to handle
+ if (rException.getError() == DAVException::DAV_HTTP_ERROR)
+ {
+ auto const statusCode(rException.getStatus());
+ switch (statusCode)
+ {
+ case SC_LOCKED:
+ {
+ guard.Release(); // release m_Mutex before accessing LockStore
+ if (g_Init.LockStore.getLockTokenForURI(rURI.GetURI(), nullptr))
+ {
+ throw DAVException(DAVException::DAV_LOCKED_SELF);
+ }
+ else // locked by third party
+ {
+ throw DAVException(DAVException::DAV_LOCKED);
+ }
+ break;
+ }
+ case SC_PRECONDITION_FAILED:
+ case SC_BAD_REQUEST:
+ {
+ guard.Release(); // release m_Mutex before accessing LockStore
+ // Not obvious but apparently these codes may indicate
+ // the expiration of a lock.
+ // Initiate a new request *outside* ProcessRequestImpl
+ // *after* rGuard.unlock() to avoid messing up m_pCurl state.
+ if (TryRemoveExpiredLockToken(rSession, rURI, pEnv))
+ {
+ throw DAVException(DAVException::DAV_LOCK_EXPIRED);
+ }
+ break;
+ }
+ case SC_FORBIDDEN:
+ {
+ ::std::map<OUString, OUString> const headerMap(
+ ProcessHeaders(headers.HeaderFields.back().first));
+ // X-MSDAVEXT_Error see [MS-WEBDAVE] 2.2.3.1.9
+ auto const it(headerMap.find("x-msdavext_error"));
+ if (it == headerMap.end() || !it->second.startsWith("917656;"))
+ {
+ break;
+ }
+ // both fallbacks need cookie engine enabled
+ CURLcode rc
+ = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIEFILE, "");
+ assert(rc == CURLE_OK);
+ if (cookies.isEmpty() // retry only once - could be expired...
+ && rSession.m_URI.GetScheme() == "https") // only encrypted
+ {
+ cookies
+ = TryImportCookies(rSession.m_xContext, rSession.m_URI.GetHost());
+ if (!cookies.isEmpty())
+ {
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_COOKIE,
+ cookies.getStr());
+ assert(rc == CURLE_OK);
+ (void)rc;
+ isRetry = true;
+ SAL_INFO("ucb.ucp.webdav.curl", "FedAuth cookie set");
+ break; // try cookie once
+ }
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "403 fallback authentication hack");
+ // disable 302 redirect
+ pRequestHeaderList.reset(curl_slist_append(
+ pRequestHeaderList.release(), "X-FORMS_BASED_AUTH_ACCEPTED: f"));
+ if (!pRequestHeaderList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ }
+ [[fallthrough]]; // SP, no cookie, or cookie failed: try NTLM
+ case SC_UNAUTHORIZED:
+ case SC_PROXY_AUTHENTICATION_REQUIRED:
+ {
+ (statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? rSession.m_isAuthenticated
+ : rSession.m_isAuthenticatedProxy)
+ = false; // any auth data in m_pCurl is invalid
+ auto& rnAuthRequests(statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? nAuthRequests
+ : nAuthRequestsProxy);
+ if (rnAuthRequests == 10)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "aborting authentication after "
+ << rnAuthRequests << " attempts");
+ }
+ else if (pEnv && pEnv->m_xAuthListener)
+ {
+ ::std::optional<OUString> const oRealm(
+ ExtractRealm(headers, statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? "WWW-Authenticate"
+ : "Proxy-Authenticate"));
+
+ ::std::optional<Auth>& roAuth(
+ statusCode != SC_PROXY_AUTHENTICATION_REQUIRED ? oAuth
+ : oAuthProxy);
+ OUString userName(roAuth ? roAuth->UserName : OUString());
+ OUString passWord(roAuth ? roAuth->PassWord : OUString());
+ long authAvail(0);
+ auto rc
+ = curl_easy_getinfo(rSession.m_pCurl.get(),
+ statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? CURLINFO_HTTPAUTH_AVAIL
+ : CURLINFO_PROXYAUTH_AVAIL,
+ &authAvail);
+ assert(rc == CURLE_OK);
+ if (statusCode == SC_FORBIDDEN)
+ { // SharePoint hack: try NTLM auth
+ assert(authAvail == 0);
+ // note: this must be a single value!
+ // would need 2 iterations to try CURLAUTH_NTLM too
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH,
+ CURLAUTH_NEGOTIATE);
+ if (rc == CURLE_OK)
+ {
+ authAvail = CURLAUTH_NEGOTIATE;
+ }
+ else
+ {
+ rc = curl_easy_setopt(rSession.m_pCurl.get(), CURLOPT_HTTPAUTH,
+ CURLAUTH_NTLM);
+ if (rc == CURLE_OK)
+ {
+ authAvail = CURLAUTH_NTLM;
+ }
+ else
+ { // can't work
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "no SP fallback auth method available");
+ throw DAVException(
+ DAVException::DAV_HTTP_NOAUTH,
+ ConnectionEndPointString(rSession.m_URI.GetHost(),
+ rSession.m_URI.GetPort()));
+ }
+ }
+ }
+ // only allow SystemCredentials once - the
+ // PasswordContainer may have stored it in the
+ // Config (TrySystemCredentialsFirst or
+ // AuthenticateUsingSystemCredentials) and then it
+ // will always force its use no matter how hopeless
+ bool const isSystemCredSupported((authAvail & authSystem) != 0
+ && rnAuthRequests == 0);
+ ++rnAuthRequests;
+
+ // Ask user via XInteractionHandler.
+ // Warning: This likely runs an event loop which may
+ // end up calling back into this instance, so all
+ // changes to m_pCurl must be undone now and
+ // restored after return.
+ guard.Release();
+
+ auto const ret = pEnv->m_xAuthListener->authenticate(
+ oRealm ? *oRealm : "",
+ statusCode != SC_PROXY_AUTHENTICATION_REQUIRED
+ ? rSession.m_URI.GetHost()
+ : rSession.m_Proxy.aName,
+ userName, passWord, isSystemCredSupported);
+
+ if (ret == 0)
+ {
+ // NTLM may either use a password requested
+ // from the user, or from the system via SSPI
+ // so i guess it should not be disabled here
+ // regardless of the state of the system auth
+ // checkbox, particularly since SSPI is only
+ // available on WNT.
+ // Additionally, "Negotiate" has a "legacy"
+ // mode that is actually just NTLM according to
+ // https://curl.se/rfc/ntlm.html#ntlmHttpAuthentication
+ // so there's nothing in authSystem that can be
+ // disabled here.
+ roAuth.emplace(userName, passWord,
+ ((userName.isEmpty() && passWord.isEmpty())
+ ? (authAvail & authSystem)
+ : authAvail));
+ isRetry = true;
+ // Acquire is only necessary in case of success.
+ guard.Acquire();
+ break; // break out of switch
+ }
+ // else: throw
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "no auth credentials provided");
+ throw DAVException(DAVException::DAV_HTTP_NOAUTH,
+ ConnectionEndPointString(rSession.m_URI.GetHost(),
+ rSession.m_URI.GetPort()));
+ break;
+ }
+ }
+ }
+ if (!isRetry)
+ {
+ throw; // everything else: re-throw
+ }
+ }
+ } while (isRetry);
+
+ if (oAuth)
+ {
+ // assume this worked, leave auth data as stored in m_pCurl
+ rSession.m_isAuthenticated = true;
+ }
+ if (oAuthProxy)
+ {
+ // assume this worked, leave auth data as stored in m_pCurl
+ rSession.m_isAuthenticatedProxy = true;
+ }
+}
+
+auto CurlSession::OPTIONS(OUString const& rURIReference,
+
+ DAVOptions& rOptions, DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "OPTIONS: " << rURIReference);
+
+ rOptions.init();
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<OUString> const headerNames{ "allow", "dav" };
+ DAVResource result;
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const headers(headerNames, result);
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, "OPTIONS",
+ "CURLOPT_CUSTOMREQUEST" } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "OPTIONS", options, &rEnv, nullptr, nullptr, nullptr,
+ &headers);
+
+ for (auto const& it : result.properties)
+ {
+ OUString value;
+ it.Value >>= value;
+ SAL_INFO("ucb.ucp.webdav.curl", "OPTIONS: header: " << it.Name << ": " << value);
+ if (it.Name.equalsIgnoreAsciiCase("allow"))
+ {
+ rOptions.setAllowedMethods(value);
+ }
+ else if (it.Name.equalsIgnoreAsciiCase("dav"))
+ {
+ // see <http://tools.ietf.org/html/rfc4918#section-10.1>,
+ // <http://tools.ietf.org/html/rfc4918#section-18>,
+ // and <http://tools.ietf.org/html/rfc7230#section-3.2>
+ // we detect the class (1, 2 and 3), other elements (token, URL)
+ // are not used for now
+ auto const list(::comphelper::string::convertCommaSeparated(value));
+ for (OUString const& v : list)
+ {
+ if (v == "1")
+ {
+ rOptions.setClass1();
+ }
+ else if (v == "2")
+ {
+ rOptions.setClass2();
+ }
+ else if (v == "3")
+ {
+ rOptions.setClass3();
+ }
+ }
+ }
+ }
+ if (rOptions.isClass2() || rOptions.isClass3())
+ {
+ if (g_Init.LockStore.getLockTokenForURI(uri.GetURI(), nullptr))
+ {
+ rOptions.setLocked();
+ }
+ }
+}
+
+auto CurlProcessor::PropFind(
+ CurlSession& rSession, CurlUri const& rURI, Depth const nDepth,
+ ::std::tuple<::std::vector<OUString> const&, ::std::vector<DAVResource>* const,
+ ::std::vector<ucb::Lock>* const> const* const o_pRequestedProperties,
+ ::std::vector<DAVResourceInfo>* const o_pResourceInfos, DAVRequestEnvironment const& rEnv)
+ -> void
+{
+ assert((o_pRequestedProperties != nullptr) != (o_pResourceInfos != nullptr));
+ assert((o_pRequestedProperties == nullptr)
+ || (::std::get<1>(*o_pRequestedProperties) != nullptr)
+ != (::std::get<2>(*o_pRequestedProperties) != nullptr));
+
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList;
+ pList.reset(curl_slist_append(pList.release(), "Content-Type: application/xml"));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString depth;
+ switch (nDepth)
+ {
+ case DAVZERO:
+ depth = "Depth: 0";
+ break;
+ case DAVONE:
+ depth = "Depth: 1";
+ break;
+ case DAVINFINITY:
+ depth = "Depth: infinity";
+ break;
+ default:
+ assert(false);
+ }
+ pList.reset(curl_slist_append(pList.release(), depth.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(rSession.m_xContext));
+ uno::Reference<io::XOutputStream> const xRequestOutStream(xSeqOutStream);
+ assert(xRequestOutStream.is());
+
+ uno::Reference<xml::sax::XWriter> const xWriter(xml::sax::Writer::create(rSession.m_xContext));
+ xWriter->setOutputStream(xRequestOutStream);
+ xWriter->startDocument();
+ rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
+ pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
+ xWriter->startElement("propfind", pAttrList.get());
+ if (o_pResourceInfos)
+ {
+ xWriter->startElement("propname", nullptr);
+ xWriter->endElement("propname");
+ }
+ else
+ {
+ if (::std::get<0>(*o_pRequestedProperties).empty())
+ {
+ xWriter->startElement("allprop", nullptr);
+ xWriter->endElement("allprop");
+ }
+ else
+ {
+ xWriter->startElement("prop", nullptr);
+ for (OUString const& rName : ::std::get<0>(*o_pRequestedProperties))
+ {
+ SerfPropName name;
+ DAVProperties::createSerfPropName(rName, name);
+ pAttrList->Clear();
+ pAttrList->AddAttribute("xmlns", "CDATA", OUString::createFromAscii(name.nspace));
+ xWriter->startElement(OUString::createFromAscii(name.name), pAttrList.get());
+ xWriter->endElement(OUString::createFromAscii(name.name));
+ }
+ xWriter->endElement("prop");
+ }
+ }
+ xWriter->endElement("propfind");
+ xWriter->endDocument();
+
+ uno::Reference<io::XInputStream> const xRequestInStream(
+ io::SequenceInputStream::createStreamFromSequence(rSession.m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xRequestInStream.is());
+
+ curl_off_t const len(xSeqOutStream->getWrittenBytes().getLength());
+
+ ::std::vector<CurlOption> const options{
+ { CURLOPT_CUSTOMREQUEST, "PROPFIND", "CURLOPT_CUSTOMREQUEST" },
+ // note: Sharepoint cannot handle "Transfer-Encoding: chunked"
+ { CURLOPT_INFILESIZE_LARGE, len, nullptr, CurlOption::Type::CurlOffT }
+ };
+
+ // stream for response
+ uno::Reference<io::XInputStream> const xResponseInStream(io::Pipe::create(rSession.m_xContext));
+ uno::Reference<io::XOutputStream> const xResponseOutStream(xResponseInStream, uno::UNO_QUERY);
+ assert(xResponseInStream.is());
+ assert(xResponseOutStream.is());
+
+ CurlProcessor::ProcessRequest(rSession, rURI, "PROPFIND", options, &rEnv, ::std::move(pList),
+ &xResponseOutStream, &xRequestInStream, nullptr);
+
+ if (o_pResourceInfos)
+ {
+ *o_pResourceInfos = parseWebDAVPropNameResponse(xResponseInStream);
+ }
+ else
+ {
+ if (::std::get<1>(*o_pRequestedProperties) != nullptr)
+ {
+ *::std::get<1>(*o_pRequestedProperties)
+ = parseWebDAVPropFindResponse(xResponseInStream);
+ for (DAVResource& it : *::std::get<1>(*o_pRequestedProperties))
+ {
+ // caller will give these uris to CurlUri so can't be relative
+ if (it.uri.startsWith("/"))
+ {
+ try
+ {
+ it.uri = rSession.m_URI.CloneWithRelativeRefPathAbsolute(it.uri).GetURI();
+ }
+ catch (DAVException const&)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl",
+ "PROPFIND: exception parsing uri " << it.uri);
+ }
+ }
+ }
+ }
+ else
+ {
+ *::std::get<2>(*o_pRequestedProperties) = parseWebDAVLockResponse(xResponseInStream);
+ }
+ }
+}
+
+// DAV methods
+auto CurlSession::PROPFIND(OUString const& rURIReference, Depth const depth,
+ ::std::vector<OUString> const& rPropertyNames,
+ ::std::vector<DAVResource>& o_rResources,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "PROPFIND: " << rURIReference << " " << depth);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::tuple<::std::vector<OUString> const&, ::std::vector<DAVResource>* const,
+ ::std::vector<ucb::Lock>* const> const args(rPropertyNames, &o_rResources,
+ nullptr);
+ return CurlProcessor::PropFind(*this, uri, depth, &args, nullptr, rEnv);
+}
+
+auto CurlSession::PROPFIND(OUString const& rURIReference, Depth const depth,
+ ::std::vector<DAVResourceInfo>& o_rResourceInfos,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "PROPFIND: " << rURIReference << " " << depth);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ return CurlProcessor::PropFind(*this, uri, depth, nullptr, &o_rResourceInfos, rEnv);
+}
+
+auto CurlSession::PROPPATCH(OUString const& rURIReference,
+ ::std::vector<ProppatchValue> const& rValues,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "PROPPATCH: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ // TODO: either set CURLOPT_INFILESIZE_LARGE or chunked?
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList;
+ pList.reset(curl_slist_append(pList.release(), "Content-Type: application/xml"));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ // generate XML document for PROPPATCH
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(m_xContext));
+ uno::Reference<io::XOutputStream> const xRequestOutStream(xSeqOutStream);
+ assert(xRequestOutStream.is());
+ uno::Reference<xml::sax::XWriter> const xWriter(xml::sax::Writer::create(m_xContext));
+ xWriter->setOutputStream(xRequestOutStream);
+ xWriter->startDocument();
+ rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
+ pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
+ xWriter->startElement("propertyupdate", pAttrList.get());
+ for (ProppatchValue const& rPropValue : rValues)
+ {
+ assert(rPropValue.operation == PROPSET || rPropValue.operation == PROPREMOVE);
+ OUString const operation((rPropValue.operation == PROPSET) ? OUString("set")
+ : OUString("remove"));
+ xWriter->startElement(operation, nullptr);
+ xWriter->startElement("prop", nullptr);
+ SerfPropName name;
+ DAVProperties::createSerfPropName(rPropValue.name, name);
+ pAttrList->Clear();
+ pAttrList->AddAttribute("xmlns", "CDATA", OUString::createFromAscii(name.nspace));
+ xWriter->startElement(OUString::createFromAscii(name.name), pAttrList.get());
+ if (rPropValue.operation == PROPSET)
+ {
+ if (DAVProperties::isUCBDeadProperty(name))
+ {
+ ::std::optional<::std::pair<OUString, OUString>> const oProp(
+ UCBDeadPropertyValue::toXML(rPropValue.value));
+ if (oProp)
+ {
+ xWriter->startElement("ucbprop", nullptr);
+ xWriter->startElement("type", nullptr);
+ xWriter->characters(oProp->first);
+ xWriter->endElement("type");
+ xWriter->startElement("value", nullptr);
+ xWriter->characters(oProp->second);
+ xWriter->endElement("value");
+ xWriter->endElement("ucbprop");
+ }
+ }
+ else
+ {
+ OUString value;
+ rPropValue.value >>= value;
+ xWriter->characters(value);
+ }
+ }
+ xWriter->endElement(OUString::createFromAscii(name.name));
+ xWriter->endElement("prop");
+ xWriter->endElement(operation);
+ }
+ xWriter->endElement("propertyupdate");
+ xWriter->endDocument();
+
+ uno::Reference<io::XInputStream> const xRequestInStream(
+ io::SequenceInputStream::createStreamFromSequence(m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xRequestInStream.is());
+
+ curl_off_t const len(xSeqOutStream->getWrittenBytes().getLength());
+
+ ::std::vector<CurlOption> const options{
+ { CURLOPT_CUSTOMREQUEST, "PROPPATCH", "CURLOPT_CUSTOMREQUEST" },
+ // note: Sharepoint cannot handle "Transfer-Encoding: chunked"
+ { CURLOPT_INFILESIZE_LARGE, len, nullptr, CurlOption::Type::CurlOffT }
+ };
+
+ CurlProcessor::ProcessRequest(*this, uri, "PROPPATCH", options, &rEnv, ::std::move(pList),
+ nullptr, &xRequestInStream, nullptr);
+}
+
+auto CurlSession::HEAD(OUString const& rURIReference, ::std::vector<OUString> const& rHeaderNames,
+ DAVResource& io_rResource, DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "HEAD: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{
+ // NOBODY will prevent logging the response body in ProcessRequest()
+ // exception, but omitting it here results in a long timeout until the
+ // server closes the connection, which is worse
+ { CURLOPT_NOBODY, 1L, nullptr },
+ { CURLOPT_CUSTOMREQUEST, "HEAD", "CURLOPT_CUSTOMREQUEST" }
+ };
+
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const headers(rHeaderNames,
+ io_rResource);
+
+ CurlProcessor::ProcessRequest(*this, uri, "HEAD", options, &rEnv, nullptr, nullptr, nullptr,
+ &headers);
+}
+
+auto CurlSession::GET(OUString const& rURIReference, DAVRequestEnvironment const& rEnv)
+ -> uno::Reference<io::XInputStream>
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "GET: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ // could use either com.sun.star.io.Pipe or com.sun.star.io.SequenceInputStream?
+ // Pipe can just write into its XOuputStream, which is simpler.
+ // Both resize exponentially, so performance should be fine.
+ // However, Pipe doesn't implement XSeekable, which is required by filters.
+
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(m_xContext));
+ uno::Reference<io::XOutputStream> const xResponseOutStream(xSeqOutStream);
+ assert(xResponseOutStream.is());
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_HTTPGET, 1L, nullptr } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "GET", options, &rEnv, nullptr, &xResponseOutStream,
+ nullptr, nullptr);
+
+ uno::Reference<io::XInputStream> const xResponseInStream(
+ io::SequenceInputStream::createStreamFromSequence(m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xResponseInStream.is());
+
+ return xResponseInStream;
+}
+
+auto CurlSession::GET(OUString const& rURIReference, uno::Reference<io::XOutputStream>& rxOutStream,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "GET: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_HTTPGET, 1L, nullptr } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "GET", options, &rEnv, nullptr, &rxOutStream, nullptr,
+ nullptr);
+}
+
+auto CurlSession::GET(OUString const& rURIReference, ::std::vector<OUString> const& rHeaderNames,
+ DAVResource& io_rResource, DAVRequestEnvironment const& rEnv)
+ -> uno::Reference<io::XInputStream>
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "GET: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_HTTPGET, 1L, nullptr } };
+
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(m_xContext));
+ uno::Reference<io::XOutputStream> const xResponseOutStream(xSeqOutStream);
+ assert(xResponseOutStream.is());
+
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const headers(rHeaderNames,
+ io_rResource);
+
+ CurlProcessor::ProcessRequest(*this, uri, "GET", options, &rEnv, nullptr, &xResponseOutStream,
+ nullptr, &headers);
+
+ uno::Reference<io::XInputStream> const xResponseInStream(
+ io::SequenceInputStream::createStreamFromSequence(m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xResponseInStream.is());
+
+ return xResponseInStream;
+}
+
+auto CurlSession::GET(OUString const& rURIReference, uno::Reference<io::XOutputStream>& rxOutStream,
+ ::std::vector<OUString> const& rHeaderNames, DAVResource& io_rResource,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "GET: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_HTTPGET, 1L, nullptr } };
+
+ ::std::pair<::std::vector<OUString> const&, DAVResource&> const headers(rHeaderNames,
+ io_rResource);
+
+ CurlProcessor::ProcessRequest(*this, uri, "GET", options, &rEnv, nullptr, &rxOutStream, nullptr,
+ &headers);
+}
+
+auto CurlSession::PUT(OUString const& rURIReference,
+ uno::Reference<io::XInputStream> const& rxInStream,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "PUT: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ // NextCloud silently fails with chunked encoding
+ uno::Reference<io::XSeekable> const xSeekable(rxInStream, uno::UNO_QUERY);
+ if (!xSeekable.is())
+ {
+ throw uno::RuntimeException("TODO: not seekable");
+ }
+ curl_off_t const len(xSeekable->getLength() - xSeekable->getPosition());
+
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList;
+ OUString const* const pToken(g_Init.LockStore.getLockTokenForURI(uri.GetURI(), nullptr));
+ if (pToken)
+ {
+ OString const utf8If("If: "
+ // disabled as Sharepoint 2013 workaround, it accepts only
+ // "No-Tag-List", see fed2984281a85a5a2f308841ec810f218c75f2ab
+#if 0
+ "<" + OUStringToOString(rURIReference, RTL_TEXTENCODING_ASCII_US)
+ + "> "
+#endif
+ "(<"
+ + OUStringToOString(*pToken, RTL_TEXTENCODING_ASCII_US) + ">)");
+ pList.reset(curl_slist_append(pList.release(), utf8If.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ }
+
+ // lock m_Mutex after accessing global LockStore to avoid deadlock
+
+ // note: Nextcloud 20 cannot handle "Transfer-Encoding: chunked"
+ ::std::vector<CurlOption> const options{ { CURLOPT_INFILESIZE_LARGE, len, nullptr,
+ CurlOption::Type::CurlOffT } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "PUT", options, &rEnv, ::std::move(pList), nullptr,
+ &rxInStream, nullptr);
+}
+
+auto CurlSession::POST(OUString const& rURIReference, OUString const& rContentType,
+ OUString const& rReferer, uno::Reference<io::XInputStream> const& rxInStream,
+ DAVRequestEnvironment const& rEnv) -> uno::Reference<io::XInputStream>
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "POST: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ // TODO: either set CURLOPT_POSTFIELDSIZE_LARGE or chunked?
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList(
+ curl_slist_append(nullptr, "Transfer-Encoding: chunked"));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString const utf8ContentType("Content-Type: "
+ + OUStringToOString(rContentType, RTL_TEXTENCODING_ASCII_US));
+ pList.reset(curl_slist_append(pList.release(), utf8ContentType.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString const utf8Referer("Referer: " + OUStringToOString(rReferer, RTL_TEXTENCODING_ASCII_US));
+ pList.reset(curl_slist_append(pList.release(), utf8Referer.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_POST, 1L, nullptr } };
+
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(m_xContext));
+ uno::Reference<io::XOutputStream> const xResponseOutStream(xSeqOutStream);
+ assert(xResponseOutStream.is());
+
+ CurlProcessor::ProcessRequest(*this, uri, "POST", options, &rEnv, ::std::move(pList),
+ &xResponseOutStream, &rxInStream, nullptr);
+
+ uno::Reference<io::XInputStream> const xResponseInStream(
+ io::SequenceInputStream::createStreamFromSequence(m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xResponseInStream.is());
+
+ return xResponseInStream;
+}
+
+auto CurlSession::POST(OUString const& rURIReference, OUString const& rContentType,
+ OUString const& rReferer, uno::Reference<io::XInputStream> const& rxInStream,
+ uno::Reference<io::XOutputStream>& rxOutStream,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "POST: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ // TODO: either set CURLOPT_POSTFIELDSIZE_LARGE or chunked?
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList(
+ curl_slist_append(nullptr, "Transfer-Encoding: chunked"));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString const utf8ContentType("Content-Type: "
+ + OUStringToOString(rContentType, RTL_TEXTENCODING_ASCII_US));
+ pList.reset(curl_slist_append(pList.release(), utf8ContentType.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString const utf8Referer("Referer: " + OUStringToOString(rReferer, RTL_TEXTENCODING_ASCII_US));
+ pList.reset(curl_slist_append(pList.release(), utf8Referer.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_POST, 1L, nullptr } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "POST", options, &rEnv, ::std::move(pList),
+ &rxOutStream, &rxInStream, nullptr);
+}
+
+auto CurlSession::MKCOL(OUString const& rURIReference, DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "MKCOL: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, "MKCOL",
+ "CURLOPT_CUSTOMREQUEST" } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "MKCOL", options, &rEnv, nullptr, nullptr, nullptr,
+ nullptr);
+}
+
+auto CurlProcessor::MoveOrCopy(CurlSession& rSession, OUString const& rSourceURIReference,
+ ::std::u16string_view const rDestinationURI,
+ DAVRequestEnvironment const& rEnv, bool const isOverwrite,
+ char const* const pMethod) -> void
+{
+ CurlUri const uriSource(CurlProcessor::URIReferenceToURI(rSession, rSourceURIReference));
+
+ OString const utf8Destination("Destination: "
+ + OUStringToOString(rDestinationURI, RTL_TEXTENCODING_ASCII_US));
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList(
+ curl_slist_append(nullptr, utf8Destination.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString const utf8Overwrite(OString("Overwrite: ") + (isOverwrite ? "T" : "F"));
+ pList.reset(curl_slist_append(pList.release(), utf8Overwrite.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, pMethod,
+ "CURLOPT_CUSTOMREQUEST" } };
+
+ CurlProcessor::ProcessRequest(rSession, uriSource, OUString::createFromAscii(pMethod), options,
+ &rEnv, ::std::move(pList), nullptr, nullptr, nullptr);
+}
+
+auto CurlSession::COPY(OUString const& rSourceURIReference, OUString const& rDestinationURI,
+ DAVRequestEnvironment const& rEnv, bool const isOverwrite) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "COPY: " << rSourceURIReference);
+
+ return CurlProcessor::MoveOrCopy(*this, rSourceURIReference, rDestinationURI, rEnv, isOverwrite,
+ "COPY");
+}
+
+auto CurlSession::MOVE(OUString const& rSourceURIReference, OUString const& rDestinationURI,
+ DAVRequestEnvironment const& rEnv, bool const isOverwrite) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "MOVE: " << rSourceURIReference);
+
+ return CurlProcessor::MoveOrCopy(*this, rSourceURIReference, rDestinationURI, rEnv, isOverwrite,
+ "MOVE");
+}
+
+auto CurlSession::DESTROY(OUString const& rURIReference, DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "DESTROY: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, "DELETE",
+ "CURLOPT_CUSTOMREQUEST" } };
+
+ CurlProcessor::ProcessRequest(*this, uri, "DESTROY", options, &rEnv, nullptr, nullptr, nullptr,
+ nullptr);
+}
+
+auto CurlProcessor::Lock(
+ CurlSession& rSession, CurlUri const& rURI, DAVRequestEnvironment const* const pEnv,
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>>
+ pRequestHeaderList,
+ uno::Reference<io::XInputStream> const* const pxRequestInStream)
+ -> ::std::vector<::std::pair<ucb::Lock, sal_Int32>>
+{
+ curl_off_t len(0);
+ if (pxRequestInStream)
+ {
+ uno::Reference<io::XSeekable> const xSeekable(*pxRequestInStream, uno::UNO_QUERY);
+ assert(xSeekable.is());
+ len = xSeekable->getLength();
+ }
+
+ ::std::vector<CurlOption> const options{
+ { CURLOPT_CUSTOMREQUEST, "LOCK", "CURLOPT_CUSTOMREQUEST" },
+ // note: Sharepoint cannot handle "Transfer-Encoding: chunked"
+ { CURLOPT_INFILESIZE_LARGE, len, nullptr, CurlOption::Type::CurlOffT }
+ };
+
+ // stream for response
+ uno::Reference<io::XInputStream> const xResponseInStream(io::Pipe::create(rSession.m_xContext));
+ uno::Reference<io::XOutputStream> const xResponseOutStream(xResponseInStream, uno::UNO_QUERY);
+ assert(xResponseInStream.is());
+ assert(xResponseOutStream.is());
+
+ TimeValue startTime;
+ osl_getSystemTime(&startTime);
+
+ CurlProcessor::ProcessRequest(rSession, rURI, "LOCK", options, pEnv,
+ ::std::move(pRequestHeaderList), &xResponseOutStream,
+ pxRequestInStream, nullptr);
+
+ ::std::vector<ucb::Lock> const acquiredLocks(parseWebDAVLockResponse(xResponseInStream));
+ SAL_WARN_IF(acquiredLocks.empty(), "ucb.ucp.webdav.curl",
+ "could not get LOCK for " << rURI.GetURI());
+
+ TimeValue endTime;
+ osl_getSystemTime(&endTime);
+ auto const elapsedSeconds(endTime.Seconds - startTime.Seconds);
+
+ // determine expiration time (seconds from endTime) for each acquired lock
+ ::std::vector<::std::pair<ucb::Lock, sal_Int32>> ret;
+ ret.reserve(acquiredLocks.size());
+ for (auto const& rLock : acquiredLocks)
+ {
+ sal_Int32 lockExpirationTimeSeconds;
+ if (rLock.Timeout == -1)
+ {
+ lockExpirationTimeSeconds = -1;
+ }
+ else if (rLock.Timeout <= elapsedSeconds)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl",
+ "LOCK timeout already expired when receiving LOCK response for "
+ << rURI.GetURI());
+ lockExpirationTimeSeconds = 0;
+ }
+ else
+ {
+ lockExpirationTimeSeconds = startTime.Seconds + rLock.Timeout;
+ }
+ ret.emplace_back(rLock, lockExpirationTimeSeconds);
+ }
+
+ return ret;
+}
+
+auto CurlSession::LOCK(OUString const& rURIReference, ucb::Lock /*const*/& rLock,
+ DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "LOCK: " << rURIReference);
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ if (g_Init.LockStore.getLockTokenForURI(uri.GetURI(), &rLock))
+ {
+ // already have a lock that covers the requirement
+ // TODO: maybe use DAV:lockdiscovery to ensure it's valid
+ return;
+ }
+
+ // note: no m_Mutex lock needed here, only in CurlProcessor::Lock()
+
+ // generate XML document for acquiring new LOCK
+ uno::Reference<io::XSequenceOutputStream> const xSeqOutStream(
+ io::SequenceOutputStream::create(m_xContext));
+ uno::Reference<io::XOutputStream> const xRequestOutStream(xSeqOutStream);
+ assert(xRequestOutStream.is());
+ uno::Reference<xml::sax::XWriter> const xWriter(xml::sax::Writer::create(m_xContext));
+ xWriter->setOutputStream(xRequestOutStream);
+ xWriter->startDocument();
+ rtl::Reference<::comphelper::AttributeList> const pAttrList(new ::comphelper::AttributeList);
+ pAttrList->AddAttribute("xmlns", "CDATA", "DAV:");
+ xWriter->startElement("lockinfo", pAttrList.get());
+ xWriter->startElement("lockscope", nullptr);
+ switch (rLock.Scope)
+ {
+ case ucb::LockScope_EXCLUSIVE:
+ xWriter->startElement("exclusive", nullptr);
+ xWriter->endElement("exclusive");
+ break;
+ case ucb::LockScope_SHARED:
+ xWriter->startElement("shared", nullptr);
+ xWriter->endElement("shared");
+ break;
+ default:
+ assert(false);
+ }
+ xWriter->endElement("lockscope");
+ xWriter->startElement("locktype", nullptr);
+ xWriter->startElement("write", nullptr);
+ xWriter->endElement("write");
+ xWriter->endElement("locktype");
+ OUString owner;
+ if ((rLock.Owner >>= owner) && !owner.isEmpty())
+ {
+ xWriter->startElement("owner", nullptr);
+ xWriter->characters(owner);
+ xWriter->endElement("owner");
+ }
+ xWriter->endElement("lockinfo");
+ xWriter->endDocument();
+
+ uno::Reference<io::XInputStream> const xRequestInStream(
+ io::SequenceInputStream::createStreamFromSequence(m_xContext,
+ xSeqOutStream->getWrittenBytes()));
+ assert(xRequestInStream.is());
+
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList;
+ pList.reset(curl_slist_append(pList.release(), "Content-Type: application/xml"));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString depth;
+ switch (rLock.Depth)
+ {
+ case ucb::LockDepth_ZERO:
+ depth = "Depth: 0";
+ break;
+ case ucb::LockDepth_ONE:
+ depth = "Depth: 1";
+ break;
+ case ucb::LockDepth_INFINITY:
+ depth = "Depth: infinity";
+ break;
+ default:
+ assert(false);
+ }
+ pList.reset(curl_slist_append(pList.release(), depth.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+ OString timeout;
+ switch (rLock.Timeout)
+ {
+ case -1:
+ timeout = "Timeout: Infinite";
+ break;
+ case 0:
+ timeout = "Timeout: Second-180";
+ break;
+ default:
+ timeout = "Timeout: Second-" + OString::number(rLock.Timeout);
+ assert(0 < rLock.Timeout);
+ break;
+ }
+ pList.reset(curl_slist_append(pList.release(), timeout.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ auto const acquiredLocks
+ = CurlProcessor::Lock(*this, uri, &rEnv, ::std::move(pList), &xRequestInStream);
+
+ for (auto const& rAcquiredLock : acquiredLocks)
+ {
+ g_Init.LockStore.addLock(uri.GetURI(), rAcquiredLock.first,
+ rAcquiredLock.first.LockTokens[0], this, rAcquiredLock.second);
+ SAL_INFO("ucb.ucp.webdav.curl", "created LOCK for " << rURIReference);
+ }
+}
+
+auto CurlProcessor::Unlock(CurlSession& rSession, CurlUri const& rURI,
+ DAVRequestEnvironment const* const pEnv) -> void
+{
+ OUString const* const pToken(g_Init.LockStore.getLockTokenForURI(rURI.GetURI(), nullptr));
+ if (!pToken)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "attempt to unlock but not locked");
+ throw DAVException(DAVException::DAV_NOT_LOCKED);
+ }
+ OString const utf8LockToken("Lock-Token: <"
+ + OUStringToOString(*pToken, RTL_TEXTENCODING_ASCII_US) + ">");
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList(
+ curl_slist_append(nullptr, utf8LockToken.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ ::std::vector<CurlOption> const options{ { CURLOPT_CUSTOMREQUEST, "UNLOCK",
+ "CURLOPT_CUSTOMREQUEST" } };
+
+ CurlProcessor::ProcessRequest(rSession, rURI, "UNLOCK", options, pEnv, ::std::move(pList),
+ nullptr, nullptr, nullptr);
+}
+
+auto CurlSession::UNLOCK(OUString const& rURIReference, DAVRequestEnvironment const& rEnv) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "UNLOCK: " << rURIReference);
+
+ // note: no m_Mutex lock needed here, only in CurlProcessor::Unlock()
+
+ CurlUri const uri(CurlProcessor::URIReferenceToURI(*this, rURIReference));
+
+ CurlProcessor::Unlock(*this, uri, &rEnv);
+
+ g_Init.LockStore.removeLock(uri.GetURI());
+}
+
+auto CurlSession::NonInteractive_LOCK(OUString const& rURI, ::std::u16string_view const rLockToken,
+ sal_Int32& o_rLastChanceToSendRefreshRequest,
+ bool& o_rIsAuthFailed) -> bool
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK: " << rURI);
+
+ // note: no m_Mutex lock needed here, only in CurlProcessor::Lock()
+
+ try
+ {
+ CurlUri const uri(rURI);
+ ::std::unique_ptr<curl_slist, deleter_from_fn<curl_slist, curl_slist_free_all>> pList(
+ curl_slist_append(nullptr, "Timeout: Second-180"));
+
+ assert(!rLockToken.empty()); // LockStore is the caller
+ OString const utf8If("If: (<" + OUStringToOString(rLockToken, RTL_TEXTENCODING_ASCII_US)
+ + ">)");
+ pList.reset(curl_slist_append(pList.release(), utf8If.getStr()));
+ if (!pList)
+ {
+ throw uno::RuntimeException("curl_slist_append failed");
+ }
+
+ auto const acquiredLocks
+ = CurlProcessor::Lock(*this, uri, nullptr, ::std::move(pList), nullptr);
+
+ SAL_WARN_IF(1 < acquiredLocks.size(), "ucb.ucp.webdav.curl",
+ "multiple locks acquired on refresh for " << rURI);
+ if (!acquiredLocks.empty())
+ {
+ o_rLastChanceToSendRefreshRequest = acquiredLocks.begin()->second;
+ }
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK succeeded on " << rURI);
+ return true;
+ }
+ catch (DAVException const& rException)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK failed on " << rURI);
+ switch (rException.getError())
+ {
+ case DAVException::DAV_HTTP_AUTH:
+ case DAVException::DAV_HTTP_NOAUTH:
+ o_rIsAuthFailed = true;
+ break;
+ default:
+ break;
+ }
+ return false;
+ }
+ catch (...)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_LOCK failed on " << rURI);
+ return false;
+ }
+}
+
+auto CurlSession::NonInteractive_UNLOCK(OUString const& rURI) -> void
+{
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_UNLOCK: " << rURI);
+
+ // note: no m_Mutex lock needed here, only in CurlProcessor::Unlock()
+
+ try
+ {
+ CurlUri const uri(rURI);
+
+ CurlProcessor::Unlock(*this, uri, nullptr);
+
+ // the only caller is the dtor of the LockStore, don't call remove!
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_UNLOCK succeeded on " << rURI);
+ }
+ catch (...)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "NonInteractive_UNLOCK failed on " << rURI);
+ }
+}
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/CurlSession.hxx b/ucb/source/ucp/webdav-curl/CurlSession.hxx
new file mode 100644
index 000000000000..5428bb98b23f
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/CurlSession.hxx
@@ -0,0 +1,149 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include "DAVSession.hxx"
+#include "CurlUri.hxx"
+
+#include <curl/curl.h>
+
+#include <atomic>
+#include <mutex>
+
+namespace http_dav_ucp
+{
+/// implementation of libcurl HTTP/DAV back-end
+class CurlSession : public DAVSession
+{
+private:
+ /// mutex required to access all other non-const members
+ ::std::mutex m_Mutex;
+ css::uno::Reference<css::uno::XComponentContext> const m_xContext;
+ /// flags may be passed to constructor, e.g. "KeepAlive"
+ css::uno::Sequence<css::beans::NamedValue> const m_Flags;
+ CurlUri const m_URI;
+ /// buffer for libcurl detailed error messages
+ char m_ErrorBuffer[CURL_ERROR_SIZE];
+ /// proxy is used if aName is non-empty
+ ::ucbhelper::InternetProxyServer const m_Proxy;
+ /// once authentication was successful, rely on m_pCurl's data
+ bool m_isAuthenticated = false;
+ bool m_isAuthenticatedProxy = false;
+ /// read timeout in milliseconds (connection timeout is stored in m_pCurl)
+ int m_nReadTimeout = 0;
+ /// flag to signal abort to transferring thread
+ ::std::atomic<bool> m_AbortFlag = false;
+
+ /// libcurl multi handle
+ ::std::unique_ptr<CURLM, deleter_from_fn<CURLM, curl_multi_cleanup>> m_pCurlMulti;
+ /// libcurl easy handle
+ ::std::unique_ptr<CURL, deleter_from_fn<CURL, curl_easy_cleanup>> m_pCurl;
+
+ // this class exists just to hide the implementation details in cxx file
+ friend struct CurlProcessor;
+
+public:
+ explicit CurlSession(css::uno::Reference<css::uno::XComponentContext> const& xContext,
+ ::rtl::Reference<DAVSessionFactory> const& rpFactory, OUString const& rURI,
+ css::uno::Sequence<css::beans::NamedValue> const& rFlags,
+ ::ucbhelper::InternetProxyDecider const& rProxyDecider);
+ virtual ~CurlSession() override;
+
+ virtual auto CanUse(OUString const& rURI,
+ css::uno::Sequence<css::beans::NamedValue> const& rFlags) -> bool override;
+
+ virtual auto UsesProxy() -> bool override;
+
+ // DAV methods
+ virtual auto OPTIONS(OUString const& rURIReference, DAVOptions& rOptions,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto PROPFIND(OUString const& rURIReference, Depth depth,
+ ::std::vector<OUString> const& rPropertyNames,
+ ::std::vector<DAVResource>& o_rResources,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto PROPFIND(OUString const& rURIReference, Depth depth,
+ ::std::vector<DAVResourceInfo>& o_rResourceInfos,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto PROPPATCH(OUString const& rURIReference,
+ ::std::vector<ProppatchValue> const& rValues,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto HEAD(OUString const& rURIReference, ::std::vector<OUString> const& rHeaderNames,
+ DAVResource& io_rResource, DAVRequestEnvironment const& rEnv)
+ -> void override;
+
+ virtual auto GET(OUString const& rURIReference, DAVRequestEnvironment const& rEnv)
+ -> css::uno::Reference<css::io::XInputStream> override;
+
+ virtual auto GET(OUString const& rURIReference,
+ css::uno::Reference<css::io::XOutputStream>& rxOutStream,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto GET(OUString const& rURIReference, ::std::vector<OUString> const& rHeaderNames,
+ DAVResource& io_rResource, DAVRequestEnvironment const& rEnv)
+ -> css::uno::Reference<css::io::XInputStream> override;
+
+ virtual auto GET(OUString const& rURIReference,
+ css::uno::Reference<css::io::XOutputStream>& rxOutStream,
+ ::std::vector<OUString> const& rHeaderNames, DAVResource& io_rResource,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto PUT(OUString const& rURIReference,
+ css::uno::Reference<css::io::XInputStream> const& rxInStream,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto POST(OUString const& rURIReference, OUString const& rContentType,
+ OUString const& rReferer,
+ css::uno::Reference<css::io::XInputStream> const& rxInStream,
+ DAVRequestEnvironment const& rEnv)
+ -> css::uno::Reference<css::io::XInputStream> override;
+
+ virtual auto POST(OUString const& rURIReference, OUString const& rContentType,
+ OUString const& rReferer,
+ css::uno::Reference<css::io::XInputStream> const& rxInStream,
+ css::uno::Reference<css::io::XOutputStream>& rxOutStream,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto MKCOL(OUString const& rURIReference, DAVRequestEnvironment const& rEnv)
+ -> void override;
+
+ virtual auto COPY(OUString const& rSourceURIReference, OUString const& rDestinationURI,
+ DAVRequestEnvironment const& rEnv, bool isOverwrite = false) -> void override;
+
+ virtual auto MOVE(OUString const& rSourceURIReference, OUString const& rDestinationURI,
+ DAVRequestEnvironment const& rEnv, bool isOverwrite = false) -> void override;
+
+ virtual auto DESTROY(OUString const& rURIReference, DAVRequestEnvironment const& rEnv)
+ -> void override;
+
+ virtual auto LOCK(OUString const& rURIReference, css::ucb::Lock /*const*/& rLock,
+ DAVRequestEnvironment const& rEnv) -> void override;
+
+ virtual auto UNLOCK(OUString const& rURIReference, DAVRequestEnvironment const& rEnv)
+ -> void override;
+
+ virtual auto abort() -> void override;
+
+ auto NonInteractive_LOCK(OUString const& rURI, ::std::u16string_view rLockToken,
+ sal_Int32& o_rLastChanceToSendRefreshRequest, bool& o_rIsAuthFailed)
+ -> bool;
+ auto NonInteractive_UNLOCK(OUString const& rURI) -> void;
+};
+
+OString TryImportCookies(
+ ::com::sun::star::uno::Reference<::com::sun::star::uno::XComponentContext> const& xContext,
+ OUString const& rHost);
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.cxx b/ucb/source/ucp/webdav-curl/CurlUri.cxx
new file mode 100644
index 000000000000..035c12a132ef
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/CurlUri.cxx
@@ -0,0 +1,327 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * 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 "CurlUri.hxx"
+
+#include <sal/log.hxx>
+#include <rtl/uri.hxx>
+#include <rtl/ustrbuf.hxx>
+
+#include <optional>
+
+namespace http_dav_ucp
+{
+const auto DEFAULT_HTTP_PORT = 80;
+const auto DEFAULT_HTTPS_PORT = 443;
+
+static ::std::optional<OUString> GetURLComponent(CURLU& rURI, CURLUPart const what,
+ CURLUcode const expected,
+ unsigned int const flags = 0)
+{
+ char* pPart(nullptr);
+ auto uc = curl_url_get(&rURI, what, &pPart, flags);
+ if (expected != CURLUE_OK && uc == expected)
+ {
+ return ::std::optional<OUString>();
+ }
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_get failed: " << what << " " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ assert(pPart);
+ CurlUniquePtr<char> pPart2(pPart);
+ return ::rtl::OStringToOUString(pPart, RTL_TEXTENCODING_UTF8);
+}
+
+void CurlUri::Init()
+{
+ // looks like the result should be the same as the old calculateURI()
+ auto const oURI(GetURLComponent(*m_pUrl, CURLUPART_URL, CURLUE_OK, CURLU_NO_DEFAULT_PORT));
+ assert(oURI);
+ m_URI = *oURI;
+
+ auto const oScheme(GetURLComponent(*m_pUrl, CURLUPART_SCHEME, CURLUE_NO_SCHEME));
+ if (oScheme)
+ {
+ m_Scheme = *oScheme;
+ }
+ auto const oUser(GetURLComponent(*m_pUrl, CURLUPART_USER, CURLUE_NO_USER));
+ if (oUser)
+ {
+ m_User = *oUser;
+ }
+ auto const oPassWord(GetURLComponent(*m_pUrl, CURLUPART_PASSWORD, CURLUE_NO_PASSWORD));
+ if (oPassWord)
+ {
+ m_Password = *oPassWord;
+ }
+ auto const oHost(GetURLComponent(*m_pUrl, CURLUPART_HOST, CURLUE_NO_HOST));
+ if (oHost)
+ {
+ m_Host = *oHost;
+ }
+ // DAV schemes always have port but Content::transfer() is called with
+ // arbitrary URLs so use CURLUE_NO_PORT
+ auto const oPort(GetURLComponent(*m_pUrl, CURLUPART_PORT, CURLUE_NO_PORT, CURLU_DEFAULT_PORT));
+ if (oPort)
+ {
+ m_nPort = oPort->toInt32();
+ }
+
+ auto const oPath(GetURLComponent(*m_pUrl, CURLUPART_PATH, CURLUE_OK));
+ assert(oPath);
+ m_Path = *oPath;
+
+ // note: this used to be added to m_Path because before 2007, ne_uri path contained query/fragment as well :-/
+ auto const oQuery(GetURLComponent(*m_pUrl, CURLUPART_QUERY, CURLUE_NO_QUERY));
+ if (oQuery)
+ {
+ m_QueryAndFragment += "?" + *oQuery;
+ }
+ auto const oFragment(GetURLComponent(*m_pUrl, CURLUPART_FRAGMENT, CURLUE_NO_FRAGMENT));
+ if (oFragment)
+ {
+ m_QueryAndFragment += "#" + *oFragment;
+ }
+}
+
+CurlUri::CurlUri(::std::u16string_view const rURI)
+{
+ // note: in the old implementation, the rURI would be URI-encoded again
+ // here, apparently because it could actually be an IRI (RFC 3987) and
+ // neon didn't support that - not clear if this is a good idea
+
+ m_pUrl.reset(curl_url());
+ if (!m_pUrl)
+ {
+ throw ::std::bad_alloc();
+ }
+
+ // use curl to parse the URI, to get a consistent interpretation
+ OString const utf8URI(OUStringToOString(rURI, RTL_TEXTENCODING_UTF8));
+ auto uc = curl_url_set(m_pUrl.get(), CURLUPART_URL, utf8URI.getStr(), 0);
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+
+ Init();
+}
+
+CurlUri::CurlUri(CURLU /*const*/& rUrl)
+ : m_pUrl(curl_url_dup(&rUrl))
+{
+ if (!m_pUrl)
+ {
+ throw ::std::bad_alloc();
+ }
+
+ Init();
+}
+
+CurlUri::CurlUri(CurlUri const& rOther)
+ : m_pUrl(curl_url_dup(rOther.m_pUrl.get()))
+ , m_URI(rOther.m_URI)
+ , m_Scheme(rOther.m_Scheme)
+ , m_User(rOther.m_User)
+ , m_Password(rOther.m_Password)
+ , m_Host(rOther.m_Host)
+ , m_nPort(rOther.m_nPort)
+ , m_Path(rOther.m_Path)
+ , m_QueryAndFragment(rOther.m_QueryAndFragment)
+{
+ assert(rOther.m_pUrl);
+ if (!m_pUrl)
+ {
+ throw ::std::bad_alloc();
+ }
+}
+
+void CurlUri::operator=(CurlUri const& rOther)
+{
+ assert(rOther.m_pUrl);
+ m_pUrl.reset(curl_url_dup(rOther.m_pUrl.get()));
+ if (!m_pUrl)
+ {
+ throw ::std::bad_alloc();
+ }
+ m_URI = rOther.m_URI;
+ m_Scheme = rOther.m_Scheme;
+ m_User = rOther.m_User;
+ m_Password = rOther.m_Password;
+ m_Host = rOther.m_Host;
+ m_nPort = rOther.m_nPort;
+ m_Path = rOther.m_Path;
+ m_QueryAndFragment = rOther.m_QueryAndFragment;
+}
+
+bool CurlUri::operator==(CurlUri const& rOther) const { return m_URI == rOther.m_URI; }
+
+OUString CurlUri::GetPathBaseName() const
+{
+ sal_Int32 nPos = m_Path.lastIndexOf('/');
+ sal_Int32 nTrail = 0;
+ if (nPos == m_Path.getLength() - 1)
+ {
+ // Trailing slash found. Skip.
+ nTrail = 1;
+ nPos = m_Path.lastIndexOf('/', nPos);
+ }
+ if (nPos == -1)
+ {
+ return "/";
+ }
+ return m_Path.copy(nPos + 1, m_Path.getLength() - nPos - 1 - nTrail);
+}
+
+OUString CurlUri::GetPathBaseNameUnescaped() const { return DecodeURI(GetPathBaseName()); }
+
+void CurlUri::SetScheme(::std::u16string_view const rScheme)
+{
+ OString const utf8URI(OUStringToOString(rScheme, RTL_TEXTENCODING_UTF8));
+ auto uc = curl_url_set(m_pUrl.get(), CURLUPART_SCHEME, utf8URI.getStr(), 0);
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ auto const oURI(GetURLComponent(*m_pUrl, CURLUPART_URL, CURLUE_OK, CURLU_NO_DEFAULT_PORT));
+ assert(oURI);
+ m_URI = *oURI;
+ auto const oScheme(GetURLComponent(*m_pUrl, CURLUPART_SCHEME, CURLUE_NO_SCHEME));
+ if (oScheme)
+ {
+ m_Scheme = *oScheme;
+ }
+}
+
+void CurlUri::AppendPath(::std::u16string_view const rPath)
+{
+ OUStringBuffer path(m_Path);
+ if (path.lastIndexOf('/') != path.getLength() - 1)
+ {
+ path.append("/");
+ }
+ path.append(rPath);
+ OString const utf8Path(OUStringToOString(path.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+ auto uc = curl_url_set(m_pUrl.get(), CURLUPART_PATH, utf8Path.getStr(), 0);
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ auto const oURI(GetURLComponent(*m_pUrl, CURLUPART_URL, CURLUE_OK, CURLU_NO_DEFAULT_PORT));
+ assert(oURI);
+ m_URI = *oURI;
+ auto const oPath(GetURLComponent(*m_pUrl, CURLUPART_PATH, CURLUE_OK));
+ assert(oPath);
+ m_Path = *oPath;
+}
+
+CurlUri CurlUri::CloneWithRelativeRefPathAbsolute(OUString const& rRelativeRef) const
+{
+ ::std::unique_ptr<CURLU, deleter_from_fn<CURLU, curl_url_cleanup>> pUrl(
+ curl_url_dup(m_pUrl.get()));
+ sal_Int32 indexEnd(rRelativeRef.getLength());
+ auto const indexQuery(rRelativeRef.indexOf('?'));
+ auto const indexFragment(rRelativeRef.indexOf('#'));
+ CURLUcode uc;
+ if (indexFragment != -1)
+ {
+ OUString const fragment(rRelativeRef.copy(indexFragment + 1));
+ indexEnd = indexFragment;
+ OString const utf8Fragment(OUStringToOString(fragment, RTL_TEXTENCODING_UTF8));
+ uc = curl_url_set(pUrl.get(), CURLUPART_FRAGMENT, utf8Fragment.getStr(), 0);
+ }
+ else
+ {
+ uc = curl_url_set(pUrl.get(), CURLUPART_FRAGMENT, nullptr, 0);
+ }
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ if (indexQuery != -1 && (indexFragment == -1 || indexQuery < indexFragment))
+ {
+ OUString const query(rRelativeRef.copy(indexQuery + 1, indexEnd - indexQuery - 1));
+ indexEnd = indexQuery;
+ OString const utf8Query(OUStringToOString(query, RTL_TEXTENCODING_UTF8));
+ uc = curl_url_set(pUrl.get(), CURLUPART_QUERY, utf8Query.getStr(), 0);
+ }
+ else
+ {
+ uc = curl_url_set(pUrl.get(), CURLUPART_QUERY, nullptr, 0);
+ }
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ OUString const path(rRelativeRef.copy(0, indexEnd));
+ OString const utf8Path(OUStringToOString(path, RTL_TEXTENCODING_UTF8));
+ uc = curl_url_set(pUrl.get(), CURLUPART_PATH, utf8Path.getStr(), 0);
+ if (uc != CURLUE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "curl_url_set failed: " << uc);
+ throw DAVException(DAVException::DAV_INVALID_ARG);
+ }
+ return CurlUri(*pUrl.release());
+}
+
+OUString EncodeSegment(OUString const& rSegment)
+{
+ return rtl::Uri::encode(rSegment, rtl_UriCharClassPchar, rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8);
+}
+
+OUString DecodeURI(OUString const& rURI)
+{
+ return rtl::Uri::decode(rURI, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8);
+}
+
+OUString ConnectionEndPointString(OUString const& rHostName, sal_uInt16 const nPort)
+{
+ OUStringBuffer aBuf;
+
+ // Is host a numeric IPv6 address?
+ if ((rHostName.indexOf(':') != -1) && (rHostName[0] != '['))
+ {
+ aBuf.append("[");
+ aBuf.append(rHostName);
+ aBuf.append("]");
+ }
+ else
+ {
+ aBuf.append(rHostName);
+ }
+
+ if ((nPort != DEFAULT_HTTP_PORT) && (nPort != DEFAULT_HTTPS_PORT))
+ {
+ aBuf.append(":");
+ aBuf.append(sal_Int32(nPort));
+ }
+ return aBuf.makeStringAndClear();
+}
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/CurlUri.hxx b/ucb/source/ucp/webdav-curl/CurlUri.hxx
new file mode 100644
index 000000000000..c9e8d33d279d
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/CurlUri.hxx
@@ -0,0 +1,94 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#include <curl/curl.h>
+
+#include <memory>
+
+#include <rtl/ustring.hxx>
+
+#include "DAVException.hxx"
+
+namespace http_dav_ucp
+{
+template <typename T, auto fn> struct deleter_from_fn
+{
+ void operator()(T* p) const { fn(p); }
+};
+template <typename T> using CurlUniquePtr = ::std::unique_ptr<T, deleter_from_fn<T, curl_free>>;
+
+class CurlUri
+{
+private:
+ /// native curl representation of parsed URI
+ ::std::unique_ptr<CURLU, deleter_from_fn<CURLU, curl_url_cleanup>> m_pUrl;
+ /// duplicate state for quick access to some components
+ OUString m_URI;
+ OUString m_Scheme;
+ OUString m_User;
+ OUString m_Password;
+ OUString m_Host;
+ sal_uInt16 m_nPort = 0;
+ OUString m_Path;
+ OUString m_QueryAndFragment;
+
+ void Init();
+
+public:
+ CurlUri(CurlUri const& rUri);
+ CurlUri(CURLU /*const*/& rUrl);
+ void operator=(CurlUri const& rOther);
+
+ /// @throws DAVException
+ explicit CurlUri(::std::u16string_view rURI);
+
+ bool operator==(CurlUri const& rOther) const;
+
+ CURLU const* GetCURLU() const { return m_pUrl.get(); }
+ OUString const& GetURI() const { return m_URI; }
+ OUString const& GetScheme() const { return m_Scheme; }
+ OUString const& GetUser() const { return m_User; }
+ OUString const& GetPassword() const { return m_Password; }
+ OUString const& GetHost() const { return m_Host; }
+ sal_uInt16 GetPort() const { return m_nPort; }
+ OUString const& GetPath() const { return m_Path; }
+ OUString GetRelativeReference() const { return m_Path + m_QueryAndFragment; }
+
+ OUString GetPathBaseName() const;
+
+ OUString GetPathBaseNameUnescaped() const;
+
+ /// @throws DAVException
+ void SetScheme(::std::u16string_view rScheme);
+ /// @throws DAVException
+ void AppendPath(::std::u16string_view rPath);
+ /// @param matches: relative-ref = path-absolute [ "?" query ] [ "#" fragment ]
+ /// @throws DAVException
+ CurlUri CloneWithRelativeRefPathAbsolute(OUString const& rRelativeRef) const;
+};
+
+OUString EncodeSegment(OUString const& rSegment);
+OUString DecodeURI(OUString const& rURI);
+OUString ConnectionEndPointString(OUString const& rHost, sal_uInt16 nPort);
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/dtrans/source/generic/dtrans.component b/ucb/source/ucp/webdav-curl/DAVAuthListener.hxx
index 915e3f0bcf8f..c3d643bc7d82 100644
--- a/dtrans/source/generic/dtrans.component
+++ b/ucb/source/ucp/webdav-curl/DAVAuthListener.hxx
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+/* -*- 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
@@ -15,14 +15,29 @@
* 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 .
- -->
+ */
-<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="dtrans" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.datatransfer.ClipboardManager">
- <service name="com.sun.star.datatransfer.clipboard.ClipboardManager"/>
- </implementation>
- <implementation name="com.sun.star.comp.datatransfer.clipboard.GenericClipboard">
- <service name="com.sun.star.datatransfer.clipboard.GenericClipboard"/>
- </implementation>
-</component>
+
+#pragma once
+
+#include <salhelper/simplereferenceobject.hxx>
+#include <rtl/ustring.hxx>
+
+namespace http_dav_ucp
+{
+
+class DAVAuthListener : public salhelper::SimpleReferenceObject
+{
+ public:
+ virtual int authenticate(
+ const OUString & inRealm,
+ const OUString & inHostName,
+ OUString & inoutUserName,
+ OUString & outPassWord,
+ bool bCanUseSystemCredentials,
+ bool bUsePreviousCredentials = true ) = 0;
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav-curl/DAVAuthListenerImpl.hxx
new file mode 100644
index 000000000000..219a6490689b
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVAuthListenerImpl.hxx
@@ -0,0 +1,61 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include "DAVAuthListener.hxx"
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+
+
+namespace http_dav_ucp
+{
+
+
+
+
+ class DAVAuthListener_Impl : public DAVAuthListener
+ {
+ public:
+
+ DAVAuthListener_Impl(
+ const css::uno::Reference<css::ucb::XCommandEnvironment>& xEnv,
+ const OUString & inURL )
+ : m_xEnv( xEnv ), m_aURL( inURL )
+ {
+ }
+
+ virtual int authenticate( const OUString & inRealm,
+ const OUString & inHostName,
+ OUString & inoutUserName,
+ OUString & outPassWord,
+ bool bCanUseSystemCredentials,
+ bool bUsePreviousCredentials = true ) override;
+ private:
+
+ const css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv;
+ const OUString m_aURL;
+
+ OUString m_aPrevPassword;
+ OUString m_aPrevUsername;
+ };
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVException.hxx b/ucb/source/ucp/webdav-curl/DAVException.hxx
new file mode 100644
index 000000000000..537b5a82fa2b
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVException.hxx
@@ -0,0 +1,174 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+
+namespace http_dav_ucp
+{
+
+
+// HTTP/WebDAV status codes
+
+
+const sal_uInt16 SC_NONE = 0;
+
+// 1xx (Informational - no errors)
+const sal_uInt16 SC_CONTINUE = 100;
+const sal_uInt16 SC_SWITCHING_PROTOCOLS = 101;
+// DAV extensions
+const sal_uInt16 SC_PROCESSING = 102;
+
+//2xx (Successful - no errors)
+const sal_uInt16 SC_OK = 200;
+const sal_uInt16 SC_CREATED = 201;
+const sal_uInt16 SC_ACCEPTED = 202;
+const sal_uInt16 SC_NON_AUTHORITATIVE_INFORMATION = 203;
+const sal_uInt16 SC_NO_CONTENT = 204;
+const sal_uInt16 SC_RESET_CONTENT = 205;
+const sal_uInt16 SC_PARTIAL_CONTENT = 206;
+// DAV extensions
+const sal_uInt16 SC_MULTISTATUS = 207;
+
+//3xx (Redirection)
+const sal_uInt16 SC_MULTIPLE_CHOICES = 300;
+const sal_uInt16 SC_MOVED_PERMANENTLY = 301;
+const sal_uInt16 SC_MOVED_TEMPORARILY = 302;
+const sal_uInt16 SC_SEE_OTHER = 303;
+const sal_uInt16 SC_NOT_MODIFIED = 304;
+const sal_uInt16 SC_USE_PROXY = 305;
+const sal_uInt16 SC_TEMPORARY_REDIRECT = 307;
+
+//4xx (Client error)
+const sal_uInt16 SC_BAD_REQUEST = 400;
+const sal_uInt16 SC_UNAUTHORIZED = 401;
+const sal_uInt16 SC_PAYMENT_REQUIRED = 402;
+const sal_uInt16 SC_FORBIDDEN = 403;
+const sal_uInt16 SC_NOT_FOUND = 404;
+const sal_uInt16 SC_METHOD_NOT_ALLOWED = 405;
+const sal_uInt16 SC_NOT_ACCEPTABLE = 406;
+const sal_uInt16 SC_PROXY_AUTHENTICATION_REQUIRED = 407;
+const sal_uInt16 SC_REQUEST_TIMEOUT = 408;
+const sal_uInt16 SC_CONFLICT = 409;
+const sal_uInt16 SC_GONE = 410;
+const sal_uInt16 SC_LENGTH_REQUIRED = 411;
+const sal_uInt16 SC_PRECONDITION_FAILED = 412;
+const sal_uInt16 SC_REQUEST_ENTITY_TOO_LARGE = 413;
+const sal_uInt16 SC_REQUEST_URI_TOO_LONG = 414;
+const sal_uInt16 SC_UNSUPPORTED_MEDIA_TYPE = 415;
+const sal_uInt16 SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;
+const sal_uInt16 SC_EXPECTATION_FAILED = 417;
+// DAV extensions
+const sal_uInt16 SC_UNPROCESSABLE_ENTITY = 422;
+const sal_uInt16 SC_LOCKED = 423;
+const sal_uInt16 SC_FAILED_DEPENDENCY = 424;
+
+//5xx (Server error, general <https://tools.ietf.org/html/rfc7231#section-6.6>)
+const sal_uInt16 SC_INTERNAL_SERVER_ERROR = 500;
+const sal_uInt16 SC_NOT_IMPLEMENTED = 501;
+const sal_uInt16 SC_BAD_GATEWAY = 502;
+const sal_uInt16 SC_SERVICE_UNAVAILABLE = 503;
+const sal_uInt16 SC_GATEWAY_TIMEOUT = 504;
+const sal_uInt16 SC_HTTP_VERSION_NOT_SUPPORTED = 505;
+// DAV extensions (<https://tools.ietf.org/html/rfc4918#section-11>)
+const sal_uInt16 SC_INSUFFICIENT_STORAGE = 507;
+
+// unofficial status codes only used internally by LO
+// used to cache the connection time out event
+const sal_uInt16 USC_CONNECTION_TIMED_OUT = 908;
+ // name resolution failed
+const sal_uInt16 USC_LOOKUP_FAILED = 909;
+const sal_uInt16 USC_AUTH_FAILED = 910;
+const sal_uInt16 USC_AUTHPROXY_FAILED = 911;
+
+
+
+class DAVException : public std::exception
+{
+ public:
+ enum ExceptionCode {
+ DAV_HTTP_ERROR = 0, // Generic error,
+ // mData = server error message,
+ // mStatusCode = HTTP status code
+ DAV_HTTP_LOOKUP, // Name lookup failed,
+ // mData = server[:port]
+ DAV_HTTP_NOAUTH, // No User authentication data provided - e.g., user aborts corresponding dialog
+ // mData = server[:port]
+ DAV_HTTP_AUTH, // User authentication failed on server,
+ // mData = server[:port]
+ DAV_HTTP_AUTHPROXY, // User authentication failed on proxy,
+ // mData = proxy server[:port]
+ DAV_HTTP_CONNECT, // Could not connect to server,
+ // mData = server[:port]
+ DAV_HTTP_TIMEOUT, // Connection timed out
+ // mData = server[:port]
+ DAV_HTTP_FAILED, // The precondition failed
+ // mData = server[:port]
+ DAV_HTTP_RETRY, // Retry request
+ // mData = server[:port]
+ DAV_HTTP_REDIRECT, // Request was redirected,
+ // mData = new URL
+ DAV_SESSION_CREATE, // session creation error,
+ // mData = server[:port]
+ DAV_INVALID_ARG, // invalid argument
+
+ DAV_LOCK_EXPIRED, // DAV lock expired
+
+ DAV_NOT_LOCKED, // not locked
+
+ DAV_LOCKED_SELF, // locked by this OOo session
+
+ DAV_LOCKED // locked by third party
+ };
+
+ private:
+ ExceptionCode mExceptionCode;
+ OUString mData;
+ sal_uInt16 mStatusCode;
+
+ public:
+ explicit DAVException( ExceptionCode inExceptionCode )
+ : mExceptionCode( inExceptionCode )
+ , mData()
+ , mStatusCode( SC_NONE )
+ {};
+ DAVException( ExceptionCode inExceptionCode,
+ const OUString & rData )
+ : mExceptionCode( inExceptionCode )
+ , mData( rData )
+ , mStatusCode( SC_NONE )
+ {};
+ DAVException( ExceptionCode inExceptionCode,
+ const OUString & rData,
+ sal_uInt16 nStatusCode )
+ : mExceptionCode( inExceptionCode )
+ , mData( rData )
+ , mStatusCode( nStatusCode )
+ {};
+
+ const ExceptionCode & getError() const { return mExceptionCode; }
+ const OUString & getData() const { return mData; }
+ sal_uInt16 getStatus() const { return mStatusCode; }
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVProperties.cxx b/ucb/source/ucp/webdav-curl/DAVProperties.cxx
new file mode 100644
index 000000000000..78fc5c6fdccc
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVProperties.cxx
@@ -0,0 +1,202 @@
+/* -*- 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 "DAVProperties.hxx"
+#include <rtl/ustrbuf.hxx>
+#include <o3tl/string_view.hxx>
+#include <string.h>
+
+using namespace http_dav_ucp;
+
+
+// static
+void DAVProperties::createSerfPropName( OUString const& rFullName,
+ SerfPropName & rName )
+{
+ if (rFullName.startsWith("DAV:"))
+ {
+ rName.nspace = "DAV:";
+ rName.name
+ = strdup( OUStringToOString(
+ rFullName.copy(RTL_CONSTASCII_LENGTH("DAV:")),
+ RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ else if (rFullName.startsWith("http://apache.org/dav/props/"))
+ {
+ rName.nspace = "http://apache.org/dav/props/";
+ rName.name
+ = strdup( OUStringToOString(
+ rFullName.copy(
+ RTL_CONSTASCII_LENGTH(
+ "http://apache.org/dav/props/" ) ),
+ RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ else if (rFullName.startsWith("http://ucb.openoffice.org/dav/props/"))
+ {
+ rName.nspace = "http://ucb.openoffice.org/dav/props/";
+ rName.name
+ = strdup( OUStringToOString(
+ rFullName.copy(
+ RTL_CONSTASCII_LENGTH(
+ "http://ucb.openoffice.org/dav/props/" ) ),
+ RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ else if (rFullName.startsWith("<prop:"))
+ {
+ // Support for 3rd party namespaces/props
+
+ OString aFullName
+ = OUStringToOString( rFullName, RTL_TEXTENCODING_UTF8 );
+
+ // Format: <prop:the_propname xmlns:prop="the_namespace">
+
+ sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" );
+ sal_Int32 nLen = aFullName.indexOf( ' ' ) - nStart;
+ rName.name = strdup( aFullName.copy( nStart, nLen ).getStr() );
+
+ nStart = aFullName.indexOf( '=', nStart + nLen ) + 2; // after ="
+ nLen = aFullName.getLength() - RTL_CONSTASCII_LENGTH( "\">" ) - nStart;
+ rName.nspace = strdup( aFullName.copy( nStart, nLen ).getStr() );
+ }
+ else
+ {
+ // this must not be a URI - WebDAVResponseParser must have converted it
+ // to the "<prop:" form above
+ assert(rFullName.indexOf(':') == -1);
+ // Add our namespace to our own properties.
+ rName.nspace = "http://ucb.openoffice.org/dav/props/";
+ rName.name
+ = strdup( OUStringToOString( rFullName,
+ RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+}
+
+
+// static
+void DAVProperties::createUCBPropName( const char * nspace,
+ const char * name,
+ OUString & rFullName )
+{
+ OUString aNameSpace
+ = OStringToOUString( nspace, RTL_TEXTENCODING_UTF8 );
+ OUString aName
+ = OStringToOUString( name, RTL_TEXTENCODING_UTF8 );
+
+ if ( !aNameSpace.getLength() )
+ {
+ // Some servers send XML without proper namespaces. Assume "DAV:"
+ // in this case, if name is a well-known dav property name.
+ // Although this is not 100% correct, it solves many problems.
+
+ if (aName.equalsIgnoreAsciiCase(OUString(DAVProperties::RESOURCETYPE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::SUPPORTEDLOCK).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::LOCKDISCOVERY).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::CREATIONDATE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::DISPLAYNAME).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTLANGUAGE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTLENGTH).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETCONTENTTYPE).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETETAG).copy(4)) ||
+ aName.equalsIgnoreAsciiCase(OUString(DAVProperties::GETLASTMODIFIED).copy(4)))
+ {
+ aNameSpace = "DAV:";
+ }
+ }
+
+ // Note: Concatenating strings BEFORE comparing against known namespaces
+ // is important. See RFC 2815 ( 23.4.2 Meaning of Qualified Names ).
+ rFullName = aNameSpace;
+ rFullName += aName;
+
+ if ( rFullName.startsWith( "DAV:" ) )
+ {
+ // Okay, Just concat strings.
+ }
+ else if ( rFullName.startsWith( "http://apache.org/dav/props/" ) )
+ {
+ // Okay, Just concat strings.
+ }
+ else if ( rFullName.startsWith( "http://ucb.openoffice.org/dav/props/" ) )
+ {
+ // Remove namespace from our own properties.
+ rFullName = rFullName.copy(
+ RTL_CONSTASCII_LENGTH(
+ "http://ucb.openoffice.org/dav/props/" ) );
+ }
+ else
+ {
+ // Create property name that encodes, namespace and name ( XML ).
+ rFullName = "<prop:";
+ rFullName += aName;
+ rFullName += " xmlns:prop=\"";
+ rFullName += aNameSpace;
+ rFullName += "\">";
+ }
+}
+
+
+// static
+bool DAVProperties::isUCBDeadProperty( const SerfPropName & rName )
+{
+ return ( rName.nspace &&
+ ( rtl_str_compareIgnoreAsciiCase(
+ rName.nspace, "http://ucb.openoffice.org/dav/props/" )
+ == 0 ) );
+}
+
+bool DAVProperties::isUCBSpecialProperty(const OUString& rFullName, OUString& rParsedName)
+{
+ sal_Int32 nLen = rFullName.getLength();
+ if ( nLen <= 0 ||
+ !rFullName.startsWith( "<prop:" ) ||
+ !rFullName.endsWith( "\">" ) )
+ return false;
+
+ sal_Int32 nStart = RTL_CONSTASCII_LENGTH( "<prop:" );
+ sal_Int32 nEnd = rFullName.indexOf( ' ', nStart );
+ if ( nEnd == -1 )
+ return false;
+
+ OUString sPropName = rFullName.copy( nStart, nEnd - nStart );
+ if ( !sPropName.getLength() )
+ return false;
+
+ // TODO skip whitespaces?
+ if ( !rFullName.match( "xmlns:prop=\"", ++nEnd ) )
+ return false;
+
+ nStart = nEnd + RTL_CONSTASCII_LENGTH( "xmlns:prop=\"" );
+ nEnd = rFullName.indexOf( '"', nStart );
+ if ( nEnd != nLen - RTL_CONSTASCII_LENGTH( "\">" ) )
+ return false;
+
+ OUString sNamesp = rFullName.copy( nStart, nEnd - nStart );
+ if ( !( nLen = sNamesp.getLength() ) )
+ return false;
+
+ OUStringBuffer aBuff( sNamesp );
+ if ( sNamesp[nLen - 1] != '/' )
+ aBuff.append( '/' );
+ aBuff.append( sPropName );
+ rParsedName = aBuff.makeStringAndClear();
+
+ return rParsedName.getLength();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVProperties.hxx b/ucb/source/ucp/webdav-curl/DAVProperties.hxx
new file mode 100644
index 000000000000..ee64fcff70be
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVProperties.hxx
@@ -0,0 +1,57 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <rtl/ustring.hxx>
+
+namespace http_dav_ucp
+{
+
+typedef struct { const char *nspace, *name; } SerfPropName;
+
+struct DAVProperties
+{
+ static constexpr OUStringLiteral CREATIONDATE = "DAV:creationdate";
+ static constexpr OUStringLiteral DISPLAYNAME = "DAV:displayname";
+ static constexpr OUStringLiteral GETCONTENTLANGUAGE = "DAV:getcontentlanguage";
+ static constexpr OUStringLiteral GETCONTENTLENGTH = "DAV:getcontentlength";
+ static constexpr OUStringLiteral GETCONTENTTYPE = "DAV:getcontenttype";
+ static constexpr OUStringLiteral GETETAG = "DAV:getetag";
+ static constexpr OUStringLiteral GETLASTMODIFIED = "DAV:getlastmodified";
+ static constexpr OUStringLiteral LOCKDISCOVERY = "DAV:lockdiscovery";
+ static constexpr OUStringLiteral RESOURCETYPE = "DAV:resourcetype";
+ static constexpr OUStringLiteral SUPPORTEDLOCK = "DAV:supportedlock";
+ static constexpr OUStringLiteral EXECUTABLE = "http://apache.org/dav/props/executable";
+
+ static void createSerfPropName( OUString const& rFullName,
+ SerfPropName & rName );
+ static void createUCBPropName ( const char * nspace,
+ const char * name,
+ OUString & rFullName );
+
+ static bool isUCBDeadProperty( const SerfPropName & rName );
+ static bool isUCBSpecialProperty( const OUString & rFullName,
+ OUString & rParsedName );
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx b/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx
new file mode 100644
index 000000000000..a489b43092c8
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVRequestEnvironment.hxx
@@ -0,0 +1,54 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <vector>
+#include <rtl/ref.hxx>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include "DAVAuthListener.hxx"
+
+namespace http_dav_ucp
+{
+ typedef std::pair< OUString, OUString > DAVRequestHeader;
+ typedef std::vector< DAVRequestHeader > DAVRequestHeaders;
+
+struct DAVRequestEnvironment
+{
+ OUString m_aRequestURI;
+ rtl::Reference< DAVAuthListener > m_xAuthListener;
+ DAVRequestHeaders m_aRequestHeaders;
+ css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv;
+
+DAVRequestEnvironment( const OUString & rRequestURI,
+ const rtl::Reference< DAVAuthListener > & xListener,
+ const DAVRequestHeaders & rRequestHeaders,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv)
+ : m_aRequestURI( rRequestURI ),
+ m_xAuthListener( xListener ),
+ m_aRequestHeaders( rRequestHeaders ),
+ m_xEnv( xEnv ){}
+
+ DAVRequestEnvironment() {}
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVResource.hxx b/ucb/source/ucp/webdav-curl/DAVResource.hxx
new file mode 100644
index 000000000000..4b031f0a2a57
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVResource.hxx
@@ -0,0 +1,61 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <vector>
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+namespace http_dav_ucp
+{
+
+struct DAVPropertyValue
+{
+ OUString Name;
+ css::uno::Any Value;
+ bool IsCaseSensitive;
+
+ DAVPropertyValue() : IsCaseSensitive( true ) {}
+};
+
+struct DAVResource
+{
+ OUString uri;
+ std::vector< DAVPropertyValue > properties;
+
+ DAVResource() {}
+ explicit DAVResource( const OUString & inUri ) : uri( inUri ) {}
+};
+
+struct DAVResourceInfo
+{
+ std::vector < OUString > properties;
+
+ bool operator==( const struct DAVResourceInfo& a ) const
+ {
+ return (properties == a.properties );
+ }
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
new file mode 100644
index 000000000000..988970b9a0df
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.cxx
@@ -0,0 +1,1192 @@
+/* -*- 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 <com/sun/star/task/XInteractionAbort.hpp>
+#include <com/sun/star/ucb/XWebDAVCommandEnvironment.hpp>
+
+#include <ucbhelper/simpleauthenticationrequest.hxx>
+#include <comphelper/seekableinput.hxx>
+#include <sal/log.hxx>
+
+#include "DAVAuthListenerImpl.hxx"
+#include "DAVResourceAccess.hxx"
+
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/io/IOException.hpp>
+
+using namespace http_dav_ucp;
+using namespace com::sun::star;
+
+
+// DAVAuthListener_Impl Implementation.
+
+
+// virtual
+int DAVAuthListener_Impl::authenticate(
+ const OUString & inRealm,
+ const OUString & inHostName,
+ OUString & inoutUserName,
+ OUString & outPassWord,
+ bool bCanUseSystemCredentials,
+ bool bUsePreviousCredentials )
+{
+ if ( m_xEnv.is() )
+ {
+ uno::Reference< task::XInteractionHandler > xIH
+ = m_xEnv->getInteractionHandler();
+
+ if ( xIH.is() )
+ {
+ // Providing previously retrieved credentials will cause the password
+ // container to reject these. Thus, the credential input dialog will be shown again.
+ // #102871# - Supply username and password from previous try.
+ // Password container service depends on this!
+ if ( inoutUserName.isEmpty() && bUsePreviousCredentials )
+ inoutUserName = m_aPrevUsername;
+
+ if ( outPassWord.isEmpty() && bUsePreviousCredentials )
+ outPassWord = m_aPrevPassword;
+
+ rtl::Reference< ucbhelper::SimpleAuthenticationRequest > xRequest
+ = new ucbhelper::SimpleAuthenticationRequest(
+ m_aURL, inHostName, inRealm, inoutUserName,
+ outPassWord,
+ bCanUseSystemCredentials );
+ xIH->handle( xRequest.get() );
+
+ rtl::Reference< ucbhelper::InteractionContinuation > xSelection
+ = xRequest->getSelection();
+
+ if ( xSelection.is() )
+ {
+ // Handler handled the request.
+ uno::Reference< task::XInteractionAbort > xAbort(
+ xSelection.get(), uno::UNO_QUERY );
+ if ( !xAbort.is() )
+ {
+ const rtl::Reference<
+ ucbhelper::InteractionSupplyAuthentication > & xSupp
+ = xRequest->getAuthenticationSupplier();
+
+ bool bUseSystemCredentials = false;
+
+ if ( bCanUseSystemCredentials )
+ bUseSystemCredentials
+ = xSupp->getUseSystemCredentials();
+
+ if ( bUseSystemCredentials )
+ {
+ // This is the (strange) way to tell neon to use
+ // system credentials.
+ inoutUserName.clear();
+ outPassWord.clear();
+ }
+ else
+ {
+ inoutUserName = xSupp->getUserName();
+ outPassWord = xSupp->getPassword();
+ }
+
+ // #102871# - Remember username and password.
+ m_aPrevUsername = inoutUserName;
+ m_aPrevPassword = outPassWord;
+
+ // go on.
+ return 0;
+ }
+ }
+ }
+ }
+ // Abort.
+ return -1;
+}
+
+
+// DAVResourceAccess Implementation.
+
+
+DAVResourceAccess::DAVResourceAccess(
+ const uno::Reference< uno::XComponentContext > & rContext,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory,
+ const OUString & rURL )
+: m_aURL( rURL ),
+ m_xSessionFactory( rSessionFactory ),
+ m_xContext( rContext )
+, m_nRedirectLimit( 5 )
+{
+}
+
+
+DAVResourceAccess::DAVResourceAccess( const DAVResourceAccess & rOther )
+: m_aURL( rOther.m_aURL ),
+ m_aPath( rOther.m_aPath ),
+ m_aFlags( rOther.m_aFlags ),
+ m_xSession( rOther.m_xSession ),
+ m_xSessionFactory( rOther.m_xSessionFactory ),
+ m_xContext( rOther.m_xContext ),
+ m_aRedirectURIs( rOther.m_aRedirectURIs ),
+ m_nRedirectLimit( rOther.m_nRedirectLimit )
+{
+}
+
+
+DAVResourceAccess & DAVResourceAccess::operator=(
+ const DAVResourceAccess & rOther )
+{
+ m_aURL = rOther.m_aURL;
+ m_aPath = rOther.m_aPath;
+ m_aFlags = rOther.m_aFlags;
+ m_xSession = rOther.m_xSession;
+ m_xSessionFactory = rOther.m_xSessionFactory;
+ m_xContext = rOther.m_xContext;
+ m_aRedirectURIs = rOther.m_aRedirectURIs;
+ m_nRedirectLimit = rOther.m_nRedirectLimit;
+
+ return *this;
+}
+
+void DAVResourceAccess::OPTIONS(
+ DAVOptions & rOptions,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_OPTIONS,
+ aHeaders );
+
+ m_xSession->OPTIONS( getRequestURI(),
+ rOptions,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+void DAVResourceAccess::PROPFIND(
+ const Depth nDepth,
+ const std::vector< OUString > & rPropertyNames,
+ std::vector< DAVResource > & rResources,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_PROPFIND,
+ aHeaders );
+
+ m_xSession->PROPFIND( getRequestURI(),
+ nDepth,
+ rPropertyNames,
+ rResources,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::PROPFIND(
+ const Depth nDepth,
+ std::vector< DAVResourceInfo > & rResInfo,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_PROPFIND,
+ aHeaders );
+
+ m_xSession->PROPFIND( getRequestURI(),
+ nDepth,
+ rResInfo,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) ) ;
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::PROPPATCH(
+ const std::vector< ProppatchValue >& rValues,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_PROPPATCH,
+ aHeaders );
+
+ m_xSession->PROPPATCH( getRequestURI(),
+ rValues,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::HEAD(
+ const std::vector< OUString > & rHeaderNames,
+ DAVResource & rResource,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_HEAD,
+ aHeaders );
+
+ m_xSession->HEAD( getRequestURI(),
+ rHeaderNames,
+ rResource,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+uno::Reference< io::XInputStream > DAVResourceAccess::GET(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ uno::Reference< io::XInputStream > xStream;
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_GET,
+ aHeaders );
+
+ xStream = m_xSession->GET( getRequestURI(),
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl(
+ xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+
+ return xStream;
+}
+
+
+void DAVResourceAccess::GET(
+ uno::Reference< io::XOutputStream > & rStream,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_GET,
+ aHeaders );
+
+ m_xSession->GET( getRequestURI(),
+ rStream,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+uno::Reference< io::XInputStream > DAVResourceAccess::GET(
+ const std::vector< OUString > & rHeaderNames,
+ DAVResource & rResource,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ uno::Reference< io::XInputStream > xStream;
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_GET,
+ aHeaders );
+
+ xStream = m_xSession->GET( getRequestURI(),
+ rHeaderNames,
+ rResource,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl(
+ xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+
+ return xStream;
+}
+
+
+// used as HEAD substitute when HEAD is not implemented on server
+void DAVResourceAccess::GET0(
+ DAVRequestHeaders &rRequestHeaders,
+ const std::vector< OUString > & rHeaderNames,
+ DAVResource & rResource,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ uno::Reference< io::XInputStream > xStream;
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_GET,
+ rRequestHeaders );
+
+ m_xSession->GET( getRequestURI(),
+ rHeaderNames,
+ rResource,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl(
+ xEnv, m_aURL ),
+ rRequestHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::GET(
+ uno::Reference< io::XOutputStream > & rStream,
+ const std::vector< OUString > & rHeaderNames,
+ DAVResource & rResource,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ bool bRetry;
+ int errorCount = 0;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_GET,
+ aHeaders );
+
+ m_xSession->GET( getRequestURI(),
+ rStream,
+ rHeaderNames,
+ rResource,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::abort()
+{
+ // seems pointless to call initialize() here, but prepare for nullptr
+ decltype(m_xSession) xSession;
+ {
+ osl::Guard<osl::Mutex> const g(m_aMutex);
+ xSession = m_xSession;
+ }
+ if (xSession.is())
+ {
+ xSession->abort();
+ }
+}
+
+
+namespace {
+
+ /// @throws DAVException
+ void resetInputStream( const uno::Reference< io::XInputStream > & rStream )
+ {
+ try
+ {
+ uno::Reference< io::XSeekable > xSeekable(
+ rStream, uno::UNO_QUERY );
+ if ( xSeekable.is() )
+ {
+ xSeekable->seek( 0 );
+ return;
+ }
+ }
+ catch ( lang::IllegalArgumentException const & )
+ {
+ }
+ catch ( io::IOException const & )
+ {
+ }
+
+ throw DAVException( DAVException::DAV_INVALID_ARG );
+ }
+
+} // namespace
+
+
+void DAVResourceAccess::PUT(
+ const uno::Reference< io::XInputStream > & rStream,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ // Make stream seekable, if it not. Needed, if request must be retried.
+ uno::Reference< io::XInputStream > xSeekableStream
+ = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
+ rStream, m_xContext );
+
+ int errorCount = 0;
+ bool bRetry = false;
+ do
+ {
+ if ( bRetry )
+ resetInputStream( xSeekableStream );
+
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_PUT,
+ aHeaders );
+
+ m_xSession->PUT( getRequestURI(),
+ xSeekableStream,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+uno::Reference< io::XInputStream > DAVResourceAccess::POST(
+ const OUString & rContentType,
+ const OUString & rReferer,
+ const uno::Reference< io::XInputStream > & rInputStream,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ initialize();
+
+ // Make stream seekable, if it not. Needed, if request must be retried.
+ uno::Reference< io::XInputStream > xSeekableStream
+ = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
+ rInputStream, m_xContext );
+
+ uno::Reference< io::XInputStream > xStream;
+ int errorCount = 0;
+ bool bRetry = false;
+ do
+ {
+ if ( bRetry )
+ {
+ resetInputStream( xSeekableStream );
+ bRetry = false;
+ }
+
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_POST,
+ aHeaders );
+
+ xStream = m_xSession->POST( getRequestURI(),
+ rContentType,
+ rReferer,
+ xSeekableStream,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl(
+ xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+
+ if ( e.getError() == DAVException::DAV_HTTP_REDIRECT )
+ {
+ // #i74980# - Upon POST redirect, do a GET.
+ return GET( xEnv );
+ }
+ }
+ }
+ while ( bRetry );
+
+ return xStream;
+}
+
+
+void DAVResourceAccess::POST(
+ const OUString & rContentType,
+ const OUString & rReferer,
+ const uno::Reference< io::XInputStream > & rInputStream,
+ uno::Reference< io::XOutputStream > & rOutputStream,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ initialize();
+
+ // Make stream seekable, if it not. Needed, if request must be retried.
+ uno::Reference< io::XInputStream > xSeekableStream
+ = comphelper::OSeekableInputWrapper::CheckSeekableCanWrap(
+ rInputStream, m_xContext );
+
+ int errorCount = 0;
+ bool bRetry = false;
+ do
+ {
+ if ( bRetry )
+ {
+ resetInputStream( xSeekableStream );
+ bRetry = false;
+ }
+
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_POST,
+ aHeaders );
+
+ m_xSession->POST( getRequestURI(),
+ rContentType,
+ rReferer,
+ xSeekableStream,
+ rOutputStream,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+
+ if ( e.getError() == DAVException::DAV_HTTP_REDIRECT )
+ {
+ // #i74980# - Upon POST redirect, do a GET.
+ GET( rOutputStream, xEnv );
+ return;
+ }
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::MKCOL(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_MKCOL,
+ aHeaders );
+
+ m_xSession->MKCOL( getRequestURI(),
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::COPY(
+ const OUString & rSourcePath,
+ const OUString & rDestinationURI,
+ bool bOverwrite,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_COPY,
+ aHeaders );
+
+ m_xSession->COPY( rSourcePath,
+ rDestinationURI,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ),
+ bOverwrite );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::MOVE(
+ const OUString & rSourcePath,
+ const OUString & rDestinationURI,
+ bool bOverwrite,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_MOVE,
+ aHeaders );
+
+ m_xSession->MOVE( rSourcePath,
+ rDestinationURI,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ),
+ bOverwrite );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+void DAVResourceAccess::DESTROY(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_DELETE,
+ aHeaders );
+
+ m_xSession->DESTROY( getRequestURI(),
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+
+// set new lock.
+void DAVResourceAccess::LOCK(
+ ucb::Lock & inLock,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_LOCK,
+ aHeaders );
+
+ m_xSession->LOCK( getRequestURI(),
+ inLock,
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+void DAVResourceAccess::UNLOCK(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ initialize();
+
+ int errorCount = 0;
+ bool bRetry;
+ do
+ {
+ bRetry = false;
+ try
+ {
+ DAVRequestHeaders aHeaders;
+ getUserRequestHeaders( xEnv,
+ getRequestURI(),
+ ucb::WebDAVHTTPMethod_UNLOCK,
+ aHeaders );
+
+ m_xSession->UNLOCK( getRequestURI(),
+ DAVRequestEnvironment(
+ getRequestURI(),
+ new DAVAuthListener_Impl( xEnv, m_aURL ),
+ aHeaders, xEnv ) );
+ }
+ catch (DAVException const& e)
+ {
+ errorCount++;
+ bRetry = handleException( e, errorCount );
+ if ( !bRetry )
+ throw;
+ }
+ }
+ while ( bRetry );
+}
+
+void DAVResourceAccess::setFlags( const uno::Sequence< beans::NamedValue >& rFlags )
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_aFlags = rFlags;
+}
+
+void DAVResourceAccess::setURL( const OUString & rNewURL )
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_aURL = rNewURL;
+ m_aPath.clear(); // Next initialize() will create new session.
+}
+
+
+// init dav session and path
+void DAVResourceAccess::initialize()
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ if ( m_aPath.isEmpty() )
+ {
+ CurlUri const aURI( m_aURL );
+ OUString aPath( aURI.GetRelativeReference() );
+
+ /* #134089# - Check URI */
+ if ( aPath.isEmpty() )
+ throw DAVException( DAVException::DAV_INVALID_ARG );
+
+ /* #134089# - Check URI */
+ if ( aURI.GetHost().isEmpty() )
+ throw DAVException( DAVException::DAV_INVALID_ARG );
+
+ if ( !m_xSession.is() || !m_xSession->CanUse( m_aURL, m_aFlags ) )
+ {
+ m_xSession.clear();
+
+ // create new webdav session
+ m_xSession
+ = m_xSessionFactory->createDAVSession( m_aURL, m_aFlags, m_xContext );
+
+ if ( !m_xSession.is() )
+ return;
+ }
+
+ // Own URI is needed to redirect cycle detection.
+ m_aRedirectURIs.push_back( aURI );
+
+ // Success.
+ m_aPath = aPath;
+
+ // Not only the path has to be encoded
+ m_aURL = aURI.GetURI();
+ }
+}
+
+
+const OUString & DAVResourceAccess::getRequestURI() const
+{
+ assert(m_xSession.is() &&
+ "DAVResourceAccess::getRequestURI - Not initialized!");
+
+ // In case a proxy is used we have to use the absolute URI for a request.
+ if ( m_xSession->UsesProxy() )
+ return m_aURL;
+
+ return m_aPath;
+}
+
+
+// static
+void DAVResourceAccess::getUserRequestHeaders(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv,
+ const OUString & rURI,
+ ucb::WebDAVHTTPMethod eMethod,
+ DAVRequestHeaders & rRequestHeaders )
+{
+ if ( !xEnv.is() )
+ return;
+
+ uno::Reference< ucb::XWebDAVCommandEnvironment > xDAVEnv(
+ xEnv, uno::UNO_QUERY );
+
+ if ( !xDAVEnv.is() )
+ return;
+
+ uno::Sequence< beans::StringPair > aRequestHeaders
+ = xDAVEnv->getUserRequestHeaders( rURI, eMethod );
+
+ for ( sal_Int32 n = 0; n < aRequestHeaders.getLength(); ++n )
+ {
+ rRequestHeaders.push_back(
+ DAVRequestHeader( aRequestHeaders[ n ].First,
+ aRequestHeaders[ n ].Second ) );
+ }
+}
+
+// This function member implements the control on cyclical redirections
+bool DAVResourceAccess::detectRedirectCycle(
+ ::std::u16string_view const rRedirectURL)
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ CurlUri const aUri( rRedirectURL );
+
+ // Check for maximum number of redirections
+ // according to <https://tools.ietf.org/html/rfc7231#section-6.4>.
+ // A practical limit may be 5, due to earlier specifications:
+ // <https://tools.ietf.org/html/rfc2068#section-10.3>
+ // it can be raised keeping in mind the added net activity.
+ if( static_cast< size_t >( m_nRedirectLimit ) <= m_aRedirectURIs.size() )
+ return true;
+
+ // try to detect a cyclical redirection
+ return std::any_of(m_aRedirectURIs.begin(), m_aRedirectURIs.end(),
+ [&aUri](const CurlUri& rUri) { return aUri == rUri; });
+}
+
+
+void DAVResourceAccess::resetUri()
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ if ( ! m_aRedirectURIs.empty() )
+ {
+ auto const it = m_aRedirectURIs.begin();
+
+ CurlUri const aUri( *it );
+ m_aRedirectURIs.clear();
+ setURL ( aUri.GetURI() );
+ initialize();
+ }
+}
+
+
+bool DAVResourceAccess::handleException(DAVException const& e, int const errorCount)
+{
+ switch ( e.getError() )
+ {
+ case DAVException::DAV_HTTP_REDIRECT:
+ if ( !detectRedirectCycle( e.getData() ) )
+ {
+ // set new URL and path.
+ setURL( e.getData() );
+ initialize();
+ return true;
+ }
+ return false;
+ // i#67048 copy & paste images doesn't display. This bug refers
+ // to an old OOo problem about getting resources from sites with a bad connection.
+ // If we have a bad connection try again. Up to three times.
+ case DAVException::DAV_HTTP_ERROR:
+ // retry up to three times, if not a client-side error (4xx error codes)
+ if ( e.getStatus() < SC_BAD_REQUEST && errorCount < 3 )
+ return true;
+ // check the server side errors
+ switch( e.getStatus() )
+ {
+ // the HTTP server side response status codes that can be retried
+ // [Serf TODO? i#119036] case SC_REQUEST_ENTITY_TOO_LARGE:
+ case SC_BAD_GATEWAY: // retry, can be an excessive load
+ case SC_GATEWAY_TIMEOUT: // retry, may be we get lucky
+ case SC_SERVICE_UNAVAILABLE: // retry, the service may become available
+ case SC_INSUFFICIENT_STORAGE: // space may be freed, retry
+ {
+ if ( errorCount < 3 )
+ return true;
+ else
+ return false;
+ }
+ break;
+ // all the other HTTP server response status codes are NOT retry
+ default:
+ return false;
+ }
+ break;
+ // if connection has said retry then retry!
+ case DAVException::DAV_HTTP_RETRY:
+ return true;
+ // <--
+ default:
+ return false; // Abort
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
new file mode 100644
index 000000000000..df27713a936d
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVResourceAccess.hxx
@@ -0,0 +1,220 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <vector>
+#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
+#include <osl/mutex.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/ucb/Lock.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/ucb/WebDAVHTTPMethod.hpp>
+#include "DAVAuthListener.hxx"
+#include "DAVException.hxx"
+#include "DAVSession.hxx"
+#include "DAVResource.hxx"
+#include "DAVTypes.hxx"
+#include "CurlUri.hxx"
+
+namespace http_dav_ucp
+{
+
+class DAVSessionFactory;
+
+class DAVResourceAccess
+{
+ osl::Mutex m_aMutex;
+ OUString m_aURL;
+ OUString m_aPath;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > m_aFlags;
+ rtl::Reference< DAVSession > m_xSession;
+ rtl::Reference< DAVSessionFactory > m_xSessionFactory;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ std::vector<CurlUri> m_aRedirectURIs;
+ sal_uInt32 m_nRedirectLimit;
+
+public:
+ DAVResourceAccess() = default;
+ DAVResourceAccess( const css::uno::Reference< css::uno::XComponentContext > & rContext,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory,
+ const OUString & rURL );
+ DAVResourceAccess( const DAVResourceAccess & rOther );
+
+ DAVResourceAccess & operator=( const DAVResourceAccess & rOther );
+
+ /// @throws DAVException
+ void setFlags( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rFlags );
+
+ /// @throws DAVException
+ void setURL( const OUString & rNewURL );
+
+ void resetUri();
+
+ const OUString & getURL() const { return m_aURL; }
+
+ rtl::Reference< DAVSessionFactory > getSessionFactory() const
+ { return m_xSessionFactory; }
+
+ // DAV methods
+
+ /// @throws DAVException
+ void
+ OPTIONS(
+ DAVOptions & rOptions,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ // allprop & named
+ /// @throws DAVException
+ void
+ PROPFIND( const Depth nDepth,
+ const std::vector< OUString > & rPropertyNames,
+ std::vector< DAVResource > & rResources,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ // propnames
+ /// @throws DAVException
+ void
+ PROPFIND( const Depth nDepth,
+ std::vector< DAVResourceInfo > & rResInfo,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ PROPPATCH( const std::vector< ProppatchValue > & rValues,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws DAVException
+ void
+ HEAD( const std::vector< OUString > & rHeaderNames, // empty == 'all'
+ DAVResource & rResource,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws DAVException
+ css::uno::Reference< css::io::XInputStream >
+ GET( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ GET( css::uno::Reference< css::io::XOutputStream > & rStream,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ css::uno::Reference< css::io::XInputStream >
+ GET( const std::vector< OUString > & rHeaderNames, // empty == 'all'
+ DAVResource & rResource,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// used as HEAD substitute when HEAD is not implemented on server
+ /// @throws DAVException
+ void
+ GET0( DAVRequestHeaders & rRequestHeaders,
+ const std::vector< OUString > & rHeaderNames, // empty == 'all'
+ DAVResource & rResource,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ GET( css::uno::Reference< css::io::XOutputStream > & rStream,
+ const std::vector< OUString > & rHeaderNames, // empty == 'all'
+ DAVResource & rResource,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ PUT( const css::uno::Reference< css::io::XInputStream > & rStream,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ css::uno::Reference< css::io::XInputStream >
+ POST( const OUString & rContentType,
+ const OUString & rReferer,
+ const css::uno::Reference< css::io::XInputStream > & rInputStream,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws DAVException
+ void
+ POST( const OUString & rContentType,
+ const OUString & rReferer,
+ const css::uno::Reference< css::io::XInputStream > & rInputStream,
+ css::uno::Reference< css::io::XOutputStream > & rOutputStream,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws DAVException
+ void
+ MKCOL( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ COPY( const OUString & rSourcePath,
+ const OUString & rDestinationURI,
+ bool bOverwrite,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ MOVE( const OUString & rSourcePath,
+ const OUString & rDestinationURI,
+ bool bOverwrite,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ DESTROY( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ // set new lock.
+ /// @throws DAVException
+ void
+ LOCK( css::ucb::Lock & inLock,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ UNLOCK( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ /// @throws DAVException
+ void
+ abort();
+
+ // helper
+ static void
+ getUserRequestHeaders(
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv,
+ const OUString & rURI,
+ css::ucb::WebDAVHTTPMethod eMethod,
+ DAVRequestHeaders & rRequestHeaders );
+
+ /// @throws DAVException
+ bool handleException(DAVException const& e, int errorCount);
+
+private:
+ const OUString & getRequestURI() const;
+ /// @throws DAVException
+ bool detectRedirectCycle(::std::u16string_view rRedirectURL);
+ /// @throws DAVException
+ void initialize();
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVSession.hxx b/ucb/source/ucp/webdav-curl/DAVSession.hxx
new file mode 100644
index 000000000000..cb298783161b
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVSession.hxx
@@ -0,0 +1,196 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <memory>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include "DAVResource.hxx"
+#include "DAVSessionFactory.hxx"
+#include "DAVTypes.hxx"
+#include "DAVRequestEnvironment.hxx"
+
+namespace com { namespace sun { namespace star { namespace beans {
+ struct NamedValue;
+} } } }
+
+namespace com::sun::star::ucb {
+ struct Lock;
+}
+
+namespace http_dav_ucp
+{
+
+class DAVAuthListener;
+
+class DAVSession
+{
+public:
+ void acquire()
+ {
+ osl_atomic_increment( &m_nRefCount );
+ }
+
+ void release()
+ {
+ if ( osl_atomic_decrement( &m_nRefCount ) == 0 )
+ {
+ m_xFactory->releaseElement( this );
+ delete this;
+ }
+ }
+
+ virtual bool CanUse( const OUString & rURI,
+ const ::com::sun::star::uno::Sequence<::com::sun::star::beans::NamedValue>& rFlags ) = 0;
+
+ virtual bool UsesProxy() = 0;
+
+ // DAV methods
+
+ virtual void OPTIONS( const OUString & inPath,
+ DAVOptions & rOptions,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ // allprop & named
+ /// @throws DAVException
+ virtual void PROPFIND( const OUString & inPath,
+ const Depth inDepth,
+ const std::vector< OUString > & inPropertyNames,
+ std::vector< DAVResource > & ioResources,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ // propnames
+ /// @throws DAVException
+ virtual void PROPFIND( const OUString & inPath,
+ const Depth inDepth,
+ std::vector< DAVResourceInfo > & ioResInfo,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void PROPPATCH( const OUString & inPath,
+ const std::vector< ProppatchValue > & inValues,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void HEAD( const OUString & inPath,
+ const std::vector< OUString > & inHeaderNames,
+ DAVResource & ioResource,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual css::uno::Reference< css::io::XInputStream >
+ GET( const OUString & inPath,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void GET( const OUString & inPath,
+ css::uno::Reference< css::io::XOutputStream >& o,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual css::uno::Reference< css::io::XInputStream >
+ GET( const OUString & inPath,
+ const std::vector< OUString > & inHeaderNames,
+ DAVResource & ioResource,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void
+ GET( const OUString & inPath,
+ css::uno::Reference< css::io::XOutputStream >& o,
+ const std::vector< OUString > & inHeaderNames,
+ DAVResource & ioResource,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void PUT( const OUString & inPath,
+ const css::uno::Reference< css::io::XInputStream >& s,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual css::uno::Reference< css::io::XInputStream >
+ POST( const OUString & inPath,
+ const OUString & rContentType,
+ const OUString & rReferer,
+ const css::uno::Reference< css::io::XInputStream > & inInputStream,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void POST( const OUString & inPath,
+ const OUString & rContentType,
+ const OUString & rReferer,
+ const css::uno::Reference< css::io::XInputStream > & inInputStream,
+ css::uno::Reference< css::io::XOutputStream > & oOutputStream,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void MKCOL( const OUString & inPath,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void COPY( const OUString & inSource,
+ const OUString & inDestination,
+ const DAVRequestEnvironment & rEnv,
+ bool inOverwrite = false ) = 0;
+
+ /// @throws DAVException
+ virtual void MOVE( const OUString & inSource,
+ const OUString & inDestination,
+ const DAVRequestEnvironment & rEnv,
+ bool inOverwrite = false ) = 0;
+
+ /// @throws DAVException
+ virtual void DESTROY( const OUString & inPath,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ // set new lock.
+ /// @throws DAVException
+ virtual void LOCK( const OUString & inPath,
+ css::ucb::Lock & inLock,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void UNLOCK( const OUString & inPath,
+ const DAVRequestEnvironment & rEnv ) = 0;
+
+ /// @throws DAVException
+ virtual void abort() = 0;
+
+protected:
+ rtl::Reference< DAVSessionFactory > m_xFactory;
+
+ explicit DAVSession( rtl::Reference< DAVSessionFactory > const & rFactory )
+ : m_xFactory( rFactory ), m_nRefCount( 0 ) {}
+
+ virtual ~DAVSession() {}
+
+private:
+ DAVSessionFactory::Map::iterator m_aContainerIt;
+ oslInterlockedCount m_nRefCount;
+
+ friend class DAVSessionFactory;
+ friend struct std::default_delete< DAVSession >;
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
new file mode 100644
index 000000000000..bbb7a48bcf0a
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx
@@ -0,0 +1,87 @@
+/* -*- 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 <memory>
+#include "DAVSessionFactory.hxx"
+#include "CurlSession.hxx"
+#include "CurlUri.hxx"
+
+using namespace http_dav_ucp;
+using namespace com::sun::star;
+
+DAVSessionFactory::~DAVSessionFactory()
+{
+}
+
+rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
+ const OUString & inUri,
+ const uno::Sequence< beans::NamedValue >& rFlags,
+ const uno::Reference< uno::XComponentContext > & rxContext )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+
+ if (!m_xProxyDecider)
+ m_xProxyDecider.reset( new ucbhelper::InternetProxyDecider( rxContext ) );
+
+ Map::iterator aIt = std::find_if(m_aMap.begin(), m_aMap.end(),
+ [&inUri, &rFlags](const Map::value_type& rEntry) { return rEntry.second->CanUse( inUri, rFlags ); });
+
+ if ( aIt == m_aMap.end() )
+ {
+ CurlUri const aURI( inUri );
+
+ std::unique_ptr< DAVSession > xElement(
+ new CurlSession(rxContext, this, inUri, rFlags, *m_xProxyDecider) );
+
+ aIt = m_aMap.emplace( inUri, xElement.get() ).first;
+ aIt->second->m_aContainerIt = aIt;
+ xElement.release();
+ return aIt->second;
+ }
+ else if ( osl_atomic_increment( &aIt->second->m_nRefCount ) > 1 )
+ {
+ rtl::Reference< DAVSession > xElement( aIt->second );
+ osl_atomic_decrement( &aIt->second->m_nRefCount );
+ return xElement;
+ }
+ else
+ {
+ osl_atomic_decrement( &aIt->second->m_nRefCount );
+ aIt->second->m_aContainerIt = m_aMap.end();
+
+ // If URL scheme is different from http or https we definitely
+ // have to use a proxy and therefore can optimize the getProxy
+ // call a little:
+ CurlUri const aURI( inUri );
+
+ aIt->second = new CurlSession(rxContext, this, inUri, rFlags, *m_xProxyDecider);
+ aIt->second->m_aContainerIt = aIt;
+ return aIt->second;
+ }
+}
+
+void DAVSessionFactory::releaseElement( DAVSession * pElement )
+{
+ assert( pElement );
+ osl::MutexGuard aGuard( m_aMutex );
+ if ( pElement->m_aContainerIt != m_aMap.end() )
+ m_aMap.erase( pElement->m_aContainerIt );
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVSessionFactory.hxx b/ucb/source/ucp/webdav-curl/DAVSessionFactory.hxx
new file mode 100644
index 000000000000..b0d426f43bf3
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVSessionFactory.hxx
@@ -0,0 +1,74 @@
+/* -*- 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 .
+ */
+
+#pragma once
+
+#ifdef min
+#undef min // GNU libstdc++ <memory> includes <limit> which defines methods called min...
+#endif
+#include <map>
+#include <memory>
+#include <osl/mutex.hxx>
+#include <salhelper/simplereferenceobject.hxx>
+#include <rtl/ref.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <ucbhelper/proxydecider.hxx>
+
+using namespace com::sun::star;
+
+namespace com::sun::star::beans
+{
+struct NamedValue;
+}
+
+namespace com::sun::star::lang
+{
+class XMultiServiceFactory;
+}
+
+namespace http_dav_ucp
+{
+class DAVSession;
+
+class DAVSessionFactory : public salhelper::SimpleReferenceObject
+{
+public:
+ virtual ~DAVSessionFactory() override;
+
+ /// @throws DAVException
+ rtl::Reference<DAVSession> createDAVSession(
+ const OUString& inUri,
+ const ::com::sun::star::uno::Sequence<::com::sun::star::beans::NamedValue>& rFlags,
+ const css::uno::Reference<css::uno::XComponentContext>& rxContext);
+
+private:
+ typedef std::map<OUString, DAVSession*> Map;
+
+ Map m_aMap;
+ osl::Mutex m_aMutex;
+ std::unique_ptr<ucbhelper::InternetProxyDecider> m_xProxyDecider;
+
+ void releaseElement(DAVSession* pElement);
+
+ friend class DAVSession;
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
new file mode 100644
index 000000000000..015c3520bf73
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -0,0 +1,199 @@
+/* -*- 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 "DAVTypes.hxx"
+
+#include "CurlUri.hxx"
+#include "../inc/urihelper.hxx"
+
+#include <osl/time.h>
+
+
+using namespace http_dav_ucp;
+using namespace com::sun::star;
+
+// DAVOptions implementation
+
+DAVOptions::DAVOptions() :
+ m_isClass1( false ),
+ m_isClass2( false ),
+ m_isClass3( false ),
+ m_isHeadAllowed( true ),
+ m_isLocked( false ),
+ m_aAllowedMethods(),
+ m_nStaleTime( 0 ),
+ m_nRequestedTimeLife( 0 ),
+ m_sURL(),
+ m_sRedirectedURL(),
+ m_nHttpResponseStatusCode( 0 ),
+ m_sHttpResponseStatusText()
+{
+}
+
+DAVOptions::DAVOptions( const DAVOptions & rOther ) :
+ m_isClass1( rOther.m_isClass1 ),
+ m_isClass2( rOther.m_isClass2 ),
+ m_isClass3( rOther.m_isClass3 ),
+ m_isHeadAllowed( rOther.m_isHeadAllowed ),
+ m_isLocked( rOther.m_isLocked ),
+ m_aAllowedMethods( rOther.m_aAllowedMethods ),
+ m_nStaleTime( rOther.m_nStaleTime ),
+ m_nRequestedTimeLife( rOther.m_nRequestedTimeLife ),
+ m_sURL( rOther.m_sURL ),
+ m_sRedirectedURL( rOther.m_sRedirectedURL),
+ m_nHttpResponseStatusCode( rOther.m_nHttpResponseStatusCode ),
+ m_sHttpResponseStatusText( rOther.m_sHttpResponseStatusText )
+{
+}
+
+DAVOptions::~DAVOptions()
+{
+}
+
+DAVOptions & DAVOptions::operator=( const DAVOptions& rOpts )
+{
+ m_isClass1 = rOpts.m_isClass1;
+ m_isClass2 = rOpts.m_isClass2;
+ m_isClass3 = rOpts.m_isClass3;
+ m_isLocked = rOpts.m_isLocked;
+ m_isHeadAllowed = rOpts.m_isHeadAllowed;
+ m_aAllowedMethods = rOpts.m_aAllowedMethods;
+ m_nStaleTime = rOpts.m_nStaleTime;
+ m_nRequestedTimeLife = rOpts.m_nRequestedTimeLife;
+ m_sURL = rOpts.m_sURL;
+ m_sRedirectedURL = rOpts.m_sRedirectedURL;
+ m_nHttpResponseStatusCode = rOpts.m_nHttpResponseStatusCode;
+ m_sHttpResponseStatusText = rOpts.m_sHttpResponseStatusText;
+ return *this;
+}
+
+bool DAVOptions::operator==( const DAVOptions& rOpts ) const
+{
+ return
+ m_isClass1 == rOpts.m_isClass1 &&
+ m_isClass2 == rOpts.m_isClass2 &&
+ m_isClass3 == rOpts.m_isClass3 &&
+ m_isLocked == rOpts.m_isLocked &&
+ m_isHeadAllowed == rOpts.m_isHeadAllowed &&
+ m_aAllowedMethods == rOpts.m_aAllowedMethods &&
+ m_nStaleTime == rOpts.m_nStaleTime &&
+ m_nRequestedTimeLife == rOpts.m_nRequestedTimeLife &&
+ m_sURL == rOpts.m_sURL &&
+ m_sRedirectedURL == rOpts.m_sRedirectedURL &&
+ m_nHttpResponseStatusCode == rOpts.m_nHttpResponseStatusCode &&
+ m_sHttpResponseStatusText == rOpts.m_sHttpResponseStatusText;
+}
+
+
+// DAVOptionsCache implementation
+
+DAVOptionsCache::DAVOptionsCache()
+{
+}
+
+DAVOptionsCache::~DAVOptionsCache()
+{
+}
+
+bool DAVOptionsCache::getDAVOptions( const OUString & rURL, DAVOptions & rDAVOptions )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+ OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
+ normalizeURLLastChar( aEncodedUrl );
+
+ // search the URL in the static map
+ DAVOptionsMap::iterator it;
+ it = m_aTheCache.find( aEncodedUrl );
+ if ( it == m_aTheCache.end() )
+ return false;
+ else
+ {
+ // check if the capabilities are stale, before restoring
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ if ( (*it).second.getStaleTime() < t1.Seconds )
+ {
+ // if stale, remove from cache, do not restore
+ m_aTheCache.erase( it );
+ return false;
+ // return false instead
+ }
+ rDAVOptions = (*it).second;
+ return true;
+ }
+}
+
+void DAVOptionsCache::removeDAVOptions( const OUString & rURL )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+ OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
+ normalizeURLLastChar( aEncodedUrl );
+
+ DAVOptionsMap::iterator it;
+ it = m_aTheCache.find( aEncodedUrl );
+ if ( it != m_aTheCache.end() )
+ {
+ m_aTheCache.erase( it );
+ }
+}
+
+void DAVOptionsCache::addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 nLifeTime )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+ OUString aURL( rDAVOptions.getURL() );
+
+ OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(aURL) ) );
+ normalizeURLLastChar( aEncodedUrl );
+ rDAVOptions.setURL( aEncodedUrl );
+
+// unchanged, it may be used to access a server
+ OUString aRedirURL( rDAVOptions.getRedirectedURL() );
+ rDAVOptions.setRedirectedURL( aRedirURL );
+
+ // check if already cached
+ DAVOptionsMap::iterator it;
+ it = m_aTheCache.find( aEncodedUrl );
+ if ( it != m_aTheCache.end() )
+ { // already in cache, check LifeTime
+ if ( (*it).second.getRequestedTimeLife() == nLifeTime )
+ return; // same lifetime, do nothing
+ }
+ // not in cache, add it
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ rDAVOptions.setStaleTime( t1.Seconds + nLifeTime );
+
+ m_aTheCache[ aEncodedUrl ] = rDAVOptions;
+}
+
+void DAVOptionsCache::setHeadAllowed( const OUString & rURL, const bool HeadAllowed )
+{
+ osl::MutexGuard aGuard( m_aMutex );
+ OUString aEncodedUrl( ucb_impl::urihelper::encodeURI( DecodeURI(rURL) ) );
+ normalizeURLLastChar( aEncodedUrl );
+
+ DAVOptionsMap::iterator it;
+ it = m_aTheCache.find( aEncodedUrl );
+ if ( it != m_aTheCache.end() )
+ {
+ // first check for stale
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ if( (*it).second.getStaleTime() < t1.Seconds )
+ {
+ m_aTheCache.erase( it );
+ return;
+ }
+ // check if the resource was present on server
+ (*it).second.setHeadAllowed( HeadAllowed );
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
new file mode 100644
index 000000000000..ae3e5a076f60
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -0,0 +1,202 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <memory>
+#include <list>
+#include <map>
+#include <osl/mutex.hxx>
+#include <rtl/uri.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+namespace http_dav_ucp
+{
+/* Excerpt from RFC 4918
+ <https://tools.ietf.org/html/rfc4918#section-18>
+
+ 18.1 Class 1
+
+ A class 1 compliant resource MUST meet all "MUST" requirements in all
+ sections of this document.
+
+ Class 1 compliant resources MUST return, at minimum, the value "1" in
+ the DAV header on all responses to the OPTIONS method.
+
+ 18.2 Class 2
+
+ A class 2 compliant resource MUST meet all class 1 requirements and
+ support the LOCK method, the DAV:supportedlock property, the DAV:
+ lockdiscovery property, the Time-Out response header and the Lock-
+ Token request header. A class 2 compliant resource SHOULD also
+ support the Timeout request header and the 'owner' XML element.
+
+ Class 2 compliant resources MUST return, at minimum, the values "1"
+ and "2" in the DAV header on all responses to the OPTIONS method.
+
+ 18.3. Class 3
+
+ A resource can explicitly advertise its support for the revisions to
+ [RFC2518] made in this document. Class 1 MUST be supported as well.
+ Class 2 MAY be supported. Advertising class 3 support in addition to
+ class 1 and 2 means that the server supports all the requirements in
+ this specification. Advertising class 3 and class 1 support, but not
+ class 2, means that the server supports all the requirements in this
+ specification except possibly those that involve locking support.
+
+*/
+
+ class DAVOptions
+ {
+ private:
+ bool m_isClass1;
+ bool m_isClass2;
+ bool m_isClass3;
+ /// for server that do not implement it
+ bool m_isHeadAllowed;
+ /// Internally used to maintain the locked state of the resource, only if it's a Class 2 resource
+ bool m_isLocked;
+ /// contains the methods allowed on this resource
+ OUString m_aAllowedMethods;
+
+ /// target time when this capability becomes stale
+ sal_uInt32 m_nStaleTime;
+ sal_uInt32 m_nRequestedTimeLife;
+ OUString m_sURL;
+ OUString m_sRedirectedURL;
+
+ /// The cached HTT response status code. It's 0 if the code was dealt with and there is no need to cache it
+ sal_uInt16 m_nHttpResponseStatusCode;
+ /// The cached string with the server returned HTTP response status code string, corresponds to m_nHttpResponseStatusCode.
+ OUString m_sHttpResponseStatusText;
+
+ public:
+ DAVOptions();
+
+ DAVOptions( const DAVOptions & rOther );
+
+ virtual ~DAVOptions();
+
+ bool isClass1() const { return m_isClass1; };
+ void setClass1( bool Class1 = true ) { m_isClass1 = Class1; };
+
+ bool isClass2() const { return m_isClass2; };
+ void setClass2( bool Class2 = true ) { m_isClass2 = Class2; };
+
+ bool isClass3() const { return m_isClass3; };
+ void setClass3( bool Class3 = true ) { m_isClass3 = Class3; };
+
+ bool isHeadAllowed() const { return m_isHeadAllowed; };
+ void setHeadAllowed( bool HeadAllowed = true ) { m_isHeadAllowed = HeadAllowed; };
+
+ sal_uInt32 getStaleTime() const { return m_nStaleTime ; };
+ void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = nStaleTime; };
+
+ sal_uInt32 getRequestedTimeLife() const { return m_nRequestedTimeLife; };
+ void setRequestedTimeLife( const sal_uInt32 nRequestedTimeLife ) { m_nRequestedTimeLife = nRequestedTimeLife; };
+
+ const OUString & getURL() const { return m_sURL; };
+ void setURL( const OUString & sURL ) { m_sURL = sURL; };
+
+ const OUString & getRedirectedURL() const { return m_sRedirectedURL; };
+ void setRedirectedURL( const OUString & sRedirectedURL ) { m_sRedirectedURL = sRedirectedURL; };
+
+ void setAllowedMethods( const OUString & aAllowedMethods ) { m_aAllowedMethods = aAllowedMethods; } ;
+ const OUString & getAllowedMethods() const { return m_aAllowedMethods; } ;
+ bool isLockAllowed() const { return ( m_aAllowedMethods.indexOf( "LOCK" ) != -1 ); };
+
+ void setLocked( bool locked = true ) { m_isLocked = locked; } ;
+ bool isLocked() const { return m_isLocked; };
+
+ sal_uInt16 getHttpResponseStatusCode() const { return m_nHttpResponseStatusCode; };
+ void setHttpResponseStatusCode( const sal_uInt16 nHttpResponseStatusCode ) { m_nHttpResponseStatusCode = nHttpResponseStatusCode; };
+
+ const OUString & getHttpResponseStatusText() const { return m_sHttpResponseStatusText; };
+ void setHttpResponseStatusText( const OUString & rHttpResponseStatusText ) { m_sHttpResponseStatusText = rHttpResponseStatusText; };
+
+ void init() {
+ m_isClass1 = false;
+ m_isClass2 = false;
+ m_isClass3 = false;
+ m_isHeadAllowed = true;
+ m_isLocked = false;
+ m_aAllowedMethods.clear();
+ m_nStaleTime = 0;
+ m_nRequestedTimeLife = 0;
+ m_sURL.clear();
+ m_sRedirectedURL.clear();
+ m_nHttpResponseStatusCode = 0;
+ m_sHttpResponseStatusText.clear();
+ };
+
+ DAVOptions & operator=( const DAVOptions& rOpts );
+ bool operator==( const DAVOptions& rOpts ) const;
+
+ };
+
+ // TODO: the OUString key element in std::map needs to be changed with a URI representation
+ // along with a specific compare (std::less) implementation, as suggested in
+ // <https://tools.ietf.org/html/rfc3986#section-6>, to find by URI and not by string comparison
+ typedef std::map< OUString, DAVOptions,
+ std::less< OUString > > DAVOptionsMap;
+
+ class DAVOptionsCache
+ {
+ DAVOptionsMap m_aTheCache;
+ osl::Mutex m_aMutex;
+ public:
+ explicit DAVOptionsCache();
+ ~DAVOptionsCache();
+
+ bool getDAVOptions( const OUString & rURL, DAVOptions & rDAVOptions );
+ void removeDAVOptions( const OUString & rURL );
+ void addDAVOptions( DAVOptions & rDAVOptions, const sal_uInt32 nLifeTime );
+
+ void setHeadAllowed( const OUString & rURL, bool HeadAllowed = true );
+
+ private:
+
+ /// remove the last '/' in aUrl, if it exists
+ static void normalizeURLLastChar( OUString& aUrl ) {
+ if ( aUrl.getLength() > 1 &&
+ ( ( aUrl.lastIndexOf( '/' ) + 1 ) == aUrl.getLength() ) )
+ aUrl = aUrl.copy(0, aUrl.getLength() - 1 );
+ };
+ };
+
+ enum Depth { DAVZERO = 0, DAVONE = 1, DAVINFINITY = -1 };
+
+ enum ProppatchOperation { PROPSET = 0, PROPREMOVE = 1 };
+
+ struct ProppatchValue
+ {
+ ProppatchOperation const operation;
+ OUString const name;
+ css::uno::Any const value;
+
+ ProppatchValue( const ProppatchOperation o,
+ const OUString & n,
+ const css::uno::Any & v )
+ : operation( o ), name( n ), value( v ) {}
+ };
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DateTimeHelper.cxx b/ucb/source/ucp/webdav-curl/DateTimeHelper.cxx
new file mode 100644
index 000000000000..06514d682fa6
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DateTimeHelper.cxx
@@ -0,0 +1,258 @@
+/* -*- 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 <osl/time.h>
+#include <com/sun/star/util/DateTime.hpp>
+#include "DateTimeHelper.hxx"
+
+using namespace com::sun::star::util;
+
+using namespace http_dav_ucp;
+
+bool DateTimeHelper::ISO8601_To_DateTime (const OUString& s,
+ DateTime& dateTime)
+{
+ OString aDT (s.getStr(), s.getLength(), RTL_TEXTENCODING_ASCII_US);
+
+ int year, month, day, hours, minutes, off_hours, off_minutes, fix;
+ double seconds;
+
+ // 2001-01-01T12:30:00Z
+ int n = sscanf( aDT.getStr(), "%04d-%02d-%02dT%02d:%02d:%lfZ",
+ &year, &month, &day, &hours, &minutes, &seconds );
+ if ( n == 6 )
+ {
+ fix = 0;
+ }
+ else
+ {
+ // 2001-01-01T12:30:00+03:30
+ n = sscanf( aDT.getStr(), "%04d-%02d-%02dT%02d:%02d:%lf+%02d:%02d",
+ &year, &month, &day, &hours, &minutes, &seconds,
+ &off_hours, &off_minutes );
+ if ( n == 8 )
+ {
+ fix = - off_hours * 3600 - off_minutes * 60;
+ }
+ else
+ {
+ // 2001-01-01T12:30:00-03:30
+ n = sscanf( aDT.getStr(), "%04d-%02d-%02dT%02d:%02d:%lf-%02d:%02d",
+ &year, &month, &day, &hours, &minutes, &seconds,
+ &off_hours, &off_minutes );
+ if ( n == 8 )
+ {
+ fix = off_hours * 3600 + off_minutes * 60;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+
+ // Convert to local time...
+
+ oslDateTime aDateTime;
+ aDateTime.NanoSeconds = 0;
+ aDateTime.Seconds = sal::static_int_cast< sal_uInt16 >(seconds); // 0-59
+ aDateTime.Minutes = sal::static_int_cast< sal_uInt16 >(minutes); // 0-59
+ aDateTime.Hours = sal::static_int_cast< sal_uInt16 >(hours); // 0-23
+ aDateTime.Day = sal::static_int_cast< sal_uInt16 >(day); // 1-31
+ aDateTime.DayOfWeek = 0; // 0-6, 0 = Sunday
+ aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month); // 1-12
+ aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
+
+ TimeValue aTimeValue;
+ if ( osl_getTimeValueFromDateTime( &aDateTime, &aTimeValue ) )
+ {
+ aTimeValue.Seconds += fix;
+
+ if ( osl_getLocalTimeFromSystemTime( &aTimeValue, &aTimeValue ) )
+ {
+ if ( osl_getDateTimeFromTimeValue( &aTimeValue, &aDateTime ) )
+ {
+ dateTime.Year = aDateTime.Year;
+ dateTime.Month = aDateTime.Month;
+ dateTime.Day = aDateTime.Day;
+ dateTime.Hours = aDateTime.Hours;
+ dateTime.Minutes = aDateTime.Minutes;
+ dateTime.Seconds = aDateTime.Seconds;
+
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+/*
+sal_Int32 DateTimeHelper::convertDayToInt (const OUString& day)
+{
+ if (day.equalsAscii("Sun"))
+ return 0;
+ else if (day.equalsAscii("Mon"))
+ return 1;
+ else if (day.equalsAscii("Tue"))
+ return 2;
+ else if (day.equalsAscii("Wed"))
+ return 3;
+ else if (day.equalsAscii("Thu"))
+ return 4;
+ else if (day.equalsAscii("Fri"))
+ return 5;
+ else if (day.equalsAscii("Sat"))
+ return 6;
+ else
+ return -1;
+}
+*/
+
+sal_Int32 DateTimeHelper::convertMonthToInt(std::u16string_view month)
+{
+ if (month == u"Jan")
+ return 1;
+ else if (month == u"Feb")
+ return 2;
+ else if (month == u"Mar")
+ return 3;
+ else if (month == u"Apr")
+ return 4;
+ else if (month == u"May")
+ return 5;
+ else if (month == u"Jun")
+ return 6;
+ else if (month == u"Jul")
+ return 7;
+ else if (month == u"Aug")
+ return 8;
+ else if (month == u"Sep")
+ return 9;
+ else if (month == u"Oct")
+ return 10;
+ else if (month == u"Nov")
+ return 11;
+ else if (month == u"Dec")
+ return 12;
+ else
+ return 0;
+}
+
+bool DateTimeHelper::RFC2068_To_DateTime (const OUString& s,
+ DateTime& dateTime)
+{
+ int year;
+ int day;
+ int hours;
+ int minutes;
+ int seconds;
+ char string_month[3 + 1];
+ char string_day[3 + 1];
+
+ sal_Int32 found = s.indexOf (',');
+ if (found != -1)
+ {
+ OString aDT (s.getStr(), s.getLength(), RTL_TEXTENCODING_ASCII_US);
+
+ // RFC 1123
+ found = sscanf (aDT.getStr(), "%3s, %2d %3s %4d %2d:%2d:%2d GMT",
+ string_day, &day, string_month, &year, &hours, &minutes, &seconds);
+ if (found != 7)
+ {
+ // RFC 1036
+ found = sscanf (aDT.getStr(), "%3s, %2d-%3s-%2d %2d:%2d:%2d GMT",
+ string_day, &day, string_month, &year, &hours, &minutes, &seconds);
+ }
+ found = (found == 7) ? 1 : 0;
+ }
+ else
+ {
+ OString aDT (s.getStr(), s.getLength(), RTL_TEXTENCODING_ASCII_US);
+
+ // ANSI C's asctime () format
+ found = sscanf (aDT.getStr(), "%3s %3s %d %2d:%2d:%2d %4d",
+ string_day, string_month,
+ &day, &hours, &minutes, &seconds, &year);
+ found = (found == 7) ? 1 : 0;
+ }
+
+ if (found)
+ {
+ found = 0;
+
+ int month = DateTimeHelper::convertMonthToInt (
+ OUString::createFromAscii (string_month));
+ if (month)
+ {
+ // Convert to local time...
+
+ oslDateTime aDateTime;
+ aDateTime.NanoSeconds = 0;
+ aDateTime.Seconds = sal::static_int_cast< sal_uInt16 >(seconds);
+ // 0-59
+ aDateTime.Minutes = sal::static_int_cast< sal_uInt16 >(minutes);
+ // 0-59
+ aDateTime.Hours = sal::static_int_cast< sal_uInt16 >(hours);
+ // 0-23
+ aDateTime.Day = sal::static_int_cast< sal_uInt16 >(day);
+ // 1-31
+ aDateTime.DayOfWeek = 0; //dayofweek; // 0-6, 0 = Sunday
+ aDateTime.Month = sal::static_int_cast< sal_uInt16 >(month);
+ // 1-12
+ aDateTime.Year = sal::static_int_cast< sal_Int16 >(year);
+
+ TimeValue aTimeValue;
+ if ( osl_getTimeValueFromDateTime( &aDateTime,
+ &aTimeValue ) )
+ {
+ if ( osl_getLocalTimeFromSystemTime( &aTimeValue,
+ &aTimeValue ) )
+ {
+ if ( osl_getDateTimeFromTimeValue( &aTimeValue,
+ &aDateTime ) )
+ {
+ dateTime.Year = aDateTime.Year;
+ dateTime.Month = aDateTime.Month;
+ dateTime.Day = aDateTime.Day;
+ dateTime.Hours = aDateTime.Hours;
+ dateTime.Minutes = aDateTime.Minutes;
+ dateTime.Seconds = aDateTime.Seconds;
+
+ found = 1;
+ }
+ }
+ }
+ }
+ }
+
+ return found;
+}
+
+bool DateTimeHelper::convert (const OUString& s, DateTime& dateTime)
+{
+ if (ISO8601_To_DateTime (s, dateTime))
+ return true;
+ else if (RFC2068_To_DateTime (s, dateTime))
+ return true;
+ else
+ return false;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/DateTimeHelper.hxx b/ucb/source/ucp/webdav-curl/DateTimeHelper.hxx
new file mode 100644
index 000000000000..22a8e9519b80
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/DateTimeHelper.hxx
@@ -0,0 +1,55 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+
+namespace com::sun::star::util {
+ struct DateTime;
+}
+
+namespace rtl {
+ class OUString;
+}
+
+namespace http_dav_ucp
+{
+
+class DateTimeHelper
+{
+private:
+ static sal_Int32 convertMonthToInt(std::u16string_view month);
+
+ static bool ISO8601_To_DateTime (const OUString&,
+ css::util::DateTime& );
+
+ static bool RFC2068_To_DateTime (const OUString&,
+ css::util::DateTime& );
+
+public:
+ static bool convert (const OUString&,
+ css::util::DateTime& );
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/ImportCookies.cxx b/ucb/source/ucp/webdav-curl/ImportCookies.cxx
new file mode 100644
index 000000000000..ff5d7389aeac
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/ImportCookies.cxx
@@ -0,0 +1,249 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "CurlSession.hxx"
+#include "CurlUri.hxx"
+
+#include <comphelper/base64.hxx>
+#include <comphelper/scopeguard.hxx>
+#include <o3tl/char16_t2wchar_t.hxx>
+
+#include <com/sun/star/xml/crypto/DigestID.hpp>
+#include <com/sun/star/xml/crypto/NSSInitializer.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+
+#include <osl/file.hxx>
+#include <sal/log.hxx>
+#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
+
+#ifdef _WIN32
+#include <comphelper/windowserrorstring.hxx>
+
+#include <boost/property_tree/json_parser.hpp>
+
+#include <sqlite3.h>
+#include <pk11pub.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#include <Shlobj.h>
+#include <Knownfolders.h>
+#include <dpapi.h>
+#endif
+
+using namespace ::com::sun::star;
+
+namespace http_dav_ucp
+{
+#ifdef _WIN32
+struct Value
+{
+ OString value;
+ OString encryptedValue;
+};
+
+static int callback(void* pArg, int argc, char** argv, char** ppColNames)
+{
+ Value* const pValue(static_cast<Value*>(pArg));
+ assert(argc == 3);
+ assert(strcmp(ppColNames[0], "value") == 0);
+ assert(strcmp(ppColNames[2], "encrypted_value") == 0);
+ pValue->value = OString(argv[0]); // base64 has no embedded 0
+ auto const len(OString(argv[1]).toInt32());
+ assert(len >= 0);
+ pValue->encryptedValue = OString(argv[2], len);
+ return 0;
+}
+#endif
+
+OString TryImportCookies(uno::Reference<uno::XComponentContext> const& xContext[[maybe_unused]],
+ OUString const& rHost[[maybe_unused]])
+{
+#ifdef _WIN32
+ // Sharepoint authentication: try to find a cookie from Microsoft Edge
+ PWSTR ladPath;
+ if (S_OK != SHGetKnownFolderPath(FOLDERID_LocalAppData, KF_FLAG_DEFAULT, nullptr, &ladPath))
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "ShGetKnownFolderPath failed");
+ return OString();
+ }
+ OUString const localAppDirPath(o3tl::toU(ladPath));
+ CoTaskMemFree(ladPath);
+ OUString localAppDirUrl;
+ ::osl::File::getFileURLFromSystemPath(localAppDirPath, localAppDirUrl);
+ ::osl::DirectoryItem temp;
+ OUString dbUrlU = localAppDirUrl + "/Microsoft/Edge/User Data/Default/Network/Cookies";
+ if (::osl::DirectoryItem::get(dbUrlU, temp) != osl_File_E_None)
+ {
+ dbUrlU = localAppDirUrl + "/Microsoft/Edge/User Data/Default/Cookies";
+ if (::osl::DirectoryItem::get(dbUrlU, temp) != osl_File_E_None)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "no Cookies file");
+ return OString();
+ }
+ }
+ OString const dbUrl(::rtl::OUStringToOString(dbUrlU, RTL_TEXTENCODING_UTF8));
+ sqlite3* db;
+ int rc = sqlite3_open_v2(dbUrl.getStr(), &db, SQLITE_OPEN_READONLY | SQLITE_OPEN_URI, nullptr);
+ if (rc != SQLITE_OK)
+ {
+ // apparently this may crash, and sqlite3_errstr() isn't exported?
+ // SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << sqlite3_errmsg(db));
+ SAL_INFO("ucb.ucp.webdav.curl", "sqlite3_open failed: " << rc);
+ if (db)
+ {
+ sqlite3_close(db);
+ }
+ return OString();
+ }
+ char* err(nullptr);
+ Value value;
+ OString const statement("SELECT value, LENGTH(encrypted_value), encrypted_value FROM cookies "
+ "WHERE name = \"FedAuth\" AND host_key = \""
+ + ::rtl::OUStringToOString(rHost, RTL_TEXTENCODING_ASCII_US) + "\";");
+ rc = sqlite3_exec(db, statement.getStr(), callback, &value, &err);
+ if (rc != SQLITE_OK)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "sqlite3_exec failed: " << err);
+ sqlite3_free(err);
+ }
+ sqlite3_close(db);
+ if (!value.value.isEmpty())
+ {
+ return value.value;
+ }
+ if (value.encryptedValue.getLength() < 3 + 12 + 16)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "encrypted_value too short: " << value.encryptedValue.getLength());
+ return OString();
+ }
+
+ OString const iv(value.encryptedValue.copy(3, 12));
+ OString const encryptedValue(
+ value.encryptedValue.copy(3 + 12, value.encryptedValue.getLength() - 3 - 12 - 16));
+ OString const tag(value.encryptedValue.copy(value.encryptedValue.getLength() - 16, 16));
+
+ OUString const stateUrl = localAppDirUrl + "/Microsoft/Edge/User Data/Local State";
+ OUString statePathU;
+ ::osl::File::getSystemPathFromFileURL(stateUrl, statePathU);
+ OString const statePath(::rtl::OUStringToOString(statePathU, RTL_TEXTENCODING_UTF8));
+ ::std::string sEncryptedKey;
+ try
+ {
+ ::boost::property_tree::ptree localState;
+ ::boost::property_tree::read_json(::std::string(statePath.getStr()), localState);
+ sEncryptedKey = localState.get<std::string>("os_crypt.encrypted_key");
+ }
+ catch (...)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "failed to parse Local State");
+ return OString();
+ }
+ OUString const encodedEncryptedKey(sEncryptedKey.data(), sEncryptedKey.size(),
+ RTL_TEXTENCODING_UTF8);
+ uno::Sequence<sal_Int8> decodedEncryptedKey;
+ ::comphelper::Base64::decode(decodedEncryptedKey, encodedEncryptedKey);
+ if (decodedEncryptedKey.getLength() < 5)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "decoded key too short: " << decodedEncryptedKey.getLength());
+ return OString();
+ }
+ DATA_BLOB protectedKey;
+ protectedKey.cbData = decodedEncryptedKey.getLength() - 5;
+ protectedKey.pbData
+ = reinterpret_cast<BYTE*>(const_cast<sal_Int8*>(decodedEncryptedKey.getConstArray())) + 5;
+ DATA_BLOB unprotectedKey;
+ if (CryptUnprotectData(&protectedKey, nullptr, nullptr, nullptr, nullptr,
+ CRYPTPROTECT_UI_FORBIDDEN, &unprotectedKey)
+ == FALSE)
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "CryptUnprotectData failed: " << WindowsErrorString(GetLastError()));
+ assert(false);
+ return OString();
+ }
+ ::comphelper::ScopeGuard g([&]() {
+ SecureZeroMemory(unprotectedKey.pbData, unprotectedKey.cbData);
+ LocalFree(unprotectedKey.pbData);
+ });
+ if (unprotectedKey.cbData < 16)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "CryptUnprotectData result too short: " << unprotectedKey.cbData);
+ return OString();
+ }
+
+ // first, init NSS - but can't do AES GCM via API so do it directly
+ uno::Reference<xml::crypto::XNSSInitializer> xNSS(
+ xml::crypto::NSSInitializer::create(xContext));
+ xNSS->getDigestContext(xml::crypto::DigestID::SHA256, {});
+ SECItem keyItem = { siBuffer, reinterpret_cast<unsigned char*>(unprotectedKey.pbData),
+ sal::static_int_cast<unsigned>(unprotectedKey.cbData) };
+ ::std::unique_ptr<PK11SlotInfo, deleter_from_fn<PK11SlotInfo, PK11_FreeSlot>> pSlot(
+ PK11_GetBestSlot(CKM_AES_GCM, nullptr));
+ if (!pSlot)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "PK11_GetBestSlot failed");
+ return OString();
+ }
+ ::std::unique_ptr<PK11SymKey, deleter_from_fn<PK11SymKey, PK11_FreeSymKey>> pSymKey(
+ PK11_ImportSymKey(pSlot.get(), CKM_AES_GCM, PK11_OriginDerive, CKA_DECRYPT, &keyItem,
+ nullptr));
+ if (!pSymKey)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "PK11_ImportSymKey failed");
+ return OString();
+ }
+ SECItem dummy = { siBuffer, nullptr, 0 };
+ struct ContextDeleter
+ {
+ void operator()(PK11Context* p) const { PK11_DestroyContext(p, PR_TRUE); }
+ };
+ ::std::unique_ptr<PK11Context, ContextDeleter> pContext(PK11_CreateContextBySymKey(
+ CKM_AES_GCM, CKA_NSS_MESSAGE | CKA_DECRYPT, pSymKey.get(), &dummy));
+ if (!pContext)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "PK11_CreateContextBySymKey failed");
+ return OString();
+ }
+
+ ::std::vector<unsigned char> unencryptedValue;
+ unencryptedValue.resize(encryptedValue.getLength());
+ int outLength(0);
+ SECStatus rv = PK11_AEADOp(
+ pContext.get(), CKG_NO_GENERATE, 0, // only used for encryption
+ reinterpret_cast<unsigned char*>(const_cast<sal_Char*>(iv.getStr())), iv.getLength(),
+ nullptr, 0, // "additional data" not used
+ unencryptedValue.data(), &outLength, encryptedValue.getLength(),
+ reinterpret_cast<unsigned char*>(const_cast<sal_Char*>(tag.getStr())), tag.getLength(),
+ reinterpret_cast<const unsigned char*>(encryptedValue.getStr()),
+ encryptedValue.getLength());
+ if (rv != SECSuccess)
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "PK11_AEADOp failed: " << rv);
+ return OString();
+ }
+ if (outLength != encryptedValue.getLength())
+ {
+ SAL_WARN("ucb.ucp.webdav.curl", "PK11_AEADOp unexpected output length");
+ return OString();
+ }
+
+ return "FedAuth="
+ + OString(reinterpret_cast<const char*>(unencryptedValue.data()),
+ unencryptedValue.size())
+ + ";";
+
+#else
+ return OString();
+#endif
+}
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/util/dnd.component b/ucb/source/ucp/webdav-curl/PropertyMap.hxx
index 2fdc916c514a..e38ca5c44796 100644
--- a/dtrans/util/dnd.component
+++ b/ucb/source/ucp/webdav-curl/PropertyMap.hxx
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+/* -*- 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
@@ -15,14 +15,41 @@
* 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 .
- -->
-
-<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="dnd" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.datatransfer.dnd.OleDragSource_V1">
- <service name="com.sun.star.datatransfer.dnd.OleDragSource"/>
- </implementation>
- <implementation name="com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1">
- <service name="com.sun.star.datatransfer.dnd.OleDropTarget"/>
- </implementation>
-</component>
+ */
+
+
+#pragma once
+
+#include <com/sun/star/beans/Property.hpp>
+#include <unordered_set>
+
+namespace http_dav_ucp {
+
+struct equalPropertyName
+{
+ bool operator()( const css::beans::Property & p1,
+ const css::beans::Property & p2 ) const
+ {
+ return p1.Name == p2.Name;
+ }
+};
+
+struct hashPropertyName
+{
+ size_t operator()( const css::beans::Property & p ) const
+ {
+ return p.Name.hashCode();
+ }
+};
+
+typedef std::unordered_set
+<
+ css::beans::Property,
+ hashPropertyName,
+ equalPropertyName
+>
+PropertyMap;
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/PropfindCache.cxx b/ucb/source/ucp/webdav-curl/PropfindCache.cxx
new file mode 100644
index 000000000000..4bf9bf933f0b
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/PropfindCache.cxx
@@ -0,0 +1,91 @@
+/* -*- 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 <osl/time.h>
+#include "PropfindCache.hxx"
+
+namespace http_dav_ucp
+{
+
+ // PropertyNames implementation
+
+ PropertyNames::PropertyNames() :
+ m_nStaleTime( 0 ),
+ m_sURL(),
+ m_aPropertiesNames()
+ {
+ }
+
+ PropertyNames::PropertyNames( const OUString& rURL ) :
+ m_nStaleTime( 0 ),
+ m_sURL( rURL ),
+ m_aPropertiesNames()
+ {
+ }
+
+ //PropertyNamesCache implementation
+
+ PropertyNamesCache::PropertyNamesCache()
+ {
+ }
+
+ PropertyNamesCache::~PropertyNamesCache()
+ {
+ }
+
+ bool PropertyNamesCache::getCachedPropertyNames( const OUString& rURL, PropertyNames& rCacheElement )
+ {
+ // search the URL in the static map
+ osl::MutexGuard aGuard( m_aMutex );
+ PropNameCache::const_iterator it;
+ it = m_aTheCache.find( rURL );
+ if ( it == m_aTheCache.end() )
+ return false;
+ else
+ {
+ // check if the element is stale, before restoring
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ if ( (*it).second.getStaleTime() < t1.Seconds )
+ {
+ // if stale, remove from cache, do not restore
+ m_aTheCache.erase( it );
+ return false;
+ // return false instead
+ }
+ rCacheElement = (*it).second;
+ return true;
+ }
+ }
+
+ void PropertyNamesCache::removeCachedPropertyNames( const OUString& rURL )
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ PropNameCache::const_iterator it;
+ it = m_aTheCache.find( rURL );
+ if ( it != m_aTheCache.end() )
+ {
+ m_aTheCache.erase( it );
+ }
+ }
+
+ void PropertyNamesCache::addCachePropertyNames( PropertyNames& rCacheElement, const sal_uInt32 nLifeTime )
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ OUString aURL( rCacheElement.getURL() );
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ rCacheElement.setStaleTime( t1.Seconds + nLifeTime );
+
+ m_aTheCache[ aURL ] = rCacheElement;
+ }
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/PropfindCache.hxx b/ucb/source/ucp/webdav-curl/PropfindCache.hxx
new file mode 100644
index 000000000000..4f7b66563818
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/PropfindCache.hxx
@@ -0,0 +1,81 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_PROPFINDCACHE_HXX
+#define INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_PROPFINDCACHE_HXX
+
+#include <sal/types.h>
+#include <rtl/ustring.hxx>
+#include <osl/mutex.hxx>
+#include <list>
+#include <map>
+#include <vector>
+
+#include "DAVResource.hxx"
+
+namespace http_dav_ucp
+{
+ // A property names cache mechanism, URL driven.
+ // It is used to cache the property names received
+ // from the WebDAV server, to minimize the need of
+ // net transactions (e.g. PROPFIND).
+ // The cache lifetime should be short
+ // just to remove the annoying slowness when
+ // typing text or moving cursor around when the
+ // net link is slow.
+
+ // Define the properties cache element
+ class PropertyNames
+ {
+ /// target time when this element becomes stale
+ sal_uInt32 m_nStaleTime;
+ OUString m_sURL;
+ // the property name list received from WebDAV server
+ std::vector< DAVResourceInfo > m_aPropertiesNames;
+
+ public:
+ PropertyNames();
+ explicit PropertyNames( const OUString& rURL );
+
+ sal_uInt32 getStaleTime() const { return m_nStaleTime; };
+ void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = nStaleTime; };
+
+ OUString& getURL() { return m_sURL; };
+
+ const std::vector< DAVResourceInfo >& getPropertiesNames() { return m_aPropertiesNames; };
+ void setPropertiesNames( const std::vector< DAVResourceInfo >& aPropertiesNames ) { m_aPropertiesNames = aPropertiesNames; };
+ };
+
+ // Define the PropertyNames cache
+ // TODO: the OUString key element in std::map needs to be changed with a URI representation
+ // with a specific compare (std::less) implementation, this last one implementing
+ // as suggested in <https://tools.ietf.org/html/rfc3986#section-6>.
+ // To find by URI and not by string equality.
+ typedef std::map< OUString, PropertyNames,
+ std::less< OUString > >PropNameCache;
+
+ class PropertyNamesCache
+ {
+ PropNameCache m_aTheCache;
+ osl::Mutex m_aMutex;
+
+ public:
+ PropertyNamesCache();
+ ~PropertyNamesCache();
+
+ bool getCachedPropertyNames( const OUString& URL, PropertyNames& rCacheElement );
+ void removeCachedPropertyNames( const OUString& URL );
+ void addCachePropertyNames( PropertyNames& rCacheElement, const sal_uInt32 nLifeTime );
+ };
+
+}
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.cxx b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
new file mode 100644
index 000000000000..3601d0c66642
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/SerfLockStore.cxx
@@ -0,0 +1,275 @@
+/* -*- 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 <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <osl/time.h>
+#include <osl/thread.hxx>
+#include <salhelper/thread.hxx>
+
+#include <com/sun/star/ucb/LockScope.hpp>
+
+#include "CurlSession.hxx"
+#include "SerfLockStore.hxx"
+
+using namespace http_dav_ucp;
+
+namespace http_dav_ucp {
+
+class TickerThread : public salhelper::Thread
+{
+ bool m_bFinish;
+ SerfLockStore & m_rLockStore;
+
+public:
+
+ explicit TickerThread( SerfLockStore & rLockStore )
+ : Thread( "WebDavTickerThread" ), m_bFinish( false ),
+ m_rLockStore( rLockStore ) {}
+
+ void finish() { m_bFinish = true; }
+
+private:
+
+ virtual void execute();
+};
+
+} // namespace http_dav_ucp
+
+
+void TickerThread::execute()
+{
+ osl_setThreadName("http_dav_ucp::TickerThread");
+
+ SAL_INFO("ucb.ucp.webdav", "TickerThread: start." );
+
+ // we have to go through the loop more often to be able to finish ~quickly
+ const int nNth = 25;
+
+ int nCount = nNth;
+ while ( !m_bFinish )
+ {
+ if ( nCount-- <= 0 )
+ {
+ m_rLockStore.refreshLocks();
+ nCount = nNth;
+ }
+
+ TimeValue aTV;
+ aTV.Seconds = 0;
+ aTV.Nanosec = 1000000000 / nNth;
+ salhelper::Thread::wait( aTV );
+ }
+
+ SAL_INFO("ucb.ucp.webdav", "TickerThread: stop." );
+}
+
+
+SerfLockStore::SerfLockStore()
+ : m_bFinishing( false )
+{
+}
+
+
+SerfLockStore::~SerfLockStore()
+{
+ osl::ResettableMutexGuard aGuard(m_aMutex);
+ stopTicker(aGuard);
+ aGuard.reset(); // actually no threads should even try to access members now
+ m_bFinishing = true;
+
+ // release active locks, if any.
+ SAL_WARN_IF( !m_aLockInfoMap.empty(), "ucb.ucp.webdav",
+ "SerfLockStore::~SerfLockStore - Releasing active locks!" );
+
+ for ( auto& rLockInfo : m_aLockInfoMap )
+ {
+ rLockInfo.second.m_xSession->NonInteractive_UNLOCK(rLockInfo.first);
+ }
+}
+
+bool SerfLockStore::finishing() const
+{
+ return m_bFinishing;
+}
+
+void SerfLockStore::startTicker()
+{
+ osl::MutexGuard aGuard( m_aMutex );
+
+ if ( !m_pTickerThread.is() )
+ {
+ m_pTickerThread = new TickerThread( *this );
+ m_pTickerThread->launch();
+ }
+}
+
+
+void SerfLockStore::stopTicker(osl::ClearableMutexGuard & rGuard)
+{
+ rtl::Reference<TickerThread> pTickerThread;
+
+ if (m_pTickerThread.is())
+ {
+ m_pTickerThread->finish(); // needs mutex
+ // the TickerThread may run refreshLocks() at most once after this
+ pTickerThread = m_pTickerThread;
+ m_pTickerThread.clear();
+ }
+
+ rGuard.clear();
+
+ if (pTickerThread.is() && pTickerThread->getIdentifier() != osl::Thread::getCurrentIdentifier())
+ {
+ pTickerThread->join(); // without m_aMutex locked (to prevent deadlock)
+ }
+}
+
+OUString const*
+SerfLockStore::getLockTokenForURI(OUString const& rURI, css::ucb::Lock const*const pLock)
+{
+ assert(rURI.startsWith("http://") || rURI.startsWith("https://"));
+
+ osl::MutexGuard aGuard( m_aMutex );
+
+ auto const it(m_aLockInfoMap.find(rURI));
+
+ if (it == m_aLockInfoMap.end())
+ {
+ return nullptr;
+ }
+ if (!pLock) // any lock will do
+ {
+ return &it->second.m_sToken;
+ }
+ // 0: EXCLUSIVE 1: SHARED
+ if (it->second.m_Lock.Scope == ucb::LockScope_SHARED && pLock->Scope == ucb::LockScope_EXCLUSIVE)
+ {
+ return nullptr;
+ }
+ assert(it->second.m_Lock.Type == pLock->Type); // only WRITE possible
+ if (it->second.m_Lock.Depth < pLock->Depth)
+ {
+ return nullptr;
+ }
+ // Only own locks are expected in the lock store, but depending on the
+ // server it->second.m_Lock.Owner may contain the string this UCP passed in
+ // the LOCK request, or a user identifier generated by the server (happens
+ // with Sharepoint), so just ignore it here.
+ // ignore Timeout ?
+ return &it->second.m_sToken;
+}
+
+void SerfLockStore::addLock( const OUString& rURI,
+ ucb::Lock const& rLock,
+ const OUString& sToken,
+ rtl::Reference<CurlSession> const & xSession,
+ sal_Int32 nLastChanceToSendRefreshRequest )
+{
+ assert(rURI.startsWith("http://") || rURI.startsWith("https://"));
+
+ osl::MutexGuard aGuard( m_aMutex );
+
+ m_aLockInfoMap[ rURI ]
+ = LockInfo(sToken, rLock, xSession, nLastChanceToSendRefreshRequest);
+
+ startTicker();
+}
+
+
+void SerfLockStore::updateLock( const OUString& rURI,
+ sal_Int32 nLastChanceToSendRefreshRequest )
+{
+ assert(rURI.startsWith("http://") || rURI.startsWith("https://"));
+
+ osl::MutexGuard aGuard( m_aMutex );
+
+ LockInfoMap::iterator const it(m_aLockInfoMap.find(rURI));
+ SAL_WARN_IF( it == m_aLockInfoMap.end(), "ucb.ucp.webdav",
+ "SerfLockStore::updateLock: lock not found!" );
+
+ if ( it != m_aLockInfoMap.end() )
+ {
+ (*it).second.m_nLastChanceToSendRefreshRequest
+ = nLastChanceToSendRefreshRequest;
+ }
+}
+
+
+void SerfLockStore::removeLock(const OUString& rURI)
+{
+ assert(rURI.startsWith("http://") || rURI.startsWith("https://"));
+
+ osl::ClearableMutexGuard aGuard( m_aMutex );
+
+ m_aLockInfoMap.erase(rURI);
+
+ if ( m_aLockInfoMap.empty() )
+ stopTicker(aGuard);
+}
+
+
+void SerfLockStore::refreshLocks()
+{
+ osl::MutexGuard aGuard( m_aMutex );
+
+ ::std::vector<OUString> authFailedLocks;
+
+ for ( auto& rLockInfo : m_aLockInfoMap )
+ {
+ LockInfo & rInfo = rLockInfo.second;
+ if ( rInfo.m_nLastChanceToSendRefreshRequest != -1 )
+ {
+ // 30 seconds or less remaining until lock expires?
+ TimeValue t1;
+ osl_getSystemTime( &t1 );
+ if ( rInfo.m_nLastChanceToSendRefreshRequest - 30
+ <= sal_Int32( t1.Seconds ) )
+ {
+ // refresh the lock.
+ sal_Int32 nlastChanceToSendRefreshRequest = -1;
+ bool isAuthFailed(false);
+ if (rInfo.m_xSession->NonInteractive_LOCK(
+ rLockInfo.first, rLockInfo.second.m_sToken,
+ nlastChanceToSendRefreshRequest,
+ isAuthFailed))
+ {
+ rInfo.m_nLastChanceToSendRefreshRequest
+ = nlastChanceToSendRefreshRequest;
+ }
+ else
+ {
+ if (isAuthFailed)
+ {
+ authFailedLocks.push_back(rLockInfo.first);
+ }
+ // refresh failed. stop auto-refresh.
+ rInfo.m_nLastChanceToSendRefreshRequest = -1;
+ }
+ }
+ }
+ }
+
+ for (auto const& rLock : authFailedLocks)
+ {
+ removeLock(rLock);
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/SerfLockStore.hxx b/ucb/source/ucp/webdav-curl/SerfLockStore.hxx
new file mode 100644
index 000000000000..fc0ed6120532
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/SerfLockStore.hxx
@@ -0,0 +1,96 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <map>
+#include <osl/mutex.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <com/sun/star/ucb/Lock.hpp>
+
+#include "CurlSession.hxx"
+
+namespace http_dav_ucp
+{
+
+class TickerThread;
+
+struct LockInfo
+{
+ OUString m_sToken;
+ css::ucb::Lock m_Lock;
+ rtl::Reference<CurlSession> m_xSession;
+ sal_Int32 m_nLastChanceToSendRefreshRequest;
+
+ LockInfo()
+ : m_nLastChanceToSendRefreshRequest( -1 ) {}
+
+ LockInfo( const OUString& sToken,
+ css::ucb::Lock const& rLock,
+ rtl::Reference<CurlSession> const & xSession,
+ sal_Int32 nLastChanceToSendRefreshRequest )
+ : m_sToken(sToken)
+ , m_Lock(rLock)
+ , m_xSession(xSession)
+ , m_nLastChanceToSendRefreshRequest(nLastChanceToSendRefreshRequest)
+ {}
+};
+
+typedef std::map< OUString, LockInfo > LockInfoMap;
+
+class SerfLockStore
+{
+ osl::Mutex m_aMutex;
+ rtl::Reference< TickerThread > m_pTickerThread;
+ bool m_bFinishing;
+ LockInfoMap m_aLockInfoMap;
+
+public:
+ SerfLockStore();
+ ~SerfLockStore();
+
+ bool finishing() const;
+
+ OUString const* getLockTokenForURI(OUString const& rURI, css::ucb::Lock const* pLock);
+
+ void addLock( const OUString& rURI,
+ css::ucb::Lock const& rLock,
+ const OUString& sToken,
+ rtl::Reference<CurlSession> const & xSession,
+ // time in seconds since Jan 1 1970
+ // -1: infinite lock, no refresh
+ sal_Int32 nLastChanceToSendRefreshRequest );
+
+ void updateLock( const OUString& rURI,
+ sal_Int32 nLastChanceToSendRefreshRequest );
+
+ void removeLock(const OUString& rURI);
+
+ void refreshLocks();
+
+private:
+ void startTicker();
+ void stopTicker(osl::ClearableMutexGuard & rGuard);
+};
+
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
new file mode 100644
index 000000000000..9e7176a218b8
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.cxx
@@ -0,0 +1,220 @@
+/* -*- 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 <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
+#include "UCBDeadPropertyValue.hxx"
+
+using namespace http_dav_ucp;
+using namespace ::com::sun::star;
+
+
+// static
+constexpr OUStringLiteral aTypeString = "string";
+constexpr OUStringLiteral aTypeLong = "long";
+constexpr OUStringLiteral aTypeShort = "short";
+constexpr OUStringLiteral aTypeBoolean = "boolean";
+constexpr OUStringLiteral aTypeChar = "char";
+constexpr OUStringLiteral aTypeByte = "byte";
+constexpr OUStringLiteral aTypeHyper = "hyper";
+constexpr OUStringLiteral aTypeFloat = "float";
+constexpr OUStringLiteral aTypeDouble = "double";
+
+// static
+bool UCBDeadPropertyValue::supportsType( const uno::Type & rType )
+{
+ if ( ( rType != cppu::UnoType<OUString>::get() )
+ &&
+ ( rType != cppu::UnoType<sal_Int32>::get() )
+ &&
+ ( rType != cppu::UnoType<sal_Int16>::get() )
+ &&
+ ( rType != cppu::UnoType<bool>::get() )
+ &&
+ ( rType != cppu::UnoType<cppu::UnoCharType>::get() )
+ &&
+ ( rType != cppu::UnoType<sal_Int8>::get() )
+ &&
+ ( rType != cppu::UnoType<sal_Int64>::get() )
+ &&
+ ( rType != cppu::UnoType<float>::get() )
+ &&
+ ( rType != cppu::UnoType<double>::get() ) )
+ {
+ return false;
+ }
+
+ return true;
+}
+
+
+// static
+bool UCBDeadPropertyValue::createFromXML(OUString const& rType,
+ OUString const& rValue,
+ uno::Any & rOutData)
+{
+ bool success = true;
+
+ if (rType.equalsIgnoreAsciiCase(aTypeString))
+ {
+ rOutData <<= rValue;
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeLong))
+ {
+ rOutData <<= rValue.toInt32();
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeShort))
+ {
+ rOutData <<= sal_Int16( rValue.toInt32() );
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeBoolean))
+ {
+ if (rValue.equalsIgnoreAsciiCase(u"true"))
+ {
+ rOutData <<= true;
+ }
+ else
+ {
+ rOutData <<= false;
+ }
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeChar))
+ {
+ rOutData <<= rValue.toChar();
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeByte))
+ {
+ rOutData <<= sal_Int8( rValue.toChar() );
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeHyper))
+ {
+ rOutData <<= rValue.toInt64();
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeFloat))
+ {
+ rOutData <<= rValue.toFloat();
+ }
+ else if (rType.equalsIgnoreAsciiCase(aTypeDouble))
+ {
+ rOutData <<= rValue.toDouble();
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "UCBDeadPropertyValue::createFromXML - "
+ "Unsupported property type!" );
+ success = false;
+ }
+ return success;
+}
+
+// static
+::std::optional<::std::pair<OUString, OUString>>
+UCBDeadPropertyValue::toXML(const uno::Any & rInData)
+{
+ // <ucbprop><type>the_type</type><value>the_value</value></ucbprop>
+
+ // Check property type. Extract type and value as string.
+
+ const uno::Type& rType = rInData.getValueType();
+ OUString aStringValue;
+ OUString aStringType;
+
+ if ( rType == cppu::UnoType<OUString>::get() )
+ {
+ // string
+ rInData >>= aStringValue;
+ aStringType = aTypeString;
+ }
+ else if ( rType == cppu::UnoType<sal_Int32>::get() )
+ {
+ // long
+ sal_Int32 nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString::number( nValue );
+ aStringType = aTypeLong;
+ }
+ else if ( rType == cppu::UnoType<sal_Int16>::get() )
+ {
+ // short
+ sal_Int32 nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString::number( nValue );
+ aStringType = aTypeShort;
+ }
+ else if ( rType == cppu::UnoType<bool>::get() )
+ {
+ // boolean
+ bool bValue = false;
+ rInData >>= bValue;
+ aStringValue = OUString::boolean( bValue );
+ aStringType = aTypeBoolean;
+ }
+ else if ( rType == cppu::UnoType<cppu::UnoCharType>::get() )
+ {
+ // char
+ sal_Unicode cValue = 0;
+ rInData >>= cValue;
+ aStringValue = OUString( cValue );
+ aStringType = aTypeChar;
+ }
+ else if ( rType == cppu::UnoType<sal_Int8>::get() )
+ {
+ // byte
+ sal_Int8 nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString( sal_Unicode( nValue ) );
+ aStringType = aTypeByte;
+ }
+ else if ( rType == cppu::UnoType<sal_Int64>::get() )
+ {
+ // hyper
+ sal_Int64 nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString::number( nValue );
+ aStringType = aTypeHyper;
+ }
+ else if ( rType == cppu::UnoType<float>::get() )
+ {
+ // float
+ float nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString::number( nValue );
+ aStringType = aTypeFloat;
+ }
+ else if ( rType == cppu::UnoType<double>::get() )
+ {
+ // double
+ double nValue = 0;
+ rInData >>= nValue;
+ aStringValue = OUString::number( nValue );
+ aStringType = aTypeDouble;
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "UCBDeadPropertyValue::toXML - "
+ "Unsupported property type!" );
+ return {};
+ }
+
+ return { { aStringType, aStringValue } };
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/util/ftransl.component b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
index b1fe4b006460..8b696ed12da3 100644
--- a/dtrans/util/ftransl.component
+++ b/ucb/source/ucp/webdav-curl/UCBDeadPropertyValue.hxx
@@ -1,5 +1,5 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
+/* -*- 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
@@ -15,11 +15,32 @@
* 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 .
- -->
-
-<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="ftransl" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.datatransfer.DataFormatTranslator">
- <service name="com.sun.star.datatransfer.DataFormatTranslator"/>
- </implementation>
-</component>
+ */
+
+
+#pragma once
+
+#include <optional>
+#include <utility>
+
+#include <rtl/string.hxx>
+#include <com/sun/star/uno/Any.hxx>
+
+namespace http_dav_ucp
+{
+
+class UCBDeadPropertyValue
+{
+public:
+ static bool supportsType( const css::uno::Type & rType );
+
+ static bool createFromXML(OUString const& rType,
+ OUString const& rValue,
+ css::uno::Any & rOutData);
+ static ::std::optional<::std::pair<OUString, OUString>>
+ toXML(const css::uno::Any & rInData);
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/util/sysdtrans.component b/ucb/source/ucp/webdav-curl/ucpdav1.component
index 6551a964684b..bb16e3b3979d 100644
--- a/dtrans/util/sysdtrans.component
+++ b/ucb/source/ucp/webdav-curl/ucpdav1.component
@@ -18,8 +18,9 @@
-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="sysdtrans" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.datatransfer.clipboard.ClipboardW32">
- <service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.WebDAVContentProvider"
+ constructor="ucb_webdav_ContentProvider_get_implementation">
+ <service name="com.sun.star.ucb.WebDAVContentProvider"/>
</implementation>
</component>
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
new file mode 100644
index 000000000000..0bad0cf927a7
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -0,0 +1,4307 @@
+/* -*- 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 <memory>
+
+#include <cppuhelper/queryinterface.hxx>
+#include <rtl/uri.hxx>
+#include <sal/log.hxx>
+#include <officecfg/Office/Common.hxx>
+#include <officecfg/Inet.hxx>
+#include <ucbhelper/contentidentifier.hxx>
+#include <ucbhelper/macros.hxx>
+#include <ucbhelper/propertyvalueset.hxx>
+#include <ucbhelper/simpleinteractionrequest.hxx>
+#include <ucbhelper/cancelcommandexecution.hxx>
+#include <svl/lockfilecommon.hxx>
+
+#include <com/sun/star/beans/IllegalTypeException.hpp>
+#include <com/sun/star/beans/NotRemoveableException.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/PropertyExistException.hpp>
+#include <com/sun/star/beans/PropertySetInfoChange.hpp>
+#include <com/sun/star/beans/PropertySetInfoChangeEvent.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/io/XActiveDataSink.hpp>
+#include <com/sun/star/io/XOutputStream.hpp>
+#include <com/sun/star/lang/IllegalAccessException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/sdbc/SQLException.hpp>
+#include <com/sun/star/task/PasswordContainerInteractionHandler.hpp>
+#include <com/sun/star/ucb/CommandEnvironment.hpp>
+#include <com/sun/star/ucb/CommandFailedException.hpp>
+#include <com/sun/star/ucb/ContentInfoAttribute.hpp>
+#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
+#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+#include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp>
+#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
+#include <com/sun/star/ucb/InteractiveLockingLockedException.hpp>
+#include <com/sun/star/ucb/InteractiveLockingLockExpiredException.hpp>
+#include <com/sun/star/ucb/InteractiveLockingNotLockedException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkConnectException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkGeneralException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkReadException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkResolveNameException.hpp>
+#include <com/sun/star/ucb/InteractiveNetworkWriteException.hpp>
+#include <com/sun/star/ucb/MissingInputStreamException.hpp>
+#include <com/sun/star/ucb/MissingPropertiesException.hpp>
+#include <com/sun/star/ucb/NameClash.hpp>
+#include <com/sun/star/ucb/NameClashException.hpp>
+#include <com/sun/star/ucb/OpenCommandArgument3.hpp>
+#include <com/sun/star/ucb/OpenMode.hpp>
+#include <com/sun/star/ucb/PostCommandArgument2.hpp>
+#include <com/sun/star/ucb/PropertyCommandArgument.hpp>
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#include <com/sun/star/ucb/UnsupportedCommandException.hpp>
+#include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
+#include <com/sun/star/ucb/UnsupportedNameClashException.hpp>
+#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include "webdavcontent.hxx"
+#include "webdavprovider.hxx"
+#include "webdavresultset.hxx"
+#include "ContentProperties.hxx"
+#include "CurlUri.hxx"
+#include "UCBDeadPropertyValue.hxx"
+#include "DAVException.hxx"
+#include "DAVProperties.hxx"
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+namespace
+{
+void lcl_sendPartialGETRequest( bool &bError,
+ DAVException &aLastException,
+ const std::vector< OUString >& rProps,
+ std::vector< OUString > &aHeaderNames,
+ const std::unique_ptr< DAVResourceAccess > &xResAccess,
+ std::unique_ptr< ContentProperties > &xProps,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ DAVResource aResource;
+ DAVRequestHeaders aPartialGet;
+ aPartialGet.push_back(
+ DAVRequestHeader(
+ OUString( "Range" ), // see <https://tools.ietf.org/html/rfc7233#section-3.1>
+ OUString( "bytes=0-0" )));
+
+ bool bIsRequestSize = std::any_of(aHeaderNames.begin(), aHeaderNames.end(),
+ [](const OUString& rHeaderName) { return rHeaderName == "Content-Length"; });
+
+ if ( bIsRequestSize )
+ {
+ // we need to know if the server accepts range requests for a resource
+ // and the range unit it uses
+ aHeaderNames.push_back( OUString( "Accept-Ranges" ) ); // see <https://tools.ietf.org/html/rfc7233#section-2.3>
+ aHeaderNames.push_back( OUString( "Content-Range" ) ); // see <https://tools.ietf.org/html/rfc7233#section-4.2>
+ }
+ try
+ {
+ xResAccess->GET0( aPartialGet, aHeaderNames, aResource, xEnv );
+ bError = false;
+
+ if ( bIsRequestSize )
+ {
+ // the ContentProperties maps "Content-Length" to the UCB "Size" property
+ // This would have an unrealistic value of 1 byte because we did only a partial GET
+ // Solution: if "Content-Range" is present, map it with UCB "Size" property
+ OUString aAcceptRanges, aContentRange, aContentLength;
+ std::vector< DAVPropertyValue > &aResponseProps = aResource.properties;
+ for ( const auto& rResponseProp : aResponseProps )
+ {
+ if ( rResponseProp.Name == "Accept-Ranges" )
+ rResponseProp.Value >>= aAcceptRanges;
+ else if ( rResponseProp.Name == "Content-Range" )
+ rResponseProp.Value >>= aContentRange;
+ else if ( rResponseProp.Name == "Content-Length" )
+ rResponseProp.Value >>= aContentLength;
+ }
+
+ sal_Int64 nSize = 1;
+ if ( aContentLength.getLength() )
+ {
+ nSize = aContentLength.toInt64();
+ }
+
+ // according to http://tools.ietf.org/html/rfc2616#section-3.12
+ // the only range unit defined is "bytes" and implementations
+ // MAY ignore ranges specified using other units.
+ if ( nSize == 1 &&
+ aContentRange.getLength() &&
+ aAcceptRanges == "bytes" )
+ {
+ // Parse the Content-Range to get the size
+ // vid. http://tools.ietf.org/html/rfc2616#section-14.16
+ // Content-Range: <range unit> <bytes range>/<size>
+ sal_Int32 nSlash = aContentRange.lastIndexOf( '/' );
+ if ( nSlash != -1 )
+ {
+ OUString aSize = aContentRange.copy( nSlash + 1 );
+ // "*" means that the instance-length is unknown at the time when the response was generated
+ if ( aSize != "*" )
+ {
+ auto it = std::find_if(aResponseProps.begin(), aResponseProps.end(),
+ [](const DAVPropertyValue& rProp) { return rProp.Name == "Content-Length"; });
+ if (it != aResponseProps.end())
+ {
+ it->Value <<= aSize;
+ }
+ }
+ }
+ }
+ }
+
+ if (xProps)
+ xProps->addProperties(
+ rProps,
+ ContentProperties( aResource ) );
+ else
+ xProps.reset ( new ContentProperties( aResource ) );
+ }
+ catch ( DAVException const & ex )
+ {
+ aLastException = ex;
+ }
+}
+}
+
+// Static value, to manage a simple OPTIONS cache
+// Key is the URL, element is the DAVOptions resulting from an OPTIONS call.
+// Cached DAVOptions have a lifetime that depends on the errors received or not received
+// and on the value of received options.
+static DAVOptionsCache aStaticDAVOptionsCache;
+
+
+// Content Implementation.
+
+
+// ctr for content on an existing webdav resource
+Content::Content(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ ContentProvider* pProvider,
+ const uno::Reference< ucb::XContentIdentifier >& Identifier,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory )
+: ContentImplHelper( rxContext, pProvider, Identifier ),
+ m_eResourceType( UNKNOWN ),
+ m_eResourceTypeForLocks( UNKNOWN ),
+ m_pProvider( pProvider ),
+ m_bTransient( false ),
+ m_bCollection( false ),
+ m_bDidGetOrHead( false )
+{
+ try
+ {
+ initOptsCacheLifeTime();
+ m_xResAccess.reset( new DAVResourceAccess(
+ rxContext,
+ rSessionFactory,
+ Identifier->getContentIdentifier() ) );
+
+ CurlUri const aURI( Identifier->getContentIdentifier() );
+ m_aEscapedTitle = aURI.GetPathBaseName();
+ }
+ catch ( DAVException const & )
+ {
+ throw ucb::ContentCreationException();
+ }
+}
+
+
+// ctr for content on a non-existing webdav resource
+Content::Content(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ ContentProvider* pProvider,
+ const uno::Reference< ucb::XContentIdentifier >& Identifier,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory,
+ bool isCollection )
+: ContentImplHelper( rxContext, pProvider, Identifier ),
+ m_eResourceType( UNKNOWN ),
+ m_eResourceTypeForLocks( UNKNOWN ),
+ m_pProvider( pProvider ),
+ m_bTransient( true ),
+ m_bCollection( isCollection ),
+ m_bDidGetOrHead( false )
+{
+ try
+ {
+ initOptsCacheLifeTime();
+ m_xResAccess.reset( new DAVResourceAccess(
+ rxContext, rSessionFactory, Identifier->getContentIdentifier() ) );
+ }
+ catch ( DAVException const & )
+ {
+ throw ucb::ContentCreationException();
+ }
+
+ // Do not set m_aEscapedTitle here! Content::insert relays on this!!!
+}
+
+
+// virtual
+Content::~Content()
+{
+}
+
+
+// XInterface methods.
+
+
+// virtual
+void SAL_CALL Content::acquire() noexcept
+{
+ ContentImplHelper::acquire();
+}
+
+
+// virtual
+void SAL_CALL Content::release() noexcept
+{
+ ContentImplHelper::release();
+}
+
+
+// virtual
+uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
+{
+ // Note: isFolder may require network activities! So call it only
+ // if it is really necessary!!!
+ uno::Any aRet = cppu::queryInterface(
+ rType,
+ static_cast< ucb::XContentCreator * >( this ) );
+ if ( aRet.hasValue() )
+ {
+ try
+ {
+ uno::Reference< task::XInteractionHandler > xIH(
+ task::PasswordContainerInteractionHandler::create(m_xContext) );
+
+ // Supply a command env to isFolder() that contains an interaction
+ // handler that uses the password container service to obtain
+ // credentials without displaying a password gui.
+
+ uno::Reference< ucb::XCommandEnvironment > xCmdEnv(
+ ucb::CommandEnvironment::create(
+ m_xContext,
+ xIH,
+ uno::Reference< ucb::XProgressHandler >() ) );
+
+ return isFolder( xCmdEnv ) ? aRet : uno::Any();
+ }
+ catch ( uno::RuntimeException const & )
+ {
+ throw;
+ }
+ catch ( uno::Exception const & )
+ {
+ return uno::Any();
+ }
+ }
+ return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType );
+}
+
+
+// XTypeProvider methods.
+
+
+XTYPEPROVIDER_COMMON_IMPL( Content );
+
+
+// virtual
+uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
+{
+ bool bFolder = false;
+ try
+ {
+ bFolder
+ = isFolder( uno::Reference< ucb::XCommandEnvironment >() );
+ }
+ catch ( uno::RuntimeException const & )
+ {
+ throw;
+ }
+ catch ( uno::Exception const & )
+ {
+ }
+
+ if ( bFolder )
+ {
+ static cppu::OTypeCollection s_aFolderTypes(
+ CPPU_TYPE_REF( lang::XTypeProvider ),
+ CPPU_TYPE_REF( lang::XServiceInfo ),
+ CPPU_TYPE_REF( lang::XComponent ),
+ CPPU_TYPE_REF( ucb::XContent ),
+ CPPU_TYPE_REF( ucb::XCommandProcessor ),
+ CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ),
+ CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ),
+ CPPU_TYPE_REF( beans::XPropertyContainer ),
+ CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
+ CPPU_TYPE_REF( container::XChild ),
+ CPPU_TYPE_REF( ucb::XContentCreator ) );
+
+ return s_aFolderTypes.getTypes();
+ }
+ else
+ {
+ static cppu::OTypeCollection s_aDocumentTypes(
+ CPPU_TYPE_REF( lang::XTypeProvider ),
+ CPPU_TYPE_REF( lang::XServiceInfo ),
+ CPPU_TYPE_REF( lang::XComponent ),
+ CPPU_TYPE_REF( ucb::XContent ),
+ CPPU_TYPE_REF( ucb::XCommandProcessor ),
+ CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ),
+ CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ),
+ CPPU_TYPE_REF( beans::XPropertyContainer ),
+ CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
+ CPPU_TYPE_REF( container::XChild ) );
+
+ return s_aDocumentTypes.getTypes();
+ }
+}
+
+
+// XServiceInfo methods.
+
+
+// virtual
+OUString SAL_CALL Content::getImplementationName()
+{
+ return "com.sun.star.comp.ucb.WebDAVContent";
+}
+
+
+// virtual
+uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
+{
+ uno::Sequence<OUString> aSNS { WEBDAV_CONTENT_SERVICE_NAME };
+ return aSNS;
+}
+
+
+// XContent methods.
+
+
+// virtual
+OUString SAL_CALL Content::getContentType()
+{
+ bool bFolder = false;
+ try
+ {
+ bFolder
+ = isFolder( uno::Reference< ucb::XCommandEnvironment >() );
+ }
+ catch ( uno::RuntimeException const & )
+ {
+ throw;
+ }
+ catch ( uno::Exception const & )
+ {
+ }
+
+ if ( bFolder )
+ return WEBDAV_COLLECTION_TYPE;
+
+ return WEBDAV_CONTENT_TYPE;
+}
+
+
+// XCommandProcessor methods.
+
+
+// virtual
+uno::Any SAL_CALL Content::execute(
+ const ucb::Command& aCommand,
+ sal_Int32 /*CommandId*/,
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+ SAL_INFO("ucb.ucp.webdav", ">>>>> Content::execute: start: command: " << aCommand.Name
+ << ", env: " << (Environment.is() ? "present" : "missing") );
+
+ uno::Any aRet;
+
+ if ( aCommand.Name == "getPropertyValues" )
+ {
+
+ // getPropertyValues
+
+
+ uno::Sequence< beans::Property > Properties;
+ if ( !( aCommand.Argument >>= Properties ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ aRet <<= getPropertyValues( Properties, Environment );
+ }
+ else if ( aCommand.Name == "setPropertyValues" )
+ {
+
+ // setPropertyValues
+
+
+ uno::Sequence< beans::PropertyValue > aProperties;
+ if ( !( aCommand.Argument >>= aProperties ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ if ( !aProperties.getLength() )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "No properties!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ aRet <<= setPropertyValues( aProperties, Environment );
+ }
+ else if ( aCommand.Name == "getPropertySetInfo" )
+ {
+
+ // getPropertySetInfo
+
+
+ // Note: Implemented by base class.
+ aRet <<= getPropertySetInfo( Environment,
+ false /* don't cache data */ );
+ }
+ else if ( aCommand.Name == "getCommandInfo" )
+ {
+
+ // getCommandInfo
+
+
+ // Note: Implemented by base class.
+ aRet <<= getCommandInfo( Environment, false );
+ }
+ else if ( aCommand.Name == "open" )
+ {
+
+ // open
+
+
+ ucb::OpenCommandArgument3 aOpenCommand;
+ ucb::OpenCommandArgument2 aTmp;
+ if ( !( aCommand.Argument >>= aTmp ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+ if ( !( aCommand.Argument >>= aOpenCommand ) )
+ {
+ // compat mode, extract Arg2 info into newer structure
+ aOpenCommand.Mode = aTmp.Mode;
+ aOpenCommand.Priority = aTmp.Priority;
+ aOpenCommand.Sink = aTmp.Sink;
+ aOpenCommand.Properties = aTmp.Properties;
+ aOpenCommand.SortingInfo = aTmp.SortingInfo;
+ }
+
+ aRet = open( aOpenCommand, Environment );
+
+ }
+ else if ( aCommand.Name == "insert" )
+ {
+
+ // insert
+
+
+ ucb::InsertCommandArgument arg;
+ if ( !( aCommand.Argument >>= arg ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ insert( arg.Data, arg.ReplaceExisting, Environment );
+ }
+ else if ( aCommand.Name == "delete" )
+ {
+
+ // delete
+
+
+ bool bDeletePhysical = false;
+ aCommand.Argument >>= bDeletePhysical;
+
+// KSO: Ignore parameter and destroy the content, if you don't support
+// putting objects into trashcan. ( Since we do not have a trash can
+// service yet (src603), you actually have no other choice. )
+// if ( bDeletePhysical )
+// {
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ // clean cached value of PROPFIND property names
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->DESTROY( Environment );
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, Environment, true );
+ // Unreachable
+ }
+// }
+
+ // Propagate destruction.
+ destroy( bDeletePhysical );
+
+ // Remove own and all children's Additional Core Properties.
+ removeAdditionalPropertySet();
+ }
+ else if ( aCommand.Name == "transfer" && isFolder( Environment ) )
+ {
+
+ // transfer
+ // ( Not available at documents )
+
+
+ ucb::TransferInfo transferArgs;
+ if ( !( aCommand.Argument >>= transferArgs ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ transfer( transferArgs, Environment );
+ }
+ else if ( aCommand.Name == "post" )
+ {
+
+ // post
+
+
+ ucb::PostCommandArgument2 aArg;
+ if ( !( aCommand.Argument >>= aArg ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ post( aArg, Environment );
+ }
+ else if ( aCommand.Name == "lock" )
+ {
+
+ // lock
+
+ ResourceType eType = resourceTypeForLocks( Environment );
+ // when the resource is not yet present the lock is used to create it
+ // see: http://tools.ietf.org/html/rfc4918#section-7.3
+ // If the resource doesn't exists and the lock is not enabled (DAV with
+ // no lock or a simple web) the error will be dealt with inside lock() method
+ if ( eType == NOT_FOUND ||
+ eType == DAV )
+ {
+ lock( Environment );
+ if ( eType == NOT_FOUND )
+ {
+ m_eResourceType = UNKNOWN; // lock may have created it, need to check again
+ m_eResourceTypeForLocks = UNKNOWN;
+ }
+ }
+ }
+ else if ( aCommand.Name == "unlock" )
+ {
+
+ // unlock
+ // do not check for a DAV resource
+ // the lock store will be checked before sending
+ unlock( Environment );
+ }
+ else if ( aCommand.Name == "createNewContent" &&
+ isFolder( Environment ) )
+ {
+
+ // createNewContent
+
+
+ ucb::ContentInfo aArg;
+ if ( !( aCommand.Argument >>= aArg ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ // Unreachable
+ }
+
+ aRet <<= createNewContent( aArg );
+ }
+ else if ( aCommand.Name == "addProperty" )
+ {
+ ucb::PropertyCommandArgument aPropArg;
+ if ( !( aCommand.Argument >>= aPropArg ))
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ }
+
+ // TODO when/if XPropertyContainer is removed,
+ // the command execution can be canceled in addProperty
+ try
+ {
+ addProperty( aPropArg, Environment );
+ }
+ catch ( const beans::PropertyExistException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch ( const beans::IllegalTypeException&e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch ( const lang::IllegalArgumentException&e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ }
+ else if ( aCommand.Name == "removeProperty" )
+ {
+ OUString sPropName;
+ if ( !( aCommand.Argument >>= sPropName ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( lang::IllegalArgumentException(
+ "Wrong argument type!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ Environment );
+ }
+
+ // TODO when/if XPropertyContainer is removed,
+ // the command execution can be canceled in removeProperty
+ try
+ {
+ removeProperty( sPropName, Environment );
+ }
+ catch( const beans::UnknownPropertyException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ catch( const beans::NotRemoveableException &e )
+ {
+ ucbhelper::cancelCommandExecution( uno::makeAny( e ), Environment );
+ }
+ }
+ else
+ {
+
+ // Unsupported command
+
+
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( ucb::UnsupportedCommandException(
+ aCommand.Name,
+ static_cast< cppu::OWeakObject * >( this ) ) ),
+ Environment );
+ // Unreachable
+ }
+
+ SAL_INFO("ucb.ucp.webdav", "<<<<< Content::execute: end: command: " << aCommand.Name);
+
+ return aRet;
+}
+
+
+// virtual
+void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
+{
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ xResAccess->abort();
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & )
+ {
+ // abort failed!
+ }
+}
+
+
+// XPropertyContainer methods.
+
+
+void Content::addProperty( const css::ucb::PropertyCommandArgument &aCmdArg,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+// if ( m_bTransient )
+// @@@ ???
+ const beans::Property aProperty = aCmdArg.Property;
+ const uno::Any aDefaultValue = aCmdArg.DefaultValue;
+
+ // check property Name
+ if ( !aProperty.Name.getLength() )
+ throw lang::IllegalArgumentException(
+ "\"addProperty\" with empty Property.Name",
+ static_cast< ::cppu::OWeakObject * >( this ),
+ -1 );
+
+ // Check property type.
+ if ( !UCBDeadPropertyValue::supportsType( aProperty.Type ) )
+ throw beans::IllegalTypeException(
+ "\"addProperty\" unsupported Property.Type",
+ static_cast< ::cppu::OWeakObject * >( this ) );
+
+ // check default value
+ if ( aDefaultValue.hasValue() && aDefaultValue.getValueType() != aProperty.Type )
+ throw beans::IllegalTypeException(
+ "\"addProperty\" DefaultValue does not match Property.Type",
+ static_cast< ::cppu::OWeakObject * >( this ) );
+
+
+ // Make sure a property with the requested name does not already
+ // exist in dynamic and static(!) properties.
+
+
+ // Take into account special properties with custom namespace
+ // using <prop:the_propname xmlns:prop="the_namespace">
+ OUString aSpecialName;
+ bool bIsSpecial = DAVProperties::isUCBSpecialProperty( aProperty.Name, aSpecialName );
+
+ // Note: This requires network access!
+ if ( getPropertySetInfo( xEnv, false /* don't cache data */ )
+ ->hasPropertyByName( bIsSpecial ? aSpecialName : aProperty.Name ) )
+ {
+ // Property does already exist.
+ throw beans::PropertyExistException();
+ }
+
+
+ // Add a new dynamic property.
+
+
+ ProppatchValue aValue( PROPSET, aProperty.Name, aDefaultValue );
+
+ std::vector< ProppatchValue > aProppatchValues;
+ aProppatchValues.push_back( aValue );
+
+ try
+ {
+ // Set property value at server.
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ // clean cached value of PROPFIND property names
+ // PROPPATCH can change them
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->PROPPATCH( aProppatchValues, xEnv );
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+
+ // Notify propertyset info change listeners.
+ beans::PropertySetInfoChangeEvent evt(
+ static_cast< cppu::OWeakObject * >( this ),
+ bIsSpecial ? aSpecialName : aProperty.Name,
+ -1, // No handle available
+ beans::PropertySetInfoChange::PROPERTY_INSERTED );
+ notifyPropertySetInfoChange( evt );
+ }
+ catch ( DAVException const & e )
+ {
+ if ( e.getStatus() == SC_FORBIDDEN )
+ {
+ // Support for setting arbitrary dead properties is optional!
+
+ // Store property locally.
+ ContentImplHelper::addProperty( bIsSpecial ? aSpecialName : aProperty.Name,
+ aProperty.Attributes,
+ aDefaultValue );
+ }
+ else
+ {
+ if ( shouldAccessNetworkAfterException( e ) )
+ {
+ try
+ {
+ const ResourceType eType = getResourceType( xEnv );
+ switch ( eType )
+ {
+ case UNKNOWN:
+ case DAV:
+ throw lang::IllegalArgumentException();
+
+ case NON_DAV:
+ // Store property locally.
+ ContentImplHelper::addProperty( bIsSpecial ? aSpecialName : aProperty.Name,
+ aProperty.Attributes,
+ aDefaultValue );
+ break;
+
+ default:
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::addProperty - "
+ "Unsupported resource type!" );
+ break;
+ }
+ }
+ catch ( uno::Exception const & )
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::addProperty - "
+ "Unable to determine resource type!" );
+ }
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::addProperty - "
+ "Unable to determine resource type!" );
+ }
+ }
+ }
+}
+
+void Content::removeProperty( const OUString& Name,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+#if 0
+ // @@@ REMOVABLE at the moment not properly set in the PropSetInfo
+ try
+ {
+ beans::Property aProp
+ = getPropertySetInfo( xEnv, false /* don't cache data */ )
+ ->getPropertyByName( Name );
+
+ if ( !( aProp.Attributes & beans::PropertyAttribute::REMOVABLE ) )
+ {
+ // Not removable!
+ throw beans::NotRemoveableException();
+ }
+ }
+ catch ( beans::UnknownPropertyException const & )
+ {
+ //SAL_WARN( "ucb.ucp.webdav", "removeProperty - Unknown property!" );
+ throw;
+ }
+#endif
+
+ // Try to remove property from server.
+ try
+ {
+ std::vector< ProppatchValue > aProppatchValues;
+ ProppatchValue aValue( PROPREMOVE, Name, uno::Any() );
+ aProppatchValues.push_back( aValue );
+
+ // Remove property value from server.
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ // clean cached value of PROPFIND property names
+ // PROPPATCH can change them
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->PROPPATCH( aProppatchValues, xEnv );
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+
+ // Notify propertyset info change listeners.
+ beans::PropertySetInfoChangeEvent evt(
+ static_cast< cppu::OWeakObject * >( this ),
+ Name,
+ -1, // No handle available
+ beans::PropertySetInfoChange::PROPERTY_REMOVED );
+ notifyPropertySetInfoChange( evt );
+ }
+ catch ( DAVException const & e )
+ {
+ if ( e.getStatus() == SC_FORBIDDEN )
+ {
+ // Support for setting arbitrary dead properties is optional!
+
+ // Try to remove property from local store.
+ ContentImplHelper::removeProperty( Name );
+ }
+ else
+ {
+ if ( shouldAccessNetworkAfterException( e ) )
+ {
+ try
+ {
+ const ResourceType eType = getResourceType( xEnv );
+ switch ( eType )
+ {
+ case UNKNOWN:
+ case DAV:
+ throw beans::UnknownPropertyException(Name);
+
+ case NON_DAV:
+ // Try to remove property from local store.
+ ContentImplHelper::removeProperty( Name );
+ break;
+
+ default:
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::removeProperty - "
+ "Unsupported resource type!" );
+ break;
+ }
+ }
+ catch ( uno::Exception const & )
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::removeProperty - "
+ "Unable to determine resource type!" );
+ }
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::removeProperty - "
+ "Unable to determine resource type!" );
+// throw beans::UnknownPropertyException();
+ }
+ }
+ }
+}
+
+// virtual
+void SAL_CALL Content::addProperty( const OUString& Name,
+ sal_Int16 Attributes,
+ const uno::Any& DefaultValue )
+{
+ beans::Property aProperty;
+ aProperty.Name = Name;
+ aProperty.Type = DefaultValue.getValueType();
+ aProperty.Attributes = Attributes;
+ aProperty.Handle = -1;
+
+ addProperty( ucb::PropertyCommandArgument( aProperty, DefaultValue ),
+ uno::Reference< ucb::XCommandEnvironment >());
+}
+
+// virtual
+void SAL_CALL Content::removeProperty( const OUString& Name )
+{
+ removeProperty( Name,
+ uno::Reference< ucb::XCommandEnvironment >() );
+}
+
+
+// XContentCreator methods.
+
+
+// virtual
+uno::Sequence< ucb::ContentInfo > SAL_CALL
+Content::queryCreatableContentsInfo()
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ uno::Sequence< ucb::ContentInfo > aSeq( 2 );
+
+ // document.
+ aSeq.getArray()[ 0 ].Type = WEBDAV_CONTENT_TYPE;
+ aSeq.getArray()[ 0 ].Attributes
+ = ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM
+ | ucb::ContentInfoAttribute::KIND_DOCUMENT;
+
+ beans::Property aProp;
+ m_pProvider->getProperty( "Title", aProp );
+
+ uno::Sequence< beans::Property > aDocProps( 1 );
+ aDocProps.getArray()[ 0 ] = aProp;
+ aSeq.getArray()[ 0 ].Properties = aDocProps;
+
+ // folder.
+ aSeq.getArray()[ 1 ].Type = WEBDAV_COLLECTION_TYPE;
+ aSeq.getArray()[ 1 ].Attributes
+ = ucb::ContentInfoAttribute::KIND_FOLDER;
+
+ uno::Sequence< beans::Property > aFolderProps( 1 );
+ aFolderProps.getArray()[ 0 ] = aProp;
+ aSeq.getArray()[ 1 ].Properties = aFolderProps;
+ return aSeq;
+}
+
+
+// virtual
+uno::Reference< ucb::XContent > SAL_CALL
+Content::createNewContent( const ucb::ContentInfo& Info )
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ if ( !Info.Type.getLength() )
+ return uno::Reference< ucb::XContent >();
+
+ if ( ( Info.Type != WEBDAV_COLLECTION_TYPE )
+ &&
+ ( Info.Type != WEBDAV_CONTENT_TYPE ) )
+ return uno::Reference< ucb::XContent >();
+
+ OUString aURL = m_xIdentifier->getContentIdentifier();
+
+ SAL_WARN_IF( aURL.isEmpty(), "ucb.ucp.webdav",
+ "WebdavContent::createNewContent - empty identifier!" );
+
+ if ( ( aURL.lastIndexOf( '/' ) + 1 ) != aURL.getLength() )
+ aURL += "/";
+
+ bool isCollection;
+ if ( Info.Type == WEBDAV_COLLECTION_TYPE )
+ {
+ aURL += "New_Collection";
+ isCollection = true;
+ }
+ else
+ {
+ aURL += "New_Content";
+ isCollection = false;
+ }
+
+ uno::Reference< ucb::XContentIdentifier > xId(
+ new ::ucbhelper::ContentIdentifier( aURL ) );
+
+ // create the local content
+ try
+ {
+ return new ::http_dav_ucp::Content( m_xContext,
+ m_pProvider,
+ xId,
+ m_xResAccess->getSessionFactory(),
+ isCollection );
+ }
+ catch ( ucb::ContentCreationException & )
+ {
+ return uno::Reference< ucb::XContent >();
+ }
+}
+
+
+// virtual
+OUString Content::getParentURL()
+{
+ // <scheme>:// -> ""
+ // <scheme>://foo -> ""
+ // <scheme>://foo/ -> ""
+ // <scheme>://foo/bar -> <scheme>://foo/
+ // <scheme>://foo/bar/ -> <scheme>://foo/
+ // <scheme>://foo/bar/abc -> <scheme>://foo/bar/
+
+ OUString aURL = m_xIdentifier->getContentIdentifier();
+
+ sal_Int32 nPos = aURL.lastIndexOf( '/' );
+ if ( nPos == ( aURL.getLength() - 1 ) )
+ {
+ // Trailing slash found. Skip.
+ nPos = aURL.lastIndexOf( '/', nPos );
+ }
+
+ sal_Int32 nPos1 = aURL.lastIndexOf( '/', nPos );
+ if ( nPos1 != -1 )
+ nPos1 = aURL.lastIndexOf( '/', nPos1 );
+
+ if ( nPos1 == -1 )
+ return OUString();
+
+ return aURL.copy( 0, nPos + 1 );
+}
+
+
+// Non-interface methods.
+
+
+// static
+uno::Reference< sdbc::XRow > Content::getPropertyValues(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ const uno::Sequence< beans::Property >& rProperties,
+ const ContentProperties& rData,
+ const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider,
+ const OUString& rContentId )
+{
+ // Note: Empty sequence means "get values of all supported properties".
+
+ rtl::Reference< ::ucbhelper::PropertyValueSet > xRow
+ = new ::ucbhelper::PropertyValueSet( rxContext );
+
+ sal_Int32 nCount = rProperties.getLength();
+ if ( nCount )
+ {
+ uno::Reference< beans::XPropertySet > xAdditionalPropSet;
+ bool bTriedToGetAdditionalPropSet = false;
+
+ const beans::Property* pProps = rProperties.getConstArray();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const beans::Property& rProp = pProps[ n ];
+
+ // Process standard UCB, DAV and HTTP properties.
+ const uno::Any & rValue = rData.getValue( rProp.Name );
+ if ( rValue.hasValue() )
+ {
+ xRow->appendObject( rProp, rValue );
+ }
+ else
+ {
+ // Process local Additional Properties.
+ if ( !bTriedToGetAdditionalPropSet && !xAdditionalPropSet.is() )
+ {
+ xAdditionalPropSet =
+ rProvider->getAdditionalPropertySet( rContentId,
+ false );
+ bTriedToGetAdditionalPropSet = true;
+ }
+
+ if ( !xAdditionalPropSet.is() ||
+ !xRow->appendPropertySetValue(
+ xAdditionalPropSet, rProp ) )
+ {
+ // Append empty entry.
+ xRow->appendVoid( rProp );
+ }
+ }
+ }
+ }
+ else
+ {
+ // Append all standard UCB, DAV and HTTP properties.
+
+ const std::unique_ptr< PropertyValueMap > & xProps = rData.getProperties();
+
+ ContentProvider * pProvider
+ = static_cast< ContentProvider * >( rProvider.get() );
+ beans::Property aProp;
+
+ for ( const auto& rProp : *xProps )
+ {
+ if ( pProvider->getProperty( rProp.first, aProp ) )
+ xRow->appendObject( aProp, rProp.second.value() );
+ }
+
+ // Append all local Additional Properties.
+ uno::Reference< beans::XPropertySet > xSet =
+ rProvider->getAdditionalPropertySet( rContentId, false );
+ xRow->appendPropertySet( xSet );
+ }
+
+ return uno::Reference<sdbc::XRow>(xRow.get());
+}
+
+namespace {
+void GetPropsUsingHeadRequest(DAVResource& resource,
+ const std::unique_ptr< DAVResourceAccess >& xResAccess,
+ const std::vector< OUString >& aHTTPNames,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv)
+{
+ if (!aHTTPNames.empty())
+ {
+ DAVOptions aDAVOptions;
+ OUString aTargetURL = xResAccess->getURL();
+ // retrieve the cached options if any
+ aStaticDAVOptionsCache.getDAVOptions(aTargetURL, aDAVOptions);
+
+ // clean cached value of PROPFIND property names
+ // PROPPATCH can change them
+ Content::removeCachedPropertyNames(aTargetURL);
+ // test if HEAD allowed, if not, throw, should be caught immediately
+ // SC_GONE used internally by us, see comment in Content::getPropertyValues
+ // in the catch scope
+ if (aDAVOptions.getHttpResponseStatusCode() != SC_GONE &&
+ !aDAVOptions.isHeadAllowed())
+ {
+ throw DAVException(DAVException::DAV_HTTP_ERROR, "405 Not Implemented", SC_METHOD_NOT_ALLOWED);
+ }
+ // if HEAD is enabled on this site
+ // check if there is a relevant HTTP response status code cached
+ if (aDAVOptions.getHttpResponseStatusCode() != SC_NONE)
+ {
+ // throws exception as if there was a server error, a DAV exception
+ throw DAVException(DAVException::DAV_HTTP_ERROR,
+ aDAVOptions.getHttpResponseStatusText(),
+ aDAVOptions.getHttpResponseStatusCode());
+ // Unreachable
+ }
+
+ xResAccess->HEAD(aHTTPNames, resource, xEnv);
+ }
+}
+}
+
+uno::Reference< sdbc::XRow > Content::getPropertyValues(
+ const uno::Sequence< beans::Property >& rProperties,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ std::unique_ptr< ContentProperties > xProps;
+ std::unique_ptr< ContentProperties > xCachedProps;
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ OUString aUnescapedTitle;
+ bool bHasAll = false;
+ uno::Reference< uno::XComponentContext > xContext;
+ uno::Reference< ucb::XContentIdentifier > xIdentifier;
+ rtl::Reference< ::ucbhelper::ContentProviderImplHelper > xProvider;
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ aUnescapedTitle = DecodeURI(m_aEscapedTitle);
+ xContext.set( m_xContext );
+ xIdentifier.set( m_xIdentifier );
+ xProvider = m_xProvider;
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+
+ // First, ask cache...
+ if (m_xCachedProps)
+ {
+ xCachedProps.reset( new ContentProperties( *m_xCachedProps ) );
+
+ std::vector< OUString > aMissingProps;
+ if ( xCachedProps->containsAllNames( rProperties, aMissingProps ) )
+ {
+ // All properties are already in cache! No server access needed.
+ bHasAll = true;
+ }
+
+ // use the cached ContentProperties instance
+ xProps.reset( new ContentProperties( *xCachedProps ) );
+ }
+ }
+
+ bool bNetworkAccessAllowed = true;
+
+ if ( !m_bTransient && !bHasAll )
+ {
+ // Obtain values from server...
+
+
+ // First, identify whether resource is DAV or not
+ const ResourceType eType = getResourceType(
+ xEnv, xResAccess, &bNetworkAccessAllowed );
+
+ if ( eType == DAV )
+ {
+ // cache lookup... getResourceType may fill the props cache via
+ // PROPFIND!
+ if (m_xCachedProps)
+ {
+ xCachedProps.reset(
+ new ContentProperties( *m_xCachedProps ) );
+
+ std::vector< OUString > aMissingProps;
+ if ( xCachedProps->containsAllNames(
+ rProperties, aMissingProps ) )
+ {
+ // All properties are already in cache! No server access
+ // needed.
+ bHasAll = true;
+ }
+
+ // use the cached ContentProperties instance
+ xProps.reset( new ContentProperties( *xCachedProps ) );
+ }
+
+ if ( !bHasAll )
+ {
+ // Only DAV resources support PROPFIND
+ std::vector< OUString > aPropNames;
+
+ uno::Sequence< beans::Property > aProperties(rProperties);
+
+ if ( aProperties.getLength() > 0 )
+ ContentProperties::UCBNamesToDAVNames(
+ aProperties, aPropNames );
+
+ if ( !aPropNames.empty() )
+ {
+ std::vector< DAVResource > resources;
+ try
+ {
+ xResAccess->PROPFIND(
+ DAVZERO, aPropNames, resources, xEnv );
+
+ if ( 1 == resources.size() )
+ {
+#if defined SAL_LOG_INFO
+ {//debug
+ // print received resources
+ std::vector< DAVPropertyValue >::const_iterator it = resources[0].properties.begin();
+ std::vector< DAVPropertyValue >::const_iterator end = resources[0].properties.end();
+ while ( it != end )
+ {
+ OUString aPropValue;
+ bool bValue;
+ uno::Sequence< ucb::LockEntry > aSupportedLocks;
+ if( (*it).Value >>= aPropValue )
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getPropertyValues) - returned property: " << (*it).Name << ":" << aPropValue );
+ else if( (*it).Value >>= bValue )
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getPropertyValues) - returned property: " << (*it).Name << ":" <<
+ ( bValue ? "true" : "false" ) );
+ else if( (*it).Value >>= aSupportedLocks )
+ {
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getPropertyValues) - returned property: " << (*it).Name << ":" );
+ for ( sal_Int32 n = 0; n < aSupportedLocks.getLength(); ++n )
+ {
+ SAL_INFO( "ucb.ucp.webdav"," scope: "
+ << (aSupportedLocks[n].Scope == ucb::LockScope_SHARED ? "shared" : "exclusive")
+ << ", type: "
+ << (aSupportedLocks[n].Type != ucb::LockType_WRITE ? "" : "write") );
+ }
+ }
+ ++it;
+ }
+ }
+#endif
+ if (xProps)
+ xProps->addProperties(
+ aPropNames,
+ ContentProperties( resources[ 0 ] ));
+ else
+ xProps.reset(
+ new ContentProperties( resources[ 0 ] ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ bNetworkAccessAllowed = bNetworkAccessAllowed
+ && shouldAccessNetworkAfterException( e );
+
+ if ( !bNetworkAccessAllowed )
+ {
+ cancelCommandExecution( e, xEnv );
+ // unreachable
+ }
+ }
+ }
+ }
+ }
+
+ if ( bNetworkAccessAllowed )
+ {
+ // All properties obtained already?
+ std::vector< OUString > aMissingProps;
+ if ( !( xProps
+ && xProps->containsAllNames(rProperties, aMissingProps))
+ // i#121922 for non-DAV, uncacheable properties must be fetched
+ // regardless of m_bDidGetOrHead.
+ // But SharePoint may do weird things on HEAD so for DAV
+ // only do this if required.
+ && (eType != DAV || !m_bDidGetOrHead))
+ {
+ // Possibly the missing props can be obtained using a HEAD
+ // request.
+
+ std::vector< OUString > aHeaderNames;
+ ContentProperties::UCBNamesToHTTPNames(
+ rProperties,
+ aHeaderNames );
+
+ if( eType != DAV )
+ {
+ // in case of not DAV PROFIND (previously in program flow) failed
+ // so we need to add the only prop that's common
+ // to DAV and NON_DAV: MediaType, that maps to Content-Type
+ aHeaderNames.push_back( "Content-Type" );
+ }
+
+ if (!aHeaderNames.empty()) try
+ {
+ DAVResource resource;
+ GetPropsUsingHeadRequest(resource, xResAccess, aHeaderNames, xEnv);
+ m_bDidGetOrHead = true;
+
+ if (xProps)
+ xProps->addProperties(
+ aMissingProps,
+ ContentProperties( resource ) );
+ else
+ xProps.reset ( new ContentProperties( resource ) );
+
+ if (m_eResourceType == NON_DAV)
+ xProps->addProperties(aMissingProps,
+ ContentProperties(
+ aUnescapedTitle,
+ false));
+ }
+ catch ( DAVException const & e )
+ {
+ // non "general-purpose servers" may not support HEAD requests
+ // see http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.1
+ // In this case, perform a partial GET only to get the header info
+ // vid. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
+ // WARNING if the server does not support partial GETs,
+ // the GET will transfer the whole content
+ bool bError = true;
+ DAVException aLastException = e;
+ OUString aTargetURL = xResAccess->getURL();
+
+ if ( e.getError() == DAVException::DAV_HTTP_ERROR )
+ {
+ // According to the spec. the origin server SHOULD return
+ // * 405 (Method Not Allowed):
+ // the method is known but not allowed for the requested resource
+ // * 501 (Not Implemented):
+ // the method is unrecognized or not implemented
+ // * 404 (SC_NOT_FOUND)
+ // is for google-code server and for MS IIS 10.0 Web server
+ // when only GET is enabled
+ if ( aLastException.getStatus() == SC_NOT_IMPLEMENTED ||
+ aLastException.getStatus() == SC_METHOD_NOT_ALLOWED ||
+ aLastException.getStatus() == SC_NOT_FOUND )
+ {
+ SAL_WARN( "ucb.ucp.webdav", "HEAD probably not implemented: fall back to a partial GET" );
+ aStaticDAVOptionsCache.setHeadAllowed( aTargetURL, false );
+ lcl_sendPartialGETRequest( bError,
+ aLastException,
+ aMissingProps,
+ aHeaderNames,
+ xResAccess,
+ xProps,
+ xEnv );
+ m_bDidGetOrHead = !bError;
+ }
+ }
+
+ if ( bError )
+ {
+ DAVOptions aDAVOptionsException;
+
+ aDAVOptionsException.setURL( aTargetURL );
+ // check if the error was SC_NOT_FOUND, meaning that the
+ // GET fall back didn't succeeded and the element is really missing
+ // we will consider the resource SC_GONE (410) for some time
+ // we use SC_GONE because has the same meaning of SC_NOT_FOUND (404)
+ // see:
+ // <https://tools.ietf.org/html/rfc7231#section-6.5.9> (retrieved 2016-10-09)
+ // apparently it's not used to mark the missing HEAD method (so far...)
+ sal_uInt16 ResponseStatusCode =
+ ( aLastException.getStatus() == SC_NOT_FOUND ) ?
+ SC_GONE :
+ aLastException.getStatus();
+ aDAVOptionsException.setHttpResponseStatusCode( ResponseStatusCode );
+ aDAVOptionsException.setHttpResponseStatusText( aLastException.getData() );
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptionsException,
+ m_nOptsCacheLifeNotFound );
+
+ if ( !shouldAccessNetworkAfterException( aLastException ) )
+ {
+ cancelCommandExecution( aLastException, xEnv );
+ // unreachable
+ }
+ }
+ }
+ }
+ }
+
+ // might trigger HTTP redirect.
+ // Therefore, title must be updated here.
+ CurlUri const aUri( xResAccess->getURL() );
+ aUnescapedTitle = aUri.GetPathBaseNameUnescaped();
+
+ if ( eType == UNKNOWN )
+ {
+ xProps.reset( new ContentProperties( aUnescapedTitle ) );
+ }
+
+ // For DAV resources we only know the Title, for non-DAV
+ // resources we additionally know that it is a document.
+
+ else if ( eType == DAV )
+ {
+ if (!xProps)
+ xProps.reset(new ContentProperties(aUnescapedTitle));
+ else
+ xProps->addProperty("Title", uno::makeAny(aUnescapedTitle), true);
+ }
+ else
+ {
+ if (!xProps)
+ xProps.reset( new ContentProperties( aUnescapedTitle, false ) );
+ else
+ xProps->addProperty(
+ "Title",
+ uno::makeAny( aUnescapedTitle ),
+ true );
+
+ xProps->addProperty(
+ "IsFolder",
+ uno::makeAny( false ),
+ true );
+ xProps->addProperty(
+ "IsDocument",
+ uno::makeAny( true ),
+ true );
+ xProps->addProperty(
+ "ContentType",
+ uno::makeAny( OUString(WEBDAV_CONTENT_TYPE) ),
+ true );
+ }
+ }
+ else
+ {
+ // No server access for just created (not yet committed) objects.
+ // Only a minimal set of properties supported at this stage.
+ if (m_bTransient)
+ xProps.reset( new ContentProperties( aUnescapedTitle,
+ m_bCollection ) );
+ }
+
+ // Add a default for the properties requested but not found.
+ // Determine still missing properties, add a default.
+ // Some client function doesn't expect a void uno::Any,
+ // but instead wants some sort of default.
+ std::vector< OUString > aMissingProps;
+ if ( !xProps->containsAllNames(
+ rProperties, aMissingProps ) )
+ {
+ //
+ for ( std::vector< rtl::OUString >::const_iterator it = aMissingProps.begin();
+ it != aMissingProps.end(); ++it )
+ {
+ // For the time being only a couple of properties need to be added
+ if ( (*it) == "DateModified" || (*it) == "DateCreated" )
+ {
+ util::DateTime aDate;
+ xProps->addProperty(
+ (*it),
+ uno::makeAny( aDate ),
+ true );
+ }
+ else if (bNetworkAccessAllowed) // don't set these if connection failed
+ {
+ // If WebDAV didn't return the resource type, assume default
+ // This happens e.g. for lists exported by SharePoint
+ if ((*it) == "IsFolder")
+ {
+ xProps->addProperty(
+ (*it),
+ uno::makeAny( false ),
+ true );
+ }
+ else if ((*it) == "IsDocument")
+ {
+ xProps->addProperty(
+ (*it),
+ uno::makeAny( true ),
+ true );
+ }
+ }
+ }
+ }
+
+ sal_Int32 nCount = rProperties.getLength();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const OUString rName = rProperties[ n ].Name;
+ if ( rName == "BaseURI" )
+ {
+ // Add BaseURI property, if requested.
+ xProps->addProperty(
+ "BaseURI",
+ uno::makeAny( getBaseURI( xResAccess ) ),
+ true );
+ }
+ else if ( rName == "CreatableContentsInfo" )
+ {
+ // Add CreatableContentsInfo property, if requested.
+ bool bFolder = false;
+ xProps->getValue( "IsFolder" )
+ >>= bFolder;
+ xProps->addProperty(
+ "CreatableContentsInfo",
+ uno::makeAny( bFolder
+ ? queryCreatableContentsInfo()
+ : uno::Sequence< ucb::ContentInfo >() ),
+ true );
+ }
+ }
+
+ uno::Reference< sdbc::XRow > xResultRow
+ = getPropertyValues( xContext,
+ rProperties,
+ *xProps,
+ xProvider,
+ xIdentifier->getContentIdentifier() );
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ if (!m_xCachedProps)
+ m_xCachedProps.reset( new CachableContentProperties( *xProps ) );
+ else
+ m_xCachedProps->addProperties( *xProps );
+
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ m_aEscapedTitle = EncodeSegment(aUnescapedTitle);
+ }
+
+ return xResultRow;
+}
+
+
+uno::Sequence< uno::Any > Content::setPropertyValues(
+ const uno::Sequence< beans::PropertyValue >& rValues,
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ uno::Reference< ucb::XContentIdentifier > xIdentifier;
+ rtl::Reference< ContentProvider > xProvider;
+ bool bTransient;
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ xProvider.set( m_pProvider );
+ xIdentifier.set( m_xIdentifier );
+ bTransient = m_bTransient;
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ uno::Sequence< uno::Any > aRet( rValues.getLength() );
+ uno::Sequence< beans::PropertyChangeEvent > aChanges( rValues.getLength() );
+ sal_Int32 nChanged = 0;
+
+ beans::PropertyChangeEvent aEvent;
+ aEvent.Source = static_cast< cppu::OWeakObject * >( this );
+ aEvent.Further = false;
+ // aEvent.PropertyName =
+ aEvent.PropertyHandle = -1;
+ // aEvent.OldValue =
+ // aEvent.NewValue =
+
+ std::vector< ProppatchValue > aProppatchValues;
+ std::vector< sal_Int32 > aProppatchPropsPositions;
+
+ uno::Reference< ucb::XPersistentPropertySet > xAdditionalPropSet;
+ bool bTriedToGetAdditionalPropSet = false;
+
+ bool bExchange = false;
+ OUString aNewTitle;
+ OUString aOldTitle;
+ sal_Int32 nTitlePos = -1;
+
+ uno::Reference< beans::XPropertySetInfo > xInfo;
+
+ const beans::PropertyValue* pValues = rValues.getConstArray();
+ sal_Int32 nCount = rValues.getLength();
+ for ( sal_Int32 n = 0; n < nCount; ++n )
+ {
+ const beans::PropertyValue& rValue = pValues[ n ];
+ const OUString & rName = rValue.Name;
+
+ beans::Property aTmpProp;
+ xProvider->getProperty( rName, aTmpProp );
+
+ if ( aTmpProp.Attributes & beans::PropertyAttribute::READONLY )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ continue;
+ }
+
+
+ // Mandatory props.
+
+
+ if ( rName == "ContentType" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "IsDocument" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "IsFolder" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "Title" )
+ {
+ OUString aNewValue;
+ if ( rValue.Value >>= aNewValue )
+ {
+ // No empty titles!
+ if ( aNewValue.getLength() > 0 )
+ {
+ try
+ {
+ CurlUri const aURI(xIdentifier->getContentIdentifier());
+ aOldTitle = aURI.GetPathBaseNameUnescaped();
+
+ if ( aNewValue != aOldTitle )
+ {
+ // modified title -> modified URL -> exchange !
+ if ( !bTransient )
+ bExchange = true;
+
+ // new value will be set later...
+ aNewTitle = aNewValue;
+
+ // remember position within sequence of values (for
+ // error handling).
+ nTitlePos = n;
+ }
+ }
+ catch ( DAVException const & )
+ {
+ aRet[ n ] <<= lang::IllegalArgumentException(
+ "Invalid content identifier!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 );
+ }
+ }
+ else
+ {
+ aRet[ n ] <<= lang::IllegalArgumentException(
+ "Empty title not allowed!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 );
+ }
+ }
+ else
+ {
+ aRet[ n ] <<= beans::IllegalTypeException(
+ "Property value has wrong type!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ }
+ else
+ {
+
+ // Optional props.
+
+
+ OUString aSpecialName;
+ bool bIsSpecial = DAVProperties::isUCBSpecialProperty( rName, aSpecialName );
+
+ if ( !xInfo.is() )
+ xInfo = getPropertySetInfo( xEnv,
+ false /* don't cache data */ );
+
+ if ( !xInfo->hasPropertyByName( bIsSpecial ? aSpecialName : rName ) )
+ {
+ // Check, whether property exists. Skip otherwise.
+ // PROPPATCH::set would add the property automatically, which
+ // is not allowed for "setPropertyValues" command!
+ aRet[ n ] <<= beans::UnknownPropertyException(
+ "Property is unknown!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ continue;
+ }
+
+ if ( rName == "Size" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "DateCreated" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "DateModified" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else if ( rName == "MediaType" )
+ {
+ // Read-only property!
+ // (but could be writable, if 'getcontenttype' would be)
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ if ( rName == "CreatableContentsInfo" )
+ {
+ // Read-only property!
+ aRet[ n ] <<= lang::IllegalAccessException(
+ "Property is read-only!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ else
+ {
+ if ( getResourceType( xEnv, xResAccess ) == DAV )
+ {
+ // Property value will be set on server.
+ ProppatchValue aValue( PROPSET, rName, rValue.Value );
+ aProppatchValues.push_back( aValue );
+
+ // remember position within sequence of values (for
+ // error handling).
+ aProppatchPropsPositions.push_back( n );
+ }
+ else
+ {
+ // Property value will be stored in local property store.
+ if ( !bTriedToGetAdditionalPropSet &&
+ !xAdditionalPropSet.is() )
+ {
+ xAdditionalPropSet
+ = getAdditionalPropertySet( false );
+ bTriedToGetAdditionalPropSet = true;
+ }
+
+ if ( xAdditionalPropSet.is() )
+ {
+ try
+ {
+ uno::Any aOldValue
+ = xAdditionalPropSet->getPropertyValue( rName );
+ if ( aOldValue != rValue.Value )
+ {
+ xAdditionalPropSet->setPropertyValue(
+ rName, rValue.Value );
+
+ aEvent.PropertyName = rName;
+ aEvent.OldValue = aOldValue;
+ aEvent.NewValue = rValue.Value;
+
+ aChanges.getArray()[ nChanged ] = aEvent;
+ nChanged++;
+ }
+ }
+ catch ( beans::UnknownPropertyException const & e )
+ {
+ aRet[ n ] <<= e;
+ }
+ catch ( lang::WrappedTargetException const & e )
+ {
+ aRet[ n ] <<= e;
+ }
+ catch ( beans::PropertyVetoException const & e )
+ {
+ aRet[ n ] <<= e;
+ }
+ catch ( lang::IllegalArgumentException const & e )
+ {
+ aRet[ n ] <<= e;
+ }
+ }
+ else
+ {
+ aRet[ n ] <<= uno::Exception(
+ "No property set for storing the value!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ }
+ }
+ }
+ } // for
+
+ if ( !bTransient && (!aProppatchValues.empty()) )
+ {
+ try
+ {
+ // clean cached value of PROPFIND property names
+ // PROPPATCH can change them
+ removeCachedPropertyNames( xResAccess->getURL() );
+ // Set property values at server.
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ xResAccess->PROPPATCH( aProppatchValues, xEnv );
+
+ for ( const auto& rProppatchValue : aProppatchValues )
+ {
+ aEvent.PropertyName = rProppatchValue.name;
+ aEvent.OldValue = uno::Any(); // @@@ too expensive to obtain!
+ aEvent.NewValue = rProppatchValue.value;
+
+ aChanges.getArray()[ nChanged ] = aEvent;
+ nChanged++;
+ }
+ }
+ catch ( DAVException const & e )
+ {
+// SAL_WARN( "ucb.ucp.webdav",
+// "Content::setPropertyValues - PROPPATCH failed!" );
+
+#if 1
+ cancelCommandExecution( e, xEnv );
+ // unreachable
+#else
+ // Note: PROPPATCH either sets ALL property values OR NOTHING.
+
+ std::vector< sal_Int32 >::const_iterator it
+ = aProppatchPropsPositions.begin();
+ std::vector< sal_Int32 >::const_iterator end
+ = aProppatchPropsPositions.end();
+
+ while ( it != end )
+ {
+ // Set error.
+ aRet[ (*it) ] <<= MapDAVException( e, true );
+ ++it;
+ }
+#endif
+ }
+ }
+
+ if ( bExchange )
+ {
+ // Assemble new content identifier...
+
+ OUString aNewURL = getParentURL();
+ if ( aNewURL.lastIndexOf( '/' ) != ( aNewURL.getLength() - 1 ) )
+ aNewURL += "/";
+
+ aNewURL += EncodeSegment(aNewTitle);
+
+ uno::Reference< ucb::XContentIdentifier > xNewId
+ = new ::ucbhelper::ContentIdentifier( aNewURL );
+ uno::Reference< ucb::XContentIdentifier > xOldId = xIdentifier;
+
+ try
+ {
+ CurlUri const sourceURI( xOldId->getContentIdentifier() );
+ CurlUri targetURI( xNewId->getContentIdentifier() );
+
+ targetURI.SetScheme( sourceURI.GetScheme() );
+
+ // clean cached value of PROPFIND property names
+ removeCachedPropertyNames( sourceURI.GetURI() );
+ removeCachedPropertyNames( targetURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+ xResAccess->MOVE(
+ sourceURI.GetRelativeReference(), targetURI.GetURI(), false, xEnv );
+
+ // @@@ Should check for resources that could not be moved
+ // (due to source access or target overwrite) and send
+ // this information through the interaction handler.
+
+ // @@@ Existing content should be checked to see if it needs
+ // to be deleted at the source
+
+ // @@@ Existing content should be checked to see if it has
+ // been overwritten at the target
+
+ if ( exchangeIdentity( xNewId ) )
+ {
+ xResAccess->setURL( aNewURL );
+
+// DAV resources store all additional props on server!
+// // Adapt Additional Core Properties.
+// renameAdditionalPropertySet( xOldId->getContentIdentifier(),
+// xNewId->getContentIdentifier(),
+// true );
+ }
+ else
+ {
+ // Do not set new title!
+ aNewTitle.clear();
+
+ // Set error .
+ aRet[ nTitlePos ] <<= uno::Exception(
+ "Exchange failed!",
+ static_cast< cppu::OWeakObject * >( this ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ // Do not set new title!
+ aNewTitle.clear();
+
+ // Set error .
+ aRet[ nTitlePos ] = MapDAVException( e, true );
+ }
+ }
+
+ if ( aNewTitle.getLength() )
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ aEvent.PropertyName = "Title";
+ aEvent.OldValue <<= aOldTitle;
+ aEvent.NewValue <<= aNewTitle;
+
+ m_aEscapedTitle = EncodeSegment(aNewTitle);
+
+ aChanges.getArray()[ nChanged ] = aEvent;
+ nChanged++;
+ }
+
+ if ( nChanged > 0 )
+ {
+ aChanges.realloc( nChanged );
+ notifyPropertiesChange( aChanges );
+ }
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+
+ return aRet;
+}
+
+
+uno::Any Content::open(
+ const ucb::OpenCommandArgument3 & rArg,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ uno::Any aRet;
+
+ bool bOpenFolder = ( ( rArg.Mode == ucb::OpenMode::ALL ) ||
+ ( rArg.Mode == ucb::OpenMode::FOLDERS ) ||
+ ( rArg.Mode == ucb::OpenMode::DOCUMENTS ) );
+ if ( bOpenFolder )
+ {
+ if ( isFolder( xEnv ) )
+ {
+ // Open collection.
+
+ uno::Reference< ucb::XDynamicResultSet > xSet
+ = new DynamicResultSet( m_xContext, this, rArg, xEnv );
+ aRet <<= xSet;
+ }
+ else
+ {
+ // Error: Not a folder!
+
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ lang::IllegalArgumentException(
+ "Non-folder resource cannot be opened as folder! Wrong Open Mode!",
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 ) ),
+ xEnv );
+ // Unreachable
+ }
+ }
+
+ if ( rArg.Sink.is() )
+ {
+ // Open document.
+
+ if ( ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_NONE ) ||
+ ( rArg.Mode == ucb::OpenMode::DOCUMENT_SHARE_DENY_WRITE ) )
+ {
+ // Currently(?) unsupported.
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::UnsupportedOpenModeException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ sal_Int16( rArg.Mode ) ) ),
+ xEnv );
+ // Unreachable
+ }
+
+ uno::Reference< io::XOutputStream > xOut( rArg.Sink, uno::UNO_QUERY );
+ if ( xOut.is() )
+ {
+ // PUSH: write data
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ xResAccess.reset(
+ new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ xResAccess->setFlags( rArg.OpeningFlags );
+ DAVResource aResource;
+ std::vector< OUString > aHeaders;
+
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->GET( xOut, aHeaders, aResource, xEnv );
+ m_bDidGetOrHead = true;
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ // cache headers.
+ if (!m_xCachedProps)
+ m_xCachedProps.reset(
+ new CachableContentProperties( ContentProperties( aResource ) ) );
+ else
+ m_xCachedProps->addProperties( ContentProperties( aResource ) );
+
+ m_xResAccess.reset(
+ new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, xEnv );
+ // Unreachable
+ }
+ }
+ else
+ {
+ uno::Reference< io::XActiveDataSink > xDataSink( rArg.Sink, uno::UNO_QUERY );
+ if ( xDataSink.is() )
+ {
+ // PULL: wait for client read
+ OUString aTargetURL = m_xIdentifier->getContentIdentifier();
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ xResAccess.reset(
+ new DAVResourceAccess( *m_xResAccess ) );
+ }
+ xResAccess->setFlags( rArg.OpeningFlags );
+
+ // fill inputstream sync; return if all data present
+ DAVResource aResource;
+ std::vector< OUString > aHeaders;
+
+ aTargetURL = xResAccess->getURL();
+ removeCachedPropertyNames( aTargetURL );
+ // check if the resource was present on the server
+ // first update it, if necessary
+ // if the open is called directly, without the default open sequence,
+ // e.g. the one used when opening a file looking for properties
+ // first this call will have no effect, since OPTIONS would have already been called
+ // as a consequence of getPropertyValues()
+ DAVOptions aDAVOptions;
+ getResourceOptions( xEnv, aDAVOptions, xResAccess );
+
+ if (aDAVOptions.getHttpResponseStatusCode() != SC_NONE
+ // tdf#148426 fall back to GET in case of 500
+ && aDAVOptions.getHttpResponseStatusCode() != SC_INTERNAL_SERVER_ERROR)
+ {
+ // throws exception as if there was a server error, a DAV exception
+ throw DAVException( DAVException::DAV_HTTP_ERROR,
+ aDAVOptions.getHttpResponseStatusText(),
+ aDAVOptions.getHttpResponseStatusCode() );
+ }
+ uno::Reference< io::XInputStream > xIn
+ = xResAccess->GET( aHeaders, aResource, xEnv );
+ m_bDidGetOrHead = true;
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ // cache headers.
+ if (!m_xCachedProps)
+ m_xCachedProps.reset(
+ new CachableContentProperties( ContentProperties( aResource ) ) );
+ else
+ m_xCachedProps->addProperties(
+ aResource.properties );
+
+ m_xResAccess.reset(
+ new DAVResourceAccess( *xResAccess ) );
+ }
+
+ xDataSink->setInputStream( xIn );
+ }
+ catch ( DAVException const & e )
+ {
+ //TODO cache the http error if not yet cached
+ cancelCommandExecution( e, xEnv );
+ // Unreachable
+ }
+ }
+ else
+ {
+ // Note: aOpenCommand.Sink may contain an XStream
+ // implementation. Support for this type of
+ // sink is optional...
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::UnsupportedDataSinkException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ rArg.Sink ) ),
+ xEnv );
+ // Unreachable
+ }
+ }
+ }
+
+ return aRet;
+}
+
+
+void Content::post(
+ const ucb::PostCommandArgument2 & rArg,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ uno::Reference< io::XActiveDataSink > xSink( rArg.Sink, uno::UNO_QUERY );
+ if ( xSink.is() )
+ {
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ xResAccess.reset(
+ new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ removeCachedPropertyNames( xResAccess->getURL() );
+ uno::Reference< io::XInputStream > xResult
+ = xResAccess->POST( rArg.MediaType,
+ rArg.Referer,
+ rArg.Source,
+ xEnv );
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ m_xResAccess.reset(
+ new DAVResourceAccess( *xResAccess ) );
+ }
+
+ xSink->setInputStream( xResult );
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, xEnv, true );
+ // Unreachable
+ }
+ }
+ else
+ {
+ uno::Reference< io::XOutputStream > xResult( rArg.Sink, uno::UNO_QUERY );
+ if ( xResult.is() )
+ {
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ xResAccess.reset(
+ new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->POST( rArg.MediaType,
+ rArg.Referer,
+ rArg.Source,
+ xResult,
+ xEnv );
+
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ m_xResAccess.reset(
+ new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, xEnv, true );
+ // Unreachable
+ }
+ }
+ else
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::UnsupportedDataSinkException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ rArg.Sink ) ),
+ xEnv );
+ // Unreachable
+ }
+ }
+}
+
+
+void Content::queryChildren( ContentRefList& rChildren )
+{
+ // Obtain a list with a snapshot of all currently instantiated contents
+ // from provider and extract the contents which are direct children
+ // of this content.
+
+ ::ucbhelper::ContentRefList aAllContents;
+ m_xProvider->queryExistingContents( aAllContents );
+
+ OUString aURL = m_xIdentifier->getContentIdentifier();
+ sal_Int32 nURLPos = aURL.lastIndexOf( '/' );
+
+ if ( nURLPos != ( aURL.getLength() - 1 ) )
+ {
+ // No trailing slash found. Append.
+ aURL += "/";
+ }
+
+ sal_Int32 nLen = aURL.getLength();
+
+ for ( const auto& rChild : aAllContents )
+ {
+ ::ucbhelper::ContentImplHelperRef xChild = rChild;
+ OUString aChildURL
+ = xChild->getIdentifier()->getContentIdentifier();
+
+ // Is aURL a prefix of aChildURL?
+ if ( ( aChildURL.getLength() > nLen ) &&
+ ( aChildURL.startsWith( aURL ) ) )
+ {
+ sal_Int32 nPos = nLen;
+ nPos = aChildURL.indexOf( '/', nPos );
+
+ if ( ( nPos == -1 ) ||
+ ( nPos == ( aChildURL.getLength() - 1 ) ) )
+ {
+ // No further slashes / only a final slash. It's a child!
+ rChildren.push_back(
+ ::http_dav_ucp::Content::ContentRef(
+ static_cast< ::http_dav_ucp::Content * >(
+ xChild.get() ) ) );
+ }
+ }
+ }
+}
+
+
+void Content::insert(
+ const uno::Reference< io::XInputStream > & xInputStream,
+ bool bReplaceExisting,
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+ bool bTransient, bCollection;
+ OUString aEscapedTitle;
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ bTransient = m_bTransient;
+ bCollection = m_bCollection;
+ aEscapedTitle = m_aEscapedTitle;
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ // Check, if all required properties are present.
+
+ if ( aEscapedTitle.isEmpty() )
+ {
+ SAL_WARN( "ucb.ucp.webdav", "Content::insert - Title missing!" );
+
+ uno::Sequence<OUString> aProps { "Title" };
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( ucb::MissingPropertiesException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ aProps ) ),
+ Environment );
+ // Unreachable
+ }
+
+ if ( !bReplaceExisting )
+ {
+ /* [RFC 2616] - HTTP
+
+ The PUT method requests that the enclosed entity be stored under the
+ supplied Request-URI. If the Request-URI refers to an already
+ existing resource, the enclosed entity SHOULD be considered as a
+ modified version of the one residing on the origin server.
+ */
+
+ /* [RFC 2518] - WebDAV
+
+ MKCOL creates a new collection resource at the location specified by
+ the Request-URI. If the resource identified by the Request-URI is
+ non-null then the MKCOL MUST fail.
+ */
+
+ // ==> Complain on PUT, continue on MKCOL.
+ if ( !bTransient || !bCollection )
+ {
+#undef ERROR
+ ucb::UnsupportedNameClashException aEx(
+ "Unable to write without overwrite!",
+ static_cast< cppu::OWeakObject * >( this ),
+ ucb::NameClash::ERROR );
+
+ uno::Reference< task::XInteractionHandler > xIH;
+
+ if ( Environment.is() )
+ xIH = Environment->getInteractionHandler();
+
+ if ( xIH.is() )
+ {
+ uno::Any aExAsAny( uno::makeAny( aEx ) );
+
+ rtl::Reference< ucbhelper::SimpleInteractionRequest > xRequest
+ = new ucbhelper::SimpleInteractionRequest(
+ aExAsAny,
+ ContinuationFlags::Approve
+ | ContinuationFlags::Disapprove );
+ xIH->handle( xRequest.get() );
+
+ const ContinuationFlags nResp = xRequest->getResponse();
+
+ switch ( nResp )
+ {
+ case ContinuationFlags::NONE:
+ // Not handled; throw.
+ throw aEx;
+// break;
+
+ case ContinuationFlags::Approve:
+ // Continue -> Overwrite.
+ bReplaceExisting = true;
+ break;
+
+ case ContinuationFlags::Disapprove:
+ // Abort.
+ throw ucb::CommandFailedException(
+ OUString(),
+ uno::Reference< uno::XInterface >(),
+ aExAsAny );
+// break;
+
+ default:
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::insert - "
+ "Unknown interaction selection!" );
+ throw ucb::CommandFailedException(
+ "Unknown interaction selection!",
+ uno::Reference< uno::XInterface >(),
+ aExAsAny );
+// break;
+ }
+ }
+ else
+ {
+ // No IH; throw.
+ throw aEx;
+ }
+ }
+ }
+
+ if ( bTransient )
+ {
+ // Assemble new content identifier...
+ OUString aURL = getParentURL();
+ if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) )
+ aURL += "/";
+
+ aURL += aEscapedTitle;
+
+ try
+ {
+ xResAccess->setURL( aURL );
+
+ if ( bCollection )
+ {
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->MKCOL( Environment );
+ }
+ else
+ {
+ // remove options from cache, PUT may change it
+ // it will be refreshed when needed
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->PUT( xInputStream, Environment );
+ // clean cached value of PROPFIND properties names
+ }
+ // no error , set the resourcetype to unknown type
+ // the resource may have transitioned from NOT FOUND or UNKNOWN to something else
+ // depending on the server behaviour
+ // this will force a recheck of the resource type
+ m_eResourceType = UNKNOWN;
+ m_eResourceTypeForLocks = UNKNOWN;
+ }
+ catch ( DAVException const & except )
+ {
+ if ( bCollection )
+ {
+ if ( except.getStatus() == SC_METHOD_NOT_ALLOWED )
+ {
+ // [RFC 2518] - WebDAV
+ // 405 (Method Not Allowed) - MKCOL can only be
+ // executed on a deleted/non-existent resource.
+
+ if ( bReplaceExisting )
+ {
+ // Destroy old resource.
+ try
+ {
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->DESTROY( Environment );
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, Environment, true );
+ // Unreachable
+ }
+
+ // Insert (recursion!).
+ insert( xInputStream, bReplaceExisting, Environment );
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset(
+ new DAVResourceAccess( *xResAccess ) );
+ }
+
+ // Success!
+ return;
+ }
+ else
+ {
+ OUString aTitle;
+ try
+ {
+ CurlUri const aURI( aURL );
+ aTitle = aURI.GetPathBaseNameUnescaped();
+ }
+ catch ( DAVException const & )
+ {
+ }
+
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::NameClashException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aTitle ) ),
+ Environment );
+ // Unreachable
+ }
+ }
+ }
+
+ cancelCommandExecution( except, Environment, true );
+ // Unreachable
+ }
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xIdentifier
+ = new ::ucbhelper::ContentIdentifier( aURL );
+ }
+
+ inserted();
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_bTransient = false;
+ }
+ }
+ else
+ {
+ if ( !xInputStream.is() )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::MissingInputStreamException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ) ) ),
+ Environment );
+ // Unreachable
+ }
+
+ // save the URL since it may change due to redirection
+ OUString aTargetUrl = xResAccess->getURL();
+ try
+ {
+ removeCachedPropertyNames( xResAccess->getURL() );
+ // remove options from cache, PUT may change it
+ // it will be refreshed when needed
+ aStaticDAVOptionsCache.removeDAVOptions( aTargetUrl );
+ xResAccess->PUT( xInputStream, Environment );
+ }
+ catch ( DAVException const & e )
+ {
+ cancelCommandExecution( e, Environment, true );
+ // Unreachable
+ }
+ }
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+}
+
+
+void Content::transfer(
+ const ucb::TransferInfo & rArgs,
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+ uno::Reference< uno::XComponentContext > xContext;
+ uno::Reference< ucb::XContentIdentifier > xIdentifier;
+ uno::Reference< ucb::XContentProvider > xProvider;
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ xContext.set( m_xContext );
+ xIdentifier.set( m_xIdentifier );
+ xProvider.set( m_xProvider.get() );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ OUString aTargetURI;
+ try
+ {
+ CurlUri sourceURI( rArgs.SourceURL );
+ CurlUri targetURI( xIdentifier->getContentIdentifier() );
+
+ aTargetURI = targetURI.GetPathBaseNameUnescaped();
+
+ // Check source's and target's URL scheme
+
+ OUString aScheme = sourceURI.GetScheme().toAsciiLowerCase();
+ if ( aScheme == VNDSUNSTARWEBDAV_URL_SCHEME)
+ {
+ sourceURI.SetScheme( HTTP_URL_SCHEME );
+ }
+ else if ( aScheme == VNDSUNSTARWEBDAVS_URL_SCHEME)
+ {
+ sourceURI.SetScheme( HTTPS_URL_SCHEME );
+ }
+ else if ( aScheme == DAV_URL_SCHEME )
+ {
+ sourceURI.SetScheme( HTTP_URL_SCHEME );
+ }
+ else if ( aScheme == DAVS_URL_SCHEME )
+ {
+ sourceURI.SetScheme( HTTPS_URL_SCHEME );
+ }
+ else if (aScheme == WEBDAV_URL_SCHEME)
+ {
+ sourceURI.SetScheme(HTTP_URL_SCHEME);
+ }
+ else if (aScheme == WEBDAVS_URL_SCHEME)
+ {
+ sourceURI.SetScheme(HTTPS_URL_SCHEME);
+ }
+ else
+ {
+ if ( aScheme != HTTP_URL_SCHEME && aScheme != HTTPS_URL_SCHEME )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::InteractiveBadTransferURLException(
+ "Unsupported URL scheme!",
+ static_cast< cppu::OWeakObject * >( this ) ) ),
+ Environment );
+ // Unreachable
+ }
+ }
+
+ aScheme = targetURI.GetScheme().toAsciiLowerCase();
+ if ( aScheme == VNDSUNSTARWEBDAV_URL_SCHEME)
+ targetURI.SetScheme( HTTP_URL_SCHEME );
+ else if ( aScheme == VNDSUNSTARWEBDAVS_URL_SCHEME)
+ targetURI.SetScheme( HTTPS_URL_SCHEME );
+ else if ( aScheme == DAV_URL_SCHEME )
+ targetURI.SetScheme( HTTP_URL_SCHEME );
+ else if ( aScheme == DAVS_URL_SCHEME )
+ targetURI.SetScheme( HTTPS_URL_SCHEME );
+ else if (aScheme == WEBDAV_URL_SCHEME)
+ targetURI.SetScheme(HTTP_URL_SCHEME);
+ else if (aScheme == WEBDAVS_URL_SCHEME)
+ targetURI.SetScheme(HTTPS_URL_SCHEME);
+
+ // @@@ This implementation of 'transfer' only works
+ // if the source and target are located at same host.
+ // (Neon does not support cross-server copy/move)
+
+ // Check for same host
+
+ if ( sourceURI.GetHost().getLength() &&
+ ( sourceURI.GetHost() != targetURI.GetHost() ) )
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny( ucb::InteractiveBadTransferURLException(
+ "Different hosts!",
+ static_cast< cppu::OWeakObject * >( this ) ) ),
+ Environment );
+ // Unreachable
+ }
+
+ OUString aTitle = rArgs.NewTitle;
+
+ if ( aTitle.isEmpty() )
+ aTitle = sourceURI.GetPathBaseNameUnescaped();
+
+ if ( aTitle == "/" )
+ {
+ // kso: ???
+ aTitle.clear();
+ }
+
+ targetURI.AppendPath( aTitle );
+
+ OUString aTargetURL = xIdentifier->getContentIdentifier();
+ if ( ( aTargetURL.lastIndexOf( '/' ) + 1 )
+ != aTargetURL.getLength() )
+ aTargetURL += "/";
+
+ aTargetURL += aTitle;
+
+ uno::Reference< ucb::XContentIdentifier > xTargetId
+ = new ::ucbhelper::ContentIdentifier( aTargetURL );
+
+ DAVResourceAccess aSourceAccess( xContext,
+ xResAccess->getSessionFactory(),
+ sourceURI.GetURI() );
+
+ if ( rArgs.MoveData )
+ {
+ uno::Reference< ucb::XContentIdentifier > xId
+ = new ::ucbhelper::ContentIdentifier( rArgs.SourceURL );
+
+ // Note: The static cast is okay here, because its sure that
+ // xProvider is always the WebDAVContentProvider.
+ rtl::Reference< Content > xSource
+ = static_cast< Content * >(
+ xProvider->queryContent( xId ).get() );
+
+ // [RFC 2518] - WebDAV
+ // If a resource exists at the destination and the Overwrite
+ // header is "T" then prior to performing the move the server
+ // MUST perform a DELETE with "Depth: infinity" on the
+ // destination resource. If the Overwrite header is set to
+ // "F" then the operation will fail.
+
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+ aSourceAccess.MOVE( sourceURI.GetRelativeReference(),
+ targetURI.GetURI(),
+ rArgs.NameClash
+ == ucb::NameClash::OVERWRITE,
+ Environment );
+
+ if ( xSource.is() )
+ {
+ // Propagate destruction to listeners.
+ xSource->destroy( true );
+ }
+
+// DAV resources store all additional props on server!
+// // Rename own and all children's Additional Core Properties.
+// renameAdditionalPropertySet( xId->getContentIdentifier(),
+// xTargetId->getContentIdentifier(),
+// true );
+ }
+ else
+ {
+ // [RFC 2518] - WebDAV
+ // If a resource exists at the destination and the Overwrite
+ // header is "T" then prior to performing the copy the server
+ // MUST perform a DELETE with "Depth: infinity" on the
+ // destination resource. If the Overwrite header is set to
+ // "F" then the operation will fail.
+
+ aStaticDAVOptionsCache.removeDAVOptions( sourceURI.GetURI() );
+ aStaticDAVOptionsCache.removeDAVOptions( targetURI.GetURI() );
+ aSourceAccess.COPY( sourceURI.GetRelativeReference(),
+ targetURI.GetURI(),
+ rArgs.NameClash
+ == ucb::NameClash::OVERWRITE,
+ Environment );
+
+// DAV resources store all additional props on server!
+// // Copy own and all children's Additional Core Properties.
+// copyAdditionalPropertySet( xId->getContentIdentifier(),
+// xTargetId->getContentIdentifier(),
+// true );
+ }
+
+ // Note: The static cast is okay here, because its sure that
+ // xProvider is always the WebDAVContentProvider.
+ rtl::Reference< Content > xTarget
+ = static_cast< Content * >(
+ xProvider->queryContent( xTargetId ).get() );
+
+ // Announce transferred content in its new folder.
+ xTarget->inserted();
+ }
+ catch ( ucb::IllegalIdentifierException const & )
+ {
+ // queryContent
+ }
+ catch ( DAVException const & e )
+ {
+ // [RFC 2518] - WebDAV
+ // 412 (Precondition Failed) - The server was unable to maintain
+ // the liveness of the properties listed in the propertybehavior
+ // XML element or the Overwrite header is "F" and the state of
+ // the destination resource is non-null.
+
+ if ( e.getStatus() == SC_PRECONDITION_FAILED )
+ {
+ switch ( rArgs.NameClash )
+ {
+ case 0/*ucb::NameClash::ERROR*/:
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::NameClashException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aTargetURI ) ),
+ Environment );
+ // Unreachable
+ }
+ [[fallthrough]];
+
+ case ucb::NameClash::OVERWRITE:
+ break;
+
+ case ucb::NameClash::KEEP: // deprecated
+ case ucb::NameClash::RENAME:
+ case ucb::NameClash::ASK:
+ default:
+ {
+ ucbhelper::cancelCommandExecution(
+ uno::makeAny(
+ ucb::UnsupportedNameClashException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ rArgs.NameClash ) ),
+ Environment );
+ // Unreachable
+ }
+ }
+ }
+
+ cancelCommandExecution( e, Environment, true );
+ // Unreachable
+ }
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+}
+
+
+void Content::destroy( bool bDeletePhysical )
+{
+ // @@@ take care about bDeletePhysical -> trashcan support
+
+ uno::Reference< ucb::XContent > xThis = this;
+
+ deleted();
+
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ // Process instantiated children...
+
+ ::http_dav_ucp::Content::ContentRefList aChildren;
+ queryChildren( aChildren );
+
+ for ( auto& rChild : aChildren )
+ {
+ rChild->destroy( bDeletePhysical );
+ }
+}
+
+// returns the resource type, to be checked for locks
+Content::ResourceType Content::resourceTypeForLocks(
+ const uno::Reference< ucb::XCommandEnvironment >& Environment,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess)
+{
+ ResourceType eResourceTypeForLocks = UNKNOWN;
+ {
+ osl::MutexGuard g(m_aMutex);
+ //check if cache contains what we need, usually the first PROPFIND on the URI has supported lock
+ std::unique_ptr< ContentProperties > xProps;
+ if (m_xCachedProps)
+ {
+ uno::Sequence< ucb::LockEntry > aSupportedLocks;
+ if ( m_xCachedProps->getValue( DAVProperties::SUPPORTEDLOCK )
+ >>= aSupportedLocks ) //get the cached value for supportedlock
+ {
+ for ( sal_Int32 n = 0; n < aSupportedLocks.getLength(); ++n )
+ {
+ if ( aSupportedLocks[ n ].Scope
+ == ucb::LockScope_EXCLUSIVE &&
+ aSupportedLocks[ n ].Type
+ == ucb::LockType_WRITE )
+ eResourceTypeForLocks = DAV;
+ }
+ }
+ }
+ }
+
+ const OUString & rURL = m_xIdentifier->getContentIdentifier();
+
+ if ( eResourceTypeForLocks == UNKNOWN )
+ {
+ // resource type for lock/unlock operations still unknown, need to ask the server
+
+ //{
+ DAVOptions aDAVOptions;
+ getResourceOptions( Environment, aDAVOptions, rResAccess );
+ if( aDAVOptions.isClass1() ||
+ aDAVOptions.isClass2() ||
+ aDAVOptions.isClass3() )
+ {
+ // this is at least a DAV, lock to be confirmed
+ // class 2 is needed for full lock support
+ // see
+ // <https://tools.ietf.org/html/rfc4918#section-18.2>
+ eResourceTypeForLocks = DAV_NOLOCK;
+ if( aDAVOptions.isClass2() )
+ {
+ // ok, possible lock, check for it
+ try
+ {
+ // we need only DAV:supportedlock
+ std::vector< DAVResource > resources;
+ std::vector< OUString > aPropNames;
+ uno::Sequence< beans::Property > aProperties( 1 );
+ aProperties.getArray()[ 0 ].Name = DAVProperties::SUPPORTEDLOCK;
+
+ ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames );
+ rResAccess->PROPFIND( DAVZERO, aPropNames, resources, Environment );
+
+ bool wasSupportedlockFound = false;
+
+ // only one resource should be returned
+ if ( resources.size() == 1 )
+ {
+ // we may have received a bunch of other properties
+ // (some servers seems to do so)
+ // but we need only supported lock for this check
+ // all returned properties are in
+ // resources.properties[n].Name/.Value
+
+ std::vector< DAVPropertyValue >::iterator it;
+
+ for ( it = resources[0].properties.begin();
+ it != resources[0].properties.end(); ++it)
+ {
+ if ( (*it).Name == DAVProperties::SUPPORTEDLOCK )
+ {
+ wasSupportedlockFound = true;
+ uno::Sequence< ucb::LockEntry > aSupportedLocks;
+ if ( (*it).Value >>= aSupportedLocks )
+ {
+ for ( sal_Int32 n = 0; n < aSupportedLocks.getLength(); ++n )
+ {
+ // TODO: if the lock type is changed from 'exclusive write' to 'shared write'
+ // e.g. to implement 'Calc shared file feature', the ucb::LockScope_EXCLUSIVE
+ // value should be checked as well, adaptation the code may be needed
+ if ( aSupportedLocks[ n ].Scope == ucb::LockScope_EXCLUSIVE &&
+ aSupportedLocks[ n ].Type == ucb::LockType_WRITE )
+ {
+ // requested locking mode is supported
+ eResourceTypeForLocks = DAV;
+ SAL_INFO( "ucb.ucp.webdav", "resourceTypeForLocks - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV lock/unlock supported");
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+ }
+ else
+ {
+ // PROPFIND failed; check if HEAD contains Content-Disposition: attachment (RFC1806, HTTP/1.1 19.5.1),
+ // which supposedly means no lock for the resource (happens e.g. with SharePoint exported lists)
+ OUString sContentDisposition;
+ // First, check cached properties
+ if (m_xCachedProps)
+ {
+ if ((m_xCachedProps->getValue("Content-Disposition") >>= sContentDisposition)
+ && sContentDisposition.startsWithIgnoreAsciiCase("attachment"))
+ {
+ eResourceTypeForLocks = DAV_NOLOCK;
+ wasSupportedlockFound = true;
+ }
+ }
+ // If no data in cache, try HEAD request
+ if (sContentDisposition.isEmpty() && !m_bDidGetOrHead) try
+ {
+ DAVResource resource;
+ GetPropsUsingHeadRequest(resource, rResAccess, {"Content-Disposition"}, Environment);
+ m_bDidGetOrHead = true;
+ for (const auto& it : resource.properties)
+ {
+ if (it.Name.equalsIgnoreAsciiCase("Content-Disposition"))
+ {
+ if ((it.Value >>= sContentDisposition) && sContentDisposition.equalsIgnoreAsciiCase("attachment"))
+ {
+ eResourceTypeForLocks = DAV_NOLOCK;
+ wasSupportedlockFound = true;
+ }
+ break;
+ }
+ }
+ }
+ catch (...){}
+ }
+ // check if this is still only a DAV_NOLOCK
+ // a fallback for resources that do not have DAVProperties::SUPPORTEDLOCK property
+ // we check for the returned OPTION if LOCK is allowed on the resource
+ if ( !wasSupportedlockFound && eResourceTypeForLocks == DAV_NOLOCK )
+ {
+ SAL_INFO( "ucb.ucp.webdav", "This WebDAV server has no supportedlock property, check for allowed LOCK method in OPTIONS" );
+ // ATTENTION: if the lock type is changed from 'exclusive write' to 'shared write'
+ // e.g. to implement 'Calc shared file feature' on WebDAV directly, and we arrive to this fallback
+ // and the LOCK is allowed, we should assume that only exclusive write lock is available
+ // this is just a reminder...
+ if ( aDAVOptions.isLockAllowed() )
+ eResourceTypeForLocks = DAV;
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ rResAccess->resetUri();
+ //grab the error code
+ switch( e.getStatus() )
+ {
+ case SC_NOT_FOUND:
+ SAL_WARN( "ucb.ucp.webdav", "resourceTypeForLocks() - URL: <"
+ << m_xIdentifier->getContentIdentifier() << "> was not found. ");
+ eResourceTypeForLocks = NOT_FOUND;
+ break;
+ // some servers returns SC_FORBIDDEN, instead
+ // the meaning of SC_FORBIDDEN is, according to <http://tools.ietf.org/html/rfc7231#section-6.5.3>:
+ // The 403 (Forbidden) status code indicates that the server understood
+ // the request but refuses to authorize it
+ case SC_FORBIDDEN:
+ // Errors SC_NOT_IMPLEMENTED and SC_METHOD_NOT_ALLOWED are
+ // part of base http 1.1 RFCs
+ case SC_NOT_IMPLEMENTED: // <http://tools.ietf.org/html/rfc7231#section-6.6.2>
+ case SC_METHOD_NOT_ALLOWED: // <http://tools.ietf.org/html/rfc7231#section-6.5.5>
+ // they all mean the resource is NON_DAV
+ SAL_WARN( "ucb.ucp.webdav", "resourceTypeForLocks() DAVException (SC_FORBIDDEN, SC_NOT_IMPLEMENTED or SC_METHOD_NOT_ALLOWED) - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ eResourceTypeForLocks = NON_DAV;
+ break;
+ default:
+ //fallthrough
+ SAL_WARN( "ucb.ucp.webdav", "resourceTypeForLocks() DAVException - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ eResourceTypeForLocks = UNKNOWN;
+ }
+ }
+ }
+ }
+ else
+ eResourceTypeForLocks = NON_DAV;
+
+ //}
+ }
+ osl::MutexGuard g(m_aMutex);
+ if (m_eResourceTypeForLocks == UNKNOWN)
+ {
+ m_eResourceTypeForLocks = eResourceTypeForLocks;
+ }
+ else
+ {
+ SAL_WARN_IF(
+ eResourceTypeForLocks != m_eResourceTypeForLocks, "ucb.ucp.webdav",
+ "different resource types for <" << rURL << ">: "
+ << +eResourceTypeForLocks << " vs. " << +m_eResourceTypeForLocks);
+ }
+ SAL_INFO( "ucb.ucp.webdav", "resourceTypeForLocks() - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, m_eResourceTypeForLocks: " << m_eResourceTypeForLocks );
+ return m_eResourceTypeForLocks;
+}
+
+Content::ResourceType Content::resourceTypeForLocks(
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ Content::ResourceType ret = resourceTypeForLocks( Environment, xResAccess );
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ return ret;
+}
+
+void Content::lock(
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+// prepare aURL to be used in exception, see below
+ OUString aURL;
+ if ( m_bTransient )
+ {
+ aURL = getParentURL();
+ if ( aURL.lastIndexOf('/') != ( aURL.getLength() - 1 ) )
+ aURL += "/";
+
+ aURL += m_aEscapedTitle;
+ }
+ else
+ {
+ aURL = m_xIdentifier->getContentIdentifier();
+ }
+
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ uno::Any aOwnerAny;
+ OUString const user(officecfg::Office::Common::Save::Document::UseUserData::get()
+ ? " - " + ::svt::LockFileCommon::GetOOOUserName()
+ : OUString());
+ aOwnerAny <<= OUString("LibreOffice" + user);
+
+ ucb::Lock aLock(
+ ucb::LockScope_EXCLUSIVE,
+ ucb::LockType_WRITE,
+ ucb::LockDepth_ZERO,
+ aOwnerAny,
+ 180, // lock timeout in secs
+ //-1, // infinite lock
+ uno::Sequence< OUString >() );
+
+ // OPTIONS may change as a consequence of the lock operation
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->LOCK( aLock, Environment );
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ // check if the exception thrown is 'already locked'
+ // this exception is mapped directly to the ucb correct one, without
+ // going into the cancelCommandExecution() user interaction
+ // this exception should be managed by the issuer of 'lock' command
+ switch( e.getError() )
+ {
+ case DAVException::DAV_LOCKED:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "lock(): resource already locked - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">");
+ throw
+ ucb::InteractiveLockingLockedException(
+ "Locked!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aURL,
+ false );
+ }
+ break;
+ case DAVException::DAV_HTTP_NOAUTH:
+ case DAVException::DAV_HTTP_AUTH:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "lock(): DAVException Authentication error - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">" );
+ // DAVException::DAV_HTTP_AUTH exception can mean:
+ // - interaction handler for credential management not present (happens, depending
+ // on the LO framework processing)
+ // - the remote site is a WebDAV with special configuration: read/only for read operations
+ // and read/write for write operations, the user is not allowed to lock/write and
+ // she cancelled the credentials request.
+ // this is not actually an error, but the exception is sent directly from here, avoiding the automatic
+ // management that takes part in cancelCommandExecution() below
+ // Unfortunately there is no InteractiveNetwork*Exception available to signal this
+ // since it mostly happens on read/only part of webdav, this appears to be the most correct exception available
+ throw
+ ucb::InteractiveNetworkWriteException(
+ "Authentication error while trying to lock! Write only WebDAV perhaps?",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ e.getData() );
+ }
+ break;
+ case DAVException::DAV_HTTP_ERROR:
+ //grab the error code
+ switch( e.getStatus() )
+ {
+ // The 'case SC_NOT_FOUND' just below tries to solve a problem in eXo Platform
+ // WebDAV connector which apparently fail on resource first creation
+ // rfc4918 section-7.3 (see link below)
+ case SC_NOT_FOUND: // <http://tools.ietf.org/html/rfc7231#section-6.5.4>
+ // The 'case SC_PRECONDITION_FAILED' just below tries to solve a problem
+ // in SharePoint when locking the resource on first creation fails due to this:
+ // <https://msdn.microsoft.com/en-us/library/jj575265%28v=office.12%29.aspx#id15>
+ // (retrieved on 2015-08-14)
+ case SC_PRECONDITION_FAILED: // <http://tools.ietf.org/html/rfc7232#section-4.2>
+ // Errors SC_NOT_IMPLEMENTED and SC_METHOD_NOT_ALLOWED are
+ // part of base http 1.1 RFCs
+ case SC_NOT_IMPLEMENTED: // <http://tools.ietf.org/html/rfc7231#section-6.6.2>
+ case SC_METHOD_NOT_ALLOWED: // <http://tools.ietf.org/html/rfc7231#section-6.5.5>
+ SAL_WARN( "ucb.ucp.webdav", "lock() DAVException (SC_NOT_FOUND, SC_PRECONDITION_FAILED, SC_NOT_IMPLEMENTED or SC_METHOD_NOT_ALLOWED) - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ // act as nothing happened
+ // that's because when a resource is first created
+ // the lock is sent before the put, so the resource
+ // is actually created by LOCK, locking it before
+ // the first PUT, but if LOCK is not supported
+ // (simple web or DAV with lock disabled) we end with one of these http
+ // errors.
+ // These same errors may be reported when the LOCK on an unmapped
+ // (i.e. non existent) resource is not implemented.
+ // Detailed specification in:
+ // <http://tools.ietf.org/html/rfc4918#section-7.3>
+ return;
+ break;
+ default:
+ //fallthrough
+ ;
+ }
+ break;
+ case DAVException::DAV_LOCKED_SELF:
+ // we already hold the lock and it is in our internal lockstore
+ // just return as if the lock was successful
+ return;
+ break;
+ default:
+ //fallthrough
+ ;
+ }
+
+ SAL_WARN( "ucb.ucp.webdav","lock() DAVException - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ cancelCommandExecution( e, Environment, false );
+ // Unreachable
+ }
+}
+
+
+void Content::unlock(
+ const uno::Reference< ucb::XCommandEnvironment >& Environment )
+{
+
+ try
+ {
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+
+ // check if the target URL is a Class1 DAV
+ DAVOptions aDAVOptions;
+ getResourceOptions( Environment, aDAVOptions, xResAccess );
+
+ // at least class one is needed
+ if( aDAVOptions.isClass1() )
+ {
+ // remove options from cache, unlock may change it
+ // it will be refreshed when needed
+ aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
+ // clean cached value of PROPFIND properties names
+ removeCachedPropertyNames( xResAccess->getURL() );
+ xResAccess->UNLOCK( Environment );
+ }
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ }
+ catch ( DAVException const & e )
+ {
+ switch( e.getError() )
+ {
+ case DAVException::DAV_NOT_LOCKED:
+ SAL_WARN( "ucb.ucp.webdav", "unlock(): DAVException::DAV_NOT_LOCKED - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">");
+ // means that we don't own any lock on this resource
+ // intercepted here to remove a confusing indication to the user
+ // unfortunately this happens in some WebDAV server configuration
+ // acting as WebDAV and having lock/unlock enabled only
+ // for authorized user.
+ return;
+ case DAVException::DAV_HTTP_ERROR:
+ //grab the error code
+ switch( e.getStatus() )
+ {
+ // Errors SC_NOT_IMPLEMENTED and SC_METHOD_NOT_ALLOWED are
+ // part of base http 1.1 RFCs
+ case SC_NOT_IMPLEMENTED: // <http://tools.ietf.org/html/rfc7231#section-6.6.2>
+ case SC_METHOD_NOT_ALLOWED: // <http://tools.ietf.org/html/rfc7231#section-6.5.5>
+ SAL_WARN( "ucb.ucp.webdav", "unlock() DAVException (SC_NOT_IMPLEMENTED or SC_METHOD_NOT_ALLOWED) - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ return;
+ default:
+ //fallthrough
+ ;
+ }
+ break;
+ default:
+ //fallthrough
+ ;
+ }
+ SAL_WARN( "ucb.ucp.webdav","unlock() DAVException - URL: <"
+ << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+ cancelCommandExecution( e, Environment, false );
+ // Unreachable
+ }
+}
+
+
+bool Content::exchangeIdentity(
+ const uno::Reference< ucb::XContentIdentifier >& xNewId )
+{
+ if ( !xNewId.is() )
+ return false;
+
+ osl::ClearableGuard< osl::Mutex > aGuard( m_aMutex );
+
+ uno::Reference< ucb::XContent > xThis = this;
+
+ // Already persistent?
+ if ( m_bTransient )
+ {
+ SAL_WARN( "ucb.ucp.webdav", "Content::exchangeIdentity - Not persistent!" );
+ return false;
+ }
+
+ // Exchange own identity.
+
+ // Fail, if a content with given id already exists.
+// if ( !hasData( xNewId ) )
+ {
+ OUString aOldURL = m_xIdentifier->getContentIdentifier();
+
+ aGuard.clear();
+ if ( exchange( xNewId ) )
+ {
+ // Process instantiated children...
+
+ ContentRefList aChildren;
+ queryChildren( aChildren );
+
+ for ( const auto& rChild : aChildren )
+ {
+ ContentRef xChild = rChild;
+
+ // Create new content identifier for the child...
+ uno::Reference< ucb::XContentIdentifier >
+ xOldChildId = xChild->getIdentifier();
+ OUString aOldChildURL
+ = xOldChildId->getContentIdentifier();
+ OUString aNewChildURL
+ = aOldChildURL.replaceAt(
+ 0,
+ aOldURL.getLength(),
+ xNewId->getContentIdentifier() );
+ uno::Reference< ucb::XContentIdentifier > xNewChildId
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
+
+ if ( !xChild->exchangeIdentity( xNewChildId ) )
+ return false;
+ }
+ return true;
+ }
+ }
+
+ SAL_WARN( "ucb.ucp.webdav",
+ "Content::exchangeIdentity - "
+ "Panic! Cannot exchange identity!" );
+ return false;
+}
+
+
+bool Content::isFolder(
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+
+ if ( m_bTransient )
+ return m_bCollection;
+ }
+
+ uno::Sequence< beans::Property > aProperties( 1 );
+ auto pProperties = aProperties.getArray();
+ pProperties[ 0 ].Name = "IsFolder";
+ pProperties[ 0 ].Handle = -1;
+ uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) );
+ if ( xRow.is() )
+ {
+ try
+ {
+ return xRow->getBoolean( 1 );
+ }
+ catch ( sdbc::SQLException const & )
+ {
+ }
+ }
+
+ return false;
+}
+
+
+uno::Any Content::MapDAVException( const DAVException & e, bool bWrite )
+{
+ // Map DAVException...
+ uno::Any aException;
+
+ OUString aURL;
+ if ( m_bTransient )
+ {
+ aURL = getParentURL();
+ if ( aURL.lastIndexOf( '/' ) != ( aURL.getLength() - 1 ) )
+ aURL += "/";
+
+ aURL += m_aEscapedTitle;
+ }
+ else
+ {
+ aURL = m_xIdentifier->getContentIdentifier();
+ }
+
+ switch ( e.getStatus() )
+ {
+ case SC_NOT_FOUND:
+ {
+ uno::Sequence<uno::Any> aArgs{ uno::Any(beans::PropertyValue(
+ "Uri", -1, uno::makeAny(aURL), beans::PropertyState_DIRECT_VALUE)) };
+
+ aException <<=
+ ucb::InteractiveAugmentedIOException(
+ "Not found!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ ucb::IOErrorCode_NOT_EXISTING,
+ aArgs );
+ return aException;
+ }
+ default:
+ break;
+ }
+
+ switch ( e.getError() )
+ {
+ case DAVException::DAV_HTTP_ERROR:
+ {
+ if ( bWrite )
+ aException <<=
+ ucb::InteractiveNetworkWriteException(
+ e.getData(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ e.getData() );
+ else
+ aException <<=
+ ucb::InteractiveNetworkReadException(
+ e.getData(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ e.getData() );
+ break;
+ }
+
+ case DAVException::DAV_HTTP_LOOKUP:
+ aException <<=
+ ucb::InteractiveNetworkResolveNameException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ e.getData() );
+ break;
+
+// @@@ No matching InteractiveNetwork*Exception
+// case DAVException::DAV_HTTP_AUTH:
+// break;
+
+// @@@ No matching InteractiveNetwork*Exception
+// case DAVException::DAV_HTTP_AUTHPROXY:
+// break;
+
+ case DAVException::DAV_HTTP_TIMEOUT:
+ case DAVException::DAV_HTTP_CONNECT:
+ aException <<=
+ ucb::InteractiveNetworkConnectException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ e.getData() );
+ break;
+
+// @@@ No matching InteractiveNetwork*Exception
+// case DAVException::DAV_HTTP_REDIRECT:
+// break;
+
+// @@@ No matching InteractiveNetwork*Exception
+// case DAVException::DAV_SESSION_CREATE:
+// break;
+
+ case DAVException::DAV_INVALID_ARG:
+ aException <<=
+ lang::IllegalArgumentException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ -1 );
+ break;
+
+ case DAVException::DAV_LOCKED:
+#if 1
+ aException <<=
+ ucb::InteractiveLockingLockedException(
+ "Locked!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aURL,
+ false ); // not SelfOwned
+#else
+ {
+ uno::Sequence< uno::Any > aArgs( 1 );
+ aArgs[ 0 ] <<= beans::PropertyValue(
+ OUString("Uri"), -1,
+ uno::makeAny(aURL),
+ beans::PropertyState_DIRECT_VALUE);
+
+ aException <<=
+ ucb::InteractiveAugmentedIOException(
+ OUString( "Locked!" ),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ ucb::IOErrorCode_LOCKING_VIOLATION,
+ aArgs );
+ }
+#endif
+ break;
+
+ case DAVException::DAV_LOCKED_SELF:
+ aException <<=
+ ucb::InteractiveLockingLockedException(
+ "Locked (self)!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aURL,
+ true ); // SelfOwned
+ break;
+
+ case DAVException::DAV_NOT_LOCKED:
+ aException <<=
+ ucb::InteractiveLockingNotLockedException(
+ "Not locked!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aURL );
+ break;
+
+ case DAVException::DAV_LOCK_EXPIRED:
+ aException <<=
+ ucb::InteractiveLockingLockExpiredException(
+ "Lock expired!",
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR,
+ aURL );
+ break;
+
+ default:
+ aException <<=
+ ucb::InteractiveNetworkGeneralException(
+ OUString(),
+ static_cast< cppu::OWeakObject * >( this ),
+ task::InteractionClassification_ERROR );
+ break;
+ }
+
+ return aException;
+}
+
+
+// static
+bool Content::shouldAccessNetworkAfterException( const DAVException & e )
+{
+ if ( ( e.getStatus() == SC_NOT_FOUND ) ||
+ ( e.getStatus() == SC_GONE ) ||
+ ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) ||
+ ( e.getError() == DAVException::DAV_HTTP_LOOKUP ) ||
+ ( e.getError() == DAVException::DAV_HTTP_CONNECT ) ||
+ ( e.getError() == DAVException::DAV_HTTP_NOAUTH ) ||
+ ( e.getError() == DAVException::DAV_HTTP_AUTH ) ||
+ ( e.getError() == DAVException::DAV_HTTP_AUTHPROXY ) )
+ return false;
+
+ return true;
+}
+
+
+void Content::cancelCommandExecution(
+ const DAVException & e,
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv,
+ bool bWrite /* = false */ )
+{
+ ucbhelper::cancelCommandExecution( MapDAVException( e, bWrite ), xEnv );
+ // Unreachable
+}
+
+
+OUString
+Content::getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess )
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ // First, try to obtain value of response header "Content-Location".
+ if (m_xCachedProps)
+ {
+ OUString aLocation;
+ m_xCachedProps->getValue( "Content-Location" ) >>= aLocation;
+ if ( aLocation.getLength() )
+ {
+ try
+ {
+ // Do not use m_xIdentifier->getContentIdentifier() because it
+ // for example does not reflect redirects applied to requests
+ // done using the original URI but m_xResAccess' URI does.
+ return rtl::Uri::convertRelToAbs( rResAccess->getURL(),
+ aLocation );
+ }
+ catch ( rtl::MalformedUriException const & )
+ {
+ }
+ }
+ }
+
+ return rResAccess->getURL();
+}
+
+// resource type is the type of the WebDAV resource
+Content::ResourceType Content::getResourceType(
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ bool * networkAccessAllowed )
+{
+ {
+ osl::MutexGuard g(m_aMutex);
+ if (m_eResourceType != UNKNOWN) {
+ return m_eResourceType;
+ }
+ }
+
+ ResourceType eResourceType = UNKNOWN;
+ DAVOptions aDAVOptions;
+
+ {
+ getResourceOptions( xEnv, aDAVOptions, rResAccess, networkAccessAllowed );
+
+ // at least class one is needed
+ if( aDAVOptions.isClass1() )
+ {
+ try
+ {
+ // Try to fetch some frequently used property value, e.g. those
+ // used when loading documents... along with identifying whether
+ // this is a DAV resource.
+ std::vector< DAVResource > resources;
+ std::vector< OUString > aPropNames;
+ uno::Sequence< beans::Property > aProperties( 5 );
+ auto pProperties = aProperties.getArray();
+ pProperties[ 0 ].Name = "IsFolder";
+ pProperties[ 1 ].Name = "IsDocument";
+ pProperties[ 2 ].Name = "IsReadOnly";
+ pProperties[ 3 ].Name = "MediaType";
+ pProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK;
+
+ ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames );
+
+ rResAccess->PROPFIND( DAVZERO, aPropNames, resources, xEnv );
+
+ if ( resources.size() == 1 )
+ {
+#if defined SAL_LOG_INFO
+ {//debug
+ // print received resources
+ std::vector< DAVPropertyValue >::const_iterator it = resources[0].properties.begin();
+ std::vector< DAVPropertyValue >::const_iterator end = resources[0].properties.end();
+ while ( it != end )
+ {
+ OUString aPropValue;
+ bool bValue;
+ uno::Sequence< ucb::LockEntry > aSupportedLocks;
+ if((*it).Value >>= aPropValue )
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getResourceType) - ret'd prop: " << (*it).Name << ":" << aPropValue );
+ else if( (*it).Value >>= bValue )
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getResourceType) - ret'd prop: " << (*it).Name << ":" <<
+ ( bValue ? "true" : "false" ) );
+ else if( (*it).Value >>= aSupportedLocks )
+ {
+ SAL_INFO( "ucb.ucp.webdav", "PROPFIND (getResourceType) - ret'd prop: " << (*it).Name << ":" );
+ for ( sal_Int32 n = 0; n < aSupportedLocks.getLength(); ++n )
+ {
+ SAL_INFO( "ucb.ucp.webdav","PROPFIND (getResourceType) - supportedlock[" << n <<"]: scope: "
+ << (aSupportedLocks[n].Scope == ucb::LockScope_SHARED ? "shared" : "exclusive")
+ << ", type: "
+ << (aSupportedLocks[n].Type != ucb::LockType_WRITE ? "" : "write") );
+ }
+ }
+ ++it;
+ }
+ }
+#endif
+ osl::MutexGuard g(m_aMutex);
+ m_xCachedProps.reset(
+ new CachableContentProperties( ContentProperties( resources[ 0 ] ) ) );
+ m_xCachedProps->containsAllNames(
+ aProperties, m_aFailedPropNames );
+ }
+ eResourceType = DAV;
+ }
+ catch ( DAVException const & e )
+ {
+ rResAccess->resetUri();
+
+ SAL_WARN( "ucb.ucp.webdav", "Content::getResourceType returned errors, DAV ExceptionCode: " << e.getError() << ", HTTP error: " << e.getStatus() );
+
+ if ( e.getStatus() == SC_METHOD_NOT_ALLOWED )
+ {
+ // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the
+ // resource is NON_DAV
+ eResourceType = NON_DAV;
+ }
+ else if (networkAccessAllowed != nullptr)
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ if ( e.getStatus() == SC_NOT_FOUND )
+ {
+ // arrives here if OPTIONS is still cached for a resource previously available
+ // operate on the OPTIONS cache:
+ // if OPTIONS was not found, do nothing
+ // else OPTIONS returned on a resource not existent (example a server that allows lock on null resource) set
+ // not found and adjust lifetime accordingly
+ DAVOptions aDAVOptionsInner;
+ if (aStaticDAVOptionsCache.getDAVOptions(rResAccess->getURL(), aDAVOptionsInner))
+ {
+ // TODO? get redirected url
+ aDAVOptionsInner.setHttpResponseStatusCode( e.getStatus() );
+ aDAVOptionsInner.setHttpResponseStatusText( e.getData() );
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptionsInner,
+ m_nOptsCacheLifeNotFound );
+ }
+ }
+ // if the two net events below happen, something
+ // is going on to the connection so break the command flow
+ if ( ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) ||
+ ( e.getError() == DAVException::DAV_HTTP_CONNECT ) )
+ {
+ cancelCommandExecution( e, xEnv );
+ // unreachable
+ }
+
+ // cancel command execution is case that no user authentication data has been provided.
+ if ( e.getError() == DAVException::DAV_HTTP_NOAUTH )
+ {
+ cancelCommandExecution( e, uno::Reference< ucb::XCommandEnvironment >() );
+ }
+ }
+ }
+ else
+ {
+ rResAccess->resetUri();
+
+ // first check if the cached error can be mapped to DAVException::DAV_HTTP_TIMEOUT or mapped to DAVException::DAV_HTTP_CONNECT
+ if (aDAVOptions.getHttpResponseStatusCode() == USC_CONNECTION_TIMED_OUT
+ // can't get any reliable info without auth => cancel request
+ || aDAVOptions.getHttpResponseStatusCode() == USC_AUTH_FAILED
+ || aDAVOptions.getHttpResponseStatusCode() == USC_AUTHPROXY_FAILED)
+ {
+ // behave same as DAVException::DAV_HTTP_TIMEOUT or DAVException::DAV_HTTP_CONNECT was thrown
+ try
+ {
+ // extract host name and connection port
+ CurlUri theUri( rResAccess->getURL() );
+ OUString aHostName = theUri.GetHost();
+ sal_Int32 nPort = theUri.GetPort();
+ DAVException::ExceptionCode e{};
+ switch (aDAVOptions.getHttpResponseStatusCode())
+ {
+ case USC_CONNECTION_TIMED_OUT:
+ e = DAVException::DAV_HTTP_TIMEOUT;
+ break;
+ case USC_AUTH_FAILED:
+ e = DAVException::DAV_HTTP_AUTH;
+ break;
+ case USC_AUTHPROXY_FAILED:
+ e = DAVException::DAV_HTTP_AUTHPROXY;
+ break;
+ default:
+ assert(false);
+ }
+ throw DAVException( e,
+ ConnectionEndPointString(aHostName, nPort) );
+ }
+ catch ( DAVException& exp )
+ {
+ cancelCommandExecution( exp, xEnv );
+ }
+ }
+
+ if ( aDAVOptions.getHttpResponseStatusCode() != SC_NOT_FOUND &&
+ aDAVOptions.getHttpResponseStatusCode() != SC_GONE ) // the cached OPTIONS can have SC_GONE
+ {
+ eResourceType = NON_DAV;
+ }
+ else
+ {
+ //resource doesn't exist
+ if ( networkAccessAllowed != nullptr )
+ *networkAccessAllowed = false;
+ }
+ }
+ }
+
+ osl::MutexGuard g(m_aMutex);
+ if (m_eResourceType == UNKNOWN) {
+ m_eResourceType = eResourceType;
+ } else {
+ SAL_WARN_IF(
+ eResourceType != m_eResourceType, "ucb.ucp.webdav",
+ "different resource types for <" << rResAccess->getURL() << ">: "
+ << +eResourceType << " vs. " << +m_eResourceType);
+ }
+ SAL_INFO( "ucb.ucp.webdav", "m_eResourceType for <" << rResAccess->getURL() << ">: " << m_eResourceType );
+ return m_eResourceType;
+}
+
+
+Content::ResourceType Content::getResourceType(
+ const uno::Reference< ucb::XCommandEnvironment >& xEnv )
+{
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ }
+ const Content::ResourceType & ret = getResourceType( xEnv, xResAccess );
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+ m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
+ }
+ return ret;
+}
+
+
+void Content::initOptsCacheLifeTime()
+{
+ // see description in
+ // officecfg/registry/schema/org/openoffice/Inet.xcs
+ // for use of these field values.
+ sal_uInt32 nAtime;
+ nAtime = officecfg::Inet::Settings::OptsCacheLifeImplWeb::get( m_xContext );
+ m_nOptsCacheLifeImplWeb = std::max( sal_uInt32( 0 ),
+ std::min( nAtime, sal_uInt32( 3600 ) ) );
+
+ nAtime = officecfg::Inet::Settings::OptsCacheLifeDAV::get( m_xContext );
+ m_nOptsCacheLifeDAV = std::max( sal_uInt32( 0 ),
+ std::min( nAtime, sal_uInt32( 3600 ) ) );
+
+ nAtime = officecfg::Inet::Settings::OptsCacheLifeDAVLocked::get( m_xContext );
+ m_nOptsCacheLifeDAVLocked = std::max( sal_uInt32( 0 ),
+ std::min( nAtime, sal_uInt32( 3600 ) ) );
+
+ nAtime = officecfg::Inet::Settings::OptsCacheLifeNotImpl::get( m_xContext );
+ m_nOptsCacheLifeNotImpl = std::max( sal_uInt32( 0 ),
+ std::min( nAtime, sal_uInt32( 43200 ) ) );
+
+ nAtime = officecfg::Inet::Settings::OptsCacheLifeNotFound::get( m_xContext );
+ m_nOptsCacheLifeNotFound = std::max( sal_uInt32( 0 ),
+ std::min( nAtime, sal_uInt32( 30 ) ) );
+}
+
+
+void Content::getResourceOptions(
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
+ DAVOptions& rDAVOptions,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ bool * networkAccessAllowed )
+{
+ OUString aRedirURL;
+ OUString aTargetURL = rResAccess->getURL();
+ DAVOptions aDAVOptions;
+ // first check if in cache, if not, then send method to server
+ if ( !aStaticDAVOptionsCache.getDAVOptions( aTargetURL, aDAVOptions ) )
+ {
+ try
+ {
+ rResAccess->OPTIONS( aDAVOptions, xEnv );
+ // IMPORTANT:the correctly implemented server will answer without errors, even if the resource is not present
+ sal_uInt32 nLifeTime = ( aDAVOptions.isClass1() ||
+ aDAVOptions.isClass2() ||
+ aDAVOptions.isClass3() ) ?
+ m_nOptsCacheLifeDAV : // a WebDAV site
+ m_nOptsCacheLifeImplWeb; // a site implementing OPTIONS but
+ // it's not DAV
+ // if resource is locked, will use a
+ // different lifetime
+ if( aDAVOptions.isLocked() )
+ nLifeTime = m_nOptsCacheLifeDAVLocked;
+
+ // check if redirected
+ aRedirURL = rResAccess->getURL();
+ if( aRedirURL == aTargetURL)
+ { // no redirection
+ aRedirURL.clear();
+ }
+ // cache this URL's option
+ aDAVOptions.setURL( aTargetURL );
+ aDAVOptions.setRedirectedURL( aRedirURL );
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ nLifeTime );
+ }
+ catch ( DAVException const & e )
+ {
+ // first, remove from cache, will be added if needed, depending on the error received
+ aStaticDAVOptionsCache.removeDAVOptions( aTargetURL );
+ rResAccess->resetUri();
+
+ aDAVOptions.setURL( aTargetURL );
+ aDAVOptions.setRedirectedURL( aRedirURL );
+ switch( e.getError() )
+ {
+ case DAVException::DAV_HTTP_TIMEOUT:
+ case DAVException::DAV_HTTP_CONNECT:
+ {
+ // something bad happened to the connection
+ // not same as not found, this instead happens when the server doesn't exist or doesn't answer at all
+ // probably a new bit stating 'timed out' should be added to opts var?
+ // in any case abort the command
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: DAV_HTTP_TIMEOUT or DAV_HTTP_CONNECT for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ // cache the internal unofficial status code
+
+ aDAVOptions.setHttpResponseStatusCode( USC_CONNECTION_TIMED_OUT );
+ // used only internally, so the text doesn't really matter..
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotFound );
+ if ( networkAccessAllowed != nullptr )
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ }
+ break;
+ case DAVException::DAV_HTTP_LOOKUP:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: DAV_HTTP_LOOKUP for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ aDAVOptions.setHttpResponseStatusCode( USC_LOOKUP_FAILED );
+ // used only internally, so the text doesn't really matter..
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotFound );
+ if ( networkAccessAllowed != nullptr )
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ }
+ break;
+ case DAVException::DAV_HTTP_NOAUTH:
+ case DAVException::DAV_HTTP_AUTH:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: DAV_HTTP_AUTH for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ // - the remote site is a WebDAV with special configuration: read/only for read operations
+ // and read/write for write operations, the user is not allowed to lock/write and
+ // she cancelled the credentials request.
+ // this is not actually an error, it means only that for current user this is a standard web,
+ // though possibly DAV enabled
+ aDAVOptions.setHttpResponseStatusCode( USC_AUTH_FAILED );
+ // used only internally, so the text doesn't really matter..
+ if (xEnv && xEnv->getInteractionHandler())
+ { // only cache if there actually was a chance to request auth
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotFound );
+ }
+ if ( networkAccessAllowed != nullptr )
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ }
+ break;
+ case DAVException::DAV_HTTP_AUTHPROXY:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAVException: DAV_HTTP_AUTHPROXY for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ aDAVOptions.setHttpResponseStatusCode( USC_AUTHPROXY_FAILED );
+ // used only internally, so the text doesn't really matter..
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotFound );
+ if ( networkAccessAllowed != nullptr )
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ }
+ break;
+ case DAVException::DAV_HTTP_ERROR:
+ {
+ switch( e.getStatus() )
+ {
+ case SC_FORBIDDEN:
+ {
+ SAL_WARN( "ucb.ucp.webdav","OPTIONS - SC_FORBIDDEN for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ // cache it, so OPTIONS won't be called again, this URL does not support it
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotImpl );
+ }
+ break;
+ case SC_BAD_REQUEST:
+ case SC_INTERNAL_SERVER_ERROR:
+ {
+ SAL_WARN( "ucb.ucp.webdav","OPTIONS - SC_BAD_REQUEST or SC_INTERNAL_SERVER_ERROR for URL <" << m_xIdentifier->getContentIdentifier() << ">, HTTP error: "<< e.getStatus()
+ << ", '" << e.getData() << "'" );
+ // cache it, so OPTIONS won't be called again, this URL detect some problem while answering the method
+ aDAVOptions.setHttpResponseStatusCode( e.getStatus() );
+ aDAVOptions.setHttpResponseStatusText( e.getData() );
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotFound );
+ }
+ break;
+ case SC_NOT_IMPLEMENTED:
+ case SC_METHOD_NOT_ALLOWED:
+ {
+ // OPTIONS method must be implemented in DAV
+ // resource is NON_DAV, or not advertising it
+ SAL_WARN( "ucb.ucp.webdav","OPTIONS - SC_NOT_IMPLEMENTED or SC_METHOD_NOT_ALLOWED for URL <" << m_xIdentifier->getContentIdentifier() << ">, HTTP error: "<< e.getStatus()
+ << ", '" << e.getData() << "'" );
+ // cache it, so OPTIONS won't be called again, this URL does not support it
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotImpl );
+ }
+ break;
+ case SC_NOT_FOUND:
+ {
+ // Apparently on IIS 10.0, if you disabled OPTIONS method, this error is the one reported,
+ // instead of SC_NOT_IMPLEMENTED or SC_METHOD_NOT_ALLOWED.
+ // So check if this is an available resource, or a real 'Not Found' event.
+ sal_uInt32 nLifeTime = m_nOptsCacheLifeNotFound;
+ if( isResourceAvailable( xEnv, rResAccess, aDAVOptions ) )
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - Got an SC_NOT_FOUND, but the URL <" << m_xIdentifier->getContentIdentifier() << "> resource exists" );
+ nLifeTime = m_nOptsCacheLifeNotImpl;
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - SC_NOT_FOUND for URL <" << m_xIdentifier->getContentIdentifier() << ">" );
+ if ( networkAccessAllowed != nullptr )
+ {
+ *networkAccessAllowed = *networkAccessAllowed
+ && shouldAccessNetworkAfterException(e);
+ }
+ }
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ nLifeTime );
+ }
+ break;
+ default:
+ {
+ SAL_WARN( "ucb.ucp.webdav", "OPTIONS - DAV_HTTP_ERROR, for URL <" << m_xIdentifier->getContentIdentifier() << ">, HTTP error: "<< e.getStatus()
+ << ", '" << e.getData() << "'" );
+ aDAVOptions.setHttpResponseStatusCode( e.getStatus() );
+ aDAVOptions.setHttpResponseStatusText( e.getData() );
+ // cache it, so OPTIONS won't be called again, this URL does not support it
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotImpl );
+ }
+ break;
+ }
+ }
+ break;
+ // The 'DAVException::DAV_HTTP_REDIRECT' means we reached the maximum
+ // number of redirections, consider the resource type as UNKNOWN
+ // possibly a normal web site, not DAV
+ case DAVException::DAV_HTTP_REDIRECT:
+ default:
+ {
+ SAL_WARN( "ucb.ucp.webdav","OPTIONS - General DAVException (or max DAV_HTTP_REDIRECT reached) for URL <" << m_xIdentifier->getContentIdentifier() << ">, DAV ExceptionCode: "
+ << e.getError() << ", HTTP error: "<< e.getStatus() );
+ aStaticDAVOptionsCache.addDAVOptions( aDAVOptions,
+ m_nOptsCacheLifeNotImpl );
+ }
+ break;
+ }
+ }
+ }
+ else
+ {
+ // check current response status code, perhaps we need to set networkAccessAllowed
+ sal_uInt16 CachedResponseStatusCode = aDAVOptions.getHttpResponseStatusCode();
+ if ( networkAccessAllowed != nullptr &&
+ ( ( CachedResponseStatusCode == SC_NOT_FOUND ) ||
+ ( CachedResponseStatusCode == SC_GONE ) ||
+ ( CachedResponseStatusCode == USC_CONNECTION_TIMED_OUT ) ||
+ ( CachedResponseStatusCode == USC_LOOKUP_FAILED ) ||
+ ( CachedResponseStatusCode == USC_AUTH_FAILED ) ||
+ ( CachedResponseStatusCode == USC_AUTHPROXY_FAILED )
+ )
+ )
+ {
+ *networkAccessAllowed = *networkAccessAllowed && false;
+ }
+ }
+ rDAVOptions = aDAVOptions;
+}
+
+//static
+bool Content::isResourceAvailable( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ DAVOptions& rDAVOptions )
+{
+ std::vector< rtl::OUString > aHeaderNames;
+ DAVResource aResource;
+
+ try
+ {
+ // To check for the physical URL resource availability, first
+ // try using a simple HEAD command
+ // if HEAD is successful, set element found.
+ rResAccess->HEAD( aHeaderNames, aResource, xEnv );
+ rDAVOptions.setHttpResponseStatusCode( 0 );
+ rDAVOptions.setHttpResponseStatusText("");
+ return true;
+ }
+ catch ( DAVException const & e )
+ {
+ if ( e.getError() == DAVException::DAV_HTTP_ERROR )
+ {
+ if ( e.getStatus() == SC_NOT_IMPLEMENTED ||
+ e.getStatus() == SC_METHOD_NOT_ALLOWED ||
+ e.getStatus() == SC_NOT_FOUND )
+ {
+ SAL_WARN( "ucb.ucp.webdav", "HEAD probably not implemented: fall back to a partial GET" );
+ // set in cached OPTIONS "HEAD not implemented"
+ // so it won't be used again on this resource
+ rDAVOptions.setHeadAllowed( false );
+ try
+ {
+ // do a GET with a payload of 0, the server does not
+ // support HEAD (or has HEAD disabled)
+ DAVRequestHeaders aPartialGet;
+ aPartialGet.push_back(
+ DAVRequestHeader(
+ OUString( "Range" ),
+ OUString( "bytes=0-0" )));
+
+ rResAccess->GET0( aPartialGet,
+ aHeaderNames,
+ aResource,
+ xEnv );
+ return true;
+ }
+ catch ( DAVException const & ex )
+ {
+ if ( ex.getError() == DAVException::DAV_HTTP_ERROR )
+ {
+ rDAVOptions.setHttpResponseStatusCode( ex.getStatus() );
+ rDAVOptions.setHttpResponseStatusText( ex.getData() );
+ }
+ }
+ }
+ else
+ {
+ rDAVOptions.setHttpResponseStatusCode( e.getStatus() );
+ rDAVOptions.setHttpResponseStatusText( e.getData() );
+ }
+ }
+ return false;
+ }
+ catch ( ... )
+ {
+ }
+ // set SC_NOT_IMPLEMENTED since at a minimum GET must be implemented in a basic Web server
+ rDAVOptions.setHttpResponseStatusCode( SC_NOT_IMPLEMENTED );
+ rDAVOptions.setHttpResponseStatusText("");
+ return false;
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.hxx b/ucb/source/ucp/webdav-curl/webdavcontent.hxx
new file mode 100644
index 000000000000..43c275cd2e7f
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.hxx
@@ -0,0 +1,305 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <memory>
+#include <list>
+#include <rtl/ref.hxx>
+#include <com/sun/star/ucb/ContentCreationException.hpp>
+#include <com/sun/star/ucb/XContentCreator.hpp>
+#include <ucbhelper/contenthelper.hxx>
+#include "DAVResourceAccess.hxx"
+#include "PropertyMap.hxx"
+
+namespace com::sun::star::beans {
+ struct Property;
+ struct PropertyValue;
+}
+
+namespace com::sun::star::io {
+ class XInputStream;
+}
+
+namespace com::sun::star::sdbc {
+ class XRow;
+}
+
+namespace com::sun::star::ucb {
+ struct OpenCommandArgument3;
+ struct PropertyCommandArgument;
+ struct PostCommandArgument2;
+ struct TransferInfo;
+}
+
+namespace http_dav_ucp
+{
+
+
+// UNO service name for the content.
+#define WEBDAV_CONTENT_SERVICE_NAME "com.sun.star.ucb.WebDAVContent"
+
+
+class ContentProvider;
+class ContentProperties;
+class CachableContentProperties;
+
+class Content : public ::ucbhelper::ContentImplHelper,
+ public css::ucb::XContentCreator
+{
+ enum ResourceType
+ {
+ UNKNOWN, // the type of the Web resource is unknown
+ NOT_FOUND, // the Web resource does not exists
+ NON_DAV, // the Web resource exists but it's not DAV
+ DAV, // the type of the Web resource is DAV with lock/unlock available
+ DAV_NOLOCK // the type of the Web resource is DAV with no lock/unlock available
+ };
+
+ std::unique_ptr< DAVResourceAccess > m_xResAccess;
+ std::unique_ptr< CachableContentProperties > m_xCachedProps; // locally cached props
+ OUString m_aEscapedTitle;
+ // resource type for general DAV methods
+ ResourceType m_eResourceType;
+ // resource type for general LOCK method only
+ ResourceType m_eResourceTypeForLocks;
+ ContentProvider* m_pProvider; // No need for a ref, base class holds object
+ bool m_bTransient;
+ bool const m_bCollection;
+ bool m_bDidGetOrHead;
+ std::vector< OUString > m_aFailedPropNames;
+ // Options Cache lifetime
+ // for web site implementing OPTIONS, but not dav
+ sal_uInt32 m_nOptsCacheLifeImplWeb;
+ // for WebDAV site where OPTIONS is mandatory
+ sal_uInt32 m_nOptsCacheLifeDAV;
+ // same as above, but when the resource is locked by us
+ sal_uInt32 m_nOptsCacheLifeDAVLocked;
+// For web site not implementing OPTIONS
+ // during this time we assume the site doesn't turn to WebDAV
+ // but remains a simple Web
+ sal_uInt32 m_nOptsCacheLifeNotImpl;
+ // When resource is not found
+ // may be the resource is unavailable only briefly?
+ // so better have this small
+ sal_uInt32 m_nOptsCacheLifeNotFound;
+
+ void initOptsCacheLifeTime();
+
+private:
+ virtual css::uno::Sequence< css::beans::Property >
+ getProperties( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
+ virtual css::uno::Sequence< css::ucb::CommandInfo >
+ getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
+ virtual OUString getParentURL() override;
+
+ /// @throws css::uno::Exception
+ bool isFolder( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws css::uno::Exception
+ css::uno::Reference< css::sdbc::XRow >
+ getPropertyValues( const css::uno::Sequence< css::beans::Property >& rProperties,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws css::uno::Exception
+ css::uno::Sequence< css::uno::Any >
+ setPropertyValues( const css::uno::Sequence< css::beans::PropertyValue >& rValues,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ typedef rtl::Reference< Content > ContentRef;
+ typedef std::vector< ContentRef > ContentRefList;
+ void queryChildren( ContentRefList& rChildren);
+
+ bool
+ exchangeIdentity( const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId );
+
+ OUString
+ getBaseURI( const std::unique_ptr< DAVResourceAccess > & rResAccess );
+
+ /// @throws css::uno::Exception
+ ResourceType
+ getResourceType( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
+
+ /// @throws css::uno::Exception
+ ResourceType
+ getResourceType( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ bool * networkAccessAllowed = nullptr );
+
+ // Command "open"
+ /// @throws css::uno::Exception
+ css::uno::Any open(
+ const css::ucb::OpenCommandArgument3 & rArg,
+ const css::uno::Reference<
+ css::ucb::XCommandEnvironment > & xEnv );
+
+ // Command "post"
+ /// @throws css::uno::Exception
+ void post( const css::ucb::PostCommandArgument2 & rArg,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
+
+ // Command "insert"
+ /// @throws css::uno::Exception
+ void insert( const css::uno::Reference< css::io::XInputStream > & xInputStream,
+ bool bReplaceExisting,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+
+ // Command "transfer"
+ /// @throws css::uno::Exception
+ void transfer( const css::ucb::TransferInfo & rArgs,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+
+ // Command "delete"
+ /// @throws css::uno::Exception
+ void destroy( bool bDeletePhysical );
+
+ // Command "lock"
+ /// @throws css::uno::Exception
+ void lock( const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+
+ // Command "unlock"
+ /// @throws css::uno::Exception
+ void unlock( const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+
+ css::uno::Any MapDAVException( const DAVException & e,
+ bool bWrite );
+ /// @throws css::uno::Exception
+ void cancelCommandExecution(
+ const DAVException & e,
+ const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv,
+ bool bWrite = false );
+
+ static bool shouldAccessNetworkAfterException( const DAVException & e );
+
+ ResourceType resourceTypeForLocks(
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& rEnvironment,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess );
+
+ ResourceType resourceTypeForLocks(
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& rEnvironment );
+
+ // XPropertyContainer replacement
+ /// @throws css::beans::PropertyExistException
+ /// @throws css::beans::IllegalTypeException
+ /// @throws css::lang::IllegalArgumentException
+ /// @throws css::uno::RuntimeException
+ void addProperty( const css::ucb::PropertyCommandArgument &aCmdArg,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+
+ /// @throws css::beans::PropertyExistException
+ /// @throws css::beans::NotRemoveableException
+ /// @throws css::uno::RuntimeException
+ void removeProperty( const OUString& Name,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment );
+public:
+ /// @throws css::ucb::ContentCreationException
+ Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ ContentProvider* pProvider,
+ const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory );
+ /// @throws css::ucb::ContentCreationException
+ Content( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ ContentProvider* pProvider,
+ const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
+ rtl::Reference< DAVSessionFactory > const & rSessionFactory,
+ bool isCollection );
+ virtual ~Content() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire()
+ noexcept override;
+ virtual void SAL_CALL release()
+ noexcept override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL
+ getImplementationName() override;
+
+ virtual css::uno::Sequence< OUString > SAL_CALL
+ getSupportedServiceNames() override;
+
+ // XContent
+ virtual OUString SAL_CALL
+ getContentType() override;
+
+ // XCommandProcessor
+ virtual css::uno::Any SAL_CALL
+ execute( const css::ucb::Command& aCommand,
+ sal_Int32 CommandId,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) override;
+ virtual void SAL_CALL
+ abort( sal_Int32 CommandId ) override;
+
+ // XPropertyContainer
+ virtual void SAL_CALL
+ addProperty( const OUString& Name,
+ sal_Int16 Attributes,
+ const css::uno::Any& DefaultValue ) override;
+
+ virtual void SAL_CALL
+ removeProperty( const OUString& Name ) override;
+
+
+ // Additional interfaces
+
+
+ // XContentCreator
+ virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL
+ queryCreatableContentsInfo() override;
+ virtual css::uno::Reference< css::ucb::XContent > SAL_CALL
+ createNewContent( const css::ucb::ContentInfo& Info ) override;
+
+
+ // Non-interface methods.
+
+
+ DAVResourceAccess & getResourceAccess() { return *m_xResAccess; }
+
+ // Called from resultset data supplier.
+ static css::uno::Reference< css::sdbc::XRow >
+ getPropertyValues( const css::uno::Reference< css::uno::XComponentContext >& rContext,
+ const css::uno::Sequence< css::beans::Property >& rProperties,
+ const ContentProperties& rData,
+ const rtl::Reference< ::ucbhelper::ContentProviderImplHelper >& rProvider,
+ const OUString& rContentId );
+
+ /// Use OPTIONS method to retrieve the type of the Web resource
+ /// @throws css::uno::Exception
+ void getResourceOptions( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
+ DAVOptions& rDAVOptions,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ bool * networkAccessAllowed = nullptr);
+
+ static bool isResourceAvailable( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
+ const std::unique_ptr< DAVResourceAccess > & rResAccess,
+ DAVOptions& rDAVOptions );
+
+ static void removeCachedPropertyNames( const OUString & rURL );
+
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
new file mode 100644
index 000000000000..836edd7c75e8
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx
@@ -0,0 +1,635 @@
+/* -*- 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 <memory>
+#include <set>
+#include <com/sun/star/beans/Property.hpp>
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+#include <com/sun/star/ucb/CommandInfo.hpp>
+#include <com/sun/star/ucb/ContentInfo.hpp>
+#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
+#include <com/sun/star/ucb/InsertCommandArgument.hpp>
+#include <com/sun/star/ucb/PostCommandArgument2.hpp>
+#include <com/sun/star/ucb/PropertyCommandArgument.hpp>
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/util/DateTime.hpp>
+#include <com/sun/star/ucb/Lock.hpp>
+#include <com/sun/star/ucb/LockEntry.hpp>
+#include "webdavcontent.hxx"
+#include "webdavprovider.hxx"
+#include "DAVProperties.hxx"
+#include "ContentProperties.hxx"
+#include "PropfindCache.hxx"
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+
+// ContentProvider implementation.
+
+
+bool ContentProvider::getProperty(
+ const OUString & rPropName, beans::Property & rProp )
+{
+ if ( !m_pProps )
+ {
+ osl::MutexGuard aGuard( m_aMutex );
+ if ( !m_pProps )
+ {
+ m_pProps = std::make_unique<PropertyMap>();
+
+
+ // Fill map of known properties...
+
+
+ // Mandatory UCB properties.
+ m_pProps->insert(
+ beans::Property(
+ "ContentType",
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "IsDocument",
+ -1,
+ cppu::UnoType<bool>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "IsFolder",
+ -1,
+ cppu::UnoType<bool>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "Title",
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND ) );
+
+ // Optional UCB properties.
+
+ m_pProps->insert(
+ beans::Property(
+ "DateCreated",
+ -1,
+ cppu::UnoType<util::DateTime>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "DateModified",
+ -1,
+ cppu::UnoType<util::DateTime>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "MediaType",
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "Size",
+ -1,
+ cppu::UnoType<sal_Int64>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "BaseURI",
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ "CreatableContentsInfo",
+ -1,
+ cppu::UnoType<uno::Sequence< ucb::ContentInfo >>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ // Standard DAV properties.
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::CREATIONDATE,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::DISPLAYNAME,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::GETCONTENTLANGUAGE,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::GETCONTENTLENGTH,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::GETCONTENTTYPE ,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::GETETAG,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::GETLASTMODIFIED,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::LOCKDISCOVERY,
+ -1,
+ cppu::UnoType<uno::Sequence< ucb::Lock >>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::RESOURCETYPE,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::SUPPORTEDLOCK,
+ -1,
+ cppu::UnoType<uno::Sequence< ucb::LockEntry >>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::READONLY ) );
+
+ m_pProps->insert(
+ beans::Property(
+ DAVProperties::EXECUTABLE,
+ -1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND ) );
+ }
+ }
+
+
+ // Lookup property.
+
+
+ beans::Property aProp;
+ aProp.Name = rPropName;
+ const PropertyMap::const_iterator it = m_pProps->find( aProp );
+ if ( it != m_pProps->end() )
+ {
+ rProp = *it;
+ }
+ else
+ {
+ // All unknown props are treated as:
+ rProp = beans::Property(
+ rPropName,
+ - 1,
+ cppu::UnoType<OUString>::get(),
+ beans::PropertyAttribute::BOUND );
+ }
+
+ return true;
+}
+
+
+static PropertyNamesCache aStaticPropertyNamesCache;
+
+// static
+void Content::removeCachedPropertyNames( const OUString & rURL )
+{
+ aStaticPropertyNamesCache.removeCachedPropertyNames( rURL );
+}
+
+// Content implementation.
+
+
+// virtual
+uno::Sequence< beans::Property > Content::getProperties(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ bool bTransient;
+ std::unique_ptr< DAVResourceAccess > xResAccess;
+ std::unique_ptr< ContentProperties > xCachedProps;
+ rtl::Reference< ContentProvider > xProvider;
+
+ {
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ bTransient = m_bTransient;
+ xResAccess.reset( new DAVResourceAccess( *m_xResAccess ) );
+ if (m_xCachedProps)
+ xCachedProps.reset(
+ new ContentProperties( *m_xCachedProps ) );
+ xProvider.set( m_pProvider );
+ }
+
+ std::set< OUString > aPropSet;
+
+ // No server access for just created (not yet committed) objects.
+ // Only a minimal set of properties supported at this stage.
+ if ( !bTransient )
+ {
+ // Obtain all properties supported for this resource from server.
+ DAVOptions aDAVOptions;
+ getResourceOptions( xEnv, aDAVOptions, xResAccess );
+ // only Class 1 is needed for PROPFIND
+ if ( aDAVOptions.isClass1() )
+ {
+ try
+ {
+ std::vector< DAVResourceInfo > props;
+ OUString aTheURL( xResAccess->getURL() );
+ PropertyNames aPropsNames( aTheURL );
+
+ if( !aStaticPropertyNamesCache.getCachedPropertyNames( aTheURL, aPropsNames ) )
+ {
+
+ xResAccess->PROPFIND( DAVZERO, props, xEnv );
+ aPropsNames.setPropertiesNames( props );
+
+ aStaticPropertyNamesCache.addCachePropertyNames( aPropsNames, 10 );
+ }
+ else
+ {
+ props = aPropsNames.getPropertiesNames();
+ }
+
+ // Note: vector should contain exactly one resource info, because
+ // we used a depth of DAVZERO for PROPFIND.
+ if (props.size() == 1)
+ {
+ aPropSet.insert( (*props.begin()).properties.begin(),
+ (*props.begin()).properties.end() );
+ }
+ }
+ catch ( DAVException const & )
+ {
+ }
+ }
+ }
+
+ // Add DAV properties, map DAV properties to UCB properties.
+ bool bHasCreationDate = false; // creationdate <-> DateCreated
+ bool bHasGetLastModified = false; // getlastmodified <-> DateModified
+ bool bHasGetContentType = false; // getcontenttype <-> MediaType
+ bool bHasGetContentLength = false; // getcontentlength <-> Size
+
+ bool bHasContentType = false;
+ bool bHasIsDocument = false;
+ bool bHasIsFolder = false;
+ bool bHasTitle = false;
+ bool bHasBaseURI = false;
+ bool bHasDateCreated = false;
+ bool bHasDateModified = false;
+ bool bHasMediaType = false;
+ bool bHasSize = false;
+ bool bHasCreatableInfos = false;
+
+ {
+ for ( const auto& rProp : aPropSet )
+ {
+ if ( !bHasCreationDate &&
+ ( rProp == DAVProperties::CREATIONDATE ) )
+ {
+ bHasCreationDate = true;
+ }
+ else if ( !bHasGetLastModified &&
+ ( rProp == DAVProperties::GETLASTMODIFIED ) )
+ {
+ bHasGetLastModified = true;
+ }
+ else if ( !bHasGetContentType &&
+ ( rProp == DAVProperties::GETCONTENTTYPE ) )
+ {
+ bHasGetContentType = true;
+ }
+ else if ( !bHasGetContentLength &&
+ ( rProp == DAVProperties::GETCONTENTLENGTH ) )
+ {
+ bHasGetContentLength = true;
+ }
+ else if ( !bHasContentType && rProp == "ContentType" )
+ {
+ bHasContentType = true;
+ }
+ else if ( !bHasIsDocument && rProp == "IsDocument" )
+ {
+ bHasIsDocument = true;
+ }
+ else if ( !bHasIsFolder && rProp == "IsFolder" )
+ {
+ bHasIsFolder = true;
+ }
+ else if ( !bHasTitle && rProp == "Title" )
+ {
+ bHasTitle = true;
+ }
+ else if ( !bHasBaseURI && rProp == "BaseURI" )
+ {
+ bHasBaseURI = true;
+ }
+ else if ( !bHasDateCreated && rProp == "DateCreated" )
+ {
+ bHasDateCreated = true;
+ }
+ else if ( !bHasDateModified && rProp == "DateModified" )
+ {
+ bHasDateModified = true;
+ }
+ else if ( !bHasMediaType && rProp == "MediaType" )
+ {
+ bHasMediaType = true;
+ }
+ else if ( !bHasSize && rProp == "Size" )
+ {
+ bHasSize = true;
+ }
+ else if ( !bHasCreatableInfos && rProp == "CreatableContentsInfo" )
+ {
+ bHasCreatableInfos = true;
+ }
+ }
+ }
+
+ // Add mandatory properties.
+ if ( !bHasContentType )
+ aPropSet.insert(
+ OUString( "ContentType" ) );
+
+ if ( !bHasIsDocument )
+ aPropSet.insert(
+ OUString( "IsDocument" ) );
+
+ if ( !bHasIsFolder )
+ aPropSet.insert(
+ OUString( "IsFolder" ) );
+
+ if ( !bHasTitle )
+ {
+ // Always present since it can be calculated from content's URI.
+ aPropSet.insert(
+ OUString( "Title" ) );
+ }
+
+ // Add optional properties.
+
+ if ( !bHasBaseURI )
+ {
+ // Always present since it can be calculated from content's URI.
+ aPropSet.insert(
+ OUString( "BaseURI" ) );
+ }
+
+ if ( !bHasDateCreated && bHasCreationDate )
+ aPropSet.insert(
+ OUString( "DateCreated" ) );
+
+ if ( !bHasDateModified && bHasGetLastModified )
+ aPropSet.insert(
+ OUString( "DateModified" ) );
+
+ if ( !bHasMediaType && bHasGetContentType )
+ aPropSet.insert(
+ OUString( "MediaType" ) );
+
+ if ( !bHasSize && bHasGetContentLength )
+ aPropSet.insert(
+ OUString( "Size" ) );
+
+ if ( !bHasCreatableInfos )
+ aPropSet.insert(
+ OUString(
+ "CreatableContentsInfo" ) );
+
+ // Add cached properties, if present and still missing.
+ if (xCachedProps)
+ {
+ const std::unique_ptr< PropertyValueMap > & xProps
+ = xCachedProps->getProperties();
+
+ for ( const auto& rEntry : *xProps )
+ aPropSet.insert( rEntry.first );
+ }
+
+ // std::set -> uno::Sequence
+ sal_Int32 nCount = aPropSet.size();
+ uno::Sequence< beans::Property > aProperties( nCount );
+
+ beans::Property aProp;
+ sal_Int32 n = 0;
+
+ for ( const auto& rProp : aPropSet )
+ {
+ xProvider->getProperty( rProp, aProp );
+ aProperties[ n++ ] = aProp;
+ }
+
+ return aProperties;
+}
+
+
+// virtual
+uno::Sequence< ucb::CommandInfo > Content::getCommands(
+ const uno::Reference< ucb::XCommandEnvironment > & xEnv )
+{
+ osl::Guard< osl::Mutex > aGuard( m_aMutex );
+
+ uno::Sequence< ucb::CommandInfo > aCmdInfo( 10 );
+ auto pCmdInfo = aCmdInfo.getArray();
+
+
+ // Mandatory commands
+
+
+ pCmdInfo[ 0 ] =
+ ucb::CommandInfo(
+ "getCommandInfo",
+ -1,
+ cppu::UnoType<void>::get() );
+ pCmdInfo[ 1 ] =
+ ucb::CommandInfo(
+ "getPropertySetInfo",
+ -1,
+ cppu::UnoType<void>::get() );
+ pCmdInfo[ 2 ] =
+ ucb::CommandInfo(
+ "getPropertyValues",
+ -1,
+ cppu::UnoType<uno::Sequence< beans::Property >>::get());
+ pCmdInfo[ 3 ] =
+ ucb::CommandInfo(
+ "setPropertyValues",
+ -1,
+ cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get());
+
+
+ // Optional standard commands
+
+
+ pCmdInfo[ 4 ] =
+ ucb::CommandInfo(
+ "delete",
+ -1,
+ cppu::UnoType<bool>::get() );
+ pCmdInfo[ 5 ] =
+ ucb::CommandInfo(
+ "insert",
+ -1,
+ cppu::UnoType<ucb::InsertCommandArgument>::get() );
+ pCmdInfo[ 6 ] =
+ ucb::CommandInfo(
+ "open",
+ -1,
+ cppu::UnoType<ucb::OpenCommandArgument2>::get() );
+
+
+ // New commands
+
+
+ pCmdInfo[ 7 ] =
+ ucb::CommandInfo(
+ "post",
+ -1,
+ cppu::UnoType<ucb::PostCommandArgument2>::get() );
+ pCmdInfo[ 8 ] =
+ ucb::CommandInfo(
+ "addProperty",
+ -1,
+ cppu::UnoType<ucb::PropertyCommandArgument>::get() );
+ pCmdInfo[ 9 ] =
+ ucb::CommandInfo(
+ "removeProperty",
+ -1,
+ cppu::UnoType<OUString>::get() );
+
+ bool bFolder = false;
+
+ try
+ {
+ bFolder = isFolder( xEnv );
+ }
+ catch ( uno::Exception const & )
+ {
+ return aCmdInfo;
+ }
+
+ ResourceType eType = resourceTypeForLocks( xEnv );
+ bool bSupportsLocking = ( eType == NOT_FOUND || eType == DAV );
+
+ sal_Int32 nPos = aCmdInfo.getLength();
+ sal_Int32 nMoreCmds = ( bFolder ? 2 : 0 ) + ( bSupportsLocking ? 2 : 0 );
+ if ( nMoreCmds )
+ aCmdInfo.realloc( nPos + nMoreCmds );
+ else
+ return aCmdInfo;
+
+ pCmdInfo = aCmdInfo.getArray();
+
+ if ( bFolder )
+ {
+
+ // Optional standard commands
+
+
+ pCmdInfo[ nPos ] =
+ ucb::CommandInfo(
+ "transfer",
+ -1,
+ cppu::UnoType<ucb::TransferInfo>::get() );
+ nPos++;
+ pCmdInfo[ nPos ] =
+ ucb::CommandInfo(
+ "createNewContent",
+ -1,
+ cppu::UnoType<ucb::ContentInfo>::get() );
+ nPos++;
+ }
+ else
+ {
+ // no document-only commands at the moment.
+ }
+
+ if ( bSupportsLocking )
+ {
+ pCmdInfo[ nPos ] =
+ ucb::CommandInfo(
+ "lock",
+ -1,
+ cppu::UnoType<void>::get() );
+ nPos++;
+ pCmdInfo[ nPos ] =
+ ucb::CommandInfo(
+ "unlock",
+ -1,
+ cppu::UnoType<void>::get() );
+ nPos++;
+ }
+ return aCmdInfo;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
new file mode 100644
index 000000000000..d97e6ce3e320
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavdatasupplier.cxx
@@ -0,0 +1,486 @@
+/* -*- 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 <sal/config.h>
+#include <sal/log.hxx>
+
+#include <memory>
+#include <utility>
+
+#include <rtl/ustrbuf.hxx>
+#include <com/sun/star/ucb/OpenMode.hpp>
+#include <ucbhelper/contentidentifier.hxx>
+#include <ucbhelper/providerhelper.hxx>
+#include "webdavdatasupplier.hxx"
+#include "webdavcontent.hxx"
+#include "ContentProperties.hxx"
+#include "DAVProperties.hxx"
+#include "CurlUri.hxx"
+#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
+#include <com/sun/star/ucb/ResultSetException.hpp>
+#include <tools/diagnose_ex.h>
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+namespace http_dav_ucp
+{
+
+
+// struct ResultListEntry.
+
+namespace {
+
+struct ResultListEntry
+{
+ OUString aId;
+ uno::Reference< ucb::XContentIdentifier > xId;
+ uno::Reference< ucb::XContent > xContent;
+ uno::Reference< sdbc::XRow > xRow;
+ std::unique_ptr<ContentProperties> pData;
+
+ explicit ResultListEntry( std::unique_ptr<ContentProperties> && pEntry ) : pData( std::move(pEntry) ) {}
+};
+
+auto DumpResources(std::vector<DAVResource> const& rResources) -> OUString
+{
+ OUStringBuffer buf;
+ for (auto const& rResource : rResources)
+ {
+ buf.append("resource URL: <");
+ buf.append(rResource.uri);
+ try {
+ CurlUri const uri(rResource.uri);
+ buf.append("> parsed URL: <");
+ buf.append(DecodeURI(uri.GetRelativeReference()));
+ buf.append("> ");
+ } catch (...) {
+ // parsing uri could fail
+ buf.append("> parsing URL failed! ");
+ }
+ buf.append("properties: ");
+ for (auto const& it : rResource.properties)
+ {
+ buf.append("\"");
+ buf.append(it.Name);
+ buf.append("\" ");
+ }
+ buf.append("\n");
+ }
+ buf.stripEnd('\n'); // the last newline is superfluous, remove it
+ return buf.makeStringAndClear();
+}
+
+}
+
+// ResultList.
+
+
+typedef std::vector<std::unique_ptr<ResultListEntry>> ResultList;
+
+
+// struct DataSupplier_Impl.
+
+
+struct DataSupplier_Impl
+{
+ osl::Mutex m_aMutex;
+ ResultList m_Results;
+ rtl::Reference< Content > m_xContent;
+ uno::Reference< uno::XComponentContext > m_xContext;
+ sal_Int32 const m_nOpenMode;
+ bool m_bCountFinal;
+ bool m_bThrowException;
+
+ DataSupplier_Impl(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ const rtl::Reference< Content >& rContent,
+ sal_Int32 nOpenMode )
+ : m_xContent( rContent ), m_xContext( rxContext ), m_nOpenMode( nOpenMode ),
+ m_bCountFinal( false ), m_bThrowException( false ) {}
+};
+
+}
+
+
+// DataSupplier Implementation.
+
+
+DataSupplier::DataSupplier(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ const rtl::Reference< Content >& rContent,
+ sal_Int32 nOpenMode )
+: m_pImpl(std::make_unique<DataSupplier_Impl>(rxContext, rContent, nOpenMode))
+{
+}
+
+
+// virtual
+DataSupplier::~DataSupplier()
+{}
+
+
+// virtual
+OUString DataSupplier::queryContentIdentifierString( sal_uInt32 nIndex )
+{
+ osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ OUString aId = m_pImpl->m_Results[ nIndex ]->aId;
+ if ( aId.getLength() )
+ {
+ // Already cached.
+ return aId;
+ }
+ }
+
+ if ( getResult( nIndex ) )
+ {
+ OUString aId = m_pImpl->m_xContent->getResourceAccess().getURL();
+
+ const ContentProperties& props(*(m_pImpl->m_Results[ nIndex ]->pData));
+
+ if ( ( aId.lastIndexOf( '/' ) + 1 ) != aId.getLength() )
+ aId += "/";
+
+ aId += props.getEscapedTitle();
+
+ if ( props.isTrailingSlash() )
+ aId += "/";
+
+ m_pImpl->m_Results[ nIndex ]->aId = aId;
+ return aId;
+ }
+ return OUString();
+}
+
+
+// virtual
+uno::Reference< ucb::XContentIdentifier >
+DataSupplier::queryContentIdentifier( sal_uInt32 nIndex )
+{
+ osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ uno::Reference< ucb::XContentIdentifier > xId
+ = m_pImpl->m_Results[ nIndex ]->xId;
+ if ( xId.is() )
+ {
+ // Already cached.
+ return xId;
+ }
+ }
+
+ OUString aId = queryContentIdentifierString( nIndex );
+ if ( aId.getLength() )
+ {
+ uno::Reference< ucb::XContentIdentifier > xId
+ = new ::ucbhelper::ContentIdentifier( aId );
+ m_pImpl->m_Results[ nIndex ]->xId = xId;
+ return xId;
+ }
+ return uno::Reference< ucb::XContentIdentifier >();
+}
+
+
+// virtual
+uno::Reference< ucb::XContent >
+DataSupplier::queryContent( sal_uInt32 nIndex )
+{
+ osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ uno::Reference< ucb::XContent > xContent
+ = m_pImpl->m_Results[ nIndex ]->xContent;
+ if ( xContent.is() )
+ {
+ // Already cached.
+ return xContent;
+ }
+ }
+
+ uno::Reference< ucb::XContentIdentifier > xId
+ = queryContentIdentifier( nIndex );
+ if ( xId.is() )
+ {
+ try
+ {
+ uno::Reference< ucb::XContent > xContent
+ = m_pImpl->m_xContent->getProvider()->queryContent( xId );
+ m_pImpl->m_Results[ nIndex ]->xContent = xContent;
+ return xContent;
+
+ }
+ catch ( ucb::IllegalIdentifierException& )
+ {
+ }
+ }
+ return uno::Reference< ucb::XContent >();
+}
+
+
+// virtual
+bool DataSupplier::getResult( sal_uInt32 nIndex )
+{
+ osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ // Result already present.
+ return true;
+ }
+
+ // Obtain values...
+ if ( getData() )
+ {
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ // Result already present.
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+// virtual
+sal_uInt32 DataSupplier::totalCount()
+{
+ // Obtain values...
+ getData();
+
+ return m_pImpl->m_Results.size();
+}
+
+
+// virtual
+sal_uInt32 DataSupplier::currentCount()
+{
+ return m_pImpl->m_Results.size();
+}
+
+
+// virtual
+bool DataSupplier::isCountFinal()
+{
+ return m_pImpl->m_bCountFinal;
+}
+
+
+// virtual
+uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues(
+ sal_uInt32 nIndex )
+{
+ osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ {
+ uno::Reference< sdbc::XRow > xRow = m_pImpl->m_Results[ nIndex ]->xRow;
+ if ( xRow.is() )
+ {
+ // Already cached.
+ return xRow;
+ }
+ }
+
+ if ( getResult( nIndex ) )
+ {
+ uno::Reference< sdbc::XRow > xRow
+ = Content::getPropertyValues(
+ m_pImpl->m_xContext,
+ getResultSet()->getProperties(),
+ *(m_pImpl->m_Results[ nIndex ]->pData),
+ m_pImpl->m_xContent->getProvider(),
+ queryContentIdentifierString( nIndex ) );
+ m_pImpl->m_Results[ nIndex ]->xRow = xRow;
+ return xRow;
+ }
+
+ return uno::Reference< sdbc::XRow >();
+}
+
+
+// virtual
+void DataSupplier::releasePropertyValues( sal_uInt32 nIndex )
+{
+ osl::Guard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if (nIndex < m_pImpl->m_Results.size())
+ m_pImpl->m_Results[ nIndex ]->xRow.clear();
+}
+
+
+// virtual
+void DataSupplier::close()
+{
+}
+
+
+// virtual
+void DataSupplier::validate()
+{
+ if ( m_pImpl->m_bThrowException )
+ throw ucb::ResultSetException();
+}
+
+bool DataSupplier::getData()
+{
+ osl::ClearableGuard< osl::Mutex > aGuard( m_pImpl->m_aMutex );
+
+ if ( !m_pImpl->m_bCountFinal )
+ {
+ std::vector< OUString > propertyNames;
+ ContentProperties::UCBNamesToDAVNames(
+ getResultSet()->getProperties(), propertyNames );
+
+ // Append "resourcetype", if not already present. It's value is
+ // needed to get a valid ContentProperties::pIsFolder value, which
+ // is needed for OpenMode handling.
+
+ bool isNoResourceType = std::none_of(propertyNames.begin(), propertyNames.end(),
+ [](const OUString& rPropName) { return rPropName.equals(DAVProperties::RESOURCETYPE); });
+
+ if ( isNoResourceType )
+ propertyNames.push_back( DAVProperties::RESOURCETYPE );
+
+ std::vector< DAVResource > resources;
+ try
+ {
+ // propfind depth 1, get property values for parent AND for each
+ // child
+ m_pImpl->m_xContent->getResourceAccess()
+ .PROPFIND( DAVONE,
+ propertyNames,
+ resources,
+ getResultSet()->getEnvironment() );
+ SAL_INFO("ucb.ucp.webdav", "getData() - " << DumpResources(resources));
+ }
+ catch ( DAVException & )
+ {
+ TOOLS_WARN_EXCEPTION( "ucb.ucp.webdav", "PROPFIND : DAVException" );
+ m_pImpl->m_bThrowException = true;
+ }
+
+ if ( !m_pImpl->m_bThrowException )
+ {
+ try
+ {
+ CurlUri const aURI(
+ m_pImpl->m_xContent->getResourceAccess().getURL() );
+ OUString aPath = aURI.GetPath();
+
+ if ( aPath.endsWith("/") )
+ aPath = aPath.copy( 0, aPath.getLength() - 1 );
+
+ aPath = DecodeURI(aPath);
+ bool bFoundParent = false;
+
+ for ( size_t n = 0; n < resources.size(); ++n )
+ {
+ const DAVResource & rRes = resources[ n ];
+
+ // Filter parent, which is contained somewhere(!) in
+ // the vector.
+ if ( !bFoundParent )
+ {
+ try
+ {
+ CurlUri const aCurrURI( rRes.uri );
+ OUString aCurrPath = aCurrURI.GetPath();
+ if ( aCurrPath.endsWith("/") )
+ aCurrPath
+ = aCurrPath.copy(
+ 0,
+ aCurrPath.getLength() - 1 );
+
+ aCurrPath = DecodeURI(aCurrPath);
+ if ( aPath == aCurrPath )
+ {
+ bFoundParent = true;
+ continue;
+ }
+ }
+ catch ( DAVException const & )
+ {
+ // do nothing, ignore error. continue.
+ }
+ }
+
+ std::unique_ptr<ContentProperties> pContentProperties
+ = std::make_unique<ContentProperties>( rRes );
+
+ // Check resource against open mode.
+ switch ( m_pImpl->m_nOpenMode )
+ {
+ case ucb::OpenMode::FOLDERS:
+ {
+ bool bFolder = false;
+
+ const uno::Any & rValue
+ = pContentProperties->getValue( "IsFolder" );
+ rValue >>= bFolder;
+
+ if ( !bFolder )
+ continue;
+
+ break;
+ }
+
+ case ucb::OpenMode::DOCUMENTS:
+ {
+ bool bDocument = false;
+
+ const uno::Any & rValue
+ = pContentProperties->getValue( "IsDocument" );
+ rValue >>= bDocument;
+
+ if ( !bDocument )
+ continue;
+
+ break;
+ }
+
+ case ucb::OpenMode::ALL:
+ default:
+ break;
+ }
+
+ m_pImpl->m_Results.push_back(
+ std::make_unique<ResultListEntry>(std::move(pContentProperties)));
+ }
+ }
+ catch ( DAVException const & )
+ {
+ }
+ }
+
+ m_pImpl->m_bCountFinal = true;
+
+ // Callback possible, because listeners may be informed!
+ aGuard.clear();
+ getResultSet()->rowCountFinal();
+ }
+ return !m_pImpl->m_bThrowException;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavdatasupplier.hxx b/ucb/source/ucp/webdav-curl/webdavdatasupplier.hxx
new file mode 100644
index 000000000000..de527d8346bb
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavdatasupplier.hxx
@@ -0,0 +1,73 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <memory>
+#include <rtl/ref.hxx>
+#include <ucbhelper/resultset.hxx>
+
+namespace http_dav_ucp {
+
+struct DataSupplier_Impl;
+class Content;
+struct DAVResource;
+class ContentProperties;
+
+class DataSupplier : public ucbhelper::ResultSetDataSupplier
+{
+ std::unique_ptr<DataSupplier_Impl> m_pImpl;
+
+private:
+ bool getData();
+
+public:
+ DataSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ const rtl::Reference< Content >& rContent,
+ sal_Int32 nOpenMode);
+
+ virtual ~DataSupplier() override;
+
+ virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;
+ virtual css::uno::Reference< css::ucb::XContentIdentifier >
+ queryContentIdentifier( sal_uInt32 nIndex ) override;
+ virtual css::uno::Reference< css::ucb::XContent >
+ queryContent( sal_uInt32 nIndex ) override;
+
+ virtual bool getResult( sal_uInt32 nIndex ) override;
+
+ virtual sal_uInt32 totalCount() override;
+ virtual sal_uInt32 currentCount() override;
+ virtual bool isCountFinal() override;
+
+ virtual css::uno::Reference< css::sdbc::XRow >
+ queryPropertyValues( sal_uInt32 nIndex ) override;
+ virtual void releasePropertyValues( sal_uInt32 nIndex ) override;
+
+ virtual void close() override;
+
+ virtual void validate() override;
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavprovider.cxx b/ucb/source/ucp/webdav-curl/webdavprovider.cxx
new file mode 100644
index 000000000000..972306cb3bf5
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavprovider.cxx
@@ -0,0 +1,174 @@
+/* -*- 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 <comphelper/processfactory.hxx>
+#include <ucbhelper/contentidentifier.hxx>
+#include <ucbhelper/macros.hxx>
+#include "webdavprovider.hxx"
+#include "webdavcontent.hxx"
+
+#include <cppuhelper/queryinterface.hxx>
+#include <osl/mutex.hxx>
+#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
+
+#include <tools/urlobj.hxx>
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+
+// ContentProvider Implementation.
+
+
+ContentProvider::ContentProvider(
+ const uno::Reference< uno::XComponentContext >& rContext )
+: ::ucbhelper::ContentProviderImplHelper( rContext ),
+ m_xDAVSessionFactory( new DAVSessionFactory )
+{
+}
+
+
+// virtual
+ContentProvider::~ContentProvider()
+{}
+
+
+// XInterface methods.
+void SAL_CALL ContentProvider::acquire() noexcept
+{
+ OWeakObject::acquire();
+}
+
+void SAL_CALL ContentProvider::release() noexcept
+{
+ OWeakObject::release();
+}
+
+css::uno::Any SAL_CALL ContentProvider::queryInterface( const css::uno::Type & rType )
+{
+ css::uno::Any aRet = cppu::queryInterface( rType,
+ static_cast< lang::XTypeProvider* >(this),
+ static_cast< lang::XServiceInfo* >(this),
+ static_cast< ucb::XContentProvider* >(this)
+ );
+ return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
+}
+
+// XTypeProvider methods.
+
+
+XTYPEPROVIDER_IMPL_3( ContentProvider,
+ lang::XTypeProvider,
+ lang::XServiceInfo,
+ ucb::XContentProvider );
+
+
+// XServiceInfo methods.
+
+OUString
+ContentProvider::getImplementationName()
+{
+ return "com.sun.star.comp.WebDAVContentProvider";
+}
+
+css::uno::Sequence< OUString >
+ContentProvider::getSupportedServiceNames()
+{
+ return { WEBDAV_CONTENT_PROVIDER_SERVICE_NAME };
+}
+
+sal_Bool
+ContentProvider::supportsService(const OUString& s)
+{
+ return cppu::supportsService(this, s);
+}
+
+// XContentProvider methods.
+
+
+// virtual
+uno::Reference< ucb::XContent > SAL_CALL
+ContentProvider::queryContent(
+ const uno::Reference<
+ ucb::XContentIdentifier >& Identifier )
+{
+ // Check URL scheme...
+ INetURLObject aURL(Identifier->getContentIdentifier());
+
+ if (aURL.isSchemeEqualTo(INetProtocol::NotValid))
+ throw ucb::IllegalIdentifierException();
+
+ if (!aURL.isAnyKnownWebDAVScheme())
+ throw ucb::IllegalIdentifierException();
+
+ uno::Reference< ucb::XContentIdentifier > xCanonicId;
+
+ if (aURL.isSchemeEqualTo(INetProtocol::VndSunStarWebdav) ||
+ aURL.isSchemeEqualTo(DAV_URL_SCHEME) ||
+ aURL.isSchemeEqualTo(WEBDAV_URL_SCHEME))
+ {
+ aURL.changeScheme(INetProtocol::Http);
+ xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
+ }
+ else if (aURL.isSchemeEqualTo(VNDSUNSTARWEBDAVS_URL_SCHEME) ||
+ aURL.isSchemeEqualTo(DAVS_URL_SCHEME) ||
+ aURL.isSchemeEqualTo(WEBDAVS_URL_SCHEME))
+ {
+ aURL.changeScheme(INetProtocol::Https);
+ xCanonicId = new ::ucbhelper::ContentIdentifier( aURL.getExternalURL() );
+ }
+ else
+ {
+ xCanonicId = Identifier;
+ }
+
+ osl::MutexGuard aGuard( m_aMutex );
+
+ // Check, if a content with given id already exists...
+ uno::Reference<ucb::XContent> xContent = queryExistingContent(xCanonicId).get();
+ if ( xContent.is() )
+ return xContent;
+
+ // Create a new content.
+
+ try
+ {
+ xContent = new ::http_dav_ucp::Content(
+ m_xContext, this, xCanonicId, m_xDAVSessionFactory );
+ registerNewContent( xContent );
+ }
+ catch ( ucb::ContentCreationException const & )
+ {
+ throw ucb::IllegalIdentifierException();
+ }
+
+ if ( !xContent->getIdentifier().is() )
+ throw ucb::IllegalIdentifierException();
+
+ return xContent;
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+ucb_webdav_ContentProvider_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+ return cppu::acquire(new ContentProvider(context));
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavprovider.hxx b/ucb/source/ucp/webdav-curl/webdavprovider.hxx
new file mode 100644
index 000000000000..e9e065007417
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavprovider.hxx
@@ -0,0 +1,100 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <sal/config.h>
+
+#include <memory>
+
+#include <rtl/ref.hxx>
+#include <com/sun/star/beans/Property.hpp>
+#include "DAVSessionFactory.hxx"
+#include <ucbhelper/providerhelper.hxx>
+#include "PropertyMap.hxx"
+
+namespace com::sun::star::lang {
+class XSingleServiceFactory;
+}
+
+namespace http_dav_ucp {
+
+
+// UNO service name for the provider. This name will be used by the UCB to
+// create instances of the provider.
+#define WEBDAV_CONTENT_PROVIDER_SERVICE_NAME "com.sun.star.ucb.WebDAVContentProvider"
+
+// URL scheme. This is the scheme the provider will be able to create
+// contents for. The UCB will select the provider ( i.e. in order to create
+// contents ) according to this scheme.
+#define VNDSUNSTARWEBDAV_URL_SCHEME "vnd.sun.star.webdav"
+#define VNDSUNSTARWEBDAVS_URL_SCHEME u"vnd.sun.star.webdavs"
+#define HTTP_URL_SCHEME u"http"
+#define HTTPS_URL_SCHEME u"https"
+#define DAV_URL_SCHEME u"dav"
+#define DAVS_URL_SCHEME u"davs"
+#define WEBDAV_URL_SCHEME u"webdav"
+#define WEBDAVS_URL_SCHEME u"webdavs"
+
+#define HTTP_CONTENT_TYPE "application/" HTTP_URL_SCHEME "-content"
+
+#define WEBDAV_CONTENT_TYPE HTTP_CONTENT_TYPE
+#define WEBDAV_COLLECTION_TYPE "application/" VNDSUNSTARWEBDAV_URL_SCHEME "-collection"
+
+
+class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
+{
+ rtl::Reference< DAVSessionFactory > m_xDAVSessionFactory;
+ std::unique_ptr<PropertyMap> m_pProps;
+
+public:
+ explicit ContentProvider( const css::uno::Reference< css::uno::XComponentContext >& rContext );
+ virtual ~ContentProvider() override;
+
+ // XInterface
+ virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
+ virtual void SAL_CALL acquire()
+ noexcept override;
+ virtual void SAL_CALL release()
+ noexcept override;
+
+ // XTypeProvider
+ virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
+ virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
+
+ // XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
+ virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
+
+ // XContentProvider
+ virtual css::uno::Reference< css::ucb::XContent > SAL_CALL
+ queryContent( const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier ) override;
+
+
+ // Non-interface methods.
+
+ bool getProperty( const OUString & rPropName,
+ css::beans::Property & rProp );
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
new file mode 100644
index 000000000000..ae05397d897a
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx
@@ -0,0 +1,1000 @@
+/* -*- 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 "webdavresponseparser.hxx"
+
+#include "DAVProperties.hxx"
+#include "UCBDeadPropertyValue.hxx"
+
+#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
+
+#include <cppuhelper/implbase.hxx>
+#include <com/sun/star/xml/sax/Parser.hpp>
+#include <com/sun/star/xml/sax/InputSource.hpp>
+#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
+#include <com/sun/star/ucb/LockEntry.hpp>
+#include <com/sun/star/ucb/LockScope.hpp>
+#include <com/sun/star/ucb/LockType.hpp>
+#include <com/sun/star/ucb/Lock.hpp>
+#include <map>
+#include <unordered_map>
+#include <rtl/ref.hxx>
+#include <rtl/uri.hxx>
+#include <sal/log.hxx>
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+
+// WebDAVNamespace enum and StringToEnum converter
+namespace
+{
+ enum WebDAVNamespace
+ {
+ WebDAVNamespace_unknown = 0,
+ WebDAVNamespace_DAV,
+ WebDAVNamespace_ucb_openoffice_org_dav_props,
+
+ WebDAVNamespace_last
+ };
+
+ WebDAVNamespace StrToWebDAVNamespace(::std::u16string_view rStr)
+ {
+ if (rStr == u"DAV:")
+ {
+ return WebDAVNamespace_DAV;
+ }
+ else if (rStr == u"http://ucb.openoffice.org/dav/props/")
+ {
+ return WebDAVNamespace_ucb_openoffice_org_dav_props;
+ }
+
+ return WebDAVNamespace_unknown;
+ }
+} // end of anonymous namespace
+
+// WebDAVName enum and StringToEnum converter using unordered_map
+namespace
+{
+ enum WebDAVName
+ {
+ WebDAVName_unknown = 0,
+ WebDAVName_activelock,
+ WebDAVName_lockdiscovery,
+ WebDAVName_multistatus,
+ WebDAVName_response,
+ WebDAVName_href,
+ WebDAVName_propstat,
+ WebDAVName_prop,
+ WebDAVName_resourcetype,
+ WebDAVName_collection,
+ WebDAVName_getcontenttype,
+ WebDAVName_supportedlock,
+ WebDAVName_lockentry,
+ WebDAVName_lockscope,
+ WebDAVName_depth,
+ WebDAVName_locktoken,
+ WebDAVName_exclusive,
+ WebDAVName_locktype,
+ WebDAVName_owner,
+ WebDAVName_timeout,
+ WebDAVName_write,
+ WebDAVName_shared,
+ WebDAVName_status,
+ WebDAVName_getlastmodified,
+ WebDAVName_creationdate,
+ WebDAVName_getcontentlength,
+ WebDAVName_type,
+ WebDAVName_value,
+ WebDAVName_ucbprop,
+
+ WebDAVName_last
+ };
+
+ WebDAVName StrToWebDAVName(const OUString& rStr)
+ {
+ typedef std::unordered_map< OUString, WebDAVName > WebDAVNameMapper;
+ typedef std::pair< OUString, WebDAVName > WebDAVNameValueType;
+ static WebDAVNameMapper aWebDAVNameMapperList;
+
+ if(aWebDAVNameMapperList.empty())
+ {
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("activelock"), WebDAVName_activelock));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockdiscovery"), WebDAVName_lockdiscovery));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("multistatus"), WebDAVName_multistatus));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("response"), WebDAVName_response));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("href"), WebDAVName_href));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("propstat"), WebDAVName_propstat));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("prop"), WebDAVName_prop));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("resourcetype"), WebDAVName_resourcetype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("collection"), WebDAVName_collection));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getcontenttype"), WebDAVName_getcontenttype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("supportedlock"), WebDAVName_supportedlock));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockentry"), WebDAVName_lockentry));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockscope"), WebDAVName_lockscope));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("depth"), WebDAVName_depth));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktoken"), WebDAVName_locktoken));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("exclusive"), WebDAVName_exclusive));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("locktype"), WebDAVName_locktype));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("owner"), WebDAVName_owner));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("timeout"), WebDAVName_timeout));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("write"), WebDAVName_write));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("shared"), WebDAVName_shared));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("status"), WebDAVName_status));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getlastmodified"), WebDAVName_getlastmodified));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("creationdate"), WebDAVName_creationdate));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("getcontentlength"), WebDAVName_getcontentlength));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("type"), WebDAVName_type));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("value"), WebDAVName_value));
+ aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("ucbprop"), WebDAVName_ucbprop));
+ }
+
+ const WebDAVNameMapper::const_iterator aResult(aWebDAVNameMapperList.find(rStr));
+
+ if(aResult == aWebDAVNameMapperList.end())
+ {
+ return WebDAVName_unknown;
+ }
+ else
+ {
+ return aResult->second;
+ }
+ }
+} // end of anonymous namespace
+
+
+// WebDAVContext, holding information for each start/endElement pair
+
+namespace
+{
+ typedef std::map< OUString, OUString > NamespaceMap;
+
+ class WebDAVContext
+ {
+ private:
+ WebDAVContext* mpParent;
+ NamespaceMap maNamespaceMap;
+ OUString maWhiteSpace;
+
+ OUString maNamespace;
+ OUString maName;
+
+ WebDAVNamespace maWebDAVNamespace;
+ WebDAVName maWebDAVName;
+
+ // local helpers
+ void parseForNamespaceTokens(const uno::Reference< xml::sax::XAttributeList >& xAttribs);
+ OUString mapNamespaceToken(const OUString& rToken) const;
+ void splitName(const OUString& rSource);
+
+ public:
+ WebDAVContext(WebDAVContext* pParent, const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs);
+
+ WebDAVContext* getParent() const { return mpParent; }
+ OUString& getWhiteSpace() { return maWhiteSpace; }
+ void setWhiteSpace(const OUString& rNew) { maWhiteSpace = rNew; }
+
+ const OUString& getNamespace() const { return maNamespace; }
+ const OUString& getName() const { return maName; }
+ const WebDAVNamespace& getWebDAVNamespace() const { return maWebDAVNamespace; }
+ const WebDAVName& getWebDAVName() const { return maWebDAVName; }
+ };
+
+ void WebDAVContext::parseForNamespaceTokens(const uno::Reference< xml::sax::XAttributeList >& xAttribs)
+ {
+ const sal_Int16 nAttributes(xAttribs->getLength());
+
+ for(sal_Int16 a(0); a < nAttributes; a++)
+ {
+ const OUString aName(xAttribs->getNameByIndex(a));
+ const sal_Int32 nLen(aName.getLength());
+
+ if(nLen)
+ {
+ if(aName.startsWith("xmlns"))
+ {
+ const sal_Int32 nIndex(aName.indexOf(':', 0));
+
+ if(-1 != nIndex && nIndex + 1 < nLen)
+ {
+ const OUString aToken(aName.copy(nIndex + 1));
+
+ maNamespaceMap.emplace(aToken, xAttribs->getValueByIndex(a));
+ }
+ }
+ }
+ }
+ }
+
+ OUString WebDAVContext::mapNamespaceToken(const OUString& rToken) const
+ {
+ NamespaceMap::const_iterator iter = maNamespaceMap.find(rToken);
+
+ if(maNamespaceMap.end() == iter)
+ {
+ if(getParent())
+ {
+ return getParent()->mapNamespaceToken(rToken);
+ }
+ else
+ {
+ return rToken;
+ }
+ }
+ else
+ {
+ return (*iter).second;
+ }
+ }
+
+ void WebDAVContext::splitName(const OUString& rSource)
+ {
+ const sal_Int32 nLen(rSource.getLength());
+ maNamespace.clear();
+ maName = rSource;
+
+ if(nLen)
+ {
+ const sal_Int32 nIndex(rSource.indexOf(':', 0));
+
+ if(nIndex > 0 && ((nIndex + 1) < nLen))
+ {
+ maNamespace = mapNamespaceToken(rSource.copy(0, nIndex));
+ maName = rSource.copy(nIndex + 1);
+ }
+ }
+ }
+
+ WebDAVContext::WebDAVContext(WebDAVContext* pParent, const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs)
+ : mpParent(pParent),
+ maNamespaceMap(),
+ maWhiteSpace(),
+ maNamespace(),
+ maName(),
+ maWebDAVNamespace(WebDAVNamespace_unknown),
+ maWebDAVName(WebDAVName_unknown)
+ {
+ const sal_Int16 nAttributes(xAttribs->getLength());
+
+ if(nAttributes)
+ {
+ // parse evtl. namespace entries
+ parseForNamespaceTokens(xAttribs);
+ }
+
+ // split name to namespace and name
+ splitName(aName);
+
+ // evaluate enums for namespace and name
+ maWebDAVNamespace = StrToWebDAVNamespace(maNamespace);
+ maWebDAVName = StrToWebDAVName(maName);
+ }
+} // end of anonymous namespace
+
+
+// the Xml parser itself
+
+namespace
+{
+ enum WebDAVResponseParserMode
+ {
+ WebDAVResponseParserMode_PropFind = 0,
+ WebDAVResponseParserMode_PropName,
+ WebDAVResponseParserMode_Lock
+ };
+
+ class WebDAVResponseParser : public cppu::WeakImplHelper< css::xml::sax::XDocumentHandler >
+ {
+ private:
+ std::vector< ucb::Lock > maResult_Lock;
+ std::vector< http_dav_ucp::DAVResource > maResult_PropFind;
+ std::vector< http_dav_ucp::DAVResourceInfo > maResult_PropName;
+
+ WebDAVContext* mpContext;
+ OUString maHref;
+ OUString maStatus;
+ OUString m_UCBType;
+ OUString m_UCBValue;
+ std::vector< http_dav_ucp::DAVPropertyValue > maResponseProperties;
+ std::vector< http_dav_ucp::DAVPropertyValue > maPropStatProperties;
+ std::vector< OUString > maResponseNames;
+ std::vector< OUString > maPropStatNames;
+ uno::Sequence< ucb::LockEntry > maLockEntries;
+ ucb::LockScope maLockScope;
+ ucb::LockType maLockType;
+ ucb::Lock maLock;
+ WebDAVResponseParserMode meWebDAVResponseParserMode;
+
+ bool mbResourceTypeCollection : 1;
+ bool mbLockScopeSet : 1;
+ bool mbLockTypeSet : 1;
+
+ // local helpers
+ bool whitespaceIsAvailable() const
+ {
+ return mpContext && mpContext->getWhiteSpace().getLength();
+ }
+ bool hasParent(WebDAVName aWebDAVName) const
+ {
+ return mpContext && mpContext->getParent() && aWebDAVName == mpContext->getParent()->getWebDAVName();
+ }
+ bool propertyIsReady() const
+ {
+ return hasParent(WebDAVName_prop) && whitespaceIsAvailable();
+ }
+ bool isCollectingProperties() const
+ {
+ return WebDAVResponseParserMode_PropFind == meWebDAVResponseParserMode;
+ }
+ bool isCollectingPropNames() const
+ {
+ return WebDAVResponseParserMode_PropName == meWebDAVResponseParserMode;
+ }
+ bool collectThisPropertyAsName() const
+ {
+ return isCollectingPropNames() && hasParent(WebDAVName_prop);
+ }
+ void pop_context()
+ {
+ if(mpContext)
+ {
+ WebDAVContext* pTemp = mpContext;
+ mpContext = mpContext->getParent();
+ delete pTemp;
+ }
+ else
+ {
+ SAL_WARN( "ucb.ucp.webdav", "Parser context pop without context (!)");
+ }
+ }
+
+ public:
+ explicit WebDAVResponseParser(WebDAVResponseParserMode eWebDAVResponseParserMode);
+ virtual ~WebDAVResponseParser() override;
+
+ // Methods XDocumentHandler
+ virtual void SAL_CALL startDocument( ) override;
+ virtual void SAL_CALL endDocument( ) override;
+ virtual void SAL_CALL startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs ) override;
+ virtual void SAL_CALL endElement( const OUString& aName ) override;
+ virtual void SAL_CALL characters( const OUString& aChars ) override;
+ virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) override;
+ virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) override;
+ virtual void SAL_CALL setDocumentLocator( const uno::Reference< xml::sax::XLocator >& xLocator ) override;
+
+ const std::vector< ucb::Lock >& getResult_Lock() const { return maResult_Lock; }
+ const std::vector< http_dav_ucp::DAVResource >& getResult_PropFind() const { return maResult_PropFind; }
+ const std::vector< http_dav_ucp::DAVResourceInfo >& getResult_PropName() const { return maResult_PropName; }
+ };
+
+ WebDAVResponseParser::WebDAVResponseParser(WebDAVResponseParserMode eWebDAVResponseParserMode)
+ : maResult_PropFind(),
+ maResult_PropName(),
+ mpContext(nullptr),
+ maHref(),
+ maStatus(),
+ maResponseProperties(),
+ maPropStatProperties(),
+ maResponseNames(),
+ maPropStatNames(),
+ maLockEntries(),
+ maLockScope(ucb::LockScope_EXCLUSIVE),
+ maLockType(ucb::LockType_WRITE),
+ meWebDAVResponseParserMode(eWebDAVResponseParserMode),
+ mbResourceTypeCollection(false),
+ mbLockScopeSet(false),
+ mbLockTypeSet(false)
+ {
+ }
+
+ WebDAVResponseParser::~WebDAVResponseParser()
+ {
+ SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser destructed with existing content (!)");
+ while(mpContext)
+ {
+ pop_context();
+ }
+ }
+
+ void SAL_CALL WebDAVResponseParser::startDocument( )
+ {
+ SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser start with existing content (!)");
+ }
+
+ void SAL_CALL WebDAVResponseParser::endDocument( )
+ {
+ SAL_WARN_IF(mpContext, "ucb.ucp.webdav", "Parser end with existing content (!)");
+ }
+
+ void SAL_CALL WebDAVResponseParser::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
+ {
+ const sal_Int32 nLen(aName.getLength());
+
+ if(nLen)
+ {
+ // create new context (push)
+ mpContext = new WebDAVContext(mpContext, aName, xAttribs);
+
+ if(collectThisPropertyAsName())
+ {
+ // When collecting property names and parent is prop there is no need
+ // to handle the content of this property deeper (evtl. preparations)
+ }
+ else
+ {
+ switch(mpContext->getWebDAVNamespace())
+ {
+ default: // WebDAVNamespace_unknown, WebDAVNamespace_last or unhandled
+ {
+ break;
+ }
+ case WebDAVNamespace_DAV:
+ {
+ switch(mpContext->getWebDAVName())
+ {
+ default: // WebDAVName_unknown, WebDAVName_last or unhandled
+ {
+ break;
+ }
+ case WebDAVName_propstat:
+ {
+ // propstat start
+ if(isCollectingProperties())
+ {
+ // reset maPropStatProperties
+ maPropStatProperties.clear();
+ }
+ else
+ {
+ // when collecting properties reset maPropStatNames
+ maPropStatNames.clear();
+ }
+ break;
+ }
+ case WebDAVName_response:
+ {
+ // response start, reset Href and status and maResponseProperties
+ maHref.clear();
+ maStatus.clear();
+
+ if(isCollectingProperties())
+ {
+ // reset maResponseProperties
+ maResponseProperties.clear();
+ }
+ else
+ {
+ // reset maResponseNames when collecting properties
+ maResponseNames.clear();
+ }
+ break;
+ }
+ case WebDAVName_resourcetype:
+ {
+ // resourcetype start, reset collection
+ mbResourceTypeCollection = false;
+ break;
+ }
+ case WebDAVName_supportedlock:
+ {
+ // supportedlock start, reset maLockEntries
+ maLockEntries.realloc(0);
+ break;
+ }
+ case WebDAVName_lockentry:
+ {
+ // lockentry start, reset maLockEntries
+ mbLockScopeSet = false;
+ mbLockTypeSet = false;
+ break;
+ }
+ case WebDAVName_activelock:
+ {
+ maLock = ucb::Lock();
+ break;
+ }
+ }
+ break;
+ }
+ case WebDAVNamespace_ucb_openoffice_org_dav_props:
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ OUString MakePropertyName(WebDAVContext const& rContext)
+ {
+ OUString ret;
+ OString const name(OUStringToOString(rContext.getName(), RTL_TEXTENCODING_UTF8));
+ OString const nameSpace(OUStringToOString(rContext.getNamespace(), RTL_TEXTENCODING_UTF8));
+ DAVProperties::createUCBPropName(nameSpace.getStr(), name.getStr(), ret);
+ return ret;
+ }
+
+ void SAL_CALL WebDAVResponseParser::endElement( const OUString& aName )
+ {
+ const sal_Int32 nLen(aName.getLength());
+ SAL_WARN_IF(!mpContext, "ucb.ucp.webdav", "Parser EndElement without content (!)");
+
+ if(mpContext && nLen)
+ {
+ if(collectThisPropertyAsName())
+ {
+ // name must be encoded as expected by createSerfPropName()
+ OUString const name(MakePropertyName(*mpContext));
+ maPropStatNames.emplace_back(name);
+ }
+ else
+ {
+ switch(mpContext->getWebDAVNamespace())
+ {
+ default: // WebDAVNamespace_unknown, WebDAVNamespace_last or unhandled
+ {
+ break;
+ }
+ case WebDAVNamespace_DAV:
+ {
+ switch(mpContext->getWebDAVName())
+ {
+ default: // WebDAVName_unknown, WebDAVName_last or unhandled
+ {
+ break;
+ }
+ case WebDAVName_href:
+ {
+ // href end, save it if we have whitespace
+ if(whitespaceIsAvailable())
+ {
+ // Sharepoint 2016 workaround: apparently
+ // the result is an IRI (RFC 3987 possibly?)
+ // so try to encode the non-ASCII chars
+ // without changing anything else
+ maHref = ::rtl::Uri::encode(mpContext->getWhiteSpace(),
+ rtl_UriCharClassUric, rtl_UriEncodeKeepEscapes,
+ RTL_TEXTENCODING_UTF8);
+ }
+ break;
+ }
+ case WebDAVName_status:
+ {
+ // status end, save it if we have whitespace
+ if(whitespaceIsAvailable())
+ {
+ maStatus = mpContext->getWhiteSpace();
+ }
+ break;
+ }
+ case WebDAVName_getlastmodified:
+ {
+ // getlastmodified end, safe if content is correct
+ if(propertyIsReady())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:getlastmodified";
+ aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_creationdate:
+ {
+ // creationdate end, safe if content is correct
+ if(propertyIsReady())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:creationdate";
+ aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_collection:
+ {
+ // collection end, check and set
+ if(hasParent(WebDAVName_resourcetype))
+ {
+ mbResourceTypeCollection = true;
+ }
+ break;
+ }
+ case WebDAVName_resourcetype:
+ {
+ // resourcetype end, check for collection
+ if(hasParent(WebDAVName_prop))
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:resourcetype";
+ aDAVPropertyValue.Value <<= (mbResourceTypeCollection ? OUString("collection") : OUString());
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_getcontentlength:
+ {
+ // getcontentlength end, safe if content is correct
+ if(propertyIsReady())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:getcontentlength";
+ aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_getcontenttype:
+ {
+ // getcontenttype end, safe if content is correct
+ if(propertyIsReady())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:getcontenttype";
+ aDAVPropertyValue.Value <<= mpContext->getWhiteSpace();
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_supportedlock:
+ {
+ // supportedlock end
+ if(hasParent(WebDAVName_prop) && maLockEntries.hasElements())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:supportedlock";
+ aDAVPropertyValue.Value <<= maLockEntries;
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_lockentry:
+ {
+ // lockentry end
+ if(hasParent(WebDAVName_supportedlock) && (mbLockScopeSet && mbLockTypeSet))
+ {
+ const sal_Int32 nLength(maLockEntries.getLength());
+ ucb::LockEntry aEntry;
+
+ aEntry.Scope = maLockScope;
+ aEntry.Type = maLockType;
+ maLockEntries.realloc(nLength + 1);
+ maLockEntries.getArray()[nLength] = aEntry;
+ }
+ break;
+ }
+ case WebDAVName_owner:
+ {
+ maLock.Owner <<= mpContext->getWhiteSpace();
+ break;
+ }
+ case WebDAVName_timeout:
+ {
+ const OUString sTimeout(mpContext->getWhiteSpace());
+ if (sTimeout == "Infinite")
+ maLock.Timeout = -1;
+ else if (sTimeout.startsWith("Second-"))
+ maLock.Timeout = sTimeout.copy(7).toInt64();
+ break;
+ }
+ case WebDAVName_locktoken:
+ {
+ const OUString sLockToken(maHref);
+ SAL_WARN_IF(!sLockToken.startsWith("opaquelocktoken:"), "ucb.ucp.webdav",
+ "Parser error: wrong 'locktoken' value.");
+ const sal_Int32 nLength(maLock.LockTokens.getLength());
+ maLock.LockTokens.realloc(nLength+1);
+ maLock.LockTokens.getArray()[nLength] = sLockToken;
+ break;
+ }
+ case WebDAVName_exclusive:
+ {
+ // exclusive lockscope end
+ if(hasParent(WebDAVName_lockscope))
+ {
+ maLockScope = ucb::LockScope_EXCLUSIVE;
+ mbLockScopeSet = true;
+ }
+ break;
+ }
+ case WebDAVName_shared:
+ {
+ // shared lockscope end
+ if(hasParent(WebDAVName_lockscope))
+ {
+ maLockScope = ucb::LockScope_SHARED;
+ mbLockScopeSet = true;
+ }
+ break;
+ }
+ case WebDAVName_write:
+ {
+ // write locktype end
+ if(hasParent(WebDAVName_locktype))
+ {
+ maLockType = ucb::LockType_WRITE;
+ mbLockTypeSet = true;
+ }
+ break;
+ }
+ case WebDAVName_depth:
+ {
+ OUString const chars(mpContext->getWhiteSpace());
+ if (chars == "0")
+ {
+ maLock.Depth = ucb::LockDepth_ZERO;
+ }
+ else if (chars == "1")
+ {
+ maLock.Depth = ucb::LockDepth_ONE;
+ }
+ else if (chars == "infinity")
+ {
+ maLock.Depth = ucb::LockDepth_INFINITY;
+ }
+ break;
+ }
+ case WebDAVName_activelock:
+ {
+ maLock.Type = maLockType;
+ maLock.Scope = maLockScope;
+ maResult_Lock.push_back(maLock);
+ break;
+ }
+ case WebDAVName_lockdiscovery:
+ {
+ // lockdiscovery may be requested via PROPFIND,
+ // in addition to LOCK! so return it 2 ways
+ if (isCollectingProperties())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+
+ aDAVPropertyValue.Name = "DAV:lockdiscovery";
+ aDAVPropertyValue.Value <<= ::comphelper::containerToSequence(maResult_Lock);
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ break;
+ }
+ case WebDAVName_propstat:
+ {
+ // propstat end, check status
+ if(maStatus.getLength())
+ {
+ if(maStatus == "HTTP/1.1 200 OK")
+ {
+ if(isCollectingProperties())
+ {
+ if(!maPropStatProperties.empty())
+ {
+ // append to maResponseProperties if okay
+ maResponseProperties.insert(maResponseProperties.end(), maPropStatProperties.begin(), maPropStatProperties.end());
+ }
+ }
+ else
+ {
+ if(!maPropStatNames.empty())
+ {
+ // when collecting properties append to
+ maResponseNames.insert(maResponseNames.end(), maPropStatNames.begin(), maPropStatNames.end());
+ }
+ }
+ }
+ }
+ break;
+ }
+ case WebDAVName_response:
+ {
+ // response end
+ if(maHref.getLength())
+ {
+ if(isCollectingProperties())
+ {
+ // create DAVResource when we have content
+ if(!maResponseProperties.empty())
+ {
+ http_dav_ucp::DAVResource aDAVResource;
+
+ aDAVResource.uri = maHref;
+ aDAVResource.properties = maResponseProperties;
+ maResult_PropFind.push_back(aDAVResource);
+ }
+ }
+ else
+ {
+ // when collecting properties add them to result when there are some
+ if(!maResponseNames.empty())
+ {
+ http_dav_ucp::DAVResourceInfo aDAVResourceInfo;
+
+ aDAVResourceInfo.properties = maResponseNames;
+ maResult_PropName.push_back(aDAVResourceInfo);
+ }
+ }
+ }
+ break;
+ }
+ }
+ break;
+ }
+ case WebDAVNamespace_ucb_openoffice_org_dav_props:
+ {
+ switch(mpContext->getWebDAVName())
+ {
+ case WebDAVName_type:
+ {
+ m_UCBType = mpContext->getWhiteSpace();
+ break;
+ }
+ case WebDAVName_value:
+ {
+ m_UCBValue = mpContext->getWhiteSpace();
+ break;
+ }
+ case WebDAVName_ucbprop:
+ {
+ if (!m_UCBType.isEmpty()
+ && isCollectingProperties())
+ {
+ http_dav_ucp::DAVPropertyValue aDAVPropertyValue;
+ aDAVPropertyValue.Name = MakePropertyName(*mpContext->getParent());
+ if (UCBDeadPropertyValue::createFromXML(m_UCBType, m_UCBValue, aDAVPropertyValue.Value))
+ {
+ maPropStatProperties.push_back(aDAVPropertyValue);
+ }
+ else
+ {
+ SAL_INFO("ucb.ucp.webdav.curl", "cannot parse property value");
+ }
+ }
+ m_UCBType.clear();
+ m_UCBValue.clear();
+ break;
+ }
+ default:
+ break;
+ }
+ break;
+ }
+ }
+ }
+
+ // destroy last context (pop)
+ pop_context();
+ }
+ }
+
+ void SAL_CALL WebDAVResponseParser::characters( const OUString& aChars )
+ {
+ // collect whitespace over evtl. several calls in mpContext
+ SAL_WARN_IF(!mpContext, "ucb.ucp.webdav", "Parser characters without content (!)");
+ const sal_Int32 nLen(aChars.getLength());
+
+ if(mpContext && nLen)
+ {
+ // remove leading/trailing blanks and CRLF
+ const OUString aTrimmedChars(aChars.trim());
+
+ if(aTrimmedChars.getLength())
+ {
+ OUString aNew(mpContext->getWhiteSpace());
+
+ if(aNew.getLength())
+ {
+ // add one char when appending (see html1.1 spec)
+ aNew += " ";
+ }
+
+ aNew += aTrimmedChars;
+ mpContext->setWhiteSpace(aNew);
+ }
+ }
+ }
+
+ void SAL_CALL WebDAVResponseParser::ignorableWhitespace( const OUString& /*aWhitespaces*/ )
+ {
+ }
+
+ void SAL_CALL WebDAVResponseParser::processingInstruction( const OUString& /*aTarget*/, const OUString& /*aData*/ )
+ {
+ }
+
+ void SAL_CALL WebDAVResponseParser::setDocumentLocator( const uno::Reference< xml::sax::XLocator >& /*xLocator*/ )
+ {
+ }
+} // end of anonymous namespace
+
+
+// wrapper for various calls to the parser
+
+namespace
+{
+ template<typename T>
+ void parseWebDAVResponse(
+ const uno::Reference< io::XInputStream >& xInputStream,
+ std::vector< T >& rResult,
+ WebDAVResponseParserMode eWebDAVResponseParserMode,
+ std::vector<T> const & (WebDAVResponseParser::* fn)() const)
+ {
+ if(xInputStream.is())
+ {
+ try
+ {
+ // prepare ParserInputSource
+ xml::sax::InputSource myInputSource;
+ myInputSource.aInputStream = xInputStream;
+
+ // get parser
+ uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(
+ comphelper::getProcessComponentContext() );
+
+ // create parser; connect parser and filter
+ rtl::Reference<WebDAVResponseParser> const pWebDAVResponseParser(
+ new WebDAVResponseParser(eWebDAVResponseParserMode));
+ uno::Reference< xml::sax::XDocumentHandler > xWebDAVHdl(pWebDAVResponseParser.get());
+ xParser->setDocumentHandler(xWebDAVHdl);
+
+ // finally, parse the stream
+ xParser->parseStream(myInputSource);
+
+ // get result
+ rResult = (pWebDAVResponseParser.get()->*fn)();
+ }
+ catch(uno::Exception&)
+ {
+ SAL_WARN("ucb.ucp.webdav", "WebDAV Parse error (!)");
+ }
+ }
+ }
+} // end of anonymous namespace
+
+
+// helper to parse a XML WebDAV response
+
+namespace http_dav_ucp
+{
+ std::vector< ucb::Lock > parseWebDAVLockResponse(const uno::Reference< io::XInputStream >& xInputStream)
+ {
+ std::vector< ucb::Lock > aResult;
+ parseWebDAVResponse< ucb::Lock >(xInputStream, aResult, WebDAVResponseParserMode_Lock, &WebDAVResponseParser::getResult_Lock);
+ return aResult;
+ }
+
+ std::vector< DAVResource > parseWebDAVPropFindResponse(const uno::Reference< io::XInputStream >& xInputStream)
+ {
+ std::vector< DAVResource > aResult;
+ parseWebDAVResponse< DAVResource >(xInputStream, aResult, WebDAVResponseParserMode_PropFind, &WebDAVResponseParser::getResult_PropFind);
+ return aResult;
+ }
+
+ std::vector< DAVResourceInfo > parseWebDAVPropNameResponse(const uno::Reference< io::XInputStream >& xInputStream)
+ {
+ std::vector< DAVResourceInfo > aResult;
+ parseWebDAVResponse< DAVResourceInfo >(xInputStream, aResult, WebDAVResponseParserMode_PropName, &WebDAVResponseParser::getResult_PropName);
+ return aResult;
+ }
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.hxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.hxx
new file mode 100644
index 000000000000..c62cb3205df8
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.hxx
@@ -0,0 +1,38 @@
+/* -*- 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 .
+ */
+
+#pragma once
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/ucb/Lock.hpp>
+#include "DAVResource.hxx"
+#include <vector>
+
+namespace http_dav_ucp
+{
+std::vector<css::ucb::Lock>
+parseWebDAVLockResponse(const css::uno::Reference<css::io::XInputStream>& xInputStream);
+std::vector<DAVResource>
+parseWebDAVPropFindResponse(const css::uno::Reference<css::io::XInputStream>& xInputStream);
+std::vector<DAVResourceInfo>
+parseWebDAVPropNameResponse(const css::uno::Reference<css::io::XInputStream>& xInputStream);
+} // namespace http_dav_ucp
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavresultset.cxx b/ucb/source/ucp/webdav-curl/webdavresultset.cxx
new file mode 100644
index 000000000000..e67dd1558d1a
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavresultset.cxx
@@ -0,0 +1,76 @@
+/* -*- 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 .
+ */
+
+/**************************************************************************
+ TODO
+ **************************************************************************
+
+ - This implementation is not a dynamic result set!!! It only implements
+ the necessary interfaces, but never recognizes/notifies changes!!!
+
+ *************************************************************************/
+#include "webdavresultset.hxx"
+
+using namespace com::sun::star;
+using namespace http_dav_ucp;
+
+
+// DynamicResultSet Implementation.
+
+
+DynamicResultSet::DynamicResultSet(
+ const uno::Reference< uno::XComponentContext >& rxContext,
+ const rtl::Reference< Content >& rxContent,
+ const ucb::OpenCommandArgument2& rCommand,
+ const uno::Reference< ucb::XCommandEnvironment >& rxEnv )
+: ResultSetImplHelper( rxContext, rCommand ),
+ m_xContent( rxContent ),
+ m_xEnv( rxEnv )
+{
+}
+
+
+// Non-interface methods.
+
+
+void DynamicResultSet::initStatic()
+{
+ m_xResultSet1
+ = new ::ucbhelper::ResultSet( m_xContext,
+ m_aCommand.Properties,
+ new DataSupplier( m_xContext,
+ m_xContent,
+ m_aCommand.Mode ),
+ m_xEnv );
+}
+
+
+void DynamicResultSet::initDynamic()
+{
+ m_xResultSet1
+ = new ::ucbhelper::ResultSet( m_xContext,
+ m_aCommand.Properties,
+ new DataSupplier( m_xContext,
+ m_xContent,
+ m_aCommand.Mode ),
+ m_xEnv );
+ m_xResultSet2 = m_xResultSet1;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-curl/webdavresultset.hxx b/ucb/source/ucp/webdav-curl/webdavresultset.hxx
new file mode 100644
index 000000000000..0a52d7982ae0
--- /dev/null
+++ b/ucb/source/ucp/webdav-curl/webdavresultset.hxx
@@ -0,0 +1,48 @@
+/* -*- 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 .
+ */
+
+
+#pragma once
+
+#include <rtl/ref.hxx>
+#include <ucbhelper/resultsethelper.hxx>
+#include "webdavcontent.hxx"
+#include "webdavdatasupplier.hxx"
+
+namespace http_dav_ucp {
+
+class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
+{
+ rtl::Reference< Content > m_xContent;
+ css::uno::Reference< css::ucb::XCommandEnvironment > m_xEnv;
+
+private:
+ virtual void initStatic() override;
+ virtual void initDynamic() override;
+
+public:
+ DynamicResultSet( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ const rtl::Reference< Content >& rxContent,
+ const css::ucb::OpenCommandArgument2& rCommand,
+ const css::uno::Reference< css::ucb::XCommandEnvironment >& rxEnv );
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/ucpdav1.component b/ucb/source/ucp/webdav-neon/ucpdav1.component
index 5bebe253554e..23be195bf453 100644
--- a/ucb/source/ucp/webdav-neon/ucpdav1.component
+++ b/ucb/source/ucp/webdav-neon/ucpdav1.component
@@ -27,8 +27,9 @@
**********************************************************************-->
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
- prefix="ucpdav1" xmlns="http://openoffice.org/2010/uno-components">
- <implementation name="com.sun.star.comp.WebDAVContentProvider">
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.WebDAVContentProvider"
+ constructor="ucb_webdav_neon_ContentProvider_get_implementation">
<service name="com.sun.star.ucb.WebDAVContentProvider"/>
</implementation>
</component>
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
index 2b0bd5bfe92b..bbe18ecbac61 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
@@ -96,28 +96,23 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
// XServiceInfo methods.
-XSERVICEINFO_COMMOM_IMPL( ContentProvider,
- "com.sun.star.comp.WebDAVContentProvider" )
-/// @throws css::uno::Exception
-static css::uno::Reference< css::uno::XInterface >
-ContentProvider_CreateInstance( const css::uno::Reference< css::lang::XMultiServiceFactory> & rSMgr )
+OUString
+ContentProvider::getImplementationName()
{
- css::lang::XServiceInfo* pX = new ContentProvider( ucbhelper::getComponentContext(rSMgr) );
- return css::uno::Reference< css::uno::XInterface >::query( pX );
+ return "com.sun.star.comp.WebDAVContentProvider";
}
css::uno::Sequence< OUString >
-ContentProvider::getSupportedServiceNames_Static()
+ContentProvider::getSupportedServiceNames()
{
- css::uno::Sequence< OUString > aSNS { WEBDAV_CONTENT_PROVIDER_SERVICE_NAME };
- return aSNS;
+ return { WEBDAV_CONTENT_PROVIDER_SERVICE_NAME };
}
-// Service factory implementation.
-
-
-ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
-
+sal_Bool
+ContentProvider::supportsService(const OUString& s)
+{
+ return cppu::supportsService(this, s);
+}
// XContentProvider methods.
@@ -185,4 +180,21 @@ ContentProvider::queryContent(
return xContent;
}
+#include <officecfg/Inet.hxx>
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+ucb_webdav_ContentProvider_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&);
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+ucb_webdav_neon_ContentProvider_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+ auto const useCurl(officecfg::Inet::Settings::WebDAVCurl::get(context));
+ if (useCurl)
+ return ucb_webdav_ContentProvider_get_implementation(context, {});
+ else
+ return cppu::acquire(new ContentProvider(context));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.hxx b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
index 80556ab23447..2e30d3f0a35d 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.hxx
@@ -90,13 +90,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
- static OUString getImplementationName_Static();
- static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
-
- static css::uno::Reference< css::lang::XSingleServiceFactory >
- createServiceFactory( const css::uno::Reference<
- css::lang::XMultiServiceFactory >& rxServiceMgr );
-
// XContentProvider
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL
queryContent( const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier ) override;
diff --git a/ucb/source/ucp/webdav-neon/webdavservices.cxx b/ucb/source/ucp/webdav-neon/webdavservices.cxx
deleted file mode 100644
index f5a3116a9475..000000000000
--- a/ucb/source/ucp/webdav-neon/webdavservices.cxx
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include "webdavprovider.hxx"
-
-using namespace com::sun::star;
-
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * ucpdav1_component_getFactory(
- const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
-{
- void * pRet = nullptr;
-
- uno::Reference< lang::XMultiServiceFactory > xSMgr(
- static_cast< lang::XMultiServiceFactory * >(
- pServiceManager ) );
- uno::Reference< lang::XSingleServiceFactory > xFactory;
-
-
- // WebDAV Content Provider.
-
-
- if ( ::webdav_ucp::ContentProvider::getImplementationName_Static().
- equalsAscii( pImplName ) )
- {
- xFactory = ::webdav_ucp::ContentProvider::createServiceFactory( xSMgr );
- }
-
-
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index 9a78c0648ebe..2fe0151c6cf8 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -103,8 +103,16 @@ ContentProvider::getSupportedServiceNames_Static()
// Service factory implementation.
+css::uno::Reference< css::lang::XSingleServiceFactory >
+ContentProvider::createServiceFactory( const css::uno::Reference< css::lang::XMultiServiceFactory >& rxServiceMgr )
+{
+ return cppu::createOneInstanceFactory(
+ rxServiceMgr,
+ ContentProvider::getImplementationName_Static(),
+ ContentProvider_CreateInstance,
+ ContentProvider::getSupportedServiceNames_Static() );
+}
-ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
// XContentProvider methods.
diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx
index 786c83df2e7b..07e604be7ed7 100644
--- a/unotools/source/i18n/resmgr.cxx
+++ b/unotools/source/i18n/resmgr.cxx
@@ -121,8 +121,13 @@ namespace Translate
if (aFind != aCache.end())
return aFind->second;
boost::locale::generator gen;
+#if BOOST_VERSION < 108100
gen.characters(boost::locale::char_facet);
gen.categories(boost::locale::message_facet | boost::locale::information_facet);
+#else
+ gen.characters(boost::locale::char_facet_t::char_f);
+ gen.categories(boost::locale::category_t::message | boost::locale::category_t::information);
+#endif
OUString uri("$BRAND_BASE_DIR/$BRAND_SHARE_RESOURCE_SUBDIR/");
rtl::Bootstrap::expandMacros(uri);
OUString path;
diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx
index 0a80d2a4cadc..f9bdec2917eb 100644
--- a/unoxml/qa/unit/domtest.cxx
+++ b/unoxml/qa/unit/domtest.cxx
@@ -207,9 +207,9 @@ struct BasicTest : public test::BootstrapFixture
mxErrHandler.set( new ErrorHandler() );
uno::Reference<XDocumentBuilder> xDB( getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"), uno::UNO_QUERY_THROW );
mxDomBuilder.set( xDB );
- mxValidInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(validTestFile), SAL_N_ELEMENTS(validTestFile))) );
- mxWarningInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(warningTestFile), SAL_N_ELEMENTS(warningTestFile))) );
- mxErrorInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(errorTestFile), SAL_N_ELEMENTS(errorTestFile))) );
+ mxValidInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(validTestFile), SAL_N_ELEMENTS(validTestFile)-1)) );
+ mxWarningInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(warningTestFile), SAL_N_ELEMENTS(warningTestFile)-1)) );
+ mxErrorInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(errorTestFile), SAL_N_ELEMENTS(errorTestFile)-1)) );
mxDomBuilder->setErrorHandler(mxErrHandler.get());
}
@@ -293,7 +293,7 @@ struct SerializerTest : public test::BootstrapFixture
mxErrHandler.set( new ErrorHandler() );
uno::Reference<XDocumentBuilder> xDB( getMultiServiceFactory()->createInstance("com.sun.star.xml.dom.DocumentBuilder"), uno::UNO_QUERY_THROW );
mxDomBuilder.set( xDB );
- mxInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(validTestFile), SAL_N_ELEMENTS(validTestFile))) );
+ mxInStream.set( new SequenceInputStream(css::uno::Sequence<sal_Int8>(reinterpret_cast<sal_Int8 const *>(validTestFile), SAL_N_ELEMENTS(validTestFile)-1)) );
mxDomBuilder->setErrorHandler(mxErrHandler.get());
mxHandler.set( new DocumentHandler );
mxTokHandler.set( new TokenHandler );
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index 4ff411d3f62c..39889e114c99 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <memory>
+#include <libxml/entities.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index e84ff5bdc8d3..bcd2e01bac15 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -41,6 +41,7 @@
#include <eventdispatcher.hxx>
#include <string.h>
+#include <libxml/xmlIO.h>
#include <osl/diagnose.h>
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 5a03cf0bcf2d..7b1d97ac44e4 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -25,6 +25,7 @@
#include <libxml/xmlerror.h>
#include <libxml/tree.h>
+#include <libxml/parser.h>
#include <memory>
diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
index 74b1faaf7e75..0b8c384ddcc1 100644
--- a/unoxml/source/dom/entity.cxx
+++ b/unoxml/source/dom/entity.cxx
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <string.h>
+#include <libxml/entities.h>
using namespace css::uno;
using namespace css::xml::dom;
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index 5d3e6d8c6189..a87781c57c85 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -26,6 +26,7 @@
#include <libxml/xmlerror.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#include <libxml/xmlIO.h>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -233,7 +234,7 @@ namespace XPath
return selectSingleNode(contextNode, expr);
}
- static OUString make_error_message(xmlErrorPtr pError)
+ static OUString make_error_message(const xmlError* pError)
{
OUStringBuffer buf;
if (pError) {
@@ -279,7 +280,11 @@ namespace XPath
SAL_WARN("unoxml", "libxml2 error: " << str);
}
+#if LIBXML_VERSION >= 21200
+ static void structured_error_func(void *, const xmlError* error)
+#else
static void structured_error_func(void *, xmlErrorPtr error)
+#endif
{
SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
}
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 4835a485dd2a..5764e62cb1c6 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/Library_vclplug_win.mk b/vcl/Library_vclplug_win.mk
index 2b05aae476b3..f0e48cd77ad3 100644
--- a/vcl/Library_vclplug_win.mk
+++ b/vcl/Library_vclplug_win.mk
@@ -19,6 +19,8 @@
$(eval $(call gb_Library_Library,vclplug_win))
+$(eval $(call gb_Library_set_componentfile,vclplug_win,vcl/vclplug_win))
+
$(eval $(call gb_Library_set_include,vclplug_win,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
@@ -43,6 +45,7 @@ $(eval $(call gb_Library_use_libraries,vclplug_win,\
basegfx \
comphelper \
cppu \
+ cppuhelper \
i18nlangtag \
i18nutil \
sal \
@@ -66,32 +69,59 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_win,\
vcl/win/app/salinst \
vcl/win/app/salshl \
vcl/win/app/saltimer \
+ vcl/win/dtrans/APNDataObject \
+ vcl/win/dtrans/clipboardmanager \
+ vcl/win/dtrans/DataFmtTransl \
+ vcl/win/dtrans/DOTransferable \
+ vcl/win/dtrans/DtObjFactory \
+ vcl/win/dtrans/DTransHelper \
+ vcl/win/dtrans/Fetc \
+ vcl/win/dtrans/FetcList \
+ vcl/win/dtrans/FmtFilter \
+ vcl/win/dtrans/ftransl \
+ vcl/win/dtrans/generic_clipboard \
+ vcl/win/dtrans/globals \
+ vcl/win/dtrans/idroptarget \
+ vcl/win/dtrans/ImplHelper \
+ vcl/win/dtrans/MtaOleClipb \
+ vcl/win/dtrans/source \
+ vcl/win/dtrans/sourcecontext \
+ vcl/win/dtrans/target \
+ vcl/win/dtrans/targetdragcontext \
+ vcl/win/dtrans/targetdropcontext \
+ vcl/win/dtrans/TxtCnvtHlp \
+ vcl/win/dtrans/WinClipboard \
+ vcl/win/dtrans/XNotifyingDataObject \
+ vcl/win/dtrans/XTDataObject \
vcl/win/gdi/gdiimpl \
vcl/win/gdi/salbmp \
+ vcl/win/gdi/salfont \
vcl/win/gdi/salgdi \
vcl/win/gdi/salgdi2 \
- vcl/win/gdi/salfont \
vcl/win/gdi/salgdi_gdiplus \
vcl/win/gdi/salnativewidgets-luna \
vcl/win/gdi/salprn \
vcl/win/gdi/salvd \
vcl/win/gdi/winlayout \
vcl/win/gdi/DWriteTextRenderer \
- vcl/win/window/salframe \
vcl/win/window/keynames \
+ vcl/win/window/salframe \
vcl/win/window/salmenu \
vcl/win/window/salobj \
))
$(eval $(call gb_Library_use_system_win32_libs,vclplug_win,\
+ advapi32 \
d2d1 \
dwrite \
gdi32 \
gdiplus \
imm32 \
ole32 \
+ oleaut32 \
shell32 \
shlwapi \
+ uuid \
version \
winspool \
))
diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx
index 0510006fa3ea..057415ce4a7c 100644
--- a/vcl/inc/brdwin.hxx
+++ b/vcl/inc/brdwin.hxx
@@ -171,6 +171,8 @@ public:
tools::Rectangle GetMenuRect() const;
virtual Size GetOptimalSize() const override;
+
+ virtual void FlashWindow() const override;
};
struct ImplBorderFrameData
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 4b540d61ca0e..74d4946eb262 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -208,6 +208,8 @@ public:
virtual void Beep() = 0;
+ virtual void FlashWindow() const {};
+
// returns system data (most prominent: window handle)
virtual const SystemEnvData*
GetSystemData() const = 0;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index 25c6819bb7e2..f7bf988de410 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -126,6 +126,7 @@ public:
virtual LanguageType GetInputLanguage() override;
virtual void UpdateSettings( AllSettings& rSettings ) override;
virtual void Beep() override;
+ virtual void FlashWindow() const override;
virtual const SystemEnvData* GetSystemData() const override;
virtual SalPointerState GetPointerState() override;
virtual KeyIndicatorState GetIndicatorState() override;
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index d6d8dea14c24..5c83afae34b7 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -170,20 +170,21 @@ private:
bool CacheGlyphs(const GenericSalLayout& rLayout);
bool DrawCachedGlyphs(const GenericSalLayout& rLayout);
+ // just call both from setHDC!
+ void InitGraphics();
+ void DeInitGraphics();
public:
HFONT ImplDoSetFont(FontSelectPattern const & i_rFont, const PhysicalFontFace * i_pFontFace, float& o_rFontScale, HFONT& o_rOldFont);
HDC getHDC() const { return mhLocalDC; }
- void setHDC(HDC aNew) { mhLocalDC = aNew; }
+ void setHDC(HDC aNew);
HPALETTE getDefPal() const;
void setDefPal(HPALETTE hDefPal);
HRGN getRegion() const;
- void InitGraphics();
- void DeInitGraphics();
enum Type
{
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
index c0c6e7fb7932..9e921dd3090e 100644
--- a/vcl/inc/win/salprn.h
+++ b/vcl/inc/win/salprn.h
@@ -40,19 +40,24 @@ struct SalDriverData
class WinSalGraphics;
-class WinSalInfoPrinter : public SalInfoPrinter
+class WinSalInfoPrinter final : public SalInfoPrinter
{
public:
- WinSalGraphics* mpGraphics; // current Printer graphics
OUString maDriverName; // printer driver name
OUString maDeviceName; // printer device name
OUString maPortName; // printer port name
- HDC mhDC; // printer hdc
- bool mbGraphics; // is Graphics used
+
+private:
+ HDC m_hDC; ///< printer hdc
+ WinSalGraphics* m_pGraphics; ///< current Printer graphics
+ bool m_bGraphics; ///< is Graphics used
+
public:
WinSalInfoPrinter();
virtual ~WinSalInfoPrinter() override;
+ void setHDC(HDC);
+
virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics( SalGraphics* pGraphics ) override;
virtual bool Setup( weld::Window* pFrame, ImplJobSetup* pSetupData ) override;
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 723202eccf15..344a74f87521 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -674,7 +674,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);
}
@@ -1698,7 +1699,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;
@@ -1733,7 +1734,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 **");
}
@@ -1764,7 +1765,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();
}
@@ -1950,7 +1951,7 @@ void PdfExportTest::testPdfImageResourceInlineXObjectRef()
FPDF_PAGEOBJECT pImage = FPDFFormObj_GetObject(pInnerFormObject, 0);
CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(pImage));
FS_MATRIX aMatrix;
- FPDFFormObj_GetMatrix(pInnerFormObject, &aMatrix);
+ FPDFPageObj_GetMatrix(pInnerFormObject, &aMatrix);
basegfx::B2DHomMatrix aMat{ aMatrix.a, aMatrix.c, aMatrix.e, aMatrix.b, aMatrix.d, aMatrix.f };
basegfx::B2DTuple aScale;
basegfx::B2DTuple aTranslate;
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4231a572d81c..ebbc07b8f56e 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3474,6 +3474,13 @@ public:
m_xTreeView->Resize();
}
+ virtual void set_column_editables(const std::vector<bool>& rEditables) override
+ {
+ size_t nTabCount = rEditables.size();
+ for (size_t i = 0 ; i < nTabCount; ++i)
+ m_xTreeView->SetTabEditable(i, rEditables[i]);
+ }
+
virtual void set_centered_column(int nCol) override
{
m_xTreeView->SetTabJustify(nCol, SvTabJustify::AdjustCenter);
@@ -4276,6 +4283,8 @@ public:
virtual OUString get_id(const weld::TreeIter& rIter) const override
{
const SalInstanceTreeIter& rVclIter = static_cast<const SalInstanceTreeIter&>(rIter);
+ if (!rVclIter.iter)
+ return OUString();
const OUString* pStr = static_cast<const OUString*>(rVclIter.iter->GetUserData());
if (pStr)
return *pStr;
@@ -4422,8 +4431,7 @@ public:
virtual void set_sort_indicator(TriState eState, int col) override
{
- if (col == -1)
- col = 0;
+ assert(col >= 0 && "cannot sort on expander column");
LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get());
if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr)
@@ -4445,8 +4453,7 @@ public:
virtual TriState get_sort_indicator(int col) const override
{
- if (col == -1)
- col = 0;
+ assert(col >= 0 && "cannot sort on expander column");
LclHeaderTabListBox* pHeaderBox = dynamic_cast<LclHeaderTabListBox*>(m_xTreeView.get());
if (HeaderBar* pHeaderBar = pHeaderBox ? pHeaderBox->GetHeaderBar() : nullptr)
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index a4ae36cffe15..5607a62d833a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -77,6 +77,7 @@ public:
long mnSeparatorX;
DrawButtonFlags mnButtonState;
bool mbSmallSymbol;
+ bool mbGeneratedTooltip;
Image maImage;
ImageAlign meImageAlign;
@@ -87,7 +88,7 @@ public:
};
ImplCommonButtonData::ImplCommonButtonData() : maFocusRect(), mnSeparatorX(0), mnButtonState(DrawButtonFlags::NONE),
-mbSmallSymbol(false), maImage(), meImageAlign(ImageAlign::Top), meSymbolAlign(SymbolAlign::LEFT)
+mbSmallSymbol(false), mbGeneratedTooltip(false), maImage(), meImageAlign(ImageAlign::Top), meSymbolAlign(SymbolAlign::LEFT)
{
}
@@ -219,8 +220,13 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, Point& rPos,
tools::Rectangle textRect = GetTextRect(
tools::Rectangle(Point(), Size(0x7fffffff, 0x7fffffff)), aText, nTextStyle);
// If the button text doesn't fit into it, put it into a tooltip (might happen in sidebar)
+ if (GetQuickHelpText()!= aText && mpButtonData->mbGeneratedTooltip)
+ SetQuickHelpText("");
if (GetQuickHelpText().isEmpty() && textRect.getWidth() > rSize.getWidth())
+ {
SetQuickHelpText(aText);
+ mpButtonData->mbGeneratedTooltip = true;
+ }
ImplSetFocusRect(aOutRect);
rSize = aOutRect.GetSize();
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index fd6e6f96df10..8a684e472e0a 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -362,7 +362,13 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr
if( glyphID >= ttf->nglyphs ) /*- glyph is not present in the font */
return 0;
- const sal_uInt8* ptr = table + ttf->goffsets[glyphID];
+ sal_uInt32 nGlyphOffset = ttf->goffsets[glyphID];
+ if (nGlyphOffset > nTableSize)
+ return 0;
+
+ const sal_uInt8* ptr = table + nGlyphOffset;
+ const sal_uInt32 nMaxGlyphSize = nTableSize - nGlyphOffset;
+
const sal_Int16 numberOfContours = GetInt16(ptr, GLYF_numberOfContours_offset);
if( numberOfContours <= 0 ) /*- glyph is not simple */
return 0;
@@ -377,7 +383,7 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr
/* determine the last point and be extra safe about it. But probably this code is not needed */
sal_uInt16 lastPoint=0;
- const sal_Int32 nMaxContours = (nTableSize - 10)/2;
+ const sal_Int32 nMaxContours = (nMaxGlyphSize - 10)/2;
if (numberOfContours > nMaxContours)
return 0;
for (i=0; i<numberOfContours; i++)
@@ -394,7 +400,7 @@ static int GetSimpleTTOutline(TrueTypeFont const *ttf, sal_uInt32 glyphID, Contr
const sal_uInt8* p = ptr + nOffset;
const sal_uInt32 nBytesRemaining = nTableSize - nOffset;
- const sal_uInt16 palen = lastPoint+1;
+ const sal_uInt32 palen = lastPoint+1;
//at a minimum its one byte per entry
if (palen > nBytesRemaining || lastPoint > nBytesRemaining-1)
diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index e78f6d01853b..e80260160c45 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -25,6 +25,7 @@
#include "ttcr.hxx"
#include "list.h"
+#include <sal/log.hxx>
#include <string.h>
namespace vcl
@@ -1250,7 +1251,7 @@ static void ProcessTables(TrueTypeCreator *tt)
/* printf("IDs: %d %d.\n", gd->glyphID, gd->newID); */
- if (gd->nbytes != 0) {
+ if (gd->nbytes >= 10) {
z = GetInt16(gd->ptr, 2);
if (z < xMin) xMin = z;
@@ -1288,14 +1289,21 @@ static void ProcessTables(TrueTypeCreator *tt)
do {
GlyphData *gd = static_cast<GlyphData *>(listCurrent(glyphlist));
- if (gd->compflag) { /* re-number all components */
+ if (gd->compflag && gd->nbytes > 10) { /* re-number all components */
sal_uInt16 flags, index;
sal_uInt8 *ptr = gd->ptr + 10;
+ size_t nRemaining = gd->nbytes - 10;
do {
- sal_uInt32 j;
+ if (nRemaining < 4)
+ {
+ SAL_WARN("vcl.fonts", "truncated font");
+ break;
+ }
flags = GetUInt16(ptr, 0);
index = GetUInt16(ptr, 2);
+
/* XXX use the sorted array of old to new glyphID mapping and do a binary search */
+ sal_uInt32 j;
for (j = 0; j < nGlyphs; j++) {
if (gid[j] == index) {
break;
@@ -1306,20 +1314,32 @@ static void ProcessTables(TrueTypeCreator *tt)
PutUInt16(static_cast<sal_uInt16>(j), ptr, 2);
ptr += 4;
+ nRemaining -= 4;
+ sal_uInt32 nAdvance = 0;
if (flags & ARG_1_AND_2_ARE_WORDS) {
- ptr += 4;
+ nAdvance += 4;
} else {
- ptr += 2;
+ nAdvance += 2;
}
if (flags & WE_HAVE_A_SCALE) {
- ptr += 2;
+ nAdvance += 2;
} else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {
- ptr += 4;
+ nAdvance += 4;
} else if (flags & WE_HAVE_A_TWO_BY_TWO) {
- ptr += 8;
+ nAdvance += 8;
}
+
+ if (nRemaining < nAdvance)
+ {
+ SAL_WARN("vcl.fonts", "truncated font");
+ break;
+ }
+
+ ptr += nAdvance;
+ nRemaining -= nAdvance;
+
} while (flags & MORE_COMPONENTS);
}
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index b1ca8e3f80f7..c6641c14ef03 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -262,6 +262,13 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
if ( nSystem == JOBSET_FILE364_SYSTEM ||
nSystem == JOBSET_FILE605_SYSTEM )
{
+ if (nRead < sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData))
+ {
+ SAL_WARN("vcl", "Parsing error: " << sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData) <<
+ " required, but " << nRead << " available");
+ return rIStream;
+ }
+
Impl364JobSetupData* pOldJobData = reinterpret_cast<Impl364JobSetupData*>(pTempBuf.get() + sizeof( ImplOldJobSetupData ));
sal_uInt16 nOldJobDataSize = SVBT16ToUInt16( pOldJobData->nSize );
rJobData.SetSystem( SVBT16ToUInt16( pOldJobData->nSystem ) );
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 0cf07a6ac578..d197a636d574 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -547,13 +547,7 @@ bool Printer::AcquireGraphics() const
void Printer::ImplReleaseFonts()
{
-#ifdef UNX
- // HACK to fix an urgent P1 printing issue fast
- // WinSalPrinter does not respect GetGraphics/ReleaseGraphics conventions
- // so Printer::mpGraphics often points to a dead WinSalGraphics
- // TODO: fix WinSalPrinter's GetGraphics/ReleaseGraphics handling
mpGraphics->ReleaseFonts();
-#endif
mbNewFont = true;
mbInitFont = true;
@@ -562,7 +556,7 @@ void Printer::ImplReleaseFonts()
mpDeviceFontSizeList.reset();
}
-void Printer::ReleaseGraphics( bool bRelease )
+void Printer::ImplReleaseGraphics(bool bRelease)
{
DBG_TESTSOLARMUTEX();
@@ -615,6 +609,11 @@ void Printer::ReleaseGraphics( bool bRelease )
mpNextGraphics = nullptr;
}
+void Printer::ReleaseGraphics(bool bRelease)
+{
+ ImplReleaseGraphics(bRelease);
+}
+
void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
{
ImplSVData* pSVData = ImplGetSVData();
@@ -909,7 +908,7 @@ void Printer::dispose()
mpPrinterOptions.reset();
- ReleaseGraphics();
+ ImplReleaseGraphics();
if ( mpInfoPrinter )
ImplGetSVData()->mpDefInst->DestroyInfoPrinter( mpInfoPrinter );
if ( mpDisplayDev )
@@ -1600,8 +1599,8 @@ void Printer::ImplEndPage()
if ( mpPrinter )
{
- mpPrinter->EndPage();
ReleaseGraphics();
+ mpPrinter->EndPage();
mbDevOutput = false;
mpJobGraphics = nullptr;
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index dc48dea5c718..f61cbdb4e29c 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -244,6 +244,23 @@ namespace
nFollowingActionCount = remainingActions;
return std::min(remainingActions, nFollowingActionCount);
}
+
+ void ClampRange(const OUString& rStr, sal_Int32& rIndex, sal_Int32& rLength)
+ {
+ const sal_Int32 nStrLength = rStr.getLength();
+
+ if (rIndex < 0 || rIndex > nStrLength)
+ {
+ SAL_WARN("vcl.gdi", "inconsistent offset");
+ rIndex = nStrLength;
+ }
+
+ if (rLength < 0 || rLength > nStrLength - rIndex)
+ {
+ SAL_WARN("vcl.gdi", "inconsistent len");
+ rLength = nStrLength - rIndex;
+ }
+ }
}
#define LF_FACESIZE 32
@@ -687,6 +704,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
+ ClampRange(aStr, nIndex, nLen);
rMtf.AddAction( new MetaTextAction( aPt, aStr, nIndex, nLen ) );
}
@@ -777,6 +795,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
}
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
+ ClampRange(aStr, nIndex, nLen);
rMtf.AddAction( new MetaTextArrayAction( aPt, aStr, pDXAry.get(), nIndex, nLen ) );
}
@@ -803,6 +822,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
OUString aStr(OStringToOUString(aByteStr, eActualCharSet));
if ( nUnicodeCommentActionNumber == i )
ImplReadUnicodeComment( nUnicodeCommentStreamPos, rIStm, aStr );
+ ClampRange(aStr, nIndex, nLen);
rMtf.AddAction( new MetaStretchTextAction( aPt, nWidth, aStr, nIndex, nLen ) );
}
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 5942b5cb8784..865beabf37a9 100644
--- a/vcl/source/graphic/Manager.cxx
+++ b/vcl/source/graphic/Manager.cxx
@@ -84,7 +84,12 @@ void Manager::reduceGraphicMemory()
std::scoped_lock<std::recursive_mutex> aGuard(maMutex);
- for (ImpGraphic* pEachImpGraphic : m_pImpGraphicList)
+ // make a copy of m_pImpGraphicList because if we swap out a svg, the svg
+ // filter may create more temp Graphics which are auto-added to
+ // m_pImpGraphicList invalidating a loop over m_pImpGraphicList, e.g.
+ // reexport of tdf118346-1.odg
+ auto const aImpGraphicList = m_pImpGraphicList;
+ for (ImpGraphic* pEachImpGraphic : aImpGraphicList)
{
if (mnUsedSize < mnMemoryLimit * 0.7)
return;
diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx
index 1153c6b520cf..1726220f4519 100644
--- a/vcl/source/helper/strhelper.cxx
+++ b/vcl/source/helper/strhelper.cxx
@@ -83,7 +83,8 @@ void CopyUntil( sal_Unicode*& pTo, const sal_Unicode*& pFrom, sal_Unicode cUntil
*pTo = *pFrom;
pTo++;
}
- pFrom++;
+ if( *pFrom )
+ pFrom++;
} while( *pFrom && *pFrom != cUntil );
// copy the terminating character unless zero or protector
if( ! isProtect( *pFrom ) || bIncludeUntil )
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 33ff9e648213..4d05467aacc4 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -370,7 +370,14 @@ void OutputDevice::DrawHatchLine( const tools::Line& rLine, const tools::PolyPol
nAdd = 1;
if( nAdd )
+ {
+ if (nPCounter == HATCH_MAXPOINTS)
+ {
+ SAL_WARN("vcl.gdi", "too many hatch points");
+ return;
+ }
pPtBuffer[ nPCounter++ ] = Point( FRound( fX ), FRound( fY ) );
+ }
}
aCurSegment.SetStart( aCurSegment.GetEnd() );
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 0bb1d36fd35e..cea6f18410d1 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1079,7 +1079,7 @@ void OutputDevice::GetCaretPositions( const OUString& rStr, long* pCaretXArray,
for( i = 0; i < 2 * nLen; ++i )
if( pCaretXArray[ i ] >= 0 )
break;
- long nXPos = pCaretXArray[ i ];
+ long nXPos = (i < 2 * nLen) ? pCaretXArray[i] : -1;
for( i = 0; i < 2 * nLen; ++i )
{
if( pCaretXArray[ i ] >= 0 )
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 571855dde2b5..0898475e90b2 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -599,6 +599,8 @@ void OutputDevice::ImplDrawStrikeoutChar( long nBaseX, long nBaseY,
int nStrikeStrLen = (nWidth+(nStrikeoutWidth-1)) / nStrikeoutWidth;
if( nStrikeStrLen > nMaxStrikeStrLen )
nStrikeStrLen = nMaxStrikeStrLen;
+ else if (nStrikeStrLen < 0)
+ nStrikeStrLen = 0;
// build the strikeout string
for( int i = nTestStrLen; i < nStrikeStrLen; ++i)
diff --git a/vcl/source/toolkit/group.cxx b/vcl/source/toolkit/group.cxx
index 0743518f8ba1..f713b1f8fd43 100644
--- a/vcl/source/toolkit/group.cxx
+++ b/vcl/source/toolkit/group.cxx
@@ -60,9 +60,9 @@ void GroupBox::ImplInitSettings( bool bBackground )
if ( bBackground )
{
vcl::Window* pParent = GetParent();
- if ( (pParent->IsChildTransparentModeEnabled() ||
- !(pParent->GetStyle() & WB_CLIPCHILDREN) ) &&
- !IsControlBackground() )
+ if (pParent->IsChildTransparentModeEnabled() ||
+ !(pParent->GetStyle() & WB_CLIPCHILDREN) ||
+ !IsControlBackground())
{
EnableChildTransparentMode();
SetParentClipMode( ParentClipMode::NoClip );
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index c7e17fe66f4b..6e37eb3bd165 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -67,6 +67,16 @@ void SvTabListBox::SetTabs()
}
*/
+ // the 1st column (index 1 or 2 depending on button flags) is always set
+ // editable by SvTreeListBox::SetTabs(),
+ // which prevents setting a different column to editable as the first
+ // one with the flag is picked in SvTreeListBox::ImplEditEntry()
+ assert(aTabs.back()->nFlags & SvLBoxTabFlags::EDITABLE);
+ if (!(mvTabList[0].nFlags & SvLBoxTabFlags::EDITABLE))
+ {
+ aTabs.back()->nFlags &= ~SvLBoxTabFlags::EDITABLE;
+ }
+
// append all other tabs to the list
for( sal_uInt16 nCurTab = 1; nCurTab < sal_uInt16(mvTabList.size()); nCurTab++ )
{
@@ -109,6 +119,7 @@ void SvTabListBox::dispose()
void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit eMapUnit)
{
+ assert(0 < nTabs);
mvTabList.resize(nTabs);
MapMode aMMSource( eMapUnit );
@@ -122,6 +133,8 @@ void SvTabListBox::SetTabs(sal_uInt16 nTabs, long const pTabPositions[], MapUnit
mvTabList[nIdx].SetPos( nNewTab );
mvTabList[nIdx].nFlags &= MYTABMASK;
}
+ // by default, 1st one is editable, others not; override with set_column_editables
+ mvTabList[0].nFlags |= SvLBoxTabFlags::EDITABLE;
SvTreeListBox::nTreeFlags |= SvTreeFlags::RECALCTABS;
if( IsUpdateMode() )
Invalidate();
@@ -429,6 +442,18 @@ void SvTabListBox::SetTabJustify( sal_uInt16 nTab, SvTabJustify eJustify)
Invalidate();
}
+void SvTabListBox::SetTabEditable(sal_uInt16 nTab, bool bEditable)
+{
+ DBG_ASSERT(nTab<mvTabList.size(),"GetTabPos:Invalid Tab");
+ if( nTab >= mvTabList.size() )
+ return;
+ SvLBoxTab& rTab = mvTabList[ nTab ];
+ if (bEditable)
+ rTab.nFlags |= SvLBoxTabFlags::EDITABLE;
+ else
+ rTab.nFlags &= ~SvLBoxTabFlags::EDITABLE;
+}
+
long SvTabListBox::GetLogicTab( sal_uInt16 nTab )
{
if( SvTreeListBox::nTreeFlags & SvTreeFlags::RECALCTABS )
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 681bef4d0c7d..9f5b0b1db499 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -101,9 +101,11 @@ bool SvTreeList::IsEntryVisible( const SvListView* pView, SvTreeListEntry* pEntr
sal_uInt16 SvTreeList::GetDepth( const SvTreeListEntry* pEntry ) const
{
+ if (!pEntry)
+ return 0;
DBG_ASSERT(pEntry && pEntry!=pRootItem.get(),"GetDepth:Bad Entry");
sal_uInt16 nDepth = 0;
- while( pEntry->pParent != pRootItem.get() )
+ while( pEntry && pEntry->pParent != pRootItem.get() )
{
nDepth++;
pEntry = pEntry->pParent;
@@ -1562,6 +1564,8 @@ SvTreeListEntries& SvTreeList::GetChildList( SvTreeListEntry* pParent )
const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) const
{
+ if (!pEntry)
+ return nullptr;
const SvTreeListEntry* pParent = pEntry->pParent;
if (pParent == pRootItem.get())
pParent = nullptr;
@@ -1570,6 +1574,8 @@ const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) co
SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry )
{
+ if (!pEntry)
+ return nullptr;
SvTreeListEntry* pParent = pEntry->pParent;
if (pParent == pRootItem.get())
pParent = nullptr;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index aa56db5b718f..26d7d44dc6aa 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -889,6 +889,13 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable )
// InplaceEditing
// ******************************************************************
+VclPtr<Edit> SvInplaceEdit2::GetEditWidget() const { return pEdit; };
+
+VclPtr<Edit> SvTreeListBox::GetEditWidget() const
+{
+ return pEdCtrl ? pEdCtrl->GetEditWidget() : nullptr;
+}
+
void SvTreeListBox::EditText( const OUString& rStr, const tools::Rectangle& rRect,
const Selection& rSel )
{
diff --git a/vcl/source/treelist/uiobject.cxx b/vcl/source/treelist/uiobject.cxx
index 6c4a4e15bda2..65dbecbc4fb8 100644
--- a/vcl/source/treelist/uiobject.cxx
+++ b/vcl/source/treelist/uiobject.cxx
@@ -8,6 +8,8 @@
*/
#include <memory>
+
+#include <vcl/edit.hxx>
#include <vcl/svlbitm.hxx>
#include <vcl/uitest/uiobject.hxx>
#include <vcl/treelistbox.hxx>
@@ -49,6 +51,10 @@ void TreeListUIObject::execute(const OUString& rAction,
if (rAction.isEmpty())
{
}
+ else if (auto const pEdit = mxTreeList->GetEditWidget())
+ {
+ std::unique_ptr<UIObject>(new EditUIObject(pEdit))->execute(rAction, rParameters);
+ }
else
WindowUIObject::execute(rAction, rParameters);
}
@@ -64,6 +70,13 @@ std::unique_ptr<UIObject> TreeListUIObject::get_child(const OUString& rID)
return std::unique_ptr<UIObject>(new TreeListEntryUIObject(mxTreeList, pEntry));
}
+ else if (nID == -1) // FIXME hack?
+ {
+ if (auto const pEdit = mxTreeList->GetEditWidget())
+ {
+ return std::unique_ptr<UIObject>(new EditUIObject(pEdit));
+ }
+ }
return nullptr;
}
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 1b436b544700..f6d06f5073ba 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -20,6 +20,7 @@
#include <strings.hrc>
#include <svdata.hxx>
#include <brdwin.hxx>
+#include <salframe.hxx>
#include <window.h>
#include <vcl/textrectinfo.hxx>
@@ -2070,4 +2071,18 @@ void ImplBorderWindow::queue_resize(StateChangedType eReason)
vcl::Window::queue_resize(eReason);
}
+void ImplBorderWindow::FlashWindow() const
+{
+ // We are showing top level window without focus received. Let's flash it
+ // Use OS features to bring user attention to this window: find topmost one and FlashWindow
+ vcl::Window* pMyParent = mpWindowImpl->mpParent;
+ while (pMyParent && pMyParent->mpWindowImpl && pMyParent->mpWindowImpl->mpParent)
+ {
+ pMyParent = pMyParent->mpWindowImpl->mpParent;
+ }
+ if (pMyParent) {
+ pMyParent->mpWindowImpl->mpFrame->FlashWindow();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 3bdd19b08ddf..708fb19793fc 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -193,8 +193,9 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
// show the cursor, if there is an active window and the cursor
// has been selected in this window
pWindow = Application::GetFocusWindow();
- if ( !pWindow || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint
- || !pWindow->mpWindowImpl->mpFrameData->mbHasFocus )
+ if (!pWindow || !pWindow->mpWindowImpl || (pWindow->mpWindowImpl->mpCursor != this)
+ || pWindow->mpWindowImpl->mbInPaint
+ || !pWindow->mpWindowImpl->mpFrameData->mbHasFocus)
pWindow = nullptr;
}
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index f63cb6782b39..ed95662e7677 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -939,7 +939,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
}
}
- else
+ else if (aKeyCode.IsMod2()) // tdf#151385
{
sal_Unicode c = rKEvt.GetCharCode();
if ( c )
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 45708e8d709f..ee3ae7261221 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -376,6 +376,10 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow )
{
if( (*it)->mpDockingWindow == pWindow )
{
+ // deleting wrappers calls set of actions which may want to use
+ // wrapper we want to delete - avoid crash using temporary owner
+ // while erasing
+ auto pTemporaryOwner = std::move(*it);
mvDockingWindows.erase( it );
break;
}
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index edfa7fd8c4d8..a0ccb699b1d9 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -548,7 +548,8 @@ void Window::ImplCallMove()
vcl::Window *pParent = ImplGetParent();
while( pParent )
{
- if( pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
+ if( pParent->mpWindowImpl &&
+ pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
{
pParentFrame = pParent->mpWindowImpl->mpFrame;
break;
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index baa3a46bc978..4eef15b88be2 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -520,6 +520,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
// use the border window to have the exact position
vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border );
+ if (!pBorderWin)
+ break;
// the top-left corner in output coordinates ie (0,0)
tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( Point(), pBorderWin->GetSizePixel()) ) ) ;
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index a9f23d661caa..4adb37e4a1c4 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -1422,9 +1422,9 @@ void VclFrame::designate_label(vcl::Window *pWindow)
const vcl::Window *VclFrame::get_label_widget() const
{
- assert(GetChildCount() == 2);
if (m_pLabel)
return m_pLabel;
+ assert(GetChildCount() <= 2);
//The label widget is normally the first (of two) children
const WindowImpl* pWindowImpl = ImplGetWindowImpl();
if (pWindowImpl->mpFirstChild == pWindowImpl->mpLastChild) //no label exists
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 49551be5f901..d10674274cff 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2239,7 +2239,8 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
// inherit native widget flag for form controls
// required here, because frames never show up in the child hierarchy - which should be fixed...
// eg, the drop down of a combobox which is a system floating window
- if( mpWindowImpl->mbFrame && GetParent() && GetParent()->IsCompoundControl() &&
+ if( mpWindowImpl->mbFrame && GetParent() && !GetParent()->IsDisposed() &&
+ GetParent()->IsCompoundControl() &&
GetParent()->IsNativeWidgetEnabled() != IsNativeWidgetEnabled() &&
!(GetStyle() & WB_TOOLTIPWIN) )
{
@@ -2276,6 +2277,10 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
ImplFocusToTop( ToTopFlags::NONE, false );
}
+ if (!HasFocus() && GetParent()) {
+ GetParent()->FlashWindow();
+ }
+
// adjust mpWindowImpl->mbReallyVisible
bRealVisibilityChanged = !mpWindowImpl->mbReallyVisible;
ImplSetReallyVisible();
@@ -3706,7 +3711,7 @@ void Window::EnableNativeWidget( bool bEnable )
bool Window::IsNativeWidgetEnabled() const
{
- return ImplGetWinData()->mbEnableNativeWidget;
+ return mpWindowImpl ? ImplGetWinData()->mbEnableNativeWidget : false;
}
Reference< css::rendering::XCanvas > Window::ImplGetCanvas( bool bSpriteCanvas ) const
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index aa791975e765..db4c1aaf0bc2 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -219,6 +219,12 @@ void Window::InvertTracking( const tools::Rectangle& rRect, ShowTrackFlags nFlag
IMPL_LINK( Window, ImplTrackTimerHdl, Timer*, pTimer, void )
{
+ if (!mpWindowImpl)
+ {
+ SAL_WARN("vcl", "ImplTrackTimerHdl has outlived dispose");
+ return;
+ }
+
ImplSVData* pSVData = ImplGetSVData();
// if Button-Repeat we have to change the timeout
@@ -286,6 +292,7 @@ void Window::EndTracking( TrackingEventFlags nFlags )
ReleaseMouse();
// call EndTracking if required
+ if (mpWindowImpl && mpWindowImpl->mpFrameData)
{
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
if( ImplIsAntiparallel() )
@@ -1181,7 +1188,7 @@ GetFocusFlags Window::GetGetFocusFlags() const
bool Window::IsCompoundControl() const
{
- return mpWindowImpl->mbCompoundControl;
+ return mpWindowImpl ? mpWindowImpl->mbCompoundControl : false;
}
bool Window::IsWait() const
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index cae2a4e1ab03..d114dd71accd 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -40,11 +40,11 @@ void CPDManager::onNameAcquired (GDBusConnection *connection,
gpointer user_data)
{
gchar* contents;
- GDBusNodeInfo *introspection_data;
-
// Get Interface for introspection
- g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr);
- introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+ if (!g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr))
+ return;
+
+ GDBusNodeInfo *introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
g_dbus_connection_register_object (connection,
"/org/libreoffice/PrintDialog",
@@ -60,28 +60,29 @@ void CPDManager::onNameAcquired (GDBusConnection *connection,
std::vector<std::pair<std::string, gchar*>> backends = current->getTempBackends();
for (auto const& backend : backends)
{
- GDBusProxy *proxy;
// Get Interface for introspection
- g_file_get_contents (BACKEND_INTERFACE, &contents, nullptr, nullptr);
- introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
- proxy = g_dbus_proxy_new_sync (connection,
- G_DBUS_PROXY_FLAGS_NONE,
- introspection_data->interfaces[0],
- backend.first.c_str(),
- backend.second,
- "org.openprinting.PrintBackend",
- nullptr,
- nullptr);
+ if (g_file_get_contents(BACKEND_INTERFACE, &contents, nullptr, nullptr))
+ {
+ introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+ GDBusProxy *proxy = g_dbus_proxy_new_sync (connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ introspection_data->interfaces[0],
+ backend.first.c_str(),
+ backend.second,
+ "org.openprinting.PrintBackend",
+ nullptr,
+ nullptr);
+ g_assert (proxy != nullptr);
+ g_dbus_proxy_call(proxy, "ActivateBackend",
+ nullptr,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1, nullptr, nullptr, nullptr);
+
+ g_free(contents);
+ g_object_unref(proxy);
+ g_dbus_node_info_unref(introspection_data);
+ }
g_free(backend.second);
- g_assert (proxy != nullptr);
- g_dbus_proxy_call(proxy, "ActivateBackend",
- nullptr,
- G_DBUS_CALL_FLAGS_NONE,
- -1, nullptr, nullptr, nullptr);
-
- g_free(contents);
- g_object_unref(proxy);
- g_dbus_node_info_unref(introspection_data);
}
}
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 12482b2ba878..82655682ed81 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -82,14 +82,9 @@ struct GetPPDAttribs
{
// This CUPS method is not at all thread-safe we need
// to dup the pointer to a static buffer it returns ASAP
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
OString aResult = cupsGetPPD(m_aParameter.getStr());
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
MutexGuard aGuard( *m_pSyncMutex );
m_aResult = aResult;
m_aCondition.set();
@@ -222,10 +217,7 @@ void CUPSManager::runDests()
// n#722902 - do a fast-failing check for cups working *at all* first
http_t* p_http;
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
if( (p_http=httpConnectEncrypt(
cupsServer(),
ippPort(),
@@ -242,9 +234,7 @@ void CUPSManager::runDests()
httpClose(p_http);
}
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
}
void CUPSManager::initialize()
@@ -448,14 +438,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
rtl_TextEncoding aEncoding = osl_getThreadTextEncoding();
OUString aFileName( OStringToOUString( aPPDFile, aEncoding ) );
// update the printer info with context information
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
ppd_file_t* pPPD = ppdOpenFile( aPPDFile.getStr() );
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
if( pPPD )
{
// create the new parser
@@ -463,14 +448,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
pCUPSParser->m_aFile = rPrinter;
pNewParser = pCUPSParser;
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
/*int nConflicts =*/ cupsMarkOptions( pPPD, pDest->num_options, pDest->options );
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
SAL_INFO("vcl.unx.print", "processing the following options for printer " << pDest->name << " (instance " << (pDest->instance == nullptr ? "null" : pDest->instance) << "):");
for( int k = 0; k < pDest->num_options; k++ )
SAL_INFO("vcl.unx.print",
@@ -491,14 +471,9 @@ const PPDParser* CUPSManager::createCUPSParser( const OUString& rPrinter )
rInfo.m_aContext = rContext;
// clean up the mess
-#ifdef __GNUC__
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
ppdClose( pPPD );
-#ifdef __GNUC__
-#pragma GCC diagnostic pop
-#endif
+SAL_WNODEPRECATED_DECLARATIONS_POP
}
else
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index c9d66e1ac7f7..b54b41df8c45 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -7964,10 +7964,10 @@ private:
std::vector<GtkSortType> m_aSavedSortTypes;
std::vector<int> m_aSavedSortColumns;
std::vector<int> m_aViewColToModelCol;
- std::vector<int> m_aModelColToViewCol;
bool m_bWorkAroundBadDragRegion;
bool m_bInDrag;
gint m_nTextCol;
+ gint m_nTextView;
gint m_nImageCol;
gint m_nExpanderImageCol;
gint m_nIdCol;
@@ -8237,7 +8237,7 @@ private:
set(iter, m_aToggleTriStateMap[nCol], false);
- signal_toggled(std::make_pair(nRow, nCol));
+ signal_toggled(std::make_pair(nRow, to_external_model(nCol)));
gtk_tree_path_free(tree_path);
}
@@ -8334,9 +8334,67 @@ private:
return m_aViewColToModelCol[viewcol];
}
- int get_view_col(int modelcol) const
+ // We allow only one CellRenderer per TreeViewColumn except for the first
+ // TreeViewColumn which can have two, where the first CellRenderer is
+ // either an expander image. From outside the second CellRenderer is
+ // considered index 0 in the model and the expander as -1
+ int to_external_model(int modelcol) const
{
- return m_aModelColToViewCol[modelcol];
+ if (m_nExpanderImageCol == -1)
+ return modelcol;
+ return modelcol - 1;
+ }
+
+ int to_internal_model(int modelcol) const
+ {
+ if (m_nExpanderImageCol == -1)
+ return modelcol;
+ return modelcol + 1;
+ }
+
+ void set_column_editable(int nCol, bool bEditable)
+ {
+ nCol = to_internal_model(nCol);
+
+ // recompute these 2 based on new 1st editable column
+ m_nTextCol = -1;
+ m_nTextView = -1;
+ int nIndex(0);
+ int nViewColumn(0);
+ bool isSet(false);
+ for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = g_list_next(pEntry))
+ {
+ GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
+ GList *pRenderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(pColumn));
+ for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
+ {
+ GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
+ void* pData = g_object_get_data(G_OBJECT(pCellRenderer), "g-lo-CellIndex");
+ if (reinterpret_cast<sal_IntPtr>(pData) == nCol)
+ {
+ g_object_set(G_OBJECT(pCellRenderer), "editable", bEditable, "editable-set", true, nullptr);
+ isSet = true;
+ }
+ if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
+ {
+ gboolean is_editable(false);
+ g_object_get(pCellRenderer, "editable", &is_editable, nullptr);
+ if (is_editable && m_nTextCol == -1)
+ {
+ assert(m_nTextView == -1);
+ m_nTextCol = nIndex;
+ m_nTextView = nViewColumn;
+ }
+ }
+ if (isSet && m_nTextCol != -1) // both tasks done?
+ {
+ break;
+ }
+ ++nIndex;
+ }
+ g_list_free(pRenderers);
+ ++nViewColumn;
+ }
}
static void signalRowDeleted(GtkTreeModel*, GtkTreePath*, gpointer widget)
@@ -8425,6 +8483,7 @@ public:
, m_bWorkAroundBadDragRegion(false)
, m_bInDrag(false)
, m_nTextCol(-1)
+ , m_nTextView(-1)
, m_nImageCol(-1)
, m_nExpanderImageCol(-1)
, m_nChangedSignalId(g_signal_connect(gtk_tree_view_get_selection(pTreeView), "changed",
@@ -8438,8 +8497,14 @@ public:
, m_nKeyPressSignalId(g_signal_connect(pTreeView, "key-press-event", G_CALLBACK(signalKeyPress), this))
, m_pChangeEvent(nullptr)
{
+ /* The outside concept of a column maps to a gtk CellRenderer, rather than
+ a TreeViewColumn. If the first TreeViewColumn has two CellRenderers, and
+ the first CellRenderer is an image, that CellRenderer is considered to
+ be index -1.
+ */
m_pColumns = gtk_tree_view_get_columns(m_pTreeView);
int nIndex(0);
+ int nViewColumn(0);
for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = g_list_next(pEntry))
{
GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
@@ -8448,11 +8513,13 @@ public:
for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
{
GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
- g_object_set_data(G_OBJECT(pCellRenderer), "g-lo-CellIndex", reinterpret_cast<gpointer>(nIndex));
if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
{
if (m_nTextCol == -1)
+ {
m_nTextCol = nIndex;
+ m_nTextView = nViewColumn;
+ }
m_aWeightMap[nIndex] = -1;
m_aSensitiveMap[nIndex] = -1;
g_signal_connect(G_OBJECT(pCellRenderer), "editing-started", G_CALLBACK(signalCellEditingStarted), this);
@@ -8473,11 +8540,12 @@ public:
else if (m_nImageCol == -1)
m_nImageCol = nIndex;
}
- m_aModelColToViewCol.push_back(m_aViewColToModelCol.size());
+ g_object_set_data(G_OBJECT(pCellRenderer), "g-lo-CellIndex", reinterpret_cast<gpointer>(nIndex));
++nIndex;
}
g_list_free(pRenderers);
m_aViewColToModelCol.push_back(nIndex - 1);
+ ++nViewColumn;
}
m_nIdCol = nIndex++;
@@ -8513,6 +8581,13 @@ public:
}
}
+ virtual void set_column_editables(const std::vector<bool>& rEditables) override
+ {
+ size_t nTabCount = rEditables.size();
+ for (size_t i = 0 ; i < nTabCount; ++i)
+ set_column_editable(i, rEditables[i]);
+ }
+
virtual void set_centered_column(int nCol) override
{
for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = g_list_next(pEntry))
@@ -8714,8 +8789,7 @@ public:
virtual void set_sort_indicator(TriState eState, int col) override
{
- if (col == -1)
- col = get_view_col(m_nTextCol);
+ assert(col >= 0 && "cannot sort on expander column");
GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, col));
assert(pColumn && "wrong count");
@@ -8731,8 +8805,7 @@ public:
virtual TriState get_sort_indicator(int col) const override
{
- if (col == -1)
- col = get_view_col(m_nTextCol);
+ assert(col >= 0 && "cannot sort on expander column");
GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, col));
if (!gtk_tree_view_column_get_sort_indicator(pColumn))
@@ -8746,7 +8819,7 @@ public:
gint sort_column_id(0);
if (!gtk_tree_sortable_get_sort_column_id(pSortable, &sort_column_id, nullptr))
return -1;
- return get_view_col(sort_column_id);
+ return to_external_model(sort_column_id);
}
virtual void set_sort_column(int nColumn) override
@@ -8759,7 +8832,7 @@ public:
GtkSortType eSortType;
GtkTreeSortable* pSortable = GTK_TREE_SORTABLE(m_pTreeStore);
gtk_tree_sortable_get_sort_column_id(pSortable, nullptr, &eSortType);
- int nSortCol = get_model_col(nColumn);
+ int nSortCol = to_internal_model(nColumn);
gtk_tree_sortable_set_sort_func(pSortable, nSortCol, sortFunc, this, nullptr);
gtk_tree_sortable_set_sort_column_id(pSortable, nSortCol, eSortType);
}
@@ -9761,34 +9834,60 @@ public:
virtual void start_editing(const weld::TreeIter& rIter) override
{
- int col = get_view_col(m_nTextCol);
- GtkTreeViewColumn* pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, col));
- assert(pColumn && "wrong column");
-
const GtkInstanceTreeIter& rGtkIter = static_cast<const GtkInstanceTreeIter&>(rIter);
GtkTreeModel *pModel = GTK_TREE_MODEL(m_pTreeStore);
GtkTreePath* path = gtk_tree_model_get_path(pModel, const_cast<GtkTreeIter*>(&rGtkIter.iter));
- // allow editing of cells which are not usually editable, so we can have double click
- // do its usual row-activate but if we explicitly want to edit (remote files dialog)
+ GtkTreeViewColumn* pColumn = nullptr;
+
+ for (GList* pEntry = g_list_first(m_pColumns); pEntry; pEntry = g_list_next(pEntry))
+ {
+ GtkTreeViewColumn* pTestColumn = GTK_TREE_VIEW_COLUMN(pEntry->data);
+
+ // see if this column is editable
+ gboolean is_editable(false);
+ GList *pRenderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(pTestColumn));
+ for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
+ {
+ GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
+ if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
+ {
+ g_object_get(pCellRenderer, "editable", &is_editable, nullptr);
+ if (is_editable)
+ {
+ pColumn = pTestColumn;
+ break;
+ }
+ }
+ }
+ g_list_free(pRenderers);
+
+ if (is_editable)
+ break;
+ }
+
+ // if nothing explicit editable, allow editing of cells which are not
+ // usually editable, so we can have double click do its usual
+ // row-activate but if we explicitly want to edit (remote files dialog)
// we can still do that
- GList *pRenderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(pColumn));
- for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
+ if (!pColumn)
{
- GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
- if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
+ pColumn = GTK_TREE_VIEW_COLUMN(g_list_nth_data(m_pColumns, m_nTextView));
+ assert(pColumn && "wrong column");
+
+ GList *pRenderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(pColumn));
+ for (GList* pRenderer = g_list_first(pRenderers); pRenderer; pRenderer = g_list_next(pRenderer))
{
- gboolean is_editable(false);
- g_object_get(pCellRenderer, "editable", &is_editable, nullptr);
- if (!is_editable)
+ GtkCellRenderer* pCellRenderer = GTK_CELL_RENDERER(pRenderer->data);
+ if (GTK_IS_CELL_RENDERER_TEXT(pCellRenderer))
{
g_object_set(pCellRenderer, "editable", true, "editable-set", true, nullptr);
g_object_set_data(G_OBJECT(pCellRenderer), "g-lo-RestoreNonEditable", reinterpret_cast<gpointer>(true));
break;
}
}
+ g_list_free(pRenderers);
}
- g_list_free(pRenderers);
gtk_tree_view_set_cursor(m_pTreeView, path, pColumn, true);
diff --git a/vcl/vclplug_win.component b/vcl/vclplug_win.component
new file mode 100644
index 000000000000..907694991895
--- /dev/null
+++ b/vcl/vclplug_win.component
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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 .
+-->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.datatransfer.DataFormatTranslator"
+ constructor="dtrans_CDataFormatTranslatorUNO_get_implementation">
+ <service name="com.sun.star.datatransfer.DataFormatTranslator"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
+ constructor="dtrans_DragSource_get_implementation">
+ <service name="com.sun.star.datatransfer.dnd.OleDragSource"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
+ constructor="dtrans_DropTarget_get_implementation">
+ <service name="com.sun.star.datatransfer.dnd.OleDropTarget"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.datatransfer.ClipboardManager"
+ constructor="dtrans_ClipboardManager_get_implementation">
+ <service name="com.sun.star.datatransfer.clipboard.ClipboardManager"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.datatransfer.clipboard.GenericClipboard"
+ constructor="dtrans_GenericClipboard_get_implementation">
+ <service name="com.sun.star.datatransfer.clipboard.GenericClipboard"/>
+ </implementation>
+ <implementation name="com.sun.star.datatransfer.clipboard.ClipboardW32"
+ constructor="dtrans_CWinClipboard_get_implementation">
+ <service name="com.sun.star.datatransfer.clipboard.SystemClipboard"/>
+ </implementation>
+</component>
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 1994a274f8b4..3010105a5e16 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -148,6 +148,7 @@ void SalYieldMutex::doAcquire( sal_uInt32 nLockCount )
// wait for SalYieldMutex::release() to set the condition
osl::Condition::Result res = m_condition.wait();
assert(osl::Condition::Result::result_ok == res);
+ (void) res;
}
while ( true );
}
@@ -943,7 +944,7 @@ void WinSalInstance::AddToRecentDocumentList(const OUString& rFileUrl, const OUS
if ( !sApplicationName.isEmpty() )
{
- OUString sApplicationID("TheDocumentFoundation.LibreOffice." + sApplicationName);
+ OUString sApplicationID("CIB.CIBOffice." + sApplicationName);
SHARDAPPIDINFO info;
info.psi = pShellItem;
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 3aa919ec41b5..1c526658e440 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -45,7 +45,7 @@ void WinSalTimer::ImplStop()
if ( m_bSetTimerRunning )
{
m_bSetTimerRunning = false;
- KillTimer( GetSalData()->mpInstance->mhComWnd, m_aWmTimerId );
+ KillTimer( pInst->mhComWnd, m_aWmTimerId );
}
m_bDirectTimeout = false;
@@ -62,8 +62,10 @@ void WinSalTimer::ImplStop()
void WinSalTimer::ImplStart( sal_uInt64 nMS )
{
+#if !defined NDEBUG
SalData* pSalData = GetSalData();
assert( !pSalData->mpInstance || pSalData->mnAppThreadId == GetCurrentThreadId() );
+#endif
// DueTime parameter is a DWORD, which is always an unsigned 32bit
if (nMS > SAL_MAX_UINT32)
diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/vcl/win/dtrans/APNDataObject.cxx
index 53342f21f379..53342f21f379 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.cxx
+++ b/vcl/win/dtrans/APNDataObject.cxx
diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/vcl/win/dtrans/APNDataObject.hxx
index 2c1d9718ec2f..df3ac559cae5 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.hxx
+++ b/vcl/win/dtrans/APNDataObject.hxx
@@ -20,6 +20,11 @@
#ifndef INCLUDED_DTRANS_SOURCE_WIN32_DTOBJ_APNDATAOBJECT_HXX
#define INCLUDED_DTRANS_SOURCE_WIN32_DTOBJ_APNDATAOBJECT_HXX
+#if !defined WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <objidl.h>
+
#include <systools/win32/comtools.hxx>
/*
diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/vcl/win/dtrans/DOTransferable.cxx
index 230a7fbfed8e..11692781a683 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.cxx
+++ b/vcl/win/dtrans/DOTransferable.cxx
@@ -22,8 +22,9 @@
#include <osl/diagnose.h>
#include "DOTransferable.hxx"
-#include "../misc/ImplHelper.hxx"
-#include <WinClip.hxx>
+#include "ImplHelper.hxx"
+#include "WinClip.hxx"
+#include "WinClipboard.hxx"
#include "DTransHelper.hxx"
#include "TxtCnvtHlp.hxx"
#include "MimeAttrib.hxx"
@@ -167,19 +168,6 @@ bool cmpAllContentTypeParameter(
} // end namespace
-Reference< XTransferable > CDOTransferable::create( const Reference< XComponentContext >& rxContext,
- IDataObjectPtr pIDataObject )
-{
- CDOTransferable* pTransf = new CDOTransferable(rxContext, pIDataObject);
- Reference<XTransferable> refDOTransf(pTransf);
-
- pTransf->acquire();
- pTransf->initFlavorList();
- pTransf->release();
-
- return refDOTransf;
-}
-
CDOTransferable::CDOTransferable(
const Reference< XComponentContext >& rxContext, IDataObjectPtr rDataObject ) :
m_rDataObject( rDataObject ),
@@ -188,6 +176,20 @@ CDOTransferable::CDOTransferable(
m_bUnicodeRegistered( false ),
m_TxtFormatOnClipboard( CF_INVALID )
{
+ initFlavorList();
+}
+
+CDOTransferable::CDOTransferable(
+ const Reference<XComponentContext>& rxContext,
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard,
+ const std::vector<sal_uInt32>& rFormats)
+ : m_xClipboard(xClipboard)
+ , m_xContext(rxContext)
+ , m_DataFormatTranslator(rxContext)
+ , m_bUnicodeRegistered(false)
+ , m_TxtFormatOnClipboard(CF_INVALID)
+{
+ initFlavorListFromFormatList(rFormats);
}
Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor )
@@ -271,6 +273,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla
void CDOTransferable::initFlavorList( )
{
+ std::vector<sal_uInt32> aFormats;
sal::systools::COMReference<IEnumFORMATETC> pEnumFormatEtc;
HRESULT hr = m_rDataObject->EnumFormatEtc( DATADIR_GET, &pEnumFormatEtc );
if ( SUCCEEDED( hr ) )
@@ -280,39 +283,38 @@ void CDOTransferable::initFlavorList( )
FORMATETC fetc;
while ( S_OK == pEnumFormatEtc->Next( 1, &fetc, nullptr ) )
{
- // we use locales only to determine the
- // charset if there is text on the cliboard
- // we don't offer this format
- if ( CF_LOCALE == fetc.cfFormat )
- continue;
-
- DataFlavor aFlavor = formatEtcToDataFlavor( fetc );
+ aFormats.push_back(fetc.cfFormat);
+ // see MSDN IEnumFORMATETC
+ CoTaskMemFree( fetc.ptd );
+ }
+ initFlavorListFromFormatList(aFormats);
+ }
+}
- // if text or oemtext is offered we also pretend to have unicode text
- if ( CDataFormatTranslator::isOemOrAnsiTextFormat( fetc.cfFormat ) &&
- !m_bUnicodeRegistered )
+void CDOTransferable::initFlavorListFromFormatList(const std::vector<sal_uInt32>& rFormats)
+{
+ for (sal_uInt32 cfFormat : rFormats)
+ {
+ // we use locales only to determine the
+ // charset if there is text on the cliboard
+ // we don't offer this format
+ if (CF_LOCALE == cfFormat)
+ continue;
+
+ // if text or oemtext is offered we pretend to have unicode text
+ if (CDataFormatTranslator::isTextFormat(cfFormat))
+ {
+ if (!m_bUnicodeRegistered)
{
- addSupportedFlavor( aFlavor );
-
- m_TxtFormatOnClipboard = fetc.cfFormat;
+ m_TxtFormatOnClipboard = cfFormat;
m_bUnicodeRegistered = true;
- // register unicode text as accompany format
- aFlavor = formatEtcToDataFlavor(
- CDataFormatTranslator::getFormatEtcForClipformat( CF_UNICODETEXT ) );
- addSupportedFlavor( aFlavor );
+ // register unicode text as format
+ addSupportedFlavor(formatEtcToDataFlavor(CF_UNICODETEXT));
}
- else if ( (CF_UNICODETEXT == fetc.cfFormat) && !m_bUnicodeRegistered )
- {
- addSupportedFlavor( aFlavor );
- m_bUnicodeRegistered = true;
- }
- else
- addSupportedFlavor( aFlavor );
-
- // see MSDN IEnumFORMATETC
- CoTaskMemFree( fetc.ptd );
}
+ else
+ addSupportedFlavor(formatEtcToDataFlavor(cfFormat));
}
}
@@ -329,18 +331,9 @@ void CDOTransferable::addSupportedFlavor( const DataFlavor& aFlavor )
}
}
-DataFlavor CDOTransferable::formatEtcToDataFlavor( const FORMATETC& aFormatEtc )
+DataFlavor CDOTransferable::formatEtcToDataFlavor(sal_uInt32 cfFormat)
{
- LCID lcid = 0;
-
- // for non-unicode text format we must provide a locale to get
- // the character-set of the text, if there is no locale on the
- // clipboard we assume the text is in a charset appropriate for
- // the current thread locale
- if ( (CF_TEXT == aFormatEtc.cfFormat) || (CF_OEMTEXT == aFormatEtc.cfFormat) )
- lcid = getLocaleFromClipboard( );
-
- return m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, lcid );
+ return m_DataFormatTranslator.getDataFlavorFromFormatEtc(cfFormat);
}
// returns the current locale on clipboard; if there is no locale on
@@ -370,6 +363,18 @@ LCID CDOTransferable::getLocaleFromClipboard( )
return lcid;
}
+void CDOTransferable::tryToGetIDataObjectIfAbsent()
+{
+ if (!m_rDataObject.is())
+ {
+ auto xClipboard = m_xClipboard.get(); // holding the reference while we get the object
+ if (CWinClipboard* pWinClipboard = dynamic_cast<CWinClipboard*>(xClipboard.get()))
+ {
+ m_rDataObject = pWinClipboard->getIDataObject();
+ }
+ }
+}
+
// I think it's not necessary to call ReleaseStgMedium
// in case of failures because nothing should have been
// allocated etc.
@@ -377,6 +382,9 @@ LCID CDOTransferable::getLocaleFromClipboard( )
CDOTransferable::ByteSequence_t CDOTransferable::getClipboardData( CFormatEtc& aFormatEtc )
{
STGMEDIUM stgmedium;
+ tryToGetIDataObjectIfAbsent();
+ if (!m_rDataObject.is()) // Maybe we are shutting down, and clipboard is already destroyed?
+ throw RuntimeException();
HRESULT hr = m_rDataObject->GetData( aFormatEtc, &stgmedium );
// in case of failure to get a WMF metafile handle, try to get a memory block
diff --git a/dtrans/source/win32/dtobj/DOTransferable.hxx b/vcl/win/dtrans/DOTransferable.hxx
index f45e18c4f85a..cc33ff70c6a9 100644
--- a/dtrans/source/win32/dtobj/DOTransferable.hxx
+++ b/vcl/win/dtrans/DOTransferable.hxx
@@ -24,12 +24,16 @@
#include <cppuhelper/implbase.hxx>
#include "DataFmtTransl.hxx"
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
#include <com/sun/star/datatransfer/XSystemTransferable.hpp>
+#include <cppuhelper/weakref.hxx>
#include <systools/win32/comtools.hxx>
+#include <vector>
+
// forward
class CFormatEtc;
@@ -40,9 +44,6 @@ class CDOTransferable : public ::cppu::WeakImplHelper<
public:
typedef css::uno::Sequence< sal_Int8 > ByteSequence_t;
- static css::uno::Reference< css::datatransfer::XTransferable > create(
- const css::uno::Reference< css::uno::XComponentContext >& rxContext, IDataObjectPtr pIDataObject );
-
// XTransferable
virtual css::uno::Any SAL_CALL getTransferData( const css::datatransfer::DataFlavor& aFlavor ) override;
@@ -55,18 +56,25 @@ public:
virtual css::uno::Any SAL_CALL getData( const css::uno::Sequence<sal_Int8>& aProcessId ) override;
-private:
+ explicit CDOTransferable(
+ const css::uno::Reference< css::uno::XComponentContext >& rxContext,
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard,
+ const std::vector<sal_uInt32>& rFormats);
+
explicit CDOTransferable(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
IDataObjectPtr rDataObject );
+private:
// some helper functions
void initFlavorList( );
+ void initFlavorListFromFormatList(const std::vector<sal_uInt32>& rFormats);
void addSupportedFlavor( const css::datatransfer::DataFlavor& aFlavor );
- css::datatransfer::DataFlavor formatEtcToDataFlavor( const FORMATETC& aFormatEtc );
+ css::datatransfer::DataFlavor formatEtcToDataFlavor(sal_uInt32 cfFormat);
+ void tryToGetIDataObjectIfAbsent();
ByteSequence_t getClipboardData( CFormatEtc& aFormatEtc );
OUString synthesizeUnicodeText( );
@@ -76,6 +84,7 @@ private:
const css::datatransfer::DataFlavor& rhs );
private:
+ css::uno::WeakReference<css::datatransfer::clipboard::XClipboard> m_xClipboard;
IDataObjectPtr m_rDataObject;
css::uno::Sequence< css::datatransfer::DataFlavor > m_FlavorList;
const css::uno::Reference< css::uno::XComponentContext > m_xContext;
diff --git a/dtrans/source/win32/dtobj/DTransHelper.cxx b/vcl/win/dtrans/DTransHelper.cxx
index 5ca12d0fe26b..5ca12d0fe26b 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.cxx
+++ b/vcl/win/dtrans/DTransHelper.cxx
diff --git a/dtrans/source/win32/dtobj/DTransHelper.hxx b/vcl/win/dtrans/DTransHelper.hxx
index e003c2a70629..684becfafa9a 100644
--- a/dtrans/source/win32/dtobj/DTransHelper.hxx
+++ b/vcl/win/dtrans/DTransHelper.hxx
@@ -25,7 +25,7 @@
#endif
#include <windows.h>
#include <objidl.h>
-#include <WinClip.hxx>
+#include "WinClip.hxx"
#define AUTO_INIT TRUE
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/vcl/win/dtrans/DataFmtTransl.cxx
index b8513c6e75d4..46947b81c6fa 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx
+++ b/vcl/win/dtrans/DataFmtTransl.cxx
@@ -21,8 +21,8 @@
#include <rtl/string.hxx>
#include <osl/diagnose.h>
#include <rtl/tencinfo.h>
-#include "../misc/ImplHelper.hxx"
-#include <WinClip.hxx>
+#include "ImplHelper.hxx"
+#include "WinClip.hxx"
#include "MimeAttrib.hxx"
#include "DTransHelper.hxx"
#include <rtl/string.h>
@@ -98,13 +98,13 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor&
return sal::static_int_cast<CFormatEtc>(getFormatEtcForClipformat( sal::static_int_cast<CLIPFORMAT>(cf) ));
}
-DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& aFormatEtc, LCID lcid ) const
+DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc(sal_uInt32 cfFormat, LCID lcid) const
{
DataFlavor aFlavor;
try
{
- CLIPFORMAT aClipformat = aFormatEtc.cfFormat;
+ CLIPFORMAT aClipformat = cfFormat;
Any aAny;
aAny <<= static_cast< sal_Int32 >( aClipformat );
diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/vcl/win/dtrans/DataFmtTransl.hxx
index 3fad9bbdc89a..0a8f08582b9c 100644
--- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx
+++ b/vcl/win/dtrans/DataFmtTransl.hxx
@@ -43,7 +43,7 @@ public:
CFormatEtc getFormatEtcFromDataFlavor( const css::datatransfer::DataFlavor& aDataFlavor ) const;
css::datatransfer::DataFlavor getDataFlavorFromFormatEtc(
- const FORMATETC& aFormatEtc, LCID lcid = GetThreadLocale( ) ) const;
+ sal_uInt32 cfFormat, LCID lcid = GetThreadLocale()) const;
static CFormatEtc getFormatEtcForClipformat( CLIPFORMAT cf );
static CFormatEtc getFormatEtcForClipformatName( const OUString& aClipFmtName );
diff --git a/dtrans/source/win32/dtobj/DtObjFactory.cxx b/vcl/win/dtrans/DtObjFactory.cxx
index 29f630bf406b..5a17d8b4c2e4 100644
--- a/dtrans/source/win32/dtobj/DtObjFactory.cxx
+++ b/vcl/win/dtrans/DtObjFactory.cxx
@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "../../inc/DtObjFactory.hxx"
-
+#include "DtObjFactory.hxx"
#include "XTDataObject.hxx"
using namespace com::sun::star::uno;
diff --git a/dtrans/source/inc/DtObjFactory.hxx b/vcl/win/dtrans/DtObjFactory.hxx
index be8bf8dbcb3e..be8bf8dbcb3e 100644
--- a/dtrans/source/inc/DtObjFactory.hxx
+++ b/vcl/win/dtrans/DtObjFactory.hxx
diff --git a/dtrans/source/win32/dtobj/Fetc.cxx b/vcl/win/dtrans/Fetc.cxx
index 048b9228de5d..9bcb2f609ff6 100644
--- a/dtrans/source/win32/dtobj/Fetc.cxx
+++ b/vcl/win/dtrans/Fetc.cxx
@@ -19,7 +19,7 @@
#include <osl/diagnose.h>
#include "Fetc.hxx"
-#include "../misc/ImplHelper.hxx"
+#include "ImplHelper.hxx"
CFormatEtc::CFormatEtc( )
{
diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/vcl/win/dtrans/Fetc.hxx
index 5ec3e4b9459e..5ec3e4b9459e 100644
--- a/dtrans/source/win32/dtobj/Fetc.hxx
+++ b/vcl/win/dtrans/Fetc.hxx
diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/vcl/win/dtrans/FetcList.cxx
index 0a262b0677fb..e9a1c0dac5f1 100644
--- a/dtrans/source/win32/dtobj/FetcList.cxx
+++ b/vcl/win/dtrans/FetcList.cxx
@@ -25,8 +25,8 @@
#include <com/sun/star/datatransfer/XMimeContentType.hpp>
#include "DataFmtTransl.hxx"
-#include "../misc/ImplHelper.hxx"
-#include <WinClip.hxx>
+#include "ImplHelper.hxx"
+#include "WinClip.hxx"
#include <algorithm>
@@ -285,10 +285,7 @@ OUString CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& aFlavor )
bool CFormatRegistrar::hasUnicodeFlavor( const Reference< XTransferable >& aXTransferable ) const
{
- CFormatEtc fetc( CF_UNICODETEXT );
-
- DataFlavor aFlavor =
- m_DataFormatTranslator.getDataFlavorFromFormatEtc( fetc );
+ DataFlavor aFlavor = m_DataFormatTranslator.getDataFlavorFromFormatEtc(CF_UNICODETEXT);
return aXTransferable->isDataFlavorSupported( aFlavor );
}
diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/vcl/win/dtrans/FetcList.hxx
index cf7697e1ba1e..cf7697e1ba1e 100644
--- a/dtrans/source/win32/dtobj/FetcList.hxx
+++ b/vcl/win/dtrans/FetcList.hxx
diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/vcl/win/dtrans/FmtFilter.cxx
index 2130c42ba578..2130c42ba578 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.cxx
+++ b/vcl/win/dtrans/FmtFilter.cxx
diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/vcl/win/dtrans/FmtFilter.hxx
index 1c2325851208..1c2325851208 100644
--- a/dtrans/source/win32/dtobj/FmtFilter.hxx
+++ b/vcl/win/dtrans/FmtFilter.hxx
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/vcl/win/dtrans/ImplHelper.cxx
index 0e38b9183d82..0e38b9183d82 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/vcl/win/dtrans/ImplHelper.cxx
diff --git a/dtrans/source/win32/misc/ImplHelper.hxx b/vcl/win/dtrans/ImplHelper.hxx
index 2d39e0727551..2d39e0727551 100644
--- a/dtrans/source/win32/misc/ImplHelper.hxx
+++ b/vcl/win/dtrans/ImplHelper.hxx
diff --git a/dtrans/source/win32/dtobj/MimeAttrib.hxx b/vcl/win/dtrans/MimeAttrib.hxx
index eb57ba750ea1..eb57ba750ea1 100644
--- a/dtrans/source/win32/dtobj/MimeAttrib.hxx
+++ b/vcl/win/dtrans/MimeAttrib.hxx
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx
index a3e28806deed..eef43afa735c 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.cxx
+++ b/vcl/win/dtrans/MtaOleClipb.cxx
@@ -34,6 +34,10 @@
#include <sal/log.hxx>
#include "MtaOleClipb.hxx"
+
+#include <svsys.h>
+#include <win/saldata.hxx>
+
#include <osl/thread.h>
#include <wchar.h>
@@ -48,8 +52,7 @@ using osl::ClearableMutexGuard;
namespace /* private */
{
- wchar_t CLIPSRV_DLL_NAME[] = L"sysdtrans.dll";
- wchar_t g_szWndClsName[] = L"MtaOleReqWnd###";
+ const wchar_t g_szWndClsName[] = L"MtaOleReqWnd###";
// messages constants
@@ -607,8 +610,8 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
{
WNDCLASSEXW wcex;
- HINSTANCE hInst = GetModuleHandleW( CLIPSRV_DLL_NAME );
- OSL_ENSURE( nullptr != hInst, "The name of the clipboard service dll must have changed" );
+ SalData* pSalData = GetSalData();
+ OSL_ASSERT(nullptr != pSalData->mhInst);
ZeroMemory( &wcex, sizeof(wcex) );
@@ -617,7 +620,7 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
wcex.lpfnWndProc = CMtaOleClipboard::mtaOleReqWndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
- wcex.hInstance = hInst;
+ wcex.hInstance = pSalData->mhInst;
wcex.hIcon = nullptr;
wcex.hCursor = nullptr;
wcex.hbrBackground = nullptr;
@@ -629,7 +632,7 @@ void CMtaOleClipboard::createMtaOleReqWnd( )
if ( 0 != m_MtaOleReqWndClassAtom )
m_hwndMtaOleReqWnd = CreateWindowW(
- g_szWndClsName, nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, hInst, nullptr );
+ g_szWndClsName, nullptr, 0, 0, 0, 0, 0, nullptr, nullptr, pSalData->mhInst, nullptr );
}
unsigned int CMtaOleClipboard::run( )
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.hxx b/vcl/win/dtrans/MtaOleClipb.hxx
index bf71ac26e8f8..bf71ac26e8f8 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.hxx
+++ b/vcl/win/dtrans/MtaOleClipb.hxx
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/vcl/win/dtrans/TxtCnvtHlp.cxx
index 1ea9f4c9f549..a0c09a1badf5 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx
+++ b/vcl/win/dtrans/TxtCnvtHlp.cxx
@@ -18,9 +18,10 @@
*/
#include <osl/diagnose.h>
+
#include "TxtCnvtHlp.hxx"
#include "DTransHelper.hxx"
-#include "../misc/ImplHelper.hxx"
+#include "ImplHelper.hxx"
using namespace ::com::sun::star::datatransfer;
using namespace ::com::sun::star::uno;
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx b/vcl/win/dtrans/TxtCnvtHlp.hxx
index 9f8d47209d9c..9f8d47209d9c 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
+++ b/vcl/win/dtrans/TxtCnvtHlp.hxx
diff --git a/dtrans/source/inc/WinClip.hxx b/vcl/win/dtrans/WinClip.hxx
index 69d4c500c242..69d4c500c242 100644
--- a/dtrans/source/inc/WinClip.hxx
+++ b/vcl/win/dtrans/WinClip.hxx
diff --git a/vcl/win/dtrans/WinClipboard.cxx b/vcl/win/dtrans/WinClipboard.cxx
new file mode 100644
index 000000000000..2e5dc2ad2d88
--- /dev/null
+++ b/vcl/win/dtrans/WinClipboard.cxx
@@ -0,0 +1,364 @@
+/* -*- 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 <osl/diagnose.h>
+#include <com/sun/star/datatransfer/clipboard/ClipboardEvent.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/supportsservice.hxx>
+#include <rtl/ref.hxx>
+
+#include <com/sun/star/datatransfer/clipboard/RenderingCapabilities.hpp>
+#include "XNotifyingDataObject.hxx"
+
+#include <systools/win32/comtools.hxx>
+#include "DtObjFactory.hxx"
+#include "APNDataObject.hxx"
+#include "DOTransferable.hxx"
+#include "WinClipboard.hxx"
+
+#if !defined WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#include <ole2.h>
+#include <objidl.h>
+
+#include "WinClipboard.hxx"
+
+using namespace com::sun::star;
+
+// definition of static members
+CWinClipboard* CWinClipboard::s_pCWinClipbImpl = nullptr;
+osl::Mutex CWinClipboard::s_aMutex;
+
+/*XEventListener,*/
+CWinClipboard::CWinClipboard(const uno::Reference<uno::XComponentContext>& rxContext,
+ const OUString& aClipboardName)
+ : WeakComponentImplHelper<XSystemClipboard, XFlushableClipboard, XServiceInfo>(
+ m_aCbListenerMutex)
+ , m_xContext(rxContext)
+ , m_itsName(aClipboardName)
+ , m_pCurrentClipContent(nullptr)
+{
+ // necessary to reassociate from
+ // the static callback function
+ s_pCWinClipbImpl = this;
+ registerClipboardViewer();
+}
+
+CWinClipboard::~CWinClipboard()
+{
+ {
+ osl::MutexGuard aGuard(s_aMutex);
+ s_pCWinClipbImpl = nullptr;
+ }
+
+ unregisterClipboardViewer();
+}
+
+// XClipboard
+
+// to avoid unnecessary traffic we check first if there is a clipboard
+// content which was set via setContent, in this case we don't need
+// to query the content from the clipboard, create a new wrapper object
+// and so on, we simply return the original XTransferable instead of our
+// DOTransferable
+
+uno::Reference<datatransfer::XTransferable> SAL_CALL CWinClipboard::getContents()
+{
+ osl::MutexGuard aGuard(m_aMutex);
+
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ // use the shortcut or create a transferable from
+ // system clipboard
+ {
+ osl::MutexGuard aGuard(m_ClipContentMutex);
+
+ if (nullptr != m_pCurrentClipContent)
+ return m_pCurrentClipContent->m_XTransferable;
+
+ // Content cached?
+ if (m_foreignContent.is())
+ return m_foreignContent;
+
+ // release the mutex, so that the variable may be
+ // changed by other threads
+ }
+
+ uno::Reference<datatransfer::XTransferable> rClipContent;
+
+ // get the current format list from clipboard
+ if (UINT nFormats; !GetUpdatedClipboardFormats(nullptr, 0, &nFormats)
+ && GetLastError() == ERROR_INSUFFICIENT_BUFFER)
+ {
+ std::vector<UINT> aUINTFormats(nFormats);
+ if (GetUpdatedClipboardFormats(aUINTFormats.data(), nFormats, &nFormats))
+ {
+ std::vector<sal_uInt32> aFormats(aUINTFormats.begin(), aUINTFormats.end());
+ rClipContent = new CDOTransferable(m_xContext, this, aFormats);
+
+ osl::MutexGuard aGuard2(m_ClipContentMutex);
+ m_foreignContent = rClipContent;
+ }
+ }
+
+ return rClipContent;
+}
+
+IDataObjectPtr CWinClipboard::getIDataObject()
+{
+ osl::MutexGuard aGuard(m_aMutex);
+
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ // get the current dataobject from clipboard
+ IDataObjectPtr pIDataObject;
+ HRESULT hr = m_MtaOleClipboard.getClipboard(&pIDataObject);
+
+ if (SUCCEEDED(hr))
+ {
+ // create an apartment neutral dataobject and initialize it with a
+ // com smart pointer to the IDataObject from clipboard
+ pIDataObject = new CAPNDataObject(pIDataObject);
+ }
+
+ return pIDataObject;
+}
+
+void SAL_CALL CWinClipboard::setContents(
+ const uno::Reference<datatransfer::XTransferable>& xTransferable,
+ const uno::Reference<datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
+{
+ osl::MutexGuard aGuard(m_aMutex);
+
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ IDataObjectPtr pIDataObj;
+
+ if (xTransferable.is())
+ {
+ {
+ osl::MutexGuard aGuard(m_ClipContentMutex);
+
+ m_foreignContent.clear();
+
+ m_pCurrentClipContent = new CXNotifyingDataObject(
+ CDTransObjFactory::createDataObjFromTransferable(m_xContext, xTransferable),
+ xTransferable, xClipboardOwner, this);
+ }
+
+ pIDataObj = IDataObjectPtr(m_pCurrentClipContent);
+ }
+
+ m_MtaOleClipboard.setClipboard(pIDataObj.get());
+}
+
+OUString SAL_CALL CWinClipboard::getName()
+{
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ return m_itsName;
+}
+
+// XFlushableClipboard
+
+void SAL_CALL CWinClipboard::flushClipboard()
+{
+ osl::MutexGuard aGuard(m_aMutex);
+
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ // actually it should be ClearableMutexGuard aGuard( m_ClipContentMutex );
+ // but it does not work since FlushClipboard does a callback and frees DataObject
+ // which results in a deadlock in onReleaseDataObject.
+ // FlushClipboard had to be synchron in order to prevent shutdown until all
+ // clipboard-formats are rendered.
+ // The request is needed to prevent flushing if we are not clipboard owner (it is
+ // not known what happens if we flush but aren't clipboard owner).
+ // It may be possible to move the request to the clipboard STA thread by saving the
+ // DataObject and call OleIsCurrentClipboard before flushing.
+
+ if (nullptr != m_pCurrentClipContent)
+ m_MtaOleClipboard.flushClipboard();
+}
+
+// XClipboardEx
+
+sal_Int8 SAL_CALL CWinClipboard::getRenderingCapabilities()
+{
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ using namespace datatransfer::clipboard::RenderingCapabilities;
+ return (Delayed | Persistant);
+}
+
+// XClipboardNotifier
+
+void SAL_CALL CWinClipboard::addClipboardListener(
+ const uno::Reference<datatransfer::clipboard::XClipboardListener>& listener)
+{
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ // check input parameter
+ if (!listener.is())
+ throw lang::IllegalArgumentException("empty reference", static_cast<XClipboardEx*>(this),
+ 1);
+
+ rBHelper.aLC.addInterface(cppu::UnoType<decltype(listener)>::get(), listener);
+}
+
+void SAL_CALL CWinClipboard::removeClipboardListener(
+ const uno::Reference<datatransfer::clipboard::XClipboardListener>& listener)
+{
+ if (rBHelper.bDisposed)
+ throw lang::DisposedException("object is already disposed",
+ static_cast<XClipboardEx*>(this));
+
+ // check input parameter
+ if (!listener.is())
+ throw lang::IllegalArgumentException("empty reference", static_cast<XClipboardEx*>(this),
+ 1);
+
+ rBHelper.aLC.removeInterface(cppu::UnoType<decltype(listener)>::get(), listener);
+}
+
+void CWinClipboard::notifyAllClipboardListener()
+{
+ if (rBHelper.bDisposed)
+ return;
+
+ osl::ClearableMutexGuard aGuard(rBHelper.rMutex);
+ if (rBHelper.bDisposed)
+ return;
+ aGuard.clear();
+
+ cppu::OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer(
+ cppu::UnoType<datatransfer::clipboard::XClipboardListener>::get());
+ if (!pICHelper)
+ return;
+
+ try
+ {
+ cppu::OInterfaceIteratorHelper iter(*pICHelper);
+ uno::Reference<datatransfer::XTransferable> rXTransf(getContents());
+ datatransfer::clipboard::ClipboardEvent aClipbEvent(static_cast<XClipboard*>(this),
+ rXTransf);
+
+ while (iter.hasMoreElements())
+ {
+ try
+ {
+ uno::Reference<datatransfer::clipboard::XClipboardListener> xCBListener(
+ iter.next(), uno::UNO_QUERY);
+ if (xCBListener.is())
+ xCBListener->changedContents(aClipbEvent);
+ }
+ catch (uno::RuntimeException&)
+ {
+ OSL_FAIL("RuntimeException caught");
+ }
+ }
+ }
+ catch (const lang::DisposedException&)
+ {
+ OSL_FAIL("Service Manager disposed");
+
+ // no further clipboard changed notifications
+ unregisterClipboardViewer();
+ }
+}
+
+// XServiceInfo
+
+OUString SAL_CALL CWinClipboard::getImplementationName()
+{
+ return "com.sun.star.datatransfer.clipboard.ClipboardW32";
+}
+
+sal_Bool SAL_CALL CWinClipboard::supportsService(const OUString& ServiceName)
+{
+ return cppu::supportsService(this, ServiceName);
+}
+
+uno::Sequence<OUString> SAL_CALL CWinClipboard::getSupportedServiceNames()
+{
+ return { "com.sun.star.datatransfer.clipboard.SystemClipboard" };
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_CWinClipboard_get_implementation(css::uno::XComponentContext* context,
+ css::uno::Sequence<css::uno::Any> const&)
+{
+ static rtl::Reference<CWinClipboard> g_Instance(new CWinClipboard(context, ""));
+ g_Instance->acquire();
+ return static_cast<cppu::OWeakObject*>(g_Instance.get());
+}
+
+void CWinClipboard::onReleaseDataObject(CXNotifyingDataObject* theCaller)
+{
+ OSL_ASSERT(nullptr != theCaller);
+
+ if (theCaller)
+ theCaller->lostOwnership();
+
+ // if the current caller is the one we currently hold, then set it to NULL
+ // because an external source must be the clipboardowner now
+ osl::MutexGuard aGuard(m_ClipContentMutex);
+
+ if (m_pCurrentClipContent == theCaller)
+ m_pCurrentClipContent = nullptr;
+}
+
+void CWinClipboard::registerClipboardViewer()
+{
+ m_MtaOleClipboard.registerClipViewer(CWinClipboard::onClipboardContentChanged);
+}
+
+void CWinClipboard::unregisterClipboardViewer() { m_MtaOleClipboard.registerClipViewer(nullptr); }
+
+void WINAPI CWinClipboard::onClipboardContentChanged()
+{
+ osl::MutexGuard aGuard(s_aMutex);
+
+ // reassociation to instance through static member
+ if (nullptr != s_pCWinClipbImpl)
+ {
+ s_pCWinClipbImpl->m_foreignContent.clear();
+ s_pCWinClipbImpl->notifyAllClipboardListener();
+ }
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/vcl/win/dtrans/WinClipboard.hxx
index db3f1ab188ed..56a1da34226a 100644
--- a/dtrans/source/win32/clipb/WinClipboard.hxx
+++ b/vcl/win/dtrans/WinClipboard.hxx
@@ -33,11 +33,10 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <osl/conditn.hxx>
+#include <systools/win32/comtools.hxx>
-#include <memory>
-
-// forward
-class CWinClipbImpl;
+#include "MtaOleClipb.hxx"
+#include "XNotifyingDataObject.hxx"
// implements the XClipboard[Ex] ... interfaces
// for the clipboard viewer mechanism we need a static callback function
@@ -54,68 +53,69 @@ class CWinClipbImpl;
class CWinClipboardDummy
{
protected:
- osl::Mutex m_aMutex;
- osl::Mutex m_aCbListenerMutex;
+ osl::Mutex m_aMutex;
+ osl::Mutex m_aCbListenerMutex;
};
-class CWinClipboard :
- public CWinClipboardDummy,
- public cppu::WeakComponentImplHelper<
- css::datatransfer::clipboard::XSystemClipboard,
- css::datatransfer::clipboard::XFlushableClipboard,
- css::lang::XServiceInfo >
+class CWinClipboard final
+ : public CWinClipboardDummy,
+ public cppu::WeakComponentImplHelper<css::datatransfer::clipboard::XSystemClipboard,
+ css::datatransfer::clipboard::XFlushableClipboard,
+ css::lang::XServiceInfo>
{
-public:
- CWinClipboard( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
- const OUString& aClipboardName );
+ friend STDMETHODIMP_(ULONG) CXNotifyingDataObject::Release();
- // XClipboard
+ css::uno::Reference<css::uno::XComponentContext> m_xContext;
+ const OUString m_itsName;
+ CMtaOleClipboard m_MtaOleClipboard;
+ CXNotifyingDataObject* m_pCurrentClipContent;
+ com::sun::star::uno::Reference<com::sun::star::datatransfer::XTransferable> m_foreignContent;
+ osl::Mutex m_ClipContentMutex;
- virtual css::uno::Reference< css::datatransfer::XTransferable > SAL_CALL getContents( ) override;
+ static osl::Mutex s_aMutex;
+ static CWinClipboard* s_pCWinClipbImpl;
- virtual void SAL_CALL setContents(
- const css::uno::Reference< css::datatransfer::XTransferable >& xTransferable,
- const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner >& xClipboardOwner ) override;
+ void notifyAllClipboardListener();
+ void onReleaseDataObject(CXNotifyingDataObject* theCaller);
- virtual OUString SAL_CALL getName( ) override;
+ void registerClipboardViewer();
+ void unregisterClipboardViewer();
- // XFlushableClipboard
+ static void WINAPI onClipboardContentChanged();
- virtual void SAL_CALL flushClipboard( ) override;
+public:
+ CWinClipboard(const css::uno::Reference<css::uno::XComponentContext>& rxContext,
+ const OUString& aClipboardName);
+ virtual ~CWinClipboard() override;
- // XClipboardEx
+ // XClipboard
+ virtual css::uno::Reference<css::datatransfer::XTransferable> SAL_CALL getContents() override;
+ virtual void SAL_CALL setContents(
+ const css::uno::Reference<css::datatransfer::XTransferable>& xTransferable,
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboardOwner>& xClipboardOwner)
+ override;
+ virtual OUString SAL_CALL getName() override;
- virtual sal_Int8 SAL_CALL getRenderingCapabilities( ) override;
+ // XFlushableClipboard
+ virtual void SAL_CALL flushClipboard() override;
- // XClipboardNotifier
+ // XClipboardEx
+ virtual sal_Int8 SAL_CALL getRenderingCapabilities() override;
+ // XClipboardNotifier
virtual void SAL_CALL addClipboardListener(
- const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener >& listener ) override;
-
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
+ override;
virtual void SAL_CALL removeClipboardListener(
- const css::uno::Reference< css::datatransfer::clipboard::XClipboardListener >& listener ) override;
-
- // overwrite base class method, which is called
- // by base class dispose function
-
- virtual void SAL_CALL disposing() override;
+ const css::uno::Reference<css::datatransfer::clipboard::XClipboardListener>& listener)
+ override;
// XServiceInfo
+ virtual OUString SAL_CALL getImplementationName() override;
+ virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
+ virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
- virtual OUString SAL_CALL getImplementationName( ) override;
-
- virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
-
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
-
-private:
- void notifyAllClipboardListener( );
-
-private:
- std::unique_ptr< CWinClipbImpl > m_pImpl;
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
-
- friend class CWinClipbImpl;
+ IDataObjectPtr getIDataObject();
};
#endif
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/vcl/win/dtrans/XNotifyingDataObject.cxx
index 46f563f9497c..a989b47e938d 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
+++ b/vcl/win/dtrans/XNotifyingDataObject.cxx
@@ -19,8 +19,7 @@
#include <osl/diagnose.h>
#include "XNotifyingDataObject.hxx"
-#include "../clipb/WinClipbImpl.hxx"
-#include "../clipb/WinClipboard.hxx"
+#include "WinClipboard.hxx"
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
@@ -31,12 +30,12 @@ CXNotifyingDataObject::CXNotifyingDataObject(
const IDataObjectPtr& aIDataObject,
const Reference< XTransferable >& aXTransferable,
const Reference< XClipboardOwner >& aXClipOwner,
- CWinClipbImpl* theWinClipImpl ) :
+ CWinClipboard* const theWinClipoard) :
m_nRefCnt( 0 ),
m_aIDataObject( aIDataObject ),
m_XTransferable( aXTransferable ),
m_XClipboardOwner( aXClipOwner ),
- m_pWinClipImpl( theWinClipImpl )
+ m_pWinClipImpl( theWinClipoard )
{
}
@@ -138,7 +137,7 @@ void CXNotifyingDataObject::lostOwnership( )
{
if (m_XClipboardOwner.is())
m_XClipboardOwner->lostOwnership(
- static_cast<XClipboardEx*>(m_pWinClipImpl->m_pWinClipboard ), m_XTransferable);
+ static_cast<XClipboardEx*>(m_pWinClipImpl), m_XTransferable);
}
catch(RuntimeException&)
{
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx b/vcl/win/dtrans/XNotifyingDataObject.hxx
index 0d72c760f4c2..a89cb0f5e54e 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx
+++ b/vcl/win/dtrans/XNotifyingDataObject.hxx
@@ -37,16 +37,16 @@
----------------------------------------------------------------------------*/
// forward
-class CWinClipbImpl;
+class CWinClipboard;
-class CXNotifyingDataObject : public IDataObject
+class CXNotifyingDataObject final : public IDataObject
{
public:
CXNotifyingDataObject(
const IDataObjectPtr& aIDataObject,
const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable,
const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner >& aXClipOwner,
- CWinClipbImpl* theWinClipImpl );
+ CWinClipboard* const theWinClipoard);
virtual ~CXNotifyingDataObject() {}
@@ -73,14 +73,13 @@ public:
private:
void lostOwnership( );
-private:
sal_Int32 m_nRefCnt;
IDataObjectPtr m_aIDataObject;
const css::uno::Reference< css::datatransfer::XTransferable > m_XTransferable;
const css::uno::Reference< css::datatransfer::clipboard::XClipboardOwner > m_XClipboardOwner;
- CWinClipbImpl* m_pWinClipImpl;
+ CWinClipboard* const m_pWinClipImpl;
- friend class CWinClipbImpl;
+ friend class CWinClipboard;
};
#endif
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/vcl/win/dtrans/XTDataObject.cxx
index 6df5c9d384c1..b829d2cdf3c1 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/vcl/win/dtrans/XTDataObject.cxx
@@ -22,7 +22,7 @@
#include "XTDataObject.hxx"
#include <com/sun/star/datatransfer/DataFlavor.hpp>
-#include "../misc/ImplHelper.hxx"
+#include "ImplHelper.hxx"
#include "DTransHelper.hxx"
#include "TxtCnvtHlp.hxx"
#include <com/sun/star/datatransfer/UnsupportedFlavorException.hpp>
@@ -635,10 +635,10 @@ DataFlavor CXTDataObject::formatEtcToDataFlavor( const FORMATETC& aFormatEtc ) c
DataFlavor aFlavor;
if ( m_FormatRegistrar.hasSynthesizedLocale( ) )
- aFlavor =
- m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc, CFormatRegistrar::getSynthesizedLocale( ) );
+ aFlavor = m_DataFormatTranslator.getDataFlavorFromFormatEtc(
+ aFormatEtc.cfFormat, CFormatRegistrar::getSynthesizedLocale());
else
- aFlavor = m_DataFormatTranslator.getDataFlavorFromFormatEtc( aFormatEtc );
+ aFlavor = m_DataFormatTranslator.getDataFlavorFromFormatEtc(aFormatEtc.cfFormat);
if ( !aFlavor.MimeType.getLength( ) )
throw UnsupportedFlavorException( );
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/vcl/win/dtrans/XTDataObject.hxx
index ca30bbea2434..ca30bbea2434 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/vcl/win/dtrans/XTDataObject.hxx
diff --git a/dtrans/source/generic/clipboardmanager.cxx b/vcl/win/dtrans/clipboardmanager.cxx
index 0c5dd396fec9..8cea07171f78 100644
--- a/dtrans/source/generic/clipboardmanager.cxx
+++ b/vcl/win/dtrans/clipboardmanager.cxx
@@ -22,8 +22,10 @@
#include <com/sun/star/container/NoSuchElementException.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <comphelper/sequence.hxx>
+#include <rtl/ref.hxx>
using namespace com::sun::star::container;
using namespace com::sun::star::datatransfer;
@@ -36,6 +38,11 @@ using namespace std;
using ::dtrans::ClipboardManager;
+static osl::Mutex g_InstanceGuard;
+static rtl::Reference<ClipboardManager> g_Instance;
+static bool g_Disposed = false;
+
+
ClipboardManager::ClipboardManager():
WeakComponentImplHelper< XClipboardManager, XEventListener, XServiceInfo > (m_aMutex),
m_aDefaultName(OUString("default"))
@@ -48,7 +55,7 @@ ClipboardManager::~ClipboardManager()
OUString SAL_CALL ClipboardManager::getImplementationName( )
{
- return CLIPBOARDMANAGER_IMPLEMENTATION_NAME;
+ return "com.sun.star.comp.datatransfer.ClipboardManager";
}
sal_Bool SAL_CALL ClipboardManager::supportsService( const OUString& ServiceName )
@@ -58,7 +65,7 @@ sal_Bool SAL_CALL ClipboardManager::supportsService( const OUString& ServiceName
Sequence< OUString > SAL_CALL ClipboardManager::getSupportedServiceNames( )
{
- return ClipboardManager_getSupportedServiceNames();
+ return { "com.sun.star.datatransfer.clipboard.ClipboardManager" };
}
Reference< XClipboard > SAL_CALL ClipboardManager::getClipboard( const OUString& aName )
@@ -139,43 +146,50 @@ Sequence< OUString > SAL_CALL ClipboardManager::listClipboardNames()
void SAL_CALL ClipboardManager::dispose()
{
- ClearableMutexGuard aGuard( rBHelper.rMutex );
- if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
- rBHelper.bInDispose = true;
- aGuard.clear();
-
- // give everyone a chance to save his clipboard instance
- EventObject aEvt(static_cast < XClipboardManager * > (this));
- rBHelper.aLC.disposeAndClear( aEvt );
-
- // removeClipboard is still allowed here, so make a copy of the
- // list (to ensure integrity) and clear the original.
- ClearableMutexGuard aGuard2( rBHelper.rMutex );
- ClipboardMap aCopy(m_aClipboardMap);
- m_aClipboardMap.clear();
- aGuard2.clear();
-
- // dispose all clipboards still in list
- for (auto const& elem : aCopy)
+ osl::MutexGuard aGuard(g_InstanceGuard);
+ g_Instance.clear();
+ g_Disposed = true;
+ }
+ {
+ ClearableMutexGuard aGuard( rBHelper.rMutex );
+ if (!rBHelper.bDisposed && !rBHelper.bInDispose)
{
- Reference< XComponent > xComponent(elem.second, UNO_QUERY);
- if (xComponent.is())
+ rBHelper.bInDispose = true;
+ aGuard.clear();
+
+ // give everyone a chance to save his clipboard instance
+ EventObject aEvt(static_cast < XClipboardManager * > (this));
+ rBHelper.aLC.disposeAndClear( aEvt );
+
+ // removeClipboard is still allowed here, so make a copy of the
+ // list (to ensure integrity) and clear the original.
+ ClearableMutexGuard aGuard2( rBHelper.rMutex );
+ ClipboardMap aCopy(m_aClipboardMap);
+ m_aClipboardMap.clear();
+ aGuard2.clear();
+
+ // dispose all clipboards still in list
+ for (auto const& elem : aCopy)
{
- try
- {
- xComponent->removeEventListener(static_cast < XEventListener * > (this));
- xComponent->dispose();
- }
- catch (const Exception&)
+ Reference< XComponent > xComponent(elem.second, UNO_QUERY);
+ if (xComponent.is())
{
- // exceptions can be safely ignored here.
+ try
+ {
+ xComponent->removeEventListener(static_cast < XEventListener * > (this));
+ xComponent->dispose();
+ }
+ catch (const Exception&)
+ {
+ // exceptions can be safely ignored here.
+ }
}
}
- }
- rBHelper.bDisposed = true;
- rBHelper.bInDispose = false;
+ rBHelper.bDisposed = true;
+ rBHelper.bInDispose = false;
+ }
}
}
@@ -187,16 +201,17 @@ void SAL_CALL ClipboardManager::disposing( const EventObject& event )
removeClipboard(xClipboard->getName());
}
-Reference< XInterface > ClipboardManager_createInstance(
- const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/)
-{
- return Reference < XInterface >(static_cast<OWeakObject *>(new ClipboardManager()));
-}
-
-Sequence< OUString > ClipboardManager_getSupportedServiceNames()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_ClipboardManager_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- Sequence < OUString > SupportedServicesNames { "com.sun.star.datatransfer.clipboard.ClipboardManager" };
- return SupportedServicesNames;
+ osl::MutexGuard aGuard(g_InstanceGuard);
+ if (g_Disposed)
+ return nullptr;
+ if (!g_Instance)
+ g_Instance.set(new ClipboardManager());
+ g_Instance->acquire();
+ return static_cast<cppu::OWeakObject*>(g_Instance.get());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/generic/clipboardmanager.hxx b/vcl/win/dtrans/clipboardmanager.hxx
index e3217f6bf6bb..2750b61246cb 100644
--- a/dtrans/source/generic/clipboardmanager.hxx
+++ b/vcl/win/dtrans/clipboardmanager.hxx
@@ -28,8 +28,6 @@
#include <map>
-#define CLIPBOARDMANAGER_IMPLEMENTATION_NAME "com.sun.star.comp.datatransfer.ClipboardManager"
-
typedef std::map< OUString, css::uno::Reference< css::datatransfer::clipboard::XClipboard > > ClipboardMap;
namespace dtrans
@@ -90,10 +88,6 @@ namespace dtrans
}
-css::uno::Sequence< OUString > ClipboardManager_getSupportedServiceNames();
-css::uno::Reference< css::uno::XInterface > ClipboardManager_createInstance(
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xMultiServiceFactory);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/vcl/win/dtrans/ftransl.cxx
index 4cc1897059a3..e2a6581abfec 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/vcl/win/dtrans/ftransl.cxx
@@ -26,16 +26,13 @@
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
-#include "../misc/ImplHelper.hxx"
+#include <rtl/ref.hxx>
+#include "ImplHelper.hxx"
#include <shlobj.h>
-#define IMPL_NAME "com.sun.star.datatransfer.DataFormatTranslator"
-
#define CPPUTYPE_SEQSALINT8 cppu::UnoType<Sequence< sal_Int8 >>::get()
#define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8
-#define CPPUTYPE_OUSTR cppu::UnoType<OUString>::get()
-#define CPPUTYPE_SALINT32 cppu::UnoType<sal_Int32>::get()
const OUString Windows_FormatName ("windows_formatname");
const css::uno::Type CppuType_ByteSequence = cppu::UnoType<css::uno::Sequence<sal_Int8>>::get();
@@ -51,12 +48,6 @@ using namespace com::sun::star::container;
namespace
{
- Sequence< OUString > DataFormatTranslator_getSupportedServiceNames( )
- {
- Sequence< OUString > aRet { "com.sun.star.datatransfer.DataFormatTranslator" };
- return aRet;
- }
-}
struct FormatEntry
{
@@ -73,6 +64,8 @@ struct FormatEntry
sal_Int32 aStandardFormatId;
};
+}
+
FormatEntry::FormatEntry(
const char *mime_content_type,
const char *human_presentable_name,
@@ -506,14 +499,14 @@ DataFlavor SAL_CALL CDataFormatTranslatorUNO::getDataFlavorFromSystemDataType( c
DataFlavor aFlavor = mkDataFlv( OUString(), OUString(), CPPUTYPE_SEQSALINT8 );
- if ( aSysDataType.getValueType( ) == CPPUTYPE_SALINT32 )
+ if ( aSysDataType.getValueType( ) == cppu::UnoType<sal_Int32>::get() )
{
sal_Int32 clipformat = CF_INVALID;
aSysDataType >>= clipformat;
if ( CF_INVALID != clipformat )
findDataFlavorForStandardFormatId( clipformat, aFlavor );
}
- else if ( aSysDataType.getValueType( ) == CPPUTYPE_OUSTR )
+ else if ( aSysDataType.getValueType( ) == cppu::UnoType<OUString>::get() )
{
OUString nativeFormatName;
aSysDataType >>= nativeFormatName;
@@ -530,7 +523,7 @@ DataFlavor SAL_CALL CDataFormatTranslatorUNO::getDataFlavorFromSystemDataType( c
OUString SAL_CALL CDataFormatTranslatorUNO::getImplementationName( )
{
- return IMPL_NAME;
+ return "com.sun.star.datatransfer.DataFormatTranslator";
}
sal_Bool SAL_CALL CDataFormatTranslatorUNO::supportsService( const OUString& ServiceName )
@@ -540,7 +533,15 @@ sal_Bool SAL_CALL CDataFormatTranslatorUNO::supportsService( const OUString& Ser
Sequence< OUString > SAL_CALL CDataFormatTranslatorUNO::getSupportedServiceNames( )
{
- return DataFormatTranslator_getSupportedServiceNames( );
+ return { "com.sun.star.datatransfer.DataFormatTranslator" };
}
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_CDataFormatTranslatorUNO_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+ static rtl::Reference<CDataFormatTranslatorUNO> g_Instance(new CDataFormatTranslatorUNO(context));
+ g_Instance->acquire();
+ return static_cast<cppu::OWeakObject*>(g_Instance.get());
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/vcl/win/dtrans/ftransl.hxx
index 71d8038d2b23..c93cd8096d5d 100644
--- a/dtrans/source/win32/ftransl/ftransl.hxx
+++ b/vcl/win/dtrans/ftransl.hxx
@@ -27,7 +27,7 @@
#include <com/sun/star/datatransfer/XDataFormatTranslator.hpp>
#include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
-#include <WinClip.hxx>
+#include "WinClip.hxx"
#include <vector>
diff --git a/dtrans/source/generic/generic_clipboard.cxx b/vcl/win/dtrans/generic_clipboard.cxx
index 4fa49b3d5ebe..dfc5759750f9 100644
--- a/dtrans/source/generic/generic_clipboard.cxx
+++ b/vcl/win/dtrans/generic_clipboard.cxx
@@ -20,6 +20,7 @@
#include "generic_clipboard.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/datatransfer/clipboard/RenderingCapabilities.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <cppuhelper/supportsservice.hxx>
using namespace com::sun::star::datatransfer;
@@ -56,7 +57,7 @@ void SAL_CALL GenericClipboard::initialize( const Sequence< Any >& aArguments )
OUString SAL_CALL GenericClipboard::getImplementationName( )
{
- return GENERIC_CLIPBOARD_IMPLEMENTATION_NAME;
+ return "com.sun.star.comp.datatransfer.clipboard.GenericClipboard";
}
sal_Bool SAL_CALL GenericClipboard::supportsService( const OUString& ServiceName )
@@ -66,7 +67,7 @@ sal_Bool SAL_CALL GenericClipboard::supportsService( const OUString& ServiceName
Sequence< OUString > SAL_CALL GenericClipboard::getSupportedServiceNames( )
{
- return GenericClipboard_getSupportedServiceNames();
+ return { "com.sun.star.datatransfer.clipboard.GenericClipboard" };
}
Reference< XTransferable > SAL_CALL GenericClipboard::getContents()
@@ -137,16 +138,11 @@ void SAL_CALL GenericClipboard::removeClipboardListener( const Reference< XClipb
rBHelper.aLC.removeInterface( cppu::UnoType<XClipboardListener>::get(), listener );
}
-Sequence< OUString > GenericClipboard_getSupportedServiceNames()
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_GenericClipboard_get_implementation(
+ css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any> const&)
{
- Sequence< OUString > aRet { "com.sun.star.datatransfer.clipboard.GenericClipboard" };
- return aRet;
-}
-
-Reference< XInterface > GenericClipboard_createInstance(
- const Reference< XMultiServiceFactory > & /*xMultiServiceFactory*/)
-{
- return Reference < XInterface >(static_cast<OWeakObject *>(new GenericClipboard()));
+ return cppu::acquire(static_cast<cppu::OWeakObject*>(new GenericClipboard()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/generic/generic_clipboard.hxx b/vcl/win/dtrans/generic_clipboard.hxx
index 2b31d063229c..f23a0cc9a120 100644
--- a/dtrans/source/generic/generic_clipboard.hxx
+++ b/vcl/win/dtrans/generic_clipboard.hxx
@@ -29,8 +29,6 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#define GENERIC_CLIPBOARD_IMPLEMENTATION_NAME "com.sun.star.comp.datatransfer.clipboard.GenericClipboard"
-
namespace dtrans
{
@@ -101,10 +99,6 @@ namespace dtrans
}
-css::uno::Sequence< OUString > GenericClipboard_getSupportedServiceNames();
-css::uno::Reference< css::uno::XInterface > GenericClipboard_createInstance(
- const css::uno::Reference< css::lang::XMultiServiceFactory > & xMultiServiceFactory);
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/globals.cxx b/vcl/win/dtrans/globals.cxx
index fcddef22e6c1..fcddef22e6c1 100644
--- a/dtrans/source/win32/dnd/globals.cxx
+++ b/vcl/win/dtrans/globals.cxx
diff --git a/dtrans/source/win32/dnd/globals.hxx b/vcl/win/dtrans/globals.hxx
index 373270358d5c..057f449395c6 100644
--- a/dtrans/source/win32/dnd/globals.hxx
+++ b/vcl/win/dtrans/globals.hxx
@@ -31,12 +31,6 @@ namespace com { namespace sun { namespace star { namespace datatransfer {
#include <wtypes.h>
#include <sal/types.h>
-#define DNDSOURCE_SERVICE_NAME "com.sun.star.datatransfer.dnd.OleDragSource"
-#define DNDSOURCE_IMPL_NAME "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1"
-
-#define DNDTARGET_SERVICE_NAME "com.sun.star.datatransfer.dnd.OleDropTarget"
-#define DNDTARGET_IMPL_NAME "com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1"
-
// This maps key states as occur as parameter, e.g. in IDropTarget::DragEnter,
// IDropSource::QueryContinueDrag, to actions as are declared in
// css::datatransfer::dnd::DNDConstants ( ACTION_MOVE etc).
diff --git a/dtrans/source/win32/dnd/idroptarget.cxx b/vcl/win/dtrans/idroptarget.cxx
index 8b403eb7a35f..8b403eb7a35f 100644
--- a/dtrans/source/win32/dnd/idroptarget.cxx
+++ b/vcl/win/dtrans/idroptarget.cxx
diff --git a/dtrans/source/win32/dnd/idroptarget.hxx b/vcl/win/dtrans/idroptarget.hxx
index a86739f87cdd..a86739f87cdd 100644
--- a/dtrans/source/win32/dnd/idroptarget.hxx
+++ b/vcl/win/dtrans/idroptarget.hxx
diff --git a/dtrans/source/win32/dnd/source.cxx b/vcl/win/dtrans/source.cxx
index c797684d233c..93d94e94e4c7 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/vcl/win/dtrans/source.cxx
@@ -30,7 +30,8 @@
#include "source.hxx"
#include "globals.hxx"
#include "sourcecontext.hxx"
-#include "../../inc/DtObjFactory.hxx"
+#include "DtObjFactory.hxx"
+
#include <rtl/ustring.h>
#include <osl/thread.h>
#include <winuser.h>
@@ -278,7 +279,7 @@ dwEffect
// XServiceInfo
OUString SAL_CALL DragSource::getImplementationName( )
{
- return DNDSOURCE_IMPL_NAME;
+ return "com.sun.star.comp.datatransfer.dnd.OleDragSource_V1";
}
// XServiceInfo
sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName )
@@ -288,7 +289,14 @@ sal_Bool SAL_CALL DragSource::supportsService( const OUString& ServiceName )
Sequence< OUString > SAL_CALL DragSource::getSupportedServiceNames( )
{
- return { DNDSOURCE_SERVICE_NAME };
+ return { "com.sun.star.datatransfer.dnd.OleDragSource" };
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_DragSource_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+ return cppu::acquire(static_cast<cppu::OWeakObject*>(new DragSource(context)));
}
/** This function is called as extra thread from
diff --git a/dtrans/source/win32/dnd/source.hxx b/vcl/win/dtrans/source.hxx
index 52d4bab1982f..52d4bab1982f 100644
--- a/dtrans/source/win32/dnd/source.hxx
+++ b/vcl/win/dtrans/source.hxx
diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/vcl/win/dtrans/sourcecontext.cxx
index 8531fd8a1184..8531fd8a1184 100644
--- a/dtrans/source/win32/dnd/sourcecontext.cxx
+++ b/vcl/win/dtrans/sourcecontext.cxx
diff --git a/dtrans/source/win32/dnd/sourcecontext.hxx b/vcl/win/dtrans/sourcecontext.hxx
index 81b1682ebff9..81b1682ebff9 100644
--- a/dtrans/source/win32/dnd/sourcecontext.hxx
+++ b/vcl/win/dtrans/sourcecontext.hxx
diff --git a/dtrans/source/win32/dnd/target.cxx b/vcl/win/dtrans/target.cxx
index 7592eb390962..86229f23914c 100644
--- a/dtrans/source/win32/dnd/target.cxx
+++ b/vcl/win/dtrans/target.cxx
@@ -31,7 +31,7 @@
#include <rtl/ustring.h>
#include <osl/thread.h>
-#include "../dtobj/DOTransferable.hxx"
+#include "DOTransferable.hxx"
using namespace cppu;
using namespace osl;
@@ -248,7 +248,7 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams)
// XServiceInfo
OUString SAL_CALL DropTarget::getImplementationName( )
{
- return DNDTARGET_IMPL_NAME;
+ return "com.sun.star.comp.datatransfer.dnd.OleDropTarget_V1";
}
// XServiceInfo
sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName )
@@ -258,7 +258,7 @@ sal_Bool SAL_CALL DropTarget::supportsService( const OUString& ServiceName )
Sequence< OUString > SAL_CALL DropTarget::getSupportedServiceNames( )
{
- return { DNDTARGET_SERVICE_NAME };
+ return { "com.sun.star.datatransfer.dnd.OleDropTarget" };
}
// XDropTarget
@@ -321,8 +321,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj,
else
{
// Convert the IDataObject to a XTransferable
- m_currentData= CDOTransferable::create(
- m_xContext, IDataObjectPtr(pDataObj));
+ m_currentData = new CDOTransferable(m_xContext, IDataObjectPtr(pDataObj));
}
//<-- TRA
@@ -625,4 +624,11 @@ inline sal_Int8 DropTarget::getFilteredActions( DWORD grfKeyState, DWORD dwEffec
return actions & m_nDefaultActions;
}
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+dtrans_DropTarget_get_implementation(
+ css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&)
+{
+ return cppu::acquire(static_cast<cppu::OWeakObject*>(new DropTarget(context)));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dtrans/source/win32/dnd/target.hxx b/vcl/win/dtrans/target.hxx
index 9becfe484260..9becfe484260 100644
--- a/dtrans/source/win32/dnd/target.hxx
+++ b/vcl/win/dtrans/target.hxx
diff --git a/dtrans/source/win32/dnd/targetdragcontext.cxx b/vcl/win/dtrans/targetdragcontext.cxx
index 4ffd16123d9d..4ffd16123d9d 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.cxx
+++ b/vcl/win/dtrans/targetdragcontext.cxx
diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/vcl/win/dtrans/targetdragcontext.hxx
index a8f48cad193e..a8f48cad193e 100644
--- a/dtrans/source/win32/dnd/targetdragcontext.hxx
+++ b/vcl/win/dtrans/targetdragcontext.hxx
diff --git a/dtrans/source/win32/dnd/targetdropcontext.cxx b/vcl/win/dtrans/targetdropcontext.cxx
index 9719664a9fbb..9719664a9fbb 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.cxx
+++ b/vcl/win/dtrans/targetdropcontext.cxx
diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/vcl/win/dtrans/targetdropcontext.hxx
index b7db849fe4e1..b7db849fe4e1 100644
--- a/dtrans/source/win32/dnd/targetdropcontext.hxx
+++ b/vcl/win/dtrans/targetdropcontext.hxx
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 95fd346af1a5..2ead5b5ba78c 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -2428,7 +2428,7 @@ bool WinSalGraphicsImpl::TryDrawBitmapGDIPlus(const SalTwoRect& rTR, const SalBi
const WinSalBitmap& rSalBitmap = static_cast< const WinSalBitmap& >(rSrcBitmap);
std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap());
- if(aARGB.get())
+ if(aARGB)
{
Gdiplus::Graphics aGraphics(mrParent.getHDC());
@@ -2481,7 +2481,7 @@ bool WinSalGraphicsImpl::drawAlphaBitmap(
const WinSalBitmap& rSalAlpha = static_cast< const WinSalBitmap& >(rAlphaBmp);
std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap(&rSalAlpha));
- if(aARGB.get())
+ if(aARGB)
{
Gdiplus::Graphics aGraphics(mrParent.getHDC());
@@ -2518,7 +2518,7 @@ bool WinSalGraphicsImpl::drawTransformedBitmap(
const WinSalBitmap* pSalAlpha = static_cast< const WinSalBitmap* >(pAlphaBitmap);
std::shared_ptr< Gdiplus::Bitmap > aARGB(rSalBitmap.ImplGetGdiPlusBitmap(pSalAlpha));
- if(aARGB.get())
+ if(aARGB)
{
const long nSrcWidth(aARGB->GetWidth());
const long nSrcHeight(aARGB->GetHeight());
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 173ea361bbe8..393cdd685b8d 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -658,7 +658,7 @@ bool WinSalBitmap::Create( const css::uno::Reference< css::rendering::XBitmapCan
css::uno::Reference< css::beans::XFastPropertySet >
xFastPropertySet( rBitmapCanvas, css::uno::UNO_QUERY );
- if( xFastPropertySet.get() ) {
+ if( xFastPropertySet ) {
css::uno::Sequence< css::uno::Any > args;
if( xFastPropertySet->getFastPropertyValue(bMask ? 2 : 1) >>= args ) {
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 9d8439c7387c..1f0db745639e 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -896,16 +896,22 @@ HFONT WinSalGraphics::ImplDoSetFont(FontSelectPattern const & i_rFont,
void WinSalGraphics::SetFont(LogicalFontInstance* pFont, int nFallbackLevel)
{
+ // check that we don't change the first font while ScopedFont has replaced HFONT
+ assert(!mpWinFontEntry[0].is() || nFallbackLevel != 0 || mpWinFontEntry[0]->GetHFONT());
+ assert(nFallbackLevel >= 0 && nFallbackLevel < MAX_FALLBACK);
+
// return early if there is no new font
if( !pFont )
{
if (!mpWinFontEntry[nFallbackLevel].is())
return;
- // select original DC font
- assert(mhDefFont);
- ::SelectFont(getHDC(), mhDefFont);
- mhDefFont = nullptr;
+ // DeInitGraphics doesn't free the cached fonts, so mhDefFont might be nullptr
+ if (mhDefFont)
+ {
+ ::SelectFont(getHDC(), mhDefFont);
+ mhDefFont = nullptr;
+ }
// release no longer referenced font handles
for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i )
diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx
index 2d4a283bb818..328f7c247599 100644
--- a/vcl/win/gdi/salgdi.cxx
+++ b/vcl/win/gdi/salgdi.cxx
@@ -449,6 +449,9 @@ void ImplUpdateSysColorEntries()
void WinSalGraphics::InitGraphics()
{
+ if (!getHDC())
+ return;
+
// calculate the minimal line width for the printer
if ( isPrinter() )
{
@@ -468,19 +471,38 @@ void WinSalGraphics::InitGraphics()
void WinSalGraphics::DeInitGraphics()
{
+ if (!getHDC())
+ return;
+
// clear clip region
SelectClipRgn( getHDC(), nullptr );
// select default objects
if ( mhDefPen )
+ {
SelectPen( getHDC(), mhDefPen );
+ mhDefPen = nullptr;
+ }
if ( mhDefBrush )
+ {
SelectBrush( getHDC(), mhDefBrush );
+ mhDefBrush = nullptr;
+ }
if ( mhDefFont )
+ {
SelectFont( getHDC(), mhDefFont );
+ mhDefFont = nullptr;
+ }
mpImpl->DeInit();
}
+void WinSalGraphics::setHDC(HDC aNew)
+{
+ DeInitGraphics();
+ mhLocalDC = aNew;
+ InitGraphics();
+}
+
HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp )
{
SalData* pSalData = GetSalData();
@@ -638,6 +660,8 @@ WinSalGraphics::~WinSalGraphics()
// delete cache data
delete [] reinterpret_cast<BYTE*>(mpStdClipRgnData);
+
+ setHDC(nullptr);
}
SalGraphicsImpl* WinSalGraphics::GetImpl() const
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 83d5aa749e14..1fe4968690bd 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1031,7 +1031,6 @@ static WinSalGraphics* ImplCreateSalPrnGraphics( HDC hDC )
WinSalGraphics* pGraphics = new WinSalGraphics(WinSalGraphics::PRINTER, false, nullptr, /* CHECKME */ nullptr);
pGraphics->SetLayout( SalLayoutFlags::NONE );
pGraphics->setHDC(hDC);
- pGraphics->InitGraphics();
return pGraphics;
}
@@ -1041,17 +1040,8 @@ static bool ImplUpdateSalPrnIC( WinSalInfoPrinter* pPrinter, const ImplJobSetup*
if ( !hNewDC )
return FALSE;
- if ( pPrinter->mpGraphics )
- {
- pPrinter->mpGraphics->DeInitGraphics();
- DeleteDC( pPrinter->mpGraphics->getHDC() );
- delete pPrinter->mpGraphics;
- }
-
- pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hNewDC );
- pPrinter->mhDC = hNewDC;
-
- return TRUE;
+ pPrinter->setHDC(hNewDC);
+ return true;
}
@@ -1075,8 +1065,7 @@ SalInfoPrinter* WinSalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueIn
return nullptr;
}
- pPrinter->mpGraphics = ImplCreateSalPrnGraphics( hDC );
- pPrinter->mhDC = hDC;
+ pPrinter->setHDC(hDC);
if ( !pSetupData->GetDriverData() )
ImplUpdateSalJobSetup( pPrinter, pSetupData, false, nullptr );
ImplDevModeToJobSetup( pPrinter, pSetupData, JobSetFlags::ALL );
@@ -1092,21 +1081,33 @@ void WinSalInstance::DestroyInfoPrinter( SalInfoPrinter* pPrinter )
WinSalInfoPrinter::WinSalInfoPrinter() :
- mpGraphics( nullptr ),
- mhDC( nullptr ),
- mbGraphics( FALSE )
+ m_hDC(nullptr),
+ m_pGraphics(nullptr),
+ m_bGraphics(false)
{
m_bPapersInit = FALSE;
}
WinSalInfoPrinter::~WinSalInfoPrinter()
{
- if ( mpGraphics )
+ setHDC(nullptr);
+}
+
+void WinSalInfoPrinter::setHDC(HDC hNewDC)
+{
+ assert(!m_bGraphics);
+
+ if (m_hDC)
{
- mpGraphics->DeInitGraphics();
- DeleteDC( mpGraphics->getHDC() );
- delete mpGraphics;
+ assert(!m_pGraphics || m_hDC == m_pGraphics->getHDC());
+ // we get intermittent crashes on the Windows jenkins box around here, let us see if there is something weird about the DC
+ SAL_WARN_IF(!hNewDC, "vcl", "Graphics DC " << m_hDC);
+ delete m_pGraphics;
+ m_pGraphics = nullptr;
+ DeleteDC(m_hDC);
}
+
+ m_hDC = hNewDC;
}
void WinSalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData )
@@ -1147,18 +1148,21 @@ int WinSalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData )
SalGraphics* WinSalInfoPrinter::AcquireGraphics()
{
- if ( mbGraphics )
+ assert(m_hDC);
+ if (m_bGraphics)
return nullptr;
- if ( mpGraphics )
- mbGraphics = TRUE;
+ if (!m_pGraphics)
+ m_pGraphics = ImplCreateSalPrnGraphics(m_hDC);
+ if (m_pGraphics)
+ m_bGraphics = true;
- return mpGraphics;
+ return m_pGraphics;
}
void WinSalInfoPrinter::ReleaseGraphics( SalGraphics* )
{
- mbGraphics = FALSE;
+ m_bGraphics = false;
}
bool WinSalInfoPrinter::Setup(weld::Window* pFrame, ImplJobSetup* pSetupData)
@@ -1264,7 +1268,7 @@ void WinSalInfoPrinter::GetPageInfo( const ImplJobSetup*,
Point& rPageOffset,
Size& rPaperSize )
{
- HDC hDC = mhDC;
+ HDC hDC = m_hDC;
rOutWidth = GetDeviceCaps( hDC, HORZRES );
rOutHeight = GetDeviceCaps( hDC, VERTRES );
@@ -1369,12 +1373,7 @@ WinSalPrinter::~WinSalPrinter()
HDC hDC = mhDC;
if ( hDC )
{
- if ( mpGraphics )
- {
- mpGraphics->DeInitGraphics();
- delete mpGraphics;
- }
-
+ delete mpGraphics;
DeleteDC( hDC );
}
@@ -1532,12 +1531,8 @@ bool WinSalPrinter::EndJob()
HDC hDC = mhDC;
if ( isValid() && hDC )
{
- if ( mpGraphics )
- {
- mpGraphics->DeInitGraphics();
- delete mpGraphics;
- mpGraphics = nullptr;
- }
+ delete mpGraphics;
+ mpGraphics = nullptr;
// #i54419# Windows fax printer brings up a dialog in EndDoc
// which text previously copied in soffice process can be
@@ -1598,17 +1593,13 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* pSetupData, bool bNewJobDat
void WinSalPrinter::EndPage()
{
- HDC hDC = mhDC;
- if ( hDC && mpGraphics )
- {
- mpGraphics->DeInitGraphics();
- delete mpGraphics;
- mpGraphics = nullptr;
- }
+ delete mpGraphics;
+ mpGraphics = nullptr;
if( ! isValid() )
return;
+ HDC hDC = mhDC;
volatile int nRet = 0;
CATCH_DRIVER_EX_BEGIN;
nRet = ::EndPage( hDC );
diff --git a/vcl/win/gdi/salvd.cxx b/vcl/win/gdi/salvd.cxx
index 57ad9581b1c4..d06412bc6743 100644
--- a/vcl/win/gdi/salvd.cxx
+++ b/vcl/win/gdi/salvd.cxx
@@ -135,7 +135,6 @@ std::unique_ptr<SalVirtualDevice> WinSalInstance::CreateVirtualDevice( SalGraphi
RealizePalette( hDC );
}
- pVirGraphics->InitGraphics();
pVDev->setGraphics(pVirGraphics);
return std::unique_ptr<SalVirtualDevice>(pVDev);
@@ -171,14 +170,16 @@ WinSalVirtualDevice::~WinSalVirtualDevice()
if( *ppVirDev )
*ppVirDev = mpNext;
- // destroy saved DC
+ HDC hDC = mpGraphics->getHDC();
+ // restore the mpGraphics' original HDC values, so the HDC can be deleted in the !mbForeignDC case
+ mpGraphics->setHDC(nullptr);
+
if( mpGraphics->getDefPal() )
- SelectPalette( mpGraphics->getHDC(), mpGraphics->getDefPal(), TRUE );
- mpGraphics->DeInitGraphics();
+ SelectPalette(hDC, mpGraphics->getDefPal(), TRUE);
if( mhDefBmp )
- SelectBitmap( mpGraphics->getHDC(), mhDefBmp );
+ SelectBitmap(hDC, mhDefBmp);
if( !mbForeignDC )
- DeleteDC( mpGraphics->getHDC() );
+ DeleteDC(hDC);
}
SalGraphics* WinSalVirtualDevice::AcquireGraphics()
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index aedba78e3fca..c3f86d5cd1bb 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -33,6 +33,13 @@
#include <comphelper/windowserrorstring.hxx>
+#include <fstream>
+#include <boost/property_tree/ptree.hpp>
+#include <boost/property_tree/ini_parser.hpp>
+#include <osl/file.hxx>
+#include <osl/process.h>
+
+#include <rtl/bootstrap.hxx>
#include <rtl/string.h>
#include <rtl/ustring.h>
#include <sal/log.hxx>
@@ -913,12 +920,11 @@ bool WinSalFrame::ReleaseFrameGraphicsDC( WinSalGraphics* pGraphics )
return false;
if ( pGraphics->getDefPal() )
SelectPalette( hDC, pGraphics->getDefPal(), TRUE );
- pGraphics->DeInitGraphics();
+ pGraphics->setHDC(nullptr);
SendMessageW( pSalData->mpInstance->mhComWnd, SAL_MSG_RELEASEDC,
reinterpret_cast<WPARAM>(mhWnd), reinterpret_cast<LPARAM>(hDC) );
if ( pGraphics == mpThreadGraphics )
pSalData->mnCacheDCInUse--;
- pGraphics->setHDC(nullptr);
return true;
}
@@ -997,7 +1003,6 @@ bool WinSalFrame::InitFrameGraphicsDC( WinSalGraphics *pGraphics, HDC hDC, HWND
pGraphics->setDefPal(SelectPalette( hDC, pSalData->mhDitherPal, TRUE ));
RealizePalette( hDC );
}
- pGraphics->InitGraphics();
if ( pGraphics == mpThreadGraphics )
pSalData->mnCacheDCInUse++;
@@ -1277,10 +1282,22 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
nWidth = aWinRect.right - aWinRect.left + 1;
nHeight = aWinRect.bottom - aWinRect.top + 1;
- if ( !(nPosSize & SWP_NOMOVE) && ::GetParent( mhWnd ) )
+ HWND hWndParent = ImplGetParentHwnd(mhWnd);
+ // For dialogs (WS_POPUP && WS_DLGFRAME), we need to find the "real" parent,
+ // in case multiple dialogs are stacked on each other
+ // (we don't want to position the second dialog relative to the first one, but relative to the main window)
+ if ( (GetWindowStyle( mhWnd ) & WS_POPUP) && (GetWindowStyle( mhWnd ) & WS_DLGFRAME) ) // mhWnd is a dialog
+ {
+ while ( hWndParent && (GetWindowStyle( hWndParent ) & WS_POPUP) && (GetWindowStyle( hWndParent ) & WS_DLGFRAME) )
+ {
+ hWndParent = ::ImplGetParentHwnd( hWndParent );
+ }
+ }
+
+ if ( !(nPosSize & SWP_NOMOVE) && hWndParent )
{
RECT aParentRect;
- GetClientRect( ImplGetParentHwnd( mhWnd ), &aParentRect );
+ GetClientRect( hWndParent, &aParentRect );
if( AllSettings::GetLayoutRTL() )
nX = (aParentRect.right - aParentRect.left) - nWidth-1 - nX;
@@ -1291,8 +1308,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
aPt.x = nX;
aPt.y = nY;
- HWND parentHwnd = ImplGetParentHwnd( mhWnd );
- WinSalFrame* pParentFrame = GetWindowPtr( parentHwnd );
+ WinSalFrame* pParentFrame = GetWindowPtr( hWndParent );
if ( pParentFrame && pParentFrame->mnShowState == SW_SHOWMAXIMIZED )
{
// #i42485#: parent will be shown maximized in which case
@@ -1302,7 +1318,7 @@ void WinSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight,
aPt.y += pParentFrame->maGeometry.nY;
}
else
- ClientToScreen( parentHwnd, &aPt );
+ ClientToScreen( hWndParent, &aPt );
nX = aPt.x;
nY = aPt.y;
@@ -1926,16 +1942,72 @@ void WinSalFrame::SetAlwaysOnTop( bool bOnTop )
SetWindowPos( mhWnd, hWnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE );
}
+static bool EnableAttachThreadInputHack()
+{
+ OUString s("$EnableAttachThreadInputHack");
+ rtl::Bootstrap::expandMacros(s);
+ bool bEnabled;
+ if (!s.isEmpty()) {
+ bEnabled = s == "true";
+ } else {
+ // For backwards compatibility, for now also try to read the value from a [Win32] section of
+ // bootstrap.ini if it is not set as a boostrap variable:
+ bEnabled = false;
+ OUString aBootstrapUri;
+ if (osl_getProcessWorkingDir(&aBootstrapUri.pData) == osl_Process_E_None) {
+ aBootstrapUri += "/bootstrap.ini";
+
+ OUString aSystemFileName;
+ if (osl::FileBase::getSystemPathFromFileURL(aBootstrapUri, aSystemFileName)
+ == osl::FileBase::E_None
+ && aSystemFileName.getLength() <= MAX_PATH)
+ {
+ // this uses the Boost ini parser, instead of tools::Config, as we already use it to
+ // read other values from bootstrap.ini in desktop/win32/source/loader.cxx, because
+ // that watchdog process can't access LO libs. This way the handling is consistent.
+ try
+ {
+ boost::property_tree::ptree pt;
+ std::ifstream aFile(o3tl::toW(aSystemFileName.getStr()));
+ boost::property_tree::ini_parser::read_ini(aFile, pt);
+ bEnabled = pt.get("Win32.EnableAttachThreadInputHack", false);
+ }
+ catch (...)
+ {
+ }
+ }
+ }
+ }
+ SAL_WARN_IF(bEnabled, "vcl", "AttachThreadInput hack is enabled. Watch out for deadlocks!");
+ return bEnabled;
+}
+
static void ImplSalToTop( HWND hWnd, SalFrameToTop nFlags )
{
+ static const bool bEnableAttachThreadInputHack = EnableAttachThreadInputHack();
+
WinSalFrame* pToTopFrame = GetWindowPtr( hWnd );
if( pToTopFrame && (pToTopFrame->mnStyle & SalFrameStyleFlags::SYSTEMCHILD) )
BringWindowToTop( hWnd );
if ( nFlags & SalFrameToTop::ForegroundTask )
{
- // LO used to call AttachThreadInput here, which resulted in deadlocks!
- SetForegroundWindow_Impl(hWnd);
+ // LO used to always call AttachThreadInput here, which resulted in deadlocks
+ // in some installations for unknown reasons!
+ if (bEnableAttachThreadInputHack)
+ {
+ // This magic code is necessary to connect the input focus of the
+ // current window thread and the thread which owns the window that
+ // should be the new foreground window.
+ HWND hCurrWnd = GetForegroundWindow();
+ DWORD myThreadID = GetCurrentThreadId();
+ DWORD currThreadID = GetWindowThreadProcessId(hCurrWnd,nullptr);
+ AttachThreadInput(myThreadID, currThreadID, TRUE);
+ SetForegroundWindow_Impl(hWnd);
+ AttachThreadInput(myThreadID, currThreadID, FALSE);
+ }
+ else
+ SetForegroundWindow_Impl(hWnd);
}
if ( nFlags & SalFrameToTop::RestoreWhenMin )
@@ -2781,6 +2853,14 @@ void WinSalFrame::Beep()
MessageBeep( 0 );
}
+void WinSalFrame::FlashWindow() const
+{
+ if (GetForegroundWindow() != mhWnd)
+ {
+ ::FlashWindow(mhWnd, TRUE);
+ }
+}
+
SalFrame::SalPointerState WinSalFrame::GetPointerState()
{
SalPointerState aState;
@@ -5218,27 +5298,40 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam )
static bool
ImplHandleGetObject(HWND hWnd, LPARAM lParam, WPARAM wParam, LRESULT & nRet)
{
- // IA2 should be enabled automatically
- AllSettings aSettings = Application::GetSettings();
- MiscSettings aMisc = aSettings.GetMiscSettings();
- aMisc.SetEnableATToolSupport( true );
- aSettings.SetMiscSettings( aMisc );
- Application::SetSettings( aSettings );
+ uno::Reference<accessibility::XMSAAService> xMSAA;
+ if (ImplSalYieldMutexTryToAcquire())
+ {
+ // IA2 should be enabled automatically
+ AllSettings aSettings = Application::GetSettings();
+ MiscSettings aMisc = aSettings.GetMiscSettings();
+ aMisc.SetEnableATToolSupport( true );
+ aSettings.SetMiscSettings( aMisc );
+ Application::SetSettings( aSettings );
- if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
- return false; // locked down somehow ?
+ if (!Application::GetSettings().GetMiscSettings().GetEnableATToolSupport())
+ return false; // locked down somehow ?
- ImplSVData* pSVData = ImplGetSVData();
+ ImplSVData* pSVData = ImplGetSVData();
- // Make sure to launch Accessibility only the following criteria are satisfied
- // to avoid RFT interrupts regular accessibility processing
- if ( !pSVData->mxAccessBridge.is() )
- {
- if( !InitAccessBridge() )
- return false;
+ // Make sure to launch Accessibility only the following criteria are satisfied
+ // to avoid RFT interrupts regular accessibility processing
+ if ( !pSVData->mxAccessBridge.is() )
+ {
+ if( !InitAccessBridge() )
+ return false;
+ }
+ xMSAA.set(pSVData->mxAccessBridge, uno::UNO_QUERY);
+ ImplSalYieldMutexRelease();
+ }
+ else
+ { // tdf#155794: access without locking: hopefully this should be fine
+ // as the bridge is typically inited in Desktop::Main() already and the
+ // WM_GETOBJECT is received only on the main thread and by the time in
+ // VCL shutdown when ImplSvData dies there should not be Windows any
+ // more that could receive messages.
+ xMSAA.set(ImplGetSVData()->mxAccessBridge, uno::UNO_QUERY);
}
- uno::Reference< accessibility::XMSAAService > xMSAA( pSVData->mxAccessBridge, uno::UNO_QUERY );
if ( xMSAA.is() )
{
sal_Int32 lParam32 = static_cast<sal_Int32>(lParam);
@@ -5769,12 +5862,11 @@ static LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LP
break;
case WM_GETOBJECT:
- ImplSalYieldMutexAcquireWithWait();
+ // tdf#155794: this must complete without taking SolarMutex
if ( ImplHandleGetObject( hWnd, lParam, wParam, nRet ) )
{
rDef = false;
}
- ImplSalYieldMutexRelease();
break;
case WM_APPCOMMAND:
diff --git a/dtrans/source/test/makefile.mk b/vcl/workben/dtrans/makefile.mk
index 588d4685a300..588d4685a300 100644
--- a/dtrans/source/test/makefile.mk
+++ b/vcl/workben/dtrans/makefile.mk
diff --git a/dtrans/source/test/test_dtrans.cxx b/vcl/workben/dtrans/test_dtrans.cxx
index f531f12fd119..f531f12fd119 100644
--- a/dtrans/source/test/test_dtrans.cxx
+++ b/vcl/workben/dtrans/test_dtrans.cxx
diff --git a/dtrans/test/win32/dnd/atlwindow.cxx b/vcl/workben/win/dnd/atlwindow.cxx
index 0d8d5d77646a..0d8d5d77646a 100644
--- a/dtrans/test/win32/dnd/atlwindow.cxx
+++ b/vcl/workben/win/dnd/atlwindow.cxx
diff --git a/dtrans/test/win32/dnd/atlwindow.hxx b/vcl/workben/win/dnd/atlwindow.hxx
index 378407274b56..378407274b56 100644
--- a/dtrans/test/win32/dnd/atlwindow.hxx
+++ b/vcl/workben/win/dnd/atlwindow.hxx
diff --git a/dtrans/test/win32/dnd/dndTest.cxx b/vcl/workben/win/dnd/dndTest.cxx
index b9f1d841e1c5..b9f1d841e1c5 100644
--- a/dtrans/test/win32/dnd/dndTest.cxx
+++ b/vcl/workben/win/dnd/dndTest.cxx
diff --git a/dtrans/test/win32/dnd/makefile.mk b/vcl/workben/win/dnd/makefile.mk
index e0d438418eb1..e0d438418eb1 100644
--- a/dtrans/test/win32/dnd/makefile.mk
+++ b/vcl/workben/win/dnd/makefile.mk
diff --git a/dtrans/test/win32/dnd/sourcelistener.cxx b/vcl/workben/win/dnd/sourcelistener.cxx
index aa3366e79a11..aa3366e79a11 100644
--- a/dtrans/test/win32/dnd/sourcelistener.cxx
+++ b/vcl/workben/win/dnd/sourcelistener.cxx
diff --git a/dtrans/test/win32/dnd/sourcelistener.hxx b/vcl/workben/win/dnd/sourcelistener.hxx
index 686d95c11025..686d95c11025 100644
--- a/dtrans/test/win32/dnd/sourcelistener.hxx
+++ b/vcl/workben/win/dnd/sourcelistener.hxx
diff --git a/dtrans/test/win32/dnd/targetlistener.cxx b/vcl/workben/win/dnd/targetlistener.cxx
index 0a93d394560a..0a93d394560a 100644
--- a/dtrans/test/win32/dnd/targetlistener.cxx
+++ b/vcl/workben/win/dnd/targetlistener.cxx
diff --git a/dtrans/test/win32/dnd/targetlistener.hxx b/vcl/workben/win/dnd/targetlistener.hxx
index 153dc64eead5..153dc64eead5 100644
--- a/dtrans/test/win32/dnd/targetlistener.hxx
+++ b/vcl/workben/win/dnd/targetlistener.hxx
diff --git a/dtrans/test/win32/dnd/transferable.cxx b/vcl/workben/win/dnd/transferable.cxx
index 924c031763b5..924c031763b5 100644
--- a/dtrans/test/win32/dnd/transferable.cxx
+++ b/vcl/workben/win/dnd/transferable.cxx
diff --git a/dtrans/test/win32/dnd/transferable.hxx b/vcl/workben/win/dnd/transferable.hxx
index 1323a2cd5aaa..1323a2cd5aaa 100644
--- a/dtrans/test/win32/dnd/transferable.hxx
+++ b/vcl/workben/win/dnd/transferable.hxx
diff --git a/dtrans/source/win32/workbench/XTDo.cxx b/vcl/workben/win/dtrans/XTDo.cxx
index f8da707d92e3..f8da707d92e3 100644
--- a/dtrans/source/win32/workbench/XTDo.cxx
+++ b/vcl/workben/win/dtrans/XTDo.cxx
diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/vcl/workben/win/dtrans/XTDo.hxx
index 50f8425593e4..50f8425593e4 100644
--- a/dtrans/source/win32/workbench/XTDo.hxx
+++ b/vcl/workben/win/dtrans/XTDo.hxx
diff --git a/dtrans/source/win32/workbench/makefile.mk b/vcl/workben/win/dtrans/makefile.mk
index 3c82289f8ee1..3c82289f8ee1 100644
--- a/dtrans/source/win32/workbench/makefile.mk
+++ b/vcl/workben/win/dtrans/makefile.mk
diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/vcl/workben/win/dtrans/test_wincb.cxx
index 8a2f25fd4ccc..8a2f25fd4ccc 100644
--- a/dtrans/source/win32/workbench/test_wincb.cxx
+++ b/vcl/workben/win/dtrans/test_wincb.cxx
diff --git a/dtrans/source/win32/workbench/testmarshal.cxx b/vcl/workben/win/dtrans/testmarshal.cxx
index d9edfe753107..d9edfe753107 100644
--- a/dtrans/source/win32/workbench/testmarshal.cxx
+++ b/vcl/workben/win/dtrans/testmarshal.cxx
diff --git a/winaccessibility/inc/AccEventListener.hxx b/winaccessibility/inc/AccEventListener.hxx
index 9c5515529440..095f1cad1598 100644
--- a/winaccessibility/inc/AccEventListener.hxx
+++ b/winaccessibility/inc/AccEventListener.hxx
@@ -75,7 +75,7 @@ public:
//get the accessible parent's role
virtual short GetParentRole();
- void RemoveMeFromBroadcaster();
+ void RemoveMeFromBroadcaster(bool isNotifyDestroy);
};
#endif // INCLUDED_WINACCESSIBILITY_INC_ACCEVENTLISTENER_HXX
diff --git a/winaccessibility/inc/AccObject.hxx b/winaccessibility/inc/AccObject.hxx
index 2a024642d8ac..6211b2a48d3e 100644
--- a/winaccessibility/inc/AccObject.hxx
+++ b/winaccessibility/inc/AccObject.hxx
@@ -61,7 +61,7 @@ private:
long m_resID;
HWND m_pParantID;
bool m_bShouldDestroy; //avoid access COM interface when acc object is deleted
- IMAccessible* m_pIMAcc;
+ IMAccessible* const m_pIMAcc; // AccObjectManager::GetTopWindowIMAccessible relies on this being const
AccObject* m_pParentObj;
IAccChildList m_childrenList;
::rtl::Reference<AccEventListener> m_pListener;
@@ -99,7 +99,7 @@ public:
void SetParentHWND(HWND hWnd);//need to set top window handle when send event to AT
HWND GetParentHWND();
- void SetListener(::rtl::Reference<AccEventListener> const& pListener);
+ ::rtl::Reference<AccEventListener> SetListener(::rtl::Reference<AccEventListener> const& pListener);
AccEventListener* getListener();
void SetParentObj(AccObject* pParentAccObj);
diff --git a/winaccessibility/inc/AccObjectWinManager.hxx b/winaccessibility/inc/AccObjectWinManager.hxx
index 1529bc40ec7f..a533c1be373d 100644
--- a/winaccessibility/inc/AccObjectWinManager.hxx
+++ b/winaccessibility/inc/AccObjectWinManager.hxx
@@ -22,6 +22,8 @@
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <map>
+#include <mutex>
+
#if !defined WIN32_LEAN_AND_MEAN
# define WIN32_LEAN_AND_MEAN
#endif
@@ -63,6 +65,9 @@ private:
typedef std::map<const HWND, css::accessibility::XAccessible* >
XHWNDToDocumentHash;
+ // guard any access to XIdAccList and HwndXAcc
+ std::recursive_mutex m_Mutex;
+
//XAccessible to AccObject
XIdToAccObjHash XIdAccList;
@@ -86,11 +91,11 @@ private:
long ImpleGenerateResID();
AccObject* GetAccObjByXAcc( css::accessibility::XAccessible* pXAcc);
- AccObject* GetTopWindowAccObj(HWND hWnd);
+ IMAccessible* GetTopWindowIMAccessible(HWND hWnd);
css::accessibility::XAccessible* GetAccDocByHWND(HWND hWnd);
- static void DeleteAccListener( AccObject* pAccObj );
+ static rtl::Reference<AccEventListener> DeleteAccListener(AccObject* pAccObj);
static void InsertAccChildNode(AccObject* pCurObj,AccObject* pParentObj,HWND pWnd);
static void DeleteAccChildNode(AccObject* pChild);
void DeleteFromHwndXAcc(css::accessibility::XAccessible const * pXAcc );
diff --git a/winaccessibility/source/service/AccEventListener.cxx b/winaccessibility/source/service/AccEventListener.cxx
index e2be5cce145d..0a55d481c0ae 100644
--- a/winaccessibility/source/service/AccEventListener.cxx
+++ b/winaccessibility/source/service/AccEventListener.cxx
@@ -223,7 +223,7 @@ short AccEventListener::GetParentRole()
/**
* remove the listener from accessible object
*/
-void AccEventListener::RemoveMeFromBroadcaster()
+void AccEventListener::RemoveMeFromBroadcaster(bool const isNotifyDestroy)
{
try
{
@@ -244,7 +244,10 @@ void AccEventListener::RemoveMeFromBroadcaster()
catch (Exception const&)
{ // may throw if it's already disposed - ignore that
}
- pAgent->NotifyDestroy(m_xAccessible.get());
+ if (isNotifyDestroy)
+ {
+ pAgent->NotifyDestroy(m_xAccessible.get());
+ }
m_xAccessible.clear(); // release cyclic reference
}
catch(...)
@@ -261,7 +264,7 @@ void AccEventListener::disposing( const css::lang::EventObject& /*Source*/ )
{
SolarMutexGuard g;
- RemoveMeFromBroadcaster();
+ RemoveMeFromBroadcaster(true);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/winaccessibility/source/service/AccObject.cxx b/winaccessibility/source/service/AccObject.cxx
index bf71d8617596..c606970c753d 100644
--- a/winaccessibility/source/service/AccObject.cxx
+++ b/winaccessibility/source/service/AccObject.cxx
@@ -162,7 +162,7 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
m_resID (NULL),
m_pParantID (nullptr),
m_bShouldDestroy(false),
- m_pIMAcc (nullptr),
+ m_pIMAcc (UAccCOMCreateInstance()),
m_pParentObj(nullptr),
m_pListener (pListener),
m_xAccRef( pAcc )
@@ -186,7 +186,6 @@ AccObject::AccObject(XAccessible* pAcc, AccObjectManagerAgent* pAgent,
*/
AccObject::~AccObject()
{
- m_pIMAcc = nullptr;
m_xAccRef = nullptr;
m_xAccActionRef = nullptr;
m_xAccContextRef = nullptr;
@@ -256,8 +255,6 @@ void AccObject::UpdateValidWindow()
*/
void AccObject::ImplInitializeCreateObj()
{
- m_pIMAcc = UAccCOMCreateInstance();
-
assert(m_pIMAcc);
}
@@ -397,7 +394,7 @@ void AccObject::SetValue( Any pAny )
case HEADING:
case TABLE_CELL:
- if(pRText.get())
+ if(pRText)
{
val = pRText->getText();
}
@@ -1162,9 +1159,11 @@ void AccObject::SetParentHWND(HWND hWnd)
m_pParantID = hWnd;
}
-void AccObject::SetListener(rtl::Reference<AccEventListener> const& pListener)
+rtl::Reference<AccEventListener> AccObject::SetListener(rtl::Reference<AccEventListener> const& pListener)
{
+ rtl::Reference<AccEventListener> pRet(m_pListener);
m_pListener = pListener;
+ return pRet;
}
AccEventListener* AccObject::getListener()
diff --git a/winaccessibility/source/service/AccObjectWinManager.cxx b/winaccessibility/source/service/AccObjectWinManager.cxx
index b56db56d4bab..a29c3a2513cd 100644
--- a/winaccessibility/source/service/AccObjectWinManager.cxx
+++ b/winaccessibility/source/service/AccObjectWinManager.cxx
@@ -75,8 +75,12 @@ AccObjectWinManager::AccObjectWinManager( AccObjectManagerAgent* Agent ):
*/
AccObjectWinManager::~AccObjectWinManager()
{
- XIdAccList.clear();
- HwndXAcc.clear();
+ {
+ std::scoped_lock l(m_Mutex);
+
+ XIdAccList.clear();
+ HwndXAcc.clear();
+ }
XResIdAccList.clear();
XHWNDDocList.clear();
#ifdef ACC_DEBUG
@@ -100,13 +104,7 @@ AccObjectWinManager::Get_ToATInterface(HWND hWnd, long lParam, WPARAM wParam)
if(lParam == OBJID_CLIENT )
{
- AccObject* topWindowAccObj = GetTopWindowAccObj(hWnd);
- if(topWindowAccObj)
- {
- pRetIMAcc = topWindowAccObj->GetIMAccessible();
- if(pRetIMAcc)
- pRetIMAcc->AddRef();//increase COM reference count
- }
+ pRetIMAcc = GetTopWindowIMAccessible(hWnd);
}
if ( pRetIMAcc && lParam == OBJID_CLIENT )
@@ -128,6 +126,8 @@ AccObject* AccObjectWinManager::GetAccObjByXAcc( XAccessible* pXAcc)
if( pXAcc == nullptr)
return nullptr;
+ std::scoped_lock l(m_Mutex);
+
XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( pXAcc );
if ( pIndTemp == XIdAccList.end() )
return nullptr;
@@ -140,13 +140,26 @@ AccObject* AccObjectWinManager::GetAccObjByXAcc( XAccessible* pXAcc)
* @param hWnd, top window handle
* @return pointer to AccObject
*/
-AccObject* AccObjectWinManager::GetTopWindowAccObj(HWND hWnd)
+IMAccessible * AccObjectWinManager::GetTopWindowIMAccessible(HWND hWnd)
{
+ std::scoped_lock l(m_Mutex); // tdf#155794 for HwndXAcc and XIdAccList
+
XHWNDToXAccHash::iterator iterResult =HwndXAcc.find(hWnd);
if(iterResult == HwndXAcc.end())
return nullptr;
XAccessible* pXAcc = static_cast<XAccessible*>(iterResult->second);
- return GetAccObjByXAcc(pXAcc);
+ AccObject *const pAccObject(GetAccObjByXAcc(pXAcc));
+ if (!pAccObject)
+ {
+ return nullptr;
+ }
+ IMAccessible *const pRet(pAccObject->GetIMAccessible());
+ if (!pRet)
+ {
+ return nullptr;
+ }
+ pRet->AddRef();
+ return pRet;
}
/**
@@ -471,6 +484,8 @@ void AccObjectWinManager::DeleteAccChildNode( AccObject* pObj )
*/
void AccObjectWinManager::DeleteFromHwndXAcc(XAccessible const * pXAcc )
{
+ std::scoped_lock l(m_Mutex);
+
auto iter = std::find_if(HwndXAcc.begin(), HwndXAcc.end(),
[&pXAcc](XHWNDToXAccHash::value_type& rEntry) { return rEntry.second == pXAcc; });
if (iter != HwndXAcc.end())
@@ -513,34 +528,46 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc )
{
if( pXAcc == nullptr )
return;
- XIdToAccObjHash::iterator temp = XIdAccList.find(pXAcc);
- if( temp != XIdAccList.end() )
- {
- ResIdGen.SetSub( temp->second.GetResID() );
- }
- else
- {
- return;
- }
- AccObject& accObj = temp->second;
- DeleteAccChildNode( &accObj );
- DeleteAccListener( &accObj );
- if( accObj.GetIMAccessible() )
+ rtl::Reference<AccEventListener> pListener;
+
{
- accObj.GetIMAccessible()->Release();
+ std::scoped_lock l(m_Mutex);
+
+ XIdToAccObjHash::iterator temp = XIdAccList.find(pXAcc);
+ if( temp != XIdAccList.end() )
+ {
+ ResIdGen.SetSub( temp->second.GetResID() );
+ }
+ else
+ {
+ return;
+ }
+
+ AccObject& accObj = temp->second;
+ DeleteAccChildNode( &accObj );
+ pListener = DeleteAccListener(&accObj);
+ accObj.NotifyDestroy(true);
+ if( accObj.GetIMAccessible() )
+ {
+ accObj.GetIMAccessible()->Release();
+ }
+ size_t i = XResIdAccList.erase(accObj.GetResID());
+ assert(i != 0);
+ DeleteFromHwndXAcc(pXAcc);
+ if( accObj.GetRole() == DOCUMENT ||
+ accObj.GetRole() == DOCUMENT_PRESENTATION ||
+ accObj.GetRole() == DOCUMENT_SPREADSHEET ||
+ accObj.GetRole() == DOCUMENT_TEXT )
+ {
+ XHWNDDocList.erase(accObj.GetParentHWND());
+ }
+ XIdAccList.erase(pXAcc); // note: this invalidates accObj so do it last!
}
- size_t i = XResIdAccList.erase(accObj.GetResID());
- assert(i != 0);
- DeleteFromHwndXAcc(pXAcc);
- if( accObj.GetRole() == DOCUMENT ||
- accObj.GetRole() == DOCUMENT_PRESENTATION ||
- accObj.GetRole() == DOCUMENT_SPREADSHEET ||
- accObj.GetRole() == DOCUMENT_TEXT )
+ if (pListener)
{
- XHWNDDocList.erase(accObj.GetParentHWND());
+ pListener->RemoveMeFromBroadcaster(false);
}
- XIdAccList.erase(pXAcc); // note: this invalidates accObj so do it last!
}
/**
@@ -548,13 +575,9 @@ void AccObjectWinManager::DeleteAccObj( XAccessible* pXAcc )
* @param pAccObj Accobject pointer.
* @return
*/
-void AccObjectWinManager::DeleteAccListener( AccObject* pAccObj )
+rtl::Reference<AccEventListener> AccObjectWinManager::DeleteAccListener( AccObject* pAccObj )
{
- AccEventListener* listener = pAccObj->getListener();
- if( listener==nullptr )
- return;
- listener->RemoveMeFromBroadcaster();
- pAccObj->SetListener(nullptr);
+ return pAccObj->SetListener(nullptr);
}
/**
@@ -647,29 +670,6 @@ void AccObjectWinManager::InsertAccChildNode( AccObject* pCurObj, AccObject* pPa
*/
bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentXAcc,HWND pWnd )
{
- XIdToAccObjHash::iterator itXacc = XIdAccList.find( pXAcc );
- if (itXacc != XIdAccList.end() )
- {
- short nCurRole =GetRole(pXAcc);
- if (AccessibleRole::SHAPE == nCurRole)
- {
- AccObject &objXacc = itXacc->second;
- AccObject *pObjParent = objXacc.GetParentObj();
- if (pObjParent &&
- pObjParent->GetXAccessible().is() &&
- pObjParent->GetXAccessible().get() != pParentXAcc)
- {
- XIdToAccObjHash::iterator itXaccParent = XIdAccList.find( pParentXAcc );
- if(itXaccParent != XIdAccList.end())
- {
- objXacc.SetParentObj(&(itXaccParent->second));
- }
- }
- }
- return false;
- }
-
-
Reference< XAccessibleContext > pRContext;
if( pXAcc == nullptr)
@@ -679,6 +679,33 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
if( !pRContext.is() )
return false;
+ {
+ short nCurRole = GetRole(pXAcc);
+
+ std::scoped_lock l(m_Mutex);
+
+ XIdToAccObjHash::iterator itXacc = XIdAccList.find( pXAcc );
+ if (itXacc != XIdAccList.end() )
+ {
+ if (AccessibleRole::SHAPE == nCurRole)
+ {
+ AccObject &objXacc = itXacc->second;
+ AccObject *pObjParent = objXacc.GetParentObj();
+ if (pObjParent &&
+ pObjParent->GetXAccessible().is() &&
+ pObjParent->GetXAccessible().get() != pParentXAcc)
+ {
+ XIdToAccObjHash::iterator itXaccParent = XIdAccList.find( pParentXAcc );
+ if(itXaccParent != XIdAccList.end())
+ {
+ objXacc.SetParentObj(&(itXaccParent->second));
+ }
+ }
+ }
+ return false;
+ }
+ }
+
if( pWnd == nullptr )
{
if(pParentXAcc)
@@ -726,9 +753,13 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
else
return false;
- XIdAccList.emplace(pXAcc, pObj);
- XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( pXAcc );
- XResIdAccList.emplace(pObj.GetResID(),&(pIndTemp->second));
+ {
+ std::scoped_lock l(m_Mutex);
+
+ XIdAccList.emplace(pXAcc, pObj);
+ XIdToAccObjHash::iterator pIndTemp = XIdAccList.find( pXAcc );
+ XResIdAccList.emplace(pObj.GetResID(),&(pIndTemp->second));
+ }
AccObject* pCurObj = GetAccObjByXAcc(pXAcc);
if( pCurObj )
@@ -752,6 +783,8 @@ bool AccObjectWinManager::InsertAccObj( XAccessible* pXAcc,XAccessible* pParentX
*/
void AccObjectWinManager::SaveTopWindowHandle(HWND hWnd, css::accessibility::XAccessible* pXAcc)
{
+ std::scoped_lock l(m_Mutex);
+
HwndXAcc.emplace(hWnd,pXAcc);
}
diff --git a/winaccessibility/source/service/msaaservice_impl.cxx b/winaccessibility/source/service/msaaservice_impl.cxx
index 15959e2b4c83..3c40c139be66 100644
--- a/winaccessibility/source/service/msaaservice_impl.cxx
+++ b/winaccessibility/source/service/msaaservice_impl.cxx
@@ -92,7 +92,7 @@ public:
sal_Int64 MSAAServiceImpl::getAccObjectPtr(
sal_Int64 hWnd, sal_Int64 lParam, sal_Int64 wParam)
{
- SolarMutexGuard g;
+ // tdf#155794: this must complete without taking SolarMutex
if (!m_pTopWindowListener.is())
{
diff --git a/wizards/source/access2base/DoCmd.xba b/wizards/source/access2base/DoCmd.xba
index 27b0d74be34f..26755a8d901d 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/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index 618ca603efe6..b5040c230b62 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -392,6 +392,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm)
DomainMapperTableManager::IntVectorPtr const & DomainMapperTableManager::getCurrentGrid( )
{
+ if (m_aTableGrid.empty())
+ throw std::out_of_range("no current grid");
return m_aTableGrid.back( );
}
@@ -552,6 +554,8 @@ void DomainMapperTableManager::endOfRowAction()
// Compare the table position with the previous ones. We may need to split
// into two tables if those are different. We surely don't want to do anything
// if we don't have any row yet.
+ if (m_aTmpPosition.empty())
+ throw std::out_of_range("row without a position");
TablePositionHandlerPtr pTmpPosition = m_aTmpPosition.back();
TablePropertyMapPtr pTablePropMap = m_aTmpTableProperties.back( );
TablePositionHandlerPtr pCurrentPosition = m_aTablePositions.back();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 329999ca18ce..22626bc8bf34 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -3191,7 +3191,7 @@ static OUString lcl_ExctractVariableAndHint( const OUString& rCommand, OUString&
sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
if (nIndex == -1)
return OUString();
- while(rCommand[nIndex] == ' ')
+ while (nIndex < rCommand.getLength() && rCommand[nIndex] == ' ')
++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
@@ -3309,14 +3309,15 @@ void DomainMapper_Impl::ChainTextFrames()
sal_Int32 nId;
sal_Int32 nSeq;
OUString s_mso_next_textbox;
- bool bShapeNameSet;
- TextFramesForChaining(): nId(0), nSeq(0), bShapeNameSet(false) {}
+ OUString shapeName;
+ TextFramesForChaining() : nId(0), nSeq(0) {}
} ;
typedef std::map <OUString, TextFramesForChaining> ChainMap;
try
{
ChainMap aTextFramesForChainingHelper;
+ ::std::vector<TextFramesForChaining> chainingWPS;
OUString sChainNextName("ChainNextName");
//learn about ALL of the textboxes and their chaining values first - because frames are processed in no specific order.
@@ -3354,19 +3355,22 @@ void DomainMapper_Impl::ChainTextFrames()
//Sometimes the shape names have not been imported. If not, we may have a fallback name.
//Set name later, only if required for linking.
- if( sShapeName.isEmpty() )
- aChainStruct.bShapeNameSet = false;
- else
- {
- aChainStruct.bShapeNameSet = true;
- sLinkChainName = sShapeName;
- }
+ aChainStruct.shapeName = sShapeName;
- if( !sLinkChainName.isEmpty() )
+ if (!sLinkChainName.isEmpty())
{
aChainStruct.xShape = rTextFrame;
aTextFramesForChainingHelper[sLinkChainName] = aChainStruct;
}
+ if (aChainStruct.s_mso_next_textbox.isEmpty())
+ { // no VML chaining => try to chain DrawingML via IDs
+ aChainStruct.xShape = rTextFrame;
+ if (!sLinkChainName.isEmpty())
+ { // for member of group shapes, TestTdf73499
+ aChainStruct.shapeName = sLinkChainName;
+ }
+ chainingWPS.emplace_back(aChainStruct);
+ }
}
//if mso-next-textbox tags are provided, create those vml-style links first. Afterwards we will make dml-style id/seq links.
@@ -3381,22 +3385,22 @@ void DomainMapper_Impl::ChainTextFrames()
if( nextFinder != aTextFramesForChainingHelper.end() )
{
//if the frames have no name yet, then set them. LinkDisplayName / ChainName are read-only.
- if( !msoItem.second.bShapeNameSet )
+ if (msoItem.second.shapeName.isEmpty())
{
uno::Reference< container::XNamed > xNamed( msoItem.second.xShape, uno::UNO_QUERY );
if ( xNamed.is() )
{
xNamed->setName( msoItem.first );
- msoItem.second.bShapeNameSet = true;
+ msoItem.second.shapeName = msoItem.first;
}
}
- if( !nextFinder->second.bShapeNameSet )
+ if (nextFinder->second.shapeName.isEmpty())
{
uno::Reference< container::XNamed > xNamed( nextFinder->second.xShape, uno::UNO_QUERY );
if ( xNamed.is() )
{
xNamed->setName( nextFinder->first );
- nextFinder->second.bShapeNameSet = true;
+ nextFinder->second.shapeName = msoItem.first;
}
}
@@ -3404,7 +3408,7 @@ void DomainMapper_Impl::ChainTextFrames()
uno::Reference<beans::XPropertySet> xPropertySet(xTextContent, uno::UNO_QUERY);
//The reverse chaining happens automatically, so only one direction needs to be set
- xPropertySet->setPropertyValue(sChainNextName, uno::makeAny(nextFinder->first));
+ xPropertySet->setPropertyValue(sChainNextName, uno::makeAny(nextFinder->second.shapeName));
//the last item in an mso-next-textbox chain is indistinguishable from id/seq items. Now that it is handled, remove it.
if( nextFinder->second.s_mso_next_textbox.isEmpty() )
@@ -3417,26 +3421,23 @@ void DomainMapper_Impl::ChainTextFrames()
const sal_Int32 nDirection = 1;
//Finally - go through and attach the chains based on matching ID and incremented sequence number (dml-style).
- for (const auto& rOuter : aTextFramesForChainingHelper)
+ for (const auto& rOuter : chainingWPS)
{
- if( rOuter.second.s_mso_next_textbox.isEmpty() ) //non-empty ones already handled earlier - so skipping them now.
- {
- for (const auto& rInner : aTextFramesForChainingHelper)
+ for (const auto& rInner : chainingWPS)
{
- if ( rInner.second.nId == rOuter.second.nId )
+ if (rInner.nId == rOuter.nId)
{
- if ( rInner.second.nSeq == ( rOuter.second.nSeq + nDirection ) )
+ if (rInner.nSeq == (rOuter.nSeq + nDirection))
{
- uno::Reference<text::XTextContent> xTextContent(rOuter.second.xShape, uno::UNO_QUERY_THROW);
+ uno::Reference<text::XTextContent> const xTextContent(rOuter.xShape, uno::UNO_QUERY_THROW);
uno::Reference<beans::XPropertySet> xPropertySet(xTextContent, uno::UNO_QUERY);
//The reverse chaining happens automatically, so only one direction needs to be set
- xPropertySet->setPropertyValue(sChainNextName, uno::makeAny(rInner.first));
+ xPropertySet->setPropertyValue(sChainNextName, uno::makeAny(rInner.shapeName));
break ; //there cannot be more than one next frame
}
}
}
- }
}
m_vTextFramesForChaining.clear(); //clear the vector
}
@@ -5106,19 +5107,26 @@ void DomainMapper_Impl::CloseFieldCommand()
case FIELD_LASTSAVEDBY : break;
case FIELD_MACROBUTTON:
{
- //extract macro name
- sal_Int32 nIndex = sizeof(" MACROBUTTON ");
- OUString sMacro = pContext->GetCommand().getToken( 0, ' ', nIndex);
if (xFieldProperties.is())
- xFieldProperties->setPropertyValue(
- getPropertyName(PROP_MACRO_NAME), uno::makeAny( sMacro ));
-
- //extract quick help text
- if(xFieldProperties.is() && pContext->GetCommand().getLength() > nIndex + 1)
{
- xFieldProperties->setPropertyValue(
- getPropertyName(PROP_HINT),
- uno::makeAny( pContext->GetCommand().copy( nIndex )));
+ sal_Int32 nIndex = sizeof(" MACROBUTTON ");
+ OUString sCommand = pContext->GetCommand();
+
+ //extract macro name
+ if (sCommand.getLength() >= nIndex)
+ {
+ OUString sMacro = sCommand.getToken(0, ' ', nIndex);
+ xFieldProperties->setPropertyValue(
+ getPropertyName(PROP_MACRO_NAME), uno::Any( sMacro ));
+ }
+
+ //extract quick help text
+ if (sCommand.getLength() > nIndex + 1)
+ {
+ xFieldProperties->setPropertyValue(
+ getPropertyName(PROP_HINT),
+ uno::Any( sCommand.copy( nIndex )));
+ }
}
}
break;
@@ -5995,6 +6003,9 @@ void DomainMapper_Impl::StartOrEndBookmark( const OUString& rId )
else
{
xCursor = xText->createTextCursorByRange( aBookmarkIter->second.m_xTextRange );
+ }
+ if (!aBookmarkIter->second.m_bIsStartOfText)
+ {
xCursor->goRight( 1, false );
}
@@ -6123,6 +6134,9 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId)
else
{
xCursor = xText->createTextCursorByRange(aPermIter->second.m_xTextRange);
+ }
+ if (!aPermIter->second.m_bIsStartOfText)
+ {
xCursor->goRight(1, false);
}
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index b69f4565fb13..ea369ae858fc 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -367,11 +367,12 @@ public:
{
try
{
- // Ask the graphic naming helper to find out the name for this
- // object: It's around till the end of the import, so it remembers
- // what's the first free name.
- uno::Reference< container::XNamed > xNamed( xGraphicObjectProperties, uno::UNO_QUERY_THROW );
- xNamed->setName(rDomainMapper.GetGraphicNamingHelper().NameGraphic(sName));
+ if (!sName.isEmpty())
+ {
+ uno::Reference<container::XNamed> const xNamed(xGraphicObjectProperties, uno::UNO_QUERY_THROW);
+ xNamed->setName(sName);
+ }
+ // else: name is automatically generated by SwDoc::MakeFlySection_()
if ( sHyperlinkURL.getLength() > 0 )
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HYPER_LINK_U_R_L ),
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index 27edb47004d2..b3b285730634 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -173,30 +173,35 @@ void Test::testMetaGenerator()
{ "OpenOffice/4.1.4$Unix OpenOffice.org_project/414m2$Build-9785", "414$9785", SvXMLImport::AOO_4x },
// LO versions
- { "LibreOffice/3.3$Linux LibreOffice_project/330m17$Build-3", "330$3;33", SvXMLImport::LO_3x },
- { "BrOffice/3.3$Win32 LibreOffice_project/330m19$Build-8", "330$8;33", SvXMLImport::LO_3x },
- { "LibreOffice/3.4$Linux LibreOffice_project/340m1$Build-1206", "340$1206;34", SvXMLImport::LO_3x },
- { "LibreOffice/3.5$Linux_X86_64 LibreOffice_project/3fa2330-e49ffd2-90d118b-705e248-051e21c", ";35", SvXMLImport::LO_3x },
- { "LibreOffice/3.6$Windows_x86 LibreOffice_project/a9a0717-273e462-768e6e3-978247f-65e65f", ";36", SvXMLImport::LO_3x },
- { "LibreOffice/4.0.2.2$Windows_x86 LibreOffice_project/4c82dcdd6efcd48b1d8bba66bfe1989deee49c3", ";4022", SvXMLImport::LO_41x },
- { "LibreOffice/4.1.2.3$MacOSX_x86 LibreOffice_project/40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38", ";4123", SvXMLImport::LO_41x },
- { "LibreOffice/4.2.8.2$Windows_x86 LibreOffice_project/48d50dbfc06349262c9d50868e5c1f630a573ebd", ";4282", SvXMLImport::LO_42x },
- { "LibreOffice_from_Collabora_4.2-8/4.2.10.8$Linux_x86 LibreOffice_project/84584cc237b2eb93f7684d8fcd063bb37e87b5fb", ";42108", SvXMLImport::LO_42x },
- { "LibreOffice/4.3.3.2$Linux_x86 LibreOffice_project/9bb7eadab57b6755b1265afa86e04bf45fbfc644", ";4332", SvXMLImport::LO_43x },
- { "LibreOffice_from_Collabora_4.4-10/4.4.10.9$Linux_x86 LibreOffice_project/5600b19b88a01bbb669b0900100760758dff8c26", ";44109", SvXMLImport::LO_44x },
- { "LibreOffice/4.3.3.2$Linux_X86_64 LibreOffice_project/430m0$Build-2", "430$2;4332", SvXMLImport::LO_43x },
- { "LibreOffice/4.4.3.2$Linux_x86 LibreOffice_project/88805f81e9fe61362df02b9941de8e38a9b5fd16", ";4432", SvXMLImport::LO_44x },
- { "LibreOffice/5.0.1.1$Linux_x86 LibreOffice_project/00m0$Build-1", "00$1;5011", SvXMLImport::LO_5x },
- { "LibreOffice/5.0.3.2$Windows_X86_64 LibreOffice_project/e5f16313668ac592c1bfb310f4390624e3dbfb75", ";5032", SvXMLImport::LO_5x },
- { "Collabora_Office/5.0.10.19$Linux_X86_64 LibreOffice_project/95060d44300d8866fa81c16fc8fe2afe22d63777", ";501019", SvXMLImport::LO_5x },
- { "LibreOffice/5.1.6.2.0$Linux_X86_64 LibreOffice_project/10$Build-2", ";51620", SvXMLImport::LO_5x },
- { "Collabora_Office/5.1.10.17$Linux_X86_64 LibreOffice_project/a104cbe76eefca3cf23973da68893d2225fd718b", ";511017", SvXMLImport::LO_5x },
- { "LibreOffice/5.2.1.2$Windows_X86_64 LibreOffice_project/31dd62db80d4e60af04904455ec9c9219178d620", ";5212", SvXMLImport::LO_5x },
- { "LibreOffice_Vanilla/5.2.3.5$MacOSX_X86_64 LibreOffice_project/83adc9c35c74e0badc710d981405858b1179a327", ";5235", SvXMLImport::LO_5x },
- { "LibreOffice/5.3.4.2$Windows_X86_64 LibreOffice_project/f82d347ccc0be322489bf7da61d7e4ad13fe2ff3", ";5342", SvXMLImport::LO_5x },
- { "Collabora_Office/5.3.10.27$Linux_X86_64 LibreOffice_project/7a5a5378661e338a44666c08773cc796b8d1c84a", ";531027", SvXMLImport::LO_5x },
- { "LibreOfficeDev/5.4.7.0.0$Linux_X86_64 LibreOffice_project/ba7461fc88c08e75e315f786020a2946e56166c9", ";54700", SvXMLImport::LO_5x },
- { "LibreOfficeDev/6.0.3.0.0$Linux_X86_64 LibreOffice_project/34442b85bfb0c451738b4db023345a7484463321", ";60300", SvXMLImport::LO_6x },
+ { "LibreOffice/3.3$Linux LibreOffice_project/330m17$Build-3", "330$3;3.3", SvXMLImport::LO_3x },
+ { "BrOffice/3.3$Win32 LibreOffice_project/330m19$Build-8", "330$8;3.3", SvXMLImport::LO_3x },
+ { "LibreOffice/3.4$Linux LibreOffice_project/340m1$Build-1206", "340$1206;3.4", SvXMLImport::LO_3x },
+ { "LibreOffice/3.5$Linux_X86_64 LibreOffice_project/3fa2330-e49ffd2-90d118b-705e248-051e21c", ";3.5", SvXMLImport::LO_3x },
+ { "LibreOffice/3.6$Windows_x86 LibreOffice_project/a9a0717-273e462-768e6e3-978247f-65e65f", ";3.6", SvXMLImport::LO_3x },
+ { "LibreOffice/4.0.2.2$Windows_x86 LibreOffice_project/4c82dcdd6efcd48b1d8bba66bfe1989deee49c3", ";4.0.2.2", SvXMLImport::LO_41x },
+ { "LibreOffice/4.1.2.3$MacOSX_x86 LibreOffice_project/40b2d7fde7e8d2d7bc5a449dc65df4d08a7dd38", ";4.1.2.3", SvXMLImport::LO_41x },
+ { "LibreOffice/4.2.8.2$Windows_x86 LibreOffice_project/48d50dbfc06349262c9d50868e5c1f630a573ebd", ";4.2.8.2", SvXMLImport::LO_42x },
+ { "LibreOffice_from_Collabora_4.2-8/4.2.10.8$Linux_x86 LibreOffice_project/84584cc237b2eb93f7684d8fcd063bb37e87b5fb", ";4.2.10.8", SvXMLImport::LO_42x },
+ { "LibreOffice/4.3.3.2$Linux_x86 LibreOffice_project/9bb7eadab57b6755b1265afa86e04bf45fbfc644", ";4.3.3.2", SvXMLImport::LO_43x },
+ { "LibreOffice_from_Collabora_4.4-10/4.4.10.9$Linux_x86 LibreOffice_project/5600b19b88a01bbb669b0900100760758dff8c26", ";4.4.10.9", SvXMLImport::LO_44x },
+ { "LibreOffice/4.3.3.2$Linux_X86_64 LibreOffice_project/430m0$Build-2", "430$2;4.3.3.2", SvXMLImport::LO_43x },
+ { "LibreOffice/4.4.3.2$Linux_x86 LibreOffice_project/88805f81e9fe61362df02b9941de8e38a9b5fd16", ";4.4.3.2", SvXMLImport::LO_44x },
+ { "LibreOffice/5.0.1.1$Linux_x86 LibreOffice_project/00m0$Build-1", "00$1;5.0.1.1", SvXMLImport::LO_5x },
+ { "LibreOffice/5.0.3.2$Windows_X86_64 LibreOffice_project/e5f16313668ac592c1bfb310f4390624e3dbfb75", ";5.0.3.2", SvXMLImport::LO_5x },
+ { "Collabora_Office/5.0.10.19$Linux_X86_64 LibreOffice_project/95060d44300d8866fa81c16fc8fe2afe22d63777", ";5.0.10.19", SvXMLImport::LO_5x },
+ { "LibreOffice/5.1.6.2.0$Linux_X86_64 LibreOffice_project/10$Build-2", ";5.1.6.2.0", SvXMLImport::LO_5x },
+ { "Collabora_Office/5.1.10.17$Linux_X86_64 LibreOffice_project/a104cbe76eefca3cf23973da68893d2225fd718b", ";5.1.10.17", SvXMLImport::LO_5x },
+ { "LibreOffice/5.2.1.2$Windows_X86_64 LibreOffice_project/31dd62db80d4e60af04904455ec9c9219178d620", ";5.2.1.2", SvXMLImport::LO_5x },
+ { "LibreOffice_Vanilla/5.2.3.5$MacOSX_X86_64 LibreOffice_project/83adc9c35c74e0badc710d981405858b1179a327", ";5.2.3.5", SvXMLImport::LO_5x },
+ { "LibreOffice/5.3.4.2$Windows_X86_64 LibreOffice_project/f82d347ccc0be322489bf7da61d7e4ad13fe2ff3", ";5.3.4.2", SvXMLImport::LO_5x },
+ { "Collabora_Office/5.3.10.27$Linux_X86_64 LibreOffice_project/7a5a5378661e338a44666c08773cc796b8d1c84a", ";5.3.10.27", SvXMLImport::LO_5x },
+ { "LibreOfficeDev/5.4.7.0.0$Linux_X86_64 LibreOffice_project/ba7461fc88c08e75e315f786020a2946e56166c9", ";5.4.7.0.0", SvXMLImport::LO_5x },
+ { "LibreOfficeDev/6.0.3.0.0$Linux_X86_64 LibreOffice_project/34442b85bfb0c451738b4db023345a7484463321", ";6.0.3.0.0", SvXMLImport::LO_6x },
+ { "LibreOffice_powered_by_CIBDev/6.3.9.0.0$Linux_X86_64 LibreOffice_project/c87f331d2900eab70ac3021cbe530926efa6499f", ";6.3.9.0.0", SvXMLImport::LO_6x/*LO_63x*/ },
+ { "LibreOffice_powered_by_CIBDev/6.4.0.0.0$Linux_X86_64 LibreOffice_project/e29e100174c133d27e953934311d68602c4515b7", ";6.4.0.0.0", SvXMLImport::LO_6x/*LO_63x*/ },
+ { "LibreOfficeDev/7.0.6.0.0$Linux_X86_64 LibreOffice_project/dfc40e2292c6e19e285c10ed8c8044d9454107d0", ";7.0.6.0.0", SvXMLImport::LO_6x/*LO_7x*/ },
+ { "CIB_OfficeDev/6.4.0.19$Linux_X86_64 LibreOffice_project/2e04f804b5f82770435f250873f07b3384d95504", ";6.4.0.19", SvXMLImport::LO_6x/*LO_63x*/ },
+ { "LibreOfficeDev/24.2.0.0.alpha0$Linux_X86_64 LibreOffice_project/b81e7b6f3c71fb3ade1cb665444ac730dac0a9a9", ";24.2.0.0.", SvXMLImport::ProductVersionUnknown/*LO_New*/ },
};
for (size_t i = 0; i < SAL_N_ELEMENTS(tests); ++i)
@@ -212,14 +217,15 @@ void Test::testMetaGenerator()
OUString::createFromAscii(tests[i].generator), xInfoSet);
if (tests[i].buildId[0] != '\0')
{
- CPPUNIT_ASSERT_EQUAL(OUString::createFromAscii(tests[i].buildId),
- xInfoSet->getPropertyValue("BuildId").get<OUString>());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(tests[i].generator,
+ OUString::createFromAscii(tests[i].buildId),
+ xInfoSet->getPropertyValue("BuildId").get<OUString>());
}
else
{
- CPPUNIT_ASSERT(!xInfoSet->getPropertyValue("BuildId").hasValue());
+ CPPUNIT_ASSERT_MESSAGE(tests[i].generator, !xInfoSet->getPropertyValue("BuildId").hasValue());
}
- CPPUNIT_ASSERT_EQUAL(tests[i].result, pImport->getGeneratorVersion());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(tests[i].generator, tests[i].result, pImport->getGeneratorVersion());
}
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index ef63550ff2be..2cc37c313d5f 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -162,37 +162,63 @@ public:
OUString const loVersion(buildIds.copy(ix + 1));
if (!loVersion.isEmpty())
{
- if ('3' == loVersion[0])
- {
- mnGeneratorVersion = SvXMLImport::LO_3x;
- }
- else if ('4' == loVersion[0])
- {
- if (loVersion.getLength() > 1
- && (loVersion[1] == '0' || loVersion[1] == '1'))
+ auto const firstDot(loVersion.indexOf('.'));
+ if (firstDot == 1)
+ { // old version scheme 3.3 ... 7.6
+ if ('3' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1
+ mnGeneratorVersion = SvXMLImport::LO_3x;
}
- else if (loVersion.getLength() > 1 && '2' == loVersion[1])
+ else if ('4' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2
+ if (loVersion.getLength() > 2
+ && (loVersion[2] == '0' || loVersion[2] == '1'))
+ {
+ mnGeneratorVersion = SvXMLImport::LO_41x; // 4.0/4.1
+ }
+ else if (loVersion.getLength() > 2 && '2' == loVersion[2])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_42x; // 4.2
+ }
+ else if (loVersion.getLength() > 2 && '3' == loVersion[2])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_43x; // 4.3
+ }
+ else if (loVersion.getLength() > 2 && '4' == loVersion[2])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
+ }
}
- else if (loVersion.getLength() > 1 && '3' == loVersion[1])
+ else if ('5' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::LO_43x; // 4.3
+ mnGeneratorVersion = SvXMLImport::LO_5x;
}
- else if (loVersion.getLength() > 1 && '4' == loVersion[1])
+ else if ('6' == loVersion[0])
{
- mnGeneratorVersion = SvXMLImport::LO_44x; // 4.4
+ mnGeneratorVersion = SvXMLImport::LO_6x;
+ }
+ else if ('7' == loVersion[0])
+ {
+ mnGeneratorVersion = SvXMLImport::LO_6x; // no point in adding LO_7x here
+ }
+ else
+ {
+ SAL_INFO("xmloff.core", "unknown LO version: " << loVersion);
}
}
- else if ('5' == loVersion[0])
- {
- mnGeneratorVersion = SvXMLImport::LO_5x;
- }
- else if ('6' == loVersion[0])
+ else if (1 < firstDot) // new version scheme 24.2 ...
{
- mnGeneratorVersion = SvXMLImport::LO_6x;
+ OUString const nMajor(loVersion.copy(0, firstDot));
+ auto const year(nMajor.toInt32());
+ //auto const month(loVersion.copy(firstDot+1).toInt32());
+ if (0 < year)
+ {
+ //mnGeneratorVersion = SvXMLImport::LO_New;
+ }
+ else
+ {
+ SAL_INFO("xmloff.core", "unknown LO version: " << loVersion);
+ }
}
else
{
@@ -653,6 +679,8 @@ void SAL_CALL SvXMLImport::endDocument()
}
std::unique_ptr<SvXMLNamespaceMap> SvXMLImport::processNSAttributes(
+ std::unique_ptr<SvXMLNamespaceMap> & rpNamespaceMap,
+ SvXMLImport *const pImport, // TODO???
const uno::Reference< xml::sax::XAttributeList >& xAttrList)
{
std::unique_ptr<SvXMLNamespaceMap> pRewindMap;
@@ -660,12 +688,13 @@ std::unique_ptr<SvXMLNamespaceMap> SvXMLImport::processNSAttributes(
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
- if ( rAttrName == "office:version" )
+ if (pImport && rAttrName == "office:version")
{
- mpImpl->aODFVersion = xAttrList->getValueByIndex( i );
+ pImport->mpImpl->aODFVersion = xAttrList->getValueByIndex( i );
// the ODF version in content.xml and manifest.xml must be the same starting from ODF1.2
- if ( mpImpl->mStreamName == "content.xml" && !IsODFVersionConsistent( mpImpl->aODFVersion ) )
+ if (pImport->mpImpl->mStreamName == "content.xml"
+ && !pImport->IsODFVersionConsistent(pImport->mpImpl->aODFVersion))
{
throw xml::sax::SAXException("Inconsistent ODF versions in content.xml and manifest.xml!",
uno::Reference< uno::XInterface >(),
@@ -679,8 +708,8 @@ std::unique_ptr<SvXMLNamespaceMap> SvXMLImport::processNSAttributes(
{
if( !pRewindMap )
{
- pRewindMap = std::move(mpNamespaceMap);
- mpNamespaceMap.reset(new SvXMLNamespaceMap(*pRewindMap));
+ pRewindMap = std::move(rpNamespaceMap);
+ rpNamespaceMap.reset(new SvXMLNamespaceMap(*pRewindMap));
}
const OUString& rAttrValue = xAttrList->getValueByIndex( i );
@@ -688,18 +717,18 @@ std::unique_ptr<SvXMLNamespaceMap> SvXMLImport::processNSAttributes(
? OUString()
: rAttrName.copy( 6 ) );
// Add namespace, but only if it is known.
- sal_uInt16 nKey = mpNamespaceMap->AddIfKnown( aPrefix, rAttrValue );
+ sal_uInt16 nKey = rpNamespaceMap->AddIfKnown( aPrefix, rAttrValue );
// If namespace is unknown, try to match a name with similar
// TC Id and version
if( XML_NAMESPACE_UNKNOWN == nKey )
{
OUString aTestName( rAttrValue );
if( SvXMLNamespaceMap::NormalizeURI( aTestName ) )
- nKey = mpNamespaceMap->AddIfKnown( aPrefix, aTestName );
+ nKey = rpNamespaceMap->AddIfKnown( aPrefix, aTestName );
}
// If that namespace is not known, too, add it as unknown
if( XML_NAMESPACE_UNKNOWN == nKey )
- mpNamespaceMap->Add( aPrefix, rAttrValue );
+ rpNamespaceMap->Add( aPrefix, rAttrValue );
}
}
@@ -712,7 +741,8 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
// SAL_INFO("svg", "startElement " << rName);
// Process namespace attributes. This must happen before creating the
// context, because namespace declaration apply to the element name itself.
- std::unique_ptr<SvXMLNamespaceMap> pRewindMap(processNSAttributes(xAttrList));
+ std::unique_ptr<SvXMLNamespaceMap> pRewindMap(
+ processNSAttributes(mpNamespaceMap, this, xAttrList));
// Get element's namespace and local name.
OUString aLocalName;
@@ -885,7 +915,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList );
std::unique_ptr<SvXMLNamespaceMap> pRewindMap(
- processNSAttributes( maNamespaceAttrList.get() ));
+ processNSAttributes(mpNamespaceMap, this, maNamespaceAttrList.get()));
assert( dynamic_cast<SvXMLImportContext*>( xContext.get() ) != nullptr );
SvXMLImportContext *pContext = static_cast<SvXMLImportContext*>( xContext.get() );
if (pRewindMap)
@@ -2231,7 +2261,7 @@ void SAL_CALL SvXMLLegacyToFastDocHandler::endDocument()
void SAL_CALL SvXMLLegacyToFastDocHandler::startElement( const OUString& rName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
- mrImport->processNSAttributes(xAttrList);
+ SvXMLImport::processNSAttributes(mrImport->mpNamespaceMap, mrImport.get(), xAttrList);
OUString aLocalName;
sal_uInt16 nPrefix = mrImport->mpNamespaceMap->GetKeyByAttrName( rName, &aLocalName );
Sequence< sal_Int8 > aLocalNameSeq( reinterpret_cast<sal_Int8 const *>(
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index fb760c6307c5..1b2f4bcf8566 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -137,6 +137,19 @@ namespace xmloff { namespace token {
TOKEN( "grddl", XML_NP_GRDDL ),
TOKEN( "http://www.w3.org/2003/g/data-view#", XML_N_GRDDL ),
+ // OOo extension digital signatures, used in ODF 1.1
+ TOKEN( "dsigooo", XML_NP_DSIG_OOO ),
+ TOKEN( "http://openoffice.org/2004/documentsignatures", XML_N_DSIG_OOO ),
+ // ODF 1.2 digital signature namespaces
+ TOKEN( "dsig", XML_NP_DSIG ),
+ TOKEN( "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0", XML_N_DSIG ),
+ TOKEN( "ds", XML_NP_DS ),
+ TOKEN( "http://www.w3.org/2000/09/xmldsig#", XML_N_DS ),
+ TOKEN( "xades132", XML_NP_XADES132 ),
+ TOKEN( "http://uri.etsi.org/01903/v1.3.2#", XML_N_XADES132 ),
+ TOKEN( "xades141", XML_NP_XADES141 ),
+ TOKEN( "http://uri.etsi.org/01903/v1.4.1#", XML_N_XADES141 ),
+
// ODF Enhanced namespaces
TOKEN( "officeooo", XML_NP_OFFICE_EXT ),
TOKEN( "http://openoffice.org/2009/office", XML_N_OFFICE_EXT ),
@@ -694,7 +707,7 @@ namespace xmloff { namespace token {
TOKEN( "embedded-visible-area", XML_EMBEDDED_VISIBLE_AREA ),
TOKEN( "embossed", XML_EMBOSSED ),
TOKEN( "emissive-color", XML_EMISSIVE_COLOR ),
- TOKEN( "empty", XML_EMPTY ),
+ TOKEN( "empty", XML_TOKEN_EMPTY ),
TOKEN( "empty-line-refresh", XML_EMPTY_LINE_REFRESH ),
TOKEN( "enable-numbering", XML_ENABLE_NUMBERING ),
TOKEN( "enabled", XML_ENABLED ),
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 6a59ac6967e2..378faaca9e68 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -75,7 +75,7 @@ using namespace ::xmloff::token;
#define DPMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
#define TMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
#define PMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
-#define MAP_END() { nullptr, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { nullptr, 0, 0, XML_TOKEN_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false }
// entry list for graphic properties
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index ddd128d1d8b0..887c49e61a49 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -302,23 +302,20 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap
if( xPropSet.is() && bObjSupportsText )
{
uno::Reference< text::XText > xText(xShape, uno::UNO_QUERY);
- bool bSkip = false;
if (xText.is())
{
try
{
- bSkip = xText->getString().isEmpty();
+ // tdf#153161: it seems that the call to XTextRange::getString flushes the changes
+ // for some objects, that otherwise fail to get exported correctly. Maybe at some
+ // point it would make sense to find a better place for more targeted flush.
+ xText->getString();
}
catch (uno::RuntimeException const&)
{
- // tdf#102479: SwXTextFrame that contains only a table will
- // throw, but the table must be iterated so that
- // SwXMLExport::ExportTableLines() can find its auto styles
- // so do not skip it!
+ // E.g., SwXTextFrame that contains only a table will throw; this is not an error
}
- }
- if (!bSkip)
- {
+
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject") )
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 8bee4b376ba1..955ec011c5df 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -87,6 +87,7 @@
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <basegfx/vector/b2dvector.hxx>
+#include <tools/urlobj.hxx>
#include <o3tl/safeint.hxx>
using namespace ::com::sun::star;
@@ -509,7 +510,11 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName)
xShape.set(xServiceFact->createInstance("com.sun.star.drawing.temporaryForXMLImportOLE2Shape"), uno::UNO_QUERY);
}
else if (serviceName == "com.sun.star.drawing.GraphicObjectShape"
+ || serviceName == "com.sun.star.drawing.AppletShape"
+ || serviceName == "com.sun.star.drawing.FrameShape"
|| serviceName == "com.sun.star.drawing.MediaShape"
+ || serviceName == "com.sun.star.drawing.OLE2Shape"
+ || serviceName == "com.sun.star.drawing.PluginShape"
|| serviceName == "com.sun.star.presentation.MediaShape")
{
css::uno::Sequence<css::uno::Any> args(1);
@@ -3222,9 +3227,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() )
{
@@ -3233,7 +3264,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() )
@@ -3243,6 +3273,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
if( !maHref.isEmpty() )
{
+ if (INetURLObject(maHref).IsExoticProtocol())
+ GetImport().NotifyMacroEventRead();
+
xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index fae45f88f00a..a00c87e8a0da 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -513,6 +513,8 @@ private:
OUString maFrameName;
OUString maHref;
+ css::uno::Reference<css::drawing::XShape> CreateFloatingFrameShape() const;
+
public:
SdXMLFloatingFrameShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index 907fd68d4e0d..22c96917b097 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -273,11 +273,11 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno:
assert(firstSlash != -1);
for (sal_Int32 i = firstSlash + 1; i < i_rBuildId.getLength(); ++i)
{
- if (rtl::isAsciiDigit(i_rBuildId[i]))
+ if (rtl::isAsciiDigit(i_rBuildId[i]) || '.' == i_rBuildId[i])
{
sNumber.append(i_rBuildId[i]);
}
- else if ('.' != i_rBuildId[i])
+ else
{
break;
}
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 0faabe8264b2..39bd291d670d 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -154,7 +154,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
PLMAP( "FootnoteLineRelativeWidth", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH ),
PLMAP( "FootnoteLineTextDistance", XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE ),
PLMAP( "FootnoteLineWeight", XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGHT ),
- PLMAP( "FootnoteLineStyle", XML_NAMESPACE_STYLE, XML_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
+ PLMAP( "FootnoteLineStyle", XML_NAMESPACE_STYLE, XML_TOKEN_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
//////////////////////////////////////////////////////////////////////////
//Index 92: Section for 'header-style' own section, all members *have* to use CTF_PM_HEADERFLAG in the context entry (the 5th one)
@@ -268,7 +268,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
HFMAP( "FooterFillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERREPEAT_OFFSET_X ),
HFMAP( "FooterFillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_PM_FOOTERREPEAT_OFFSET_Y ),
- { nullptr, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false } // index 190
+ { nullptr, 0, 0, XML_TOKEN_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false } // index 190
};
XMLPropertyMapEntry const g_XMLPageMasterDrawingPageStyleMap[] =
@@ -296,7 +296,7 @@ XMLPropertyMapEntry const g_XMLPageMasterDrawingPageStyleMap[] =
DPMAP_IMPORT("FillBitmapOffsetX", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETX|MID_FLAG_MULTI_PROPERTY, CTF_PM_REPEAT_OFFSET_X),
DPMAP_IMPORT("FillBitmapOffsetY", XML_NAMESPACE_DRAW, XML_TILE_REPEAT_OFFSET, XML_SW_TYPE_BITMAPREPOFFSETY|MID_FLAG_MULTI_PROPERTY, CTF_PM_REPEAT_OFFSET_Y),
- { nullptr, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
+ { nullptr, 0, 0, XML_TOKEN_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 0f5a45dc40da..b549f447eb0c 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -119,7 +119,24 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
{
rProp.Value >>= sSuffix;
}
- else if( rProp.Name == "BulletChar" )
+ else if (rProp.Name == "ListFormat")
+ {
+ OUString sListFormat;
+ rProp.Value >>= sListFormat;
+
+ // Since we have no support for entire format string it should be converted
+ // to prefix and suffix. Of course, it is not so flexible as format string,
+ // but it is the only option
+ sal_Int32 nFirstReplacement = sListFormat.indexOf('%');
+ sal_Int32 nLastReplacement = sListFormat.lastIndexOf('%') + 1;
+ if (nFirstReplacement > 0)
+ // Everything before first '%' will be prefix
+ sPrefix = sListFormat.copy(0, nFirstReplacement);
+ if (nLastReplacement >= 0 && nLastReplacement < sListFormat.getLength() -1 )
+ // Everything beyond last '%' (+1 for follow up id) is a suffix
+ sSuffix = sListFormat.copy(nLastReplacement + 1);
+ }
+ else if (rProp.Name == "BulletChar")
{
OUString sValue;
rProp.Value >>= sValue;
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 42d482a1c8a5..4ab8cdb20daf 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star::style;
#define CMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_COLUMN,context)
#define RMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_ROW,context)
#define CELLMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_CELL,context)
-#define MAP_END { nullptr, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END { nullptr, 0, 0, XML_TOKEN_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry* getColumnPropertiesMap()
{
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index 024877e8cf45..b2b95e956bd1 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -72,6 +72,16 @@ xhtml
N_XHTML_DUMMY
grddl
N_GRDDL_DUMMY
+dsigooo
+N_DSIG_OOO_DUMMY
+dsig
+N_DSIG_DUMMY
+ds
+N_DS_DUMMY
+xades132
+N_XADES132_DUMMY
+xades141
+N_XADES141_DUMMY
officeooo
N_OFFICE_EXT_DUMMY
formx
diff --git a/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk
index f2500b5d3100..f6a74a9eabd7 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk
@@ -34,6 +34,14 @@ $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_pdfsigning,\
boost_headers \
))
+ifneq ($(OS),WNT)
+ifneq (,$(ENABLE_NSS))
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_pdfsigning,\
+ nssutil3 \
+))
+endif
+endif
+
$(eval $(call gb_CppunitTest_set_include,xmlsecurity_pdfsigning,\
-I$(SRCDIR)/xmlsecurity/inc \
$$(INCLUDE) \
diff --git a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
index 7d0c5200ff27..9709b49e2b19 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_signing.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_CppunitTest_use_libraries,xmlsecurity_signing, \
unotest \
utl \
xmlsecurity \
+ xsec_xmlsec \
))
$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
@@ -35,6 +36,14 @@ $(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
libxml2 \
))
+ifneq ($(OS),WNT)
+ifneq (,$(ENABLE_NSS))
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_signing,\
+ nssutil3 \
+))
+endif
+endif
+
$(eval $(call gb_CppunitTest_set_include,xmlsecurity_signing,\
-I$(SRCDIR)/xmlsecurity/inc \
$$(INCLUDE) \
diff --git a/xmlsecurity/inc/biginteger.hxx b/xmlsecurity/inc/biginteger.hxx
index d07ecf45d8af..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -31,6 +31,18 @@ namespace xmlsecurity
{
XSECXMLSEC_DLLPUBLIC OUString bigIntegerToNumericString( const css::uno::Sequence< sal_Int8 >& serial );
XSECXMLSEC_DLLPUBLIC css::uno::Sequence< sal_Int8 > numericStringToBigInteger ( const OUString& serialNumber );
+
+// DNs read as strings from XML files may need to be mangled for compatibility
+// as NSS and MS CryptoAPI have different string serialisations; if the DN is
+// from an XCertificate it's "native" already and doesn't need to be mangled.
+enum EqualMode
+{
+ NOCOMPAT,
+ COMPAT_2ND,
+ COMPAT_BOTH
+};
+XSECXMLSEC_DLLPUBLIC bool EqualDistinguishedNames(OUString const& rName1,
+ OUString const& rName2, EqualMode eMode);
}
#endif
diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
index c060c8bf23b8..b5e142015f75 100644
--- a/xmlsecurity/inc/xmlsec-wrapper.h
+++ b/xmlsecurity/inc/xmlsec-wrapper.h
@@ -29,6 +29,7 @@
#define XMLSEC_NO_SIZE_T
#endif
+#include <libxml/parser.h>
#include <xmlsec/base64.h>
#include <xmlsec/bn.h>
#include <xmlsec/errors.h>
@@ -43,6 +44,10 @@
#include <xmlsec/nss/app.h>
#include <xmlsec/nss/crypto.h>
#include <xmlsec/nss/pkikeys.h>
+#include <xmlsec/nss/x509.h>
+#endif
+#ifdef XMLSEC_CRYPTO_MSCRYPTO
+#include <xmlsec/mscng/x509.h>
#endif
#endif
diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
index e1eed377d6fa..5262b52c81e0 100644
--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
@@ -20,6 +20,7 @@
#ifndef INCLUDED_XMLSECURITY_INC_XMLSEC_SAXHELPER_HXX
#define INCLUDED_XMLSECURITY_INC_XMLSEC_SAXHELPER_HXX
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include <rtl/ustring.hxx>
diff --git a/xmlsecurity/inc/xmlsignaturehelper.hxx b/xmlsecurity/inc/xmlsignaturehelper.hxx
index 0fcbd665251f..2456ddd437ec 100644
--- a/xmlsecurity/inc/xmlsignaturehelper.hxx
+++ b/xmlsecurity/inc/xmlsignaturehelper.hxx
@@ -28,6 +28,9 @@
#include "xmlsignaturehelper.hxx"
#include "xsecctl.hxx"
+#include <com/sun/star/security/XCertificate.hpp>
+#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
+
class DateTime;
class UriBindingHelper;
@@ -93,6 +96,15 @@ public:
// After signing/verifying, get information about signatures
SignatureInformation GetSignatureInformation( sal_Int32 nSecurityId ) const;
SignatureInformations GetSignatureInformations() const;
+ /// ImplVerifySignature calls this to figure out which X509Data is the
+ /// signing certificate and update the internal state with the result.
+ /// @return
+ /// A sequence with the signing certificate at the back on success.
+ /// An empty sequence on failure.
+ std::vector<css::uno::Reference<css::security::XCertificate>>
+ CheckAndUpdateSignatureInformation(
+ css::uno::Reference<css::xml::crypto::XSecurityEnvironment> const& xSecEnv,
+ SignatureInformation const& rInfo);
// See XSecController for documentation
void StartMission(const css::uno::Reference<css::xml::crypto::XXMLSecurityContext>& xSecurityContext);
diff --git a/xmlsecurity/inc/xsecctl.hxx b/xmlsecurity/inc/xsecctl.hxx
index 351c94a2a3e6..7ce35cea22bf 100644
--- a/xmlsecurity/inc/xsecctl.hxx
+++ b/xmlsecurity/inc/xsecctl.hxx
@@ -252,6 +252,7 @@ private:
/// Sets algorithm from <SignatureMethod Algorithm="...">.
void setSignatureMethod(svl::crypto::SignatureMethodAlgorithm eAlgorithmID);
void switchGpgSignature();
+ bool haveReferenceForId(OUString const& rId) const;
void addReference(
const OUString& ouUri,
sal_Int32 nDigestID,
@@ -262,18 +263,21 @@ private:
sal_Int32 nDigestID );
void setReferenceCount() const;
- void setX509IssuerName( OUString const & ouX509IssuerName );
- void setX509SerialNumber( OUString const & ouX509SerialNumber );
- void setX509Certificate( OUString const & ouX509Certificate );
+ void setX509Data(
+ std::vector<std::pair<OUString, OUString>> & rX509IssuerSerials,
+ std::vector<OUString> const& rX509Certificates);
+ void setX509CertDigest(
+ OUString const& rCertDigest, sal_Int32 const nReferenceDigestID,
+ OUString const& rX509IssuerName, OUString const& rX509SerialNumber);
+
void setSignatureValue( OUString const & ouSignatureValue );
void setDigestValue( sal_Int32 nDigestID, OUString const & ouDigestValue );
void setGpgKeyID( OUString const & ouKeyID );
void setGpgCertificate( OUString const & ouGpgCert );
void setGpgOwner( OUString const & ouGpgOwner );
- void setDate( OUString const & ouDate );
- void setDescription(const OUString& rDescription);
- void setCertDigest(const OUString& rCertDigest);
+ void setDate(OUString const& rId, OUString const& ouDate);
+ void setDescription(OUString const& rId, OUString const& rDescription);
void setValidSignatureImage(const OUString& rValidSigImg);
void setInvalidSignatureImage(const OUString& rInvalidSigImg);
void setSignatureLineId(const OUString& rSignatureLineId);
@@ -283,7 +287,6 @@ public:
private:
void setId( OUString const & ouId );
- void setPropertyId( OUString const & ouPropertyId );
css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > prepareSignatureToRead(
sal_Int32 nSecurityId );
@@ -303,6 +306,9 @@ public:
SignatureInformation getSignatureInformation( sal_Int32 nSecurityId ) const;
SignatureInformations getSignatureInformations() const;
+ /// only verify can figure out which X509Data is the signing certificate
+ void UpdateSignatureInformation(sal_Int32 nSecurityId,
+ std::vector<SignatureInformation::X509Data> const& rDatas);
static void exportSignature(
const css::uno::Reference< css::xml::sax::XDocumentHandler >& xDocumentHandler,
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 20241f016d52..6dd7a86cac5c 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -7,11 +7,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef _WIN32
+#include <secoid.h>
+#endif
+
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
#include <com/sun/star/security/DocumentSignatureInformation.hpp>
#include <comphelper/processfactory.hxx>
#include <osl/file.hxx>
+#include <osl/process.h>
#include <sal/log.hxx>
#include <test/bootstrapfixture.hxx>
#include <tools/datetime.hxx>
@@ -66,17 +71,36 @@ void PDFSigningTest::setUp()
mxComponentContext.set(comphelper::getComponentContext(getMultiServiceFactory()));
-#ifndef _WIN32
- // Set up cert8.db and key3.db in workdir/CppunitTest/
OUString aSourceDir = m_directories.getURLFromSrc(DATA_DIRECTORY);
OUString aTargetDir
= m_directories.getURLFromWorkdir("/CppunitTest/xmlsecurity_pdfsigning.test.user/");
- osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "cert8.db");
- osl::File::copy(aSourceDir + "key3.db", aTargetDir + "key3.db");
OUString aTargetPath;
osl::FileBase::getSystemPathFromFileURL(aTargetDir, aTargetPath);
+
+#ifdef _WIN32
+ // CryptoAPI test certificates
+ osl::File::copy(aSourceDir + "test.p7b", aTargetDir + "/test.p7b");
+ OUString caVar("LIBO_TEST_CRYPTOAPI_PKCS7");
+ osl_setEnvironment(caVar.pData, aTargetPath.pData);
+#else
+ // Set up NSS database in workdir/CppunitTest/
+ osl::File::copy(aSourceDir + "cert9.db", aTargetDir + "/cert9.db");
+ osl::File::copy(aSourceDir + "key4.db", aTargetDir + "/key4.db");
+ osl::File::copy(aSourceDir + "pkcs11.txt", aTargetDir + "/pkcs11.txt");
setenv("MOZILLA_CERTIFICATE_FOLDER", aTargetPath.toUtf8().getStr(), 1);
#endif
+
+ uno::Reference<xml::crypto::XSEInitializer> xSEInitializer
+ = xml::crypto::SEInitializer::create(mxComponentContext);
+ uno::Reference<xml::crypto::XXMLSecurityContext> xSecurityContext
+ = xSEInitializer->createSecurityContext(OUString());
+#ifndef _WIN32
+#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+ // policy may disallow using SHA1 for signatures but unit test documents
+ // have such existing signatures (call this after createSecurityContext!)
+ NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0);
+#endif
+#endif
}
std::vector<SignatureInformation> PDFSigningTest::verify(const OUString& rURL, size_t nCount,
diff --git a/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt b/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
new file mode 100644
index 000000000000..d63e4b6b7b72
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/02_doc_macros_signed_by_attacker_manipulated.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt
new file mode 100644
index 000000000000..0190abb00f23
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated2.odt b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated2.odt
new file mode 100644
index 000000000000..f4b4198f94a6
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated2.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated_triple.odt b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated_triple.odt
new file mode 100644
index 000000000000..558bdee47e59
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_attacker_manipulated_triple.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_trusted_person_manipulated.odt b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_trusted_person_manipulated.odt
new file mode 100644
index 000000000000..4136b32e5610
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/02_doc_signed_by_trusted_person_manipulated.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/cert8.db b/xmlsecurity/qa/unit/signing/data/cert9.db
index 95e58ffe5b92..c4064e419f42 100644
--- a/xmlsecurity/qa/unit/signing/data/cert8.db
+++ b/xmlsecurity/qa/unit/signing/data/cert9.db
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/key3.db b/xmlsecurity/qa/unit/signing/data/key3.db
deleted file mode 100644
index f449e60a667f..000000000000
--- a/xmlsecurity/qa/unit/signing/data/key3.db
+++ /dev/null
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/key4.db b/xmlsecurity/qa/unit/signing/data/key4.db
new file mode 100644
index 000000000000..34a7fa28aa32
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/key4.db
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/pkcs11.txt b/xmlsecurity/qa/unit/signing/data/pkcs11.txt
new file mode 100644
index 000000000000..22c8f8519efd
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/pkcs11.txt
@@ -0,0 +1,5 @@
+library=
+name=NSS Internal PKCS #11 Module
+parameters=configdir='sql:test/new' certPrefix='' keyPrefix='' secmod='secmod.db' flags= updatedir='' updateCertPrefix='' updateKeyPrefix='' updateid='' updateTokenDescription=''
+NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512] askpw=any timeout=30})
+
diff --git a/xmlsecurity/qa/unit/signing/data/signed_with_x509certificate_chain.odt b/xmlsecurity/qa/unit/signing/data/signed_with_x509certificate_chain.odt
new file mode 100644
index 000000000000..5e519dd8b7e7
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/signed_with_x509certificate_chain.odt
Binary files differ
diff --git a/xmlsecurity/qa/unit/signing/data/test.p7b b/xmlsecurity/qa/unit/signing/data/test.p7b
new file mode 100644
index 000000000000..44723697a2bf
--- /dev/null
+++ b/xmlsecurity/qa/unit/signing/data/test.p7b
@@ -0,0 +1,249 @@
+-----BEGIN PKCS7-----
+MIIuNgYJKoZIhvcNAQcCoIIuJzCCLiMCAQExADALBgkqhkiG9w0BBwGggi4LMIIF
+sjCCA5qgAwIBAgICEAAwDQYJKoZIhvcNAQELBQAwZTELMAkGA1UEBhMCVUsxEDAO
+BgNVBAgMB0VuZ2xhbmQxHTAbBgNVBAoMFFhtbHNlY3VyaXR5IFJTQSBUZXN0MSUw
+IwYDVQQDDBxYbWxzZWN1cml0eSBSU0EgVGVzdCBSb290IENBMCAXDTE4MDYwNjE1
+MjAwNloYDzIxMTgwNTEzMTUyMDA2WjBpMQswCQYDVQQGEwJVSzEQMA4GA1UECAwH
+RW5nbGFuZDEdMBsGA1UECgwUWG1sc2VjdXJpdHkgUlNBIFRlc3QxKTAnBgNVBAMM
+IFhtbHNlY3VyaXR5IEludGVybWVkaWF0ZSBSb290IENBMIICIjANBgkqhkiG9w0B
+AQEFAAOCAg8AMIICCgKCAgEA+uBkXt39Yc0aOe2UkBWlVIqQcvlSwLheXlcGeDDI
+PSwSRaDcuGdGQXs+WFM65xDak8eZJwyyQSWtoDRV0lXEP63OJk/ktWLjFywLP69g
+Br2E4vsjOdr9DR94AAQY2WTW2/UXxcI92nB+sq6ZhVF5I9rfzDHPGYEiWTQqtnTM
+JDGpO5eo9JBjQtaB/sHG7ZnxF1FOl6V85F/dfGG3MBGp9glg5qE6QDjA11DsTuki
+V5OeP8vZsmoYkyNmViA7L+xuOM6iVUGY+b4XDCeI1Kgr5ZhF9xL7ByVTxtZrdMXz
+cPu+Dgcr9VF7QqhAYg/W/0s4WzoyXV/f1fjC5+uKXWSuttrRHNt16DMOh5T1lS4q
+HLfMoDYZ+AK8L0JrjQMXCzCp4WTmqplBg6bYWFpHvyzp0uccYJdUXv5o6PFhpIV6
+VpdVtT6fVfh9V5C5jDKBv+n14rZ9hPYzvIxVAnF6SYtXRTbrSzSDi5QqCiWwU56u
+SAWyyrwdED1zETgTDmGOFv5j2tIEcAbQ6TT8n/Mit5NuL98M5XxPnKduCQ39ssKD
+wO146lAe5kREJRv4Va/o47tards6tdkaV5267rXZA7ndvnov0TmZFNwDMQz9tRZJ
+ov07V7kriLS47xD/eDH7IyEOWYsgoU3N1J1GZKCYSRxZ3Wh6AiZy211PYwuJpP3x
+ugUCAwEAAaNmMGQwHQYDVR0OBBYEFDXB8g347TUPMvCNXTBSRQpVRvroMB8GA1Ud
+IwQYMBaAFOOqggO/I6PkIyJZqJ16mbDbtiXxMBIGA1UdEwEB/wQIMAYBAf8CAQAw
+DgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBCwUAA4ICAQAiyaCtGnPZRsfGD69y
+jkPptc6cwa8icyF9iiJwdngjvdMTCOJHhUAtzGTOuUITJEh0OJYzabB+EUgHmZWe
+6hwrWCzhJQysDktdsARQOB91Vi19VyDrcHPxnn43zObnbkLpFvZXg3Q3/S+eiTn/
+UWMg7f2tQjaCdj6xx1DGTiJmZBRI/CG24EWzYy+H7/MBNFuW3+1CdoDuPR3lkbWm
+YFJbvkOaWR8+faL6o5u7IagKCSmMaNDjRQA8/LKwJ8waD61Hw4S4H465I16UVCT4
+d226anZIfz7N3/NbVw0B8emJP1ZtVty1vDPEx/6A7+sXfgAYgjfMeiHhGHs17i2d
+7EvdwxlyvKq/iQkLMzkyAkA5kpUbZ/kpOQh8sR9JHxv3QEz0clRvRIwlJU5W+Pa1
+e3dNYTDR9x0fBaLwPUIc5RnnSZ5Aws2qxnp7yYrQzxTtLd3IoDU4BuuyBE+/Pauk
+bbfJUnr+e9Pwt+OXqrECnhxz+f0FDAMlX0CEe7Vlx8p37roBiT4sf3anXrNyrUZM
+QWQFLs9H3+yooEJJWTgs7QjFZ0l5LIQyTv1I4UmGBgEWlW8UNIJhvAeq1ykY+WZw
+At9JDlNwiAbFbFoMqGkVZDko1foTE8KUJfgth63ZmdWw1yzX8H9+zDlhpHCehJsJ
+68Rk7INjBNZr6IxpVViGLsW1qTCCBbgwggOgoAMCAQICAhAAMA0GCSqGSIb3DQEB
+CwUAMGkxCzAJBgNVBAYTAlVLMRAwDgYDVQQIDAdFbmdsYW5kMR8wHQYDVQQKDBZY
+bWxzZWN1cml0eSBFQ0RTQSBUZXN0MScwJQYDVQQDDB5YbWxzZWN1cml0eSBFQ0RT
+QSBUZXN0IFJvb3QgQ0EwIBcNMTgwNjA2MTUyMDIxWhgPMjExODA1MTMxNTIwMjFa
+MGsxCzAJBgNVBAYTAlVLMRAwDgYDVQQIDAdFbmdsYW5kMR8wHQYDVQQKDBZYbWxz
+ZWN1cml0eSBFQ0RTQSBUZXN0MSkwJwYDVQQDDCBYbWxzZWN1cml0eSBJbnRlcm1l
+ZGlhdGUgUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAKlB
+Wij1qE0sYqzYZ8p9FAejgwuf0npT2uplFdq2VZGJaMRS+dbbxnjAh7N78q8aSkag
+kYOQcWtp/XmBCAsGC7D5MA+H6eyPAfZdnb+CycwGkvTH3CfJHCS9QVHRk4HGmAgO
+DEQtLzA5z65wrfZDD5utBtItWd5brhjDQTROmfjbm7t4V/+2uTr94WrMvykj5Cye
+vo2VeAz/zjJIgN+eNQwGnCZWWpITwzq6II4oUIz+/oHSHox4Q8s0XdjXpkfvZfN4
+lVOXlqnUC3pZEPSn4siJEkw26s5fwt9oeoyGDWoKPZmy9jlkxIOiaBz8RAGYPsSS
+sfZ28w0XCxG70WIzOBbLe5IuCGzpv7jzygAWjSVxeyVuGFs1ev8t77Ij/9wPXg0c
+tDclq/nGqIWBNsXFezUpmf0Pjp/owUOmdE+eX7IiPHCqiqyZAzk8NmQTz81UfzA5
+gemdXY1PwXj1ubIM80oLynGmgyWGP4QQJKk2X0o6iLKIkjJzf0VG7kz6pd/MryJC
+esPAdHJ5XkGsOcNDTGxJrVcHii91puRkllIUB/Pa99R6/tDdNpwfsQHbVydhknLt
+lPzQaL04Jx8qglFxS6UGVXThGe809s9KOjCI8jw9+k9u1Aj1XeEtrqXe1bkUbtgP
+UPb0OS9pZbzEEH8ayKQ9mZX/AxCGBSKnkeYn1ywvAgMBAAGjZjBkMB0GA1UdDgQW
+BBTQTJbg+FLm6ZFV0dKdvzzzxEgyRzAfBgNVHSMEGDAWgBQgN6w+MdwLFedzVTyQ
+o/oFcYBa1TASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjANBgkq
+hkiG9w0BAQsFAAOCAgEAQArGH6CD7ouqF8lg3apFkGl2jnutJdRLtCfGt2iwAxZo
+DArpQyYw5OGvbr8J9DTf4jdGFsjDTK4Ir82B6nUWCJuOnf7leuG1CsPLFL9QYhK/
+JJCO3hgqDPJqxsF1wtNMCowTTo71wdOLIUnIiKVULEJ55YHGvUjv9ufDUMhtViEj
+lA0TLjLMk1NQDi8wArZ0uR71yoqsjkQcwqXanmmE/iQU/wJSEtTtlHgXNeHR35Sr
+mSqBinCfIIxab6zGsq8TrnkDlpxCZ+5I70Ly65WAvrmGn4a9mm96F0UpXlllCtg9
+AAC/cIydTZlwLxsM+wgMAVuEPHC6njnubregPvhiVs0Bx2o+IIdZT6vqlheD4GdA
+DB7m9yOV9sS2VSjD7yuH76FtfybJZvm5MEdIatgxqnWSQH+uSjbjiXujagkuaI9L
+Jlsf5hwO9D6VCTl8rgIUecSLDRS9qBAjZBZZ5HHld3c6W8D+mXnIfJuJBh9/1J/w
+/meA58hVGVrJPEfjLADE9FF/PeHj0mRI8E98JZGdQs8WXHjkWe+yPectC+clkvLm
+fH8lINEj7A+2Ji6uduIxBrAXbhpKcdanL6epqNHXY1tw4TqjjYtvggBkjsRJ8QEV
+aeDthXGh/Z8NxXp/SKh1DeKtt0VH0Uy+ouAcZSDPH00wqTZqyX2mS+LaGAZsYGww
+ggS2MIIDnqADAgECAhAMealEsIwRlSCSYV/iax2DMA0GCSqGSIb3DQEBCwUAMGwx
+CzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3
+dy5kaWdpY2VydC5jb20xKzApBgNVBAMTIkRpZ2lDZXJ0IEhpZ2ggQXNzdXJhbmNl
+IEVWIFJvb3QgQ0EwHhcNMTMxMDIyMTIwMDAwWhcNMjgxMDIyMTIwMDAwWjB1MQsw
+CQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cu
+ZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVkIFZh
+bGlkYXRpb24gU2VydmVyIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA11OkBFH4maYWSEtnJ6qTSdA57QywsACH8WcohoWMjmPavLFAOOLT9eylBRi4
+PT7FmRcy7BiM+vEMpmQhhcsHEDSwUogrH2ib0rGPErCz0ueIHx/vOHdUU1+AeT8u
+GqqoHksrDau3Y7k1t30UvFlL31FK0qHiDOKQgodqrurXZNaYVej9rxpQbFS8EfL9
+SvKdu38O9NW+jhaJElXYwHE07vbcLezEhyWGjdgh5LBNDIncOSYX3fbXlIXYBCFw
+nW9v/1y6GeFFy1ZXKH4cDUFXqre4J7ux5Poq7yEjdRqtLZuGNYycd7VzrdiULeTz
+DJ3uwU5ifhfAcZ4s3vH5ECgZMwIDAQABo4IBSTCCAUUwEgYDVR0TAQH/BAgwBgEB
+/wIBADAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF
+BwMCMDQGCCsGAQUFBwEBBCgwJjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGln
+aWNlcnQuY29tMEsGA1UdHwREMEIwQKA+oDyGOmh0dHA6Ly9jcmw0LmRpZ2ljZXJ0
+LmNvbS9EaWdpQ2VydEhpZ2hBc3N1cmFuY2VFVlJvb3RDQS5jcmwwPQYDVR0gBDYw
+NDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNv
+bS9DUFMwHQYDVR0OBBYEFD3TUKXWoK3u80pgCmXTIdT4+NYPMB8GA1UdIwQYMBaA
+FLE+w2kD+L9HAdSYJhoIAu9jZCvDMA0GCSqGSIb3DQEBCwUAA4IBAQCdttCQhuGG
+Au3FoPA0HHTBjXbMhgqo8EqKQtY/yKlNrXwIrea2ULiiGk2IB7EpIdzn2sY8IeDj
+EUlwrHodAaTKETpXq31XKkB0/dMdhRhQ31dHdaF9VSAuRzdQcox/ghvSYo8tA1ra
+w8ihzixSogBj63O6cchJJyOXZIWeOA6tY2g8ulKBWHmjLAzf3m3rMfK6oHxs8SzU
+4b13hDcDzjK1yJqBGkqSTjtGmoX+g6L5noyjzA1esz3PBHiPFBR7MpzHAKZcxLWh
+VY1aVmikInCqPIFx2Z2oRTv05faiUd3He2Lobwx067ja+L+HDXlQkZCbGDuRWSfx
+NSgTqyZ+1fd6MIIElDCCA3ygAwIBAgIQAf2j627KdciIQ4tyS8+8kTANBgkqhkiG
+9w0BAQsFADBhMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkw
+FwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9i
+YWwgUm9vdCBDQTAeFw0xMzAzMDgxMjAwMDBaFw0yMzAzMDgxMjAwMDBaME0xCzAJ
+BgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxJzAlBgNVBAMTHkRpZ2lD
+ZXJ0IFNIQTIgU2VjdXJlIFNlcnZlciBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBANyuWJBNwcQwFZA1W248ghX1LFy949v/cUP6ZCWA1O4Yok3wZtAK
+c24RmDYXZK83nf36QYSvx6+M/hpzTc8zl5CilodTgyu5pnVILR1WN3vaMTIa16yr
+BvSqXUu3R0bdKpPDkC55gIDvEwRqFDu1m5K+wgdlTvza/P96rtxcflUxDOg5B6TX
+vi/TC2rSsd9f/ld0Uzs1gN2ujkSYs58O09rg1/RrKatEp0tYhG2SS4HD2nOLEpdI
+kARFdRrdNzGXkujNVA075ME/OV4uuPNcfhCOhkEAjUVmR7ChZc6gqikJTvOX6+gu
+qw9ypzAO+sf0/RR3w6RbKFfCs/mC/bdFWJsCAwEAAaOCAVowggFWMBIGA1UdEwEB
+/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgGGMDQGCCsGAQUFBwEBBCgwJjAkBggr
+BgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMHsGA1UdHwR0MHIwN6A1
+oDOGMWh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEdsb2JhbFJvb3RD
+QS5jcmwwN6A1oDOGMWh0dHA6Ly9jcmw0LmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEds
+b2JhbFJvb3RDQS5jcmwwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEW
+HGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNvbS9DUFMwHQYDVR0OBBYEFA+AYRyCMWHV
+LyjnjUY4tCzhxtniMB8GA1UdIwQYMBaAFAPeUDVW0Uy7ZvCj4hsbw5eyPdFVMA0G
+CSqGSIb3DQEBCwUAA4IBAQAjPt9L0jFCpbZ+QlwaRMxp0Wi0XUvgBCFsS+JtzLHg
+l4+mUwnNqipl5TlPHoOlblyYoiQm5vuh7ZPHLgLGTUq/sELfeNqzqPlt/yGFUzZg
+THbO7Djc1lGA8MXW5dRNJ2Srm8c+cftIl7gzbckTB+6WohsYFfZcTEDts8Ls/3HB
+40f/1LkAtDdC2iDJ6m6K7hQGrn2iWZiIqBtvLfTyyRRfJs8sjX7tN8Cp1Tm5gr8Z
+DOo0rwAhaPitc+LJMto4JQtV05od8GiG7S5BNO98pVAdvzr508EIDObtHopYJeS4
+d60tbvVS3bR0j6tJLp07kzQoH3jOlOrHvdPJbRzeXDLzMIIEXDCCA0SgAwIBAgIN
+AeOpMBz8cgY4P5pTHTANBgkqhkiG9w0BAQsFADBMMSAwHgYDVQQLExdHbG9iYWxT
+aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMK
+R2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEyMTUwMDAwNDJaMFQxCzAJ
+BgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3QgU2VydmljZXMxJTAjBgNV
+BAMTHEdvb2dsZSBJbnRlcm5ldCBBdXRob3JpdHkgRzMwggEiMA0GCSqGSIb3DQEB
+AQUAA4IBDwAwggEKAoIBAQDKUkvqHv/OJGuo2nIYaNVWXQ5IWi01CXZaz6TIHLGp
+/lOJ+600/4hbn7vn6AAB3DVzdQOts7G5pH0rJnnOFUAK71G4nzKMfHCGUksW/mon
+a+Y2emJQ2N+aicwJKetPKRSIgAuPOB6Aahh8Hb2XO3h9RUk2T0HNouB2VzxoMXlk
+yW7XUR5mw6JkLHnA52XDVoRTWkNty5oCINLvGmnRsJ1zouAqYGVQMc/7sy+/EYhA
+LrVJEA8KbtyX+r8snwU5C1hUrwaW6MWOARa8qBpNQcWTkaIeoYvy/sGIJEmjR0vF
+EwHdp1cSaWIr6/4g72n7OqXwfinu7ZYW97EfoOSQJeAzAgMBAAGjggEzMIIBLzAO
+BgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIG
+A1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFHfCuFCaZ3Z2sS3ChtCDoH6mfrpL
+MB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUGCCsGAQUFBwEBBCkw
+JzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdvb2cvZ3NyMjAyBgNVHR8E
+KzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dzcjIvZ3NyMi5jcmwwPwYD
+VR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly9wa2kuZ29v
+Zy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAHLeJluRT7bvs26gyAZ8s
+o81trUISd7O45skDUmAge1cnxhG1P2cNmSxbWsoiCt2eux9LSD+PAj2LIYRFHW31
+/6xoic1k4tbWXkDCjir37xTTNqRAMPUyFRWSdvt+nlPqwnb8Oa2I/maSJukcxDjN
+SfpDh/Bd1lZNgdd/8cLdsE3+wypufJ9uXO1iQpnh9zbuFIwsIONGl1p3A8CgxkqI
+/UAih3JaGOqcpcdaCIzkBaR9uYQ1X4k2Vg5APRLouzVy7a8IVk6wuy6pm+T7HT4L
+Y8ibS5FEZlfAFLSW8NwsVz9SBK2Vqn1N0PIMn5xA6NZVc7o835DLAFshEWfC7TIe
+3jCCBFMwggI7oAMCAQICAhAAMA0GCSqGSIb3DQEBCwUAMGsxCzAJBgNVBAYTAlVL
+MRAwDgYDVQQIDAdFbmdsYW5kMR8wHQYDVQQKDBZYbWxzZWN1cml0eSBFQ0RTQSBU
+ZXN0MSkwJwYDVQQDDCBYbWxzZWN1cml0eSBJbnRlcm1lZGlhdGUgUm9vdCBDQTAg
+Fw0xODA2MDYxNTIwMjFaGA8yMTE4MDUxMzE1MjAyMVowbzELMAkGA1UEBhMCVUsx
+EDAOBgNVBAgMB0VuZ2xhbmQxHzAdBgNVBAoMFlhtbHNlY3VyaXR5IEVDRFNBIFRl
+c3QxLTArBgNVBAMMJFhtbHNlY3VyaXR5IEVDRFNBIFRlc3QgZXhhbXBsZSBBbGlj
+ZTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABARLFn7pnI5fqVyPKZsn+1aFSgoF
+NxwX30u97S9Ti3v0LkMhzCvJgCMRTRFE5Utzrg1tmNvAO1gl5Cn3VeRv/qWjgcUw
+gcIwCQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBaAwMwYJYIZIAYb4QgENBCYW
+JE9wZW5TU0wgR2VuZXJhdGVkIENsaWVudCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQU
+6iBLx5qDOXkoKU2kRXYBsRuOKEQwHwYDVR0jBBgwFoAU0EyW4PhS5umRVdHSnb88
+88RIMkcwDgYDVR0PAQH/BAQDAgXgMB0GA1UdJQQWMBQGCCsGAQUFBwMCBggrBgEF
+BQcDBDANBgkqhkiG9w0BAQsFAAOCAgEACu+ViKlFl5euwbhuysQro10mplQXhocM
+EpLyN4ZwSkplKbyfQIDahoCU1GSVUr6r5/3oOOjeqHNqeRYpd2hGQbmLaDydTbLO
+7Eb/i9u4VIYKrSKQCz4Q5Z7Hc/8hD+YFuwN8xQdzQRE5tMqHQ2PmEYwYkt0ABbqA
+El0Ae5nII98ejz5b1S7a4wPSr4CLVhSUDBTUSglJxaT5ZTa/rhmUjgOg4cFgE+Qm
+OQuaD2VEy65eCWcjUY7r7ZNP6+JbHVBW8DxiWvBd2YZwh4A4TwxUwRwcOgDMh8Z8
+B2D+xz+We4KQF+hhlA1CyKDcLcJR5OujQX4C2/zhzzmKOA1ilmH8HrJ0iTAf4mOo
+7l2vpRhDR3W3q4l7WsthCJhno/UGKz9F/v8E7fXQC7WnmffXgGzBDdOF+nojZLFn
+JMe62Zd38vydfcl7QPnJS4G+g7XZIg1pn5YlrygCcyCkOIJZ2qdigPm5tDWwweP9
+fDANlfmyVRDPJ1hfQkpgP9tIdgyoYx1AR6SBGXgXNNb1fl3t+sBYt8n4Vb2O/7sN
+9Cvr8zxrxflJ3qK8asp7XSy3cQCUfGyTLsH43u+uv5l9Q/iX1KfXo3KYR4fzv8dZ
+uNjrFunhQIb7HTbtgIDp+jerBSCIWBAhqGvwMEKEcWNj7uig9BHvKG7npeZyzaB5
+/gsM/nofo5UwggUYMIIDAKADAgECAgIQADANBgkqhkiG9w0BAQsFADBpMQswCQYD
+VQQGEwJVSzEQMA4GA1UECAwHRW5nbGFuZDEdMBsGA1UECgwUWG1sc2VjdXJpdHkg
+UlNBIFRlc3QxKTAnBgNVBAMMIFhtbHNlY3VyaXR5IEludGVybWVkaWF0ZSBSb290
+IENBMCAXDTE4MDYwNjE1MjAwNloYDzIxMTgwNTEzMTUyMDA2WjBrMQswCQYDVQQG
+EwJVSzEQMA4GA1UECAwHRW5nbGFuZDEdMBsGA1UECgwUWG1sc2VjdXJpdHkgUlNB
+IFRlc3QxKzApBgNVBAMMIlhtbHNlY3VyaXR5IFJTQSBUZXN0IGV4YW1wbGUgQWxp
+Y2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/jNbYTvv/epCVWXDp
+cJJ2vicKBt4GkzmOXTVBKRRJE0KodEldWdsCySMvT1aCfcZAf8l+CGCNyim7f4Fl
+L1IJ7j+N0Rhsi105mkFAZ1EkU2mfHdx3j9c7+ybbc1219cfMEAzgwjnGNGqpD9ZR
+dTWgipeFCOwSt1hcWV+bvuP5DnKJFQtoEObkXUE/Ehb3a8FfXnH+2sBTEkKmjL5J
+Bg46NRv1cA7gTTbh9JrYAEmGRnt4fjkV3Njc2phzPryoOYZudb9CWE6HUIyhw7BI
+oc/OlvFypoykuz4ciTviVh7bAKS/OMugbX9fz4CRljilDw3LIIKMtFR5ohWRPBcr
+rfo7AgMBAAGjgcUwgcIwCQYDVR0TBAIwADARBglghkgBhvhCAQEEBAMCBaAwMwYJ
+YIZIAYb4QgENBCYWJE9wZW5TU0wgR2VuZXJhdGVkIENsaWVudCBDZXJ0aWZpY2F0
+ZTAdBgNVHQ4EFgQUoMyXNKeDde/7MDve+sSR2rKd10QwHwYDVR0jBBgwFoAUNcHy
+DfjtNQ8y8I1dMFJFClVG+ugwDgYDVR0PAQH/BAQDAgXgMB0GA1UdJQQWMBQGCCsG
+AQUFBwMCBggrBgEFBQcDBDANBgkqhkiG9w0BAQsFAAOCAgEAIxT1eA8eDG44lGUp
+OroRAqFAzhrX11s5OlAJPdXtjE4OrSQ4105eNbsARsrgEuEdvTR+KGzsRO90iHYd
+3DXUVr1QrcDb0lExbQk5fXMqaKdyXta+DUMdbEl1F7j8kKwr73y7zthziKnY8Ehd
+DOmUUjGf7AbYyZIaizgqWBjHMOgDhaq9t+vW15SJfNF9P5h+xNFZO1xqkad6ATvd
+vQ6NjHKjps6kU08AUpRk2L+Tx4sRu03zCMFdgqMhjdvDSDjDl38FCvNwCTCik1U5
+NhqIwjsXBhmkm9NZ/5UDXBLnTiPiWCFzF4+bWzeahLN1ky1roiFX9AOwP2z1Px2G
+V7VhC//f2nDvKPHNswcGLHoXsyg0hYJyGA+Hnvl2g8StD3Lk2DZzbjbC99BDPMKL
+g2s4w7Hpz7fLjKe8k6w6GrSOoyCDCK4oBL3ZY0g/rMR+ZybhW0K0bo+h3y9s6292
+Btsk24EacgGNx8XPZe5BEmX1n8rELCpcYxLvzo4yNMIptL9dlofC87Cskej2KC9D
+nTYM/7YbDOdmqAAhyHG1ZnEzMgjfpA9Wl2dO6Mb+QJTBSq+61Xee6ylyKhaeL3L5
+61M3frsI2irETwU0HSZTgl5zGFQs/VTMMwE+5wLyoo+JgIQo38J9fp3gpmNlqoVs
+w1sPLs4AeXm5/0jhMUx3ZMCdE8YwggWyMIIDmqADAgECAgkAlxa9qhMuSpowDQYJ
+KoZIhvcNAQELBQAwZTELMAkGA1UEBhMCVUsxEDAOBgNVBAgMB0VuZ2xhbmQxHTAb
+BgNVBAoMFFhtbHNlY3VyaXR5IFJTQSBUZXN0MSUwIwYDVQQDDBxYbWxzZWN1cml0
+eSBSU0EgVGVzdCBSb290IENBMCAXDTE4MDYwNjE1MjAwNFoYDzIxMTgwNTEzMTUy
+MDA0WjBlMQswCQYDVQQGEwJVSzEQMA4GA1UECAwHRW5nbGFuZDEdMBsGA1UECgwU
+WG1sc2VjdXJpdHkgUlNBIFRlc3QxJTAjBgNVBAMMHFhtbHNlY3VyaXR5IFJTQSBU
+ZXN0IFJvb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC+iaaD
+NjD39bYz7vlqzWlXpRnxav6GmJyLROygf8odZgtaZL2LwgDVh/oFjchIC4q8N+pN
+aDKgMV4nJNXM01QeVh/piashiAbQNvauehyKFwwwW5WddETBtCCKBZj3eII2LYqm
+gY5YHrdm6nJ8xN7KPsW69i3gCW0ntDSj5EhEbHrVp4/aCgaLH2jWOSME3pOffBDd
+4mChrQJI+R9p5j7BU755QSVgTfkXCY9ZHrwCcXuGD9JLVEQ1JDhmpUDUYrZ8pqRf
+p7vOSokJvpm5DadfkY0lYUVKUFclatWqkFm94osx8ZBqRlSzDPcVE9c3SpQrjS8p
+duURK43fk8depV9IA8RDqIYolTtULe5M90LIHO3AlsgCz5Gr13FvrJm/rxcKEaF5
+7dVbT9p78amuQcSd48GTyluRKpLTnZn3Lfo2eNHBlFWdGZCPDpdLWHZzpx1GxX3H
+YXCaWUBCHPpXatm7851L2IIbcITjmcOeBiDhWcPDin2OcJ5roxhU8G09T1/Y2Oci
+cjFQZGJ1fY3arXL1SI85TzuaWiXJABJX5K3HAeSbslrrD4xF/CBTb+g4uVzcykzL
+jityxECWFsngJZdHATD7EmgdvdbSX6LLjvoy18xofBpET/Gw+b4xeBcyP55sTn1x
+4LoYlLo4DmfnkpHrnOmZCwziffLMmtT2EzEMowIDAQABo2MwYTAdBgNVHQ4EFgQU
+46qCA78jo+QjIlmonXqZsNu2JfEwHwYDVR0jBBgwFoAU46qCA78jo+QjIlmonXqZ
+sNu2JfEwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcN
+AQELBQADggIBACRuAgJickA2ogZ+3/RyGDW5Kbp5kyuXSR8AJkoWkvwo6GPsLrpw
+h6yR/tZwlsdA5bcICDQ5mmRL2eG8/E7KxBuVL6xDCj11aI3s0BOiRPHJJgYV2sQ1
+dJR0Yj0wwWyLODyo3TsS1vKept0nAU0NqiYnPSZRdiXG0JHiBMaitaYvwTMkg33w
+te4wObmCiZ3lFMKCpzWEFP4OrQTdZqmdRWUwWvUpLx7H9Ep9UFDmAlEnXRkhqxpV
+2kKXeAYV3wwAzKqplc7KW07VFFNNdjO3nQbVSYAR3ZIMfoAOqPxPTgjRSKumxDtv
+gZqwmiZZAG4K/2NjrmsA593uZYfhEOZWfY/hcJVnr76gKavYIwRF+hGxUi3fGDHk
+665Xgx0BxUHDosyRDPolGn3aQQY8wT3HXCcNFyeSznzOcK+ixlETAtj+y1arZ4ts
+4pnl0ImqILjEZxrmXTAkRO51TlYt0iA8NQVDa1Ne64Fy2N3OHz4XJzo3aoynf5Ta
+bakQCsh3/prFpCGMYkQMkxXonTdaJnyX/0aMiVfYdAZupG8cAvuRQSQ/i1k5SLAY
+ai1qQW8kmJVYPKdWmEvyBNqZHWVpNiG3SZka1nklMxzCkTfv7Z2Ix8DL+GqM5cNz
+I0DDfG0sOVfqLlcraumu7wZpY+KRGSBN9EF1ZZ9GOX7SwTn57U3yYd0xMIIFujCC
+A6KgAwIBAgIJAMtBg6xEFRDTMA0GCSqGSIb3DQEBCwUAMGkxCzAJBgNVBAYTAlVL
+MRAwDgYDVQQIDAdFbmdsYW5kMR8wHQYDVQQKDBZYbWxzZWN1cml0eSBFQ0RTQSBU
+ZXN0MScwJQYDVQQDDB5YbWxzZWN1cml0eSBFQ0RTQSBUZXN0IFJvb3QgQ0EwIBcN
+MTgwNjA2MTUyMDIxWhgPMjExODA1MTMxNTIwMjFaMGkxCzAJBgNVBAYTAlVLMRAw
+DgYDVQQIDAdFbmdsYW5kMR8wHQYDVQQKDBZYbWxzZWN1cml0eSBFQ0RTQSBUZXN0
+MScwJQYDVQQDDB5YbWxzZWN1cml0eSBFQ0RTQSBUZXN0IFJvb3QgQ0EwggIiMA0G
+CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCjKXY/LOLDioXDCWBi3GLP29BMDoYx
+J0tkL9Pdir7mBACxRshI9K/eHfzzBURDWycUfW9jU9xPtt2NfJFB3TfUjet4uHkr
+f2K9oZW9QxloVvBSAMPR5393o/cSrcijJ1BA77hilZJQ75t8xOgqBu5uxLfR3yS2
+GHnZAqckavR9y7oQEbmf/b1b+Fa1WWz21RuT82E02M0Ew2/NpvrP7dpkgovyvLPz
+J/pDrdTWOzzYmvNxuKRnHsaDdBSPvgsGmokbZr5GevK5CUYhSumpcD+orZVelFxI
+Fv+KAMAZGlIyyW6Ipv5fs4fGORLJy0h1z2SYzNz41bqnWZsDCruZmEI4RCZkCfq2
+7gEoPQVRjP+RsgpZmnuI2Deyw33Uh/pLtUYf3bjOPnKRThRqzDl7JC27sRhgdUDM
+2KLOPC7IVMG+u94ejOvzSJ5zVdujNvki5OEscN4xPWUDYj/y3QOnDp8MarCd7al4
+P+Dk3niNnkFMLFSl+gbbLjDNcrabtVqCnd/dmgjwiU9k80oNa0jKx7pdKPqPvxKM
+e5xffmkDp9XFdKl7qeDprk5KQ9PtCO00JTVQGhyxapmMuUsJgezpGQSqF5wAKrNm
+dcdHWtFeZDq1IoLMQUS9uMCzzHV5tAfFDX/GnAz2xnPq88RW7nt9LFjzWA8ZsTYf
+/LPjaO+tYim8wQIDAQABo2MwYTAdBgNVHQ4EFgQUIDesPjHcCxXnc1U8kKP6BXGA
+WtUwHwYDVR0jBBgwFoAUIDesPjHcCxXnc1U8kKP6BXGAWtUwDwYDVR0TAQH/BAUw
+AwEB/zAOBgNVHQ8BAf8EBAMCAYYwDQYJKoZIhvcNAQELBQADggIBAByhIRpqnRqr
+z/NrI2+LsQawI5PYFyyA8QDxHJveId8DX7OIJDqoXxdl0pqhPSli+2f1ZaLzfTfY
+av1BT2+ALcVY1DDz4RHSUg1YLk6n+1IPeq4hSAf7JVa13tA8tyK7ghjZMCIzX08Z
+Ux9Wz5FlnGSC/jFg2qRjjlZyHQB4N9mLtPp83OEuQBuFJ2LMd6dHcDDpERjrRGpH
+tLFxYnLKgT745h0A/k/HjZLKs46xJBO1y8ZruOoNKklsTkiysGImhRW4KnLJ5iSS
+/V6vzfaCGcDxSSYlbIT1twEN1lRcCuPlPmm7LgV/X12lACg+UR12/dcJnCe94x4E
+QaydT0wsAzT5WSNh69UOrRp0sDJrKtehhQ+7oGeIqTYQNpnmvA3L3MssRvcyw9wB
+ZUdAAw0Jr3jsgy0wZuYIFSbEUWzTlyhkL2Rhp9zzq4f0AW61m+yDb8QXkPnWJPln
+NrKqKYGTfzQNcMSIkcLiDnAmsBeZOze+iXpnuzZSWqlkPQfGhlFRkJ4jm63H15cX
+Hz2OE7zr/HoMJCxXXUbFVIyHDL2i9GbShHr+DVIM9OgBJ6UEPNEN2RZo4vncNCnQ
+zRZe4H1bvaGnh0SUKoLiE2Jy93LBUKrSygHLOtweerXL2dtHad2qi+SQjWXjYBUr
+Y3U3LDo+kQfo7hfVZ/HdrhK7ldhXbz7nMQA=
+-----END PKCS7-----
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index e4d449f826b4..96d233ad9027 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -14,6 +14,10 @@
#include <cstdlib>
+#ifndef _WIN32
+#include <secoid.h>
+#endif
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <test/xmltesttools.hxx>
@@ -24,6 +28,7 @@
#include <com/sun/star/embed/XTransactedObject.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XStorable.hpp>
+#include <com/sun/star/security/CertificateValidity.hpp>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
#include <com/sun/star/security/XDocumentDigitalSignatures.hpp>
#include <com/sun/star/xml/crypto/SEInitializer.hpp>
@@ -45,6 +50,7 @@
#include <documentsignaturehelper.hxx>
#include <xmlsignaturehelper.hxx>
#include <documentsignaturemanager.hxx>
+#include <biginteger.hxx>
#include <certificate.hxx>
#include <xsecctl.hxx>
#include <sfx2/docfile.hxx>
@@ -101,9 +107,10 @@ void SigningTest::setUp()
OUString aTargetDir
= m_directories.getURLFromWorkdir("CppunitTest/xmlsecurity_signing.test.user");
- // Set up cert8.db in workdir/CppunitTest/
- osl::File::copy(aSourceDir + "cert8.db", aTargetDir + "/cert8.db");
- osl::File::copy(aSourceDir + "key3.db", aTargetDir + "/key3.db");
+ // Set up NSS database in workdir/CppunitTest/
+ osl::File::copy(aSourceDir + "cert9.db", aTargetDir + "/cert9.db");
+ osl::File::copy(aSourceDir + "key4.db", aTargetDir + "/key4.db");
+ osl::File::copy(aSourceDir + "pkcs11.txt", aTargetDir + "/pkcs11.txt");
// Make gpg use our own defined setup & keys
osl::File::copy(aSourceDir + "pubring.gpg", aTargetDir + "/pubring.gpg");
@@ -114,8 +121,15 @@ void SigningTest::setUp()
OUString aTargetPath;
osl::FileBase::getSystemPathFromFileURL(aTargetDir, aTargetPath);
+#ifdef _WIN32
+ // CryptoAPI test certificates
+ osl::File::copy(aSourceDir + "test.p7b", aTargetDir + "/test.p7b");
+ OUString caVar("LIBO_TEST_CRYPTOAPI_PKCS7");
+ osl_setEnvironment(caVar.pData, aTargetPath.pData);
+#else
OUString mozCertVar("MOZILLA_CERTIFICATE_FOLDER");
osl_setEnvironment(mozCertVar.pData, aTargetPath.pData);
+#endif
OUString gpgHomeVar("GNUPGHOME");
osl_setEnvironment(gpgHomeVar.pData, aTargetPath.pData);
@@ -144,6 +158,13 @@ void SigningTest::setUp()
mxDesktop.set(frame::Desktop::create(mxComponentContext));
mxSEInitializer = xml::crypto::SEInitializer::create(mxComponentContext);
mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
+#ifndef _WIN32
+#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+ // policy may disallow using SHA1 for signatures but unit test documents
+ // have such existing signatures (call this after createSecurityContext!)
+ NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0);
+#endif
+#endif
}
void SigningTest::tearDown()
@@ -558,6 +579,149 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testODFNo)
static_cast<int>(pObjectShell->GetDocumentSignatureState()));
}
+// document has one signed timestamp and one unsigned timestamp
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFUnsignedTimestamp)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "02_doc_signed_by_trusted_person_manipulated.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetDocumentSignatureState();
+ CPPUNIT_ASSERT_MESSAGE(
+ (OString::number(o3tl::underlyingEnumValue(nActual)).getStr()),
+ (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK));
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(false));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ // was: 66666666
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(20210126), infos[0].SignatureDate);
+ // was: 0
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(18183742), infos[0].SignatureTime);
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFX509CertificateChain)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "signed_with_x509certificate_chain.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetDocumentSignatureState();
+ CPPUNIT_ASSERT_MESSAGE(
+ (OString::number(o3tl::underlyingEnumValue(nActual)).getStr()),
+ (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK));
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(false));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ // check that the signing certificate was picked, not one of the 2 CA ones
+ CPPUNIT_ASSERT_EQUAL(security::CertificateValidity::VALID, infos[0].CertificateStatus);
+ CPPUNIT_ASSERT(infos[0].Signer.is());
+ CPPUNIT_ASSERT_EQUAL(
+ OUString("CN=Xmlsecurity RSA Test example Alice,O=Xmlsecurity RSA Test,ST=England,C=UK"),
+ // CryptoAPI puts a space after comma, NSS does not...
+ infos[0].Signer->getSubjectName().replaceAll(", ", ","));
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFDoubleX509Data)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "02_doc_signed_by_attacker_manipulated.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetDocumentSignatureState();
+ CPPUNIT_ASSERT_MESSAGE(
+ (OString::number(o3tl::underlyingEnumValue(nActual)).getStr()),
+ (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK));
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(false));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ CPPUNIT_ASSERT_EQUAL(security::CertificateValidity::INVALID, infos[0].CertificateStatus);
+ CPPUNIT_ASSERT(!infos[0].Signer.is());
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFTripleX509Data)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "02_doc_signed_by_attacker_manipulated_triple.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetDocumentSignatureState();
+ // here, libxmlsec will pick the 1st X509Data but signing key is the 2nd
+ CPPUNIT_ASSERT_EQUAL_MESSAGE((OString::number(o3tl::underlyingEnumValue(nActual)).getStr()),
+ SignatureState::BROKEN, nActual);
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(false));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ CPPUNIT_ASSERT_EQUAL(security::CertificateValidity::INVALID, infos[0].CertificateStatus);
+ CPPUNIT_ASSERT(!infos[0].Signer.is());
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFMacroDoubleX509Data)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "02_doc_macros_signed_by_attacker_manipulated.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetScriptingSignatureState();
+ CPPUNIT_ASSERT_MESSAGE(
+ (OString::number(o3tl::underlyingEnumValue(nActual)).getStr()),
+ (nActual == SignatureState::NOTVALIDATED || nActual == SignatureState::OK));
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(true));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ CPPUNIT_ASSERT_EQUAL(security::CertificateValidity::INVALID, infos[0].CertificateStatus);
+ CPPUNIT_ASSERT(!infos[0].Signer.is());
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testODFDoubleX509Certificate)
+{
+ createDoc(m_directories.getURLFromSrc(DATA_DIRECTORY)
+ + "02_doc_signed_by_attacker_manipulated2.odt");
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ SignatureState nActual = pObjectShell->GetDocumentSignatureState();
+ bool const nTemp((nActual == SignatureState::NOTVALIDATED
+ || nActual == SignatureState::OK
+#if defined(_WIN32)
+ // oddly BCryptVerifySignature returns STATUS_INVALID_SIGNATURE
+ // while the same succeeds with NSS _SGN_VerifyPKCS1DigestInfo
+ || nActual == SignatureState::BROKEN
+#endif
+ ));
+ CPPUNIT_ASSERT_MESSAGE((OString::number(o3tl::underlyingEnumValue(nActual)).getStr()), nTemp);
+ uno::Sequence<security::DocumentSignatureInformation> const infos(
+ pObjectShell->GetDocumentSignatureInformation(false));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), infos.getLength());
+ CPPUNIT_ASSERT_EQUAL(security::CertificateValidity::INVALID, infos[0].CertificateStatus);
+ CPPUNIT_ASSERT(!infos[0].Signer.is());
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testDNCompatibility)
+{
+ OUString const msDN("CN=\"\"\"ABC\"\".\", O=\"Enterprise \"\"ABC\"\"\"");
+ OUString const nssDN("CN=\\\"ABC\\\".,O=Enterprise \\\"ABC\\\"");
+ // this is just the status quo, possibly either NSS or CryptoAPI might change
+ CPPUNIT_ASSERT(!xmlsecurity::EqualDistinguishedNames(msDN, nssDN, xmlsecurity::NOCOMPAT));
+ CPPUNIT_ASSERT(!xmlsecurity::EqualDistinguishedNames(nssDN, msDN, xmlsecurity::NOCOMPAT));
+ // with compat flag it should work, with the string one 2nd and the native one 1st
+#ifdef _WIN32
+ CPPUNIT_ASSERT(xmlsecurity::EqualDistinguishedNames(msDN, nssDN, xmlsecurity::COMPAT_2ND));
+#else
+ CPPUNIT_ASSERT(xmlsecurity::EqualDistinguishedNames(nssDN, msDN, xmlsecurity::COMPAT_2ND));
+#endif
+}
+
/// Test a typical OOXML where a number of (but not all) streams are signed.
CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLPartial)
{
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index dcfaad0af773..19ceffcd84cf 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -500,85 +500,93 @@ DocumentDigitalSignatures::ImplVerifySignatures(
Sequence< css::security::DocumentSignatureInformation > aInfos(nInfos);
css::security::DocumentSignatureInformation* arInfos = aInfos.getArray();
- if ( nInfos )
+ for (int n = 0; n < nInfos; ++n)
{
- for( int n = 0; n < nInfos; ++n )
- {
- DocumentSignatureAlgorithm mode = DocumentSignatureHelper::getDocumentAlgorithm(
- m_sODFVersion, aSignInfos[n]);
- const std::vector< OUString > aElementsToBeVerified =
- DocumentSignatureHelper::CreateElementList(
- rxStorage, eMode, mode);
+ DocumentSignatureAlgorithm mode
+ = DocumentSignatureHelper::getDocumentAlgorithm(m_sODFVersion, aSignInfos[n]);
+ const std::vector<OUString> aElementsToBeVerified
+ = DocumentSignatureHelper::CreateElementList(rxStorage, eMode, mode);
- const SignatureInformation& rInfo = aSignInfos[n];
- css::security::DocumentSignatureInformation& rSigInfo = arInfos[n];
+ const SignatureInformation& rInfo = aSignInfos[n];
+ css::security::DocumentSignatureInformation& rSigInfo = arInfos[n];
- if (rInfo.ouGpgCertificate.isEmpty()) // X.509
+ if (!rInfo.X509Datas.empty()) // X.509
+ {
+ std::vector<uno::Reference<XCertificate>> certs(
+ rSignatureHelper.CheckAndUpdateSignatureInformation(
+ xSecEnv, rInfo));
+ if (certs.empty())
{
- if (!rInfo.ouX509Certificate.isEmpty())
- rSigInfo.Signer = xSecEnv->createCertificateFromAscii( rInfo.ouX509Certificate ) ;
- if (!rSigInfo.Signer.is())
- rSigInfo.Signer = xSecEnv->getCertificate( rInfo.ouX509IssuerName,
- xmlsecurity::numericStringToBigInteger( rInfo.ouX509SerialNumber ) );
-
- // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name)
- // to find the parent certificate. It does not take into account that there can be several certificates
- // with the same subject name.
-
- try {
- rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(rSigInfo.Signer,
- Sequence<Reference<css::security::XCertificate> >());
- } catch (SecurityException& ) {
- OSL_FAIL("Verification of certificate failed");
- rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
- }
+ rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
}
- else if (xGpgSecEnv.is()) // GPG
+ else
{
- // TODO not ideal to retrieve cert by keyID, might
- // collide, or PGPKeyID format might change - can't we
- // keep the xCert itself in rInfo?
- rSigInfo.Signer = xGpgSecEnv->getCertificate( rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger("") );
- rSigInfo.CertificateStatus = xGpgSecEnv->verifyCertificate(rSigInfo.Signer,
- Sequence<Reference<css::security::XCertificate> >());
+ rSigInfo.Signer = certs.back();
+ // get only intermediates
+ certs.pop_back();
+ // On Windows checking the certificate path is buggy. It does name matching (issuer, subject name)
+ // to find the parent certificate. It does not take into account that there can be several certificates
+ // with the same subject name.
+ try
+ {
+ rSigInfo.CertificateStatus = xSecEnv->verifyCertificate(
+ rSigInfo.Signer, comphelper::containerToSequence(certs));
+ }
+ catch (SecurityException&)
+ {
+ SAL_WARN("xmlsecurity.comp", "Verification of certificate failed");
+ rSigInfo.CertificateStatus = css::security::CertificateValidity::INVALID;
+ }
}
+ }
+ else if (!rInfo.ouGpgCertificate.isEmpty() && xGpgSecEnv.is()) // GPG
+ {
+ // TODO not ideal to retrieve cert by keyID, might
+ // collide, or PGPKeyID format might change - can't we
+ // keep the xCert itself in rInfo?
+ rSigInfo.Signer = xGpgSecEnv->getCertificate(
+ rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger(""));
+ rSigInfo.CertificateStatus = xGpgSecEnv->verifyCertificate(
+ rSigInfo.Signer, Sequence<Reference<css::security::XCertificate>>());
+ }
- // Time support again (#i38744#)
- Date aDate( rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year );
- tools::Time aTime( rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
- rInfo.stDateTime.Seconds, rInfo.stDateTime.NanoSeconds );
- rSigInfo.SignatureDate = aDate.GetDate();
- rSigInfo.SignatureTime = aTime.GetTime() / tools::Time::nanoPerCenti;
+ // Time support again (#i38744#)
+ Date aDate(rInfo.stDateTime.Day, rInfo.stDateTime.Month, rInfo.stDateTime.Year);
+ tools::Time aTime(rInfo.stDateTime.Hours, rInfo.stDateTime.Minutes,
+ rInfo.stDateTime.Seconds, rInfo.stDateTime.NanoSeconds);
+ rSigInfo.SignatureDate = aDate.GetDate();
+ rSigInfo.SignatureTime = aTime.GetTime() / tools::Time::nanoPerCenti;
- rSigInfo.SignatureIsValid = ( rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED );
+ rSigInfo.SignatureIsValid
+ = (rInfo.nStatus == css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED);
- // Signature line info (ID + Images)
- if (!rInfo.ouSignatureLineId.isEmpty())
- rSigInfo.SignatureLineId = rInfo.ouSignatureLineId;
+ // Signature line info (ID + Images)
+ if (!rInfo.ouSignatureLineId.isEmpty())
+ rSigInfo.SignatureLineId = rInfo.ouSignatureLineId;
- if (rInfo.aValidSignatureImage.is())
- rSigInfo.ValidSignatureLineImage = rInfo.aValidSignatureImage;
+ if (rInfo.aValidSignatureImage.is())
+ rSigInfo.ValidSignatureLineImage = rInfo.aValidSignatureImage;
- if (rInfo.aInvalidSignatureImage.is())
- rSigInfo.InvalidSignatureLineImage = rInfo.aInvalidSignatureImage;
-
- // OOXML intentionally doesn't sign metadata.
- if ( rSigInfo.SignatureIsValid && aStreamHelper.nStorageFormat != embed::StorageFormats::OFOPXML)
- {
- rSigInfo.SignatureIsValid =
- DocumentSignatureHelper::checkIfAllFilesAreSigned(
- aElementsToBeVerified, rInfo, mode);
- }
- if (eMode == DocumentSignatureMode::Content)
- {
- if (aStreamHelper.nStorageFormat == embed::StorageFormats::OFOPXML)
- rSigInfo.PartialDocumentSignature = true;
- else
- rSigInfo.PartialDocumentSignature = !DocumentSignatureHelper::isOOo3_2_Signature(aSignInfos[n]);
- }
+ if (rInfo.aInvalidSignatureImage.is())
+ rSigInfo.InvalidSignatureLineImage = rInfo.aInvalidSignatureImage;
+ // OOXML intentionally doesn't sign metadata.
+ if (rSigInfo.SignatureIsValid
+ && aStreamHelper.nStorageFormat != embed::StorageFormats::OFOPXML)
+ {
+ rSigInfo.SignatureIsValid = DocumentSignatureHelper::checkIfAllFilesAreSigned(
+ aElementsToBeVerified, rInfo, mode);
+ }
+ if (eMode == DocumentSignatureMode::Content)
+ {
+ if (aStreamHelper.nStorageFormat == embed::StorageFormats::OFOPXML)
+ rSigInfo.PartialDocumentSignature = true;
+ else
+ rSigInfo.PartialDocumentSignature
+ = !DocumentSignatureHelper::isOOo3_2_Signature(aSignInfos[n]);
}
}
+
return aInfos;
}
@@ -617,16 +625,29 @@ void DocumentDigitalSignatures::showCertificate(
}
sal_Bool DocumentDigitalSignatures::isAuthorTrusted(
- const Reference< css::security::XCertificate >& Author )
+ const Reference<css::security::XCertificate>& xAuthor)
{
- OUString sSerialNum = xmlsecurity::bigIntegerToNumericString( Author->getSerialNumber() );
+ if (!xAuthor.is())
+ {
+ return false;
+ }
+ OUString sSerialNum = xmlsecurity::bigIntegerToNumericString(xAuthor->getSerialNumber());
Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors();
return std::any_of(aTrustedAuthors.begin(), aTrustedAuthors.end(),
- [&Author, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) {
- return ( rAuthor[0] == Author->getIssuerName() )
- && ( rAuthor[1] == sSerialNum );
+ [this, &xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) {
+ if (!xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName(), xmlsecurity::NOCOMPAT))
+ return false;
+ if (rAuthor[1] != sSerialNum)
+ return false;
+
+ DocumentSignatureManager aSignatureManager(mxCtx, {});
+ if (!aSignatureManager.init())
+ return false;
+ uno::Reference<css::security::XCertificate> xCert =
+ aSignatureManager.getSecurityEnvironment()->createCertificateFromAscii(rAuthor[2]);
+ return xCert->getSHA1Thumbprint() == xAuthor->getSHA1Thumbprint();
});
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index ef67c7167c04..18ccaf2d2166 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -588,7 +588,7 @@ void DigitalSignaturesDialog::ImplFillSignaturesBox()
if (!rInfo.ouGpgCertificate.isEmpty())
aType = "OpenPGP";
// XML based: XAdES or not.
- else if (!rInfo.ouCertDigest.isEmpty())
+ else if (rInfo.GetSigningCertificate() && !rInfo.GetSigningCertificate()->CertDigest.isEmpty())
aType = "XAdES";
else
aType = "XML-DSig";
@@ -700,8 +700,8 @@ uno::Reference<security::XCertificate> DigitalSignaturesDialog::getCertificate(c
uno::Reference<security::XCertificate> xCert;
//First we try to get the certificate which is embedded in the XML Signature
- if (xSecEnv.is() && !rInfo.ouX509Certificate.isEmpty())
- xCert = xSecEnv->createCertificateFromAscii(rInfo.ouX509Certificate);
+ if (xSecEnv.is() && rInfo.GetSigningCertificate() && !rInfo.GetSigningCertificate()->X509Certificate.isEmpty())
+ xCert = xSecEnv->createCertificateFromAscii(rInfo.GetSigningCertificate()->X509Certificate);
else {
//There must be an embedded certificate because we use it to get the
//issuer name. We cannot use /Signature/KeyInfo/X509Data/X509IssuerName
@@ -713,9 +713,12 @@ uno::Reference<security::XCertificate> DigitalSignaturesDialog::getCertificate(c
}
//In case there is no embedded certificate we try to get it from a local store
- if (!xCert.is() && xSecEnv.is())
- xCert = xSecEnv->getCertificate( rInfo.ouX509IssuerName, xmlsecurity::numericStringToBigInteger( rInfo.ouX509SerialNumber ) );
- if (!xCert.is() && xGpgSecEnv.is())
+ if (!xCert.is() && xSecEnv.is() && rInfo.GetSigningCertificate())
+ {
+ xCert = xSecEnv->getCertificate(rInfo.GetSigningCertificate()->X509IssuerName,
+ xmlsecurity::numericStringToBigInteger(rInfo.GetSigningCertificate()->X509SerialNumber));
+ }
+ if (!xCert.is() && xGpgSecEnv.is() && !rInfo.ouGpgKeyID.isEmpty())
xCert = xGpgSecEnv->getCertificate( rInfo.ouGpgKeyID, xmlsecurity::numericStringToBigInteger("") );
SAL_WARN_IF( !xCert.is(), "xmlsecurity.dialogs", "Certificate not found and can't be created!" );
diff --git a/xmlsecurity/source/gpg/SEInitializer.cxx b/xmlsecurity/source/gpg/SEInitializer.cxx
index cb502e8c9793..2531a827c64c 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 c815e0e1f5d2..5ed662afa5cc 100644
--- a/xmlsecurity/source/gpg/SecurityEnvironment.hxx
+++ b/xmlsecurity/source/gpg/SecurityEnvironment.hxx
@@ -11,6 +11,9 @@
#define INCLUDED_XMLSECURITY_SOURCE_GPG_SECURITYENVIRONMENT_HXX
#include <sal/config.h>
+
+#include <memory>
+
#include <rtl/ustring.hxx>
#include <cppuhelper/implbase.hxx>
@@ -18,6 +21,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/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index 482ae6cc4126..ddff308ee52f 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -492,6 +492,29 @@ void DocumentSignatureHelper::writeDigestMethod(
xDocumentHandler->endElement("DigestMethod");
}
+static void WriteXadesCert(
+ uno::Reference<xml::sax::XDocumentHandler> const& xDocumentHandler,
+ SignatureInformation::X509CertInfo const& rCertInfo)
+{
+ xDocumentHandler->startElement("xd:Cert", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ xDocumentHandler->startElement("xd:CertDigest", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ DocumentSignatureHelper::writeDigestMethod(xDocumentHandler);
+ xDocumentHandler->startElement("DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ assert(!rCertInfo.CertDigest.isEmpty());
+ xDocumentHandler->characters(rCertInfo.CertDigest);
+ xDocumentHandler->endElement("DigestValue");
+ xDocumentHandler->endElement("xd:CertDigest");
+ xDocumentHandler->startElement("xd:IssuerSerial", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ xDocumentHandler->startElement("X509IssuerName", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ xDocumentHandler->characters(rCertInfo.X509IssuerName);
+ xDocumentHandler->endElement("X509IssuerName");
+ xDocumentHandler->startElement("X509SerialNumber", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ xDocumentHandler->characters(rCertInfo.X509SerialNumber);
+ xDocumentHandler->endElement("X509SerialNumber");
+ xDocumentHandler->endElement("xd:IssuerSerial");
+ xDocumentHandler->endElement("xd:Cert");
+}
+
void DocumentSignatureHelper::writeSignedProperties(
const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler,
const SignatureInformation& signatureInfo,
@@ -508,26 +531,26 @@ void DocumentSignatureHelper::writeSignedProperties(
xDocumentHandler->characters(sDate);
xDocumentHandler->endElement("xd:SigningTime");
xDocumentHandler->startElement("xd:SigningCertificate", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- xDocumentHandler->startElement("xd:Cert", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- xDocumentHandler->startElement("xd:CertDigest", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- writeDigestMethod(xDocumentHandler);
-
- xDocumentHandler->startElement("DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- // TODO: this is empty for gpg signatures currently
- //assert(!signatureInfo.ouCertDigest.isEmpty());
- xDocumentHandler->characters(signatureInfo.ouCertDigest);
- xDocumentHandler->endElement("DigestValue");
-
- xDocumentHandler->endElement("xd:CertDigest");
- xDocumentHandler->startElement("xd:IssuerSerial", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- xDocumentHandler->startElement("X509IssuerName", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- xDocumentHandler->characters(signatureInfo.ouX509IssuerName);
- xDocumentHandler->endElement("X509IssuerName");
- xDocumentHandler->startElement("X509SerialNumber", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- xDocumentHandler->characters(signatureInfo.ouX509SerialNumber);
- xDocumentHandler->endElement("X509SerialNumber");
- xDocumentHandler->endElement("xd:IssuerSerial");
- xDocumentHandler->endElement("xd:Cert");
+ assert(signatureInfo.GetSigningCertificate() || !signatureInfo.ouGpgKeyID.isEmpty());
+ if (signatureInfo.GetSigningCertificate())
+ {
+ // how should this deal with multiple X509Data elements?
+ // for now, let's write all of the certificates ...
+ for (auto const& rData : signatureInfo.X509Datas)
+ {
+ for (auto const& it : rData)
+ {
+ WriteXadesCert(xDocumentHandler, it);
+ }
+ }
+ }
+ else
+ {
+ // for PGP, write empty mandatory X509IssuerName, X509SerialNumber
+ SignatureInformation::X509CertInfo temp;
+ temp.CertDigest = signatureInfo.ouGpgKeyID;
+ WriteXadesCert(xDocumentHandler, temp);
+ }
xDocumentHandler->endElement("xd:SigningCertificate");
xDocumentHandler->startElement("xd:SignaturePolicyIdentifier", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
xDocumentHandler->startElement("xd:SignaturePolicyImplied", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
diff --git a/xmlsecurity/source/helper/documentsignaturemanager.cxx b/xmlsecurity/source/helper/documentsignaturemanager.cxx
index a0e674c3bd1b..aa08dc5c499e 100644
--- a/xmlsecurity/source/helper/documentsignaturemanager.cxx
+++ b/xmlsecurity/source/helper/documentsignaturemanager.cxx
@@ -585,6 +585,18 @@ void DocumentSignatureManager::read(bool bUseTempStream, bool bCacheLastSignatur
bCacheLastSignature);
maSignatureHelper.EndMission();
+ // this parses the XML independently from ImplVerifySignatures() - check
+ // certificates here too ...
+ for (auto const& it : maSignatureHelper.GetSignatureInformations())
+ {
+ if (!it.X509Datas.empty())
+ {
+ uno::Reference<xml::crypto::XSecurityEnvironment> const xSecEnv(
+ getSecurityEnvironment());
+ getSignatureHelper().CheckAndUpdateSignatureInformation(xSecEnv, it);
+ }
+ }
+
maCurrentSignatureInformations = maSignatureHelper.GetSignatureInformations();
}
else
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index cf87d6e1ad17..1e031644b0b5 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -85,25 +85,19 @@ public:
bool OOXMLSecExporter::Impl::isOOXMLBlacklist(const OUString& rStreamName)
{
- static const std::initializer_list<OUStringLiteral> vBlacklist =
- {
- "/%5BContent_Types%5D.xml",
- "/docProps/app.xml",
- "/docProps/core.xml",
- // Don't attempt to sign other signatures for now.
- "/_xmlsignatures"
- };
+ static const std::initializer_list<OUStringLiteral> vBlacklist
+ = { "/%5BContent_Types%5D.xml", "/docProps/app.xml", "/docProps/core.xml",
+ // Don't attempt to sign other signatures for now.
+ "/_xmlsignatures" };
// Just check the prefix, as we don't care about the content type part of the stream name.
- return std::any_of(vBlacklist.begin(), vBlacklist.end(), [&](const OUStringLiteral& rLiteral)
- {
+ return std::any_of(vBlacklist.begin(), vBlacklist.end(), [&](const OUStringLiteral& rLiteral) {
return rStreamName.startsWith(rLiteral);
});
}
bool OOXMLSecExporter::Impl::isOOXMLRelationBlacklist(const OUString& rRelationName)
{
- static const std::initializer_list<OUStringLiteral> vBlacklist =
- {
+ static const std::initializer_list<OUStringLiteral> vBlacklist = {
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",
"http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
@@ -113,7 +107,8 @@ bool OOXMLSecExporter::Impl::isOOXMLRelationBlacklist(const OUString& rRelationN
void OOXMLSecExporter::Impl::writeSignedInfo()
{
- m_xDocumentHandler->startElement("SignedInfo", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignedInfo", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
writeCanonicalizationMethod();
writeSignatureMethod();
@@ -126,18 +121,18 @@ void OOXMLSecExporter::Impl::writeCanonicalizationMethod()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Algorithm", ALGO_C14N);
- m_xDocumentHandler->startElement("CanonicalizationMethod", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "CanonicalizationMethod", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
m_xDocumentHandler->endElement("CanonicalizationMethod");
-
}
void OOXMLSecExporter::Impl::writeCanonicalizationTransform()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Algorithm", ALGO_C14N);
- m_xDocumentHandler->startElement("Transform", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Transform", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
m_xDocumentHandler->endElement("Transform");
-
}
void OOXMLSecExporter::Impl::writeSignatureMethod()
@@ -149,7 +144,8 @@ void OOXMLSecExporter::Impl::writeSignatureMethod()
else
pAttributeList->AddAttribute("Algorithm", ALGO_RSASHA256);
- m_xDocumentHandler->startElement("SignatureMethod", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "SignatureMethod", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
m_xDocumentHandler->endElement("SignatureMethod");
}
@@ -163,21 +159,27 @@ void OOXMLSecExporter::Impl::writeSignedInfoReferences()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
if (rReference.ouURI != "idSignedProperties")
- pAttributeList->AddAttribute("Type", "http://www.w3.org/2000/09/xmldsig#Object");
+ pAttributeList->AddAttribute("Type",
+ "http://www.w3.org/2000/09/xmldsig#Object");
else
- pAttributeList->AddAttribute("Type", "http://uri.etsi.org/01903#SignedProperties");
+ pAttributeList->AddAttribute("Type",
+ "http://uri.etsi.org/01903#SignedProperties");
pAttributeList->AddAttribute("URI", "#" + rReference.ouURI);
- m_xDocumentHandler->startElement("Reference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Reference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
if (rReference.ouURI == "idSignedProperties")
{
- m_xDocumentHandler->startElement("Transforms", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "Transforms",
+ uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
writeCanonicalizationTransform();
m_xDocumentHandler->endElement("Transforms");
}
DocumentSignatureHelper::writeDigestMethod(m_xDocumentHandler);
- m_xDocumentHandler->startElement("DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters(rReference.ouDigestValue);
m_xDocumentHandler->endElement("DigestValue");
m_xDocumentHandler->endElement("Reference");
@@ -187,19 +189,31 @@ void OOXMLSecExporter::Impl::writeSignedInfoReferences()
void OOXMLSecExporter::Impl::writeSignatureValue()
{
- m_xDocumentHandler->startElement("SignatureValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters(m_rInformation.ouSignatureValue);
m_xDocumentHandler->endElement("SignatureValue");
}
void OOXMLSecExporter::Impl::writeKeyInfo()
{
- m_xDocumentHandler->startElement("KeyInfo", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- m_xDocumentHandler->startElement("X509Data", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- m_xDocumentHandler->startElement("X509Certificate", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- m_xDocumentHandler->characters(m_rInformation.ouX509Certificate);
- m_xDocumentHandler->endElement("X509Certificate");
- m_xDocumentHandler->endElement("X509Data");
+ m_xDocumentHandler->startElement(
+ "KeyInfo", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ assert(m_rInformation.GetSigningCertificate());
+ for (auto const& rData : m_rInformation.X509Datas)
+ {
+ m_xDocumentHandler->startElement(
+ "X509Data", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ for (auto const& it : rData)
+ {
+ m_xDocumentHandler->startElement(
+ "X509Certificate",
+ uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->characters(it.X509Certificate);
+ m_xDocumentHandler->endElement("X509Certificate");
+ }
+ m_xDocumentHandler->endElement("X509Data");
+ }
m_xDocumentHandler->endElement("KeyInfo");
}
@@ -207,7 +221,8 @@ void OOXMLSecExporter::Impl::writePackageObject()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Id", "idPackageObject");
- m_xDocumentHandler->startElement("Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
writeManifest();
writePackageObjectSignatureProperties();
@@ -217,7 +232,8 @@ void OOXMLSecExporter::Impl::writePackageObject()
void OOXMLSecExporter::Impl::writeManifest()
{
- m_xDocumentHandler->startElement("Manifest", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "Manifest", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
const SignatureReferenceInformations& rReferences = m_rInformation.vSignatureReferenceInfors;
for (const SignatureReferenceInformation& rReference : rReferences)
{
@@ -234,15 +250,22 @@ void OOXMLSecExporter::Impl::writeManifest()
void OOXMLSecExporter::Impl::writeRelationshipTransform(const OUString& rURI)
{
- uno::Reference<embed::XHierarchicalStorageAccess> xHierarchicalStorageAccess(m_xRootStorage, uno::UNO_QUERY);
- uno::Reference<io::XInputStream> xRelStream(xHierarchicalStorageAccess->openStreamElementByHierarchicalName(rURI, embed::ElementModes::READ), uno::UNO_QUERY);
+ uno::Reference<embed::XHierarchicalStorageAccess> xHierarchicalStorageAccess(m_xRootStorage,
+ uno::UNO_QUERY);
+ uno::Reference<io::XInputStream> xRelStream(
+ xHierarchicalStorageAccess->openStreamElementByHierarchicalName(rURI,
+ embed::ElementModes::READ),
+ uno::UNO_QUERY);
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Algorithm", ALGO_RELATIONSHIP);
- m_xDocumentHandler->startElement("Transform", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Transform", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- const uno::Sequence< uno::Sequence<beans::StringPair> > aRelationsInfo = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, rURI, m_xComponentContext);
+ const uno::Sequence<uno::Sequence<beans::StringPair>> aRelationsInfo
+ = comphelper::OFOPXMLHelper::ReadRelationsInfoSequence(xRelStream, rURI,
+ m_xComponentContext);
for (const uno::Sequence<beans::StringPair>& rPairs : aRelationsInfo)
{
OUString aId;
@@ -261,7 +284,9 @@ void OOXMLSecExporter::Impl::writeRelationshipTransform(const OUString& rURI)
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns:mdssi", NS_MDSSI);
pAttributeList->AddAttribute("SourceId", aId);
- m_xDocumentHandler->startElement("mdssi:RelationshipReference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "mdssi:RelationshipReference",
+ uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
m_xDocumentHandler->endElement("mdssi:RelationshipReference");
}
@@ -270,23 +295,28 @@ void OOXMLSecExporter::Impl::writeRelationshipTransform(const OUString& rURI)
void OOXMLSecExporter::Impl::writePackageObjectSignatureProperties()
{
- m_xDocumentHandler->startElement("SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Id", "idSignatureTime");
pAttributeList->AddAttribute("Target", "#idPackageSignature");
- m_xDocumentHandler->startElement("SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns:mdssi", NS_MDSSI);
- m_xDocumentHandler->startElement("mdssi:SignatureTime", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "mdssi:SignatureTime", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- m_xDocumentHandler->startElement("mdssi:Format", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "mdssi:Format", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("YYYY-MM-DDThh:mm:ssTZD");
m_xDocumentHandler->endElement("mdssi:Format");
- m_xDocumentHandler->startElement("mdssi:Value", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "mdssi:Value", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
if (!m_rInformation.ouDateTime.isEmpty())
m_aSignatureTimeValue = m_rInformation.ouDateTime;
else
@@ -312,10 +342,12 @@ void OOXMLSecExporter::Impl::writeManifestReference(const SignatureReferenceInfo
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("URI", rReference.ouURI);
- m_xDocumentHandler->startElement("Reference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Reference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
// Transforms
- if (rReference.ouURI.endsWith("?ContentType=application/vnd.openxmlformats-package.relationships+xml"))
+ if (rReference.ouURI.endsWith(
+ "?ContentType=application/vnd.openxmlformats-package.relationships+xml"))
{
OUString aURI = rReference.ouURI;
// Ignore leading slash.
@@ -326,7 +358,8 @@ void OOXMLSecExporter::Impl::writeManifestReference(const SignatureReferenceInfo
if (nQueryPos != -1)
aURI = aURI.copy(0, nQueryPos);
- m_xDocumentHandler->startElement("Transforms", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "Transforms", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
writeRelationshipTransform(aURI);
writeCanonicalizationTransform();
@@ -335,7 +368,8 @@ void OOXMLSecExporter::Impl::writeManifestReference(const SignatureReferenceInfo
}
DocumentSignatureHelper::writeDigestMethod(m_xDocumentHandler);
- m_xDocumentHandler->startElement("DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "DigestValue", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters(rReference.ouDigestValue);
m_xDocumentHandler->endElement("DigestValue");
m_xDocumentHandler->endElement("Reference");
@@ -346,14 +380,17 @@ void OOXMLSecExporter::Impl::writeOfficeObject()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Id", "idOfficeObject");
- m_xDocumentHandler->startElement("Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- m_xDocumentHandler->startElement("SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("Id", "idOfficeV1Details");
pAttributeList->AddAttribute("Target", "#idPackageSignature");
- m_xDocumentHandler->startElement("SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
writeSignatureInfo();
m_xDocumentHandler->endElement("SignatureProperty");
@@ -365,49 +402,67 @@ void OOXMLSecExporter::Impl::writeSignatureInfo()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns", "http://schemas.microsoft.com/office/2006/digsig");
- m_xDocumentHandler->startElement("SignatureInfoV1", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "SignatureInfoV1", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
- m_xDocumentHandler->startElement("SetupID", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SetupID", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters(m_rInformation.ouSignatureLineId);
m_xDocumentHandler->endElement("SetupID");
- m_xDocumentHandler->startElement("SignatureText", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureText", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->endElement("SignatureText");
- m_xDocumentHandler->startElement("SignatureImage", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureImage", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->endElement("SignatureImage");
- m_xDocumentHandler->startElement("SignatureComments", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureComments", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters(m_rInformation.ouDescription);
m_xDocumentHandler->endElement("SignatureComments");
// Just hardcode something valid according to [MS-OFFCRYPTO].
- m_xDocumentHandler->startElement("WindowsVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "WindowsVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("6.1");
m_xDocumentHandler->endElement("WindowsVersion");
- m_xDocumentHandler->startElement("OfficeVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "OfficeVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("16.0");
m_xDocumentHandler->endElement("OfficeVersion");
- m_xDocumentHandler->startElement("ApplicationVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "ApplicationVersion", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("16.0");
m_xDocumentHandler->endElement("ApplicationVersion");
- m_xDocumentHandler->startElement("Monitors", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "Monitors", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("1");
m_xDocumentHandler->endElement("Monitors");
- m_xDocumentHandler->startElement("HorizontalResolution", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "HorizontalResolution", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("1280");
m_xDocumentHandler->endElement("HorizontalResolution");
- m_xDocumentHandler->startElement("VerticalResolution", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "VerticalResolution", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("800");
m_xDocumentHandler->endElement("VerticalResolution");
- m_xDocumentHandler->startElement("ColorDepth", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "ColorDepth", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("32");
m_xDocumentHandler->endElement("ColorDepth");
- m_xDocumentHandler->startElement("SignatureProviderId", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureProviderId", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("{00000000-0000-0000-0000-000000000000}");
m_xDocumentHandler->endElement("SignatureProviderId");
- m_xDocumentHandler->startElement("SignatureProviderUrl", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureProviderUrl", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->endElement("SignatureProviderUrl");
- m_xDocumentHandler->startElement("SignatureProviderDetails", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
- m_xDocumentHandler->characters("9"); // This is what MSO 2016 writes, though [MS-OFFCRYPTO] doesn't document what the value means.
+ m_xDocumentHandler->startElement(
+ "SignatureProviderDetails",
+ uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->characters(
+ "9"); // This is what MSO 2016 writes, though [MS-OFFCRYPTO] doesn't document what the value means.
m_xDocumentHandler->endElement("SignatureProviderDetails");
- m_xDocumentHandler->startElement("SignatureType", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "SignatureType", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
m_xDocumentHandler->characters("2");
m_xDocumentHandler->endElement("SignatureType");
@@ -416,15 +471,19 @@ void OOXMLSecExporter::Impl::writeSignatureInfo()
void OOXMLSecExporter::Impl::writePackageSignature()
{
- m_xDocumentHandler->startElement("Object", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
+ m_xDocumentHandler->startElement(
+ "Object", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns:xd", NS_XD);
pAttributeList->AddAttribute("Target", "#idPackageSignature");
- m_xDocumentHandler->startElement("xd:QualifyingProperties", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_xDocumentHandler->startElement(
+ "xd:QualifyingProperties",
+ uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- DocumentSignatureHelper::writeSignedProperties(m_xDocumentHandler, m_rInformation, m_aSignatureTimeValue, false);
+ DocumentSignatureHelper::writeSignedProperties(m_xDocumentHandler, m_rInformation,
+ m_aSignatureTimeValue, false);
m_xDocumentHandler->endElement("xd:QualifyingProperties");
m_xDocumentHandler->endElement("Object");
@@ -460,11 +519,13 @@ void OOXMLSecExporter::Impl::writeSignatureLineImages()
}
}
-OOXMLSecExporter::OOXMLSecExporter(const uno::Reference<uno::XComponentContext>& xComponentContext,
- const uno::Reference<embed::XStorage>& xRootStorage,
- const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler,
- const SignatureInformation& rInformation)
- : m_pImpl(std::make_unique<Impl>(xComponentContext, xRootStorage, xDocumentHandler, rInformation))
+OOXMLSecExporter::OOXMLSecExporter(
+ const uno::Reference<uno::XComponentContext>& xComponentContext,
+ const uno::Reference<embed::XStorage>& xRootStorage,
+ const uno::Reference<xml::sax::XDocumentHandler>& xDocumentHandler,
+ const SignatureInformation& rInformation)
+ : m_pImpl(
+ std::make_unique<Impl>(xComponentContext, xRootStorage, xDocumentHandler, rInformation))
{
}
@@ -475,7 +536,8 @@ void OOXMLSecExporter::writeSignature()
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns", NS_XMLDSIG);
pAttributeList->AddAttribute("Id", "idPackageSignature");
- m_pImpl->getDocumentHandler()->startElement("Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+ m_pImpl->getDocumentHandler()->startElement(
+ "Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
m_pImpl->writeSignedInfo();
m_pImpl->writeSignatureValue();
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.cxx b/xmlsecurity/source/helper/ooxmlsecparser.cxx
index c22e8c2261bf..42f226f57d14 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.cxx
@@ -11,32 +11,1241 @@
#include "ooxmlsecparser.hxx"
#include <xmlsignaturehelper.hxx>
#include <xsecctl.hxx>
+
+#include <xmloff/xmlnmspe.hxx>
+#include <xmloff/xmlimp.hxx>
+
+#include <com/sun/star/xml/sax/SAXException.hpp>
+
#include <sal/log.hxx>
using namespace com::sun::star;
+class OOXMLSecParser::Context
+{
+ protected:
+ friend class OOXMLSecParser;
+ OOXMLSecParser & m_rParser;
+ private:
+ std::unique_ptr<SvXMLNamespaceMap> m_pOldNamespaceMap;
+
+ public:
+ Context(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : m_rParser(rParser)
+ , m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual ~Context() = default;
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/)
+ {
+ }
+
+ virtual void EndElement()
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
+
+ virtual void Characters(OUString const& /*rChars*/)
+ {
+ }
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class OOXMLSecParser::UnknownContext
+ : public OOXMLSecParser::Context
+{
+ public:
+ UnknownContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+};
+
+auto OOXMLSecParser::Context::CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr<Context>
+{
+ // default: create new base context
+ return std::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
+}
+
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+ to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+ ds:SignedInfo precedes all ds:Object.
+
+ There may be multiple ds:Signature for purpose of counter-signatures
+ but the way XAdES describes these, only the ds:SignatureValue element
+ would be referenced, so requiring a ds:Reference for anything in
+ ds:Object shouldn't cause issues.
+ */
+class OOXMLSecParser::ReferencedContextImpl
+ : public OOXMLSecParser::Context
+{
+ protected:
+ bool m_isReferenced;
+
+ public:
+ ReferencedContextImpl(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_isReferenced(isReferenced)
+ {
+ }
+
+ OUString CheckIdAttrReferenced(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs)
+ {
+ OUString const id(m_rParser.HandleIdAttr(xAttrs));
+ if (!id.isEmpty() && m_rParser.m_pXSecController->haveReferenceForId(id))
+ {
+ m_isReferenced = true;
+ }
+ return id;
+ }
+};
+
+class OOXMLSecParser::DsX509CertificateContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509CertificateContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::DsX509SerialNumberContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509SerialNumberContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::DsX509IssuerNameContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509IssuerNameContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::DsX509IssuerSerialContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rX509IssuerName;
+ OUString & m_rX509SerialNumber;
+
+ public:
+ DsX509IssuerSerialContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rIssuerName, OUString & rSerialNumber)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rX509IssuerName(rIssuerName)
+ , m_rX509SerialNumber(rSerialNumber)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName")
+ {
+ return std::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber")
+ {
+ return std::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
+ }
+ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+/// can't be sure what is supposed to happen here because the spec is clear as mud
+class OOXMLSecParser::DsX509DataContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ // sigh... "No ordering is implied by the above constraints."
+ // so store the ball of mud in vectors and try to figure it out later.
+ std::vector<std::pair<OUString, OUString>> m_X509IssuerSerials;
+ std::vector<OUString> m_X509Certificates;
+
+ public:
+ DsX509DataContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setX509Data(m_X509IssuerSerials, m_X509Certificates);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial")
+ {
+ m_X509IssuerSerials.emplace_back();
+ return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate")
+ {
+ m_X509Certificates.emplace_back();
+ return std::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
+ }
+ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsKeyInfoContext
+ : public OOXMLSecParser::Context
+{
+ public:
+ DsKeyInfoContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Data")
+ {
+ return std::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: ds:PGPData
+ // missing: ds:KeyName, ds:KeyValue, ds:RetrievalMethod, ds:SPKIData, ds:MgmtData
+ // (old code would read ds:Transform inside ds:RetrievalMethod but
+ // presumably that was a bug)
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+
+};
+
+class OOXMLSecParser::DsSignatureValueContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString m_Value;
+
+ public:
+ DsSignatureValueContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setSignatureValue(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class OOXMLSecParser::DsDigestValueContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsDigestValueContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/) override
+ {
+ m_rValue.clear();
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::DsDigestMethodContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ sal_Int32 & m_rReferenceDigestID;
+
+ public:
+ DsDigestMethodContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_Int32 & rReferenceDigestID)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rReferenceDigestID(rReferenceDigestID)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm");
+
+ SAL_WARN_IF( ouAlgorithm.isEmpty(), "xmlsecurity.helper", "no Algorithm in Reference" );
+ if (!ouAlgorithm.isEmpty())
+ {
+ SAL_WARN_IF( ouAlgorithm != ALGO_XMLDSIGSHA1
+ && ouAlgorithm != ALGO_XMLDSIGSHA256
+ && ouAlgorithm != ALGO_XMLDSIGSHA512,
+ "xmlsecurity.helper", "Algorithm neither SHA1, SHA256 nor SHA512");
+ if (ouAlgorithm == ALGO_XMLDSIGSHA1)
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA1;
+ else if (ouAlgorithm == ALGO_XMLDSIGSHA256)
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA256;
+ else if (ouAlgorithm == ALGO_XMLDSIGSHA512)
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA512;
+ else
+ m_rReferenceDigestID = 0;
+ }
+ }
+};
+
+class OOXMLSecParser::DsTransformContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ bool & m_rIsC14N;
+
+ public:
+ DsTransformContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool & rIsC14N)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rIsC14N(rIsC14N)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString aAlgorithm = xAttrs->getValueByName("Algorithm");
+
+ if (aAlgorithm == ALGO_RELATIONSHIP)
+ {
+ m_rIsC14N = true;
+ }
+ }
+};
+
+class OOXMLSecParser::DsTransformsContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ bool & m_rIsC14N;
+
+ public:
+ DsTransformsContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool & rIsC14N)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rIsC14N(rIsC14N)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Transform")
+ {
+ return std::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsReferenceContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString m_URI;
+ OUString m_Type;
+ OUString m_DigestValue;
+ bool m_IsC14N = false;
+ // Relevant for ODF. The digest algorithm selected by the DigestMethod
+ // element's Algorithm attribute. @see css::xml::crypto::DigestID.
+ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA256;
+
+ public:
+ DsReferenceContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+
+ m_URI = xAttrs->getValueByName("URI");
+ SAL_WARN_IF(m_URI.isEmpty(), "xmlsecurity.helper", "URI is empty");
+ // Remember the type of this reference.
+ m_Type = xAttrs->getValueByName("Type");
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_URI.startsWith("#"))
+ {
+ /*
+ * remove the first character '#' from the attribute value
+ */
+ m_rParser.m_pXSecController->addReference(m_URI.copy(1), m_nReferenceDigestID, m_Type);
+ }
+ else
+ {
+ if (m_IsC14N) // this is determined by nested ds:Transform
+ {
+ m_rParser.m_pXSecController->addStreamReference(m_URI, false, m_nReferenceDigestID);
+ }
+ else
+ /*
+ * it must be an octet stream
+ */
+ {
+ m_rParser.m_pXSecController->addStreamReference(m_URI, true, m_nReferenceDigestID);
+ }
+ }
+
+ m_rParser.m_pXSecController->setDigestValue(m_nReferenceDigestID, m_DigestValue);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Transforms")
+ {
+ return std::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
+ {
+ return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
+ {
+ return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsSignatureMethodContext
+ : public OOXMLSecParser::Context
+{
+ public:
+ DsSignatureMethodContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm");
+ if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256
+ || ouAlgorithm == ALGO_ECDSASHA512)
+ {
+ m_rParser.m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA);
+ }
+ }
+};
+
+class OOXMLSecParser::DsSignedInfoContext
+ : public OOXMLSecParser::Context
+{
+ public:
+ DsSignedInfoContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setReferenceCount();
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureMethod")
+ {
+ return std::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
+ {
+ return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: ds:CanonicalizationMethod
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesCertDigestContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rDigestValue;
+ sal_Int32 & m_rReferenceDigestID;
+
+ public:
+ XadesCertDigestContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rDigestValue, sal_Int32 & rReferenceDigestID)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rDigestValue(rDigestValue)
+ , m_rReferenceDigestID(rReferenceDigestID)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
+ {
+ return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
+ {
+ return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesCertContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ private:
+ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1;
+ OUString m_CertDigest;
+ OUString m_X509IssuerName;
+ OUString m_X509SerialNumber;
+
+ public:
+ XadesCertContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setX509CertDigest(m_CertDigest, m_nReferenceDigestID, m_X509IssuerName, m_X509SerialNumber);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned xades:Cert");
+ }
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest")
+ {
+ return std::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial")
+ {
+ return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesSigningCertificateContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSigningCertificateContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert")
+ {
+ return std::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesSigningTimeContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ private:
+ OUString m_Value;
+
+ public:
+ XadesSigningTimeContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setDate("", m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SigningTime");
+ }
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class OOXMLSecParser::XadesSignedSignaturePropertiesContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSignedSignaturePropertiesContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime")
+ {
+ return std::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate")
+ {
+ return std::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesSignedPropertiesContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSignedPropertiesContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties")
+ {
+ return std::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: xades:SignedDataObjectProperties
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::XadesQualifyingPropertiesContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ XadesQualifyingPropertiesContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties")
+ {
+ return std::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: xades:UnsignedSignatureProperties
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::MsodigsigSetupIDContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ MsodigsigSetupIDContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::MsodigsigSignatureCommentsContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ MsodigsigSignatureCommentsContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::MsodigsigSignatureInfoV1Context
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ private:
+ OUString m_SetupID;
+ OUString m_SignatureComments;
+
+ public:
+ MsodigsigSignatureInfoV1Context(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SetupID")
+ {
+ return std::make_unique<MsodigsigSetupIDContext>(m_rParser, std::move(pOldNamespaceMap), m_SetupID);
+ }
+ if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SignatureComments")
+ {
+ return std::make_unique<MsodigsigSignatureCommentsContext>(m_rParser, std::move(pOldNamespaceMap), m_SignatureComments);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_isReferenced)
+ {
+ if (!m_SetupID.isEmpty())
+ {
+ m_rParser.m_pXSecController->setSignatureLineId(m_SetupID);
+ }
+ if (!m_SignatureComments.isEmpty())
+ {
+ m_rParser.m_pXSecController->setDescription("", m_SignatureComments);
+
+ }
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureInfoV1");
+ }
+ }
+};
+
+class OOXMLSecParser::MdssiValueContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ MdssiValueContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class OOXMLSecParser::MdssiSignatureTimeContext
+ : public OOXMLSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ MdssiSignatureTimeContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_MDSSI && rName == "Value")
+ {
+ return std::make_unique<MdssiValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rValue);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+
+class OOXMLSecParser::DsSignaturePropertyContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ private:
+ enum class SignatureProperty { Unknown, Date, Info };
+ SignatureProperty m_Property = SignatureProperty::Unknown;
+ OUString m_Id;
+ OUString m_Value;
+
+ public:
+ DsSignaturePropertyContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_Id = CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_isReferenced)
+ {
+ switch (m_Property)
+ {
+ case SignatureProperty::Unknown:
+ SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored");
+ break;
+ case SignatureProperty::Info:
+ break; // handled by child context
+ case SignatureProperty::Date:
+ m_rParser.m_pXSecController->setDate(m_Id, m_Value);
+ break;
+ }
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureProperty");
+ }
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_MDSSI && rName == "SignatureTime")
+ {
+ m_Property = SignatureProperty::Date;
+ return std::make_unique<MdssiSignatureTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ }
+ if (nNamespace == XML_NAMESPACE_MSODIGSIG && rName == "SignatureInfoV1")
+ {
+ return std::make_unique<MsodigsigSignatureInfoV1Context>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsSignaturePropertiesContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ DsSignaturePropertiesContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty")
+ {
+ return std::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsManifestContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ public:
+ DsManifestContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+#if 0
+ ???
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setReferenceCount();
+ }
+#endif
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
+ {
+ return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: ds:CanonicalizationMethod
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsObjectContext
+ : public OOXMLSecParser::ReferencedContextImpl
+{
+ enum class Mode { Default, ValidSignatureLineImage, InvalidSignatureLineImage };
+ Mode m_Mode = Mode::Default;
+ OUString m_Value;
+
+ public:
+ DsObjectContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ // init with "false" here - the Signature element can't be referenced by its child
+ : OOXMLSecParser::ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), false)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString const id(CheckIdAttrReferenced(xAttrs));
+ if (id == "idValidSigLnImg")
+ {
+ m_Mode = Mode::ValidSignatureLineImage;
+ }
+ else if (id == "idInvalidSigLnImg")
+ {
+ m_Mode = Mode::InvalidSignatureLineImage;
+ }
+ }
+
+ virtual void EndElement() override
+ {
+ switch (m_Mode)
+ {
+ case Mode::ValidSignatureLineImage:
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setValidSignatureImage(m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineValidImage");
+ }
+ break;
+ case Mode::InvalidSignatureLineImage:
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setInvalidSignatureImage(m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineInvalidImage");
+ }
+ break;
+ case Mode::Default:
+ break;
+ }
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties")
+ {
+ return std::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties")
+ {
+ return std::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Manifest")
+ {
+ return std::make_unique<DsManifestContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class OOXMLSecParser::DsSignatureContext
+ : public OOXMLSecParser::Context
+{
+ public:
+ DsSignatureContext(OOXMLSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : OOXMLSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs));
+ m_rParser.m_rXMLSignatureHelper.StartVerifySignatureElement();
+ m_rParser.m_pXSecController->addSignature();
+ if (!ouIdAttr.isEmpty())
+ {
+ m_rParser.m_pXSecController->setId( ouIdAttr );
+ }
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignedInfo")
+ {
+ return std::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureValue")
+ {
+ return std::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "KeyInfo")
+ {
+ return std::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Object")
+ {
+ return std::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ return OOXMLSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+
OOXMLSecParser::OOXMLSecParser(XMLSignatureHelper& rXMLSignatureHelper, XSecController* pXSecController)
- : m_pXSecController(pXSecController)
- ,m_bInDigestValue(false)
- ,m_bInSignatureValue(false)
- ,m_bInX509Certificate(false)
- ,m_bInMdssiValue(false)
- ,m_bInSignatureComments(false)
- ,m_bInX509IssuerName(false)
- ,m_bInX509SerialNumber(false)
- ,m_bInCertDigest(false)
- ,m_bInValidSignatureImage(false)
- ,m_bInInvalidSignatureImage(false)
- ,m_bInSignatureLineId(false)
- ,m_bReferenceUnresolved(false)
+ : m_pNamespaceMap(new SvXMLNamespaceMap)
+ , m_pXSecController(pXSecController)
,m_rXMLSignatureHelper(rXMLSignatureHelper)
{
+ using namespace xmloff::token;
+ m_pNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
+ m_pNamespaceMap->Add( "_ds", GetXMLToken(XML_N_DS), XML_NAMESPACE_DS );
+ m_pNamespaceMap->Add( "_xades132", GetXMLToken(XML_N_XADES132), XML_NAMESPACE_XADES132);
+ m_pNamespaceMap->Add( "_xades141", GetXMLToken(XML_N_XADES141), XML_NAMESPACE_XADES141);
+ m_pNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
+ m_pNamespaceMap->Add( "_mdssi", NS_MDSSI, XML_NAMESPACE_MDSSI );
+ m_pNamespaceMap->Add( "_msodigsig", "http://schemas.microsoft.com/office/2006/digsig", XML_NAMESPACE_MSODIGSIG );
+ m_pNamespaceMap->Add( "_office_libo",
+ GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT);
}
OOXMLSecParser::~OOXMLSecParser()
{
}
+OUString OOXMLSecParser::HandleIdAttr(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs)
+{
+ OUString const aId = xAttrs->getValueByName("Id");
+ if (!aId.isEmpty())
+ {
+ m_pXSecController->collectToVerify(aId);
+ }
+ return aId;
+}
+
void SAL_CALL OOXMLSecParser::startDocument()
{
if (m_xNextHandler.is())
@@ -51,217 +1260,69 @@ void SAL_CALL OOXMLSecParser::endDocument()
void SAL_CALL OOXMLSecParser::startElement(const OUString& rName, const uno::Reference<xml::sax::XAttributeList>& xAttribs)
{
- OUString aId = xAttribs->getValueByName("Id");
- if (!aId.isEmpty())
- m_pXSecController->collectToVerify(aId);
+ assert(m_pNamespaceMap);
+ std::unique_ptr<SvXMLNamespaceMap> pRewindMap(
+ SvXMLImport::processNSAttributes(m_pNamespaceMap, nullptr, xAttribs));
- if (rName == "Signature")
- {
- m_rXMLSignatureHelper.StartVerifySignatureElement();
- m_pXSecController->addSignature();
- if (!aId.isEmpty())
- m_pXSecController->setId(aId);
- }
- else if (rName == "SignatureMethod")
- {
- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm");
- if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256
- || ouAlgorithm == ALGO_ECDSASHA512)
- m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA);
- }
- else if (rName == "Reference")
- {
- OUString aURI = xAttribs->getValueByName("URI");
- if (aURI.startsWith("#"))
- m_pXSecController->addReference(aURI.copy(1), xml::crypto::DigestID::SHA1, OUString());
- else
- {
- m_aReferenceURI = aURI;
- m_bReferenceUnresolved = true;
- }
- }
- else if (rName == "Transform")
- {
- if (m_bReferenceUnresolved)
- {
- OUString aAlgorithm = xAttribs->getValueByName("Algorithm");
- if (aAlgorithm == ALGO_RELATIONSHIP)
- {
- m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/false, /*nDigestID=*/xml::crypto::DigestID::SHA256);
- m_bReferenceUnresolved = false;
- }
- }
- }
- else if (rName == "DigestValue" && !m_bInCertDigest)
- {
- m_aDigestValue.clear();
- m_bInDigestValue = true;
- }
- else if (rName == "SignatureValue")
- {
- m_aSignatureValue.clear();
- m_bInSignatureValue = true;
- }
- else if (rName == "X509Certificate")
- {
- m_aX509Certificate.clear();
- m_bInX509Certificate = true;
- }
- else if (rName == "mdssi:Value")
- {
- m_aMdssiValue.clear();
- m_bInMdssiValue = true;
- }
- else if (rName == "SignatureComments")
- {
- m_aSignatureComments.clear();
- m_bInSignatureComments = true;
- }
- else if (rName == "X509IssuerName")
- {
- m_aX509IssuerName.clear();
- m_bInX509IssuerName = true;
- }
- else if (rName == "X509SerialNumber")
- {
- m_aX509SerialNumber.clear();
- m_bInX509SerialNumber = true;
- }
- else if (rName == "xd:CertDigest")
- {
- m_aCertDigest.clear();
- m_bInCertDigest = true;
- }
- else if (rName == "Object")
+ OUString localName;
+ sal_uInt16 const nPrefix(m_pNamespaceMap->GetKeyByAttrName(rName, &localName));
+
+ std::unique_ptr<Context> pContext;
+
+ if (m_ContextStack.empty())
{
- OUString sId = xAttribs->getValueByName("Id");
- if (sId == "idValidSigLnImg")
- {
- m_aValidSignatureImage.clear();
- m_bInValidSignatureImage = true;
- }
- else if (sId == "idInvalidSigLnImg")
+ if (nPrefix == XML_NAMESPACE_DS
+ && localName == "Signature")
{
- m_aInvalidSignatureImage.clear();
- m_bInInvalidSignatureImage = true;
+ pContext.reset(new DsSignatureContext(*this, std::move(pRewindMap)));
}
else
{
- SAL_INFO("xmlsecurity.ooxml", "Unknown 'Object' child element: " << rName);
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: unexpected root element", nullptr,
+ css::uno::Any());
}
}
- else if (rName == "SetupID")
- {
- m_aSignatureLineId.clear();
- m_bInSignatureLineId = true;
- }
else
{
- SAL_INFO("xmlsecurity.ooxml", "Unknown xml element: " << rName);
+ pContext = m_ContextStack.top()->CreateChildContext(
+ std::move(pRewindMap), nPrefix, localName);
}
+ m_ContextStack.push(std::move(pContext));
+ assert(!pRewindMap);
+
+ m_ContextStack.top()->StartElement(xAttribs);
+
if (m_xNextHandler.is())
+ {
m_xNextHandler->startElement(rName, xAttribs);
+ }
+
}
void SAL_CALL OOXMLSecParser::endElement(const OUString& rName)
{
- if (rName == "SignedInfo")
- m_pXSecController->setReferenceCount();
- else if (rName == "Reference")
- {
- if (m_bReferenceUnresolved)
- {
- // No transform algorithm found, assume binary.
- m_pXSecController->addStreamReference(m_aReferenceURI, /*isBinary=*/true, /*nDigestID=*/xml::crypto::DigestID::SHA256);
- m_bReferenceUnresolved = false;
- }
- m_pXSecController->setDigestValue(xml::crypto::DigestID::SHA256, m_aDigestValue);
- }
- else if (rName == "DigestValue" && !m_bInCertDigest)
- m_bInDigestValue = false;
- else if (rName == "SignatureValue")
- {
- m_pXSecController->setSignatureValue(m_aSignatureValue);
- m_bInSignatureValue = false;
- }
- else if (rName == "X509Certificate")
- {
- m_pXSecController->setX509Certificate(m_aX509Certificate);
- m_bInX509Certificate = false;
- }
- else if (rName == "mdssi:Value")
- {
- m_pXSecController->setDate(m_aMdssiValue);
- m_bInMdssiValue = false;
- }
- else if (rName == "SignatureComments")
- {
- m_pXSecController->setDescription(m_aSignatureComments);
- m_bInSignatureComments = false;
- }
- else if (rName == "X509IssuerName")
- {
- m_pXSecController->setX509IssuerName(m_aX509IssuerName);
- m_bInX509IssuerName = false;
- }
- else if (rName == "X509SerialNumber")
- {
- m_pXSecController->setX509SerialNumber(m_aX509SerialNumber);
- m_bInX509SerialNumber = false;
- }
- else if (rName == "xd:CertDigest")
- {
- m_pXSecController->setCertDigest(m_aCertDigest);
- m_bInCertDigest = false;
- }
- else if (rName == "Object")
+ assert(!m_ContextStack.empty()); // this should be checked by sax parser?
+
+ m_ContextStack.top()->EndElement();
+
+ if (m_xNextHandler.is())
{
- if (m_bInValidSignatureImage)
- {
- m_pXSecController->setValidSignatureImage(m_aValidSignatureImage);
- m_bInValidSignatureImage = false;
- }
- else if (m_bInInvalidSignatureImage)
- {
- m_pXSecController->setInvalidSignatureImage(m_aInvalidSignatureImage);
- m_bInInvalidSignatureImage = false;
- }
+ m_xNextHandler->endElement(rName);
}
- else if (rName == "SetupID")
+
+ if (m_ContextStack.top()->m_pOldNamespaceMap)
{
- m_pXSecController->setSignatureLineId(m_aSignatureLineId);
- m_bInSignatureLineId = false;
+ m_pNamespaceMap = std::move(m_ContextStack.top()->m_pOldNamespaceMap);
}
-
- if (m_xNextHandler.is())
- m_xNextHandler->endElement(rName);
+ m_ContextStack.pop();
}
void SAL_CALL OOXMLSecParser::characters(const OUString& rChars)
{
- if (m_bInDigestValue && !m_bInCertDigest)
- m_aDigestValue += rChars;
- else if (m_bInSignatureValue)
- m_aSignatureValue += rChars;
- else if (m_bInX509Certificate)
- m_aX509Certificate += rChars;
- else if (m_bInMdssiValue)
- m_aMdssiValue += rChars;
- else if (m_bInSignatureComments)
- m_aSignatureComments += rChars;
- else if (m_bInX509IssuerName)
- m_aX509IssuerName += rChars;
- else if (m_bInX509SerialNumber)
- m_aX509SerialNumber += rChars;
- else if (m_bInCertDigest)
- m_aCertDigest += rChars;
- else if (m_bInValidSignatureImage)
- m_aValidSignatureImage += rChars;
- else if (m_bInInvalidSignatureImage)
- m_aInvalidSignatureImage += rChars;
- else if (m_bInSignatureLineId)
- m_aSignatureLineId += rChars;
+ assert(!m_ContextStack.empty()); // this should be checked by sax parser?
+ m_ContextStack.top()->Characters(rChars);
if (m_xNextHandler.is())
m_xNextHandler->characters(rChars);
diff --git a/xmlsecurity/source/helper/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index d3c199147255..bb27a219ea28 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -15,6 +15,12 @@
#include <cppuhelper/implbase.hxx>
+#include <xmloff/nmspmap.hxx>
+
+#include <memory>
+#include <optional>
+#include <stack>
+
class XSecController;
class XMLSignatureHelper;
@@ -25,38 +31,62 @@ class OOXMLSecParser: public cppu::WeakImplHelper
css::lang::XInitialization
>
{
+public:
+ class Context;
+private:
+ class UnknownContext;
+ class ReferencedContextImpl;
+ class DsX509CertificateContext;
+ class DsX509SerialNumberContext;
+ class DsX509IssuerNameContext;
+ class DsX509IssuerSerialContext;
+ class DsX509DataContext;
+ class DsKeyInfoContext;
+ class DsSignatureValueContext;
+ class DsDigestValueContext;
+ class DsDigestMethodContext;
+ class DsTransformContext;
+ class DsTransformsContext;
+ class DsReferenceContext;
+ class DsSignatureMethodContext;
+ class DsSignedInfoContext;
+ class XadesEncapsulatedX509CertificateContext;
+ class XadesCertificateValuesContext;
+ class XadesUnsignedSignaturePropertiesContext;
+ class XadesUnsignedPropertiesContext;
+ class XadesCertDigestContext;
+ class XadesCertContext;
+ class XadesSigningCertificateContext;
+ class XadesSigningTimeContext;
+ class XadesSignedSignaturePropertiesContext;
+ class XadesSignedPropertiesContext;
+ class XadesQualifyingPropertiesContext;
+ class MdssiValueContext;
+ class MdssiSignatureTimeContext;
+ class MsodigsigSetupIDContext;
+ class MsodigsigSignatureCommentsContext;
+ class MsodigsigSignatureInfoV1Context;
+ class DsSignaturePropertyContext;
+ class DsSignaturePropertiesContext;
+ class DsManifestContext;
+ class DsObjectContext;
+ class DsSignatureContext;
+ class DsigSignaturesContext;
+
+ std::stack<std::unique_ptr<Context>> m_ContextStack;
+ std::unique_ptr<SvXMLNamespaceMap> m_pNamespaceMap;
+
XSecController* m_pXSecController;
css::uno::Reference<css::xml::sax::XDocumentHandler> m_xNextHandler;
- bool m_bInDigestValue;
- OUString m_aDigestValue;
- bool m_bInSignatureValue;
- OUString m_aSignatureValue;
- bool m_bInX509Certificate;
- OUString m_aX509Certificate;
- bool m_bInMdssiValue;
- OUString m_aMdssiValue;
- bool m_bInSignatureComments;
- OUString m_aSignatureComments;
- bool m_bInX509IssuerName;
- OUString m_aX509IssuerName;
- bool m_bInX509SerialNumber;
- OUString m_aX509SerialNumber;
- bool m_bInCertDigest;
- OUString m_aCertDigest;
- bool m_bInValidSignatureImage;
- OUString m_aValidSignatureImage;
- bool m_bInInvalidSignatureImage;
- OUString m_aInvalidSignatureImage;
- bool m_bInSignatureLineId;
- OUString m_aSignatureLineId;
-
/// Last seen <Reference URI="...">.
OUString m_aReferenceURI;
/// Already called addStreamReference() for this reference.
bool m_bReferenceUnresolved;
XMLSignatureHelper& m_rXMLSignatureHelper;
+ OUString HandleIdAttr(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs);
+
public:
explicit OOXMLSecParser(XMLSignatureHelper& rXMLSignatureHelper, XSecController* pXSecController);
virtual ~OOXMLSecParser() override;
diff --git a/xmlsecurity/source/helper/pdfsignaturehelper.cxx b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
index b0795cb8f33f..843000a9c326 100644
--- a/xmlsecurity/source/helper/pdfsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/pdfsignaturehelper.cxx
@@ -85,8 +85,12 @@ PDFSignatureHelper::GetDocumentSignatureInformations(
security::DocumentSignatureInformation& rExternal = aRet[i];
rExternal.SignatureIsValid
= rInternal.nStatus == xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED;
- if (!rInternal.ouX509Certificate.isEmpty())
- rExternal.Signer = xSecEnv->createCertificateFromAscii(rInternal.ouX509Certificate);
+ if (rInternal.GetSigningCertificate()
+ && !rInternal.GetSigningCertificate()->X509Certificate.isEmpty())
+ {
+ rExternal.Signer = xSecEnv->createCertificateFromAscii(
+ rInternal.GetSigningCertificate()->X509Certificate);
+ }
rExternal.PartialDocumentSignature = rInternal.bPartialDocumentSignature;
// Verify certificate.
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index 6ec834053a17..cdf7d802664d 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -21,6 +21,7 @@
#include <xmlsignaturehelper.hxx>
#include <documentsignaturehelper.hxx>
#include <xsecctl.hxx>
+#include <biginteger.hxx>
#include <xmlsignaturehelper2.hxx>
@@ -43,8 +44,11 @@
#include <comphelper/ofopxmlhelper.hxx>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
+#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
+#include <optional>
+
#define NS_DOCUMENTSIGNATURES "http://openoffice.org/2004/documentsignatures"
#define NS_DOCUMENTSIGNATURES_ODF_1_2 "urn:oasis:names:tc:opendocument:xmlns:digitalsignature:1.0"
#define OOXML_SIGNATURE_ORIGIN "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin"
@@ -402,6 +406,7 @@ bool XMLSignatureHelper::ReadAndVerifySignatureStorageStream(const css::uno::Ref
catch(const uno::Exception&)
{
DBG_UNHANDLED_EXCEPTION("xmlsecurity.helper");
+ mbError = true;
}
mpXSecController->releaseSignatureReader();
@@ -546,4 +551,162 @@ void XMLSignatureHelper::CreateAndWriteOOXMLSignature(const uno::Reference<embed
xSaxWriter->endDocument();
}
+/** check this constraint from xmldsig-core 4.5.4:
+
+ All certificates appearing in an X509Data element MUST relate to the
+ validation key by either containing it or being part of a certification
+ chain that terminates in a certificate containing the validation key.
+ */
+static auto CheckX509Data(
+ uno::Reference<xml::crypto::XSecurityEnvironment> const& xSecEnv,
+ std::vector<SignatureInformation::X509CertInfo> const& rX509CertInfos,
+ std::vector<uno::Reference<security::XCertificate>> & rCerts,
+ std::vector<SignatureInformation::X509CertInfo> & rSorted) -> bool
+{
+ assert(rCerts.empty());
+ assert(rSorted.empty());
+ if (rX509CertInfos.empty())
+ {
+ SAL_WARN("xmlsecurity.comp", "no X509Data");
+ return false;
+ }
+ std::vector<uno::Reference<security::XCertificate>> certs;
+ for (SignatureInformation::X509CertInfo const& it : rX509CertInfos)
+ {
+ if (!it.X509Certificate.isEmpty())
+ {
+ certs.emplace_back(xSecEnv->createCertificateFromAscii(it.X509Certificate));
+ }
+ else
+ {
+ certs.emplace_back(xSecEnv->getCertificate(
+ it.X509IssuerName,
+ xmlsecurity::numericStringToBigInteger(it.X509SerialNumber)));
+ }
+ if (!certs.back().is())
+ {
+ SAL_WARN("xmlsecurity.comp", "X509Data cannot be parsed");
+ return false;
+ }
+ }
+
+ // first, search one whose issuer isn't in the list, or a self-signed one
+ std::optional<size_t> start;
+ for (size_t i = 0; i < certs.size(); ++i)
+ {
+ for (size_t j = 0; ; ++j)
+ {
+ if (j == certs.size())
+ {
+ if (start)
+ {
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate has no issuer but already have start of chain: " << certs[i]->getSubjectName());
+ return false;
+ }
+ start = i; // issuer isn't in the list
+ break;
+ }
+ if (xmlsecurity::EqualDistinguishedNames(certs[i]->getIssuerName(), certs[j]->getSubjectName(), xmlsecurity::NOCOMPAT))
+ {
+ if (i == j) // self signed
+ {
+ if (start)
+ {
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate is self-signed but already have start of chain: " << certs[i]->getSubjectName());
+ return false;
+ }
+ start = i;
+ }
+ break;
+ }
+ }
+ }
+ std::vector<size_t> chain;
+ if (!start)
+ {
+ // this can only be a cycle?
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: cycle detected");
+ return false;
+ }
+ chain.emplace_back(*start);
+
+ // second, check that there is a chain, no tree or cycle...
+ for (size_t i = 0; i < certs.size(); ++i)
+ {
+ assert(chain.size() == i + 1);
+ for (size_t j = 0; j < certs.size(); ++j)
+ {
+ if (chain[i] != j)
+ {
+ if (xmlsecurity::EqualDistinguishedNames(
+ certs[chain[i]]->getSubjectName(), certs[j]->getIssuerName(), xmlsecurity::NOCOMPAT))
+ {
+ if (chain.size() != i + 1) // already found issuee?
+ {
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate issued 2 others: " << certs[chain[i]]->getSubjectName());
+ return false;
+ }
+ chain.emplace_back(j);
+ }
+ }
+ }
+ if (i == certs.size() - 1)
+ { // last one: must be a leaf
+ if (chain.size() != i + 1)
+ {
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate in cycle: " << certs[chain[i]]->getSubjectName());
+ return false;
+ }
+ }
+ else if (chain.size() != i + 2)
+ { // not issuer of another?
+ SAL_WARN("xmlsecurity.comp", "X509Data do not form a chain: certificate issued 0 others: " << certs[chain[i]]->getSubjectName());
+ return false;
+ }
+ }
+
+ // success
+ assert(chain.size() == rX509CertInfos.size());
+ for (auto const& it : chain)
+ {
+ rSorted.emplace_back(rX509CertInfos[it]);
+ rCerts.emplace_back(certs[it]);
+ }
+ return true;
+}
+
+std::vector<uno::Reference<security::XCertificate>>
+XMLSignatureHelper::CheckAndUpdateSignatureInformation(
+ uno::Reference<xml::crypto::XSecurityEnvironment> const& xSecEnv,
+ SignatureInformation const& rInfo)
+{
+ // if the check fails, it's not possible to determine which X509Data
+ // contained the signing certificate - the UI cannot display something
+ // useful in this case, so prevent anything misleading by clearing the
+ // X509Datas.
+
+ std::vector<uno::Reference<security::XCertificate>> certs;
+ std::vector<SignatureInformation::X509Data> datas;
+ // TODO: for now, just merge all X509Datas together for checking...
+ // (this will probably break round-trip of signature with multiple X509Data,
+ // no idea if that is a problem)
+ SignatureInformation::X509Data temp;
+ SignatureInformation::X509Data tempResult;
+ for (auto const& rData : rInfo.X509Datas)
+ {
+ for (auto const& it : rData)
+ {
+ temp.emplace_back(it);
+ }
+ }
+ if (CheckX509Data(xSecEnv, temp, certs, tempResult))
+ {
+ datas.emplace_back(tempResult);
+ }
+
+ // rInfo is a copy, update the original
+ mpXSecController->UpdateSignatureInformation(rInfo.nSecurityId, datas);
+ return certs;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index ab108d13c224..6bd88e24f91e 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -41,10 +41,6 @@
#include "ooxmlsecexporter.hxx"
#include <xmlsignaturehelper2.hxx>
-namespace cssu = com::sun::star::uno;
-namespace cssl = com::sun::star::lang;
-namespace cssxc = com::sun::star::xml::crypto;
-namespace cssxs = com::sun::star::xml::sax;
using namespace com::sun::star;
namespace
@@ -53,11 +49,11 @@ OUString getDigestURI(sal_Int32 nID)
{
switch( nID )
{
- case cssxc::DigestID::SHA1:
+ case css::xml::crypto::DigestID::SHA1:
return ALGO_XMLDSIGSHA1;
- case cssxc::DigestID::SHA256:
+ case css::xml::crypto::DigestID::SHA256:
return ALGO_XMLDSIGSHA256;
- case cssxc::DigestID::SHA512:
+ case css::xml::crypto::DigestID::SHA512:
return ALGO_XMLDSIGSHA512;
default:
return ALGO_XMLDSIGSHA1;
@@ -71,13 +67,13 @@ OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_I
{
switch (nDigestID)
{
- case cssxc::DigestID::SHA1:
+ case css::xml::crypto::DigestID::SHA1:
aRet = ALGO_ECDSASHA1;
break;
- case cssxc::DigestID::SHA256:
+ case css::xml::crypto::DigestID::SHA256:
aRet = ALGO_ECDSASHA256;
break;
- case cssxc::DigestID::SHA512:
+ case css::xml::crypto::DigestID::SHA512:
aRet = ALGO_ECDSASHA512;
break;
default:
@@ -90,11 +86,11 @@ OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_I
switch (nDigestID)
{
- case cssxc::DigestID::SHA1:
+ case css::xml::crypto::DigestID::SHA1:
return ALGO_RSASHA1;
- case cssxc::DigestID::SHA256:
+ case css::xml::crypto::DigestID::SHA256:
return ALGO_RSASHA256;
- case cssxc::DigestID::SHA512:
+ case css::xml::crypto::DigestID::SHA512:
return ALGO_RSASHA512;
default:
return ALGO_RSASHA1;
@@ -102,7 +98,7 @@ OUString getSignatureURI(svl::crypto::SignatureMethodAlgorithm eAlgorithm, sal_I
}
}
-XSecController::XSecController( const cssu::Reference<cssu::XComponentContext>& rxCtx )
+XSecController::XSecController( const css::uno::Reference<css::uno::XComponentContext>& rxCtx )
: mxCtx(rxCtx)
, m_nNextSecurityId(1)
, m_bIsPreviousNodeInitializable(false)
@@ -177,15 +173,15 @@ void XSecController::createXSecComponent( )
m_xXMLDocumentWrapper = nullptr;
m_xSAXEventKeeper = nullptr;
- cssu::Reference< cssl::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
+ css::uno::Reference< css::lang::XMultiComponentFactory > xMCF( mxCtx->getServiceManager() );
#if HAVE_FEATURE_GPGME
- uno::Reference< lang::XServiceInfo > xServiceInfo( m_xSecurityContext, cssu::UNO_QUERY );
+ uno::Reference< lang::XServiceInfo > xServiceInfo( m_xSecurityContext, css::uno::UNO_QUERY );
if (xServiceInfo->getImplementationName() == "com.sun.star.xml.security.gpg.XMLSecurityContext_GpgImpl")
m_xXMLSignature.set(new XMLSignature_GpgImpl());
else // xmlsec or mscrypt
#endif
- m_xXMLSignature.set(xMCF->createInstanceWithContext("com.sun.star.xml.crypto.XMLSignature", mxCtx), cssu::UNO_QUERY);
+ m_xXMLSignature.set(xMCF->createInstanceWithContext("com.sun.star.xml.crypto.XMLSignature", mxCtx), css::uno::UNO_QUERY);
bool bSuccess = m_xXMLSignature.is();
if ( bSuccess )
@@ -205,11 +201,11 @@ void XSecController::createXSecComponent( )
* SAXEventKeeper created successfully.
*/
{
- cssu::Sequence <cssu::Any> arg(1);
+ css::uno::Sequence <css::uno::Any> arg(1);
arg[0] <<= uno::Reference<xml::wrapper::XXMLDocumentWrapper>(m_xXMLDocumentWrapper.get());
m_xSAXEventKeeper->initialize(arg);
- cssu::Reference< cssxc::sax::XSAXEventKeeperStatusChangeListener >
+ css::uno::Reference< css::xml::crypto::sax::XSAXEventKeeperStatusChangeListener >
xStatusChangeListener = this;
m_xSAXEventKeeper->addSAXEventKeeperStatusChangeListener( xStatusChangeListener );
@@ -272,7 +268,7 @@ bool XSecController::chainOn()
*/
m_xSAXEventKeeper->setNextHandler( nullptr );
- cssu::Reference< cssxs::XDocumentHandler > xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), cssu::UNO_QUERY);
+ css::uno::Reference< css::xml::sax::XDocumentHandler > xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), css::uno::UNO_QUERY);
/*
* connects the previous document handler on the SAX chain
@@ -281,17 +277,17 @@ bool XSecController::chainOn()
{
if ( m_bIsPreviousNodeInitializable )
{
- cssu::Reference< cssl::XInitialization > xInitialization
- (m_xPreviousNodeOnSAXChain, cssu::UNO_QUERY);
+ css::uno::Reference< css::lang::XInitialization > xInitialization
+ (m_xPreviousNodeOnSAXChain, css::uno::UNO_QUERY);
- cssu::Sequence<cssu::Any> aArgs( 1 );
+ css::uno::Sequence<css::uno::Any> aArgs( 1 );
aArgs[0] <<= xSEKHandler;
xInitialization->initialize(aArgs);
}
else
{
- cssu::Reference< cssxs::XParser > xParser
- (m_xPreviousNodeOnSAXChain, cssu::UNO_QUERY);
+ css::uno::Reference< css::xml::sax::XParser > xParser
+ (m_xPreviousNodeOnSAXChain, css::uno::UNO_QUERY);
xParser->setDocumentHandler( xSEKHandler );
}
}
@@ -327,16 +323,16 @@ void XSecController::chainOff()
{
if ( m_bIsPreviousNodeInitializable )
{
- cssu::Reference< cssl::XInitialization > xInitialization
- (m_xPreviousNodeOnSAXChain, cssu::UNO_QUERY);
+ css::uno::Reference< css::lang::XInitialization > xInitialization
+ (m_xPreviousNodeOnSAXChain, css::uno::UNO_QUERY);
- cssu::Sequence<cssu::Any> aArgs( 1 );
+ css::uno::Sequence<css::uno::Any> aArgs( 1 );
aArgs[0] <<= uno::Reference<xml::sax::XDocumentHandler>();
xInitialization->initialize(aArgs);
}
else
{
- cssu::Reference< cssxs::XParser > xParser(m_xPreviousNodeOnSAXChain, cssu::UNO_QUERY);
+ css::uno::Reference< css::xml::sax::XParser > xParser(m_xPreviousNodeOnSAXChain, css::uno::UNO_QUERY);
xParser->setDocumentHandler(uno::Reference<xml::sax::XDocumentHandler>());
}
}
@@ -393,7 +389,7 @@ void XSecController::initializeSAXChain()
chainOff();
}
-cssu::Reference< css::io::XInputStream >
+css::uno::Reference< css::io::XInputStream >
XSecController::getObjectInputStream( const OUString& objectURL )
/****** XSecController/getObjectInputStream ************************************
*
@@ -410,7 +406,7 @@ cssu::Reference< css::io::XInputStream >
* xInputStream - the XInputStream interface
******************************************************************************/
{
- cssu::Reference< css::io::XInputStream > xObjectInputStream;
+ css::uno::Reference< css::io::XInputStream > xObjectInputStream;
SAL_WARN_IF( !m_xUriBinding.is(), "xmlsecurity.helper", "Need XUriBinding!" );
@@ -430,7 +426,7 @@ sal_Int32 XSecController::getNewSecurityId( )
return nId;
}
-void XSecController::startMission(const rtl::Reference<UriBindingHelper>& xUriBinding, const cssu::Reference< cssxc::XXMLSecurityContext >& xSecurityContext )
+void XSecController::startMission(const rtl::Reference<UriBindingHelper>& xUriBinding, const css::uno::Reference< css::xml::crypto::XXMLSecurityContext >& xSecurityContext )
/****** XSecController/startMission *******************************************
*
* NAME
@@ -456,7 +452,7 @@ void XSecController::startMission(const rtl::Reference<UriBindingHelper>& xUriBi
m_bVerifyCurrentSignature = false;
}
-void XSecController::setSAXChainConnector(const cssu::Reference< cssl::XInitialization >& xInitialization)
+void XSecController::setSAXChainConnector(const css::uno::Reference< css::lang::XInitialization >& xInitialization)
/****** XSecController/setSAXChainConnector ***********************************
*
* NAME
@@ -507,8 +503,8 @@ void XSecController::endMission()
* ResolvedListener only exist when the security components are created.
*/
{
- cssu::Reference< cssxc::sax::XMissionTaker > xMissionTaker
- ( m_vInternalSignatureInformations[i].xReferenceResolvedListener, cssu::UNO_QUERY );
+ css::uno::Reference< css::xml::crypto::sax::XMissionTaker > xMissionTaker
+ ( m_vInternalSignatureInformations[i].xReferenceResolvedListener, css::uno::UNO_QUERY );
/*
* asks the SignatureCreator/SignatureVerifier to release
@@ -567,7 +563,7 @@ void writeUnsignedProperties(
}
void XSecController::exportSignature(
- const cssu::Reference<cssxs::XDocumentHandler>& xDocumentHandler,
+ const css::uno::Reference<css::xml::sax::XDocumentHandler>& xDocumentHandler,
const SignatureInformation& signatureInfo,
bool bXAdESCompliantIfODF )
/****** XSecController/exportSignature ****************************************
@@ -601,19 +597,19 @@ void XSecController::exportSignature(
signatureInfo.ouSignatureId);
}
- xDocumentHandler->startElement( "Signature", cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ xDocumentHandler->startElement( "Signature", css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
{
/* Write SignedInfo element */
xDocumentHandler->startElement(
"SignedInfo",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
/* Write CanonicalizationMethod element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
"Algorithm",
ALGO_C14N);
- xDocumentHandler->startElement( "CanonicalizationMethod", cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+ xDocumentHandler->startElement( "CanonicalizationMethod", css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( "CanonicalizationMethod" );
/* Write SignatureMethod element */
@@ -627,7 +623,7 @@ void XSecController::exportSignature(
pAttributeList->AddAttribute(
"Algorithm",
getSignatureURI(signatureInfo.eAlgorithmID, vReferenceInfors[0].nDigestID));
- xDocumentHandler->startElement( "SignatureMethod", cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+ xDocumentHandler->startElement( "SignatureMethod", css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( "SignatureMethod" );
/* Write Reference element */
@@ -666,7 +662,7 @@ void XSecController::exportSignature(
}
}
- xDocumentHandler->startElement( "Reference", cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+ xDocumentHandler->startElement( "Reference", css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList) );
{
/* Write Transforms element */
if (refInfor.nType == SignatureReferenceType::XMLSTREAM)
@@ -676,7 +672,7 @@ void XSecController::exportSignature(
{
xDocumentHandler->startElement(
"Transforms",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
@@ -684,7 +680,7 @@ void XSecController::exportSignature(
ALGO_C14N);
xDocumentHandler->startElement(
"Transform",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( "Transform" );
}
xDocumentHandler->endElement( "Transforms" );
@@ -697,13 +693,13 @@ void XSecController::exportSignature(
getDigestURI(refInfor.nDigestID));
xDocumentHandler->startElement(
"DigestMethod",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList) );
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList) );
xDocumentHandler->endElement( "DigestMethod" );
/* Write DigestValue element */
xDocumentHandler->startElement(
"DigestValue",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
xDocumentHandler->characters( refInfor.ouDigestValue );
xDocumentHandler->endElement( "DigestValue" );
}
@@ -715,14 +711,14 @@ void XSecController::exportSignature(
/* Write SignatureValue element */
xDocumentHandler->startElement(
"SignatureValue",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
xDocumentHandler->characters( signatureInfo.ouSignatureValue );
xDocumentHandler->endElement( "SignatureValue" );
/* Write KeyInfo element */
xDocumentHandler->startElement(
"KeyInfo",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
// GPG or X509 key?
if (!signatureInfo.ouGpgCertificate.isEmpty())
@@ -732,13 +728,13 @@ void XSecController::exportSignature(
/* Write PGPData element */
xDocumentHandler->startElement(
"PGPData",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
{
/* Write keyid element */
xDocumentHandler->startElement(
"PGPKeyID",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
- xDocumentHandler->characters( signatureInfo.ouCertDigest );
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
+ xDocumentHandler->characters(signatureInfo.ouGpgKeyID);
xDocumentHandler->endElement( "PGPKeyID" );
/* Write PGPKeyPacket element */
@@ -746,7 +742,7 @@ void XSecController::exportSignature(
{
xDocumentHandler->startElement(
"PGPKeyPacket",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
xDocumentHandler->characters( signatureInfo.ouGpgCertificate );
xDocumentHandler->endElement( "PGPKeyPacket" );
}
@@ -754,7 +750,7 @@ void XSecController::exportSignature(
/* Write PGPOwner element */
xDocumentHandler->startElement(
"loext:PGPOwner",
- cssu::Reference< cssxs::XAttributeList >(new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList >(new SvXMLAttributeList()));
xDocumentHandler->characters( signatureInfo.ouGpgOwner );
xDocumentHandler->endElement( "loext:PGPOwner" );
}
@@ -762,43 +758,50 @@ void XSecController::exportSignature(
}
else
{
- /* Write X509Data element */
- xDocumentHandler->startElement(
- "X509Data",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ assert(signatureInfo.GetSigningCertificate());
+ for (auto const& rData : signatureInfo.X509Datas)
{
- /* Write X509IssuerSerial element */
+ /* Write X509Data element */
xDocumentHandler->startElement(
- "X509IssuerSerial",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
- {
- /* Write X509IssuerName element */
- xDocumentHandler->startElement(
- "X509IssuerName",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
- xDocumentHandler->characters( signatureInfo.ouX509IssuerName );
- xDocumentHandler->endElement( "X509IssuerName" );
-
- /* Write X509SerialNumber element */
- xDocumentHandler->startElement(
- "X509SerialNumber",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
- xDocumentHandler->characters( signatureInfo.ouX509SerialNumber );
- xDocumentHandler->endElement( "X509SerialNumber" );
- }
- xDocumentHandler->endElement( "X509IssuerSerial" );
-
- /* Write X509Certificate element */
- if (!signatureInfo.ouX509Certificate.isEmpty())
+ "X509Data",
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
- xDocumentHandler->startElement(
- "X509Certificate",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
- xDocumentHandler->characters( signatureInfo.ouX509Certificate );
- xDocumentHandler->endElement( "X509Certificate" );
+ for (auto const& it : rData)
+ {
+ /* Write X509IssuerSerial element */
+ xDocumentHandler->startElement(
+ "X509IssuerSerial",
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
+ {
+ /* Write X509IssuerName element */
+ xDocumentHandler->startElement(
+ "X509IssuerName",
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
+ xDocumentHandler->characters(it.X509IssuerName);
+ xDocumentHandler->endElement( "X509IssuerName" );
+
+ /* Write X509SerialNumber element */
+ xDocumentHandler->startElement(
+ "X509SerialNumber",
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
+ xDocumentHandler->characters(it.X509SerialNumber);
+ xDocumentHandler->endElement( "X509SerialNumber" );
+ }
+ xDocumentHandler->endElement( "X509IssuerSerial" );
+
+ /* Write X509Certificate element */
+ if (!it.X509Certificate.isEmpty())
+ {
+ xDocumentHandler->startElement(
+ "X509Certificate",
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
+ xDocumentHandler->characters(it.X509Certificate);
+ xDocumentHandler->endElement( "X509Certificate" );
+ }
+ }
}
+ xDocumentHandler->endElement( "X509Data" );
}
- xDocumentHandler->endElement( "X509Data" );
}
}
xDocumentHandler->endElement( "KeyInfo" );
@@ -808,24 +811,24 @@ void XSecController::exportSignature(
/* Write Object element */
xDocumentHandler->startElement(
"Object",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
/* Write SignatureProperties element */
xDocumentHandler->startElement(
"SignatureProperties",
- cssu::Reference< cssxs::XAttributeList > (new SvXMLAttributeList()));
+ css::uno::Reference< css::xml::sax::XAttributeList > (new SvXMLAttributeList()));
{
/* Write SignatureProperty element */
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute(
"Id",
- signatureInfo.ouPropertyId);
+ signatureInfo.ouDateTimePropertyId);
pAttributeList->AddAttribute(
"Target",
"#" + signatureInfo.ouSignatureId);
xDocumentHandler->startElement(
"SignatureProperty",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
{
/* Write timestamp element */
@@ -836,7 +839,7 @@ void XSecController::exportSignature(
xDocumentHandler->startElement(
"dc:date",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
OUStringBuffer buffer;
//If the xml signature was already contained in the document,
@@ -894,13 +897,13 @@ void XSecController::exportSignature(
pAttributeList->AddAttribute("xmlns:xd", NS_XD);
xDocumentHandler->startElement(
"Object",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
{
pAttributeList = new SvXMLAttributeList();
pAttributeList->AddAttribute("Target", "#" + signatureInfo.ouSignatureId);
xDocumentHandler->startElement(
"xd:QualifyingProperties",
- cssu::Reference< cssxs::XAttributeList > (pAttributeList));
+ css::uno::Reference< css::xml::sax::XAttributeList > (pAttributeList));
DocumentSignatureHelper::writeSignedProperties(xDocumentHandler, signatureInfo, sDate, true);
writeUnsignedProperties(xDocumentHandler, signatureInfo);
xDocumentHandler->endElement( "xd:QualifyingProperties" );
@@ -917,6 +920,15 @@ void XSecController::exportOOXMLSignature(const uno::Reference<embed::XStorage>&
aExporter.writeSignature();
}
+void XSecController::UpdateSignatureInformation(sal_Int32 const nSecurityId,
+ std::vector<SignatureInformation::X509Data> const& rDatas)
+{
+ SignatureInformation aInf( 0 );
+ int const nIndex = findSignatureInfor(nSecurityId);
+ assert(nIndex != -1); // nothing should touch this between parsing and verify
+ m_vInternalSignatureInformations[nIndex].signatureInfor.X509Datas = rDatas;
+}
+
SignatureInformation XSecController::getSignatureInformation( sal_Int32 nSecurityId ) const
{
SignatureInformation aInf( 0 );
diff --git a/xmlsecurity/source/helper/xsecparser.cxx b/xmlsecurity/source/helper/xsecparser.cxx
index 82f347bff976..f2e00fca99c9 100644
--- a/xmlsecurity/source/helper/xsecparser.cxx
+++ b/xmlsecurity/source/helper/xsecparser.cxx
@@ -21,134 +21,474 @@
#include "xsecparser.hxx"
#include <xsecctl.hxx>
#include <xmlsignaturehelper.hxx>
+
+#include <xmloff/xmlnmspe.hxx>
+#include <xmloff/xmlimp.hxx>
+
#include <com/sun/star/xml/sax/SAXException.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <sal/log.hxx>
-namespace cssu = com::sun::star::uno;
-namespace cssxc = com::sun::star::xml::crypto;
-namespace cssxs = com::sun::star::xml::sax;
-
-XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper,
- XSecController* pXSecController)
- : m_bInX509IssuerName(false)
- , m_bInX509SerialNumber(false)
- , m_bInX509Certificate(false)
- , m_bInGpgCertificate(false)
- , m_bInGpgKeyID(false)
- , m_bInGpgOwner(false)
- , m_bInCertDigest(false)
- , m_bInEncapsulatedX509Certificate(false)
- , m_bInSigningTime(false)
- , m_bInDigestValue(false)
- , m_bInSignatureValue(false)
- , m_bInDate(false)
- , m_bInDescription(false)
- , m_bInSignatureLineId(false)
- , m_bInSignatureLineValidImage(false)
- , m_bInSignatureLineInvalidImage(false)
- , m_pXSecController(pXSecController)
- , m_bReferenceUnresolved(false)
- , m_nReferenceDigestID(cssxc::DigestID::SHA1)
- , m_rXMLSignatureHelper(rXMLSignatureHelper)
+class XSecParser::Context
{
-}
+ protected:
+ friend class XSecParser;
+ XSecParser & m_rParser;
+ private:
+ std::unique_ptr<SvXMLNamespaceMap> m_pOldNamespaceMap;
+
+ public:
+ Context(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : m_rParser(rParser)
+ , m_pOldNamespaceMap(std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual ~Context() = default;
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/)
+ {
+ }
+
+ virtual void EndElement()
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/);
-OUString XSecParser::getIdAttr(const cssu::Reference< cssxs::XAttributeList >& xAttribs )
+ virtual void Characters(OUString const& /*rChars*/)
+ {
+ }
+};
+
+// it's possible that an unsupported element has an Id attribute and a
+// ds:Reference digesting it - probably this means XSecController needs to know
+// about it. (For known elements, the Id attribute is only processed according
+// to the schema.)
+class XSecParser::UnknownContext
+ : public XSecParser::Context
{
- OUString ouIdAttr = xAttribs->getValueByName("id");
+ public:
+ UnknownContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
- if (ouIdAttr.isEmpty())
- {
- ouIdAttr = xAttribs->getValueByName("Id");
- }
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+};
- return ouIdAttr;
+auto XSecParser::Context::CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const /*nNamespace*/, OUString const& /*rName*/)
+-> std::unique_ptr<Context>
+{
+ // default: create new base context
+ return std::make_unique<UnknownContext>(m_rParser, std::move(pOldNamespaceMap));
}
-/*
- * XDocumentHandler
+/**
+note: anything in ds:Object should be trusted *only* if there is a ds:Reference
+ to it so it is signed (exception: the xades:EncapsulatedX509Certificate).
+ ds:SignedInfo precedes all ds:Object.
+
+ There may be multiple ds:Signature for purpose of counter-signatures
+ but the way XAdES describes these, only the ds:SignatureValue element
+ would be referenced, so requiring a ds:Reference for anything in
+ ds:Object shouldn't cause issues.
*/
-void SAL_CALL XSecParser::startDocument( )
+class XSecParser::ReferencedContextImpl
+ : public XSecParser::Context
{
- m_bInX509IssuerName = false;
- m_bInX509SerialNumber = false;
- m_bInX509Certificate = false;
- m_bInGpgCertificate = false;
- m_bInGpgKeyID = false;
- m_bInGpgOwner = false;
- m_bInSignatureValue = false;
- m_bInDigestValue = false;
- m_bInDate = false;
- m_bInDescription = false;
+ protected:
+ bool m_isReferenced;
- if (m_xNextHandler.is())
- {
- m_xNextHandler->startDocument();
- }
-}
+ public:
+ ReferencedContextImpl(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_isReferenced(isReferenced)
+ {
+ }
-void SAL_CALL XSecParser::endDocument( )
+ OUString CheckIdAttrReferenced(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs)
+ {
+ OUString const id(m_rParser.HandleIdAttr(xAttrs));
+ if (!id.isEmpty() && m_rParser.m_pXSecController->haveReferenceForId(id))
+ {
+ m_isReferenced = true;
+ }
+ return id;
+ }
+};
+
+class XSecParser::LoPGPOwnerContext
+ : public XSecParser::Context
{
- if (m_xNextHandler.is())
- {
- m_xNextHandler->endDocument();
- }
-}
+ private:
+ OUString m_Value;
-void SAL_CALL XSecParser::startElement(
- const OUString& aName,
- const cssu::Reference< cssxs::XAttributeList >& xAttribs )
+ public:
+ LoPGPOwnerContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setGpgOwner(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class XSecParser::DsPGPKeyPacketContext
+ : public XSecParser::Context
{
- try
- {
- OUString ouIdAttr = getIdAttr(xAttribs);
- if (!ouIdAttr.isEmpty())
+ private:
+ OUString m_Value;
+
+ public:
+ DsPGPKeyPacketContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_pXSecController->collectToVerify( ouIdAttr );
}
- if ( aName == "Signature" )
+ virtual void EndElement() override
{
- m_rXMLSignatureHelper.StartVerifySignatureElement();
- m_pXSecController->addSignature();
- if (!ouIdAttr.isEmpty())
+ m_rParser.m_pXSecController->setGpgCertificate(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class XSecParser::DsPGPKeyIDContext
+ : public XSecParser::Context
+{
+ private:
+ OUString m_Value;
+
+ public:
+ DsPGPKeyIDContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setGpgKeyID(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class XSecParser::DsPGPDataContext
+ : public XSecParser::Context
+{
+ public:
+ DsPGPDataContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/) override
+ {
+ m_rParser.m_pXSecController->switchGpgSignature();
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyID")
+ {
+ return std::make_unique<DsPGPKeyIDContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPKeyPacket")
{
- m_pXSecController->setId( ouIdAttr );
+ return std::make_unique<DsPGPKeyPacketContext>(m_rParser, std::move(pOldNamespaceMap));
}
+ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "PGPOwner")
+ {
+ return std::make_unique<LoPGPOwnerContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "SignatureMethod")
+};
+
+class XSecParser::DsX509CertificateContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509CertificateContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
{
- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm");
- if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256
- || ouAlgorithm == ALGO_ECDSASHA512)
- m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA);
}
- else if ( aName == "Reference" )
+
+ virtual void Characters(OUString const& rChars) override
{
- OUString ouUri = xAttribs->getValueByName("URI");
- SAL_WARN_IF( ouUri.isEmpty(), "xmlsecurity.helper", "URI is empty" );
- // Remember the type of this reference.
- OUString ouType = xAttribs->getValueByName("Type");
- if (ouUri.startsWith("#"))
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DsX509SerialNumberContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509SerialNumberContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DsX509IssuerNameContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsX509IssuerNameContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DsX509IssuerSerialContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rX509IssuerName;
+ OUString & m_rX509SerialNumber;
+
+ public:
+ DsX509IssuerSerialContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rIssuerName, OUString & rSerialNumber)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rX509IssuerName(rIssuerName)
+ , m_rX509SerialNumber(rSerialNumber)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerName")
{
- /*
- * remove the first character '#' from the attribute value
- */
- m_pXSecController->addReference( ouUri.copy(1), m_nReferenceDigestID, ouType );
+ return std::make_unique<DsX509IssuerNameContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509IssuerName);
}
- else
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509SerialNumber")
{
- /*
- * remember the uri
- */
- m_currentReferenceURI = ouUri;
- m_bReferenceUnresolved = true;
+ return std::make_unique<DsX509SerialNumberContext>(m_rParser, std::move(pOldNamespaceMap), m_rX509SerialNumber);
}
+ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+/// can't be sure what is supposed to happen here because the spec is clear as mud
+class XSecParser::DsX509DataContext
+ : public XSecParser::Context
+{
+ private:
+ // sigh... "No ordering is implied by the above constraints."
+ // so store the ball of mud in vectors and try to figure it out later.
+ std::vector<std::pair<OUString, OUString>> m_X509IssuerSerials;
+ std::vector<OUString> m_X509Certificates;
+
+ public:
+ DsX509DataContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
}
- else if (aName == "DigestMethod")
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setX509Data(m_X509IssuerSerials, m_X509Certificates);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm");
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509IssuerSerial")
+ {
+ m_X509IssuerSerials.emplace_back();
+ return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerSerials.back().first, m_X509IssuerSerials.back().second);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Certificate")
+ {
+ m_X509Certificates.emplace_back();
+ return std::make_unique<DsX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_X509Certificates.back());
+ }
+ // missing: ds:X509SKI, ds:X509SubjectName, ds:X509CRL
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsKeyInfoContext
+ : public XSecParser::Context
+{
+ public:
+ DsKeyInfoContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "X509Data")
+ {
+ return std::make_unique<DsX509DataContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "PGPData")
+ {
+ return std::make_unique<DsPGPDataContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: ds:KeyName, ds:KeyValue, ds:RetrievalMethod, ds:SPKIData, ds:MgmtData
+ // (old code would read ds:Transform inside ds:RetrievalMethod but
+ // presumably that was a bug)
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+
+};
+
+class XSecParser::DsSignatureValueContext
+ : public XSecParser::Context
+{
+ private:
+ OUString m_Value;
+
+ public:
+ DsSignatureValueContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+ }
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->setSignatureValue(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class XSecParser::DsDigestValueContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DsDigestValueContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& /*xAttrs*/) override
+ {
+ m_rValue.clear();
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DsDigestMethodContext
+ : public XSecParser::Context
+{
+ private:
+ sal_Int32 & m_rReferenceDigestID;
+
+ public:
+ DsDigestMethodContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_Int32 & rReferenceDigestID)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rReferenceDigestID(rReferenceDigestID)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm");
SAL_WARN_IF( ouAlgorithm.isEmpty(), "xmlsecurity.helper", "no Algorithm in Reference" );
if (!ouAlgorithm.isEmpty())
@@ -158,342 +498,1102 @@ void SAL_CALL XSecParser::startElement(
&& ouAlgorithm != ALGO_XMLDSIGSHA512,
"xmlsecurity.helper", "Algorithm neither SHA1, SHA256 nor SHA512");
if (ouAlgorithm == ALGO_XMLDSIGSHA1)
- m_nReferenceDigestID = cssxc::DigestID::SHA1;
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA1;
else if (ouAlgorithm == ALGO_XMLDSIGSHA256)
- m_nReferenceDigestID = cssxc::DigestID::SHA256;
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA256;
else if (ouAlgorithm == ALGO_XMLDSIGSHA512)
- m_nReferenceDigestID = cssxc::DigestID::SHA512;
+ m_rReferenceDigestID = css::xml::crypto::DigestID::SHA512;
else
- m_nReferenceDigestID = 0;
+ m_rReferenceDigestID = 0;
}
}
- else if (aName == "Transform")
+};
+
+class XSecParser::DsTransformContext
+ : public XSecParser::Context
+{
+ private:
+ bool & m_rIsC14N;
+
+ public:
+ DsTransformContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool & rIsC14N)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rIsC14N(rIsC14N)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm");
+
+ if (ouAlgorithm == ALGO_C14N)
+ /*
+ * a xml stream
+ */
+ {
+ m_rIsC14N = true;
+ }
+ }
+};
+
+class XSecParser::DsTransformsContext
+ : public XSecParser::Context
+{
+ private:
+ bool & m_rIsC14N;
+
+ public:
+ DsTransformsContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool & rIsC14N)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rIsC14N(rIsC14N)
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- if ( m_bReferenceUnresolved )
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Transform")
{
- OUString ouAlgorithm = xAttribs->getValueByName("Algorithm");
+ return std::make_unique<DsTransformContext>(m_rParser, std::move(pOldNamespaceMap), m_rIsC14N);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsReferenceContext
+ : public XSecParser::Context
+{
+ private:
+ OUString m_URI;
+ OUString m_Type;
+ OUString m_DigestValue;
+ bool m_IsC14N = false;
+ // Relevant for ODF. The digest algorithm selected by the DigestMethod
+ // element's Algorithm attribute. @see css::xml::crypto::DigestID.
+ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1;
- if (ouAlgorithm == ALGO_C14N)
- /*
- * a xml stream
- */
+ public:
+ DsReferenceContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_rParser.HandleIdAttr(xAttrs);
+
+ m_URI = xAttrs->getValueByName("URI");
+ SAL_WARN_IF(m_URI.isEmpty(), "xmlsecurity.helper", "URI is empty");
+ // Remember the type of this reference.
+ m_Type = xAttrs->getValueByName("Type");
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_URI.startsWith("#"))
+ {
+ /*
+ * remove the first character '#' from the attribute value
+ */
+ m_rParser.m_pXSecController->addReference(m_URI.copy(1), m_nReferenceDigestID, m_Type);
+ }
+ else
+ {
+ if (m_IsC14N) // this is determined by nested ds:Transform
{
- m_pXSecController->addStreamReference( m_currentReferenceURI, false, m_nReferenceDigestID );
- m_bReferenceUnresolved = false;
+ m_rParser.m_pXSecController->addStreamReference(m_URI, false, m_nReferenceDigestID);
+ }
+ else
+ /*
+ * it must be an octet stream
+ */
+ {
+ m_rParser.m_pXSecController->addStreamReference(m_URI, true, m_nReferenceDigestID);
}
}
+
+ m_rParser.m_pXSecController->setDigestValue(m_nReferenceDigestID, m_DigestValue);
}
- else if (aName == "X509IssuerName")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_ouX509IssuerName.clear();
- m_bInX509IssuerName = true;
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Transforms")
+ {
+ return std::make_unique<DsTransformsContext>(m_rParser, std::move(pOldNamespaceMap), m_IsC14N);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
+ {
+ return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_nReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
+ {
+ return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_DigestValue);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "X509SerialNumber")
+};
+
+class XSecParser::DsSignatureMethodContext
+ : public XSecParser::Context
+{
+ public:
+ DsSignatureMethodContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_ouX509SerialNumber.clear();
- m_bInX509SerialNumber = true;
}
- else if (aName == "X509Certificate")
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouX509Certificate.clear();
- m_bInX509Certificate = true;
+ OUString ouAlgorithm = xAttrs->getValueByName("Algorithm");
+ if (ouAlgorithm == ALGO_ECDSASHA1 || ouAlgorithm == ALGO_ECDSASHA256
+ || ouAlgorithm == ALGO_ECDSASHA512)
+ {
+ m_rParser.m_pXSecController->setSignatureMethod(svl::crypto::SignatureMethodAlgorithm::ECDSA);
+ }
}
- else if (aName == "PGPData")
+};
+
+class XSecParser::DsSignedInfoContext
+ : public XSecParser::Context
+{
+ public:
+ DsSignedInfoContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_pXSecController->switchGpgSignature();
}
- else if (aName == "PGPKeyID")
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouGpgKeyID.clear();
- m_bInGpgKeyID = true;
+ m_rParser.HandleIdAttr(xAttrs);
}
- else if (aName == "PGPKeyPacket")
+
+ virtual void EndElement() override
{
- m_ouGpgCertificate.clear();
- m_bInGpgCertificate = true;
+ m_rParser.m_pXSecController->setReferenceCount();
}
- else if (aName == "loext:PGPOwner")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_ouGpgOwner.clear();
- m_bInGpgOwner = true;
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureMethod")
+ {
+ return std::make_unique<DsSignatureMethodContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Reference")
+ {
+ return std::make_unique<DsReferenceContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: ds:CanonicalizationMethod
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "SignatureValue")
+};
+
+class XSecParser::XadesEncapsulatedX509CertificateContext
+ : public XSecParser::Context
+{
+ private:
+ OUString m_Value;
+
+ public:
+ XadesEncapsulatedX509CertificateContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_ouSignatureValue.clear();
- m_bInSignatureValue = true;
}
- else if (aName == "DigestValue" && !m_bInCertDigest)
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouDigestValue.clear();
- m_bInDigestValue = true;
+ m_rParser.HandleIdAttr(xAttrs);
}
- else if (aName == "xd:CertDigest")
+
+ virtual void EndElement() override
+ {
+ m_rParser.m_pXSecController->addEncapsulatedX509Certificate(m_Value);
+ }
+
+ virtual void Characters(OUString const& rChars) override
{
- m_ouCertDigest.clear();
- m_bInCertDigest = true;
+ m_Value += rChars;
}
- // FIXME: Existing code here in xmlsecurity uses "xd" as the namespace prefix for XAdES,
- // while the sample document attached to tdf#76142 uses "xades". So accept either here. Of
- // course this is idiotic and wrong, the right thing would be to use a proper way to parse
- // XML that would handle namespaces correctly. I have no idea how substantial re-plumbing of
- // this code that would require.
- else if (aName == "xd:EncapsulatedX509Certificate" || aName == "xades:EncapsulatedX509Certificate")
+};
+
+class XSecParser::XadesCertificateValuesContext
+ : public XSecParser::Context
+{
+ public:
+ XadesCertificateValuesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_ouEncapsulatedX509Certificate.clear();
- m_bInEncapsulatedX509Certificate = true;
}
- else if (aName == "xd:SigningTime" || aName == "xades:SigningTime")
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouDate.clear();
- m_bInSigningTime = true;
+ m_rParser.HandleIdAttr(xAttrs);
}
- else if ( aName == "SignatureProperty" )
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- if (!ouIdAttr.isEmpty())
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "EncapsulatedX509Certificate")
{
- m_pXSecController->setPropertyId( ouIdAttr );
+ return std::make_unique<XadesEncapsulatedX509CertificateContext>(m_rParser, std::move(pOldNamespaceMap));
}
+ // missing: xades:OtherCertificate
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "dc:date")
+};
+
+class XSecParser::XadesUnsignedSignaturePropertiesContext
+ : public XSecParser::Context
+{
+ public:
+ XadesUnsignedSignaturePropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- if (m_ouDate.isEmpty())
- m_bInDate = true;
}
- else if (aName == "dc:description")
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouDescription.clear();
- m_bInDescription = true;
+ m_rParser.HandleIdAttr(xAttrs);
}
- else if (aName == "loext:SignatureLineId")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_ouSignatureLineId.clear();
- m_bInSignatureLineId = true;
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertificateValues")
+ {
+ return std::make_unique<XadesCertificateValuesContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing:
+ // xades:CounterSignature
+ // ^ old code would read a ds:Signature inside it?
+ // xades:SignatureTimeStamp
+ // xades:CompleteCertificateRefs
+ // xades:CompleteRevocationRefs
+ // xades:AttributeCertificateRefs
+ // xades:AttributeRevocationRefs
+ // xades:SigAndRefsTimeStamp
+ // xades:RefsOnlyTimeStamp
+ // xades:RevocationValues
+ // xades:AttrAuthoritiesCertValues
+ // ^ old code: was equivalent to CertificateValues ???
+ // xades:AttributeRevocationValues
+ // xades:ArchiveTimeStamp
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "loext:SignatureLineValidImage")
+};
+
+class XSecParser::XadesUnsignedPropertiesContext
+ : public XSecParser::Context
+{
+ public:
+ XadesUnsignedPropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
{
- m_ouSignatureLineValidImage.clear();
- m_bInSignatureLineValidImage = true;
}
- else if (aName == "loext:SignatureLineInvalidImage")
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
{
- m_ouSignatureLineInvalidImage.clear();
- m_bInSignatureLineInvalidImage = true;
+ m_rParser.HandleIdAttr(xAttrs);
}
- if (m_xNextHandler.is())
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_xNextHandler->startElement(aName, xAttribs);
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedSignatureProperties")
+ {
+ return std::make_unique<XadesUnsignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ // missing: xades:UnsignedDataObjectProperties
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- }
- catch (cssu::Exception& )
- {//getCaughtException MUST be the first line in the catch block
- cssu::Any exc = cppu::getCaughtException();
- throw cssxs::SAXException(
- "xmlsecurity: Exception in XSecParser::startElement",
- nullptr, exc);
- }
- catch (...)
- {
- throw cssxs::SAXException(
- "xmlsecurity: unexpected exception in XSecParser::startElement", nullptr,
- cssu::Any());
- }
-}
+};
-void SAL_CALL XSecParser::endElement( const OUString& aName )
+class XSecParser::LoSignatureLineIdContext
+ : public XSecParser::ReferencedContextImpl
{
- try
- {
- if (aName == "DigestValue" && !m_bInCertDigest)
+ private:
+ OUString m_Value;
+
+ public:
+ LoSignatureLineIdContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_bInDigestValue = false;
}
- else if ( aName == "Reference" )
+
+ virtual void EndElement() override
{
- if ( m_bReferenceUnresolved )
- /*
- * it must be an octet stream
- */
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setSignatureLineId(m_Value);
+ }
+ else
{
- m_pXSecController->addStreamReference( m_currentReferenceURI, true, m_nReferenceDigestID );
- m_bReferenceUnresolved = false;
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineId");
}
+ }
- m_pXSecController->setDigestValue( m_nReferenceDigestID, m_ouDigestValue );
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
}
- else if ( aName == "SignedInfo" )
+};
+
+class XSecParser::LoSignatureLineValidImageContext
+ : public XSecParser::ReferencedContextImpl
+{
+ private:
+ OUString m_Value;
+
+ public:
+ LoSignatureLineValidImageContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setReferenceCount();
}
- else if ( aName == "SignatureValue" )
+
+ virtual void EndElement() override
{
- m_pXSecController->setSignatureValue( m_ouSignatureValue );
- m_bInSignatureValue = false;
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setValidSignatureImage(m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineValidImage");
+ }
}
- else if (aName == "X509IssuerName")
+
+ virtual void Characters(OUString const& rChars) override
{
- m_pXSecController->setX509IssuerName( m_ouX509IssuerName );
- m_bInX509IssuerName = false;
+ m_Value += rChars;
}
- else if (aName == "X509SerialNumber")
+};
+
+class XSecParser::LoSignatureLineInvalidImageContext
+ : public XSecParser::ReferencedContextImpl
+{
+ private:
+ OUString m_Value;
+
+ public:
+ LoSignatureLineInvalidImageContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setX509SerialNumber( m_ouX509SerialNumber );
- m_bInX509SerialNumber = false;
}
- else if (aName == "X509Certificate")
+
+ virtual void EndElement() override
{
- m_pXSecController->setX509Certificate( m_ouX509Certificate );
- m_bInX509Certificate = false;
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setInvalidSignatureImage(m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureLineInvalidImage");
+ }
}
- else if (aName == "PGPKeyID")
+
+ virtual void Characters(OUString const& rChars) override
{
- m_pXSecController->setGpgKeyID( m_ouGpgKeyID );
- m_bInGpgKeyID = false;
+ m_Value += rChars;
}
- else if (aName == "PGPKeyPacket")
+};
+
+class XSecParser::LoSignatureLineContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ LoSignatureLineContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setGpgCertificate( m_ouGpgCertificate );
- m_bInGpgCertificate = false;
}
- else if (aName == "loext:PGPOwner")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_pXSecController->setGpgOwner( m_ouGpgOwner );
- m_bInGpgOwner = false;
+ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineId")
+ {
+ return std::make_unique<LoSignatureLineIdContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineValidImage")
+ {
+ return std::make_unique<LoSignatureLineValidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLineInvalidImage")
+ {
+ return std::make_unique<LoSignatureLineInvalidImageContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "xd:CertDigest")
+};
+
+class XSecParser::XadesCertDigestContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rDigestValue;
+ sal_Int32 & m_rReferenceDigestID;
+
+ public:
+ XadesCertDigestContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rDigestValue, sal_Int32 & rReferenceDigestID)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rDigestValue(rDigestValue)
+ , m_rReferenceDigestID(rReferenceDigestID)
{
- m_pXSecController->setCertDigest( m_ouCertDigest );
- m_bInCertDigest = false;
}
- else if (aName == "xd:EncapsulatedX509Certificate" || aName == "xades:EncapsulatedX509Certificate")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_pXSecController->addEncapsulatedX509Certificate( m_ouEncapsulatedX509Certificate );
- m_bInEncapsulatedX509Certificate = false;
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestMethod")
+ {
+ return std::make_unique<DsDigestMethodContext>(m_rParser, std::move(pOldNamespaceMap), m_rReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "DigestValue")
+ {
+ return std::make_unique<DsDigestValueContext>(m_rParser, std::move(pOldNamespaceMap), m_rDigestValue);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "xd:SigningTime" || aName == "xades:SigningTime")
+};
+
+class XSecParser::XadesCertContext
+ : public XSecParser::ReferencedContextImpl
+{
+ private:
+ sal_Int32 m_nReferenceDigestID = css::xml::crypto::DigestID::SHA1;
+ OUString m_CertDigest;
+ OUString m_X509IssuerName;
+ OUString m_X509SerialNumber;
+
+ public:
+ XadesCertContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setDate( m_ouDate );
- m_bInSigningTime = false;
}
- else if (aName == "dc:date")
+
+ virtual void EndElement() override
{
- if (m_bInDate)
+ if (m_isReferenced)
{
- m_pXSecController->setDate( m_ouDate );
- m_bInDate = false;
+ m_rParser.m_pXSecController->setX509CertDigest(m_CertDigest, m_nReferenceDigestID, m_X509IssuerName, m_X509SerialNumber);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned xades:Cert");
}
}
- else if (aName == "dc:description")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_pXSecController->setDescription( m_ouDescription );
- m_bInDescription = false;
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "CertDigest")
+ {
+ return std::make_unique<XadesCertDigestContext>(m_rParser, std::move(pOldNamespaceMap), m_CertDigest, m_nReferenceDigestID);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "IssuerSerial")
+ {
+ return std::make_unique<DsX509IssuerSerialContext>(m_rParser, std::move(pOldNamespaceMap), m_X509IssuerName, m_X509SerialNumber);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "loext:SignatureLineId")
+};
+
+class XSecParser::XadesSigningCertificateContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSigningCertificateContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setSignatureLineId( m_ouSignatureLineId );
- m_bInSignatureLineId = false;
}
- else if (aName == "loext:SignatureLineValidImage")
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
{
- m_pXSecController->setValidSignatureImage( m_ouSignatureLineValidImage );
- m_bInSignatureLineValidImage = false;
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "Cert")
+ {
+ return std::make_unique<XadesCertContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
}
- else if (aName == "loext:SignatureLineInvalidImage")
+};
+
+class XSecParser::XadesSigningTimeContext
+ : public XSecParser::ReferencedContextImpl
+{
+ private:
+ OUString m_Value;
+
+ public:
+ XadesSigningTimeContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
{
- m_pXSecController->setInvalidSignatureImage( m_ouSignatureLineInvalidImage );
- m_bInSignatureLineInvalidImage = false;
}
- if (m_xNextHandler.is())
+ virtual void EndElement() override
{
- m_xNextHandler->endElement(aName);
+ if (m_isReferenced)
+ {
+ m_rParser.m_pXSecController->setDate("", m_Value);
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SigningTime");
+ }
}
- }
- catch (cssu::Exception& )
- {//getCaughtException MUST be the first line in the catch block
- cssu::Any exc = cppu::getCaughtException();
- throw cssxs::SAXException(
- "xmlsecurity: Exception in XSecParser::endElement",
- nullptr, exc);
- }
- catch (...)
- {
- throw cssxs::SAXException(
- "xmlsecurity: unexpected exception in XSecParser::endElement", nullptr,
- cssu::Any());
- }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_Value += rChars;
+ }
+};
+
+class XSecParser::XadesSignedSignaturePropertiesContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSignedSignaturePropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningTime")
+ {
+ return std::make_unique<XadesSigningTimeContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SigningCertificate")
+ {
+ return std::make_unique<XadesSigningCertificateContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_LO_EXT && rName == "SignatureLine")
+ {
+ return std::make_unique<LoSignatureLineContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: xades:SignaturePolicyIdentifier, xades:SignatureProductionPlace, xades:SignerRole
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::XadesSignedPropertiesContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ XadesSignedPropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedSignatureProperties")
+ {
+ return std::make_unique<XadesSignedSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: xades:SignedDataObjectProperties
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::XadesQualifyingPropertiesContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ XadesQualifyingPropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "SignedProperties")
+ {
+ return std::make_unique<XadesSignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "UnsignedProperties")
+ {
+ return std::make_unique<XadesUnsignedPropertiesContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DcDateContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DcDateContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DcDescriptionContext
+ : public XSecParser::Context
+{
+ private:
+ OUString & m_rValue;
+
+ public:
+ DcDescriptionContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ OUString & rValue)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ , m_rValue(rValue)
+ {
+ }
+
+ virtual void Characters(OUString const& rChars) override
+ {
+ m_rValue += rChars;
+ }
+};
+
+class XSecParser::DsSignaturePropertyContext
+ : public XSecParser::ReferencedContextImpl
+{
+ private:
+ enum class SignatureProperty { Unknown, Date, Description };
+ SignatureProperty m_Property = SignatureProperty::Unknown;
+ OUString m_Id;
+ OUString m_Value;
+
+ public:
+ DsSignaturePropertyContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ m_Id = CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual void EndElement() override
+ {
+ if (m_isReferenced)
+ {
+ switch (m_Property)
+ {
+ case SignatureProperty::Unknown:
+ SAL_INFO("xmlsecurity.helper", "Unknown property in ds:Object ignored");
+ break;
+ case SignatureProperty::Date:
+ m_rParser.m_pXSecController->setDate(m_Id, m_Value);
+ break;
+ case SignatureProperty::Description:
+ m_rParser.m_pXSecController->setDescription(m_Id, m_Value);
+ break;
+ }
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "ignoring unsigned SignatureProperty");
+ }
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DC && rName == "date")
+ {
+ m_Property = SignatureProperty::Date;
+ return std::make_unique<DcDateContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ }
+ if (nNamespace == XML_NAMESPACE_DC && rName == "description")
+ {
+ m_Property = SignatureProperty::Description;
+ return std::make_unique<DcDescriptionContext>(m_rParser, std::move(pOldNamespaceMap), m_Value);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsSignaturePropertiesContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ DsSignaturePropertiesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ bool const isReferenced)
+ : ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), isReferenced)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperty")
+ {
+ return std::make_unique<DsSignaturePropertyContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsObjectContext
+ : public XSecParser::ReferencedContextImpl
+{
+ public:
+ DsObjectContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ // init with "false" here - the Signature element can't be referenced by its child
+ : XSecParser::ReferencedContextImpl(rParser, std::move(pOldNamespaceMap), false)
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ CheckIdAttrReferenced(xAttrs);
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureProperties")
+ {
+ return std::make_unique<DsSignaturePropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ if (nNamespace == XML_NAMESPACE_XADES132 && rName == "QualifyingProperties")
+ {
+ return std::make_unique<XadesQualifyingPropertiesContext>(m_rParser, std::move(pOldNamespaceMap), m_isReferenced);
+ }
+ // missing: ds:Manifest
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsSignatureContext
+ : public XSecParser::Context
+{
+ public:
+ DsSignatureContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual void StartElement(
+ css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs) override
+ {
+ OUString const ouIdAttr(m_rParser.HandleIdAttr(xAttrs));
+ m_rParser.m_rXMLSignatureHelper.StartVerifySignatureElement();
+ m_rParser.m_pXSecController->addSignature();
+ if (!ouIdAttr.isEmpty())
+ {
+ m_rParser.m_pXSecController->setId( ouIdAttr );
+ }
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignedInfo")
+ {
+ return std::make_unique<DsSignedInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "SignatureValue")
+ {
+ return std::make_unique<DsSignatureValueContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "KeyInfo")
+ {
+ return std::make_unique<DsKeyInfoContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Object")
+ {
+ return std::make_unique<DsObjectContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+class XSecParser::DsigSignaturesContext
+ : public XSecParser::Context
+{
+ public:
+ DsigSignaturesContext(XSecParser & rParser,
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap)
+ : XSecParser::Context(rParser, std::move(pOldNamespaceMap))
+ {
+ }
+
+ virtual std::unique_ptr<Context> CreateChildContext(
+ std::unique_ptr<SvXMLNamespaceMap> pOldNamespaceMap,
+ sal_uInt16 const nNamespace, OUString const& rName) override
+ {
+ if (nNamespace == XML_NAMESPACE_DS && rName == "Signature")
+ {
+ return std::make_unique<DsSignatureContext>(m_rParser, std::move(pOldNamespaceMap));
+ }
+ return XSecParser::Context::CreateChildContext(std::move(pOldNamespaceMap), nNamespace, rName);
+ }
+};
+
+
+XSecParser::XSecParser(XMLSignatureHelper& rXMLSignatureHelper,
+ XSecController* pXSecController)
+ : m_pNamespaceMap(new SvXMLNamespaceMap)
+ , m_pXSecController(pXSecController)
+ , m_rXMLSignatureHelper(rXMLSignatureHelper)
+{
+ using namespace xmloff::token;
+ m_pNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
+ m_pNamespaceMap->Add( "_dsig_ooo", GetXMLToken(XML_N_DSIG_OOO), XML_NAMESPACE_DSIG_OOO );
+ m_pNamespaceMap->Add( "_dsig", GetXMLToken(XML_N_DSIG), XML_NAMESPACE_DSIG );
+ m_pNamespaceMap->Add( "_ds", GetXMLToken(XML_N_DS), XML_NAMESPACE_DS );
+ m_pNamespaceMap->Add( "_xades132", GetXMLToken(XML_N_XADES132), XML_NAMESPACE_XADES132);
+ m_pNamespaceMap->Add( "_xades141", GetXMLToken(XML_N_XADES141), XML_NAMESPACE_XADES141);
+ m_pNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
+ m_pNamespaceMap->Add( "_office_libo",
+ GetXMLToken(XML_N_LO_EXT), XML_NAMESPACE_LO_EXT);
}
-void SAL_CALL XSecParser::characters( const OUString& aChars )
+OUString XSecParser::HandleIdAttr(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs)
{
- if (m_bInX509IssuerName)
- {
- m_ouX509IssuerName += aChars;
- }
- else if (m_bInX509SerialNumber)
- {
- m_ouX509SerialNumber += aChars;
- }
- else if (m_bInX509Certificate)
+ OUString ouIdAttr = getIdAttr(xAttrs);
+ if (!ouIdAttr.isEmpty())
{
- m_ouX509Certificate += aChars;
+ m_pXSecController->collectToVerify( ouIdAttr );
}
- else if (m_bInGpgCertificate)
- {
- m_ouGpgCertificate += aChars;
- }
- else if (m_bInGpgKeyID)
+ return ouIdAttr;
+}
+
+OUString XSecParser::getIdAttr(const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs )
+{
+ OUString ouIdAttr = xAttribs->getValueByName("id");
+
+ if (ouIdAttr.isEmpty())
{
- m_ouGpgKeyID += aChars;
+ ouIdAttr = xAttribs->getValueByName("Id");
}
- else if (m_bInGpgOwner)
+
+ return ouIdAttr;
+}
+
+/*
+ * XDocumentHandler
+ */
+void SAL_CALL XSecParser::startDocument( )
+{
+ if (m_xNextHandler.is())
{
- m_ouGpgOwner += aChars;
+ m_xNextHandler->startDocument();
}
- else if (m_bInSignatureValue)
+}
+
+void SAL_CALL XSecParser::endDocument( )
+{
+ if (m_xNextHandler.is())
{
- m_ouSignatureValue += aChars;
+ m_xNextHandler->endDocument();
}
- else if (m_bInDigestValue && !m_bInCertDigest)
+}
+
+void SAL_CALL XSecParser::startElement(
+ const OUString& rName,
+ const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs )
+{
+ assert(m_pNamespaceMap);
+ std::unique_ptr<SvXMLNamespaceMap> pRewindMap(
+ SvXMLImport::processNSAttributes(m_pNamespaceMap, nullptr, xAttribs));
+
+ OUString localName;
+ sal_uInt16 const nPrefix(m_pNamespaceMap->GetKeyByAttrName(rName, &localName));
+
+ std::unique_ptr<Context> pContext;
+
+ if (m_ContextStack.empty())
{
- m_ouDigestValue += aChars;
+ if ((nPrefix == XML_NAMESPACE_DSIG || nPrefix == XML_NAMESPACE_DSIG_OOO)
+ && localName == "document-signatures")
+ {
+ pContext.reset(new DsigSignaturesContext(*this, std::move(pRewindMap)));
+ }
+ else
+ {
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: unexpected root element", nullptr,
+ css::uno::Any());
+ }
}
- else if (m_bInDate)
+ else
{
- m_ouDate += aChars;
+ pContext = m_ContextStack.top()->CreateChildContext(
+ std::move(pRewindMap), nPrefix, localName);
}
- else if (m_bInDescription)
+
+ m_ContextStack.push(std::move(pContext));
+ assert(!pRewindMap);
+
+ try
{
- m_ouDescription += aChars;
+ m_ContextStack.top()->StartElement(xAttribs);
+
+ if (m_xNextHandler.is())
+ {
+ m_xNextHandler->startElement(rName, xAttribs);
+ }
}
- else if (m_bInCertDigest)
- {
- m_ouCertDigest += aChars;
+ catch (css::uno::Exception& )
+ {//getCaughtException MUST be the first line in the catch block
+ css::uno::Any exc = cppu::getCaughtException();
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: Exception in XSecParser::startElement",
+ nullptr, exc);
}
- else if (m_bInEncapsulatedX509Certificate)
+ catch (...)
{
- m_ouEncapsulatedX509Certificate += aChars;
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: unexpected exception in XSecParser::startElement", nullptr,
+ css::uno::Any());
}
- else if (m_bInSigningTime)
+}
+
+void SAL_CALL XSecParser::endElement(const OUString& rName)
+{
+ assert(!m_ContextStack.empty()); // this should be checked by sax parser?
+
+ try
{
- m_ouDate += aChars;
+ m_ContextStack.top()->EndElement();
+
+ if (m_xNextHandler.is())
+ {
+ m_xNextHandler->endElement(rName);
+ }
}
- else if (m_bInSignatureLineId)
- {
- m_ouSignatureLineId += aChars;
+ catch (css::uno::Exception& )
+ {//getCaughtException MUST be the first line in the catch block
+ css::uno::Any exc = cppu::getCaughtException();
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: Exception in XSecParser::endElement",
+ nullptr, exc);
}
- else if (m_bInSignatureLineValidImage)
+ catch (...)
{
- m_ouSignatureLineValidImage += aChars;
+ throw css::xml::sax::SAXException(
+ "xmlsecurity: unexpected exception in XSecParser::endElement", nullptr,
+ css::uno::Any());
}
- else if (m_bInSignatureLineInvalidImage)
+
+ if (m_ContextStack.top()->m_pOldNamespaceMap)
{
- m_ouSignatureLineInvalidImage += aChars;
+ m_pNamespaceMap = std::move(m_ContextStack.top()->m_pOldNamespaceMap);
}
+ m_ContextStack.pop();
+}
+
+void SAL_CALL XSecParser::characters(const OUString& rChars)
+{
+ assert(!m_ContextStack.empty()); // this should be checked by sax parser?
+ m_ContextStack.top()->Characters(rChars);
if (m_xNextHandler.is())
{
- m_xNextHandler->characters(aChars);
+ m_xNextHandler->characters(rChars);
}
}
@@ -513,7 +1613,7 @@ void SAL_CALL XSecParser::processingInstruction( const OUString& aTarget, const
}
}
-void SAL_CALL XSecParser::setDocumentLocator( const cssu::Reference< cssxs::XLocator >& xLocator )
+void SAL_CALL XSecParser::setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator )
{
if (m_xNextHandler.is())
{
@@ -525,7 +1625,7 @@ void SAL_CALL XSecParser::setDocumentLocator( const cssu::Reference< cssxs::XLoc
* XInitialization
*/
void SAL_CALL XSecParser::initialize(
- const cssu::Sequence< cssu::Any >& aArguments )
+ const css::uno::Sequence< css::uno::Any >& aArguments )
{
aArguments[0] >>= m_xNextHandler;
}
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index d9b079aa3116..3abaf7c7e8be 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -25,6 +25,12 @@
#include <cppuhelper/implbase.hxx>
+#include <xmloff/nmspmap.hxx>
+
+#include <memory>
+#include <optional>
+#include <stack>
+
class XMLSignatureHelper;
class XSecController;
@@ -48,47 +54,54 @@ class XSecParser: public cppu::WeakImplHelper
******************************************************************************/
{
friend class XSecController;
+public:
+ class Context;
private:
- /*
- * the following members are used to reserve the signature information,
- * including X509IssuerName, X509SerialNumber, and X509Certificate,etc.
- */
- OUString m_ouX509IssuerName;
- OUString m_ouX509SerialNumber;
- OUString m_ouX509Certificate;
- OUString m_ouGpgCertificate;
- OUString m_ouGpgKeyID;
- OUString m_ouGpgOwner;
- OUString m_ouCertDigest;
- OUString m_ouEncapsulatedX509Certificate;
- OUString m_ouDigestValue;
- OUString m_ouSignatureValue;
- OUString m_ouDate;
- /// Characters of a <dc:description> element, as just read from XML.
- OUString m_ouDescription;
- OUString m_ouSignatureLineId;
- OUString m_ouSignatureLineValidImage;
- OUString m_ouSignatureLineInvalidImage;
-
- /*
- * whether inside a particular element
- */
- bool m_bInX509IssuerName;
- bool m_bInX509SerialNumber;
- bool m_bInX509Certificate;
- bool m_bInGpgCertificate;
- bool m_bInGpgKeyID;
- bool m_bInGpgOwner;
- bool m_bInCertDigest;
- bool m_bInEncapsulatedX509Certificate;
- bool m_bInSigningTime;
- bool m_bInDigestValue;
- bool m_bInSignatureValue;
- bool m_bInDate;
- bool m_bInDescription;
- bool m_bInSignatureLineId;
- bool m_bInSignatureLineValidImage;
- bool m_bInSignatureLineInvalidImage;
+ class UnknownContext;
+ class ReferencedContextImpl;
+ class LoPGPOwnerContext;
+ class DsPGPKeyPacketContext;
+ class DsPGPKeyIDContext;
+ class DsPGPDataContext;
+ class DsX509CertificateContext;
+ class DsX509SerialNumberContext;
+ class DsX509IssuerNameContext;
+ class DsX509IssuerSerialContext;
+ class DsX509DataContext;
+ class DsKeyInfoContext;
+ class DsSignatureValueContext;
+ class DsDigestValueContext;
+ class DsDigestMethodContext;
+ class DsTransformContext;
+ class DsTransformsContext;
+ class DsReferenceContext;
+ class DsSignatureMethodContext;
+ class DsSignedInfoContext;
+ class XadesEncapsulatedX509CertificateContext;
+ class XadesCertificateValuesContext;
+ class XadesUnsignedSignaturePropertiesContext;
+ class XadesUnsignedPropertiesContext;
+ class LoSignatureLineIdContext;
+ class LoSignatureLineValidImageContext;
+ class LoSignatureLineInvalidImageContext;
+ class LoSignatureLineContext;
+ class XadesCertDigestContext;
+ class XadesCertContext;
+ class XadesSigningCertificateContext;
+ class XadesSigningTimeContext;
+ class XadesSignedSignaturePropertiesContext;
+ class XadesSignedPropertiesContext;
+ class XadesQualifyingPropertiesContext;
+ class DcDateContext;
+ class DcDescriptionContext;
+ class DsSignaturePropertyContext;
+ class DsSignaturePropertiesContext;
+ class DsObjectContext;
+ class DsSignatureContext;
+ class DsigSignaturesContext;
+
+ std::stack<std::unique_ptr<Context>> m_ContextStack;
+ std::unique_ptr<SvXMLNamespaceMap> m_pNamespaceMap;
/*
* the XSecController collaborating with XSecParser
@@ -101,22 +114,9 @@ private:
css::uno::Reference<
css::xml::sax::XDocumentHandler > m_xNextHandler;
- /*
- * this string is used to remember the current handled reference's URI,
- *
- * because it can be decided whether a stream reference is xml based or binary based
- * only after the Transforms element is read in, so we have to reserve the reference's
- * URI when the startElement event is met.
- */
- OUString m_currentReferenceURI;
- bool m_bReferenceUnresolved;
-
- // Relevant for ODF. The digest algorithm selected by the current DigestMethod element's
- // Algorithm attribute in the current Reference element. From css::xml::crypto::DigestID.
- sal_Int32 m_nReferenceDigestID;
XMLSignatureHelper& m_rXMLSignatureHelper;
-private:
+ OUString HandleIdAttr(css::uno::Reference<css::xml::sax::XAttributeList> const& xAttrs);
static OUString getIdAttr(const css::uno::Reference<
css::xml::sax::XAttributeList >& xAttribs );
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index 4d1b89949feb..fd33a320d9bd 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -33,10 +33,6 @@ namespace com::sun::star::graphic { class XGraphic; }
using namespace css;
using namespace css::uno;
using namespace css::graphic;
-namespace cssu = com::sun::star::uno;
-namespace cssl = com::sun::star::lang;
-namespace cssxc = com::sun::star::xml::crypto;
-namespace cssxs = com::sun::star::xml::sax;
/* protected: for signature generation */
OUString XSecController::createId()
@@ -54,7 +50,7 @@ OUString XSecController::createId()
return OUString::createFromAscii(str);
}
-cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepareSignatureToWrite(
+css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > XSecController::prepareSignatureToWrite(
InternalSignatureInformation& internalSignatureInfor,
sal_Int32 nStorageFormat,
bool bXAdESCompliantIfODF)
@@ -65,13 +61,13 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
sal_Int32 nIdOfSignatureElementCollector;
nIdOfSignatureElementCollector =
- m_xSAXEventKeeper->addSecurityElementCollector( cssxc::sax::ElementMarkPriority_AFTERMODIFY, true );
+ m_xSAXEventKeeper->addSecurityElementCollector( css::xml::crypto::sax::ElementMarkPriority_AFTERMODIFY, true );
m_xSAXEventKeeper->setSecurityId(nIdOfSignatureElementCollector, nSecurityId);
rtl::Reference<SignatureCreatorImpl> xSignatureCreator(new SignatureCreatorImpl);
- cssu::Sequence<cssu::Any> args(5);
+ css::uno::Sequence<css::uno::Any> args(5);
args[0] <<= OUString::number(nSecurityId);
args[1] <<= uno::Reference<xml::crypto::sax::XSecuritySAXEventKeeper>(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), uno::UNO_QUERY);
args[2] <<= OUString::number(nIdOfSignatureElementCollector);
@@ -116,7 +112,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
{
const SignatureReferenceInformation& refInfor = vReferenceInfors[i];
- cssu::Reference< css::io::XInputStream > xInputStream
+ css::uno::Reference< css::io::XInputStream > xInputStream
= getObjectInputStream( refInfor.ouURI );
if (xInputStream.is())
@@ -127,13 +123,13 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
// use sha512 for gpg signing unconditionally
const sal_Int32 digestID = !internalSignatureInfor.signatureInfor.ouGpgCertificate.isEmpty()?
- cssxc::DigestID::SHA512 : (bXAdESCompliantIfODF ? cssxc::DigestID::SHA256 : cssxc::DigestID::SHA1);
+ css::xml::crypto::DigestID::SHA512 : (bXAdESCompliantIfODF ? css::xml::crypto::DigestID::SHA256 : css::xml::crypto::DigestID::SHA1);
if (nStorageFormat != embed::StorageFormats::OFOPXML)
{
internalSignatureInfor.signatureInfor.ouSignatureId = createId();
- internalSignatureInfor.signatureInfor.ouPropertyId = createId();
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouPropertyId, -1, OUString() );
+ internalSignatureInfor.signatureInfor.ouDateTimePropertyId = createId();
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, internalSignatureInfor.signatureInfor.ouDateTimePropertyId, -1, OUString() );
size++;
if (bXAdESCompliantIfODF)
@@ -178,7 +174,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, bool isBinary, bool bXAdESCompliantIfODF)
{
const SignatureReferenceType type = isBinary ? SignatureReferenceType::BINARYSTREAM : SignatureReferenceType::XMLSTREAM;
- sal_Int32 digestID = bXAdESCompliantIfODF ? cssxc::DigestID::SHA256 : cssxc::DigestID::SHA1;
+ sal_Int32 digestID = bXAdESCompliantIfODF ? css::xml::crypto::DigestID::SHA256 : css::xml::crypto::DigestID::SHA1;
int index = findSignatureInfor( securityId );
@@ -192,11 +188,12 @@ void XSecController::signAStream( sal_Int32 securityId, const OUString& uri, boo
{
// use sha512 for gpg signing unconditionally
if (!m_vInternalSignatureInformations[index].signatureInfor.ouGpgCertificate.isEmpty())
- digestID = cssxc::DigestID::SHA512;
+ digestID = css::xml::crypto::DigestID::SHA512;
m_vInternalSignatureInformations[index].addReference(type, digestID, uri, -1, OUString());
}
}
+// note: this is called when creating a new signature from scratch
void XSecController::setX509Certificate(
sal_Int32 nSecurityId,
const OUString& ouX509IssuerName,
@@ -210,10 +207,13 @@ void XSecController::setX509Certificate(
if ( index == -1 )
{
InternalSignatureInformation isi(nSecurityId, nullptr);
- isi.signatureInfor.ouX509IssuerName = ouX509IssuerName;
- isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber;
- isi.signatureInfor.ouX509Certificate = ouX509Cert;
- isi.signatureInfor.ouCertDigest = ouX509CertDigest;
+ isi.signatureInfor.X509Datas.clear();
+ isi.signatureInfor.X509Datas.emplace_back();
+ isi.signatureInfor.X509Datas.back().emplace_back();
+ isi.signatureInfor.X509Datas.back().back().X509IssuerName = ouX509IssuerName;
+ isi.signatureInfor.X509Datas.back().back().X509SerialNumber = ouX509SerialNumber;
+ isi.signatureInfor.X509Datas.back().back().X509Certificate = ouX509Cert;
+ isi.signatureInfor.X509Datas.back().back().CertDigest = ouX509CertDigest;
isi.signatureInfor.eAlgorithmID = eAlgorithmID;
m_vInternalSignatureInformations.push_back( isi );
}
@@ -221,16 +221,19 @@ void XSecController::setX509Certificate(
{
SignatureInformation &si
= m_vInternalSignatureInformations[index].signatureInfor;
- si.ouX509IssuerName = ouX509IssuerName;
- si.ouX509SerialNumber = ouX509SerialNumber;
- si.ouX509Certificate = ouX509Cert;
- si.ouCertDigest = ouX509CertDigest;
+ si.X509Datas.clear();
+ si.X509Datas.emplace_back();
+ si.X509Datas.back().emplace_back();
+ si.X509Datas.back().back().X509IssuerName = ouX509IssuerName;
+ si.X509Datas.back().back().X509SerialNumber = ouX509SerialNumber;
+ si.X509Datas.back().back().X509Certificate = ouX509Cert;
+ si.X509Datas.back().back().CertDigest = ouX509CertDigest;
}
}
void XSecController::setGpgCertificate(
sal_Int32 nSecurityId,
- const OUString& ouCertDigest,
+ const OUString& ouKeyDigest,
const OUString& ouCert,
const OUString& ouOwner)
{
@@ -241,16 +244,17 @@ void XSecController::setGpgCertificate(
InternalSignatureInformation isi(nSecurityId, nullptr);
isi.signatureInfor.ouGpgCertificate = ouCert;
isi.signatureInfor.ouGpgOwner = ouOwner;
- isi.signatureInfor.ouCertDigest = ouCertDigest;
+ isi.signatureInfor.ouGpgKeyID = ouKeyDigest;
m_vInternalSignatureInformations.push_back( isi );
}
else
{
SignatureInformation &si
= m_vInternalSignatureInformations[index].signatureInfor;
+ si.X509Datas.clear(); // it is a PGP signature now
si.ouGpgCertificate = ouCert;
si.ouGpgOwner = ouOwner;
- si.ouCertDigest = ouCertDigest;
+ si.ouGpgKeyID = ouKeyDigest;
}
}
@@ -347,7 +351,7 @@ void XSecController::setSignatureLineInvalidGraphic(
}
bool XSecController::WriteSignature(
- const cssu::Reference<cssxs::XDocumentHandler>& xDocumentHandler,
+ const css::uno::Reference<css::xml::sax::XDocumentHandler>& xDocumentHandler,
bool bXAdESCompliantIfODF )
{
bool rc = false;
@@ -373,7 +377,7 @@ bool XSecController::WriteSignature(
/*
* export the signature template
*/
- cssu::Reference<cssxs::XDocumentHandler> xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()),cssu::UNO_QUERY);
+ css::uno::Reference<css::xml::sax::XDocumentHandler> xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()),css::uno::UNO_QUERY);
int i;
int sigNum = m_vInternalSignatureInformations.size();
@@ -394,7 +398,7 @@ bool XSecController::WriteSignature(
rc = true;
}
- catch( cssu::Exception& )
+ catch( css::uno::Exception& )
{
}
@@ -422,7 +426,7 @@ bool XSecController::WriteOOXMLSignature(const uno::Reference<embed::XStorage>&
try
{
// Export the signature template.
- cssu::Reference<xml::sax::XDocumentHandler> xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), uno::UNO_QUERY);
+ css::uno::Reference<xml::sax::XDocumentHandler> xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), uno::UNO_QUERY);
for (InternalSignatureInformation & rInformation : m_vInternalSignatureInformations)
{
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 1f7fa9ac8ca8..1b34afef6c2a 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -22,6 +22,7 @@
#include <xsecctl.hxx>
#include "xsecparser.hxx"
#include "ooxmlsecparser.hxx"
+#include <biginteger.hxx>
#include <framework/signatureverifierimpl.hxx>
#include <framework/saxeventkeeperimpl.hxx>
#include <gpg/xmlsignature_gpgimpl.hxx>
@@ -46,13 +47,9 @@ namespace com::sun::star::graphic { class XGraphic; }
using namespace css;
using namespace css::uno;
using namespace css::beans;
-namespace cssu = com::sun::star::uno;
-namespace cssl = com::sun::star::lang;
-namespace cssxc = com::sun::star::xml::crypto;
-namespace cssxs = com::sun::star::xml::sax;
/* protected: for signature verify */
-cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepareSignatureToRead(
+css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > XSecController::prepareSignatureToRead(
sal_Int32 nSecurityId)
{
if ( m_eStatusOfSecurityComponents != InitializationState::INITIALIZED )
@@ -61,10 +58,10 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
}
sal_Int32 nIdOfSignatureElementCollector;
- cssu::Reference< cssxc::sax::XReferenceResolvedListener > xReferenceResolvedListener;
+ css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > xReferenceResolvedListener;
nIdOfSignatureElementCollector =
- m_xSAXEventKeeper->addSecurityElementCollector( cssxc::sax::ElementMarkPriority_BEFOREMODIFY, false);
+ m_xSAXEventKeeper->addSecurityElementCollector( css::xml::crypto::sax::ElementMarkPriority_BEFOREMODIFY, false);
m_xSAXEventKeeper->setSecurityId(nIdOfSignatureElementCollector, nSecurityId);
@@ -73,9 +70,9 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
*/
xReferenceResolvedListener = new SignatureVerifierImpl;
- cssu::Reference<cssl::XInitialization> xInitialization(xReferenceResolvedListener, cssu::UNO_QUERY);
+ css::uno::Reference<css::lang::XInitialization> xInitialization(xReferenceResolvedListener, css::uno::UNO_QUERY);
- cssu::Sequence<cssu::Any> args(5);
+ css::uno::Sequence<css::uno::Any> args(5);
args[0] <<= OUString::number(nSecurityId);
args[1] <<= uno::Reference<xml::crypto::sax::XSecuritySAXEventKeeper>(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), uno::UNO_QUERY);
args[2] <<= OUString::number(nIdOfSignatureElementCollector);
@@ -83,8 +80,8 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
args[4] <<= m_xXMLSignature;
xInitialization->initialize(args);
- cssu::Reference< cssxc::sax::XSignatureVerifyResultBroadcaster >
- signatureVerifyResultBroadcaster(xReferenceResolvedListener, cssu::UNO_QUERY);
+ css::uno::Reference< css::xml::crypto::sax::XSignatureVerifyResultBroadcaster >
+ signatureVerifyResultBroadcaster(xReferenceResolvedListener, css::uno::UNO_QUERY);
signatureVerifyResultBroadcaster->addSignatureVerifyResultListener( this );
@@ -92,7 +89,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
nIdOfSignatureElementCollector,
xReferenceResolvedListener);
- cssu::Reference<cssxc::sax::XKeyCollector> keyCollector (xReferenceResolvedListener, cssu::UNO_QUERY);
+ css::uno::Reference<css::xml::crypto::sax::XKeyCollector> keyCollector (xReferenceResolvedListener, css::uno::UNO_QUERY);
keyCollector->setKeyId(0);
return xReferenceResolvedListener;
@@ -100,7 +97,7 @@ cssu::Reference< cssxc::sax::XReferenceResolvedListener > XSecController::prepar
void XSecController::addSignature()
{
- cssu::Reference< cssxc::sax::XReferenceResolvedListener > xReferenceResolvedListener;
+ css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > xReferenceResolvedListener;
sal_Int32 nSignatureId = 0;
@@ -147,6 +144,25 @@ void XSecController::switchGpgSignature()
#endif
}
+bool XSecController::haveReferenceForId(OUString const& rId) const
+{
+ if (m_vInternalSignatureInformations.empty())
+ {
+ SAL_INFO("xmlsecurity.helper","XSecController::haveReferenceForId: no signature");
+ return false;
+ }
+ InternalSignatureInformation const& rIsi(m_vInternalSignatureInformations.back());
+ for (SignatureReferenceInformation const& rSri : rIsi.signatureInfor.vSignatureReferenceInfors)
+ {
+ if (rSri.nType == SignatureReferenceType::SAMEDOCUMENT
+ && rSri.ouURI == rId) // ouUri has # stripped
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
void XSecController::addReference( const OUString& ouUri, sal_Int32 nDigestID, const OUString& ouType )
{
if (m_vInternalSignatureInformations.empty())
@@ -177,13 +193,13 @@ void XSecController::addStreamReference(
/*
* get the input stream
*/
- cssu::Reference< css::io::XInputStream > xObjectInputStream
+ css::uno::Reference< css::io::XInputStream > xObjectInputStream
= getObjectInputStream( ouUri );
if ( xObjectInputStream.is() )
{
- cssu::Reference<cssxc::XUriBinding> xUriBinding
- (isi.xReferenceResolvedListener, cssu::UNO_QUERY);
+ css::uno::Reference<css::xml::crypto::XUriBinding> xUriBinding
+ (isi.xReferenceResolvedListener, css::uno::UNO_QUERY);
xUriBinding->setUriBinding(ouUri, xObjectInputStream);
}
}
@@ -219,13 +235,15 @@ void XSecController::setReferenceCount() const
}
}
- cssu::Reference<cssxc::sax::XReferenceCollector> xReferenceCollector
- (isi.xReferenceResolvedListener, cssu::UNO_QUERY);
+ css::uno::Reference<css::xml::crypto::sax::XReferenceCollector> xReferenceCollector
+ (isi.xReferenceResolvedListener, css::uno::UNO_QUERY);
xReferenceCollector->setReferenceCount( referenceCount );
}
}
-void XSecController::setX509IssuerName( OUString const & ouX509IssuerName )
+void XSecController::setX509Data(
+ std::vector<std::pair<OUString, OUString>> & rX509IssuerSerials,
+ std::vector<OUString> const& rX509Certificates)
{
if (m_vInternalSignatureInformations.empty())
{
@@ -233,29 +251,52 @@ void XSecController::setX509IssuerName( OUString const & ouX509IssuerName )
return;
}
InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
- isi.signatureInfor.ouX509IssuerName = ouX509IssuerName;
-}
-
-void XSecController::setX509SerialNumber( OUString const & ouX509SerialNumber )
-{
- if (m_vInternalSignatureInformations.empty())
+ SignatureInformation::X509Data data;
+ // due to the excessive flexibility of the spec it's possible that there
+ // is both a reference to a cert and the cert itself in one X509Data
+ for (OUString const& it : rX509Certificates)
{
- SAL_INFO("xmlsecurity.helper","XSecController::setX509SerialNumber: no signature");
- return;
+ try
+ {
+ data.emplace_back();
+ data.back().X509Certificate = it;
+ uno::Reference<xml::crypto::XSecurityEnvironment> const xSecEnv(m_xSecurityContext->getSecurityEnvironment());
+ uno::Reference<security::XCertificate> const xCert(xSecEnv->createCertificateFromAscii(it));
+ if (!xCert.is())
+ {
+ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate");
+ continue; // will be handled in CheckX509Data
+ }
+ OUString const issuerName(xCert->getIssuerName());
+ OUString const serialNumber(xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber()));
+ auto const iter = std::find_if(rX509IssuerSerials.begin(), rX509IssuerSerials.end(),
+ [&](auto const& rX509IssuerSerial) {
+ return xmlsecurity::EqualDistinguishedNames(issuerName, rX509IssuerSerial.first, xmlsecurity::COMPAT_2ND)
+ && serialNumber == rX509IssuerSerial.second;
+ });
+ if (iter != rX509IssuerSerials.end())
+ {
+ data.back().X509IssuerName = iter->first;
+ data.back().X509SerialNumber = iter->second;
+ rX509IssuerSerials.erase(iter);
+ }
+ }
+ catch (uno::Exception const&)
+ {
+ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate");
+ }
}
- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
- isi.signatureInfor.ouX509SerialNumber = ouX509SerialNumber;
-}
-
-void XSecController::setX509Certificate( OUString const & ouX509Certificate )
-{
- if (m_vInternalSignatureInformations.empty())
+ // now handle any that are left...
+ for (auto const& it : rX509IssuerSerials)
{
- SAL_INFO("xmlsecurity.helper","XSecController::setX509Certificate: no signature");
- return;
+ data.emplace_back();
+ data.back().X509IssuerName = it.first;
+ data.back().X509SerialNumber = it.second;
+ }
+ if (!data.empty())
+ {
+ isi.signatureInfor.X509Datas.push_back(data);
}
- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
- isi.signatureInfor.ouX509Certificate = ouX509Certificate;
}
void XSecController::setSignatureValue( OUString const & ouSignatureValue )
@@ -321,7 +362,7 @@ void XSecController::setGpgOwner( OUString const & ouGpgOwner )
isi.signatureInfor.ouGpgOwner = ouGpgOwner;
}
-void XSecController::setDate( OUString const & ouDate )
+void XSecController::setDate(OUString const& rId, OUString const& ouDate)
{
if (m_vInternalSignatureInformations.empty())
{
@@ -329,17 +370,31 @@ void XSecController::setDate( OUString const & ouDate )
return;
}
InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
+ // there may be multiple timestamps in a signature - check them for consistency
+ if (!isi.signatureInfor.ouDateTime.isEmpty()
+ && isi.signatureInfor.ouDateTime != ouDate)
+ {
+ isi.signatureInfor.hasInconsistentSigningTime = true;
+ }
(void)utl::ISO8601parseDateTime( ouDate, isi.signatureInfor.stDateTime);
isi.signatureInfor.ouDateTime = ouDate;
+ if (!rId.isEmpty())
+ {
+ isi.signatureInfor.ouDateTimePropertyId = rId;
+ }
}
-void XSecController::setDescription(const OUString& rDescription)
+void XSecController::setDescription(OUString const& rId, OUString const& rDescription)
{
if (m_vInternalSignatureInformations.empty())
return;
InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back();
rInformation.signatureInfor.ouDescription = rDescription;
+ if (!rId.isEmpty())
+ {
+ rInformation.signatureInfor.ouDescriptionPropertyId = rId;
+ }
}
void XSecController::setSignatureBytes(const uno::Sequence<sal_Int8>& rBytes)
@@ -351,13 +406,67 @@ void XSecController::setSignatureBytes(const uno::Sequence<sal_Int8>& rBytes)
rInformation.signatureInfor.aSignatureBytes = rBytes;
}
-void XSecController::setCertDigest(const OUString& rCertDigest)
+void XSecController::setX509CertDigest(
+ OUString const& rCertDigest, sal_Int32 const /*TODO nReferenceDigestID*/,
+ OUString const& rX509IssuerName, OUString const& rX509SerialNumber)
{
if (m_vInternalSignatureInformations.empty())
return;
InternalSignatureInformation& rInformation = m_vInternalSignatureInformations.back();
- rInformation.signatureInfor.ouCertDigest = rCertDigest;
+ for (auto & rData : rInformation.signatureInfor.X509Datas)
+ {
+ for (auto & it : rData)
+ {
+ if (xmlsecurity::EqualDistinguishedNames(it.X509IssuerName, rX509IssuerName, xmlsecurity::COMPAT_BOTH)
+ && it.X509SerialNumber == rX509SerialNumber)
+ {
+ it.CertDigest = rCertDigest;
+ return;
+ }
+ }
+ }
+ // fall-back: read the actual certificates
+ for (auto & rData : rInformation.signatureInfor.X509Datas)
+ {
+ for (auto & it : rData)
+ {
+ if (!it.X509Certificate.isEmpty())
+ {
+ try
+ {
+ uno::Reference<xml::crypto::XSecurityEnvironment> const xSecEnv(m_xSecurityContext->getSecurityEnvironment());
+ uno::Reference<security::XCertificate> const xCert(xSecEnv->createCertificateFromAscii(it.X509Certificate));
+ if (!xCert.is())
+ {
+ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate");
+ }
+ else if (xmlsecurity::EqualDistinguishedNames(xCert->getIssuerName(), rX509IssuerName, xmlsecurity::COMPAT_2ND)
+ && xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber()) == rX509SerialNumber)
+ {
+ it.CertDigest = rCertDigest;
+ // note: testInsertCertificate_PEM_DOCX requires these!
+ it.X509SerialNumber = rX509SerialNumber;
+ it.X509IssuerName = rX509IssuerName;
+ return;
+ }
+ }
+ catch (uno::Exception const&)
+ {
+ SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate");
+ }
+ }
+ }
+ }
+ if (!rInformation.signatureInfor.ouGpgCertificate.isEmpty())
+ {
+ SAL_INFO_IF(rCertDigest != rInformation.signatureInfor.ouGpgKeyID,
+ "xmlsecurity.helper", "PGPKeyID vs CertDigest mismatch");
+ }
+ else
+ {
+ SAL_INFO("xmlsecurity.helper", "cannot find X509Data for CertDigest");
+ }
}
namespace {
@@ -433,27 +542,6 @@ void XSecController::setId( OUString const & ouId )
isi.signatureInfor.ouSignatureId = ouId;
}
-void XSecController::setPropertyId( OUString const & ouPropertyId )
-{
- if (m_vInternalSignatureInformations.empty())
- {
- SAL_INFO("xmlsecurity.helper","XSecController::setPropertyId: no signature");
- return;
- }
- InternalSignatureInformation &isi = m_vInternalSignatureInformations.back();
-
- if (isi.signatureInfor.ouPropertyId.isEmpty())
- {
- // <SignatureProperty> ID attribute is for the date.
- isi.signatureInfor.ouPropertyId = ouPropertyId;
- }
- else
- {
- // <SignatureProperty> ID attribute is for the description.
- isi.signatureInfor.ouDescriptionPropertyId = ouPropertyId;
- }
-}
-
/* public: for signature verify */
void XSecController::collectToVerify( const OUString& referenceId )
{
@@ -465,7 +553,7 @@ void XSecController::collectToVerify( const OUString& referenceId )
*/
{
bool bJustChainingOn = false;
- cssu::Reference< cssxs::XDocumentHandler > xHandler;
+ css::uno::Reference< css::xml::sax::XDocumentHandler > xHandler;
int i,j;
int sigNum = m_vInternalSignatureInformations.size();
@@ -489,10 +577,10 @@ void XSecController::collectToVerify( const OUString& referenceId )
}
sal_Int32 nKeeperId = m_xSAXEventKeeper->addSecurityElementCollector(
- cssxc::sax::ElementMarkPriority_BEFOREMODIFY, false );
+ css::xml::crypto::sax::ElementMarkPriority_BEFOREMODIFY, false );
- cssu::Reference<cssxc::sax::XReferenceCollector> xReferenceCollector
- ( isi.xReferenceResolvedListener, cssu::UNO_QUERY );
+ css::uno::Reference<css::xml::crypto::sax::XReferenceCollector> xReferenceCollector
+ ( isi.xReferenceResolvedListener, css::uno::UNO_QUERY );
m_xSAXEventKeeper->setSecurityId(nKeeperId, isi.signatureInfor.nSecurityId);
m_xSAXEventKeeper->addReferenceResolvedListener( nKeeperId, isi.xReferenceResolvedListener);
@@ -506,7 +594,6 @@ void XSecController::collectToVerify( const OUString& referenceId )
if ( bJustChainingOn )
{
- cssu::Reference< cssxs::XDocumentHandler > xSEKHandler(static_cast<cppu::OWeakObject*>(m_xSAXEventKeeper.get()), cssu::UNO_QUERY);
m_xSAXEventKeeper->setNextHandler(xHandler);
}
}
@@ -520,13 +607,13 @@ void XSecController::addSignature( sal_Int32 nSignatureId )
m_bVerifyCurrentSignature = true;
}
-cssu::Reference< cssxs::XDocumentHandler > const & XSecController::createSignatureReader(XMLSignatureHelper& rXMLSignatureHelper, sal_Int32 nType)
+css::uno::Reference< css::xml::sax::XDocumentHandler > const & XSecController::createSignatureReader(XMLSignatureHelper& rXMLSignatureHelper, sal_Int32 nType)
{
if (nType == embed::StorageFormats::OFOPXML)
m_xSecParser = new OOXMLSecParser(rXMLSignatureHelper, this);
else
m_xSecParser = new XSecParser(rXMLSignatureHelper, this);
- cssu::Reference< cssl::XInitialization > xInitialization(m_xSecParser, uno::UNO_QUERY);
+ css::uno::Reference< css::lang::XInitialization > xInitialization(m_xSecParser, uno::UNO_QUERY);
setSAXChainConnector(xInitialization);
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index d9b657891b96..554802cdcf08 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -747,6 +747,61 @@ static HCERTSTORE getCertStoreForIntermediatCerts(
return store;
}
+static bool CheckUnitTestStore(PCCERT_CHAIN_CONTEXT const pChainContext, DWORD ignoreFlags)
+{
+ bool ret = false;
+ OUString const v("LIBO_TEST_CRYPTOAPI_PKCS7");
+ OUString var;
+ if (osl_Process_E_None != osl_getEnvironment(v.pData, &var.pData))
+ {
+ return ret;
+ }
+ if (pChainContext->cChain == 0)
+ {
+ return ret;
+ }
+ PCERT_SIMPLE_CHAIN pSimpleChain = pChainContext->rgpChain[0];
+ // check if untrusted root is the only problem
+ if (pSimpleChain->TrustStatus.dwErrorStatus & ~(CERT_TRUST_IS_UNTRUSTED_ROOT | ignoreFlags))
+ {
+ return ret;
+ }
+
+ // leak this store, re-opening is a waste of time in tests
+ static HCERTSTORE const hExtra = CertOpenStore(
+ CERT_STORE_PROV_FILENAME,
+ PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
+ NULL,
+ CERT_STORE_OPEN_EXISTING_FLAG | CERT_STORE_READONLY_FLAG,
+ OUString(var + "/test.p7b").getStr());
+ assert(hExtra != NULL);
+ if (pSimpleChain->cElement < 1)
+ {
+ SAL_WARN("xmlsecurity.xmlsec", "unexpected empty chain");
+ return ret;
+ }
+ PCCERT_CONTEXT const pRoot(pSimpleChain->rgpElement[pSimpleChain->cElement-1]->pCertContext);
+ PCCERT_CONTEXT const pIssuerCert = CertFindCertificateInStore(
+ hExtra,
+ PKCS_7_ASN_ENCODING | X509_ASN_ENCODING,
+ 0,
+ CERT_FIND_SUBJECT_NAME,
+ &pRoot->pCertInfo->Subject,
+ NULL);
+ if (pIssuerCert)
+ {
+ // check that it signed itself
+ DWORD flags = CERT_STORE_SIGNATURE_FLAG;
+ BOOL result = CertVerifySubjectCertificateContext(pRoot, pIssuerCert, &flags);
+ if (result == TRUE && flags == 0)
+ {
+ ret = true;
+ }
+ }
+ CertFreeCertificateContext(pIssuerCert);
+ return ret;
+}
+
//We return only valid or invalid, as long as the API documentation expresses
//explicitly that all validation steps are carried out even if one or several
//errors occur. See also
@@ -755,7 +810,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
const uno::Reference< css::security::XCertificate >& aCert,
const uno::Sequence< uno::Reference< css::security::XCertificate > >& seqCerts)
{
- sal_Int32 validity = 0;
+ sal_Int32 validity = css::security::CertificateValidity::INVALID;
PCCERT_CHAIN_CONTEXT pChainContext = nullptr;
PCCERT_CONTEXT pCertContext = nullptr;
@@ -849,7 +904,8 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
DWORD revocationFlags = CERT_TRUST_REVOCATION_STATUS_UNKNOWN |
CERT_TRUST_IS_OFFLINE_REVOCATION;
DWORD otherErrorsMask = ~revocationFlags;
- if( !(pSimpleChain->TrustStatus.dwErrorStatus & otherErrorsMask))
+ if (!(pSimpleChain->TrustStatus.dwErrorStatus & otherErrorsMask)
+ || CheckUnitTestStore(pChainContext, revocationFlags))
{
//No errors except maybe those caused by missing revocation information
@@ -878,6 +934,11 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
SAL_INFO("xmlsecurity.xmlsec", "Certificate is valid.");
validity = css::security::CertificateValidity::VALID;
}
+ else if (CheckUnitTestStore(pChainContext, 0))
+ {
+ SAL_INFO("xmlsecurity.xmlsec", "root certificate found in extra test store");
+ validity = css::security::CertificateValidity::VALID;
+ }
else
{
SAL_INFO("xmlsecurity.xmlsec", "Certificate is invalid.");
@@ -899,7 +960,7 @@ sal_Int32 SecurityEnvironment_MSCryptImpl::verifyCertificate(
}
else
{
- SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChaine failed.");
+ SAL_INFO("xmlsecurity.xmlsec", "CertGetCertificateChain failed.");
}
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index 0e619b2802f8..da64b6c7e4c2 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -26,11 +26,13 @@
#include <cppuhelper/supportsservice.hxx>
#include "x509certificate_mscryptimpl.hxx"
#include <certificateextension_xmlsecimpl.hxx>
+#include <biginteger.hxx>
#include "sanextension_mscryptimpl.hxx"
#include "oid.hxx"
#include <rtl/locale.h>
+#include <rtl/ustrbuf.hxx>
#include <osl/nlsupport.h>
#include <osl/process.h>
#include <o3tl/char16_t2wchar_t.hxx>
@@ -649,4 +651,127 @@ Sequence<OUString> SAL_CALL X509Certificate_MSCryptImpl::getSupportedServiceName
return { OUString() };
}
+namespace xmlsecurity {
+
+// based on some guesswork and:
+// https://datatracker.ietf.org/doc/html/rfc1485
+// https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR
+// the main problem appears to be that in values NSS uses \ escapes but CryptoAPI requires " quotes around value
+static OUString CompatDNNSS(OUString const& rDN)
+{
+ OUStringBuffer buf(rDN.getLength());
+ enum { DEFAULT, INVALUE, INQUOTE } state(DEFAULT);
+ for (sal_Int32 i = 0; i < rDN.getLength(); ++i)
+ {
+ if (state == DEFAULT)
+ {
+ buf.append(rDN[i]);
+ if (rDN[i] == '=')
+ {
+ if (rDN.getLength() == i+1)
+ {
+ break; // invalid?
+ }
+ else
+ {
+ buf.append('"');
+ state = INVALUE;
+ }
+ }
+ }
+ else if (state == INVALUE)
+ {
+ if (rDN[i] == '+' || rDN[i] == ',' || rDN[i] == ';')
+ {
+ buf.append('"');
+ buf.append(rDN[i]);
+ state = DEFAULT;
+ }
+ else if (rDN[i] == '\\')
+ {
+ if (rDN.getLength() == i+1)
+ {
+ break; // invalid?
+ }
+ if (rDN[i+1] == '"')
+ {
+ buf.append('"');
+ }
+ buf.append(rDN[i+1]);
+ ++i;
+ }
+ else
+ {
+ buf.append(rDN[i]);
+ }
+ if (i+1 == rDN.getLength())
+ {
+ buf.append('"');
+ state = DEFAULT;
+ }
+ }
+ }
+ return buf.makeStringAndClear();
+}
+
+static bool EncodeDistinguishedName(OUString const& rName, CERT_NAME_BLOB & rBlob)
+{
+ LPCWSTR pszError;
+ if (!CertStrToNameW(X509_ASN_ENCODING,
+ reinterpret_cast<LPCWSTR>(rName.getStr()), CERT_X500_NAME_STR,
+ nullptr, nullptr, &rBlob.cbData, &pszError))
+ {
+ SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << WindowsErrorString(GetLastError()) << "; " << reinterpret_cast<char16_t const*>(pszError));
+ return false;
+ }
+ rBlob.pbData = new BYTE[rBlob.cbData];
+ if (!CertStrToNameW(X509_ASN_ENCODING,
+ reinterpret_cast<LPCWSTR>(rName.getStr()), CERT_X500_NAME_STR,
+ nullptr, rBlob.pbData, &rBlob.cbData, &pszError))
+ {
+ SAL_INFO("xmlsecurity.xmlsec", "CertStrToNameW failed: " << WindowsErrorString(GetLastError()) << "; " << reinterpret_cast<char16_t const*>(pszError));
+ return false;
+ }
+ return true;
+}
+
+bool EqualDistinguishedNames(
+ OUString const& rName1, OUString const& rName2,
+ EqualMode const eMode)
+{
+ if (eMode == COMPAT_BOTH && !rName1.isEmpty() && rName1 == rName2)
+ { // handle case where both need to be converted
+ return true;
+ }
+ CERT_NAME_BLOB blob1;
+ if (!EncodeDistinguishedName(rName1, blob1))
+ {
+ return false;
+ }
+ CERT_NAME_BLOB blob2;
+ bool ret(false);
+ if (!!EncodeDistinguishedName(rName2, blob2))
+ {
+ ret = CertCompareCertificateName(X509_ASN_ENCODING,
+ &blob1, &blob2) == TRUE;
+ delete[] blob2.pbData;
+ }
+ if (!ret && eMode == COMPAT_2ND)
+ {
+ CERT_NAME_BLOB blob2compat;
+ if (!EncodeDistinguishedName(CompatDNNSS(rName2), blob2compat))
+ {
+ delete[] blob1.pbData;
+ return false;
+ }
+ ret = CertCompareCertificateName(X509_ASN_ENCODING,
+ &blob1, &blob2compat) == TRUE;
+ delete[] blob2compat.pbData;
+ }
+ delete[] blob1.pbData;
+ return ret;
+}
+
+} // namespace xmlsecurity
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index a0acd81786d7..6e4ca3d4e2c0 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <sal/log.hxx>
#include <rtl/uuid.h>
#include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp>
@@ -228,6 +229,10 @@ SAL_CALL XMLSignature_MSCryptImpl::validate(
// We do certificate verification ourselves.
pDsigCtx->keyInfoReadCtx.flags |= XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
+ // limit possible key data to valid X509 certificates only, no KeyValues
+ if (xmlSecPtrListAdd(&(pDsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecMSCngKeyDataX509GetKlass()) < 0)
+ throw RuntimeException("failed to limit allowed key data");
+
//Verify signature
//The documentation says that the signature is only valid if the return value is 0 (that is, not < 0)
//AND pDsigCtx->status == xmlSecDSigStatusSucceeded. That is, we must not make any assumptions, if
@@ -250,6 +255,7 @@ SAL_CALL XMLSignature_MSCryptImpl::validate(
++nReferenceGood;
}
}
+ SAL_INFO("xmlsecurity.xmlsec", "xmlSecDSigCtxVerify status " << pDsigCtx->status << ", references good " << nReferenceGood << " of " << nReferenceCount);
if (rs == 0 && nReferenceCount == nReferenceGood)
{
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index 1a323d33f32f..39d4b4ee87eb 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -29,8 +29,11 @@
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ref.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <sal/log.hxx>
#include "x509certificate_nssimpl.hxx"
+#include <biginteger.hxx>
#include <certificateextension_xmlsecimpl.hxx>
#include "sanextension_nssimpl.hxx"
@@ -533,4 +536,109 @@ sal_Bool SAL_CALL X509Certificate_NssImpl::supportsService(const OUString& servi
/* XServiceInfo */
Sequence<OUString> SAL_CALL X509Certificate_NssImpl::getSupportedServiceNames() { return { OUString() }; }
+namespace xmlsecurity {
+
+// based on some guesswork and:
+// https://datatracker.ietf.org/doc/html/rfc1485
+// https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-certnametostra#CERT_X500_NAME_STR
+// the main problem appears to be that in values " is escaped as "" vs. \"
+static OUString CompatDNCryptoAPI(OUString const& rDN)
+{
+ OUStringBuffer buf(rDN.getLength());
+ enum { DEFAULT, INVALUE, INQUOTE } state(DEFAULT);
+ for (sal_Int32 i = 0; i < rDN.getLength(); ++i)
+ {
+ if (state == DEFAULT)
+ {
+ buf.append(rDN[i]);
+ if (rDN[i] == '=')
+ {
+ if (rDN.getLength() == i+1)
+ {
+ break; // invalid?
+ }
+ else if (rDN[i+1] == '"')
+ {
+ buf.append(rDN[i+1]);
+ ++i;
+ state = INQUOTE;
+ }
+ else
+ {
+ state = INVALUE;
+ }
+ }
+ }
+ else if (state == INVALUE)
+ {
+ if (rDN[i] == '+' || rDN[i] == ',' || rDN[i] == ';')
+ {
+ state = DEFAULT;
+ }
+ buf.append(rDN[i]);
+ }
+ else
+ {
+ assert(state == INQUOTE);
+ if (rDN[i] == '"')
+ {
+ if (rDN.getLength() != i+1 && rDN[i+1] == '"')
+ {
+ buf.append('\\');
+ buf.append(rDN[i+1]);
+ ++i;
+ }
+ else
+ {
+ buf.append(rDN[i]);
+ state = DEFAULT;
+ }
+ }
+ else
+ {
+ buf.append(rDN[i]);
+ }
+ }
+ }
+ return buf.makeStringAndClear();
+}
+
+bool EqualDistinguishedNames(
+ OUString const& rName1, OUString const& rName2,
+ EqualMode const eMode)
+{
+ if (eMode == COMPAT_BOTH && !rName1.isEmpty() && rName1 == rName2)
+ { // handle case where both need to be converted
+ return true;
+ }
+ CERTName *const pName1(CERT_AsciiToName(OUStringToOString(rName1, RTL_TEXTENCODING_UTF8).getStr()));
+ if (pName1 == nullptr)
+ {
+ return false;
+ }
+ CERTName *const pName2(CERT_AsciiToName(OUStringToOString(rName2, RTL_TEXTENCODING_UTF8).getStr()));
+ bool ret(false);
+ if (pName2)
+ {
+ ret = (CERT_CompareName(pName1, pName2) == SECEqual);
+ CERT_DestroyName(pName2);
+ }
+ if (!ret && eMode == COMPAT_2ND)
+ {
+ CERTName *const pName2Compat(CERT_AsciiToName(OUStringToOString(
+ CompatDNCryptoAPI(rName2), RTL_TEXTENCODING_UTF8).getStr()));
+ if (pName2Compat == nullptr)
+ {
+ CERT_DestroyName(pName1);
+ return false;
+ }
+ ret = CERT_CompareName(pName1, pName2Compat) == SECEqual;
+ CERT_DestroyName(pName2Compat);
+ }
+ CERT_DestroyName(pName1);
+ return ret;
+}
+
+} // namespace xmlsecurity
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index c39f6cc72f76..6f70f76d23be 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -26,6 +26,9 @@
#include "securityenvironment_nssimpl.hxx"
#include <xmlsec-wrapper.h>
+
+#include <sal/log.hxx>
+
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
#include <memory>
@@ -241,6 +244,10 @@ SAL_CALL XMLSignature_NssImpl::validate(
// We do certificate verification ourselves.
pDsigCtx->keyInfoReadCtx.flags |= XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
+ // limit possible key data to valid X509 certificates only, no KeyValues
+ if (xmlSecPtrListAdd(&(pDsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecNssKeyDataX509GetKlass()) < 0)
+ throw RuntimeException("failed to limit allowed key data");
+
//Verify signature
int rs = xmlSecDSigCtxVerify( pDsigCtx.get() , pNode );
@@ -257,6 +264,7 @@ SAL_CALL XMLSignature_NssImpl::validate(
++nReferenceGood;
}
}
+ SAL_INFO("xmlsecurity.xmlsec", "xmlSecDSigCtxVerify status " << pDsigCtx->status << ", references good " << nReferenceGood << " of " << nReferenceCount);
if (rs == 0 && pDsigCtx->status == xmlSecDSigStatusSucceeded && nReferenceCount == nReferenceGood)
{
diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx
index 1410eb5b0874..4f50e4d5c665 100644
--- a/xmlsecurity/source/xmlsec/saxhelper.cxx
+++ b/xmlsecurity/source/xmlsec/saxhelper.cxx
@@ -118,11 +118,12 @@ SAXHelper::SAXHelper( )
* compile error:
* xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS ;
*/
+SAL_WNODEPRECATED_DECLARATIONS_PUSH
xmlSubstituteEntitiesDefault(0) ;
-
#ifndef XMLSEC_NO_XSLT
xmlIndentTreeOutput = 1 ;
#endif /* XMLSEC_NO_XSLT */
+SAL_WNODEPRECATED_DECLARATIONS_POP
m_pParserCtxt = xmlNewParserCtxt() ;