summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules6
-rw-r--r--RepositoryExternal.mk36
-rw-r--r--avmedia/source/gstreamer/gstframegrabber.cxx14
-rwxr-xr-xbin/find-unneeded-includes1
-rwxr-xr-xbin/symstore.sh2
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx7
-rw-r--r--chart2/source/view/inc/PlottingPositionHelper.hxx4
-rw-r--r--compilerplugins/clang/test/unusedfields.cxx1
-rw-r--r--configure.ac28
-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/source/dialogs/about.cxx4
-rw-r--r--cui/source/inc/border.hxx6
-rw-r--r--cui/source/tabpages/border.cxx114
-rw-r--r--cui/uiconfig/ui/borderpage.ui594
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx3
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx6
-rw-r--r--desktop/source/app/cmdlineargs.cxx10
-rw-r--r--download.lst857
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx31
-rw-r--r--drawinglayer/source/tools/primitive2dxmldump.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx3
-rw-r--r--editeng/source/editeng/impedit2.cxx6
-rw-r--r--editeng/source/rtf/rtfitem.cxx4
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx68
-rw-r--r--embeddedobj/source/commonembedding/miscobj.cxx68
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx117
-rw-r--r--embeddedobj/source/commonembedding/specialobject.cxx9
-rw-r--r--embeddedobj/source/commonembedding/visobj.cxx8
-rw-r--r--embeddedobj/source/inc/commonembobj.hxx10
-rw-r--r--embeddedobj/source/inc/specialobject.hxx7
-rw-r--r--external/breakpad/UnpackedTarball_breakpad.mk1
-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/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.mk11
-rw-r--r--external/curl/UnpackedTarball_curl.mk2
-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.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/libassuan/ExternalProject_libassuan.mk3
-rw-r--r--external/libffi/ExternalPackage_libffi.mk20
-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.mk5
-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/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.mk2
-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/python-3.8-msvc-sdk.patch.1173
-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/zlib/UnpackedTarball_zlib.mk4
-rw-r--r--external/zlib/ubsan.patch11
-rw-r--r--filter/source/pdf/impdialog.cxx12
-rw-r--r--filter/source/xsltdialog/xmlfilterjar.hxx1
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx32
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx5
-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--framework/source/services/desktop.cxx21
-rw-r--r--framework/source/uielement/menubarmanager.cxx29
-rwxr-xr-xg18
-rw-r--r--helpcompiler/source/HelpCompiler.cxx10
-rw-r--r--helpcompiler/source/HelpLinker.cxx4
-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--i18nutil/source/utility/paper.cxx14
-rw-r--r--include/editeng/borderline.hxx23
-rw-r--r--include/editeng/editeng.hxx2
-rw-r--r--include/editeng/unoprnms.hxx2
-rw-r--r--include/i18nutil/paper.hxx2
-rw-r--r--include/o3tl/lru_map.hxx2
-rw-r--r--include/o3tl/safeint.hxx8
-rw-r--r--include/oox/vml/vmlshape.hxx1
-rw-r--r--include/oox/vml/vmlshapecontext.hxx2
-rw-r--r--include/sal/log.hxx5
-rw-r--r--include/sfx2/docmacromode.hxx4
-rw-r--r--include/sfx2/objsh.hxx6
-rw-r--r--include/sfx2/sidebar/SidebarPanelBase.hxx4
-rw-r--r--include/sfx2/strings.hrc3
-rw-r--r--include/sfx2/viewfrm.hxx1
-rw-r--r--include/svl/solar.hrc2
-rw-r--r--include/svtools/imageresourceaccess.hxx2
-rw-r--r--include/svx/framelinkarray.hxx3
-rw-r--r--include/svx/hexcolorcontrol.hxx2
-rw-r--r--include/svx/svdobj.hxx5
-rw-r--r--include/svx/svdoole2.hxx17
-rw-r--r--include/svx/unoshape.hxx8
-rw-r--r--include/svx/unoshprp.hxx6
-rw-r--r--include/tools/color.hxx21
-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/menu.hxx5
-rw-r--r--include/vcl/settings.hxx1
-rw-r--r--include/vcl/transfer.hxx4
-rw-r--r--include/vcl/treelistbox.hxx1
-rw-r--r--include/vcl/weld.hxx17
-rw-r--r--include/xmloff/xmltoken.hxx4
-rw-r--r--io/source/acceptor/acc_pipe.cxx2
-rw-r--r--io/source/acceptor/acc_socket.cxx1
-rw-r--r--io/source/connector/connector.cxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx16
-rw-r--r--jvmfwk/source/framework.cxx8
-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--odk/build-examples_common.mk2
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl25
-rw-r--r--offapi/com/sun/star/sheet/FilterFieldType.idl40
-rw-r--r--offapi/com/sun/star/sheet/FilterFieldValue.idl24
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs163
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx89
-rw-r--r--oox/source/docprop/ooxmldocpropimport.hxx6
-rw-r--r--oox/source/drawingml/textbodycontext.cxx11
-rw-r--r--oox/source/drawingml/textrun.cxx8
-rw-r--r--oox/source/export/vmlexport.cxx4
-rw-r--r--oox/source/ole/vbacontrol.cxx6
-rw-r--r--oox/source/token/namespaces-strict.txt1
-rw-r--r--oox/source/token/namespaces.txt1
-rw-r--r--oox/source/token/properties.txt2
-rw-r--r--oox/source/token/tokens.txt1
-rw-r--r--oox/source/vml/vmlshape.cxx7
-rw-r--r--oox/source/vml/vmlshapecontext.cxx7
-rw-r--r--pyuno/source/loader/pythonloader.py4
-rw-r--r--reportdesign/source/core/sdr/ReportDrawPage.cxx2
-rw-r--r--sal/osl/w32/file.cxx8
-rw-r--r--sax/source/fastparser/fastparser.cxx2
-rw-r--r--sc/inc/dbdata.hxx3
-rw-r--r--sc/inc/document.hxx9
-rw-r--r--sc/inc/documentimport.hxx2
-rw-r--r--sc/inc/editutil.hxx2
-rw-r--r--sc/inc/filterentries.hxx10
-rw-r--r--sc/inc/queryentry.hxx16
-rw-r--r--sc/inc/strings.hrc14
-rw-r--r--sc/inc/table.hxx6
-rw-r--r--sc/qa/extras/scpdfexport.cxx16
-rw-r--r--sc/qa/extras/testdocuments/forcepoint97.xlsxbin0 -> 21127 bytes
-rwxr-xr-xsc/qa/uitest/autofilter/tdf46184.py86
-rw-r--r--sc/qa/uitest/calc_tests7/tdf150044.py85
-rw-r--r--sc/qa/unit/data/ods/autofilter-colors.odsbin0 -> 10991 bytes
-rw-r--r--sc/qa/unit/data/ods/tdf142578.odsbin0 -> 10954 bytes
-rw-r--r--sc/qa/unit/data/ods/tdf145059.odsbin0 -> 15610 bytes
-rw-r--r--sc/qa/unit/data/xlsx/autofilter-colors-fg.xlsxbin0 -> 10750 bytes
-rw-r--r--sc/qa/unit/data/xlsx/autofilter-colors.xlsxbin0 -> 10708 bytes
-rw-r--r--sc/qa/unit/data/xlsx/forcepoint107.xlsxbin0 -> 398436 bytes
-rw-r--r--sc/qa/unit/data/xlsx/tdf145054.xlsxbin0 -> 10750 bytes
-rw-r--r--sc/qa/unit/data/xlsx/tdf145057.xlsxbin0 -> 10417 bytes
-rw-r--r--sc/qa/unit/filters-test.cxx9
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx186
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx15
-rw-r--r--sc/source/core/data/colorscale.cxx6
-rw-r--r--sc/source/core/data/column3.cxx79
-rw-r--r--sc/source/core/data/dociter.cxx4
-rw-r--r--sc/source/core/data/documen2.cxx2
-rw-r--r--sc/source/core/data/document.cxx18
-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/formulacell.cxx6
-rw-r--r--sc/source/core/data/global.cxx7
-rw-r--r--sc/source/core/data/stlpool.cxx2
-rwxr-xr-xsc/source/core/data/table1.cxx23
-rw-r--r--sc/source/core/data/table2.cxx40
-rw-r--r--sc/source/core/data/table3.cxx103
-rw-r--r--sc/source/core/inc/interpre.hxx12
-rw-r--r--sc/source/core/tool/autoform.cxx2
-rw-r--r--sc/source/core/tool/compiler.cxx9
-rw-r--r--sc/source/core/tool/dbdata.cxx77
-rw-r--r--sc/source/core/tool/editutil.cxx7
-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.cxx27
-rw-r--r--sc/source/core/tool/interpr7.cxx4
-rw-r--r--sc/source/core/tool/queryentry.cxx43
-rw-r--r--sc/source/filter/excel/excrecds.cxx45
-rw-r--r--sc/source/filter/excel/xestyle.cxx122
-rw-r--r--sc/source/filter/excel/xlstyle.cxx7
-rw-r--r--sc/source/filter/html/htmlpars.cxx4
-rw-r--r--sc/source/filter/inc/autofilterbuffer.hxx23
-rw-r--r--sc/source/filter/inc/excrecds.hxx4
-rw-r--r--sc/source/filter/inc/xestyle.hxx10
-rw-r--r--sc/source/filter/inc/xlstyle.hxx1
-rw-r--r--sc/source/filter/lotus/lotattr.cxx6
-rw-r--r--sc/source/filter/lotus/op.cxx11
-rw-r--r--sc/source/filter/oox/autofilterbuffer.cxx66
-rw-r--r--sc/source/filter/oox/autofiltercontext.cxx5
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx16
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx7
-rw-r--r--sc/source/filter/orcus/filterdetect.cxx8
-rw-r--r--sc/source/filter/rtf/eeimpars.cxx2
-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.cxx39
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx60
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx17
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx2
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx243
-rw-r--r--sc/source/ui/docshell/docfunc.cxx50
-rw-r--r--sc/source/ui/docshell/docsh.cxx8
-rw-r--r--sc/source/ui/docshell/docsh5.cxx2
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx9
-rw-r--r--sc/source/ui/inc/checklistmenu.hxx12
-rw-r--r--sc/source/ui/inc/docfunc.hxx2
-rw-r--r--sc/source/ui/inc/filtdlg.hxx11
-rw-r--r--sc/source/ui/inc/gridwin.hxx20
-rw-r--r--sc/source/ui/inc/viewfunc.hxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx18
-rw-r--r--sc/source/ui/sidebar/CellBorderStyleControl.cxx24
-rw-r--r--sc/source/ui/sidebar/CellLineStyleControl.cxx103
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.cxx31
-rw-r--r--sc/source/ui/sidebar/CellLineStyleValueSet.hxx4
-rw-r--r--sc/source/ui/undo/undobase.cxx2
-rw-r--r--sc/source/ui/undo/undoblk.cxx6
-rw-r--r--sc/source/ui/undo/undoblk3.cxx6
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx3
-rw-r--r--sc/source/ui/unoobj/datauno.cxx26
-rw-r--r--sc/source/ui/view/gridwin.cxx132
-rw-r--r--sc/source/ui/view/gridwin4.cxx73
-rw-r--r--sc/source/ui/view/output2.cxx7
-rw-r--r--sc/source/ui/view/tabview3.cxx1
-rw-r--r--sc/source/ui/view/tabview5.cxx11
-rw-r--r--sc/source/ui/view/viewfun2.cxx6
-rw-r--r--sc/source/ui/view/viewfun3.cxx2
-rw-r--r--sc/source/ui/view/viewfun4.cxx2
-rw-r--r--sc/source/ui/view/viewfunc.cxx10
-rw-r--r--sc/uiconfig/scalc/ui/standardfilterdialog.ui758
-rw-r--r--schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng14
-rw-r--r--scripting/source/pyprov/pythonscript.py8
-rw-r--r--sd/source/ui/app/sdmod1.cxx29
-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--sfx2/Library_sfx.mk3
-rw-r--r--sfx2/source/appl/macroloader.cxx9
-rw-r--r--sfx2/source/doc/docfile.cxx13
-rw-r--r--sfx2/source/doc/docmacromode.cxx62
-rw-r--r--sfx2/source/doc/iframe.cxx108
-rw-r--r--sfx2/source/doc/objmisc.cxx35
-rw-r--r--sfx2/source/doc/objstor.cxx37
-rw-r--r--sfx2/source/doc/objxtor.cxx1
-rw-r--r--sfx2/source/inc/eventsupplier.hxx4
-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/view/viewfrm.cxx40
-rw-r--r--shell/source/backends/kf5be/kf5backend.cxx2
-rw-r--r--shell/source/win32/SysShExec.cxx8
-rw-r--r--solenv/clang-format/blacklist1
-rw-r--r--solenv/flatpak-manifest.in26
-rw-r--r--solenv/gbuild/partial_build.mk2
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk4
-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--solenv/sanitizers/ui/modules/scalc.suppr5
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.hxx4
-rw-r--r--starmath/inc/token.hxx2
-rw-r--r--svl/qa/unit/test_URIHelper.cxx1
-rw-r--r--svl/source/misc/urihelper.cxx40
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx166
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.hxx69
-rw-r--r--svtools/source/svhtml/parhtml.cxx6
-rw-r--r--svtools/source/uno/wizard/wizardpagecontroller.cxx11
-rw-r--r--svx/source/dialog/framelinkarray.cxx463
-rw-r--r--svx/source/svdraw/svdoole2.cxx698
-rw-r--r--svx/source/svdraw/svdpdf.cxx16
-rw-r--r--svx/source/svdraw/svdview.cxx7
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx8
-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/unodraw/unoshape.cxx18
-rw-r--r--sw/CppunitTest_sw_core_attr.mk74
-rw-r--r--sw/CppunitTest_sw_core_doc.mk1
-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/inc/IDocumentContentOperations.hxx11
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx5
-rw-r--r--sw/inc/anchoreddrawobject.hxx1
-rw-r--r--sw/inc/anchoredobject.hxx5
-rw-r--r--sw/inc/crsrsh.hxx17
-rw-r--r--sw/inc/dcontact.hxx8
-rw-r--r--sw/inc/deletelistener.hxx92
-rw-r--r--sw/inc/editsh.hxx6
-rw-r--r--sw/inc/expfld.hxx6
-rw-r--r--sw/inc/ndarr.hxx8
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/inc/ndtxt.hxx12
-rw-r--r--sw/inc/swrect.hxx3
-rw-r--r--sw/inc/swtypes.hxx10
-rw-r--r--sw/inc/unochart.hxx3
-rw-r--r--sw/inc/unosett.hxx5
-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/doc/data/textbox-zorder.docxbin0 -> 5407 bytes
-rw-r--r--sw/qa/core/doc/doc.cxx16
-rw-r--r--sw/qa/core/edit/data/redline-hidden.fodt32
-rw-r--r--sw/qa/core/edit/data/textbox-undo-ordnum.docxbin0 -> 21223 bytes
-rw-r--r--sw/qa/core/edit/edit.cxx108
-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/globalfilter/data/char_background_editing.docxbin12713 -> 12672 bytes
-rw-r--r--sw/qa/extras/globalfilter/data/fieldmark_QUOTE_nest.docxbin13183 -> 13179 bytes
-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/fdo43573-2-min.docxbin0 -> 70542 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/s4_min2.fodt360
-rw-r--r--sw/qa/extras/layout/data/tdf123163-1.docxbin0 -> 341105 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf134298.ottbin0 -> 40880 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf143239-1-min.odtbin0 -> 20308 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf147485-forcepoint.docbin0 -> 62544 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf150606-1-min.odtbin0 -> 52456 bytes
-rw-r--r--sw/qa/extras/layout/data/tdf152983-1-min.docxbin0 -> 100691 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx275
-rw-r--r--sw/qa/extras/mailmerge/data/bookmarkcondition.fodt91
-rw-r--r--sw/qa/extras/mailmerge/data/bookmarkcondition.odsbin0 -> 6881 bytes
-rw-r--r--sw/qa/extras/mailmerge/mailmerge.cxx29
-rw-r--r--sw/qa/extras/odfexport/data/shape-with-hyperlink.odtbin0 -> 10149 bytes
-rw-r--r--sw/qa/extras/odfexport/data/shapes-hyperlink.odtbin0 -> 12199 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.cxx55
-rw-r--r--sw/qa/extras/odfimport/data/forcepoint108.fodt67
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx12
-rw-r--r--sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docxbin0 -> 18197 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/hyperlinkshape.docxbin0 -> 17780 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/inline-sdt-header.docxbin0 -> 14930 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104823.docxbin0 -> 21260 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf123642.docxbin0 -> 17814 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf126287.docxbin0 -> 8701 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf132752.docxbin0 -> 26741 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137466.docxbin0 -> 20243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148111.docxbin0 -> 18731 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf148361.docxbin0 -> 10663 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81507.docxbin0 -> 20183 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odtbin0 -> 9418 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docxbin0 -> 20357 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport13.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport14.cxx30
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport15.cxx129
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx12
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx13
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport7.cxx2
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx4
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport9.cxx30
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx97
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlw14export.cxx2
-rw-r--r--sw/qa/extras/ooxmlimport/data/tdf126426.docxbin0 -> 15785 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport2.cxx32
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx2
-rw-r--r--sw/qa/extras/uiwriter/data/demo91.fodt156
-rw-r--r--sw/qa/extras/uiwriter/data/forum-mso-en-13192-min.docxbin0 -> 31920 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/tdf129270.odtbin0 -> 9301 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/uiwriter.cxx283
-rw-r--r--sw/qa/extras/uiwriter/uiwriter2.cxx578
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx33
-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.hxx9
-rw-r--r--sw/qa/python/check_table.py6
-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_tests7/tdf145093.py34
-rw-r--r--sw/sdi/_drwbase.sdi39
-rw-r--r--sw/source/core/attr/swatrset.cxx3
-rw-r--r--sw/source/core/bastyp/swrect.cxx12
-rw-r--r--sw/source/core/crsr/annotationmark.cxx2
-rw-r--r--sw/source/core/crsr/bookmrk.cxx45
-rw-r--r--sw/source/core/crsr/crbm.cxx15
-rw-r--r--sw/source/core/crsr/crsrsh.cxx9
-rw-r--r--sw/source/core/crsr/crstrvl.cxx64
-rw-r--r--sw/source/core/crsr/swcrsr.cxx4
-rw-r--r--sw/source/core/crsr/viscrs.cxx2
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx131
-rw-r--r--sw/source/core/doc/DocumentFieldsManager.cxx13
-rw-r--r--sw/source/core/doc/DocumentRedlineManager.cxx10
-rw-r--r--sw/source/core/doc/DocumentStylePoolManager.cxx2
-rw-r--r--sw/source/core/doc/docbm.cxx38
-rw-r--r--sw/source/core/doc/docchart.cxx23
-rw-r--r--sw/source/core/doc/docedt.cxx11
-rw-r--r--sw/source/core/doc/docfld.cxx58
-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/docredln.cxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx2
-rw-r--r--sw/source/core/doc/textboxhelper.cxx3
-rw-r--r--sw/source/core/docnode/ndsect.cxx2
-rw-r--r--sw/source/core/docnode/ndtbl.cxx6
-rw-r--r--sw/source/core/docnode/node.cxx6
-rw-r--r--sw/source/core/docnode/nodes.cxx182
-rw-r--r--sw/source/core/draw/dcontact.cxx69
-rw-r--r--sw/source/core/draw/dview.cxx5
-rw-r--r--sw/source/core/edit/acorrect.cxx5
-rw-r--r--sw/source/core/edit/autofmt.cxx39
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/eddel.cxx9
-rw-r--r--sw/source/core/edit/edfld.cxx11
-rw-r--r--sw/source/core/edit/edglbldc.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx4
-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/expfld.cxx7
-rw-r--r--sw/source/core/fields/reffld.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx2
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx9
-rw-r--r--sw/source/core/inc/MarkManager.hxx2
-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/bookmrk.hxx10
-rw-r--r--sw/source/core/inc/docfld.hxx12
-rw-r--r--sw/source/core/inc/flyfrm.hxx3
-rw-r--r--sw/source/core/inc/flyfrms.hxx3
-rw-r--r--sw/source/core/inc/frame.hxx11
-rw-r--r--sw/source/core/inc/layact.hxx10
-rw-r--r--sw/source/core/inc/layfrm.hxx1
-rw-r--r--sw/source/core/inc/mvsave.hxx5
-rw-r--r--sw/source/core/inc/pagefrm.hxx3
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/tabfrm.hxx1
-rw-r--r--sw/source/core/inc/unofldmid.h1
-rw-r--r--sw/source/core/layout/anchoreddrawobject.cxx14
-rw-r--r--sw/source/core/layout/atrfrm.cxx2
-rw-r--r--sw/source/core/layout/findfrm.cxx21
-rw-r--r--sw/source/core/layout/flowfrm.cxx2
-rw-r--r--sw/source/core/layout/fly.cxx40
-rw-r--r--sw/source/core/layout/flycnt.cxx46
-rw-r--r--sw/source/core/layout/flylay.cxx13
-rw-r--r--sw/source/core/layout/frmtool.cxx21
-rw-r--r--sw/source/core/layout/ftnfrm.cxx17
-rw-r--r--sw/source/core/layout/layact.cxx135
-rw-r--r--sw/source/core/layout/newfrm.cxx5
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx213
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.hxx11
-rw-r--r--sw/source/core/layout/pagechg.cxx116
-rw-r--r--sw/source/core/layout/sectfrm.cxx3
-rw-r--r--sw/source/core/layout/tabfrm.cxx105
-rw-r--r--sw/source/core/layout/wsfrm.cxx20
-rw-r--r--sw/source/core/ole/ndole.cxx213
-rwxr-xr-xsw/source/core/text/frmform.cxx18
-rw-r--r--sw/source/core/text/itratr.cxx2
-rw-r--r--sw/source/core/text/itrform2.cxx19
-rw-r--r--sw/source/core/text/itrform2.hxx2
-rw-r--r--sw/source/core/text/porfld.cxx17
-rw-r--r--sw/source/core/text/porfld.hxx2
-rw-r--r--sw/source/core/text/porlay.cxx26
-rw-r--r--sw/source/core/text/txtfrm.cxx10
-rw-r--r--sw/source/core/text/xmldump.cxx63
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx97
-rw-r--r--sw/source/core/txtnode/thints.cxx8
-rw-r--r--sw/source/core/txtnode/txatbase.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx4
-rw-r--r--sw/source/core/undo/unbkmk.cxx2
-rw-r--r--sw/source/core/undo/undel.cxx26
-rw-r--r--sw/source/core/undo/undobj.cxx25
-rw-r--r--sw/source/core/undo/unins.cxx7
-rw-r--r--sw/source/core/undo/unredln.cxx38
-rw-r--r--sw/source/core/undo/untbl.cxx14
-rw-r--r--sw/source/core/unocore/unobkm.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx6
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx6
-rw-r--r--sw/source/core/unocore/unodraw.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx6
-rw-r--r--sw/source/core/unocore/unoframe.cxx9
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/core/unocore/unosett.cxx20
-rw-r--r--sw/source/core/unocore/unotext.cxx21
-rw-r--r--sw/source/core/view/printdata.cxx3
-rw-r--r--sw/source/filter/basflt/fltshell.cxx2
-rw-r--r--sw/source/filter/html/htmlplug.cxx7
-rw-r--r--sw/source/filter/html/htmltab.cxx40
-rw-r--r--sw/source/filter/html/htmltabw.cxx4
-rw-r--r--sw/source/filter/html/svxcss1.cxx6
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx761
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx69
-rw-r--r--sw/source/filter/ww8/docxexport.cxx134
-rw-r--r--sw/source/filter/ww8/docxexport.hxx16
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx47
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.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.cxx1
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx8
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx20
-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.cxx81
-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/xmlithlp.cxx9
-rw-r--r--sw/source/filter/xml/xmltble.cxx149
-rw-r--r--sw/source/filter/xml/xmltexte.hxx12
-rw-r--r--sw/source/filter/xml/xmltexti.cxx9
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/fldui/flddb.cxx12
-rw-r--r--sw/source/ui/fldui/flddinf.cxx22
-rw-r--r--sw/source/ui/fldui/fldref.cxx50
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx25
-rw-r--r--sw/source/ui/misc/bookmark.cxx6
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx8
-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/edtwin.cxx29
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx53
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx5
-rw-r--r--sw/source/uibase/lingu/hhcwrp.cxx4
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx110
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx8
-rw-r--r--sw/source/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx2
-rw-r--r--sw/source/uibase/shells/textfld.cxx4
-rw-r--r--sw/source/uibase/shells/textsh1.cxx2
-rw-r--r--sw/source/uibase/uitest/uiobject.cxx25
-rw-r--r--sw/source/uibase/utlui/content.cxx2
-rw-r--r--sw/source/uibase/utlui/navipi.cxx2
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx30
-rw-r--r--sw/source/uibase/wrtsh/select.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx16
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx50
-rw-r--r--sw/uiconfig/sglobal/popupmenu/draw.xml5
-rw-r--r--sw/uiconfig/swform/popupmenu/draw.xml5
-rw-r--r--sw/uiconfig/swreport/popupmenu/draw.xml5
-rw-r--r--sw/uiconfig/swriter/popupmenu/draw.xml5
-rw-r--r--sw/uiconfig/swxform/popupmenu/draw.xml5
-rw-r--r--sw/uiconfig/swxform/toolbar/formdesign.xml2
-rw-r--r--test/source/xmltesttools.cxx2
-rw-r--r--toolkit/source/awt/vclxtabpagecontainer.cxx2
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx4
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx1
-rw-r--r--toolkit/source/helper/formpdfexport.cxx8
-rw-r--r--tools/source/fsys/urlobj.cxx9
-rw-r--r--tools/source/generic/color.cxx39
-rw-r--r--tools/source/generic/poly.cxx2
-rw-r--r--ucb/qa/complex/ucb/UCB.java7
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx15
-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/inc/svimpbox.hxx10
-rw-r--r--vcl/qa/cppunit/pdfexport/data/tdf148706.odtbin0 -> 9969 bytes
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx66
-rw-r--r--vcl/source/app/settings.cxx14
-rw-r--r--vcl/source/control/button.cxx8
-rw-r--r--vcl/source/control/imp_listbox.cxx9
-rw-r--r--vcl/source/control/listbox.cxx14
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx1
-rw-r--r--vcl/source/font/font.cxx3
-rw-r--r--vcl/source/fontsubset/sft.cxx12
-rw-r--r--vcl/source/fontsubset/ttcr.cxx36
-rw-r--r--vcl/source/gdi/jobset.cxx30
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
-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/treelist/svimpbox.cxx3
-rw-r--r--vcl/source/treelist/treelistbox.cxx76
-rw-r--r--vcl/source/window/menu.cxx32
-rw-r--r--vcl/source/window/mouse.cxx2
-rw-r--r--vcl/source/window/printdlg.cxx6
-rw-r--r--vcl/source/window/winproc.cxx9
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx51
-rw-r--r--vcl/unx/generic/printer/cupsmgr.cxx47
-rw-r--r--vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx20
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--writerfilter/CustomTarget_source.mk1
-rw-r--r--writerfilter/inc/dmapper/resourcemodel.hxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx206
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx208
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx16
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx14
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx29
-rw-r--r--writerfilter/source/dmapper/LoggedResources.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyIds.cxx1
-rw-r--r--writerfilter/source/dmapper/PropertyIds.hxx1
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx193
-rw-r--r--writerfilter/source/dmapper/SdtHelper.hxx62
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx1
-rw-r--r--writerfilter/source/ooxml/model.xml42
-rw-r--r--xmloff/source/core/xmltoken.cxx4
-rw-r--r--xmloff/source/draw/eventimp.cxx3
-rw-r--r--xmloff/source/draw/sdpropls.cxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx41
-rw-r--r--xmloff/source/draw/ximpshap.cxx37
-rw-r--r--xmloff/source/draw/ximpshap.hxx2
-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/text/XMLTextFrameContext.cxx17
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.cxx30
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.hxx1
-rw-r--r--xmloff/source/token/tokens.txt2
-rw-r--r--xmlsecurity/CppunitTest_xmlsecurity_pdfsigning.mk8
-rw-r--r--xmlsecurity/CppunitTest_xmlsecurity_signing.mk9
-rw-r--r--xmlsecurity/inc/biginteger.hxx11
-rw-r--r--xmlsecurity/inc/xmlsec-wrapper.h5
-rw-r--r--xmlsecurity/inc/xmlsec/saxhelper.hxx1
-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.cxx15
-rw-r--r--xmlsecurity/source/gpg/SEInitializer.cxx2
-rw-r--r--xmlsecurity/source/gpg/SecurityEnvironment.hxx5
-rw-r--r--xmlsecurity/source/helper/ooxmlsecparser.hxx2
-rw-r--r--xmlsecurity/source/helper/xmlsignaturehelper.cxx5
-rw-r--r--xmlsecurity/source/helper/xsecparser.hxx2
-rw-r--r--xmlsecurity/source/helper/xsecverify.cxx6
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx63
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx92
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx95
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/saxhelper.cxx3
813 files changed, 18401 insertions, 5868 deletions
diff --git a/.gitmodules b/.gitmodules
index fe2fb7a8117d..c441234d6030 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,12 +1,12 @@
[submodule "dictionaries"]
path = dictionaries
- url = https://gerrit.libreoffice.org/dictionaries
+ url = ../dictionaries
branch = .
[submodule "helpcontent2"]
path = helpcontent2
- url = https://gerrit.libreoffice.org/help
+ url = ../help
branch = .
[submodule "translations"]
path = translations
- url = https://gerrit.libreoffice.org/translations
+ url = ../translations
branch = .
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 3d2d61dfc2b4..dda5b6c84bf9 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-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)
@@ -4143,6 +4170,7 @@ endef
ifneq ($(ENABLE_PDFIUM),)
define gb_LinkTarget__use_pdfium
$(call gb_LinkTarget_set_include,$(1),\
+ -I$(call gb_UnpackedTarball_get_dir,pdfium) \
-I$(call gb_UnpackedTarball_get_dir,pdfium)/public \
-DCOMPONENT_BUILD \
$$(INCLUDE) \
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/bin/find-unneeded-includes b/bin/find-unneeded-includes
index 8ba5a7d354a6..ac8c99bb46a7 100755
--- a/bin/find-unneeded-includes
+++ b/bin/find-unneeded-includes
@@ -280,6 +280,7 @@ def tidy(compileCommands, paths):
args = args.replace(assumeAbs, "-x c++ " + pathAbs)
invocation = "include-what-you-use -Xiwyu --no_fwd_decls -Xiwyu --max_line_length=200 " + args
+ print(invocation)
task_queue.put((invocation, moduleRules))
task_queue.join()
diff --git a/bin/symstore.sh b/bin/symstore.sh
index f4b0a5d13943..a0c35a48ead5 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
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/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/configure.ac b/configure.ac
index a8056fdeaa6f..2d1c1ea6cb63 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5368,6 +5368,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
@@ -7738,7 +7742,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
@@ -7765,7 +7769,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
@@ -8098,7 +8102,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)
@@ -8390,7 +8398,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])
@@ -8788,14 +8796,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
@@ -11476,8 +11484,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
@@ -12133,6 +12141,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/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 614c559e1039..fbdb4e489461 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -81,7 +81,9 @@ AboutDialog::AboutDialog(weld::Window* pParent)
m_xDialog->set_version(GetVersionString());
m_xDialog->set_copyright(GetCopyrightString());
- SetBuildIdLink();
+ //LHM specific: link is invalid, so hide it
+ m_xDialog->set_website_label(OUString());
+ m_xDialog->set_website(OUString());
SetLogo();
diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx
index a138620017e1..7e03fdafd344 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -77,6 +77,7 @@ private:
class SvxBorderTabPage : public SfxTabPage
{
static const sal_uInt16 pRanges[];
+ static const std::vector<int> m_aLineWidths;
public:
SvxBorderTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
@@ -128,6 +129,7 @@ private:
std::unique_ptr<SvtLineListBox> m_xLbLineStyle;
std::unique_ptr<ColorListBox> m_xLbLineColor;
+ std::unique_ptr<weld::ComboBox> m_xLineWidthLB;
std::unique_ptr<weld::MetricSpinButton> m_xLineWidthMF;
std::unique_ptr<weld::Container> m_xSpacingFrame;
@@ -165,9 +167,10 @@ private:
DECL_LINK(SelSdwHdl_Impl, SvtValueSet*, void);
DECL_LINK(LinesChanged_Impl, LinkParamNone*, void);
DECL_LINK(ModifyDistanceHdl_Impl, weld::MetricSpinButton&, void);
- DECL_LINK(ModifyWidthHdl_Impl, weld::MetricSpinButton&, void);
DECL_LINK(SyncHdl_Impl, weld::ToggleButton&, void);
DECL_LINK(RemoveAdjacentCellBorderHdl_Impl, weld::ToggleButton&, void);
+ DECL_LINK(ModifyWidthLBHdl_Impl, weld::ComboBox&, void);
+ DECL_LINK(ModifyWidthMFHdl_Impl, weld::MetricSpinButton&, void);
sal_uInt16 GetPresetImageId(sal_uInt16 nValueSetIdx) const;
const char* GetPresetStringId(sal_uInt16 nValueSetIdx) const;
@@ -175,6 +178,7 @@ private:
void FillPresetVS();
void FillShadowVS();
void FillValueSets();
+ void SetLineWidth(sal_Int64 nWidth, sal_Int32 nRemovedType = 0);
// Filler
void FillLineListBox_Impl();
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 5ded87ea6659..e3c12e0eae7a 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -74,6 +74,24 @@ const sal_uInt16 SvxBorderTabPage::pRanges[] =
0
};
+namespace
+{
+int lcl_twipsToPt(sal_Int64 nTwips)
+{
+ return MetricField::ConvertDoubleValue(nTwips, 0, FieldUnit::TWIP, MapUnit::MapPoint) * 100;
+}
+}
+
+const std::vector<int> SvxBorderTabPage::m_aLineWidths = {
+ lcl_twipsToPt(SvxBorderLineWidth::Hairline),
+ lcl_twipsToPt(SvxBorderLineWidth::VeryThin),
+ lcl_twipsToPt(SvxBorderLineWidth::Thin),
+ lcl_twipsToPt(SvxBorderLineWidth::Medium),
+ lcl_twipsToPt(SvxBorderLineWidth::Thick),
+ lcl_twipsToPt(SvxBorderLineWidth::ExtraThick),
+ -1
+};
+
static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& rField)
{
auto nMin = rField.denormalize(rField.get_min(FieldUnit::TWIP));
@@ -98,8 +116,8 @@ static sal_Int64 lcl_GetMinLineWidth(SvxBorderLineStyle aStyle)
return 15;
// Double lines
- case SvxBorderLineStyle::DOUBLE: return 22;
- case SvxBorderLineStyle::DOUBLE_THIN: return 22;
+ case SvxBorderLineStyle::DOUBLE: return 15;
+ case SvxBorderLineStyle::DOUBLE_THIN: return 15;
case SvxBorderLineStyle::THINTHICK_SMALLGAP: return 20;
case SvxBorderLineStyle::THINTHICK_MEDIUMGAP: return 15;
case SvxBorderLineStyle::THINTHICK_LARGEGAP: return 15;
@@ -288,6 +306,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle
, m_xFrameSelWin(new weld::CustomWeld(*m_xBuilder, "framesel", m_aFrameSel))
, m_xLbLineStyle(new SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb")))
, m_xLbLineColor(new ColorListBox(m_xBuilder->weld_menu_button("linecolorlb"), pController->getDialog()))
+ , m_xLineWidthLB(m_xBuilder->weld_combo_box("linewidthlb"))
, m_xLineWidthMF(m_xBuilder->weld_metric_spin_button("linewidthmf", FieldUnit::POINT))
, m_xSpacingFrame(m_xBuilder->weld_container("spacing"))
, m_xLeftFT(m_xBuilder->weld_label("leftft"))
@@ -411,7 +430,7 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle
{
// The caller specifies default line width. Honor it.
const SfxInt64Item* p = static_cast<const SfxInt64Item*>(pItem);
- m_xLineWidthMF->set_value(p->GetValue(), FieldUnit::POINT);
+ SetLineWidth(p->GetValue());
}
// set metric
@@ -511,13 +530,17 @@ SvxBorderTabPage::SvxBorderTabPage(weld::Container* pPage, weld::DialogControlle
m_aFrameSel.SetSelectHdl(LINK(this, SvxBorderTabPage, LinesChanged_Impl));
m_xLbLineStyle->SetSelectHdl( LINK( this, SvxBorderTabPage, SelStyleHdl_Impl ) );
m_xLbLineColor->SetSelectHdl( LINK( this, SvxBorderTabPage, SelColHdl_Impl ) );
- m_xLineWidthMF->connect_value_changed( LINK( this, SvxBorderTabPage, ModifyWidthHdl_Impl ) );
+ m_xLineWidthLB->connect_changed(LINK(this, SvxBorderTabPage, ModifyWidthLBHdl_Impl));
+ m_xLineWidthMF->connect_value_changed(LINK(this, SvxBorderTabPage, ModifyWidthMFHdl_Impl));
m_xWndPresets->SetSelectHdl( LINK( this, SvxBorderTabPage, SelPreHdl_Impl ) );
m_xWndShadows->SetSelectHdl( LINK( this, SvxBorderTabPage, SelSdwHdl_Impl ) );
FillValueSets();
FillLineListBox_Impl();
+ // Reapply line width: probably one of prefefined values should be selected
+ SetLineWidth(m_xLineWidthMF->get_value(FieldUnit::NONE));
+
// connections
if (rCoreAttrs.HasItem(GetWhich(SID_ATTR_PARA_GRABBAG), &pItem))
{
@@ -774,7 +797,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
sal_Int64 nWidthPt = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
sal_Int64( nWidth ), m_xLineWidthMF->get_digits(),
MapUnit::MapTwip, FieldUnit::POINT ));
- m_xLineWidthMF->set_value(nWidthPt, FieldUnit::POINT);
+ SetLineWidth(nWidthPt);
m_xLbLineStyle->SetWidth(nWidth);
// then set the style
@@ -1192,9 +1215,30 @@ IMPL_LINK(SvxBorderTabPage, SelColHdl_Impl, ColorListBox&, rColorBox, void)
m_aFrameSel.SetColorToSelection(aColor);
}
-IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, weld::MetricSpinButton&, void)
+IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthLBHdl_Impl, weld::ComboBox&, void)
+{
+ sal_Int32 nPos = m_xLineWidthLB->get_active();
+
+ sal_Int32 nRemovedType = 0;
+ if (m_xLineWidthLB->get_values_changed_from_saved()) {
+ nRemovedType = m_aLineWidths.size() - m_xLineWidthLB->get_count();
+ }
+ SetLineWidth(m_aLineWidths[nPos + nRemovedType], nRemovedType);
+
+ // Call the spinner handler to trigger all related modifications
+ ModifyWidthMFHdl_Impl(*m_xLineWidthMF);
+}
+
+IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthMFHdl_Impl, weld::MetricSpinButton&, void)
{
sal_Int64 nVal = m_xLineWidthMF->get_value(FieldUnit::NONE);
+
+ // for DOUBLE_THIN line style we cannot allow thinner line width then 1.10pt
+ if (m_xLbLineStyle->GetSelectEntryStyle() == SvxBorderLineStyle::DOUBLE_THIN)
+ m_xLineWidthMF->set_min(110, FieldUnit::NONE);
+ else
+ m_xLineWidthMF->set_min(5, FieldUnit::NONE);
+
nVal = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
nVal,
m_xLineWidthMF->get_digits(),
@@ -1208,6 +1252,13 @@ IMPL_LINK_NOARG(SvxBorderTabPage, ModifyWidthHdl_Impl, weld::MetricSpinButton&,
IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
{
sal_Int64 nOldWidth = m_xLineWidthMF->get_value(FieldUnit::NONE);
+
+ // for DOUBLE_THIN line style we cannot allow thinner line width then 1.10pt
+ if (m_xLbLineStyle->GetSelectEntryStyle() == SvxBorderLineStyle::DOUBLE_THIN)
+ m_xLineWidthMF->set_min(110, FieldUnit::NONE);
+ else
+ m_xLineWidthMF->set_min(5, FieldUnit::NONE);
+
nOldWidth = static_cast<sal_Int64>(MetricField::ConvertDoubleValue(
nOldWidth,
m_xLineWidthMF->get_digits(),
@@ -1219,7 +1270,13 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
// auto change line-width if it doesn't correspond to minimal value
// let's change only in case when user has not changed the line-width into some custom value
- const sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth)? nNewMinWidth : nOldWidth;
+ sal_Int64 nNewWidth = (nOldMinWidth == nOldWidth) ? nNewMinWidth : nOldWidth;
+ // if we had selected a predefined border width under SvxBorderLineWidth::Medium set the Medium as default
+ // otherwise if we had a cusom border width under 1.10pt then set the spinner to the maximum allowed value for double border styles
+ bool bNewDoubleHairline = m_xLbLineStyle->GetSelectEntryStyle() == SvxBorderLineStyle::DOUBLE_THIN && !m_xLineWidthMF->get_visible() &&
+ (nOldWidth == SvxBorderLineWidth::Hairline || nOldWidth == SvxBorderLineWidth::VeryThin || nOldWidth == SvxBorderLineWidth::Thin);
+ if (bNewDoubleHairline && nNewWidth < SvxBorderLineWidth::Medium)
+ nNewWidth = SvxBorderLineWidth::Medium;
// set value inside edit box
if (nOldWidth != nNewWidth)
@@ -1229,7 +1286,27 @@ IMPL_LINK_NOARG(SvxBorderTabPage, SelStyleHdl_Impl, SvtLineListBox&, void)
m_xLineWidthMF->get_digits(),
MapUnit::MapTwip,
FieldUnit::POINT));
- m_xLineWidthMF->set_value(nNewWidthPt, FieldUnit::POINT);
+ SetLineWidth(nNewWidthPt);
+ }
+
+ if (m_xLbLineStyle->GetSelectEntryStyle() == SvxBorderLineStyle::DOUBLE_THIN)
+ {
+ for (size_t i = 0; i < 3; i++)
+ {
+ m_xLineWidthLB->save_values_by_id(OUString::number(i));
+ m_xLineWidthLB->remove_id(OUString::number(i));
+ }
+ if (m_xLineWidthLB->get_active_id().isEmpty())
+ m_xLineWidthLB->set_active_id("3");
+ }
+ else
+ {
+ if (m_xLineWidthLB->get_values_changed_from_saved())
+ {
+ for (size_t i = 0; i < 3; i++)
+ m_xLineWidthLB->append(i, OUString::number(i), m_xLineWidthLB->get_saved_values(i));
+ m_xLineWidthLB->removeSavedValues();
+ }
}
// set value inside style box
@@ -1356,6 +1433,27 @@ void SvxBorderTabPage::FillValueSets()
FillShadowVS();
}
+void SvxBorderTabPage::SetLineWidth( sal_Int64 nWidth, sal_Int32 nRemovedType )
+{
+ if ( nWidth >= 0 )
+ m_xLineWidthMF->set_value( nWidth, FieldUnit::POINT );
+
+ auto it = std::find_if( m_aLineWidths.begin(), m_aLineWidths.end(),
+ [nWidth](const int val) -> bool { return val == nWidth; } );
+
+ if ( it != m_aLineWidths.end() && *it >= 0 )
+ {
+ // Select predefined value in combobox
+ m_xLineWidthMF->hide();
+ m_xLineWidthLB->set_active(std::distance(m_aLineWidths.begin(), it) - nRemovedType);
+ }
+ else
+ {
+ // This is not one of predefined values. Show spinner
+ m_xLineWidthLB->set_active(m_aLineWidths.size() - nRemovedType -1);
+ m_xLineWidthMF->show();
+ }
+}
static Color lcl_mediumColor( Color aMain, Color /*aDefault*/ )
{
diff --git a/cui/uiconfig/ui/borderpage.ui b/cui/uiconfig/ui/borderpage.ui
index 0f7c6f625985..0bfa3355d0d1 100644
--- a/cui/uiconfig/ui/borderpage.ui
+++ b/cui/uiconfig/ui/borderpage.ui
@@ -1,79 +1,81 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="lower">0.05</property>
<property name="upper">9</property>
<property name="value">0.05</property>
- <property name="step_increment">0.25</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.25</property>
+ <property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment2">
<property name="upper">50</property>
- <property name="step_increment">0.1</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.10</property>
+ <property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment3">
<property name="lower">0.5</property>
<property name="upper">50</property>
- <property name="step_increment">0.1</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.10</property>
+ <property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment4">
<property name="upper">50</property>
- <property name="step_increment">0.1</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.10</property>
+ <property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment5">
<property name="upper">50</property>
- <property name="step_increment">0.1</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.10</property>
+ <property name="page-increment">1</property>
</object>
<object class="GtkAdjustment" id="adjustment6">
<property name="upper">50</property>
- <property name="step_increment">0.1</property>
- <property name="page_increment">1</property>
+ <property name="step-increment">0.10</property>
+ <property name="page-increment">1</property>
</object>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="BorderPage">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">24</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
+ <property name="row-spacing">12</property>
+ <property name="column-spacing">24</property>
<child>
<object class="GtkFrame" id="arrangement">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=5 -->
<object class="GtkGrid" id="grid9">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="frameselwin">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">never</property>
- <property name="shadow_type">in</property>
+ <property name="can-focus">True</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">never</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
<object class="GtkDrawingArea" id="framesel">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
@@ -81,63 +83,63 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="userdefft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|userdefft">_User-defined:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">framesel</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">framesel</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label14">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes" context="borderpage|label14">Pr_esets:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">presets</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">presets</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkDrawingArea" id="presets">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="rmadjcellbordersft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|rmadjcellbordersft">_Adjacent Cells:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">rmadjcellborders</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">rmadjcellborders</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
<property name="width">2</property>
</packing>
</child>
@@ -145,21 +147,36 @@
<object class="GtkCheckButton" id="rmadjcellborders">
<property name="label" translatable="yes" context="borderpage|rmadjcellborders">Remove border</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
<property name="width">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -167,7 +184,7 @@
<child type="label">
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label8">Line Arrangement</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -176,117 +193,158 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="Line">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=2 n-rows=3 -->
<object class="GtkGrid" id="grid8">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label15">St_yle:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linestylelb</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">linestylelb</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label16">_Width:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linewidthmf</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
+ <accessibility>
+ <relation type="label-for" target="linewidthlb"/>
+ <relation type="label-for" target="linewidthmf"/>
+ </accessibility>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label17">_Color:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">linecolorlb</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">linecolorlb</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="linestylelb">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="label" translatable="no"></property>
+ <property name="draw-indicator">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
- <object class="GtkSpinButton" id="linewidthmf">
+ <object class="GtkMenuButton" id="linecolorlb">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">start</property>
- <property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
- <property name="digits">2</property>
- <property name="value">0.05</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw-indicator">True</property>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <object class="GtkMenuButton" id="linecolorlb">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="label" translatable="no"></property>
+ <property name="can-focus">False</property>
<child>
- <placeholder/>
+ <object class="GtkComboBoxText" id="linewidthlb">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">False</property>
+ <items>
+ <item id="0" translatable="yes" context="borderpage|linewidthlb">Hairline (0.05pt)</item>
+ <item id="1" translatable="yes" context="borderpage|linewidthlb">Very thin (0.5pt)</item>
+ <item id="2" translatable="yes" context="borderpage|linewidthlb">Thin (0.75pt)</item>
+ <item id="3" translatable="yes" context="borderpage|linewidthlb">Medium (1.5pt)</item>
+ <item id="4" translatable="yes" context="borderpage|linewidthlb">Thick (2.25pt)</item>
+ <item id="5" translatable="yes" context="borderpage|linewidthlb">Extra thick (4.5pt)</item>
+ <item id="6" translatable="yes" context="borderpage|linewidthlb">Custom</item>
+ </items>
+ <accessibility>
+ <relation type="labelled-by" target="label16"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="linewidthmf">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="activates-default">True</property>
+ <property name="truncate-multiline">True</property>
+ <property name="adjustment">adjustment1</property>
+ <property name="digits">2</property>
+ <property name="value">0.05</property>
+ <accessibility>
+ <relation type="labelled-by" target="label16"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
</object>
@@ -296,7 +354,7 @@
<child type="label">
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label9">Line</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -305,154 +363,170 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="padding">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=5 -->
<object class="GtkGrid" id="grid7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkSpinButton" id="leftmf">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="valign">center</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment2</property>
<property name="digits">2</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="topmf">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment5</property>
<property name="digits">2</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="rightmf">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment4</property>
<property name="digits">2</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="bottommf">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment6</property>
<property name="digits">2</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="leftft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes" context="borderpage|leftft">_Left:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">leftmf</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">leftmf</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="rightft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|rightft">Right:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">rightmf</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">rightmf</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="topft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|topft">_Top:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">topmf</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">topmf</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="bottomft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|bottomft">_Bottom:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">bottommf</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">bottommf</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="sync">
<property name="label" translatable="yes" context="borderpage|sync">Synchronize</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
<property name="width">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -460,7 +534,7 @@
<child type="label">
<object class="GtkLabel" id="label10">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label10">Padding</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -469,126 +543,135 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="shadow">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkAlignment" id="align12">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="left-padding">12</property>
<child>
<placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkDrawingArea" id="shadows">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label22">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label22">_Position:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">shadows</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">shadows</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="distanceft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|distanceft">Distan_ce:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">distancemf</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">distancemf</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="distancemf">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="halign">start</property>
- <property name="activates_default">True</property>
+ <property name="activates-default">True</property>
<property name="adjustment">adjustment3</property>
<property name="value">0.5</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="shadowcolorft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|shadowcolorft">C_olor:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">shadowcolorlb</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">shadowcolorlb</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkMenuButton" id="shadowcolorlb">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="label" translatable="no"></property>
+ <property name="draw-indicator">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -596,7 +679,7 @@
<child type="label">
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label11">Shadow Style</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -605,58 +688,80 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="properties">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="can-focus">False</property>
+ <property name="no-show-all">True</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="can-focus">False</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
+ <property name="can-focus">False</property>
+ <property name="row-spacing">3</property>
+ <property name="column-spacing">6</property>
<child>
<object class="GtkCheckButton" id="mergewithnext">
<property name="label" translatable="yes" context="borderpage|mergewithnext">_Merge with next paragraph</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="no_show_all">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="no-show-all">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="mergeadjacent">
<property name="label" translatable="yes" context="borderpage|mergeadjacent">_Merge adjacent line styles</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="no_show_all">True</property>
- <property name="use_underline">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="no-show-all">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -664,7 +769,7 @@
<child type="label">
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="borderpage|label12">Properties</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -673,16 +778,25 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkSizeGroup" id="sizegroupLabel1">
- <property name="ignore_hidden">True</property>
+ <property name="ignore-hidden">True</property>
<widgets>
<widget name="label14"/>
<widget name="label15"/>
@@ -691,7 +805,7 @@
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroupLabel2">
- <property name="ignore_hidden">True</property>
+ <property name="ignore-hidden">True</property>
<widgets>
<widget name="leftft"/>
<widget name="rightft"/>
@@ -720,7 +834,7 @@
</widgets>
</object>
<object class="GtkSizeGroup" id="sizegroupWidgets">
- <property name="ignore_hidden">True</property>
+ <property name="ignore-hidden">True</property>
<widgets>
<widget name="presets"/>
<widget name="frameselwin"/>
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 21e45033ea4f..20e77a97cc8e 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/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/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/download.lst b/download.lst
index 702a921e929b..3e7e149f8f50 100644
--- a/download.lst
+++ b/download.lst
@@ -1,263 +1,602 @@
-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
+APACHE_COMMONS_LOGGING_SHA256SUM := 49665da5a60d033e6dff40fe0a7f9173e886ae859ce6096c1afe34c48b677c81
+APACHE_COMMONS_LOGGING_TARBALL := commons-logging-1.2-src.tar.gz
+# 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/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 2b600871c27d..1fb456c7beb8 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2567,8 +2567,9 @@ OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32,
return OUString(' ');
}
-void EditEngine::FieldClicked( const SvxFieldItem& )
+bool EditEngine::FieldClicked( const SvxFieldItem& )
{
+ return false;
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index dc1730a72a94..fbf1101d399a 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -599,8 +599,11 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
Point aLogicClick = rOutDev.PixelToLogic(rMEvt.GetPosPixel());
if (const SvxFieldItem* pFld = pView->GetField(aLogicClick))
{
+ bool bUrlOpened = GetEditEnginePtr()->FieldClicked( *pFld );
+ auto pUrlField = dynamic_cast<const SvxURLField*>(pFld->GetField());
+
// tdf#121039 When in edit mode, editeng is responsible for opening the URL on mouse click
- if (auto pUrlField = dynamic_cast<const SvxURLField*>(pFld->GetField()))
+ if (!bUrlOpened && pUrlField)
{
SvtSecurityOptions aSecOpt;
bool bCtrlClickHappened = rMEvt.IsMod1();
@@ -616,7 +619,6 @@ bool ImpEditEngine::MouseButtonUp( const MouseEvent& rMEvt, EditView* pView )
css::system::SystemShellExecuteFlags::DEFAULTS);
}
}
- GetEditEnginePtr()->FieldClicked( *pFld );
}
}
}
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index 345c0da1b754..dbdbd5f0cdd0 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -1392,7 +1392,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
aAttr.reset(static_cast<SvxBoxItem*>(pItem->Clone()));
}
- SvxBorderLine aBrd( nullptr, DEF_LINE_WIDTH_0 ); // Simple plain line
+ SvxBorderLine aBrd( nullptr, SvxBorderLineWidth::Hairline );
bool bContinue = true;
int nBorderTyp = 0;
@@ -1460,7 +1460,7 @@ void SvxRTFParser::ReadBorderAttr( int nToken, SfxItemSet& rSet,
case RTF_BRDRHAIR: // hairline border
{
aBrd.SetBorderLineStyle( SvxBorderLineStyle::SOLID);
- aBrd.SetWidth( DEF_LINE_WIDTH_0 );
+ aBrd.SetWidth( SvxBorderLineWidth::Hairline );
}
break;
case RTF_BRDRDB: // Double border
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index e6e5bec2a316..3eadf96c0973 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -100,6 +100,12 @@ void OCommonEmbeddedObject::Deactivate()
{
try {
xClientSite->saveObject();
+
+ // tdf#141529 take note that an eventually used linked file
+ // got changed/saved/written and that we need to copy it back if the
+ // hosting file/document gets saved
+ if(m_aLinkTempFile.is())
+ m_bLinkTempFileChanged = true;
}
catch( const embed::ObjectSaveVetoException& )
{
@@ -155,6 +161,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 )
{
@@ -168,7 +205,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
// after the object reaches the running state the cloned size is not necessary any more
m_bHasClonedSize = false;
- if ( m_bIsLink )
+ if ( m_bIsLinkURL )
{
m_xDocHolder->SetComponent( LoadLink_Impl(), m_bReadOnly );
}
@@ -228,34 +265,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/miscobj.cxx b/embeddedobj/source/commonembedding/miscobj.cxx
index 5947fef7aca0..26cd4caf3459 100644
--- a/embeddedobj/source/commonembedding/miscobj.cxx
+++ b/embeddedobj/source/commonembedding/miscobj.cxx
@@ -27,6 +27,10 @@
#include <com/sun/star/lang/NoSupportException.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/io/TempFile.hpp>
+#include <comphelper/storagehelper.hxx>
+
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <comphelper/mimeconfighelper.hxx>
@@ -52,8 +56,10 @@ OCommonEmbeddedObject::OCommonEmbeddedObject( const uno::Reference< uno::XCompon
, m_bEmbeddedScriptSupport( true )
, m_bDocumentRecoverySupport( true )
, m_bWaitSaveCompleted( false )
-, m_bIsLink( false )
+, m_bIsLinkURL( false )
+, m_bLinkTempFileChanged( false )
, m_bLinkHasPassword( false )
+, m_aLinkTempFile( )
, m_bHasClonedSize( false )
, m_nClonedMapUnit( 0 )
{
@@ -78,8 +84,10 @@ OCommonEmbeddedObject::OCommonEmbeddedObject(
, m_bEmbeddedScriptSupport( true )
, m_bDocumentRecoverySupport( true )
, m_bWaitSaveCompleted( false )
-, m_bIsLink( true )
+, m_bIsLinkURL( true )
+, m_bLinkTempFileChanged( false )
, m_bLinkHasPassword( false )
+, m_aLinkTempFile( )
, m_bHasClonedSize( false )
, m_nClonedMapUnit( 0 )
{
@@ -233,7 +241,61 @@ void OCommonEmbeddedObject::LinkInit_Impl(
m_bReadOnly = aExportFilterName != m_aLinkFilterName;
}
- m_aDocMediaDescriptor = GetValuableArgs_Impl( aMediaDescr, false );
+ if(m_bIsLinkURL && !m_bReadOnly)
+ {
+ // tdf#141529 we have a linked OLE object. To prevent the original OLE
+ // data to be changed each time the OLE gets changed (at deactivate), copy it to
+ // a temporary file. That file will be changed on activated OLE changes then.
+ // The moment the original gets changed itself will now be associated with the
+ // file/document embedding the OLE being changed (see other additions to the
+ // task-ID above)
+ //
+ // open OLE original data as read input file
+ uno::Reference< ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( m_xContext ) );
+ uno::Reference< io::XInputStream > xInStream( xTempAccess->openFileRead( m_aLinkURL ) );
+
+ if(xInStream.is())
+ {
+ // create temporary file
+ m_aLinkTempFile = io::TempFile::create(m_xContext);
+
+ if(m_aLinkTempFile.is())
+ {
+ // completely copy content of original OLE data
+ uno::Reference < io::XOutputStream > xTempOut = m_aLinkTempFile->getOutputStream();
+ ::comphelper::OStorageHelper::CopyInputToOutput( xInStream, xTempOut );
+ xTempOut->flush();
+ xTempOut->closeOutput();
+
+ // reset flag m_bLinkTempFileChanged, so it will also work for multiple
+ // save op's of the containing file/document
+ m_bLinkTempFileChanged = false;
+ }
+ }
+ }
+
+ if(m_aLinkTempFile.is())
+ {
+ uno::Sequence< beans::PropertyValue > aAlternativeMediaDescr(aMediaDescr.getLength());
+
+ for ( sal_Int32 a(0); a < aMediaDescr.getLength(); a++ )
+ {
+ const beans::PropertyValue& rSource(aMediaDescr[a]);
+ beans::PropertyValue& rDestination(aAlternativeMediaDescr[a]);
+
+ rDestination.Name = rSource.Name;
+ if(rSource.Name == "URL")
+ rDestination.Value <<= m_aLinkTempFile->getUri();
+ else
+ rDestination.Value = rSource.Value;
+ }
+
+ m_aDocMediaDescriptor = GetValuableArgs_Impl( aAlternativeMediaDescr, false );
+ }
+ else
+ {
+ m_aDocMediaDescriptor = GetValuableArgs_Impl( aMediaDescr, false );
+ }
uno::Reference< frame::XDispatchProviderInterceptor > xDispatchInterceptor;
for ( sal_Int32 nObjInd = 0; nObjInd < aObjectDescr.getLength(); nObjInd++ )
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index f162dfef5f31..e568b1232a71 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -47,14 +47,18 @@
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/io/XTruncate.hpp>
+
#include <comphelper/fileformat.h>
#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 +79,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 );
@@ -254,7 +258,7 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X
m_aEntryName = aNewName;
// the linked document should not be switched
- if ( !m_bIsLink )
+ if ( !m_bIsLinkURL )
{
uno::Reference< document::XStorageBasedDocument > xDoc( m_xDocHolder->GetComponent(), uno::UNO_QUERY );
if ( xDoc.is() )
@@ -359,20 +363,20 @@ 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;
+ if(m_aLinkTempFile.is())
+ aArgs[0].Value <<= m_aLinkTempFile->getUri();
+ else
+ aArgs[0].Value <<= m_aLinkURL;
+
aArgs[1].Name = "FilterName";
aArgs[1].Value <<= m_aLinkFilterName;
+
if ( m_bLinkHasPassword )
{
aArgs.realloc( ++nLen );
@@ -383,10 +387,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 +444,6 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl()
}
-
OUString OCommonEmbeddedObject::GetFilterName( sal_Int32 nVersion ) const
{
OUString aFilterName = GetPresetFilterName();
@@ -847,7 +862,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
{
uno::Reference< util::XCloseable > xResult;
- SAL_WARN_IF( !m_bIsLink, "embeddedobj.common", "The object is not a linked one!" );
+ SAL_WARN_IF( !m_bIsLinkURL, "embeddedobj.common", "The object is not a linked one!" );
uno::Sequence< beans::PropertyValue > aTempMediaDescr;
@@ -899,7 +914,12 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_
{
aTempMediaDescr.realloc( 2 );
aTempMediaDescr[0].Name = "URL";
- aTempMediaDescr[0].Value <<= m_aLinkURL;
+
+ // tdf#141529 use URL of the linked TempFile if it exists
+ aTempMediaDescr[0].Value <<= m_aLinkTempFile.is()
+ ? m_aLinkTempFile->getUri()
+ : m_aLinkURL;
+
aTempMediaDescr[1].Name = "FilterName";
aTempMediaDescr[1].Value <<= m_aLinkFilterName;
}
@@ -972,8 +992,8 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry(
// for now support of this interface is required to allow breaking of links and converting them to normal embedded
// objects, so the persist name must be handled correctly ( althowgh no real persist entry is used )
- // OSL_ENSURE( !m_bIsLink, "This method implementation must not be used for links!" );
- if ( m_bIsLink )
+ // OSL_ENSURE( !m_bIsLinkURL, "This method implementation must not be used for links!" );
+ if ( m_bIsLinkURL )
{
m_aEntryName = sEntName;
return;
@@ -1151,8 +1171,8 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
// for now support of this interface is required to allow breaking of links and converting them to normal embedded
// objects, so the persist name must be handled correctly ( althowgh no real persist entry is used )
- // OSL_ENSURE( !m_bIsLink, "This method implementation must not be used for links!" );
- if ( m_bIsLink )
+ // OSL_ENSURE( !m_bIsLinkURL, "This method implementation must not be used for links!" );
+ if ( m_bIsLinkURL )
return;
OSL_ENSURE( m_xParentStorage.is() && m_xObjectStorage.is(), "The object has no valid persistence!" );
@@ -1279,10 +1299,33 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
// for now support of this interface is required to allow breaking of links and converting them to normal embedded
// objects, so the persist name must be handled correctly ( althowgh no real persist entry is used )
- // OSL_ENSURE( !m_bIsLink, "This method implementation must not be used for links!" );
- if ( m_bIsLink )
+ // OSL_ENSURE( !m_bIsLinkURL, "This method implementation must not be used for links!" );
+ if ( m_bIsLinkURL )
{
m_aNewEntryName = sEntName;
+
+ if(m_aLinkTempFile.is() && m_bLinkTempFileChanged)
+ {
+ // tdf#141529 if we have a changed copy of the original OLE data we now
+ // need to write it back 'over' the original OLE data
+ uno::Reference < ucb::XSimpleFileAccess2 > xFileAccess(ucb::SimpleFileAccess::create( m_xContext ));
+ uno::Reference < io::XInputStream > xTempIn = m_aLinkTempFile->getInputStream();
+
+ // This is *needed* since OTempFileService calls OTempFileService::readBytes which
+ // ensures the SvStream mpStream gets/is opened, *but* also sets the mnCachedPos from
+ // OTempFileService which still points to the end-of-file (from write-cc'ing).
+ uno::Reference < io::XSeekable > xSeek( xTempIn, uno::UNO_QUERY_THROW );
+ xSeek->seek(0);
+
+ xFileAccess->writeFile(m_aLinkURL, xTempIn);
+
+ // Do *not* close input, that would remove the temporary file too early
+ // xTempIn->closeInput();
+
+ // reset flag m_bLinkTempFileChanged
+ m_bLinkTempFileChanged = false;
+ }
+
return;
}
@@ -1411,8 +1454,8 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew )
// for now support of this interface is required to allow breaking of links and converting them to normal embedded
// objects, so the persist name must be handled correctly ( althowgh no real persist entry is used )
- // OSL_ENSURE( !m_bIsLink, "This method implementation must not be used for links!" );
- if ( m_bIsLink )
+ // OSL_ENSURE( !m_bIsLinkURL, "This method implementation must not be used for links!" );
+ if ( m_bIsLinkURL )
{
if ( bUseNew )
m_aEntryName = m_aNewEntryName;
@@ -1546,7 +1589,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
if ( !m_xDocHolder->GetComponent().is() )
throw uno::RuntimeException();
- if ( m_bIsLink )
+ if ( m_bIsLinkURL )
{
// TODO: just store the document to its location
uno::Reference< frame::XStorable > xStorable( m_xDocHolder->GetComponent(), uno::UNO_QUERY_THROW );
@@ -1654,7 +1697,7 @@ void SAL_CALL OCommonEmbeddedObject::reload(
"The object waits for saveCompleted() call!",
static_cast< ::cppu::OWeakObject* >(this) );
- if ( m_bIsLink )
+ if ( m_bIsLinkURL )
{
// reload of the link
OUString aOldLinkFilter = m_aLinkFilterName;
@@ -1723,7 +1766,7 @@ void SAL_CALL OCommonEmbeddedObject::reload(
if ( lArguments[nInd].Name == "ReadOnly" )
lArguments[nInd].Value >>= m_bReadOnly;
- if ( bOldReadOnlyValue != m_bReadOnly && !m_bIsLink )
+ if ( bOldReadOnlyValue != m_bReadOnly && !m_bIsLinkURL )
{
// close own storage
try {
@@ -1755,7 +1798,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
- if (!m_bIsLink || m_nObjectState == -1)
+ if (!m_bIsLinkURL || m_nObjectState == -1)
{
// it must be a linked initialized object
throw embed::WrongStateException(
@@ -1793,10 +1836,21 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
// TODO/LATER: handle the case when temp doc can not be created
// the document is a new embedded object so it must be marked as modified
uno::Reference< util::XCloseable > xDocument = CreateTempDocFromLink_Impl();
- uno::Reference< util::XModifiable > xModif( m_xDocHolder->GetComponent(), uno::UNO_QUERY_THROW );
try
{
- xModif->setModified( true );
+ if(m_xDocHolder.is() && m_xDocHolder->GetComponent().is())
+ {
+ // tdf#141528 m_xDocHolder->GetComponent() may be not set, so add it
+ // to the try path to not get thrown out of the local context to the next
+ // highter try...catch on the stack. To make breakLink work it is
+ // *necessary* to execute the code below that resets the linked state,
+ // esp. the *.clear stuff and resetting m_bIsLink.
+ uno::Reference< util::XModifiable > xModif( m_xDocHolder->GetComponent(), uno::UNO_QUERY_THROW );
+
+ // all other locations in this file check for xModif.is(), so do it here, too
+ if ( xModif.is() )
+ xModif->setModified( true );
+ }
}
catch( const uno::Exception& )
{}
@@ -1813,7 +1867,10 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt
else if ( m_nObjectState == embed::EmbedStates::ACTIVE )
m_xDocHolder->Show();
- m_bIsLink = false;
+ // tdf#141529 reset all stuff involved in linked state, including
+ // the OLE content copied to the temp file
+ m_bIsLinkURL = false;
+ m_aLinkTempFile.clear();
m_aLinkFilterName.clear();
m_aLinkURL.clear();
}
@@ -1825,7 +1882,7 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::isLink()
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
- return m_bIsLink;
+ return m_bIsLinkURL;
}
@@ -1835,7 +1892,7 @@ OUString SAL_CALL OCommonEmbeddedObject::getLinkURL()
if ( m_bDisposed )
throw lang::DisposedException(); // TODO
- if ( !m_bIsLink )
+ if ( !m_bIsLinkURL )
throw embed::WrongStateException(
"The object is not a link object!",
static_cast< ::cppu::OWeakObject* >(this) );
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/commonembedding/visobj.cxx b/embeddedobj/source/commonembedding/visobj.cxx
index 6306ecfad0cf..851457609e7d 100644
--- a/embeddedobj/source/commonembedding/visobj.cxx
+++ b/embeddedobj/source/commonembedding/visobj.cxx
@@ -55,7 +55,7 @@ void SAL_CALL OCommonEmbeddedObject::setVisualAreaSize( sal_Int64 nAspect, const
changeState( embed::EmbedStates::RUNNING );
// the links should be switched back to loaded state for now to avoid locking problems
- bBackToLoaded = m_bIsLink;
+ bBackToLoaded = m_bIsLinkURL;
}
bool bSuccess = m_xDocHolder->SetExtent( nAspect, aSize );
@@ -88,7 +88,7 @@ awt::Size SAL_CALL OCommonEmbeddedObject::getVisualAreaSize( sal_Int64 nAspect )
changeState( embed::EmbedStates::RUNNING );
// the links should be switched back to loaded state for now to avoid locking problems
- bBackToLoaded = m_bIsLink;
+ bBackToLoaded = m_bIsLinkURL;
}
awt::Size aResult;
@@ -128,7 +128,7 @@ sal_Int32 SAL_CALL OCommonEmbeddedObject::getMapUnit( sal_Int64 nAspect )
changeState( embed::EmbedStates::RUNNING );
// the links should be switched back to loaded state for now to avoid locking problems
- bBackToLoaded = m_bIsLink;
+ bBackToLoaded = m_bIsLinkURL;
}
sal_Int32 nResult = m_xDocHolder->GetMapUnit( nAspect );
@@ -172,7 +172,7 @@ embed::VisualRepresentation SAL_CALL OCommonEmbeddedObject::getPreferredVisualRe
setVisualAreaSize(nAspect, aOrigSize);
// the links should be switched back to loaded state for now to avoid locking problems
- bBackToLoaded = m_bIsLink;
+ bBackToLoaded = m_bIsLinkURL;
}
SAL_WARN_IF( !m_xDocHolder->GetComponent().is(), "embeddedobj.common", "Running or Active object has no component!" );
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index b2c9acd9ec1e..56583696304a 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -33,6 +33,7 @@
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/util/XCloseable.hpp>
#include <com/sun/star/chart2/XDefaultSizeTransmitter.hpp>
+#include <com/sun/star/io/XTempFile.hpp>
#include <cppuhelper/weak.hxx>
#include <rtl/ref.hxx>
@@ -132,7 +133,8 @@ protected:
css::awt::Rectangle m_aOwnRectangle;
css::awt::Rectangle m_aClipRectangle;
- bool m_bIsLink;
+ bool m_bIsLinkURL;
+ bool m_bLinkTempFileChanged;
// embedded object related stuff
OUString m_aEntryName;
@@ -146,6 +148,9 @@ protected:
bool m_bLinkHasPassword;
OUString m_aLinkPassword;
+ // tdf#141529 hold a cc of a linked OLE
+ css::uno::Reference < css::io::XTempFile > m_aLinkTempFile;
+
css::uno::Reference< css::uno::XInterface > m_xParent;
bool m_bHasClonedSize; // the object has cached size
@@ -226,6 +231,9 @@ private:
const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs );
+protected:
+ void SetInplaceActiveState();
+
public:
OCommonEmbeddedObject(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
diff --git a/embeddedobj/source/inc/specialobject.hxx b/embeddedobj/source/inc/specialobject.hxx
index 32ad61a7a582..4c4bc70db377 100644
--- a/embeddedobj/source/inc/specialobject.hxx
+++ b/embeddedobj/source/inc/specialobject.hxx
@@ -48,6 +48,13 @@ public:
virtual void SAL_CALL changeState( sal_Int32 nNewState ) override;
virtual void SAL_CALL doVerb( sal_Int32 nVerbID ) override;
+
+// XCommonEmbedPersist
+
+ virtual void SAL_CALL reload(
+ const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
+ const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs ) override;
+
};
#endif
diff --git a/external/breakpad/UnpackedTarball_breakpad.mk b/external/breakpad/UnpackedTarball_breakpad.mk
index b9e14874d72d..362bc396e42b 100644
--- a/external/breakpad/UnpackedTarball_breakpad.mk
+++ b/external/breakpad/UnpackedTarball_breakpad.mk
@@ -25,6 +25,7 @@ $(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/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/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..3308074b363c 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-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..32dca36c1d07 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 \
diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk
index 1cdb64c0bca2..a8ac5b77c8ee 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -22,6 +22,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,curl,\
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.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..067bf5208ba0
--- /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(__FreeBSD__) || 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/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/libffi/ExternalPackage_libffi.mk b/external/libffi/ExternalPackage_libffi.mk
new file mode 100644
index 000000000000..61b0a1ca460c
--- /dev/null
+++ b/external/libffi/ExternalPackage_libffi.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,libffi,libffi))
+
+$(eval $(call gb_ExternalPackage_use_external_project,libffi,libffi))
+
+ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_files,libffi,$(LIBO_LIB_FOLDER)/python-core-$(PYTHON_VERSION)/lib, \
+ $(HOST_PLATFORM)/.libs/libffi-7.dll \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/libffi/ExternalProject_libffi.mk b/external/libffi/ExternalProject_libffi.mk
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..d50d52cbeef8 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 \
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/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..f7b8d67f25b2 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)/python-gdb.py,Tools/gdb/libpython.py))
# Unfortunately the python build system does not allow to explicitly enable or
# disable these, it just tries to build them and then prints which did not
@@ -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..8bf3b519f142 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -18,9 +18,9 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,python3,\
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/i100492-freebsd.patch.1 \
external/python3/python-3.3.0-darwin.patch.1 \
+ external/python3/python-3.8-msvc-sdk.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/python-3.8-msvc-sdk.patch.1 b/external/python3/python-3.8-msvc-sdk.patch.1
new file mode 100644
index 000000000000..fabdbb53ea63
--- /dev/null
+++ b/external/python3/python-3.8-msvc-sdk.patch.1
@@ -0,0 +1,173 @@
+diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
+index 92987af713..d21f9b6e9d 100644
+--- a/PC/pylauncher.rc
++++ b/PC/pylauncher.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+ #if defined(PY_ICON)
+diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
+index e5924a42da..fc607e9784 100644
+--- a/PC/pyshellext.rc
++++ b/PC/pyshellext.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+ /////////////////////////////////////////////////////////////////////////////
+diff --git a/PC/python_exe.rc b/PC/python_exe.rc
+index ae0b029b80..5eba89962b 100644
+--- a/PC/python_exe.rc
++++ b/PC/python_exe.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+ 1 ICON DISCARDABLE "icons\python.ico"
+diff --git a/PC/python_nt.rc b/PC/python_nt.rc
+index fac6105d8a..33cee42cb7 100644
+--- a/PC/python_nt.rc
++++ b/PC/python_nt.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 2 RT_MANIFEST "python.manifest"
+
+ // String Tables
+diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
+index 88bf3592e1..562652be18 100644
+--- a/PC/pythonw_exe.rc
++++ b/PC/pythonw_exe.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 1 RT_MANIFEST "python.manifest"
+
+ 1 ICON DISCARDABLE "icons\pythonw.ico"
+diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
+index 84bd87d9d5..d2c18f8add 100644
+--- a/PC/sqlite3.rc
++++ b/PC/sqlite3.rc
+@@ -4,7 +4,6 @@
+
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+-#include <winuser.h>
+ 2 RT_MANIFEST "python.manifest"
+
+ /////////////////////////////////////////////////////////////////////////////
+diff --git a/PC/pylauncher.rc b/PC/pylauncher.rc
+index d21f9b6e9d..ff7e71e0fd 100644
+--- a/PC/pylauncher.rc
++++ b/PC/pylauncher.rc
+@@ -2,6 +2,11 @@
+
+ #include "python_ver_rc.h"
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/pyshellext.rc b/PC/pyshellext.rc
+index fc607e9784..af797ce95d 100644
+--- a/PC/pyshellext.rc
++++ b/PC/pyshellext.rc
+@@ -2,6 +2,12 @@
+
+ #include "python_ver_rc.h"
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/python_exe.rc b/PC/python_exe.rc
+index 5eba89962b..c3d3bff019 100644
+--- a/PC/python_exe.rc
++++ b/PC/python_exe.rc
+@@ -2,6 +2,12 @@
+
+ #include "python_ver_rc.h"
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/python_nt.rc b/PC/python_nt.rc
+index 33cee42cb7..539362cdc2 100644
+--- a/PC/python_nt.rc
++++ b/PC/python_nt.rc
+@@ -2,6 +2,12 @@
+
+ #include "python_ver_rc.h"
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 2 RT_MANIFEST "python.manifest"
+diff --git a/PC/pythonw_exe.rc b/PC/pythonw_exe.rc
+index 562652be18..38570b74fa 100644
+--- a/PC/pythonw_exe.rc
++++ b/PC/pythonw_exe.rc
+@@ -2,6 +2,12 @@
+
+ #include "python_ver_rc.h"
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 1 RT_MANIFEST "python.manifest"
+diff --git a/PC/sqlite3.rc b/PC/sqlite3.rc
+index d2c18f8add..9ae2aa0f6f 100644
+--- a/PC/sqlite3.rc
++++ b/PC/sqlite3.rc
+@@ -2,6 +2,12 @@
+
+ #include <winver.h>
+
++#ifndef RT_MANIFEST
++// bpo-45220: Cannot reliably #include RT_MANIFEST from
++// anywhere, so we hardcode it
++#define RT_MANIFEST 24
++#endif
++
+ // Include the manifest file that indicates we support all
+ // current versions of Windows.
+ 2 RT_MANIFEST "python.manifest"
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/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/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 60495f90ec65..e50592a6d87f 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -515,9 +515,8 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
mxRbAll->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleAllHdl ) );
TogglePagesHdl();
- const bool bSelectionPresent = pParent->mbSelectionPresent;
- mxRbSelection->set_sensitive( bSelectionPresent );
- if ( bSelectionPresent )
+ mxRbSelection->set_sensitive( pParent->mbSelectionPresent );
+ if ( pParent->mbSelectionPresent )
mxRbSelection->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) );
mbIsPresentation = pParent->mbIsPresentation;
mbIsWriter = pParent->mbIsWriter;
@@ -620,12 +619,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem(ImpPDFTabDialog* pParent)
}
mxCbExportPlaceholders->set_visible(mbIsWriter);
- if( mbIsWriter )
- {
- // tdf#54908 Make selection active if there is a selection in Writer's version
- mxRbSelection->set_active( bSelectionPresent );
- }
- else
+ if( !mbIsWriter )
{
mxCbExportPlaceholders->set_active(false);
}
diff --git a/filter/source/xsltdialog/xmlfilterjar.hxx b/filter/source/xsltdialog/xmlfilterjar.hxx
index d9e20cd05847..d4a760366626 100644
--- a/filter/source/xsltdialog/xmlfilterjar.hxx
+++ b/filter/source/xsltdialog/xmlfilterjar.hxx
@@ -23,6 +23,7 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <memory>
#include <vector>
class filter_info_impl;
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 42980eeeaff7..a6b4a8319fd1 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -270,7 +270,7 @@ namespace XSLT
OSL_ASSERT(m_transformer != nullptr);
OSL_ASSERT(m_transformer->getInputStream().is());
OSL_ASSERT(m_transformer->getOutputStream().is());
- OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty());
+ OSL_ASSERT(!m_transformer->getStyleSheetURL().isEmpty() || !m_transformer->getStyleSheetText().isEmpty());
::std::map<const char*, OString> pmap = m_transformer->getParameters();
::std::vector< const char* > params( pmap.size() * 2 + 1 ); // build parameters
int paramIndex = 0;
@@ -283,8 +283,25 @@ namespace XSLT
xmlDocPtr doc = xmlReadIO(&ParserInputBufferCallback::on_read,
&ParserInputBufferCallback::on_close,
static_cast<void*> (this), nullptr, nullptr, 0);
- xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
+ xsltStylesheetPtr styleSheet = nullptr;
+ if (m_transformer->getStyleSheetURL().getLength())
+ styleSheet = xsltParseStylesheetFile(
reinterpret_cast<const xmlChar *>(m_transformer->getStyleSheetURL().getStr()));
+ else if (m_transformer->getStyleSheetText().getLength())
+ {
+ xmlDocPtr styleSheetDoc = xmlReadMemory(
+ m_transformer->getStyleSheetText().getStr(),
+ m_transformer->getStyleSheetText().getLength(),
+ "noname.xml", nullptr, 0);
+
+ styleSheet = xsltParseStylesheetDoc(styleSheetDoc);
+ }
+
+ if (!styleSheet)
+ {
+ m_transformer->error("No stylesheet was created");
+ }
+
xmlDocPtr result = nullptr;
exsltRegisterAll();
registerExtensionModule();
@@ -320,7 +337,7 @@ namespace XSLT
}
else
{
- xmlErrorPtr lastErr = xmlGetLastError();
+ const xmlError* lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
@@ -329,7 +346,6 @@ namespace XSLT
m_transformer->error(msg);
}
- closeOutput();
oh.reset();
xsltFreeStylesheet(styleSheet);
xsltTransformContextPtr tcontext = nullptr;
@@ -477,7 +493,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++)
{
@@ -501,6 +521,10 @@ namespace XSLT
{
m_styleSheetURL = valueUTF8;
}
+ if (nameUTF8 == "StylesheetText")
+ {
+ m_styleSheetText = valueUTF8;
+ }
else if (nameUTF8 == "SourceURL")
{
m_parameters.insert(pair<const char*, OString> (
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index d646d5dbfc43..d2baea0b0e29 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;
@@ -114,6 +114,7 @@ namespace XSLT
ListenerList m_listeners;
OString m_styleSheetURL;
+ OString m_styleSheetText;
::std::map<const char *, OString> m_parameters;
@@ -164,6 +165,8 @@ namespace XSLT
const OString&
getStyleSheetURL() const { return m_styleSheetURL; }
+ const OString& getStyleSheetText() const { return m_styleSheetText; }
+
const ::std::map<const char*, OString>&
getParameters() const { return m_parameters; }
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/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/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index f7a41c75f9e3..c0d24d3b4900 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -564,7 +564,7 @@ void SAL_CALL MenuBarManager::disposing( const EventObject& Source )
static void lcl_CheckForChildren(Menu* pMenu, sal_uInt16 nItemId)
{
if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( nItemId ))
- pMenu->EnableItem( nItemId, pThisPopup->GetItemCount() != 0 );
+ pMenu->EnableItem(nItemId, pThisPopup->GetItemCount() != 0 && pThisPopup->HasValidEntries(true));
}
// vcl handler
@@ -731,6 +731,15 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
{
if( xMenuItemDispatch.is() || menuItemHandler->aMenuItemURL != ".uno:RecentFileList" )
bPopupMenu = CreatePopupMenuController(menuItemHandler.get());
+
+ if (bPopupMenu && menuItemHandler->xPopupMenuController.is())
+ {
+ if (PopupMenu* pThisPopup = pMenu->GetPopupMenu(menuItemHandler->nItemId))
+ {
+ pThisPopup->Activate();
+ pThisPopup->Deactivate();
+ }
+ }
}
else if ( menuItemHandler->xPopupMenuController.is() )
{
@@ -738,7 +747,10 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
menuItemHandler->xPopupMenuController->updatePopupMenu();
bPopupMenu = true;
if (PopupMenu* pThisPopup = pMenu->GetPopupMenu( menuItemHandler->nItemId ))
- pMenu->EnableItem( menuItemHandler->nItemId, pThisPopup->GetItemCount() != 0 );
+ {
+ pThisPopup->Activate();
+ pThisPopup->Deactivate();
+ }
}
lcl_CheckForChildren(pMenu, menuItemHandler->nItemId);
@@ -763,6 +775,11 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
{
// Force update of popup menu
menuItemHandler->xPopupMenuController->updatePopupMenu();
+ if (PopupMenu* pThisPopup = pMenu->GetPopupMenu(menuItemHandler->nItemId))
+ {
+ pThisPopup->Activate();
+ pThisPopup->Deactivate();
+ }
lcl_CheckForChildren(pMenu, menuItemHandler->nItemId);
}
else if ( menuItemHandler->xMenuItemDispatch.is() )
@@ -783,7 +800,15 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu, bool )
}
}
else if ( menuItemHandler->xSubMenuManager.is() )
+ {
+ MenuBarManager* pMenuBarManager = static_cast<MenuBarManager*>(menuItemHandler->xSubMenuManager.get());
+ if (pMenuBarManager)
+ {
+ pMenuBarManager->Activate(pMenuBarManager->GetMenuBar());
+ pMenuBarManager->Deactivate(pMenuBarManager->GetMenuBar());
+ }
lcl_CheckForChildren(pMenu, menuItemHandler->nItemId);
+ }
}
}
}
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/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/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 6b59399e9124..0bc2d61a1134 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -158,7 +158,7 @@ static const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
#define MAXSLOPPY 21
-void PaperInfo::doSloppyFit()
+void PaperInfo::doSloppyFit(bool bAlsoTryRotated)
{
if (m_eType != PAPER_USER)
return;
@@ -169,11 +169,8 @@ void PaperInfo::doSloppyFit()
long lDiffW = labs(aDinTab[i].m_nWidth - m_nPaperWidth);
long lDiffH = labs(aDinTab[i].m_nHeight - m_nPaperHeight);
- long lFlipDiffW = labs(aDinTab[i].m_nHeight - m_nPaperWidth);
- long lFlipDiffH = labs(aDinTab[i].m_nWidth - m_nPaperHeight);
- if ( (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY) ||
- (lFlipDiffW < MAXSLOPPY && lFlipDiffH < MAXSLOPPY) )
+ if (lDiffW < MAXSLOPPY && lDiffH < MAXSLOPPY)
{
m_nPaperWidth = aDinTab[i].m_nWidth;
m_nPaperHeight = aDinTab[i].m_nHeight;
@@ -181,6 +178,13 @@ void PaperInfo::doSloppyFit()
return;
}
}
+
+ if (bAlsoTryRotated)
+ {
+ std::swap(m_nPaperWidth, m_nPaperHeight);
+ doSloppyFit();
+ std::swap(m_nPaperWidth, m_nPaperHeight);
+ }
}
bool PaperInfo::sloppyEqual(const PaperInfo &rOther) const
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index 64d7f2c5c3cb..5b3b20574483 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -29,16 +29,19 @@
class IntlWrapper;
-// Line defaults in twips (former Writer defaults):
-
-#define DEF_LINE_WIDTH_0 1
-#define DEF_LINE_WIDTH_1 20
-#define DEF_LINE_WIDTH_2 50
-#define DEF_LINE_WIDTH_3 80
-#define DEF_LINE_WIDTH_4 100
-#define DEF_LINE_WIDTH_5 10
-#define DEF_LINE_WIDTH_6 5 // 0.25pt
-
+// Line width defaults in twips
+// Thin matches Excel's default values
+// See tdf#48622 for the discussion leading to these defaults.
+class SvxBorderLineWidth
+{
+public:
+ static const sal_Int16 Hairline = 1; // 0.05pt
+ static const sal_Int16 VeryThin = 10; // 0.5pt
+ static const sal_Int16 Thin = 15; // 0.75pt
+ static const sal_Int16 Medium = 30; // 1.5pt
+ static const sal_Int16 Thick = 45; // 2.25pt
+ static const sal_Int16 ExtraThick = 90; // 4.5pt
+};
// Abstracts over values from css::table::BorderLineStyle
enum class SvxBorderLineStyle : sal_Int16
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index 1f77ce661020..59040d10b81a 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -500,7 +500,7 @@ public:
const Color& rTextLineColor);
virtual OUString GetUndoComment( sal_uInt16 nUndoId ) const;
virtual bool SpellNextDocument();
- virtual void FieldClicked( const SvxFieldItem& rField );
+ virtual bool FieldClicked( const SvxFieldItem& rField );
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, boost::optional<Color>& rTxtColor, boost::optional<Color>& rFldColor );
// override this if access to bullet information needs to be provided
diff --git a/include/editeng/unoprnms.hxx b/include/editeng/unoprnms.hxx
index ca3b977afeee..cee3ea02993d 100644
--- a/include/editeng/unoprnms.hxx
+++ b/include/editeng/unoprnms.hxx
@@ -160,6 +160,8 @@
#define UNO_NAME_MISC_OBJ_TITLE "Title"
#define UNO_NAME_MISC_OBJ_DESCRIPTION "Description"
+#define UNO_NAME_HYPERLINK "Hyperlink"
+
#define UNO_NAME_GRAPHOBJ_FILLBITMAP "GraphicObjectFillBitmap"
#define UNO_NAME_GRAPHOBJ_REPLACEMENT_GRAPHIC "ReplacementGraphic"
#define UNO_NAME_GRAPHOBJ_GRAFSTREAMURL "GraphicStreamURL"
diff --git a/include/i18nutil/paper.hxx b/include/i18nutil/paper.hxx
index 99bf5df87116..c86b96d0a5ab 100644
--- a/include/i18nutil/paper.hxx
+++ b/include/i18nutil/paper.hxx
@@ -131,7 +131,7 @@ public:
long getWidth() const { return m_nPaperWidth; }
long getHeight() const { return m_nPaperHeight; }
bool sloppyEqual(const PaperInfo &rOther) const;
- void doSloppyFit();
+ void doSloppyFit(bool bAlsoTryRotated = false);
static PaperInfo getSystemDefaultPaper();
static PaperInfo getDefaultPaperForLocale(const css::lang::Locale & rLocale);
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/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 2b3677df106d..952080870cb0 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -217,6 +217,7 @@ struct ShapeModel
OUString maSignatureLineSigningInstructions;
bool mbSignatureLineShowSignDate;
bool mbSignatureLineCanAddComment;
+ OUString maHyperlink; ///< The hyperlink assigned to the shape
explicit ShapeModel();
~ShapeModel();
diff --git a/include/oox/vml/vmlshapecontext.hxx b/include/oox/vml/vmlshapecontext.hxx
index c07bcf12e84f..15b1fe29987f 100644
--- a/include/oox/vml/vmlshapecontext.hxx
+++ b/include/oox/vml/vmlshapecontext.hxx
@@ -140,6 +140,8 @@ private:
void setControl2( const OUString& rPoints );
/** Processes the 'path' attribute. */
void setVmlPath( const OUString& rPath );
+ /** Processes the 'href' attribute. */
+ void setHyperlink( const OUString& rHyperlink );
private:
ShapeBase& mrShape;
diff --git a/include/sal/log.hxx b/include/sal/log.hxx
index 00d533ab5495..f85c7d882134 100644
--- a/include/sal/log.hxx
+++ b/include/sal/log.hxx
@@ -161,7 +161,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
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/objsh.hxx b/include/sfx2/objsh.hxx
index 2a56ebe88e07..2a65b7a93e7e 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 );
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/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/svl/solar.hrc b/include/svl/solar.hrc
index 6b4cb07bbc33..317d45a84bc1 100644
--- a/include/svl/solar.hrc
+++ b/include/svl/solar.hrc
@@ -23,7 +23,7 @@
// defines ------------------------------------------------------------------
#define OWN_ATTR_VALUE_START 3900
-#define OWN_ATTR_VALUE_END 4004
+#define OWN_ATTR_VALUE_END 4005
#define RID_LIB_START 10000
#define RID_LIB_END 19999
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/framelinkarray.hxx b/include/svx/framelinkarray.hxx
index 55938bde7ec6..a6684506ffe5 100644
--- a/include/svx/framelinkarray.hxx
+++ b/include/svx/framelinkarray.hxx
@@ -294,6 +294,9 @@ public:
Returns total output range of merged ranges, if bExpandMerged is true. */
basegfx::B2DRange GetCellRange( size_t nCol, size_t nRow, bool bExpandMerged ) const;
+ // return output range of given row/col range in logical coordinates
+ basegfx::B2DRange GetB2DRange( sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow ) const;
+
// mirroring
/** Mirrors the entire array horizontally. */
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/svdobj.hxx b/include/svx/svdobj.hxx
index 361062554a87..431bc4cd912e 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -917,6 +917,9 @@ public:
void setSuitableOutlinerBg(Outliner& rOutliner) const;
+ OUString getHyperlink() const { return msHyperlink; }
+ void setHyperlink(const OUString& sHyperlink) { msHyperlink = sHyperlink; }
+
protected:
tools::Rectangle aOutRect; // surrounding rectangle for Paint (incl. LineWidth, ...)
Point aAnchor; // anchor position (Writer)
@@ -1024,6 +1027,8 @@ private:
// HACK: Do not automatically insert newly created object into a page.
// The user needs to do it manually later.
bool mbDoNotInsertIntoPageAutomatically;
+ // Hyperlink for the whole shape
+ OUString msHyperlink;
// only for internal use!
SvxShape* getSvxShape();
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/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/svx/unoshprp.hxx b/include/svx/unoshprp.hxx
index 0861844be16d..c322b7d1697d 100644
--- a/include/svx/unoshprp.hxx
+++ b/include/svx/unoshprp.hxx
@@ -192,7 +192,8 @@
#define OWN_ATTR_SIGNATURELINE_UNSIGNED_IMAGE (OWN_ATTR_VALUE_START+102)
#define OWN_ATTR_SIGNATURELINE_IS_SIGNED (OWN_ATTR_VALUE_START+103)
#define OWN_ATTR_QRCODE (OWN_ATTR_VALUE_START+104)
-// ATTENTION: maximum is OWN_ATTR_VALUE_START+104 svx, see include/svl/solar.hrc
+#define OWN_ATTR_HYPERLINK (OWN_ATTR_VALUE_START+105)
+// ATTENTION: maximum is OWN_ATTR_VALUE_START+105 svx, see include/svl/solar.hrc
// #FontWork#
#define FONTWORK_PROPERTIES \
@@ -340,7 +341,8 @@
{ OUString("UINamePlural"), OWN_ATTR_UINAME_PLURAL , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
/* #i68101# */ \
{ OUString(UNO_NAME_MISC_OBJ_TITLE), OWN_ATTR_MISC_OBJ_TITLE , ::cppu::UnoType<OUString>::get(), 0, 0}, \
- { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0},
+ { OUString(UNO_NAME_MISC_OBJ_DESCRIPTION), OWN_ATTR_MISC_OBJ_DESCRIPTION , ::cppu::UnoType<OUString>::get(), 0, 0}, \
+ { OUString(UNO_NAME_HYPERLINK), OWN_ATTR_HYPERLINK , ::cppu::UnoType<OUString>::get(), 0, 0},
#define LINKTARGET_PROPERTIES \
{ OUString(UNO_NAME_LINKDISPLAYNAME), OWN_ATTR_LDNAME , ::cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::READONLY, 0}, \
diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index fa62f28f362b..10dd3d3aea6e 100644
--- a/include/tools/color.hxx
+++ b/include/tools/color.hxx
@@ -162,6 +162,19 @@ public:
static Color HSBtoRGB(sal_uInt16 nHue, sal_uInt16 nSaturation, sal_uInt16 nBrightness);
void RGBtoHSB(sal_uInt16& nHue, sal_uInt16& nSaturation, sal_uInt16& nBrightness) const;
+ /** Converts a string into a color. Supports:
+ * #RRGGBB
+ * #rrggbb
+ * #RGB
+ * #rgb
+ * RRGGBB
+ * rrggbb
+ * RGB
+ * rgb
+ * If fails returns Color().
+ */
+ static Color STRtoRGB(const OUString& colorname);
+
bool operator==(const Color& rColor) const
{
return mValue == rColor.mValue;
@@ -171,10 +184,16 @@ public:
return !(Color::operator==(rColor));
}
- // Return color as RGB hex string
+ // Return color as RGB hex string: rrggbb
// for example "00ff00" for green color
OUString AsRGBHexString() const;
+ /* Return color as RGB hex string: RRGGBB
+ * for example "00FF00" for green color
+ * @return hex string
+ */
+ OUString AsRGBHEXString() const;
+
// get ::basegfx::BColor from this color
basegfx::BColor getBColor() const
{
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/menu.hxx b/include/vcl/menu.hxx
index 76a39c813eef..8c5cd2c2af34 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -22,6 +22,7 @@
#include <memory>
#include <vcl/vclenum.hxx>
+#include <tools/color.hxx>
#include <tools/link.hxx>
#include <vcl/dllapi.h>
#include <vcl/keycod.hxx>
@@ -256,6 +257,7 @@ public:
void SetMenuFlags( MenuFlags nFlags ) { nMenuFlags = nFlags; }
MenuFlags GetMenuFlags() const { return nMenuFlags; }
+ bool HasValidEntries(bool bCheckPopups) const;
sal_uInt16 GetItemCount() const;
sal_uInt16 GetItemId(sal_uInt16 nPos) const;
sal_uInt16 GetItemId(const OString &rIdent) const;
@@ -306,6 +308,9 @@ public:
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
Image GetItemImage( sal_uInt16 nItemId ) const;
+ // Instead of an image, draw a color
+ void SetItemColor( sal_uInt16 nItemId, const Color& rColor );
+
void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand );
OUString GetItemCommand( sal_uInt16 nItemId ) const;
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 75894432f05d..44bc36271366 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -518,6 +518,7 @@ public:
void SetToolbarIconSize( ToolbarIconSize nSize );
ToolbarIconSize GetToolbarIconSize() const;
+ Size GetToolbarIconSizePixel() const;
/** Set the icon theme to use. */
void SetIconTheme(const OUString&);
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..012fbd9c4bd3 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -670,6 +670,7 @@ public:
void InvalidateEntry( SvTreeListEntry* );
SvLBoxItem* GetItem( SvTreeListEntry*, long nX, SvLBoxTab** ppTab);
SvLBoxItem* GetItem( SvTreeListEntry*, long nX );
+ long GetItemPos(SvTreeListEntry* pEntry, sal_uInt16 nTabIdx);
void SetDragDropMode( DragDropMode );
void SetSelectionMode( SelectionMode );
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 5a9ee5a92f39..93ba45794500 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -564,6 +564,7 @@ class VCL_DLLPUBLIC ComboBox : virtual public Container
{
private:
OUString m_sSavedValue;
+ std::vector<OUString> m_aSavedValues;
protected:
Link<ComboBox&, void> m_aChangeHdl;
@@ -597,6 +598,10 @@ public:
{
insert(-1, rStr, &rId, nullptr, &rImage);
}
+ void append(int pos, const OUString& rId, const OUString& rStr)
+ {
+ insert(pos, rStr, &rId, nullptr, nullptr);
+ }
virtual void insert_separator(int pos, const OUString& rId) = 0;
void append_separator(const OUString& rId) { insert_separator(-1, rId); }
@@ -651,8 +656,20 @@ public:
void connect_entry_activate(const Link<ComboBox&, bool>& rLink) { m_aEntryActivateHdl = rLink; }
void save_value() { m_sSavedValue = get_active_text(); }
+ void save_values_by_id(const OUString& rId)
+ {
+ m_aSavedValues.push_back(get_text(find_id(rId)));
+ }
OUString const& get_saved_value() const { return m_sSavedValue; }
+ OUString const& get_saved_values(int pos) const { return m_aSavedValues[pos]; }
bool get_value_changed_from_saved() const { return m_sSavedValue != get_active_text(); }
+ bool get_values_changed_from_saved() const
+ {
+ return !m_aSavedValues.empty()
+ && std::find(m_aSavedValues.begin(), m_aSavedValues.end(), get_active_text())
+ == m_aSavedValues.end();
+ }
+ void removeSavedValues() { m_aSavedValues.clear(); }
};
class VCL_DLLPUBLIC TreeIter
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index a0e52903060a..a4ba54a6f77a 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -706,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,
@@ -1889,6 +1889,7 @@ namespace xmloff { namespace token {
XML_TEXT_BACKGROUND_COLOR,
XML_TEXT_BLINKING,
XML_TEXT_BOX,
+ XML_TEXT_COLOR,
XML_TEXT_COMBINE,
XML_TEXT_COMBINE_END_CHAR,
XML_TEXT_COMBINE_START_CHAR,
@@ -2082,6 +2083,7 @@ namespace xmloff { namespace token {
XML_WHOLE_PAGE,
XML_WIDOWS,
XML_WIDTH,
+ XML_WINDOW_FONT_COLOR,
XML_WORD,
XML_WORD_COUNT,
XML_WRAP,
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 3586ea58f119..1c2d2c39ba3f 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -215,8 +215,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);
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/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/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 12ab8e2057e9..250ca702194c 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3412,6 +3412,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/sheet,\
FillDirection \
FillMode \
FilterConnection \
+ FilterFieldType \
FilterFieldValue \
FilterOperator \
FilterOperator2 \
diff --git a/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl b/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
index 9a2ba7fe4192..0a2548db4dc0 100644
--- a/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
+++ b/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
@@ -24,6 +24,7 @@
#include <com/sun/star/xml/sax/SAXException.idl>
#include <com/sun/star/lang/IllegalArgumentException.idl>
#include <com/sun/star/uno/Exception.idl>
+#include <com/sun/star/io/XInputStream.idl>
module com { module sun { module star { module document {
@@ -70,6 +71,30 @@ interface XOOXMLDocumentPropertiesImporter: com::sun::star::uno::XInterface
raises( com::sun::star::lang::IllegalArgumentException,
com::sun::star::xml::sax::SAXException,
com::sun::star::uno::Exception );
+
+ /** find and get core properties stream
+
+ (usually it is docProps\core.xml)
+ @since LibreOffice 7.4
+ */
+
+ com::sun::star::io::XInputStream getCorePropertiesStream([in] com::sun::star::embed::XStorage xSource);
+
+ /** find and get extended properties stream
+
+ (usually it is docProps/app.xml)
+ @since LibreOffice 7.4
+ */
+
+ com::sun::star::io::XInputStream getExtendedPropertiesStream([in] com::sun::star::embed::XStorage xSource);
+
+ /** find and get custom properties streams
+
+ (usually it is customXml\*.xml)
+ @since LibreOffice 7.4
+ */
+
+ sequence< com::sun::star::io::XInputStream > getCustomPropertiesStreams([in] com::sun::star::embed::XStorage xSource);
};
diff --git a/offapi/com/sun/star/sheet/FilterFieldType.idl b/offapi/com/sun/star/sheet/FilterFieldType.idl
new file mode 100644
index 000000000000..59a9807379e6
--- /dev/null
+++ b/offapi/com/sun/star/sheet/FilterFieldType.idl
@@ -0,0 +1,40 @@
+/* -*- 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 __com_sun_star_sheet_FilterFieldType_idl__
+#define __com_sun_star_sheet_FilterFieldType_idl__
+
+module com { module sun { module star { module sheet {
+
+/**
+ * @since LibreOffice 7.2
+ */
+constants FilterFieldType
+{
+ /** Filter by numeric value */
+ const long NUMERIC = 0;
+
+ /** Filter by string value */
+ const long STRING = 1;
+
+ /** Filter by date */
+ const long DATE = 2;
+
+ /** Filter by text color */
+ const long TEXT_COLOR = 3;
+
+ /** Filter by background color */
+ const long BACKGROUND_COLOR = 4;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/sheet/FilterFieldValue.idl b/offapi/com/sun/star/sheet/FilterFieldValue.idl
index 5d1b40837476..a8930ee0f6ac 100644
--- a/offapi/com/sun/star/sheet/FilterFieldValue.idl
+++ b/offapi/com/sun/star/sheet/FilterFieldValue.idl
@@ -19,6 +19,8 @@ struct FilterFieldValue
{
/** selects whether the TableFilterFieldValue::NumericValue
or the TableFilterFieldValue::StringValue is used.
+
+ @deprecated - Use FilterType instead.
*/
boolean IsNumeric;
@@ -29,6 +31,28 @@ struct FilterFieldValue
/** specifies a string value for the condition.
*/
string StringValue;
+
+ /** Which field should be used for filtering:
+
+ <ul>
+ <li>com::sun::star::sheet::FilterFieldType::NUMERIC -> NumericValue</li>
+ <li>com::sun::star::sheet::FilterFieldType::STRING -> StringValue</li>
+ <li>com::sun::star::sheet::FilterFieldType::DATE -> StringValue</li>
+ <li>com::sun::star::sheet::FilterFieldType::TEXT_COLOR -> ColorValue</li>
+ <li>com::sun::star::sheet::FilterFieldType::BACKGROUND_COLOR -> ColorValue</li>
+ </ul>
+
+ @see com::sun::star::sheet::FilterFieldType
+ @since LibreOffice 7.2
+ */
+ long FilterType;
+
+ /** The color which is used for filtering
+
+ @since LibreOffice 7.2
+ */
+ com::sun::star::util::Color ColorValue;
+
};
}; }; }; };
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 7c0eb6c255d2..75416223f135 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>
@@ -2708,11 +2724,158 @@
</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>
</info>
</set>
+ <group oor:name="WindowsSecurityZone">
+ <info>
+ <desc>Contains security settings regarding Basic scripts.</desc>
+ </info>
+ <prop oor:name="ZoneLocal" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Action needed for opening document with macro with Windows zone
+ identifier URLZONE_LOCAL_MACHINE (0, local machine).</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Ask</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Allow</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Deny</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="ZoneIntranet" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Action needed for opening document with macro with Windows zone
+ identifier URLZONE_INTRANET (1, local machine).</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Ask</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Allow</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Deny</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="ZoneTrusted" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Action needed for opening document with macro with Windows zone
+ identifier URLZONE_TRUSTED (2, trusted).</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Ask</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Allow</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Deny</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>0</value>
+ </prop>
+ <prop oor:name="ZoneInternet" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Action needed for opening document with macro with Windows zone
+ identifier URLZONE_INTERNET (3, internet).</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Ask</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Allow</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Deny</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>2</value>
+ </prop>
+ <prop oor:name="ZoneUntrusted" oor:type="xs:int" oor:nillable="false">
+ <info>
+ <desc>Action needed for opening document with macro with Windows zone
+ identifier URLZONE_UNTRUSTED (3, untrusted source).</desc>
+ </info>
+ <constraints>
+ <enumeration oor:value="0">
+ <info>
+ <desc>Ask</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="1">
+ <info>
+ <desc>Allow</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="2">
+ <info>
+ <desc>Deny</desc>
+ </info>
+ </enumeration>
+ </constraints>
+ <value>2</value>
+ </prop>
+ </group>
</group>
</group>
<group oor:name="View">
diff --git a/oox/source/docprop/ooxmldocpropimport.cxx b/oox/source/docprop/ooxmldocpropimport.cxx
index b6a2c5a0b812..d63020189243 100644
--- a/oox/source/docprop/ooxmldocpropimport.cxx
+++ b/oox/source/docprop/ooxmldocpropimport.cxx
@@ -33,6 +33,7 @@
#include "docprophandler.hxx"
#include <cppuhelper/supportsservice.hxx>
+#include <comphelper/sequence.hxx>
using namespace ::com::sun::star;
@@ -86,6 +87,40 @@ Sequence< InputSource > lclGetRelatedStreams( const Reference< XStorage >& rxSto
return ContainerHelper::vectorToSequence( aResult );
}
+Sequence< InputSource > lclGetCoreStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCoreStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("metadata/core-properties"));
+ // OOXML strict
+ if (!aCoreStreams.hasElements())
+ aCoreStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("metadata/core-properties"));
+ // MS Office seems to have a bug, so we have to do similar handling
+ if (!aCoreStreams.hasElements())
+ aCoreStreams = lclGetRelatedStreams(rxSource, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
+
+ return aCoreStreams;
+}
+
+Sequence< InputSource > lclGetExtStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aExtStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("extended-properties"));
+ // OOXML strict
+ if (!aExtStreams.hasElements())
+ aExtStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("extended-properties"));
+
+ return aExtStreams;
+}
+
+Sequence< InputSource > lclGetCustomStreams(const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCustomStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE("custom-properties"));
+ // OOXML strict
+ if (!aCustomStreams.hasElements())
+ aCustomStreams = lclGetRelatedStreams(rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT("custom-properties"));
+
+ return aCustomStreams;
+}
+
+
} // namespace
DocumentPropertiesImport::DocumentPropertiesImport( const Reference< XComponentContext >& rxContext ) :
@@ -120,22 +155,11 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
if( !rxSource.is() || !rxDocumentProperties.is() )
throw IllegalArgumentException();
- Sequence< InputSource > aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "metadata/core-properties" ) );
- // OOXML strict
- if( !aCoreStreams.hasElements() )
- aCoreStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "metadata/core-properties" ) );
- // MS Office seems to have a bug, so we have to do similar handling
- if( !aCoreStreams.hasElements() )
- aCoreStreams = lclGetRelatedStreams( rxSource, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" );
+ Sequence< InputSource > aCoreStreams = lclGetCoreStreams(rxSource);
- Sequence< InputSource > aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "extended-properties" ) );
- // OOXML strict
- if( !aExtStreams.hasElements() )
- aExtStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "extended-properties" ) );
- Sequence< InputSource > aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE( "custom-properties" ) );
- // OOXML strict
- if( !aCustomStreams.hasElements() )
- aCustomStreams = lclGetRelatedStreams( rxSource, CREATE_OFFICEDOC_RELATION_TYPE_STRICT( "custom-properties" ) );
+ Sequence< InputSource > aExtStreams = lclGetExtStreams(rxSource);
+
+ Sequence< InputSource > aCustomStreams = lclGetCustomStreams(rxSource);
if( aCoreStreams.hasElements() || aExtStreams.hasElements() || aCustomStreams.hasElements() )
{
@@ -160,6 +184,41 @@ void SAL_CALL DocumentPropertiesImport::importProperties(
}
}
+Reference < com::sun::star::io::XInputStream > SAL_CALL DocumentPropertiesImport::getCorePropertiesStream(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aCoreStreams = lclGetCoreStreams(rxSource);
+ if (!aCoreStreams.hasElements())
+ return nullptr;
+
+ return aCoreStreams[0].aInputStream;
+}
+
+Reference < com::sun::star::io::XInputStream > SAL_CALL DocumentPropertiesImport::getExtendedPropertiesStream(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence< InputSource > aExtStreams = lclGetExtStreams(rxSource);
+ if (!aExtStreams.hasElements())
+ return nullptr;
+
+ return aExtStreams[0].aInputStream;
+}
+
+css::uno::Sequence< css::uno::Reference< com::sun::star::io::XInputStream > > SAL_CALL DocumentPropertiesImport::getCustomPropertiesStreams(
+ const Reference< XStorage >& rxSource)
+{
+ Sequence <InputSource> aExtStreams = lclGetCustomStreams(rxSource);
+
+ // Repack the sequence
+ std::vector<Reference<XInputStream>> aResult(aExtStreams.getLength());
+ for (const auto& aInputSource : aExtStreams)
+ {
+ aResult.push_back(aInputSource.aInputStream);
+ }
+
+ return comphelper::containerToSequence(aResult);
+}
+
} // namespace docprop
} // namespace oox
diff --git a/oox/source/docprop/ooxmldocpropimport.hxx b/oox/source/docprop/ooxmldocpropimport.hxx
index 61a58eb9c7d9..969cd16d50a9 100644
--- a/oox/source/docprop/ooxmldocpropimport.hxx
+++ b/oox/source/docprop/ooxmldocpropimport.hxx
@@ -47,6 +47,12 @@ public:
virtual void SAL_CALL importProperties(
const css::uno::Reference< css::embed::XStorage >& rxSource,
const css::uno::Reference< css::document::XDocumentProperties >& rxDocumentProperties ) override;
+ virtual css::uno::Reference < com::sun::star::io::XInputStream > SAL_CALL getCorePropertiesStream(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
+ virtual css::uno::Reference < com::sun::star::io::XInputStream > SAL_CALL getExtendedPropertiesStream(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
+ virtual css::uno::Sequence< css::uno::Reference< com::sun::star::io::XInputStream > > SAL_CALL getCustomPropertiesStreams(
+ const css::uno::Reference< css::embed::XStorage >& rxSource) override;
private:
css::uno::Reference< css::uno::XComponentContext > mxContext;
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index cbd1e420ee5a..444346a98de9 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -28,6 +28,7 @@
#include <oox/drawingml/shape.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include "hyperlinkcontext.hxx"
#include <oox/mathml/import.hxx>
@@ -100,6 +101,16 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
case OOX_TOKEN(a14, m):
return CreateLazyMathBufferingContext(*this, mrParagraph);
break;
+ case W_TOKEN( hyperlink ):
+ {
+ TextRunPtr pRun = std::make_shared<TextRun>();
+ mrParagraph.addRun(pRun);
+ // parse hyperlink attributes: use HyperLinkContext for that
+ rtl::Reference<HyperLinkContext> pContext(new HyperLinkContext(
+ *this, rAttribs, pRun->getTextCharacterProperties().maHyperlinkPropertyMap));
+ // but create text run context because HyperLinkContext can't process internal w:r, w:t, etc
+ return new RegularTextRunContext(*this, pRun);
+ }
default:
SAL_WARN("oox", "TextParagraphContext::onCreateContext: unhandled element: " << getBaseToken(aElementToken));
}
diff --git a/oox/source/drawingml/textrun.cxx b/oox/source/drawingml/textrun.cxx
index 3f66c7a852e4..a4b40ea7e9ae 100644
--- a/oox/source/drawingml/textrun.cxx
+++ b/oox/source/drawingml/textrun.cxx
@@ -69,7 +69,13 @@ sal_Int32 TextRun::insertAt(
Any aOldFontFamily = xState->getPropertyDefault("CharFontFamily");
TextCharacterProperties aTextCharacterProps( rTextCharacterStyle );
- aTextCharacterProps.assignUsed( maTextCharacterProperties );
+
+ // If no text color specified lets anyway initialize it as default:
+ // this will help to recover after hyperlink
+ if (!aTextCharacterProps.maFillProperties.maFillColor.isUsed())
+ aTextCharacterProps.maFillProperties.moFillType = XML_solidFill;
+
+ aTextCharacterProps.assignUsed(maTextCharacterProperties);
if ( aTextCharacterProps.moHeight.has() )
nCharHeight = aTextCharacterProps.moHeight.get();
else
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 98f3243e5461..d289b74d0cd1 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1325,6 +1325,10 @@ sal_Int32 VMLExport::StartShape()
break;
}
+ if (!m_pSdrObject->getHyperlink().isEmpty())
+ m_pShapeAttrList->add(
+ XML_href, OUStringToOString(m_pSdrObject->getHyperlink(), RTL_TEXTENCODING_UTF8));
+
// add style
m_pShapeAttrList->add( XML_style, m_ShapeStyle.makeStringAndClear() );
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/oox/source/token/namespaces-strict.txt b/oox/source/token/namespaces-strict.txt
index d6990e5bdf91..36841732372e 100644
--- a/oox/source/token/namespaces-strict.txt
+++ b/oox/source/token/namespaces-strict.txt
@@ -84,6 +84,7 @@ p14 http://schemas.microsoft.com/office/powerpoint/2010/main
# MSO 2012/2013 extensions ---------------------------------------------------------
+w15 http://schemas.microsoft.com/office/word/2012/wordml
p15 http://schemas.microsoft.com/office/powerpoint/2012/main
x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
diff --git a/oox/source/token/namespaces.txt b/oox/source/token/namespaces.txt
index 604541129469..20d283415069 100644
--- a/oox/source/token/namespaces.txt
+++ b/oox/source/token/namespaces.txt
@@ -84,6 +84,7 @@ p14 http://schemas.microsoft.com/office/powerpoint/2010/main
# MSO 2012/2013 extensions ---------------------------------------------------------
+w15 http://schemas.microsoft.com/office/word/2012/wordml
p15 http://schemas.microsoft.com/office/powerpoint/2012/main
x12ac http://schemas.microsoft.com/office/spreadsheetml/2011/1/ac
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index f53b73f8b79e..58f1df0e2fcb 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -245,6 +245,8 @@ HoriOrientPosition
HoriOrientRelation
HorizontalSplitMode
HorizontalSplitPositionTwips
+Hyperlink
+HyperLinkURL
IgnoreBlankCells
IgnoreCase
IgnoreLeadingSpaces
diff --git a/oox/source/token/tokens.txt b/oox/source/token/tokens.txt
index 3929d8c93808..ceadddd3afb9 100644
--- a/oox/source/token/tokens.txt
+++ b/oox/source/token/tokens.txt
@@ -5672,6 +5672,7 @@ vt
w
w10
w14
+w15
wAfter
wArH
wBefore
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index e1c857f5528e..cd89fc5792c4 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -745,6 +745,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
{
PropertySet(xShape).setAnyProperty(PROP_WritingMode, uno::makeAny(nWritingMode));
}
+ // tdf#123626
+ if (!maShapeModel.maHyperlink.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_HyperLinkURL, makeAny(maShapeModel.maHyperlink));
}
else
{
@@ -784,6 +787,10 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
eTextVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
PropertySet(xShape).setAnyProperty(PROP_TextVerticalAdjust, makeAny(eTextVerticalAdjust));
+ // tdf#123626
+ if (!maShapeModel.maHyperlink.isEmpty())
+ PropertySet(xShape).setAnyProperty(PROP_Hyperlink, makeAny(maShapeModel.maHyperlink));
+
PropertySet(xShape).setAnyProperty(PROP_TextAutoGrowHeight,
makeAny(maTypeModel.mbAutoHeight));
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index d27839a79084..3058c5e01bf1 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -476,6 +476,7 @@ ShapeContext::ShapeContext(ContextHandler2Helper const& rParent,
setControl1(rAttribs.getString(XML_control1, OUString()));
setControl2(rAttribs.getString(XML_control2, OUString()));
setVmlPath(rAttribs.getString(XML_path, OUString()));
+ setHyperlink(rAttribs.getString(XML_href, OUString()));
}
ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs )
@@ -588,6 +589,12 @@ void ShapeContext::setVmlPath( const OUString& rPath )
mrShapeModel.maVmlPath = rPath;
}
+void ShapeContext::setHyperlink( const OUString& rHyperlink )
+{
+ if (!rHyperlink.isEmpty())
+ mrShapeModel.maHyperlink = rHyperlink;
+}
+
GroupShapeContext::GroupShapeContext(ContextHandler2Helper const& rParent,
const std::shared_ptr<GroupShape>& pShape,
const AttributeList& rAttribs)
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/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/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index c39c2f16c860..045fd3c248d3 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -645,15 +645,15 @@ oslFileError SAL_CALL osl_openFile(
if (result != osl_File_E_None)
return result;
- DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ, dwCreation = 0;
+ // tdf126742 use FILE_SHARE_WRITE to get closer to non-Windows plattform behavoiur,
+ // for details and discussion see task please
+ DWORD dwAccess = GENERIC_READ, dwShare = FILE_SHARE_READ | FILE_SHARE_WRITE, dwCreation = 0;
if (uFlags & osl_File_OpenFlag_Write)
dwAccess |= GENERIC_WRITE;
- else
- dwShare |= FILE_SHARE_WRITE;
if (uFlags & osl_File_OpenFlag_NoLock)
- dwShare |= FILE_SHARE_WRITE | FILE_SHARE_DELETE;
+ dwShare |= FILE_SHARE_DELETE;
if (uFlags & osl_File_OpenFlag_Create)
dwCreation |= CREATE_NEW;
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/dbdata.hxx b/sc/inc/dbdata.hxx
index 24eaa3be7d18..f7c4f3d810a1 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -257,6 +257,7 @@ public:
ScDBData* findByIndex(sal_uInt16 nIndex);
ScDBData* findByUpperName(const OUString& rName);
iterator findByUpperName2(const OUString& rName);
+ ScDBData* findByName(const OUString& rName);
/** Takes ownership of p and attempts to insert it into the collection.
Deletes p if it could not be inserted, i.e. duplicate name.
@@ -323,6 +324,7 @@ public:
const ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const;
ScDBData* GetDBAtArea(SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
ScDBData* GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab );
+ std::vector<ScDBData*> GetAllDBsFromTab(SCTAB nTab);
void RefreshDirtyTableColumnNames();
@@ -332,6 +334,7 @@ public:
SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
SCCOL nDx, SCROW nDy, SCTAB nDz);
void UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos );
+ void CopyToTable(SCTAB nOldPos, SCTAB nNewPos);
void SetRefreshHandler( const Link<Timer *, void>& rLink )
{ aRefreshHandler = rLink; }
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 8091f7e2ffb9..5905631f8503 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;
@@ -930,7 +932,7 @@ public:
SC_DLLPUBLIC bool RenameTab( SCTAB nTab, const OUString& rName,
bool bExternalDocument = false );
bool MoveTab( SCTAB nOldPos, SCTAB nNewPos, ScProgress* pProgress = nullptr );
- bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
+ SC_DLLPUBLIC bool CopyTab( SCTAB nOldPos, SCTAB nNewPos,
const ScMarkData* pOnlyMarked = nullptr );
SC_DLLPUBLIC sal_uLong TransferTab(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDestPos,
bool bInsertNew = true,
@@ -1879,7 +1881,7 @@ public:
const ScColWidthParam* pParam = nullptr );
SC_DLLPUBLIC bool SetOptimalHeight( sc::RowHeightContext& rCxt, SCROW nStartRow,
- SCROW nEndRow, SCTAB nTab );
+ SCROW nEndRow, SCTAB nTab, bool bApi );
void UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark );
@@ -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/editutil.hxx b/sc/inc/editutil.hxx
index 86d579bd1016..4bf044aba666 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -185,7 +185,7 @@ public:
void SetExecuteURL(bool bSet) { bExecuteURL = bSet; }
- virtual void FieldClicked( const SvxFieldItem& rField ) override;
+ virtual bool 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;
};
diff --git a/sc/inc/filterentries.hxx b/sc/inc/filterentries.hxx
index 2a8dccd99cb3..6cbe4c43a929 100644
--- a/sc/inc/filterentries.hxx
+++ b/sc/inc/filterentries.hxx
@@ -13,12 +13,15 @@
#include <sal/config.h>
#include "typedstrdata.hxx"
#include <vector>
+#include <tools/color.hxx>
struct ScFilterEntries
{
std::vector<ScTypedStrData> maStrData;
bool mbHasDates;
bool mbHasEmpties;
+ std::set<Color> maTextColors;
+ std::set<Color> maBackgroundColors;
ScFilterEntries() : mbHasDates(false), mbHasEmpties(false) {}
@@ -32,6 +35,13 @@ struct ScFilterEntries
bool empty() const { return maStrData.empty(); }
void push_back( const ScTypedStrData& r ) { maStrData.push_back(r); }
void push_back( ScTypedStrData&& r ) { maStrData.push_back(r); }
+ std::set<Color>& getTextColors() { return maTextColors; };
+ void addTextColor(const Color& aTextColor) { maTextColors.emplace(aTextColor); }
+ std::set<Color>& getBackgroundColors() { return maBackgroundColors; };
+ void addBackgroundColor(const Color& aBackgroundColor)
+ {
+ maBackgroundColors.emplace(aBackgroundColor);
+ }
};
#endif
diff --git a/sc/inc/queryentry.hxx b/sc/inc/queryentry.hxx
index df858f08f339..4ded8551a342 100644
--- a/sc/inc/queryentry.hxx
+++ b/sc/inc/queryentry.hxx
@@ -23,6 +23,7 @@
#include "global.hxx"
#include <svl/sharedstring.hxx>
#include <unotools/textsearch.hxx>
+#include <tools/color.hxx>
#include <memory>
#include <vector>
@@ -32,7 +33,15 @@
*/
struct SC_DLLPUBLIC ScQueryEntry
{
- enum QueryType { ByValue, ByString, ByDate, ByEmpty };
+ enum QueryType
+ {
+ ByValue,
+ ByString,
+ ByDate,
+ ByEmpty,
+ ByTextColor,
+ ByBackgroundColor,
+ };
struct Item
{
@@ -40,6 +49,7 @@ struct SC_DLLPUBLIC ScQueryEntry
double mfVal;
svl::SharedString maString;
bool mbMatchEmpty;
+ Color maColor;
Item() : meType(ByValue), mfVal(0.0), mbMatchEmpty(false) {}
@@ -70,6 +80,10 @@ struct SC_DLLPUBLIC ScQueryEntry
bool IsQueryByNonEmpty() const;
const Item& GetQueryItem() const;
Item& GetQueryItem();
+ void SetQueryByTextColor(Color color);
+ bool IsQueryByTextColor() const;
+ void SetQueryByBackgroundColor(Color color);
+ bool IsQueryByBackgroundColor() const;
void Clear();
ScQueryEntry& operator=( const ScQueryEntry& r );
bool operator==( const ScQueryEntry& r ) const;
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 9a44676ffbd3..2b3f278a2ee1 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -35,6 +35,10 @@
#define SCSTR_TOP10FILTER NC_("SCSTR_TOP10FILTER", "Top 10")
#define SCSTR_FILTER_EMPTY NC_("SCSTR_FILTER_EMPTY", "Empty")
#define SCSTR_FILTER_NOTEMPTY NC_("SCSTR_FILTER_NOTEMPTY", "Not Empty")
+#define SCSTR_FILTER_TEXT_COLOR NC_("SCSTR_FILTER_TEXT_COLOR", "Text color")
+#define SCSTR_FILTER_BACKGROUND_COLOR NC_("SCSTR_FILTER_BACKGROUND_COLOR", "Background color")
+#define SCSTR_FILTER_NO_FILL NC_("SCSTR_FILTER_NO_FILL", "No fill")
+#define SCSTR_FILTER_AUTOMATIC_COLOR NC_("SCSTR_FILTER_AUTOMATIC_COLOR", "Automatic")
#define SCSTR_NONAME NC_("SCSTR_NONAME", "unnamed")
// "%1 is replaced to column letter, such as 'Column A'"
#define SCSTR_COLUMN NC_("SCSTR_COLUMN", "Column %1")
@@ -370,6 +374,16 @@
#define STR_NO_USER_DATA_AVAILABLE NC_("sharedocumentdlg|nouserdata", "No user data available.")
#define STR_EXCLUSIVE_ACCESS NC_("sharedocumentdlg|exclusive", "(exclusive access)")
#define STR_NO_NAMED_RANGES_AVAILABLE NC_("STR_NO_NAMED_RANGES_AVAILABLE", "No named ranges available in the selected document")
+#define STR_BORDER_HAIRLINE NC_("STR_BORDER_HAIRLINE", "Hairline (%s pt)")
+#define STR_BORDER_VERY_THIN NC_("STR_BORDER_VERY_THIN", "Very thin (%s pt)")
+#define STR_BORDER_THIN NC_("STR_BORDER_THIN", "Thin (%s pt)")
+#define STR_BORDER_MEDIUM NC_("STR_BORDER_MEDIUM", "Medium (%s pt)")
+#define STR_BORDER_THICK NC_("STR_BORDER_THICK", "Thick (%s pt)")
+#define STR_BORDER_EXTRA_THICK NC_("STR_BORDER_EXTRA_THICK", "Extra thick (%s pt)")
+#define STR_BORDER_DOUBLE_1 NC_("STR_BORDER_DOUBLE_1", "Double Hairline (%s pt)")
+#define STR_BORDER_DOUBLE_2 NC_("STR_BORDER_DOUBLE_2", "Thin/Medium (%s pt)")
+#define STR_BORDER_DOUBLE_3 NC_("STR_BORDER_DOUBLE_3", "Medium/Hairline (%s pt)")
+#define STR_BORDER_DOUBLE_4 NC_("STR_BORDER_DOUBLE_4", "Medium/Medium (%s pt)")
#endif
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index b2fca017608f..ab979afebc72 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;
@@ -774,7 +776,7 @@ public:
bool bFormula, const ScMarkData* pMarkData,
const ScColWidthParam* pParam );
bool SetOptimalHeight(
- sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
+ sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, bool bApi,
ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
void SetOptimalHeightOnly(
@@ -790,7 +792,7 @@ public:
void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth );
void SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight );
bool SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
- double nPPTY );
+ double nPPTY, bool bApi );
/**
* Set specified row height to specified ranges. Don't check for drawing
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/autofilter/tdf46184.py b/sc/qa/uitest/autofilter/tdf46184.py
new file mode 100755
index 000000000000..73605e29e151
--- /dev/null
+++ b/sc/qa/uitest/autofilter/tdf46184.py
@@ -0,0 +1,86 @@
+# -*- 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 uitest.uihelper.calc import enter_text_to_cell
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from libreoffice.calc.document import get_row
+from time import sleep
+
+#Bug 46184 - [Calc] [AutoFilter] Option "Copy results to ..." remains activated in AutoFilter
+
+class tdf46184(UITestCase):
+ def test_tdf46184_copy_results_to(self):
+ self.ui_test.create_doc_in_start_center("calc")
+ document = self.ui_test.get_component()
+ calcDoc = self.xUITest.getTopFocusWindow()
+ gridwin = calcDoc.getChild("grid_window")
+
+ enter_text_to_cell(gridwin, "A1", "A")
+ enter_text_to_cell(gridwin, "A2", "1")
+ enter_text_to_cell(gridwin, "A3", "2")
+ enter_text_to_cell(gridwin, "A4", "3")
+
+ gridwin.executeAction("SELECT", mkPropertyValues({"RANGE": "A1:A4"}))
+
+ self.xUITest.executeCommand(".uno:DataFilterAutoFilter")
+
+ gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+ xFloatWindow = self.xUITest.getFloatWindow()
+ #Choose Standard Filter... button
+ xMenu = xFloatWindow.getChild("check_list_menu")
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"DOWN"}))
+ xMenu.executeAction("TYPE", mkPropertyValues({"KEYCODE":"RETURN"}))
+
+ xDialog = self.xUITest.getTopFocusWindow()
+ xfield1 = xDialog.getChild("field1")
+ xcond1 = xDialog.getChild("cond1")
+ xval1 = xDialog.getChild("val1")
+ xcopyresult = xDialog.getChild("copyresult")
+ xedcopyarea = xDialog.getChild("edcopyarea")
+ xdestpers = xDialog.getChild("destpers")
+
+ xfield1.executeAction("SELECT", mkPropertyValues({"TEXT": "A"}))
+ xcond1.executeAction("SELECT", mkPropertyValues({"TEXT": ">"}))
+ xval1.executeAction("TYPE", mkPropertyValues({"TEXT":"1"}))
+ xcopyresult.executeAction("CLICK", tuple())
+ xedcopyarea.executeAction("TYPE", mkPropertyValues({"TEXT":"A6"}))
+ if get_state_as_dict(xdestpers)['Selected'] == 'false':
+ xdestpers.executeAction("CLICK", tuple())
+ self.assertEqual('true', get_state_as_dict(xcopyresult)['Selected'])
+ xOKBtn = xDialog.getChild("ok")
+ self.ui_test.close_dialog_through_button(xOKBtn)
+
+
+ row1 = get_row(document, 1)
+ row2 = get_row(document, 2)
+ row3 = get_row(document, 3)
+ self.assertTrue(row1.getPropertyValue("IsVisible"))
+ self.assertTrue(row2.getPropertyValue("IsVisible"))
+ self.assertTrue(row3.getPropertyValue("IsVisible"))
+
+ gridwin.executeAction("LAUNCH", mkPropertyValues({"AUTOFILTER": "", "COL": "0", "ROW": "0"}))
+ xFloatWindow = self.xUITest.getFloatWindow()
+ xCheckListMenu = xFloatWindow.getChild("check_list_menu")
+ xTreeList = xCheckListMenu.getChild("check_list_box")
+ xEntry = xTreeList.getChild("1")
+ xEntry.executeAction("CLICK", tuple())
+ xOkBtn = xFloatWindow.getChild("ok")
+ xOkBtn.executeAction("CLICK", tuple())
+
+ self.assertTrue(row1.getPropertyValue("IsVisible"))
+ self.assertFalse(row2.getPropertyValue("IsVisible"))
+ self.assertTrue(row3.getPropertyValue("IsVisible"))
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
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/ods/autofilter-colors.ods b/sc/qa/unit/data/ods/autofilter-colors.ods
new file mode 100644
index 000000000000..ad7c768412ea
--- /dev/null
+++ b/sc/qa/unit/data/ods/autofilter-colors.ods
Binary files differ
diff --git a/sc/qa/unit/data/ods/tdf142578.ods b/sc/qa/unit/data/ods/tdf142578.ods
new file mode 100644
index 000000000000..0fb6e07d5e4b
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf142578.ods
Binary files differ
diff --git a/sc/qa/unit/data/ods/tdf145059.ods b/sc/qa/unit/data/ods/tdf145059.ods
new file mode 100644
index 000000000000..a76da3b5cb4e
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf145059.ods
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/autofilter-colors-fg.xlsx b/sc/qa/unit/data/xlsx/autofilter-colors-fg.xlsx
new file mode 100644
index 000000000000..8360ec7e92be
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/autofilter-colors-fg.xlsx
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/autofilter-colors.xlsx b/sc/qa/unit/data/xlsx/autofilter-colors.xlsx
new file mode 100644
index 000000000000..e4f8e67b202d
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/autofilter-colors.xlsx
Binary files differ
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/data/xlsx/tdf145054.xlsx b/sc/qa/unit/data/xlsx/tdf145054.xlsx
new file mode 100644
index 000000000000..8360ec7e92be
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf145054.xlsx
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/tdf145057.xlsx b/sc/qa/unit/data/xlsx/tdf145057.xlsx
new file mode 100644
index 000000000000..4a2e259c119d
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/tdf145057.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/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 61f6a46eba19..74fce93a9296 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -144,6 +144,7 @@ public:
void testFormulaReferenceXLS();
void testSheetProtectionXLSX();
+ void testTdf145057();
void testSheetProtectionXLSB();
void testCellBordersXLS();
@@ -201,6 +202,8 @@ public:
void testTdf95640_ods_to_xlsx();
void testTdf95640_ods_to_xlsx_with_standard_list();
void testTdf95640_xlsx_to_xlsx();
+ void testAutofilterColorsODF();
+ void testAutofilterColorsOOXML();
void testRefStringXLSX();
void testRefStringConfigXLSX();
@@ -240,6 +243,8 @@ public:
void testRotatedImageODS();
void testTdf128976();
void testTdf120502();
+ void testTdf142578();
+ void testTdf145059();
CPPUNIT_TEST_SUITE(ScExportTest);
CPPUNIT_TEST(test);
@@ -293,6 +298,7 @@ public:
CPPUNIT_TEST(testFormulaReferenceXLS);
CPPUNIT_TEST(testSheetProtectionXLSX);
+ CPPUNIT_TEST(testTdf145057);
CPPUNIT_TEST(testSheetProtectionXLSB);
CPPUNIT_TEST(testCellBordersXLS);
CPPUNIT_TEST(testCellBordersXLSX);
@@ -337,6 +343,8 @@ public:
CPPUNIT_TEST(testTdf95640_ods_to_xlsx);
CPPUNIT_TEST(testTdf95640_ods_to_xlsx_with_standard_list);
CPPUNIT_TEST(testTdf95640_xlsx_to_xlsx);
+ CPPUNIT_TEST(testAutofilterColorsODF);
+ CPPUNIT_TEST(testAutofilterColorsOOXML);
CPPUNIT_TEST(testRefStringXLSX);
CPPUNIT_TEST(testRefStringConfigXLSX);
@@ -376,6 +384,8 @@ public:
CPPUNIT_TEST(testRotatedImageODS);
CPPUNIT_TEST(testTdf128976);
CPPUNIT_TEST(testTdf120502);
+ CPPUNIT_TEST(testTdf142578);
+ CPPUNIT_TEST(testTdf145059);
CPPUNIT_TEST_SUITE_END();
@@ -2255,6 +2265,17 @@ void ScExportTest::testSheetProtectionXLSX()
xDocSh->DoClose();
}
+void ScExportTest::testTdf145057()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf145057.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+ xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
+ xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory,
+ "xl/tables/table1.xml", FORMAT_XLSX);
+ CPPUNIT_ASSERT(pDoc);
+ assertXPath(pDoc, "//x:colorFilter", "dxfId", "1");
+}
+
void ScExportTest::testSheetProtectionXLSB()
{
ScDocShellRef xShell = loadDoc("tdf108017_calcProtection.", FORMAT_XLSB);
@@ -4048,11 +4069,98 @@ void ScExportTest::testConditionalFormatContainsTextXLSX()
CPPUNIT_ASSERT(xDocSh.is());
xmlDocPtr pDoc = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "xl/worksheets/sheet1.xml", FORMAT_XLSX);
+
CPPUNIT_ASSERT(pDoc);
assertXPathContent(pDoc, "//x:conditionalFormatting/x:cfRule/x:formula", "NOT(ISERROR(SEARCH(\"test\",A1)))");
}
+void ScExportTest::testAutofilterColorsODF()
+{
+ ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh.is());
+
+ xmlDocPtr pDoc
+ = XPathHelper::parseExport2(*this, *xDocSh, m_xSFactory, "content.xml", FORMAT_ODS);
+ CPPUNIT_ASSERT(pDoc);
+
+ assertXPath(pDoc,
+ "//table:database-ranges/table:database-range[1]/table:filter/table:filter-and/"
+ "table:filter-condition[1]",
+ "value", "#e8f2a1");
+ assertXPath(pDoc,
+ "//table:database-ranges/table:database-range[1]/table:filter/table:filter-and/"
+ "table:filter-condition[1][@loext:data-type='background-color']");
+ assertXPath(pDoc,
+ "//table:database-ranges/table:database-range[1]/table:filter/table:filter-and/"
+ "table:filter-condition[2]",
+ "value", "#3465a4");
+ assertXPath(pDoc, "//table:database-ranges/table:database-range[1]/table:filter/"
+ "table:filter-and/table:filter-condition[2][@loext:data-type='text-color']");
+
+ // tdf#142965 Check "none" value when automatic text color / no fill was selected
+ assertXPath(pDoc, "//table:database-ranges/table:database-range[2]/table:filter/"
+ "table:filter-and/"
+ "table:filter-condition[1][@loext:data-type='background-color']");
+ assertXPath(pDoc,
+ "//table:database-ranges/table:database-range[2]/table:filter/table:filter-and/"
+ "table:filter-condition[1]",
+ "value", "transparent");
+ assertXPath(pDoc, "//table:database-ranges/table:database-range[3]/table:filter/"
+ "table:filter-and/table:filter-condition[1][@loext:data-type='text-color']");
+ assertXPath(pDoc,
+ "//table:database-ranges/table:database-range[3]/table:filter/table:filter-and/"
+ "table:filter-condition[1]",
+ "value", "window-font-color");
+}
+
+void ScExportTest::testAutofilterColorsOOXML()
+{
+ {
+ ScDocShellRef xDocSh = loadDoc(u"autofilter-colors.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+ std::shared_ptr<utl::TempFile> pXPathFile
+ = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+ xmlDocPtr pTable1
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/tables/table1.xml");
+ CPPUNIT_ASSERT(pTable1);
+ sal_Int32 nDxfId
+ = getXPath(pTable1, "/x:table/x:autoFilter/x:filterColumn/x:colorFilter", "dxfId")
+ .toInt32()
+ + 1;
+
+ xmlDocPtr pStyles
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/styles.xml");
+ CPPUNIT_ASSERT(pStyles);
+ OString sDxfXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfId)
+ + "]/x:fill/x:patternFill/x:fgColor");
+ assertXPath(pStyles, sDxfXPath, "rgb", "FFFFD7D7");
+ xDocSh->DoClose();
+ }
+
+ {
+ ScDocShellRef xDocSh = loadDoc(u"autofilter-colors-fg.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+ std::shared_ptr<utl::TempFile> pXPathFile
+ = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+ xmlDocPtr pTable1
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/tables/table1.xml");
+ CPPUNIT_ASSERT(pTable1);
+ sal_Int32 nDxfId
+ = getXPath(pTable1, "/x:table/x:autoFilter/x:filterColumn/x:colorFilter", "dxfId")
+ .toInt32()
+ + 1;
+
+ xmlDocPtr pStyles
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/styles.xml");
+ CPPUNIT_ASSERT(pStyles);
+ OString sDxfXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfId)
+ + "]/x:fill/x:patternFill/x:fgColor");
+ assertXPath(pStyles, sDxfXPath, "rgb", "FF3465A4");
+ xDocSh->DoClose();
+ }
+}
+
void ScExportTest::testConditionalFormatPriorityCheckXLSX()
{
ScDocShellRef xDocSh = loadDoc("conditional_fmt_checkpriority.", FORMAT_XLSX);
@@ -4730,6 +4838,84 @@ void ScExportTest::testTdf120502()
assertXPath(pSheet1, "/x:worksheet/x:cols/x:col", "max", OUString::number(nMaxCol + 1));
}
+void ScExportTest::testTdf142578()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf142578.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh);
+
+ std::shared_ptr<utl::TempFile> pXPathFile
+ = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+ xmlDocPtr pSheet
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ CPPUNIT_ASSERT(pSheet);
+
+ // Get DxfId for color filter
+ sal_Int32 nDxfIdColorFilter
+ = getXPath(pSheet, "/x:worksheet/x:autoFilter/x:filterColumn/x:colorFilter", "dxfId")
+ .toInt32()
+ + 1;
+
+ // Get DxfId for conditional formatting
+ sal_Int32 nDxfIdCondFormat
+ = getXPath(pSheet, "/x:worksheet/x:conditionalFormatting/x:cfRule", "dxfId").toInt32() + 1;
+
+ // Ensure they are using different dxfs
+ CPPUNIT_ASSERT_MESSAGE("dxfID's should be different!", nDxfIdColorFilter != nDxfIdCondFormat);
+
+ // Check colors used by these dxfs
+ xmlDocPtr pStyles = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/styles.xml");
+ CPPUNIT_ASSERT(pStyles);
+
+ OString sDxfColorFilterXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfIdColorFilter)
+ + "]/x:fill/x:patternFill/x:fgColor");
+ assertXPath(pStyles, sDxfColorFilterXPath, "rgb", "FF81D41A");
+
+ OString sDxfCondFormatXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfIdCondFormat)
+ + "]/x:fill/x:patternFill/x:bgColor");
+ assertXPath(pStyles, sDxfCondFormatXPath, "rgb", "FFFFCCCC");
+
+ xDocSh->DoClose();
+}
+
+void ScExportTest::testTdf145059()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf142578.", FORMAT_ODS);
+ CPPUNIT_ASSERT(xDocSh);
+
+ std::shared_ptr<utl::TempFile> pXPathFile
+ = ScBootstrapFixture::exportTo(&(*xDocSh), FORMAT_XLSX);
+ xmlDocPtr pSheet
+ = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
+ CPPUNIT_ASSERT(pSheet);
+
+ // Get DxfId for color filter
+ sal_Int32 nDxfIdColorFilter
+ = getXPath(pSheet, "/x:worksheet/x:autoFilter/x:filterColumn/x:colorFilter", "dxfId")
+ .toInt32()
+ + 1;
+
+ // Get DxfId for conditional formatting
+ sal_Int32 nDxfIdCondFormat
+ = getXPath(pSheet, "/x:worksheet/x:conditionalFormatting/x:cfRule", "dxfId").toInt32() + 1;
+
+ // Ensure they are using different dxfs
+ CPPUNIT_ASSERT_MESSAGE("dxfID's should be different!", nDxfIdColorFilter != nDxfIdCondFormat);
+
+ // Check colors used by these dxfs
+ xmlDocPtr pStyles = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/styles.xml");
+ CPPUNIT_ASSERT(pStyles);
+
+ OString sDxfColorFilterXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfIdColorFilter)
+ + "]/x:fill/x:patternFill/x:fgColor");
+ assertXPath(pStyles, sDxfColorFilterXPath, "rgb", "FF81D41A");
+
+ OString sDxfCondFormatXPath("/x:styleSheet/x:dxfs/x:dxf[" + OString::number(nDxfIdCondFormat)
+ + "]/x:fill/x:patternFill/x:bgColor");
+ assertXPath(pStyles, sDxfCondFormatXPath, "rgb", "FFFFCCCC");
+
+ xDocSh->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index e005b258d979..07257ff38a56 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -123,6 +123,7 @@ public:
void testMatrixODS();
void testMatrixXLS();
void testDoubleThinBorder();
+ void testTdf145054();
void testBorderODS();
void testBordersOoo33();
void testBugFixesODS();
@@ -276,6 +277,7 @@ public:
CPPUNIT_TEST(testMatrixODS);
CPPUNIT_TEST(testMatrixXLS);
CPPUNIT_TEST(testDoubleThinBorder);
+ CPPUNIT_TEST(testTdf145054);
CPPUNIT_TEST(testBorderODS);
CPPUNIT_TEST(testBordersOoo33);
CPPUNIT_TEST(testBugFixesODS);
@@ -974,6 +976,19 @@ void ScFiltersTest::testDoubleThinBorder()
xDocSh->DoClose();
}
+void ScFiltersTest::testTdf145054()
+{
+ ScDocShellRef xDocSh = loadDoc(u"tdf145054.", FORMAT_XLSX);
+ CPPUNIT_ASSERT(xDocSh.is());
+ ScDocument& rDoc = xDocSh->GetDocument();
+ // Copy sheet
+ rDoc.CopyTab(0, 1);
+ CPPUNIT_ASSERT_EQUAL(SCTAB(2), rDoc.GetTableCount());
+ // Make sure named DB was copied
+ ScDBData* pDBData = rDoc.GetDBCollection()->getNamedDBs().findByName("__Anonymous_Sheet_DB__1");
+ CPPUNIT_ASSERT(pDBData);
+}
+
void ScFiltersTest::testBorderODS()
{
ScDocShellRef xDocSh = loadDoc("border.", FORMAT_ODS);
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/column3.cxx b/sc/source/core/data/column3.cxx
index 90a0dcec43aa..64e40b8b7cf8 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -44,6 +44,11 @@
#include <sharedformula.hxx>
#include <listenercontext.hxx>
#include <filterentries.hxx>
+#include <conditio.hxx>
+#include <colorscale.hxx>
+#include <stlpool.hxx>
+#include <editeng/brushitem.hxx>
+#include <editeng/colritem.hxx>
#include <com/sun/star/i18n/LocaleDataItem2.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
@@ -2402,13 +2407,75 @@ class FilterEntriesHandler
ScColumn& mrColumn;
ScFilterEntries& mrFilterEntries;
- void processCell(SCROW nRow, ScRefCellValue& rCell)
+ void processCell(ScColumn& rColumn, SCROW nRow, ScRefCellValue& rCell)
{
SvNumberFormatter* pFormatter = mrColumn.GetDoc()->GetFormatTable();
OUString aStr;
sal_uLong nFormat = mrColumn.GetNumberFormat(mrColumn.GetDoc()->GetNonThreadedContext(), nRow);
ScCellFormat::GetInputString(rCell, nFormat, aStr, *pFormatter, mrColumn.GetDoc());
+ // Colors
+ ScAddress aPos(rColumn.GetCol(), nRow, rColumn.GetTab());
+
+ Color backgroundColor;
+ bool bHasConditionalBackgroundColor = false;
+
+ Color textColor;
+ bool bHasConditionalTextColor = false;
+ // Check text & background color from cond. formatting
+ const ScPatternAttr* pPattern
+ = mrColumn.GetDoc()->GetPattern(aPos.Col(), aPos.Row(), aPos.Tab());
+ if (pPattern)
+ {
+ if (!pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData().empty())
+ {
+ const SfxItemSet* pCondSet
+ = mrColumn.GetDoc()->GetCondResult(aPos.Col(), aPos.Row(), aPos.Tab());
+ const SvxColorItem* pColor = &pPattern->GetItem(ATTR_FONT_COLOR, pCondSet);
+ textColor = pColor->GetValue();
+ bHasConditionalTextColor = true;
+
+ const SvxBrushItem* pBackgroundColor = &pPattern->GetItem(ATTR_BACKGROUND, pCondSet);
+ backgroundColor = pBackgroundColor->GetColor();
+ bHasConditionalBackgroundColor = true;
+ }
+ }
+
+ if (!bHasConditionalTextColor)
+ {
+ const SvxColorItem* pColor = rColumn.GetDoc()->GetAttr(aPos, ATTR_FONT_COLOR);
+ textColor = pColor->GetValue();
+ }
+ mrFilterEntries.addTextColor(textColor);
+
+ // Color scale needs a different handling
+ ScConditionalFormat* pCondFormat
+ = rColumn.GetDoc()->GetCondFormat(aPos.Col(), aPos.Row(), aPos.Tab());
+ if (pCondFormat)
+ {
+ for (size_t i = 0; i < pCondFormat->size(); i++)
+ {
+ auto aEntry = pCondFormat->GetEntry(i);
+ if (aEntry->GetType() == ScFormatEntry::Type::Colorscale)
+ {
+ const ScColorScaleFormat* pColFormat
+ = static_cast<const ScColorScaleFormat*>(aEntry);
+ boost::optional<Color> oColor = pColFormat->GetColor(aPos);
+ if (oColor)
+ {
+ backgroundColor = *oColor;
+ bHasConditionalBackgroundColor = true;
+ }
+ }
+ }
+ }
+ if (!bHasConditionalBackgroundColor)
+ {
+ const SvxBrushItem* pBrush = rColumn.GetDoc()->GetAttr(aPos, ATTR_BACKGROUND);
+ backgroundColor = pBrush->GetColor();
+ }
+ mrFilterEntries.addBackgroundColor(backgroundColor);
+
if (rCell.hasString())
{
mrFilterEntries.push_back(ScTypedStrData(aStr));
@@ -2470,25 +2537,25 @@ public:
void operator() (size_t nRow, double fVal)
{
ScRefCellValue aCell(fVal);
- processCell(nRow, aCell);
+ processCell(mrColumn, nRow, aCell);
}
void operator() (size_t nRow, const svl::SharedString& rStr)
{
ScRefCellValue aCell(&rStr);
- processCell(nRow, aCell);
+ processCell(mrColumn, nRow, aCell);
}
void operator() (size_t nRow, const EditTextObject* p)
{
ScRefCellValue aCell(p);
- processCell(nRow, aCell);
+ processCell(mrColumn, nRow, aCell);
}
void operator() (size_t nRow, const ScFormulaCell* p)
{
ScRefCellValue aCell(const_cast<ScFormulaCell*>(p));
- processCell(nRow, aCell);
+ processCell(mrColumn, nRow, aCell);
}
void operator() (const int nElemType, size_t nRow, size_t /* nDataSize */)
@@ -2503,7 +2570,7 @@ public:
return;
}
ScRefCellValue aCell = mrColumn.GetCellValue(nRow);
- processCell(nRow, aCell);
+ processCell(mrColumn, nRow, aCell);
}
};
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index ed55445d0558..407c5484a4c2 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -2734,7 +2734,7 @@ void ScDocRowHeightUpdater::update()
continue;
mrDoc.maTabs[nTab]->SetOptimalHeight(
- aCxt, aData.mnRow1, aData.mnRow2, &aProgress, nProgressStart);
+ aCxt, aData.mnRow1, aData.mnRow2, true, &aProgress, nProgressStart);
nProgressStart += mrDoc.maTabs[nTab]->GetWeightedCount(aData.mnRow1, aData.mnRow2);
}
@@ -2762,7 +2762,7 @@ void ScDocRowHeightUpdater::updateAll()
if (!ValidTab(nTab) || !mrDoc.maTabs[nTab])
continue;
- mrDoc.maTabs[nTab]->SetOptimalHeight(aCxt, 0, mrDoc.MaxRow(), &aProgress, nProgressStart);
+ mrDoc.maTabs[nTab]->SetOptimalHeight(aCxt, 0, mrDoc.MaxRow(), true, &aProgress, nProgressStart);
nProgressStart += mrDoc.maTabs[nTab]->GetWeightedCount();
}
}
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7271fdef0d43..e2c3e0b6409f 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);
@@ -831,6 +832,7 @@ bool ScDocument::CopyTab( SCTAB nOldPos, SCTAB nNewPos, const ScMarkData* pOnlyM
GetRangeName()->CopyUsedNames( -1, nRealOldPos, nNewPos, *this, *this, bGlobalNamesToLocal);
sc::CopyToDocContext aCopyDocCxt(*this);
+ pDBCollection->CopyToTable(nOldPos, nNewPos);
maTabs[nOldPos]->CopyToTable(aCopyDocCxt, 0, 0, MaxCol(), MaxRow(), InsertDeleteFlags::ALL,
(pOnlyMarked != nullptr), maTabs[nNewPos].get(), pOnlyMarked,
false /*bAsLink*/, true /*bColRowFlags*/, bGlobalNamesToLocal, false /*bCopyCaptions*/ );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 106360e2a14d..9ce58cbe64bb 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -4089,7 +4089,7 @@ void ScDocument::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, SCTAB nTab,
{
if ( ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab] )
maTabs[nTab]->SetRowHeightRange
- ( nStartRow, nEndRow, nNewHeight, 1.0 );
+ ( nStartRow, nEndRow, nNewHeight, 1.0, true );
}
void ScDocument::SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, sal_uInt16 nNewHeight )
@@ -4250,13 +4250,13 @@ long ScDocument::GetNeededSize( SCCOL nCol, SCROW nRow, SCTAB nTab,
return 0;
}
-bool ScDocument::SetOptimalHeight( sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
+bool ScDocument::SetOptimalHeight( sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, SCTAB nTab, bool bApi )
{
ScTable* pTab = FetchTable(nTab);
if (!pTab)
return false;
- return pTab->SetOptimalHeight(rCxt, nStartRow, nEndRow);
+ return pTab->SetOptimalHeight(rCxt, nStartRow, nEndRow, bApi);
}
void ScDocument::UpdateAllRowHeights( sc::RowHeightContext& rCxt, const ScMarkData* pTabMark )
@@ -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);
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/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/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 2a701c1b26e8..e815baecf83c 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -220,7 +220,7 @@ void ScStyleSheetPool::CreateStandardStyles()
std::unique_ptr<ScPageHFItem> pHeaderItem(new ScPageHFItem( ATTR_PAGE_HEADERRIGHT ));
std::unique_ptr<ScPageHFItem> pFooterItem(new ScPageHFItem( ATTR_PAGE_FOOTERRIGHT ));
ScStyleSheet* pSheet = nullptr;
- ::editeng::SvxBorderLine aBorderLine ( &aColBlack, DEF_LINE_WIDTH_2 );
+ ::editeng::SvxBorderLine aBorderLine ( &aColBlack, SvxBorderLineWidth::Medium );
SvxBoxItem aBoxItem ( ATTR_BORDER );
SvxBoxInfoItem aBoxInfoItem ( ATTR_BORDER_INNER );
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index fea4dbcc66c3..71632ea1373a 100755
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -124,7 +124,7 @@ void GetOptimalHeightsInColumn(
struct OptimalHeightsFuncObjBase
{
virtual ~OptimalHeightsFuncObjBase() {}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight) = 0;
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight, bool bApi) = 0;
};
struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase
@@ -134,7 +134,7 @@ struct SetRowHeightOnlyFunc : public OptimalHeightsFuncObjBase
mpTab(pTab)
{}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight) override
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight, bool /* bApi */) override
{
mpTab->SetRowHeightOnly(nStartRow, nEndRow, nHeight);
return false;
@@ -151,16 +151,17 @@ struct SetRowHeightRangeFunc : public OptimalHeightsFuncObjBase
mnPPTY(nPPTY)
{}
- virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight) override
+ virtual bool operator() (SCROW nStartRow, SCROW nEndRow, sal_uInt16 nHeight, bool bApi) override
{
- return mpTab->SetRowHeightRange(nStartRow, nEndRow, nHeight, mnPPTY);
+ return mpTab->SetRowHeightRange(nStartRow, nEndRow, nHeight, mnPPTY, bApi);
}
};
bool SetOptimalHeightsToRows(
sc::RowHeightContext& rCxt,
OptimalHeightsFuncObjBase& rFuncObj,
- ScBitMaskCompressedArray<SCROW, CRFlags>* pRowFlags, SCROW nStartRow, SCROW nEndRow )
+ ScBitMaskCompressedArray<SCROW, CRFlags>* pRowFlags, SCROW nStartRow, SCROW nEndRow,
+ bool bApi )
{
bool bChanged = false;
SCROW nRngStart = 0;
@@ -200,7 +201,7 @@ bool SetOptimalHeightsToRows(
}
else
{
- bChanged |= rFuncObj(nRngStart, nRngEnd, nLast);
+ bChanged |= rFuncObj(nRngStart, nRngEnd, nLast, bApi);
nLast = 0;
}
}
@@ -215,13 +216,13 @@ bool SetOptimalHeightsToRows(
else
{
if (nLast)
- bChanged |= rFuncObj(nRngStart, nRngEnd, nLast);
+ bChanged |= rFuncObj(nRngStart, nRngEnd, nLast, bApi);
nLast = 0;
}
i += nMoreRows; // already handled - skip
}
if (nLast)
- bChanged |= rFuncObj(nRngStart, nRngEnd, nLast);
+ bChanged |= rFuncObj(nRngStart, nRngEnd, nLast, bApi);
return bChanged;
}
@@ -446,7 +447,7 @@ long ScTable::GetNeededSize( SCCOL nCol, SCROW nRow,
}
bool ScTable::SetOptimalHeight(
- sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
+ sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, bool bApi,
ScProgress* pOuterProgress, sal_uLong nProgressStart )
{
assert(nStartRow <= nEndRow);
@@ -467,7 +468,7 @@ bool ScTable::SetOptimalHeight(
rCxt.getHeightArray().enableTreeSearch(true);
SetRowHeightRangeFunc aFunc(this, rCxt.getPPTY());
- bool bChanged = SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow);
+ bool bChanged = SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow, bApi);
if ( pProgress != pOuterProgress )
delete pProgress;
@@ -494,7 +495,7 @@ void ScTable::SetOptimalHeightOnly(
SetRowHeightOnlyFunc aFunc(this);
rCxt.getHeightArray().enableTreeSearch(true);
- SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow);
+ SetOptimalHeightsToRows(rCxt, aFunc, pRowFlags.get(), nStartRow, nEndRow, true);
if ( pProgress != pOuterProgress )
delete pProgress;
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3d1a1aabad37..cd25673b6cb7 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -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())
@@ -2848,7 +2863,7 @@ void ScTable::StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRem
SCROW nEndRow = aData.mnRow2;
if (aData.mbValue)
- SetOptimalHeight(aCxt, nRow, nEndRow);
+ SetOptimalHeight(aCxt, nRow, nEndRow, true);
nRow = nEndRow + 1;
}
@@ -2986,7 +3001,7 @@ namespace {
*/
bool lcl_pixelSizeChanged(
ScFlatUInt16RowSegments& rRowHeights, SCROW nStartRow, SCROW nEndRow,
- sal_uInt16 nNewHeight, double nPPTY)
+ sal_uInt16 nNewHeight, double nPPTY, bool bApi)
{
long nNewPix = static_cast<long>(nNewHeight * nPPTY);
@@ -2999,7 +3014,11 @@ bool lcl_pixelSizeChanged(
if (nHeight != nNewHeight)
{
- bool bChanged = (nNewPix != static_cast<long>(nHeight * nPPTY));
+ long nOldPix = static_cast<long>(nHeight * nPPTY);
+
+ // Heuristic: Don't bother when handling interactive input, if changing just one row and
+ // the height will shrink.
+ bool bChanged = (nNewPix != nOldPix) && (bApi || nEndRow - nStartRow > 0 || nNewPix > nOldPix);
if (bChanged)
return true;
}
@@ -3013,7 +3032,7 @@ bool lcl_pixelSizeChanged(
}
bool ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
- double nPPTY )
+ double nPPTY, bool bApi )
{
bool bChanged = false;
if (ValidRow(nStartRow) && ValidRow(nEndRow) && mpRowHeights)
@@ -3040,17 +3059,20 @@ bool ScTable::SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNew
}
}
+ // No idea why 20 is used here
if (!bSingle || nEndRow - nStartRow < 20)
{
- bChanged = lcl_pixelSizeChanged(*mpRowHeights, nStartRow, nEndRow, nNewHeight, nPPTY);
- mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
+ bChanged = lcl_pixelSizeChanged(*mpRowHeights, nStartRow, nEndRow, nNewHeight, nPPTY, bApi);
+ if (bChanged)
+ mpRowHeights->setValue(nStartRow, nEndRow, nNewHeight);
}
else
{
SCROW nMid = (nStartRow + nEndRow) / 2;
- if (SetRowHeightRange(nStartRow, nMid, nNewHeight, 1.0))
+ // No idea why nPPTY is ignored in these recursive calls and instead 1.0 is used
+ if (SetRowHeightRange(nStartRow, nMid, nNewHeight, 1.0, bApi))
bChanged = true;
- if (SetRowHeightRange(nMid + 1, nEndRow, nNewHeight, 1.0))
+ if (SetRowHeightRange(nMid + 1, nEndRow, nNewHeight, 1.0, bApi))
bChanged = true;
}
diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index c27c73fb88e1..3372b8aac247 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -19,6 +19,8 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/random.hxx>
+#include <editeng/brushitem.hxx>
+#include <editeng/colritem.hxx>
#include <unotools/textsearch.hxx>
#include <svl/zforlist.hxx>
#include <svl/zformat.hxx>
@@ -64,6 +66,8 @@
#include <bcaslot.hxx>
#include <reordermap.hxx>
#include <drwlayer.hxx>
+#include <conditio.hxx>
+#include <colorscale.hxx>
#include <svl/sharedstringpool.hxx>
@@ -2687,6 +2691,83 @@ public:
return std::pair<bool,bool>(bOk, bTestEqual);
}
+ std::pair<bool, bool> compareByTextColor(SCCOL nCol, SCROW nRow, SCTAB nTab,
+ const ScQueryEntry::Item& rItem)
+ {
+ ScAddress aPos(nCol, nRow, nTab);
+ Color color;
+ bool bHasConditionalColor = false;
+ // Text color can be set via conditional formatting - check that first
+ const ScPatternAttr* pPattern = mrDoc.GetPattern(nCol, nRow, nTab);
+ if (pPattern)
+ {
+ if (!pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData().empty())
+ {
+ const SfxItemSet* pCondSet
+ = mrDoc.GetCondResult(nCol, nRow, nTab);
+ const SvxColorItem* pColor = &pPattern->GetItem(ATTR_FONT_COLOR, pCondSet);
+ color = pColor->GetValue();
+ bHasConditionalColor = true;
+ }
+ }
+
+ if (!bHasConditionalColor)
+ {
+ const SvxColorItem* pColor = mrDoc.GetAttr(aPos, ATTR_FONT_COLOR);
+ color = pColor->GetValue();
+ }
+
+ bool bMatch = rItem.maColor == color;
+ return std::pair<bool, bool>(bMatch, false);
+ }
+
+ std::pair<bool, bool> compareByBackgroundColor(SCCOL nCol, SCROW nRow, SCTAB nTab,
+ const ScQueryEntry::Item& rItem)
+ {
+ ScAddress aPos(nCol, nRow, nTab);
+ Color color;
+
+ // Background color can be set via conditional formatting - check that first
+ bool bHasConditionalColor = false;
+ const ScPatternAttr* pPattern = mrDoc.GetPattern(nCol, nRow, nTab);
+ if (pPattern)
+ {
+ if (!pPattern->GetItem(ATTR_CONDITIONAL).GetCondFormatData().empty())
+ {
+ const SfxItemSet* pCondSet
+ = mrDoc.GetCondResult(nCol, nRow, nTab);
+ const SvxBrushItem* pBackgroundColor = &pPattern->GetItem(ATTR_BACKGROUND, pCondSet);
+ color = pBackgroundColor->GetColor();
+ bHasConditionalColor = true;
+ }
+ }
+
+ ScConditionalFormat* pCondFormat = mrDoc.GetCondFormat(nCol, nRow, nTab);
+ if (pCondFormat)
+ {
+ for (size_t i = 0; i < pCondFormat->size(); i++)
+ {
+ auto aEntry = pCondFormat->GetEntry(i);
+ if (aEntry->GetType() == ScFormatEntry::Type::Colorscale)
+ {
+ const ScColorScaleFormat* pColFormat
+ = static_cast<const ScColorScaleFormat*>(aEntry);
+ color = *(pColFormat->GetColor(aPos));
+ bHasConditionalColor = true;
+ }
+ }
+ }
+
+ if (!bHasConditionalColor)
+ {
+ const SvxBrushItem* pBrush = mrDoc.GetAttr(aPos, ATTR_BACKGROUND);
+ color = pBrush->GetColor();
+ }
+
+ bool bMatch = rItem.maColor == color;
+ return std::pair<bool, bool>(bMatch, false);
+ }
+
// To be called only if both isQueryByValue() and isQueryByString()
// returned false and range lookup is wanted! In range lookup comparison
// numbers are less than strings. Nothing else is compared.
@@ -2787,7 +2868,21 @@ bool ScTable::ValidQuery(
{
for (const auto& rItem : rItems)
{
- if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
+ if (rItem.meType == ScQueryEntry::ByTextColor)
+ {
+ std::pair<bool, bool> aThisRes
+ = aEval.compareByTextColor(nCol, nRow, nTab, rItem);
+ aRes.first |= aThisRes.first;
+ aRes.second |= aThisRes.second;
+ }
+ else if (rItem.meType == ScQueryEntry::ByBackgroundColor)
+ {
+ std::pair<bool,bool> aThisRes =
+ aEval.compareByBackgroundColor(nCol, nRow, nTab, rItem);
+ aRes.first |= aThisRes.first;
+ aRes.second |= aThisRes.second;
+ }
+ else if (aEval.isQueryByValue(rItem, nCol, nRow, aCell))
{
std::pair<bool,bool> aThisRes =
aEval.compareByValue(aCell, nCol, nRow, rEntry, rItem, pContext);
@@ -3452,6 +3547,9 @@ bool ScTable::HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCR
void ScTable::GetFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, ScFilterEntries& rFilterEntries )
{
+ if (nCol >= aCol.size())
+ return;
+
sc::ColumnBlockConstPosition aBlockPos;
aCol[nCol].InitBlockPosition(aBlockPos);
aCol[nCol].GetFilterEntries(aBlockPos, nRow1, nRow2, rFilterEntries);
@@ -3460,6 +3558,9 @@ void ScTable::GetFilterEntries( SCCOL nCol, SCROW nRow1, SCROW nRow2, ScFilterEn
void ScTable::GetFilteredFilterEntries(
SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, ScFilterEntries& rFilterEntries )
{
+ if (nCol >= aCol.size())
+ return;
+
sc::ColumnBlockConstPosition aBlockPos;
aCol[nCol].InitBlockPosition(aBlockPos);
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/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 254db1f14d6b..7376df23e631 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -700,7 +700,7 @@ ScAutoFormat::ScAutoFormat() :
// black thin border
Color aBlack( COL_BLACK );
- ::editeng::SvxBorderLine aLine( &aBlack, DEF_LINE_WIDTH_0 );
+ ::editeng::SvxBorderLine aLine( &aBlack, SvxBorderLineWidth::VeryThin );
SvxBoxItem aBox( ATTR_BORDER );
aBox.SetLine(&aLine, SvxBoxItemLine::LEFT);
aBox.SetLine(&aLine, SvxBoxItemLine::TOP);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e26dd00177f9..84a0d64e155b 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;
}
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index 8e77f5410dc4..9278f54c22c3 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -997,6 +997,36 @@ public:
}
};
+OUString lcl_IncrementNumberInNamedRange(ScDBCollection::NamedDBs& namedDBs,
+ const OUString& sOldName, bool bIsUpperName)
+{
+ sal_Int32 nLastIndex = sOldName.lastIndexOf('_') + 1;
+ sal_Int32 nOldNumber = 1;
+ if (nLastIndex >= 0)
+ {
+ OUString sLastPart(sOldName.copy(nLastIndex));
+ nOldNumber = sLastPart.toInt32();
+
+ // When no number found, add number at the end.
+ // When there is a literal "0" at the end, keep the "lastIndex" from above
+ // (OUString::toInt32() also returns 0 on failure)
+ if (nOldNumber == 0 && sLastPart != "0")
+ {
+ nOldNumber = 1;
+ nLastIndex = sOldName.getLength();
+ }
+ }
+ else // No "_" found, add number at the end
+ nLastIndex = sOldName.getLength();
+ OUString sNewName;
+ do
+ {
+ sNewName = sOldName.copy(0, nLastIndex) + OUString::number(++nOldNumber);
+ } while ((bIsUpperName ? namedDBs.findByUpperName(sNewName) : namedDBs.findByName(sNewName))
+ != nullptr);
+ return sNewName;
+}
+
class FindByCursor
{
SCCOL const mnCol;
@@ -1048,6 +1078,17 @@ public:
}
};
+class FindByName
+{
+ const OUString& mrName;
+public:
+ explicit FindByName(const OUString& rName) : mrName(rName) {}
+ bool operator() (std::unique_ptr<ScDBData> const& p) const
+ {
+ return p->GetName() == mrName;
+ }
+};
+
class FindByPointer
{
const ScDBData* mpDBData;
@@ -1154,6 +1195,12 @@ auto ScDBCollection::NamedDBs::findByUpperName2(const OUString& rName) -> iterat
m_DBs.begin(), m_DBs.end(), FindByUpperName(rName));
}
+ScDBData* ScDBCollection::NamedDBs::findByName(const OUString& rName)
+{
+ DBsType::iterator itr = find_if(m_DBs.begin(), m_DBs.end(), FindByName(rName));
+ return itr == m_DBs.end() ? nullptr : itr->get();
+}
+
bool ScDBCollection::NamedDBs::insert(std::unique_ptr<ScDBData> pData)
{
auto p = pData.get();
@@ -1465,6 +1512,22 @@ void ScDBCollection::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos )
for_each(maAnonDBs.begin(), maAnonDBs.end(), func);
}
+void ScDBCollection::CopyToTable(SCTAB nOldPos, SCTAB nNewPos)
+{
+ for (const auto& rxNamedDB : maNamedDBs)
+ {
+ if (rxNamedDB->GetTab() != nOldPos)
+ return;
+
+ OUString newName
+ = lcl_IncrementNumberInNamedRange(getNamedDBs(), rxNamedDB->GetName(), false);
+ std::unique_ptr<ScDBData> pDataCopy = std::make_unique<ScDBData>(newName, *rxNamedDB);
+ pDataCopy->UpdateMoveTab(nOldPos, nNewPos);
+ pDataCopy->SetIndex(0);
+ getNamedDBs().insert(std::move(pDataCopy));
+ }
+}
+
ScDBData* ScDBCollection::GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab )
{
ScDBData* pNearData = nullptr;
@@ -1491,6 +1554,20 @@ ScDBData* ScDBCollection::GetDBNearCursor(SCCOL nCol, SCROW nRow, SCTAB nTab )
return pDoc->GetAnonymousDBData(nTab); // "unbenannt"/"unnamed" only if nothing else
}
+std::vector<ScDBData*> ScDBCollection::GetAllDBsFromTab(SCTAB nTab)
+{
+ std::vector<ScDBData*> pTabData;
+ for (const auto& rxNamedDB : maNamedDBs)
+ {
+ if (rxNamedDB->GetTab() == nTab)
+ pTabData.emplace_back(rxNamedDB.get());
+ }
+ auto pAnonDBData = pDoc->GetAnonymousDBData(nTab);
+ if (pAnonDBData)
+ pTabData.emplace_back(pAnonDBData);
+ return pTabData;
+}
+
bool ScDBCollection::empty() const
{
return maNamedDBs.empty() && maAnonDBs.empty();
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 040456d49ac2..d34db90f614b 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -870,14 +870,17 @@ OUString ScFieldEditEngine::CalcFieldValue( const SvxFieldItem& rField,
return ScEditUtil::GetCellFieldValue(*pFieldData, mpDoc, &rTxtColor);
}
-void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField )
+bool ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField )
{
if (!bExecuteURL)
- return;
+ return false;
+
if (const SvxURLField* pURLField = dynamic_cast<const SvxURLField*>(rField.GetField()))
{
ScGlobal::OpenURL(pURLField->GetURL(), pURLField->GetTargetFrame());
+ return true;
}
+ return false;
}
ScNoteEditEngine::ScNoteEditEngine( SfxItemPool* pEnginePoolP,
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..170e60f6afca 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3982,9 +3982,20 @@ StackVar ScInterpreter::Interpret()
(*aTokenMatrixMapIter).second->GetType() != svJumpMatrix)
{
// Path already calculated, reuse result.
- nStackBase = sp - pCur->GetParamCount();
- if ( nStackBase > sp )
- nStackBase = sp; // underflow?!?
+ if (sp >= pCur->GetParamCount())
+ nStackBase = sp - pCur->GetParamCount();
+ else
+ {
+ SAL_WARN("sc.core", "Stack anomaly with calculated path at "
+ << aPos.Tab() << "," << aPos.Col() << "," << aPos.Row()
+ << " " << 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");
+ }
sp = nStackBase;
PushTokenRef( (*aTokenMatrixMapIter).second);
}
@@ -4012,7 +4023,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/core/tool/queryentry.cxx b/sc/source/core/tool/queryentry.cxx
index ecc912b34c4a..075fa12f04d5 100644
--- a/sc/source/core/tool/queryentry.cxx
+++ b/sc/source/core/tool/queryentry.cxx
@@ -29,6 +29,8 @@
#define SC_EMPTYFIELDS (double(0x0042))
#define SC_NONEMPTYFIELDS (double(0x0043))
+#define SC_TEXTCOLOR (double(0x0044))
+#define SC_BACKGROUNDCOLOR (double(0x0045))
bool ScQueryEntry::Item::operator== (const Item& r) const
{
@@ -115,6 +117,47 @@ bool ScQueryEntry::IsQueryByNonEmpty() const
rItem.mfVal == SC_NONEMPTYFIELDS;
}
+void ScQueryEntry::SetQueryByTextColor(Color color)
+{
+ eOp = SC_EQUAL;
+ maQueryItems.resize(1);
+ Item& rItem = maQueryItems[0];
+ rItem.meType = ByTextColor;
+ rItem.maString = svl::SharedString();
+ rItem.mfVal = SC_TEXTCOLOR;
+ rItem.maColor = color;
+}
+
+bool ScQueryEntry::IsQueryByTextColor() const
+{
+ if (maQueryItems.size() != 1)
+ return false;
+
+ const Item& rItem = maQueryItems[0];
+ return eOp == SC_EQUAL &&
+ rItem.meType == ByTextColor;
+}
+
+void ScQueryEntry::SetQueryByBackgroundColor(Color color)
+{
+ eOp = SC_EQUAL;
+ maQueryItems.resize(1);
+ Item& rItem = maQueryItems[0];
+ rItem.meType = ByBackgroundColor;
+ rItem.maString = svl::SharedString();
+ rItem.mfVal = SC_BACKGROUNDCOLOR;
+ rItem.maColor = color;
+}
+
+bool ScQueryEntry::IsQueryByBackgroundColor() const
+{
+ if (maQueryItems.size() != 1)
+ return false;
+ const Item& rItem = maQueryItems[0];
+ return eOp == SC_EQUAL &&
+ rItem.meType == ByBackgroundColor;
+}
+
const ScQueryEntry::Item& ScQueryEntry::GetQueryItem() const
{
if (maQueryItems.size() > 1)
diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx
index 920955a6540d..90d60dbce92d 100644
--- a/sc/source/filter/excel/excrecds.cxx
+++ b/sc/source/filter/excel/excrecds.cxx
@@ -24,6 +24,7 @@
#include <svl/zforlist.hxx>
#include <sal/log.hxx>
+#include <sax/fastattribs.hxx>
#include <string.h>
@@ -42,6 +43,7 @@
#include <xelink.hxx>
#include <xename.hxx>
#include <xlname.hxx>
+#include <xestyle.hxx>
#include <xcl97rec.hxx>
#include <tabprotection.hxx>
@@ -696,6 +698,10 @@ bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry )
bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_EMPTY, EXC_AFOPER_NONE, 0.0, nullptr, true );
else if(rEntry.IsQueryByNonEmpty())
bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_NOTEMPTY, EXC_AFOPER_NONE, 0.0, nullptr, true );
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ AddColorEntry(rEntry);
+ }
// other conditions
else
{
@@ -774,6 +780,21 @@ void XclExpAutofilter::AddMultiValueEntry( const ScQueryEntry& rEntry )
maMultiValues.push_back(rItem.maString.getString());
}
+void XclExpAutofilter::AddColorEntry(const ScQueryEntry& rEntry)
+{
+ meType = ColorValue;
+ const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
+ for (const auto& rItem : rItems)
+ {
+ maColorValues.push_back(
+ std::make_pair(rItem.maColor, rItem.meType == ScQueryEntry::ByBackgroundColor));
+ // Ensure that selected color(s) will be added to dxf: selection can be not in list
+ // of already added to dfx colors taken from filter range
+ if (GetDxfs().GetDxfByColor(rItem.maColor) == -1)
+ GetDxfs().AddColor(rItem.maColor);
+ }
+}
+
void XclExpAutofilter::WriteBody( XclExpStream& rStrm )
{
rStrm << nCol << nFlags;
@@ -815,8 +836,28 @@ void XclExpAutofilter::SaveXml( XclExpXmlStream& rStrm )
aCond[ 0 ].SaveXml( rStrm );
aCond[ 1 ].SaveXml( rStrm );
rWorksheet->endElement( XML_customFilters );
- // OOXTODO: XLM_colorFilter, XML_dynamicFilter,
- // XML_extLst, XML_filters, XML_iconFilter, XML_top10
+ // OOXTODO: XML_dynamicFilter, XML_extLst, XML_filters, XML_iconFilter
+ }
+ break;
+ case ColorValue:
+ {
+ if (!maColorValues.empty())
+ {
+ Color color = maColorValues[0].first;
+ sax_fastparser::FastAttributeList* pAttrList = sax_fastparser::FastSerializerHelper::createAttrList();
+
+ if (maColorValues[0].second) // is background color
+ {
+ pAttrList->add(XML_cellColor, OString::number(1));
+ }
+ else
+ {
+ pAttrList->add(XML_cellColor, OString::number(0));
+ }
+ pAttrList->add(XML_dxfId, OString::number(GetDxfs().GetDxfByColor(color)));
+ sax_fastparser::XFastAttributeListRef xAttributeList(pAttrList);
+ rWorksheet->singleElement(XML_colorFilter, xAttributeList);
+ }
}
break;
case MultiValue:
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 32078b75d3c1..bedf7d7f77d1 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -46,6 +46,8 @@
#include <xestring.hxx>
#include <xltools.hxx>
#include <conditio.hxx>
+#include <dbdata.hxx>
+#include <filterentries.hxx>
#include <oox/export/utils.hxx>
#include <oox/token/tokens.hxx>
@@ -1861,7 +1863,18 @@ void XclExpCellBorder::SaveXml( XclExpXmlStream& rStrm ) const
XclExpCellArea::XclExpCellArea() :
mnForeColorId( XclExpPalette::GetColorIdFromIndex( mnForeColor ) ),
- mnBackColorId( XclExpPalette::GetColorIdFromIndex( mnBackColor ) )
+ mnBackColorId( XclExpPalette::GetColorIdFromIndex( mnBackColor ) ),
+ maForeColor(0),
+ maBackColor(0)
+{
+}
+
+XclExpCellArea::XclExpCellArea(Color aForeColor, Color aBackColor)
+ : XclCellArea(EXC_PATT_SOLID)
+ , mnForeColorId(0)
+ , mnBackColorId(0)
+ , maForeColor(aForeColor)
+ , maBackColor(aBackColor)
{
}
@@ -1938,15 +1951,42 @@ void XclExpCellArea::SaveXml( XclExpXmlStream& rStrm ) const
XclExpPalette& rPalette = rStrm.GetRoot().GetPalette();
- if( mnPattern == EXC_PATT_NONE || ( mnForeColor == 0 && mnBackColor == 0 ) )
+ if (mnPattern == EXC_PATT_NONE
+ || (mnForeColor == 0 && mnBackColor == 0 && maForeColor == 0 && maBackColor == 0))
+ {
rStyleSheet->singleElement(XML_patternFill, XML_patternType, ToPatternType(mnPattern));
+ }
else
{
rStyleSheet->startElement(XML_patternFill, XML_patternType, ToPatternType(mnPattern));
- rStyleSheet->singleElement( XML_fgColor,
- XML_rgb, XclXmlUtils::ToOString(rPalette.GetColor(mnForeColor)) );
- rStyleSheet->singleElement( XML_bgColor,
- XML_rgb, XclXmlUtils::ToOString(rPalette.GetColor(mnBackColor)) );
+ if (maForeColor != 0 || maBackColor != 0)
+ {
+ if (maForeColor != 0)
+ {
+ rStyleSheet->singleElement(XML_fgColor, XML_rgb,
+ XclXmlUtils::ToOString(maForeColor));
+ }
+
+ if (maBackColor != 0)
+ {
+ rStyleSheet->singleElement(XML_bgColor, XML_rgb,
+ XclXmlUtils::ToOString(maBackColor));
+ }
+ }
+ else
+ {
+ if (mnForeColor != 0)
+ {
+ rStyleSheet->singleElement(XML_fgColor, XML_rgb,
+ XclXmlUtils::ToOString(rPalette.GetColor(mnForeColor)));
+ }
+ if (mnBackColor != 0)
+ {
+ rStyleSheet->singleElement(XML_bgColor, XML_rgb,
+ XclXmlUtils::ToOString(rPalette.GetColor(mnBackColor)));
+ }
+ }
+
rStyleSheet->endElement( XML_patternFill );
}
@@ -3001,9 +3041,45 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
xFormatter->FillKeywordTableForExcel( *mpKeywordTable );
SCTAB nTables = rRoot.GetDoc().GetTableCount();
- sal_Int32 nIndex = 0;
+ sal_Int32 nDxfId = 0;
for(SCTAB nTab = 0; nTab < nTables; ++nTab)
{
+ // Color filters
+ std::vector<ScDBData*> pDBData = rRoot.GetDoc().GetDBCollection()->GetAllDBsFromTab(nTab);
+ for (auto& pData : pDBData)
+ {
+ ScRange aRange;
+ pData->GetArea(aRange);
+ for (auto nCol = aRange.aStart.Col(); nCol <= aRange.aEnd.Col(); nCol++)
+ {
+ ScFilterEntries aFilterEntries;
+ rRoot.GetDoc().GetFilterEntriesArea(nCol, aRange.aStart.Row(),
+ aRange.aEnd.Row(), nTab, true, aFilterEntries);
+
+ // Excel has all filter values stored as forground colors
+ // Does not matter it is text color or cell background color
+ for (auto& rColor : aFilterEntries.getBackgroundColors())
+ {
+ if (!maColorToDxfId.emplace(rColor, nDxfId).second)
+ continue;
+
+ std::unique_ptr<XclExpCellArea> pExpCellArea(new XclExpCellArea(rColor, 0));
+ maDxf.push_back(std::make_unique<XclExpDxf>(rRoot, std::move(pExpCellArea)));
+ nDxfId++;
+ }
+ for (auto& rColor : aFilterEntries.getTextColors())
+ {
+ if (!maColorToDxfId.emplace(rColor, nDxfId).second)
+ continue;
+
+ std::unique_ptr<XclExpCellArea> pExpCellArea(new XclExpCellArea(rColor, 0));
+ maDxf.push_back(std::make_unique<XclExpDxf>(rRoot, std::move(pExpCellArea)));
+ nDxfId++;
+ }
+ }
+ }
+
+ // Conditional formatting
ScConditionalFormatList* pList = rRoot.GetDoc().GetCondFormList(nTab);
if (pList)
{
@@ -3029,7 +3105,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
aStyleName = pEntry->GetStyleName();
}
- if (maStyleNameToDxfId.emplace(aStyleName, nIndex).second)
+ if (maStyleNameToDxfId.emplace(aStyleName, nDxfId).second)
{
SfxStyleSheetBase* pStyle = rRoot.GetDoc().GetStyleSheetPool()->Find(aStyleName, SfxStyleFamily::Para);
if(!pStyle)
@@ -3074,7 +3150,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
maDxf.push_back(std::make_unique<XclExpDxf>( rRoot, std::move(pAlign), std::move(pBorder),
std::move(pFont), std::move(pNumFormat), std::move(pCellProt), std::move(pColor) ));
- ++nIndex;
+ ++nDxfId;
}
}
@@ -3083,14 +3159,30 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot& rRoot )
}
}
-sal_Int32 XclExpDxfs::GetDxfId( const OUString& rStyleName )
+sal_Int32 XclExpDxfs::GetDxfId( const OUString& rStyleName ) const
{
- std::map<OUString, sal_Int32>::iterator itr = maStyleNameToDxfId.find(rStyleName);
+ std::map<OUString, sal_Int32>::const_iterator itr = maStyleNameToDxfId.find(rStyleName);
if(itr!= maStyleNameToDxfId.end())
return itr->second;
return -1;
}
+sal_Int32 XclExpDxfs::GetDxfByColor(const Color& aColor) const
+{
+ std::map<Color, sal_Int32>::const_iterator itr = maColorToDxfId.find(aColor);
+ if (itr != maColorToDxfId.end())
+ return itr->second;
+ return -1;
+}
+
+void XclExpDxfs::AddColor(Color aColor)
+{
+ maColorToDxfId.emplace(aColor, maDxf.size());
+
+ std::unique_ptr<XclExpCellArea> pExpCellArea(new XclExpCellArea(aColor, 0));
+ maDxf.push_back(std::make_unique<XclExpDxf>(GetRoot(), std::move(pExpCellArea)));
+}
+
void XclExpDxfs::SaveXml( XclExpXmlStream& rStrm )
{
if(maDxf.empty())
@@ -3120,6 +3212,12 @@ XclExpDxf::XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellAlign>
{
}
+XclExpDxf::XclExpDxf(const XclExpRoot& rRoot, std::unique_ptr<XclExpCellArea> pCellArea)
+ : XclExpRoot(rRoot)
+ , mpCellArea(std::move(pCellArea))
+{
+}
+
XclExpDxf::~XclExpDxf()
{
}
@@ -3141,6 +3239,8 @@ void XclExpDxf::SaveXml( XclExpXmlStream& rStrm )
mpBorder->SaveXml(rStrm);
if (mpProt)
mpProt->SaveXml(rStrm);
+ if (mpCellArea)
+ mpCellArea->SaveXml(rStrm);
rStyleSheet->endElement( XML_dxf );
}
diff --git a/sc/source/filter/excel/xlstyle.cxx b/sc/source/filter/excel/xlstyle.cxx
index 8d769042642a..2debd508b563 100644
--- a/sc/source/filter/excel/xlstyle.cxx
+++ b/sc/source/filter/excel/xlstyle.cxx
@@ -1693,6 +1693,13 @@ XclCellArea::XclCellArea() :
{
}
+XclCellArea::XclCellArea(sal_uInt8 nPattern) :
+ mnForeColor( EXC_COLOR_WINDOWTEXT ),
+ mnBackColor( EXC_COLOR_WINDOWBACK ),
+ mnPattern( nPattern )
+{
+}
+
bool XclCellArea::IsTransparent() const
{
return (mnPattern == EXC_PATT_NONE) && (mnBackColor == EXC_COLOR_WINDOWBACK);
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index ae46949e4b21..51e4acefc21a 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -2224,8 +2224,8 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
{
const SCCOL nLastCol = maSize.mnCols - 1;
const SCROW nLastRow = maSize.mnRows - 1;
- const long nOuterLine = DEF_LINE_WIDTH_2;
- const long nInnerLine = DEF_LINE_WIDTH_0;
+ const long nOuterLine = SvxBorderLineWidth::Medium;
+ const long nInnerLine = SvxBorderLineWidth::Hairline;
SvxBorderLine aOuterLine(nullptr, nOuterLine, SvxBorderLineStyle::SOLID);
SvxBorderLine aInnerLine(nullptr, nInnerLine, SvxBorderLineStyle::SOLID);
SvxBoxItem aBorderItem( ATTR_BORDER );
diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index ae8e8b4fa2a0..cf3593de5e63 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -24,6 +24,7 @@
#include <oox/helper/refvector.hxx>
#include "workbookhelper.hxx"
#include <com/sun/star/sheet/TableFilterField3.hpp>
+#include <com/sun/star/util/Color.hpp>
namespace com { namespace sun { namespace star {
namespace sheet { class XDatabaseRange; }
@@ -49,6 +50,7 @@ struct ApiFilterSettings
void appendField( bool bAnd, sal_Int32 nOperator, double fValue );
void appendField( bool bAnd, sal_Int32 nOperator, const OUString& rValue );
void appendField( bool bAnd, const std::vector<OUString>& rValues );
+ void appendField( bool bAnd, css::util::Color aColor, bool bIsBackgroundColor );
};
/** Base class for specific filter settings for a column in a filtered range.
@@ -111,6 +113,27 @@ private:
bool mbPercent; /// True = percentage, false = number of items.
};
+/** Settings for a color filter. */
+class ColorFilter : public FilterSettingsBase
+{
+public:
+ explicit ColorFilter(const WorkbookHelper& rHelper);
+
+ /** Imports filter settings from the filters and filter elements. */
+ virtual void importAttribs(sal_Int32 nElement, const AttributeList& rAttribs) override;
+ /** Imports filter settings from the FILTERS and FILTER records. */
+ virtual void importRecord(sal_Int32 nRecId, SequenceInputStream& rStrm) override;
+
+ /** Returns converted UNO API filter settings representing all filter settings. */
+ virtual ApiFilterSettings finalizeImport(sal_Int32 nMaxCount) override;
+
+private:
+ /// Whether we are dealing with the background color (vs. text color)
+ bool mbIsBackgroundColor;
+ /// Style name to retrieve the color from
+ OUString msStyleName;
+};
+
/** A filter criterion for a custom filter. */
struct FilterCriterionModel
{
diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx
index a0abbf9410cd..8b9e0cae87e9 100644
--- a/sc/source/filter/inc/excrecds.hxx
+++ b/sc/source/filter/inc/excrecds.hxx
@@ -361,12 +361,13 @@ public:
class XclExpAutofilter : public XclExpRecord, protected XclExpRoot
{
private:
- enum FilterType { FilterCondition, MultiValue };
+ enum FilterType { FilterCondition, MultiValue, ColorValue };
FilterType meType;
sal_uInt16 nCol;
sal_uInt16 nFlags;
ExcFilterCondition aCond[ 2 ];
std::vector<OUString> maMultiValues;
+ std::vector<std::pair<::Color, bool>> maColorValues; // first->Color, second->bIsBackgroundColor (vs. TextColor)
bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType,
sal_uInt8 nOp, double fVal, const OUString* pText,
@@ -383,6 +384,7 @@ public:
bool HasCondition() const;
bool AddEntry( const ScQueryEntry& rEntry );
void AddMultiValueEntry( const ScQueryEntry& rEntry );
+ void AddColorEntry( const ScQueryEntry& rEntry );
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
};
diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx
index ae960530e80c..ecd97890556f 100644
--- a/sc/source/filter/inc/xestyle.hxx
+++ b/sc/source/filter/inc/xestyle.hxx
@@ -375,8 +375,11 @@ struct XclExpCellArea : public XclCellArea
{
sal_uInt32 mnForeColorId; /// Foreground color ID.
sal_uInt32 mnBackColorId; /// Background color ID.
+ Color maForeColor; // Actual foreground color
+ Color maBackColor; // Actual background color
explicit XclExpCellArea();
+ explicit XclExpCellArea(Color aForeColor, Color aBackColor);
/** Fills the area attributes from the passed item set.
@return true = At least one area item is set. */
@@ -726,6 +729,7 @@ public:
XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellAlign> pAlign, std::unique_ptr<XclExpCellBorder> pBorder,
std::unique_ptr<XclExpDxfFont> pFont, std::unique_ptr<XclExpNumFmt> pNumberFmt,
std::unique_ptr<XclExpCellProt> pProt, std::unique_ptr<XclExpColor> pColor);
+ XclExpDxf( const XclExpRoot& rRoot, std::unique_ptr<XclExpCellArea> pCellArea);
virtual ~XclExpDxf() override;
virtual void SaveXml( XclExpXmlStream& rStrm ) override;
@@ -738,6 +742,7 @@ private:
std::unique_ptr<XclExpNumFmt> mpNumberFmt;
std::unique_ptr<XclExpCellProt> mpProt;
std::unique_ptr<XclExpColor> mpColor;
+ std::unique_ptr<XclExpCellArea> mpCellArea;
};
class XclExpDxfs : public XclExpRecordBase, protected XclExpRoot
@@ -745,12 +750,15 @@ class XclExpDxfs : public XclExpRecordBase, protected XclExpRoot
public:
XclExpDxfs( const XclExpRoot& rRoot );
- sal_Int32 GetDxfId(const OUString& rName);
+ sal_Int32 GetDxfId(const OUString& rName) const;
+ sal_Int32 GetDxfByColor(const Color& aColor) const;
+ void AddColor(Color aColor);
virtual void SaveXml( XclExpXmlStream& rStrm) override;
private:
typedef std::vector< std::unique_ptr<XclExpDxf> > DxfContainer;
std::map<OUString, sal_Int32> maStyleNameToDxfId;
+ std::map<Color, sal_Int32> maColorToDxfId;
DxfContainer maDxf;
std::unique_ptr<NfKeywordTable> mpKeywordTable; /// Replacement table.
};
diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx
index 70fd39121c3e..4d39ed033970 100644
--- a/sc/source/filter/inc/xlstyle.hxx
+++ b/sc/source/filter/inc/xlstyle.hxx
@@ -548,6 +548,7 @@ struct XclCellArea
sal_uInt8 mnPattern; /// Fill pattern.
explicit XclCellArea();
+ explicit XclCellArea(sal_uInt8 nPattern);
/** Returns true, if the area represents transparent state. */
bool IsTransparent() const;
diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx
index dd7725b40ec2..eff0efe6e5fc 100644
--- a/sc/source/filter/lotus/lotattr.cxx
+++ b/sc/source/filter/lotus/lotattr.cxx
@@ -151,12 +151,12 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin
switch ( nLine )
{
case 0: aBL.SetBorderLineStyle(SvxBorderLineStyle::NONE); break;
- case 1: aBL.SetWidth( DEF_LINE_WIDTH_1 ); break;
- case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break;
+ case 1: aBL.SetWidth( SvxBorderLineWidth::Thin ); break;
+ case 2: aBL.SetWidth( SvxBorderLineWidth::Medium ); break;
case 3:
{
aBL.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE_THIN);
- aBL.SetWidth( DEF_LINE_WIDTH_1 );
+ aBL.SetWidth( SvxBorderLineWidth::Thin );
}
break;
}
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/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index 8209df526283..e2efd9a48a80 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -20,6 +20,7 @@
#include <autofilterbuffer.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sheet/FilterFieldType.hpp>
#include <com/sun/star/sheet/FilterConnection.hpp>
#include <com/sun/star/sheet/FilterOperator2.hpp>
#include <com/sun/star/sheet/TableFilterField3.hpp>
@@ -27,6 +28,8 @@
#include <com/sun/star/sheet/XSheetFilterDescriptor3.hpp>
#include <com/sun/star/table/TableOrientation.hpp>
#include <com/sun/star/table/CellAddress.hpp>
+#include <editeng/colritem.hxx>
+#include <editeng/brushitem.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <oox/helper/attributelist.hxx>
@@ -41,12 +44,17 @@
#include <biffhelper.hxx>
#include <document.hxx>
#include <dbdata.hxx>
+#include <scitems.hxx>
#include <sortparam.hxx>
+#include <stlpool.hxx>
+#include <stlsheet.hxx>
+#include <stylesbuffer.hxx>
#include <userlist.hxx>
namespace oox {
namespace xls {
+using namespace css;
using namespace ::com::sun::star::sheet;
using namespace ::com::sun::star::table;
using namespace ::com::sun::star::uno;
@@ -161,7 +169,7 @@ void ApiFilterSettings::appendField( bool bAnd, sal_Int32 nOperator, double fVal
rFilterField.Connection = bAnd ? FilterConnection_AND : FilterConnection_OR;
rFilterField.Operator = nOperator;
rFilterField.Values.realloc(1);
- rFilterField.Values[0].IsNumeric = true;
+ rFilterField.Values[0].FilterType = FilterFieldType::NUMERIC;
rFilterField.Values[0].NumericValue = fValue;
}
@@ -172,7 +180,7 @@ void ApiFilterSettings::appendField( bool bAnd, sal_Int32 nOperator, const OUStr
rFilterField.Connection = bAnd ? FilterConnection_AND : FilterConnection_OR;
rFilterField.Operator = nOperator;
rFilterField.Values.realloc(1);
- rFilterField.Values[0].IsNumeric = false;
+ rFilterField.Values[0].FilterType = FilterFieldType::STRING;
rFilterField.Values[0].StringValue = rValue;
}
@@ -186,11 +194,23 @@ void ApiFilterSettings::appendField( bool bAnd, const std::vector<OUString>& rVa
rFilterField.Values.realloc(n);
for (size_t i = 0; i < n; ++i)
{
- rFilterField.Values[i].IsNumeric = false;
+ rFilterField.Values[i].FilterType = FilterFieldType::STRING;
rFilterField.Values[i].StringValue = rValues[i];
}
}
+void ApiFilterSettings::appendField(bool bAnd, util::Color aColor, bool bIsBackgroundColor)
+{
+ maFilterFields.emplace_back();
+ TableFilterField3& rFilterField = maFilterFields.back();
+ rFilterField.Connection = bAnd ? FilterConnection_AND : FilterConnection_OR;
+ rFilterField.Operator = FilterOperator2::EQUAL;
+ rFilterField.Values.realloc(1);
+ rFilterField.Values[0].FilterType
+ = bIsBackgroundColor ? FilterFieldType::BACKGROUND_COLOR : FilterFieldType::TEXT_COLOR;
+ rFilterField.Values[0].ColorValue = aColor;
+}
+
FilterSettingsBase::FilterSettingsBase( const WorkbookHelper& rHelper ) :
WorkbookHelper( rHelper )
{
@@ -325,6 +345,46 @@ ApiFilterSettings Top10Filter::finalizeImport( sal_Int32 /*nMaxCount*/ )
return aSettings;
}
+ColorFilter::ColorFilter(const WorkbookHelper& rHelper)
+ : FilterSettingsBase(rHelper)
+{
+}
+
+void ColorFilter::importAttribs(sal_Int32 nElement, const AttributeList& rAttribs)
+{
+ if (nElement == XLS_TOKEN(colorFilter))
+ {
+ // When cellColor attribute not found, it means cellColor = true
+ // cellColor = 0 (false) -> TextColor
+ // cellColor = 1 (true) -> BackgroundColor
+ mbIsBackgroundColor = rAttribs.getBool(XML_cellColor, true);
+ msStyleName = getStyles().createDxfStyle( rAttribs.getInteger(XML_dxfId, -1) );
+ }
+}
+
+void ColorFilter::importRecord(sal_Int32 /* nRecId */, SequenceInputStream& /* rStrm */)
+{
+ // TODO
+}
+
+ApiFilterSettings ColorFilter::finalizeImport(sal_Int32 /*nMaxCount*/)
+{
+ ApiFilterSettings aSettings;
+ ScDocument& rDoc = getScDocument();
+ ScStyleSheet* pStyleSheet = static_cast<ScStyleSheet*>(
+ rDoc.GetStyleSheetPool()->Find(msStyleName, SfxStyleFamily::Para));
+ if (!pStyleSheet)
+ return aSettings;
+
+ const SfxItemSet& rItemSet = pStyleSheet->GetItemSet();
+ // Color (whether text or background color) is always stored in ATTR_BACKGROUND
+ const SvxBrushItem* pItem = rItemSet.GetItem<SvxBrushItem>(ATTR_BACKGROUND);
+ ::Color aColor = pItem->GetColor();
+ util::Color nColor(aColor);
+ aSettings.appendField(true, nColor, mbIsBackgroundColor);
+ return aSettings;
+}
+
FilterCriterionModel::FilterCriterionModel() :
mnOperator( XML_equal ),
mnDataType( BIFF_FILTER_DATATYPE_NONE )
diff --git a/sc/source/filter/oox/autofiltercontext.cxx b/sc/source/filter/oox/autofiltercontext.cxx
index 814569e0b45f..550e0f69e5fe 100644
--- a/sc/source/filter/oox/autofiltercontext.cxx
+++ b/sc/source/filter/oox/autofiltercontext.cxx
@@ -44,6 +44,9 @@ ContextHandlerRef FilterSettingsContext::onCreateContext( sal_Int32 nElement, co
case XLS_TOKEN( customFilters ):
if( nElement == XLS_TOKEN( customFilter ) ) return this;
break;
+ case XLS_TOKEN( colorFilter ):
+ if( nElement == XLS_TOKEN( colorFilter ) ) return this;
+ break;
}
return nullptr;
}
@@ -88,6 +91,8 @@ ContextHandlerRef FilterColumnContext::onCreateContext( sal_Int32 nElement, cons
return new FilterSettingsContext( *this, mrFilterColumn.createFilterSettings< Top10Filter >() );
case XLS_TOKEN( customFilters ):
return new FilterSettingsContext( *this, mrFilterColumn.createFilterSettings< CustomFilter >() );
+ case XLS_TOKEN( colorFilter ):
+ return new FilterSettingsContext( *this, mrFilterColumn.createFilterSettings< ColorFilter >() );
}
return nullptr;
}
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/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index a6887b7bd103..db86ac8d0659 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1824,11 +1824,14 @@ void Fill::finalizeImport()
{
if( rModel.mbFillColorUsed && (!rModel.mbPatternUsed || (rModel.mnPattern == XML_solid)) )
{
- rModel.maPatternColor = rModel.maFillColor;
+ if (!rModel.mbPatternUsed)
+ rModel.maPatternColor = rModel.maFillColor;
rModel.mnPattern = XML_solid;
rModel.mbPattColorUsed = rModel.mbPatternUsed = true;
}
- else if( !rModel.mbFillColorUsed && rModel.mbPatternUsed && (rModel.mnPattern == XML_solid) )
+ else if(
+ !rModel.mbFillColorUsed && !rModel.mbPattColorUsed &&
+ rModel.mbPatternUsed && rModel.mnPattern == XML_solid )
{
rModel.mbPatternUsed = false;
}
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/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx
index 368c99fa3bd6..abb920faa075 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -448,7 +448,7 @@ void ScEEImport::WriteToDocument( bool bSizeColsRows, double nOutputFactor, SvNu
ScopedVclPtrInstance< VirtualDevice > pVirtDev;
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoom, aZoom, pVirtDev);
aCxt.setExtraHeight(ScGlobal::nLastRowHeightExtra);
- mpDoc->SetOptimalHeight(aCxt, 0, nEndRow, 0);
+ mpDoc->SetOptimalHeight(aCxt, 0, nEndRow, 0, true);
if ( !maRowHeights.empty() )
{
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..f0f20ca900a1 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);
@@ -435,16 +435,39 @@ private:
return;
}
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FIELD_NUMBER, OUString::number(rEntry.nField - nFieldStart));
- if (bCaseSens)
- mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CASE_SENSITIVE, XML_TRUE);
-
if (rItems.size() == 1)
{
// Single item condition.
const ScQueryEntry::Item& rItem = rItems.front();
if (rItem.meType == ScQueryEntry::ByString)
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString());
+ else if (rItem.meType == ScQueryEntry::ByTextColor
+ || rItem.meType == ScQueryEntry::ByBackgroundColor)
+ {
+ if (mrExport.getSaneDefaultVersion() & SvtSaveOptions::ODFSVER_EXTENDED)
+ {
+ if (rItem.meType == ScQueryEntry::ByTextColor)
+ mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATA_TYPE, XML_TEXT_COLOR);
+ else
+ mrExport.AddAttribute(XML_NAMESPACE_LO_EXT, XML_DATA_TYPE,
+ XML_BACKGROUND_COLOR);
+ }
+
+ OUString colorValue;
+ if (rItem.maColor == COL_AUTO) // tdf#142965
+ {
+ colorValue = rItem.meType == ScQueryEntry::ByTextColor
+ ? GetXMLToken(XML_WINDOW_FONT_COLOR)
+ : GetXMLToken(XML_TRANSPARENT);
+ }
+ else
+ {
+ OUStringBuffer buffer;
+ sax::Converter::convertColor(buffer, rItem.maColor);
+ colorValue = buffer.makeStringAndClear();
+ }
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, colorValue);
+ }
else
{
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DATA_TYPE, XML_NUMBER);
@@ -454,6 +477,9 @@ private:
}
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, getOperatorXML(rEntry, eSearchType));
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FIELD_NUMBER, OUString::number(rEntry.nField - nFieldStart));
+ if (bCaseSens)
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CASE_SENSITIVE, XML_TRUE);
SvXMLElementExport aElemC(mrExport, XML_NAMESPACE_TABLE, XML_FILTER_CONDITION, true, true);
}
else
@@ -465,6 +491,9 @@ private:
const ScQueryEntry::Item& rItem = rItems.front();
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_VALUE, rItem.maString.getString());
mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, OUString("="));
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FIELD_NUMBER, OUString::number(rEntry.nField - nFieldStart));
+ if (bCaseSens)
+ mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CASE_SENSITIVE, XML_TRUE);
SvXMLElementExport aElemC(mrExport, XML_NAMESPACE_TABLE, XML_FILTER_CONDITION, true, true);
std::for_each(rItems.begin(), rItems.end(), WriteSetItem(mrExport));
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 2d16318bac7e..c0b644c6cc8a 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>
@@ -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);
}
@@ -3424,40 +3432,8 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape,
}
}
if (!bIsChart)
- {
- OUString sHlink;
- try
- {
- uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY );
- if ( xProps.is() )
- xProps->getPropertyValue( SC_UNONAME_HYPERLINK ) >>= sHlink;
- }
- catch ( const beans::UnknownPropertyException& )
- {
- // no hyperlink property
- }
-
- std::unique_ptr< SvXMLElementExport > pDrawA;
- // enclose shapes with <draw:a> element only if sHlink contains something
- if ( !sHlink.isEmpty() )
- {
- // need to get delete the attributes that are pre-loaded
- // for the shape export ( otherwise they will become
- // attributes of the draw:a element ) This *shouldn't*
- // affect performance adversely as there are only a
- // couple of attributes involved
- uno::Reference< xml::sax::XAttributeList > xSaveAttribs( new SvXMLAttributeList( GetAttrList() ) );
- ClearAttrList();
- // Add Hlink
- AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
- AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHlink);
- pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, false, false ) );
- // Attribute list has been cleared by previous operation
- // re-add pre-loaded attributes
- AddAttributeList( xSaveAttribs );
- }
GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint);
- }
+
IncrementProgressBar(false);
}
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 47fea817123c..0ac45679be56 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -26,6 +26,7 @@
#include <document.hxx>
#include <o3tl/safeint.hxx>
+#include <sax/tools/converter.hxx>
#include <svl/sharedstringpool.hxx>
#include <xmloff/xmltoken.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -312,6 +313,7 @@ ScXMLConditionContext::ScXMLConditionContext(
}
break;
case XML_ELEMENT( TABLE, XML_DATA_TYPE ):
+ case XML_ELEMENT( LO_EXT, XML_DATA_TYPE ):
{
sDataType = aIter.toString();
}
@@ -380,7 +382,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;
@@ -437,6 +439,17 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
rItem.mfVal = sConditionValue.toDouble();
rItem.meType = ScQueryEntry::ByValue;
}
+ else if (IsXMLToken(sDataType, XML_TEXT_COLOR)
+ || IsXMLToken(sDataType, XML_BACKGROUND_COLOR))
+ {
+ rItem.meType = IsXMLToken(sDataType, XML_TEXT_COLOR) ? ScQueryEntry::ByTextColor
+ : ScQueryEntry::ByBackgroundColor;
+ if (IsXMLToken(sConditionValue, XML_TRANSPARENT)
+ || IsXMLToken(sConditionValue, XML_WINDOW_FONT_COLOR))
+ rItem.maColor = COL_AUTO;
+ else
+ sax::Converter::convertColor(rItem.maColor, sConditionValue);
+ }
else
{
svl::SharedStringPool& rPool = GetScImport().GetDocument()->GetSharedStringPool();
@@ -759,7 +772,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/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index b9b5acca11c8..fec0468a2bb7 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -452,8 +452,6 @@ void ScMenuFloatingWindow::executeMenuItem(size_t nPos)
// no action is defined.
return;
- terminateAllPopupMenus();
-
maMenuItems[nPos].mpAction->execute();
}
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 9ee84fc714cd..8fbe257d2206 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -34,9 +34,13 @@
#include <strings.hrc>
#include <filtdlg.hxx>
+#include <vcl/menu.hxx>
#include <vcl/svapp.hxx>
+#include <vcl/settings.hxx>
+#include <vcl/virdev.hxx>
#include <vcl/weld.hxx>
#include <svl/sharedstringpool.hxx>
+#include <toolkit/helper/vclunohelper.hxx>
#include <limits>
@@ -55,6 +59,8 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
, aStrEmpty(ScResId(SCSTR_FILTER_EMPTY))
, aStrNotEmpty(ScResId(SCSTR_FILTER_NOTEMPTY))
, aStrColumn(ScResId(SCSTR_COLUMN))
+ , aStrTextColor(ScResId(SCSTR_FILTER_TEXT_COLOR))
+ , aStrBackgroundColor(ScResId(SCSTR_FILTER_BACKGROUND_COLOR))
, nWhichQuery(rArgSet.GetPool()->GetWhich(SID_QUERY))
, theQueryData(static_cast<const ScQueryItem&>(rArgSet.Get(nWhichQuery)).GetQueryData())
, pViewData(nullptr)
@@ -65,18 +71,22 @@ ScFilterDlg::ScFilterDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pPa
, m_xLbField1(m_xBuilder->weld_combo_box("field1"))
, m_xLbCond1(m_xBuilder->weld_combo_box("cond1"))
, m_xEdVal1(m_xBuilder->weld_combo_box("val1"))
+ , m_xLbColor1(m_xBuilder->weld_combo_box("color1"))
, m_xLbConnect2(m_xBuilder->weld_combo_box("connect2"))
, m_xLbField2(m_xBuilder->weld_combo_box("field2"))
, m_xLbCond2(m_xBuilder->weld_combo_box("cond2"))
, m_xEdVal2(m_xBuilder->weld_combo_box("val2"))
+ , m_xLbColor2(m_xBuilder->weld_combo_box("color2"))
, m_xLbConnect3(m_xBuilder->weld_combo_box("connect3"))
, m_xLbField3(m_xBuilder->weld_combo_box("field3"))
, m_xLbCond3(m_xBuilder->weld_combo_box("cond3"))
, m_xEdVal3(m_xBuilder->weld_combo_box("val3"))
+ , m_xLbColor3(m_xBuilder->weld_combo_box("color3"))
, m_xLbConnect4(m_xBuilder->weld_combo_box("connect4"))
, m_xLbField4(m_xBuilder->weld_combo_box("field4"))
, m_xLbCond4(m_xBuilder->weld_combo_box("cond4"))
, m_xEdVal4(m_xBuilder->weld_combo_box("val4"))
+ , m_xLbColor4(m_xBuilder->weld_combo_box("color4"))
, m_xContents(m_xBuilder->weld_widget("grid"))
, m_xScrollBar(m_xBuilder->weld_scrolled_window("scrollbar"))
, m_xExpander(m_xBuilder->weld_expander("more"))
@@ -116,6 +126,33 @@ ScFilterDlg::~ScFilterDlg()
pTimer.reset();
}
+namespace {
+VirtualDevice* lcl_getColorImage(const Color &rColor)
+{
+ const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
+ Size aImageSize(rStyleSettings.GetListBoxPreviewDefaultPixelSize());
+
+ VclPtrInstance<VirtualDevice> xDevice;
+ xDevice->SetOutputSize(aImageSize);
+ const tools::Rectangle aRect(Point(0, 0), aImageSize);
+ if (rColor == COL_NONE_COLOR)
+ {
+ const Color aW(COL_WHITE);
+ const Color aG(0xef, 0xef, 0xef);
+ xDevice->DrawCheckered(aRect.TopLeft(), aRect.GetSize(), 8, aW, aG);
+ xDevice->SetFillColor();
+ }
+ else
+ {
+ xDevice->SetFillColor(rColor);
+ }
+
+ xDevice->DrawRect(aRect);
+
+ return xDevice.get();
+}
+}
+
void ScFilterDlg::Init( const SfxItemSet& rArgSet )
{
const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(
@@ -150,6 +187,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbCond3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
m_xLbCond4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor1->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor2->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor3->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+ m_xLbColor4->connect_changed( LINK( this, ScFilterDlg, LbSelectHdl ) );
+
pViewData = rQueryItem.GetViewData();
pDoc = pViewData ? pViewData->GetDocument() : nullptr;
nSrcTab = pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0);
@@ -175,6 +217,11 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maConnLbArr.push_back(m_xLbConnect2.get());
maConnLbArr.push_back(m_xLbConnect3.get());
maConnLbArr.push_back(m_xLbConnect4.get());
+ maColorLbArr.reserve(QUERY_ENTRY_COUNT);
+ maColorLbArr.push_back(m_xLbColor1.get());
+ maColorLbArr.push_back(m_xLbColor2.get());
+ maColorLbArr.push_back(m_xLbColor3.get());
+ maColorLbArr.push_back(m_xLbColor4.get());
// Option initialization:
pOptionsMgr.reset( new ScFilterOptionsMgr(
@@ -202,6 +249,8 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
size_t nCondPos = 0;
size_t nFieldSelPos = 0;
+ maColorLbArr[i]->set_visible(false);
+
ScQueryEntry& rEntry = theQueryData.GetEntry(i);
if ( rEntry.bDoQuery )
{
@@ -218,6 +267,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
aValStr = aStrNotEmpty;
maCondLbArr[i]->set_sensitive(false);
}
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ nCondPos = maCondLbArr[i]->find_text(
+ rEntry.IsQueryByTextColor() ? aStrTextColor : aStrBackgroundColor);
+ maValueEdArr[i]->set_visible(false);
+ maColorLbArr[i]->set_visible(true);
+ maColorLbArr[i]->set_sensitive(true);
+ }
else
{
OUString aQueryStr = rItem.maString.getString();
@@ -271,6 +328,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
maValueEdArr[i]->set_entry_completion(false);
maValueEdArr[i]->connect_changed( LINK( this, ScFilterDlg, ValModifyHdl ) );
UpdateValueList(i+1);
+ UpdateColorList(i+1);
}
m_xScrollBar->set_user_managed_scrolling();
@@ -302,12 +360,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField2->set_sensitive(false);
m_xLbCond2->set_sensitive(false);
m_xEdVal2->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
}
else if ( m_xLbConnect2->get_active() == -1 )
{
m_xLbField2->set_sensitive(false);
m_xLbCond2->set_sensitive(false);
m_xEdVal2->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
}
if ( m_xLbField2->get_active() == 0 )
@@ -316,12 +376,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField3->set_sensitive(false);
m_xLbCond3->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
}
else if ( m_xLbConnect3->get_active() == -1 )
{
m_xLbField3->set_sensitive(false);
m_xLbCond3->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
}
if ( m_xLbField3->get_active() == 0 )
{
@@ -329,12 +391,14 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet )
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
}
else if ( m_xLbConnect4->get_active() == -1 )
{
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
}
m_xEdVal1->set_entry_width_chars(10);
@@ -573,6 +637,62 @@ void ScFilterDlg::ClearValueList( size_t nList )
}
}
+void ScFilterDlg::UpdateColorList(size_t nList)
+{
+ if (!pDoc || nList <= 0 || nList > QUERY_ENTRY_COUNT)
+ return;
+
+ size_t nPos = nList - 1;
+ ScQueryEntry& rEntry = theQueryData.GetEntry(nPos);
+ const sal_Int32 nFieldSelPos = maFieldLbArr[nPos]->get_active();
+ if (!nFieldSelPos)
+ return;
+
+ SCCOL nColumn = theQueryData.nCol1 + static_cast<SCCOL>(nFieldSelPos) - 1;
+ EntryList* pList = m_EntryLists[nColumn].get();
+ if (!pList)
+ return;
+
+ std::set<Color> aColors;
+ OUString sSelectedCondition = maCondLbArr[nPos]->get_active_text();
+ if (sSelectedCondition == aStrTextColor)
+ aColors = pList->maFilterEntries.getTextColors();
+ else if (sSelectedCondition == aStrBackgroundColor)
+ aColors = pList->maFilterEntries.getBackgroundColors();
+ else
+ return;
+
+ sal_Int32 i = 1;
+ maColorLbArr[nPos]->clear();
+ for (const auto& rColor : aColors)
+ {
+ OUString sId = rColor.AsRGBHexString();
+ if (rColor == COL_AUTO)
+ {
+ OUString sText = sSelectedCondition == aStrTextColor
+ ? ScResId(SCSTR_FILTER_AUTOMATIC_COLOR)
+ : ScResId(SCSTR_FILTER_NO_FILL);
+ maColorLbArr[nPos]->append(sId, sText);
+ }
+ else
+ {
+ VirtualDevice* pDev = lcl_getColorImage(rColor);
+ maColorLbArr[nPos]->append(sId, OUString(), *pDev);
+ }
+
+ auto aItem = rEntry.GetQueryItem();
+ if (aItem.maColor == rColor
+ && ((sSelectedCondition == aStrTextColor && aItem.meType == ScQueryEntry::ByTextColor)
+ || (sSelectedCondition == aStrBackgroundColor
+ && aItem.meType == ScQueryEntry::ByBackgroundColor)))
+ {
+ maColorLbArr[nPos]->set_active_id(sId);
+ }
+
+ i++;
+ }
+}
+
size_t ScFilterDlg::GetFieldSelPos( SCCOL nField )
{
if ( nField >= theQueryData.nCol1 && nField <= theQueryData.nCol2 )
@@ -743,6 +863,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbField4->set_sensitive(true);
m_xLbCond4->set_sensitive(true);
m_xEdVal4->set_sensitive(true);
+ m_xLbColor4->set_sensitive(true);
const sal_Int32 nConnect4 = m_xLbConnect4->get_active();
size_t nQE = 3 + nOffset;
@@ -781,6 +902,9 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xEdVal2->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor2->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
SCSIZE nCount = theQueryData.GetEntryCount();
if (maRefreshExceptQuery.size() < nCount + 1)
maRefreshExceptQuery.resize(nCount + 1, false);
@@ -795,6 +919,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 1 );
+ UpdateColorList( 1 );
if ( !m_xLbConnect2->get_sensitive() )
{
m_xLbConnect2->set_sensitive(true);
@@ -826,6 +951,8 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbCond4->set_sensitive(false);
m_xEdVal3->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor3->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
sal_uInt16 nTemp=nOffset+1;
SCSIZE nCount = theQueryData.GetEntryCount();
@@ -842,6 +969,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 2 );
+ UpdateColorList( 2 );
if ( !m_xLbConnect3->get_sensitive() )
{
m_xLbConnect3->set_sensitive(true);
@@ -866,6 +994,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
m_xLbField4->set_sensitive(false);
m_xLbCond4->set_sensitive(false);
m_xEdVal4->set_sensitive(false);
+ m_xLbColor4->set_sensitive(false);
sal_uInt16 nTemp=nOffset+2;
SCSIZE nCount = theQueryData.GetEntryCount();
@@ -882,6 +1011,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 3 );
+ UpdateColorList( 3 );
if ( !m_xLbConnect4->get_sensitive() )
{
m_xLbConnect4->set_sensitive(true);
@@ -914,6 +1044,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
else
{
UpdateValueList( 4 );
+ UpdateColorList( 4 );
const sal_Int32 nField = rLb.get_active();
sal_uInt16 nQ=3+nOffset;
theQueryData.GetEntry(nQ).bDoQuery = true;
@@ -921,24 +1052,89 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, void)
}
}
- else if ( &rLb == m_xLbCond1.get())
- {
- theQueryData.GetEntry(nOffset).eOp=static_cast<ScQueryOp>(rLb.get_active());
- }
- else if ( &rLb == m_xLbCond2.get())
+ else if (&rLb == m_xLbCond1.get() || &rLb == m_xLbCond2.get() || &rLb == m_xLbCond3.get()
+ || &rLb == m_xLbCond4.get())
{
- sal_uInt16 nQ=1+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
+ ScQueryOp op;
+ sal_uInt16 nQ = 0;
+ bool bEnableColorLb = false;
+ if (rLb.get_active_text() == aStrTextColor || rLb.get_active_text() == aStrBackgroundColor)
+ {
+ bEnableColorLb = true;
+ op = SC_EQUAL;
+ }
+ else
+ {
+ op = static_cast<ScQueryOp>(rLb.get_active());
+ }
+
+ if (&rLb == m_xLbCond1.get())
+ {
+ nQ = nOffset;
+ m_xLbColor1->set_visible(bEnableColorLb);
+ m_xLbColor1->set_sensitive(bEnableColorLb);
+ m_xEdVal1->set_visible(!bEnableColorLb);
+ UpdateColorList(1);
+ }
+ else if (&rLb == m_xLbCond2.get())
+ {
+ nQ = 1 + nOffset;
+ m_xLbColor2->set_visible(bEnableColorLb);
+ m_xLbColor2->set_sensitive(bEnableColorLb);
+ m_xEdVal2->set_visible(!bEnableColorLb);
+ UpdateColorList(2);
+ }
+ else if (&rLb == m_xLbCond3.get())
+ {
+ nQ = 2 + nOffset;
+ m_xLbColor3->set_visible(bEnableColorLb);
+ m_xLbColor3->set_sensitive(bEnableColorLb);
+ m_xEdVal3->set_visible(!bEnableColorLb);
+ UpdateColorList(3);
+ }
+ else if (&rLb == m_xLbCond4.get())
+ {
+ nQ = 3 + nOffset;
+ m_xLbColor4->set_visible(bEnableColorLb);
+ m_xLbColor4->set_sensitive(bEnableColorLb);
+ m_xEdVal4->set_visible(!bEnableColorLb);
+ UpdateColorList(4);
+ }
+
+ auto aEntry = theQueryData.GetEntry(nQ);
+ aEntry.eOp = op;
}
- else if ( &rLb == m_xLbCond3.get())
+ else if (&rLb == m_xLbColor1.get() || &rLb == m_xLbColor2.get() || &rLb == m_xLbColor3.get()
+ || &rLb == m_xLbColor4.get())
{
- sal_uInt16 nQ=2+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
- }
- else
- {
- sal_uInt16 nQ=3+nOffset;
- theQueryData.GetEntry(nQ).eOp=static_cast<ScQueryOp>(rLb.get_active());
+ sal_uInt16 nQ = 0;
+ if (&rLb == m_xLbColor1.get())
+ {
+ nQ = nOffset;
+ }
+ else if (&rLb == m_xLbColor2.get())
+ {
+ nQ = 1 + nOffset;
+ }
+ else if (&rLb == m_xLbColor3.get())
+ {
+ nQ = 2 + nOffset;
+ }
+ else if (&rLb == m_xLbColor4.get())
+ {
+ nQ = 3 + nOffset;
+ }
+
+ ScQueryEntry& aEntry = theQueryData.GetEntry(nQ);
+ Color aColor = Color::STRtoRGB(maColorLbArr[nQ]->get_active_id());
+ if (maCondLbArr[nQ]->get_active_text() == aStrTextColor)
+ {
+ aEntry.SetQueryByTextColor(aColor);
+ }
+ else if (maCondLbArr[nQ]->get_active_text() == aStrBackgroundColor)
+ {
+ aEntry.SetQueryByBackgroundColor(aColor);
+ }
}
}
@@ -975,6 +1171,11 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, weld::Button&, rBox, void )
UpdateValueList( 2 );
UpdateValueList( 3 );
UpdateValueList( 4 );
+
+ UpdateColorList( 1 );
+ UpdateColorList( 2 );
+ UpdateColorList( 3 );
+ UpdateColorList( 4 );
}
}
@@ -1091,6 +1292,8 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
size_t nFieldSelPos = 0;
size_t nQE = i + nOffset;
+ maColorLbArr[i]->set_visible(false);
+
if (maRefreshExceptQuery.size() < nQE + 1)
maRefreshExceptQuery.resize(nQE + 1, false);
@@ -1113,6 +1316,15 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
aValStr = aStrNotEmpty;
maCondLbArr[i]->set_sensitive(false);
}
+ else if (rEntry.IsQueryByTextColor() || rEntry.IsQueryByBackgroundColor())
+ {
+ nCondPos = maCondLbArr[i]->find_text(
+ rEntry.IsQueryByTextColor() ? aStrTextColor : aStrBackgroundColor);
+
+ maValueEdArr[i]->set_visible(false);
+ maColorLbArr[i]->set_visible(true);
+ maColorLbArr[i]->set_sensitive(true);
+ }
else
{
aValStr = aQueryStr;
@@ -1180,6 +1392,7 @@ void ScFilterDlg::RefreshEditRow( size_t nOffset )
maCondLbArr [i]->set_active( nCondPos );
maValueEdArr[i]->set_entry_text( aValStr );
UpdateValueList(i+1);
+ UpdateColorList(i+1);
}
}
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2922d3ccc3b4..df8419ea723a 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -133,7 +133,7 @@ static void lcl_PaintAbove( ScDocShell& rDocShell, const ScRange& rRange )
}
}
-bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint )
+bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint, bool bApi )
{
ScDocument& rDoc = rDocShell.GetDocument();
if ( rDoc.IsImportingXML() )
@@ -154,7 +154,7 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint )
Fraction aOne(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice());
- bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab);
+ bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab, bApi);
// tdf#76183: recalculate objects' positions
if (bChanged)
rDoc.SetDrawPageSize(nTab);
@@ -623,7 +623,7 @@ bool ScDocFunc::DeleteContents(
std::move(pUndoDoc), nFlags, pDataSpans, bMulti, bDrawUndo);
}
- if (!AdjustRowHeight( aExtendedRange ))
+ if (!AdjustRowHeight( aExtendedRange, true, bApi ))
rDocShell.PostPaint( aExtendedRange, PaintPartFlags::Grid, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
lcl_PaintAbove( rDocShell, aExtendedRange ); // for lines above the range
@@ -690,7 +690,7 @@ bool ScDocFunc::DeleteCell(
nFlags, pDataSpans, false, bDrawUndo);
}
- if (!AdjustRowHeight(rPos))
+ if (!AdjustRowHeight(rPos, true, true))
rDocShell.PostPaint(
rPos.Col(), rPos.Row(), rPos.Tab(), rPos.Col(), rPos.Row(), rPos.Tab(),
PaintPartFlags::Grid, nExtFlags);
@@ -751,7 +751,7 @@ bool ScDocFunc::TransliterateText( const ScMarkData& rMark, TransliterationFlags
rDoc.TransliterateText( aMultiMark, nType );
- if (!AdjustRowHeight( aMarkRange ))
+ if (!AdjustRowHeight( aMarkRange, true, true ))
rDocShell.PostPaint( aMarkRange, PaintPartFlags::Grid );
aModificator.SetDocumentModified();
@@ -807,7 +807,7 @@ bool ScDocFunc::SetNormalString( bool& o_rbNumFmtSet, const ScAddress& rPos, con
}
if ( bEditDeleted || rDoc.HasAttrib( ScRange(rPos), HasAttrFlags::NeedHeight ) )
- AdjustRowHeight( ScRange(rPos) );
+ AdjustRowHeight( ScRange(rPos), true, bApi );
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -842,7 +842,7 @@ bool ScDocFunc::SetValueCell( const ScAddress& rPos, double fVal, bool bInteract
}
if (bHeight)
- AdjustRowHeight(rPos);
+ AdjustRowHeight(rPos, true, !bInteraction);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -913,7 +913,7 @@ bool ScDocFunc::SetStringCell( const ScAddress& rPos, const OUString& rStr, bool
}
if (bHeight)
- AdjustRowHeight(rPos);
+ AdjustRowHeight(rPos, true, !bInteraction);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -948,7 +948,7 @@ bool ScDocFunc::SetEditCell( const ScAddress& rPos, const EditTextObject& rStr,
}
if (bHeight)
- AdjustRowHeight(rPos);
+ AdjustRowHeight(rPos, true, !bInteraction);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -1012,7 +1012,7 @@ bool ScDocFunc::SetFormulaCell( const ScAddress& rPos, ScFormulaCell* pCell, boo
}
if (bHeight)
- AdjustRowHeight(rPos);
+ AdjustRowHeight(rPos, true, !bInteraction);
rDocShell.PostPaintCell( rPos );
aModificator.SetDocumentModified();
@@ -1441,7 +1441,7 @@ bool ScDocFunc::ApplyAttributes( const ScMarkData& rMark, const ScPatternAttr& r
if ( !bImportingXML )
rDocShell.UpdatePaintExt( nExtFlags, aMultiRange ); // content after the change
- if (!AdjustRowHeight( aMultiRange ))
+ if (!AdjustRowHeight( aMultiRange, true, bApi ))
rDocShell.PostPaint( aMultiRange, PaintPartFlags::Grid, nExtFlags );
else if (nExtFlags & SC_PF_LINES)
lcl_PaintAbove( rDocShell, aMultiRange ); // because of lines above the range
@@ -1514,7 +1514,7 @@ bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const OUString& rStyleName,
rDoc.ApplySelectionStyle( *pStyleSheet, rMark );
- if (!AdjustRowHeight( aMultiRange ))
+ if (!AdjustRowHeight( aMultiRange, true, bApi ))
rDocShell.PostPaint( aMultiRange, PaintPartFlags::Grid );
aModificator.SetDocumentModified();
@@ -2163,8 +2163,8 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
bool bAdjusted = ( eCmd == INS_INSROWS_BEFORE || eCmd == INS_INSROWS_AFTER ) ?
- AdjustRowHeight(ScRange(0, nStartRow, i, rDoc.MaxCol(), nEndRow, i+nScenarioCount )) :
- AdjustRowHeight(ScRange(0, nPaintStartRow, i, rDoc.MaxCol(), nPaintEndRow, i+nScenarioCount ));
+ AdjustRowHeight(ScRange(0, nStartRow, i, rDoc.MaxCol(), nEndRow, i+nScenarioCount ), true, bApi) :
+ AdjustRowHeight(ScRange(0, nPaintStartRow, i, rDoc.MaxCol(), nPaintEndRow, i+nScenarioCount ), true, bApi);
if (bAdjusted)
{
// paint only what is not done by AdjustRowHeight
@@ -2775,7 +2775,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
nScenarioCount ++;
// delete entire rows: do not adjust
- if ( eCmd == DelCellCmd::Rows || !AdjustRowHeight(ScRange( 0, nPaintStartRow, rTab, rDoc.MaxCol(), nPaintEndRow, rTab+nScenarioCount )) )
+ if ( eCmd == DelCellCmd::Rows || !AdjustRowHeight(ScRange( 0, nPaintStartRow, rTab, rDoc.MaxCol(), nPaintEndRow, rTab+nScenarioCount ), true, bApi) )
rDocShell.PostPaint( nPaintStartCol, nPaintStartRow, rTab, nPaintEndCol, nPaintEndRow, rTab+nScenarioCount, nPaintFlags, nExtFlags );
else
{
@@ -3001,7 +3001,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
return false;
}
- bSourceHeight = AdjustRowHeight( rSource, false );
+ bSourceHeight = AdjustRowHeight( rSource, false, bApi );
}
ScRange aPasteDest( nDestCol, nDestRow, nDestTab, nDestEndCol, nDestEndRow, nDestEndTab );
@@ -3026,7 +3026,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos,
bool bDestHeight = AdjustRowHeight(
ScRange( 0,nDestRow,nDestTab, rDoc.MaxCol(),nDestEndRow,nDestEndTab ),
- false );
+ false, bApi );
/* Paste drawing objects after adjusting formula references
and row heights. There are no cell notes or drawing objects, if the
@@ -3692,7 +3692,7 @@ bool ScDocFunc::SetWidthOrHeight(
Fraction aOne(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aOne, aOne, aProv.GetDevice());
aCxt.setForceAutoSize(bAll);
- rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab);
+ rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab, bApi);
if (bAll)
rDoc.ShowRows( nStartNo, nEndNo, nTab, true );
@@ -4264,7 +4264,7 @@ bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMark,
break;
bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, rTab,
- nEndCol, nEndRow, rTab), false );
+ nEndCol, nEndRow, rTab), false, bApi );
if (bAdj)
rDocShell.PostPaint( 0,nStartRow,rTab, rDoc.MaxCol(),rDoc.MaxRow(),rTab,
PaintPartFlags::Grid | PaintPartFlags::Left );
@@ -4610,7 +4610,7 @@ bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMark,
rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
aMark, nCount, eDir, FILL_SIMPLE );
- AdjustRowHeight(aRange);
+ AdjustRowHeight(aRange, true, bApi);
if ( bRecord ) // only now is Draw-Undo available
{
@@ -4741,7 +4741,7 @@ bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMark,
rDoc.Fill( aSourceArea.aStart.Col(), aSourceArea.aStart.Row(),
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
aMark, nCount, eDir, eCmd, eDateCmd, fStep, fMax );
- AdjustRowHeight(rRange);
+ AdjustRowHeight(rRange, true, bApi);
rDocShell.PostPaintGridAll();
aModificator.SetDocumentModified();
@@ -4888,7 +4888,7 @@ bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillDir e
aSourceArea.aEnd.Col(), aSourceArea.aEnd.Row(), &aProgress,
aMark, nCount, eDir, eCmd, eDateCmd, fStep, fMax );
- AdjustRowHeight(aDestArea);
+ AdjustRowHeight(aDestArea, true, bApi);
if ( bRecord ) // only now is Draw-Undo available
{
@@ -4989,7 +4989,7 @@ bool ScDocFunc::MergeCells( const ScCellMergeOption& rOption, bool bContents, bo
rDoc.ApplyAttr( nStartCol, nStartRow, nTab, SvxVerJustifyItem( SvxCellVerJustify::Center, ATTR_VER_JUSTIFY ) );
}
- if ( !AdjustRowHeight( ScRange( 0,nStartRow,nTab, rDoc.MaxCol(),nEndRow,nTab ) ) )
+ if ( !AdjustRowHeight( ScRange( 0,nStartRow,nTab, rDoc.MaxCol(),nEndRow,nTab ), true, bApi ) )
rDocShell.PostPaint( nStartCol, nStartRow, nTab,
nEndCol, nEndRow, nTab, PaintPartFlags::Grid );
if (bNeedContents || rOption.mbCenter)
@@ -5081,7 +5081,7 @@ bool ScDocFunc::UnmergeCells( const ScCellMergeOption& rOption, bool bRecord, Sc
rDoc.ExtendMerge( aRefresh, true );
- if ( !AdjustRowHeight( aExtended ) )
+ if ( !AdjustRowHeight( aExtended, true, true ) )
rDocShell.PostPaint( aExtended, PaintPartFlags::Grid );
}
@@ -5427,7 +5427,7 @@ bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, bool bApi )
std::move(pUndoDoc), std::move(pRedoDoc) ) );
}
- if (!AdjustRowHeight(ScRange(0,nStartRow,nTab,rDoc.MaxCol(),nEndRow,nTab)))
+ if (!AdjustRowHeight(ScRange(0,nStartRow,nTab,rDoc.MaxCol(),nEndRow,nTab), true, true))
rDocShell.PostPaint( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab, PaintPartFlags::Grid );
aModificator.SetDocumentModified();
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/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index ea851d9b9d1b..374922b968f8 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -408,7 +408,7 @@ bool ScDocShell::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab )
ScSizeDeviceProvider aProv(this);
Fraction aZoom(1,1);
sc::RowHeightContext aCxt(aProv.GetPPTX(), aProv.GetPPTY(), aZoom, aZoom, aProv.GetDevice());
- bool bChange = m_aDocument.SetOptimalHeight(aCxt, nStartRow,nEndRow, nTab);
+ bool bChange = m_aDocument.SetOptimalHeight(aCxt, nStartRow,nEndRow, nTab, true);
if (bChange)
{
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/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx
index 2ff574a15252..c62c549f6cc5 100644
--- a/sc/source/ui/inc/checklistmenu.hxx
+++ b/sc/source/ui/inc/checklistmenu.hxx
@@ -79,6 +79,12 @@ public:
void getMenuItemPosSize(size_t nPos, Point& rPos, Size& rSize) const;
ScMenuFloatingWindow* getParentMenuWindow() const { return mpParentMenu;}
+ /**
+ * Dismiss all visible popup menus and set focus back to the application
+ * window. This method is called e.g. when a menu action is fired.
+ */
+ virtual void terminateAllPopupMenus();
+
protected:
virtual void handlePopupEnd();
@@ -139,12 +145,6 @@ private:
*/
void ensureSubMenuNotVisible();
- /**
- * Dismiss all visible popup menus and set focus back to the application
- * window. This method is called e.g. when a menu action is fired.
- */
- void terminateAllPopupMenus();
-
private:
struct MenuItemData
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index ca0f03e0318c..af8e23fc3124 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -59,7 +59,7 @@ class ScDocFunc
protected:
ScDocShell& rDocShell;
- bool AdjustRowHeight( const ScRange& rRange, bool bPaint = true );
+ bool AdjustRowHeight( const ScRange& rRange, bool bPaint, bool bApi );
void CreateOneName( ScRangeName& rList,
SCCOL nPosX, SCROW nPosY, SCTAB nTab,
SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2,
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index de306709a2b6..822556f14923 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -25,6 +25,8 @@
#include <queryparam.hxx>
#include <filterentries.hxx>
+#include <svx/colorbox.hxx>
+
#include <memory>
#include <deque>
#include <vector>
@@ -70,6 +72,8 @@ private:
const OUString aStrEmpty;
const OUString aStrNotEmpty;
const OUString aStrColumn;
+ const OUString aStrTextColor;
+ const OUString aStrBackgroundColor;
std::unique_ptr<ScFilterOptionsMgr> pOptionsMgr;
@@ -84,6 +88,7 @@ private:
std::vector<weld::ComboBox*> maFieldLbArr;
std::vector<weld::ComboBox*> maCondLbArr;
std::vector<weld::ComboBox*> maConnLbArr;
+ std::vector<weld::ComboBox*> maColorLbArr;
std::deque<bool> maHasDates;
std::deque<bool> maRefreshExceptQuery;
@@ -98,21 +103,24 @@ private:
std::unique_ptr<weld::ComboBox> m_xLbField1;
std::unique_ptr<weld::ComboBox> m_xLbCond1;
std::unique_ptr<weld::ComboBox> m_xEdVal1;
-
+ std::unique_ptr<weld::ComboBox> m_xLbColor1;
std::unique_ptr<weld::ComboBox> m_xLbConnect2;
std::unique_ptr<weld::ComboBox> m_xLbField2;
std::unique_ptr<weld::ComboBox> m_xLbCond2;
std::unique_ptr<weld::ComboBox> m_xEdVal2;
+ std::unique_ptr<weld::ComboBox> m_xLbColor2;
std::unique_ptr<weld::ComboBox> m_xLbConnect3;
std::unique_ptr<weld::ComboBox> m_xLbField3;
std::unique_ptr<weld::ComboBox> m_xLbCond3;
std::unique_ptr<weld::ComboBox> m_xEdVal3;
+ std::unique_ptr<weld::ComboBox> m_xLbColor3;
std::unique_ptr<weld::ComboBox> m_xLbConnect4;
std::unique_ptr<weld::ComboBox> m_xLbField4;
std::unique_ptr<weld::ComboBox> m_xLbCond4;
std::unique_ptr<weld::ComboBox> m_xEdVal4;
+ std::unique_ptr<weld::ComboBox> m_xLbColor4;
std::unique_ptr<weld::Widget> m_xContents;
std::unique_ptr<weld::ScrolledWindow> m_xScrollBar;
@@ -139,6 +147,7 @@ private:
void UpdateValueList ( size_t nList );
void UpdateHdrInValueList( size_t nList );
void ClearValueList ( size_t nList );
+ void UpdateColorList ( size_t nList );
size_t GetFieldSelPos ( SCCOL nField );
ScQueryItem* GetOutputItem ();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index bd4ca07159c5..e9363a1f96d2 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -190,6 +190,8 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
RfCorner aRFSelectedCorned;
+ Timer maShowPageBreaksTimer;
+
bool bEEMouse:1; // Edit Engine has mouse
bool bDPMouse:1; // DataPilot D&D (new Pivot table)
bool bRFMouse:1; // RangeFinder drag
@@ -200,6 +202,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
bool bNeedsRepaint:1;
bool bAutoMarkVisible:1;
bool bListValButton:1;
+ bool bInitialPageBreaks:1;
DECL_LINK( PopupModeEndHdl, FloatingWindow*, void );
DECL_LINK( PopupSpellingHdl, SpellCallbackInfo&, void );
@@ -288,6 +291,8 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public vcl::Window, public DropTargetHel
void GetSelectionRects( ::std::vector< tools::Rectangle >& rPixelRects );
+ void SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab);
+ DECL_LINK(InitiatePageBreaksTimer, Timer*, void);
protected:
virtual void PrePaint(vcl::RenderContext& rRenderContext) override;
@@ -302,7 +307,18 @@ protected:
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel ) override;
public:
- enum class AutoFilterMode { Normal, Top10, Custom, Empty, NonEmpty, SortAscending, SortDescending };
+ enum class AutoFilterMode
+ {
+ Normal,
+ Top10,
+ Custom,
+ Empty,
+ NonEmpty,
+ TextColor,
+ BackgroundColor,
+ SortAscending,
+ SortDescending,
+ };
ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos eWhichPos );
virtual ~ScGridWindow() override;
@@ -451,6 +467,8 @@ public:
void updateLOKValListButton(bool bVisible, const ScAddress& rPos) const;
+ void initiatePageBreaks();
+
protected:
void ImpCreateOverlayObjects();
void ImpDestroyOverlayObjects();
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index fd1e05fa1a67..3c396a29b763 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -214,7 +214,7 @@ public:
void SetMarkedWidthOrHeight( bool bWidth, ScSizeMode eMode, sal_uInt16 nSizeTwips );
bool AdjustBlockHeight( bool bPaint = true, ScMarkData* pMarkData = nullptr );
- bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow );
+ bool AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bApi );
void ModifyCellSize( ScDirection eDir, bool bOptimal );
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index d46275768db6..3069d5cf5e32 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -366,23 +366,23 @@ void CellAppearancePropertyPanel::SetStyleIcon()
const sal_uInt16 nIdBorderLineStyle = mpTBLineStyle->GetItemId( UNO_LINESTYLE );
//FIXME: update for new line border possibilities
- if(mnOutWidth == DEF_LINE_WIDTH_0 && mnInWidth == 0 && mnDistance == 0) //1
+ if(mnOutWidth == SvxBorderLineWidth::Hairline && mnInWidth == 0 && mnDistance == 0) //1
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle1);
- else if(mnOutWidth == DEF_LINE_WIDTH_2 && mnInWidth == 0 && mnDistance == 0) //2
+ else if(mnOutWidth == SvxBorderLineWidth::Medium && mnInWidth == 0 && mnDistance == 0) //2
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle2);
- else if(mnOutWidth == DEF_LINE_WIDTH_3 && mnInWidth == 0 && mnDistance == 0) //3
+ else if(mnOutWidth == SvxBorderLineWidth::Thick && mnInWidth == 0 && mnDistance == 0) //3
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle3);
- else if(mnOutWidth == DEF_LINE_WIDTH_4 && mnInWidth == 0 && mnDistance == 0) //4
+ else if(mnOutWidth == SvxBorderLineWidth::ExtraThick && mnInWidth == 0 && mnDistance == 0) //4
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle4);
- else if(mnOutWidth == DEF_LINE_WIDTH_0 && mnInWidth == DEF_LINE_WIDTH_0 && mnDistance == DEF_LINE_WIDTH_1) //5
+ else if(mnOutWidth == SvxBorderLineWidth::Hairline && mnInWidth == SvxBorderLineWidth::Hairline && mnDistance == SvxBorderLineWidth::Thin) //5
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle5);
- else if(mnOutWidth == DEF_LINE_WIDTH_0 && mnInWidth == DEF_LINE_WIDTH_0 && mnDistance == DEF_LINE_WIDTH_2) //6
+ else if(mnOutWidth == SvxBorderLineWidth::Hairline && mnInWidth == SvxBorderLineWidth::Hairline && mnDistance == SvxBorderLineWidth::Medium) //6
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle6);
- else if(mnOutWidth == DEF_LINE_WIDTH_1 && mnInWidth == DEF_LINE_WIDTH_2 && mnDistance == DEF_LINE_WIDTH_1) //7
+ else if(mnOutWidth == SvxBorderLineWidth::Thin && mnInWidth == SvxBorderLineWidth::Medium && mnDistance == SvxBorderLineWidth::Thin) //7
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle7);
- else if(mnOutWidth == DEF_LINE_WIDTH_2 && mnInWidth == DEF_LINE_WIDTH_0 && mnDistance == DEF_LINE_WIDTH_2) //8
+ else if(mnOutWidth == SvxBorderLineWidth::Medium && mnInWidth == SvxBorderLineWidth::Hairline && mnDistance == SvxBorderLineWidth::Medium) //8
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle8);
- else if(mnOutWidth == DEF_LINE_WIDTH_2 && mnInWidth == DEF_LINE_WIDTH_2 && mnDistance == DEF_LINE_WIDTH_2) //9
+ else if(mnOutWidth == SvxBorderLineWidth::Medium && mnInWidth == SvxBorderLineWidth::Medium && mnDistance == SvxBorderLineWidth::Medium) //9
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle9);
else
mpTBLineStyle->SetItemImage(nIdBorderLineStyle, maIMGLineStyle1);
diff --git a/sc/source/ui/sidebar/CellBorderStyleControl.cxx b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
index 48bc135173a0..cd0de2b126fa 100644
--- a/sc/source/ui/sidebar/CellBorderStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellBorderStyleControl.cxx
@@ -78,7 +78,7 @@ IMPL_LINK(CellBorderStylePopup, TB1SelectHdl, ToolBox*, pToolBox, void)
sal_uInt16 nId = pToolBox->GetCurItemId();
SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
- editeng::SvxBorderLine theDefLine(nullptr, 1);
+ editeng::SvxBorderLine theDefLine(nullptr, SvxBorderLineWidth::Thin);
editeng::SvxBorderLine *pLeft = nullptr, *pRight = nullptr, *pTop = nullptr, *pBottom = nullptr;
sal_uInt8 nValidFlags = 0;
@@ -108,7 +108,7 @@ IMPL_LINK(CellBorderStylePopup, TB1SelectHdl, ToolBox*, pToolBox, void)
}
else if (nId == maTBBorder1->GetItemId("thickbox"))
{
- theDefLine.SetWidth(DEF_LINE_WIDTH_2);
+ theDefLine.SetWidth(SvxBorderLineWidth::Thick);
pLeft = pRight = pTop = pBottom = &theDefLine;
nValidFlags |= FRM_VALID_OUTER;
}
@@ -138,7 +138,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void)
if (nId == pToolBox->GetItemId("diagup"))
{
- editeng::SvxBorderLine aTmp( nullptr, 1 );
+ editeng::SvxBorderLine aTmp( nullptr, SvxBorderLineWidth::Thin );
SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_BLTR );
aLineItem.SetLine( &aTmp );
mpDispatcher->ExecuteList(
@@ -146,7 +146,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void)
}
else if (nId == pToolBox->GetItemId("diagdown"))
{
- editeng::SvxBorderLine aTmp( nullptr, 1 );
+ editeng::SvxBorderLine aTmp( nullptr, SvxBorderLineWidth::Thin );
SvxLineItem aLineItem( SID_ATTR_BORDER_DIAG_TLBR );
aLineItem.SetLine( &aTmp );
mpDispatcher->ExecuteList(
@@ -156,7 +156,7 @@ IMPL_LINK(CellBorderStylePopup, TB2SelectHdl, ToolBox *, pToolBox, void)
{
SvxBoxItem aBorderOuter( SID_ATTR_BORDER_OUTER );
SvxBoxInfoItem aBorderInner( SID_ATTR_BORDER_INNER );
- editeng::SvxBorderLine theDefLine(nullptr, 1);
+ editeng::SvxBorderLine theDefLine(nullptr, SvxBorderLineWidth::Thin);
editeng::SvxBorderLine *pLeft = nullptr,
*pRight = nullptr,
*pTop = nullptr,
@@ -236,26 +236,28 @@ IMPL_LINK(CellBorderStylePopup, TB3SelectHdl, ToolBox *, pToolBox, void)
if (nId == maTBBorder3->GetItemId("thickbottom"))
{
- pBottom.reset(new editeng::SvxBorderLine(nullptr, DEF_LINE_WIDTH_2 ));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thick));
nValidFlags |= FRM_VALID_BOTTOM;
}
else if (nId == maTBBorder3->GetItemId("doublebottom"))
{
pBottom.reset(new editeng::SvxBorderLine(nullptr));
- pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
+ pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, SvxBorderLineWidth::Hairline,
+ SvxBorderLineWidth::Hairline, SvxBorderLineWidth::Thin);
nValidFlags |= FRM_VALID_BOTTOM;
}
else if (nId == maTBBorder3->GetItemId("topthickbottom"))
{
- pBottom.reset(new editeng::SvxBorderLine(nullptr, DEF_LINE_WIDTH_2 ));
- pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
+ pBottom.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thick));
+ pTop.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thin));
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
}
else if (nId == maTBBorder3->GetItemId("topdoublebottom"))
{
pBottom.reset(new editeng::SvxBorderLine(nullptr));
- pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_0, DEF_LINE_WIDTH_1);
- pTop.reset(new editeng::SvxBorderLine(nullptr, 1));
+ pBottom->GuessLinesWidths(SvxBorderLineStyle::DOUBLE, SvxBorderLineWidth::Hairline,
+ SvxBorderLineWidth::Hairline, SvxBorderLineWidth::Thin);
+ pTop.reset(new editeng::SvxBorderLine(nullptr, SvxBorderLineWidth::Thin));
nValidFlags |= FRM_VALID_BOTTOM|FRM_VALID_TOP;
}
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 8c9092f33fb4..3caca9521b84 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -19,6 +19,7 @@
#include "CellLineStyleControl.hxx"
#include "CellLineStyleValueSet.hxx"
+#include <vcl/svapp.hxx>
#include <vcl/i18nhelp.hxx>
#include <vcl/settings.hxx>
#include <editeng/borderline.hxx>
@@ -27,6 +28,8 @@
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/svxids.hrc>
+#include <scresid.hxx>
+#include <strings.hrc>
namespace sc { namespace sidebar {
@@ -60,20 +63,25 @@ void CellLineStylePopup::Initialize()
maCellLineStyleValueSet->SetControlBackground(GetSettings().GetStyleSettings().GetMenuColor());
maCellLineStyleValueSet->SetColor(GetSettings().GetStyleSettings().GetMenuColor());
- for(sal_uInt16 i = 1 ; i <= 9 ; i++)
+ for(sal_uInt16 i = 1 ; i <= CELL_LINE_STYLE_ENTRIES ; i++)
{
maCellLineStyleValueSet->InsertItem(i);
}
- maStr[0] = GetSettings().GetLocaleI18nHelper().GetNum( 5, 2 ) + "pt";
- maStr[1] = GetSettings().GetLocaleI18nHelper().GetNum( 250, 2 ) + "pt";
- maStr[2] = GetSettings().GetLocaleI18nHelper().GetNum( 400, 2 ) + "pt";
- maStr[3] = GetSettings().GetLocaleI18nHelper().GetNum( 500, 2 ) + "pt";
- maStr[4] = GetSettings().GetLocaleI18nHelper().GetNum( 110, 2 ) + "pt";
- maStr[5] = GetSettings().GetLocaleI18nHelper().GetNum( 260, 2 ) + "pt";
- maStr[6] = GetSettings().GetLocaleI18nHelper().GetNum( 450, 2 ) + "pt";
- maStr[7] = GetSettings().GetLocaleI18nHelper().GetNum( 505, 2 ) + "pt";
- maStr[8] = GetSettings().GetLocaleI18nHelper().GetNum( 750, 2 ) + "pt";
+ const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetLocaleI18nHelper();
+ maStr[0] = ScResId(STR_BORDER_HAIRLINE).replaceFirst("%s", rI18nHelper.GetNum(5, 2));
+ maStr[1] = ScResId(STR_BORDER_VERY_THIN).replaceFirst("%s", rI18nHelper.GetNum(50, 2));
+ maStr[2] = ScResId(STR_BORDER_THIN).replaceFirst("%s", rI18nHelper.GetNum(75, 2));
+ maStr[3] = ScResId(STR_BORDER_MEDIUM).replaceFirst("%s", rI18nHelper.GetNum(150, 2));
+ maStr[4] = ScResId(STR_BORDER_THICK).replaceFirst("%s", rI18nHelper.GetNum(225, 2));
+ maStr[5] = ScResId(STR_BORDER_EXTRA_THICK).replaceFirst("%s", rI18nHelper.GetNum(450, 2));
+
+ // Numbers in pt are the total width of the double line (inner + outer + distance)
+ maStr[6] = ScResId(STR_BORDER_DOUBLE_1).replaceFirst("%s", rI18nHelper.GetNum(110, 2));
+ maStr[7] = ScResId(STR_BORDER_DOUBLE_1).replaceFirst("%s", rI18nHelper.GetNum(235, 2));
+ maStr[8] = ScResId(STR_BORDER_DOUBLE_2).replaceFirst("%s", rI18nHelper.GetNum(300, 2));
+ maStr[9] = ScResId(STR_BORDER_DOUBLE_3).replaceFirst("%s", rI18nHelper.GetNum(305, 2));
+ maStr[10] = ScResId(STR_BORDER_DOUBLE_4).replaceFirst("%s", rI18nHelper.GetNum(450, 2));
maCellLineStyleValueSet->SetUnit(&maStr[0]);
for (sal_uInt16 i = 1; i <= CELL_LINE_STYLE_ENTRIES; ++i)
@@ -113,45 +121,51 @@ IMPL_LINK(CellLineStylePopup, VSSelectHdl, ValueSet*, pControl, void)
switch(iPos)
{
case 1:
- n1 = DEF_LINE_WIDTH_0;
+ n1 = SvxBorderLineWidth::Hairline;
break;
case 2:
- n1 = DEF_LINE_WIDTH_2;
+ n1 = SvxBorderLineWidth::VeryThin;
break;
case 3:
- n1 = DEF_LINE_WIDTH_3;
+ n1 = SvxBorderLineWidth::Thin;
break;
case 4:
- n1 = DEF_LINE_WIDTH_4;
+ n1 = SvxBorderLineWidth::Medium;
break;
case 5:
- n1 = DEF_LINE_WIDTH_0;
- n2 = DEF_LINE_WIDTH_0;
- n3 = DEF_LINE_WIDTH_1;
- nStyle = SvxBorderLineStyle::DOUBLE;
+ n1 = SvxBorderLineWidth::Thick;
break;
case 6:
- n1 = DEF_LINE_WIDTH_0;
- n2 = DEF_LINE_WIDTH_0;
- n3 = DEF_LINE_WIDTH_2;
- nStyle = SvxBorderLineStyle::DOUBLE;
+ n1 = SvxBorderLineWidth::ExtraThick;
break;
case 7:
- n1 = DEF_LINE_WIDTH_1;
- n2 = DEF_LINE_WIDTH_2;
- n3 = DEF_LINE_WIDTH_1;
+ n1 = SvxBorderLineWidth::Hairline;
+ n2 = SvxBorderLineWidth::Hairline;
+ n3 = SvxBorderLineWidth::Medium;
nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 8:
- n1 = DEF_LINE_WIDTH_2;
- n2 = DEF_LINE_WIDTH_0;
- n3 = DEF_LINE_WIDTH_2;
+ n1 = SvxBorderLineWidth::Hairline;
+ n2 = SvxBorderLineWidth::Hairline;
+ n3 = SvxBorderLineWidth::Thick;
nStyle = SvxBorderLineStyle::DOUBLE;
break;
case 9:
- n1 = DEF_LINE_WIDTH_2;
- n2 = DEF_LINE_WIDTH_2;
- n3 = DEF_LINE_WIDTH_2;
+ n1 = SvxBorderLineWidth::Thin;
+ n2 = SvxBorderLineWidth::Medium;
+ n3 = SvxBorderLineWidth::Thin;
+ nStyle = SvxBorderLineStyle::DOUBLE;
+ break;
+ case 10:
+ n1 = SvxBorderLineWidth::Medium;
+ n2 = SvxBorderLineWidth::Hairline;
+ n3 = SvxBorderLineWidth::Medium;
+ nStyle = SvxBorderLineStyle::DOUBLE;
+ break;
+ case 11:
+ n1 = SvxBorderLineWidth::Medium;
+ n2 = SvxBorderLineWidth::Medium;
+ n3 = SvxBorderLineWidth::Medium;
nStyle = SvxBorderLineStyle::DOUBLE;
break;
default:
@@ -184,42 +198,51 @@ void CellLineStylePopup::SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_u
//FIXME: fully for new border line possibilities
- if(out == DEF_LINE_WIDTH_0 && in == 0 && dis == 0) //1
+ if(out == SvxBorderLineWidth::Hairline && in == 0 && dis == 0) //1
{
maCellLineStyleValueSet->SetSelItem(1);
}
- else if(out == DEF_LINE_WIDTH_2 && in == 0 && dis == 0) //2
+ else if(out == SvxBorderLineWidth::VeryThin && in == 0 && dis == 0) //2
{
maCellLineStyleValueSet->SetSelItem(2);
}
- else if(out == DEF_LINE_WIDTH_3 && in == 0 && dis == 0) //3
+ else if(out == SvxBorderLineWidth::Thin && in == 0 && dis == 0) //3
{
maCellLineStyleValueSet->SetSelItem(3);
}
- else if(out == DEF_LINE_WIDTH_4 && in == 0 && dis == 0) //4
+ else if(out == SvxBorderLineWidth::Medium && in == 0 && dis == 0) //4
{
maCellLineStyleValueSet->SetSelItem(4);
}
- else if(out == DEF_LINE_WIDTH_0 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_1) //5
+ else if(out == SvxBorderLineWidth::Thick && in == 0 && dis == 0) //5
{
maCellLineStyleValueSet->SetSelItem(5);
}
- else if(out == DEF_LINE_WIDTH_0 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_2) //6
+ else if(out == SvxBorderLineWidth::ExtraThick && in == 0 && dis == 0) //6
{
maCellLineStyleValueSet->SetSelItem(6);
}
- else if(out == DEF_LINE_WIDTH_1 && in == DEF_LINE_WIDTH_2 && dis == DEF_LINE_WIDTH_1) //7
+ else if(out == SvxBorderLineWidth::Hairline && in == SvxBorderLineWidth::Hairline && dis == SvxBorderLineWidth::Thin) //7
{
maCellLineStyleValueSet->SetSelItem(7);
}
- else if(out == DEF_LINE_WIDTH_2 && in == DEF_LINE_WIDTH_0 && dis == DEF_LINE_WIDTH_2) //8
+ else if(out == SvxBorderLineWidth::Hairline && in == SvxBorderLineWidth::Hairline && dis == SvxBorderLineWidth::Medium) //8
{
maCellLineStyleValueSet->SetSelItem(8);
}
- else if(out == DEF_LINE_WIDTH_2 && in == DEF_LINE_WIDTH_2 && dis == DEF_LINE_WIDTH_2) //9
+ else if(out == SvxBorderLineWidth::Thin && in == SvxBorderLineWidth::Medium && dis == SvxBorderLineWidth::Thin) //9
{
maCellLineStyleValueSet->SetSelItem(9);
}
+ else if(out == SvxBorderLineWidth::Medium && in == SvxBorderLineWidth::Hairline && dis == SvxBorderLineWidth::Medium) //10
+ {
+ maCellLineStyleValueSet->SetSelItem(10);
+ }
+ else if(out == SvxBorderLineWidth::Medium && in == SvxBorderLineWidth::Medium && dis == SvxBorderLineWidth::Medium) //11
+ {
+ maCellLineStyleValueSet->SetSelItem(11);
+ }
+
else
{
maCellLineStyleValueSet->SetSelItem(0);
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
index 5bd9e11c5fae..0e492558a01d 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.cxx
@@ -26,10 +26,11 @@ namespace sc { namespace sidebar {
CellLineStyleValueSet::CellLineStyleValueSet(vcl::Window* pParent)
: ValueSet(pParent, WB_TABSTOP)
+ , mnMaxTextWidth(0)
, nSelItem(0)
{
SetColCount();
- SetLineCount( 9);
+ SetLineCount(CELL_LINE_STYLE_ENTRIES);
}
CellLineStyleValueSet::~CellLineStyleValueSet()
@@ -39,7 +40,7 @@ CellLineStyleValueSet::~CellLineStyleValueSet()
Size CellLineStyleValueSet::GetOptimalSize() const
{
- return LogicToPixel(Size(80, 12 * 9), MapMode(MapUnit::MapAppFont));
+ return LogicToPixel(Size(120, 12 * CELL_LINE_STYLE_ENTRIES), MapMode(MapUnit::MapAppFont));
}
void CellLineStyleValueSet::SetUnit(const OUString* str)
@@ -65,6 +66,18 @@ void CellLineStyleValueSet::SetSelItem(sal_uInt16 nSel)
}
}
+long CellLineStyleValueSet::GetMaxTextWidth(vcl::RenderContext* pDev)
+{
+ if (mnMaxTextWidth > 0)
+ return mnMaxTextWidth;
+
+ for (int i = 0; i < CELL_LINE_STYLE_ENTRIES; ++i)
+ {
+ mnMaxTextWidth = std::max(pDev->GetTextWidth(maStrUnit[i]), mnMaxTextWidth);
+ }
+ return mnMaxTextWidth;
+}
+
void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
{
tools::Rectangle aRect = rUDEvt.GetRect();
@@ -105,7 +118,7 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aFont.SetColor(GetSettings().GetStyleSettings().GetFieldTextColor()); //high contrast
pDev->SetFont(aFont);
- long nTextWidth = pDev->GetTextWidth(maStrUnit[nItemId - 1]);
+ long nTextWidth = GetMaxTextWidth(pDev);
long nTLX = aBLPos.X() + 5, nTLY = aBLPos.Y() + ( nRectHeight - nItemId )/2;
long nTRX = aBLPos.X() + nRectWidth - nTextWidth - 15, nTRY = aBLPos.Y() + ( nRectHeight - nItemId )/2;
Point aStart(aBLPos.X() + nRectWidth - nTextWidth - 5 , aBLPos.Y() + nRectHeight/6);
@@ -129,25 +142,27 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
case 2:
case 3:
case 4:
+ case 5:
+ case 6:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + nItemId * 2 - 1 ));
break;
- case 5:
+ case 7:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 ));
pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 4 ));
break;
- case 6:
+ case 8:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 ));
pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 ));
break;
- case 7:
+ case 9:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 1 ));
pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 3 , nTRX, nTRY + 6 ));
break;
- case 8:
+ case 10:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 ));
pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 6 ));
break;
- case 9:
+ case 11:
pDev->DrawRect(tools::Rectangle(nTLX, nTLY , nTRX, nTRY + 3 ));
pDev->DrawRect(tools::Rectangle(nTLX, nTLY + 5 , nTRX, nTRY + 8 ));
break;
diff --git a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
index 2e45622d8812..78a4332fa1a3 100644
--- a/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleValueSet.hxx
@@ -21,13 +21,14 @@
#include <svtools/valueset.hxx>
-#define CELL_LINE_STYLE_ENTRIES 9
+#define CELL_LINE_STYLE_ENTRIES 11
namespace sc { namespace sidebar {
class CellLineStyleValueSet : public ValueSet
{
private:
+ long mnMaxTextWidth;
sal_uInt16 nSelItem;
OUString maStrUnit[CELL_LINE_STYLE_ENTRIES];
public:
@@ -36,6 +37,7 @@ public:
void SetUnit(const OUString* str);
void SetSelItem(sal_uInt16 nSel);
+ long GetMaxTextWidth(vcl::RenderContext* pDev);
virtual Size GetOptimalSize() const override;
virtual void UserDraw( const UserDrawEvent& rUDEvt ) override;
};
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 7181b10d01ee..001aa69acc20 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -305,7 +305,7 @@ bool ScBlockUndo::AdjustHeight()
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, pVirtDev);
bool bRet = rDoc.SetOptimalHeight(
- aCxt, aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(), aBlockRange.aStart.Tab());
+ aCxt, aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(), aBlockRange.aStart.Tab(), true);
if (bRet)
{
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 7c07be1f45be..3f4724147981 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -1247,7 +1247,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const
rViewData.GetPPTX(), rViewData.GetPPTY(), rViewData.GetZoomX(), rViewData.GetZoomY(),
pVirtDev);
- if (rDoc.SetOptimalHeight(aCxt, aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab()))
+ if (rDoc.SetOptimalHeight(aCxt, aRange.aStart.Row(), aRange.aEnd.Row(), aRange.aStart.Tab(), true))
{
// tdf#76183: recalculate objects' positions
rDoc.SetDrawPageSize(aRange.aStart.Tab());
@@ -2249,7 +2249,7 @@ void ScUndoRemoveMerge::Undo()
if ( pViewShell )
{
pViewShell->SetTabNo(rTab);
- bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow);
+ bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow, true);
}
if (!bDidPaint)
ScUndoUtil::PaintMore(pDocShell, aRange);
@@ -2295,7 +2295,7 @@ void ScUndoRemoveMerge::Redo()
if ( pViewShell )
{
pViewShell->SetTabNo(nTab);
- bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow);
+ bDidPaint = pViewShell->AdjustRowHeight(rOption.mnStartRow, rOption.mnEndRow, true);
}
if (!bDidPaint)
ScUndoUtil::PaintMore(pDocShell, aRange);
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index 1459e4dd482d..999a75f87841 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -161,7 +161,7 @@ void ScUndoDeleteContents::DoChange( const bool bUndo )
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( pViewShell && pViewShell->AdjustRowHeight(
- aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
+ aRange.aStart.Row(), aRange.aEnd.Row(), true ) ) )
/*A*/ pDocShell->PostPaint( aRange, PaintPartFlags::Grid | PaintPartFlags::Extras, nExtFlags );
if (pViewShell)
@@ -720,7 +720,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
if ( pViewShell )
{
pViewShell->SetTabNo(nTab);
- bDidPaint = pViewShell->AdjustRowHeight(maOption.mnStartRow, maOption.mnEndRow);
+ bDidPaint = pViewShell->AdjustRowHeight(maOption.mnStartRow, maOption.mnEndRow, true);
}
if (!bDidPaint)
@@ -873,7 +873,7 @@ void ScUndoAutoFormat::Redo()
rDoc.SetRowFlags( nRow, nTab, nOld & ~CRFlags::ManualSize );
}
- bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartY, nEndY, nTab);
+ bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartY, nEndY, nTab, true);
for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++)
if (!rDoc.ColHidden(nCol, nTab))
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/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 596da506ad14..03d84526d102 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/table/TableOrientation.hpp>
#include <com/sun/star/table/CellRangeAddress.hpp>
#include <com/sun/star/sheet/DataImportMode.hpp>
+#include <com/sun/star/sheet/FilterFieldType.hpp>
#include <com/sun/star/sheet/FilterOperator2.hpp>
#include <com/sun/star/sheet/TableFilterField2.hpp>
@@ -63,6 +64,7 @@
#include <memory>
using namespace com::sun::star;
+using namespace css::sheet;
// everything without Which-ID, map only for PropertySetInfo
@@ -1122,7 +1124,24 @@ void fillQueryParam(
for (const auto& rVal : rVals)
{
ScQueryEntry::Item aItem;
- aItem.meType = rVal.IsNumeric ? ScQueryEntry::ByValue : ScQueryEntry::ByString;
+ switch (rVal.FilterType)
+ {
+ case FilterFieldType::NUMERIC:
+ aItem.meType = ScQueryEntry::ByValue;
+ break;
+ case FilterFieldType::STRING:
+ aItem.meType = ScQueryEntry::ByString;
+ break;
+ case FilterFieldType::DATE:
+ aItem.meType = ScQueryEntry::ByDate;
+ break;
+ case FilterFieldType::TEXT_COLOR:
+ aItem.meType = ScQueryEntry::ByTextColor;
+ break;
+ case FilterFieldType::BACKGROUND_COLOR:
+ aItem.meType = ScQueryEntry::ByBackgroundColor;
+ break;
+ }
aItem.mfVal = rVal.NumericValue;
aItem.maString = rPool.intern(rVal.StringValue);
@@ -1132,6 +1151,11 @@ void fillQueryParam(
pDoc->GetFormatTable()->GetInputLineString(aItem.mfVal, 0, aStr);
aItem.maString = rPool.intern(aStr);
}
+ else if (aItem.meType == ScQueryEntry::ByTextColor
+ || aItem.meType == ScQueryEntry::ByBackgroundColor)
+ {
+ aItem.maColor = Color(rVal.ColorValue);
+ }
rItems.push_back(aItem);
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6d2c4ea19106..aa540b5d5134 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -482,6 +482,10 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
SetDigitLanguage( SC_MOD()->GetOptDigitLanguage() );
EnableRTL( false );
+
+ bInitialPageBreaks = true;
+ maShowPageBreaksTimer.SetInvokeHandler(LINK(this, ScGridWindow, InitiatePageBreaksTimer));
+ maShowPageBreaksTimer.SetTimeout(1);
}
ScGridWindow::~ScGridWindow()
@@ -491,6 +495,8 @@ ScGridWindow::~ScGridWindow()
void ScGridWindow::dispose()
{
+ maShowPageBreaksTimer.Stop();
+
ImpDestroyOverlayObjects();
mpFilterBox.disposeAndClear();
@@ -706,6 +712,11 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
ScResId(SCSTR_FILTER_NOTEMPTY), new AutoFilterAction(this, AutoFilterMode::NonEmpty));
mpAutoFilterPopup->addSeparator();
mpAutoFilterPopup->addMenuItem(
+ ScResId(SCSTR_FILTER_TEXT_COLOR), new AutoFilterAction(this, AutoFilterMode::TextColor));
+ mpAutoFilterPopup->addMenuItem(
+ ScResId(SCSTR_FILTER_BACKGROUND_COLOR), new AutoFilterAction(this, AutoFilterMode::BackgroundColor));
+ mpAutoFilterPopup->addSeparator();
+ mpAutoFilterPopup->addMenuItem(
ScResId(SCSTR_STDFILTER), new AutoFilterAction(this, AutoFilterMode::Custom));
ScCheckListMenuWindow::Config aConfig;
@@ -733,6 +744,11 @@ void ScGridWindow::RefreshAutoFilterButton(const ScAddress& rPos)
void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
{
+ // Terminate autofilter popup now when there is no further user input needed
+ bool bColorMode = eMode == AutoFilterMode::TextColor || eMode == AutoFilterMode::BackgroundColor;
+ if (!bColorMode)
+ mpAutoFilterPopup->terminateAllPopupMenus();
+
const AutoFilterData* pData =
static_cast<const AutoFilterData*>(mpAutoFilterPopup->getExtendedData());
@@ -778,20 +794,19 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
pViewData->GetViewShell()->UISort(aSortParam);
return;
}
+ case AutoFilterMode::Custom:
+ {
+ ScRange aRange;
+ pDBData->GetArea(aRange);
+ pViewData->GetView()->MarkRange(aRange);
+ pViewData->GetView()->SetCursor(rPos.Col(), rPos.Row());
+ pViewData->GetDispatcher().Execute(SID_FILTER, SfxCallMode::SLOT | SfxCallMode::RECORD);
+ return;
+ }
default:
;
}
- if (eMode == AutoFilterMode::Custom)
- {
- ScRange aRange;
- pDBData->GetArea(aRange);
- pViewData->GetView()->MarkRange(aRange);
- pViewData->GetView()->SetCursor(rPos.Col(), rPos.Row());
- pViewData->GetDispatcher().Execute(SID_FILTER, SfxCallMode::SLOT|SfxCallMode::RECORD);
- return;
- }
-
ScQueryParam aParam;
pDBData->GetQueryParam(aParam);
@@ -821,7 +836,16 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
}
// Remove old entries in auto-filter rules
- aParam.RemoveAllEntriesByField(rPos.Col());
+ if (!bColorMode)
+ {
+ aParam.RemoveAllEntriesByField(rPos.Col());
+
+ // tdf#46184 reset filter options to default values
+ aParam.eSearchType = utl::SearchParam::SearchType::Normal;
+ aParam.bCaseSens = false;
+ aParam.bDuplicate = true;
+ aParam.bInplace = true;
+ }
if( !(eMode == AutoFilterMode::Normal && mpAutoFilterPopup->isAllSelected() ) )
{
@@ -864,6 +888,81 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
case AutoFilterMode::NonEmpty:
pEntry->SetQueryByNonEmpty();
break;
+ case AutoFilterMode::TextColor:
+ case AutoFilterMode::BackgroundColor:
+ {
+ ScFilterEntries aFilterEntries;
+ pDoc->GetFilterEntries(rPos.Col(), rPos.Row(), rPos.Tab(), aFilterEntries);
+
+ VclPtr<PopupMenu> pColorMenu = VclPtr<PopupMenu>::Create();
+ std::set<Color> aColors = eMode == AutoFilterMode::TextColor
+ ? aFilterEntries.getTextColors()
+ : aFilterEntries.getBackgroundColors();
+
+ sal_Int32 i = 1;
+ sal_Int32 nActive = -1;
+ for (auto& rColor : aColors)
+ {
+ if (rColor == COL_AUTO)
+ {
+ OUString sText = eMode == AutoFilterMode::TextColor
+ ? ScResId(SCSTR_FILTER_AUTOMATIC_COLOR)
+ : ScResId(SCSTR_FILTER_NO_FILL);
+ pColorMenu->InsertItem(i, sText, MenuItemBits::CHECKABLE);
+ }
+ else
+ {
+ pColorMenu->InsertItem(i, OUString(), MenuItemBits::CHECKABLE);
+ pColorMenu->SetItemColor(i, rColor);
+ }
+ auto aItem = pEntry->GetQueryItem();
+ if (aItem.maColor == rColor
+ && ((eMode == AutoFilterMode::TextColor
+ && aItem.meType == ScQueryEntry::ByTextColor)
+ || (eMode == AutoFilterMode::BackgroundColor
+ && aItem.meType == ScQueryEntry::ByBackgroundColor)))
+ {
+ nActive = i;
+ pColorMenu->CheckItem(i, true);
+ }
+ i++;
+ }
+ Point pos(mpAutoFilterPopup->GetPosPixel());
+ pos.Move(150, 0);
+ sal_uInt16 nSelected = pColorMenu->Execute(this, pos);
+ pColorMenu.disposeAndClear();
+ mpAutoFilterPopup->terminateAllPopupMenus();
+
+ if (nSelected == 0)
+ return;
+
+ // Disable color filter when active color was selected
+ if (nSelected == nActive)
+ {
+ aParam.RemoveAllEntriesByField(rPos.Col());
+ pEntry = nullptr; // invalidated by RemoveAllEntriesByField call
+
+ // tdf#46184 reset filter options to default values
+ aParam.eSearchType = utl::SearchParam::SearchType::Normal;
+ aParam.bCaseSens = false;
+ aParam.bDuplicate = true;
+ aParam.bInplace = true;
+ }
+ else
+ {
+ // Get selected color from set
+ std::set<Color>::iterator it = aColors.begin();
+ std::advance(it, nSelected - 1);
+ Color selectedColor = *it;
+
+ if (eMode == AutoFilterMode::TextColor)
+ pEntry->SetQueryByTextColor(selectedColor);
+ else
+ pEntry->SetQueryByBackgroundColor(selectedColor);
+ }
+ }
+
+ break;
default:
// We don't know how to handle this!
return;
@@ -2910,8 +3009,15 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
if ( !bEdit )
{
- // Edit cell with spelling errors ?
- if (bMouse && (GetEditUrl(aPosPixel) || bSpellError))
+ // Edit cell with spelling errors ?
+ // tdf#127341 the formally used GetEditUrl(aPosPixel) addiionally
+ // to bSpellError acivated EditMode here for right-click on URL
+ // which prevents the regular contex-menu from appearing. Since this
+ // is more expeced than the context-menu for editing an URL I removed
+ // this. If this was wanted and can be argued his migh be re-acivated.
+ // For now, reduce to spelling errors - as the original comment above
+ // suggests.
+ if (bMouse && bSpellError)
{
// GetEditUrlOrError has already moved the Cursor
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 9426c8842bf0..aa7ad1312acc 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1055,6 +1055,28 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
if (mpNoteMarker)
mpNoteMarker->Draw(); // Above the cursor, in drawing map mode
+
+ if (bPage && bInitialPageBreaks)
+ SetupInitialPageBreaks(rDoc, nTab);
+}
+
+
+void ScGridWindow::SetupInitialPageBreaks(const ScDocument& rDoc, SCTAB nTab)
+{
+ // tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page breaks
+ // is enabled, breaks should be visible. If the document is opened the first
+ // time, the breaks are not calculated yet, so for this initialization
+ // a timer will be triggered here.
+ std::set<SCCOL> aColBreaks;
+ std::set<SCROW> aRowBreaks;
+ rDoc.GetAllColBreaks(aColBreaks, nTab, true, false);
+ rDoc.GetAllRowBreaks(aRowBreaks, nTab, true, false);
+ if (aColBreaks.size() == 0 || aRowBreaks.size() == 0)
+ {
+ maShowPageBreaksTimer.SetPriority(TaskPriority::DEFAULT_IDLE);
+ maShowPageBreaksTimer.Start();
+ }
+ bInitialPageBreaks = false;
}
namespace
@@ -2005,4 +2027,55 @@ void ScGridWindow::DataChanged( const DataChangedEvent& rDCEvt )
}
}
+void ScGridWindow::initiatePageBreaks()
+{
+ bInitialPageBreaks = true;
+}
+
+IMPL_LINK(ScGridWindow, InitiatePageBreaksTimer, Timer*, pTimer, void)
+{
+ if (pTimer == &maShowPageBreaksTimer)
+ {
+ const ScViewOptions& rOpts = pViewData->GetOptions();
+ const bool bPage = rOpts.GetOption(VOPT_PAGEBREAKS);
+ // tdf#124983, if option LibreOfficeDev Calc/View/Visual Aids/Page
+ // breaks is enabled, breaks should be visible. If the document is
+ // opened the first time or a tab is activated the first time, the
+ // breaks are not calculated yet, so this initialization is done here.
+ if (bPage)
+ {
+ const SCTAB nCurrentTab = pViewData->GetTabNo();
+ ScDocument* pDoc = pViewData->GetDocument();
+ const Size aPageSize = pDoc->GetPageSize(nCurrentTab);
+ // Do not attempt to calculate a page size here if it is empty if
+ // that involves counting pages.
+ // An earlier implementation did
+ // ScPrintFunc(pDocSh, pDocSh->GetPrinter(), nCurrentTab);
+ // rDoc.SetPageSize(nCurrentTab, rDoc.GetPageSize(nCurrentTab));
+ // which resulted in tremendous waiting times after having loaded
+ // larger documents i.e. imported from CSV, in which UI is entirely
+ // blocked. All time is spent under ScPrintFunc::CountPages() in
+ // ScTable::ExtendPrintArea() in the loop that calls
+ // MaybeAddExtraColumn() to do stuff for each text string content
+ // cell (each row in each column). Maybe that can be optimized, or
+ // obtaining page size without that overhead would be possible, but
+ // as is calling that from here is a no-no so this is a quick
+ // disable things.
+ if (aPageSize.Width()>0&&aPageSize.Height())
+ {
+ ScDocShell* pDocSh = pViewData->GetDocShell();
+ const bool bModified = pDocSh->IsModified();
+ // Even setting the same size sets page size valid, so
+ // UpdatePageBreaks() actually does something.
+ pDoc->SetPageSize( nCurrentTab, aPageSize);
+ pDoc->UpdatePageBreaks(nCurrentTab);
+ pDocSh->PostPaint(0, 0, nCurrentTab, pDoc->MaxCol(), pDoc->MaxRow(), nCurrentTab, PaintPartFlags::Grid);
+ pDocSh->SetModified(bModified);
+ }
+ }
+
+ Invalidate();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/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/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index b075b748f0e3..635b40e97ab5 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -315,6 +315,17 @@ void ScTabView::TabChanged( bool bSameTabButMoved )
}
}
+ for (int i = 0; i < 4; i++)
+ {
+ if (pGridWin[i])
+ {
+ pGridWin[i]->initiatePageBreaks();
+ // Trigger calculating page breaks only once.
+ break;
+ }
+ }
+
+
if (comphelper::LibreOfficeKit::isActive())
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 0ab2d088b0e7..02456b88d61c 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -156,7 +156,7 @@ bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData )
SCROW nEndNo = rRow.mnEnd;
ScAddress aTopLeft(0, nStartNo, nTab);
rDoc.UpdateScriptTypes(aTopLeft, MAXCOLCOUNT, nEndNo-nStartNo+1);
- if (rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab))
+ if (rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab, true))
{
if (!bChanged)
nPaintY = nStartNo;
@@ -180,7 +180,7 @@ bool ScViewFunc::AdjustBlockHeight( bool bPaint, ScMarkData* pMarkData )
return bAnyChanged;
}
-bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow )
+bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow, bool bApi )
{
if (comphelper::LibreOfficeKit::isActive())
{
@@ -206,7 +206,7 @@ bool ScViewFunc::AdjustRowHeight( SCROW nStartRow, SCROW nEndRow )
aZoomX = aZoomY = Fraction( 1, 1 );
}
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice());
- bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab);
+ bool bChanged = rDoc.SetOptimalHeight(aCxt, nStartRow, nEndRow, nTab, bApi);
// tdf#76183: recalculate objects' positions
if (bChanged)
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 7a39f5037fa2..a801cdd738cf 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -139,7 +139,7 @@ void ScViewFunc::CutToClip()
pDoc->DeleteObjectsInSelection( rMark );
rMark.MarkToSimple();
- if ( !AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row() ) )
+ if ( !AdjustRowHeight( aRange.aStart.Row(), aRange.aEnd.Row(), true ) )
pDocSh->PostPaint( aRange, PaintPartFlags::Grid, nExtFlags );
if ( bRecord ) // Draw-Undo now available
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 0778c2b5a710..7b1218a2f7e3 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -173,7 +173,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
else if ( aDataHelper.GetString( SotClipboardFormatId::RICHTEXT, aStr ) )
aImpEx.ImportString( aStr, SotClipboardFormatId::RICHTEXT );
- AdjustRowHeight( nStartRow, aImpEx.GetRange().aEnd.Row() );
+ AdjustRowHeight( nStartRow, aImpEx.GetRange().aEnd.Row(), true );
pDocSh->UpdateOle(&GetViewData());
ShowAllCursors();
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 21d10fcd1726..abae1c2fff60 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -709,7 +709,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
if (bSimple)
{
if (bCommon)
- AdjustRowHeight(nRow,nRow);
+ AdjustRowHeight(nRow,nRow,true);
EnterData(nCol,nRow,nTab,aString);
}
@@ -729,7 +729,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
HideAllCursors();
- AdjustRowHeight(nRow,nRow);
+ AdjustRowHeight(nRow,nRow,true);
for (const auto& rTab : rMark)
pDocSh->PostPaintCell( nCol, nRow, rTab );
@@ -1888,7 +1888,7 @@ void ScViewFunc::DeleteMulti( bool bRows )
pDocSh, bRows, bNeedRefresh, nTab, aSpans, std::move(pUndoDoc), std::move(pUndoData)));
}
- if (!AdjustRowHeight(0, rDoc.MaxRow()))
+ if (!AdjustRowHeight(0, rDoc.MaxRow(), true))
{
if (bRows)
{
@@ -2160,7 +2160,7 @@ void ScViewFunc::SetWidthOrHeight(
sc::RowHeightContext aCxt(nPPTX, nPPTY, aZoomX, aZoomY, aProv.GetDevice());
aCxt.setForceAutoSize(bAll);
aCxt.setExtraHeight(nSizeTwips);
- rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab);
+ rDoc.SetOptimalHeight(aCxt, nStartNo, nEndNo, nTab, true);
if (bAll)
rDoc.ShowRows( nStartNo, nEndNo, nTab, true );
@@ -2433,7 +2433,7 @@ void ScViewFunc::ModifyCellSize( ScDirection eDir, bool bOptimal )
pPattern->GetItem( ATTR_LINEBREAK ).GetValue() ||
pPattern->GetItem( ATTR_HOR_JUSTIFY ).GetValue() == SvxCellHorJustify::Block;
if (bNeedHeight)
- AdjustRowHeight( nRow, nRow );
+ AdjustRowHeight( nRow, nRow, true );
}
}
else
diff --git a/sc/uiconfig/scalc/ui/standardfilterdialog.ui b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
index a71da96fbb22..b167adba59bc 100644
--- a/sc/uiconfig/scalc/ui/standardfilterdialog.ui
+++ b/sc/uiconfig/scalc/ui/standardfilterdialog.ui
@@ -1,38 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ <!-- column-name image -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name surface -->
+ <column type="CairoSurface"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="liststore2">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ <!-- column-name image -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name surface -->
+ <column type="CairoSurface"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="liststore3">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ <!-- column-name image -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name surface -->
+ <column type="CairoSurface"/>
+ </columns>
+ </object>
+ <object class="GtkListStore" id="liststore4">
+ <columns>
+ <!-- column-name text -->
+ <column type="gchararray"/>
+ <!-- column-name id -->
+ <column type="gchararray"/>
+ <!-- column-name color -->
+ <column type="GdkPixbuf"/>
+ <!-- column-name surface -->
+ <column type="CairoSurface"/>
+ </columns>
+ </object>
<object class="GtkDialog" id="StandardFilterDialog">
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">6</property>
<property name="title" translatable="yes" context="standardfilterdialog|StandardFilterDialog">Standard Filter</property>
<property name="resizable">False</property>
- <property name="default_width">0</property>
- <property name="default_height">0</property>
- <property name="type_hint">dialog</property>
- <child>
- <placeholder/>
- </child>
+ <property name="default-width">0</property>
+ <property name="default-height">0</property>
+ <property name="type-hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
<child>
<object class="GtkButton" id="ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="has-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -44,10 +89,10 @@
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -59,10 +104,10 @@
<object class="GtkButton" id="help">
<property name="label">gtk-help</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
+ <property name="can-focus">True</property>
+ <property name="can-default">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-stock">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -75,58 +120,60 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
+ <property name="label-xalign">0</property>
+ <property name="shadow-type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
+ <property name="top-padding">6</property>
+ <property name="left-padding">12</property>
<child>
<object class="GtkScrolledWindow" id="scrollbar">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="hscrollbar_policy">never</property>
- <property name="vscrollbar_policy">always</property>
- <property name="shadow_type">in</property>
+ <property name="hscrollbar-policy">never</property>
+ <property name="vscrollbar-policy">always</property>
+ <property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child>
+ <!-- n-columns=4 n-rows=5 -->
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="border_width">3</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="border-width">3</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkComboBoxText" id="connect1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="standardfilterdialog|connect1">AND</item>
<item translatable="yes" context="standardfilterdialog|connect1">OR</item>
@@ -141,14 +188,14 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="connect2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="standardfilterdialog|connect2">AND</item>
<item translatable="yes" context="standardfilterdialog|connect2">OR</item>
@@ -163,14 +210,14 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="connect3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="standardfilterdialog|connect3">AND</item>
<item translatable="yes" context="standardfilterdialog|connect3">OR</item>
@@ -182,14 +229,14 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="connect4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item translatable="yes" context="standardfilterdialog|connect4">AND</item>
<item translatable="yes" context="standardfilterdialog|connect4">OR</item>
@@ -201,58 +248,58 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label2">Operator</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label3">Field name</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label4">Condition</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label5">Value</property>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">3</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="field1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
@@ -263,14 +310,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="field2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
@@ -281,14 +328,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="field3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
@@ -299,14 +346,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="field4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<child internal-child="accessible">
<object class="AtkObject" id="field4-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|field4-atkobject">Field Name 4</property>
@@ -314,14 +361,14 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="cond1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item>=</item>
<item>&lt;</item>
@@ -339,6 +386,8 @@
<item translatable="yes" context="standardfilterdialog|cond1">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond1">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond1">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond1">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond1">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -350,14 +399,14 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="cond2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item>=</item>
<item>&lt;</item>
@@ -375,6 +424,8 @@
<item translatable="yes" context="standardfilterdialog|cond2">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond2">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond2">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond2">Text color</item>
+ <item id="&lt;Enter ID&gt;" translatable="yes" context="standardfilterdialog|cond2">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -386,14 +437,14 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="cond3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item>=</item>
<item>&lt;</item>
@@ -411,6 +462,8 @@
<item translatable="yes" context="standardfilterdialog|cond3">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond3">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond3">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond3">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond3">Background color</item>
</items>
<accessibility>
<relation type="labelled-by" target="label4"/>
@@ -422,14 +475,14 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="cond4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<items>
<item>=</item>
<item>&lt;</item>
@@ -447,6 +500,8 @@
<item translatable="yes" context="standardfilterdialog|cond4">Does not begin with</item>
<item translatable="yes" context="standardfilterdialog|cond4">Ends with</item>
<item translatable="yes" context="standardfilterdialog|cond4">Does not end with</item>
+ <item translatable="yes" context="standardfilterdialog|cond4">Text color</item>
+ <item translatable="yes" context="standardfilterdialog|cond4">Background color</item>
</items>
<child internal-child="accessible">
<object class="AtkObject" id="cond4-atkobject">
@@ -455,117 +510,292 @@
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">4</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val1">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="has_entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry2">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="val1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">False</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val1-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val1-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ <child>
+ <object class="GtkComboBox" id="color1">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore1</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererPixbuf"/>
+ <attributes>
+ <attribute name="pixbuf">3</attribute>
+ </attributes>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">3</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val2">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="has_entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry4">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="val2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val2-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val2-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val2-atkobject">Value 2</property>
+ <child>
+ <object class="GtkComboBox" id="color2">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore2</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererPixbuf"/>
+ <attributes>
+ <attribute name="pixbuf">3</attribute>
+ </attributes>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">3</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val3">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="has_entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry6">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="val3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val3-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <accessibility>
- <relation type="labelled-by" target="label5"/>
- </accessibility>
- <child internal-child="accessible">
- <object class="AtkObject" id="val3-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val3-atkobject">Value 3</property>
+ <child>
+ <object class="GtkComboBox" id="color3">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore3</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererPixbuf"/>
+ <attributes>
+ <attribute name="pixbuf">3</attribute>
+ </attributes>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">3</property>
+ <property name="left-attach">3</property>
+ <property name="top-attach">3</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="val4">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="has_entry">True</property>
- <child internal-child="entry">
- <object class="GtkEntry" id="comboboxtext-entry8">
- <property name="can_focus">True</property>
- <property name="activates_default">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkComboBoxText" id="val4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="has-entry">True</property>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">True</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="label5"/>
+ </accessibility>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="val4-atkobject">
+ <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val1-atkobject">Value 1</property>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
- <child internal-child="accessible">
- <object class="AtkObject" id="val4-atkobject">
- <property name="AtkObject::accessible-name" translatable="yes" context="standardfilterdialog|val4-atkobject">Value 4</property>
+ <child>
+ <object class="GtkComboBox" id="color4">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="model">liststore4</property>
+ <property name="entry-text-column">0</property>
+ <property name="id-column">1</property>
+ <child>
+ <object class="GtkCellRendererText"/>
+ <attributes>
+ <attribute name="text">1</attribute>
+ </attributes>
+ </child>
+ <child>
+ <object class="GtkCellRendererPixbuf"/>
+ <attributes>
+ <attribute name="pixbuf">3</attribute>
+ </attributes>
+ </child>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="left_attach">3</property>
- <property name="top_attach">4</property>
+ <property name="left-attach">3</property>
+ <property name="top-attach">4</property>
</packing>
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
</object>
@@ -577,7 +807,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label1">Filter Criteria</property>
<attributes>
<attribute name="weight" value="bold"/>
@@ -594,143 +824,155 @@
<child>
<object class="GtkExpander" id="more">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="spacing">6</property>
- <property name="resize_toplevel">True</property>
+ <property name="resize-toplevel">True</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_top">6</property>
+ <property name="can-focus">False</property>
+ <property name="margin-top">6</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">6</property>
+ <property name="row-spacing">6</property>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkCheckButton" id="case">
<property name="label" translatable="yes" context="standardfilterdialog|case">_Case sensitive</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="header">
<property name="label" translatable="yes" context="standardfilterdialog|header">Range c_ontains column labels</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="regexp">
<property name="label" translatable="yes" context="standardfilterdialog|regexp">Regular _expressions</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="unique">
<property name="label" translatable="yes" context="standardfilterdialog|unique">_No duplications</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="copyresult">
<property name="label" translatable="yes" context="standardfilterdialog|copyresult">Co_py results to:</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
<accessibility>
<relation type="label-for" target="lbcopyarea"/>
<relation type="label-for" target="edcopyarea"/>
</accessibility>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="destpers">
<property name="label" translatable="yes" context="standardfilterdialog|destpers">_Keep filter criteria</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
<property name="hexpand">True</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
<property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="draw-indicator">True</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_left">12</property>
+ <property name="can-focus">False</property>
+ <property name="margin-left">12</property>
<property name="hexpand">True</property>
- <property name="column_spacing">12</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkComboBoxText" id="lbcopyarea">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<accessibility>
<relation type="labelled-by" target="copyresult"/>
</accessibility>
@@ -741,17 +983,17 @@
</child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="edcopyarea">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="margin_bottom">1</property>
+ <property name="can-focus">True</property>
+ <property name="margin-bottom">1</property>
<property name="hexpand">True</property>
- <property name="width_chars">30</property>
+ <property name="width-chars">30</property>
<accessibility>
<relation type="labelled-by" target="copyresult"/>
</accessibility>
@@ -762,74 +1004,132 @@
</child>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="rbcopyarea">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
<child>
<placeholder/>
</child>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">1</property>
</packing>
</child>
<child>
+ <!-- n-columns=3 n-rows=3 -->
<object class="GtkGrid" id="grid5">
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="dbarealabel">
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|dbarealabel">Data range:</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="dbarea">
<property name="sensitive">False</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes" context="standardfilterdialog|dbarea">dummy</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">0</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">2</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="standardfilterdialog|label6">Op_tions</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
</child>
</object>
diff --git a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
index 69d43e510d44..47cacf855855 100644
--- a/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
+++ b/schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng
@@ -29,7 +29,7 @@
basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT
INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
- FITNESS FOR A PARTICULAR PURPOSE.
+ FITNESS FOR A PARTICULAR PURPOSE.
-->
<rng:grammar xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:db="urn:oasis:names:tc:opendocument:xmlns:database:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d: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:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" xmlns:rng="http://relaxng.org/ns/structure/1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
@@ -2412,4 +2412,16 @@ xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
</rng:optional>
</rng:define>
+ <!-- TODO no proposal -->
+ <rng:define name="table-filter-condition-attlist" combine="interleave">
+ <rng:optional>
+ <rng:attribute name="loext:data-type">
+ <rng:choice>
+ <rng:value>background-color</rng:value>
+ <rng:value>text-color</rng:value>
+ </rng:choice>
+ </rng:attribute>
+ </rng:optional>
+ </rng:define>
+
</rng:grammar>
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/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/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/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/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/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5d00d39bd837..95e0af044f2a 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -4215,17 +4215,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..50782c3cd1b2 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -40,6 +40,10 @@
#include <tools/diagnose_ex.h>
#include <tools/urlobj.hxx>
+#if defined(_WIN32)
+#include <systools/win32/comtools.hxx>
+#include <urlmon.h>
+#endif
namespace sfx2
{
@@ -288,6 +292,56 @@ namespace sfx2
}
}
+#if defined(_WIN32)
+ // Windows specific: try to decide macros loading depending on Windows Security Zones
+ // (file is local, or it was downloaded from internet, etc)
+ OUString sURL(m_xData->m_rDocumentAccess.getDocumentLocation());
+ sal::systools::COMReference<IZoneIdentifier> pZoneId;
+ auto e1 = CoCreateInstance(
+ CLSID_PersistentZoneIdentifier, nullptr, CLSCTX_ALL, IID_PPV_ARGS(&pZoneId));
+ if (FAILED(e1))
+ return disallowMacroExecution();
+ sal::systools::COMReference<IPersistFile> pPersist(pZoneId.QueryInterface<IPersistFile>(IID_IPersistFile));
+ DWORD dwZone;
+ OUString sFilePath;
+ osl::FileBase::getSystemPathFromFileURL(sURL, sFilePath);
+ if (SUCCEEDED(pPersist->Load(reinterpret_cast<LPCOLESTR>(sFilePath.getStr()), STGM_READ)) &&
+ SUCCEEDED(pZoneId->GetId(&dwZone))) {
+ // We got zone id
+ sal_Int32 nAction = 0;
+ switch (dwZone) {
+ case 0:
+ nAction = officecfg::Office::Common::Security::Scripting::WindowsSecurityZone::ZoneLocal::get();
+ break;
+ case 1:
+ nAction = officecfg::Office::Common::Security::Scripting::WindowsSecurityZone::ZoneIntranet::get();
+ break;
+ case 2:
+ nAction = officecfg::Office::Common::Security::Scripting::WindowsSecurityZone::ZoneTrusted::get();
+ break;
+ case 3:
+ nAction = officecfg::Office::Common::Security::Scripting::WindowsSecurityZone::ZoneInternet::get();
+ break;
+ case 4:
+ nAction = officecfg::Office::Common::Security::Scripting::WindowsSecurityZone::ZoneUntrusted::get();
+ break;
+ default:
+ nAction = 0;
+ break;
+ }
+ switch (nAction)
+ {
+ case 0: // Ask
+ break;
+ case 1: // Allow
+ return allowMacroExecution();
+ default:
+ [[fallthrough]];
+ case 2: // Deny
+ return disallowMacroExecution();
+ }
+ }
+#endif
// confirmation is required
bool bSecure = false;
@@ -404,8 +458,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 +473,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..bddd187a418c 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -38,12 +38,20 @@
#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 <officecfg/Office/Common.hxx>
+
+#include <unicode/errorcode.h>
+#include <unicode/regex.h>
+#include <unicode/unistr.h>
using namespace ::com::sun::star;
@@ -153,44 +161,100 @@ IFrameObject::IFrameObject(const uno::Reference < uno::XComponentContext >& rxCo
aArguments[0] >>= mxObj;
}
+#if 0
+bool lcl_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;
+}
+#endif
+
sal_Bool SAL_CALL IFrameObject::load(
const uno::Sequence < css::beans::PropertyValue >& /*lDescriptor*/,
const uno::Reference < frame::XFrame >& xFrame )
{
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/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index f71358b568fa..f372de7fe4b1 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -954,9 +954,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 )
{
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..a707bb7c4a27 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 )
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index be6421416939..4624ed8b4907 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -86,6 +86,10 @@ public:
::comphelper::NamedValueCollection& o_normalizedDescriptor,
SfxObjectShell* i_document );
static void Execute( css::uno::Any const & aEventData, const css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc );
+
+private:
+ /// 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/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5a64599e5894..86e7d51bbfea 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>
@@ -1390,6 +1391,24 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
batch->commit();
}
+ if (officecfg::Office::Common::Passwords::HasMaster::get() &&
+ officecfg::Office::Common::Passwords::StorageVersion::get() == 0)
+ {
+ // master password stored in deprecated format
+ VclPtr<SfxInfoBarWindow> pOldMasterPasswordInfoBar =
+ AppendInfoBar("oldmasterpassword", "",
+ SfxResId(STR_REFRESH_MASTER_PASSWORD), InfobarType::DANGER, 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;
@@ -1565,6 +1584,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/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 97a8df6e94b6..8e8237dd12af 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -425,8 +425,12 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
if (!(checkExtension(ext, env)
&& checkExtension(
ext,
- ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.CLASS;"
- ".JAR;.APPLICATION;.LNK;.SCR")))
+ ".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 + ">", {},
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 1c2e19351ab4..41d9f3d75647 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -14832,6 +14832,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
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index c5f7d8f4ae16..47be6cfd2af8 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",
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 9e3b695360cd..c976652d6ecd 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -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/solenv/sanitizers/ui/modules/scalc.suppr b/solenv/sanitizers/ui/modules/scalc.suppr
index 1f5c72e6be46..9fa0dd849f6b 100644
--- a/solenv/sanitizers/ui/modules/scalc.suppr
+++ b/solenv/sanitizers/ui/modules/scalc.suppr
@@ -177,6 +177,11 @@ sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='cond3'] miss
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val1'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val2'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val3'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBoxText[@id='val4'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color1'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color2'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color3'] missing-label-for
+sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkComboBox[@id='color4'] missing-label-for
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='dbarealabel'] orphan-label
sc/uiconfig/scalc/ui/standardfilterdialog.ui://GtkLabel[@id='dbarea'] orphan-label
sc/uiconfig/scalc/ui/scenariodialog.ui://GtkEntry[@id='name'] no-labelled-by
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/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/svl/qa/unit/test_URIHelper.cxx b/svl/qa/unit/test_URIHelper.cxx
index 5954bcd39289..a03de34a3038 100644
--- a/svl/qa/unit/test_URIHelper.cxx
+++ b/svl/qa/unit/test_URIHelper.cxx
@@ -327,6 +327,7 @@ void Test::testFindFirstURLInText() {
{ "{a:\\bla/bla/bla...}", "file:///a:/bla/bla/bla", 1, 15 },
{ "#b:/c/d#e#f#", "file:///b:/c/d", 1, 7 },
{ "a:/", "file:///a:/", 0, 3 },
+ { "http://sun.com/R_(l_a)", "http://sun.com/R_(l_a)", 0, 22 },
{ ".component:", nullptr, 0, 0 },
{ ".uno:", nullptr, 0, 0 },
{ "cid:", nullptr, 0, 0 },
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 127134d1ab72..a98d4b480ac5 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -348,9 +348,12 @@ bool isBoundary2(CharClass const & rCharClass, OUString const & rStr,
}
}
+// tdf#145381 Added MatchingBracketDepth counter o detect maching closing
+// brackets that are part of the uri
bool checkWChar(CharClass const & rCharClass, OUString const & rStr,
- sal_Int32 * pPos, sal_Int32 * pEnd, bool bBackslash = false,
- bool bPipe = false)
+ sal_Int32 * pPos, sal_Int32 * pEnd,
+ sal_Int32 * pMatchingBracketDepth = nullptr,
+ bool bBackslash = false, bool bPipe = false)
{
sal_Unicode c = rStr[*pPos];
if (rtl::isAscii(c))
@@ -361,7 +364,7 @@ bool checkWChar(CharClass const & rCharClass, OUString const & rStr,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 1, 0, 0, 4, 4, 4, 1, // !"#$%&'
- 1, 1, 1, 1, 1, 4, 1, 4, // ()*+,-./
+ 5, 6, 1, 1, 1, 4, 1, 4, // ()*+,-./
4, 4, 4, 4, 4, 4, 4, 4, // 01234567
4, 4, 1, 1, 0, 1, 0, 1, // 89:;<=>?
4, 4, 4, 4, 4, 4, 4, 4, // @ABCDEFG
@@ -403,6 +406,24 @@ bool checkWChar(CharClass const & rCharClass, OUString const & rStr,
// isBoundary1)
*pEnd = ++(*pPos);
return true;
+
+ case 5: // opening bracket
+ ++(*pPos);
+ if(nullptr != pMatchingBracketDepth)
+ ++(*pMatchingBracketDepth);
+ return true;
+
+ case 6: // closing bracket
+ ++(*pPos);
+ if(nullptr != pMatchingBracketDepth && *pMatchingBracketDepth > 0)
+ {
+ --(*pMatchingBracketDepth);
+ // tdf#145381 When there was an opening bracket, detect this closing bracket
+ // as part of the uri
+ *pEnd = *pPos;
+ }
+ return true;
+
}
}
else if (rCharClass.isLetterNumeric(rStr, *pPos))
@@ -500,6 +521,11 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
// Productions 6--9 are only applicable if the FSysStyle::Dos bit is set in
// eStyle.
+ // tdf#145381: In addition to the productions I added a mechanism to detect
+ // matching brackets. The task presents the case of an url that ends on a
+ // closing bracket. This needs to be detected as part of the uri in the case
+ // that a matching opening bracket exists.
+
bool bBoundary1 = true;
bool bBoundary2 = true;
for (sal_Int32 nPos = rBegin; nPos != rEnd; nPos = nextChar(rText, nPos))
@@ -517,7 +543,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
sal_Int32 nPrefixEnd = i;
sal_Int32 nUriEnd = i;
while (i != rEnd
- && checkWChar(rCharClass, rText, &i, &nUriEnd, true,
+ && checkWChar(rCharClass, rText, &i, &nUriEnd, nullptr, true,
true)) ;
if (i != nPrefixEnd && i != rEnd && rText[i] == '#')
{
@@ -545,8 +571,10 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
while (rText[i++] != ':') ;
sal_Int32 nPrefixEnd = i;
sal_Int32 nUriEnd = i;
+ sal_Int32 nMatchingBracketDepth = 0;
while (i != rEnd
- && checkWChar(rCharClass, rText, &i, &nUriEnd)) ;
+ && checkWChar(rCharClass, rText, &i, &nUriEnd,
+ &nMatchingBracketDepth)) ;
if (i != nPrefixEnd && i != rEnd && rText[i] == '#')
{
++i;
@@ -656,7 +684,7 @@ OUString URIHelper::FindFirstURLInText(OUString const & rText,
sal_Int32 nUriEnd = ++i;
while (i != rEnd
&& checkWChar(rCharClass, rText, &i, &nUriEnd,
- true)) ;
+ nullptr, true)) ;
if (isBoundary1(rCharClass, rText, nUriEnd, rEnd))
{
INetURLObject aUri(rText.copy(nPos, nUriEnd - nPos),
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/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/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx
index 3faf68258b10..bbb081a01313 100644
--- a/svtools/source/uno/wizard/wizardpagecontroller.cxx
+++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx
@@ -54,7 +54,16 @@ namespace svt { namespace uno
try
{
// Plug a toplevel SalFrame into the native page which can host our awt widgetry
- m_xWizardPage.set(m_xController->createPage(pParent->CreateChildFrame(), i_nPageId), UNO_SET_THROW);
+ css::uno::Reference<css::awt::XWindow> xChildFrame = pParent->CreateChildFrame();
+ // If size of page is changed by createPage, then the requested size of the container
+ // should also be set to this size, to avoid annoying resizings.
+ com::sun::star::awt::Rectangle r0 = xChildFrame->getPosSize();
+ m_xWizardPage.set(m_xController->createPage(xChildFrame, i_nPageId), UNO_SET_THROW);
+ com::sun::star::awt::Rectangle r1 = xChildFrame->getPosSize();
+ if (r0.Width != r1.Width || r0.Height != r1.Height)
+ {
+ pParent->set_size_request(r1.Width, r1.Height);
+ }
Reference< XWindow > xPageWindow(m_xWizardPage->getWindow(), UNO_SET_THROW);
xPageWindow->setVisible( true );
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 49bdb3aeacf6..768dedef61bc 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -29,6 +29,13 @@
#include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
#include <svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
+#include <basegfx/polygon/b2dpolygonclipper.hxx>
+
+//#define OPTICAL_CHECK_CLIPRANGE_FOR_MERGED_CELL
+#ifdef OPTICAL_CHECK_CLIPRANGE_FOR_MERGED_CELL
+#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <drawinglayer/primitive2d/PolygonHairlinePrimitive2D.hxx>
+#endif
namespace svx {
namespace frame {
@@ -43,6 +50,9 @@ private:
Style maTLBR;
Style maBLTR;
+ basegfx::B2DHomMatrix HelperCreateB2DHomMatrixFromB2DRange(
+ const basegfx::B2DRange& rRange ) const;
+
public:
long mnAddLeft;
long mnAddRight;
@@ -78,53 +88,88 @@ public:
void MirrorSelfX();
- basegfx::B2DHomMatrix CreateCoordinateSystem(const Array& rArray, size_t nCol, size_t nRow, bool bExpandMerged) const;
+ basegfx::B2DHomMatrix CreateCoordinateSystemSingleCell(
+ const Array& rArray, size_t nCol, size_t nRow ) const;
+ basegfx::B2DHomMatrix CreateCoordinateSystemMergedCell(
+ const Array& rArray, size_t nColLeft, size_t nRowTop, size_t nColRight, size_t nRowBottom ) const;
};
typedef std::vector< Cell > CellVec;
-basegfx::B2DHomMatrix Cell::CreateCoordinateSystem(const Array& rArray, size_t nCol, size_t nRow, bool bExpandMerged) const
+basegfx::B2DHomMatrix Cell::HelperCreateB2DHomMatrixFromB2DRange(
+ const basegfx::B2DRange& rRange ) const
{
- basegfx::B2DHomMatrix aRetval;
- const basegfx::B2DRange aRange(rArray.GetCellRange(nCol, nRow, bExpandMerged));
+ if( rRange.isEmpty() )
+ return basegfx::B2DHomMatrix();
+
+ basegfx::B2DPoint aOrigin(rRange.getMinimum());
+ basegfx::B2DVector aX(rRange.getWidth(), 0.0);
+ basegfx::B2DVector aY(0.0, rRange.getHeight());
- if(!aRange.isEmpty())
+ if (IsRotated() && SvxRotateMode::SVX_ROTATE_MODE_STANDARD != meRotMode )
{
- basegfx::B2DPoint aOrigin(aRange.getMinimum());
- basegfx::B2DVector aX(aRange.getWidth(), 0.0);
- basegfx::B2DVector aY(0.0, aRange.getHeight());
+ // when rotated, adapt values. Get Skew (cos/sin == 1/tan)
+ const double fSkew(aY.getY() * (cos(mfOrientation) / sin(mfOrientation)));
- if (IsRotated() && SvxRotateMode::SVX_ROTATE_MODE_STANDARD != meRotMode)
+ switch (meRotMode)
{
- // when rotated, adapt values. Get Skew (cos/sin == 1/tan)
- const double fSkew(aY.getY() * (cos(mfOrientation) / sin(mfOrientation)));
-
- switch (meRotMode)
- {
- case SvxRotateMode::SVX_ROTATE_MODE_TOP:
- // shear Y-Axis
- aY.setX(-fSkew);
- break;
- case SvxRotateMode::SVX_ROTATE_MODE_CENTER:
- // shear origin half, Y full
- aOrigin.setX(aOrigin.getX() + (fSkew * 0.5));
- aY.setX(-fSkew);
- break;
- case SvxRotateMode::SVX_ROTATE_MODE_BOTTOM:
- // shear origin full, Y full
- aOrigin.setX(aOrigin.getX() + fSkew);
- aY.setX(-fSkew);
- break;
- default: // SvxRotateMode::SVX_ROTATE_MODE_STANDARD, already excluded above
- break;
- }
+ case SvxRotateMode::SVX_ROTATE_MODE_TOP:
+ // shear Y-Axis
+ aY.setX(-fSkew);
+ break;
+ case SvxRotateMode::SVX_ROTATE_MODE_CENTER:
+ // shear origin half, Y full
+ aOrigin.setX(aOrigin.getX() + (fSkew * 0.5));
+ aY.setX(-fSkew);
+ break;
+ case SvxRotateMode::SVX_ROTATE_MODE_BOTTOM:
+ // shear origin full, Y full
+ aOrigin.setX(aOrigin.getX() + fSkew);
+ aY.setX(-fSkew);
+ break;
+ default: // SvxRotateMode::SVX_ROTATE_MODE_STANDARD, already excluded above
+ break;
}
+ }
+
+ // use column vectors as coordinate axes, homogen column for translation
+ return basegfx::utils::createCoordinateSystemTransform( aOrigin, aX, aY );
+}
+
+basegfx::B2DHomMatrix Cell::CreateCoordinateSystemSingleCell(
+ const Array& rArray, size_t nCol, size_t nRow) const
+{
+ const Point aPoint( rArray.GetColPosition( nCol ), rArray.GetRowPosition( nRow ) );
+ const Size aSize( rArray.GetColWidth( nCol, nCol ) + 1, rArray.GetRowHeight( nRow, nRow ) + 1 );
+ const basegfx::B2DRange aRange( vcl::unotools::b2DRectangleFromRectangle( tools::Rectangle( aPoint, aSize ) ) );
+
+ return HelperCreateB2DHomMatrixFromB2DRange( aRange );
+}
+
+basegfx::B2DHomMatrix Cell::CreateCoordinateSystemMergedCell(
+ const Array& rArray, size_t nColLeft, size_t nRowTop, size_t nColRight, size_t nRowBottom) const
+{
+ basegfx::B2DRange aRange( rArray.GetB2DRange(
+ nColLeft, nRowTop, nColRight, nRowBottom ) );
- // use column vectors as coordinate axes, homogen column for translation
- aRetval = basegfx::utils::createCoordinateSystemTransform(aOrigin, aX, aY);
+ // adjust rectangle for partly visible merged cells
+ if( IsMerged() )
+ {
+ // not *sure* what exactly this is good for,
+ // it is just a hard set extension at merged cells,
+ // probably *should* be included in the above extended
+ // GetColPosition/GetColWidth already. This might be
+ // added due to GetColPosition/GetColWidth not working
+ // correctly over PageChanges (if used), but not sure.
+ aRange.expand(
+ basegfx::B2DRange(
+ aRange.getMinX() - mnAddLeft,
+ aRange.getMinY() - mnAddTop,
+ aRange.getMaxX() + mnAddRight,
+ aRange.getMaxY() + mnAddBottom ) );
}
- return aRetval;
+ return HelperCreateB2DHomMatrixFromB2DRange( aRange );
}
Cell::Cell() :
@@ -223,6 +268,8 @@ struct ArrayImpl
bool IsColInClipRange( size_t nCol ) const;
bool IsRowInClipRange( size_t nRow ) const;
+ bool OverlapsClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ) const;
+
size_t GetMirrorCol( size_t nCol ) const { return mnWidth - nCol - 1; }
long GetColPosition( size_t nCol ) const;
@@ -326,6 +373,23 @@ bool ArrayImpl::IsRowInClipRange( size_t nRow ) const
return (mnFirstClipRow <= nRow) && (nRow <= mnLastClipRow);
}
+bool ArrayImpl::OverlapsClipRange( size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow ) const
+{
+ if(nLastCol < mnFirstClipCol)
+ return false;
+
+ if(nFirstCol > mnLastClipCol)
+ return false;
+
+ if(nLastRow < mnFirstClipRow)
+ return false;
+
+ if(nFirstRow > mnLastClipRow)
+ return false;
+
+ return true;
+}
+
bool ArrayImpl::IsInClipRange( size_t nCol, size_t nRow ) const
{
return IsColInClipRange( nCol ) && IsRowInClipRange( nRow );
@@ -885,6 +949,15 @@ basegfx::B2DRange Array::GetCellRange( size_t nCol, size_t nRow, bool bExpandMer
}
}
+// return output range of given row/col range in logical coordinates
+basegfx::B2DRange Array::GetB2DRange(sal_Int32 nFirstCol, sal_Int32 nFirstRow, sal_Int32 nLastCol, sal_Int32 nLastRow) const
+{
+ const Point aPoint( GetColPosition( nFirstCol ), GetRowPosition( nFirstRow ) );
+ const Size aSize( GetColWidth( nFirstCol, nLastCol ) + 1, GetRowHeight( nFirstRow, nLastRow ) + 1 );
+
+ return vcl::unotools::b2DRectangleFromRectangle(tools::Rectangle(aPoint, aSize));
+}
+
// mirroring
void Array::MirrorSelfX()
{
@@ -1015,6 +1088,137 @@ static void HelperCreateVerticalEntry(
rInstance.addSdrConnectStyleData(false, rEndFromTL, -rY - rX, true);
}
+static void HelperClipLine(
+ basegfx::B2DPoint& rStart,
+ basegfx::B2DVector& rDirection,
+ const basegfx::B2DRange& rClipRange)
+{
+ basegfx::B2DPolygon aLine({rStart, rStart + rDirection});
+ const basegfx::B2DPolyPolygon aResultPP(
+ basegfx::utils::clipPolygonOnRange(
+ aLine,
+ rClipRange,
+ true, // bInside
+ true)); // bStroke
+
+ if(aResultPP.count() > 0)
+ {
+ const basegfx::B2DPolygon aResultP(aResultPP.getB2DPolygon(0));
+
+ if(aResultP.count() > 0)
+ {
+ const basegfx::B2DPoint aResultStart(aResultP.getB2DPoint(0));
+ const basegfx::B2DPoint aResultEnd(aResultP.getB2DPoint(aResultP.count() - 1));
+
+ if(aResultStart != aResultEnd)
+ {
+ rStart = aResultStart;
+ rDirection = aResultEnd - aResultStart;
+ }
+ }
+ }
+}
+
+static void HelperCreateTLBREntry(
+ const Array& rArray,
+ const Style& rStyle,
+ drawinglayer::primitive2d::SdrFrameBorderDataVector& rData,
+ const basegfx::B2DPoint& rOrigin,
+ const basegfx::B2DVector& rX,
+ const basegfx::B2DVector& rY,
+ sal_Int32 nColLeft,
+ sal_Int32 nColRight,
+ sal_Int32 nRowTop,
+ sal_Int32 nRowBottom,
+ const Color* pForceColor,
+ const basegfx::B2DRange* pClipRange)
+{
+ if(rStyle.IsUsed())
+ {
+ /// prepare geometry line data
+ basegfx::B2DPoint aStart(rOrigin);
+ basegfx::B2DVector aDirection(rX + rY);
+
+ /// check if we need to clip geometry line data and do it
+ if(nullptr != pClipRange)
+ {
+ HelperClipLine(aStart, aDirection, *pClipRange);
+ }
+
+ /// top-left and bottom-right Style Tables
+ rData.emplace_back(
+ aStart,
+ aDirection,
+ rStyle,
+ pForceColor);
+ drawinglayer::primitive2d::SdrFrameBorderData& rInstance(rData.back());
+
+ /// Fill top-left Style Table
+ const Style& rTLFromRight(rArray.GetCellStyleTop(nColLeft, nRowTop));
+ const Style& rTLFromBottom(rArray.GetCellStyleLeft(nColLeft, nRowTop));
+
+ rInstance.addSdrConnectStyleData(true, rTLFromRight, rX, false);
+ rInstance.addSdrConnectStyleData(true, rTLFromBottom, rY, false);
+
+ /// Fill bottom-right Style Table
+ const Style& rBRFromBottom(rArray.GetCellStyleRight(nColRight, nRowBottom));
+ const Style& rBRFromLeft(rArray.GetCellStyleBottom(nColRight, nRowBottom));
+
+ rInstance.addSdrConnectStyleData(false, rBRFromBottom, -rY, true);
+ rInstance.addSdrConnectStyleData(false, rBRFromLeft, -rX, true);
+ }
+}
+
+static void HelperCreateBLTREntry(
+ const Array& rArray,
+ const Style& rStyle,
+ drawinglayer::primitive2d::SdrFrameBorderDataVector& rData,
+ const basegfx::B2DPoint& rOrigin,
+ const basegfx::B2DVector& rX,
+ const basegfx::B2DVector& rY,
+ sal_Int32 nColLeft,
+ sal_Int32 nColRight,
+ sal_Int32 nRowTop,
+ sal_Int32 nRowBottom,
+ const Color* pForceColor,
+ const basegfx::B2DRange* pClipRange)
+{
+ if(rStyle.IsUsed())
+ {
+ /// prepare geometry line data
+ basegfx::B2DPoint aStart(rOrigin + rY);
+ basegfx::B2DVector aDirection(rX - rY);
+
+ /// check if we need to clip geometry line data and do it
+ if(nullptr != pClipRange)
+ {
+ HelperClipLine(aStart, aDirection, *pClipRange);
+ }
+
+ /// bottom-left and top-right Style Tables
+ rData.emplace_back(
+ aStart,
+ aDirection,
+ rStyle,
+ pForceColor);
+ drawinglayer::primitive2d::SdrFrameBorderData& rInstance(rData.back());
+
+ /// Fill bottom-left Style Table
+ const Style& rBLFromTop(rArray.GetCellStyleLeft(nColLeft, nRowBottom));
+ const Style& rBLFromBottom(rArray.GetCellStyleBottom(nColLeft, nRowBottom));
+
+ rInstance.addSdrConnectStyleData(true, rBLFromTop, -rY, true);
+ rInstance.addSdrConnectStyleData(true, rBLFromBottom, rX, false);
+
+ /// Fill top-right Style Table
+ const Style& rTRFromLeft(rArray.GetCellStyleTop(nColRight, nRowTop));
+ const Style& rTRFromBottom(rArray.GetCellStyleRight(nColRight, nRowTop));
+
+ rInstance.addSdrConnectStyleData(false, rTRFromLeft, -rX, true);
+ rInstance.addSdrConnectStyleData(false, rTRFromBottom, rY, false);
+ }
+}
+
drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
size_t nFirstCol, size_t nFirstRow, size_t nLastCol, size_t nLastRow,
const Color* pForceColor ) const
@@ -1022,6 +1226,10 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
DBG_FRAME_CHECK_COLROW( nFirstCol, nFirstRow, "CreateB2DPrimitiveRange" );
DBG_FRAME_CHECK_COLROW( nLastCol, nLastRow, "CreateB2DPrimitiveRange" );
+#ifdef OPTICAL_CHECK_CLIPRANGE_FOR_MERGED_CELL
+ std::vector<basegfx::B2DRange> aClipRanges;
+#endif
+
// It may be necessary to extend the loop ranges by one cell to the outside,
// when possible. This is needed e.g. when there is in Calc a Cell with an
// upper CellBorder using DoubleLine and that is right/left connected upwards
@@ -1058,7 +1266,7 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
// get Cell and CoordinateSystem (*only* for this Cell, do *not* expand for
// merged cells (!)), check if used (non-empty vectors)
const Cell& rCell(CELL(nCol, nRow));
- basegfx::B2DHomMatrix aCoordinateSystem(rCell.CreateCoordinateSystem(*this, nCol, nRow, false));
+ basegfx::B2DHomMatrix aCoordinateSystem(rCell.CreateCoordinateSystemSingleCell(*this, nCol, nRow));
basegfx::B2DVector aX(basegfx::utils::getColumn(aCoordinateSystem, 0));
basegfx::B2DVector aY(basegfx::utils::getColumn(aCoordinateSystem, 1));
@@ -1138,95 +1346,114 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
}
}
- // check for crossed lines, these need special treatment, especially
- // for merged cells, see below
- const Style& rTLBR(GetCellStyleTLBR(nCol, nRow));
- const Style& rBLTR(GetCellStyleBLTR(nCol, nRow));
-
- if(rTLBR.IsUsed() || rBLTR.IsUsed())
+ // tdf#126269 check for crossed lines, these need special treatment, especially
+ // for merged cells (see comments in task). Separate treatment of merged and
+ // non-merged cells to allow better handling of both types
+ if(rCell.IsMerged())
{
- bool bContinue(true);
+ // first check if this merged cell was already handled. To do so,
+ // calculate and use the index of the TopLeft cell
+ size_t nColLeft(nCol), nRowTop(nRow), nColRight(nCol), nRowBottom(nRow);
+ GetMergedRange(nColLeft, nRowTop, nColRight, nRowBottom, nCol, nRow);
+ const size_t nIndexOfMergedCell(mxImpl->GetIndex(nColLeft, nRowTop));
- if(rCell.IsMerged())
+ if(aMergedCells.end() == aMergedCells.find(nIndexOfMergedCell))
{
- // first check if this merged cell was already handled. To do so,
- // calculate and use the index of the TopLeft cell
- const size_t _nMergedFirstCol(mxImpl->GetMergedFirstCol(nCol, nRow));
- const size_t _nMergedFirstRow(mxImpl->GetMergedFirstRow(nCol, nRow));
- const size_t nIndexOfMergedCell(mxImpl->GetIndex(_nMergedFirstCol, _nMergedFirstRow));
- bContinue = (aMergedCells.end() == aMergedCells.find(nIndexOfMergedCell));
-
- if(bContinue)
+ // not found, so not yet handled. Add now to mark as handled
+ aMergedCells.insert(nIndexOfMergedCell);
+
+ // Get and check if diagonal styles are used
+ // Note: For GetCellStyleBLTR below I tried to use nRowBottom
+ // as Y-value what seemed more logical, but that
+ // is wrong. Despite defining a line starting at
+ // bottom-left, the Style is defined in the cell at top-left
+ const Style& rTLBR(GetCellStyleTLBR(nColLeft, nRowTop));
+ const Style& rBLTR(GetCellStyleBLTR(nColLeft, nRowTop));
+
+ if(rTLBR.IsUsed() || rBLTR.IsUsed())
{
- // not found, add now to mark as handled
- aMergedCells.insert(nIndexOfMergedCell);
-
- // when merged, get extended coordinate system and derived values
- // for the full range of this merged cell
- aCoordinateSystem = rCell.CreateCoordinateSystem(*this, nCol, nRow, true);
- aX = basegfx::utils::getColumn(aCoordinateSystem, 0);
- aY = basegfx::utils::getColumn(aCoordinateSystem, 1);
- aOrigin = basegfx::utils::getColumn(aCoordinateSystem, 2);
+ // test if merged cell overlaps ClipRange at all (needs visualization)
+ if(mxImpl->OverlapsClipRange(nColLeft, nRowTop, nColRight, nRowBottom))
+ {
+ // when merged, get extended coordinate system and derived values
+ // for the full range of this merged cell. Only work with rMergedCell
+ // (which is the top-left single cell of the merged cell) from here on
+ const Cell& rMergedCell(CELL(nColLeft, nRowTop));
+ aCoordinateSystem = rMergedCell.CreateCoordinateSystemMergedCell(
+ *this, nColLeft, nRowTop, nColRight, nRowBottom);
+ aX = basegfx::utils::getColumn(aCoordinateSystem, 0);
+ aY = basegfx::utils::getColumn(aCoordinateSystem, 1);
+ aOrigin = basegfx::utils::getColumn(aCoordinateSystem, 2);
+
+ // check if clip is needed
+ basegfx::B2DRange aClipRange;
+
+ // first use row/col ClipTest for raw check
+ bool bNeedToClip(
+ !mxImpl->IsColInClipRange(nColLeft) ||
+ !mxImpl->IsRowInClipRange(nRowTop) ||
+ !mxImpl->IsColInClipRange(nColRight) ||
+ !mxImpl->IsRowInClipRange(nRowBottom));
+
+ if(bNeedToClip)
+ {
+ // now get ClipRange and CellRange in logical coordinates
+ aClipRange = GetB2DRange(
+ mxImpl->mnFirstClipCol, mxImpl->mnFirstClipRow,
+ mxImpl->mnLastClipCol, mxImpl->mnLastClipRow);
+
+ basegfx::B2DRange aCellRange(
+ GetB2DRange(
+ nColLeft, nRowTop,
+ nColRight, nRowBottom));
+
+ // intersect these to get the target ClipRange, ensure
+ // that clip is needed
+ aClipRange.intersect(aCellRange);
+ bNeedToClip = !aClipRange.isEmpty();
+
+#ifdef OPTICAL_CHECK_CLIPRANGE_FOR_MERGED_CELL
+ aClipRanges.push_back(aClipRange);
+#endif
+ }
+
+ // create top-left to bottom-right geometry
+ HelperCreateTLBREntry(*this, rTLBR, *aData, aOrigin, aX, aY,
+ nColLeft, nRowTop, nColRight, nRowBottom, pForceColor,
+ bNeedToClip ? &aClipRange : nullptr);
+
+ // create bottom-left to top-right geometry
+ HelperCreateBLTREntry(*this, rBLTR, *aData, aOrigin, aX, aY,
+ nColLeft, nRowTop, nColRight, nRowBottom, pForceColor,
+ bNeedToClip ? &aClipRange : nullptr);
+ }
}
}
-
- if(bContinue)
+ }
+ else
+ {
+ // must be in clipping range: else not visible. This
+ // already clips completely for non-merged cells
+ if( mxImpl->IsInClipRange( nCol, nRow ) )
{
- if(rTLBR.IsUsed())
- {
- /// top-left and bottom-right Style Tables
- aData->emplace_back(
- aOrigin,
- aX + aY,
- rTLBR,
- pForceColor);
- drawinglayer::primitive2d::SdrFrameBorderData& rInstance(aData->back());
-
- /// Fill top-left Style Table
- const Style& rTLFromRight(GetCellStyleTop(nCol, nRow));
- const Style& rTLFromBottom(GetCellStyleLeft(nCol, nRow));
-
- rInstance.addSdrConnectStyleData(true, rTLFromRight, aX, false);
- rInstance.addSdrConnectStyleData(true, rTLFromBottom, aY, false);
-
- /// Fill bottom-right Style Table
- const Style& rBRFromBottom(GetCellStyleRight(nCol, nRow));
- const Style& rBRFromLeft(GetCellStyleBottom(nCol, nRow));
-
- rInstance.addSdrConnectStyleData(false, rBRFromBottom, -aY, true);
- rInstance.addSdrConnectStyleData(false, rBRFromLeft, -aX, true);
- }
+ // get and check if diagonal styles are used
+ const Style& rTLBR(GetCellStyleTLBR(nCol, nRow));
+ const Style& rBLTR(GetCellStyleBLTR(nCol, nRow));
- if(rBLTR.IsUsed())
+ if(rTLBR.IsUsed() || rBLTR.IsUsed())
{
- /// bottom-left and top-right Style Tables
- aData->emplace_back(
- aOrigin + aY,
- aX - aY,
- rBLTR,
- pForceColor);
- drawinglayer::primitive2d::SdrFrameBorderData& rInstance(aData->back());
-
- /// Fill bottom-left Style Table
- const Style& rBLFromTop(GetCellStyleLeft(nCol, nRow));
- const Style& rBLFromBottom(GetCellStyleBottom(nCol, nRow));
-
- rInstance.addSdrConnectStyleData(true, rBLFromTop, -aY, true);
- rInstance.addSdrConnectStyleData(true, rBLFromBottom, aX, false);
-
- /// Fill top-right Style Table
- const Style& rTRFromLeft(GetCellStyleTop(nCol, nRow));
- const Style& rTRFromBottom(GetCellStyleRight(nCol, nRow));
-
- rInstance.addSdrConnectStyleData(false, rTRFromLeft, -aX, true);
- rInstance.addSdrConnectStyleData(false, rTRFromBottom, aY, false);
+ HelperCreateTLBREntry(*this, rTLBR, *aData, aOrigin, aX, aY,
+ nCol, nRow, nCol, nRow, pForceColor, nullptr);
+
+ HelperCreateBLTREntry(*this, rBLTR, *aData, aOrigin, aX, aY,
+ nCol, nRow, nCol, nRow, pForceColor, nullptr);
}
}
}
}
- else
+ else if(!aY.equalZero())
{
- // create left line for this Cell
+ // cell has height, but no width. Create left vertical line for this Cell
if ((!bOverlapX // true for first column in merged cells or cells
|| bFirstCol) // true for non_Calc usages of this tooling
&& !bSupressLeft) // true when left is not rotated, so edge is already handled (see bRotated)
@@ -1239,6 +1466,10 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
}
}
}
+ else
+ {
+ // Cell has *no* size, thus no visualization
+ }
}
}
@@ -1256,6 +1487,18 @@ drawinglayer::primitive2d::Primitive2DContainer Array::CreateB2DPrimitiveRange(
true))); // force visualization to minimal one discrete unit (pixel)
}
+#ifdef OPTICAL_CHECK_CLIPRANGE_FOR_MERGED_CELL
+ for(auto const& rClipRange : aClipRanges)
+ {
+ // draw ClipRange in yellow to allow simple interactive optical control in office
+ aSequence.append(
+ drawinglayer::primitive2d::Primitive2DReference(
+ new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(
+ basegfx::utils::createPolygonFromRect(rClipRange),
+ basegfx::BColor(1.0, 1.0, 0.0))));
+ }
+#endif
+
return aSequence;
}
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/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/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 76222cd30158..ad7bd17ed6de 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -507,6 +507,13 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co
}
}
}
+ if (eHit==SdrHitKind::UnmarkedObject && !pHitObj->getHyperlink().isEmpty())
+ {
+ static SvxURLField aSvxURLField;
+ aSvxURLField.SetURL(pHitObj->getHyperlink());
+ rVEvt.pURLField = &aSvxURLField;
+ eHit = SdrHitKind::UrlField;
+ }
}
if (bHitPassDirect &&
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 7fc12c76a47d..e979463702bb 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2462,8 +2462,10 @@ IMPL_LINK_NOARG(SvxFrameWindow_Impl, SelectHdl, ValueSet*, void)
sal_uInt16 nModifier = aFrameSet->GetModifier();
FrmValidFlags nValidFlags = FrmValidFlags::NONE;
- theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(),
- DEF_LINE_WIDTH_0);
+ // tdf#48622, tdf#145828 use correct default to create intended 0.75pt
+ // cell border using the border formatting tool in the standard toolbar
+ theDefLine.GuessLinesWidths(theDefLine.GetBorderLineStyle(), SvxBorderLineWidth::Thin);
+
switch ( nSel )
{
case 1: nValidFlags |= FrmValidFlags::AllMask;
@@ -2773,7 +2775,7 @@ IMPL_LINK_NOARG(SvxLineWindow_Impl, SelectHdl, ListBox&, void)
{
SvxBorderLine aTmp;
aTmp.SetBorderLineStyle( nStyle );
- aTmp.SetWidth( 20 ); // TODO Make it depend on a width field
+ aTmp.SetWidth( SvxBorderLineWidth::Thin ); // TODO Make it depend on a width field
aLineItem.SetLine( &aTmp );
}
else
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/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 3f07f5ab9a82..0adc5e54622e 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2488,6 +2488,18 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
return false;
}
}
+
+ case OWN_ATTR_HYPERLINK:
+ {
+ OUString sHyperlink;
+ if (rValue >>= sHyperlink)
+ {
+ GetSdrObject()->setHyperlink(sHyperlink);
+ return true;
+ }
+ break;
+ }
+
default:
{
return false;
@@ -2883,6 +2895,12 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
}
+ case OWN_ATTR_HYPERLINK:
+ {
+ rValue <<= GetSdrObject()->getHyperlink();
+ break;
+ }
+
default:
return false;
}
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_doc.mk b/sw/CppunitTest_sw_core_doc.mk
index 856f007cb9b1..071d2901122a 100644
--- a/sw/CppunitTest_sw_core_doc.mk
+++ b/sw/CppunitTest_sw_core_doc.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_core_doc, \
editeng \
sal \
sfx \
+ svxcore \
sw \
test \
unotest \
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 45b28d52d841..06ba2fef9a3a 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/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 a076a6dada66..f3537e913a0d 100644
--- a/sw/inc/IDocumentMarkAccess.hxx
+++ b/sw/inc/IDocumentMarkAccess.hxx
@@ -235,9 +235,12 @@ class IDocumentMarkAccess
@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.
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 8f383348277f..10df073fda2f 100644
--- a/sw/inc/anchoreddrawobject.hxx
+++ b/sw/inc/anchoreddrawobject.hxx
@@ -94,6 +94,7 @@ class SwAnchoredDrawObject final : public SwAnchoredObject
page frame
*/
virtual void RegisterAtCorrectPage() override;
+ virtual void RegisterAtPage(SwPageFrame &) override;
virtual bool SetObjTop_( const SwTwips _nTop) override;
virtual bool SetObjLeft_( const SwTwips _nLeft) override;
diff --git a/sw/inc/anchoredobject.hxx b/sw/inc/anchoredobject.hxx
index 0c5c2495092a..d08192a7d44c 100644
--- a/sw/inc/anchoredobject.hxx
+++ b/sw/inc/anchoredobject.hxx
@@ -46,7 +46,8 @@ class SW_DLLPUBLIC SwAnchoredObject
private:
// drawing object representing the anchored object in the drawing layer
SdrObject* mpDrawObj;
- // frame the object is anchored at
+ /// Frame the object is anchored at.
+ /// For at-char/at-para anchor, this is always the master SwTextFrame.
SwFrame* mpAnchorFrame;
// #i28701 - page frame the object is registered at
// note: no page frame for as-character anchored objects
@@ -295,6 +296,8 @@ class SW_DLLPUBLIC SwAnchoredObject
/** method to invalidate position of the anchored object */
virtual void InvalidateObjPos() = 0;
+ virtual void RegisterAtPage(SwPageFrame &) = 0;
+
/** method to perform necessary invalidations for the positioning of
objects, for whose the wrapping style influence has to be considered
on the object positioning.
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 23b3753dd938..6336011add14 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;
@@ -434,6 +438,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.
@@ -705,10 +710,10 @@ public:
static SwTextField* GetTextFieldAtPos(
const SwPosition* pPos,
- const bool bIncludeInputFieldAtStart );
+ ::sw::GetTextAttrMode eMode);
static SwTextField* GetTextFieldAtCursor(
const SwPaM* pCursor,
- const bool bIncludeInputFieldAtStart );
+ ::sw::GetTextAttrMode eMode);
static SwField* GetFieldAtCursor(
const SwPaM* pCursor,
const bool bIncludeInputFieldAtStart );
@@ -792,8 +797,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 );
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index daec75ea300f..504c512d1c8e 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -179,13 +179,13 @@ private:
SwFlyDrawObjPtr mpMasterObj;
void SwClientNotify(const SwModify&, const SfxHint& rHint) override;
- sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly);
+ sal_uInt32 GetOrdNumForNewRef(const SwFlyFrame* pFly, SwFrame const& rAnchorFrame);
public:
/// Creates DrawObject and registers it with the Model.
SwFlyDrawContact(SwFlyFrameFormat* pToRegisterIn, SdrModel& rTargetModel);
- static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* pFormat);
+ static SwVirtFlyDrawObj* CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* pFormat, SwFrame const& rAnchorFrame);
virtual ~SwFlyDrawContact() override;
virtual const SwAnchoredObject* GetAnchoredObj( const SdrObject* _pSdrObj ) const override;
@@ -248,7 +248,7 @@ class SwDrawVirtObj final : public SdrVirtObj
void RemoveFromWriterLayout();
/// connection to drawing layer
- void AddToDrawingPage();
+ void AddToDrawingPage(SwFrame const& rAnchorFrame);
void RemoveFromDrawingPage();
/** is 'virtual' drawing object connected to writer layout and
@@ -398,7 +398,7 @@ class SAL_DLLPUBLIC_RTTI SwDrawContact final : public SwContact
/// Moves all SW-connections to new Master)
void ChangeMasterObject( SdrObject *pNewMaster );
- SwDrawVirtObj* AddVirtObj();
+ SwDrawVirtObj* AddVirtObj(SwFrame const& rAnchorFrame);
void NotifyBackgrdOfAllVirtObjs( const tools::Rectangle* pOldBoundRect );
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/editsh.hxx b/sw/inc/editsh.hxx
index 53b91f44db98..71bf75a3a8b6 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -152,7 +152,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 +174,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();
@@ -400,7 +400,7 @@ public:
/// Currently there are two variants: signature and classification.
bool RemoveParagraphMetadataFieldAtCursor();
- void Insert2(SwField const &, const bool bForceExpandHints);
+ bool InsertField(SwField const &, const bool bForceExpandHints);
void UpdateOneField(SwField &); ///< One single field.
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index e223e4fa3dd5..c63ed98683eb 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -26,6 +26,8 @@
#include <memory>
#include <vector>
#include <tools/solar.h>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/beans/PropertyValue.hpp>
class SfxPoolItem;
class SwTextNode;
@@ -285,7 +287,8 @@ class SW_DLLPUBLIC SwInputField final : public SwField
OUString maHelp;
OUString maToolTip;
sal_uInt16 mnSubType;
- bool const mbIsFormField;
+ bool mbIsFormField;
+ css::uno::Sequence<css::beans::PropertyValue> maGrabBag;
SwFormatField* mpFormatField; // attribute to which the <SwInputField> belongs to
@@ -314,6 +317,7 @@ public:
void applyFieldContent( const OUString& rNewFieldContent );
bool isFormField() const;
+ css::uno::Sequence<css::beans::PropertyValue> getGrabBagParams() const { return maGrabBag; }
virtual OUString GetFieldName() const override;
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 2f2958c977bc..7504a283fdf3 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;
@@ -306,11 +307,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..a2d974942097 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,
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index acef43b0010e..46f6c11b3145 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -357,12 +357,6 @@ public:
bool DontExpandFormat( const SwIndex& rIdx, bool bFlag = true,
bool bFormatToTextAttributes = true );
- enum GetTextAttrMode {
- DEFAULT, /// DEFAULT: (Start <= nIndex < End)
- EXPAND, /// EXPAND : (Start < nIndex <= End)
- PARENT, /// PARENT : (Start < nIndex < End)
- };
-
/** get the innermost text attribute covering position nIndex.
@param nWhich only attribute with this id is returned.
@param eMode the predicate for matching (@see GetTextAttrMode).
@@ -374,7 +368,7 @@ public:
SwTextAttr *GetTextAttrAt(
sal_Int32 const nIndex,
sal_uInt16 const nWhich,
- enum GetTextAttrMode const eMode = DEFAULT ) const;
+ ::sw::GetTextAttrMode const eMode = ::sw::GetTextAttrMode::Default) const;
/** get the innermost text attributes covering position nIndex.
@param nWhich only attributes with this id are returned.
@@ -397,7 +391,7 @@ public:
SwTextField* GetFieldTextAttrAt(
const sal_Int32 nIndex,
- const bool bIncludeInputFieldAtStart = false ) const;
+ ::sw::GetTextAttrMode const eMode = ::sw::GetTextAttrMode::Expand) const;
bool Spell(SwSpellArgs*);
bool Convert( SwConversionArgs & );
@@ -504,7 +498,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.
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/swtypes.hxx b/sw/inc/swtypes.hxx
index 03f136e2ea34..b1b8c1e9cc4b 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -167,6 +167,16 @@ namespace o3tl
template<> struct typed_flags<SetAttrMode> : is_typed_flags<SetAttrMode, 0x1ff> {};
}
+namespace sw {
+
+enum class GetTextAttrMode {
+ Default, /// DEFAULT: (Start <= nIndex < End)
+ Expand, /// EXPAND : (Start < nIndex <= End)
+ Parent, /// PARENT : (Start < nIndex < End)
+};
+
+} // namespace sw
+
constexpr bool SW_ISPRINTABLE(sal_Unicode c) { return c >= ' ' && 127 != c; }
#define CHAR_HARDBLANK u'\x00A0'
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 4790ddc8e25b..7a7ea7be53ce 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -175,7 +175,8 @@ public:
void RemoveDataSequence( const SwTable &rTable, css::uno::Reference< css::chart2::data::XDataSequence > const &rxDataSequence );
// will send modified events for all data-sequences of the table
- void InvalidateTable( const SwTable *pTable );
+ // tdf#122995 added Immediate-Mode to allow non-timer-delayed Chart invalidation
+ void InvalidateTable( const SwTable *pTable, bool bImmediate = false );
void DeleteBox( const SwTable *pTable, const SwTableBox &rBox );
void DisposeAllDataSequences( const SwTable *pTable );
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/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/doc/data/textbox-zorder.docx b/sw/qa/core/doc/data/textbox-zorder.docx
new file mode 100644
index 000000000000..d5263f8bbd6b
--- /dev/null
+++ b/sw/qa/core/doc/data/textbox-zorder.docx
Binary files differ
diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx
index 72895861f713..381e873ed7b9 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -82,6 +82,22 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextboxTextRotateAngle)
ErrorRegistry::Reset();
}
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testTextBoxZOrder)
+{
+ SwDoc* pDoc = createDoc("textbox-zorder.docx");
+ SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), rFormats.size());
+ const SwFrameFormat* pEllipse = rFormats[2];
+ const SdrObject* pEllipseShape = pEllipse->FindRealSdrObject();
+ // Make sure we test the right shape.
+ CPPUNIT_ASSERT_EQUAL(OUString("Shape3"), pEllipseShape->GetName());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 2
+ // - Actual : 1
+ // i.e. the ellipse was under the frame of the shape-frame pair, not on top of it.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(2), pEllipseShape->GetOrdNum());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/data/textbox-undo-ordnum.docx b/sw/qa/core/edit/data/textbox-undo-ordnum.docx
new file mode 100644
index 000000000000..96b00973289a
--- /dev/null
+++ b/sw/qa/core/edit/data/textbox-undo-ordnum.docx
Binary files differ
diff --git a/sw/qa/core/edit/edit.cxx b/sw/qa/core/edit/edit.cxx
new file mode 100644
index 000000000000..c13e348ad831
--- /dev/null
+++ b/sw/qa/core/edit/edit.cxx
@@ -0,0 +1,108 @@
+/* -*- 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 <textboxhelper.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_TEST_FIXTURE(Test, testTextboxUndoOrdNum)
+{
+ // Given a document with 5 frame formats:
+ // - picture
+ // - draw format + fly format and a picture in it
+ // - picture
+ SwDoc* pDoc = createSwDoc("textbox-undo-ordnum.docx");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ const SwFrameFormats& rFormats = *pDoc->GetSpzFrameFormats();
+ // Test the state before del + undo.
+ for (const auto& pFormat : rFormats)
+ {
+ const SwFrameFormat* pFlyFormat
+ = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+ if (!pFlyFormat)
+ {
+ continue;
+ }
+
+ sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+ sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+ CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+ }
+
+ // When selecting the first page, deleting the selection and undoing:
+ pWrtShell->Down(true, 3);
+ pWrtShell->DelLeft();
+ pWrtShell->Undo();
+
+ // Then the z-order of the fly format should be still the z-order of the draw format + 1, when
+ // the fly and draw formats form a textbox pair.
+ for (const auto& pFormat : rFormats)
+ {
+ const SwFrameFormat* pFlyFormat
+ = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_DRAWFRMFMT);
+ if (!pFlyFormat)
+ {
+ continue;
+ }
+
+ sal_Int32 nDrawOrdNum = pFormat->FindRealSdrObject()->GetOrdNum();
+ sal_Int32 nFlyOrdNum = pFlyFormat->FindRealSdrObject()->GetOrdNum();
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 2
+ // i.e. the fly format was behind the draw format, not visible.
+ CPPUNIT_ASSERT_EQUAL(nDrawOrdNum + 1, nFlyOrdNum);
+ }
+}
+
+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/globalfilter/data/char_background_editing.docx b/sw/qa/extras/globalfilter/data/char_background_editing.docx
index 3e3302d00c71..5e92fe8bbd49 100644
--- a/sw/qa/extras/globalfilter/data/char_background_editing.docx
+++ b/sw/qa/extras/globalfilter/data/char_background_editing.docx
Binary files differ
diff --git a/sw/qa/extras/globalfilter/data/fieldmark_QUOTE_nest.docx b/sw/qa/extras/globalfilter/data/fieldmark_QUOTE_nest.docx
index ba886edfa777..9fbec01e0ab6 100644
--- a/sw/qa/extras/globalfilter/data/fieldmark_QUOTE_nest.docx
+++ b/sw/qa/extras/globalfilter/data/fieldmark_QUOTE_nest.docx
Binary files differ
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/fdo43573-2-min.docx b/sw/qa/extras/layout/data/fdo43573-2-min.docx
new file mode 100644
index 000000000000..429b7948ed02
--- /dev/null
+++ b/sw/qa/extras/layout/data/fdo43573-2-min.docx
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..2a830ff73c10
--- /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/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/tdf123163-1.docx b/sw/qa/extras/layout/data/tdf123163-1.docx
new file mode 100644
index 000000000000..3f8865cb49b1
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf123163-1.docx
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf134298.ott b/sw/qa/extras/layout/data/tdf134298.ott
new file mode 100644
index 000000000000..effb595eb328
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134298.ott
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf143239-1-min.odt b/sw/qa/extras/layout/data/tdf143239-1-min.odt
new file mode 100644
index 000000000000..4271bfba775b
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf143239-1-min.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/tdf150606-1-min.odt b/sw/qa/extras/layout/data/tdf150606-1-min.odt
new file mode 100644
index 000000000000..63bd1ceb0a5b
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf150606-1-min.odt
Binary files differ
diff --git a/sw/qa/extras/layout/data/tdf152983-1-min.docx b/sw/qa/extras/layout/data/tdf152983-1-min.docx
new file mode 100644
index 000000000000..804e8fefe68f
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf152983-1-min.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index b872cf9087b3..5860cba7b4fb 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");
@@ -761,6 +773,80 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
}
}
+#if !defined(MACOSX)
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf150606)
+{
+ createDoc("tdf150606-1-min.odt");
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column", 2);
+ // on page 5 the table is split across balanced columns
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column", 2);
+ CPPUNIT_ASSERT_GREATEREQUAL(5, getPages());
+ CPPUNIT_ASSERT_LESSEQUAL(6, getPages());
+
+ pWrtShell->Down(false, 1);
+ lcl_dispatchCommand(mxComponent, ".uno:DeleteTable", {});
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column/body/tab", 0);
+ assertXPath(pXmlDoc, "/root/page", 1);
+
+ pWrtShell->Undo();
+ Scheduler::ProcessEventsToIdle();
+
+ discardDumpedLayout();
+ pXmlDoc = parseLayoutDump();
+
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[4]/body/section/column", 2);
+ // on page 5 the table is split across balanced columns
+ // (problem was that there were empty pages and table was on page 10)
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column[2]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[5]/body/section/column", 2);
+ // somehow may be 6 pages on WNT on this branch - still better than 10
+ CPPUNIT_ASSERT_GREATEREQUAL(5, getPages());
+ CPPUNIT_ASSERT_LESSEQUAL(6, getPages());
+}
+#endif
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf152983)
+{
+ //just care it doesn't crash/assert
+ createDoc("tdf152983-1-min.docx");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInFootnote)
{
loadURL("private:factory/swriter", nullptr);
@@ -1163,14 +1249,88 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf138039)
assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored", 0);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf143239)
+{
+ SwDoc* pDoc = createDoc("tdf143239-1-min.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // These are unstable on macOS and Win64 builds,
+ // so only test that they restore original values for now
+ OUString p2txt1Left, p2txt2Left, p3txt1Left;
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "18540");
+ p2txt1Left
+ = getXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "left");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "top",
+ "23894");
+ p2txt2Left
+ = getXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "left");
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "35662");
+ p3txt1Left
+ = getXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "left");
+ assertXPath(pXmlDoc, "/root/page", 3);
+ discardDumpedLayout();
+ }
+
+ pWrtShell->SelAll();
+ pWrtShell->Delete();
+ pWrtShell->Undo();
+ Scheduler::ProcessEventsToIdle();
+
+ {
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ // now the 1st fly was on page 1, and the fly on page 2 was the 2nd one
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "18540");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ p2txt1Left);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "top",
+ "23894");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[2]/anchored/fly[1]/infos/bounds", "left",
+ p2txt2Left);
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "top",
+ "35662");
+ assertXPath(pXmlDoc, "/root/page[3]/body/txt[1]/anchored/fly[1]/infos/bounds", "left",
+ p3txt1Left);
+ assertXPath(pXmlDoc, "/root/page", 3);
+ discardDumpedLayout();
+ }
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116486)
{
SwDoc* pDoc = createDoc("tdf116486.docx");
CPPUNIT_ASSERT(pDoc);
- OUString aTop = parseDump("/root/page/body/txt/Special", "nHeight");
+ OUString aTop = parseDump("/root/page/body/txt/Special[1]", "nHeight");
CPPUNIT_ASSERT_EQUAL(OUString("4006"), aTop);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf142080)
+{
+ // this caused an infinite loop
+ load(DATA_DIRECTORY, "fdo43573-2-min.docx");
+
+ xmlDocPtr pLayout = parseLayoutDump();
+ // check the first paragraph on page 9 with its fly; the colum was empty too
+ assertXPath(pLayout, "/root/page[9]/body/section[1]/column[1]/body/txt[1]/Text[1]", "Portion",
+ "De kleur u (rood) in het rechtervlak (R), de kleur r (wit) beneden (D),");
+ SwTwips nPage9Top = getXPath(pLayout, "/root/page[9]/infos/bounds", "top").toInt32();
+ assertXPath(
+ pLayout,
+ "/root/page[9]/body/section[1]/column[1]/body/txt[1]/anchored/fly[1]/notxt/infos/bounds",
+ "top", OUString::number(nPage9Top + 1460));
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128198)
{
SwDoc* pDoc = createDoc("tdf128198-1.docx");
@@ -2970,14 +3130,88 @@ 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
+
+// FIXME frequent crash only in WNT Jenkins
+#ifndef _WIN32
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testN4LA0OHZ) { createDoc("LIBREOFFICE-N4LA0OHZ.rtf"); }
+#endif
+
+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");
+ 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)
{
@@ -2986,6 +3220,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");
@@ -3375,6 +3617,12 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116501)
createDoc("tdf116501.odt");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf123163)
+{
+ //just care it doesn't assert
+ createDoc("tdf123163-1.docx");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118719)
{
// Insert a page break.
@@ -3476,6 +3724,27 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf127235)
pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134298)
+{
+ createDoc("tdf134298.ott");
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+
+ // there are 2 pages
+ assertXPath(pXmlDoc, "/root/page", 2);
+ // table and first para on first page
+ assertXPath(pXmlDoc, "/root/page[1]/body/tab", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/anchored", 0);
+ // paragraph with large fly on second page
+ assertXPath(pXmlDoc, "/root/page[2]/body/tab", 0);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly", 1);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "top", "17897");
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt[1]/anchored/fly[1]/infos/bounds", "height",
+ "15819");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testShapeAllowOverlap)
{
// Need to find out why this fails on macOS.
diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
new file mode 100644
index 000000000000..0f9d5a90b1dc
--- /dev/null
+++ b/sw/qa/extras/mailmerge/data/bookmarkcondition.fodt
@@ -0,0 +1,91 @@
+<?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.2" 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"/>
+ <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: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:text-properties officeooo:rsid="001fe5a9" officeooo:paragraph-rsid="001fe5a9"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-weight="bold" style:font-weight-asian="bold" style:font-weight-complex="bold"/>
+ </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>
+ </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:p text:style-name="P1"/>
+ <text:section text:style-name="Sect1" text:name="a" text:condition="ooow:([WM:SE_S_Berge] != &quot;true&quot;)" text:is-hidden="true" text:display="condition">
+ <text:p text:style-name="P1">In den Bergen war es anstrengend.</text:p>
+ </text:section>
+ <text:p text:style-name="P1"/>
+ <text:section text:style-name="Sect1" text:name="b" text:condition="ooow:([WM:SE_S_Barcelona] != &quot;true&quot;)" text:is-hidden="true" text:display="condition">
+ <text:p text:style-name="P1">In Barcelona war es schön.</text:p>
+ </text:section>
+ <text:p text:style-name="P1"/>
+ <text:section text:style-name="Sect1" text:name="c" text:condition="ooow:([WM:SE_S_Paris] != &quot;true&quot;)" text:is-hidden="true" text:display="condition">
+ <text:p text:style-name="P1">In Paris war es erlebnisreich.</text:p>
+ </text:section>
+ <text:p text:style-name="P1"/>
+ <text:p text:style-name="P1">
+ <text:span text:style-name="T1">Mein Urlaub war </text:span>
+ <text:bookmark-start text:name="S_Berge" loext:hidden="true" loext:condition="([WM:SE_S_Berge] != &quot;true&quot;)"/>
+ <text:span text:style-name="T1">anstrengend</text:span>
+ <text:bookmark-start text:name="S_Barcelona" loext:hidden="true" loext:condition="([WM:SE_S_Barcelona] != &quot;true&quot;)"/>
+ <text:bookmark-end text:name="S_Berge"/>
+ <text:span text:style-name="T1">schön</text:span>
+ <text:bookmark-start text:name="S_Paris" loext:hidden="true" loext:condition="([WM:SE_S_Paris] != &quot;true&quot;)"/>
+ <text:bookmark-end text:name="S_Barcelona"/>
+ <text:span text:style-name="T1">erlebnisreich</text:span>
+ <text:bookmark-end text:name="S_Paris"/>
+ <text:span text:style-name="T1">.</text:span>
+ </text:p>
+ <text:p text:style-name="P1"/>
+
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/mailmerge/data/bookmarkcondition.ods b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods
new file mode 100644
index 000000000000..463781ed5f6e
--- /dev/null
+++ b/sw/qa/extras/mailmerge/data/bookmarkcondition.ods
Binary files differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 40d32634ad9a..340c69dc2ce4 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -394,7 +394,7 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c
// (see XMLGraphicsDefaultStyle::SetDefaults()).
uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xDraws = xDrawPageSupplier->getDrawPage();
- uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(4), uno::UNO_QUERY);
// Lines do not have a line color.
CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( "LineColor" ));
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
@@ -587,6 +587,33 @@ DECLARE_SHELL_MAILMERGE_TEST(testTdf92623, "tdf92623.odt", "10-testing-addresses
CPPUNIT_ASSERT_EQUAL(sal_Int32(10), countFieldMarks);
}
+DECLARE_SHELL_MAILMERGE_TEST(testBookmarkCondition, "bookmarkcondition.fodt", "bookmarkcondition.ods", "data")
+{
+ executeMailMerge();
+
+ dumpMMLayout();
+ xmlDocPtr pLayout(
+ xmlParseMemory(reinterpret_cast<const char*>(xmlBufferContent(mpXmlBuffer)),
+ xmlBufferLength(mpXmlBuffer)));
+
+ // check that conditions on sections and bookmarks are evaluated the same
+ assertXPath(pLayout, "/root/page", 7);
+ assertXPath(pLayout, "/root/page[1]/body/section", 1);
+ assertXPath(pLayout, "/root/page[1]/body/section[1]/txt[1]/LineBreak", "Line", u"In den Bergen war es anstrengend.");
+ assertXPath(pLayout, "/root/page[1]/body/txt[5]/LineBreak", "Line", u"Mein Urlaub war anstrengend . ");
+ assertXPath(pLayout, "/root/page[3]/body/section", 1);
+ assertXPath(pLayout, "/root/page[3]/body/section[1]/txt[1]/LineBreak", "Line", u"In Barcelona war es schön.");
+ assertXPath(pLayout, "/root/page[3]/body/txt[5]/LineBreak", "Line", u"Mein Urlaub war schön . ");
+ assertXPath(pLayout, "/root/page[5]/body/section", 1);
+ assertXPath(pLayout, "/root/page[5]/body/section[1]/txt[1]/LineBreak", "Line", "In Paris war es erlebnisreich.");
+ assertXPath(pLayout, "/root/page[5]/body/txt[5]/LineBreak", "Line", u"Mein Urlaub war erlebnisreich . ");
+ assertXPath(pLayout, "/root/page[7]/body/section", 3);
+ assertXPath(pLayout, "/root/page[7]/body/section[1]/txt[1]/LineBreak", "Line", u"In den Bergen war es anstrengend.");
+ assertXPath(pLayout, "/root/page[7]/body/section[2]/txt[1]/LineBreak", "Line", u"In Barcelona war es schön.");
+ assertXPath(pLayout, "/root/page[7]/body/section[3]/txt[1]/LineBreak", "Line", u"In Paris war es erlebnisreich.");
+ assertXPath(pLayout, "/root/page[7]/body/txt[5]/LineBreak", "Line", u"Mein Urlaub war anstrengend schön erlebnisreich . ");
+}
+
DECLARE_SHELL_MAILMERGE_TEST_SELECTION(testTdf95292, "linked-labels.odt", "10-testing-addresses.ods", "testing-addresses", 5)
{
// A document with two labels merged with 5 datasets should result in three pages
diff --git a/sw/qa/extras/odfexport/data/shape-with-hyperlink.odt b/sw/qa/extras/odfexport/data/shape-with-hyperlink.odt
new file mode 100644
index 000000000000..7b112782845f
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/shape-with-hyperlink.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/data/shapes-hyperlink.odt b/sw/qa/extras/odfexport/data/shapes-hyperlink.odt
new file mode 100644
index 000000000000..f8f4e155654f
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/shapes-hyperlink.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..7aec212ac157 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()
{
{
@@ -1126,6 +1152,16 @@ DECLARE_ODFEXPORT_TEST(testTextboxRoundedCorners, "textbox-rounded-corners.odt")
assertXPath(pXmlDoc, "//draw:custom-shape/loext:table", "name", "Table1");
}
+DECLARE_ODFEXPORT_TEST(testShapeWithHyperlink, "shape-with-hyperlink.odt")
+{
+ if (xmlDocPtr pXmlDoc = parseExport("content.xml"))
+ {
+ // Check how conversion from prefix/suffix to list format did work
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p/draw:a",
+ "href", "http://shape.com/");
+ }
+}
+
// test that import whitespace collapsing is compatible with old docs
DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt")
{
@@ -2367,5 +2403,24 @@ DECLARE_ODFEXPORT_TEST(tdf135942, "nestedTableInFooter.odt")
}
}
+DECLARE_ODFEXPORT_TEST(testShapesHyperlink, "shapes-hyperlink.odt")
+{
+ uno::Reference<beans::XPropertySet> const xPropSet1(getShape(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice.org/"), getProperty<OUString>(xPropSet1, "Hyperlink"));
+
+ uno::Reference<beans::XPropertySet> const xPropSet2(getShape(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice2.org/"), getProperty<OUString>(xPropSet2, "Hyperlink"));
+
+ uno::Reference<beans::XPropertySet> const xPropSet3(getShape(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice3.org/"), getProperty<OUString>(xPropSet3, "Hyperlink"));
+
+ uno::Reference<beans::XPropertySet> const xPropSet4(getShape(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice4.org/"), getProperty<OUString>(xPropSet4, "Hyperlink"));
+
+ uno::Reference<beans::XPropertySet> const xPropSet5(getShape(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice5.org/"), getProperty<OUString>(xPropSet5, "Hyperlink"));
+}
+
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 27e1809eaeff..c14a4ac60c87 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -39,10 +39,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")
@@ -1000,5 +1002,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/docxopenhyperlinkbox.docx b/sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docx
new file mode 100644
index 000000000000..2653e620202a
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/docxopenhyperlinkbox.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx b/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx
new file mode 100644
index 000000000000..3bf4f8c5c498
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/hyperlinkshape.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx b/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx
new file mode 100644
index 000000000000..0a6009c2cd1b
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/inline-sdt-header.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf104823.docx b/sw/qa/extras/ooxmlexport/data/tdf104823.docx
new file mode 100644
index 000000000000..4a354b848eea
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf104823.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf123642.docx b/sw/qa/extras/ooxmlexport/data/tdf123642.docx
new file mode 100644
index 000000000000..9817093e02f8
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf123642.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf126287.docx b/sw/qa/extras/ooxmlexport/data/tdf126287.docx
new file mode 100644
index 000000000000..cf2250b9f9a4
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf126287.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf132752.docx b/sw/qa/extras/ooxmlexport/data/tdf132752.docx
new file mode 100644
index 000000000000..a94fc498a101
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf132752.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf137466.docx b/sw/qa/extras/ooxmlexport/data/tdf137466.docx
new file mode 100644
index 000000000000..3c5977251bda
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf137466.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148111.docx b/sw/qa/extras/ooxmlexport/data/tdf148111.docx
new file mode 100644
index 000000000000..a46fb508dc0e
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148111.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf148361.docx b/sw/qa/extras/ooxmlexport/data/tdf148361.docx
new file mode 100644
index 000000000000..ecf9a5f0087c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf148361.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81507.docx b/sw/qa/extras/ooxmlexport/data/tdf81507.docx
new file mode 100644
index 000000000000..2c00ee44cb24
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81507.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt b/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt
new file mode 100644
index 000000000000..95f65e919fb6
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf98000_changePageStyle.odt
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx b/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx
new file mode 100644
index 000000000000..3ff04cb60b89
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/test_sdt_datepicker.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 9a771a5f81b7..b6409e7c1aef 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -69,7 +69,7 @@ DECLARE_OOXMLEXPORT_TEST(testSdtAlias, "sdt-alias.docx")
return;
// <w:alias> was completely missing.
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:alias", "val", "Subtitle");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:alias", "val", "Subtitle");
}
DECLARE_OOXMLEXPORT_TEST(testFooterBodyDistance, "footer-body-distance.docx")
@@ -220,7 +220,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO83044, "fdo83044.docx")
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:text", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:text", 1);
}
DECLARE_OOXMLEXPORT_TEST(testfdo83428, "fdo83428.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index 5ad0a4ece74c..6305de3577a2 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")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index 18a22bbdd30c..cd584a27e92d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -446,6 +446,36 @@ DECLARE_OOXMLEXPORT_TEST(testTdf120394, "tdf120394.docx")
}
}
+DECLARE_OOXMLEXPORT_TEST(testTdf132752, "tdf132752.docx")
+{
+ uno::Reference<beans::XPropertySet> xPara1(getParagraph(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara1, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara1, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara1, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara2(getParagraph(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara2, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1000), getProperty<sal_Int32>(xPara2, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-630), getProperty<sal_Int32>(xPara2, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara3(getParagraph(3), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara3, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(5891), getProperty<sal_Int32>(xPara3, "ParaRightMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), getProperty<sal_Int32>(xPara3, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara4(getParagraph(4), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara4, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(4157), getProperty<sal_Int32>(xPara4, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara5(getParagraph(5), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1801), getProperty<sal_Int32>(xPara5, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-630), getProperty<sal_Int32>(xPara5, "ParaFirstLineIndent"));
+
+ uno::Reference<beans::XPropertySet> xPara6(getParagraph(6), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3565), getProperty<sal_Int32>(xPara6, "ParaLeftMargin"));
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(-2394), getProperty<sal_Int32>(xPara6, "ParaFirstLineIndent"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testHyphenationAuto, "hyphenation.odt")
{
// Explicitly set hyphenation=auto on document level
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index a20a93c93637..bf28fb771d09 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -11,6 +11,8 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/text/XBookmarksSupplier.hpp>
+#include <com/sun/star/text/XTextField.hpp>
char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
@@ -34,6 +36,19 @@ DECLARE_OOXMLEXPORT_TEST(testTdf133334_followPgStyle, "tdf133334_followPgStyle.o
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf98000_changePageStyle, "tdf98000_changePageStyle.odt")
+{
+ 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_THROW);
+ OUString sPageOneStyle = getProperty<OUString>( xCursor, "PageStyleName" );
+
+ xCursor->jumpToNextPage();
+ OUString sPageTwoStyle = getProperty<OUString>( xCursor, "PageStyleName" );
+ CPPUNIT_ASSERT_MESSAGE("Different page1/page2 styles", sPageOneStyle != sPageTwoStyle);
+}
+
DECLARE_OOXMLIMPORT_TEST(testTdf131801, "tdf131801.docx")
{
CPPUNIT_ASSERT_EQUAL(1, getPages());
@@ -107,6 +122,120 @@ DECLARE_OOXMLEXPORT_TEST(testTdf135973, "tdf135973.odt")
}
}
+DECLARE_OOXMLEXPORT_TEST(testTdf123642_BookmarkAtDocEnd, "tdf123642.docx")
+{
+ // get bookmark interface
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xBookmarksByIdx(xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xBookmarksByName = xBookmarksSupplier->getBookmarks();
+
+ // check: we have 1 bookmark (previously there were 0)
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xBookmarksByIdx->getCount());
+ CPPUNIT_ASSERT(xBookmarksByName->hasByName("Bookmark1"));
+
+ // and it is really in exprted DOCX (let's ensure)
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return; // initial import, no futher checks
+
+ CPPUNIT_ASSERT_EQUAL(OUString("Bookmark1"), getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:bookmarkStart[1]", "name"));
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return; // initial import, no futher checks
+
+ // Ensure that we have <w:text w:multiLine="1"/>
+ CPPUNIT_ASSERT_EQUAL(OUString("1"), getXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtPr/w:text", "multiLine"));
+
+ // Ensure that we have <w:text w:multiLine="0"/>
+ CPPUNIT_ASSERT_EQUAL(OUString("0"), getXPath(pXmlDoc, "/w:document/w:body/w:p[2]/w:sdt/w:sdtPr/w:text", "multiLine"));
+
+ // Ensure that we have <w:text/>
+ getXPath(pXmlDoc, "/w:document/w:body/w:p[3]/w:sdt/w:sdtPr/w:text", "");
+
+ // Ensure that we have no <w:text/> (not quite correct case, but to ensure import/export are okay)
+ xmlXPathObjectPtr pXmlObj = getXPathNode(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtPr/w:text");
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0),
+ static_cast<sal_Int32>(xmlXPathNodeSetGetLength(pXmlObj->nodesetval)));
+ xmlXPathFreeObject(pXmlObj);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf126287, "tdf126287.docx")
+{
+ CPPUNIT_ASSERT_EQUAL(2, getPages());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf137466, "tdf137466.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return; // initial import, no futher checks
+
+ // Ensure that we have <w:placeholder><w:docPart v:val="xxxx"/></w:placeholder>
+ OUString sDocPart = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:placeholder/w:docPart", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("DefaultPlaceholder_-1854013440"), sDocPart);
+
+ // Ensure that we have <w15:color v:val="xxxx"/>
+ OUString sColor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w15:color", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("FF0000"), sColor);
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148111, "tdf148111.docx")
+{
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ std::vector<OUString> aExpectedValues = {
+ // These field values are NOT in order in document: getTextFields did provide
+ // fields in a strange but fixed order
+ "Title", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Placeholder", "Placeholder", "Placeholder",
+ "Placeholder", "Title", "Title", "Title",
+ "Title", "Title", "Title", "Title"
+ };
+
+ sal_uInt16 nIndex = 0;
+ while (xFields->hasMoreElements())
+ {
+ uno::Reference<text::XTextField> xTextField(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(aExpectedValues[nIndex++], xTextField->getPresentation(false));
+ }
+
+ // No more fields
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+}
+
+DECLARE_OOXMLEXPORT_TEST(testTdf148361, "tdf148361.docx")
+{
+ // Refresh fields and ensure cross-reference to numbered para is okay
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+
+ uno::Reference<text::XTextField> xTextField1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("itadmin"), xTextField1->getPresentation(false));
+
+ uno::Reference<text::XTextField> xTextField2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("[Type text]"), xTextField2->getPresentation(false));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testInlineSdtHeader)
+{
+ // Without the accompanying fix in place, this test would have failed with an assertion failure,
+ // we produced not-well-formed XML on save.
+ load(mpTestDocumentPath, "inline-sdt-header.docx");
+ save(OUString::createFromAscii(mpFilter), maTempFile);
+ mbExported = true;
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index c39c7d747b83..38f440966304 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -952,7 +952,7 @@ DECLARE_OOXMLEXPORT_TEST(testSdtContent, "SdtContent.docx")
xmlDocPtr pXmlDoc = parseExport("word/header1.xml");
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:hdr[1]/w:sdt[1]/w:sdtContent[1]/w:p[1]/w:del[1]");
+// assertXPath(pXmlDoc, "/w:hdr[1]/w:sdt[1]/w:sdtContent[1]/w:p[1]/w:del[1]");
}
#if 0
@@ -1070,11 +1070,11 @@ DECLARE_OOXMLEXPORT_TEST(testSimpleSdts, "simple-sdts.docx")
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:text", 1);
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:id", 3);
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:picture", 1);
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:group", 1);
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:citation", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[1]/w:sdt/w:sdtPr/w:text", 1);
+ assertXPath(pXmlDoc, "//*/w:sdt/w:sdtPr/w:id", 5);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt[1]/w:sdtPr/w:picture", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:sdt[2]/w:sdtPr/w:group", 1);
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p[4]/w:sdt/w:sdtPr/w:citation", 1);
}
DECLARE_OOXMLEXPORT_TEST(testEmbeddedExcelChart, "EmbeddedExcelChart.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index cc0295a36294..18cd52b4f5a7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -139,10 +139,10 @@ DECLARE_OOXMLEXPORT_TEST(testAuthorPropertySdt, "author-property.docx")
if (!pXmlDoc)
return;
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", "xpath", "/ns1:coreProperties[1]/ns0:creator[1]");
- assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", "storeItemID","{6C3C8BC8-F283-45AE-878A-BAB7291924A1}");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "xpath", "/ns1:coreProperties[1]/ns0:creator[1]");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "storeItemID","{6C3C8BC8-F283-45AE-878A-BAB7291924A1}");
// FIXME: the next property doesn't match, though it's correct in theory. A bug in assertXPath?
- // assertXPath(pXmlDoc, "/w:document/w:body/w:sdt/w:sdtPr/w:dataBinding", "prefixMappings",
+ // assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "prefixMappings",
// "xmlns:ns0='http://purl.org/dc/elements/1.1/' xmlns:ns1='http://schemas.openxmlformats.org/package/2006/metadata/core-properties'");
}
@@ -535,12 +535,12 @@ DECLARE_OOXMLEXPORT_TEST(testFDO79062, "fdo79062.docx")
xmlDocPtr pXmlFootNotes = parseExport("word/footnotes.xml");
if (!pXmlFootNotes)
return;
- assertXPath(pXmlFootNotes, "/w:footnotes", "Ignorable", "w14 wp14");
+ assertXPath(pXmlFootNotes, "/w:footnotes", "Ignorable", "w14 wp14 w15");
xmlDocPtr pXmlEndNotes = parseExport("word/endnotes.xml");
if (!pXmlEndNotes)
return;
- assertXPath(pXmlEndNotes, "/w:endnotes", "Ignorable", "w14 wp14");
+ assertXPath(pXmlEndNotes, "/w:endnotes", "Ignorable", "w14 wp14 w15");
//tdf#93121 don't add fake tabs in front of extra footnote paragraphs
uno::Reference<text::XFootnotesSupplier> xFootnoteSupp(mxComponent, uno::UNO_QUERY);
@@ -986,8 +986,7 @@ DECLARE_OOXMLEXPORT_TEST(testSdt2Run, "sdt-2-run.docx")
return;
// The problem was that <w:sdt> was closed after "first", not after "second", so the second assert failed.
- assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[1]/w:t", "first");
- assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r[2]/w:t", "second");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtContent/w:r", 1);
// Make sure the third portion is still outside <w:sdt>.
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p[1]/w:r/w:t", "third");
}
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index b673c06a3d2a..824b4f1d7ce2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -672,7 +672,7 @@ DECLARE_OOXMLEXPORT_TEST(testSdtAndShapeOverlapping,"ShapeOverlappingWithSdt.doc
if (!pXmlDoc)
return;
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r[1]/mc:AlternateContent");
- assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]/w:t[1]");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt[1]/w:sdtContent[1]/w:r[1]");
}
DECLARE_OOXMLEXPORT_TEST(testLockedCanvas, "fdo78658.docx")
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index fbe8d9d01421..091a814b291b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -1002,7 +1002,7 @@ DECLARE_OOXMLEXPORT_TEST(testN820509, "n820509.docx")
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
::sw::mark::IFieldmark* pFieldmark = dynamic_cast<::sw::mark::IFieldmark*>(*pMarkAccess->getAllMarksBegin());
@@ -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/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index ece282f437aa..7de2f6502c56 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -1192,6 +1192,13 @@ DECLARE_OOXMLEXPORT_TEST(testActiveXControlAtRunEnd, "activex_control_at_run_end
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AT_CHARACTER,getProperty<text::TextContentAnchorType>(xPropertySet2,"AnchorType"));
}
+DECLARE_OOXMLEXPORT_TEST(testShapeHyperlink, "hyperlinkshape.docx")
+{
+ // Test import/export of hyperlink property on shapes
+ auto xShape(getShape(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), getProperty<OUString>(xShape, "Hyperlink"));
+}
+
DECLARE_OOXMLEXPORT_TEST(testActiveXOptionButtonGroup, "activex_option_button_group.docx")
{
// Optionbutton groups were not handled
@@ -1333,6 +1340,29 @@ DECLARE_OOXMLEXPORT_TEST(testTdf115557, "tdf115557.docx")
assertXPath(pXmlDoc, "//w:footnote/w:p/w:r/w:drawing", 1);
}
+
+CPPUNIT_TEST_FIXTURE(Test, testTextframeHyperlink)
+{
+ // Make sure hyperlink is imported correctly
+ load(mpTestDocumentPath, "docxopenhyperlinkbox.docx");
+ uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+
+ uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("https://libreoffice.org/"), getProperty<OUString>(xFrame, "HyperLinkURL"));
+
+ // FIXME: After save&reload, the text frame should still be a text frame, and the above test should still work.
+ // (Currently the Writer text frame becomes a text box (shape based)). See tdf#140961
+ reload(mpFilter, "docxopenhyperlinkbox.docx");
+
+ xmlDocPtr pXmlDoc = parseExport();
+ // DML
+ assertXPath(pXmlDoc, "//w:drawing/wp:anchor/wp:docPr/a:hlinkClick", 1);
+ // VML
+ assertXPath(pXmlDoc, "//w:pict/v:rect", "href", "https://libreoffice.org/");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 9d89184cde74..255d4444b14d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -11,11 +11,14 @@
#include <xmloff/odffields.hxx>
#include <IDocumentMarkAccess.hxx>
#include <IMark.hxx>
+#include <com/sun/star/text/XTextField.hpp>
+
+char const DATA_DIRECTORY[] = "/sw/qa/extras/ooxmlexport/data/";
class Test : public SwModelTestBase
{
public:
- Test() : SwModelTestBase("/sw/qa/extras/ooxmlexport/data/", "Office Open XML Text") {}
+ Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text") {}
protected:
/**
@@ -477,7 +480,7 @@ DECLARE_OOXMLEXPORT_TEST(testParagraphSdt, "paragraph-sdt.docx")
if (xmlDocPtr pXmlDoc = parseExport())
{
// The path to w:sdt contained a w:p.
- assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc/w:sdt");
+ assertXPath(pXmlDoc, "/w:document/w:body/w:tbl/w:tr/w:tc//w:p/w:sdt");
}
}
@@ -523,7 +526,7 @@ DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
::sw::mark::IDateFieldmark* pFieldmark
= dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
@@ -615,7 +618,8 @@ DECLARE_OOXMLEXPORT_TEST(testSdtCompanyMultipara, "sdt-company-multipara.docx")
if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
{
// This was 3, but multiple paragraphs inside "Company" SDT is now allowed.
- assertXPath(pXmlDoc, "//w:sdtContent/w:p", 1);
+ assertXPath(pXmlDoc, "//w:sdtContent/w:p", 0);
+ assertXPath(pXmlDoc, "//w:sdtContent/w:r", 1);
}
}
@@ -684,7 +688,7 @@ DECLARE_OOXMLEXPORT_TEST( testDateFieldInShape, "date_field_in_shape.docx" )
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
::sw::mark::IDateFieldmark* pFieldmark
= dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
@@ -700,7 +704,7 @@ DECLARE_OOXMLEXPORT_TEST( testDateFieldAtEndOfParagraph, "date_field_at_end_of_p
CPPUNIT_ASSERT(pTextDoc);
SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
IDocumentMarkAccess* pMarkAccess = pDoc->getIDocumentMarkAccess();
- CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pMarkAccess->getAllMarksCount());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pMarkAccess->getAllMarksCount());
::sw::mark::IDateFieldmark* pFieldmark
= dynamic_cast<::sw::mark::IDateFieldmark*>(*pMarkAccess->getAllMarksBegin());
@@ -745,6 +749,87 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf132185, "tdf132185.docx")
assertXPathContent(pXmlDoc, "/w:ftr/w:p/w:r[2]/w:instrText", " PAGE \\* roman ");
}
+DECLARE_OOXMLEXPORT_TEST( testSdtDatePicker, "test_sdt_datepicker.docx" )
+{
+ // Check that roundtrip for date picker field does not lose essential data
+ xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+ if (!pXmlDoc)
+ return; // initial import, no futher checks
+
+ // Placeholder is here
+ OUString sDocPart = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:placeholder/w:docPart", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("DefaultPlaceholder_-1854013437"), sDocPart);
+
+ // Ensure that we have data binding stuff
+ OUString sDBprefix = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "prefixMappings");
+ CPPUNIT_ASSERT_EQUAL(OUString("xmlns:ns0='http://schemas.microsoft.com/vsto/samples' "), sDBprefix);
+
+ OUString sDBxpath = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "xpath");
+ CPPUNIT_ASSERT_EQUAL(OUString("/ns0:employees[1]/ns0:employee[1]/ns0:hireDate[1]"), sDBxpath);
+
+ OUString sDBstoreid = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w:dataBinding", "storeItemID");
+ CPPUNIT_ASSERT_EQUAL(OUString("{241A8A02-7FFD-488D-8827-63FBE74E8BC9}"), sDBstoreid);
+
+ OUString sColor = getXPath(pXmlDoc, "/w:document/w:body/w:p/w:sdt/w:sdtPr/w15:color", "val");
+ CPPUNIT_ASSERT_EQUAL(OUString("008000"), sColor);
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testTdf104823)
+{
+ // Test how we can roundtrip sdt plain text with databindings support
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf104823.docx";
+ loadURL(aURL, nullptr);
+
+ css::uno::Reference<css::text::XTextFieldsSupplier> xTextFieldsSupplier(
+ mxComponent, css::uno::UNO_QUERY_THROW);
+ auto xFields(xTextFieldsSupplier->getTextFields()->createEnumeration());
+
+ // FIXME: seems order of fields is different than in source document
+ // so feel free to modify testcase if order is changed
+
+ // First field: content from core properties
+ uno::Reference<text::XTextField> xField1(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Core Property Value"), xField1->getPresentation(false));
+ uno::Reference<beans::XPropertySet> xField1Props(xField1, uno::UNO_QUERY);
+ xField1Props->setPropertyValue("Content", uno::makeAny(OUString("New Core Property Value")));
+
+ // Third field: content from custom properties
+ uno::Reference<text::XTextField> xField2(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xFields->hasMoreElements());
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Custom XML Value"), xField2->getPresentation(false));
+ uno::Reference<beans::XPropertySet> xField2Props(xField2, uno::UNO_QUERY);
+ xField2Props->setPropertyValue("Content", uno::makeAny(OUString("New Custom XML Value")));
+
+ // Second field: content from extended properties
+ uno::Reference<text::XTextField> xField3(xFields->nextElement(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(!xFields->hasMoreElements());
+ // Check field value (it should be value from data source) and set new
+ CPPUNIT_ASSERT_EQUAL(OUString("True Extended Property Value"), xField3->getPresentation(false));
+ uno::Reference<beans::XPropertySet> xField3Props(xField3, uno::UNO_QUERY);
+ xField3Props->setPropertyValue("Content", uno::makeAny(OUString("New Extended Property Value")));
+
+ // Save and check saved data
+ save("Office Open XML Text", maTempFile);
+ mbExported = true;
+ xmlDocPtr pXmlCustomPropsDoc = parseExport("customXml/item1.xml");
+ CPPUNIT_ASSERT(pXmlCustomPropsDoc);
+ // FIXME: strange it won't run simple /employees/employee/name xpath query. Does not like namespaces?
+ assertXPathContent(pXmlCustomPropsDoc, "//*/*[local-name()='name']", "New Custom XML Value");
+
+ xmlDocPtr pXmlAppPropsDoc = parseExport("docProps/app.xml");
+ CPPUNIT_ASSERT(pXmlAppPropsDoc);
+ // TODO: extended properties are not written yet
+ assertXPathContent(pXmlAppPropsDoc, "//*/*[local-name()='Company']", "True Extended Property Value");
+
+ xmlDocPtr pXmlCorePropsDoc = parseExport("docProps/core.xml");
+ CPPUNIT_ASSERT(pXmlCorePropsDoc);
+ // TODO: core properties are not written yet
+ assertXPathContent(pXmlCorePropsDoc, "//*/*[local-name()='creator']", "True Core Property Value");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
index f6939083c456..ef6aaaebbb09 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
@@ -260,7 +260,7 @@ DECLARE_OOXMLEXPORT_TEST(Test_McIgnorable, "TextEffects_StylisticSets_CntxtAlts.
if (!pXmlDocument)
return;
- assertXPath(pXmlDocument, "/w:document", "Ignorable", "w14 wp14");
+ assertXPath(pXmlDocument, "/w:document", "Ignorable", "w14 wp14 w15");
xmlDocPtr pXmlStyles = parseExport("word/styles.xml");
if (!pXmlStyles)
diff --git a/sw/qa/extras/ooxmlimport/data/tdf126426.docx b/sw/qa/extras/ooxmlimport/data/tdf126426.docx
new file mode 100644
index 000000000000..d77051365ca2
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tdf126426.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
index 4b69a62859c6..acf1a0bc2626 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx
@@ -19,6 +19,7 @@
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/style/BreakType.hpp>
#include <xmloff/odffields.hxx>
#include <IDocumentMarkAccess.hxx>
@@ -583,6 +584,37 @@ DECLARE_OOXMLIMPORT_TEST(testTdf129912, "tdf129912.docx")
}
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf126426)
+{
+ load(mpTestDocumentPath, "tdf126426.docx");
+
+ uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xGroup->getCount());
+
+ // get second shape in group
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xGroup->getByIndex(1),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+
+ uno::Reference<text::XTextRange> xPara(xParaEnum->nextElement(), uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xPara, uno::UNO_QUERY_THROW);
+
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ {
+ // Text before: was before this bugfix
+ uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("Some text "), xRun->getString());
+ }
+ {
+ // Link and this content was completely missong before
+ uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(OUString("Link"), xRun->getString());
+ auto xURLField = getProperty<uno::Reference<text::XTextField>>(xRun, "TextField");
+ auto aURL = getProperty<OUString>(xURLField, "URL");
+ CPPUNIT_ASSERT_EQUAL(OUString("http://libreoffice.org/"), aURL);
+ }
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index e6b624a5cb1e..04ece78d298f 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -2138,7 +2138,7 @@ void SwTiledRenderingTest::testRedlineField()
SwDateTimeField aDate(static_cast<SwDateTimeFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::DateTime)));
//aDate->SetDateTime(::DateTime(::DateTime::SYSTEM));
- pWrtShell->Insert(aDate);
+ pWrtShell->InsertField2(aDate);
// Get the redline just created
const SwRedlineTable& rTable = pWrtShell->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable();
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/forum-mso-en-13192-min.docx b/sw/qa/extras/uiwriter/data/forum-mso-en-13192-min.docx
new file mode 100644
index 000000000000..0d44a3c2d15c
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/forum-mso-en-13192-min.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/tdf129270.odt b/sw/qa/extras/uiwriter/data2/tdf129270.odt
new file mode 100644
index 000000000000..e86c1f872153
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data2/tdf129270.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/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 7e28d0f57ead..d01f6260c8fe 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -129,6 +129,9 @@
#include <iodetect.hxx>
#include <wrthtml.hxx>
#include <dbmgr.hxx>
+#include <swdtflvr.hxx>
+#include <sortedobjs.hxx>
+#include <txtfrm.hxx>
namespace
{
@@ -590,7 +593,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);
};
@@ -1271,7 +1274,7 @@ void SwUiWriterTest::testFdo74981()
SwDoc* pDoc = createDoc();
SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::Input)), "foo", "bar", 0, 0);
- pWrtShell->Insert(aField);
+ pWrtShell->InsertField2(aField);
{
// expect hints
@@ -1302,10 +1305,10 @@ void SwUiWriterTest::testTdf98512()
SwInputFieldType *const pType(static_cast<SwInputFieldType*>(
pWrtShell->GetFieldType(0, SwFieldIds::Input)));
SwInputField aField1(pType, "foo", "bar", INP_TXT, 0);
- pWrtShell->Insert(aField1);
+ pWrtShell->InsertField2(aField1);
pWrtShell->SttEndDoc(/*bStt=*/true);
SwInputField aField2(pType, "baz", "quux", INP_TXT, 0);
- pWrtShell->Insert(aField2);
+ pWrtShell->InsertField2(aField2);
pWrtShell->SttEndDoc(/*bStt=*/true);
pWrtShell->SetMark();
pWrtShell->SttEndDoc(/*bStt=*/false);
@@ -1783,7 +1786,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());
@@ -2001,7 +2004,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());
@@ -2756,14 +2759,14 @@ void SwUiWriterTest::testTdf77342()
pWrtShell->StartOfSection();
//inserting reference field 1
SwGetRefField aField1(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT);
- pWrtShell->Insert(aField1);
+ pWrtShell->InsertField2(aField1);
//inserting second footnote
pWrtShell->InsertFootnote("");
pWrtShell->StartOfSection();
pCursor->Move(fnMoveForward);
//inserting reference field 2
SwGetRefField aField2(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT);
- pWrtShell->Insert(aField2);
+ pWrtShell->InsertField2(aField2);
//inserting third footnote
pWrtShell->InsertFootnote("");
pWrtShell->StartOfSection();
@@ -2771,7 +2774,7 @@ void SwUiWriterTest::testTdf77342()
pCursor->Move(fnMoveForward);
//inserting reference field 3
SwGetRefField aField3(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT);
- pWrtShell->Insert(aField3);
+ pWrtShell->InsertField2(aField3);
//updating the fields
IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess());
rField.UpdateExpFields(nullptr, true);
@@ -2992,38 +2995,38 @@ void SwUiWriterTest::testTdf63553()
//inserting sequence field 1
SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(pWrtShell->GetFieldType(SwFieldIds::SetExp, "Illustration"));
SwSetExpField aSetField1(pSeqType, "", SVX_NUM_ARABIC);
- pWrtShell->Insert(aSetField1);
+ pWrtShell->InsertField2(aSetField1);
SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::GetRef));
//moving cursor to the starting of document
pWrtShell->StartOfSection();
//inserting reference field 1
SwGetRefField aGetField1(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(0), REF_CONTENT);
- pWrtShell->Insert(aGetField1);
+ pWrtShell->InsertField2(aGetField1);
//now we have ref1-seq1
//moving the cursor
pCursor->Move(fnMoveForward);
//inserting sequence field 2
SwSetExpField aSetField2(pSeqType, "", SVX_NUM_ARABIC);
- pWrtShell->Insert(aSetField2);
+ pWrtShell->InsertField2(aSetField2);
//moving the cursor
pWrtShell->StartOfSection();
pCursor->Move(fnMoveForward);
//inserting reference field 2
SwGetRefField aGetField2(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(1), REF_CONTENT);
- pWrtShell->Insert(aGetField2);
+ pWrtShell->InsertField2(aGetField2);
//now we have ref1-ref2-seq1-seq2
//moving the cursor
pCursor->Move(fnMoveForward);
pCursor->Move(fnMoveForward);
//inserting sequence field 3
SwSetExpField aSetField3(pSeqType, "", SVX_NUM_ARABIC);
- pWrtShell->Insert(aSetField3);
+ pWrtShell->InsertField2(aSetField3);
pWrtShell->StartOfSection();
pCursor->Move(fnMoveForward);
pCursor->Move(fnMoveForward);
//inserting reference field 3
SwGetRefField aGetField3(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(2), REF_CONTENT);
- pWrtShell->Insert(aGetField3);
+ pWrtShell->InsertField2(aGetField3);
//now after insertion we have ref1-ref2-ref3-seq1-seq2-seq3
//updating the fields
IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess());
@@ -3831,7 +3834,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));
@@ -3845,7 +3848,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));
@@ -3888,7 +3891,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));
@@ -4147,6 +4150,229 @@ static void lcl_dispatchCommand(const uno::Reference<lang::XComponent>& xCompone
xDispatchHelper->executeDispatch(xFrame, rCommand, OUString(), 0, rPropertyValues);
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf149548)
+{
+ SwDoc* pDoc = createDoc("forum-mso-en-13192-min.docx");
+
+ for (SwRangeRedline const*const pRedline : pDoc->getIDocumentRedlineAccess().GetRedlineTable())
+ {
+ if (pRedline->GetType() == RedlineType::Delete)
+ {
+ int nLevel(0);
+ for (SwNodeIndex index = pRedline->Start()->nNode; index <= pRedline->End()->nNode; ++index)
+ {
+ switch (index.GetNode().GetNodeType())
+ {
+ case SwNodeType::Start:
+ case SwNodeType::Table:
+ case SwNodeType::Section:
+ ++nLevel;
+ break;
+ case SwNodeType::End:
+ CPPUNIT_ASSERT_MESSAGE("bad overlapping redline", nLevel != 0);
+ --nLevel;
+ break;
+ default:
+ break;
+ }
+ }
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("bad overlapping redline", int(0), nLevel);
+ }
+ }
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ lcl_dispatchCommand(mxComponent, ".uno:SelectAll", {});
+
+ rtl::Reference<SwTransferable> pTransfer = new SwTransferable(*pWrtShell);
+ pTransfer->Copy();
+
+ TransferableDataHelper aHelper(pTransfer.get());
+ // this was a use-after-free on nodes deleted by Copy
+ SwTransferable::Paste(*pWrtShell, aHelper);
+}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf149595)
+{
+ SwDoc* pDoc = createDoc("demo91.fodt");
+
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ // 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)
{
load(DATA_DIRECTORY, "tdf134252.fodt");
@@ -7131,7 +7357,7 @@ void SwUiWriterTest::testTdf115013()
// Insert the field into document
SwDBField aField(pFieldType);
- pWrtShell->Insert(aField);
+ pWrtShell->InsertField2(aField);
}
// Save it as DOCX & load it again
reload("Office Open XML Text", "mm-field.docx");
@@ -7640,6 +7866,25 @@ 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");
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index f50a2ebe6959..1418ddd0ae51 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -28,6 +28,7 @@
#include <wrtsh.hxx>
#include <IDocumentRedlineAccess.hxx>
#include <flyfrm.hxx>
+#include <pagefrm.hxx>
#include <fmtanchr.hxx>
#include <UndoManager.hxx>
#include <sortedobjs.hxx>
@@ -391,6 +392,120 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineSplitContentNode)
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());
@@ -471,6 +586,69 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf137245)
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");
@@ -643,6 +821,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");
@@ -763,6 +1173,36 @@ 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();
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), 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:
@@ -963,6 +1403,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();
@@ -1061,6 +1539,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");
@@ -2806,4 +3360,28 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf129655)
xmlDocPtr pXmlDoc = parseLayoutDump();
assertXPath(pXmlDoc, "//fly/txt[@WritingMode='Vertical']", 1);
}
+
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf129270)
+{
+ SwDoc* pDoc = createDoc("tdf129270.odt");
+ CPPUNIT_ASSERT(pDoc);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ CPPUNIT_ASSERT(pWrtShell);
+ SwXTextDocument* pXTextDocument = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXTextDocument);
+
+ // Go to document end
+ pWrtShell->SttEndDoc(/*bStt=*/false);
+
+ // Press enter
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // Numbering for previous outline should remain the same "2"
+ CPPUNIT_ASSERT_EQUAL(OUString("2"), getProperty<OUString>(getParagraph(4), "ListLabelString"));
+
+ // Numbering for newly created outline should be "2.1"
+ CPPUNIT_ASSERT_EQUAL(OUString("2.1"),
+ getProperty<OUString>(getParagraph(5), "ListLabelString"));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index a265bb29e728..985d1171ac4d 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -737,6 +737,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..207198f0d703 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
@@ -955,6 +963,7 @@ protected:
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("pic"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/picture"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("rels"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/relationships"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w14"), BAD_CAST("http://schemas.microsoft.com/office/word/2010/wordml"));
+ xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("w15"), BAD_CAST("http://schemas.microsoft.com/office/word/2012/wordml"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("m"), BAD_CAST("http://schemas.openxmlformats.org/officeDocument/2006/math"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("ContentType"), BAD_CAST("http://schemas.openxmlformats.org/package/2006/content-types"));
xmlXPathRegisterNs(pXmlXpathCtx, BAD_CAST("lc"), BAD_CAST("http://schemas.openxmlformats.org/drawingml/2006/lockedCanvas"));
diff --git a/sw/qa/python/check_table.py b/sw/qa/python/check_table.py
index 9cb3b829d4d3..9ddae06540f6 100644
--- a/sw/qa/python/check_table.py
+++ b/sw/qa/python/check_table.py
@@ -35,7 +35,7 @@ class CheckTable(unittest.TestCase):
def setUpClass(cls):
cls._uno = UnoInProcess()
cls._uno.setUp()
- cls.OOLineHairline = 2
+ cls.OOLineVeryThin = 18
@classmethod
def tearDownClass(cls):
@@ -44,13 +44,13 @@ class CheckTable(unittest.TestCase):
def __test_borderAsserts(self, xBorderLine, line_valid):
self.assertTrue(line_valid)
self.assertEqual(0, xBorderLine.InnerLineWidth)
- self.assertEqual(self.OOLineHairline, xBorderLine.OuterLineWidth)
+ self.assertEqual(self.OOLineVeryThin, xBorderLine.OuterLineWidth)
self.assertEqual(0, xBorderLine.LineDistance)
self.assertEqual(0, xBorderLine.Color)
def __test_borderAssertsWithLineStyle(self, xBorderLine, line_valid):
self.__test_borderAsserts(xBorderLine, line_valid)
- self.assertEqual(self.OOLineHairline, xBorderLine.LineWidth)
+ self.assertEqual(self.OOLineVeryThin, xBorderLine.LineWidth)
self.assertEqual(SOLID, xBorderLine.LineStyle)
def __test_borderDistance(self, border):
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_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/sdi/_drwbase.sdi b/sw/sdi/_drwbase.sdi
index eae02c15312c..6c700380ed10 100644
--- a/sw/sdi/_drwbase.sdi
+++ b/sw/sdi/_drwbase.sdi
@@ -117,5 +117,44 @@ interface BaseTextDrawBase
StateMethod = GetState ;
DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
]
+ SID_OPEN_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+ SID_EDIT_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+ SID_HYPERLINK_DIALOG
+ [
+ ExecMethod = Execute;
+ StateMethod = GetState;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+ SID_HYPERLINK_SETLINK // status()
+ [
+ ExecMethod = Execute ;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+ SID_HYPERLINK_GETLINK // status()
+ [
+ StateMethod = GetState ;
+ ]
+ SID_REMOVE_HYPERLINK
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
+ SID_COPY_HYPERLINK_LOCATION
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
}
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/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/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index ea11fad3d2cc..1deeb7e1f067 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -54,7 +54,7 @@ namespace sw { namespace mark
SwTextNode *pTextNode = GetMarkEnd().nNode.GetNode().GetTextNode();
assert(pTextNode);
SwTextField *const pTextField = pTextNode->GetFieldTextAttrAt(
- GetMarkEnd().nContent.GetIndex()-1, true);
+ GetMarkEnd().nContent.GetIndex()-1, ::sw::GetTextAttrMode::Default);
assert(pTextField != nullptr);
auto pPostItField
= dynamic_cast<const SwPostItField*>(pTextField->GetFormatField().GetField());
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index a16713dc295d..fad65a238147 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -25,6 +25,7 @@
#include <doc.hxx>
#include <ndtxt.hxx>
#include <pam.hxx>
+#include <hints.hxx>
#include <swserv.hxx>
#include <sfx2/linkmgr.hxx>
#include <UndoBookmark.hxx>
@@ -238,6 +239,12 @@ namespace
io_pDoc->GetIDocumentUndoRedo().EndUndo(SwUndoId::UI_REPLACE, nullptr);
};
+
+ auto InvalidatePosition(SwPosition const& rPos) -> void
+ {
+ SwUpdateAttr const hint(rPos.nContent.GetIndex(), rPos.nContent.GetIndex(), 0);
+ rPos.nNode.GetNode().GetTextNode()->NotifyClients(nullptr, &hint);
+ }
}
namespace sw { namespace mark
@@ -337,6 +344,11 @@ namespace sw { namespace mark
}
// TODO: everything else uses MarkBase::GenerateNewName ?
+
+ auto MarkBase::InvalidateFrames() -> void
+ {
+ }
+
NavigatorReminder::NavigatorReminder(const SwPaM& rPaM)
: MarkBase(rPaM, "__NavigatorReminder__")
{ }
@@ -393,6 +405,7 @@ namespace sw { namespace mark
std::make_unique<SwUndoInsBookmark>(*this));
}
io_pDoc->getIDocumentState().SetModified();
+ InvalidateFrames();
}
void Bookmark::DeregisterFromDoc(SwDoc* const io_pDoc)
@@ -405,6 +418,36 @@ namespace sw { namespace mark
std::make_unique<SwUndoDeleteBookmark>(*this));
}
io_pDoc->getIDocumentState().SetModified();
+ InvalidateFrames();
+ }
+
+ // invalidate text frames in case it's hidden or Formatting Marks enabled
+ auto Bookmark::InvalidateFrames() -> void
+ {
+ InvalidatePosition(GetMarkPos());
+ if (IsExpanded())
+ {
+ InvalidatePosition(GetOtherMarkPos());
+ }
+ }
+
+ 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;
+ // don't eval condition here yet - probably only needed for
+ // UI editing condition and that doesn't exist yet
+ }
}
::sfx2::IXmlIdRegistry& Bookmark::GetRegistry()
@@ -513,6 +556,8 @@ namespace sw { namespace mark
if (eMode == sw::mark::InsertMode::New)
{
lcl_SetFieldMarks(this, io_pDoc, CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDEND, pSepPos);
+ // no need to invalidate text frames here, the insertion of the
+ // CH_TXT_ATR already invalidates
}
else
{
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 0d8d273f34be..bf3f1718e67c 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2244,7 +2244,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)
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 7df0ce6ff323..0c53e6448b46 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -774,7 +774,7 @@ bool SwCursorShell::MoveFieldType(
SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode();
OSL_ENSURE( pTNd, "No ContentNode" );
- SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true );
+ SwTextField * pTextField = pTNd->GetFieldTextAttrAt(rPos.nContent.GetIndex(), ::sw::GetTextAttrMode::Default);
const bool bDelField = ( pTextField == nullptr );
sal_Int32 nContentOffset = -1;
@@ -878,14 +878,14 @@ bool SwCursorShell::GotoFormatField( const SwFormatField& rField )
SwTextField * SwCursorShell::GetTextFieldAtPos(
const SwPosition* pPos,
- const bool bIncludeInputFieldAtStart )
+ ::sw::GetTextAttrMode const eMode)
{
SwTextField* pTextField = nullptr;
SwTextNode * const pNode = pPos->nNode.GetNode().GetTextNode();
if ( pNode != nullptr )
{
- pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), bIncludeInputFieldAtStart );
+ pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), eMode);
}
return pTextField;
@@ -893,11 +893,11 @@ SwTextField * SwCursorShell::GetTextFieldAtPos(
SwTextField* SwCursorShell::GetTextFieldAtCursor(
const SwPaM* pCursor,
- const bool bIncludeInputFieldAtStart )
+ ::sw::GetTextAttrMode const eMode)
{
SwTextField* pFieldAtCursor = nullptr;
- SwTextField* pTextField = GetTextFieldAtPos( pCursor->Start(), bIncludeInputFieldAtStart );
+ SwTextField* pTextField = GetTextFieldAtPos(pCursor->Start(), eMode);
if ( pTextField != nullptr
&& pCursor->Start()->nNode == pCursor->End()->nNode )
{
@@ -918,7 +918,8 @@ SwField* SwCursorShell::GetFieldAtCursor(
const SwPaM *const pCursor,
const bool bIncludeInputFieldAtStart)
{
- SwTextField *const pField(GetTextFieldAtCursor(pCursor, bIncludeInputFieldAtStart));
+ SwTextField *const pField(GetTextFieldAtCursor(pCursor,
+ bIncludeInputFieldAtStart ? ::sw::GetTextAttrMode::Default : ::sw::GetTextAttrMode::Expand));
return pField
? const_cast<SwField*>(pField->GetFormatField().GetField())
: nullptr;
@@ -949,7 +950,7 @@ bool SwCursorShell::CursorInsideInputField() const
{
for(SwPaM& rCursor : GetCursor()->GetRingContainer())
{
- if (dynamic_cast<const SwTextInputField*>(GetTextFieldAtCursor(&rCursor, true)))
+ if (dynamic_cast<const SwTextInputField*>(GetTextFieldAtCursor(&rCursor, ::sw::GetTextAttrMode::Parent)))
return true;
}
return false;
@@ -957,7 +958,7 @@ bool SwCursorShell::CursorInsideInputField() const
bool SwCursorShell::PosInsideInputField( const SwPosition& rPos )
{
- return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, false )) != nullptr;
+ return dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos(&rPos, ::sw::GetTextAttrMode::Parent)) != nullptr;
}
bool SwCursorShell::DocPtInsideInputField( const Point& rDocPt ) const
@@ -973,7 +974,7 @@ bool SwCursorShell::DocPtInsideInputField( const Point& rDocPt ) const
sal_Int32 SwCursorShell::StartOfInputFieldAtPos( const SwPosition& rPos )
{
- const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos(&rPos, ::sw::GetTextAttrMode::Default));
assert(pTextInputField != nullptr
&& "<SwEditShell::StartOfInputFieldAtPos(..)> - no Input Field at given position");
return pTextInputField->GetStart();
@@ -981,7 +982,7 @@ sal_Int32 SwCursorShell::StartOfInputFieldAtPos( const SwPosition& rPos )
sal_Int32 SwCursorShell::EndOfInputFieldAtPos( const SwPosition& rPos )
{
- const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos( &rPos, true ));
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextFieldAtPos(&rPos, ::sw::GetTextAttrMode::Default));
assert(pTextInputField != nullptr
&& "<SwEditShell::EndOfInputFieldAtPos(..)> - no Input Field at given position");
return *(pTextInputField->End());
@@ -1930,7 +1931,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 +1955,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 )
@@ -1970,14 +2008,14 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich,
pTextAttr = pTextNd
? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(),
nWhich,
- bExpand ? SwTextNode::EXPAND : SwTextNode::DEFAULT)
+ bExpand ? ::sw::GetTextAttrMode::Expand : ::sw::GetTextAttrMode::Default)
: nullptr;
}
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/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 19d47dcec68e..98a3b9682442 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -210,7 +210,7 @@ namespace
SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode();
if (!pTextNd)
return nullptr;
- return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT);
+ return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent);
}
}
@@ -1790,7 +1790,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode,
SwTextNode const*const pNode(GetPoint()->nNode.GetNode().GetTextNode());
assert(pNode);
SwTextAttr const*const pInputField(pNode->GetTextAttrAt(
- GetPoint()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT));
+ GetPoint()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent));
if (pInputField)
{
continue; // skip over input fields
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 5aa804d364b0..4c4bbd682056 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -422,7 +422,7 @@ void SwSelPaintRects::HighlightInputField()
if (m_bShowTextInputFieldOverlay)
{
SwTextInputField* pCurTextInputFieldAtCursor =
- dynamic_cast<SwTextInputField*>(SwCursorShell::GetTextFieldAtPos( GetShell()->GetCursor()->Start(), false ));
+ dynamic_cast<SwTextInputField*>(SwCursorShell::GetTextFieldAtPos( GetShell()->GetCursor()->Start(), ::sw::GetTextAttrMode::Expand));
if ( pCurTextInputFieldAtCursor != nullptr )
{
SwTextNode* pTextNode = pCurTextInputFieldAtCursor->GetpTextNode();
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 0199260aa6cf..975a35965d17 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -387,7 +387,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 +618,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 +628,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 +652,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 +662,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 +937,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);
}
@@ -1994,7 +1998,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,7 +2009,7 @@ void DocumentContentOperationsManager::DeleteDummyChar(
void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam )
{
- lcl_DoWithBreaks( *this, rPam, &DocumentContentOperationsManager::DeleteRangeImpl );
+ lcl_DoWithBreaks(*this, rPam, SwDeleteFlags::Default, &DocumentContentOperationsManager::DeleteRangeImpl);
if (!m_rDoc.getIDocumentRedlineAccess().IsIgnoreRedline()
&& !m_rDoc.getIDocumentRedlineAccess().GetRedlineTable().empty())
@@ -2108,7 +2112,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 );
@@ -2131,6 +2135,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
{
@@ -2172,13 +2207,13 @@ 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 );
@@ -3311,8 +3346,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);
@@ -3447,21 +3482,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
@@ -3873,7 +3915,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());
@@ -3953,7 +3995,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
@@ -4014,7 +4056,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;
@@ -4026,7 +4068,7 @@ bool DocumentContentOperationsManager::DeleteAndJoinImpl( SwPaM & rPam,
}
{
- bool const bSuccess( DeleteRangeImpl( rPam ) );
+ bool const bSuccess( DeleteRangeImpl(rPam, flags) );
if (!bSuccess)
return false;
}
@@ -4045,14 +4087,14 @@ 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() );
- 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();
@@ -4061,7 +4103,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();
@@ -4126,7 +4168,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();
@@ -4138,8 +4180,11 @@ 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,
@@ -4272,7 +4317,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt
// the other views out of the deletion range.
// Except for itself!
SwPaM aDelPam( *rPam.GetMark(), *rPam.GetPoint() );
- ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() );
+ ::PaMCorrAbs( aDelPam, *aDelPam.End() );
SwPosition *pStt = aDelPam.Start(),
*pEnd = aDelPam.End();
@@ -4376,12 +4421,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())
@@ -4404,8 +4463,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;
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx
index 134d8cab9968..b696734c6899 100644
--- a/sw/source/core/doc/DocumentFieldsManager.cxx
+++ b/sw/source/core/doc/DocumentFieldsManager.cxx
@@ -1052,6 +1052,17 @@ void DocumentFieldsManager::UpdateExpFieldsImpl(
}
continue;
}
+ ::sw::mark::IBookmark *const pBookmark(
+ const_cast<::sw::mark::IBookmark *>(it->GetBookmark()));
+ if (pBookmark)
+ {
+ SwSbxValue const aValue(aCalc.Calculate(pBookmark->GetHideCondition()));
+ if (!aValue.IsVoidValue())
+ {
+ pBookmark->Hide(aValue.GetBool());
+ }
+ continue;
+ }
SwTextField* pTextField = const_cast<SwTextField*>(it->GetTextField());
if( !pTextField )
@@ -1743,7 +1754,7 @@ SwTextField * DocumentFieldsManager::GetTextFieldAtPos(const SwPosition & rPos)
SwTextNode * const pNode = rPos.nNode.GetNode().GetTextNode();
return (pNode != nullptr)
- ? pNode->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true )
+ ? pNode->GetFieldTextAttrAt(rPos.nContent.GetIndex(), ::sw::GetTextAttrMode::Default)
: nullptr;
}
diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx
index ff9b05743d10..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);
@@ -301,6 +307,8 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam)
pFrame->SetMergedPara(sw::CheckParaRedlineMerge(
*pFrame, rFirstNode, eMode));
eMode = sw::FrameMode::New; // Existing is not idempotent!
+ // update pNode so MakeFrames starts on 2nd node
+ pNode = &rFirstNode;
}
}
if (pLast != pNode)
@@ -2317,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/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx
index 767af3a22010..b5bb128629e6 100644
--- a/sw/source/core/doc/DocumentStylePoolManager.cxx
+++ b/sw/source/core/doc/DocumentStylePoolManager.cxx
@@ -1588,7 +1588,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
aSet.Put( SwFormatHoriOrient( 0, text::HoriOrientation::CENTER, text::RelOrientation::PRINT_AREA ) );
aSet.Put( SwFormatVertOrient( 0, text::VertOrientation::TOP, text::RelOrientation::PRINT_AREA ) );
Color aCol( COL_BLACK );
- SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
+ SvxBorderLine aLine( &aCol, SvxBorderLineWidth::Hairline );
SvxBoxItem aBox( RES_BOX );
aBox.SetLine( &aLine, SvxBoxItemLine::TOP );
aBox.SetLine( &aLine, SvxBoxItemLine::BOTTOM );
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index a9eed445a21c..e9fde5afcd5e 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -561,6 +561,18 @@ namespace sw { namespace mark
pPos2->nContent.GetIndex());
}
#endif
+ if ( (!rPaM.GetPoint()->nNode.GetNode().IsTextNode()
+ && (eType != MarkType::UNO_BOOKMARK
+ // SwXTextRange can be on table node or plain start node (FLY_AT_FLY)
+ || !rPaM.GetPoint()->nNode.GetNode().IsStartNode()))
+ || (!rPaM.GetMark()->nNode.GetNode().IsTextNode()
+ && (eType != MarkType::UNO_BOOKMARK
+ || !rPaM.GetMark()->nNode.GetNode().IsStartNode())))
+ {
+ SAL_WARN("sw.core", "MarkManager::makeMark(..)"
+ " - refusing to create mark on non-textnode");
+ return nullptr;
+ }
// There should only be one CrossRefBookmark per Textnode per Type
if ((eType == MarkType::CROSSREF_NUMITEM_BOOKMARK || eType == MarkType::CROSSREF_HEADING_BOOKMARK)
&& (lcl_FindMarkAtPos(m_vBookmarks, *rPaM.Start(), eType) != m_vBookmarks.end()))
@@ -809,6 +821,8 @@ namespace sw { namespace mark
if (!pMarkBase)
return;
+ pMarkBase->InvalidateFrames();
+
pMarkBase->SetMarkPos(*(rPaM.GetPoint()));
if(rPaM.HasMark())
pMarkBase->SetOtherMarkPos(*(rPaM.GetMark()));
@@ -818,6 +832,8 @@ namespace sw { namespace mark
if(pMarkBase->GetMarkPos() != pMarkBase->GetMarkStart())
pMarkBase->Swap();
+ pMarkBase->InvalidateFrames();
+
sortMarks();
}
@@ -1111,7 +1127,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
@@ -1130,8 +1146,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);
}
@@ -1141,12 +1158,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())
@@ -1184,7 +1204,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
{
@@ -1241,7 +1261,7 @@ namespace sw { namespace mark
for ( ; it != endIt; ++it)
if (*it == pMark)
{
- deleteMark(iterator(it));
+ deleteMark(iterator(it), false);
break;
}
}
@@ -1340,7 +1360,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)
@@ -1703,7 +1723,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);
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index b602c92afd14..f31dd1f73088 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -110,9 +110,30 @@ void SwDoc::UpdateCharts_( const SwTable& rTable, SwViewShell const & rVSh ) con
aName == pONd->GetChartTableName() &&
pONd->getLayoutFrame( rVSh.GetLayout() ) )
{
+ // tdf#122995 for OLE/Charts in SW we do not (yet) have a refresh
+ // mechanism or embedding of the primitive representation, so this
+ // needs to be done locally here (simplest solution).
+ bool bImmediateMode(false);
+
+ if(pONd->IsChart())
+ {
+ // refresh to trigger repaint
+ const SwRect aChartRect(pONd->FindLayoutRect());
+ if(!aChartRect.IsEmpty())
+ const_cast<SwViewShell &>(rVSh).InvalidateWindows(aChartRect);
+
+ // forced refresh of the chart's primitive representation
+ pONd->GetOLEObj().resetBufferedData();
+
+ // InvalidateTable using the Immediate-Mode, else the chart will
+ // not yet know that it is invalidated at the next repaint and create
+ // the same graphical representation again
+ bImmediateMode = true;
+ }
+
SwChartDataProvider *pPCD = getIDocumentChartDataProviderAccess().GetChartDataProvider();
if (pPCD)
- pPCD->InvalidateTable( &rTable );
+ pPCD->InvalidateTable( &rTable, bImmediateMode );
// following this the framework will now take care of repainting
// the chart or it's replacement image...
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 1b93a7a56a78..d6072b4b3725 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)
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 8b5f7d467328..c027003c4e97 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -26,6 +26,7 @@
#include <unotools/transliterationwrapper.hxx>
#include <doc.hxx>
#include <IDocumentFieldsAccess.hxx>
+#include <IDocumentMarkAccess.hxx>
#include <IDocumentState.hxx>
#include <IDocumentLayoutAccess.hxx>
#include <cntfrm.hxx>
@@ -103,6 +104,24 @@ SetGetExpField::SetGetExpField( const SwSectionNode& rSectNd,
}
}
+SetGetExpField::SetGetExpField(::sw::mark::IBookmark const& rBookmark,
+ SwPosition const*const pPos)
+{
+ m_eSetGetExpFieldType = BOOKMARK;
+ m_CNTNT.pBookmark = &rBookmark;
+
+ if (pPos)
+ {
+ m_nNode = pPos->nNode.GetIndex();
+ m_nContent = pPos->nContent.GetIndex();
+ }
+ else
+ {
+ m_nNode = rBookmark.GetMarkStart().nNode.GetIndex();
+ m_nContent = rBookmark.GetMarkStart().nContent.GetIndex();;
+ }
+}
+
SetGetExpField::SetGetExpField( const SwTableBox& rTBox )
{
m_eSetGetExpFieldType = TABLEBOX;
@@ -272,6 +291,10 @@ const SwNode* SetGetExpField::GetNodeFromContent() const
pRet = m_CNTNT.pSection->GetFormat()->GetSectionNode();
break;
+ case BOOKMARK:
+ pRet = &m_CNTNT.pBookmark->GetMarkStart().nNode.GetNode();
+ break;
+
case CRSRPOS:
pRet = &m_CNTNT.pPos->nNode.GetNode();
break;
@@ -313,6 +336,9 @@ sal_Int32 SetGetExpField::GetCntPosFromContent() const
case TEXTTOXMARK:
nRet = m_CNTNT.pTextTOX->GetStart();
break;
+ case BOOKMARK:
+ nRet = m_CNTNT.pBookmark->GetMarkStart().nContent.GetIndex();
+ break;
case CRSRPOS:
nRet = m_CNTNT.pPos->nContent.GetIndex();
break;
@@ -863,7 +889,20 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode )
// add all to the list so that they are sorted
for (const auto &nId : aTmpArr)
{
- GetBodyNode( *rDoc.GetNodes()[ nId ]->GetSectionNode() );
+ SwSectionNode const& rSectionNode(*rDoc.GetNodes()[ nId ]->GetSectionNode());
+ GetBodyNodeGeneric(rSectionNode, rSectionNode);
+ }
+
+ // bookmarks with hide conditions, handle similar to sections
+ auto const& rIDMA(*rDoc.getIDocumentMarkAccess());
+ for (auto it = rIDMA.getBookmarksBegin(); it != rIDMA.getBookmarksEnd(); ++it)
+ {
+ auto const pBookmark(dynamic_cast<::sw::mark::IBookmark const*>(*it));
+ assert(pBookmark);
+ if (!pBookmark->GetHideCondition().isEmpty())
+ {
+ GetBodyNodeGeneric((*it)->GetMarkStart().nNode.GetNode(), *pBookmark);
+ }
}
}
@@ -1040,19 +1079,22 @@ void SwDocUpdateField::GetBodyNode( const SwTextField& rTField, SwFieldIds nFiel
m_pFieldSortList->insert( std::move(pNew) );
}
-void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd )
+template<typename T>
+void SwDocUpdateField::GetBodyNodeGeneric(SwNode const& rNode, T const& rCond)
{
- const SwDoc& rDoc = *rSectNd.GetDoc();
+ const SwDoc& rDoc = *rNode.GetDoc();
std::unique_ptr<SetGetExpField> pNew;
- if( rSectNd.GetIndex() < rDoc.GetNodes().GetEndOfExtras().GetIndex() )
+ if (rNode.GetIndex() < rDoc.GetNodes().GetEndOfExtras().GetIndex())
{
do { // middle check loop
// we need to get the anchor first
// create index to determine the TextNode
- SwPosition aPos( rSectNd );
- SwContentNode* pCNd = rDoc.GetNodes().GoNext( &aPos.nNode ); // to the next ContentNode
+ SwPosition aPos(rNode);
+ SwContentNode const*const pCNd = rNode.IsSectionNode()
+ ? rDoc.GetNodes().GoNext(&aPos.nNode) // to the next ContentNode
+ : rNode.GetContentNode();
if( !pCNd || !pCNd->IsTextNode() )
break;
@@ -1068,13 +1110,13 @@ void SwDocUpdateField::GetBodyNode( const SwSectionNode& rSectNd )
bool const bResult = GetBodyTextNode( rDoc, aPos, *pFrame );
OSL_ENSURE(bResult, "where is the Field");
- pNew.reset(new SetGetExpField( rSectNd, &aPos ));
+ pNew.reset(new SetGetExpField(rCond, &aPos));
} while( false );
}
if( !pNew )
- pNew.reset(new SetGetExpField( rSectNd ));
+ pNew.reset(new SetGetExpField(rCond));
m_pFieldSortList->insert( std::move(pNew) );
}
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/docredln.cxx b/sw/source/core/doc/docredln.cxx
index ee8e8b23d8c0..66c6af16f4c9 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1784,7 +1784,7 @@ OUString SwRangeRedline::GetDescr()
OUString sDescr = DenoteSpecialCharacters(pPaM->GetText());
if (const SwTextNode *pTextNode = pPaM->GetNode().GetTextNode())
{
- if (const SwTextAttr* pTextAttr = pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->nContent.GetIndex() - 1, true ))
+ if (const SwTextAttr* pTextAttr = pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->nContent.GetIndex() - 1, ::sw::GetTextAttrMode::Default))
{
sDescr = SwResId(STR_START_QUOTE)
+ pTextAttr->GetFormatField().GetField()->GetFieldName()
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 35e626a0f5a1..3ff7ef02b6d0 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1021,7 +1021,7 @@ SwTableAutoFormatTable::SwTableAutoFormatTable()
SvxBoxItem aBox( RES_BOX );
aBox.SetAllDistances(55);
- SvxBorderLine aLn( &aColor, DEF_LINE_WIDTH_5 );
+ SvxBorderLine aLn( &aColor, SvxBorderLineWidth::VeryThin );
aBox.SetLine( &aLn, SvxBoxItemLine::LEFT );
aBox.SetLine( &aLn, SvxBoxItemLine::BOTTOM );
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..6154cfc7d776 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();
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 15a49729ce51..e6731feba860 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -114,11 +114,11 @@ static void lcl_SetDfltBoxAttr( SwFrameFormat& rFormat, sal_uInt8 nId )
const bool bHTML = rFormat.getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE);
Color aCol( bHTML ? COL_GRAY : COL_BLACK );
- SvxBorderLine aLine( &aCol, DEF_LINE_WIDTH_0 );
+ // Default border in Writer: 0.5pt (matching Word)
+ SvxBorderLine aLine( &aCol, SvxBorderLineWidth::VeryThin );
if ( bHTML )
{
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- aLine.SetWidth( DEF_LINE_WIDTH_0 );
}
SvxBoxItem aBox(RES_BOX);
aBox.SetAllDistances(55);
@@ -2040,7 +2040,7 @@ bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
bSavePageBreak = true;
}
}
- std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete( aPaM ));
+ std::unique_ptr<SwUndoDelete> pUndo(new SwUndoDelete(aPaM, SwDeleteFlags::Default));
if( bNewTextNd )
pUndo->SetTableDelLastNd();
pUndo->SetPgBrkFlags( bSavePageBreak, bSavePageDesc );
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..28088536c7ba 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;
@@ -2035,90 +2036,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 +2145,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 +2210,9 @@ SwNode* SwNodes::FindPrvNxtFrameNode( SwNodeIndex& rFrameIdx,
{
rFrameIdx = aIdx;
pFrameNd = &aIdx.GetNode();
+ assert(!"this isn't dead code?");
}
}
- }
}
}
}
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index 9d057bcabc7d..5f05c4d21cd7 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -476,8 +476,28 @@ SwFlyDrawContact::~SwFlyDrawContact()
}
}
-sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly)
+sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly,
+ SwFrame const& rAnchorFrame)
{
+ // maintain invariant that a shape's textbox immediately follows the shape
+ // also for the multiple SdrVirtObj created for shapes in header/footer
+ if (SwFrameFormat const*const pDrawFormat =
+ SwTextBoxHelper::getOtherTextBoxFormat(GetFormat(), RES_FLYFRMFMT))
+ {
+ // assume that the draw SdrVirtObj is always created before the flyframe one
+ if (SwSortedObjs const*const pObjs = rAnchorFrame.GetDrawObjs())
+ {
+ for (SwAnchoredObject const*const pAnchoredObj : *pObjs)
+ {
+ if (&pAnchoredObj->GetFrameFormat() == pDrawFormat)
+ {
+ return pAnchoredObj->GetDrawObj()->GetOrdNum() + 1;
+ }
+ }
+ }
+ // if called from AppendObjs(), this is a problem; if called from lcl_SetFlyFrameAttr() it's not
+ SAL_INFO("sw", "GetOrdNumForNewRef: cannot find SdrObject for text box's shape");
+ }
// search for another Writer fly frame registered at same frame format
SwIterator<SwFlyFrame,SwFormat> aIter(*GetFormat());
const SwFlyFrame* pFlyFrame(nullptr);
@@ -499,7 +519,8 @@ sal_uInt32 SwFlyDrawContact::GetOrdNumForNewRef(const SwFlyFrame* pFly)
return GetMaster()->GetOrdNumDirect();
}
-SwVirtFlyDrawObj* SwFlyDrawContact::CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFormat* pFormat)
+SwVirtFlyDrawObj* SwFlyDrawContact::CreateNewRef(SwFlyFrame* pFly,
+ SwFlyFrameFormat* pFormat, SwFrame const& rAnchorFrame)
{
// Find ContactObject from the Format. If there's already one, we just
// need to create a new Ref, else we create the Contact now.
@@ -526,7 +547,7 @@ SwVirtFlyDrawObj* SwFlyDrawContact::CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFor
// #i27030# - insert new <SwVirtFlyDrawObj> instance
// into drawing page with correct order number
else
- rIDDMA.GetDrawModel()->GetPage(0)->InsertObject(pDrawObj, pContact->GetOrdNumForNewRef(pFly));
+ rIDDMA.GetDrawModel()->GetPage(0)->InsertObject(pDrawObj, pContact->GetOrdNumForNewRef(pFly, rAnchorFrame));
// #i38889# - assure, that new <SwVirtFlyDrawObj> instance
// is in a visible layer.
pContact->MoveObjToVisibleLayer(pDrawObj);
@@ -804,7 +825,7 @@ SwFrame* SwDrawContact::GetAnchorFrame(SdrObject const *const pDrawObj)
/** add a 'virtual' drawing object to drawing page.
*/
-SwDrawVirtObj* SwDrawContact::AddVirtObj()
+SwDrawVirtObj* SwDrawContact::AddVirtObj(SwFrame const& rAnchorFrame)
{
maDrawVirtObjs.push_back(
SwDrawVirtObjPtr(
@@ -812,7 +833,7 @@ SwDrawVirtObj* SwDrawContact::AddVirtObj()
GetMaster()->getSdrModelFromSdrObject(),
*GetMaster(),
*this)));
- maDrawVirtObjs.back()->AddToDrawingPage();
+ maDrawVirtObjs.back()->AddToDrawingPage(rAnchorFrame);
return maDrawVirtObjs.back().get();
}
@@ -1871,7 +1892,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch )
else
{
// append 'virtual' drawing object
- SwDrawVirtObj* pDrawVirtObj = AddVirtObj();
+ SwDrawVirtObj* pDrawVirtObj = AddVirtObj(*pFrame);
if ( pAnch->GetAnchorId() == RndStdIds::FLY_AS_CHAR )
{
ClrContourCache( pDrawVirtObj );
@@ -2220,30 +2241,56 @@ void SwDrawVirtObj::RemoveFromWriterLayout()
}
}
-void SwDrawVirtObj::AddToDrawingPage()
+void SwDrawVirtObj::AddToDrawingPage(SwFrame const& rAnchorFrame)
{
// determine 'master'
SdrObject* pOrgMasterSdrObj = mrDrawContact.GetMaster();
// insert 'virtual' drawing object into page, set layer and user call.
SdrPage* pDrawPg;
+ // default: insert before master object
+ auto NOTM_nOrdNum(GetReferencedObj().GetOrdNum());
+
+ // maintain invariant that a shape's textbox immediately follows the shape
+ // also for the multiple SdrDrawVirtObj created for shapes in header/footer
+ if (SwFrameFormat const*const pFlyFormat =
+ SwTextBoxHelper::getOtherTextBoxFormat(mrDrawContact.GetFormat(), RES_DRAWFRMFMT))
+ {
+ // this is for the case when the flyframe SdrVirtObj is created before the draw one
+ if (SwSortedObjs const*const pObjs = rAnchorFrame.GetDrawObjs())
+ {
+ for (SwAnchoredObject const*const pAnchoredObj : *pObjs)
+ {
+ if (&pAnchoredObj->GetFrameFormat() == pFlyFormat)
+ {
+ assert(dynamic_cast<SwFlyFrame const*>(pAnchoredObj));
+ NOTM_nOrdNum = pAnchoredObj->GetDrawObj()->GetOrdNum();
+ // the master SdrObj should have the highest index
+ assert(NOTM_nOrdNum < GetReferencedObj().GetOrdNum());
+ break;
+ }
+ }
+ }
+ // this happens on initial insertion, the draw object is created first
+ SAL_INFO_IF(GetReferencedObj().GetOrdNum() == NOTM_nOrdNum, "sw", "AddToDrawingPage: cannot find SdrObject for text box's shape");
+ }
+
// #i27030# - apply order number of referenced object
if ( nullptr != ( pDrawPg = pOrgMasterSdrObj->getSdrPageFromSdrObject() ) )
{
// #i27030# - apply order number of referenced object
- pDrawPg->InsertObject( this, GetReferencedObj().GetOrdNum() );
+ pDrawPg->InsertObject(this, NOTM_nOrdNum);
}
else
{
pDrawPg = getSdrPageFromSdrObject();
if ( pDrawPg )
{
- pDrawPg->SetObjectOrdNum( GetOrdNumDirect(),
- GetReferencedObj().GetOrdNum() );
+ pDrawPg->SetObjectOrdNum(GetOrdNumDirect(), NOTM_nOrdNum);
}
else
{
- SetOrdNum( GetReferencedObj().GetOrdNum() );
+ SetOrdNum(NOTM_nOrdNum);
}
}
SetUserCall( &mrDrawContact );
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index c1a7b6a8cbbc..b20ae1031382 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -231,6 +231,11 @@ void SwDrawView::AddCustomHdl()
// #i28701# - use last character rectangle saved at object
// in order to avoid a format of the anchor frame
SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
+
+ // Invalidate/recalc LastCharRect which can contain invalid frame offset because
+ // of later frame changes
+ pAnchoredObj->CheckCharRectAndTopOfLine(false);
+
SwRect aAutoPos = pAnchoredObj->GetLastCharRect();
if ( aAutoPos.Height() )
{
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 a3687b5e308c..80b91de1d649 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -571,29 +571,29 @@ bool SwAutoFormat::DoUnderline()
editeng::SvxBorderLine aLine;
switch( eState )
{
- case 1: // single, 0.05 pt
+ case 1: // single, hairline
aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
- aLine.SetWidth( DEF_LINE_WIDTH_0 );
+ aLine.SetWidth( SvxBorderLineWidth::Hairline );
break;
- case 2: // single, 1.0 pt
+ case 2: // single, thin
aLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
- aLine.SetWidth( DEF_LINE_WIDTH_1 );
+ aLine.SetWidth( SvxBorderLineWidth::Thin );
break;
- case 3: // double, 1.0 pt
+ case 3: // double, thin
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- aLine.SetWidth( DEF_LINE_WIDTH_1 );
+ aLine.SetWidth( SvxBorderLineWidth::Thin );
break;
- case 4: // double (thick/thin), 4.0 pt
+ case 4: // double, thick/thin
aLine.SetBorderLineStyle(SvxBorderLineStyle::THICKTHIN_SMALLGAP);
- aLine.SetWidth( DEF_LINE_WIDTH_3 );
+ aLine.SetWidth( SvxBorderLineWidth::Thick );
break;
- case 5: // double (thin/thick), 4.0 pt
+ case 5: // double, thin/thick
aLine.SetBorderLineStyle(SvxBorderLineStyle::THINTHICK_SMALLGAP);
- aLine.SetWidth( DEF_LINE_WIDTH_3 );
+ aLine.SetWidth( SvxBorderLineWidth::Thick );
break;
- case 6: // double, 2.5 pt
+ case 6: // double, medium
aLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- aLine.SetWidth( DEF_LINE_WIDTH_2 );
+ aLine.SetWidth( SvxBorderLineWidth::Medium );
break;
}
SfxItemSet aSet(m_pDoc->GetAttrPool(),
@@ -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,
@@ -1904,11 +1904,14 @@ void SwAutoFormat::BuildHeadLine( sal_uInt16 nLvl )
JoinPrevPara();
DeleteLeadingTrailingBlanks( true, false );
- const SwTextFrame *const pNextFrame = GetNextNode(false);
- (void)DeleteJoinCurNextPara(pNextFrame, true);
-
+ const SwTextFrame* pNextFrame = GetNextNode(false);
+ if (pNextFrame->GetNext())
+ {
+ (void)DeleteJoinCurNextPara(pNextFrame, true);
+ pNextFrame = GetNextNode(false);
+ }
m_aDelPam.DeleteMark();
- m_aDelPam.GetPoint()->nNode = *GetNextNode(false)->GetTextNodeForParaProps();
+ m_aDelPam.GetPoint()->nNode = *pNextFrame->GetTextNodeForParaProps();
m_aDelPam.GetPoint()->nContent.Assign( m_aDelPam.GetContentNode(), 0 );
m_pDoc->SetTextFormatColl( m_aDelPam, &rNxtColl );
}
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..37c19e60a91e 100644
--- a/sw/source/core/edit/eddel.cxx
+++ b/sw/source/core/edit/eddel.cxx
@@ -38,7 +38,7 @@
#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();
// only for selections
@@ -121,7 +121,8 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
pPam = pNewPam.get();
}
// delete everything
- GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam);
+ GetDoc()->getIDocumentContentOperations().DeleteAndJoin(*pPam,
+ isArtificialSelection ? SwDeleteFlags::ArtificialSelection : SwDeleteFlags::Default);
SaveTableBoxContent( pPam->GetPoint() );
}
@@ -129,7 +130,7 @@ void SwEditShell::DeleteSel( SwPaM& rPam, bool* pUndo )
rPam.DeleteMark();
}
-bool SwEditShell::Delete()
+bool SwEditShell::Delete(bool const isArtificialSelection)
{
SET_CURR_SHELL( this );
bool bRet = false;
@@ -148,7 +149,7 @@ bool SwEditShell::Delete()
for(SwPaM& rPaM : GetCursor()->GetRingContainer())
{
- DeleteSel( rPaM, &bUndo );
+ DeleteSel(rPaM, isArtificialSelection, &bUndo);
}
// If undo container then close here
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index 7525a9af80af..75364a42bd1d 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -149,7 +149,7 @@ void SwEditShell::FieldToText( SwFieldType const * pType )
}
/// add a field at the cursor position
-void SwEditShell::Insert2(SwField const & rField, const bool bForceExpandHints)
+bool SwEditShell::InsertField(SwField const & rField, const bool bForceExpandHints)
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -159,13 +159,15 @@ void SwEditShell::Insert2(SwField const & rField, const bool bForceExpandHints)
? SetAttrMode::FORCEHINTEXPAND
: SetAttrMode::DEFAULT;
+ bool bSuccess(false);
for(const SwPaM& rPaM : GetCursor()->GetRingContainer()) // for each PaM
{
- const bool bSuccess(GetDoc()->getIDocumentContentOperations().InsertPoolItem(rPaM, aField, nInsertFlags));
+ bSuccess |= GetDoc()->getIDocumentContentOperations().InsertPoolItem(rPaM, aField, nInsertFlags);
OSL_ENSURE( bSuccess, "Doc->Insert(Field) failed");
}
EndAllAction();
+ return bSuccess;
}
/// Are the PaMs positioned on fields?
@@ -223,7 +225,7 @@ void SwEditShell::UpdateOneField(SwField &rField)
if ( !pCursor->IsMultiSelection() && !pCursor->HasMark())
{
- pTextField = GetTextFieldAtPos( pCursor->Start(), true );
+ pTextField = GetTextFieldAtPos(pCursor->Start(), ::sw::GetTextAttrMode::Default);
if (!pTextField) // #i30221#
pTextField = lcl_FindInputField( GetDoc(), rField);
@@ -268,7 +270,8 @@ void SwEditShell::UpdateOneField(SwField &rField)
if( aPam.Start()->nContent != pCurStt->nContent )
bOkay = false;
- if( nullptr != (pTextField = GetTextFieldAtPos( pCurStt, true )) )
+ pTextField = GetTextFieldAtPos(pCurStt, ::sw::GetTextAttrMode::Default);
+ if( nullptr != pTextField )
{
pFormatField = const_cast<SwFormatField*>(&pTextField->GetFormatField());
SwField *pCurField = pFormatField->GetField();
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/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 8f84ce42ed75..699997003daf 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
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/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 673e257e0554..c702e17d1cd5 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1313,6 +1313,7 @@ std::unique_ptr<SwField> SwInputField::Copy() const
pField->SetHelp( maHelp );
pField->SetToolTip( maToolTip );
+ pField->maGrabBag = maGrabBag;
pField->SetAutomaticLanguage(IsAutomaticLanguage());
return std::unique_ptr<SwField>(pField.release());
@@ -1359,6 +1360,9 @@ bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
case FIELD_PROP_PAR4:
rAny <<= maToolTip;
break;
+ case FIELD_PROP_GRABBAG:
+ rAny <<= maGrabBag;
+ break;
default:
assert(false);
}
@@ -1381,6 +1385,9 @@ bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
case FIELD_PROP_PAR4:
rAny >>= maToolTip;
break;
+ case FIELD_PROP_GRABBAG:
+ rAny >>= maGrabBag;
+ break;
default:
assert(false);
}
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..8589b8eed579 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1021,7 +1021,7 @@ bool SwFEShell::Paste( SwDoc* pClpDoc, bool bNestedTable )
{
if( bDelTable && IsTableMode() )
{
- SwEditShell::Delete();
+ SwEditShell::Delete(false);
bDelTable = 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 edf8121836b6..7cb52c1a7c1e 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -67,7 +67,7 @@ namespace sw {
// 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;
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/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index 3960ca4b3d8b..fe5bff942568 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -90,6 +90,8 @@ namespace sw {
virtual void ClearOtherMarkPos()
{ m_pPos2.reset(); }
+ virtual auto InvalidateFrames() -> void;
+
virtual OUString ToString( ) const override;
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const override;
@@ -170,6 +172,8 @@ namespace sw {
virtual void DeregisterFromDoc(SwDoc* const io_pDoc) override;
+ virtual auto InvalidateFrames() -> void override;
+
virtual const OUString& GetShortName() const override
{ return m_sShortName; }
virtual const vcl::KeyCode& GetKeyCode() const override
@@ -182,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/docfld.hxx b/sw/source/core/inc/docfld.hxx
index 36cf3d86eba0..2ab96b1639c1 100644
--- a/sw/source/core/inc/docfld.hxx
+++ b/sw/source/core/inc/docfld.hxx
@@ -23,6 +23,7 @@
#include <calc.hxx>
#include <doc.hxx>
#include <IDocumentTimerAccess.hxx>
+#include <IMark.hxx>
#include <o3tl/sorted_vector.hxx>
#include <memory>
@@ -53,10 +54,11 @@ class SetGetExpField
const SwTableBox* pTBox;
const SwTextINetFormat* pTextINet;
const SwFlyFrameFormat* pFlyFormat;
+ ::sw::mark::IBookmark const* pBookmark;
} m_CNTNT;
enum SetGetExpFieldType
{
- TEXTFIELD, TEXTTOXMARK, SECTIONNODE, CRSRPOS, TABLEBOX,
+ TEXTFIELD, TEXTTOXMARK, SECTIONNODE, BOOKMARK, CRSRPOS, TABLEBOX,
TEXTINET, FLYFRAME
} m_eSetGetExpFieldType;
@@ -69,6 +71,9 @@ public:
SetGetExpField( const SwSectionNode& rSectNode,
const SwPosition* pPos = nullptr );
+ SetGetExpField( ::sw::mark::IBookmark const& rBookmark,
+ SwPosition const* pPos = nullptr );
+
SetGetExpField( const SwTableBox& rTableBox );
SetGetExpField( const SwNodeIndex& rNdIdx, const SwTextTOXMark& rTOX );
@@ -84,6 +89,8 @@ public:
{ return TEXTFIELD == m_eSetGetExpFieldType ? m_CNTNT.pTextField : nullptr; }
const SwSection* GetSection() const
{ return SECTIONNODE == m_eSetGetExpFieldType ? m_CNTNT.pSection : nullptr; }
+ ::sw::mark::IBookmark const* GetBookmark() const
+ { return BOOKMARK == m_eSetGetExpFieldType ? m_CNTNT.pBookmark : nullptr; }
const SwTextINetFormat* GetINetFormat() const
{ return TEXTINET == m_eSetGetExpFieldType ? m_CNTNT.pTextINet : nullptr; }
const SwFlyFrameFormat* GetFlyFormat() const
@@ -142,7 +149,8 @@ class SwDocUpdateField
void MakeFieldList_( SwDoc& pDoc, int eGetMode );
void GetBodyNode( const SwTextField& , SwFieldIds nFieldWhich );
- void GetBodyNode( const SwSectionNode&);
+ template<typename T>
+ void GetBodyNodeGeneric(SwNode const& rNode, T const&);
public:
SwDocUpdateField(SwDoc& rDocument);
diff --git a/sw/source/core/inc/flyfrm.hxx b/sw/source/core/inc/flyfrm.hxx
index 18f263cfc1db..29a196944fcb 100644
--- a/sw/source/core/inc/flyfrm.hxx
+++ b/sw/source/core/inc/flyfrm.hxx
@@ -64,7 +64,7 @@ class SW_DLLPUBLIC SwFlyFrame : public SwLayoutFrame, public SwAnchoredObject
friend void Notify( SwFlyFrame *, SwPageFrame *pOld, const SwRect &rOld,
const SwRect* pOldPrt );
- void InitDrawObj(); // these to methods are called in the
+ void InitDrawObj(SwFrame const&); // these to methods are called in the
void FinitDrawObj(); // constructors
void UpdateAttr_( const SfxPoolItem*, const SfxPoolItem*, sal_uInt8 &,
@@ -134,6 +134,7 @@ protected:
page frame
*/
virtual void RegisterAtCorrectPage() override;
+ virtual void RegisterAtPage(SwPageFrame &) override;
virtual bool SetObjTop_( const SwTwips _nTop ) override;
virtual bool SetObjLeft_( const SwTwips _nLeft ) override;
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 4c6940c28edc..cb94b7cbd259 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -151,6 +151,7 @@ public:
SwFlyLayFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor );
+ virtual void RegisterAtPage(SwPageFrame &) override;
protected:
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
};
@@ -170,6 +171,7 @@ protected:
#i28701#
*/
virtual void RegisterAtCorrectPage() override;
+ virtual void RegisterAtPage(SwPageFrame &) override;
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
public:
@@ -227,6 +229,7 @@ public:
//see layact.cxx
void AddRefOfst( long nOfst ) { aRef.AdjustY( nOfst ); }
+ void AddRefOfst(Point const& rOfst) { aRef += rOfst; }
// #i26791#
virtual void MakeObjPos() override;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index ae5e8378ee4b..289a45fc922f 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -424,7 +424,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; }
@@ -860,7 +860,7 @@ public:
bool IsProtected() 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 +900,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 +1238,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..75a0523fda7f 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.
@@ -111,7 +114,7 @@ class SwLayAction
bool FormatLayout( OutputDevice* pRenderContext, SwLayoutFrame *, bool bAddRect = true );
bool FormatLayoutTab( SwTabFrame *, bool bAddRect );
- bool FormatContent( const SwPageFrame* pPage );
+ bool FormatContent(SwPageFrame * pPage);
void FormatContent_( const SwContentFrame* pContent,
const SwPageFrame* pPage );
bool IsShortCut( SwPageFrame *& );
@@ -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..835b20c0cfd6 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -100,6 +100,7 @@ public:
SwPrintData const*const pPrintData = nullptr ) const override;
const SwFrame *Lower() const { return m_pLower; }
SwFrame *Lower() { return m_pLower; }
+ bool ContainsDeleteForbiddenLayFrame() const;
const SwContentFrame *ContainsContent() const;
inline SwContentFrame *ContainsContent();
const SwCellFrame *FirstCell() const;
diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx
index c472b6f7bc1a..5b84b5e10819 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;
@@ -116,10 +117,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/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index 95d69bd699ee..878fae3a0520 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -435,6 +435,9 @@ SwTextGridItem const* GetGridItem(SwPageFrame const*const);
sal_uInt16 GetGridWidth(SwTextGridItem const&, SwDoc const&);
+namespace sw { bool IsPageFrameEmpty(SwPageFrame const& rPage); }
+
+
#endif // INCLUDED_SW_SOURCE_CORE_INC_PAGEFRM_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx
index 95da935cd079..6dfa6c743a13 100644
--- a/sw/source/core/inc/tabfrm.hxx
+++ b/sw/source/core/inc/tabfrm.hxx
@@ -43,6 +43,7 @@ class SwTabFrame: public SwLayoutFrame, public SwFlowFrame
bool m_bCalcLowers :1; /// For stability of the content in MakeAll
bool m_bLowersFormatted :1; /// Communication between MakeAll and Layact
bool m_bLockBackMove :1; /// The Master took care of the BackMove test
+ bool m_bWantBackMove :1; /// Table wants to move back but was locked
bool m_bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll
/// This is an optimization, so that we don't have to call
/// it in ContentFrame::Grow; there it might be called for
diff --git a/sw/source/core/inc/unofldmid.h b/sw/source/core/inc/unofldmid.h
index 2bb13a66faa3..43e30058d470 100644
--- a/sw/source/core/inc/unofldmid.h
+++ b/sw/source/core/inc/unofldmid.h
@@ -41,6 +41,7 @@
#define FIELD_PROP_BOOL4 28
#define FIELD_PROP_STRINGS 29
#define FIELD_PROP_PAR5 30
+#define FIELD_PROP_GRABBAG 31
#define FIELD_PROP_IS_FIELD_USED 32
#define FIELD_PROP_IS_FIELD_DISPLAYED 33
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 079468fdf062..438759f765b2 100644
--- a/sw/source/core/layout/anchoreddrawobject.cxx
+++ b/sw/source/core/layout/anchoreddrawobject.cxx
@@ -840,10 +840,18 @@ void SwAnchoredDrawObject::RegisterAtCorrectPage()
}
if ( pPageFrame && GetPageFrame() != pPageFrame )
{
- if ( GetPageFrame() )
- GetPageFrame()->RemoveDrawObjFromPage( *this );
- pPageFrame->AppendDrawObjToPage( *this );
+ RegisterAtPage(*pPageFrame);
}
}
+void SwAnchoredDrawObject::RegisterAtPage(SwPageFrame & rPageFrame)
+{
+ assert(GetPageFrame() != &rPageFrame);
+ if (GetPageFrame())
+ {
+ GetPageFrame()->RemoveDrawObjFromPage( *this );
+ }
+ rPageFrame.AppendDrawObjToPage( *this );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/findfrm.cxx b/sw/source/core/layout/findfrm.cxx
index a35af84d54a1..632e136fdd10 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -161,6 +161,27 @@ const SwFrame *SwLayoutFrame::ContainsAny( const bool _bInvestigateFootnoteForSe
return nullptr;
}
+bool SwLayoutFrame::ContainsDeleteForbiddenLayFrame() const
+{
+ if (IsDeleteForbidden())
+ {
+ return true;
+ }
+ for (SwFrame const* pFrame = Lower(); pFrame; pFrame = pFrame->GetNext())
+ {
+ if (!pFrame->IsLayoutFrame())
+ {
+ continue;
+ }
+ SwLayoutFrame const*const pLay(static_cast<SwLayoutFrame const*>(pFrame));
+ if (pLay->ContainsDeleteForbiddenLayFrame())
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
const SwFrame* SwFrame::GetLower() const
{
return IsLayoutFrame() ? static_cast<const SwLayoutFrame*>(this)->Lower() : nullptr;
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index d416b637c02f..2aaa2e2360fb 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -2034,7 +2034,7 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
// #i106452#
// check page description not only in situation with sections.
if ( !bSamePage &&
- ( m_rThis.GetPageDescItem().GetPageDesc() ||
+ ((!IsFollow() && m_rThis.GetPageDescItem().GetPageDesc()) ||
pOldPage->GetPageDesc()->GetFollow() != pNewPage->GetPageDesc() ) )
{
SwFrame::CheckPageDescs( pNewPage, false );
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 190e799dbc56..2b6973d14e97 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -165,7 +165,7 @@ SwFlyFrame::SwFlyFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame *pAnch
// First the Init, then the Content:
// This is due to the fact that the Content may have Objects/Frames,
// which are then registered
- InitDrawObj();
+ InitDrawObj(*pAnch);
Chain( pAnch );
@@ -361,10 +361,10 @@ void SwFlyFrame::DeleteCnt()
InvalidatePage();
}
-void SwFlyFrame::InitDrawObj()
+void SwFlyFrame::InitDrawObj(SwFrame const& rAnchorFrame)
{
// OD 2004-03-22 #i26791#
- SetDrawObj(*SwFlyDrawContact::CreateNewRef(this, GetFormat()));
+ SetDrawObj(*SwFlyDrawContact::CreateNewRef(this, GetFormat(), rAnchorFrame));
// Set the right Layer
// OD 2004-01-19 #110582#
@@ -1469,6 +1469,7 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
do
{
pLast = pFrame;
+ bool const wasFrameLowerOfLay(pLay->IsAnLower(pFrame));
if( pFrame->IsVertical() ?
( pFrame->GetUpper()->getFramePrintArea().Height() != pFrame->getFrameArea().Height() )
: ( pFrame->GetUpper()->getFramePrintArea().Width() != pFrame->getFrameArea().Width() ) )
@@ -1528,11 +1529,13 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
{
bool bAgain = false;
bool bRestartLayoutProcess = false;
- SwPageFrame* pPageFrame = pFrame->FindPageFrame();
size_t nCnt = pFrame->GetDrawObjs()->size();
size_t i = 0;
while ( i < nCnt )
{
+ // pFrame can move to a different page in FormatObj()
+ SwPageFrame *const pPageFrame = pFrame->FindPageFrame();
+
// #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[i];
assert(pAnchoredObj);
@@ -1610,7 +1613,10 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
// #i28701# - restart layout process, if
// requested by floating screen object formatting
- if ( bRestartLayoutProcess )
+ if (bRestartLayoutProcess
+ // tdf#142080 if it was aleady on next page, and still is,
+ // ignore restart, as restart could cause infinite loop
+ && (wasFrameLowerOfLay || pLay->IsAnLower(pFrame)))
{
pFrame = pLay->ContainsAny();
pAgainObj1 = nullptr;
@@ -1653,8 +1659,17 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
}
if ( pFrame->IsTabFrame() )
{
- if ( static_cast<SwTabFrame*>(pFrame)->IsFollow() )
+ if (static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove)
+ {
+ assert(static_cast<SwTabFrame*>(pFrame)->IsFollow());
static_cast<SwTabFrame*>(pFrame)->m_bLockBackMove = false;
+ // tdf#150606 encourage it to move back in FormatLayout()
+ if (static_cast<SwTabFrame*>(pFrame)->m_bWantBackMove)
+ {
+ static_cast<SwTabFrame*>(pFrame)->m_bWantBackMove = false;
+ pFrame->InvalidatePos();
+ }
+ }
}
pFrame = bPrevInvalid ? pTmpPrev : pFrame->FindNext();
@@ -1674,10 +1689,10 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl )
pFrame->InvalidatePos_();
}
}
- // Stay in the pLay
- // Except for SectionFrames with Follow: the first ContentFrame of the Follow
- // will be formatted, so that it gets a chance to load in the pLay.
- // As long as these Frames are loading in pLay, we continue
+ // Stay in the pLay.
+ // Except for SectionFrames with Follow: the first ContentFrame of the
+ // Follow will be formatted, so that it gets a chance to move back
+ // into the pLay. Continue as long as these Frames land in pLay.
} while ( pFrame &&
( pLay->IsAnLower( pFrame ) ||
( pSect &&
@@ -2839,6 +2854,11 @@ void SwFlyFrame::RegisterAtCorrectPage()
// default behaviour is to do nothing.
}
+void SwFlyFrame::RegisterAtPage(SwPageFrame &)
+{
+ // default behaviour is to do nothing.
+}
+
/** method to determine, if a <MakeAll()> on the Writer fly frame is possible
OD 2004-05-11 #i28701#
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index f3c442ac8cfa..06baefd15fa7 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -421,11 +421,17 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
// <SwObjectFormatterTextFrame::CheckMovedFwdCondition(..)>
sal_uInt32 nToPageNum( 0 );
bool bDummy( false );
+ bool bPageHasFlysAnchoredBelowThis(false);
if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition(
- *this, GetPageFrame()->GetPhyPageNum(),
- bAnchoredAtMaster, nToPageNum, bDummy ) )
+// TODO: what if this fly moved bc it's in table? does sth prevent that?
+ *this, *GetPageFrame(),
+ bAnchoredAtMaster, nToPageNum, bDummy,
+ bPageHasFlysAnchoredBelowThis) )
{
- bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
+ }
// mark anchor text frame
// directly, that it is moved forward by object positioning.
SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );
@@ -436,14 +442,22 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
rDoc, *pAnchorTextFrame, nAnchorFrameToPageNum ) )
{
if ( nAnchorFrameToPageNum < nToPageNum )
- SwLayouter::RemoveMovedFwdFrame( rDoc, *pAnchorTextFrame );
+ {
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::RemoveMovedFwdFrame(rDoc, *pAnchorTextFrame);
+ }
+ }
else
bInsert = false;
}
if ( bInsert )
{
- SwLayouter::InsertMovedFwdFrame( rDoc, *pAnchorTextFrame,
- nToPageNum );
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::InsertMovedFwdFrame(rDoc, *pAnchorTextFrame,
+ nToPageNum);
+ }
}
}
}
@@ -1333,7 +1347,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew )
{
const SwTextAttr *const pTextInputField =
pos.nNode.GetNode().GetTextNode()->GetTextAttrAt(
- pos.nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT );
+ pos.nContent.GetIndex(), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent);
if (pTextInputField != nullptr)
{
pos.nContent = pTextInputField->GetStart();
@@ -1396,10 +1410,20 @@ void SwFlyAtContentFrame::RegisterAtCorrectPage()
}
if ( pPageFrame && GetPageFrame() != pPageFrame )
{
- if ( GetPageFrame() )
- GetPageFrame()->MoveFly( this, pPageFrame );
- else
- pPageFrame->AppendFlyToPage( this );
+ RegisterAtPage(*pPageFrame);
+ }
+}
+
+void SwFlyAtContentFrame::RegisterAtPage(SwPageFrame & rPageFrame)
+{
+ assert(GetPageFrame() != &rPageFrame);
+ if (GetPageFrame())
+ {
+ GetPageFrame()->MoveFly( this, &rPageFrame );
+ }
+ else
+ {
+ rPageFrame.AppendFlyToPage( this );
}
}
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 4a7030ea241e..c915ee82d95a 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -723,6 +723,19 @@ SwFlyLayFrame::SwFlyLayFrame( SwFlyFrameFormat *pFormat, SwFrame* pSib, SwFrame
m_bLayout = true;
}
+void SwFlyLayFrame::RegisterAtPage(SwPageFrame & rPageFrame)
+{
+ assert(GetPageFrame() != &rPageFrame);
+ if (GetPageFrame())
+ {
+ GetPageFrame()->MoveFly( this, &rPageFrame );
+ }
+ else
+ {
+ rPageFrame.AppendFlyToPage( this );
+ }
+}
+
// #i28701#
void SwFlyLayFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index a861dd60013b..f702815b4010 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>
@@ -1018,7 +1019,7 @@ void AppendObj(SwFrame *const pFrame, SwPageFrame *const pPage, SwFrameFormat *c
pNew->GetAnchorFrame() != pFrame &&
!pNew->GetDrawObjectByAnchorFrame( *pFrame ) )
{
- SwDrawVirtObj* pDrawVirtObj = pNew->AddVirtObj();
+ SwDrawVirtObj* pDrawVirtObj = pNew->AddVirtObj(*pFrame);
pFrame->AppendDrawObj( *(pNew->GetAnchoredObj( pDrawVirtObj )) );
pDrawVirtObj->ActionChanged();
@@ -1067,6 +1068,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 +1168,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))
@@ -1719,7 +1725,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
@@ -1941,8 +1950,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;
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 9573944b71d1..964af2008868 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -572,10 +572,20 @@ void SwFootnoteFrame::Paste( SwFrame* pParent, SwFrame* pSibling )
if( aRectFnSet.GetWidth(getFrameArea())!=aRectFnSet.GetWidth(pParent->getFramePrintArea()) )
InvalidateSize_();
InvalidatePos_();
+ if (SwFrame *const pContent = ContainsContent())
+ { // tdf#139687 invalidate possibly stale top margin (computed from previous frame)
+ pContent->InvalidatePrt_();
+ }
SwPageFrame *pPage = FindPageFrame();
InvalidatePage( pPage );
- if ( GetNext() )
- GetNext()->InvalidatePos_();
+ if (SwFootnoteFrame *const pNext = static_cast<SwFootnoteFrame *>(GetNext()))
+ {
+ pNext->InvalidatePos_();
+ if (SwFrame *const pContent = pNext->ContainsContent())
+ { // tdf#139687 invalidate possibly stale top margin (computed from previous frame)
+ pContent->InvalidatePrt_();
+ }
+ }
if( aRectFnSet.GetHeight(getFrameArea()) )
pParent->Grow( aRectFnSet.GetHeight(getFrameArea()) );
@@ -2863,6 +2873,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() );
}
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 04201e1c6f5e..62d78d4c38e6 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -62,6 +62,8 @@
#include <sortedobjs.hxx>
#include <objectformatter.hxx>
#include <fntcache.hxx>
+#include <fmtanchr.hxx>
+#include <comphelper/scopeguard.hxx>
#include <vector>
#include <tools/diagnose_ex.h>
@@ -282,11 +284,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 +306,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 +322,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 +395,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();
@@ -448,15 +502,19 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
sal_uInt16 nPercentPageNum = 0;
while ((!IsInterrupt() && pPage) || (m_nCheckPageNum != USHRT_MAX))
{
- if (!pPage && m_nCheckPageNum != USHRT_MAX)
+ // note: this is the only place that consumes and resets m_nCheckPageNum
+ if ((IsInterrupt() || !pPage) && m_nCheckPageNum != USHRT_MAX)
{
- SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower());
- while (pPg && pPg->GetPhyPageNum() < m_nCheckPageNum)
- pPg = static_cast<SwPageFrame*>(pPg->GetNext());
- if (pPg)
- pPage = pPg;
- if (!pPage)
- break;
+ if (!pPage || m_nCheckPageNum < pPage->GetPhyPageNum())
+ {
+ SwPageFrame *pPg = static_cast<SwPageFrame*>(m_pRoot->Lower());
+ while (pPg && pPg->GetPhyPageNum() < m_nCheckPageNum)
+ pPg = static_cast<SwPageFrame*>(pPg->GetNext());
+ if (pPg)
+ pPage = pPg;
+ if (!pPage)
+ break;
+ }
SwPageFrame *pTmp = pPage->GetPrev() ?
static_cast<SwPageFrame*>(pPage->GetPrev()) : pPage;
@@ -637,7 +695,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
bool bOld = IsAgain();
m_pRoot->RemoveSuperfluous();
- m_bAgain = bOld;
+ SetAgain(bOld);
}
if ( IsAgain() )
{
@@ -1370,7 +1428,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
@@ -1594,8 +1656,51 @@ bool SwLayAction::FormatLayoutTab( SwTabFrame *pTab, bool bAddRect )
return bChanged;
}
-bool SwLayAction::FormatContent( const SwPageFrame *pPage )
+bool SwLayAction::FormatContent(SwPageFrame *const pPage)
{
+ ::comphelper::ScopeGuard g([this, pPage]() {
+ if (IsAgain())
+ {
+ return; // pPage probably deleted
+ }
+ if (auto const* pObjs = pPage->GetSortedObjs())
+ {
+ std::vector<std::pair<SwAnchoredObject*, SwPageFrame*>> moved;
+ for (auto const pObj : *pObjs)
+ {
+ assert(!pObj->AnchorFrame()->IsTextFrame()
+ || !static_cast<SwTextFrame const*>(pObj->AnchorFrame())->IsFollow());
+ SwPageFrame *const pAnchorPage(pObj->AnchorFrame()->FindPageFrame());
+ assert(pAnchorPage);
+ if (pAnchorPage != pPage
+ && pPage->GetPhyPageNum() < pAnchorPage->GetPhyPageNum()
+ && pObj->GetFrameFormat().GetAnchor().GetAnchorId()
+ != RndStdIds::FLY_AS_CHAR)
+ {
+ moved.emplace_back(pObj, pAnchorPage);
+ }
+ }
+ for (auto const& [pObj, pAnchorPage] : moved)
+ {
+ SAL_INFO("sw.layout", "SwLayAction::FormatContent: move anchored " << pObj << " from " << pPage->GetPhyPageNum() << " to " << pAnchorPage->GetPhyPageNum());
+ pObj->RegisterAtPage(*pAnchorPage);
+ // tdf#143239 if the position remains valid, it may not be
+ // positioned again so would remain on the wrong page!
+ pObj->InvalidateObjPos();
+ ::Notify_Background(pObj->GetDrawObj(), pPage,
+ pObj->GetObjRect(), PREP_FLY_LEAVE, false);
+ }
+ if (!moved.empty())
+ {
+ pPage->InvalidateFlyLayout();
+ if (auto *const pContent = pPage->FindLastBodyContent())
+ {
+ pContent->InvalidateSize();
+ }
+ }
+ }
+ });
+
const SwContentFrame *pContent = pPage->ContainsContent();
const SwViewShell *pSh = m_pRoot->GetCurrShell();
const bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode();
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 1d1f4597fcf2..39ea1c9c2bc0 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -502,6 +502,11 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
::InsertCnt_( pLay, pDoc, aTmp.GetIndex(), true );
//Remove masters that haven't been replaced yet from the list.
RemoveMasterObjs( mpDrawPage );
+
+ // 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();
+
if( rSettingAccess.get(DocumentSettingId::GLOBAL_DOCUMENT) )
rFieldsAccess.UpdateRefFields();
//b6433357: Update page fields after loading
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 1ba020a84901..57c3c7680da0 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -29,6 +29,7 @@
#include <fmtwrapinfluenceonobjpos.hxx>
#include <fmtfollowtextflow.hxx>
#include <layact.hxx>
+#include <flyfrm.hxx>
#include <ftnfrm.hxx>
using namespace ::com::sun::star;
@@ -224,11 +225,16 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
sal_uInt32 nToPageNum( 0 );
// #i43913#
bool bDummy( false );
- // #i58182# - consider new method signature
+ bool bPageHasFlysAnchoredBelowThis(false);
+ // see how SwObjectFormatter::FormatObjsAtFrame_() checks
+ // "pPageFrameOfAnchor == &mrPageFrame" - only caller relevant for
+ // this subclass
+ assert(GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(nIdx));
if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( nIdx ),
- GetPgNumOfCollected( nIdx ),
+ GetPageFrame(),
IsCollectedAnchoredAtMaster( nIdx ),
- nToPageNum, bDummy ) )
+ nToPageNum, bDummy,
+ bPageHasFlysAnchoredBelowThis))
{
// #i49987# - consider, that anchor frame
// could already been marked to move forward.
@@ -239,7 +245,12 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
rDoc, mrAnchorTextFrame, nMovedFwdToPageNum ) )
{
if ( nMovedFwdToPageNum < nToPageNum )
- SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
+ {
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame);
+ }
+ }
else
bInsert = false;
}
@@ -247,8 +258,11 @@ bool SwObjectFormatterTextFrame::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
{
// Indicate that anchor text frame has to move forward and
// invalidate its position to force a re-format.
- SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame,
- nToPageNum );
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::InsertMovedFwdFrame(rDoc,
+ mrAnchorTextFrame, nToPageNum);
+ }
mrAnchorTextFrame.InvalidatePos();
// Indicate restart of the layout process
@@ -293,7 +307,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
{
// notify layout action, thus is can restart the layout process on
// a previous page.
- GetLayAction()->SetAgain();
+ GetLayAction()->SetAgain(true);
}
else
{
@@ -350,13 +364,14 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
sal_uInt32 nToPageNum( 0 );
// #i43913#
bool bInFollow( false );
+ bool bPageHasFlysAnchoredBelowThis(false);
SwAnchoredObject* pObj = nullptr;
if ( !mrAnchorTextFrame.IsFollow() )
{
pObj = GetFirstObjWithMovedFwdAnchor(
// #i35017# - constant name has changed
text::WrapInfluenceOnPosition::ONCE_CONCURRENT,
- nToPageNum, bInFollow );
+ nToPageNum, bInFollow, bPageHasFlysAnchoredBelowThis );
}
// #i35911#
if ( pObj && pObj->HasClearedEnvironment() )
@@ -377,14 +392,22 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
rDoc, mrAnchorTextFrame, nTmpToPageNum ) )
{
if ( nTmpToPageNum < pAnchorPageFrame->GetPhyPageNum() )
- SwLayouter::RemoveMovedFwdFrame( rDoc, mrAnchorTextFrame );
+ {
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::RemoveMovedFwdFrame(rDoc, mrAnchorTextFrame);
+ }
+ }
else
bInsert = false;
}
if ( bInsert )
{
- SwLayouter::InsertMovedFwdFrame( rDoc, mrAnchorTextFrame,
- pAnchorPageFrame->GetPhyPageNum() );
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ SwLayouter::InsertMovedFwdFrame(rDoc, mrAnchorTextFrame,
+ pAnchorPageFrame->GetPhyPageNum());
+ }
mrAnchorTextFrame.InvalidatePos();
bSuccess = false;
InvalidatePrevObjs( *pObj );
@@ -503,7 +526,8 @@ void SwObjectFormatterTextFrame::InvalidateFollowObjs( SwAnchoredObject& _rAncho
SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor(
const sal_Int16 _nWrapInfluenceOnPosition,
sal_uInt32& _noToPageNum,
- bool& _boInFollow )
+ bool& _boInFollow,
+ bool& o_rbPageHasFlysAnchoredBelowThis)
{
// #i35017# - constant names have changed
OSL_ENSURE( _nWrapInfluenceOnPosition == text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ||
@@ -521,13 +545,17 @@ SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor(
// #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
GetWrapInfluenceOnObjPos( true ) == _nWrapInfluenceOnPosition )
{
+ // see how SwObjectFormatter::FormatObjsAtFrame_() checks
+ // "pPageFrameOfAnchor == &mrPageFrame" - only caller relevant for
+ // this subclass
+ assert(GetPageFrame().GetPhyPageNum() == GetPgNumOfCollected(i));
// #i26945# - use new method <_CheckMovedFwdCondition(..)>
// #i43913#
- // #i58182# - consider new method signature
if ( SwObjectFormatterTextFrame::CheckMovedFwdCondition( *GetCollectedObj( i ),
- GetPgNumOfCollected( i ),
+ GetPageFrame(),
IsCollectedAnchoredAtMaster( i ),
- _noToPageNum, _boInFollow ) )
+ _noToPageNum, _boInFollow,
+ o_rbPageHasFlysAnchoredBelowThis) )
{
pRetAnchoredObj = pAnchoredObj;
break;
@@ -538,15 +566,49 @@ SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor(
return pRetAnchoredObj;
}
+static SwRowFrame const* FindTopLevelRowFrame(SwFrame const*const pFrame)
+{
+ SwRowFrame * pRow = const_cast<SwFrame*>(pFrame)->FindRowFrame();
+ // looks like SwTabFrame has mbInfTab = true so go up 2 levels
+ while (pRow->GetUpper()->GetUpper()->IsInTab())
+ {
+ pRow = pRow->GetUpper()->GetUpper()->FindRowFrame();
+ }
+ return pRow;
+}
+
+static SwContentFrame const* FindFrameInBody(SwAnchoredObject const& rAnchored)
+{
+ SwFrame const*const pAnchor(rAnchored.GetAnchorFrame());
+ assert(pAnchor);
+ if (pAnchor->IsPageFrame() || pAnchor->FindFooterOrHeader())
+ {
+ return nullptr;
+ }
+ if (pAnchor->IsInFly())
+ {
+ return FindFrameInBody(*pAnchor->FindFlyFrame());
+ }
+ if (pAnchor->IsInFootnote())
+ {
+ return pAnchor->FindFootnoteFrame()->GetRef();
+ }
+ assert(pAnchor->IsInDocBody());
+ assert(pAnchor->IsContentFrame());
+ return static_cast<SwContentFrame const*>(pAnchor);
+}
+
// #i58182#
// - replace private method by corresponding static public method
bool SwObjectFormatterTextFrame::CheckMovedFwdCondition(
SwAnchoredObject& _rAnchoredObj,
- const sal_uInt32 _nFromPageNum,
+ SwPageFrame const& rFromPageFrame,
const bool _bAnchoredAtMasterBeforeFormatAnchor,
sal_uInt32& _noToPageNum,
- bool& _boInFollow )
+ bool& _boInFollow,
+ bool& o_rbPageHasFlysAnchoredBelowThis)
{
+ const sal_uInt32 _nFromPageNum(rFromPageFrame.GetPhyPageNum());
bool bAnchorIsMovedForward( false );
SwPageFrame* pPageFrameOfAnchor = _rAnchoredObj.FindPageFrameOfAnchor();
@@ -621,6 +683,69 @@ bool SwObjectFormatterTextFrame::CheckMovedFwdCondition(
}
}
+ if (bAnchorIsMovedForward)
+ {
+ // tdf#138518 try to determine if there is a fly on page rFromPageFrame
+ // which is anchored in a frame that is "below" the anchor frame
+ // of _rAnchoredObj, such that it should move to the next page before
+ // _rAnchoredObj does
+ if (auto * pObjs = rFromPageFrame.GetSortedObjs())
+ {
+ for (SwAnchoredObject *const pObj : *pObjs)
+ {
+ SwPageFrame const*const pObjAnchorPage(pObj->FindPageFrameOfAnchor());
+ assert(pObjAnchorPage);
+ if ((pObjAnchorPage == &rFromPageFrame
+ ? _boInFollow // same-page but will move forward
+ : rFromPageFrame.GetPhyPageNum() < pObjAnchorPage->GetPhyPageNum())
+ && pObj->GetFrameFormat().GetAnchor().GetAnchorId()
+ != RndStdIds::FLY_AS_CHAR)
+ {
+ if (pPageFrameOfAnchor->GetPhyPageNum() < pObjAnchorPage->GetPhyPageNum())
+ {
+ SAL_INFO("sw.layout", "SwObjectFormatterTextFrame::CheckMovedFwdCondition(): o_rbPageHasFlysAnchoredBelowThis because next page");
+ o_rbPageHasFlysAnchoredBelowThis = true;
+ break;
+ }
+ // on same page: check if it's in next-chain in the document body
+ // (in case both are in the same fly the flag must not be
+ // set because the whole fly moves at once)
+ SwContentFrame const*const pInBodyFrameObj(FindFrameInBody(*pObj));
+ SwContentFrame const*const pInBodyFrameAnchoredObj(FindFrameInBody(_rAnchoredObj));
+ if (pInBodyFrameObj && pInBodyFrameAnchoredObj)
+ {
+ bool isBreakMore(false);
+ // currently this ignores index of at-char flys
+ for (SwContentFrame const* pContentFrame = pInBodyFrameAnchoredObj->FindNextCnt();
+ pContentFrame;
+ pContentFrame = pContentFrame->FindNextCnt())
+ {
+ if (pInBodyFrameObj == pContentFrame)
+ {
+ // subsequent cells in a row are not automatically
+ // "below" and the row could potentially be split
+ // TODO refine check if needed
+ if (!pInBodyFrameAnchoredObj->IsInTab()
+ || FindTopLevelRowFrame(pInBodyFrameAnchoredObj)
+ != FindTopLevelRowFrame(pInBodyFrameAnchoredObj))
+ { // anchored in next chain on same page
+ SAL_INFO("sw.layout", "SwObjectFormatterTextFrame::CheckMovedFwdCondition(): o_rbPageHasFlysAnchoredBelowThis because next chain on same page");
+ o_rbPageHasFlysAnchoredBelowThis = true;
+ isBreakMore = true;
+ }
+ break;
+ }
+ }
+ if (isBreakMore)
+ {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
return bAnchorIsMovedForward;
}
@@ -641,6 +766,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 +812,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 +862,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 +881,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/objectformattertxtfrm.hxx b/sw/source/core/layout/objectformattertxtfrm.hxx
index cf3b955addb1..ae7b2efe227e 100644
--- a/sw/source/core/layout/objectformattertxtfrm.hxx
+++ b/sw/source/core/layout/objectformattertxtfrm.hxx
@@ -96,7 +96,8 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter
SwAnchoredObject* GetFirstObjWithMovedFwdAnchor(
const sal_Int16 _nWrapInfluenceOnPosition,
sal_uInt32& _noToPageNum,
- bool& _boInFollow );
+ bool& _boInFollow,
+ bool& o_rbPageHasFlysAnchoredBelowThis);
/** method to format the anchor frame for checking of the move forward condition
@@ -169,15 +170,19 @@ class SwObjectFormatterTextFrame : public SwObjectFormatter
output parameter - boolean, indicating that anchor text frame is
currently on the same page, but it's a follow of in a follow row,
which will move forward. value only relevant, if method return <true>.
+ @param o_rbPageHasFlysAnchoredBelowThis
+ output parameter - indicates that the page has flys anchored
+ somewhere below the anchor of the passed _rAnchoredObj
@return boolean
indicating, if 'anchor is moved forward'
*/
static bool CheckMovedFwdCondition( SwAnchoredObject& _rAnchoredObj,
- const sal_uInt32 _nFromPageNum,
+ SwPageFrame const& rFromPageFrame,
const bool _bAnchoredAtMasterBeforeFormatAnchor,
sal_uInt32& _noToPageNum,
- bool& _boInFollow );
+ bool& _boInFollow,
+ bool& o_rbPageHasFlysAnchoredBelowThis);
};
#endif
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index a684b1602a1a..b1a04f0890c6 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -284,7 +284,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);
@@ -990,11 +990,68 @@ void SwPageFrame::PrepareRegisterChg()
}
}
+namespace sw {
+
+/// check if there's content on the page that requires it to exist
+bool IsPageFrameEmpty(SwPageFrame const& rPage)
+{
+ bool bExistEssentialObjs = (nullptr != rPage.GetSortedObjs());
+ if (bExistEssentialObjs)
+ {
+ // Only because the page has Flys does not mean that it is needed. If all Flys are
+ // attached to generic content it is also superfluous (checking DocBody should be enough)
+ // OD 19.06.2003 - consider that drawing objects in
+ // header/footer are supported now.
+ bool bOnlySuperfluousObjs = true;
+ SwSortedObjs const& rObjs = *rPage.GetSortedObjs();
+ for (size_t i = 0; bOnlySuperfluousObjs && i < rObjs.size(); ++i)
+ {
+ // #i28701#
+ SwAnchoredObject* pAnchoredObj = rObjs[i];
+ // do not consider hidden objects
+ if ( rPage.GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(
+ pAnchoredObj->GetDrawObj()->GetLayer() ) &&
+ !pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() )
+ {
+ bOnlySuperfluousObjs = false;
+ }
+ }
+ bExistEssentialObjs = !bOnlySuperfluousObjs;
+ }
+
+ // optimization: check first if essential objects exist.
+ const SwLayoutFrame* pBody = nullptr;
+ if ( bExistEssentialObjs ||
+ rPage.FindFootnoteCont() ||
+ (nullptr != (pBody = rPage.FindBodyCont()) &&
+ ( pBody->ContainsContent() ||
+ // check for section frames that are being formatted on the stack
+ rPage.ContainsDeleteForbiddenLayFrame() ||
+ // #i47580#
+ // Do not delete page if there's an empty tabframe
+ // left. I think it might be correct to use ContainsAny()
+ // instead of ContainsContent() to cover the empty-table-case,
+ // but I'm not fully sure, since ContainsAny() also returns
+ // SectionFrames. Therefore I prefer to do it the safe way:
+ ( pBody->Lower() && pBody->Lower()->IsTabFrame() ) ) ) )
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+}
+
+} // namespace sw
+
//FIXME: provide missing documentation
/** Check all pages (starting from the given one) if they use the appropriate frame format.
*
* If "wrong" pages are found, try to fix this as simple as possible.
*
+ * Also delete pages that don't have content on them.
+ *
* @param pStart the page from where to start searching
* @param bNotifyFields
* @param ppPrev
@@ -1032,7 +1089,10 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
SwPageFrame *pNextPage = static_cast<SwPageFrame*>(pPage->GetNext());
SwPageDesc *pDesc = pPage->FindPageDesc();
+ /// page is intentionally empty page
bool bIsEmpty = pPage->IsEmptyPage();
+ // false for intentionally empty pages, they need additional check
+ bool isPageFrameEmpty(!bIsEmpty && sw::IsPageFrameEmpty(*pPage));
bool bIsOdd = pPage->OnRightPage();
bool bWantOdd = pPage->WannaRightPage();
bool bFirst = pPage->OnFirstPage();
@@ -1129,6 +1189,7 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
pTmp->Paste( pRoot, pPage );
pTmp->PreparePage( false );
pPage = pTmp;
+ isPageFrameEmpty = false; // don't delete it right away!
}
else if ( pPage->GetPageDesc() != pDesc ) //4.
{
@@ -1172,16 +1233,21 @@ void SwFrame::CheckPageDescs( SwPageFrame *pStart, bool bNotifyFields, SwPageFra
}
#endif
}
- if ( bIsEmpty )
+ assert(!bIsEmpty || !isPageFrameEmpty);
+ if (bIsEmpty || isPageFrameEmpty)
{
// It also might be that an empty page is not needed at all.
// However, the algorithm above cannot determine that. It is not needed if the following
// page can live without it. Do obtain that information, we need to dig deeper...
SwPageFrame *pPg = static_cast<SwPageFrame*>(pPage->GetNext());
- if( !pPg || pPage->OnRightPage() == pPg->WannaRightPage() )
+ if (isPageFrameEmpty || !pPg || pPage->OnRightPage() == pPg->WannaRightPage())
{
// The following page can find a FrameFormat or has no successor -> empty page not needed
SwPageFrame *pTmp = static_cast<SwPageFrame*>(pPage->GetNext());
+ if (isPageFrameEmpty && pPage->GetPrev())
+ { // check previous *again* vs. its new next! see "ooo321_stylepagenumber.odt"
+ pTmp = static_cast<SwPageFrame*>(pPage->GetPrev());
+ }
pPage->Cut();
bool bUpdatePrev = false;
if (ppPrev && *ppPrev == pPage)
@@ -1441,44 +1507,7 @@ void SwRootFrame::RemoveSuperfluous()
// Check the corresponding last page if it is empty and stop loop at the last non-empty page.
do
{
- bool bExistEssentialObjs = ( nullptr != pPage->GetSortedObjs() );
- if ( bExistEssentialObjs )
- {
- // Only because the page has Flys does not mean that it is needed. If all Flys are
- // attached to generic content it is also superfluous (checking DocBody should be enough)
- // OD 19.06.2003 #108784# - consider that drawing objects in
- // header/footer are supported now.
- bool bOnlySuperfluosObjs = true;
- SwSortedObjs &rObjs = *pPage->GetSortedObjs();
- for ( size_t i = 0; bOnlySuperfluosObjs && i < rObjs.size(); ++i )
- {
- // #i28701#
- SwAnchoredObject* pAnchoredObj = rObjs[i];
- // OD 2004-01-19 #110582# - do not consider hidden objects
- if ( pPage->GetFormat()->GetDoc()->getIDocumentDrawModelAccess().IsVisibleLayerId(
- pAnchoredObj->GetDrawObj()->GetLayer() ) &&
- !pAnchoredObj->GetAnchorFrame()->FindFooterOrHeader() )
- {
- bOnlySuperfluosObjs = false;
- }
- }
- bExistEssentialObjs = !bOnlySuperfluosObjs;
- }
-
- // OD 19.06.2003 #108784# - optimization: check first, if essential objects
- // exists.
- const SwLayoutFrame* pBody = nullptr;
- if ( bExistEssentialObjs ||
- pPage->FindFootnoteCont() ||
- ( nullptr != ( pBody = pPage->FindBodyCont() ) &&
- ( pBody->ContainsContent() ||
- // #i47580#
- // Do not delete page if there's an empty tabframe
- // left. I think it might be correct to use ContainsAny()
- // instead of ContainsContent() to cover the empty-table-case,
- // but I'm not fully sure, since ContainsAny() also returns
- // SectionFrames. Therefore I prefer to do it the safe way:
- ( pBody->Lower() && pBody->Lower()->IsTabFrame() ) ) ) )
+ if (!sw::IsPageFrameEmpty(*pPage))
{
if ( pPage->IsFootnotePage() )
{
@@ -1976,6 +2005,11 @@ static void lcl_MoveAllLowerObjs( SwFrame* pFrame, const Point& rOffset )
{
SwFlyFrame* pFlyFrame( static_cast<SwFlyFrame*>(pAnchoredObj) );
lcl_MoveAllLowers( pFlyFrame, rOffset );
+ // tdf#138785 update position specific to as-char flys
+ if (pFlyFrame->IsFlyInContentFrame())
+ {
+ static_cast<SwFlyInContentFrame*>(pFlyFrame)->AddRefOfst(rOffset);
+ }
pFlyFrame->NotifyDrawObj();
// --> let the active embedded object be moved
SwFrame* pLower = pFlyFrame->Lower();
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 524562585bd1..48debbcc399a 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2863,7 +2863,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 719f08e5a363..f39250dcc67b 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>
@@ -73,6 +74,7 @@ SwTabFrame::SwTabFrame( SwTable &rTab, SwFrame* pSib )
, m_bCalcLowers(false)
, m_bLowersFormatted(false)
, m_bLockBackMove(false)
+ , m_bWantBackMove(false)
, m_bResizeHTMLTable(false)
, m_bONECalcLowers(false)
, m_bHasFollowFlowLine(false)
@@ -112,6 +114,7 @@ SwTabFrame::SwTabFrame( SwTabFrame &rTab )
, m_bCalcLowers(false)
, m_bLowersFormatted(false)
, m_bLockBackMove(false)
+ , m_bWantBackMove(false)
, m_bResizeHTMLTable(false)
, m_bONECalcLowers(false)
, m_bHasFollowFlowLine(false)
@@ -1343,13 +1346,30 @@ 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;
+ }
+}
+
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.
@@ -1578,6 +1598,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.
@@ -1837,7 +1859,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 +2012,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);
@@ -2020,6 +2040,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 +2056,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 +2083,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 +2109,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 +2288,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 +2313,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 +2553,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
@@ -3513,9 +3551,17 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool &rReformat )
}
else if (!m_bLockBackMove)
bMoveAnyway = true;
+ else
+ {
+ m_bWantBackMove = true;
+ }
}
else if (!m_bLockBackMove)
bMoveAnyway = true;
+ else
+ {
+ m_bWantBackMove = true;
+ }
if ( bMoveAnyway )
{
@@ -3527,7 +3573,7 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool &rReformat )
// This frame fits into pNewUpper in case it has no space, but this
// frame is empty.
bFits = nSpace >= 0;
- if (!m_bLockBackMove && bFits)
+ if (bFits)
{
// #i26945# - check, if follow flow line
// contains frame, which are moved forward due to its object
@@ -3546,7 +3592,17 @@ bool SwTabFrame::ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool &rReformat )
// 'return nHeight <= nSpace' to 'return nTmpHeight < nSpace'.
// This obviously results in problems with table frames in
// sections. Remember: Every twip is sacred.
- return nTmpHeight <= nSpace;
+ if (nTmpHeight <= nSpace)
+ {
+ if (m_bLockBackMove)
+ {
+ m_bWantBackMove = true;
+ }
+ else
+ {
+ return true;
+ }
+ }
}
}
return false;
@@ -5506,9 +5562,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/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index f17a7ba68870..14aa081621f1 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -57,6 +57,7 @@
#include <sortedobjs.hxx>
#include <frmatr.hxx>
#include <frmtool.hxx>
+#include <layact.hxx>
#include <ndtxt.hxx>
// RotateFlyFrame3
@@ -317,7 +318,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." );
}
@@ -1200,6 +1201,23 @@ void SwContentFrame::Cut()
if ( pRoot )
{
pRoot->SetSuperfluous();
+ // RemoveSuperfluous can only remove empty pages at the end;
+ // find if there are pages without content following pPage
+ // and if so request a call to CheckPageDescs()
+ SwViewShell *pSh = pRoot->GetCurrShell();
+ // tdf#152983 pPage is null when called from SwHeadFootFrame ctor
+ if (pPage && pSh && pSh->Imp()->IsAction())
+ {
+ SwPageFrame const* pNext(pPage);
+ while ((pNext = static_cast<SwPageFrame const*>(pNext->GetNext())))
+ {
+ if (!sw::IsPageFrameEmpty(*pNext) && !pNext->IsFootnotePage())
+ {
+ pSh->Imp()->GetLayAction().SetCheckPageNum(pPage->GetPhyPageNum());
+ break;
+ }
+ }
+ }
GetUpper()->SetCompletePaint();
GetUpper()->InvalidatePage( pPage );
}
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 9000d6ef1b9e..8ff9b35967ce 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)
{
- uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.m_xOLERef.GetObject(), uno::UNO_QUERY_THROW );
- if ( xLinkSupport->isLink() )
+ 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))
{
- 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()
@@ -1167,7 +1238,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 +1268,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/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 69db90b6502d..3720c3117f9b 100755
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -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/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index f3178c2c7233..75cfc1e7e624 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();
@@ -2516,7 +2523,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 a5eb9b99ce9b..b1c7003764a7 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -175,10 +175,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
{
- sal_Int32 const nFieldLen(pPor->GetFieldLen());
- aText = (*pOldText).replaceAt(sal_Int32(nIdx), nFieldLen, aText);
+ TextFrameIndex nEnd(pOldText->getLength());
+ if (nIdx < nEnd)
+ {
+ sal_Int32 const nFieldLen(pPor->GetFieldLen());
+ aText = (*pOldText).replaceAt(sal_Int32(nIdx), nFieldLen, aText);
+ }
+ else if (nIdx == nEnd)
+ aText = *pOldText + aText;
+ else
+ SAL_WARN("sw.core", "SwFieldSlot bad SwFieldPortion index.");
}
pInf->SetText( aText );
}
@@ -1063,6 +1071,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 bdb00652bbcc..e3d442509032 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -203,7 +203,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 2bb9e87bd2c9..5e0f75dada94 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -395,7 +395,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;
}
@@ -2286,29 +2288,9 @@ void SwScriptInfo::selectHiddenTextProperty(const SwTextNode& rNode, MultiSelect
const sw::mark::IMark* pMark = pIndex->GetMark();
const sw::mark::IBookmark* pBookmark = dynamic_cast<const sw::mark::IBookmark*>(pMark);
- bool bHide = false;
+ // condition is evaluated in DocumentFieldsManager::UpdateExpFields()
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();
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 17636cda44e3..8d478867709e 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -1292,6 +1292,8 @@ void SwTextFrame::SetMergedPara(std::unique_ptr<sw::MergedPara> p)
pFirst->Add(this); // must register at node again
}
}
+ // postcondition: frame must be listening somewhere
+ assert(m_pMergedPara || GetDep());
}
const OUString& SwTextFrame::GetText() const
@@ -2970,7 +2972,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/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 20f61111126a..147ed5a97eb7 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -15,6 +15,7 @@
#include <pagefrm.hxx>
#include <txtfrm.hxx>
#include <cellfrm.hxx>
+#include <flyfrm.hxx>
#include <hffrm.hxx>
#include <rootfrm.hxx>
#include <editsh.hxx>
@@ -67,6 +68,7 @@ class XmlPortionDumper:public SwPortionHandler
case PortionType::Meta: return "PortionType::Meta";
case PortionType::FieldMark: return "PortionType::FieldMark";
case PortionType::FieldFormCheckbox: return "PortionType::FieldFormCheckbox";
+ case PortionType::InputField: return "PortionType::InputField";
case PortionType::Expand: return "PortionType::Expand";
case PortionType::Blank: return "PortionType::Blank";
@@ -326,7 +328,7 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
SwView* pView = static_cast<SwView*>(SfxViewShell::GetFirst(true, checkSfxViewShell<SwView>));
while (pView)
{
- if (pView->GetObjectShell() == pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell())
+ if (pRootFrame->GetCurrShell()->GetSfxViewShell() && pView->GetObjectShell() == pRootFrame->GetCurrShell()->GetSfxViewShell()->GetObjectShell())
pView->dumpAsXml(writer);
pView = static_cast<SwView*>(SfxViewShell::GetNext(*pView, true, checkSfxViewShell<SwView>));
}
@@ -343,6 +345,35 @@ 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);
+#ifdef UNX
+ // disable for tests to avoid resolving loads of merge conflicts (var is only set on UNX in this branch)
+ if (!getenv("LO_TESTNAME")) if (auto const* pObjs = pPageFrame->GetSortedObjs())
+ {
+ (void)xmlTextWriterStartElement(writer, BAD_CAST("sorted_objs"));
+ for (SwAnchoredObject const*const pObj : *pObjs)
+ { // just print pointer, full details will be printed on its anchor frame
+ // this nonsense is needed because of multiple inheritance
+ if (SwFlyFrame const*const pFly = dynamic_cast<SwFlyFrame const*>(pObj))
+ {
+ (void)xmlTextWriterStartElement(writer, BAD_CAST("fly"));
+ (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("ptr"), "%p", pFly);
+ }
+ else
+ {
+ (void)xmlTextWriterStartElement(writer, BAD_CAST(pObj->getElementName()));
+ (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("ptr"), "%p", pObj);
+ }
+ (void)xmlTextWriterEndElement(writer);
+ }
+ (void)xmlTextWriterEndElement(writer);
+ }
+#endif
}
if (IsTextFrame())
@@ -421,22 +452,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()));
+ xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFrameAreaPositionValid"), BAD_CAST(OString::boolean(isFrameAreaPositionValid()).getStr()));
+ xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFrameAreaSizeValid"), BAD_CAST(OString::boolean(isFrameAreaSizeValid()).getStr()));
+ xmlTextWriterWriteAttribute(writer, BAD_CAST("mbFramePrintAreaValid"), 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 );
}
@@ -466,6 +491,12 @@ void SwFrame::dumpAsXmlAttributes( xmlTextWriterPtr writer ) const
if (pFF->GetFollow())
xmlTextWriterWriteFormatAttribute( writer, BAD_CAST("follow"), "%" SAL_PRIuUINT32, pFF->GetFollow()->GetFrameId() );
}
+ if (IsSctFrame())
+ {
+ SwSectionFrame const*const pFrame(static_cast<SwSectionFrame const*>(this));
+ SwSectionNode const*const pNode(pFrame->GetSection() ? pFrame->GetSection()->GetFormat()->GetSectionNode() : nullptr);
+ xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("sectionNodeIndex"), TMP_FORMAT, pNode ? pNode->GetIndex() : -1);
+ }
if ( IsTextFrame( ) )
{
const SwTextFrame *pTextFrame = static_cast<const SwTextFrame *>(this);
@@ -515,10 +546,8 @@ 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() );
+ // don't call GetObjBoundRect(), it modifies the layout
+ SwRect(GetDrawObj()->GetLastBoundRect()).dumpAsXmlAttributes(writer);
xmlTextWriterEndElement( writer );
if (const SdrObject* pObject = GetDrawObj())
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index eb77942b6fe7..ce533a220bd9 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>
@@ -666,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);
@@ -894,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!
}
}
@@ -1007,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." );
@@ -1509,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())
@@ -1638,7 +1674,7 @@ lcl_GetTextAttrs(
SwTextAttr **const ppTextAttr,
SwpHints const *const pSwpHints,
sal_Int32 const nIndex, sal_uInt16 const nWhich,
- enum SwTextNode::GetTextAttrMode const eMode)
+ ::sw::GetTextAttrMode const eMode)
{
assert(nWhich >= RES_TXTATR_BEGIN && nWhich < RES_TXTATR_END);
if (!pSwpHints)
@@ -1648,9 +1684,12 @@ lcl_GetTextAttrs(
bool (*pMatchFunc)(sal_Int32, sal_Int32, sal_Int32)=nullptr;
switch (eMode)
{
- case SwTextNode::DEFAULT: pMatchFunc = &lcl_GetTextAttrDefault; break;
- case SwTextNode::EXPAND: pMatchFunc = &lcl_GetTextAttrExpand; break;
- case SwTextNode::PARENT: pMatchFunc = &lcl_GetTextAttrParent; break;
+ case ::sw::GetTextAttrMode::Default: pMatchFunc = &lcl_GetTextAttrDefault;
+ break;
+ case ::sw::GetTextAttrMode::Expand: pMatchFunc = &lcl_GetTextAttrExpand;
+ break;
+ case ::sw::GetTextAttrMode::Parent: pMatchFunc = &lcl_GetTextAttrParent;
+ break;
default: assert(false);
}
@@ -1700,13 +1739,13 @@ SwTextNode::GetTextAttrsAt(sal_Int32 const nIndex, sal_uInt16 const nWhich) cons
{
assert(nWhich >= RES_TXTATR_BEGIN && nWhich < RES_TXTATR_END);
std::vector<SwTextAttr *> ret;
- lcl_GetTextAttrs(&ret, nullptr, m_pSwpHints.get(), nIndex, nWhich, DEFAULT);
+ lcl_GetTextAttrs(&ret, nullptr, m_pSwpHints.get(), nIndex, nWhich, ::sw::GetTextAttrMode::Default);
return ret;
}
SwTextAttr *
SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich,
- enum GetTextAttrMode const eMode) const
+ ::sw::GetTextAttrMode const eMode) const
{
assert( (nWhich == RES_TXTATR_META)
|| (nWhich == RES_TXTATR_METAFIELD)
@@ -1724,11 +1763,11 @@ SwTextNode::GetTextAttrAt(sal_Int32 const nIndex, sal_uInt16 const nWhich,
const SwTextInputField* SwTextNode::GetOverlappingInputField( const SwTextAttr& rTextAttr ) const
{
- const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, PARENT ));
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(rTextAttr.GetStart(), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent));
if ( pTextInputField == nullptr && rTextAttr.End() != nullptr )
{
- pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( *(rTextAttr.End()), RES_TXTATR_INPUTFIELD, PARENT ));
+ pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(*(rTextAttr.End()), RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent));
}
return pTextInputField;
@@ -1751,7 +1790,7 @@ void SwTextNode::DelFrames_TextNodePart()
SwTextField* SwTextNode::GetFieldTextAttrAt(
const sal_Int32 nIndex,
- const bool bIncludeInputFieldAtStart ) const
+ ::sw::GetTextAttrMode const eMode) const
{
SwTextField* pTextField = dynamic_cast<SwTextField*>(GetTextAttrForCharAt( nIndex, RES_TXTATR_FIELD ));
if ( pTextField == nullptr )
@@ -1764,7 +1803,7 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
dynamic_cast<SwTextField*>( GetTextAttrAt(
nIndex,
RES_TXTATR_INPUTFIELD,
- bIncludeInputFieldAtStart ? DEFAULT : EXPAND ));
+ eMode));
}
return pTextField;
@@ -2492,7 +2531,15 @@ void SwTextNode::CutImpl( SwTextNode * const pDest, const SwIndex & rDestStart,
}
else
{
- GetpSwAttrSet()->CopyToModify( *pDest );
+ // Copy all attrs except RES_PARATR_LIST_LEVEL: it was initialized before
+ // and current SwTextNode can contain not suitable for pDest value
+ SfxItemSet aCharSet(
+ pDest->GetDoc()->GetAttrPool(),
+ svl::Items<RES_CHRATR_BEGIN, RES_PARATR_LIST_LEVEL - 1,
+ RES_PARATR_LIST_LEVEL + 1, HINT_END>{});
+ aCharSet.Put(*GetpSwAttrSet());
+ if (aCharSet.Count())
+ pDest->SetAttr(aCharSet, nDestStart, nDestStart + nLen);
}
}
@@ -3072,11 +3119,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())));
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index 5b363f2d9119..ba2889236f52 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -1180,6 +1180,12 @@ void SwTextNode::DestroyAttr( SwTextAttr* pAttr )
SwTextField *const pTextField(static_txtattr_cast<SwTextField*>(pAttr));
SwFieldType* pFieldType = pAttr->GetFormatField().GetField()->GetTyp();
+ if (SwFieldIds::Dde != pFieldType->Which()
+ && !pTextField->GetpTextNode())
+ {
+ break; // was not yet inserted
+ }
+
//JP 06-08-95: DDE-fields are an exception
assert(SwFieldIds::Dde == pFieldType->Which() ||
this == pTextField->GetpTextNode());
@@ -1599,6 +1605,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode )
if ( pAttr->End() == nullptr )
{
bInsertHint = false;
+ DestroyAttr(pAttr);
}
else
{
@@ -2971,6 +2978,7 @@ bool SwpHints::TryInsertHint(
if ( MAX_HINTS <= Count() ) // we're sorry, this flight is overbooked...
{
OSL_FAIL("hints array full :-(");
+ rNode.DestroyAttr(pHint);
return false;
}
diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index 188ec6f9a663..755391e940d7 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -152,9 +152,11 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
GetAutoFormat().dumpAsXml(pWriter);
break;
case RES_TXTATR_FIELD:
+ case RES_TXTATR_INPUTFIELD:
GetFormatField().dumpAsXml(pWriter);
break;
default:
+ SAL_WARN("sw.core", "Unhandled TXTATR");
break;
}
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 5c599d78afab..73cb47930eac 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -375,10 +375,10 @@ void SwTextNode::RstTextAttr(
sal_Int32 nEnd = nStt + nLen;
{
// enlarge range for the reset of text attributes in case of an overlapping input field
- const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt( nStt, RES_TXTATR_INPUTFIELD, PARENT ));
+ const SwTextInputField* pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(nStt, RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent));
if ( pTextInputField == nullptr )
{
- pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(nEnd, RES_TXTATR_INPUTFIELD, PARENT ));
+ pTextInputField = dynamic_cast<const SwTextInputField*>(GetTextAttrAt(nEnd, RES_TXTATR_INPUTFIELD, ::sw::GetTextAttrMode::Parent));
}
if ( pTextInputField != nullptr )
{
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..cb819d5216c8 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
{
@@ -1135,7 +1140,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 +1205,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 +1225,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 +1304,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..d611cb4a496b 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -981,10 +981,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())
{
@@ -1168,7 +1172,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
&& ( bSaveOtherPos
|| !pBkmk->IsExpanded() ) )
{
- pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n);
+ pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n, false);
n--;
}
}
@@ -1558,9 +1562,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..f1f7f48188aa 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -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..c7dbc781225b 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -2420,11 +2420,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 +2501,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);
@@ -2582,7 +2584,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>(
@@ -2682,7 +2684,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 +2756,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/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/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 38241c451a67..bb43665ec6a2 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1427,7 +1427,7 @@ void SwChartDataProvider::RemoveDataSequence( const SwTable &rTable, uno::Refere
aDataSequences[ &rTable ].erase( rxDataSequence );
}
-void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
+void SwChartDataProvider::InvalidateTable( const SwTable *pTable, bool bImmediate )
{
OSL_ENSURE( pTable, "table pointer is NULL" );
if (pTable)
@@ -1447,6 +1447,10 @@ void SwChartDataProvider::InvalidateTable( const SwTable *pTable )
}
}
}
+
+ // tdf#122995 added Immediate-mode to allow non-timer-delayed Chart invalidation
+ if (bImmediate && !bDisposed)
+ pTable->GetFrameFormat()->GetDoc()->getIDocumentChartDataProviderAccess().GetChartControllerHelper().Disconnect();
}
void SwChartDataProvider::DeleteBox( const SwTable *pTable, const SwTableBox &rBox )
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index d7634e2a2713..9d0710cf3384 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -283,8 +283,8 @@ GetNestedTextContent(SwTextNode const & rTextNode, sal_Int32 const nIndex,
bool const bParent)
{
// these should be unambiguous because of the dummy character
- SwTextNode::GetTextAttrMode const eMode( bParent
- ? SwTextNode::PARENT : SwTextNode::EXPAND );
+ auto const eMode( bParent
+ ? ::sw::GetTextAttrMode::Parent : ::sw::GetTextAttrMode::Expand );
SwTextAttr *const pMetaTextAttr =
rTextNode.GetTextAttrAt(nIndex, RES_TXTATR_META, eMode);
SwTextAttr *const pMetaFieldTextAttr =
@@ -582,7 +582,7 @@ bool getCursorPropertyValue(const SfxItemPropertySimpleEntry& rEntry
const SwTextNode *pTextNd =
rPam.GetDoc()->GetNodes()[pPos->nNode.GetIndex()]->GetTextNode();
const SwTextAttr* pTextAttr = pTextNd
- ? pTextNd->GetFieldTextAttrAt( pPos->nContent.GetIndex(), true )
+ ? pTextNd->GetFieldTextAttrAt(pPos->nContent.GetIndex(), ::sw::GetTextAttrMode::Default)
: nullptr;
if ( pTextAttr != nullptr )
{
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/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index b5b7f4e1a88e..d5061ea58658 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -1327,7 +1327,7 @@ void SwXTextField::TransmuteLeadToInputField(SwSetExpField & rField)
bool bSuccess = rIDCO.InsertPoolItem(*pPamForTextField, tempFormat);
assert(bSuccess);
(void) bSuccess;
- SwTextField const* pNewAttr(rNode.GetFieldTextAttrAt(nStart, true));
+ SwTextField const* pNewAttr(rNode.GetFieldTextAttrAt(nStart, ::sw::GetTextAttrMode::Default));
assert(pNewAttr);
SwFormatField const& rNewFormat(pNewAttr->GetFormatField());
assert(rNewFormat.Which() == (static_cast<SwSetExpField const*>(rNewFormat.GetField())->GetInputFlag() ? RES_TXTATR_INPUTFIELD : RES_TXTATR_FIELD));
@@ -2011,7 +2011,7 @@ void SAL_CALL SwXTextField::attach(
else
pDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFormat, nInsertFlags);
- SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->nContent.GetIndex()-1, true );
+ SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt(aPam.GetPoint()->nContent.GetIndex()-1, ::sw::GetTextAttrMode::Default);
// What about updating the fields? (see fldmgr.cxx)
if (!pTextAttr)
@@ -2075,7 +2075,7 @@ void SAL_CALL SwXTextField::attach(
}
// keep inserted annotation
{
- SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->nContent.GetIndex()-1, true );
+ SwTextField *const pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt(aEnd.End()->nContent.GetIndex()-1, ::sw::GetTextAttrMode::Default);
if ( pTextAttr != nullptr )
{
m_pImpl->SetFormatField(const_cast<SwFormatField*>(&pTextAttr->GetFormatField()), m_pImpl->m_pDoc);
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/unomap.cxx b/sw/source/core/unocore/unomap.cxx
index 05695e8585b2..63fbd6e78c13 100644
--- a/sw/source/core/unocore/unomap.cxx
+++ b/sw/source/core/unocore/unomap.cxx
@@ -952,6 +952,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetPropertyMapEntries(s
{OUString(UNO_NAME_HINT), FIELD_PROP_PAR2, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{OUString(UNO_NAME_HELP), FIELD_PROP_PAR3, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
{OUString(UNO_NAME_TOOLTIP), FIELD_PROP_PAR4, cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0},
+ {OUString(UNO_NAME_MISC_OBJ_INTEROPGRABBAG), FIELD_PROP_GRABBAG, cppu::UnoType< cppu::UnoSequenceType<css::beans::PropertyValue> >::get(), PROPERTY_NONE, 0},
COMMON_FLDTYP_PROPERTIES
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
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/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 3887a11191d7..a4dfe5422af1 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1566,6 +1566,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 +1648,7 @@ SwXText::convertToTextFrame(
bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd );
pEndPam->DeleteMark();
*pEndPam->GetPoint() = aEnd;
+ *oAnchorCheckPam->End() = aEnd;
}
pStartPam->SetMark();
*pStartPam->End() = *pEndPam->End();
@@ -1660,10 +1663,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 +1685,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 +1703,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());
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index a2da5005cc38..a92f3661c990 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -301,8 +301,7 @@ SwPrintUIOptions::SwPrintUIOptions(
aWidgetIds[4] = "rbRangeSelection";
m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds, aPrintRangeName,
- aChoices,
- bHasSelection ? 4 : 0,
+ aChoices, 0 /* always default to 'All pages' */,
aChoicesDisabled);
// show an Edit dependent on "Pages" selected
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx
index 7d96867acb00..8a94cd48d5b3 100644
--- a/sw/source/filter/basflt/fltshell.cxx
+++ b/sw/source/filter/basflt/fltshell.cxx
@@ -660,7 +660,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
SwTextNode const*const pTextNode(
aRegion.End()->nNode.GetNode().GetTextNode());
SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt(
- aRegion.End()->nContent.GetIndex() - 1, true) : nullptr;
+ aRegion.End()->nContent.GetIndex() - 1, ::sw::GetTextAttrMode::Default) : nullptr;
if (pField)
{
SwPostItField const*const pPostIt(
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..f0edba59c107 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;
@@ -968,14 +971,8 @@ void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
m_aRightBorderLine = m_aLeftBorderLine;
if( rOptions.nCellSpacing != 0 )
- {
m_aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
- }
- else
- {
- m_aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
- }
+ m_aBorderLine.SetWidth(SvxBorderLineWidth::Hairline);
m_aBorderLine.SetColor( rBorderColor );
if( m_nCellPadding )
@@ -1065,11 +1062,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 +2502,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>);
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 577a9f5c7b11..18ad069e605b 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -811,9 +811,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
OutTableCells( rWrt, pRow2->GetCells(), pRow2->GetBackground() );
if( !m_nCellSpacing && nRow < m_aRows.size()-1 && pRow2->bBottomBorder &&
- pRow2->nBottomBorder > DEF_LINE_WIDTH_1 )
+ pRow2->nBottomBorder > SvxBorderLineWidth::Hairline )
{
- for( auto nCnt = (pRow2->nBottomBorder / DEF_LINE_WIDTH_1) - 1; nCnt; --nCnt )
+ for( auto nCnt = (pRow2->nBottomBorder / SvxBorderLineWidth::Hairline) - 1; nCnt; --nCnt )
{
rWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_tablerow );
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index c1a6f7312d30..e570d1a92c54 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -244,9 +244,9 @@ static CSS1PropertyEnum const aBulletStyleTable[] =
static sal_uInt16 const aBorderWidths[] =
{
- DEF_LINE_WIDTH_0,
- DEF_LINE_WIDTH_5,
- DEF_LINE_WIDTH_1
+ SvxBorderLineWidth::Hairline,
+ SvxBorderLineWidth::VeryThin,
+ SvxBorderLineWidth::Thin
};
#undef SBORDER_ENTRY
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 3f72a8a044e3..1a08be28684a 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -5305,12 +5305,12 @@ void SwHTMLParser::InsertHorzRule()
}
else if( bNoShade )
{
- aBorderLine.SetWidth( DEF_LINE_WIDTH_2 );
+ aBorderLine.SetWidth( SvxBorderLineWidth::Medium );
}
else
{
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::DOUBLE);
- aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
+ aBorderLine.SetWidth(SvxBorderLineWidth::Hairline);
}
SvxBoxItem aBoxItem(RES_BOX);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 5dbb02ce9eb5..f45de340f91d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -301,6 +301,28 @@ static bool lcl_isOnelinerSdt(const OUString& rName)
return rName == "Title" || rName == "Subtitle" || rName == "Company";
}
+static void AddToAttrList(rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrs, ...)
+{
+ if (!pAttrList.is())
+ pAttrList = FastSerializerHelper::createAttrList();
+
+ va_list args;
+ va_start(args, nAttrs);
+ for (sal_Int32 i = 0; i < nAttrs; i++)
+ {
+ sal_Int32 nName = va_arg(args, sal_Int32);
+ const char* pValue = va_arg(args, const char*);
+ if (pValue)
+ pAttrList->add(nName, pValue);
+ }
+ va_end(args);
+}
+
+static void AddToAttrList(rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const char* sAttrValue)
+{
+ AddToAttrList(pAttrList, 1, nAttrName, sAttrValue);
+}
+
// write a floating table directly to docx without the surrounding frame
void DocxAttributeOutput::WriteFloatingTable(ww8::Frame const* pParentFrame)
{
@@ -438,7 +460,7 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText
// would normally arrive, it would be too late (would be after the
// paragraph start has been written).
bool bEndParaSdt = false;
- if (m_bStartedParaSdt)
+ if (m_aParagraphSdt.m_bStartedSdt)
{
SwTextNode* pTextNode = m_rExport.m_pCurPam->GetNode().GetTextNode();
if (pTextNode && pTextNode->GetpSwAttrSet())
@@ -448,17 +470,16 @@ void DocxAttributeOutput::StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pText
{
const SfxGrabBagItem& rParaGrabBag = static_cast<const SfxGrabBagItem&>(*pItem);
const std::map<OUString, css::uno::Any>& rMap = rParaGrabBag.GetGrabBag();
- bEndParaSdt = m_bStartedParaSdt && rMap.find("ParaSdtEndBefore") != rMap.end();
+ bEndParaSdt = m_aParagraphSdt.m_bStartedSdt && rMap.find("ParaSdtEndBefore") != rMap.end();
}
}
}
// TODO also avoid multiline paragraphs in those SDT types for shape text
- bool bOneliner = m_bStartedParaSdt && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen() && lcl_isOnelinerSdt(m_aStartedParagraphSdtPrAlias);
- if (bEndParaSdt || (m_bStartedParaSdt && m_bHadSectPr) || bOneliner)
+ bool bOneliner = m_aParagraphSdt.m_bStartedSdt && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen() && lcl_isOnelinerSdt(m_aStartedParagraphSdtPrAlias);
+ if (bEndParaSdt || (m_aParagraphSdt.m_bStartedSdt && m_bHadSectPr) || bOneliner)
{
// This is the common case: "close sdt before the current paragraph" was requested by the next paragraph.
- EndSdtBlock();
- m_bStartedParaSdt = false;
+ m_aParagraphSdt.EndSdtBlock(m_pSerializer);
m_aStartedParagraphSdtPrAlias.clear();
}
m_bHadSectPr = false;
@@ -551,14 +572,270 @@ static OString convertToOOXMLHoriOrientRel(sal_Int16 nOrientRel)
}
}
-static void lcl_deleteAndResetTheLists( rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren, rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs, OUString& rSdtPrAlias)
+void SdtBlockHelper::DeleteAndResetTheLists()
+{
+ if (m_pTokenChildren.is() )
+ m_pTokenChildren.clear();
+ if (m_pDataBindingAttrs.is() )
+ m_pDataBindingAttrs.clear();
+ if (m_pTextAttrs.is())
+ m_pTextAttrs.clear();
+ if (!m_aAlias.isEmpty())
+ m_aAlias.clear();
+ if (!m_aPlaceHolderDocPart.isEmpty())
+ m_aPlaceHolderDocPart.clear();
+ if (!m_aColor.isEmpty())
+ m_aColor.clear();
+ m_bHasId = false;
+}
+
+void SdtBlockHelper::WriteSdtBlock(::sax_fastparser::FSHelperPtr& pSerializer, bool bRunTextIsOn, bool bParagraphHasDrawing)
+{
+ if (m_nSdtPrToken <= 0 && !m_pDataBindingAttrs.is() && !m_bHasId)
+ return;
+
+ // sdt start mark
+ pSerializer->mark(Tag_WriteSdtBlock);
+
+ pSerializer->startElementNS(XML_w, XML_sdt);
+
+ // output sdt properties
+ pSerializer->startElementNS(XML_w, XML_sdtPr);
+
+ if (m_nSdtPrToken > 0 && m_pTokenChildren.is())
+ {
+ if (!m_pTokenAttributes.is())
+ pSerializer->startElement(m_nSdtPrToken);
+ else
+ {
+ XFastAttributeListRef xAttrList( m_pTokenAttributes.get() );
+ m_pTokenAttributes.clear();
+ pSerializer->startElement(m_nSdtPrToken, xAttrList);
+ }
+
+ if (m_nSdtPrToken == FSNS(XML_w, XML_date) || m_nSdtPrToken == FSNS(XML_w, XML_docPartObj) || m_nSdtPrToken == FSNS(XML_w, XML_docPartList) || m_nSdtPrToken == FSNS(XML_w14, XML_checkbox)) {
+ const uno::Sequence<xml::FastAttribute> aChildren = m_pTokenChildren->getFastAttributes();
+ for (const auto& rChild : aChildren)
+ pSerializer->singleElement(rChild.Token, FSNS(XML_w, XML_val), rChild.Value.toUtf8() );
+ }
+
+ pSerializer->endElement(m_nSdtPrToken);
+ }
+ else if ((m_nSdtPrToken > 0) && m_nSdtPrToken != FSNS(XML_w, XML_id) && !(bRunTextIsOn && bParagraphHasDrawing))
+ {
+ if (!m_pTokenAttributes.is())
+ pSerializer->singleElement(m_nSdtPrToken);
+ else
+ {
+ XFastAttributeListRef xAttrList( m_pTokenAttributes.get() );
+ m_pTokenAttributes.clear();
+ pSerializer->singleElement(m_nSdtPrToken, xAttrList);
+ }
+ }
+
+ WriteExtraParams(pSerializer);
+
+ pSerializer->endElementNS(XML_w, XML_sdtPr);
+
+ // sdt contents start tag
+ pSerializer->startElementNS(XML_w, XML_sdtContent);
+
+ // prepend the tags since the sdt start mark before the paragraph
+ pSerializer->mergeTopMarks(Tag_WriteSdtBlock, sax_fastparser::MergeMarks::PREPEND);
+
+ // write the ending tags after the paragraph
+ m_bStartedSdt = true;
+
+ // clear sdt status
+ m_nSdtPrToken = 0;
+ m_pTokenChildren.clear();
+ m_pDataBindingAttrs.clear();
+ m_pTextAttrs.clear();
+ m_aAlias.clear();
+ m_bHasId = false;
+}
+
+void SdtBlockHelper::WriteExtraParams(::sax_fastparser::FSHelperPtr& pSerializer)
+{
+ if (m_nSdtPrToken == FSNS(XML_w, XML_id) || m_bHasId)
+ //Word won't open a document with an empty id tag, we fill it with a random number
+ pSerializer->singleElementNS(XML_w, XML_id, FSNS(XML_w, XML_val),
+ OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())));
+
+ if (m_pDataBindingAttrs.is())
+ {
+ XFastAttributeListRef xAttrList( m_pDataBindingAttrs.get() );
+ m_pDataBindingAttrs.clear();
+ pSerializer->singleElementNS(XML_w, XML_dataBinding, xAttrList);
+ }
+
+ if (m_pTextAttrs.is())
+ {
+ XFastAttributeListRef xAttrList( m_pTextAttrs.get() );
+ m_pTextAttrs.clear();
+ pSerializer->singleElementNS(XML_w, XML_text, xAttrList);
+ }
+
+ if (!m_aPlaceHolderDocPart.isEmpty())
+ {
+ pSerializer->startElementNS(XML_w, XML_placeholder);
+ pSerializer->singleElementNS(XML_w, XML_docPart, FSNS(XML_w, XML_val), m_aPlaceHolderDocPart.toUtf8() );
+ pSerializer->endElementNS(XML_w, XML_placeholder);
+ }
+ if (!m_aColor.isEmpty())
+ {
+ pSerializer->singleElementNS(XML_w15, XML_color, FSNS(XML_w, XML_val), m_aColor.toUtf8() );
+ }
+
+ if (!m_aAlias.isEmpty())
+ pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val), m_aAlias.toUtf8() );
+}
+
+void SdtBlockHelper::EndSdtBlock(::sax_fastparser::FSHelperPtr& pSerializer)
{
- if( pSdtPrTokenChildren.is() )
- pSdtPrTokenChildren.clear();
- if( pSdtPrDataBindingAttrs.is() )
- pSdtPrDataBindingAttrs.clear();
- if (!rSdtPrAlias.isEmpty())
- rSdtPrAlias.clear();
+ pSerializer->endElementNS(XML_w, XML_sdtContent);
+ pSerializer->endElementNS(XML_w, XML_sdt);
+ m_bStartedSdt = false;
+}
+
+void SdtBlockHelper::GetSdtParamsFromGrabBag(const uno::Sequence<beans::PropertyValue>& aGrabBagSdt)
+{
+ for (const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
+ {
+ if (aPropertyValue.Name == "ooxml:CT_SdtPr_checkbox")
+ {
+ m_nSdtPrToken = FSNS(XML_w14, XML_checkbox);
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_SdtCheckbox_checked")
+ AddToAttrList(m_pTokenChildren,
+ FSNS(XML_w14, XML_checked),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ else if (rProp.Name == "ooxml:CT_SdtCheckbox_checkedState")
+ AddToAttrList(m_pTokenChildren,
+ FSNS(XML_w14, XML_checkedState),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ else if (rProp.Name == "ooxml:CT_SdtCheckbox_uncheckedState")
+ AddToAttrList(m_pTokenChildren,
+ FSNS(XML_w14, XML_uncheckedState),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_dataBinding" && !m_pDataBindingAttrs.is())
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_DataBinding_prefixMappings")
+ AddToAttrList( m_pDataBindingAttrs,
+ FSNS( XML_w, XML_prefixMappings ),
+ OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
+ else if (rProp.Name == "ooxml:CT_DataBinding_xpath")
+ AddToAttrList( m_pDataBindingAttrs,
+ FSNS( XML_w, XML_xpath ),
+ OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
+ else if (rProp.Name == "ooxml:CT_DataBinding_storeItemID")
+ AddToAttrList( m_pDataBindingAttrs,
+ FSNS( XML_w, XML_storeItemID ),
+ OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_text")
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ if (aGrabBag.hasElements())
+ {
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_SdtText_multiLine")
+ AddToAttrList(m_pTextAttrs,
+ FSNS(XML_w, XML_multiLine),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ }
+ else
+ {
+ // We still have w:text, but no attrs
+ m_nSdtPrToken = FSNS(XML_w, XML_text);
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPlaceholder_docPart")
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_SdtPlaceholder_docPart_val")
+ m_aPlaceHolderDocPart = sValue;
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_color")
+ {
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_SdtColor_val")
+ m_aColor = sValue;
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_alias" && m_aAlias.isEmpty())
+ {
+ if (!(aPropertyValue.Value >>= m_aAlias))
+ SAL_WARN("sw.ww8", "DocxAttributeOutput::GrabBag: unexpected sdt alias value");
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_id")
+ m_bHasId = true;
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_citation")
+ m_nSdtPrToken = FSNS(XML_w, XML_citation);
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartObj" ||
+ aPropertyValue.Name == "ooxml:CT_SdtPr_docPartList")
+ {
+ if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartObj")
+ m_nSdtPrToken = FSNS(XML_w, XML_docPartObj);
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartList")
+ m_nSdtPrToken = FSNS(XML_w, XML_docPartList);
+
+ uno::Sequence<beans::PropertyValue> aGrabBag;
+ aPropertyValue.Value >>= aGrabBag;
+ for (const auto& rProp : std::as_const(aGrabBag))
+ {
+ OUString sValue = rProp.Value.get<OUString>();
+ if (rProp.Name == "ooxml:CT_SdtDocPart_docPartGallery")
+ AddToAttrList(m_pTokenChildren,
+ FSNS(XML_w, XML_docPartGallery),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ else if (rProp.Name == "ooxml:CT_SdtDocPart_docPartCategory")
+ AddToAttrList(m_pTokenChildren,
+ FSNS(XML_w, XML_docPartCategory),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ else if (rProp.Name == "ooxml:CT_SdtDocPart_docPartUnique")
+ {
+ if (sValue.isEmpty())
+ sValue = "true";
+ AddToAttrList(m_pTokenChildren, FSNS(XML_w, XML_docPartUnique),
+ OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ }
+ }
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_equation")
+ m_nSdtPrToken = FSNS(XML_w, XML_equation);
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_picture")
+ m_nSdtPrToken = FSNS(XML_w, XML_picture);
+ else if (aPropertyValue.Name == "ooxml:CT_SdtPr_group")
+ m_nSdtPrToken = FSNS(XML_w, XML_group);
+ else
+ SAL_WARN("sw.ww8", "GetSdtParamsFromGrabBag unhandled SdtPr grab bag property " << aPropertyValue.Name);
+ }
}
void DocxAttributeOutput::PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize)
@@ -636,7 +913,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
++m_nTextFrameLevel;
if( m_nTextFrameLevel == 1 && !m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen() )
{
- comphelper::FlagRestorationGuard aStartedParaSdtGuard(m_bStartedParaSdt, false);
+ comphelper::FlagRestorationGuard aStartedParaSdtGuard(m_aParagraphSdt.m_bStartedSdt, false);
assert(!m_pPostponedCustomShape);
m_pPostponedCustomShape.reset(new std::vector<PostponedDrawing>);
@@ -648,11 +925,10 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
if (!TextBoxIsFramePr(rFrameFormat) || m_bWritingHeaderFooter)
{
- if (m_bStartedCharSdt)
+ if (m_aRunSdt.m_bStartedSdt)
{
// Run-level SDT still open? Close it before AlternateContent.
- EndSdtBlock();
- m_bStartedCharSdt = false;
+ m_aRunSdt.EndSdtBlock(m_pSerializer);
}
m_pSerializer->startElementNS(XML_w, XML_r);
m_pSerializer->startElementNS(XML_mc, XML_AlternateContent);
@@ -738,11 +1014,10 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
m_nHyperLinkCount = 0;
}
- if (m_bStartedCharSdt)
+ if (m_aRunSdt.m_bStartedSdt)
{
// Run-level SDT still open? Close it now.
- EndSdtBlock();
- m_bStartedCharSdt = false;
+ m_aRunSdt.EndSdtBlock(m_pSerializer);
}
if (m_bPageBreakAfter)
@@ -754,15 +1029,25 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
m_pSerializer->endElementNS( XML_w, XML_p );
// on export sdt blocks are never nested ATM
- if( !m_bAnchorLinkedToNode && !m_bStartedParaSdt )
- WriteSdtBlock( m_nParagraphSdtPrToken, m_pParagraphSdtPrTokenChildren, m_pParagraphSdtPrTokenAttributes, m_pParagraphSdtPrDataBindingAttrs, m_aParagraphSdtPrAlias, /*bPara=*/true );
+ if (!m_bAnchorLinkedToNode && !m_aParagraphSdt.m_bStartedSdt)
+ {
+ m_aParagraphSdt.WriteSdtBlock(m_pSerializer, m_bRunTextIsOn, m_rExport.SdrExporter().IsParagraphHasDrawing());
+
+ if (m_aParagraphSdt.m_bStartedSdt)
+ {
+ if (m_tableReference->m_bTableCellOpen)
+ m_tableReference->m_bTableCellParaSdtOpen = true;
+ if (m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
+ m_rExport.SdrExporter().setParagraphSdtOpen(true);
+ }
+ }
else
{
//These should be written out to the actual Node and not to the anchor.
//Clear them as they will be repopulated when the node is processed.
- m_nParagraphSdtPrToken = 0;
- m_bParagraphSdtHasId = false;
- lcl_deleteAndResetTheLists( m_pParagraphSdtPrTokenChildren, m_pParagraphSdtPrDataBindingAttrs, m_aParagraphSdtPrAlias );
+ m_aParagraphSdt.m_nSdtPrToken = 0;
+ m_aParagraphSdt.m_bHasId = false;
+ m_aParagraphSdt.DeleteAndResetTheLists();
}
//sdtcontent is written so Set m_bParagraphHasDrawing to false
@@ -790,107 +1075,6 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
m_aBookmarksOfParagraphEnd.clear();
}
-void DocxAttributeOutput::WriteSdtBlock( sal_Int32& nSdtPrToken,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
- OUString& rSdtPrAlias,
- bool bPara )
-{
- if( nSdtPrToken <= 0 && !pSdtPrDataBindingAttrs.is() )
- return;
-
- // sdt start mark
- m_pSerializer->mark(Tag_WriteSdtBlock);
-
- m_pSerializer->startElementNS(XML_w, XML_sdt);
-
- // output sdt properties
- m_pSerializer->startElementNS(XML_w, XML_sdtPr);
-
- if( nSdtPrToken > 0 && pSdtPrTokenChildren.is() )
- {
- if (!pSdtPrTokenAttributes.is())
- m_pSerializer->startElement(nSdtPrToken);
- else
- {
- XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
- pSdtPrTokenAttributes.clear();
- m_pSerializer->startElement(nSdtPrToken, xAttrList);
- }
-
- if (nSdtPrToken == FSNS( XML_w, XML_date ) || nSdtPrToken == FSNS( XML_w, XML_docPartObj ) || nSdtPrToken == FSNS( XML_w, XML_docPartList ) || nSdtPrToken == FSNS( XML_w14, XML_checkbox )) {
- const uno::Sequence<xml::FastAttribute> aChildren = pSdtPrTokenChildren->getFastAttributes();
- for( const auto& rChild : aChildren )
- m_pSerializer->singleElement( rChild.Token,
- FSNS(XML_w, XML_val), rChild.Value.toUtf8() );
- }
-
- m_pSerializer->endElement( nSdtPrToken );
- }
- else if( (nSdtPrToken > 0) && nSdtPrToken != FSNS( XML_w, XML_id ) && !(m_bRunTextIsOn && m_rExport.SdrExporter().IsParagraphHasDrawing()))
- {
- if (!pSdtPrTokenAttributes.is())
- m_pSerializer->singleElement(nSdtPrToken);
- else
- {
- XFastAttributeListRef xAttrList(pSdtPrTokenAttributes.get());
- pSdtPrTokenAttributes.clear();
- m_pSerializer->singleElement(nSdtPrToken, xAttrList);
- }
- }
-
- if( nSdtPrToken == FSNS( XML_w, XML_id ) || ( bPara && m_bParagraphSdtHasId ) )
- //Word won't open a document with an empty id tag, we fill it with a random number
- m_pSerializer->singleElementNS(XML_w, XML_id, FSNS(XML_w, XML_val),
- OString::number(comphelper::rng::uniform_int_distribution(0, std::numeric_limits<int>::max())));
-
- if( pSdtPrDataBindingAttrs.is() && !m_rExport.SdrExporter().IsParagraphHasDrawing())
- {
- XFastAttributeListRef xAttrList( pSdtPrDataBindingAttrs.get() );
- pSdtPrDataBindingAttrs.clear();
- m_pSerializer->singleElementNS(XML_w, XML_dataBinding, xAttrList);
- }
-
- if (!rSdtPrAlias.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_alias, FSNS(XML_w, XML_val),
- rSdtPrAlias.toUtf8());
-
- m_pSerializer->endElementNS( XML_w, XML_sdtPr );
-
- // sdt contents start tag
- m_pSerializer->startElementNS(XML_w, XML_sdtContent);
-
- // prepend the tags since the sdt start mark before the paragraph
- m_pSerializer->mergeTopMarks(Tag_WriteSdtBlock, sax_fastparser::MergeMarks::PREPEND);
-
- // write the ending tags after the paragraph
- if (bPara)
- {
- m_bStartedParaSdt = true;
- if (m_tableReference->m_bTableCellOpen)
- m_tableReference->m_bTableCellParaSdtOpen = true;
- if (m_rExport.SdrExporter().IsDMLAndVMLDrawingOpen())
- m_rExport.SdrExporter().setParagraphSdtOpen(true);
- }
- else
- // Support multiple runs inside a run-level SDT: don't close the SDT block yet.
- m_bStartedCharSdt = true;
-
- // clear sdt status
- nSdtPrToken = 0;
- pSdtPrTokenChildren.clear();
- pSdtPrDataBindingAttrs.clear();
- rSdtPrAlias.clear();
-
-}
-
-void DocxAttributeOutput::EndSdtBlock()
-{
- m_pSerializer->endElementNS( XML_w, XML_sdtContent );
- m_pSerializer->endElementNS( XML_w, XML_sdt );
-}
-
#define MAX_CELL_IN_WORD 62
void DocxAttributeOutput::SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow)
@@ -991,7 +1175,7 @@ void DocxAttributeOutput::SectionBreaks(const SwNode& rNode)
if (aNextIndex.GetNode().IsTextNode())
{
const SwTextNode* pTextNode = static_cast<SwTextNode*>(&aNextIndex.GetNode());
- m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen, pTextNode->GetText().isEmpty());
+ m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen);
}
else if (aNextIndex.GetNode().IsTableNode())
{
@@ -1008,7 +1192,7 @@ void DocxAttributeOutput::SectionBreaks(const SwNode& rNode)
// Also handle section endings
const SwTextNode* pTextNode = aNextIndex.GetNode().GetTextNode();
if (rNode.StartOfSectionNode()->IsTableNode() || rNode.StartOfSectionNode()->IsSectionNode())
- m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen, pTextNode->GetText().isEmpty());
+ m_rExport.OutputSectionBreaks(pTextNode->GetpSwAttrSet(), *pTextNode, m_tableReference->m_bTableCellOpen);
}
}
}
@@ -1326,7 +1510,10 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
for ( std::vector<FieldInfos>::iterator pIt = m_Fields.begin() + nFieldsInPrevHyperlink; pIt != m_Fields.end(); )
{
// Add the fields starts for all but hyperlinks and TOCs
- if (pIt->bOpen && pIt->pField && pIt->eType != ww::eFORMDROPDOWN)
+ if (pIt->bOpen && pIt->pField && pIt->eType != ww::eFORMDROPDOWN &&
+ // it is not an input field with extra grabbag params (sdt field)
+ (!(pIt->eType == ww::eFILLIN && static_cast<const SwInputField*>(pIt->pField.get())->getGrabBagParams().hasElements()))
+ )
{
StartField_Impl( pNode, nPos, *pIt );
@@ -1360,12 +1547,11 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
// if another sdt starts in this run, then wait
// as closing the sdt now, might cause nesting of sdts
- if (m_nRunSdtPrToken > 0)
+ if (m_aRunSdt.m_nSdtPrToken > 0)
bCloseEarlierSDT = true;
else
- EndSdtBlock();
+ m_aRunSdt.EndSdtBlock(m_pSerializer);
m_bEndCharSdt = false;
- m_bStartedCharSdt = false;
}
if ( m_closeHyperlinkInPreviousRun )
@@ -1391,7 +1577,9 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
for ( std::vector<FieldInfos>::iterator pIt = m_Fields.begin(); pIt != m_Fields.end(); )
{
// Add the fields starts for hyperlinks, TOCs and index marks
- if (pIt->bOpen && (!pIt->pField || pIt->eType == ww::eFORMDROPDOWN))
+ if (pIt->bOpen && (!pIt->pField || pIt->eType == ww::eFORMDROPDOWN ||
+ // InputField with extra grabbag params - it is sdt field
+ (pIt->eType == ww::eFILLIN && static_cast<const SwInputField*>(pIt->pField.get())->getGrabBagParams().hasElements())))
{
StartRedline( m_pRedlineData );
StartField_Impl( pNode, nPos, *pIt, true );
@@ -1523,23 +1711,22 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool /
// enclose in a sdt block, if necessary: if one is already started, then don't do it for now
// (so on export sdt blocks are never nested ATM)
- if ( !m_bAnchorLinkedToNode && !m_bStartedCharSdt )
+ if ( !m_bAnchorLinkedToNode && !m_aRunSdt.m_bStartedSdt)
{
- rtl::Reference<sax_fastparser::FastAttributeList> pRunSdtPrTokenAttributes;
- WriteSdtBlock( m_nRunSdtPrToken, m_pRunSdtPrTokenChildren, pRunSdtPrTokenAttributes, m_pRunSdtPrDataBindingAttrs, m_aRunSdtPrAlias, /*bPara=*/false );
+ m_aRunSdt.WriteSdtBlock(m_pSerializer, m_bRunTextIsOn, m_rExport.SdrExporter().IsParagraphHasDrawing());
}
else
{
//These should be written out to the actual Node and not to the anchor.
//Clear them as they will be repopulated when the node is processed.
- m_nRunSdtPrToken = 0;
- lcl_deleteAndResetTheLists( m_pRunSdtPrTokenChildren, m_pRunSdtPrDataBindingAttrs, m_aRunSdtPrAlias );
+ m_aRunSdt.m_nSdtPrToken = 0;
+ m_aRunSdt.DeleteAndResetTheLists();
}
if (bCloseEarlierSDT)
{
m_pSerializer->mark(Tag_EndRun_2);
- EndSdtBlock();
+ m_aRunSdt.EndSdtBlock(m_pSerializer);
m_pSerializer->mergeTopMarks(Tag_EndRun_2, sax_fastparser::MergeMarks::PREPEND);
}
@@ -1898,7 +2085,7 @@ void DocxAttributeOutput::WriteFFData( const FieldInfos& rInfos )
}
}
-void DocxAttributeOutput::WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang)
+void DocxAttributeOutput::WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang, const uno::Sequence<beans::PropertyValue>& aGrabBagSdt)
{
m_pSerializer->startElementNS(XML_w, XML_sdt);
m_pSerializer->startElementNS(XML_w, XML_sdtPr);
@@ -1919,8 +2106,64 @@ void DocxAttributeOutput::WriteFormDateStart(const OUString& sFullDate, const OU
FSNS(XML_w, XML_val), "dateTime");
m_pSerializer->singleElementNS(XML_w, XML_calendar,
FSNS(XML_w, XML_val), "gregorian");
-
m_pSerializer->endElementNS(XML_w, XML_date);
+
+ if (aGrabBagSdt.hasElements())
+ {
+ // There are some extra sdt parameters came from grab bag
+ SdtBlockHelper aSdtBlock;
+ aSdtBlock.GetSdtParamsFromGrabBag(aGrabBagSdt);
+ aSdtBlock.WriteExtraParams(m_pSerializer);
+ }
+
+ m_pSerializer->endElementNS(XML_w, XML_sdtPr);
+
+ m_pSerializer->startElementNS(XML_w, XML_sdtContent);
+}
+
+void DocxAttributeOutput::WriteSdtPlainText(const OUString & sValue, const uno::Sequence<beans::PropertyValue>& aGrabBagSdt)
+{
+ m_pSerializer->startElementNS(XML_w, XML_sdt);
+ m_pSerializer->startElementNS(XML_w, XML_sdtPr);
+
+ if (aGrabBagSdt.hasElements())
+ {
+ // There are some extra sdt parameters came from grab bag
+ SdtBlockHelper aSdtBlock;
+ aSdtBlock.GetSdtParamsFromGrabBag(aGrabBagSdt);
+ aSdtBlock.WriteExtraParams(m_pSerializer);
+
+ if (aSdtBlock.m_nSdtPrToken && aSdtBlock.m_nSdtPrToken != FSNS(XML_w, XML_id))
+ {
+ // Write <w:text/> or whatsoever from grabbag
+ m_pSerializer->singleElement(aSdtBlock.m_nSdtPrToken);
+ }
+
+ // Store databindings data for later writing to corresponding XMLs
+ OUString sPrefixMapping, sXpath;
+ for (const auto& rProp : std::as_const(aGrabBagSdt))
+ {
+ if (rProp.Name == "ooxml:CT_SdtPr_dataBinding")
+ {
+ uno::Sequence<beans::PropertyValue> aDataBindingProps;
+ rProp.Value >>= aDataBindingProps;
+ for (const auto& rDBProp : std::as_const(aDataBindingProps))
+ {
+ if (rDBProp.Name == "ooxml:CT_DataBinding_prefixMappings")
+ sPrefixMapping = rDBProp.Value.get<OUString>();
+ else if (rDBProp.Name == "ooxml:CT_DataBinding_xpath")
+ sXpath = rDBProp.Value.get<OUString>();
+ }
+ }
+ }
+
+ if (sXpath.getLength())
+ {
+ // Given xpath is sufficient
+ m_rExport.AddSdtData(sPrefixMapping, sXpath, sValue);
+ }
+ }
+
m_pSerializer->endElementNS(XML_w, XML_sdtPr);
m_pSerializer->startElementNS(XML_w, XML_sdtContent);
@@ -1996,6 +2239,7 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
{
// Expand unsupported fields
RunText( rInfos.pField->GetFieldName() );
+ return;
}
else if ( rInfos.eType == ww::eFORMDATE )
{
@@ -2023,7 +2267,11 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
OUString sLang;
params.extractParam( ODF_FORMDATE_DATEFORMAT_LANGUAGE, sLang );
- WriteFormDateStart( sFullDate, sDateFormat, sLang );
+ uno::Sequence<beans::PropertyValue> aSdtParams;
+ params.extractParam(UNO_NAME_MISC_OBJ_INTEROPGRABBAG, aSdtParams);
+
+ WriteFormDateStart( sFullDate, sDateFormat, sLang, aSdtParams);
+ return;
}
else if (rInfos.eType == ww::eFORMDROPDOWN && rInfos.pField)
{
@@ -2032,8 +2280,20 @@ void DocxAttributeOutput::StartField_Impl( const SwTextNode* pNode, sal_Int32 nP
WriteSdtDropDownStart(rField2.GetName(),
rField2.GetSelectedItem(),
rField2.GetItemSequence());
+ return;
+ }
+ else if (rInfos.eType == ww::eFILLIN)
+ {
+ SwInputField const& rField(*static_cast<SwInputField const*>(rInfos.pField.get()));
+ if (rField.getGrabBagParams().hasElements())
+ {
+ WriteSdtPlainText(rField.GetPar1(), rField.getGrabBagParams());
+ m_sRawText = rField.GetPar1(); // Write field content also as a fallback
+ return;
+ }
}
- else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
+
+ if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
if ( bWriteRun )
m_pSerializer->startElementNS(XML_w, XML_r);
@@ -2239,7 +2499,7 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
WriteSdtEnd();
return;
}
- if (rInfos.eType == ww::eFORMDROPDOWN && rInfos.pField)
+ else if (rInfos.eType == ww::eFORMDROPDOWN && rInfos.pField)
{
// write selected item from End not Start to ensure that any bookmarks
// precede it
@@ -2247,7 +2507,15 @@ void DocxAttributeOutput::EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos
WriteSdtDropDownEnd(rField.GetSelectedItem(), rField.GetItemSequence());
return;
}
-
+ else if (rInfos.eType == ww::eFILLIN && rInfos.pField)
+ {
+ SwInputField const& rField(*static_cast<SwInputField const*>(rInfos.pField.get()));
+ if (rField.getGrabBagParams().hasElements())
+ {
+ WriteSdtEnd();
+ return;
+ }
+ }
// The command has to be written before for the hyperlinks
if ( rInfos.pField )
{
@@ -2688,7 +2956,7 @@ void DocxAttributeOutput::GetSdtEndBefore(const SdrObject* pSdrObj)
auto pProp = std::find_if(aGrabBag.begin(), aGrabBag.end(),
[this](const beans::PropertyValue& rProp) {
- return "SdtEndBefore" == rProp.Name && m_bStartedCharSdt && !m_bEndCharSdt; });
+ return "SdtEndBefore" == rProp.Name && m_aRunSdt.m_bStartedSdt && !m_bEndCharSdt; });
if (pProp != aGrabBag.end())
pProp->Value >>= m_bEndCharSdt;
}
@@ -5787,8 +6055,10 @@ void DocxAttributeOutput::pushToTableExportContext(DocxTableExportContext& rCont
rContext.m_nTableDepth = m_tableReference->m_nTableDepth;
m_tableReference->m_nTableDepth = 0;
- rContext.m_bStartedParaSdt = m_bStartedParaSdt;
- m_bStartedParaSdt = false;
+ rContext.m_bStartedParaSdt = m_aParagraphSdt.m_bStartedSdt;
+ m_aParagraphSdt.m_bStartedSdt = false;
+ rContext.m_bStartedRunSdt = m_aRunSdt.m_bStartedSdt;
+ m_aRunSdt.m_bStartedSdt = false;
}
void DocxAttributeOutput::popFromTableExportContext(DocxTableExportContext const & rContext)
@@ -5796,7 +6066,8 @@ void DocxAttributeOutput::popFromTableExportContext(DocxTableExportContext const
m_rExport.m_pTableInfo = rContext.m_pTableInfo;
m_tableReference->m_bTableCellOpen = rContext.m_bTableCellOpen;
m_tableReference->m_nTableDepth = rContext.m_nTableDepth;
- m_bStartedParaSdt = rContext.m_bStartedParaSdt;
+ m_aParagraphSdt.m_bStartedSdt = rContext.m_bStartedParaSdt;
+ m_aRunSdt.m_bStartedSdt = rContext.m_bStartedRunSdt;
}
void DocxAttributeOutput::WriteTextBox(uno::Reference<drawing::XShape> xShape)
@@ -6127,11 +6398,10 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW
void DocxAttributeOutput::EndParaSdtBlock()
{
- if (m_bStartedParaSdt)
+ if (m_aParagraphSdt.m_bStartedSdt)
{
// Paragraph-level SDT still open? Close it now.
- EndSdtBlock();
- m_bStartedParaSdt = false;
+ m_aParagraphSdt.EndSdtBlock(m_pSerializer);
}
}
@@ -8966,102 +9236,8 @@ void DocxAttributeOutput::ParaGrabBag(const SfxGrabBagItem& rItem)
{
const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
- for (const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
- {
- if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartObj" ||
- aPropertyValue.Name == "ooxml:CT_SdtPr_docPartList")
- {
- if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartObj")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_docPartObj );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_docPartList")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_docPartList );
-
- uno::Sequence<beans::PropertyValue> aGrabBag;
- aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : std::as_const(aGrabBag))
- {
- OUString sValue = rProp.Value.get<OUString>();
- if (rProp.Name == "ooxml:CT_SdtDocPart_docPartGallery")
- AddToAttrList( m_pParagraphSdtPrTokenChildren,
- FSNS( XML_w, XML_docPartGallery ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtDocPart_docPartCategory")
- AddToAttrList( m_pParagraphSdtPrTokenChildren,
- FSNS( XML_w, XML_docPartCategory ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtDocPart_docPartUnique")
- {
- if (sValue.isEmpty())
- sValue = "true";
- AddToAttrList( m_pParagraphSdtPrTokenChildren, FSNS( XML_w, XML_docPartUnique ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_equation")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_equation );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_picture")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_picture );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_citation")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_citation );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_group")
- m_nParagraphSdtPrToken = FSNS( XML_w, XML_group );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_text")
- m_nParagraphSdtPrToken = FSNS(XML_w, XML_text);
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_dataBinding" && !m_pParagraphSdtPrDataBindingAttrs.is())
- {
- uno::Sequence<beans::PropertyValue> aGrabBag;
- aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : std::as_const(aGrabBag))
- {
- OUString sValue = rProp.Value.get<OUString>();
- if (rProp.Name == "ooxml:CT_DataBinding_prefixMappings")
- AddToAttrList( m_pParagraphSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_prefixMappings ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_DataBinding_xpath")
- AddToAttrList( m_pParagraphSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_xpath ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_DataBinding_storeItemID")
- AddToAttrList( m_pParagraphSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_storeItemID ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_alias" && m_aParagraphSdtPrAlias.isEmpty())
- {
- if (!(aPropertyValue.Value >>= m_aParagraphSdtPrAlias))
- SAL_WARN("sw.ww8", "DocxAttributeOutput::ParaGrabBag: unexpected sdt alias value");
- m_aStartedParagraphSdtPrAlias = m_aParagraphSdtPrAlias;
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_checkbox")
- {
- m_nParagraphSdtPrToken = FSNS( XML_w14, XML_checkbox );
- uno::Sequence<beans::PropertyValue> aGrabBag;
- aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : std::as_const(aGrabBag))
- {
- OUString sValue = rProp.Value.get<OUString>();
- if (rProp.Name == "ooxml:CT_SdtCheckbox_checked")
- AddToAttrList( m_pParagraphSdtPrTokenChildren,
- FSNS( XML_w14, XML_checked ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtCheckbox_checkedState")
- AddToAttrList( m_pParagraphSdtPrTokenChildren,
- FSNS( XML_w14, XML_checkedState ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtCheckbox_uncheckedState")
- AddToAttrList( m_pParagraphSdtPrTokenChildren,
- FSNS( XML_w14, XML_uncheckedState ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_id")
- m_bParagraphSdtHasId = true;
- else
- SAL_WARN("sw.ww8", "DocxAttributeOutput::ParaGrabBag: unhandled SdtPr grab bag property " << aPropertyValue.Name);
- }
+ m_aParagraphSdt.GetSdtParamsFromGrabBag(aGrabBagSdt);
+ m_aStartedParagraphSdtPrAlias = m_aParagraphSdt.m_aAlias;
}
else if (rGrabBagElement.first == "ParaCnfStyle")
{
@@ -9192,72 +9368,14 @@ void DocxAttributeOutput::CharGrabBag( const SfxGrabBagItem& rItem )
}
else if (rGrabBagElement.first == "SdtEndBefore")
{
- if (m_bStartedCharSdt)
+ if (m_aRunSdt.m_bStartedSdt)
m_bEndCharSdt = true;
}
else if (rGrabBagElement.first == "SdtPr" && FLY_NOT_PROCESSED != m_nStateOfFlyFrame )
{
const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
rGrabBagElement.second.get< uno::Sequence<beans::PropertyValue> >();
- for (const beans::PropertyValue& aPropertyValue : aGrabBagSdt)
- {
- if (aPropertyValue.Name == "ooxml:CT_SdtPr_checkbox")
- {
- m_nRunSdtPrToken = FSNS( XML_w14, XML_checkbox );
- uno::Sequence<beans::PropertyValue> aGrabBag;
- aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : std::as_const(aGrabBag))
- {
- OUString sValue = rProp.Value.get<OUString>();
- if (rProp.Name == "ooxml:CT_SdtCheckbox_checked")
- AddToAttrList( m_pRunSdtPrTokenChildren,
- FSNS( XML_w14, XML_checked ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtCheckbox_checkedState")
- AddToAttrList( m_pRunSdtPrTokenChildren,
- FSNS( XML_w14, XML_checkedState ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_SdtCheckbox_uncheckedState")
- AddToAttrList( m_pRunSdtPrTokenChildren,
- FSNS( XML_w14, XML_uncheckedState ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_dataBinding" && !m_pRunSdtPrDataBindingAttrs.is())
- {
- uno::Sequence<beans::PropertyValue> aGrabBag;
- aPropertyValue.Value >>= aGrabBag;
- for (const auto& rProp : std::as_const(aGrabBag))
- {
- OUString sValue = rProp.Value.get<OUString>();
- if (rProp.Name == "ooxml:CT_DataBinding_prefixMappings")
- AddToAttrList( m_pRunSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_prefixMappings ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_DataBinding_xpath")
- AddToAttrList( m_pRunSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_xpath ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- else if (rProp.Name == "ooxml:CT_DataBinding_storeItemID")
- AddToAttrList( m_pRunSdtPrDataBindingAttrs,
- FSNS( XML_w, XML_storeItemID ),
- OUStringToOString( sValue, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_alias" && m_aRunSdtPrAlias.isEmpty())
- {
- if (!(aPropertyValue.Value >>= m_aRunSdtPrAlias))
- SAL_WARN("sw.ww8", "DocxAttributeOutput::CharGrabBag: unexpected sdt alias value");
- }
- //do not overwrite the parent node.
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_text" && !m_pRunSdtPrTokenChildren.is())
- m_nRunSdtPrToken = FSNS( XML_w, XML_text );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_id" && m_nRunSdtPrToken == 0)
- // only write id token as a marker if no other exist
- m_nRunSdtPrToken = FSNS( XML_w, XML_id );
- else if (aPropertyValue.Name == "ooxml:CT_SdtPr_citation")
- m_nRunSdtPrToken = FSNS( XML_w, XML_citation );
- }
+ m_aRunSdt.GetSdtParamsFromGrabBag(aGrabBagSdt);
}
else
SAL_INFO("sw.ww8", "DocxAttributeOutput::CharGrabBag: unhandled grab bag property " << rGrabBagElement.first);
@@ -9270,8 +9388,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr
m_pSerializer( pSerializer ),
m_rDrawingML( *pDrawingML ),
m_bEndCharSdt(false),
- m_bStartedCharSdt(false),
- m_bStartedParaSdt(false),
m_endPageRef( false ),
m_pFootnotesList( new ::docx::FootnotesList() ),
m_pEndnotesList( new ::docx::FootnotesList() ),
@@ -9317,10 +9433,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport &rExport, const FSHelperPtr
m_nParaBeforeSpacing(0),
m_nParaAfterSpacing(0),
m_setFootnote(false)
- , m_nParagraphSdtPrToken(0)
- , m_nRunSdtPrToken(0)
, m_nStateOfFlyFrame( FLY_NOT_PROCESSED )
- , m_bParagraphSdtHasId(false)
{
// Push initial items to the RelId cache. In case the document contains no
// special streams (headers, footers, etc.) then these items are used
@@ -9383,26 +9496,4 @@ void DocxAttributeOutput::BulletDefinition(int nId, const Graphic& rGraphic, Siz
m_pSerializer->endElementNS(XML_w, XML_numPicBullet);
}
-void DocxAttributeOutput::AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue )
-{
- AddToAttrList( pAttrList, 1, nAttrName, sAttrValue );
-}
-
-void DocxAttributeOutput::AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrs, ... )
-{
- if( !pAttrList.is() )
- pAttrList = FastSerializerHelper::createAttrList();
-
- va_list args;
- va_start( args, nAttrs );
- for( sal_Int32 i = 0; i<nAttrs; i++)
- {
- sal_Int32 nName = va_arg( args, sal_Int32 );
- const char* pValue = va_arg( args, const char* );
- if( pValue )
- pAttrList->add( nName, pValue );
- }
- va_end( args );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index a7733d62209b..08b2aa9c8cf5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -119,6 +119,37 @@ struct TableReference
}
};
+class SdtBlockHelper
+{
+public:
+ SdtBlockHelper()
+ : m_bHasId(false)
+ , m_bStartedSdt(false)
+ , m_nSdtPrToken(0)
+ {}
+
+ bool m_bHasId;
+ bool m_bStartedSdt;
+ rtl::Reference<sax_fastparser::FastAttributeList> m_pTokenChildren;
+ rtl::Reference<sax_fastparser::FastAttributeList> m_pTokenAttributes;
+ rtl::Reference<sax_fastparser::FastAttributeList> m_pTextAttrs;
+ rtl::Reference<sax_fastparser::FastAttributeList> m_pDataBindingAttrs;
+ OUString m_aColor;
+ OUString m_aPlaceHolderDocPart;
+ OUString m_aAlias;
+ sal_Int32 m_nSdtPrToken;
+
+ void DeleteAndResetTheLists();
+
+ void WriteSdtBlock(::sax_fastparser::FSHelperPtr& pSerializer, bool bRunTextIsOn, bool bParagraphHasDrawing);
+ void WriteExtraParams(::sax_fastparser::FSHelperPtr& pSerializer);
+
+ /// Closes a currently open SDT block.
+ void EndSdtBlock(::sax_fastparser::FSHelperPtr& pSerializer);
+
+ void GetSdtParamsFromGrabBag(const uno::Sequence<beans::PropertyValue>& aGrabBagSdt);
+};
+
/// The class that has handlers for various resource types when exporting as DOCX.
class DocxAttributeOutput : public AttributeOutputBase, public oox::vml::VMLTextExport, public oox::drawingml::DMLTextExport
{
@@ -708,16 +739,8 @@ private:
void WritePostponedDMLDrawing();
void WritePostponedCustomShape();
- void WriteSdtBlock(sal_Int32& nSdtPrToken,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenChildren,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrTokenAttributes,
- rtl::Reference<sax_fastparser::FastAttributeList>& pSdtPrDataBindingAttrs,
- OUString& rSdtPrAlias,
- bool bPara);
- /// Closes a currently open SDT block.
- void EndSdtBlock();
-
- void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang);
+ void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang, const uno::Sequence<beans::PropertyValue>& aGrabBagSdt);
+ void WriteSdtPlainText(const OUString& sValue, const uno::Sequence<beans::PropertyValue>& aGrabBagSdt);
void WriteSdtDropDownStart(OUString const& rName, OUString const& rSelected, uno::Sequence<OUString> const& rListItems);
void WriteSdtDropDownEnd(OUString const& rSelected, uno::Sequence<OUString> const& rListItems);
void WriteSdtEnd();
@@ -729,9 +752,6 @@ private:
void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );
void DoWriteFieldRunProperties( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteCombChars = false );
- static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
- static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
-
rtl::Reference<sax_fastparser::FastAttributeList> m_pFontsAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pEastAsianLayoutAttrList;
rtl::Reference<sax_fastparser::FastAttributeList> m_pCharLangAttrList;
@@ -740,10 +760,6 @@ private:
rtl::Reference<sax_fastparser::FastAttributeList> m_pHyperlinkAttrList;
/// If the current SDT around runs should be ended before the current run.
bool m_bEndCharSdt;
- /// If an SDT around runs is currently open.
- bool m_bStartedCharSdt;
- /// If an SDT around paragraphs is currently open.
- bool m_bStartedParaSdt;
/// Attributes of the run color
rtl::Reference<sax_fastparser::FastAttributeList> m_pColorAttrList;
/// Attributes of the paragraph background
@@ -954,24 +970,14 @@ private:
/// RelId <-> BitmapChecksum cache, similar to m_aRelIdCache, but used for non-Writer graphics, handled in oox.
std::stack< std::map<BitmapChecksum, OUString> > m_aSdrRelIdCache;
- /// members to control the existence of grabbagged SDT properties in the paragraph
- sal_Int32 m_nParagraphSdtPrToken;
- rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenChildren;
- rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrTokenAttributes;
- rtl::Reference<sax_fastparser::FastAttributeList> m_pParagraphSdtPrDataBindingAttrs;
- /// members to control the existence of grabbagged SDT properties in the text run
- sal_Int32 m_nRunSdtPrToken;
+ SdtBlockHelper m_aParagraphSdt;
+ SdtBlockHelper m_aRunSdt;
+
/// State of the Fly at current position
FlyProcessingState m_nStateOfFlyFrame;
- rtl::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrTokenChildren;
- rtl::Reference<sax_fastparser::FastAttributeList> m_pRunSdtPrDataBindingAttrs;
- /// Value of the <w:alias> paragraph SDT element.
- OUString m_aParagraphSdtPrAlias;
+
/// Same as m_aParagraphSdtPrAlias, but its content is available till the SDT is closed.
OUString m_aStartedParagraphSdtPrAlias;
- OUString m_aRunSdtPrAlias;
- /// Currently paragraph SDT has a <w:id> child element.
- bool m_bParagraphSdtHasId;
std::map<SvxBoxItemLine, css::table::BorderLine2> m_aTableStyleConf;
@@ -1039,6 +1045,7 @@ struct DocxTableExportContext
ww8::WW8TableInfo::Pointer_t m_pTableInfo;
bool m_bTableCellOpen;
bool m_bStartedParaSdt;
+ bool m_bStartedRunSdt;
sal_uInt32 m_nTableDepth;
DocxTableExportContext(DocxAttributeOutput& rOutput) : m_rOutput(rOutput) { m_rOutput.pushToTableExportContext(*this); }
~DocxTableExportContext() { m_rOutput.popFromTableExportContext(*this); }
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index a48f4fb7b59e..20a021ab1dfe 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -34,6 +34,12 @@
#include <com/sun/star/xml/sax/Writer.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+#include <com/sun/star/io/XStreamListener.hpp>
+#include <com/sun/star/sdb/CommandType.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/util/XModifiable.hpp>
+#include <com/sun/star/xml/xslt/XSLTTransformer.hpp>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
@@ -49,6 +55,8 @@
#include <map>
#include <algorithm>
+#include <condition_variable>
+#include <mutex>
#include <IMark.hxx>
#include <IDocumentSettingAccess.hxx>
@@ -1340,6 +1348,77 @@ void DocxExport::WriteGlossary()
}
}
+namespace {
+ class XsltTransformListener : public ::cppu::WeakImplHelper<io::XStreamListener>
+ {
+ public:
+ XsltTransformListener() : m_bDone(false) {}
+
+ void wait() {
+ std::unique_lock<std::mutex> g(m_mutex);
+ m_cond.wait(g, [this]() { return m_bDone; });
+ }
+
+ private:
+ std::mutex m_mutex;
+ std::condition_variable m_cond;
+ bool m_bDone;
+
+ virtual void SAL_CALL disposing(const lang::EventObject&) noexcept override {}
+ virtual void SAL_CALL started() noexcept override {}
+ virtual void SAL_CALL closed() noexcept override { notifyDone(); }
+ virtual void SAL_CALL terminated() noexcept override { notifyDone(); }
+ virtual void SAL_CALL error(const uno::Any& e) override
+ {
+ notifyDone(); // set on error too, otherwise main thread waits forever
+ SAL_WARN("sw.ww8", e);
+ }
+
+ void notifyDone() {
+ std::scoped_lock<std::mutex> g(m_mutex);
+ m_bDone = true;
+ m_cond.notify_all();
+ }
+ };
+}
+
+static void lcl_UpdateXmlValues(const SdtData& sdtData, const uno::Reference<css::io::XInputStream>& xInputStream, const uno::Reference<css::io::XOutputStream>& xOutputStream)
+{
+ uno::Sequence<uno::Any> aArgs{
+ // XSLT transformation stylesheet:
+ // - write all elements as is
+ // - but if element mathes sdtData.xpath, replace it's text content by sdtData.xpath
+ uno::Any(beans::NamedValue("StylesheetText", uno::Any(OUString("<?xml version=\"1.0\" encoding=\"UTF-8\"?> \
+<xsl:stylesheet\
+ xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\
+ " + sdtData.namespaces + "\
+ version=\"1.0\">\
+ <xsl:template match=\"@* | node()\">\
+ <xsl:copy>\
+ <xsl:apply-templates select=\"@* | node()\"/>\
+ </xsl:copy>\
+ </xsl:template>\
+ <xsl:template match = \"" + sdtData.xpath + "\">\
+ <xsl:copy>\
+ <xsl:text>" + sdtData.data + "</xsl:text>\
+ </xsl:copy>\
+ </xsl:template>\
+</xsl:stylesheet>\
+"))))
+ };
+
+ css::uno::Reference<css::xml::xslt::XXSLTTransformer> xTransformer =
+ css::xml::xslt::XSLTTransformer::create(comphelper::getProcessComponentContext(), aArgs);
+ xTransformer->setInputStream(xInputStream);
+ xTransformer->setOutputStream(xOutputStream);
+
+ rtl::Reference<XsltTransformListener> xListener = new XsltTransformListener();
+ xTransformer->addListener(xListener.get());
+
+ xTransformer->start();
+ xListener->wait();
+}
+
void DocxExport::WriteCustomXml()
{
uno::Reference< beans::XPropertySet > xPropSet( m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW );
@@ -1375,10 +1454,54 @@ void DocxExport::WriteCustomXml()
uno::Reference< xml::sax::XSAXSerializable > serializer( customXmlDom, uno::UNO_QUERY );
uno::Reference< xml::sax::XWriter > writer = xml::sax::Writer::create( comphelper::getProcessComponentContext() );
- writer->setOutputStream( GetFilter().openFragmentStream( "customXml/item"+OUString::number((j+1))+".xml",
- "application/xml" ) );
- serializer->serialize( uno::Reference< xml::sax::XDocumentHandler >( writer, uno::UNO_QUERY_THROW ),
- uno::Sequence< beans::StringPair >() );
+
+ uno::Reference < css::io::XOutputStream > xOutStream = GetFilter().openFragmentStream("customXml/item" + OUString::number(j + 1) + ".xml",
+ "application/xml");
+ if (m_SdtData.size())
+ {
+ // There are some SDT blocks data with data bindings which can update some custom xml values
+ uno::Reference< io::XStream > xMemStream(
+ comphelper::getProcessComponentContext()->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream",
+ comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW);
+
+ writer->setOutputStream(xMemStream->getOutputStream());
+
+ serializer->serialize(uno::Reference< xml::sax::XDocumentHandler >(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence< beans::StringPair >());
+
+ uno::Reference< io::XStream > xXSLTInStream = xMemStream;
+ uno::Reference< io::XStream > xXSLTOutStream;
+ // Apply XSLT transformations for each SDT data binding
+ // Seems it is not possible to do this as one transformation: each data binding
+ // can have different namespaces, but with conflicting names (ns0, ns1, etc..)
+ for (size_t i = 0; i < m_SdtData.size(); i++)
+ {
+ if (i == m_SdtData.size() - 1)
+ {
+ // last transformation
+ lcl_UpdateXmlValues(m_SdtData[i], xXSLTInStream->getInputStream(), xOutStream);
+ }
+ else
+ {
+ xXSLTOutStream.set(
+ comphelper::getProcessComponentContext()->getServiceManager()->createInstanceWithContext("com.sun.star.comp.MemoryStream",
+ comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW);
+ lcl_UpdateXmlValues(m_SdtData[i], xXSLTInStream->getInputStream(), xXSLTOutStream->getOutputStream());
+ // Use previous output as an input for next run
+ xXSLTInStream.set( xXSLTOutStream );
+ }
+ }
+
+ }
+ else
+ {
+ writer->setOutputStream(xOutStream);
+
+ serializer->serialize(uno::Reference< xml::sax::XDocumentHandler >(writer, uno::UNO_QUERY_THROW),
+ uno::Sequence< beans::StringPair >());
+ }
}
if (customXmlDomProps.is())
@@ -1591,7 +1714,8 @@ XFastAttributeListRef DocxExport::MainXmlNamespaces()
pAttr->add( FSNS( XML_xmlns, XML_mc ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(mce)), RTL_TEXTENCODING_UTF8).getStr() );
pAttr->add( FSNS( XML_xmlns, XML_wp14 ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(wp14)), RTL_TEXTENCODING_UTF8).getStr() );
pAttr->add( FSNS( XML_xmlns, XML_w14 ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(w14)), RTL_TEXTENCODING_UTF8).getStr() );
- pAttr->add( FSNS( XML_mc, XML_Ignorable ), "w14 wp14" );
+ pAttr->add( FSNS( XML_xmlns, XML_w15 ), OUStringToOString(m_pFilter->getNamespaceURL(OOX_NS(w15)), RTL_TEXTENCODING_UTF8).getStr() );
+ pAttr->add( FSNS( XML_mc, XML_Ignorable ), "w14 wp14 w15" );
return XFastAttributeListRef( pAttr );
}
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 00b908dc7efa..dc2dba5b14cb 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -61,6 +61,14 @@ struct DocxSettingsData
bool trackRevisions; // Should 'Track Revisions' be set
};
+/// Data to keep and write to XMLs
+struct SdtData
+{
+ OUString namespaces;
+ OUString xpath;
+ OUString data;
+};
+
/// The class that does all the actual DOCX export-related work.
class DocxExport : public MSWordExportBase
{
@@ -114,6 +122,9 @@ class DocxExport : public MSWordExportBase
/// Pointer to the Frame of a floating table it is nested in
const ww8::Frame *m_pFloatingTableFrame = nullptr;
+ /// Storage for sdt data which need to be written to other XMLs
+ std::vector<SdtData> m_SdtData;
+
public:
DocxExportFilter& GetFilter() { return *m_pFilter; };
@@ -195,6 +206,11 @@ public:
virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOCX; }
+ void AddSdtData(const OUString & namespaces, const OUString & xpath, const OUString & data)
+ {
+ m_SdtData.push_back({ namespaces, xpath, data });
+ }
+
protected:
/// Format-dependent part of the actual export.
virtual ErrCode ExportDocument_Impl() override;
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 7cacc4eb3173..dd0455674649 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -17,6 +17,7 @@
#include <editeng/boxitem.hxx>
#include <svx/svdogrp.hxx>
#include <oox/token/namespaces.hxx>
+#include <oox/token/relationship.hxx>
#include <textboxhelper.hxx>
#include <fmtanchr.hxx>
#include <fmtsrnd.hxx>
@@ -873,8 +874,21 @@ void DocxSdrExport::writeDMLDrawing(const SdrObject* pSdrObject, const SwFrameFo
&& pFrameFormat->GetAnchor().GetAnchorId() != RndStdIds::FLY_AS_CHAR)
pDocPrAttrList->add(XML_hidden, OString::number(1).getStr());
- sax_fastparser::XFastAttributeListRef xDocPrAttrListRef(pDocPrAttrList);
- pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
+
+ pFS->startElementNS(XML_wp, XML_docPr, pDocPrAttrList);
+ OUString sHyperlink = pSdrObject->getHyperlink();
+ if (!sHyperlink.isEmpty())
+ {
+ OUString sRelId = m_pImpl->getExport().GetFilter().addRelation(
+ pFS->getOutputStream(), oox::getRelationship(Relationship::HYPERLINK),
+ oox::drawingml::URLTransformer().getTransformedString(sHyperlink),
+ oox::drawingml::URLTransformer().isExternalURL(sHyperlink));
+ pFS->singleElementNS(
+ XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8().getStr(),
+ FSNS(XML_xmlns, XML_a),
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
+ }
+ pFS->endElementNS(XML_wp, XML_docPr);
uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY_THROW);
const char* pNamespace = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape";
@@ -1212,7 +1226,24 @@ void DocxSdrExport::writeDMLTextFrame(ww8::Frame const* pParentFrame, int nAncho
pDocPrAttrList->add(
XML_name, OUStringToOString(rFrameFormat.GetName(), RTL_TEXTENCODING_UTF8).getStr());
sax_fastparser::XFastAttributeListRef xDocPrAttrListRef(pDocPrAttrList);
- pFS->singleElementNS(XML_wp, XML_docPr, xDocPrAttrListRef);
+ pFS->startElementNS(XML_wp, XML_docPr, pDocPrAttrList);
+
+ OUString sHyperlink;
+ if (xPropertySet.is())
+ xPropertySet->getPropertyValue("HyperLinkURL") >>= sHyperlink;
+ if (!sHyperlink.isEmpty())
+ {
+ OUString sRelId = m_pImpl->getExport().GetFilter().addRelation(
+ pFS->getOutputStream(), oox::getRelationship(Relationship::HYPERLINK),
+ oox::drawingml::URLTransformer().getTransformedString(sHyperlink),
+ oox::drawingml::URLTransformer().isExternalURL(sHyperlink));
+ pFS->singleElementNS(
+ XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8().getStr(),
+ FSNS(XML_xmlns, XML_a),
+ m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
+ }
+
+ pFS->endElementNS(XML_wp, XML_docPr);
pFS->startElementNS(XML_a, XML_graphic, FSNS(XML_xmlns, XML_a),
m_pImpl->getExport().GetFilter().getNamespaceURL(OOX_NS(dml)).toUtf8());
@@ -1493,6 +1524,16 @@ void DocxSdrExport::writeVMLTextFrame(ww8::Frame const* pParentFrame, bool bText
if (!sAnchorId.isEmpty())
m_pImpl->getFlyAttrList()->addNS(XML_w14, XML_anchorId,
OUStringToOString(sAnchorId, RTL_TEXTENCODING_UTF8));
+
+ uno::Reference<drawing::XShape> xShape(const_cast<SdrObject*>(pObject)->getUnoShape(),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps(xShape, uno::UNO_QUERY);
+ OUString sHyperlink;
+ if (xShapeProps.is())
+ xShapeProps->getPropertyValue("HyperLinkURL") >>= sHyperlink;
+ if (!sHyperlink.isEmpty())
+ m_pImpl->getFlyAttrList()->add(XML_href,
+ OUStringToOString(sHyperlink, RTL_TEXTENCODING_UTF8));
}
sax_fastparser::XFastAttributeListRef xFlyAttrList(m_pImpl->getFlyAttrList().get());
m_pImpl->getFlyAttrList().clear();
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 6313472bf728..cebf1ffcf430 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -109,7 +109,7 @@ static OString OutTBLBorderLine(RtfExport const& rExport, const editeng::SvxBord
{
case SvxBorderLineStyle::SOLID:
{
- if (DEF_LINE_WIDTH_0 == pLine->GetWidth())
+ if (SvxBorderLineWidth::Hairline == pLine->GetWidth())
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRHAIR);
else
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRS);
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 8a315444a133..6228526a88ba 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.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 8d4add7b34bf..86899e1dba88 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3673,7 +3673,6 @@ MSWordExportBase::MSWordExportBase( SwDoc *pDocument, std::shared_ptr<SwUnoCurso
, m_nOrigRedlineFlags(RedlineFlags::NONE)
, m_bOrigShowChanges(true)
, m_pCurrentPageDesc(nullptr)
- , m_bPrevTextNodeIsEmpty(false)
, m_bFirstTOCNodeWithSection(false)
, m_pChpIter(nullptr)
, m_pAtn(nullptr)
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 9356b87bd86f..0e1cfea0a51a 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -496,7 +496,6 @@ public:
std::vector<aBookmarkPair> m_aImplicitBookmarks;
ww8::Frames m_aFrames; // The floating frames in this document
const SwPageDesc *m_pCurrentPageDesc;
- bool m_bPrevTextNodeIsEmpty;
bool m_bFirstTOCNodeWithSection;
std::unique_ptr<WW8_WrPlcPn> m_pPapPlc;
std::unique_ptr<WW8_WrPlcPn> m_pChpPlc;
@@ -657,6 +656,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
@@ -758,7 +758,7 @@ public:
static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd );
/// Start new section.
- void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false, bool isTextNodeEmpty = false);
+ void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false );
/// Write section properties.
///
@@ -1576,7 +1576,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 +1627,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..cfd58d9d643d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -441,7 +441,7 @@ bool MSWordExportBase::SetCurrentPageDescFromNode(const SwNode &rNd)
* because that one only exits once for CHP and PAP and therefore end up in
* the wrong one.
*/
-void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen, bool isTextNodeEmpty)
+void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen )
{
if ( m_bStyDef || m_bOutKF || m_bInWriteEscher || m_bOutPageDescs )
return;
@@ -462,14 +462,10 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
// Even if pAktPageDesc != pPageDesc ,it might be because of the different header & footer types.
if (m_pCurrentPageDesc != pPageDesc)
{
- if ( ( isCellOpen && ( m_pCurrentPageDesc->GetName() != pPageDesc->GetName() )) ||
- ( isTextNodeEmpty || m_bPrevTextNodeIsEmpty ))
+ if (isCellOpen && ( m_pCurrentPageDesc->GetName() != pPageDesc->GetName() ))
{
/* Do not output a section break in the following scenarios.
1) Table cell is open and page header types are different
- 2) PageBreak is present but text node has no string - it is an empty node.
- 3) If the previous node was an empty text node and current node is a non empty text node or vice versa.
- 4) If previous node and current node both are empty text nodes.
Converting a page break to section break would cause serious issues while importing
the RT files with different first page being set.
*/
@@ -572,8 +568,6 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
{
bNewPageDesc |= SetCurrentPageDescFromNode( rNd );
}
- if( isTextNodeEmpty )
- bNewPageDesc = false;
}
if ( !bNewPageDesc )
AttrOutput().OutputItem( *pItem );
@@ -620,7 +614,6 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
PrepareNewPageDesc( pSet, rNd, pPgDesc, m_pCurrentPageDesc );
}
m_bBreakBefore = false;
- m_bPrevTextNodeIsEmpty = isTextNodeEmpty ;
}
// #i76300#
@@ -3649,6 +3642,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
{
@@ -4315,7 +4315,7 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
{
case SvxBorderLineStyle::SOLID:
{
- if ( rLine.GetWidth( ) == DEF_LINE_WIDTH_0 )
+ if ( rLine.GetWidth( ) == SvxBorderLineWidth::Hairline )
brcType = 5;
else
brcType = 1;
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..0a0c75bc9816 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,17 @@ 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.SetMark();
+ *aPaM.GetMark() = SwPosition(*pRedlineInfo->pContentIndex->GetNode().EndOfSectionNode());
+ pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
+ }
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/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 6dc8f3830e77..f3d8df67e1e6 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -73,11 +73,10 @@ const struct SvXMLEnumMapEntry<sal_uInt16> psXML_NamedBorderWidths[] =
};
// mapping tables to map external xml input to internal box line widths
-const sal_uInt16 aBorderWidths[] =
-{
- DEF_LINE_WIDTH_0,
- DEF_LINE_WIDTH_5,
- DEF_LINE_WIDTH_1,
+const sal_uInt16 aBorderWidths[] = {
+ SvxBorderLineWidth::Hairline,
+ SvxBorderLineWidth::VeryThin,
+ SvxBorderLineWidth::Thin
};
bool sw_frmitems_parseXMLBorder( const OUString& rValue,
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/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/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 4ead5f41f49b..64fd72b9a253 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1290,7 +1290,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
}
pField->SetInitialized();
- rSh.Insert( *pField );
+ rSh.InsertField2( *pField );
}
break;
@@ -1354,7 +1354,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
break;
if( m_xRbAsField->get_active() )
- rSh.Insert( aNxtDBField );
+ rSh.InsertField2( aNxtDBField );
if( !rSh.IsSttPara() )
rSh.SwEditShell::SplitNode();
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 01b9065cd36e..937c2b265c71 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -299,12 +299,18 @@ void SwFieldDBPage::TypeHdl(const weld::TreeView* pBox)
OUString sColumnName;
if (nTypeId == SwFieldTypesEnum::Database)
{
- aData = static_cast<SwDBField*>(GetCurField())->GetDBData();
- sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
+ if (auto const*const pField = dynamic_cast<SwDBField*>(GetCurField()))
+ {
+ aData = pField->GetDBData();
+ sColumnName = static_cast<SwDBFieldType*>(GetCurField()->GetTyp())->GetColumnName();
+ }
}
else
{
- aData = static_cast<SwDBNameInfField*>(GetCurField())->GetDBData(pSh->GetDoc());
+ if (auto *const pField = dynamic_cast<SwDBNameInfField*>(GetCurField()))
+ {
+ aData = pField->GetDBData(pSh->GetDoc());
+ }
}
m_xDatabaseTLB->Select(aData.sDataSource, aData.sCommand, sColumnName);
}
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 92d263a6efd1..4fe4d8b41aaa 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -99,10 +99,13 @@ void SwFieldDokInfPage::Reset(const SfxItemSet* )
if (IsFieldEdit())
{
const SwField* pCurField = GetCurField();
- nSubType = static_cast<const SwDocInfoField*>(pCurField)->GetSubType() & 0xff;
+ nSubType = pCurField->GetSubType() & 0xff;
if( nSubType == DI_CUSTOM )
{
- m_sOldCustomFieldName = static_cast<const SwDocInfoField*>(pCurField)->GetName();
+ if (auto const pField = dynamic_cast<SwDocInfoField const*>(pCurField))
+ {
+ m_sOldCustomFieldName = pField->GetName();
+ }
}
m_xFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
SwWrtShell *pSh = GetWrtShell();
@@ -311,12 +314,17 @@ IMPL_LINK_NOARG(SwFieldDokInfPage, SubTypeHdl, weld::TreeView&, void)
bEnable = true;
}
- sal_uInt32 nFormat = IsFieldEdit() ? static_cast<SwDocInfoField*>(GetCurField())->GetFormat() : 0;
+ sal_uInt32 nFormat = 0;
- sal_uInt16 nOldSubType = IsFieldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nOldSubType = 0;
if (IsFieldEdit())
{
+ if (auto const pField = dynamic_cast<SwDocInfoField const*>(GetCurField()))
+ {
+ nFormat = pField->GetFormat();
+ nOldSubType = pField->GetSubType() & 0xff00;
+ }
nPos = m_xSelectionLB->get_selected_index();
if (nPos != -1)
{
@@ -367,10 +375,14 @@ sal_Int32 SwFieldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
sal_uInt16 nSize = 0;
sal_Int32 nSelPos = -1;
- sal_uInt16 nExtSubType = IsFieldEdit() ? (static_cast<SwDocInfoField*>(GetCurField())->GetSubType() & 0xff00) : 0;
+ sal_uInt16 nExtSubType = 0;
if (IsFieldEdit())
{
+ if (auto const pField = dynamic_cast<SwDocInfoField const*>(GetCurField()))
+ {
+ nExtSubType = pField->GetSubType() & 0xff00;
+ }
m_xFixedCB->set_active((nExtSubType & DI_SUB_FIXED) != 0);
nExtSubType = ((nExtSubType & ~DI_SUB_FIXED) >> 8) - 1;
}
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 95935b115177..d13ed61cd550 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -330,9 +330,15 @@ IMPL_LINK_NOARG(SwFieldRefPage, TypeHdl, weld::TreeView&, void)
break;
case REF_SEQUENCEFLD:
- sName = static_cast<SwGetRefField*>(GetCurField())->GetSetRefName();
+ {
+ SwGetRefField const*const pRefField(dynamic_cast<SwGetRefField*>(GetCurField()));
+ if (pRefField)
+ {
+ sName = pRefField->GetSetRefName();
+ }
nFlag = REFFLDFLAG;
break;
+ }
}
if (m_xTypeLB->find_text(sName) == -1) // reference to deleted mark
@@ -468,7 +474,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
SwWrtShell *pSh = GetWrtShell();
if(!pSh)
pSh = ::GetActiveWrtShell();
- SwGetRefField* pRefField = static_cast<SwGetRefField*>(GetCurField());
+ SwGetRefField const*const pRefField(dynamic_cast<SwGetRefField*>(GetCurField()));
const sal_uInt16 nTypeId = m_xTypeLB->get_id(GetTypeSel()).toUInt32();
OUString sOldSel;
@@ -479,7 +485,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
if (nSelectionSel != -1)
sOldSel = m_xSelectionLB->get_text(nSelectionSel);
}
- if (IsFieldEdit() && sOldSel.isEmpty())
+ if (IsFieldEdit() && pRefField && sOldSel.isEmpty())
sOldSel = OUString::number( pRefField->GetSeqNo() + 1 );
m_xSelectionLB->freeze();
@@ -528,7 +534,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
}
}
}
- if (IsFieldEdit())
+ if (IsFieldEdit() && pRefField)
sOldSel = pRefField->GetSetRefName();
}
else if (nTypeId == REFFLDFLAG_FOOTNOTE)
@@ -543,7 +549,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
{
m_xSelectionLB->append_text( aArr[ n ].sDlgEntry );
}
- if (IsFieldEdit() && pRefField->GetSeqNo() == aArr[ n ].nSeqNo)
+ if (IsFieldEdit() && pRefField && pRefField->GetSeqNo() == aArr[ n ].nSeqNo)
sOldSel = aArr[n].sDlgEntry;
}
}
@@ -559,7 +565,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
{
m_xSelectionLB->append_text( aArr[ n ].sDlgEntry );
}
- if (IsFieldEdit() && pRefField->GetSeqNo() == aArr[ n ].nSeqNo)
+ if (IsFieldEdit() && pRefField && pRefField->GetSeqNo() == aArr[ n ].nSeqNo)
sOldSel = aArr[n].sDlgEntry;
}
}
@@ -583,9 +589,9 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
OUString sId(OUString::number(nOutlIdx));
m_xSelectionToolTipLB->append(sId,
pIDoc->getOutlineText(nOutlIdx, pSh->GetLayout(), true, true, false));
- if ( ( IsFieldEdit() &&
- pRefField->GetReferencedTextNode() == maOutlineNodes[nOutlIdx] ) ||
- mpSavedSelectedTextNode == maOutlineNodes[nOutlIdx] )
+ if ((IsFieldEdit() && pRefField
+ && pRefField->GetReferencedTextNode() == maOutlineNodes[nOutlIdx])
+ || mpSavedSelectedTextNode == maOutlineNodes[nOutlIdx])
{
m_sSelectionToolTipLBId = sId;
sOldSel.clear();
@@ -618,9 +624,9 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
OUString sId(OUString::number(nNumItemIdx));
m_xSelectionToolTipLB->append(sId,
pIDoc->getListItemText(*maNumItems[nNumItemIdx], *pSh->GetLayout()));
- if ( ( IsFieldEdit() &&
- pRefField->GetReferencedTextNode() == maNumItems[nNumItemIdx]->GetTextNode() ) ||
- mpSavedSelectedTextNode == maNumItems[nNumItemIdx]->GetTextNode() )
+ if ((IsFieldEdit() && pRefField
+ && pRefField->GetReferencedTextNode() == maNumItems[nNumItemIdx]->GetTextNode())
+ || mpSavedSelectedTextNode == maNumItems[nNumItemIdx]->GetTextNode())
{
m_sSelectionToolTipLBId = sId;
sOldSel.clear();
@@ -655,12 +661,12 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
{
m_xSelectionLB->append_text( aArr[ n ].sDlgEntry );
}
- if (IsFieldEdit() && sOldSel.isEmpty() &&
+ if (IsFieldEdit() && pRefField && sOldSel.isEmpty() &&
aArr[ n ].nSeqNo == pRefField->GetSeqNo())
sOldSel = aArr[ n ].sDlgEntry;
}
- if (IsFieldEdit() && sOldSel.isEmpty())
+ if (IsFieldEdit() && pRefField && sOldSel.isEmpty())
sOldSel = OUString::number( pRefField->GetSeqNo() + 1);
}
}
@@ -678,7 +684,7 @@ void SwFieldRefPage::UpdateSubType(const OUString& filterString)
}
}
- if (IsFieldEdit())
+ if (IsFieldEdit() && pRefField)
sOldSel = pRefField->GetSetRefName();
}
@@ -950,7 +956,7 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
}
}
- SwGetRefField* pRefField = static_cast<SwGetRefField*>(GetCurField());
+ SwGetRefField const*const pRefField(dynamic_cast<SwGetRefField*>(GetCurField()));
if (REFFLDFLAG & nTypeId)
{
@@ -980,10 +986,10 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
{
aVal = OUString::number( aArr[nPos].nSeqNo );
- if (IsFieldEdit() && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
+ if (IsFieldEdit() && pRefField && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
bModified = true; // can happen with fields of which the references were deleted
}
- else if (IsFieldEdit())
+ else if (IsFieldEdit() && pRefField)
aVal = OUString::number( pRefField->GetSeqNo() );
}
else if (REFFLDFLAG_ENDNOTE == nTypeId) // endnotes
@@ -1001,10 +1007,10 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
{
aVal = OUString::number( aArr[nPos].nSeqNo );
- if (IsFieldEdit() && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
+ if (IsFieldEdit() && pRefField && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
bModified = true; // can happen with fields of which the reference was deleted
}
- else if (IsFieldEdit())
+ else if (IsFieldEdit() && pRefField)
aVal = OUString::number( pRefField->GetSeqNo() );
}
// #i83479#
@@ -1069,10 +1075,10 @@ bool SwFieldRefPage::FillItemSet(SfxItemSet* )
{
aVal = OUString::number( aArr[nPos].nSeqNo );
- if (IsFieldEdit() && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
+ if (IsFieldEdit() && pRefField && aArr[nPos].nSeqNo == pRefField->GetSeqNo())
bModified = true; // can happen with fields of which the reference was deleted
}
- else if (IsFieldEdit())
+ else if (IsFieldEdit() && pRefField)
aVal = OUString::number( pRefField->GetSeqNo() );
}
}
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 8c1bb998fb85..084c4d66c8c7 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -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();
+ }
}
void SwFieldDlg::Initialize(SfxChildWinInfo const *pInfo)
@@ -179,8 +186,9 @@ void SwFieldDlg::ReInitDlg()
if(!pActiveView)
return;
const SwWrtShell& rSh = pActiveView->GetWrtShell();
- GetOKButton().set_sensitive(!rSh.IsReadOnlyAvailable() ||
- !rSh.HasReadonlySel());
+ GetOKButton().set_sensitive(( !rSh.IsReadOnlyAvailable()
+ || !rSh.HasReadonlySel())
+ && !SwCursorShell::PosInsideInputField(*rSh.GetCursor()->GetPoint()));
ReInitTabPage("document");
ReInitTabPage("variables");
@@ -212,8 +220,10 @@ void SwFieldDlg::Activate()
{
bool bHtmlMode = (::GetHtmlMode(static_cast<SwDocShell*>(SfxObjectShell::Current())) & HTMLMODE_ON) != 0;
const SwWrtShell& rSh = pView->GetWrtShell();
- GetOKButton().set_sensitive(!rSh.IsReadOnlyAvailable() ||
- !rSh.HasReadonlySel());
+ GetOKButton().set_sensitive(( !rSh.IsReadOnlyAvailable()
+ || !rSh.HasReadonlySel())
+ && !SwCursorShell::PosInsideInputField(*rSh.GetCursor()->GetPoint()));
+
ReInitTabPage("variables", true);
@@ -233,9 +243,12 @@ void SwFieldDlg::EnableInsert(bool bEnable)
OSL_ENSURE(pView, "no view found");
if( !pView ||
(pView->GetWrtShell().IsReadOnlyAvailable() &&
- pView->GetWrtShell().HasReadonlySel()) )
+ pView->GetWrtShell().HasReadonlySel())
+ || SwCursorShell::PosInsideInputField(*pView->GetWrtShell().GetCursor()->GetPoint()))
+ {
bEnable = false;
}
+ }
GetOKButton().set_sensitive(bEnable);
}
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 7267f5a059f4..649c1e806e79 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -103,7 +103,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();
@@ -440,10 +440,10 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark)
else if (bPulling && !bPulledAll)
sBookmarkNodeText = "..." + sBookmarkNodeText;
+ const OUString& sHideCondition = pBookmark->GetHideCondition();
OUString sHidden = SwResId(STR_BOOKMARK_NO);
- if (pBookmark->IsHidden())
+ if (pBookmark->IsHidden() || !sHideCondition.isEmpty())
sHidden = SwResId(STR_BOOKMARK_YES);
- const OUString& sHideCondition = pBookmark->GetHideCondition();
OUString sPageNum = OUString::number(SwPaM(pMark->GetMarkStart()).GetPageNum());
int nRow = m_xControl->n_children();
m_xControl->append(OUString::number(reinterpret_cast<sal_Int64>(pMark)), sPageNum);
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/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index f6e5990b1b3d..244e95de182c 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -2580,7 +2580,7 @@ bool SwTransferable::PasteDDE( TransferableDataHelper& rData,
{
// insert
SwDDEField aSwDDEField( pDDETyp );
- rWrtShell.Insert( aSwDDEField );
+ rWrtShell.InsertField2( aSwDDEField );
}
} while( false );
@@ -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/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index 80c00954fa0e..c6e5cbda9cbf 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;
@@ -3698,7 +3701,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
@@ -3728,8 +3731,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 );
}
}
@@ -6285,8 +6288,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();
@@ -6295,8 +6297,7 @@ OUString SwEditWin::GetSurroundingText() const
rSh.GoEndSentence();
rSh.GetSelectedText( sReturn, ParaBreakType::ToOnlyCR );
- pPos->nContent = nPos;
- rSh.ClearMark();
+ rSh.Pop(SwCursorShell::PopMode::DeleteCurrent);
rSh.HideCursor();
}
@@ -6316,18 +6317,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/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 871cb366df1c..6bc001c99e0e 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -1494,40 +1494,49 @@ bool SwFieldMgr::InsertField(
// insert
pCurShell->StartAllAction();
- pCurShell->Insert(*pField, rData.m_pAnnotationRange.get());
+ bool const isSuccess = pCurShell->InsertField2(*pField, rData.m_pAnnotationRange.get());
- if (SwFieldTypesEnum::Input == rData.m_nTypeId)
+ if (isSuccess)
{
- pCurShell->Push();
+ if (SwFieldTypesEnum::Input == rData.m_nTypeId)
+ {
+ pCurShell->Push();
- // start dialog, not before the field is inserted tdf#99529
- pCurShell->Left(CRSR_SKIP_CHARS, false,
- (INP_VAR == (nSubType & 0xff) || pCurShell->GetViewOptions()->IsFieldName()) ? 1 : 2,
- false);
- pCurShell->StartInputFieldDlg(pField.get(), false, true, rData.m_pParent);
+ // start dialog, not before the field is inserted tdf#99529
+ pCurShell->Left(CRSR_SKIP_CHARS, false,
+ (INP_VAR == (nSubType & 0xff) || pCurShell->GetViewOptions()->IsFieldName()) ? 1 : 2,
+ false);
+ pCurShell->StartInputFieldDlg(pField.get(), false, true, rData.m_pParent);
- pCurShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
- }
+ pCurShell->Pop(SwCursorShell::PopMode::DeleteCurrent);
+ }
- if(bExp && m_bEvalExp)
- pCurShell->UpdateExpFields(true);
+ if (bExp && m_bEvalExp)
+ {
+ pCurShell->UpdateExpFields(true);
+ }
- if(bTable)
- {
- pCurShell->Left(CRSR_SKIP_CHARS, false, 1, false );
- pCurShell->UpdateOneField(*pField);
- pCurShell->Right(CRSR_SKIP_CHARS, false, 1, false );
+ if (bTable)
+ {
+ pCurShell->Left(CRSR_SKIP_CHARS, false, 1, false );
+ pCurShell->UpdateOneField(*pField);
+ pCurShell->Right(CRSR_SKIP_CHARS, false, 1, false );
+ }
+ else if (bPageVar)
+ {
+ static_cast<SwRefPageGetFieldType*>(pCurShell->GetFieldType(0, SwFieldIds::RefPageGet))->UpdateFields();
+ }
+ else if (SwFieldTypesEnum::GetRef == rData.m_nTypeId)
+ {
+ pField->GetTyp()->ModifyNotification( nullptr, nullptr );
+ }
}
- else if( bPageVar )
- static_cast<SwRefPageGetFieldType*>(pCurShell->GetFieldType( 0, SwFieldIds::RefPageGet ))->UpdateFields();
- else if( SwFieldTypesEnum::GetRef == rData.m_nTypeId )
- pField->GetTyp()->ModifyNotification( nullptr, nullptr );
// delete temporary field
pField.reset();
pCurShell->EndAllAction();
- return true;
+ return isSuccess;
}
// fields update
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 6ec17d5b0e78..a61b049f5002 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();
@@ -300,7 +301,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
int IntelligentCut(SelectionType nSelectionType, bool bCut = true);
// edit
- void Insert(SwField const &, SwPaM* pAnnotationRange = nullptr);
+ bool InsertField2(SwField const &, SwPaM* pAnnotationRange = nullptr);
void Insert(const OUString &);
// graphic
void Insert( const OUString &rPath, const OUString &rFilter,
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/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 12d87bab691b..6f73e76ec91c 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -30,6 +30,7 @@
#include <svx/swframevalidation.hxx>
#include <svx/anchorid.hxx>
#include <sfx2/htmlmode.hxx>
+#include <svx/hlnkitem.hxx>
#include <drawdoc.hxx>
#include <uitool.hxx>
#include <fmtornt.hxx>
@@ -54,16 +55,23 @@
#include <swslots.hxx>
#include <svx/svxdlg.hxx>
#include <svx/dialogs.hrc>
+#include <vcl/unohelp2.hxx>
#include <swabstdlg.hxx>
#include <swundo.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/uno/Reference.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <memory>
#include <fmtfollowtextflow.hxx>
using namespace ::com::sun::star;
+using namespace css::beans;
+using namespace css::drawing;
+using namespace css::uno;
SFX_IMPL_SUPERCLASS_INTERFACE(SwDrawBaseShell, SwBaseShell)
@@ -603,6 +611,52 @@ void SwDrawBaseShell::Execute(SfxRequest const &rReq)
break;
}
+ case SID_OPEN_HYPERLINK:
+ {
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ LoadURL(GetShell(), pObj->getHyperlink(), LoadUrlFlags::NewView,
+ /*rTargetFrameName=*/OUString());
+ break;
+ }
+
+ case SID_EDIT_HYPERLINK:
+ case SID_HYPERLINK_DIALOG:
+ {
+ GetView().GetViewFrame()->SetChildWindow(SID_HYPERLINK_DIALOG, true);
+ break;
+ }
+
+ case SID_HYPERLINK_SETLINK:
+ {
+ if(pItem)
+ {
+ const SvxHyperlinkItem& rHLinkItem = *static_cast<const SvxHyperlinkItem *>(pItem);
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ pObj->setHyperlink(rHLinkItem.GetURL());
+ }
+ break;
+ }
+
+ case SID_REMOVE_HYPERLINK:
+ {
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ pObj->setHyperlink(OUString());
+ break;
+ }
+
+ case SID_COPY_HYPERLINK_LOCATION:
+ {
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ uno::Reference<datatransfer::clipboard::XClipboard> xClipboard
+ = GetView().GetEditWin().GetClipboard();
+ vcl::unohelper::TextDataObject::CopyStringTo(pObj->getHyperlink(), xClipboard);
+ break;
+ }
+
default:
OSL_ENSURE(false, "wrong Dispatcher");
return;
@@ -736,6 +790,62 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet)
}
}
break;
+
+ case SID_OPEN_HYPERLINK:
+ case SID_EDIT_HYPERLINK:
+ case SID_HYPERLINK_DIALOG:
+ case SID_REMOVE_HYPERLINK:
+ case SID_COPY_HYPERLINK_LOCATION:
+ {
+ if (pSdrView->GetMarkedObjectCount() != 1)
+ {
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ sal_uInt16 nObjType = pObj->GetObjIdentifier();
+
+ // Only enable hyperlink for the following types
+ switch (nObjType)
+ {
+ case OBJ_PATHFILL:
+ case OBJ_SECT:
+ case OBJ_LINE:
+ case OBJ_CUSTOMSHAPE:
+ case OBJ_TEXT:
+ case OBJ_RECT:
+ case OBJ_CAPTION:
+ case OBJ_POLY:
+ case OBJ_PLIN:
+ case OBJ_MEASURE:
+ case OBJ_EDGE:
+ break;
+ default:
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
+ if (nWhich == SID_OPEN_HYPERLINK || nWhich == SID_REMOVE_HYPERLINK
+ || nWhich == SID_EDIT_HYPERLINK || nWhich == SID_COPY_HYPERLINK_LOCATION)
+ {
+ if (pObj->getHyperlink().isEmpty())
+ rSet.DisableItem(nWhich);
+ }
+ }
+ break;
+
+ case SID_HYPERLINK_GETLINK:
+ {
+ const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
+ SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
+ OUString sHyperLink = pObj->getHyperlink();
+ SvxHyperlinkItem aHLinkItem;
+ aHLinkItem.SetURL(sHyperLink);
+ rSet.Put(aHLinkItem);
+ }
+ break;
}
nWhich = aIter.NextWhich();
}
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/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 32036351a5ee..ba6e91f12ec1 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -1123,7 +1123,7 @@ void SwFrameShell::ExecFrameStyle(SfxRequest const & rReq)
{
aBorderLine.SetBorderLineStyle(
SvxBorderLineStyle::SOLID);
- aBorderLine.SetWidth( DEF_LINE_WIDTH_0 );
+ aBorderLine.SetWidth( SvxBorderLineWidth::Hairline );
}
//Set distance only if the request is received from the controller.
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 073fe280c924..da77b89e4189 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -530,7 +530,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
if(aBorderLine.GetOutWidth() == 0)
{
aBorderLine.SetBorderLineStyle(SvxBorderLineStyle::SOLID);
- aBorderLine.SetWidth( DEF_LINE_WIDTH_5 );
+ aBorderLine.SetWidth( SvxBorderLineWidth::VeryThin );
}
if( aBox->GetTop() != nullptr )
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 3d6a2edee1f2..61f4b8e86f26 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -196,10 +196,10 @@ void SwTextShell::ExecField(SfxRequest &rReq)
rSh.ClearMark();
if (!rSh.IsMultiSelection()
&& (nullptr != dynamic_cast<const SwTextInputField*>(
- SwCursorShell::GetTextFieldAtCursor(rSh.GetCursor(), true))))
+ SwCursorShell::GetTextFieldAtCursor(rSh.GetCursor(), ::sw::GetTextAttrMode::Default))))
{
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 3907f2611fac..ef5b86f6f199 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -708,7 +708,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
if ( pItem )
{
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/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 85e6d4559608..ad6a69df6c01 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3532,7 +3532,7 @@ void SwContentTree::EditEntry(SvTreeListEntry const * pEntry, EditEntryMode nMod
if(nMode == EditEntryMode::DELETE)
{
IDocumentMarkAccess* const pMarkAccess = m_pActiveShell->getIDocumentMarkAccess();
- pMarkAccess->deleteMark( pMarkAccess->findMark(pCnt->GetName()) );
+ pMarkAccess->deleteMark(pMarkAccess->findMark(pCnt->GetName()), false);
}
else if(nMode == EditEntryMode::RENAME)
{
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 4a2420ad7b84..8b5cd59bfa0c 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,14 +275,14 @@ bool SwWrtShell::DelLeft()
}
}
}
- bool bRet = Delete();
+ bool bRet = Delete(true);
if( !bRet && bSwap )
SwCursorShell::SwapPam();
CloseMark( bRet );
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
@@ -309,7 +309,7 @@ bool SwWrtShell::DelRight()
{
SwActContext aActContext(this);
ResetCursorStack();
- Delete();
+ Delete(isReplaceHeuristic);
UpdateAttr();
}
if( IsBlockMode() )
@@ -392,7 +392,7 @@ bool SwWrtShell::DelRight()
OpenMark();
SwCursorShell::Right(1, CRSR_SKIP_CELLS);
- bRet = Delete();
+ bRet = Delete(true);
CloseMark( bRet );
break;
@@ -434,7 +434,7 @@ bool SwWrtShell::DelRight()
if (pTextNode)
{
const SwTextField* pField(
- pTextNode->GetFieldTextAttrAt(pAnchor->nContent.GetIndex(), true));
+ pTextNode->GetFieldTextAttrAt(pAnchor->nContent.GetIndex(), ::sw::GetTextAttrMode::Default));
if (pField
&& dynamic_cast<const SwPostItField*>(pField->GetFormatField().GetField()))
{
@@ -498,7 +498,7 @@ void SwWrtShell::DelToEndOfPara()
Pop(SwCursorShell::PopMode::DeleteCurrent);
return;
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
Pop(SwCursorShell::PopMode::DeleteCurrent);
if( bRet )
UpdateAttr();
@@ -515,7 +515,7 @@ void SwWrtShell::DelToStartOfPara()
Pop(SwCursorShell::PopMode::DeleteCurrent);
return;
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
Pop(SwCursorShell::PopMode::DeleteCurrent);
if( bRet )
UpdateAttr();
@@ -530,7 +530,7 @@ void SwWrtShell::DelToStartOfSentence()
if(IsStartOfDoc())
return;
OpenMark();
- bool bRet = BwdSentence_() && Delete();
+ bool bRet = BwdSentence_() && Delete(false);
CloseMark( bRet );
}
@@ -562,7 +562,7 @@ bool SwWrtShell::DelToEndOfSentence()
}
else
{
- bRet = FwdSentence_() && Delete();
+ bRet = FwdSentence_() && Delete(false);
}
CloseMark( bRet );
return bRet;
@@ -583,7 +583,7 @@ void SwWrtShell::DelNxtWord()
else
EndWrd();
- bool bRet = Delete();
+ bool bRet = Delete(false);
if( bRet )
UpdateAttr();
else
@@ -607,7 +607,7 @@ void SwWrtShell::DelPrvWord()
else
SttWrd();
}
- bool bRet = Delete();
+ bool bRet = Delete(false);
if( bRet )
UpdateAttr();
else
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index 90664ae098f5..322199a2b1d5 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -914,7 +914,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 +928,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 0840ed3cd407..c240c630df3a 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -118,6 +118,9 @@
#include <comphelper/lok.hxx>
#include <memory>
+#include "../../core/crsr/callnk.hxx"
+
+
using namespace sw::mark;
using namespace com::sun::star;
namespace {
@@ -244,7 +247,8 @@ void SwWrtShell::Insert( const OUString &rStr )
StartUndo(SwUndoId::REPLACE, &aRewriter);
bStarted = true;
Push();
- bDeleted = DelRight();
+ // 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();
@@ -1667,7 +1671,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar )
StartUndo( SwUndoId::REPLACE, &aRewriter );
bStarted = true;
- DelRight();
+ DelRight(true);
}
SwEditShell::AutoCorrect( rACorr, IsInsMode(), cChar );
@@ -1729,7 +1733,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;
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index 82d7c27cb0c6..459abd7f8b33 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -68,11 +68,11 @@
#include <sfx2/event.hxx>
#include <sal/log.hxx>
-void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
+bool SwWrtShell::InsertField2(SwField const& rField, SwPaM* pAnnotationRange)
{
ResetCursorStack();
if(!CanInsert())
- return;
+ return false;
StartAllAction();
SwRewriter aRewriter;
@@ -120,7 +120,7 @@ void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
}
}
- SwEditShell::Insert2(rField, bDeleted);
+ bool const isSuccess = SwEditShell::InsertField(rField, bDeleted);
if ( pAnnotationTextRange )
{
@@ -145,6 +145,8 @@ void SwWrtShell::Insert(SwField const& rField, SwPaM* pAnnotationRange)
EndUndo();
EndAllAction();
+
+ return isSuccess;
}
// Start the field update
@@ -488,30 +490,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 +522,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 +543,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/popupmenu/draw.xml b/sw/uiconfig/sglobal/popupmenu/draw.xml
index d119c1add5cf..799c02cc5e2e 100644
--- a/sw/uiconfig/sglobal/popupmenu/draw.xml
+++ b/sw/uiconfig/sglobal/popupmenu/draw.xml
@@ -71,6 +71,11 @@
<menu:menuitem menu:id=".uno:EnterGroup"/>
<menu:menuitem menu:id=".uno:LeaveGroup"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:AddTextBox"/>
<menu:menuitem menu:id=".uno:RemoveTextBox"/>
<menu:menuitem menu:id=".uno:EditSignatureLine"/>
diff --git a/sw/uiconfig/swform/popupmenu/draw.xml b/sw/uiconfig/swform/popupmenu/draw.xml
index d119c1add5cf..799c02cc5e2e 100644
--- a/sw/uiconfig/swform/popupmenu/draw.xml
+++ b/sw/uiconfig/swform/popupmenu/draw.xml
@@ -71,6 +71,11 @@
<menu:menuitem menu:id=".uno:EnterGroup"/>
<menu:menuitem menu:id=".uno:LeaveGroup"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:AddTextBox"/>
<menu:menuitem menu:id=".uno:RemoveTextBox"/>
<menu:menuitem menu:id=".uno:EditSignatureLine"/>
diff --git a/sw/uiconfig/swreport/popupmenu/draw.xml b/sw/uiconfig/swreport/popupmenu/draw.xml
index d119c1add5cf..799c02cc5e2e 100644
--- a/sw/uiconfig/swreport/popupmenu/draw.xml
+++ b/sw/uiconfig/swreport/popupmenu/draw.xml
@@ -71,6 +71,11 @@
<menu:menuitem menu:id=".uno:EnterGroup"/>
<menu:menuitem menu:id=".uno:LeaveGroup"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:AddTextBox"/>
<menu:menuitem menu:id=".uno:RemoveTextBox"/>
<menu:menuitem menu:id=".uno:EditSignatureLine"/>
diff --git a/sw/uiconfig/swriter/popupmenu/draw.xml b/sw/uiconfig/swriter/popupmenu/draw.xml
index d119c1add5cf..799c02cc5e2e 100644
--- a/sw/uiconfig/swriter/popupmenu/draw.xml
+++ b/sw/uiconfig/swriter/popupmenu/draw.xml
@@ -71,6 +71,11 @@
<menu:menuitem menu:id=".uno:EnterGroup"/>
<menu:menuitem menu:id=".uno:LeaveGroup"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:AddTextBox"/>
<menu:menuitem menu:id=".uno:RemoveTextBox"/>
<menu:menuitem menu:id=".uno:EditSignatureLine"/>
diff --git a/sw/uiconfig/swxform/popupmenu/draw.xml b/sw/uiconfig/swxform/popupmenu/draw.xml
index d119c1add5cf..799c02cc5e2e 100644
--- a/sw/uiconfig/swxform/popupmenu/draw.xml
+++ b/sw/uiconfig/swxform/popupmenu/draw.xml
@@ -71,6 +71,11 @@
<menu:menuitem menu:id=".uno:EnterGroup"/>
<menu:menuitem menu:id=".uno:LeaveGroup"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:OpenHyperlinkOnCursor"/>
+ <menu:menuitem menu:id=".uno:EditHyperlink"/>
+ <menu:menuitem menu:id=".uno:CopyHyperlinkLocation"/>
+ <menu:menuitem menu:id=".uno:RemoveHyperlink"/>
+ <menu:menuseparator/>
<menu:menuitem menu:id=".uno:AddTextBox"/>
<menu:menuitem menu:id=".uno:RemoveTextBox"/>
<menu:menuitem menu:id=".uno:EditSignatureLine"/>
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/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/awt/vclxtabpagecontainer.cxx b/toolkit/source/awt/vclxtabpagecontainer.cxx
index 51789915de42..f44851dde3f7 100644
--- a/toolkit/source/awt/vclxtabpagecontainer.cxx
+++ b/toolkit/source/awt/vclxtabpagecontainer.cxx
@@ -228,6 +228,8 @@ void VCLXTabPageContainer::propertiesChange(const::css::uno::Sequence<PropertyCh
pTabCtrl->SetPageEnabled(nId, xTabPageModel->getEnabled());
} else if (rEvent.PropertyName == GetPropertyName(BASEPROPERTY_TITLE)) {
pTabCtrl->SetPageText(nId, xTabPageModel->getTitle());
+ } else if (rEvent.PropertyName == GetPropertyName(BASEPROPERTY_IMAGEURL)) {
+ pTabCtrl->SetPageImage(nId, TkResMgr::getImageFromURL(xTabPageModel->getImageURL()));
}
}
}
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 971fc0fd0825..835b893491e3 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -784,6 +784,10 @@ OUString SAL_CALL ControlModelContainerBase::getImageURL()
void SAL_CALL ControlModelContainerBase::setImageURL( const OUString& _imageurl )
{
m_sImageURL = _imageurl;
+ SolarMutexGuard aGuard;
+ Reference<XPropertySet> xThis(*this, UNO_QUERY);
+ xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_IMAGEURL), Any(_imageurl));
+
}
OUString SAL_CALL ControlModelContainerBase::getToolTip()
{
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index cbf477e6bb86..360ca710256d 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -52,6 +52,7 @@ UnoControlTabPageModel::UnoControlTabPageModel( Reference< XComponentContext > c
ImplRegisterProperty( BASEPROPERTY_SCROLLHEIGHT );
ImplRegisterProperty( BASEPROPERTY_SCROLLTOP );
ImplRegisterProperty( BASEPROPERTY_SCROLLLEFT );
+ ImplRegisterProperty( BASEPROPERTY_IMAGEURL );
}
OUString SAL_CALL UnoControlTabPageModel::getImplementationName()
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 7394a442cef7..eb0a17f1bd58 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -315,10 +315,18 @@ namespace toolkitform
Any aText;
static const char FM_PROP_TEXT[] = "Text";
static const char FM_PROP_LABEL[] = "Label";
+ static const char FM_PROP_VALUE[] = "Value";
if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) )
aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
aText = xModelProps->getPropertyValue( FM_PROP_LABEL );
+ else if ( xPSI->hasPropertyByName( FM_PROP_VALUE ) )
+ {
+ double aValue;
+ if (xModelProps->getPropertyValue( FM_PROP_VALUE ) >>= aValue)
+ aText <<= OUString::number(aValue);
+ }
+
if ( aText.hasValue() ) {
if( ! (aText >>= Descriptor->Text) ) {
SAL_WARN("toolkit.helper", "describePDFControl: unable to assign aText to Descriptor->Text");
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/color.cxx b/tools/source/generic/color.cxx
index 061435ed61c9..9511e16865e8 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -167,6 +167,38 @@ Color Color::HSBtoRGB( sal_uInt16 nHue, sal_uInt16 nSat, sal_uInt16 nBri )
return Color( cR, cG, cB );
}
+Color Color::STRtoRGB(const OUString& colorname)
+{
+ Color col;
+ if(colorname.isEmpty()) return col;
+
+ switch(colorname.getLength()){
+ case 7:
+ col.mValue = colorname.copy(1,6).toUInt32(16);
+ break;
+ case 6:
+ col.mValue = colorname.toUInt32(16);
+ break;
+ case 4:
+ {
+ sal_Unicode data[6] = { colorname[1], colorname[1], colorname[2],
+ colorname[2], colorname[3], colorname[3] };
+ col.mValue = OUString(data,6).toUInt32(16);
+ break;
+ }
+ case 3:
+ {
+ sal_Unicode data[6] = { colorname[0], colorname[0], colorname[1],
+ colorname[1], colorname[2], colorname[2] };
+ col.mValue = OUString(data,6).toUInt32(16);
+ break;
+ }
+ default:
+ break;
+ }
+ return col;
+}
+
OUString Color::AsRGBHexString() const
{
std::stringstream ss;
@@ -174,6 +206,13 @@ OUString Color::AsRGBHexString() const
return OUString::createFromAscii(ss.str().c_str());
}
+OUString Color::AsRGBHEXString() const
+{
+ std::stringstream ss;
+ ss << std::hex << std::uppercase << std::setfill ('0') << std::setw(6) << sal_uInt32(GetRGBColor());
+ return OUString::createFromAscii(ss.str().c_str());
+}
+
void Color::ApplyTintOrShade(sal_Int16 n100thPercent)
{
if (n100thPercent == 0)
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/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/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/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/inc/svimpbox.hxx b/vcl/inc/svimpbox.hxx
index 0ba5517671cf..ce2f58579232 100644
--- a/vcl/inc/svimpbox.hxx
+++ b/vcl/inc/svimpbox.hxx
@@ -210,6 +210,7 @@ protected:
VclPtr<SvTreeListBox> m_pView;
VclPtr<ScrollBar> m_aVerSBar;
SvTreeListEntry* m_pCursor;
+ SvTreeListEntry* m_pCursorOld;
SvTreeListEntry* m_pStartEntry;
ImplSVEvent* m_nCurUserEvent;
Size m_aOutputSize;
@@ -343,8 +344,17 @@ public:
bool IsSelectable( const SvTreeListEntry* pEntry );
void SetForceMakeVisible(bool bEnable) { mbForceMakeVisible = bEnable; }
+
+ // tdf#143114 allow to ask if CaptureOnButton is active
+ // (MouseButtonDown hit on SvLBoxButton, CaptureMouse() active)
+ bool IsCaptureOnButtonActive() const;
};
+inline bool SvImpLBox::IsCaptureOnButtonActive() const
+{
+ return nullptr != m_pActiveButton && nullptr != m_pActiveEntry;
+}
+
inline Image& SvImpLBox::implGetImageLocation( const ImageType _eType )
{
return m_aNodeAndEntryImages[_eType];
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf148706.odt b/vcl/qa/cppunit/pdfexport/data/tdf148706.odt
new file mode 100644
index 000000000000..974bb97433f0
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/tdf148706.odt
Binary files differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 723202eccf15..b75d8eaa2c46 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -35,6 +35,7 @@
#include <fpdf_text.h>
#include <fpdf_doc.h>
#include <fpdfview.h>
+#include <cpp/fpdf_scopers.h>
#include <vcl/graphicfilter.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
@@ -111,6 +112,7 @@ public:
void testTdf107013();
void testTdf107018();
void testTdf107089();
+ void testTdf148706();
void testTdf99680();
void testTdf99680_2();
void testTdf108963();
@@ -156,6 +158,7 @@ public:
CPPUNIT_TEST(testTdf107013);
CPPUNIT_TEST(testTdf107018);
CPPUNIT_TEST(testTdf107089);
+ CPPUNIT_TEST(testTdf148706);
CPPUNIT_TEST(testTdf99680);
CPPUNIT_TEST(testTdf99680_2);
CPPUNIT_TEST(testTdf108963);
@@ -674,7 +677,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);
}
@@ -790,6 +794,58 @@ void PdfExportTest::testTdf107089()
CPPUNIT_ASSERT(it != pEnd);
}
+void PdfExportTest::testTdf148706()
+{
+ // Import the bugdoc and export as PDF.
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "tdf148706.odt";
+ mxComponent = loadFromDesktop(aURL);
+ CPPUNIT_ASSERT(mxComponent.is());
+
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Parse the export result with pdfium.
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ SvMemoryStream aMemory;
+ aMemory.WriteStream(aFile);
+ ScopedFPDFDocument pPdfDocument(
+ FPDF_LoadMemDocument(aMemory.GetData(), aMemory.GetSize(), /*password=*/nullptr));
+ // The document has one page.
+ CPPUNIT_ASSERT_EQUAL(1, FPDF_GetPageCount(pPdfDocument.get()));
+ ScopedFPDFPage pPdfPage(FPDF_LoadPage(pPdfDocument.get(), /*page_index=*/0));
+ CPPUNIT_ASSERT(pPdfPage);
+
+ // The page has one annotation.
+ CPPUNIT_ASSERT_EQUAL(1, FPDFPage_GetAnnotCount(pPdfPage.get()));
+ ScopedFPDFAnnotation pAnnot(FPDFPage_GetAnnot(pPdfPage.get(), 0));
+
+ //// Without the fix in place, this test would have failed with
+ //// - Expected: 1821.84
+ //// - Actual :
+ CPPUNIT_ASSERT(FPDFAnnot_HasKey(pAnnot.get(), "V"));
+ CPPUNIT_ASSERT_EQUAL(FPDF_OBJECT_STRING, FPDFAnnot_GetValueType(pAnnot.get(), "V"));
+
+ size_t nDALength = FPDFAnnot_GetStringValue(pAnnot.get(), "V", nullptr, 0);
+ CPPUNIT_ASSERT_EQUAL(std::size_t(0), nDALength % 2);
+ std::vector<sal_Unicode> aDABuf(nDALength / 2);
+ FPDFAnnot_GetStringValue(
+ pAnnot.get(), "V", reinterpret_cast<FPDF_WCHAR*>(aDABuf.data()), nDALength);
+
+ OUString aDA(reinterpret_cast<sal_Unicode*>(aDABuf.data()));
+ CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aDA);
+
+ CPPUNIT_ASSERT(FPDFAnnot_HasKey(pAnnot.get(), "DV"));
+ CPPUNIT_ASSERT_EQUAL(FPDF_OBJECT_STRING, FPDFAnnot_GetValueType(pAnnot.get(), "DV"));
+
+ FPDFAnnot_GetStringValue(
+ pAnnot.get(), "DV", reinterpret_cast<FPDF_WCHAR*>(aDABuf.data()), nDALength);
+
+ aDA = reinterpret_cast<sal_Unicode*>(aDABuf.data());
+ CPPUNIT_ASSERT_EQUAL(OUString("1821.84"), aDA);
+}
+
void PdfExportTest::testTdf99680()
{
vcl::filter::PDFDocument aDocument;
@@ -1698,7 +1754,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 +1789,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 +1820,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 +2006,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/settings.cxx b/vcl/source/app/settings.cxx
index a621f6c61fd4..719062d8c581 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1916,6 +1916,20 @@ StyleSettings::GetToolbarIconSize() const
return mxData->mnToolbarIconSize;
}
+Size StyleSettings::GetToolbarIconSizePixel() const
+{
+ switch (GetToolbarIconSize())
+ {
+ case ToolbarIconSize::Large:
+ return Size(24, 24);
+ case ToolbarIconSize::Size32:
+ return Size(32, 32);
+ case ToolbarIconSize::Small:
+ default:
+ return Size(16, 16);
+ }
+}
+
const DialogStyle&
StyleSettings::GetDialogStyle() const
{
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/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index dee65a2c2a80..fdfe0647bbe9 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2699,18 +2699,23 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
if( bMouseOver )
nState |= ControlState::ROLLOVER;
+ Color aBackgroundColor = COL_AUTO;
+ if (IsControlBackground())
+ aBackgroundColor = GetControlBackground();
+
// if parent has no border, then nobody has drawn the background
// since no border window exists. so draw it here.
WinBits nParentStyle = pWin->GetStyle();
if( ! (nParentStyle & WB_BORDER) || (nParentStyle & WB_NOBORDER) )
{
tools::Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() );
+
pWin->DrawNativeControl( ControlType::Listbox, ControlPart::Entire, aParentRect,
- nState, aControlValue, OUString() );
+ nState, aControlValue, OUString(), aBackgroundColor);
}
bNativeOK = rRenderContext.DrawNativeControl(ControlType::Listbox, ControlPart::Entire, aCtrlRegion,
- nState, aControlValue, OUString());
+ nState, aControlValue, OUString(), aBackgroundColor);
}
if (bIsEnabled)
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index 2de9f387011a..541727541abe 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -780,17 +780,9 @@ void ListBox::StateChanged( StateChangedType nType )
mpImplLB->SetControlBackground( GetControlBackground() );
if ( mpImplWin )
{
- if ( mpImplWin->IsNativeControlSupported(ControlType::Listbox, ControlPart::Entire) )
- {
- // Transparent background
- mpImplWin->SetBackground();
- mpImplWin->SetControlBackground();
- }
- else
- {
- mpImplWin->SetBackground( mpImplLB->GetMainWindow()->GetControlBackground() );
- mpImplWin->SetControlBackground( mpImplLB->GetMainWindow()->GetControlBackground() );
- }
+
+ mpImplWin->SetBackground( GetControlBackground() );
+ mpImplWin->SetControlBackground( GetControlBackground() );
mpImplWin->SetFont( mpImplLB->GetMainWindow()->GetFont() );
mpImplWin->Invalidate();
}
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index 538a6055f168..f4ededa3adde 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -206,7 +206,6 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBi
(void)rBitmaps;
(void)nFirstPage;
(void)nPages;
- (void)pSizeHint;
return 0;
#endif // HAVE_FEATURE_PDFIUM
}
diff --git a/vcl/source/font/font.cxx b/vcl/source/font/font.cxx
index 64f16b08f8db..aa4f313c1614 100644
--- a/vcl/source/font/font.cxx
+++ b/vcl/source/font/font.cxx
@@ -24,6 +24,7 @@
#include <unotools/fontdefs.hxx>
#include <vcl/font.hxx>
+#include <vcl/virdev.hxx>
#include <impfont.hxx>
#include <fontattributes.hxx>
@@ -37,8 +38,6 @@
#ifdef _WIN32
#include <vcl/metric.hxx>
-#else
-#include <vcl/virdev.hxx>
#endif
using namespace vcl;
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..1f095c61f9b9 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -29,6 +29,9 @@
#define JOBSET_FILE364_SYSTEM (sal_uInt16(0xFFFF))
#define JOBSET_FILE605_SYSTEM (sal_uInt16(0xFFFE))
+// used only for compatibility with older versions,
+// printer/driver name are truncated if too long,
+// device name and port name are completely unused
struct ImplOldJobSetupData
{
char cPrinterName[64];
@@ -253,15 +256,24 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
ImplJobSetup& rJobData = rJobSetup.ImplGetData();
- pData->cPrinterName[SAL_N_ELEMENTS(pData->cPrinterName) - 1] = 0;
+ // use (potentially truncated) printer/driver name from ImplOldJobSetupData as fallback,
+ // gets overwritten below if PRINTER_NAME/DRIVER_NAME keys are set
+ pData->cPrinterName[std::size(pData->cPrinterName) - 1] = 0;
rJobData.SetPrinterName( OStringToOUString(pData->cPrinterName, aStreamEncoding) );
- pData->cDriverName[SAL_N_ELEMENTS(pData->cDriverName) - 1] = 0;
+ pData->cDriverName[std::size(pData->cDriverName) - 1] = 0;
rJobData.SetDriver( OStringToOUString(pData->cDriverName, aStreamEncoding) );
// Are these our new JobSetup files?
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 ) );
@@ -307,6 +319,10 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup )
else if( aValue == "DuplexMode::LongEdge" )
rJobData.SetDuplexMode( DuplexMode::LongEdge );
}
+ else if (aKey == u"PRINTER_NAME")
+ rJobData.SetPrinterName(aValue);
+ else if (aKey == u"DRIVER_NAME")
+ rJobData.SetDriver(aValue);
else
rJobData.SetValueMap(aKey, aValue);
}
@@ -343,9 +359,9 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup )
ImplOldJobSetupData aOldData = {};
OString aPrnByteName(OUStringToOString(rJobData.GetPrinterName(), RTL_TEXTENCODING_UTF8));
- strncpy(aOldData.cPrinterName, aPrnByteName.getStr(), SAL_N_ELEMENTS(aOldData.cPrinterName) - 1);
+ strncpy(aOldData.cPrinterName, aPrnByteName.getStr(), std::size(aOldData.cPrinterName) - 1);
OString aDriverByteName(OUStringToOString(rJobData.GetDriver(), RTL_TEXTENCODING_UTF8));
- strncpy(aOldData.cDriverName, aDriverByteName.getStr(), SAL_N_ELEMENTS(aOldData.cDriverName) - 1);
+ strncpy(aOldData.cDriverName, aDriverByteName.getStr(), std::size(aOldData.cDriverName) - 1);
int nPos = rOStream.Tell();
rOStream.WriteUInt16( 0 );
rOStream.WriteUInt16( JOBSET_FILE605_SYSTEM );
@@ -377,6 +393,12 @@ SvStream& WriteJobSetup( SvStream& rOStream, const JobSetup& rJobSetup )
write_uInt16_lenPrefixed_uInt8s_FromOString(rOStream, "DuplexMode::LongEdge");
break;
}
+ // write printer, driver name in full, the ones in aOldData may be truncated
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, u"PRINTER_NAME", RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rJobData.GetPrinterName(), RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, u"DRIVER_NAME", RTL_TEXTENCODING_UTF8);
+ write_uInt16_lenPrefixed_uInt8s_FromOUString(rOStream, rJobData.GetDriver(), RTL_TEXTENCODING_UTF8);
+
nLen = sal::static_int_cast<sal_uInt16>(rOStream.Tell() - nPos);
rOStream.Seek( nPos );
rOStream.WriteUInt16( nLen );
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index a2a3f5ca9a5b..ff1196637ed9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -4036,9 +4036,6 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
pop();
- OStringBuffer aDA( 256 );
- appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
- rBox.m_aDAString = aDA.makeStringAndClear();
//to encrypt this (el)
rBox.m_aMKDict = "/CA";
//after this assignment, to m_aMKDic cannot be added anything
@@ -4051,6 +4048,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( PDFWidget& rBox, const P
SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
beginRedirect( pCheckStream, aCheckRect );
+ OStringBuffer aDA( 256 );
aDA.append( "/Tx BMC\nq BT\n" );
appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetRadioCheckTextColor() ), aDA );
aDA.append( ' ' );
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/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 75b482ecaa0b..7220267409ff 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -81,6 +81,7 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvTreeList* pLBTree, WinBits nWinS
m_pStartEntry = nullptr;
m_pCursor = nullptr;
+ m_pCursorOld = nullptr;
m_pAnchor = nullptr;
m_nVisibleCount = 0; // number of rows of data in control
m_nNodeBmpTabDistance = NODE_BMP_TABDIST_NOTVALID;
@@ -265,6 +266,7 @@ void SvImpLBox::Clear()
m_pView->HideFocus();
m_pCursor = nullptr;
}
+ m_pCursorOld = nullptr;
m_aVerSBar->Hide();
m_aVerSBar->SetThumbPos( 0 );
Range aRange( 0, 0 );
@@ -1858,7 +1860,6 @@ void SvImpLBox::EntryInserted( SvTreeListEntry* pEntry )
// ****** Control the control animation
-
bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvTreeListEntry* pEntry)
{
SvLBoxItem* pItem = m_pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&m_pActiveTab);
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index aa56db5b718f..23729f56b25a 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1151,10 +1151,13 @@ void SvTreeListBox::SetupDragOrigin()
void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel )
{
-
- Point aEventPos( rPosPixel );
- MouseEvent aMouseEvt( aEventPos, 1, MouseEventModifiers::SELECT, MOUSE_LEFT );
- MouseButtonUp( aMouseEvt );
+ if(nullptr != pImpl)
+ {
+ // tdf#143114 do not start drag when a Button/Checkbox is in
+ // drag-before-ButtonUp mode (CaptureMouse() active)
+ if(pImpl->IsCaptureOnButtonActive())
+ return;
+ }
nOldDragMode = GetDragDropMode();
if ( nOldDragMode == DragDropMode::NONE )
@@ -2315,10 +2318,75 @@ void SvTreeListBox::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
void SvTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
{
pImpl->MouseButtonDown( rMEvt );
+
+ // tdf#143114 remember the *correct* starting entry
+ pImpl->m_pCursorOld = (rMEvt.IsLeft() && (nTreeFlags & SvTreeFlags::CHKBTN))
+ ? GetEntry(rMEvt.GetPosPixel())
+ : nullptr;
+}
+
+long SvTreeListBox::GetItemPos(SvTreeListEntry* pEntry, sal_uInt16 nTabIdx)
+{
+ sal_uInt16 nTabCount = aTabs.size();
+ sal_uInt16 nItemCount = pEntry->ItemCount();
+ if (nTabIdx >= nItemCount || nTabIdx >= nTabCount)
+ return -1;
+
+ SvLBoxTab* pTab = aTabs.front().get();
+ SvLBoxItem* pItem = &pEntry->GetItem(nTabIdx);
+ sal_uInt16 nNextItem = nTabIdx + 1;
+
+ long nRealWidth = pImpl->GetOutputSize().Width();
+ nRealWidth -= GetMapMode().GetOrigin().X();
+
+ SvLBoxTab* pNextTab = nNextItem < nTabCount ? aTabs[nNextItem].get() : nullptr;
+ long nStart = GetTabPos(pEntry, pTab);
+
+ long nNextTabPos;
+ if (pNextTab)
+ nNextTabPos = GetTabPos(pEntry, pNextTab);
+ else
+ {
+ nNextTabPos = nRealWidth;
+ if (nStart > nRealWidth)
+ nNextTabPos += 50;
+ }
+
+ auto nItemWidth(pItem->GetWidth(this, pEntry));
+ nStart += pTab->CalcOffset(nItemWidth, nNextTabPos - nStart);
+
+ return nStart; //, nLen);
}
void SvTreeListBox::MouseButtonUp( const MouseEvent& rMEvt )
{
+ // tdf#116675 clicking on an entry should toggle its checkbox
+ // tdf#143114 use the already created starting entry and if it exists
+ if (nullptr != pImpl->m_pCursorOld)
+ {
+ const Point aPnt = rMEvt.GetPosPixel();
+ SvTreeListEntry* pEntry = GetEntry(aPnt);
+
+ // compare if MouseButtonUp *is* on the same entry, regardless of scrolling
+ // or other things
+ if (pEntry && pEntry->m_Items.size() > 0 && pEntry == pImpl->m_pCursorOld)
+ {
+ SvLBoxItem* pItem = GetItem(pEntry, aPnt.X());
+ // if the checkbox button was clicked, that will be toggled later, do not toggle here
+ // anyway users probably don't want to toggle the checkbox by clickink on another button
+ if (!pItem || pItem->GetType() != SvLBoxItemType::Button)
+ {
+ SvLBoxButton* pItemCheckBox
+ = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SvLBoxItemType::Button));
+ if (pItemCheckBox && GetItemPos(pEntry, 0) < aPnt.X() - GetMapMode().GetOrigin().X())
+ {
+ pItemCheckBox->ClickHdl(pEntry);
+ InvalidateEntry(pEntry);
+ }
+ }
+ }
+ }
+
pImpl->MouseButtonUp( rMEvt );
}
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 1d25c089e976..53faa6ff6675 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -21,6 +21,7 @@
#include <sal/log.hxx>
#include <comphelper/lok.hxx>
+#include <bitmapwriteaccess.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/image.hxx>
@@ -589,6 +590,24 @@ sal_uInt16 Menu::GetItemCount() const
return static_cast<sal_uInt16>(pItemList->size());
}
+bool Menu::HasValidEntries(bool bCheckPopups) const
+{
+ bool bValidEntries = false;
+ sal_uInt16 nCount = GetItemCount();
+ for (sal_uInt16 n = 0; !bValidEntries && (n < nCount); n++)
+ {
+ MenuItemData* pItem = pItemList->GetDataFromPos(n);
+ if (pItem->bEnabled && (pItem->eType != MenuItemType::SEPARATOR))
+ {
+ if (bCheckPopups && pItem->pSubMenu)
+ bValidEntries = pItem->pSubMenu->HasValidEntries(true);
+ else
+ bValidEntries = true;
+ }
+ }
+ return bValidEntries;
+}
+
sal_uInt16 Menu::ImplGetVisibleItemCount() const
{
sal_uInt16 nItems = 0;
@@ -1010,6 +1029,19 @@ OUString Menu::GetItemText( sal_uInt16 nItemId ) const
return OUString();
}
+void Menu::SetItemColor(sal_uInt16 nItemId, const Color& rColor)
+{
+ StyleSettings aSettings = Application::GetSettings().GetStyleSettings();
+ auto iconSize = aSettings.GetToolbarIconSizePixel();
+ Bitmap aBmp(iconSize, 24);
+ BitmapWriteAccess aBmpAccess(aBmp);
+ aBmpAccess.SetFillColor(rColor);
+ aBmpAccess.FillRect(tools::Rectangle(0, 0, iconSize.Width() - 1, iconSize.Height() - 1));
+ BitmapEx aBmpEx(aBmp);
+ Image aImage(aBmpEx);
+ SetItemImage(nItemId, aImage);
+}
+
void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
{
size_t nPos;
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index a3a06ecf1f31..d3f61a551876 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -343,7 +343,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
}
// call Get- and LoseFocus
- if ( pOldFocusWindow && ! pOldFocusWindow->IsDisposed() )
+ if ( pOldFocusWindow && ! pOldFocusWindow->isDisposed() )
{
NotifyEvent aNEvt( MouseNotifyEvent::LOSEFOCUS, pOldFocusWindow );
if ( !ImplCallPreNotify( aNEvt ) )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 1515b8b74264..e19abd69b2db 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -833,7 +833,7 @@ void PrintDialog::setPaperSizes()
for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); nPaper++)
{
PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
- aInfo.doSloppyFit();
+ aInfo.doSloppyFit(true);
Paper ePaper = aInfo.getPaper();
const LocaleDataWrapper& rLocWrap(Application::GetSettings().GetLocaleDataWrapper());
@@ -1870,7 +1870,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, void)
for (int nPaper = 0; nPaper < aPrt->GetPaperInfoCount(); nPaper++ )
{
PaperInfo aInfo = aPrt->GetPaperInfo( nPaper );
- aInfo.doSloppyFit();
+ aInfo.doSloppyFit(true);
Paper ePaper = aInfo.getPaper();
if ( mePaper == ePaper )
@@ -1952,7 +1952,7 @@ IMPL_LINK( PrintDialog, SelectHdl, weld::ComboBox&, rBox, void )
{
VclPtr<Printer> aPrt( maPController->getPrinter() );
PaperInfo aInfo = aPrt->GetPaperInfo( rBox.get_active() );
- aInfo.doSloppyFit();
+ aInfo.doSloppyFit(true);
mePaper = aInfo.getPaper();
if ( mePaper == PAPER_USER )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 424b8b6cdbfa..5ac478c86972 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -262,6 +262,13 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
long nX, long nY, sal_uInt64 nMsgTime,
sal_uInt16 nCode, MouseEventModifiers nMode )
{
+ SAL_INFO( "vcl.debugevent",
+ "mouse event "
+ "(MouseNotifyEvent " << static_cast<sal_uInt16>(nSVEvent) << ") "
+ "(MouseLeave " << bMouseLeave << ") "
+ "(X, Y " << nX << ", " << nY << ") "
+ "(Code " << nCode << ") "
+ "(Modifiers " << static_cast<sal_uInt16>(nMode) << ")");
ImplSVData* pSVData = ImplGetSVData();
Point aMousePos( nX, nY );
VclPtr<vcl::Window> pChild;
@@ -510,6 +517,8 @@ bool ImplHandleMouseEvent( const VclPtr<vcl::Window>& xWindow, MouseNotifyEvent
pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true;
}
+ if (xWindow->isDisposed())
+ return true;
// test for mouseleave and mouseenter
VclPtr<vcl::Window> pMouseMoveWin = pWinFrameData->mpMouseMoveWin;
if ( pChild != pMouseMoveWin )
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index cae2a4e1ab03..a4c55b83365d 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);
}
}
@@ -716,7 +717,7 @@ bool CPDManager::endSpool( const OUString& rPrintername, const OUString& rJobTit
}
g_variant_unref(ret);
unlink( it->second.getStr() );
- m_aSpoolFiles.erase( pFile );
+ m_aSpoolFiles.erase(it);
}
#else
(void)rPrintername;
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx
index 12482b2ba878..ffe53461763b 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
@@ -872,7 +847,7 @@ bool CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTi
#endif
unlink( it->second.getStr() );
- m_aSpoolFiles.erase( pFile );
+ m_aSpoolFiles.erase(it);
if( pOptions )
cupsFreeOptions( nNumOptions, pOptions );
}
diff --git a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
index 8ab9f5cc4617..85c7133d3eaf 100644
--- a/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx
@@ -1332,9 +1332,8 @@ void GtkSalGraphics::PaintCombobox( GtkStateFlags flags, cairo_t *cr,
else
{
render_common(mpListboxStyle, cr, aRect, flags);
- render_common(mpListboxBoxStyle, cr, aRect, flags);
-
render_common(mpListboxButtonStyle, cr, aRect, flags);
+ render_common(mpListboxBoxStyle, cr, aRect, flags);
gtk_render_arrow(mpListboxButtonArrowStyle, cr,
G_PI,
@@ -2631,13 +2630,24 @@ bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, co
case RenderType::Combobox:
if (pBgCssProvider)
{
- gtk_style_context_add_provider(mpComboboxEntryStyle, GTK_STYLE_PROVIDER(pBgCssProvider),
- GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ if (nType == ControlType::Combobox)
+ {
+ gtk_style_context_add_provider(mpComboboxEntryStyle, GTK_STYLE_PROVIDER(pBgCssProvider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
+ else if (nType == ControlType::Listbox)
+ {
+ gtk_style_context_add_provider(mpListboxBoxStyle, GTK_STYLE_PROVIDER(pBgCssProvider),
+ GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+ }
}
PaintCombobox(flags, cr, rControlRegion, nType, nPart);
if (pBgCssProvider)
{
- gtk_style_context_remove_provider(mpComboboxEntryStyle, GTK_STYLE_PROVIDER(pBgCssProvider));
+ if (nType == ControlType::Combobox)
+ gtk_style_context_remove_provider(mpComboboxEntryStyle, GTK_STYLE_PROVIDER(pBgCssProvider));
+ else if (nType == ControlType::Listbox)
+ gtk_style_context_remove_provider(mpListboxBoxStyle, GTK_STYLE_PROVIDER(pBgCssProvider));
}
break;
case RenderType::Icon:
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/CustomTarget_source.mk b/writerfilter/CustomTarget_source.mk
index 8d7b3d22b690..d0085654a146 100644
--- a/writerfilter/CustomTarget_source.mk
+++ b/writerfilter/CustomTarget_source.mk
@@ -41,6 +41,7 @@ writerfilter_OOXMLNAMESPACES= \
vml-wordprocessingDrawing \
wp14 \
w14 \
+ w15 \
a14 \
wml
diff --git a/writerfilter/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx
index bd528d1a1e59..18196a9004d5 100644
--- a/writerfilter/inc/dmapper/resourcemodel.hxx
+++ b/writerfilter/inc/dmapper/resourcemodel.hxx
@@ -204,6 +204,8 @@ public:
/// The current section is the last one in this body text.
virtual void markLastSectionGroup( ) { };
+ virtual void setDocumentReference(void* pDocument) = 0;
+
/**
Receives start mark for group with the same paragraph properties.
*/
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 42ce471a0e3d..cb6b05e15c04 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -168,7 +168,7 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
//import document properties
try
{
- uno::Reference< embed::XStorage > xDocumentStorage =
+ m_pImpl->m_xDocumentStorage =
comphelper::OStorageHelper::GetStorageOfFormatFromInputStream(OFOPXML_STORAGE_FORMAT_STRING, xInputStream, xContext, bRepairStorage );
uno::Reference< uno::XInterface > xTemp = xContext->getServiceManager()->createInstanceWithContext(
@@ -177,11 +177,17 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
uno::Reference< document::XOOXMLDocumentPropertiesImporter > xImporter( xTemp, uno::UNO_QUERY_THROW );
uno::Reference< document::XDocumentPropertiesSupplier > xPropSupplier( xModel, uno::UNO_QUERY_THROW);
- xImporter->importProperties( xDocumentStorage, xPropSupplier->getDocumentProperties() );
+ xImporter->importProperties(m_pImpl->m_xDocumentStorage,
+ xPropSupplier->getDocumentProperties());
}
catch( const uno::Exception& ) {}
}
+void DomainMapper::setDocumentReference(void* pDocument)
+{
+ m_pImpl->setDocumentReference(pDocument);
+}
+
DomainMapper::~DomainMapper()
{
try
@@ -1018,6 +1024,11 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
}
break;
case NS_ooxml::LN_CT_SdtBlock_sdtContent:
+ if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::unknown)
+ {
+ // Still not determined content type? and it is even not unsupported? Then it is plain text field
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::plainText);
+ }
m_pImpl->SetSdt(true);
break;
case NS_ooxml::LN_CT_SdtBlock_sdtEndContent:
@@ -1030,10 +1041,20 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
else
m_pImpl->setSdtEndDeferred(true);
- if (m_pImpl->m_pSdtHelper->isInsideDropDownControl())
- m_pImpl->m_pSdtHelper->createDropDownControl();
- else if (m_pImpl->m_pSdtHelper->validateDateFormat())
- m_pImpl->m_pSdtHelper->createDateContentControl();
+ switch (m_pImpl->m_pSdtHelper->getControlType())
+ {
+ case SdtControlType::dropDown:
+ m_pImpl->m_pSdtHelper->createDropDownControl();
+ break;
+ case SdtControlType::plainText:
+ m_pImpl->m_pSdtHelper->createPlainTextControl();
+ break;
+ case SdtControlType::datePicker:
+ m_pImpl->m_pSdtHelper->createDateContentControl();
+ break;
+ case SdtControlType::unknown:
+ default:;
+ }
break;
case NS_ooxml::LN_CT_SdtListItem_displayText:
// TODO handle when this is != value
@@ -1097,14 +1118,26 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
}
break;
case NS_ooxml::LN_CT_DataBinding_prefixMappings:
+ m_pImpl->m_pSdtHelper->setDataBindingPrefixMapping(sStringValue);
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_DataBinding_prefixMappings", sStringValue);
break;
case NS_ooxml::LN_CT_DataBinding_xpath:
+ m_pImpl->m_pSdtHelper->setDataBindingXPath(sStringValue);
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_DataBinding_xpath", sStringValue);
break;
case NS_ooxml::LN_CT_DataBinding_storeItemID:
+ m_pImpl->m_pSdtHelper->setDataBindingStoreItemID(sStringValue);
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_DataBinding_storeItemID", sStringValue);
break;
+ case NS_ooxml::LN_CT_SdtPlaceholder_docPart_val:
+ m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_SdtPlaceholder_docPart_val", sStringValue);
+ break;
+ case NS_ooxml::LN_CT_SdtColor_val:
+ m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_SdtColor_val", sStringValue);
+ break;
+ case NS_ooxml::LN_CT_SdtText_multiLine:
+ m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "ooxml:CT_SdtText_multiLine", sStringValue);
+ break;
case NS_ooxml::LN_CT_PTab_leader:
case NS_ooxml::LN_CT_PTab_relativeTo:
case NS_ooxml::LN_CT_PTab_alignment:
@@ -2483,7 +2516,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
case NS_ooxml::LN_CT_SdtPr_dropDownList:
case NS_ooxml::LN_CT_SdtPr_comboBox:
{
- m_pImpl->m_pSdtHelper->setInsideDropDownControl(true);
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::dropDown);
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
if (pProperties.get() != nullptr)
pProperties->resolve(*this);
@@ -2496,8 +2529,17 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
pProperties->resolve(*this);
}
break;
+ case NS_ooxml::LN_CT_SdtPr_placeholder:
+ {
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if (pProperties)
+ pProperties->resolve(*this);
+ }
+ break;
+ break;
case NS_ooxml::LN_CT_SdtPr_date:
{
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::datePicker);
resolveSprmProps(*this, rSprm);
m_pImpl->m_pSdtHelper->setDateFieldStartRange(GetCurrentTextRange()->getEnd());
}
@@ -2520,6 +2562,17 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
m_pImpl->m_pSdtHelper->getLocale().append(sStringValue);
}
break;
+ case NS_ooxml::LN_CT_SdtPr_text:
+ {
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::plainText);
+ enableInteropGrabBag("ooxml:CT_SdtPr_text");
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if (pProperties)
+ pProperties->resolve(*this);
+ m_pImpl->m_pSdtHelper->appendToInteropGrabBag(getInteropGrabBag());
+ m_pImpl->disableInteropGrabBag();
+ }
+ break;
case NS_ooxml::LN_CT_SdtPr_dataBinding:
case NS_ooxml::LN_CT_SdtPr_equation:
case NS_ooxml::LN_CT_SdtPr_checkbox:
@@ -2528,9 +2581,10 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
case NS_ooxml::LN_CT_SdtPr_picture:
case NS_ooxml::LN_CT_SdtPr_citation:
case NS_ooxml::LN_CT_SdtPr_group:
- case NS_ooxml::LN_CT_SdtPr_text:
case NS_ooxml::LN_CT_SdtPr_id:
case NS_ooxml::LN_CT_SdtPr_alias:
+ case NS_ooxml::LN_CT_SdtPlaceholder_docPart:
+ case NS_ooxml::LN_CT_SdtPr_color:
{
// this is an unsupported SDT property, create a grab bag for it
OUString sName;
@@ -2544,11 +2598,21 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, const PropertyMapPtr& rContext )
case NS_ooxml::LN_CT_SdtPr_picture: sName = "ooxml:CT_SdtPr_picture"; break;
case NS_ooxml::LN_CT_SdtPr_citation: sName = "ooxml:CT_SdtPr_citation"; break;
case NS_ooxml::LN_CT_SdtPr_group: sName = "ooxml:CT_SdtPr_group"; break;
- case NS_ooxml::LN_CT_SdtPr_text: sName = "ooxml:CT_SdtPr_text"; break;
case NS_ooxml::LN_CT_SdtPr_id: sName = "ooxml:CT_SdtPr_id"; break;
case NS_ooxml::LN_CT_SdtPr_alias: sName = "ooxml:CT_SdtPr_alias"; break;
+ case NS_ooxml::LN_CT_SdtPlaceholder_docPart: sName = "ooxml:CT_SdtPlaceholder_docPart"; break;
+ case NS_ooxml::LN_CT_SdtPr_color: sName = "ooxml:CT_SdtPr_color"; break;
default: assert(false);
};
+ if (
+ nSprmId == NS_ooxml::LN_CT_SdtPr_checkbox ||
+ nSprmId == NS_ooxml::LN_CT_SdtPr_docPartObj ||
+ nSprmId == NS_ooxml::LN_CT_SdtPr_docPartList ||
+ nSprmId == NS_ooxml::LN_CT_SdtPr_picture ||
+ nSprmId == NS_ooxml::LN_CT_SdtPr_citation)
+ {
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::unsupported);
+ }
enableInteropGrabBag(sName);
// process subitems
@@ -3008,6 +3072,18 @@ void DomainMapper::lcl_startParagraphGroup()
void DomainMapper::lcl_endParagraphGroup()
{
+ if (m_pImpl->isBreakDeferred(LINE_BREAK))
+ {
+ if (m_pImpl->GetIsLastParagraphInSection())
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+
+ while (m_pImpl->isBreakDeferred(LINE_BREAK))
+ {
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+ m_pImpl->appendTextPortion("\n", m_pImpl->GetTopContext());
+ }
+ }
+
m_pImpl->PopProperties(CONTEXT_PARAGRAPH);
if (m_pImpl->hasTableManager())
m_pImpl->getTableManager().endParagraphGroup();
@@ -3149,6 +3225,13 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
case 0x0e: //column break
m_pImpl->deferBreak(COLUMN_BREAK);
return;
+ case 0x0a: //line break
+ if (m_pImpl->GetIsLastParagraphInSection())
+ {
+ m_pImpl->deferBreak(LINE_BREAK);
+ return;
+ }
+ break;
case 0x07:
m_pImpl->getTableManager().text(data_, len);
return;
@@ -3184,6 +3267,13 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, size_t len)
// GetTopContext() is changed by inserted breaks, but we want to keep the current context
PropertyMapPtr pContext = m_pImpl->GetTopContext();
+
+ while (m_pImpl->isBreakDeferred(LINE_BREAK))
+ {
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+ m_pImpl->appendTextPortion("\n", pContext);
+ }
+
if (!m_pImpl->GetFootnoteContext())
{
if (m_pImpl->isBreakDeferred(PAGE_BREAK))
@@ -3319,7 +3409,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
}
bool bNewLine = len == 1 && (sText[0] == 0x0d || sText[0] == 0x07);
- if (m_pImpl->m_pSdtHelper->isInsideDropDownControl())
+ if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::dropDown)
{
if (bNewLine)
// Dropdown control has single-line texts, so in case of newline, create the control.
@@ -3330,43 +3420,54 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
return;
}
}
+ else if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::datePicker)
+ {
+ if (IsInHeaderFooter() && m_pImpl->IsDiscardHeaderFooter())
+ {
+ m_pImpl->m_pSdtHelper->getDateFormat().truncate();
+ m_pImpl->m_pSdtHelper->getLocale().truncate();
+ m_pImpl->m_pSdtHelper->setControlType(SdtControlType::unknown);
+ return;
+ }
+ }
+ else if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::plainText)
+ {
+ m_pImpl->m_pSdtHelper->getSdtTexts().append(sText);
+ if (bNewLine)
+ {
+ m_pImpl->m_pSdtHelper->createPlainTextControl();
+ finishParagraph();
+ }
+ return;
+ }
else if (!m_pImpl->m_pSdtHelper->isInteropGrabBagEmpty())
{
- // Ignore grabbag when we have a date field, it can conflict during export
- if(m_pImpl->m_pSdtHelper->validateDateFormat())
+ // there are unsupported SDT properties in the document
+ // save them in the paragraph interop grab bag
+ if (m_pImpl->IsDiscardHeaderFooter())
{
+ // Unless we're supposed to ignore this header/footer.
m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear();
+ return;
}
- else
+ if((m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_checkbox") ||
+ m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_text") ||
+ m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_dataBinding") ||
+ m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_citation") ||
+ (m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_id") &&
+ m_pImpl->m_pSdtHelper->getInteropGrabBagSize() == 1)) && !m_pImpl->m_pSdtHelper->isOutsideAParagraph())
{
+ PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_CHARACTER);
- // there are unsupported SDT properties in the document
- // save them in the paragraph interop grab bag
- if (m_pImpl->IsDiscardHeaderFooter())
- {
- // Unless we're supposed to ignore this header/footer.
- m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear();
- return;
- }
- if((m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_checkbox") ||
- m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_text") ||
- m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_dataBinding") ||
- m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_citation") ||
- (m_pImpl->m_pSdtHelper->containedInInteropGrabBag("ooxml:CT_SdtPr_id") &&
- m_pImpl->m_pSdtHelper->getInteropGrabBagSize() == 1)) && !m_pImpl->m_pSdtHelper->isOutsideAParagraph())
- {
- PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_CHARACTER);
-
- if (m_pImpl->IsOpenField())
- // We have a field, insert the SDT properties to the field's grab-bag, so they won't be lost.
- pContext = m_pImpl->GetTopFieldContext()->getProperties();
+ if (m_pImpl->IsOpenField())
+ // We have a field, insert the SDT properties to the field's grab-bag, so they won't be lost.
+ pContext = m_pImpl->GetTopFieldContext()->getProperties();
- pContext->Insert(PROP_SDTPR, uno::makeAny(m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear()), true, CHAR_GRAB_BAG);
- }
- else
- m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Insert(PROP_SDTPR,
- uno::makeAny(m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear()), true, PARA_GRAB_BAG);
+ pContext->Insert(PROP_SDTPR, uno::makeAny(m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear()), true, CHAR_GRAB_BAG);
}
+ else
+ m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH)->Insert(PROP_SDTPR,
+ uno::makeAny(m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear()), true, PARA_GRAB_BAG);
}
else if (len == 1 && sText[0] == 0x03)
{
@@ -3374,6 +3475,18 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
m_pImpl->m_bHasFtnSep = true;
return;
}
+ else if (len == 1 && sText[0] == '\r')
+ {
+ // Clear "last" one linebreak at end of section
+ if (m_pImpl->GetIsLastParagraphInSection() && m_pImpl->isBreakDeferred(LINE_BREAK))
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+ // And emit all other linebreaks
+ while (m_pImpl->isBreakDeferred(LINE_BREAK))
+ {
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+ m_pImpl->appendTextPortion("\n", m_pImpl->GetTopContext());
+ }
+ }
else if (len == 1 && sText[0] == '\t' )
{
if ( m_pImpl->m_bCheckFirstFootnoteTab && m_pImpl->IsInFootOrEndnote() )
@@ -3392,15 +3505,6 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
return;
}
}
- else if (m_pImpl->m_pSdtHelper->validateDateFormat())
- {
- if(IsInHeaderFooter() && m_pImpl->IsDiscardHeaderFooter())
- {
- m_pImpl->m_pSdtHelper->getDateFormat().truncate();
- m_pImpl->m_pSdtHelper->getLocale().truncate();
- return;
- }
- }
if (!m_pImpl->hasTableManager())
return;
@@ -3413,6 +3517,12 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len)
try
{
+ while (m_pImpl->isBreakDeferred(LINE_BREAK))
+ {
+ m_pImpl->clearDeferredBreak(LINE_BREAK);
+ m_pImpl->appendTextPortion("\n", m_pImpl->GetTopContext());
+ }
+
m_pImpl->getTableManager().utext(data_, len);
if (bNewLine)
@@ -3948,7 +4058,7 @@ void DomainMapper::HandleRedline( Sprm& rSprm )
void DomainMapper::finishParagraph(const bool bRemove)
{
- if (m_pImpl->m_pSdtHelper->validateDateFormat())
+ if (m_pImpl->m_pSdtHelper->getControlType() == SdtControlType::datePicker)
m_pImpl->m_pSdtHelper->createDateContentControl();
m_pImpl->finishParagraph(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH), bRemove);
}
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx b/writerfilter/source/dmapper/DomainMapper.hxx
index 0913dd125814..c472e1b3846e 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -81,6 +81,8 @@ public:
utl::MediaDescriptor const & rMediaDesc);
virtual ~DomainMapper() override;
+ virtual void setDocumentReference(void* pDocument) override;
+
// Stream
virtual void markLastParagraphInSection() override;
virtual void markLastSectionGroup() override;
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..20824c423e9a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -171,6 +171,46 @@ static void lcl_handleTextField( const uno::Reference< beans::XPropertySet >& rx
}
}
+/**
+ Very similar to DomainMapper_Impl::GetPropertyFromStyleSheet
+ It is focused on paragraph properties search in current & parent stylesheet entries.
+ But it will not take into account propeties with listid: these are "list paragraph styles" and
+ not used in some cases.
+*/
+static uno::Any lcl_GetPropertyFromParaStyleSheetNoNum(PropertyIds eId, StyleSheetEntryPtr pEntry, const StyleSheetTablePtr& rStyleSheet)
+{
+ while (pEntry)
+ {
+ if (pEntry->pProperties)
+ {
+ boost::optional<PropertyMap::Property> aProperty =
+ pEntry->pProperties->getProperty(eId);
+ if (aProperty)
+ {
+ const StyleSheetPropertyMap* pEntryProperties =
+ dynamic_cast<const StyleSheetPropertyMap*>(pEntry->pProperties.get());
+ if (pEntryProperties && pEntryProperties->GetListId())
+ // It is a paragraph style with list. Paragraph list styles are not taken into account
+ return uno::Any();
+ else
+ return aProperty->second;
+ }
+ }
+ //search until the property is set or no parent is available
+ StyleSheetEntryPtr pNewEntry;
+ if (!pEntry->sBaseStyleIdentifier.isEmpty())
+ pNewEntry = rStyleSheet->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier);
+
+ SAL_WARN_IF(pEntry == pNewEntry, "writerfilter.dmapper", "circular loop in style hierarchy?");
+
+ if (pEntry == pNewEntry) //fdo#49587
+ break;
+
+ pEntry = pNewEntry;
+ }
+ return uno::Any();
+}
+
struct FieldConversion
{
const sal_Char* cFieldServiceName;
@@ -241,6 +281,7 @@ DomainMapper_Impl::DomainMapper_Impl(
utl::MediaDescriptor const & rMediaDesc) :
m_eDocumentType( eDocumentType ),
m_rDMapper( rDMapper ),
+ m_pOOXMLDocument(nullptr),
m_xTextDocument( xModel, uno::UNO_QUERY ),
m_xTextFactory( xModel, uno::UNO_QUERY ),
m_xComponentContext( xContext ),
@@ -251,6 +292,7 @@ DomainMapper_Impl::DomainMapper_Impl(
m_bIsFirstSection( true ),
m_bIsColumnBreakDeferred( false ),
m_bIsPageBreakDeferred( false ),
+ m_nLineBreaksDeferred( 0 ),
m_bSdtEndDeferred(false),
m_bParaSdtEndDeferred(false),
m_bStartTOC(false),
@@ -335,7 +377,7 @@ DomainMapper_Impl::DomainMapper_Impl(
getTableManager( ).startLevel();
m_bUsingEnhancedFields = !utl::ConfigManager::IsFuzzing() && officecfg::Office::Common::Filter::Microsoft::Import::ImportWWFieldsAsEnhancedFields::get(m_xComponentContext);
- m_pSdtHelper = new SdtHelper(*this);
+ m_pSdtHelper = new SdtHelper(*this, m_xComponentContext);
m_aRedlines.push(std::vector<RedlineParamsPtr>());
}
@@ -354,6 +396,11 @@ DomainMapper_Impl::~DomainMapper_Impl()
}
}
+writerfilter::ooxml::OOXMLDocument* DomainMapper_Impl::getDocumentReference() const
+{
+ return static_cast<writerfilter::ooxml::OOXMLDocument*>(m_pOOXMLDocument);
+}
+
uno::Reference< container::XNameContainer > const & DomainMapper_Impl::GetPageStyles()
{
if(!m_xPageStyles1.is())
@@ -478,6 +525,52 @@ void DomainMapper_Impl::AddDummyParaForTableInSection()
}
}
+ static OUString lcl_FindLastBookmark(const uno::Reference<text::XTextCursor>& xCursor)
+ {
+ OUString sName;
+ if (!xCursor.is())
+ return sName;
+
+ // Select 1 previous element
+ xCursor->goLeft(1, true);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xCursor, uno::UNO_QUERY);
+ if (!xParaEnumAccess.is())
+ {
+ xCursor->goRight(1, true);
+ return sName;
+ }
+
+ // Iterate through selection paragraphs
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ if (!xParaEnum->hasMoreElements())
+ {
+ xCursor->goRight(1, true);
+ return sName;
+ }
+
+ // Iterate through first para portions
+ uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(),
+ uno::UNO_QUERY_THROW);
+ uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
+ while (xRunEnum->hasMoreElements())
+ {
+ uno::Reference<beans::XPropertySet> xProps(xRunEnum->nextElement(), uno::UNO_QUERY_THROW);
+ uno::Any aType(xProps->getPropertyValue("TextPortionType"));
+ OUString sType;
+ aType >>= sType;
+ if (sType == "Bookmark")
+ {
+ uno::Reference<container::XNamed> xBookmark(xProps->getPropertyValue("Bookmark"),
+ uno::UNO_QUERY_THROW);
+ sName = xBookmark->getName();
+ // Do not stop the scan here. Maybe there are 2 bookmarks?
+ }
+ }
+
+ xCursor->goRight(1, true);
+ return sName;
+ }
+
void DomainMapper_Impl::RemoveLastParagraph( )
{
if (m_bDiscardHeaderFooter)
@@ -507,6 +600,13 @@ void DomainMapper_Impl::RemoveLastParagraph( )
// (but only for paste/insert, not load; otherwise it can happen that
// flys anchored at the disposed paragraph are deleted (fdo47036.rtf))
bool const bEndOfDocument(m_aTextAppendStack.size() == 1);
+
+ // Try to find and remember last bookmark in document: it potentially
+ // can be deleted by xCursor->setString() but not by xParagraph->dispose()
+ OUString sLastBookmarkName;
+ if (bEndOfDocument)
+ sLastBookmarkName = lcl_FindLastBookmark(xCursor);
+
if ((IsInHeaderFooter() || (bEndOfDocument && !m_bIsNewDoc))
&& xEnumerationAccess.is())
{
@@ -534,7 +634,27 @@ void DomainMapper_Impl::RemoveLastParagraph( )
// delete
xCursor->setString(OUString());
- // restore again
+ // call to xCursor->setString possibly did remove final bookmark
+ // from previous paragraph. We need to restore it, if there was any.
+ if (sLastBookmarkName.getLength())
+ {
+ OUString sBookmarkNameAfterRemoval = lcl_FindLastBookmark(xCursor);
+ if (sBookmarkNameAfterRemoval.isEmpty())
+ {
+ // Yes, it was removed. Restore
+ uno::Reference<text::XTextContent> xBookmark(
+ m_xTextFactory->createInstance("com.sun.star.text.Bookmark"),
+ uno::UNO_QUERY_THROW);
+
+ uno::Reference<container::XNamed> xBkmNamed(xBookmark,
+ uno::UNO_QUERY_THROW);
+ xBkmNamed->setName(sLastBookmarkName);
+ xTextAppend->insertTextContent(
+ uno::Reference<text::XTextRange>(xCursor, uno::UNO_QUERY_THROW),
+ xBookmark, !xCursor->isCollapsed());
+ }
+ }
+ // restore redline options again
xDocProps->setPropertyValue(aRecordChanges, aPreviousValue);
}
}
@@ -912,9 +1032,12 @@ void DomainMapper_Impl::deferBreak( BreakType deferredBreakType)
{
switch (deferredBreakType)
{
- case COLUMN_BREAK:
- m_bIsColumnBreakDeferred = true;
+ case LINE_BREAK:
+ m_nLineBreaksDeferred++;
break;
+ case COLUMN_BREAK:
+ m_bIsColumnBreakDeferred = true;
+ break;
case PAGE_BREAK:
// See SwWW8ImplReader::HandlePageBreakChar(), page break should be
// ignored inside tables.
@@ -932,6 +1055,8 @@ bool DomainMapper_Impl::isBreakDeferred( BreakType deferredBreakType )
{
switch (deferredBreakType)
{
+ case LINE_BREAK:
+ return m_nLineBreaksDeferred > 0;
case COLUMN_BREAK:
return m_bIsColumnBreakDeferred;
case PAGE_BREAK:
@@ -945,6 +1070,10 @@ void DomainMapper_Impl::clearDeferredBreak(BreakType deferredBreakType)
{
switch (deferredBreakType)
{
+ case LINE_BREAK:
+ assert(m_nLineBreaksDeferred > 0);
+ m_nLineBreaksDeferred--;
+ break;
case COLUMN_BREAK:
m_bIsColumnBreakDeferred = false;
break;
@@ -958,6 +1087,7 @@ void DomainMapper_Impl::clearDeferredBreak(BreakType deferredBreakType)
void DomainMapper_Impl::clearDeferredBreaks()
{
+ m_nLineBreaksDeferred = 0;
m_bIsColumnBreakDeferred = false;
m_bIsPageBreakDeferred = false;
}
@@ -1400,6 +1530,25 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap, con
if ( pStyleSheetProperties->GetListLevel() >= 0 )
pParaContext->Insert( PROP_NUMBERING_LEVEL, uno::makeAny(pStyleSheetProperties->GetListLevel()), false);
+
+ if (nListId == 0 && !pList)
+ {
+ // listid = 0 and no list definition is used in DOCX to stop numbering
+ // defined somewhere in parent styles
+ // And here we should explicitly set left margin and first-line margin.
+ // They can be taken from referred style, but not from styles with listid!
+ uno::Any aProp = lcl_GetPropertyFromParaStyleSheetNoNum(PROP_PARA_FIRST_LINE_INDENT, pEntry, m_pStyleSheetTable);
+ if (aProp.hasValue())
+ pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, aProp, false);
+ else
+ pParaContext->Insert(PROP_PARA_FIRST_LINE_INDENT, uno::makeAny(sal_uInt32(0)), false);
+
+ aProp = lcl_GetPropertyFromParaStyleSheetNoNum(PROP_PARA_LEFT_MARGIN, pEntry, m_pStyleSheetTable);
+ if (aProp.hasValue())
+ pParaContext->Insert(PROP_PARA_LEFT_MARGIN, aProp, false);
+ else
+ pParaContext->Insert(PROP_PARA_LEFT_MARGIN, uno::makeAny(sal_uInt32(0)), false);
+ }
}
// apply AutoSpacing: it has priority over all other margin settings
@@ -3191,7 +3340,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 +3458,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 +3504,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 +3534,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 +3557,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 +3570,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
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 2f264c4c9c19..c8021290e172 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -27,6 +27,7 @@
#include <com/sun/star/text/XTextFrame.hpp>
#include <com/sun/star/style/TabStop.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/embed/XStorage.hpp>
#include <queue>
#include <stack>
#include <tuple>
@@ -72,6 +73,11 @@ namespace com{ namespace sun{ namespace star{
}}}
namespace writerfilter {
+
+namespace ooxml {
+ class OOXMLDocument;
+}
+
namespace dmapper {
class SdtHelper;
@@ -112,7 +118,8 @@ enum { NUMBER_OF_CONTEXTS = CONTEXT_LIST + 1 };
enum BreakType
{
PAGE_BREAK,
- COLUMN_BREAK
+ COLUMN_BREAK,
+ LINE_BREAK
};
enum SkipFootnoteSeparator
@@ -429,6 +436,7 @@ public:
private:
SourceDocumentType const m_eDocumentType;
DomainMapper& m_rDMapper;
+ void* m_pOOXMLDocument;
OUString m_aBaseUrl;
css::uno::Reference<css::text::XTextDocument> m_xTextDocument;
css::uno::Reference<css::beans::XPropertySet> m_xDocumentSettings;
@@ -451,6 +459,7 @@ private:
bool m_bIsFirstSection;
bool m_bIsColumnBreakDeferred;
bool m_bIsPageBreakDeferred;
+ sal_Int32 m_nLineBreaksDeferred;
/// If we want to set "sdt end" on the next character context.
bool m_bSdtEndDeferred;
/// If we want to set "paragraph sdt end" on the next paragraph context.
@@ -592,6 +601,9 @@ public:
utl::MediaDescriptor const & rMediaDesc);
~DomainMapper_Impl();
+ void setDocumentReference(void* pDocument) { if (!m_pOOXMLDocument) m_pOOXMLDocument = pDocument; };
+ writerfilter::ooxml::OOXMLDocument* getDocumentReference() const;
+
SectionPropertyMap* GetLastSectionContext( )
{
return dynamic_cast< SectionPropertyMap* >( m_pLastSectionContext.get( ) );
@@ -1059,6 +1071,8 @@ public:
bool m_bIsActualParagraphFramed;
std::vector<css::uno::Any> aFramedRedlines;
+ css::uno::Reference< css::embed::XStorage > m_xDocumentStorage;
+
private:
void PushPageHeaderFooter(bool bHeader, SectionPropertyMap::PageType eType);
// Start a new index section; if needed, finish current paragraph
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 9168ad51eebd..0ea364cbff85 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -291,6 +291,20 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldSt
return 0;
--it;
itemZOrderOffset = 1; // after the topmost
+
+ // Check if this shape has a textbox. If so, the textbox will have its own ZOrder, so
+ // suggest a larger offset.
+ bool bTextBox = false;
+ uno::Reference<beans::XPropertySet> xShape = it->second;
+ uno::Reference<beans::XPropertySetInfo> xInfo = xShape->getPropertySetInfo();
+ if (xInfo->hasPropertyByName("TextBox"))
+ {
+ xShape->getPropertyValue("TextBox") >>= bTextBox;
+ }
+ if (bTextBox)
+ {
+ ++itemZOrderOffset;
+ }
}
// SwXFrame::getPropertyValue throws uno::RuntimeException
// when its GetFrameFormat() returns nullptr
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index b69f4565fb13..891f26f95c43 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -367,15 +367,13 @@ 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 ( sHyperlinkURL.getLength() > 0 )
- xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_HYPER_LINK_U_R_L ),
- uno::makeAny ( sHyperlinkURL ));
+ 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_()
+
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_DESCRIPTION ),
uno::makeAny( sAlternativeText ));
xGraphicObjectProperties->setPropertyValue(getPropertyName( PROP_TITLE ),
@@ -387,6 +385,17 @@ public:
}
}
+ void applyHyperlink(uno::Reference<beans::XPropertySet> const & xShapeProps, bool bIsShape)
+ {
+ // Graphic objects have a different hyperlink prop than shapes
+ auto aHyperlinkProp = bIsShape ? PROP_HYPERLINK : PROP_HYPER_LINK_U_R_L;
+ if (!sHyperlinkURL.isEmpty())
+ {
+ xShapeProps->setPropertyValue(
+ getPropertyName(aHyperlinkProp), uno::makeAny(sHyperlinkURL));
+ }
+ }
+
/// Getter for m_aInteropGrabBag, but also merges in the values from other members if they are set.
comphelper::SequenceAsHashMap const & getInteropGrabBag()
{
@@ -886,6 +895,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue)
xShapeProps->setPropertyValue("Surround", uno::makeAny(static_cast<sal_Int32>(m_pImpl->nWrap)));
m_pImpl->applyZOrder(xShapeProps);
m_pImpl->applyName(xShapeProps);
+ m_pImpl->applyHyperlink(xShapeProps, bUseShape);
xShapeProps->setPropertyValue("AllowOverlap",
uno::makeAny(m_pImpl->bAllowOverlap));
@@ -1412,6 +1422,7 @@ uno::Reference<text::XTextContent> GraphicImport::createGraphicObject(uno::Refer
uno::makeAny( awt::Size( m_pImpl->getXSize(), m_pImpl->getYSize() )));
m_pImpl->applyMargins(xGraphicObjectProperties);
m_pImpl->applyName(xGraphicObjectProperties);
+ m_pImpl->applyHyperlink(xGraphicObjectProperties, false);
}
// Handle horizontal flip.
diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx
index 3177224d4664..acb06d08781f 100644
--- a/writerfilter/source/dmapper/LoggedResources.hxx
+++ b/writerfilter/source/dmapper/LoggedResources.hxx
@@ -72,6 +72,8 @@ public:
void startGlossaryEntry() override;
void endGlossaryEntry() override;
+ virtual void setDocumentReference(void* /*pDocument*/) override{};
+
protected:
virtual void lcl_startSectionGroup() = 0;
virtual void lcl_endSectionGroup() = 0;
diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx
index 6fecf7fe2be4..6d9bdb808e14 100644
--- a/writerfilter/source/dmapper/PropertyIds.cxx
+++ b/writerfilter/source/dmapper/PropertyIds.cxx
@@ -128,6 +128,7 @@ OUString getPropertyName( PropertyIds eId )
case PROP_SUB_TYPE : sName = "SubType"; break;
case PROP_FILE_FORMAT : sName = "FileFormat"; break;
case PROP_HYPER_LINK_U_R_L : sName = "HyperLinkURL"; break;
+ case PROP_HYPERLINK : sName = "Hyperlink"; break;
case PROP_NUMBER_FORMAT : sName = "NumberFormat"; break;
case PROP_NAME : sName = "Name"; break;
case PROP_IS_INPUT : sName = "IsInput"; break;
diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx
index d511fd737238..347929e54e16 100644
--- a/writerfilter/source/dmapper/PropertyIds.hxx
+++ b/writerfilter/source/dmapper/PropertyIds.hxx
@@ -185,6 +185,7 @@ enum PropertyIds
,PROP_HORI_ORIENT_POSITION
,PROP_HORI_ORIENT_RELATION
,PROP_HYPER_LINK_U_R_L
+ ,PROP_HYPERLINK
,PROP_INDENT_AT
,PROP_INPUT_STREAM
,PROP_INSERT
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 154e7660d842..8a5e769ad011 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -12,20 +12,33 @@
#include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <editeng/unoprnms.hxx>
+#include <sal/log.hxx>
#include <vcl/svapp.hxx>
#include <vcl/outdev.hxx>
+#include <comphelper/string.hxx>
#include <comphelper/sequence.hxx>
#include <xmloff/odffields.hxx>
#include <com/sun/star/text/XTextField.hpp>
#include "DomainMapper_Impl.hxx"
#include "StyleSheetTable.hxx"
#include <officecfg/Office/Writer.hxx>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <com/sun/star/text/XTextFieldsSupplier.hpp>
+#include <com/sun/star/document/XOOXMLDocumentPropertiesImporter.hpp>
+#include <com/sun/star/embed/ElementModes.hpp>
+#include <ooxml/OOXMLDocument.hxx>
+#include <com/sun/star/xml/xpath/XPathAPI.hpp>
+#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
+#include <com/sun/star/xml/dom/XNode.hpp>
namespace writerfilter
{
namespace dmapper
+
{
using namespace ::com::sun::star;
+using namespace ::css::xml::xpath;
+using namespace ::comphelper;
/// w:sdt's w:dropDownList doesn't have width, so guess the size based on the longest string.
static awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet,
@@ -68,19 +81,140 @@ static awt::Size lcl_getOptimalWidth(const StyleSheetTablePtr& pStyleSheet,
return { nWidth + nBorder + nHeight, nHeight + nBorder };
}
-SdtHelper::SdtHelper(DomainMapper_Impl& rDM_Impl)
+SdtHelper::SdtHelper(DomainMapper_Impl& rDM_Impl,
+ css::uno::Reference<css::uno::XComponentContext> const& xContext)
: m_rDM_Impl(rDM_Impl)
- , m_bInsideDropDownControl(false)
+ , m_xComponentContext(xContext)
+ , m_aControlType(SdtControlType::unknown)
, m_bHasElements(false)
, m_bOutsideAParagraph(false)
+ , m_bPropertiesXMLsLoaded(false)
{
}
SdtHelper::~SdtHelper() = default;
+void SdtHelper::loadPropertiesXMLs()
+{
+ // Initialize properties xml storage (m_xPropertiesXMLs)
+ uno::Reference<uno::XInterface> xTemp
+ = m_xComponentContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.document.OOXMLDocumentPropertiesImporter", m_xComponentContext);
+ uno::Reference<document::XOOXMLDocumentPropertiesImporter> xImporter(xTemp, uno::UNO_QUERY);
+ if (!xImporter.is())
+ return;
+
+ uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(
+ xml::dom::DocumentBuilder::create(m_xComponentContext));
+ if (!xDomBuilder.is())
+ return;
+
+ std::vector<uno::Reference<xml::dom::XDocument>> aPropDocs;
+
+ // Load core properties
+ try
+ {
+ auto xCorePropsStream = xImporter->getCorePropertiesStream(m_rDM_Impl.m_xDocumentStorage);
+ aPropDocs.push_back(xDomBuilder->parse(xCorePropsStream));
+ }
+ catch (const uno::Exception&)
+ {
+ SAL_WARN("writerfilter",
+ "SdtHelper::loadPropertiesXMLs: failed loading core properties XML");
+ }
+
+ // Load extended properties
+ try
+ {
+ auto xExtPropsStream
+ = xImporter->getExtendedPropertiesStream(m_rDM_Impl.m_xDocumentStorage);
+ aPropDocs.push_back(xDomBuilder->parse(xExtPropsStream));
+ }
+ catch (const uno::Exception&)
+ {
+ SAL_WARN("writerfilter",
+ "SdtHelper::loadPropertiesXMLs: failed loading extended properties XML");
+ }
+
+ // TODO: some other property items?
+
+ // Add custom XMLs
+ uno::Sequence<uno::Reference<xml::dom::XDocument>> aCustomXmls
+ = m_rDM_Impl.getDocumentReference()->getCustomXmlDomList();
+ for (const auto& xDoc : aCustomXmls)
+ {
+ aPropDocs.push_back(xDoc);
+ }
+
+ m_xPropertiesXMLs = comphelper::containerToSequence(aPropDocs);
+ m_bPropertiesXMLsLoaded = true;
+}
+
+static void lcl_registerNamespaces(const OUString& sNamespaceString,
+ const uno::Reference<XXPathAPI>& xXPathAPI)
+{
+ // Split namespaces and register it in XPathAPI
+ auto aNamespaces = string::split(sNamespaceString, ' ');
+ for (const auto& sNamespace : aNamespaces)
+ {
+ // Here we have just one namespace in format "xmlns:ns0='http://someurl'"
+ auto aNamespace = string::split(sNamespace, '=');
+ if (aNamespace.size() < 2)
+ {
+ SAL_WARN("writerfilter",
+ "SdtHelper::getValueFromDataBinding: invalid namespace: " << sNamespace);
+ continue;
+ }
+
+ auto aNamespaceId = string::split(aNamespace[0], ':');
+ if (aNamespaceId.size() < 2)
+ {
+ SAL_WARN("writerfilter",
+ "SdtHelper::getValueFromDataBinding: invalid namespace: " << aNamespace[0]);
+ continue;
+ }
+
+ OUString sNamespaceURL = aNamespace[1];
+ sNamespaceURL = string::strip(sNamespaceURL, ' ');
+ sNamespaceURL = string::strip(sNamespaceURL, '\'');
+
+ xXPathAPI->registerNS(aNamespaceId[1], sNamespaceURL);
+ }
+}
+
+std::optional<OUString> SdtHelper::getValueFromDataBinding()
+{
+ // No xpath - nothing to do
+ if (m_sDataBindingXPath.isEmpty())
+ return {};
+
+ // Load properties XMLs
+ if (!m_bPropertiesXMLsLoaded)
+ loadPropertiesXMLs();
+
+ uno::Reference<XXPathAPI> xXpathAPI = XPathAPI::create(m_xComponentContext);
+
+ lcl_registerNamespaces(m_sDataBindingPrefixMapping, xXpathAPI);
+
+ // Iterate all properties xml documents and try to fetch data
+ for (const auto& xDocument : m_xPropertiesXMLs)
+ {
+ uno::Reference<XXPathObject> xResult = xXpathAPI->eval(xDocument, m_sDataBindingXPath);
+
+ if (xResult.is() && xResult->getNodeList() && xResult->getNodeList()->getLength()
+ && xResult->getString().getLength())
+ {
+ return xResult->getString();
+ }
+ }
+
+ // No data
+ return {};
+}
+
void SdtHelper::createDropDownControl()
{
- assert(m_bInsideDropDownControl);
+ assert(getControlType() == SdtControlType::dropDown);
const bool bDropDown
= officecfg::Office::Writer::Filter::Import::DOCX::ImportComboBoxAsDropDown::get();
@@ -134,13 +268,38 @@ void SdtHelper::createDropDownControl()
}
// clean up
- m_aDropDownItems.clear();
- m_bInsideDropDownControl = false;
+ clear();
}
-bool SdtHelper::validateDateFormat()
+void SdtHelper::createPlainTextControl()
{
- return !m_sDateFormat.toString().isEmpty() && !m_sLocale.toString().isEmpty();
+ assert(getControlType() == SdtControlType::plainText);
+
+ OUString aDefaultText = m_aSdtTexts.makeStringAndClear();
+
+ // create field
+ uno::Reference<css::text::XTextField> xControlModel(
+ m_rDM_Impl.GetTextFactory()->createInstance("com.sun.star.text.TextField.Input"),
+ uno::UNO_QUERY);
+
+ // set properties
+ uno::Reference<beans::XPropertySet> xPropertySet(xControlModel, uno::UNO_QUERY);
+
+ std::optional<OUString> oData = getValueFromDataBinding();
+ if (oData.has_value())
+ aDefaultText = *oData;
+
+ xPropertySet->setPropertyValue("Content", uno::makeAny(aDefaultText));
+
+ // add it into document
+ m_rDM_Impl.appendTextContent(xControlModel, uno::Sequence<beans::PropertyValue>());
+
+ // Store all unused sdt parameters from grabbag
+ xPropertySet->setPropertyValue(UNO_NAME_MISC_OBJ_INTEROPGRABBAG,
+ uno::makeAny(getInteropGrabBagAndClear()));
+
+ // clean up
+ clear();
}
void SdtHelper::createDateContentControl()
@@ -194,6 +353,11 @@ void SdtHelper::createDateContentControl()
uno::makeAny(m_sLocale.makeStringAndClear()));
}
OUString sFullDate = m_sDate.makeStringAndClear();
+
+ std::optional<OUString> oData = getValueFromDataBinding();
+ if (oData.has_value())
+ sFullDate = *oData;
+
if (!sFullDate.isEmpty())
{
sal_Int32 nTimeSep = sFullDate.indexOf("T");
@@ -201,8 +365,14 @@ void SdtHelper::createDateContentControl()
sFullDate = sFullDate.copy(0, nTimeSep);
xNameCont->insertByName(ODF_FORMDATE_CURRENTDATE, uno::makeAny(sFullDate));
}
+
+ // Store all unused sdt parameters from grabbag
+ xNameCont->insertByName(UNO_NAME_MISC_OBJ_INTEROPGRABBAG,
+ uno::makeAny(getInteropGrabBagAndClear()));
}
}
+
+ clear();
}
void SdtHelper::createControlShape(awt::Size aSize,
@@ -251,6 +421,15 @@ bool SdtHelper::containedInInteropGrabBag(const OUString& rValueName)
return false;
}
+void SdtHelper::clear()
+{
+ m_aDropDownItems.clear();
+ setControlType(SdtControlType::unknown);
+ m_sDataBindingPrefixMapping.clear();
+ m_sDataBindingXPath.clear();
+ m_sDataBindingStoreItemID.clear();
+ m_aGrabBag.clear();
+}
} // namespace dmapper
} // namespace writerfilter
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx
index 3cce8e3658af..863c449a211e 100644
--- a/writerfilter/source/dmapper/SdtHelper.hxx
+++ b/writerfilter/source/dmapper/SdtHelper.hxx
@@ -11,9 +11,12 @@
#define INCLUDED_WRITERFILTER_SOURCE_DMAPPER_SDTHELPER_HXX
#include <vector>
+#include <optional>
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/xml/dom/XDocument.hpp>
#include <rtl/ustrbuf.hxx>
#include <tools/ref.hxx>
@@ -24,6 +27,10 @@ namespace sun
{
namespace star
{
+namespace uno
+{
+class XComponentContext;
+}
namespace awt
{
struct Size;
@@ -39,6 +46,15 @@ namespace dmapper
{
class DomainMapper_Impl;
+enum class SdtControlType
+{
+ datePicker,
+ dropDown,
+ plainText,
+ unsupported, // Sdt block is defined, but we still do not support such type of field
+ unknown
+};
+
/**
* Helper to create form controls from w:sdt tokens.
*
@@ -48,17 +64,26 @@ class DomainMapper_Impl;
class SdtHelper final : public virtual SvRefBase
{
DomainMapper_Impl& m_rDM_Impl;
+ css::uno::Reference<css::uno::XComponentContext> m_xComponentContext;
/// Items of the drop-down control.
std::vector<OUString> m_aDropDownItems;
- /// Indicator of a drop-down control
- bool m_bInsideDropDownControl;
+ /// Type of sdt control
+ SdtControlType m_aControlType;
/// Pieces of the default text -- currently used only by the dropdown control.
OUStringBuffer m_aSdtTexts;
/// Date ISO string contained in the w:date element, used by the date control.
OUStringBuffer m_sDate;
/// Date format string as it comes from the ooxml document.
OUStringBuffer m_sDateFormat;
+
+ /// <w:dataBinding w:prefixMappings="">
+ OUString m_sDataBindingPrefixMapping;
+ /// <w:dataBinding w:xpath="">
+ OUString m_sDataBindingXPath;
+ /// <w:dataBinding w:storeItemID="">
+ OUString m_sDataBindingStoreItemID;
+
/// Start range of the date field
css::uno::Reference<css::text::XTextRange> m_xDateFieldStartRange;
/// Locale string as it comes from the ooxml document.
@@ -70,13 +95,28 @@ class SdtHelper final : public virtual SvRefBase
/// The last stored SDT element is outside paragraphs.
bool m_bOutsideAParagraph;
+ /// Storage for all properties documents as xml::dom::XDocument for later quering xpath for data
+ css::uno::Sequence<css::uno::Reference<css::xml::dom::XDocument>> m_xPropertiesXMLs;
+
+ /// Check if m_xPropertiesXMLs is initialized and loaded (need extra flag to distinguish
+ /// empty sequence from not yet initialized)
+ bool m_bPropertiesXMLsLoaded;
+
/// Create and append the drawing::XControlShape, containing the various models.
void createControlShape(css::awt::Size aSize,
css::uno::Reference<css::awt::XControlModel> const& xControlModel,
const css::uno::Sequence<css::beans::PropertyValue>& rGrabBag);
+ std::optional<OUString> getValueFromDataBinding();
+
+ void loadPropertiesXMLs();
+
+ /// Clear all collected attributes for futher reuse
+ void clear();
+
public:
- explicit SdtHelper(DomainMapper_Impl& rDM_Impl);
+ explicit SdtHelper(DomainMapper_Impl& rDM_Impl,
+ css::uno::Reference<css::uno::XComponentContext> const& xContext);
~SdtHelper() override;
std::vector<OUString>& getDropDownItems() { return m_aDropDownItems; }
@@ -86,14 +126,18 @@ public:
OUStringBuffer& getDateFormat() { return m_sDateFormat; }
+ void setDataBindingPrefixMapping(const OUString& sValue)
+ {
+ m_sDataBindingPrefixMapping = sValue;
+ }
+ void setDataBindingXPath(const OUString& sValue) { m_sDataBindingXPath = sValue; }
+ void setDataBindingStoreItemID(const OUString& sValue) { m_sDataBindingStoreItemID = sValue; }
+
void setDateFieldStartRange(const css::uno::Reference<css::text::XTextRange>& xStartRange)
{
m_xDateFieldStartRange = xStartRange;
}
- /// Decides if we have enough information to create a date control.
- bool validateDateFormat();
-
OUStringBuffer& getLocale() { return m_sLocale; }
/// If createControlShape() was ever called.
bool hasElements() const { return m_bHasElements; }
@@ -105,14 +149,16 @@ public:
bool isOutsideAParagraph() const { return m_bOutsideAParagraph; }
- bool isInsideDropDownControl() const { return m_bInsideDropDownControl; }
- void setInsideDropDownControl(bool bInside) { m_bInsideDropDownControl = bInside; }
+ SdtControlType getControlType() { return m_aControlType; }
+ void setControlType(SdtControlType aType) { m_aControlType = aType; }
/// Create drop-down control from w:sdt's w:dropDownList.
void createDropDownControl();
/// Create date control from w:sdt's w:date.
void createDateContentControl();
+ void createPlainTextControl();
+
void appendToInteropGrabBag(const css::beans::PropertyValue& rValue);
css::uno::Sequence<css::beans::PropertyValue> getInteropGrabBagAndClear();
bool isInteropGrabBagEmpty() const;
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index bec04a949ac7..8886420bc922 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -465,6 +465,7 @@ void OOXMLDocumentImpl::resolve(Stream & rStream)
{
uno::Reference<uno::XComponentContext> xContext(mpStream->getContext());
+ rStream.setDocumentReference(this);
OOXMLFastDocumentHandler * pDocHandler =
new OOXMLFastDocumentHandler(xContext, &rStream, this, mnXNoteId);
pDocHandler->setIsSubstream( mbIsSubstream );
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 17c8f5217fec..6be08d0cb307 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -26,6 +26,7 @@
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml"
+ xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml"
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main"
xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing"
xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"
@@ -5353,6 +5354,13 @@
<element name="cntxtAlts" tokenid="ooxml:cntxtAlts_cntxtAlts"/>
</resource>
</namespace>
+ <namespace name="w15">
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://schemas.microsoft.com/office/word/2012/wordml">
+ <define name="ST_LongHexNumber">
+ <data type="hexBinary"/>
+ </define>
+ </grammar>
+ </namespace>
<namespace name="a14">
<grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://schemas.microsoft.com/office/drawing/2010/main">
<!-- Simple types -->
@@ -13853,9 +13861,14 @@
<data type="string"/>
</attribute>
</define>
- <define name="CT_Placeholder">
+ <define name="CT_SdtPlaceholderDocPart">
+ <attribute name="val">
+ <data type="string"/>
+ </attribute>
+ </define>
+ <define name="CT_SdtPlaceholder">
<element name="docPart">
- <ref name="CT_String"/>
+ <ref name="CT_SdtPlaceholderDocPart"/>
</element>
</define>
<define name="CT_SdtText">
@@ -13874,6 +13887,11 @@
<data type="string"/>
</attribute>
</define>
+ <define name="CT_SdtColor">
+ <attribute name="val">
+ <data type="string"/>
+ </attribute>
+ </define>
<define name="CT_SdtPr">
<choice>
<element name="rPr">
@@ -13886,7 +13904,7 @@
<ref name="CT_Lock"/>
</element>
<element name="placeholder">
- <ref name="CT_Placeholder"/>
+ <ref name="CT_SdtPlaceholder"/>
</element>
<element name="showingPlcHdr">
<ref name="CT_OnOff"/>
@@ -13931,7 +13949,7 @@
<ref name="CT_Empty"/>
</element>
<element name="text">
- <ref name="CT_OnOff"/>
+ <ref name="CT_SdtText"/>
</element>
<element name="citation">
<ref name="CT_OnOff"/>
@@ -13942,6 +13960,9 @@
<element name="bibliography">
<ref name="CT_Empty"/>
</element>
+ <element name="w15:color">
+ <ref name="CT_SdtColor"/>
+ </element>
</choice>
</define>
<define name="CT_SdtEndPr">
@@ -18150,11 +18171,20 @@
<attribute name="val" tokenid="ooxml:CT_CalendarType_val" action="setValue"/>
<action name="start" action="setDefaultStringValue"/>
</resource>
+ <resource name="CT_SdtText" resource="Properties">
+ <attribute name="multiLine" tokenid="ooxml:CT_SdtText_multiLine"/>
+ </resource>
+ <resource name="CT_SdtPlaceholder" resource="Properties">
+ <attribute name="docPart" tokenid="ooxml:CT_SdtPlaceholder_docPart"/>
+ </resource>
<resource name="CT_DataBinding" resource="Properties">
<attribute name="prefixMappings" tokenid="ooxml:CT_DataBinding_prefixMappings"/>
<attribute name="xpath" tokenid="ooxml:CT_DataBinding_xpath"/>
<attribute name="storeItemID" tokenid="ooxml:CT_DataBinding_storeItemID"/>
</resource>
+ <resource name="CT_SdtColor" resource="Properties">
+ <attribute name="val" tokenid="ooxml:CT_SdtColor_val"/>
+ </resource>
<resource name="CT_SdtPr" resource="Properties">
<element name="rPr" tokenid="ooxml:CT_SdtPr_rPr"/>
<element name="alias" tokenid="ooxml:CT_SdtPr_alias"/>
@@ -18178,6 +18208,7 @@
<element name="citation" tokenid="ooxml:CT_SdtPr_citation"/>
<element name="group" tokenid="ooxml:CT_SdtPr_group"/>
<element name="bibliography" tokenid="ooxml:CT_SdtPr_bibliography"/>
+ <element name="w15:color" tokenid="ooxml:CT_SdtPr_color"/>
</resource>
<resource name="CT_SdtEndPr" resource="Properties">
<element name="rPr" tokenid="ooxml:CT_SdtEndPr_rPr"/>
@@ -18242,6 +18273,9 @@
<attribute name="displayText" tokenid="ooxml:CT_SdtListItem_displayText"/>
<attribute name="value" tokenid="ooxml:CT_SdtListItem_value"/>
</resource>
+ <resource name="CT_SdtPlaceholderDocPart" resource="Properties">
+ <attribute name="val" tokenid="ooxml:CT_SdtPlaceholder_docPart_val"/>
+ </resource>
<resource name="CT_Attr" resource="Properties">
<attribute name="uri" tokenid="ooxml:CT_Attr_uri"/>
<attribute name="name" tokenid="ooxml:CT_Attr_name"/>
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 13f1415b8cc4..5d5e956d7f3a 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -707,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 ),
@@ -1891,6 +1891,7 @@ namespace xmloff { namespace token {
TOKEN( "text-background-color", XML_TEXT_BACKGROUND_COLOR ),
TOKEN( "text-blinking", XML_TEXT_BLINKING ),
TOKEN( "text-box", XML_TEXT_BOX ),
+ TOKEN( "text-color", XML_TEXT_COLOR ),
TOKEN( "text-combine", XML_TEXT_COMBINE ),
TOKEN( "text-combine-end-char", XML_TEXT_COMBINE_END_CHAR ),
TOKEN( "text-combine-start-char", XML_TEXT_COMBINE_START_CHAR ),
@@ -2084,6 +2085,7 @@ namespace xmloff { namespace token {
TOKEN( "whole-page", XML_WHOLE_PAGE ),
TOKEN( "widows", XML_WIDOWS ),
TOKEN( "width", XML_WIDTH ),
+ TOKEN( "window-font-color", XML_WINDOW_FONT_COLOR ),
TOKEN( "word", XML_WORD ),
TOKEN( "word-count", XML_WORD_COUNT ),
TOKEN( "wrap", XML_WRAP ),
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index f9e10c11cf7d..fcc36f946ff1 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -231,6 +231,9 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
if( maData.mbValid )
maData.mbValid = !sEventName.isEmpty();
+
+ if (!maData.msMacroName.isEmpty())
+ rImp.NotifyMacroEventRead();
}
SvXMLImportContextRef SdXMLEventContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList )
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..8af3de729146 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -167,6 +167,7 @@ static const OUStringLiteral gsVerb( "Verb" );
static const OUStringLiteral gsSoundURL( "SoundURL" );
static const OUStringLiteral gsSpeed( "Speed" );
static const OUStringLiteral gsStarBasic( "StarBasic" );
+static const OUStringLiteral gsHyperlink( "Hyperlink" );
XMLShapeExport::XMLShapeExport(SvXMLExport& rExp,
SvXMLExportPropertyMapper *pExtMapper )
@@ -302,23 +303,8 @@ 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();
- }
- 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!
- }
- }
- if (!bSkip)
- {
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName("IsEmptyPresentationObject") )
@@ -588,13 +574,26 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
sal_Int32 nZIndex = 0;
uno::Reference< beans::XPropertySet > xSet( xShape, uno::UNO_QUERY );
+ OUString sHyperlink;
+ try
+ {
+ xSet->getPropertyValue(gsHyperlink) >>= sHyperlink;
+ }
+ catch (beans::UnknownPropertyException)
+ {
+ }
std::unique_ptr< SvXMLElementExport > pHyperlinkElement;
- // export hyperlinks with <a><shape/></a>. Currently only in draw since draw
- // does not support document events
+ // Need to stash the attributes that are pre-loaded for the shape export
+ // (otherwise they will become attributes of the draw:a element)
+ uno::Reference<xml::sax::XAttributeList> xSaveAttribs(
+ new SvXMLAttributeList(GetExport().GetAttrList()));
+ GetExport().ClearAttrList();
if( xSet.is() && (GetExport().GetModelType() == SvtModuleOptions::EFactory::DRAW) ) try
{
+ // export hyperlinks with <a><shape/></a>. Currently only in draw since draw
+ // does not support document events
presentation::ClickAction eAction = presentation::ClickAction_NONE;
xSet->getPropertyValue("OnClick") >>= eAction;
@@ -617,6 +616,14 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
{
TOOLS_WARN_EXCEPTION("xmloff", "XMLShapeExport::exportShape(): exception during hyperlink export");
}
+ else if (xSet.is() && !sHyperlink.isEmpty())
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHyperlink );
+ mrExport.AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
+ pHyperlinkElement.reset( new SvXMLElementExport(mrExport, XML_NAMESPACE_DRAW, XML_A, true, true) );
+ }
+ // re-add stashed attributes
+ GetExport().AddAttributeList(xSaveAttribs);
if( xSet.is() )
xSet->getPropertyValue(gsZIndex) >>= nZIndex;
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/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/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 0f33c760a6ac..f5f3cfac29cd 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1401,6 +1401,7 @@ void XMLTextFrameContext::EndElement()
(pMultiContext.is()) ? pMultiContext.get() : m_xImplContext.get();
XMLTextFrameContext_Impl *pImpl = const_cast<XMLTextFrameContext_Impl*>(dynamic_cast< const XMLTextFrameContext_Impl*>( pContext ));
assert(!pMultiContext.is() || pImpl);
+
if( pImpl )
{
pImpl->CreateIfNotThere();
@@ -1431,6 +1432,18 @@ void XMLTextFrameContext::EndElement()
GetImport().GetTextImport()->StoreLastImportedFrameName(pImpl->GetOrigName());
}
+ else
+ {
+ // When we are dealing with a textbox, pImpl will be null;
+ // we need to set the hyperlink to the shape instead
+ Reference<XShape> xShape = GetShape();
+ if (xShape.is() && m_pHyperlink)
+ {
+ Reference<XPropertySet> xProps(xShape, UNO_QUERY);
+ if (xProps.is())
+ xProps->setPropertyValue("Hyperlink", Any(m_pHyperlink->GetHRef()));
+ }
+ }
}
SvXMLImportContextRef XMLTextFrameContext::CreateChildContext(
@@ -1675,6 +1688,10 @@ SvXMLImportContextRef XMLTextFrameContext::CreateChildContext(
}
xContext = m_xImplContext->CreateChildContext(p_nPrefix, rLocalName, xAttrList);
}
+ else if (p_nPrefix == XML_NAMESPACE_DRAW && (IsXMLToken(rLocalName, XML_A)))
+ {
+ xContext = m_xImplContext->CreateChildContext(p_nPrefix, rLocalName, xAttrList);
+ }
else
{
// the child is a drawing shape
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index bd4bdd52be7a..3901a010fbd9 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -19,6 +19,7 @@
#include <sax/tools/converter.hxx>
+#include <xmloff/shapeimport.hxx>
#include <xmloff/xmlimp.hxx>
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmlnmspe.hxx>
@@ -26,6 +27,9 @@
#include "XMLTextFrameContext.hxx"
#include "XMLTextFrameHyperlinkContext.hxx"
+#include <com/sun/star/drawing/XShapes.hpp>
+
+using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text;
using namespace ::com::sun::star::xml::sax;
@@ -109,12 +113,31 @@ SvXMLImportContextRef XMLTextFrameHyperlinkContext::CreateChildContext(
SvXMLImportContext *pContext = nullptr;
XMLTextFrameContext *pTextFrameContext = nullptr;
- if( XML_NAMESPACE_DRAW == nPrefix )
+ if( XML_NAMESPACE_DRAW == nPrefix || XML_NAMESPACE_DR3D == nPrefix)
{
- if( IsXMLToken( rLocalName, XML_FRAME ) )
+ if( XML_NAMESPACE_DRAW == nPrefix && IsXMLToken( rLocalName, XML_FRAME ) )
pTextFrameContext = new XMLTextFrameContext( GetImport(), nPrefix,
rLocalName, xAttrList,
eDefaultAnchorType );
+ else if ((XML_NAMESPACE_DRAW == nPrefix && (
+ IsXMLToken(rLocalName, XML_CUSTOM_SHAPE) || IsXMLToken(rLocalName, XML_PATH)
+ || IsXMLToken(rLocalName, XML_ELLIPSE) || IsXMLToken(rLocalName, XML_LINE)
+ || IsXMLToken(rLocalName, XML_RECT) || IsXMLToken(rLocalName, XML_CAPTION)
+ || IsXMLToken(rLocalName, XML_POLYGON) || IsXMLToken(rLocalName, XML_POLYLINE)
+ || IsXMLToken(rLocalName, XML_MEASURE) || IsXMLToken(rLocalName, XML_CIRCLE)
+ || IsXMLToken(rLocalName, XML_CONNECTOR) || IsXMLToken(rLocalName, XML_CONTROL)
+ || IsXMLToken(rLocalName, XML_PAGE_THUMBNAIL) || IsXMLToken(rLocalName, XML_G)
+ ))
+ || (XML_NAMESPACE_DR3D == nPrefix && IsXMLToken(rLocalName, XML_SCENE))
+ )
+ {
+ Reference<XShapes> xShapes;
+ SvXMLShapeContext* pShapeContext
+ = GetImport().GetShapeImport()->CreateGroupChildContext(GetImport(), nPrefix,
+ rLocalName, xAttrList, xShapes);
+ pShapeContext->setHyperlink(sHRef);
+ pContext = pShapeContext;
+ }
}
if( pTextFrameContext )
@@ -123,9 +146,8 @@ SvXMLImportContextRef XMLTextFrameHyperlinkContext::CreateChildContext(
pContext = pTextFrameContext;
xFrameContext = pContext;
}
- else
+ else if (!pContext)
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
-
return pContext;
}
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
index 132db87150f2..5aeb141e6bd0 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx
@@ -30,6 +30,7 @@ namespace com { namespace sun { namespace star {
namespace beans { class XPropertySet; }
} } }
+/// Used for hyperlinks attached to objects (drawing objects, text boxes, Writer frames)
class XMLTextFrameHyperlinkContext : public SvXMLImportContext
{
OUString sHRef;
diff --git a/xmloff/source/token/tokens.txt b/xmloff/source/token/tokens.txt
index b2b95e956bd1..178a5bda3161 100644
--- a/xmloff/source/token/tokens.txt
+++ b/xmloff/source/token/tokens.txt
@@ -1806,6 +1806,7 @@ text-autospace
text-background-color
text-blinking
text-box
+text-color
text-combine
text-combine-end-char
text-combine-start-char
@@ -1999,6 +2000,7 @@ white
whole-page
widows
width
+window-font-color
word
word-count
wrap
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 8b4d8a9143b5..1e6b3f4a876e 100644
--- a/xmlsecurity/inc/biginteger.hxx
+++ b/xmlsecurity/inc/biginteger.hxx
@@ -32,8 +32,17 @@ 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);
+ 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/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 df8ff85258b3..5bacc6cee249 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 59759e70999b..6ef8c1d875ee 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -651,9 +651,18 @@ sal_Bool DocumentDigitalSignatures::isAuthorTrusted(
Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors();
return std::any_of(aTrustedAuthors.begin(), aTrustedAuthors.end(),
- [&xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) {
- return xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->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/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/ooxmlsecparser.hxx b/xmlsecurity/source/helper/ooxmlsecparser.hxx
index 540028b22fc9..bb27a219ea28 100644
--- a/xmlsecurity/source/helper/ooxmlsecparser.hxx
+++ b/xmlsecurity/source/helper/ooxmlsecparser.hxx
@@ -17,6 +17,8 @@
#include <xmloff/nmspmap.hxx>
+#include <memory>
+#include <optional>
#include <stack>
class XSecController;
diff --git a/xmlsecurity/source/helper/xmlsignaturehelper.cxx b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
index bcb79039e342..cdf7d802664d 100644
--- a/xmlsecurity/source/helper/xmlsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/xmlsignaturehelper.cxx
@@ -44,6 +44,7 @@
#include <comphelper/ofopxmlhelper.hxx>
#include <comphelper/sequence.hxx>
#include <tools/diagnose_ex.h>
+#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <optional>
@@ -605,7 +606,7 @@ static auto CheckX509Data(
start = i; // issuer isn't in the list
break;
}
- if (xmlsecurity::EqualDistinguishedNames(certs[i]->getIssuerName(), certs[j]->getSubjectName()))
+ if (xmlsecurity::EqualDistinguishedNames(certs[i]->getIssuerName(), certs[j]->getSubjectName(), xmlsecurity::NOCOMPAT))
{
if (i == j) // self signed
{
@@ -638,7 +639,7 @@ static auto CheckX509Data(
if (chain[i] != j)
{
if (xmlsecurity::EqualDistinguishedNames(
- certs[chain[i]]->getSubjectName(), certs[j]->getIssuerName()))
+ certs[chain[i]]->getSubjectName(), certs[j]->getIssuerName(), xmlsecurity::NOCOMPAT))
{
if (chain.size() != i + 1) // already found issuee?
{
diff --git a/xmlsecurity/source/helper/xsecparser.hxx b/xmlsecurity/source/helper/xsecparser.hxx
index 7674bf28b84d..3abaf7c7e8be 100644
--- a/xmlsecurity/source/helper/xsecparser.hxx
+++ b/xmlsecurity/source/helper/xsecparser.hxx
@@ -27,6 +27,8 @@
#include <xmloff/nmspmap.hxx>
+#include <memory>
+#include <optional>
#include <stack>
class XMLSignatureHelper;
diff --git a/xmlsecurity/source/helper/xsecverify.cxx b/xmlsecurity/source/helper/xsecverify.cxx
index 89141ed1dfd4..1b34afef6c2a 100644
--- a/xmlsecurity/source/helper/xsecverify.cxx
+++ b/xmlsecurity/source/helper/xsecverify.cxx
@@ -271,7 +271,7 @@ void XSecController::setX509Data(
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)
+ return xmlsecurity::EqualDistinguishedNames(issuerName, rX509IssuerSerial.first, xmlsecurity::COMPAT_2ND)
&& serialNumber == rX509IssuerSerial.second;
});
if (iter != rX509IssuerSerials.end())
@@ -418,7 +418,7 @@ void XSecController::setX509CertDigest(
{
for (auto & it : rData)
{
- if (xmlsecurity::EqualDistinguishedNames(it.X509IssuerName, rX509IssuerName)
+ if (xmlsecurity::EqualDistinguishedNames(it.X509IssuerName, rX509IssuerName, xmlsecurity::COMPAT_BOTH)
&& it.X509SerialNumber == rX509SerialNumber)
{
it.CertDigest = rCertDigest;
@@ -441,7 +441,7 @@ void XSecController::setX509CertDigest(
{
SAL_INFO("xmlsecurity.helper", "cannot parse X509Certificate");
}
- else if (xmlsecurity::EqualDistinguishedNames(xCert->getIssuerName(),rX509IssuerName)
+ else if (xmlsecurity::EqualDistinguishedNames(xCert->getIssuerName(), rX509IssuerName, xmlsecurity::COMPAT_2ND)
&& xmlsecurity::bigIntegerToNumericString(xCert->getSerialNumber()) == rX509SerialNumber)
{
it.CertDigest = rCertDigest;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 4031df289f44..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
@@ -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.");
diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
index 244cd46ac564..da64b6c7e4c2 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx
@@ -32,6 +32,7 @@
#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>
@@ -652,6 +653,67 @@ Sequence<OUString> SAL_CALL X509Certificate_MSCryptImpl::getSupportedServiceName
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;
@@ -674,22 +736,38 @@ static bool EncodeDistinguishedName(OUString const& rName, CERT_NAME_BLOB & rBlo
}
bool EqualDistinguishedNames(
- OUString const& rName1, OUString const& rName2)
+ 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;
- if (!EncodeDistinguishedName(rName2, blob2))
+ bool ret(false);
+ if (!!EncodeDistinguishedName(rName2, blob2))
{
- delete[] blob1.pbData;
- return false;
+ 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;
}
- bool const ret(CertCompareCertificateName(X509_ASN_ENCODING,
- &blob1, &blob2) == TRUE);
- delete[] blob2.pbData;
delete[] blob1.pbData;
return ret;
}
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index db400e6f1ed9..6e4ca3d4e2c0 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -229,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
diff --git a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
index d6143a81883c..39d4b4ee87eb 100644
--- a/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx
@@ -29,6 +29,8 @@
#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>
@@ -536,22 +538,103 @@ Sequence<OUString> SAL_CALL X509Certificate_NssImpl::getSupportedServiceNames()
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)
+ 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()));
- if (pName2 == nullptr)
+ bool ret(false);
+ if (pName2)
{
- CERT_DestroyName(pName1);
- return false;
+ 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);
}
- bool const ret(CERT_CompareName(pName1, pName2) == SECEqual);
- CERT_DestroyName(pName2);
CERT_DestroyName(pName1);
return ret;
}
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index 9d2a5251026a..6f70f76d23be 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -244,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 );
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() ;