summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore5
-rw-r--r--RepositoryExternal.mk38
-rwxr-xr-xbin/pack-debug20
-rw-r--r--chart2/qa/extras/chart2import.cxx2
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx4
-rw-r--r--chart2/source/controller/main/ChartWindow.cxx8
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx7
-rw-r--r--comphelper/qa/unit/test_traceevent.cxx67
-rw-r--r--comphelper/source/misc/lok.cxx13
-rw-r--r--comphelper/source/misc/traceevent.cxx23
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac66
-rw-r--r--connectivity/Library_mysqlc.mk1
-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/parse/sqlbison.y6
-rw-r--r--cui/source/inc/grfpage.hxx3
-rw-r--r--cui/source/tabpages/grfpage.cxx32
-rw-r--r--desktop/inc/lib/init.hxx39
-rw-r--r--desktop/qa/data/table-selection.odtbin0 -> 10324 bytes
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx124
-rw-r--r--desktop/source/app/cmdlineargs.cxx10
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx36
-rw-r--r--desktop/source/lib/init.cxx522
-rw-r--r--download.lst72
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx31
-rw-r--r--editeng/source/editeng/editview.cxx12
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx14
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx60
-rw-r--r--embeddedobj/source/commonembedding/specialobject.cxx9
-rw-r--r--embeddedobj/source/inc/commonembobj.hxx3
-rw-r--r--embeddedobj/source/inc/specialobject.hxx6
-rw-r--r--external/boost/UnpackedTarball_boost.mk2
-rw-r--r--external/boost/boost.between.warning.patch13
-rw-r--r--external/boost/boost.fallback.encoding.patch13
-rw-r--r--external/curl/ExternalPackage_curl.mk4
-rw-r--r--external/curl/ExternalProject_curl.mk12
-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-ios.patch.117
-rw-r--r--external/curl/curl-msvc-disable-protocols.patch.19
-rw-r--r--external/curl/curl-msvc-zlib.patch.116
-rw-r--r--external/curl/curl-msvc.patch.14
-rw-r--r--external/curl/curl-nss.patch.115
-rw-r--r--external/curl/zlib.patch.024
-rw-r--r--external/expat/expat-winapi.patch26
-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.mk2
-rw-r--r--external/libetonyek/0001-fix-build-with-MSVC.patch.128
-rw-r--r--external/libetonyek/0002-fix-build-with-MSVC.patch.155
-rw-r--r--external/libetonyek/Library_etonyek.mk1
-rw-r--r--external/libetonyek/UnpackedTarball_libetonyek.mk2
-rw-r--r--external/libetonyek/libetonyek-bundled-soname.patch.03
-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/libmwaw/Library_mwaw.mk4
-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/libxml2/ExternalPackage_libxml2.mk2
-rw-r--r--external/libxml2/UnpackedTarball_libxml2.mk3
-rw-r--r--external/libxml2/libxml2-android.patch6
-rw-r--r--external/libxml2/libxml2-config.patch.143
-rw-r--r--external/libxml2/xml2-config.in28
-rw-r--r--external/libxslt/UnpackedTarball_libxslt.mk1
-rw-r--r--external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.169
-rw-r--r--external/libxslt/rpath.patch.02
-rw-r--r--external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk17
-rw-r--r--external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk22
-rw-r--r--external/nss/ExternalProject_nss.mk15
-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/nsinstall.py12
-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.patch6
-rw-r--r--external/nss/nss-restore-manual-pre-dependencies.patch.183
-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.getopt.patch.025
-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.patch20
-rw-r--r--external/nss/ubsan.patch.02
-rw-r--r--external/openldap/openldap-2.4.44.patch.112
-rw-r--r--external/openssl/ExternalPackage_openssl.mk12
-rw-r--r--external/openssl/ExternalProject_openssl.mk15
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk12
-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/poppler/StaticLibrary_poppler.mk7
-rw-r--r--external/poppler/UnpackedTarball_poppler.mk2
-rw-r--r--external/poppler/disable-freetype.patch.141
-rw-r--r--external/poppler/gcc7-EntityInfo.patch.148
-rw-r--r--external/poppler/poppler-config.patch.169
-rw-r--r--external/postgresql/ExternalPackage_postgresql.mk16
-rw-r--r--external/postgresql/ExternalProject_postgresql.mk21
-rw-r--r--external/postgresql/Module_postgresql.mk6
-rw-r--r--external/postgresql/UnpackedTarball_postgresql.mk17
-rw-r--r--external/postgresql/arm64.patch.153
-rw-r--r--external/postgresql/config.pl1
-rw-r--r--external/postgresql/internal-zlib.patch.129
-rw-r--r--external/postgresql/postgres-msvc-build.patch.1110
-rw-r--r--external/postgresql/postgresql-9.2.1-libreoffice.patch74
-rw-r--r--external/postgresql/postgresql-libs-leak.patch40
-rw-r--r--external/python3/ExternalPackage_python3.mk356
-rw-r--r--external/python3/ExternalProject_python3.mk49
-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/macos-11.patch.058
-rw-r--r--external/python3/python-3.3.0-clang.patch.113
-rw-r--r--external/python3/python-3.3.0-darwin.patch.120
-rw-r--r--external/python3/python-3.3.3-disable-obmalloc.patch.04
-rw-r--r--external/python3/python-3.3.3-elf-rpath.patch.112
-rw-r--r--external/python3/python-3.5.4-msvc-disable.patch.18
-rw-r--r--external/python3/python-3.5.tweak.strip.soabi.patch2
-rw-r--r--external/python3/python-3.7.6-msvc-ssl.patch.127
-rw-r--r--external/python3/ubsan.patch.023
-rw-r--r--external/zlib/UnpackedTarball_zlib.mk4
-rw-r--r--external/zlib/ubsan.patch11
-rw-r--r--filter/qa/unit/data/attributeRedefinedTest.odpbin0 -> 12610 bytes
-rw-r--r--filter/qa/unit/data/empty.doc0
-rw-r--r--filter/qa/unit/svg.cxx42
-rw-r--r--filter/qa/unit/textfilterdetect.cxx20
-rw-r--r--filter/source/config/fragments/types/writer_T602_Document.xcu2
-rw-r--r--filter/source/storagefilterdetect/filterdetect.cxx7
-rw-r--r--filter/source/svg/presentation_engine.js291
-rw-r--r--filter/source/svg/svgexport.cxx12
-rw-r--r--filter/source/svg/svgfilter.cxx10
-rw-r--r--filter/source/svg/svgfilter.hxx1
-rw-r--r--filter/source/svg/svgwriter.cxx39
-rw-r--r--filter/source/svg/svgwriter.hxx2
-rw-r--r--filter/source/textfilterdetect/filterdetect.cxx13
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.cxx26
-rw-r--r--filter/source/xsltfilter/LibXSLTTransformer.hxx3
-rw-r--r--formula/source/core/api/token.cxx13
-rw-r--r--fpicker/source/office/fileview.cxx10
-rw-r--r--framework/source/helper/statusindicator.cxx2
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx8
-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--include/LibreOfficeKit/LibreOfficeKit.h5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKit.hxx5
-rw-r--r--include/LibreOfficeKit/LibreOfficeKitEnums.h15
-rw-r--r--include/comphelper/lok.hxx8
-rw-r--r--include/comphelper/profilezone.hxx16
-rw-r--r--include/comphelper/traceevent.hxx76
-rw-r--r--include/o3tl/safeint.hxx8
-rw-r--r--include/oox/core/contexthandler2.hxx19
-rw-r--r--include/oox/core/fragmenthandler2.hxx11
-rw-r--r--include/oox/drawingml/graphicshapecontext.hxx1
-rw-r--r--include/oox/drawingml/shape.hxx1
-rw-r--r--include/oox/export/drawingml.hxx37
-rw-r--r--include/oox/export/shapes.hxx2
-rw-r--r--include/oox/ole/oleobjecthelper.hxx1
-rw-r--r--include/oox/ppt/pptshape.hxx9
-rw-r--r--include/oox/vml/vmlshape.hxx6
-rw-r--r--include/rtl/xmlencode.hxx55
-rw-r--r--include/sfx2/dinfdlg.hxx4
-rw-r--r--include/sfx2/lokhelper.hxx8
-rw-r--r--include/sfx2/objsh.hxx2
-rw-r--r--include/sfx2/sfxsids.hrc2
-rw-r--r--include/sfx2/strings.hrc2
-rw-r--r--include/sfx2/tabdlg.hxx8
-rw-r--r--include/sfx2/viewfrm.hxx1
-rw-r--r--include/sfx2/viewsh.hxx6
-rw-r--r--include/svl/style.hxx2
-rw-r--r--include/svl/zforlist.hxx2
-rw-r--r--include/svx/GenericCheckDialog.hxx83
-rw-r--r--include/svx/strings.hrc7
-rw-r--r--include/svx/svdedtv.hxx1
-rw-r--r--include/svx/svdedxv.hxx67
-rw-r--r--include/svx/svdmodel.hxx2
-rw-r--r--include/svx/svdoole2.hxx17
-rw-r--r--include/svx/unoshape.hxx2
-rw-r--r--include/vcl/BitmapTools.hxx5
-rw-r--r--include/vcl/customweld.hxx1
-rw-r--r--include/vcl/fixed.hxx2
-rw-r--r--include/vcl/outdev.hxx2
-rw-r--r--include/vcl/salvtables.hxx17
-rw-r--r--include/vcl/transfer.hxx4
-rw-r--r--include/vcl/weld.hxx2
-rw-r--r--instsetoo_native/CustomTarget_install.mk1
-rw-r--r--instsetoo_native/inc_openoffice/unix/find-requires-x11.sh4
-rw-r--r--instsetoo_native/util/openoffice.lst.in2
-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--libreofficekit/source/gtk/lokdocview.cxx2
-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--offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl25
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu8
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs16
-rw-r--r--oox/inc/drawingml/customshapeproperties.hxx6
-rw-r--r--oox/inc/drawingml/textbody.hxx19
-rw-r--r--oox/inc/drawingml/textcharacterproperties.hxx4
-rw-r--r--oox/inc/drawingml/textfield.hxx13
-rw-r--r--oox/inc/drawingml/textliststyle.hxx10
-rw-r--r--oox/inc/drawingml/textparagraph.hxx11
-rw-r--r--oox/inc/drawingml/textrun.hxx6
-rwxr-xr-xoox/qa/unit/data/camera-rotation-revolution-nonwps.pptxbin0 -> 31425 bytes
-rwxr-xr-xoox/qa/unit/data/endParaRPr-newline-textsize.pptxbin0 -> 13349 bytes
-rwxr-xr-xoox/qa/unit/data/testTdf132557_footerCustomShapes.pptxbin0 -> 20137 bytes
-rw-r--r--oox/qa/unit/data/watermark.docxbin0 -> 21621 bytes
-rw-r--r--oox/qa/unit/drawingml.cxx55
-rw-r--r--oox/qa/unit/vml.cxx22
-rw-r--r--oox/source/core/contexthandler2.cxx85
-rw-r--r--oox/source/core/fragmenthandler2.cxx70
-rw-r--r--oox/source/docprop/ooxmldocpropimport.cxx89
-rw-r--r--oox/source/docprop/ooxmldocpropimport.hxx6
-rw-r--r--oox/source/drawingml/customshapeproperties.cxx7
-rw-r--r--oox/source/drawingml/graphicshapecontext.cxx11
-rw-r--r--oox/source/drawingml/shape.cxx11
-rw-r--r--oox/source/drawingml/textbody.cxx22
-rw-r--r--oox/source/drawingml/textbodycontext.cxx5
-rw-r--r--oox/source/drawingml/textcharacterpropertiescontext.cxx26
-rw-r--r--oox/source/drawingml/textfield.cxx142
-rw-r--r--oox/source/drawingml/textliststyle.cxx2
-rw-r--r--oox/source/drawingml/textliststylecontext.cxx1
-rw-r--r--oox/source/drawingml/textparagraph.cxx11
-rw-r--r--oox/source/export/drawingml.cxx209
-rw-r--r--oox/source/export/shapes.cxx8
-rw-r--r--oox/source/ppt/pptshape.cxx128
-rw-r--r--oox/source/ppt/pptshapepropertiescontext.cxx5
-rw-r--r--oox/source/vml/vmlshape.cxx7
-rw-r--r--oox/source/vml/vmlshapecontext.cxx28
-rw-r--r--postprocess/CustomTarget_signing.mk8
-rw-r--r--pyuno/CustomTarget_python_shell.mk2
-rw-r--r--pyuno/CustomTarget_pyuno_pythonloader_ini.mk6
-rw-r--r--pyuno/source/loader/pythonloader.py4
-rw-r--r--sc/inc/document.hxx5
-rw-r--r--sc/inc/documentimport.hxx2
-rw-r--r--sc/inc/dragdata.hxx7
-rw-r--r--sc/inc/fillinfo.hxx1
-rw-r--r--sc/inc/table.hxx2
-rw-r--r--sc/inc/unonames.hxx1
-rw-r--r--sc/qa/unit/data/xlsx/autofilternamedrange.xlsxbin0 -> 9685 bytes
-rw-r--r--sc/qa/unit/data/xlsx/escape-unicode.xlsxbin0 -> 6435 bytes
-rw-r--r--sc/qa/unit/subsequent_filters-test.cxx35
-rw-r--r--sc/qa/unit/tiledrendering/tiledrendering.cxx183
-rw-r--r--sc/qa/unit/ucalc.cxx19
-rw-r--r--sc/source/core/data/colorscale.cxx6
-rw-r--r--sc/source/core/data/column2.cxx5
-rw-r--r--sc/source/core/data/column3.cxx28
-rw-r--r--sc/source/core/data/column4.cxx9
-rw-r--r--sc/source/core/data/dociter.cxx8
-rw-r--r--sc/source/core/data/documen2.cxx1
-rw-r--r--sc/source/core/data/document.cxx12
-rw-r--r--sc/source/core/data/documentimport.cxx14
-rw-r--r--sc/source/core/data/global.cxx3
-rw-r--r--sc/source/core/data/postit.cxx4
-rw-r--r--sc/source/core/data/table2.cxx15
-rw-r--r--sc/source/core/inc/interpre.hxx12
-rw-r--r--sc/source/core/tool/compiler.cxx9
-rw-r--r--sc/source/core/tool/interpr1.cxx239
-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.cxx3
-rw-r--r--sc/source/filter/inc/workbookhelper.hxx4
-rw-r--r--sc/source/filter/lotus/op.cxx11
-rw-r--r--sc/source/filter/oox/defnamesbuffer.cxx11
-rw-r--r--sc/source/filter/oox/richstring.cxx112
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx16
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx12
-rw-r--r--sc/source/filter/oox/workbookhelper.cxx25
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx6
-rw-r--r--sc/source/ui/app/scmod.cxx32
-rw-r--r--sc/source/ui/dbgui/csvgrid.cxx3
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx24
-rw-r--r--sc/source/ui/docshell/docfunc.cxx3
-rw-r--r--sc/source/ui/docshell/docsh.cxx29
-rw-r--r--sc/source/ui/docshell/documentlinkmgr.cxx9
-rw-r--r--sc/source/ui/drawfunc/fusel.cxx3
-rw-r--r--sc/source/ui/inc/drawview.hxx4
-rw-r--r--sc/source/ui/inc/scuiasciiopt.hxx4
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/unoobj/confuno.cxx14
-rw-r--r--sc/source/ui/unoobj/docuno.cxx19
-rw-r--r--sc/source/ui/view/cellsh.cxx3
-rw-r--r--sc/source/ui/view/cellsh2.cxx49
-rw-r--r--sc/source/ui/view/dbfunc3.cxx10
-rw-r--r--sc/source/ui/view/drawview.cxx9
-rw-r--r--sc/source/ui/view/gridwin.cxx18
-rw-r--r--sc/source/ui/view/gridwin2.cxx3
-rw-r--r--sc/source/ui/view/gridwin4.cxx107
-rw-r--r--sc/source/ui/view/gridwin5.cxx4
-rw-r--r--sc/source/ui/view/output.cxx82
-rw-r--r--sc/source/ui/view/tabview.cxx2
-rw-r--r--sc/source/ui/view/tabview3.cxx8
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx11
-rw-r--r--sc/source/ui/view/viewdata.cxx40
-rw-r--r--sc/source/ui/view/viewfun3.cxx9
-rw-r--r--sc/source/ui/view/viewfun5.cxx28
-rw-r--r--sc/source/ui/view/viewfunc.cxx19
-rw-r--r--sc/uiconfig/scalc/ui/textimportcsv.ui45
-rw-r--r--scripting/source/pyprov/pythonscript.py8
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/inc/drawdoc.hxx5
-rw-r--r--sd/qa/unit/data/odp/numfmt.odpbin10608 -> 11438 bytes
-rw-r--r--sd/qa/unit/data/pptx/numfmt.pptxbin41105 -> 44390 bytes
-rw-r--r--sd/qa/unit/data/pptx/pass/ofz35597-1.pptxbin0 -> 23316 bytes
-rw-r--r--sd/qa/unit/data/pptx/slidenum_field.pptxbin34130 -> 32715 bytes
-rw-r--r--sd/qa/unit/data/pptx/tdf142716.pptxbin0 -> 23281 bytes
-rw-r--r--sd/qa/unit/data/pptx/tdf143222.pptxbin0 -> 53172 bytes
-rwxr-xr-xsd/qa/unit/data/pptx/tdf59323.pptxbin0 -> 39322 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx103
-rw-r--r--sd/qa/unit/export-tests.cxx18
-rw-r--r--sd/qa/unit/import-tests.cxx2
-rw-r--r--sd/qa/unit/misc-tests.cxx34
-rw-r--r--sd/qa/unit/tiledrendering/data/TextBoxAndRect.odgbin0 -> 10474 bytes
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx355
-rw-r--r--sd/sdi/_drvwsh.sdi5
-rw-r--r--sd/sdi/sdraw.sdi2
-rw-r--r--sd/source/core/drawdoc.cxx1
-rw-r--r--sd/source/filter/eppt/epptooxml.hxx13
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx327
-rw-r--r--sd/source/filter/html/htmlex.cxx5
-rw-r--r--sd/source/filter/pdf/sdpdffilter.cxx5
-rw-r--r--sd/source/ui/inc/View.hxx3
-rw-r--r--sd/source/ui/inc/tools/GraphicSizeCheck.hxx103
-rw-r--r--sd/source/ui/inc/unomodel.hxx1
-rw-r--r--sd/source/ui/sidebar/SlideBackground.cxx16
-rw-r--r--sd/source/ui/tools/GraphicSizeCheck.cxx211
-rw-r--r--sd/source/ui/unoidl/UnoDocumentSettings.cxx20
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx43
-rw-r--r--sd/source/ui/view/drviews1.cxx4
-rw-r--r--sd/source/ui/view/drviews2.cxx12
-rw-r--r--sd/source/ui/view/drviewsj.cxx4
-rw-r--r--sd/source/ui/view/sdview.cxx10
-rw-r--r--sd/source/ui/view/sdview4.cxx39
-rw-r--r--sd/source/ui/view/sdwindow.cxx11
-rw-r--r--sd/uiconfig/sdraw/menubar/menubar.xml1
-rw-r--r--sd/uiconfig/simpress/menubar/menubar.xml1
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar.ui38
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_compact.ui26
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui12
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui20
-rw-r--r--sd/uiconfig/simpress/ui/notebookbar_single.ui8
-rw-r--r--sd/uiconfig/simpress/ui/sidebarslidebackground.ui2
-rw-r--r--sdext/Executable_xpdfimport.mk4
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx52
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx57
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx10
-rw-r--r--setup_native/source/packinfo/finals_instsetoo.txt (renamed from setup_native/source/packinfo/finals_instsetoo.txt.in)1
-rw-r--r--sfx2/source/appl/appserv.cxx3
-rw-r--r--sfx2/source/appl/macroloader.cxx9
-rw-r--r--sfx2/source/control/unoctitm.cxx17
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx59
-rw-r--r--sfx2/source/doc/iframe.cxx80
-rw-r--r--sfx2/source/doc/objserv.cxx27
-rw-r--r--sfx2/source/doc/objstor.cxx25
-rw-r--r--sfx2/source/inc/macroloader.hxx2
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx3
-rw-r--r--sfx2/source/view/lokhelper.cxx50
-rw-r--r--sfx2/source/view/viewfrm.cxx40
-rw-r--r--sfx2/source/view/viewsh.cxx22
-rw-r--r--sfx2/uiconfig/ui/documentinfopage.ui342
-rw-r--r--shell/source/win32/SysShExec.cxx8
-rw-r--r--solenv/bin/modules/installer/download.pm2
-rw-r--r--solenv/bin/modules/installer/epmfile.pm6
-rw-r--r--solenv/bin/modules/installer/globals.pm4
-rw-r--r--solenv/bin/modules/installer/helppack.pm2
-rw-r--r--solenv/bin/modules/installer/languagepack.pm2
-rw-r--r--solenv/bin/modules/installer/parameter.pm2
-rw-r--r--solenv/bin/modules/installer/simplepackage.pm4
-rw-r--r--solenv/bin/modules/installer/windows/admin.pm3
-rw-r--r--solenv/bin/modules/installer/windows/msp.pm2
-rw-r--r--solenv/bin/modules/installer/worker.pm2
-rw-r--r--solenv/clang-format/blacklist1
-rw-r--r--solenv/flatpak-manifest.in25
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk2
-rw-r--r--solenv/gbuild/platform/solaris.mk2
-rw-r--r--solenv/gbuild/platform/unxgcc.mk2
-rw-r--r--solenv/gdb/boost/util/printing.py2
-rw-r--r--solenv/gdb/libreoffice/util/printing.py2
-rw-r--r--svl/source/config/languageoptions.cxx2
-rw-r--r--svl/source/items/style.cxx24
-rw-r--r--svl/source/numbers/zforlist.cxx8
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx166
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.hxx69
-rw-r--r--svtools/source/dialogs/ServerDetailsControls.cxx2
-rw-r--r--svtools/source/misc/langtab.cxx13
-rw-r--r--svtools/source/svhtml/parhtml.cxx6
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx25
-rw-r--r--svx/Library_svx.mk1
-rw-r--r--svx/UIConfig_svx.mk2
-rw-r--r--svx/sdi/svx.sdi19
-rw-r--r--svx/source/dialog/GenericCheckDialog.cxx70
-rw-r--r--svx/source/svdraw/sdrpagewindow.cxx2
-rw-r--r--svx/source/svdraw/svddrgmt.cxx2
-rw-r--r--svx/source/svdraw/svdedtv.cxx10
-rw-r--r--svx/source/svdraw/svdedtv1.cxx24
-rw-r--r--svx/source/svdraw/svdedxv.cxx431
-rw-r--r--svx/source/svdraw/svdmrkv.cxx10
-rw-r--r--svx/source/svdraw/svdoole2.cxx104
-rw-r--r--svx/source/svdraw/svdpntv.cxx7
-rw-r--r--svx/source/svdraw/svdview.cxx20
-rw-r--r--svx/source/svdraw/svdxcgv.cxx5
-rw-r--r--svx/source/tbxctrls/fontworkgallery.cxx2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx2
-rw-r--r--svx/source/unodraw/shapeimpl.hxx5
-rw-r--r--svx/source/unodraw/unoshap2.cxx3
-rw-r--r--svx/source/unodraw/unoshap4.cxx23
-rw-r--r--svx/uiconfig/ui/genericcheckdialog.ui132
-rw-r--r--svx/uiconfig/ui/genericcheckentry.ui56
-rw-r--r--sw/CppunitTest_sw_core_attr.mk74
-rw-r--r--sw/CppunitTest_sw_core_edit.mk74
-rw-r--r--sw/CppunitTest_sw_core_text.mk2
-rw-r--r--sw/Library_sw.mk2
-rw-r--r--sw/Module_sw.mk2
-rw-r--r--sw/inc/IDocumentContentOperations.hxx6
-rw-r--r--sw/inc/IDocumentMarkAccess.hxx5
-rw-r--r--sw/inc/IDocumentSettingAccess.hxx3
-rw-r--r--sw/inc/cmdid.h3
-rw-r--r--sw/inc/deletelistener.hxx92
-rw-r--r--sw/inc/expfld.hxx6
-rw-r--r--sw/inc/ndole.hxx4
-rw-r--r--sw/inc/unoprnms.hxx1
-rw-r--r--sw/inc/unosett.hxx5
-rw-r--r--sw/qa/core/attr/attr.cxx64
-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
-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/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/doc.cxx32
-rw-r--r--sw/qa/core/edit/data/redline-hidden.fodt32
-rw-r--r--sw/qa/core/edit/edit.cxx56
-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.cxx47
-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/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/tdf147485-forcepoint.docbin0 -> 62544 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx83
-rw-r--r--sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odtbin0 -> 11544 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx10
-rw-r--r--sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt120
-rw-r--r--sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt120
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx28
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf104823.docxbin0 -> 21260 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf137466.docxbin0 -> 20243 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81507.docxbin0 -> 20183 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/ooxmlexport15.cxx37
-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/ooxmlfieldexport.cxx91
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlw14export.cxx2
-rw-r--r--sw/qa/extras/tiledrendering/data/shape.fodt20
-rw-r--r--sw/qa/extras/tiledrendering/tiledrendering.cxx196
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx4
-rw-r--r--sw/qa/extras/unowriter/unowriter.cxx33
-rw-r--r--sw/sdi/_basesh.sdi7
-rw-r--r--sw/source/core/attr/swatrset.cxx3
-rw-r--r--sw/source/core/crsr/crsrsh.cxx77
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx48
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx3
-rw-r--r--sw/source/core/doc/docbm.cxx22
-rw-r--r--sw/source/core/doc/extinput.cxx30
-rw-r--r--sw/source/core/draw/dview.cxx10
-rw-r--r--sw/source/core/edit/edatmisc.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx1
-rw-r--r--sw/source/core/fields/expfld.cxx7
-rw-r--r--sw/source/core/frmedt/feshview.cxx8
-rw-r--r--sw/source/core/graphic/GraphicSizeCheck.cxx163
-rw-r--r--sw/source/core/inc/DocumentContentOperationsManager.hxx6
-rw-r--r--sw/source/core/inc/DocumentSettingManager.hxx9
-rw-r--r--sw/source/core/inc/GraphicSizeCheck.hxx99
-rw-r--r--sw/source/core/inc/MarkManager.hxx2
-rw-r--r--sw/source/core/inc/ModelTraverser.hxx51
-rw-r--r--sw/source/core/inc/dview.hxx4
-rw-r--r--sw/source/core/inc/frame.hxx11
-rw-r--r--sw/source/core/inc/layact.hxx8
-rw-r--r--sw/source/core/inc/rootfrm.hxx2
-rw-r--r--sw/source/core/inc/unofldmid.h1
-rw-r--r--sw/source/core/layout/ftnfrm.cxx3
-rw-r--r--sw/source/core/layout/layact.cxx68
-rw-r--r--sw/source/core/layout/newfrm.cxx3
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx56
-rw-r--r--sw/source/core/layout/pagechg.cxx5
-rw-r--r--sw/source/core/layout/sectfrm.cxx3
-rw-r--r--sw/source/core/layout/tabfrm.cxx74
-rw-r--r--sw/source/core/layout/wsfrm.cxx2
-rw-r--r--sw/source/core/model/ModelTraverser.cxx61
-rw-r--r--sw/source/core/ole/ndole.cxx89
-rw-r--r--sw/source/core/table/swtable.cxx15
-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.cxx13
-rw-r--r--sw/source/core/text/porlay.cxx4
-rw-r--r--sw/source/core/text/txtfrm.cxx8
-rw-r--r--sw/source/core/undo/unbkmk.cxx2
-rw-r--r--sw/source/core/undo/undobj.cxx13
-rw-r--r--sw/source/core/unocore/unoframe.cxx16
-rw-r--r--sw/source/core/unocore/unomap.cxx1
-rw-r--r--sw/source/core/unocore/unomap1.cxx1
-rw-r--r--sw/source/core/unocore/unosett.cxx22
-rw-r--r--sw/source/core/view/viewsh.cxx10
-rw-r--r--sw/source/filter/html/css1atr.cxx3
-rw-r--r--sw/source/filter/html/htmlfldw.cxx3
-rw-r--r--sw/source/filter/html/htmlplug.cxx7
-rw-r--r--sw/source/filter/html/htmltab.cxx32
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx754
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx68
-rw-r--r--sw/source/filter/ww8/docxexport.cxx133
-rw-r--r--sw/source/filter/ww8/docxexport.hxx16
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx28
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-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/xmltbli.cxx2
-rw-r--r--sw/source/filter/xml/xmltexti.cxx9
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx29
-rw-r--r--sw/source/ui/fldui/fldtdlg.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmdlg.cxx7
-rw-r--r--sw/source/ui/misc/bookmark.cxx2
-rw-r--r--sw/source/uibase/config/StoredChapterNumbering.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarScrollBar.cxx3
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx3
-rw-r--r--sw/source/uibase/docvw/edtwin.cxx8
-rw-r--r--sw/source/uibase/shells/basesh.cxx17
-rw-r--r--sw/source/uibase/shells/textsh1.cxx8
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx5
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx51
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx17
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx5
-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/wrtsh1.cxx19
-rw-r--r--sw/uiconfig/sglobal/menubar/menubar.xml1
-rw-r--r--sw/uiconfig/swriter/menubar/menubar.xml1
-rw-r--r--sysui/desktop/freedesktop/freedesktop-menus.spec2
-rw-r--r--test/source/xmltesttools.cxx2
-rw-r--r--tools/qa/cppunit/test_json_writer.cxx2
-rw-r--r--tools/source/generic/gen.cxx8
-rw-r--r--tools/source/generic/poly.cxx2
-rw-r--r--tools/source/misc/json_writer.cxx13
m---------translations0
-rw-r--r--unoxml/source/xpath/xpathobject.cxx2
-rw-r--r--uui/source/iahndl-authentication.cxx5
-rw-r--r--vcl/Library_vcl.mk2
-rw-r--r--vcl/inc/jsdialog/enabled.hxx20
-rw-r--r--vcl/inc/jsdialog/jsdialogbuilder.hxx9
-rw-r--r--vcl/inc/pdf/PdfConfig.hxx18
-rw-r--r--vcl/jsdialog/enabled.cxx75
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx48
-rw-r--r--vcl/qa/cppunit/graphicfilter/data/bmp/pass/crash-1.bmp (renamed from vcl/qa/cppunit/graphicfilter/data/bmp/fail/crash-1.bmp)bin632 -> 632 bytes
-rw-r--r--vcl/qa/cppunit/pdfexport/data/pdf-image-annots.odgbin0 -> 29714 bytes
-rw-r--r--vcl/qa/cppunit/pdfexport/data/pdf-image-hyperlink.odgbin0 -> 28633 bytes
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx111
-rw-r--r--vcl/source/app/salvtables.cxx70
-rw-r--r--vcl/source/bitmap/BitmapScaleSuperFilter.cxx5
-rw-r--r--vcl/source/control/fixed.cxx25
-rw-r--r--vcl/source/filter/ipdf/pdfread.cxx20
-rw-r--r--vcl/source/fontsubset/sft.cxx12
-rw-r--r--vcl/source/fontsubset/ttcr.cxx36
-rw-r--r--vcl/source/gdi/bmpacc.cxx2
-rw-r--r--vcl/source/gdi/dibtools.cxx34
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx115
-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/textline.cxx108
-rw-r--r--vcl/source/pdf/PdfConfig.cxx32
-rw-r--r--vcl/source/uitest/uiobject.cxx2
-rw-r--r--vcl/source/window/builder.cxx57
-rw-r--r--vcl/source/window/dialog.cxx25
-rw-r--r--vcl/source/window/dockwin.cxx5
-rw-r--r--vcl/source/window/event.cxx3
-rw-r--r--vcl/source/window/floatwin.cxx5
-rw-r--r--vcl/source/window/layout.cxx8
-rw-r--r--vcl/source/window/mouse.cxx6
-rw-r--r--vcl/source/window/paint.cxx19
-rw-r--r--vcl/source/window/window.cxx10
-rw-r--r--vcl/source/window/window2.cxx10
-rw-r--r--vcl/source/window/winproc.cxx34
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx49
-rw-r--r--vcl/unx/gtk3/gtk3gtkinst.cxx2
-rw-r--r--wizards/source/access2base/DoCmd.xba2
-rw-r--r--writerfilter/inc/dmapper/resourcemodel.hxx7
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx157
-rw-r--r--writerfilter/source/dmapper/DomainMapper.hxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableManager.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx13
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx9
-rw-r--r--writerfilter/source/dmapper/LoggedResources.hxx2
-rw-r--r--writerfilter/source/dmapper/SdtHelper.cxx183
-rw-r--r--writerfilter/source/dmapper/SdtHelper.hxx59
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx1
-rw-r--r--writerfilter/source/ooxml/model.xml34
-rw-r--r--xmloff/source/draw/ximpshap.cxx33
-rw-r--r--xmloff/source/draw/ximpshap.hxx2
-rw-r--r--xmlsecurity/inc/certificateviewer.hxx2
-rw-r--r--xmlsecurity/inc/digitalsignaturesdialog.hxx5
-rw-r--r--xmlsecurity/inc/xmlsec-wrapper.h4
-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/signed_with_x509certificate_chain.odtbin0 -> 13585 bytes
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx289
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx42
-rw-r--r--xmlsecurity/source/dialogs/certificateviewer.cxx13
-rw-r--r--xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx33
-rw-r--r--xmlsecurity/source/helper/documentsignaturehelper.cxx2
-rw-r--r--xmlsecurity/source/helper/ooxmlsecexporter.cxx58
-rw-r--r--xmlsecurity/source/helper/xsecctl.cxx23
-rw-r--r--xmlsecurity/source/helper/xsecsign.cxx14
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx4
-rw-r--r--xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx4
676 files changed, 13811 insertions, 5170 deletions
diff --git a/.gitignore b/.gitignore
index fc0482e11d52..9dad1d4b26e3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,7 +63,6 @@
/README
/AUTHORS
/MAINTAINERS
-/setup_native/source/packinfo/finals_instsetoo.txt
# make id
/ID
@@ -179,3 +178,7 @@ LibreOffice.VC.VC.opendb
# vim-ide-integration
/compile_commands.json
+
+#android builds
+/android/jniLibs/
+/android/obj/ \ No newline at end of file
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7a4fd496d654..6d61ef6eddc5 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1279,6 +1279,7 @@ $(call gb_LinkTarget_use_external,$(1),freetype_headers)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,cairo) \
-I$(call gb_UnpackedTarball_get_dir,cairo)/src \
+ -I$(call gb_UnpackedTarball_get_dir,pixman)/pixman \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_libs,$(1),\
@@ -1577,7 +1578,7 @@ $(call gb_ExternalProject_use_package,$(1),openssl)
endef
define gb_LinkTarget__use_openssl_headers
-$(call gb_LinkTarget_use_external_project,$(1),openssl)
+$(call gb_LinkTarget_use_external_project,$(1),openssl,full)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,openssl)/include \
$$(INCLUDE) \
@@ -1589,13 +1590,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)
@@ -2744,7 +2746,7 @@ $(call gb_LinkTarget_set_include,$(1),\
ifeq ($(COM),MSC)
$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
+ $(call gb_UnpackedTarball_get_dir,curl)/builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-zlib-static-ipv6-sspi-schannel/lib/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).lib \
)
else
$(call gb_LinkTarget_add_libs,$(1),\
@@ -3046,9 +3048,15 @@ endef
else # !SYSTEM_POSTGRESQL
+ifeq ($(OS),WNT)
+$(eval $(call gb_Helper_register_packages_for_install,postgresqlsdbc,\
+ postgresql \
+))
+endif # WNT
+
define gb_LinkTarget__use_postgresql
-$(call gb_LinkTarget_use_external_project,$(1),postgresql)
+$(call gb_LinkTarget_use_external_project,$(1),postgresql,full)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,postgresql)/src/include \
@@ -3056,19 +3064,21 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
)
+ifeq ($(OS),WNT)
+
$(call gb_LinkTarget_add_libs,$(1),\
- $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.lib \
)
-ifeq ($(OS),WNT)
-$(call gb_LinkTarget_use_external,$(1),openssl)
+else # WNT
-$(call gb_LinkTarget_use_system_win32_libs,$(1),\
- secur32 \
- ws2_32 \
+$(call gb_LinkTarget_add_libs,$(1),\
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
+ $(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
)
-endif
+endif # WNT
endef
@@ -3189,7 +3199,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
@@ -4004,7 +4014,7 @@ $(call gb_ExternalExecutable_add_dependencies,python,$(call gb_GeneratedPackage_
else
-$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-3.7.7/bin/python.exe,python.bin))
+$(call gb_ExternalExecutable_set_internal,python,$(INSTROOT)/$(LIBO_BIN_FOLDER)/$(if $(filter WNT,$(OS)),python-core-$(PYTHON_VERSION)/bin/python.exe,python.bin))
$(call gb_ExternalExecutable_set_precommand,python,$(subst $$,$$$$,$(gb_Python_PRECOMMAND)))
$(call gb_ExternalExecutable_add_dependencies,python,$(call gb_Package_get_target_for_build,python3))
diff --git a/bin/pack-debug b/bin/pack-debug
index 67c4cd50150d..312f59e6f81f 100755
--- a/bin/pack-debug
+++ b/bin/pack-debug
@@ -13,6 +13,12 @@
export BUILD_PATH=$PWD
export BUILD_LOG=$BUILD_PATH/pack-debug.log
+if type -P pigz &>/dev/null; then
+ GZIP=pigz
+else
+ GZIP=gzip
+fi
+
if [ $# -gt 0 ]
then
for i in "$@"
@@ -100,7 +106,7 @@ cat $DEBUGSRC | awk '
# debug build source package
- rpmbuild -bb --define "_unpackaged_files_terminate_build 0" ${DEBUGSRC}-debugsource --target $build_cpu --buildroot=$buildroot
+ rpmbuild -bb --define "_unpackaged_files_terminate_build 0" --define "_binary_payload w1T.xzdio" ${DEBUGSRC}-debugsource --target $build_cpu --buildroot=$buildroot
###################################################################
echo create rpm debug info packages by processing logged spec files
@@ -150,7 +156,7 @@ do
# stripped package
- rpmbuild -bb --define "_unpackaged_files_terminate_build 0" $i --target $build_cpu --buildroot=$buildroot
+ rpmbuild -bb --define "_unpackaged_files_terminate_build 0" --define "_binary_payload w1T.xzdio" $i --target $build_cpu --buildroot=$buildroot
rm -rf $buildroot
mv $buildroot.copy $buildroot
mkdir -p $topdir/RPMS/BUILD $topdir/RPMS/RPMS
@@ -168,7 +174,7 @@ do
# create debug info package
- rpmbuild -bb --define "_unpackaged_files_terminate_build 0" ${i}-debuginfo --target $build_cpu --buildroot=$buildroot
+ rpmbuild -bb --define "_unpackaged_files_terminate_build 0" --define "_binary_payload w1T.xzdio" ${i}-debuginfo --target $build_cpu --buildroot=$buildroot
fi
done
@@ -180,8 +186,8 @@ TARGET_RPM=$(ls *_download/*.tar.gz)
TARGET_DEBUG=$(echo $TARGET_RPM | sed 's/.tar.gz$/-debug.tar.gz/')
SOURCE_RPM=$(find *_rpm -type f | grep -v debug)
SOURCE_DEBUG=$(find *_rpm -type f | grep -E '(debug|readme|README)')
-tar c $SOURCE_RPM | gzip >$TARGET_RPM
-tar c $SOURCE_DEBUG | gzip >$TARGET_DEBUG
+tar c $SOURCE_RPM | $GZIP >$TARGET_RPM
+tar c $SOURCE_DEBUG | $GZIP >$TARGET_DEBUG
cd $BUILD_PATH
rm -rf $topdir
}
@@ -323,8 +329,8 @@ TARGET_DEB=$(ls *_download/*.tar.gz)
TARGET_DEBUG=$(echo $TARGET_DEB | sed 's/.tar.gz$/-debug.tar.gz/')
SOURCE_DEB=$(find *_deb -type f | grep -v debug)
SOURCE_DEBUG=$(find *_deb -type f | grep -E '(debug|readme|README)')
-tar c $SOURCE_DEB | gzip >$TARGET_DEB
-tar c $SOURCE_DEBUG | gzip >$TARGET_DEBUG
+tar c $SOURCE_DEB | $GZIP >$TARGET_DEB
+tar c $SOURCE_DEBUG | $GZIP >$TARGET_DEBUG
cd $BUILD_PATH
rm -rf DEBS
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 82e534f4dfcb..99879c2ba397 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -794,7 +794,7 @@ void Chart2ImportTest::testBnc864396()
void Chart2ImportTest::testBnc889755()
{
load("/chart2/qa/extras/data/pptx/", "bnc889755.pptx");
- uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 6), uno::UNO_QUERY_THROW);
+ uno::Reference<chart2::XChartDocument> xChartDoc(getChartDocFromDrawImpress(0, 5), uno::UNO_QUERY_THROW);
CPPUNIT_ASSERT(xChartDoc->hasInternalDataProvider());
uno::Reference< chart2::XInternalDataProvider > xDataProvider( xChartDoc->getDataProvider(), uno::UNO_QUERY_THROW );
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index e68deadc2294..9b31f4d4195d 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -183,8 +183,8 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
{
load("chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
- uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0,6);
- uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW );
+ uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 5);
+ uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
OUString rDump = xDumper->dump();
OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
xmlDocPtr pXmlDoc = xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr()));
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx
index 0971fd079ca1..4c9e59542af3 100644
--- a/chart2/source/controller/main/ChartWindow.cxx
+++ b/chart2/source/controller/main/ChartWindow.cxx
@@ -283,11 +283,11 @@ void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
SfxViewShell* pCurrentShell = SfxViewShell::Current();
if ( nullptr == pCurrentShell )
return;
- OString sRectangle;
+ tools::Rectangle aResultRectangle;
if (!pRectangle)
{
// we have to invalidate the whole chart area not the whole document
- sRectangle = GetBoundingBox().toString();
+ aResultRectangle = GetBoundingBox();
}
else
{
@@ -325,9 +325,9 @@ void ChartWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
aRectangle = tools::Rectangle(aRectangle.TopLeft() + aOffset, aRectangle.GetSize());
}
- sRectangle = aRectangle.toString();
+ aResultRectangle = aRectangle;
}
- SfxLokHelper::notifyInvalidation(pCurrentShell, sRectangle);
+ SfxLokHelper::notifyInvalidation(pCurrentShell, &aResultRectangle);
}
FactoryFunction ChartWindow::GetUITestFactory() const
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/comphelper/qa/unit/test_traceevent.cxx b/comphelper/qa/unit/test_traceevent.cxx
index 8bd34595e397..6f768c09d466 100644
--- a/comphelper/qa/unit/test_traceevent.cxx
+++ b/comphelper/qa/unit/test_traceevent.cxx
@@ -40,17 +40,12 @@ void trace_event_test()
// This will not generate any 'b' and 'e' events either
auto pAsync1(std::make_shared<comphelper::AsyncEvent>("async1"));
- std::weak_ptr<comphelper::AsyncEvent> pAsync2;
{
// No 'X' by this either
comphelper::ProfileZone aZone1("block1");
// Now we turn on recording
comphelper::TraceEvent::startRecording();
-
- // As this is nested in the parent that was created with recording turned off,
- // this will not generate any 'b' and 'e' events either even if recording is now on.
- pAsync2 = comphelper::AsyncEvent::createWithParent("async2in1", pAsync1);
}
// This will generate an 'i' event for instant1
@@ -70,20 +65,13 @@ void trace_event_test()
// Leaving this scope will generate an 'X' event for block2
}
- // Verify that the weak_ptr to pAsync2 has expired as its parent pAsync1 has been finished off
- CPPUNIT_ASSERT(pAsync2.expired());
-
// This will generate a 'b' event for async3
auto pAsync3(std::make_shared<comphelper::AsyncEvent>(
"async3", std::map<OUString, OUString>({ { "foo", "bar" }, { "tem", "42" } })));
- std::weak_ptr<comphelper::AsyncEvent> pAsync4;
-
{
comphelper::ProfileZone aZone3("block3");
- pAsync4 = comphelper::AsyncEvent::createWithParent("async4in3", pAsync3);
-
// Leaving this scope will generate an 'X' event for block3
}
@@ -96,32 +84,8 @@ void trace_event_test()
comphelper::TraceEvent::addInstantEvent(
"instant2", std::map<OUString, OUString>({ { "foo2", "bar2" }, { "tem2", "42" } }));
- std::weak_ptr<comphelper::AsyncEvent> pAsync5;
- {
- auto pAsync4Locked = pAsync4.lock();
- CPPUNIT_ASSERT(pAsync4Locked);
- // This will generate a 'b' event for async5in4
- pAsync5 = comphelper::AsyncEvent::createWithParent("async5in4", pAsync4Locked);
- }
-
- CPPUNIT_ASSERT(!pAsync5.expired());
-
- // This will generate a 'b' event for async6in5
- std::weak_ptr<comphelper::AsyncEvent> pAsync6(
- comphelper::AsyncEvent::createWithParent("async6in5", pAsync5.lock()));
- CPPUNIT_ASSERT(!pAsync6.expired());
-
- // This will generate an 'e' event for async6in5 and async5in4
- pAsync5.lock()->finish();
-
- pAsync7Locked = comphelper::AsyncEvent::createWithParent("async7in3", pAsync3).lock();
-
- CPPUNIT_ASSERT(pAsync6.expired());
-
// Leaving this scope will generate 'X' events for test2 and a
- // 'e' event for async4in3, async7in3, and async3. The
- // pAsync7Locked pointer will now point to an AsyncEvent
- // object that has already had its 'e' event generated.
+ // 'e' event for async4in3, async7in3, and async3.
}
// This incorrect use of overlapping (not nested) ProfileZones
@@ -130,9 +94,6 @@ void trace_event_test()
auto p2 = new comphelper::ProfileZone("error2");
delete p1;
delete p2;
-
- // Nothing is generated from this
- pAsync7Locked.reset();
}
}
@@ -145,28 +106,20 @@ void TestTraceEvent::test()
std::cerr << s << "\n";
}
- CPPUNIT_ASSERT_EQUAL(17, static_cast<int>(aEvents.size()));
+ CPPUNIT_ASSERT_EQUAL(9, static_cast<int>(aEvents.size()));
CPPUNIT_ASSERT(aEvents[0].startsWith("{\"name:\"instant1\",\"ph\":\"i\","));
- CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async2.5\",\"ph\":\"b\",\"id\":1,"));
+ CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async2.5\",\"ph\":\"S\",\"id\":1,"));
CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block2\",\"ph\":\"X\","));
CPPUNIT_ASSERT(aEvents[3].startsWith(
- "{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
- CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async4in3\",\"ph\":\"b\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block3\",\"ph\":\"X\","));
- CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async2.5\",\"ph\":\"e\",\"id\":1,"));
- CPPUNIT_ASSERT(aEvents[7].startsWith(
+ "{\"name\":\"async3\",\"ph\":\"S\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
+ CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"block3\",\"ph\":\"X\","));
+ CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"async2.5\",\"ph\":\"F\",\"id\":1,"));
+ CPPUNIT_ASSERT(aEvents[6].startsWith(
"{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\":\"bar2\",\"tem2\":\"42\"},"));
- CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"async5in4\",\"ph\":\"b\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async6in5\",\"ph\":\"b\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async6in5\",\"ph\":\"e\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[11].startsWith("{\"name\":\"async5in4\",\"ph\":\"e\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[12].startsWith("{\"name\":\"async7in3\",\"ph\":\"b\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[13].startsWith("{\"name\":\"test2\",\"ph\":\"X\""));
- CPPUNIT_ASSERT(aEvents[14].startsWith("{\"name\":\"async4in3\",\"ph\":\"e\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[15].startsWith("{\"name\":\"async7in3\",\"ph\":\"e\",\"id\":2,"));
- CPPUNIT_ASSERT(aEvents[16].startsWith(
- "{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
+ CPPUNIT_ASSERT(aEvents[7].startsWith("{\"name\":\"test2\",\"ph\":\"X\""));
+ CPPUNIT_ASSERT(aEvents[8].startsWith(
+ "{\"name\":\"async3\",\"ph\":\"F\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
}
CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent);
diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index 208fe7bb25df..ee1faa4e0658 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -10,6 +10,7 @@
#include <comphelper/lok.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <sal/log.hxx>
+#include <algorithm>
#include <iostream>
#include <map>
@@ -261,31 +262,31 @@ bool isWhitelistedLanguage(const OUString& lang)
#endif
}
-static void (*pStatusIndicatorCallback)(void *data, statusIndicatorCallbackType type, int percent)(nullptr);
+static void (*pStatusIndicatorCallback)(void *data, statusIndicatorCallbackType type, int percent, const char* pText)(nullptr);
static void *pStatusIndicatorCallbackData(nullptr);
-void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent), void *data)
+void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent, const char* pText), void *data)
{
pStatusIndicatorCallback = callback;
pStatusIndicatorCallbackData = data;
}
-void statusIndicatorStart()
+void statusIndicatorStart(const OUString& sText)
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Start, 0);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Start, 0, sText.toUtf8().getStr());
}
void statusIndicatorSetValue(int percent)
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::SetValue, percent);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::SetValue, percent, nullptr);
}
void statusIndicatorFinish()
{
if (pStatusIndicatorCallback)
- pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0);
+ pStatusIndicatorCallback(pStatusIndicatorCallbackData, statusIndicatorCallbackType::Finish, 0, nullptr);
}
} // namespace LibreOfficeKit
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx
index 793fea6cdb0e..8b1a9c09427a 100644
--- a/comphelper/source/misc/traceevent.cxx
+++ b/comphelper/source/misc/traceevent.cxx
@@ -24,8 +24,13 @@ std::atomic<bool> TraceEvent::s_bRecording = (getenv("TRACE_EVENT_RECORDING") !=
#else
std::atomic<bool> TraceEvent::s_bRecording = false;
#endif
+
+std::size_t TraceEvent::s_nBufferSize = 0;
+void (*TraceEvent::s_pBufferFullCallback)() = nullptr;
+
int AsyncEvent::s_nIdCounter = 0;
-int ProfileZone::s_nNesting = 0;
+
+static thread_local int nProfileZoneNesting = 0; // Level of Nested Profile Zones
namespace
{
@@ -38,6 +43,12 @@ void TraceEvent::addRecording(const OUString& sObject)
osl::MutexGuard aGuard(g_aMutex);
g_aRecording.emplace_back(sObject);
+
+ if (s_nBufferSize > 0 && g_aRecording.size() >= s_nBufferSize)
+ {
+ if (s_pBufferFullCallback != nullptr)
+ (*s_pBufferFullCallback)();
+ }
}
void TraceEvent::addInstantEvent(const char* sName, const std::map<OUString, OUString>& args)
@@ -72,6 +83,12 @@ void TraceEvent::startRecording()
void TraceEvent::stopRecording() { s_bRecording = false; }
+void TraceEvent::setBufferSizeAndCallback(std::size_t bufferSize, void (*bufferFullCallback)())
+{
+ s_nBufferSize = bufferSize;
+ s_pBufferFullCallback = bufferFullCallback;
+}
+
std::vector<OUString> TraceEvent::getEventVectorAndClear()
{
bool bRecording;
@@ -118,6 +135,10 @@ void ProfileZone::addRecording()
+ OUString::number(osl_getThreadIdentifier(nullptr)) + "},");
}
+int ProfileZone::getNestingLevel() { return nProfileZoneNesting; }
+
+void ProfileZone::setNestingLevel(int nNestingLevel) { nProfileZoneNesting = nNestingLevel; }
+
} // namespace comphelper
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/config_host.mk.in b/config_host.mk.in
index 88ee44b16548..c1e81a6ee105 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -81,6 +81,7 @@ export COMPILER_PLUGINS_CXXFLAGS=@COMPILER_PLUGINS_CXXFLAGS@
export COMPILER_PLUGINS_CXX_LINKFLAGS=@COMPILER_PLUGINS_CXX_LINKFLAGS@
export COMPILER_PLUGINS_DEBUG=@COMPILER_PLUGINS_DEBUG@
export COMPILER_PLUGINS_TOOLING_ARGS=@COMPILER_PLUGINS_TOOLING_ARGS@
+export COMPRESSIONTOOL=@COMPRESSIONTOOL@
export COM_IS_CLANG=@COM_IS_CLANG@
export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@
export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@
diff --git a/configure.ac b/configure.ac
index 2b09b68ee759..2ca1fb09c398 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
# several non-alphanumeric characters, those are split off and used only for the
# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
-AC_INIT([Collabora Office],[6.4.10.41],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[6.4.10.68],[],[],[https://collaboraoffice.com/])
dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
@@ -2537,6 +2537,16 @@ if test -z "$BASH"; then
fi
AC_SUBST(BASH)
+# prefer parallel comression tools, if available
+AC_PATH_PROG(COMPRESSIONTOOL, pigz)
+if test -z "$COMPRESSIONTOOL"; then
+ AC_PATH_PROG(COMPRESSIONTOOL, gzip)
+ if test -z "$COMPRESSIONTOOL"; then
+ AC_MSG_ERROR([gzip not found in \$PATH])
+ fi
+fi
+AC_SUBST(COMPRESSIONTOOL)
+
AC_MSG_CHECKING([for GNU or BSD tar])
for a in $GNUTAR gtar gnutar bsdtar tar /usr/sfw/bin/gtar; do
$a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null
@@ -2850,7 +2860,7 @@ if test $_os = Darwin; then
# higher than or equal to the minimum required should be found.
AC_MSG_CHECKING([what macOS SDK to use])
- for _macosx_sdk in ${with_macosx_sdk-11.3 11.1 11.0 10.15 10.14 10.13 10.12}; do
+ for _macosx_sdk in ${with_macosx_sdk-12.1 12.0 11.3 11.1 11.0 10.15 10.14 10.13 10.12}; do
MACOSX_SDK_PATH=`xcrun --sdk macosx${_macosx_sdk} --show-sdk-path 2> /dev/null`
if test -d "$MACOSX_SDK_PATH"; then
with_macosx_sdk="${_macosx_sdk}"
@@ -2891,8 +2901,14 @@ if test $_os = Darwin; then
11.3)
MACOSX_SDK_VERSION=110300
;;
+ 12.0)
+ MACOSX_SDK_VERSION=120000
+ ;;
+ 12.1)
+ MACOSX_SDK_VERSION=120100
+ ;;
*)
- AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.12--11.3])
+ AC_MSG_ERROR([with-macosx-sdk $with_macosx_sdk is not a supported value, supported values are 10.12--12.1])
;;
esac
@@ -2960,8 +2976,14 @@ if test $_os = Darwin; then
11.3)
MAC_OS_X_VERSION_MIN_REQUIRED="110300"
;;
+ 12.0)
+ MAC_OS_X_VERSION_MIN_REQUIRED="120000"
+ ;;
+ 12.1)
+ MAC_OS_X_VERSION_MIN_REQUIRED="120100"
+ ;;
*)
- AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.10--11.3])
+ AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, supported values are 10.10--12.1])
;;
esac
MAC_OS_X_VERSION_MIN_REQUIRED_DOTS=$with_macosx_version_min_required
@@ -3032,8 +3054,14 @@ if test $_os = Darwin; then
11.3)
MAC_OS_X_VERSION_MAX_ALLOWED="110100"
;;
+ 12.0)
+ MAC_OS_X_VERSION_MAX_ALLOWED="120000"
+ ;;
+ 12.1)
+ MAC_OS_X_VERSION_MAX_ALLOWED="120100"
+ ;;
*)
- AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.10--11.3])
+ AC_MSG_ERROR([with-macosx-version-max-allowed $with_macosx_version_max_allowed is not a supported value, supported values are 10.10--12.1])
;;
esac
@@ -3153,8 +3181,8 @@ dnl ===================================================================
if test $_os = iOS; then
AC_MSG_CHECKING([what iOS SDK to use])
- current_sdk_ver=14.5
- older_sdk_vers="14.4 14.3 14.2 14.1 14.0 13.7 13.6 13.5 13.4 13.2 13.1 13.0 12.4 12.2"
+ current_sdk_ver=15.2
+ older_sdk_vers="15.0 14.5 14.0"
if test "$enable_ios_simulator" = "yes"; then
platform=iPhoneSimulator
versionmin=-mios-simulator-version-min=12.2
@@ -3359,10 +3387,10 @@ if test "$_os" = "WINNT"; then
BITNESS_OVERRIDE=64
fi
fi
-AC_SUBST(WINDOWS_SDK_ARCH)
-if test "$_os" = "iOS" -o "$build_cpu" != "$host_cpu"; then
+if test "$_os" = "iOS"; then
cross_compiling="yes"
fi
+
if test "$cross_compiling" = "yes"; then
export CROSS_COMPILING=TRUE
else
@@ -4849,7 +4877,6 @@ if test "$cross_compiling" = "yes"; then
bin/odfvalidator.sh.in \
bin/officeotron.sh.in \
instsetoo_native/util/openoffice.lst.in \
- setup_native/source/packinfo/finals_instsetoo.txt.in \
config_host/*.in \
sysui/desktop/macosx/Info.plist.in) \
| (cd CONF-FOR-BUILD && tar xf -)
@@ -8247,7 +8274,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)
@@ -8539,10 +8570,10 @@ 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])
+libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
@@ -8945,14 +8976,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}.16
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"3.7.7"])
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
@@ -12260,6 +12291,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
@@ -13085,7 +13118,6 @@ AC_CONFIG_FILES([config_host.mk
bin/odfvalidator.sh
bin/officeotron.sh
instsetoo_native/util/openoffice.lst
- setup_native/source/packinfo/finals_instsetoo.txt
sysui/desktop/macosx/Info.plist])
AC_CONFIG_HEADERS([config_host/config_buildid.h])
AC_CONFIG_HEADERS([config_host/config_clang.h])
diff --git a/connectivity/Library_mysqlc.mk b/connectivity/Library_mysqlc.mk
index 0999b46d3eec..f765fb1e305f 100644
--- a/connectivity/Library_mysqlc.mk
+++ b/connectivity/Library_mysqlc.mk
@@ -12,6 +12,7 @@ $(eval $(call gb_Library_Library,mysqlc))
$(eval $(call gb_Library_use_externals,mysqlc,\
boost_headers \
mariadb-connector-c \
+ openssl \
))
$(eval $(call gb_Library_set_include,mysqlc,\
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/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/inc/grfpage.hxx b/cui/source/inc/grfpage.hxx
index afdc7cb6ba6f..922126a1b6b7 100644
--- a/cui/source/inc/grfpage.hxx
+++ b/cui/source/inc/grfpage.hxx
@@ -57,6 +57,7 @@ class SvxGrfCropPage : public SfxTabPage
long nOldWidth;
long nOldHeight;
bool bSetOrigSize;
+ sal_Int32 m_aPreferredDPI;
SvxCropExample m_aExampleWN;
@@ -93,7 +94,7 @@ class SvxGrfCropPage : public SfxTabPage
void GraphicHasChanged(bool bFound);
virtual void ActivatePage(const SfxItemSet& rSet) override;
- static Size GetGrfOrigSize(const Graphic&);
+ Size GetGrfOrigSize(const Graphic& rGraphic);
public:
SvxGrfCropPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet &rSet);
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 091ef70faddf..cf0f13e42350 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -57,6 +57,7 @@ SvxGrfCropPage::SvxGrfCropPage(weld::Container* pPage, weld::DialogController* p
, nOldWidth(0)
, nOldHeight(0)
, bSetOrigSize(false)
+ , m_aPreferredDPI(0)
, m_xCropFrame(m_xBuilder->weld_widget("cropframe"))
, m_xZoomConstRB(m_xBuilder->weld_radio_button("keepscale"))
, m_xSizeConstRB(m_xBuilder->weld_radio_button("keepsize"))
@@ -287,6 +288,10 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
DBG_ASSERT( pPool, "Where is the pool?" );
#endif
+ auto& aProperties = getAdditionalProperties();
+ if (aProperties.find("PreferredDPI") != aProperties.end())
+ m_aPreferredDPI = aProperties.at("PreferredDPI").get<sal_Int32>();
+
bSetOrigSize = false;
// Size
@@ -652,6 +657,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
}
sTemp = sTemp.replaceAll("%1", sPPI);
}
+ sTemp += "\n" + OUString::number(aOrigPixelSize.Width()) + u"\u00D7" + OUString::number(aOrigPixelSize.Height()) + " px";
m_xOrigSizeFT->set_label(sTemp);
}
@@ -664,13 +670,27 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound )
Size SvxGrfCropPage::GetGrfOrigSize(const Graphic& rGrf)
{
- const MapMode aMapTwip( MapUnit::MapTwip );
- Size aSize( rGrf.GetPrefSize() );
- if( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
- aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapTwip);
+ Size aSize;
+
+ if (m_aPreferredDPI > 0)
+ {
+ Size aPixelSize = rGrf.GetSizePixel();
+ double fWidth = aPixelSize.Width() / double(m_aPreferredDPI);
+ double fHeight = aPixelSize.Height() / double(m_aPreferredDPI);
+ fWidth = fWidth * 1440.0;
+ fHeight = fHeight * 1440.0;
+ aSize = Size(fWidth, fHeight);
+ }
else
- aSize = OutputDevice::LogicToLogic( aSize,
- rGrf.GetPrefMapMode(), aMapTwip );
+ {
+ const MapMode aMapTwip( MapUnit::MapTwip );
+ aSize = rGrf.GetPrefSize();
+ if( MapUnit::MapPixel == rGrf.GetPrefMapMode().GetMapUnit() )
+ aSize = Application::GetDefaultDevice()->PixelToLogic(aSize, aMapTwip);
+ else
+ aSize = OutputDevice::LogicToLogic( aSize,
+ rGrf.GetPrefMapMode(), aMapTwip );
+ }
return aSize;
}
diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx
index 1a927280e24b..ef8494ed7b0d 100644
--- a/desktop/inc/lib/init.hxx
+++ b/desktop/inc/lib/init.hxx
@@ -46,11 +46,10 @@ namespace desktop {
OString toString() const
{
- std::stringstream ss;
- ss << m_aRectangle.toString();
if (m_nPart >= -1)
- ss << ", " << m_nPart;
- return ss.str().c_str();
+ return m_aRectangle.toString() + ", " + OString::number(m_nPart);
+ else
+ return m_aRectangle.toString();
}
/// Infinite Rectangle is both sides are
@@ -93,9 +92,8 @@ namespace desktop {
struct CallbackData
{
- CallbackData(int type, const std::string& payload)
- : Type(type)
- , PayloadString(payload)
+ CallbackData(const std::string& payload)
+ : PayloadString(payload)
{
}
@@ -118,7 +116,6 @@ namespace desktop {
/// Returns true iff there is cached data.
bool isCached() const { return PayloadObject.which() != 0; }
- int Type;
std::string PayloadString;
private:
@@ -126,14 +123,19 @@ namespace desktop {
boost::variant<boost::blank, RectangleAndPart, boost::property_tree::ptree> PayloadObject;
};
- typedef std::vector<CallbackData> queue_type;
+ typedef std::vector<int> queue_type1;
+ typedef std::vector<CallbackData> queue_type2;
private:
- bool removeAll(const std::function<bool (const queue_type::value_type&)>& rTestFunc);
- bool processInvalidateTilesEvent(CallbackData& aCallbackData);
- bool processWindowEvent(CallbackData& aCallbackData);
-
- queue_type m_queue;
+ bool removeAll(const std::function<bool (int, const CallbackData&)>& rTestFunc);
+ bool processInvalidateTilesEvent(int type, CallbackData& aCallbackData);
+ bool processWindowEvent(int type, CallbackData& aCallbackData);
+ queue_type2::reverse_iterator toQueue2(queue_type1::reverse_iterator);
+
+ /** we frequently want to scan the queue, and mostly when we do so, we only care about the element type
+ so we split the queue in 2 to make the scanning cache friendly. */
+ queue_type1 m_queue1;
+ queue_type2 m_queue2;
std::map<int, std::string> m_states;
std::unordered_map<int, std::unordered_map<int, std::string>> m_viewStates;
LibreOfficeKitDocument* m_pDocument;
@@ -142,6 +144,15 @@ namespace desktop {
int m_nDisableCallbacks;
bool m_bEventLatch;
std::mutex m_mutex;
+ class TimeoutIdle : public Timer
+ {
+ public:
+ TimeoutIdle( CallbackFlushHandler* handler );
+ virtual void Invoke() override;
+ private:
+ CallbackFlushHandler* mHandler;
+ };
+ TimeoutIdle m_TimeoutIdle;
};
struct DESKTOP_DLLPUBLIC LibLODocument_Impl : public _LibreOfficeKitDocument
diff --git a/desktop/qa/data/table-selection.odt b/desktop/qa/data/table-selection.odt
new file mode 100644
index 000000000000..c19f8c79fc3a
--- /dev/null
+++ b/desktop/qa/data/table-selection.odt
Binary files differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index af9b93620351..ad351343295a 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -226,6 +226,8 @@ public:
void testMetricField();
void testMultiDocuments();
void testJumpCursor();
+ void testNoDuplicateTableSelection();
+ void testMultiViewTableSelection();
void testABI();
CPPUNIT_TEST_SUITE(DesktopLOKTest);
@@ -289,6 +291,8 @@ public:
CPPUNIT_TEST(testMetricField);
CPPUNIT_TEST(testMultiDocuments);
CPPUNIT_TEST(testJumpCursor);
+ CPPUNIT_TEST(testNoDuplicateTableSelection);
+ CPPUNIT_TEST(testMultiViewTableSelection);
CPPUNIT_TEST(testABI);
CPPUNIT_TEST_SUITE_END();
@@ -1946,6 +1950,8 @@ class ViewCallback
int mnView;
public:
OString m_aCellFormula;
+ int m_nTableSelectionCount;
+ bool m_bEmptyTableSelection;
bool m_bTilesInvalidated;
bool m_bZeroCursor;
tools::Rectangle m_aOwnCursor;
@@ -1954,6 +1960,8 @@ public:
ViewCallback(LibLODocument_Impl* pDocument)
: mpDocument(pDocument),
+ m_nTableSelectionCount(0),
+ m_bEmptyTableSelection(false),
m_bTilesInvalidated(false),
m_bZeroCursor(false)
{
@@ -2017,6 +2025,12 @@ public:
m_aCellFormula = aPayload;
}
break;
+ case LOK_CALLBACK_TABLE_SELECTED:
+ {
+ m_bEmptyTableSelection = (std::string(pPayload).compare("{ }") == 0);
+ ++m_nTableSelectionCount;
+ }
+ break;
}
}
};
@@ -3089,6 +3103,113 @@ void DesktopLOKTest::testJumpCursor()
comphelper::LibreOfficeKit::setTiledAnnotations(true);
}
+static void lcl_repeatKeyStroke(LibLODocument_Impl *pDocument, int nCharCode, int nKeyCode, size_t nCount)
+{
+ for (size_t nCtr = 0; nCtr < nCount; ++nCtr)
+ {
+ pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYINPUT, nCharCode, nKeyCode);
+ pDocument->m_pDocumentClass->postKeyEvent(pDocument, LOK_KEYEVENT_KEYUP, nCharCode, nKeyCode);
+ }
+}
+
+void DesktopLOKTest::testNoDuplicateTableSelection()
+{
+ comphelper::LibreOfficeKit::setActive();
+ LibLODocument_Impl* pDocument = loadDoc("table-selection.odt");
+
+ // Create view 1.
+ pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ ViewCallback aView1(pDocument);
+
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(aView1.m_bEmptyTableSelection);
+
+ aView1.m_nTableSelectionCount = 0;
+ // Go to Table1.
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(!aView1.m_bEmptyTableSelection);
+
+ aView1.m_nTableSelectionCount = 0;
+ // Move to the last row in Table1.
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 2);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(0, aView1.m_nTableSelectionCount);
+
+ // Go outside Table1.
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(aView1.m_bEmptyTableSelection);
+}
+
+void DesktopLOKTest::testMultiViewTableSelection()
+{
+ comphelper::LibreOfficeKit::setActive();
+ LibLODocument_Impl* pDocument = loadDoc("table-selection.odt");
+
+ // Create view 1.
+ pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ ViewCallback aView1(pDocument);
+ int nView1 = pDocument->m_pDocumentClass->getView(pDocument);
+
+ // Create view 2.
+ pDocument->m_pDocumentClass->createView(pDocument);
+ pDocument->m_pDocumentClass->initializeForRendering(pDocument, "{}");
+ ViewCallback aView2(pDocument);
+ int nView2 = pDocument->m_pDocumentClass->getView(pDocument);
+
+ // switch to view 1.
+ pDocument->m_pDocumentClass->setView(pDocument, nView1);
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+ CPPUNIT_ASSERT_EQUAL(1, aView2.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(aView1.m_bEmptyTableSelection);
+ CPPUNIT_ASSERT(aView2.m_bEmptyTableSelection);
+
+ aView1.m_nTableSelectionCount = 0;
+ aView2.m_nTableSelectionCount = 0;
+
+ pDocument->m_pDocumentClass->setView(pDocument, nView1);
+ // Go to Table1.
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(1, aView1.m_nTableSelectionCount);
+ CPPUNIT_ASSERT_EQUAL(0, aView2.m_nTableSelectionCount);
+
+ aView1.m_nTableSelectionCount = 0;
+ // Switch to view 2
+ pDocument->m_pDocumentClass->setView(pDocument, nView2);
+ // Go to Table2 in view 2.
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 7);
+ Scheduler::ProcessEventsToIdle();
+ // View1 should not get any table selection messages.
+ CPPUNIT_ASSERT_EQUAL(0, aView1.m_nTableSelectionCount);
+ // View2 will first get table selection of Table1, then emty selection, and finally on 7th down arrow keypress,
+ // it will get table-selection of Table2. So in total it should get 3 table selections.
+ CPPUNIT_ASSERT_EQUAL(3, aView2.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(!aView2.m_bEmptyTableSelection);
+
+ aView1.m_nTableSelectionCount = 0;
+ aView2.m_nTableSelectionCount = 0;
+
+ // Switch to view 1
+ pDocument->m_pDocumentClass->setView(pDocument, nView1);
+ // Go out of Table1 and re-enter..
+ lcl_repeatKeyStroke(pDocument, 0, KEY_UP, 1);
+ lcl_repeatKeyStroke(pDocument, 0, KEY_DOWN, 1);
+ Scheduler::ProcessEventsToIdle();
+ // View1 should get one empty table selection, then get Table1 selection.
+ CPPUNIT_ASSERT_EQUAL(2, aView1.m_nTableSelectionCount);
+ // View2 should not get any table selection.
+ CPPUNIT_ASSERT_EQUAL(0, aView2.m_nTableSelectionCount);
+ CPPUNIT_ASSERT(!aView1.m_bEmptyTableSelection);
+}
+
namespace {
constexpr size_t classOffset(int i)
@@ -3186,10 +3307,11 @@ void DesktopLOKTest::testABI()
CPPUNIT_ASSERT_EQUAL(documentClassOffset(59), offsetof(struct _LibreOfficeKitDocumentClass, completeFunction));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(60), offsetof(struct _LibreOfficeKitDocumentClass, setWindowTextSelection));
CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct _LibreOfficeKitDocumentClass, sendFormFieldEvent));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct _LibreOfficeKitDocumentClass, setBlockedCommandList));
// Extending is fine, update this, and add new assert for the offsetof the
// new method
- CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), sizeof(struct _LibreOfficeKitDocumentClass));
+ CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), sizeof(struct _LibreOfficeKitDocumentClass));
}
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 381147cd534e..846714158e25 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -29,6 +29,7 @@
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
#include <rtl/uri.hxx>
+#include <tools/urlobj.hxx>
#include <rtl/ustring.hxx>
#include <rtl/process.h>
#include <comphelper/lok.hxx>
@@ -169,7 +170,14 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, CommandLineEvent cur
}
if (nURIlen < 0)
nURIlen = rest2.getLength();
- arg = rest2.copy(0, nURIlen);
+ auto const uri = rest2.copy(0, nURIlen);
+ if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+ // Let the "Open" machinery process the full command URI (leading to failure, by intention,
+ // as the "Open" machinery does not know about those command URI schemes):
+ curEvt = CommandLineEvent::Open;
+ } else {
+ arg = uri;
+ }
return curEvt;
}
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 40d0ee9c8b3c..241d466c5fd9 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -33,6 +33,7 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
#include <osl/file.hxx>
+#include <rtl/xmlencode.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <ucbhelper/content.hxx>
#include <unotools/ucbhelper.hxx>
@@ -554,39 +555,6 @@ BackendImpl::PackageImpl::isRegistered_(
}
-OUString encodeForXml( OUString const & text )
-{
- // encode conforming xml:
- sal_Int32 len = text.getLength();
- OUStringBuffer buf;
- for ( sal_Int32 pos = 0; pos < len; ++pos )
- {
- sal_Unicode c = text[ pos ];
- switch (c) {
- case '<':
- buf.append( "&lt;" );
- break;
- case '>':
- buf.append( "&gt;" );
- break;
- case '&':
- buf.append( "&amp;" );
- break;
- case '\'':
- buf.append( "&apos;" );
- break;
- case '\"':
- buf.append( "&quot;" );
- break;
- default:
- buf.append( c );
- break;
- }
- }
- return buf.makeStringAndClear();
-}
-
-
OUString replaceOrigin(
OUString const & url, OUString const & destFolder, Reference< XCommandEnvironment > const & xCmdEnv, Reference< XComponentContext > const & xContext, bool & out_replaced)
{
@@ -639,7 +607,7 @@ OUString replaceOrigin(
if (origin.isEmpty()) {
// encode only once
origin = OUStringToOString(
- encodeForXml( url.copy( 0, url.lastIndexOf( '/' ) ) ),
+ rtl::encodeForXml( url.copy( 0, url.lastIndexOf( '/' ) ) ),
// xxx todo: encode always for UTF-8? => lookup doc-header?
RTL_TEXTENCODING_UTF8 );
}
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8428dc2343d4..f1becd67d215 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -183,6 +183,7 @@
#include "lokinteractionhandler.hxx"
#include "lokclipboard.hxx"
+#include <officecfg/Office/Common.hxx>
#include <officecfg/Office/Impress.hxx>
using namespace css;
@@ -217,8 +218,14 @@ public:
SetTimeout(dumpTimeoutMS);
Start();
}
+
virtual void Invoke() override
{
+ flushRecordings();
+ }
+
+ static void flushRecordings()
+ {
const css::uno::Sequence<OUString> aEvents =
comphelper::TraceEvent::getRecordingAndClear();
OStringBuffer aOutput;
@@ -1077,6 +1084,10 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis,
int nType,
int nCharCode,
int nKeyCode);
+static void doc_setBlockedCommandList(LibreOfficeKitDocument* pThis,
+ int nViewId,
+ const char* bolckedCommandList);
+
static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
unsigned nWindowId,
int nType,
@@ -1251,6 +1262,26 @@ rtl::Reference<LOKClipboard> forceSetClipboardForCurrentView(LibreOfficeKitDocum
#endif
+const vcl::Font* FindFont(const OUString& rFontName)
+{
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ const SvxFontListItem* pFonts
+ = static_cast<const SvxFontListItem*>(pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
+ const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
+ if (pList && !rFontName.isEmpty())
+ if (sal_Handle hMetric = pList->GetFirstFontMetric(rFontName))
+ return &FontList::GetFontMetric(hMetric);
+ return nullptr;
+}
+
+vcl::Font FindFont_FallbackToDefault(const OUString& rFontName)
+{
+ if (auto pFound = FindFont(rFontName))
+ return *pFound;
+
+ return OutputDevice::GetDefaultFont(DefaultFontType::SANS_UNICODE, LANGUAGE_NONE,
+ GetDefaultFontFlags::NONE);
+}
} // anonymous namespace
LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent, int nDocumentId)
@@ -1340,6 +1371,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone
m_pDocumentClass->sendFormFieldEvent = doc_sendFormFieldEvent;
+ m_pDocumentClass->setBlockedCommandList = doc_setBlockedCommandList;
+
gDocumentClass = m_pDocumentClass;
}
pClass = m_pDocumentClass.get();
@@ -1372,13 +1405,29 @@ static OUString getGenerator()
extern "C" {
+CallbackFlushHandler::TimeoutIdle::TimeoutIdle( CallbackFlushHandler* handler )
+ : Timer( "lokit timer callback" )
+ , mHandler( handler )
+{
+ // A second timer with higher priority, it'll ensure we flush in reasonable time if we get too busy
+ // to get POST_PAINT priority processing. Otherwise it could take a long time to flush.
+ SetPriority(TaskPriority::DEFAULT);
+ SetTimeout( 100 ); // 100 ms
+}
+
+void CallbackFlushHandler::TimeoutIdle::Invoke()
+{
+ mHandler->Invoke();
+}
+
CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, LibreOfficeKitCallback pCallback, void* pData)
- : Idle( "lokit timer callback" ),
+ : Idle( "lokit idle callback" ),
m_pDocument(pDocument),
m_pCallback(pCallback),
m_pData(pData),
m_nDisableCallbacks(0),
- m_bEventLatch(false)
+ m_bEventLatch(false),
+ m_TimeoutIdle( this )
{
SetPriority(TaskPriority::POST_PAINT);
@@ -1394,6 +1443,7 @@ CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, Li
m_states.emplace(LOK_CALLBACK_CELL_ADDRESS, "NIL");
m_states.emplace(LOK_CALLBACK_CURSOR_VISIBLE, "NIL");
m_states.emplace(LOK_CALLBACK_SET_PART, "NIL");
+ m_states.emplace(LOK_CALLBACK_TABLE_SELECTED, "NIL");
Start();
}
@@ -1412,22 +1462,33 @@ void CallbackFlushHandler::callback(const int type, const char* payload, void* d
}
}
+CallbackFlushHandler::queue_type2::reverse_iterator CallbackFlushHandler::toQueue2(CallbackFlushHandler::queue_type1::reverse_iterator pos)
+{
+ int delta = std::distance(m_queue1.rbegin(), pos);
+ return m_queue2.rbegin() + delta;
+}
+
void CallbackFlushHandler::queue(const int type, const char* data)
{
comphelper::ProfileZone aZone("CallbackFlushHander::queue");
- CallbackData aCallbackData(type, (data ? data : "(nil)"));
+ CallbackData aCallbackData(data ? data : "(nil)");
const std::string& payload = aCallbackData.PayloadString;
- SAL_INFO("lok", "Queue: [" << type << "]: [" << payload << "] on " << m_queue.size() << " entries.");
+ SAL_INFO("lok", "Queue: [" << type << "]: [" << payload << "] on " << m_queue1.size() << " entries.");
bool bIsChartActive = false;
+ bool bIsComment = false;
if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
{
LokChartHelper aChartHelper(SfxViewShell::Current());
bIsChartActive = aChartHelper.GetWindow() != nullptr;
}
+ else if (type == LOK_CALLBACK_COMMENT)
+ {
+ bIsComment = true;
+ }
- if (callbacksDisabled() && !bIsChartActive)
+ if (callbacksDisabled() && !bIsChartActive && !bIsComment)
{
// We drop notifications when this is set, except for important ones.
// When we issue a complex command (such as .uno:InsertAnnotation)
@@ -1496,11 +1557,13 @@ void CallbackFlushHandler::queue(const int type, const char* data)
case LOK_CALLBACK_WINDOW:
case LOK_CALLBACK_CALC_FUNCTION_LIST:
case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+ case LOK_CALLBACK_REFERENCE_MARKS:
+ case LOK_CALLBACK_CELL_AUTO_FILL_AREA:
{
- const auto& pos = std::find_if(m_queue.rbegin(), m_queue.rend(),
- [type] (const queue_type::value_type& elem) { return (elem.Type == type); });
-
- if (pos != m_queue.rend() && pos->PayloadString == payload)
+ const auto& pos = std::find_if(m_queue1.rbegin(), m_queue1.rend(),
+ [type] (int elemType) { return (elemType == type); });
+ auto pos2 = toQueue2(pos);
+ if (pos != m_queue1.rend() && pos2->PayloadString == payload)
{
SAL_INFO("lok", "Skipping queue duplicate [" << type << + "]: [" << payload << "].");
return;
@@ -1511,15 +1574,17 @@ void CallbackFlushHandler::queue(const int type, const char* data)
if (type == LOK_CALLBACK_TEXT_SELECTION && payload.empty())
{
- const auto& posStart = std::find_if(m_queue.rbegin(), m_queue.rend(),
- [] (const queue_type::value_type& elem) { return (elem.Type == LOK_CALLBACK_TEXT_SELECTION_START); });
- if (posStart != m_queue.rend())
- posStart->PayloadString.clear();
+ const auto& posStart = std::find_if(m_queue1.rbegin(), m_queue1.rend(),
+ [] (int elemType) { return (elemType == LOK_CALLBACK_TEXT_SELECTION_START); });
+ auto posStart2 = toQueue2(posStart);
+ if (posStart != m_queue1.rend())
+ posStart2->PayloadString.clear();
- const auto& posEnd = std::find_if(m_queue.rbegin(), m_queue.rend(),
- [] (const queue_type::value_type& elem) { return (elem.Type == LOK_CALLBACK_TEXT_SELECTION_END); });
- if (posEnd != m_queue.rend())
- posEnd->PayloadString.clear();
+ const auto& posEnd = std::find_if(m_queue1.rbegin(), m_queue1.rend(),
+ [] (int elemType) { return (elemType == LOK_CALLBACK_TEXT_SELECTION_END); });
+ auto posEnd2 = toQueue2(posEnd);
+ if (posEnd != m_queue1.rend())
+ posEnd2->PayloadString.clear();
}
// When payload is empty discards any previous state.
@@ -1534,7 +1599,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
case LOK_CALLBACK_INVALIDATE_TILES:
if (removeAll(
- [type](const queue_type::value_type& elem) { return (elem.Type == type); }))
+ [type](int elemType, const CallbackData&) { return (elemType == type); }))
SAL_INFO("lok", "Removed dups of [" << type << "]: [" << payload << "].");
break;
}
@@ -1558,7 +1623,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
case LOK_CALLBACK_RULER_UPDATE:
{
if (removeAll(
- [type](const queue_type::value_type& elem) { return (elem.Type == type); }))
+ [type](int elemType, const CallbackData&) { return (elemType == type); }))
SAL_INFO("lok", "Removed dups of [" << type << "]: [" << payload << "].");
}
break;
@@ -1582,15 +1647,15 @@ void CallbackFlushHandler::queue(const int type, const char* data)
payload.find("\"hyperlink\": {}") == std::string::npos;
const int nViewId = lcl_getViewId(payload);
removeAll(
- [type, nViewId, hyperLinkException] (const queue_type::value_type& elem) {
- return (elem.Type == type && nViewId == lcl_getViewId(elem) && !hyperLinkException);
+ [type, nViewId, hyperLinkException] (int elemType, const CallbackData& elemData) {
+ return (elemType == type && nViewId == lcl_getViewId(elemData) && !hyperLinkException);
}
);
}
break;
case LOK_CALLBACK_INVALIDATE_TILES:
- if (processInvalidateTilesEvent(aCallbackData))
+ if (processInvalidateTilesEvent(type, aCallbackData))
return;
break;
@@ -1608,8 +1673,8 @@ void CallbackFlushHandler::queue(const int type, const char* data)
if (name != ".uno:ModifiedStatus=")
{
removeAll(
- [type, &name] (const queue_type::value_type& elem) {
- return (elem.Type == type) && (elem.PayloadString.compare(0, name.size(), name) == 0);
+ [type, &name] (int elemType, const CallbackData& elemData) {
+ return (elemType == type) && (elemData.PayloadString.compare(0, name.size(), name) == 0);
}
);
}
@@ -1618,7 +1683,7 @@ void CallbackFlushHandler::queue(const int type, const char* data)
break;
case LOK_CALLBACK_WINDOW:
- if (processWindowEvent(aCallbackData))
+ if (processWindowEvent(type, aCallbackData))
return;
break;
@@ -1626,8 +1691,8 @@ void CallbackFlushHandler::queue(const int type, const char* data)
{
// remove only selection ranges and 'EMPTY' messages
// always send 'INPLACE' and 'INPLACE EXIT' messages
- removeAll([type, payload] (const queue_type::value_type& elem)
- { return (elem.Type == type && elem.PayloadString[0] != 'I'); });
+ removeAll([type, payload] (int elemType, const CallbackData& elemData)
+ { return (elemType == type && elemData.PayloadString[0] != 'I'); });
}
break;
}
@@ -1635,23 +1700,26 @@ void CallbackFlushHandler::queue(const int type, const char* data)
// Validate that the cached data and the payload string are identical.
assert(aCallbackData.validate() && "Cached callback payload object and string mismatch!");
- m_queue.emplace_back(aCallbackData);
- SAL_INFO("lok", "Queued #" << (m_queue.size() - 1) <<
- " [" << type << "]: [" << payload << "] to have " << m_queue.size() << " entries.");
+ m_queue1.emplace_back(type);
+ m_queue2.emplace_back(aCallbackData);
+ SAL_INFO("lok", "Queued #" << (m_queue1.size() - 1) <<
+ " [" << type << "]: [" << payload << "] to have " << m_queue1.size() << " entries.");
#ifdef DBG_UTIL
{
// Dump the queue state and validate cached data.
int i = 1;
std::ostringstream oss;
- if (m_queue.empty())
+ if (m_queue1.empty())
oss << "Empty";
else
- oss << m_queue.size() << " items\n";
- for (const CallbackData& c : m_queue)
- oss << i++ << ": [" << c.Type << "] [" << c.PayloadString << "].\n";
+ oss << m_queue1.size() << " items\n";
+ auto it1 = m_queue1.begin();
+ auto it2 = m_queue2.begin();
+ for (; it1 != m_queue1.end(); ++it1, ++it2)
+ oss << i++ << ": [" << *it1 << "] [" << it2->PayloadString << "].\n";
SAL_INFO("lok", "Current Queue: " << oss.str());
- for (const CallbackData& c : m_queue)
+ for (const CallbackData& c : m_queue2)
assert(c.validate());
}
#endif
@@ -1661,12 +1729,13 @@ void CallbackFlushHandler::queue(const int type, const char* data)
{
Start();
}
+ if (!m_TimeoutIdle.IsActive())
+ m_TimeoutIdle.Start();
}
-bool CallbackFlushHandler::processInvalidateTilesEvent(CallbackData& aCallbackData)
+bool CallbackFlushHandler::processInvalidateTilesEvent(int type, CallbackData& aCallbackData)
{
const std::string& payload = aCallbackData.PayloadString;
- const int type = aCallbackData.Type;
RectangleAndPart& rcNew = aCallbackData.setRectangleAndPart(payload);
if (rcNew.isEmpty())
@@ -1678,12 +1747,13 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(CallbackData& aCallbackDa
// If we have to invalidate all tiles, we can skip any new tile invalidation.
// Find the last INVALIDATE_TILES entry, if any to see if it's invalidate-all.
const auto& pos
- = std::find_if(m_queue.rbegin(), m_queue.rend(), [](const queue_type::value_type& elem) {
- return (elem.Type == LOK_CALLBACK_INVALIDATE_TILES);
+ = std::find_if(m_queue1.rbegin(), m_queue1.rend(), [](int elemType) {
+ return (elemType == LOK_CALLBACK_INVALIDATE_TILES);
});
- if (pos != m_queue.rend())
+ if (pos != m_queue1.rend())
{
- const RectangleAndPart& rcOld = pos->getRectangleAndPart();
+ auto pos2 = toQueue2(pos);
+ const RectangleAndPart& rcOld = pos2->getRectangleAndPart();
if (rcOld.isInfinite() && (rcOld.m_nPart == -1 || rcOld.m_nPart == rcNew.m_nPart))
{
SAL_INFO("lok", "Skipping queue [" << type << "]: [" << payload
@@ -1707,11 +1777,11 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(CallbackData& aCallbackDa
{
SAL_INFO("lok", "Have Empty [" << type << "]: [" << payload
<< "] so removing all with part " << rcNew.m_nPart << ".");
- removeAll([&rcNew](const queue_type::value_type& elem) {
- if (elem.Type == LOK_CALLBACK_INVALIDATE_TILES)
+ removeAll([&rcNew](int elemType, const CallbackData& elemData) {
+ if (elemType == LOK_CALLBACK_INVALIDATE_TILES)
{
// Remove exiting if new is all-encompassing, or if of the same part.
- const RectangleAndPart rcOld = RectangleAndPart::Create(elem.PayloadString);
+ const RectangleAndPart rcOld = RectangleAndPart::Create(elemData.PayloadString);
return (rcNew.m_nPart == -1 || rcOld.m_nPart == rcNew.m_nPart);
}
@@ -1724,10 +1794,10 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(CallbackData& aCallbackDa
const auto rcOrig = rcNew;
SAL_INFO("lok", "Have [" << type << "]: [" << payload << "] so merging overlapping.");
- removeAll([&rcNew](const queue_type::value_type& elem) {
- if (elem.Type == LOK_CALLBACK_INVALIDATE_TILES)
+ removeAll([&rcNew](int elemType, const CallbackData& elemData) {
+ if (elemType == LOK_CALLBACK_INVALIDATE_TILES)
{
- const RectangleAndPart& rcOld = elem.getRectangleAndPart();
+ const RectangleAndPart& rcOld = elemData.getRectangleAndPart();
if (rcNew.m_nPart != -1 && rcOld.m_nPart != -1 && rcOld.m_nPart != rcNew.m_nPart)
{
SAL_INFO("lok", "Nothing to merge between new: "
@@ -1796,10 +1866,9 @@ bool CallbackFlushHandler::processInvalidateTilesEvent(CallbackData& aCallbackDa
return false;
}
-bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
+bool CallbackFlushHandler::processWindowEvent(int type, CallbackData& aCallbackData)
{
const std::string& payload = aCallbackData.PayloadString;
- const int type = aCallbackData.Type;
boost::property_tree::ptree& aTree = aCallbackData.setJson(payload);
const unsigned nLOKWindowId = aTree.get<unsigned>("id", 0);
@@ -1811,10 +1880,10 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
// remove all previous window part invalidations
if (aRectStr.empty())
{
- removeAll([&nLOKWindowId](const queue_type::value_type& elem) {
- if (elem.Type == LOK_CALLBACK_WINDOW)
+ removeAll([&nLOKWindowId](int elemType, const CallbackData& elemData) {
+ if (elemType == LOK_CALLBACK_WINDOW)
{
- const boost::property_tree::ptree& aOldTree = elem.getJson();
+ const boost::property_tree::ptree& aOldTree = elemData.getJson();
if (nLOKWindowId == aOldTree.get<unsigned>("id", 0)
&& aOldTree.get<std::string>("action", "") == "invalidate")
{
@@ -1828,17 +1897,22 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
{
// if we have to invalidate all of the window, ignore
// any part invalidation message
- const auto invAllExist = std::any_of(m_queue.rbegin(), m_queue.rend(),
- [&nLOKWindowId] (const queue_type::value_type& elem)
- {
- if (elem.Type != LOK_CALLBACK_WINDOW)
- return false;
-
- const boost::property_tree::ptree& aOldTree = elem.getJson();
- return nLOKWindowId == aOldTree.get<unsigned>("id", 0)
- && aOldTree.get<std::string>("action", "") == "invalidate"
- && aOldTree.get<std::string>("rectangle", "").empty();
- });
+ bool invAllExist = false;
+ auto it1 = m_queue1.rbegin();
+ auto it2 = m_queue2.rbegin();
+ for (;it1 != m_queue1.rend(); ++it1, ++it2)
+ {
+ if (*it1 != LOK_CALLBACK_WINDOW)
+ continue;
+ const boost::property_tree::ptree& aOldTree = it2->getJson();
+ if (nLOKWindowId == aOldTree.get<unsigned>("id", 0)
+ && aOldTree.get<std::string>("action", "") == "invalidate"
+ && aOldTree.get<std::string>("rectangle", "").empty())
+ {
+ invAllExist = true;
+ break;
+ }
+ }
// we found a invalidate-all window callback
if (invAllExist)
@@ -1856,11 +1930,11 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
tools::Rectangle aNewRect(nLeft, nTop, nLeft + nWidth, nTop + nHeight);
bool currentIsRedundant = false;
removeAll([&aNewRect, &nLOKWindowId,
- &currentIsRedundant](const queue_type::value_type& elem) {
- if (elem.Type != LOK_CALLBACK_WINDOW)
+ &currentIsRedundant](int elemType, const CallbackData& elemData) {
+ if (elemType != LOK_CALLBACK_WINDOW)
return false;
- const boost::property_tree::ptree& aOldTree = elem.getJson();
+ const boost::property_tree::ptree& aOldTree = elemData.getJson();
if (aOldTree.get<std::string>("action", "") == "invalidate")
{
// Not possible that we encounter an empty rectangle here; we already handled this case above.
@@ -1931,10 +2005,10 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
else if (aAction == "created")
{
// Remove all previous actions on same dialog, if we are creating it anew.
- removeAll([&nLOKWindowId](const queue_type::value_type& elem) {
- if (elem.Type == LOK_CALLBACK_WINDOW)
+ removeAll([&nLOKWindowId](int elemType, const CallbackData& elemData) {
+ if (elemType == LOK_CALLBACK_WINDOW)
{
- const boost::property_tree::ptree& aOldTree = elem.getJson();
+ const boost::property_tree::ptree& aOldTree = elemData.getJson();
if (nLOKWindowId == aOldTree.get<unsigned>("id", 0))
return true;
}
@@ -1959,10 +2033,10 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData)
{
// A size change is practically re-creation of the window.
// But at a minimum it's a full invalidation.
- removeAll([&nLOKWindowId](const queue_type::value_type& elem) {
- if (elem.Type == LOK_CALLBACK_WINDOW)
+ removeAll([&nLOKWindowId](int elemType, const CallbackData& elemData) {
+ if (elemType == LOK_CALLBACK_WINDOW)
{
- const boost::property_tree::ptree& aOldTree = elem.getJson();
+ const boost::property_tree::ptree& aOldTree = elemData.getJson();
if (nLOKWindowId == aOldTree.get<unsigned>("id", 0))
{
const std::string aOldAction = aOldTree.get<std::string>("action", "");
@@ -1986,12 +2060,14 @@ void CallbackFlushHandler::Invoke()
{
std::scoped_lock<std::mutex> lock(m_mutex);
- SAL_INFO("lok", "Flushing " << m_queue.size() << " elements.");
- for (const auto& rCallbackData : m_queue)
+ SAL_INFO("lok", "Flushing " << m_queue1.size() << " elements.");
+ auto it1 = m_queue1.begin();
+ auto it2 = m_queue2.begin();
+ for (; it1 != m_queue1.end(); ++it1, ++it2)
{
- const int type = rCallbackData.Type;
- const auto& payload = rCallbackData.PayloadString;
- const int viewId = lcl_isViewCallbackType(type) ? lcl_getViewId(rCallbackData) : -1;
+ const int type = *it1;
+ const auto& payload = it2->PayloadString;
+ const int viewId = lcl_isViewCallbackType(type) ? lcl_getViewId(*it2) : -1;
if (viewId == -1)
{
@@ -2039,20 +2115,32 @@ void CallbackFlushHandler::Invoke()
m_pCallback(type, payload.c_str(), m_pData);
}
- m_queue.clear();
+ m_queue1.clear();
+ m_queue2.clear();
+ m_TimeoutIdle.Stop();
}
}
-bool CallbackFlushHandler::removeAll(const std::function<bool (const CallbackFlushHandler::queue_type::value_type&)>& rTestFunc)
+bool CallbackFlushHandler::removeAll(const std::function<bool (int, const CallbackData&)>& rTestFunc)
{
- auto newEnd = std::remove_if(m_queue.begin(), m_queue.end(), rTestFunc);
- if (newEnd != m_queue.end())
+ bool bErased = false;
+ auto it1 = m_queue1.begin();
+ auto it2 = m_queue2.begin();
+ while (it1 != m_queue1.end())
{
- m_queue.erase(newEnd, m_queue.end());
- return true;
+ if (rTestFunc(*it1, *it2))
+ {
+ it1 = m_queue1.erase(it1);
+ it2 = m_queue2.erase(it2);
+ bErased = true;
+ }
+ else
+ {
+ ++it1;
+ ++it2;
+ }
}
-
- return false;
+ return bErased;
}
void CallbackFlushHandler::addViewStates(int viewId)
@@ -2292,7 +2380,7 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
Application::SetDialogCancelMode(DialogCancelMode::LOKSilent);
}
- uno::Sequence<css::beans::PropertyValue> aFilterOptions(3);
+ uno::Sequence<css::beans::PropertyValue> aFilterOptions(4);
aFilterOptions[0] = css::beans::PropertyValue( "FilterOptions",
0,
uno::makeAny(aOptions),
@@ -2339,6 +2427,13 @@ static LibreOfficeKitDocument* lo_documentLoadWithOptions(LibreOfficeKit* pThis,
aFilterOptions[3].Value <<= nUpdateDoc;
*/
+ // set this explicitly false to be able to load template files
+ // as regular files, otherwise we cannot save them; it will try
+ // to bring saveas dialog which cannot work with LOK case
+ aFilterOptions[3].Name = "AsTemplate";
+ aFilterOptions[3].Value <<= false;
+
+
const int nThisDocumentId = nDocumentIdCounter++;
SfxViewShell::SetCurrentDocId(ViewShellDocId(nThisDocumentId));
uno::Reference<lang::XComponent> xComponent = xComponentLoader->loadComponentFromURL(
@@ -2648,6 +2743,34 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
bool bFullSheetPreview = sFullSheetPreview == "true";
+ // Select a pdf version if specified a valid one. If invalid then fail.
+ // If not specified then ignore.
+ sal_Int32 pdfVer = 0;
+ if ((aIndex = aFilterOptions.indexOf(",PDFVer=")) >= 0)
+ {
+ int bIndex = aFilterOptions.indexOf("PDFVEREND");
+ OUString sPdfVer = aFilterOptions.copy(aIndex+8, bIndex-(aIndex+8));
+
+ OUString temp = aFilterOptions.copy(0, aIndex);
+ aFilterOptions = temp + aFilterOptions.copy(bIndex+9);
+
+ if (sPdfVer.equalsIgnoreAsciiCase("PDF/A-1b"))
+ pdfVer = 1;
+ else if (sPdfVer.equalsIgnoreAsciiCase("PDF/A-2b"))
+ pdfVer = 2;
+ else if (sPdfVer.equalsIgnoreAsciiCase("PDF/A-3b"))
+ pdfVer = 3;
+ else if (sPdfVer.equalsIgnoreAsciiCase("PDF-1.5"))
+ pdfVer = 15;
+ else if (sPdfVer.equalsIgnoreAsciiCase("PDF-1.6"))
+ pdfVer = 16;
+ else
+ {
+ SetLastExceptionMsg("wrong PDF version");
+ return false;
+ }
+ }
+
// 'TakeOwnership' == this is a 'real' SaveAs (that is, the document
// gets a new name). When this is not provided, the meaning of
// saveAs() is more like save-a-copy, which allows saving to any
@@ -2684,6 +2807,9 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
if (bFullSheetPreview)
aFilterDataMap["SinglePageSheets"] <<= true;
+ if (pdfVer)
+ aFilterDataMap["SelectPdfVersion"] <<= pdfVer;
+
if (!aFilterDataMap.empty())
{
aSaveMediaDescriptor["FilterData"] <<= aFilterDataMap.getAsConstPropertyValueList();
@@ -2743,6 +2869,7 @@ static void doc_iniUnoCommands ()
OUString(".uno:IncrementIndent"),
OUString(".uno:Italic"),
OUString(".uno:JustifyPara"),
+ OUString(".uno:JumpToMark"),
OUString(".uno:OutlineFont"),
OUString(".uno:LeftPara"),
OUString(".uno:LanguageStatus"),
@@ -2759,6 +2886,9 @@ static void doc_iniUnoCommands ()
OUString(".uno:InsertPage"),
OUString(".uno:DeletePage"),
OUString(".uno:DuplicatePage"),
+ OUString(".uno:InsertSlide"),
+ OUString(".uno:DeleteSlide"),
+ OUString(".uno:DuplicateSlide"),
OUString(".uno:Cut"),
OUString(".uno:Copy"),
OUString(".uno:Paste"),
@@ -3331,6 +3461,7 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
int nOrigPart = 0;
const bool isText = (doc_getDocumentType(pThis) == LOK_DOCTYPE_TEXT);
int nViewId = nOrigViewId;
+ int nLastNonEditorView = nViewId;
if (!isText)
{
// Check if just switching to another view is enough, that has
@@ -3340,9 +3471,15 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
SfxViewShell* pViewShell = SfxViewShell::GetFirst();
while (pViewShell)
{
- if (pViewShell->getPart() == nPart)
+ bool bIsInEdit = pViewShell->GetDrawView() &&
+ pViewShell->GetDrawView()->GetTextEditOutliner();
+ if (!bIsInEdit)
+ nLastNonEditorView = pViewShell->GetViewShellId().get();
+
+ if (pViewShell->getPart() == nPart && !bIsInEdit)
{
nViewId = static_cast<sal_Int32>(pViewShell->GetViewShellId());
+ nLastNonEditorView = nViewId;
doc_setView(pThis, nViewId);
break;
}
@@ -3350,6 +3487,14 @@ static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
}
}
+ // if not found view with correct part - at least avoid rendering active textbox
+ SfxViewShell* pCurrentViewShell = SfxViewShell::Current();
+ if (pCurrentViewShell && pCurrentViewShell->GetDrawView() &&
+ pCurrentViewShell->GetDrawView()->GetTextEditOutliner())
+ {
+ doc_setView(pThis, nLastNonEditorView);
+ }
+
nOrigPart = doc_getPart(pThis);
if (nPart != nOrigPart)
{
@@ -3554,6 +3699,12 @@ static void doc_postKeyEvent(LibreOfficeKitDocument* pThis, int nType, int nChar
}
}
+static void doc_setBlockedCommandList(LibreOfficeKitDocument* /*pThis*/, int nViewId, const char* bolckedCommandList)
+{
+ SolarMutexGuard aGuard;
+ SfxLokHelper::setBlockedCommandList(nViewId, bolckedCommandList);
+}
+
static void doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsigned nWindowId, int nType, const char* pText)
{
comphelper::ProfileZone aZone("doc_postWindowExtTextInputEvent");
@@ -3710,6 +3861,7 @@ static size_t doc_renderShapeSelection(LibreOfficeKitDocument* pThis, char** pOu
}
aMediaDescriptor["SelectionOnly"] <<= true;
aMediaDescriptor["OutputStream"] <<= xOut;
+ aMediaDescriptor["IsPreview"] <<= true; // will down-scale graphics
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
@@ -3904,6 +4056,7 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, const char *pOption, const c
{
if (strcmp(pValue, "start") == 0)
{
+ comphelper::TraceEvent::setBufferSizeAndCallback(100, TraceEventDumper::flushRecordings);
comphelper::TraceEvent::startRecording();
if (traceEventDumper == nullptr)
traceEventDumper = new TraceEventDumper();
@@ -4749,43 +4902,25 @@ static char* getFonts (const char* pCommand)
static char* getFontSubset (const OString& aFontName)
{
OUString aFoundFont(::rtl::Uri::decode(OStringToOUString(aFontName, RTL_TEXTENCODING_UTF8), rtl_UriDecodeStrict, RTL_TEXTENCODING_UTF8));
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(
- pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
- const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
boost::property_tree::ptree aTree;
aTree.put("commandName", ".uno:FontSubset");
boost::property_tree::ptree aValues;
- if ( pList && !aFoundFont.isEmpty() )
+ if (const vcl::Font* pFont = FindFont(aFoundFont))
{
- sal_uInt16 nFontCount = pList->GetFontNameCount();
- sal_uInt16 nItFont = 0;
- for (; nItFont < nFontCount; ++nItFont)
- {
- if (aFoundFont == pList->GetFontName(nItFont).GetFamilyName())
- {
- break;
- }
- }
+ FontCharMapRef xFontCharMap (new FontCharMap());
+ auto aDevice(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
- if ( nItFont < nFontCount )
- {
- FontCharMapRef xFontCharMap (new FontCharMap());
- auto aDevice(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
- const vcl::Font& aFont(pList->GetFontName(nItFont));
+ aDevice->SetFont(*pFont);
+ aDevice->GetFontCharMap(xFontCharMap);
+ SubsetMap aSubMap(xFontCharMap);
- aDevice->SetFont(aFont);
- aDevice->GetFontCharMap(xFontCharMap);
- SubsetMap aSubMap(xFontCharMap);
-
- for (auto const& subset : aSubMap.GetSubsetMap())
- {
- boost::property_tree::ptree aChild;
- aChild.put("", static_cast<int>(ublock_getCode(subset.GetRangeMin())));
- aValues.push_back(std::make_pair("", aChild));
- }
+ for (auto const& subset : aSubMap.GetSubsetMap())
+ {
+ boost::property_tree::ptree aChild;
+ aChild.put("", static_cast<int>(ublock_getCode(subset.GetRangeMin())));
+ aValues.push_back(std::make_pair("", aChild));
}
}
@@ -5406,98 +5541,80 @@ unsigned char* doc_renderFontOrientation(SAL_UNUSED_PARAMETER LibreOfficeKitDocu
SolarMutexGuard aGuard;
SetLastExceptionMsg();
- OString aSearchedFontName(pFontName);
- OUString aText(OStringToOUString(pChar, RTL_TEXTENCODING_UTF8));
- SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SvxFontListItem* pFonts = static_cast<const SvxFontListItem*>(
- pDocSh->GetItem(SID_ATTR_CHAR_FONTLIST));
- const FontList* pList = pFonts ? pFonts->GetFontList() : nullptr;
-
const int nDefaultFontSize = 25;
- if ( pList )
- {
- sal_uInt16 nFontCount = pList->GetFontNameCount();
- for (sal_uInt16 i = 0; i < nFontCount; ++i)
- {
- const FontMetric& rFontMetric = pList->GetFontName(i);
- const OUString& aFontName = rFontMetric.GetFamilyName();
- if (aSearchedFontName != aFontName.toUtf8())
- continue;
-
- if (aText.isEmpty())
- aText = rFontMetric.GetFamilyName();
+ auto aFont = FindFont_FallbackToDefault(OStringToOUString(pFontName, RTL_TEXTENCODING_UTF8));
- auto aDevice(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
- ::tools::Rectangle aRect;
- vcl::Font aFont(rFontMetric);
- aFont.SetFontSize(Size(0, nDefaultFontSize));
- aFont.SetOrientation(pOrientation);
- aDevice->SetFont(aFont);
- aDevice->GetTextBoundRect(aRect, aText);
- if (aRect.IsEmpty())
- break;
+ OUString aText(OStringToOUString(pChar, RTL_TEXTENCODING_UTF8));
+ if (aText.isEmpty())
+ aText = aFont.GetFamilyName();
+
+ auto aDevice(VclPtr<VirtualDevice>::Create(DeviceFormat::DEFAULT));
+ ::tools::Rectangle aRect;
+ aFont.SetFontSize(Size(0, nDefaultFontSize));
+ aFont.SetOrientation(pOrientation);
+ aDevice->SetFont(aFont);
+ aDevice->GetTextBoundRect(aRect, aText);
+ if (aRect.IsEmpty())
+ return nullptr;
- int nFontWidth = aRect.BottomRight().X() + 1;
- int nFontHeight = aRect.BottomRight().Y() + 1;
+ int nFontWidth = aRect.BottomRight().X() + 1;
+ int nFontHeight = aRect.BottomRight().Y() + 1;
- if (!(nFontWidth > 0 && nFontHeight > 0))
- break;
+ if (!(nFontWidth > 0 && nFontHeight > 0))
+ return nullptr;
- if (*pFontWidth > 0 && *pFontHeight > 0)
- {
- double fScaleX = *pFontWidth / static_cast<double>(nFontWidth) / 1.5;
- double fScaleY = *pFontHeight / static_cast<double>(nFontHeight) / 1.5;
+ if (*pFontWidth > 0 && *pFontHeight > 0)
+ {
+ double fScaleX = *pFontWidth / static_cast<double>(nFontWidth) / 1.5;
+ double fScaleY = *pFontHeight / static_cast<double>(nFontHeight) / 1.5;
- double fScale = std::min(fScaleX, fScaleY);
+ double fScale = std::min(fScaleX, fScaleY);
- if (fScale >= 1.0)
- {
- int nFontSize = fScale * nDefaultFontSize;
- aFont.SetFontSize(Size(0, nFontSize));
- aDevice->SetFont(aFont);
- }
+ if (fScale >= 1.0)
+ {
+ int nFontSize = fScale * nDefaultFontSize;
+ aFont.SetFontSize(Size(0, nFontSize));
+ aDevice->SetFont(aFont);
+ }
- aRect = tools::Rectangle(0, 0, *pFontWidth, *pFontHeight);
+ aRect = tools::Rectangle(0, 0, *pFontWidth, *pFontHeight);
- nFontWidth = *pFontWidth;
- nFontHeight = *pFontHeight;
+ nFontWidth = *pFontWidth;
+ nFontHeight = *pFontHeight;
- }
+ }
- unsigned char* pBuffer = static_cast<unsigned char*>(malloc(4 * nFontWidth * nFontHeight));
- if (!pBuffer)
- break;
+ unsigned char* pBuffer = static_cast<unsigned char*>(malloc(4 * nFontWidth * nFontHeight));
+ if (!pBuffer)
+ return nullptr;
- memset(pBuffer, 0, nFontWidth * nFontHeight * 4);
- aDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
- aDevice->SetOutputSizePixelScaleOffsetAndBuffer(
- Size(nFontWidth, nFontHeight), Fraction(1.0), Point(),
- pBuffer);
+ memset(pBuffer, 0, nFontWidth * nFontHeight * 4);
+ aDevice->SetBackground(Wallpaper(COL_TRANSPARENT));
+ aDevice->SetOutputSizePixelScaleOffsetAndBuffer(
+ Size(nFontWidth, nFontHeight), Fraction(1.0), Point(),
+ pBuffer);
- if (*pFontWidth > 0 && *pFontHeight > 0)
- {
- DrawTextFlags const nStyle =
- DrawTextFlags::Center
- | DrawTextFlags::VCenter
- | DrawTextFlags::MultiLine
- | DrawTextFlags::WordBreak;// | DrawTextFlags::WordBreakHyphenation ;
+ if (*pFontWidth > 0 && *pFontHeight > 0)
+ {
+ DrawTextFlags const nStyle =
+ DrawTextFlags::Center
+ | DrawTextFlags::VCenter
+ | DrawTextFlags::MultiLine
+ | DrawTextFlags::WordBreak;// | DrawTextFlags::WordBreakHyphenation ;
- aDevice->DrawText(aRect, aText, nStyle);
- }
- else
- {
- *pFontWidth = nFontWidth;
- *pFontHeight = nFontHeight;
+ aDevice->DrawText(aRect, aText, nStyle);
+ }
+ else
+ {
+ *pFontWidth = nFontWidth;
+ *pFontHeight = nFontHeight;
- aDevice->DrawText(Point(0,0), aText);
- }
+ aDevice->DrawText(Point(0,0), aText);
+ }
- return pBuffer;
- }
- }
- return nullptr;
+ return pBuffer;
}
@@ -6042,7 +6159,7 @@ static void lo_runLoop(LibreOfficeKit* /*pThis*/,
static bool bInitialized = false;
-static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit::statusIndicatorCallbackType type, int percent)
+static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit::statusIndicatorCallbackType type, int percent, const char* pText)
{
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(data);
@@ -6052,7 +6169,7 @@ static void lo_status_indicator_callback(void *data, comphelper::LibreOfficeKit:
switch (type)
{
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::Start:
- pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, nullptr, pLib->mpCallbackData);
+ pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_START, pText, pLib->mpCallbackData);
break;
case comphelper::LibreOfficeKit::statusIndicatorCallbackType::SetValue:
pLib->mpCallback(LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE,
@@ -6173,6 +6290,25 @@ static void activateNotebookbar(const OUString& rApp)
aAppNode.commit();
}
}
+void setCertificateDir()
+{
+ const char* pEnvVarString = ::getenv("LO_CERTIFICATE_DATABASE_PATH");
+ if (pEnvVarString)
+ {
+ OUString aCertificateDatabasePath = OStringToOUString(pEnvVarString, RTL_TEXTENCODING_UTF8);
+ try
+ {
+ std::shared_ptr<comphelper::ConfigurationChanges> pBatch(comphelper::ConfigurationChanges::create());
+ officecfg::Office::Common::Security::Scripting::CertDir::set(aCertificateDatabasePath, pBatch);
+ officecfg::Office::Common::Security::Scripting::ManualCertDir::set(aCertificateDatabasePath, pBatch);
+ pBatch->commit();
+ }
+ catch (uno::Exception const& rException)
+ {
+ SAL_WARN("lok", "Failed to set the NSS certificate database directory: " << rException.Message);
+ }
+ }
+}
static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char* pUserProfileUrl)
{
@@ -6481,6 +6617,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
#endif
+ setCertificateDir();
+
if (bNotebookbar)
{
activateNotebookbar("Writer");
diff --git a/download.lst b/download.lst
index ffef9c196af1..cbdcccf7fb55 100644
--- a/download.lst
+++ b/download.lst
@@ -12,8 +12,8 @@ export BREAKPAD_SHA256SUM := 7060149be16a8789b0ccf596bdeaf63115f03f520acb508f72a
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 BZIP2_SHA256SUM := ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
+export BZIP2_TARBALL := bzip2-1.0.8.tar.gz
export CAIRO_SHA256SUM := 5e7b29b3f113ef870d1e3ecf8adf21f923396401604bda16d44be45e66052331
export CAIRO_VERSION_MICRO := 0
export CAIRO_TARBALL := cairo-1.16.$(CAIRO_VERSION_MICRO).tar.xz
@@ -29,8 +29,14 @@ export CPPUNIT_SHA256SUM := 3d569869d27b48860210c758c4f313082103a5e58219a7669b52
export CPPUNIT_TARBALL := cppunit-1.14.0.tar.gz
export CT2N_SHA256SUM := 71b238efd2734be9800af07566daea8d6685aeed28db5eb5fa0e6453f4d85de3
export CT2N_TARBALL := 1f467e5bb703f12cbbb09d5cf67ecf4a-converttexttonumber-1-5-0.oxt
-export CURL_SHA256SUM := cdf18794393d8bead915312708a9e5d819c6e9919de14b20d5c8e7987abd9772
-export CURL_TARBALL := curl-7.71.0.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
+export CURL_SHA256SUM := 0a381cd82f4d00a9a334438b8ca239afea5bfefcfa9a1025f2bf118e79e0b5f0
+export CURL_TARBALL := curl-8.0.1.tar.xz
+# three static lines
+# so that git cherry-pick
+# will not run into conflicts
export EBOOK_SHA256SUM := 7e8d8ff34f27831aca3bc6f9cc532c2f90d2057c778963b884ff3d1e34dfe1f9
export EBOOK_TARBALL := libe-book-0.1.3.tar.xz
export EPOXY_SHA256SUM := 002958c5528321edd53440235d3c44e71b5b1e09b9177e8daf677450b6c4433d
@@ -39,11 +45,11 @@ export EPM_SHA256SUM := b3fc4c5445de6c9a801504a3ea3efb2d4ea9d5a622c9427e716736e7
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_SHA256SUM := b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a
+export ETONYEK_VERSION_MICRO := 10
export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := 2f9b6a580b94577b150a7d5617ad4643a4301a6616ff459307df3e225bcfbf40
-export EXPAT_TARBALL := expat-2.4.1.tar.bz2
+export EXPAT_SHA256SUM := ef2420f0232c087801abf705e89ae65f6257df6b7931d37846a193ef2e8cdcbe
+export EXPAT_TARBALL := expat-2.5.0.tar.xz
export FIREBIRD_SHA256SUM := 6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
export FONTCONFIG_SHA256SUM := 19e5b1bc9d013a52063a44e1307629711f0bfef35b9aca16f9c793971e2eb1e5
@@ -180,12 +186,12 @@ export LIBTOMMATH_SHA256SUM := 083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
export LIBTOMMATH_TARBALL := ltm-1.0.zip
export XMLSEC_SHA256SUM := 13eec4811ea30e3f0e16a734d1dbf7f9d246a71d540b48d143a07b489f6222d4
export XMLSEC_TARBALL := xmlsec1-1.2.28.tar.gz
-export LIBXML_SHA256SUM := c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92
-export LIBXML_VERSION_MICRO := 12
-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 LIBXML_SHA256SUM := 5d2cc3d78bec3dbe212a9d7fa629ada25a7da928af432c93060ff5c17ee28a9c
+export LIBXML_VERSION_MICRO := 3
+export LIBXML_TARBALL := libxml2-2.10.$(LIBXML_VERSION_MICRO).tar.xz
+export LIBXSLT_SHA256SUM := 8247f33e9a872c6ac859aa45018bc4c4d00b97e2feac9eebc10c93ce1f34dd79
+export LIBXSLT_VERSION_MICRO := 35
+export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.xz
export LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695
export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
export LXML_SHA256SUM := 940caef1ec7c78e0c34b0f6b94fe42d0f2022915ffc78643d28538a5cfd0f40e
@@ -198,26 +204,26 @@ export MDNSRESPONDER_SHA256SUM := e777b4d7dbf5eb1552cb80090ad1ede319067ab6e45e39
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_SHA256SUM := 0c639edba5297bde5575193bf5b5f2f469956beaff5c0206d91ce9df6bde1868
+export MWAW_VERSION_MICRO := 16
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 NSS_SHA256SUM := fcfa26d2738ec5b0cf72ab4be784eac832a75132cda2e295799c04d62a93607a
+export NSS_TARBALL := nss-3.88.1-with-nspr-4.35.tar.gz
+export ODFGEN_SHA256SUM := 55200027fd46623b9bdddd38d275e7452d1b0ff8aeddcad6f9ae6dc25f610625
+export ODFGEN_VERSION_MICRO := 8
+export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.xz
export ODFVALIDATOR_SHA256SUM := d55495ab3a86544650587de2a72180ddf8bfc6376d14ddfa923992dbc86a06e0
export ODFVALIDATOR_JAR := odfvalidator-0.9.0-RC2-SNAPSHOT-jar-with-dependencies-2726ab578664434a545f8379a01a9faffac0ae73.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 OPENLDAP_SHA256SUM := 99f37d6747d88206c470067eda624d5e48c1011e943ec0ab217bae8712e22f34
+export OPENLDAP_TARBALL := openldap-2.4.59.tgz
+export OPENSSL_SHA256SUM := 8dee9b24bdb1dcbf0c3d1e9b02fb8f6bf22165e807f45adeb7c9677536859d3b
+export OPENSSL_TARBALL := openssl-1.1.1t.tar.gz
export ORCUS_SHA256SUM := 0dd26f3f2e611c51df9ee02d6dbf08887989eaa417b73f6877cd0d94df795fc2
export ORCUS_TARBALL := liborcus-0.15.3.tar.gz
export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb
@@ -230,12 +236,12 @@ export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
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 := a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126
-export POSTGRESQL_TARBALL := postgresql-9.2.24.tar.bz2
-export PYTHON_SHA256SUM := f8d82e7572c86ec9d55c8627aae5040124fd2203af400c383c821b980306ee6b
-export PYTHON_TARBALL := Python-3.7.10.tar.xz
+export POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb30d5852a41e2e
+export POPPLER_TARBALL := poppler-22.09.0.tar.xz
+export POSTGRESQL_SHA256SUM := 5bbcf5a56d85c44f3a8b058fb46862ff49cbc91834d07e295d02e6de3c216df2
+export POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2
+export PYTHON_SHA256SUM := d85dbb3774132473d8081dcb158f34a10ccad7a90b96c7e50ea4bb61f5ce4562
+export PYTHON_TARBALL := Python-3.8.16.tar.xz
export QRCODEGEN_SHA256SUM := fcdf9fd69fde07ae4dca2351d84271a9de8093002f733b77c70f52f1630f6e4a
export QRCODEGEN_TARBALL := QR-Code-generator-1.4.0.tar.gz
export QXP_SHA256SUM := e137b6b110120a52c98edd02ebdc4095ee08d0d5295a94316a981750095a945c
@@ -275,8 +281,8 @@ export WPS_VERSION_MICRO := 10
export WPS_TARBALL := libwps-0.4.$(WPS_VERSION_MICRO).tar.xz
export XSLTML_SHA256SUM := 75823776fb51a9c526af904f1503a7afaaab900fba83eda64f8a41073724c870
export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
-export ZLIB_SHA256SUM := 4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
-export ZLIB_TARBALL := zlib-1.2.11.tar.xz
+export ZLIB_SHA256SUM := d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98
+export ZLIB_TARBALL := zlib-1.2.13.tar.xz
export ZMF_SHA256SUM := 27051a30cb057fdb5d5de65a1f165c7153dc76e27fe62251cbb86639eb2caf22
export ZMF_TARBALL := libzmf-0.0.2.tar.xz
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/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index e76d8eb60374..3a179d009391 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1096,16 +1096,10 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aPopupMenu->RemoveItem(nAutoCorrId);
aPopupMenu->RemoveItem(nAutoCorrectDlgId);
- // For mobile phones, send the context menu structure
- const SfxViewShell* pViewShell = SfxViewShell::Current();
- if (pViewShell && pViewShell->isLOKMobilePhone())
- {
- LOKSendSpellPopupMenu(aPopupMenu, nGuessLangWord, nGuessLangPara, nWords);
- return;
- }
- else // For desktop or tablet, we use the tunneled dialog
- aPopupMenu->SetLOKNotifier(SfxViewShell::Current());
+ LOKSendSpellPopupMenu(aPopupMenu, nGuessLangWord, nGuessLangPara, nWords);
+ return;
}
+
sal_uInt16 nId = aPopupMenu->Execute(pImpEditView->GetWindow(), aTempRect, PopupMenuFlags::NoMouseUpClose);
aPaM2 = pImpEditView->pEditEngine->pImpEditEngine->CreateEditPaM(aP2);
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index ca12e22fc197..c94197ba8853 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1998,7 +1998,7 @@ void ImpEditView::DeselectAll()
SetEditSelection(aNewSelection);
// const_cast<EditPaM&>(GetEditSelection().Min()) = GetEditSelection().Max();
- if (comphelper::LibreOfficeKit::isActive() && mpViewShell)
+ if (comphelper::LibreOfficeKit::isActive() && mpViewShell && pOutWin)
{
VclPtr<vcl::Window> pParent = pOutWin->GetParentWithLOKNotifier();
if (pParent && pParent->GetLOKWindowId())
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 4796732b2c74..246bdc370be6 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -1736,13 +1736,6 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan
if( !xRange.is() )
return;
- ESelection aSelection;
- if (GetEditSource())
- {
- ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
- SetSelection( aSelection );
- }
-
SvxUnoTextRangeBase* pRange = comphelper::getUnoTunnelImplementation<SvxUnoTextRange>( xRange );
if(pRange)
{
@@ -1757,6 +1750,13 @@ void SAL_CALL SvxUnoTextBase::insertString( const uno::Reference< text::XTextRan
pRange->setString( aString );
pRange->CollapseToEnd();
+
+ ESelection aSelection;
+ if (GetEditSource())
+ {
+ ::GetSelection( aSelection, GetEditSource()->GetTextForwarder() );
+ SetSelection( aSelection );
+ }
}
}
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index e6e5bec2a316..b402dff22042 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -155,6 +155,37 @@ void OCommonEmbeddedObject::StateChangeNotification_Impl( bool bBeforeChange, sa
}
}
+void OCommonEmbeddedObject::SetInplaceActiveState()
+{
+ if ( !m_xClientSite.is() )
+ throw embed::WrongStateException( "client site not set, yet", *this );
+
+ uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY );
+ if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() )
+ throw embed::WrongStateException(); //TODO: can't activate inplace
+ xInplaceClient->activatingInplace();
+
+ uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW );
+
+ m_xClientWindow = xClientWindowSupplier->getWindow();
+ m_aOwnRectangle = xInplaceClient->getPlacement();
+ m_aClipRectangle = xInplaceClient->getClipRectangle();
+ awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle );
+
+ // create own window based on the client window
+ // place and resize the window according to the rectangles
+ uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW );
+
+ // dispatch provider may not be provided
+ uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider();
+ bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP );
+ m_nObjectState = embed::EmbedStates::INPLACE_ACTIVE;
+ if ( !bOk )
+ {
+ SwitchStateTo_Impl( embed::EmbedStates::RUNNING );
+ throw embed::WrongStateException(); //TODO: can't activate inplace
+ }
+}
void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
@@ -228,34 +259,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
{
if ( nNextState == embed::EmbedStates::INPLACE_ACTIVE )
{
- if ( !m_xClientSite.is() )
- throw embed::WrongStateException( "client site not set, yet", *this );
-
- uno::Reference< embed::XInplaceClient > xInplaceClient( m_xClientSite, uno::UNO_QUERY );
- if ( !xInplaceClient.is() || !xInplaceClient->canInplaceActivate() )
- throw embed::WrongStateException(); //TODO: can't activate inplace
- xInplaceClient->activatingInplace();
-
- uno::Reference< embed::XWindowSupplier > xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW );
-
- m_xClientWindow = xClientWindowSupplier->getWindow();
- m_aOwnRectangle = xInplaceClient->getPlacement();
- m_aClipRectangle = xInplaceClient->getClipRectangle();
- awt::Rectangle aRectangleToShow = GetRectangleInterception( m_aOwnRectangle, m_aClipRectangle );
-
- // create own window based on the client window
- // place and resize the window according to the rectangles
- uno::Reference< awt::XWindowPeer > xClientWindowPeer( m_xClientWindow, uno::UNO_QUERY_THROW );
-
- // dispatch provider may not be provided
- uno::Reference< frame::XDispatchProvider > xContainerDP = xInplaceClient->getInplaceDispatchProvider();
- bool bOk = m_xDocHolder->ShowInplace( xClientWindowPeer, aRectangleToShow, xContainerDP );
- m_nObjectState = nNextState;
- if ( !bOk )
- {
- SwitchStateTo_Impl( embed::EmbedStates::RUNNING );
- throw embed::WrongStateException(); //TODO: can't activate inplace
- }
+ SetInplaceActiveState();
}
else if ( nNextState == embed::EmbedStates::ACTIVE )
{
diff --git a/embeddedobj/source/commonembedding/specialobject.cxx b/embeddedobj/source/commonembedding/specialobject.cxx
index 683fe0aab3f2..c17a39accf2c 100644
--- a/embeddedobj/source/commonembedding/specialobject.cxx
+++ b/embeddedobj/source/commonembedding/specialobject.cxx
@@ -47,6 +47,7 @@ uno::Any SAL_CALL OSpecialEmbeddedObject::queryInterface( const uno::Type& rType
uno::Any aReturn = ::cppu::queryInterface( rType,
static_cast< embed::XEmbeddedObject* >( this ),
static_cast< embed::XInplaceObject* >( this ),
+ static_cast< embed::XCommonEmbedPersist* >( static_cast< embed::XEmbedPersist* >( this ) ),
static_cast< embed::XVisualObject* >( this ),
static_cast< embed::XClassifiedObject* >( this ),
static_cast< embed::XComponentSupplier* >( this ),
@@ -160,4 +161,12 @@ void SAL_CALL OSpecialEmbeddedObject::doVerb( sal_Int32 nVerbID )
OCommonEmbeddedObject::doVerb( nVerbID );
}
+void SAL_CALL OSpecialEmbeddedObject::reload(
+ const uno::Sequence< beans::PropertyValue >&,
+ const uno::Sequence< beans::PropertyValue >&)
+{
+ // Allow IFrames to reload their content
+ SetInplaceActiveState();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/embeddedobj/source/inc/commonembobj.hxx b/embeddedobj/source/inc/commonembobj.hxx
index b2c9acd9ec1e..73282a00deac 100644
--- a/embeddedobj/source/inc/commonembobj.hxx
+++ b/embeddedobj/source/inc/commonembobj.hxx
@@ -226,6 +226,9 @@ private:
const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
const css::uno::Sequence< css::beans::PropertyValue >& lObjArgs );
+protected:
+ void SetInplaceActiveState();
+
public:
OCommonEmbeddedObject(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
diff --git a/embeddedobj/source/inc/specialobject.hxx b/embeddedobj/source/inc/specialobject.hxx
index 32ad61a7a582..ce5c01b35ae7 100644
--- a/embeddedobj/source/inc/specialobject.hxx
+++ b/embeddedobj/source/inc/specialobject.hxx
@@ -48,6 +48,12 @@ 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/boost/UnpackedTarball_boost.mk b/external/boost/UnpackedTarball_boost.mk
index 33f2f2cd9b50..c9ba682af61e 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -16,6 +16,8 @@ boost_patches += boost.6142.warnings.patch.1
boost_patches += boost.utility.Wundef.warnings.patch
boost_patches += boost.noiconv.patch
+boost_patches += boost.between.warning.patch
+boost_patches += boost.fallback.encoding.patch
boost_patches += ubsan.patch.0
boost_patches += rtti.patch.0
diff --git a/external/boost/boost.between.warning.patch b/external/boost/boost.between.warning.patch
new file mode 100644
index 000000000000..bb4535708549
--- /dev/null
+++ b/external/boost/boost.between.warning.patch
@@ -0,0 +1,13 @@
+diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
+--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
++++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
+@@ -58,6 +58,9 @@
+ return cvt->convert(begin,end);
+ #endif
+ #endif
++ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
++ if (to_charset && from_charset && !strcmp(to_charset, from_charset))
++ return std::string(begin, end - begin);
+ throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
+ }
+
diff --git a/external/boost/boost.fallback.encoding.patch b/external/boost/boost.fallback.encoding.patch
new file mode 100644
index 000000000000..51ac7fc72308
--- /dev/null
+++ b/external/boost/boost.fallback.encoding.patch
@@ -0,0 +1,13 @@
+--- foo/misc/boost.orig/libs/locale/src/util/locale_data.cpp.new 2022-02-17 22:41:27.730549039 +0000
++++ foo/misc/boost/libs/locale/src/util/locale_data.cpp
+@@ -18,8 +18,8 @@
+ language = "C";
+ country.clear();
+ variant.clear();
+- encoding = "us-ascii";
+- utf8=false;
++ encoding = "UTF-8";
++ utf8=true;
+ parse_from_lang(locale_name);
+ }
+
diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk
index 8da569e3e0cf..82979b110558 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -14,13 +14,13 @@ $(eval $(call gb_ExternalPackage_use_external_project,curl,curl))
ifneq ($(DISABLE_DYNLOADING),TRUE)
ifeq ($(COM),MSC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-ipv6-sspi-winssl/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll,builds/libcurl-vc12-$(if $(filter X86_64,$(CPUNAME)),x64,x86)-$(if $(MSVC_USE_DEBUG_RUNTIME),debug,release)-dll-zlib-static-ipv6-sspi-schannel/bin/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),_debug).dll))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
else ifeq ($(OS),AIX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so,lib/.libs/libcurl.so.4))
else
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.6.0))
+$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.so.4,lib/.libs/libcurl.so.4.8.0))
endif
endif # $(DISABLE_DYNLOADING)
diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk
index 5cbedac82d1a..43bb1cad0b93 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -35,21 +35,22 @@ ifeq ($(SYSTEM_NSS),)
curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss
endif
-# use --with-darwinssl on macOS >10.5 and iOS to get a native UI for SSL certs for CMIS usage
+# use --with-secure-transport on macOS >10.5 and iOS to get a native UI for SSL certs for CMIS usage
# use --with-nss only on platforms other than macOS and iOS
$(call gb_ExternalProject_get_state_target,curl,build):
$(call gb_ExternalProject_run,build,\
./configure \
$(if $(filter iOS MACOSX,$(OS)),\
- --with-darwinssl,\
- $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
- --without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
+ --with-secure-transport,\
+ $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") --with-nss-deprecated,--without-nss)) \
+ --without-openssl --without-gnutls --without-polarssl --without-cyassl --without-axtls --without-mbedtls \
--enable-ftp --enable-http --enable-ipv6 \
--without-libidn2 --without-libpsl --without-librtmp \
--without-libssh2 --without-metalink --without-nghttp2 \
--without-libssh --without-brotli \
--without-ngtcp2 --without-quiche \
- --disable-ares \
+ --without-zstd --without-hyper --without-gsasl --without-gssapi \
+ --disable-mqtt --disable-ares \
--disable-dict --disable-file --disable-gopher --disable-imap \
--disable-ldap --disable-ldaps --disable-manual --disable-pop3 \
--disable-rtsp --disable-smb --disable-smtp --disable-telnet \
@@ -84,6 +85,7 @@ $(call gb_ExternalProject_get_state_target,curl,build):
ENABLE_IPV6=yes \
ENABLE_SSPI=yes \
ENABLE_WINSSL=yes \
+ WITH_ZLIB=static \
,winbuild)
endif
diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk
index 6171f17cba48..a5421d253871 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -21,10 +21,10 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
external/curl/curl-msvc.patch.1 \
+ external/curl/curl-msvc-zlib.patch.1 \
external/curl/curl-msvc-disable-protocols.patch.1 \
external/curl/curl-7.26.0_win-proxy.patch \
external/curl/zlib.patch.0 \
- external/curl/curl-ios.patch.1 \
))
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-ios.patch.1 b/external/curl/curl-ios.patch.1
deleted file mode 100644
index 1c8fd8f70566..000000000000
--- a/external/curl/curl-ios.patch.1
+++ /dev/null
@@ -1,17 +0,0 @@
-# -*- Mode: Diff -*-
-#
-# We don't want curl's configure script to add a -mmacosx-version-min
-# option when it is for iOS we are building. In that case already $CC
-# contains a -miphoneos-version-min option.
-
---- curl/configure
-+++ curl/configure
-@@ -18976,7 +18976,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for *version-min in CFLAGS" >&5
- $as_echo_n "checking for *version-min in CFLAGS... " >&6; }
- min=""
-- if test -z "$(echo $CFLAGS | grep m.*os.*-version-min)"; then
-+ if test -z "$(echo $CC $CFLAGS | grep m.*os.*-version-min)"; then
- min="-mmacosx-version-min=10.8"
- CFLAGS="$CFLAGS $min"
- fi
diff --git a/external/curl/curl-msvc-disable-protocols.patch.1 b/external/curl/curl-msvc-disable-protocols.patch.1
index c8747a5fcc1d..71ff0c01a028 100644
--- a/external/curl/curl-msvc-disable-protocols.patch.1
+++ b/external/curl/curl-msvc-disable-protocols.patch.1
@@ -2,18 +2,19 @@ disable protocols nobody needs in MSVC build
--- curl/lib/config-win32.h.orig 2017-08-09 16:43:29.464000000 +0200
+++ curl/lib/config-win32.h 2017-08-09 16:47:38.549200000 +0200
-@@ -733,4 +733,19 @@
+@@ -654,4 +654,20 @@
# define ENABLE_IPV6 1
#endif
+#define CURL_DISABLE_DICT 1
+#define CURL_DISABLE_FILE 1
-+//#undef CURL_DISABLE_FTP
++#undef CURL_DISABLE_FTP
+#define CURL_DISABLE_GOPHER 1
-+//#undef CURL_DISABLE_HTTP
++#undef CURL_DISABLE_HTTP
+#define CURL_DISABLE_IMAP 1
+#define CURL_DISABLE_LDAP 1
+#define CURL_DISABLE_LDAPS 1
++#define CURL_DISABLE_MQTT 1
+#define CURL_DISABLE_POP3 1
+#define CURL_DISABLE_RTSP 1
+#define CURL_DISABLE_SMB 1
@@ -24,7 +25,7 @@ disable protocols nobody needs in MSVC build
#endif /* HEADER_CURL_CONFIG_WIN32_H */
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 23:41:21.393200000 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 23:34:16.028000000 +0200
-@@ -431,7 +431,7 @@
+@@ -562,7 +562,7 @@
EXE_OBJS = $(CURL_OBJS) $(CURL_DIROBJ)\curl.res
diff --git a/external/curl/curl-msvc-zlib.patch.1 b/external/curl/curl-msvc-zlib.patch.1
new file mode 100644
index 000000000000..a9ee0013d50b
--- /dev/null
+++ b/external/curl/curl-msvc-zlib.patch.1
@@ -0,0 +1,16 @@
+find internal zlib in nmake buildsystem
+
+--- curl/winbuild/MakefileBuild.vc.orig2 2021-10-27 20:44:48.685237000 +0200
++++ curl/winbuild/MakefileBuild.vc 2021-10-27 20:47:23.792407400 +0200
+@@ -244,8 +244,9 @@
+ ZLIB_LIB_DIR = $(ZLIB_PATH)\lib
+ ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ELSE
+-ZLIB_INC_DIR = $(DEVEL_INCLUDE)
+-ZLIB_LIB_DIR = $(DEVEL_LIB)
++ZLIB_INC_DIR = $(WORKDIR)/UnpackedTarball/zlib
++ZLIB_LIB_DIR = $(WORKDIR)/LinkTarget/StaticLibrary
++ZLIB_LFLAGS = $(ZLIB_LFLAGS) "/LIBPATH:$(ZLIB_LIB_DIR)"
+ !ENDIF
+
+ # Depending on how zlib is built the libraries have different names, we
diff --git a/external/curl/curl-msvc.patch.1 b/external/curl/curl-msvc.patch.1
index a5b79a8e9c49..54ad026ec8c7 100644
--- a/external/curl/curl-msvc.patch.1
+++ b/external/curl/curl-msvc.patch.1
@@ -2,7 +2,7 @@ MSVC: using SOLARINC
--- curl/winbuild/MakefileBuild.vc.orig 2017-10-23 16:36:07.713550851 +0200
+++ curl/winbuild/MakefileBuild.vc 2017-10-23 16:38:19.301547594 +0200
-@@ -60,7 +60,7 @@
+@@ -52,7 +52,7 @@
!ELSE
CC_NODEBUG = $(CC) /O2 /DNDEBUG
CC_DEBUG = $(CC) /Od /D_DEBUG /RTC1 /Z7 /LDd
@@ -11,7 +11,7 @@ MSVC: using SOLARINC
!ENDIF
LFLAGS = /nologo /machine:$(MACHINE)
-@@ -300,11 +300,11 @@
+@@ -426,11 +426,11 @@
# CURL_XX macros are for the curl.exe command
!IF "$(DEBUG)"=="yes"
diff --git a/external/curl/curl-nss.patch.1 b/external/curl/curl-nss.patch.1
index 69fde5f7f236..2e8766b3d45f 100644
--- a/external/curl/curl-nss.patch.1
+++ b/external/curl/curl-nss.patch.1
@@ -1,12 +1,17 @@
diff -ur curl.org/configure curl/configure
---- curl.org/configure 2016-03-13 15:14:07.177000076 +0100
-+++ curl/configure 2016-03-13 15:16:44.132000076 +0100
-@@ -24009,7 +24009,7 @@
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
- $as_echo "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
+--- curl.orig/configure 2023-02-20 16:11:55.000000000 +0900
++++ curl/configure 2023-02-23 15:40:58.617432471 +0900
+@@ -28675,7 +28675,12 @@
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Using hard-wired libraries and compilation flags for NSS." >&5
+ printf "%s\n" "$as_me: WARNING: Using hard-wired libraries and compilation flags for NSS." >&2;}
addld="-L$OPT_NSS/lib"
- addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4"
+ addlib="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lnssutil3"
++ case $host_os in
++ *android*)
++ addlib="${addlib} -llog"
++ ;;
++ esac
addcflags="-I$OPT_NSS/include"
version="unknown"
nssprefix=$OPT_NSS
diff --git a/external/curl/zlib.patch.0 b/external/curl/zlib.patch.0
index 189e820d1afa..b4442ba262d1 100644
--- a/external/curl/zlib.patch.0
+++ b/external/curl/zlib.patch.0
@@ -1,22 +1,22 @@
--- configure
+++ configure
-@@ -20709,7 +20709,6 @@
+@@ -23035,7 +23035,6 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
-ZLIB_LIBS=""
# Check whether --with-zlib was given.
- if test "${with_zlib+set}" = set; then :
-@@ -20718,6 +20719,7 @@
+ if test ${with_zlib+y}
+@@ -23045,6 +23044,7 @@
if test "$OPT_ZLIB" = "no" ; then
+ ZLIB_LIBS=""
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
- $as_echo "$as_me: WARNING: zlib disabled" >&2;}
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
+ printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
else
-@@ -20725,6 +20725,21 @@
+@@ -23052,6 +23052,21 @@
OPT_ZLIB=""
fi
@@ -38,8 +38,8 @@
if test -z "$OPT_ZLIB" ; then
if test -n "$PKG_CONFIG"; then
-@@ -21005,6 +21020,7 @@
- $as_echo "$as_me: found both libz and libz.h header" >&6;}
+@@ -23344,6 +23359,7 @@
+ printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
curl_zlib_msg="enabled"
fi
+ fi
@@ -48,14 +48,14 @@
if test x"$AMFIXLIB" = x1; then
--- configure.ac
+++ configure.ac
-@@ -880,19 +880,30 @@
+@@ -1243,19 +1243,30 @@
clean_CPPFLAGS=$CPPFLAGS
clean_LDFLAGS=$LDFLAGS
clean_LIBS=$LIBS
-ZLIB_LIBS=""
AC_ARG_WITH(zlib,
- AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
- AC_HELP_STRING([--without-zlib],[disable use of zlib]),
+ AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
+ AS_HELP_STRING([--without-zlib],[disable use of zlib]),
[OPT_ZLIB="$withval"])
if test "$OPT_ZLIB" = "no" ; then
@@ -80,7 +80,7 @@
if test -z "$OPT_ZLIB" ; then
CURL_CHECK_PKGCONFIG(zlib)
-@@ -975,6 +986,7 @@
+@@ -1336,6 +1347,7 @@
AC_MSG_NOTICE([found both libz and libz.h header])
curl_zlib_msg="enabled"
fi
diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
index bd4da1472fc8..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,17 +11,15 @@
# endif
#endif /* not defined XML_STATIC */
---- misc/expat-2.1.0/lib/xmlparse.c 2021-05-23 16:56:25.000000000 +0100
-+++ misc/build/expat-2.1.0/lib/xmlparse.c 2021-05-25 12:42:11.997173600 +0100
-@@ -92,6 +92,11 @@
+--- 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
- #include <expat_config.h>
-
-+#ifdef _WIN32
+ #ifdef _WIN32
++# undef HAVE_ARC4RANDOM_BUF
+# undef HAVE_GETRANDOM
+# undef HAVE_SYSCALL_GETRANDOM
-+#endif
-+
- #include "ascii.h"
- #include "expat.h"
- #include "siphash.h"
+ /* force stdlib to define rand_s() */
+ # if ! defined(_CRT_RAND_S)
+ # define _CRT_RAND_S
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk
index 8ecdf60e6f87..d7835622ca21 100644
--- a/external/gpgmepp/ExternalProject_gpgmepp.mk
+++ b/external/gpgmepp/ExternalProject_gpgmepp.mk
@@ -39,7 +39,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_
$(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \
$(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \
--host=$(gb_ExternalProject_gpgmepp_host) \
- RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \
+ RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor=$(call gb_Executable_get_target,cpp) --preprocessor-arg=-+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)' \
MAKE=$(MAKE) \
&& $(MAKE) \
)
diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 1b0468fc6f23..fc7ed88ac6d6 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -33,5 +33,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
external/gpgmepp/gcc9.patch \
external/gpgmepp/version.patch \
external/gpgmepp/ubsan.patch \
+ external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
new file mode 100644
index 000000000000..538a5264bed4
--- /dev/null
+++ b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
@@ -0,0 +1,32 @@
+From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001
+From: Jiri Kucera <sanczes@gmail.com>
+Date: Sun, 25 Jul 2021 11:35:54 +0200
+Subject: [PATCH] core: Support closefrom also for glibc.
+
+* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom.
+--
+
+Since 2.34, glibc introduces closefrom (the implementation
+follows *BSD standard).
+
+Signed-off-by: Werner Koch <wk@gnupg.org>
+---
+ src/posix-io.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/posix-io.c b/src/posix-io.c
+index e712ef28..2a3a81fc 100644
+--- a/src/posix-io.c
++++ b/src/posix-io.c
+@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
+ if (fd_list[i].fd > fd)
+ fd = fd_list[i].fd;
+ fd++;
+-#ifdef __sun
++#if defined(__sun) || defined(__GLIBC__)
+ closefrom (fd);
+ max_fds = fd;
+ #else /*!__sun */
+--
+2.11.0
+
diff --git a/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
new file mode 100644
index 000000000000..2aef204a26e1
--- /dev/null
+++ b/external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1
@@ -0,0 +1,29 @@
+From 62e803b36173fd096d7ad460dd1d1db9be542593 Mon Sep 17 00:00:00 2001
+From: Behdad Esfahbod <behdad@behdad.org>
+Date: Wed, 1 Jun 2022 07:38:21 -0600
+Subject: [PATCH] [sbix] Limit glyph extents
+
+Fixes https://github.com/harfbuzz/harfbuzz/issues/3557
+---
+ src/hb-ot-color-sbix-table.hh | 6 ++++++
+ test/fuzzing/fonts/sbix-extents.ttf | Bin 0 -> 582 bytes
+ 2 files changed, 6 insertions(+)
+ create mode 100644 test/fuzzing/fonts/sbix-extents.ttf
+
+diff --git a/src/hb-ot-color-sbix-table.hh b/src/hb-ot-color-sbix-table.hh
+index 9741ebd450..6efae43cda 100644
+--- a/src/hb-ot-color-sbix-table.hh
++++ b/src/hb-ot-color-sbix-table.hh
+@@ -298,6 +298,12 @@ struct sbix
+
+ const PNGHeader &png = *blob->as<PNGHeader>();
+
++ if (png.IHDR.height >= 65536 || png.IHDR.width >= 65536)
++ {
++ hb_blob_destroy (blob);
++ return false;
++ }
++
+ extents->x_bearing = x_offset;
+ extents->y_bearing = png.IHDR.height + y_offset;
+ extents->width = png.IHDR.width;
diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
index adec72ed0d57..9957f89e1b5c 100644
--- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk
+++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0))
$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \
external/harfbuzz/ubsan.patch \
external/harfbuzz/icu-65-api-macros-with-semicolon.patch.1 \
+ external/harfbuzz/62e803b36173fd096d7ad460dd1d1db9be542593.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk b/external/hsqldb/UnpackedTarball_hsqldb.mk
index cbba770f19a0..ed262cccf4ca 100644
--- a/external/hsqldb/UnpackedTarball_hsqldb.mk
+++ b/external/hsqldb/UnpackedTarball_hsqldb.mk
@@ -29,6 +29,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\
external/hsqldb/patches/jdbc-4.1.patch \
external/hsqldb/patches/multipleResultSets.patch \
) \
+ external/hsqldb/patches/disable-dump-script.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/patches/disable-dump-script.patch b/external/hsqldb/patches/disable-dump-script.patch
new file mode 100644
index 000000000000..401dd38abc9a
--- /dev/null
+++ b/external/hsqldb/patches/disable-dump-script.patch
@@ -0,0 +1,14 @@
+--- a/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 11:08:11.297243034 +0000
++++ b/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java 2023-02-13 13:49:17.973089433 +0000
+@@ -403,6 +403,11 @@
+ throw Trace.error(Trace.INVALID_IDENTIFIER);
+ }
+
++ // added condition to avoid execution of spurious command in .script or .log file
++ if (session.isProcessingScript() || session.isProcessingLog()) {
++ return new Result(ResultConstants.UPDATECOUNT);
++ }
++
+ dsw = new ScriptWriterText(database, token, true, true, true);
+
+ dsw.writeAll();
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index d785264bebad..deeeb5171aaf 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/c++20-comparison.patch \
external/icu/ubsan.patch \
external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 \
+ external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2 \
+ external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 \
))
$(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2 b/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2
new file mode 100644
index 000000000000..1ded56abf524
--- /dev/null
+++ b/external/icu/cec7de7a390dd6907b0ea0feb4488ed3934ee71d.patch.2
@@ -0,0 +1,94 @@
+From cec7de7a390dd6907b0ea0feb4488ed3934ee71d Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Tue, 16 Mar 2021 22:08:29 -0700
+Subject: [PATCH] ICU-21537 Fix invalid free by long locale name
+
+Do not free baseName if it is pointing to fullNameBuffer.
+
+Better Fix
+---
+ icu4c/source/common/locid.cpp | 9 +++++----
+ icu4c/source/test/intltest/collationtest.cpp | 10 ++++++++++
+ 2 files changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp
+index 5d604350ecd..e16fbb724a4 100644
+--- a/icu4c/source/common/locid.cpp
++++ b/icu4c/source/common/locid.cpp
+@@ -254,7 +254,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(Locale)
+
+ Locale::~Locale()
+ {
+- if (baseName != fullName) {
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+@@ -466,7 +466,7 @@ Locale& Locale::operator=(const Locale& other) {
+ }
+
+ Locale& Locale::operator=(Locale&& other) U_NOEXCEPT {
+- if (baseName != fullName) uprv_free(baseName);
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName);
+ if (fullName != fullNameBuffer) uprv_free(fullName);
+
+ if (other.fullName == other.fullNameBuffer) {
+@@ -1850,7 +1850,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
+ {
+ fIsBogus = FALSE;
+ /* Free our current storage */
+- if (baseName != fullName) {
++ if ((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+@@ -1886,6 +1886,7 @@ Locale& Locale::init(const char* localeID, UBool canonicalize)
+ uloc_getName(localeID, fullName, sizeof(fullNameBuffer), &err);
+
+ if(err == U_BUFFER_OVERFLOW_ERROR || length >= (int32_t)sizeof(fullNameBuffer)) {
++ U_ASSERT(baseName == nullptr);
+ /*Go to heap for the fullName if necessary*/
+ fullName = (char *)uprv_malloc(sizeof(char)*(length + 1));
+ if(fullName == 0) {
+@@ -2039,7 +2040,7 @@ Locale::hashCode() const
+ void
+ Locale::setToBogus() {
+ /* Free our current storage */
+- if(baseName != fullName) {
++ if((baseName != fullName) && (baseName != fullNameBuffer)) {
+ uprv_free(baseName);
+ }
+ baseName = NULL;
+diff --git a/icu4c/source/test/intltest/collationtest.cpp b/icu4c/source/test/intltest/collationtest.cpp
+index de51eece5c4..4f1fee9375e 100644
+--- a/icu4c/source/test/intltest/collationtest.cpp
++++ b/icu4c/source/test/intltest/collationtest.cpp
+@@ -78,6 +78,7 @@ class CollationTest : public IntlTest {
+ void TestRootElements();
+ void TestTailoredElements();
+ void TestDataDriven();
++ void TestLongLocale();
+
+ private:
+ void checkFCD(const char *name, CollationIterator &ci, CodePointIterator &cpi);
+@@ -148,6 +149,7 @@ void CollationTest::runIndexedTest(int32_t index, UBool exec, const char *&name,
+ TESTCASE_AUTO(TestRootElements);
+ TESTCASE_AUTO(TestTailoredElements);
+ TESTCASE_AUTO(TestDataDriven);
++ TESTCASE_AUTO(TestLongLocale);
+ TESTCASE_AUTO_END;
+ }
+
+@@ -1852,4 +1854,12 @@ void CollationTest::TestDataDriven() {
+ }
+ }
+
++void CollationTest::TestLongLocale() {
++ IcuTestErrorCode errorCode(*this, "TestLongLocale");
++ Locale longLocale("sie__1G_C_CEIE_CEZCX_CSUE_E_EIESZNI2_GB_LM_LMCSUE_LMCSX_"
++ "LVARIANT_MMCSIE_STEU_SU1GCEIE_SU6G_SU6SU6G_U_UBGE_UC_"
++ "UCEZCSI_UCIE_UZSIU_VARIANT_X@collation=bcs-ukvsz");
++ LocalPointer<Collator> coll(Collator::createInstance(longLocale, errorCode));
++}
++
+ #endif // !UCONFIG_NO_COLLATION
diff --git a/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2 b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
new file mode 100644
index 000000000000..4709cd8c37fd
--- /dev/null
+++ b/external/icu/e450fa50fc242282551f56b941dc93b9a8a0bcbb.patch.2
@@ -0,0 +1,39 @@
+From e450fa50fc242282551f56b941dc93b9a8a0bcbb Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang@chromium.org>
+Date: Tue, 13 Apr 2021 15:16:50 -0700
+Subject: [PATCH] ICU-21587 Fix memory bug w/ baseName
+
+Edge cases not fixed in assign and move assign operator
+while the locale is long and call setKeywordValue with incorrect
+keyword/values.
+---
+ icu4c/source/common/locid.cpp | 11 +++++++++--
+ icu4c/source/test/intltest/loctest.cpp | 26 ++++++++++++++++++++++++++
+ icu4c/source/test/intltest/loctest.h | 2 ++
+ 3 files changed, 37 insertions(+), 2 deletions(-)
+
+diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp
+index 02cd82a7b8e..3c6e5b06690 100644
+--- a/icu4c/source/common/locid.cpp
++++ b/icu4c/source/common/locid.cpp
+@@ -469,14 +469,18 @@ Locale& Locale::operator=(Locale&& other) U_NOEXCEPT {
+ if ((baseName != fullName) && (baseName != fullNameBuffer)) uprv_free(baseName);
+ if (fullName != fullNameBuffer) uprv_free(fullName);
+
+- if (other.fullName == other.fullNameBuffer) {
++ if (other.fullName == other.fullNameBuffer || other.baseName == other.fullNameBuffer) {
+ uprv_strcpy(fullNameBuffer, other.fullNameBuffer);
++ }
++ if (other.fullName == other.fullNameBuffer) {
+ fullName = fullNameBuffer;
+ } else {
+ fullName = other.fullName;
+ }
+
+- if (other.baseName == other.fullName) {
++ if (other.baseName == other.fullNameBuffer) {
++ baseName = fullNameBuffer;
++ } else if (other.baseName == other.fullName) {
+ baseName = fullName;
+ } else {
+ baseName = other.baseName;
diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk
index 83d79a520988..899c21e4cec9 100644
--- a/external/libassuan/ExternalProject_libassuan.mk
+++ b/external/libassuan/ExternalProject_libassuan.mk
@@ -34,7 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl
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/libetonyek/0001-fix-build-with-MSVC.patch.1 b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
new file mode 100644
index 000000000000..2a72844dc79a
--- /dev/null
+++ b/external/libetonyek/0001-fix-build-with-MSVC.patch.1
@@ -0,0 +1,28 @@
+From 1aa22c746b41a688296f4daf4fc35710d2045a33 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Wed, 19 May 2021 19:43:43 +0200
+Subject: [PATCH] fix build with MSVC
+
+error C2664: 'libetonyek::IWORKFormula::IWORKFormula(const boost::optional<unsigned int> &)': cannot convert argument 1 from 'int' to 'const boost::optional<unsigned int> &'
+
+Change-Id: Iaa3de2d0ef8f960495e5d5afebb75c5063955177
+---
+ src/lib/IWAParser.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp
+index 7fd95c3..a2bd292 100644
+--- a/src/lib/IWAParser.cpp
++++ b/src/lib/IWAParser.cpp
+@@ -3403,7 +3403,7 @@ bool IWAParser::parseFormula(const IWAMessage &msg, IWORKFormulaPtr_t &formula)
+ }
+ else
+ {
+- formula.reset(new IWORKFormula(0));
++ formula.reset(new IWORKFormula(boost::make_optional(0u)));
+ formula->parse(stack[0]);
+ }
+ return ok;
+--
+2.31.1
+
diff --git a/external/libetonyek/0002-fix-build-with-MSVC.patch.1 b/external/libetonyek/0002-fix-build-with-MSVC.patch.1
new file mode 100644
index 000000000000..0eadb0912f6a
--- /dev/null
+++ b/external/libetonyek/0002-fix-build-with-MSVC.patch.1
@@ -0,0 +1,55 @@
+From 7b69af66227309e9c258beca3bc3934be454a221 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon@redhat.com>
+Date: Wed, 19 May 2021 21:11:40 +0200
+Subject: [PATCH] fix build with MSVC
+
+C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\xutility(138): error C2668: 'libetonyek::IWORKStyle::IWORKStyle': ambiguous call to overloaded function
+C:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\UnpackedTarball\libetonyek\src\lib\IWORKStyle.h(32): note: could be 'libetonyek::IWORKStyle::IWORKStyle(const libetonyek::IWORKPropertyMap &,const boost::optional<std::string> &,const libetonyek::IWORKStylePtr_t &)'
+C:\cygwin\home\tdf\lode\jenkins\workspace\gerrit_windows\workdir\UnpackedTarball\libetonyek\src\lib\IWORKStyle.h(31): note: or 'libetonyek::IWORKStyle::IWORKStyle(const libetonyek::IWORKPropertyMap &,const boost::optional<std::string> &,const boost::optional<std::string> &)'
+C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\xutility(137): note: while trying to match the argument list '(libetonyek::IWORKPropertyMap, const boost::none_t, _Ty)'
+ with
+ [
+ _Ty=nullptr
+ ]
+C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\memory(2186): note: see reference to function template instantiation 'void std::_Construct_in_place<_Ty,libetonyek::IWORKPropertyMap&,const boost::none_t&,nullptr>(_Ty &,libetonyek::IWORKPropertyMap &,const boost::none_t &,nullptr &&) noexcept(false)' being compiled
+ with
+ [
+ _Ty=libetonyek::IWORKStyle
+ ]
+C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\memory(2906): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<libetonyek::IWORKPropertyMap&,const boost::none_t&,nullptr>(libetonyek::IWORKPropertyMap &,const boost::none_t &,nullptr &&)' being compiled
+ with
+ [
+ _Ty=libetonyek::IWORKStyle
+ ]
+C:/PROGRA~2/MIB055~1/2019/COMMUN~1/VC/Tools/MSVC/1428~1.299/Include\memory(2907): note: see reference to function template instantiation 'std::_Ref_count_obj2<_Ty>::_Ref_count_obj2<libetonyek::IWORKPropertyMap&,const boost::none_t&,nullptr>(libetonyek::IWORKPropertyMap &,const boost::none_t &,nullptr &&)' being compiled
+ with
+ [
+ _Ty=libetonyek::IWORKStyle
+ ]
+C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/libetonyek/src/lib/IWAParser.cpp(2358): note: see reference to function template instantiation 'std::shared_ptr<libetonyek::IWORKStyle> std::make_shared<libetonyek::IWORKStyle,libetonyek::IWORKPropertyMap&,const boost::none_t&,nullptr>(libetonyek::IWORKPropertyMap &,const boost::none_t &,nullptr &&)' being compiled
+
+Change-Id: Idf871474b2a20f252073846388d018cccc15bc11
+---
+ src/lib/IWAParser.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/IWAParser.cpp b/src/lib/IWAParser.cpp
+index a2bd292..1fdeae7 100644
+--- a/src/lib/IWAParser.cpp
++++ b/src/lib/IWAParser.cpp
+@@ -2355,10 +2355,10 @@ void IWAParser::parseAuthorInComment(unsigned id)
+ IWORKPropertyMap props;
+ // normally yellow, but blue may be better in LO
+ props.put<property::FontColor>(IWORKColor(0,0,1,1));
+- spans[0]=std::make_shared<IWORKStyle>(props, boost::none, nullptr);
++ spans[0]=std::make_shared<IWORKStyle>(props, boost::none, IWORKStylePtr_t());
+ // reset color to default, if not, comment will be blue colored
+ props.put<property::FontColor>(IWORKColor(0,0,0,1));
+- spans[unsigned(len)]=std::make_shared<IWORKStyle>(props, boost::none, nullptr);
++ spans[unsigned(len)]=std::make_shared<IWORKStyle>(props, boost::none, IWORKStylePtr_t());
+ text.setSpans(spans);
+ text.parse(*m_currentText);
+ }
+--
+2.31.1
+
diff --git a/external/libetonyek/Library_etonyek.mk b/external/libetonyek/Library_etonyek.mk
index cbbe08458410..87e21fc4b78a 100644
--- a/external/libetonyek/Library_etonyek.mk
+++ b/external/libetonyek/Library_etonyek.mk
@@ -118,6 +118,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,etonyek,\
UnpackedTarball/libetonyek/src/lib/contexts/IWORKBinaryElement \
UnpackedTarball/libetonyek/src/lib/contexts/IWORKBrContext \
UnpackedTarball/libetonyek/src/lib/contexts/IWORKCalcEngineContext \
+ UnpackedTarball/libetonyek/src/lib/contexts/IWORKCellCommentDrawableInfoElement \
UnpackedTarball/libetonyek/src/lib/contexts/IWORKChartInfoElement \
UnpackedTarball/libetonyek/src/lib/contexts/IWORKColorElement \
UnpackedTarball/libetonyek/src/lib/contexts/IWORKCoreImageFilterDescriptorElement \
diff --git a/external/libetonyek/UnpackedTarball_libetonyek.mk b/external/libetonyek/UnpackedTarball_libetonyek.mk
index cd7a30e8adea..de8c0dcd1cc5 100644
--- a/external/libetonyek/UnpackedTarball_libetonyek.mk
+++ b/external/libetonyek/UnpackedTarball_libetonyek.mk
@@ -20,6 +20,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,libetonyek,\
external/libetonyek/ubsan.patch \
external/libetonyek/rpath.patch \
external/libetonyek/warnings.patch \
+ external/libetonyek/0001-fix-build-with-MSVC.patch.1 \
+ external/libetonyek/0002-fix-build-with-MSVC.patch.1 \
))
ifneq ($(OS),MACOSX)
diff --git a/external/libetonyek/libetonyek-bundled-soname.patch.0 b/external/libetonyek/libetonyek-bundled-soname.patch.0
index 5aaf61464edd..15a58fa83635 100644
--- a/external/libetonyek/libetonyek-bundled-soname.patch.0
+++ b/external/libetonyek/libetonyek-bundled-soname.patch.0
@@ -1,6 +1,7 @@
--- src/lib/Makefile.in.orig 2016-01-12 19:21:24.000000000 +0100
+++ src/lib/Makefile.in 2016-03-02 18:19:52.214551270 +0100
-@@ -538,6 +538,6 @@
+@@ -538,7 +538,7 @@
+ $(XML_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) $(am__append_1)
libetonyek_@ETONYEK_MAJOR_VERSION@_@ETONYEK_MINOR_VERSION@_la_LIBADD = libetonyek_internal.la $(REVENGE_LIBS) $(LANGTAG_LIBS) $(XML_LIBS) $(ZLIB_LIBS) @LIBETONYEK_WIN32_RESOURCE@
libetonyek_@ETONYEK_MAJOR_VERSION@_@ETONYEK_MINOR_VERSION@_la_DEPENDENCIES = libetonyek_internal.la @LIBETONYEK_WIN32_RESOURCE@
-libetonyek_@ETONYEK_MAJOR_VERSION@_@ETONYEK_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined
diff --git a/external/libffi/ExternalPackage_libffi.mk b/external/libffi/ExternalPackage_libffi.mk
new file mode 100644
index 000000000000..212e63aa36af
--- /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),\
+ $(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/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/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..d012fe3a8f65 100644
--- a/external/libodfgen/libodfgen-bundled-soname.patch.0
+++ b/external/libodfgen/libodfgen-bundled-soname.patch.0
@@ -1,9 +1,10 @@
+-*- Mode: Diff -*-
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)
+ $(XML_CFLAGS) -DLIBODFGEN_BUILD $(am__append_1)
+ 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/libxml2/ExternalPackage_libxml2.mk b/external/libxml2/ExternalPackage_libxml2.mk
index d38eb68df0cb..6338fb20b9df 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
endif
else # OS!=WNT
-$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.9.$(LIBXML_VERSION_MICRO)))
+$(eval $(call gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.10.$(LIBXML_VERSION_MICRO)))
endif
endif # DISABLE_DYNLOADING
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 83df02849cb3..8c81c3d26e4c 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
$(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
- external/libxml2/libxml2-config.patch.1 \
external/libxml2/libxml2-global-symbols.patch \
external/libxml2/libxml2-vc10.patch \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
@@ -23,4 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
external/libxml2/libxml2-icu.patch.0) \
))
+$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-android.patch b/external/libxml2/libxml2-android.patch
index 42af83274026..acf9b17e02db 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -2,9 +2,9 @@
+++ misc/build/libxml2-2.7.6/Makefile.in
@@ -1635,7 +1635,7 @@
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
- check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-recursive
--all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+ check: check-recursive
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
+all-am: Makefile $(LTLIBRARIES) \
config.h
install-binPROGRAMS: install-libLTLIBRARIES
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
deleted file mode 100644
index 5a2ef1485e92..000000000000
--- a/external/libxml2/libxml2-config.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-Hack the xml2-config to return paths into WORKDIR.
-
---- a/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
-+++ b/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
-@@ -1,9 +1,14 @@
- #! /bin/sh
-
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--includedir=@includedir@
--libdir=@libdir@
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#includedir=@includedir@
-+#libdir=@libdir@
-+
-+prefix=${WORKDIR}/UnpackedTarball/libxml2
-+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2
-+includedir=${WORKDIR}/UnpackedTarball/libxml2/include
-+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs
- cflags=
- libs=
-
-@@ -67,7 +72,8 @@
- ;;
-
- --cflags)
-- cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ cflags="-I${includedir}"
- ;;
-
- --libtool-libs)
-@@ -91,7 +96,8 @@
- libs="@XML_LIBDIR@ $libs"
- fi
-
-- libs="$libs @WIN32_EXTRA_LIBADD@"
-+ #libs="$libs @WIN32_EXTRA_LIBADD@"
-+ libs="-L${libdir} -lxml2 -lm"
- ;;
-
- *)
diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in
new file mode 100644
index 000000000000..164508e47e67
--- /dev/null
+++ b/external/libxml2/xml2-config.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+ --cflags)
+ cflags="$LIBXML_CFLAGS"
+ ;;
+ --libs)
+ libs="$LIBXML_LIBS"
+ ;;
+ esac
+ shift
+done
+
+if test -n "$cflags$libs"; then
+ echo $cflags $libs
+fi
+
+exit 0
diff --git a/external/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/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
index b0c62e1b160e..3458089ce99e 100644
--- a/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/StaticLibrary_mariadb-connector-c.mk
@@ -21,8 +21,8 @@ $(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
# This is needed for MSVC 2008: it somehow finds a dlopen somewhere
# but the static library then contains unreferenced symbols.
# This macro enables a re-definition to native Win32 APIs in my_global.h.
-## TODO missing enable: -DHAVE_OPENSSL -D HAVE_COMPRESS
-## (but then need to add "-lssl -lcrypto -lz" to mysqlcppconn linking)
+## TODO missing enable: -D HAVE_COMPRESS
+## (but then need to add "-lz" to mysqlcppconn linking)
$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_DLOPEN -D ENABLED_LOCAL_INFILE -D LIBMARIADB -D THREAD -DSQLITE_ENABLE_COLUMN_METADATA=1))
ifeq ($(OS),WNT)
@@ -31,10 +31,12 @@ $(eval $(call gb_StaticLibrary_set_include,mariadb-connector-c,\
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,mariadb-connector-c)/win-iconv \
))
+else
+$(eval $(call gb_StaticLibrary_use_external,mariadb-connector-c,openssl_headers))
+$(eval $(call gb_StaticLibrary_add_cflags,mariadb-connector-c,-DHAVE_OPENSSL))
endif
$(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
- UnpackedTarball/mariadb-connector-c/libmariadb/bmove_upp \
UnpackedTarball/mariadb-connector-c/libmariadb/get_password \
UnpackedTarball/mariadb-connector-c/libmariadb/ma_alloc \
UnpackedTarball/mariadb-connector-c/libmariadb/ma_array \
@@ -64,10 +66,17 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,mariadb-connector-c,\
UnpackedTarball/mariadb-connector-c/libmariadb/mariadb_stmt \
UnpackedTarball/mariadb-connector-c/libmariadb/ma_client_plugin \
UnpackedTarball/mariadb-connector-c/plugins/auth/my_auth \
+ UnpackedTarball/mariadb-connector-c/plugins/auth/caching_sha2_pw \
UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_socket \
$(if $(filter $(OS),WNT), \
UnpackedTarball/mariadb-connector-c/libmariadb/win32_errmsg \
- UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv) \
+ UnpackedTarball/mariadb-connector-c/libmariadb/secure/win_crypt \
+ UnpackedTarball/mariadb-connector-c/win-iconv/win_iconv \
+ UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_npipe \
+ UnpackedTarball/mariadb-connector-c/plugins/pvio/pvio_shmem \
+ , \
+ UnpackedTarball/mariadb-connector-c/libmariadb/secure/openssl_crypt \
+ ) \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
index 3d8ca9295131..241e12db6581 100644
--- a/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
+++ b/external/mariadb-connector-c/UnpackedTarball_mariadb-connector-c.mk
@@ -32,9 +32,25 @@ $(eval $(call gb_UnpackedTarball_add_patches,mariadb-connector-c,\
# TODO are any "plugins" needed?
$(eval $(call gb_UnpackedTarball_set_post_action,mariadb-connector-c, \
< libmariadb/ma_client_plugin.c.in sed \
- -e 's/@EXTERNAL_PLUGINS@/extern struct st_mysql_client_plugin pvio_socket_client_plugin;/' \
- -e 's/@BUILTIN_PLUGINS@/(struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA)/' \
- > libmariadb/ma_client_plugin.c \
+ -e 's/@EXTERNAL_PLUGINS@/ \
+ extern struct st_mysql_client_plugin pvio_socket_client_plugin\; \
+ extern struct st_mysql_client_plugin caching_sha2_password_client_plugin\; \
+ extern struct st_mysql_client_plugin mysql_native_password_client_plugin\; \
+ $(if $(filter WNT,$(OS)), \
+ extern struct st_mysql_client_plugin pvio_shmem_client_plugin\; \
+ extern struct st_mysql_client_plugin pvio_npipe_client_plugin\; \
+ ) \
+ /' \
+ -e 's/@BUILTIN_PLUGINS@/ \
+ (struct st_mysql_client_plugin *)\&pvio_socket_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&caching_sha2_password_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&mysql_native_password_client_plugin$(COMMA) \
+ $(if $(filter WNT,$(OS)), \
+ (struct st_mysql_client_plugin *)\&pvio_shmem_client_plugin$(COMMA) \
+ (struct st_mysql_client_plugin *)\&pvio_npipe_client_plugin$(COMMA) \
+ ) \
+ /' \
+ > libmariadb/ma_client_plugin.c \
))
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 5150a27b6a62..cfe535c6dcf1 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -15,8 +15,14 @@ $(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)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
$(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
@@ -24,9 +30,10 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
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 \
@@ -35,7 +42,9 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecuta
else # OS!=WNT
# make sure to specify NSPR_CONFIGURE_OPTS as env (before make command), so nss can append it's own defaults
# OTOH specify e.g. CC and NSINSTALL as arguments (after make command), so they will overrule nss makefile values
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalExecutable_get_dependencies,python)
+$(call gb_ExternalProject_get_state_target,nss,build): \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(SRCDIR)/external/nss/nsinstall.py
$(call gb_ExternalProject_run,build,\
$(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
$(if $(filter ANDROID,$(OS)),$(if $(filter AARCH64,$(CPUNAME)),USE_64=1)) \
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 4aaa70fc2131..c6e2b8510db0 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -24,9 +24,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.getopt.patch.0 \
+ external/nss/nss-restore-manual-pre-dependencies.patch.1 \
$(if $(filter iOS,$(OS)), \
external/nss/nss-ios.patch) \
$(if $(filter ANDROID,$(OS)), \
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/nsinstall.py b/external/nss/nsinstall.py
index 80e9c1679373..d90a85e6c540 100644
--- a/external/nss/nsinstall.py
+++ b/external/nss/nsinstall.py
@@ -99,17 +99,17 @@ def nsinstall(argv):
if options.D:
if len(args) != 1:
return 1
- if os.path.exists(args[0]):
+ try:
+ if options.m:
+ os.makedirs(args[0], options.m)
+ else:
+ os.makedirs(args[0])
+ except FileExistsError:
if not os.path.isdir(args[0]):
sys.stderr.write('nsinstall: ' + args[0] + ' is not a directory\n')
sys.exit(1)
if options.m:
os.chmod(args[0], options.m)
- sys.exit()
- if options.m:
- os.makedirs(args[0], options.m)
- else:
- os.makedirs(args[0])
return 0
# nsinstall arg1 [...] directory
diff --git a/external/nss/nss-android.patch.1 b/external/nss/nss-android.patch.1
index 73882e61f3f6..ebb1df2d00f9 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,11 @@
+@@ -110,6 +110,11 @@
exit 1;;
esac
@@ -10,13 +10,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
@@ -41,7 +41,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
index 65115a96e806..da09b8d8edf8 100644
--- a/external/nss/nss-ios.patch
+++ b/external/nss/nss-ios.patch
@@ -193,9 +193,9 @@
+if test $1 = "arm64-apple-darwin"; then echo $1; exit; fi
+if test $1 = "aarch64-apple-darwin"; 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
--- a/a/nspr/config/autoconf.mk.in
+++ a/a/nspr/config/autoconf.mk.in
@@ -67,7 +67,7 @@
diff --git a/external/nss/nss-restore-manual-pre-dependencies.patch.1 b/external/nss/nss-restore-manual-pre-dependencies.patch.1
new file mode 100644
index 000000000000..ea034f0dc80f
--- /dev/null
+++ b/external/nss/nss-restore-manual-pre-dependencies.patch.1
@@ -0,0 +1,83 @@
+Revert of upstream:
+
+changeset: 15608:744881490c78
+user: Jan-Marek Glogowski <glogow@fbihome.de>
+date: Wed May 13 19:00:40 2020 +0000
+summary: Bug 1637083 Replace pre-dependency with shell hack r=rrelyea
+
+--- b/nss/coreconf/rules.mk Wed May 13 19:00:40 2020 +0000
++++ a/nss/coreconf/rules.mk Tue May 12 21:33:43 2020 +0000
+@@ -31,21 +31,10 @@
+ USE_NT_C_SYNTAX=1
+ endif
+
+-# For whatever reason, "." can't be handled using make conditionals.
+-# Based on automake's SUBDIRS "." handling.
+ ifdef DIRS
+ ifndef IGNORE_DIRS
+-ifneq (,$(filter .,$(DIRS)))
+-TARGETS = $(NULL)
+-ALL_TRASH = $(NULL)
+-endif
+-
+ $(DIRS):
++ $(IGNORE_ERROR)@$(MAKE) -C $@ $(MAKECMDGOALS)
+- $(IGNORE_ERROR)@if [ "$@" != "." ]; then \
+- $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+- else \
+- IGNORE_DIRS=1 $(MAKE) -C $@ $(MAKECMDGOALS) ; \
+- fi
+ @$(CLICK_STOPWATCH)
+ endif
+ endif
+@@ -84,9 +73,7 @@
+ check: $(DIRS)
+
+ clean clobber: $(DIRS)
+-ifneq (,$(ALL_TRASH))
+ rm -rf $(ALL_TRASH)
+-endif
+
+ realclean clobber_all: $(DIRS)
+ rm -rf $(wildcard *.OBJ) dist $(ALL_TRASH)
+--- b/nss/lib/ckfw/builtins/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/builtins/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+
+ CORE_DEPTH = ../../..
+
++DIRS = testlib
+-DIRS = . testlib
+-
+-testlib: .
+
+ MODULE = nss
+
+--- b/nss/lib/ckfw/manifest.mn Wed May 13 19:00:40 2020 +0000
++++ a/nss/lib/ckfw/manifest.mn Tue May 12 21:33:43 2020 +0000
+@@ -5,9 +5,7 @@
+
+ CORE_DEPTH = ../..
+
++DIRS = builtins
+-DIRS = . builtins
+-
+-builtins: .
+
+ PRIVATE_EXPORTS = \
+ 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
+@@ -24,6 +24,12 @@
+ # no real way to encode these in any sensible way
+ $(MAKE) -C coreconf/nsinstall program
+ $(MAKE) export
++ # pre-build child dir -> parent dir dependencies
++ # ckfw/builtins -> ckfw
++ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw libs
++ # ckfw/builtins/testlib -> ckfw/builtins + base
++ $(MAKE) -C lib/base libs
++ IGNORE_DIRS=1 $(MAKE) -C lib/ckfw/builtins 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.getopt.patch.0 b/external/nss/nss.getopt.patch.0
deleted file mode 100644
index aeabb33f9b97..000000000000
--- a/external/nss/nss.getopt.patch.0
+++ /dev/null
@@ -1,25 +0,0 @@
-# pr/tests/sel_spd.c:427:20: error: implicit declaration of function 'getopt' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
---- nspr/pr/tests/sel_spd.c
-+++ nspr/pr/tests/sel_spd.c
-@@ -15,6 +15,9 @@
- #include <stdio.h>
- #include <errno.h>
- #include <string.h>
-+
-+extern char *optarg;
-+int getopt(int argc, char *const argv[], const char *optstring);
-
- #ifdef DEBUG
- #define PORT_INC_DO +100
---- nspr/pr/tests/testfile.c
-+++ nspr/pr/tests/testfile.c
-@@ -23,6 +23,9 @@
- #include <getopt.h>
- #include <errno.h>
- #endif /* XP_OS2 */
-+
-+extern char *optarg;
-+int getopt(int argc, char *const argv[], const char *optstring);
-
- static int _debug_on = 0;
-
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 07b60a5ed00d..6578f009d696 100644
--- a/external/nss/nss_macosx.patch
+++ b/external/nss/nss_macosx.patch
@@ -23,7 +23,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
@@ -66,7 +66,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.
@@ -78,7 +78,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
@@ -88,17 +88,3 @@ diff -ru a/nss/Makefile b/nss/Makefile
ifdef USE_DEBUG_RTL
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
---- a/a/nspr/pr/include/md/_darwin.h
-+++ b/b/nspr/pr/include/md/_darwin.h
-@@ -40,11 +40,7 @@
-
- #undef HAVE_STACK_GROWING_UP
- #define HAVE_DLL
--#if defined(__x86_64__) || TARGET_OS_IPHONE
- #define USE_DLFCN
--#else
--#define USE_MACH_DYLD
--#endif
- #define _PR_HAVE_SOCKADDR_LEN
- #define _PR_STAT_HAS_ST_ATIMESPEC
- #define _PR_HAVE_LARGE_OFF_T
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/openldap/openldap-2.4.44.patch.1 b/external/openldap/openldap-2.4.44.patch.1
index 0d3cf5b70c3f..317ef9a62e56 100644
--- a/external/openldap/openldap-2.4.44.patch.1
+++ b/external/openldap/openldap-2.4.44.patch.1
@@ -1,3 +1,4 @@
+-*- Mode: diff -*-
--- openldap.org/configure
+++ openldap/configure
@@ -15735,7 +15735,7 @@
@@ -52,6 +53,17 @@
#undef NSS_VERSION_INT
#define NSS_VERSION_INT ((NSS_VMAJOR << 24) | (NSS_VMINOR << 16) | \
+--- openldap.org/libraries/libldap/tls2.c
++++ openldap.org/libraries/libldap/tls2.c
+@@ -80,6 +80,8 @@
+ { BER_BVNULL, BER_BVNULL }
+ };
+
++int ldap_pvt_tls_check_hostname( LDAP *ld, void *s, const char *name_in );
++
+ #ifdef HAVE_TLS
+
+ void
--- openldap.org/Makefile.in
+++ openldap/Makefile.in
@@ -13,7 +13,7 @@
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 9febccfc0316..cadbb9b01bc9 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)\
@@ -60,11 +62,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
@@ -76,8 +76,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 a36ecde1fa1f..6f00cf7f7e44 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -12,17 +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-macos-arm64.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/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index 3cc0a95e3617..1f1adba6ee34 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/fofi/FoFiType1C \
UnpackedTarball/poppler/fofi/FoFiIdentifier \
UnpackedTarball/poppler/poppler/Annot \
+ UnpackedTarball/poppler/poppler/AnnotStampImageHelper \
UnpackedTarball/poppler/poppler/Array \
UnpackedTarball/poppler/poppler/BBoxOutputDev \
UnpackedTarball/poppler/poppler/CachedFile \
@@ -83,6 +84,8 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/Decrypt \
UnpackedTarball/poppler/poppler/Dict \
UnpackedTarball/poppler/poppler/Error \
+ UnpackedTarball/poppler/poppler/FDPDFDocBuilder \
+ UnpackedTarball/poppler/poppler/FILECacheLoader \
UnpackedTarball/poppler/poppler/FileSpec \
UnpackedTarball/poppler/poppler/FontEncodingTables \
UnpackedTarball/poppler/poppler/Form \
@@ -93,6 +96,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/GfxState \
UnpackedTarball/poppler/poppler/GlobalParams \
UnpackedTarball/poppler/poppler/Hints \
+ UnpackedTarball/poppler/poppler/ImageEmbeddingUtils \
UnpackedTarball/poppler/poppler/JArithmeticDecoder \
UnpackedTarball/poppler/poppler/JBIG2Stream \
UnpackedTarball/poppler/poppler/JSInfo \
@@ -129,13 +133,12 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
UnpackedTarball/poppler/poppler/TextOutputDev \
UnpackedTarball/poppler/poppler/PageLabelInfo \
UnpackedTarball/poppler/poppler/SecurityHandler \
- UnpackedTarball/poppler/poppler/StdinCachedFile \
- UnpackedTarball/poppler/poppler/StdinPDFDocBuilder \
UnpackedTarball/poppler/poppler/Sound \
UnpackedTarball/poppler/poppler/ViewerPreferences \
UnpackedTarball/poppler/poppler/Movie \
UnpackedTarball/poppler/poppler/Rendition \
UnpackedTarball/poppler/poppler/DCTStream \
+ UnpackedTarball/poppler/splash/SplashBitmap \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index 68fd06d9403b..0ac3c8aa69c4 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -13,6 +13,8 @@ $(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
external/poppler/poppler-config.patch.1 \
+ external/poppler/disable-freetype.patch.1 \
+ external/poppler/gcc7-EntityInfo.patch.1 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1
new file mode 100644
index 000000000000..d59006eba979
--- /dev/null
+++ b/external/poppler/disable-freetype.patch.1
@@ -0,0 +1,41 @@
+disable freetype dependent code
+
+--- poppler/poppler/Form.cc.orig 2022-09-14 15:46:48.588316681 +0200
++++ poppler/poppler/Form.cc 2022-09-14 15:48:01.468274551 +0200
+@@ -46,7 +46,7 @@
+ #include <cstdlib>
+ #include <cstring>
+ #include <cctype>
+-#include "goo/ft_utils.h"
++//#include "goo/ft_utils.h"
+ #include "goo/gmem.h"
+ #include "goo/gfile.h"
+ #include "goo/GooString.h"
+@@ -77,8 +77,8 @@
+ #include "fofi/FoFiTrueType.h"
+ #include "fofi/FoFiIdentifier.h"
+
+-#include <ft2build.h>
+-#include FT_FREETYPE_H
++//#include <ft2build.h>
++//#include FT_FREETYPE_H
+
+ // return a newly allocated char* containing an UTF16BE string of size length
+ char *pdfDocEncodingToUTF16(const std::string &orig, int *length)
+@@ -2730,6 +2730,8 @@
+
+ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle)
+ {
++ return {};
++#if 0
+ if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".otf")) {
+ error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str());
+ return {};
+@@ -2939,6 +2941,7 @@
+ }
+
+ return { dictFontName, fontDictRef };
++#endif
+ }
+
+ std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const
diff --git a/external/poppler/gcc7-EntityInfo.patch.1 b/external/poppler/gcc7-EntityInfo.patch.1
new file mode 100644
index 000000000000..b450bff93af9
--- /dev/null
+++ b/external/poppler/gcc7-EntityInfo.patch.1
@@ -0,0 +1,48 @@
+gcc 7.3.1 says:
+
+workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:42:34: error: function ‘X509CertificateInfo::EntityInfo& X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
+
+--- poppler/poppler/CertificateInfo.h.orig 2022-09-14 19:32:12.426351385 +0200
++++ poppler/poppler/CertificateInfo.h 2022-09-14 19:32:18.947347812 +0200
+@@ -70,7 +70,7 @@
+ ~EntityInfo();
+
+ EntityInfo(EntityInfo &&) noexcept;
+- EntityInfo &operator=(EntityInfo &&) noexcept;
++ EntityInfo &operator=(EntityInfo &&) /*noexcept*/;
+
+ EntityInfo(const EntityInfo &) = delete;
+ EntityInfo &operator=(const EntityInfo &) = delete;
+--- poppler/poppler/CertificateInfo.cc.orig 2022-09-14 19:31:10.225385467 +0200
++++ poppler/poppler/CertificateInfo.cc 2022-09-14 19:31:12.572384182 +0200
+@@ -39,7 +39,7 @@
+
+ X509CertificateInfo::EntityInfo::EntityInfo(X509CertificateInfo::EntityInfo &&other) noexcept = default;
+
+-X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) noexcept = default;
++X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) /*noexcept*/ = default;
+
+ X509CertificateInfo::X509CertificateInfo() : ku_extensions(KU_NONE), cert_version(-1), is_self_signed(false) { }
+
+--- poppler/poppler/GfxFont.cc.orig 2022-09-14 20:24:32.569607333 +0200
++++ poppler/poppler/GfxFont.cc 2022-09-14 20:24:52.323596186 +0200
+@@ -180,7 +180,7 @@
+
+ GfxFontLoc::GfxFontLoc(GfxFontLoc &&other) noexcept = default;
+
+-GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) noexcept = default;
++GfxFontLoc &GfxFontLoc::operator=(GfxFontLoc &&other) /*noexcept*/ = default;
+
+ void GfxFontLoc::setPath(GooString *pathA)
+ {
+--- poppler/poppler/GfxFont.h.orig 2022-09-14 20:24:30.784608340 +0200
++++ poppler/poppler/GfxFont.h 2022-09-14 20:25:08.850586861 +0200
+@@ -124,7 +124,7 @@
+ GfxFontLoc(const GfxFontLoc &) = delete;
+ GfxFontLoc(GfxFontLoc &&) noexcept;
+ GfxFontLoc &operator=(const GfxFontLoc &) = delete;
+- GfxFontLoc &operator=(GfxFontLoc &&other) noexcept;
++ GfxFontLoc &operator=(GfxFontLoc &&other) /*noexcept*/;
+
+ // Set the 'path' string from a GooString on the heap.
+ // Ownership of the object is taken.
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index b902402ea4e7..455a88e2afc4 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -16,7 +16,7 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/config.h
-@@ -0,0 +1,221 @@
+@@ -0,0 +1,220 @@
+/* config.h. Generated from config.h.cmake by cmake. */
+
+/* Build against libcurl. */
@@ -105,9 +105,6 @@ index 0fbd336a..451213f8 100644
+#define HAVE_TIMEGM 1
+#endif
+
-+/* Define if you have the iconv() function and it works. */
-+/* #undef HAVE_ICONV */
-+
+/* Define to 1 if you have the `z' library (-lz). */
+/* #undef HAVE_LIBZ */
+
@@ -176,7 +173,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_NAME "poppler"
+
+/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 21.01.0"
++#define PACKAGE_STRING "poppler 22.09.0"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "poppler"
@@ -185,7 +182,7 @@ index 0fbd336a..451213f8 100644
+#define PACKAGE_URL ""
+
+/* Define to the version of this package. */
-+#define PACKAGE_VERSION "21.01.0"
++#define PACKAGE_VERSION "22.09.0"
+
+/* Poppler data dir */
+#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -203,7 +200,7 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_FLOAT */
+
+/* Version number of package */
-+#define VERSION "21.01.0"
++#define VERSION "22.09.0"
+
+#if defined(__APPLE__)
+#elif defined (_WIN32)
@@ -228,6 +225,8 @@ index 0fbd336a..451213f8 100644
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+#define popen _popen
+#define pclose _pclose
++#define strncasecmp _strnicmp
++#define strcasecmp _stricmp
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
@@ -243,12 +242,12 @@ new file mode 100644
index 0fbd336a..451213f8 100644
--- /dev/null
+++ b/poppler/poppler-config.h
-@@ -0,0 +1,166 @@
+@@ -0,0 +1,161 @@
+//================================================= -*- mode: c++ -*- ====
+//
+// poppler-config.h
+//
-+// Copyright 1996-2011 Glyph & Cog, LLC
++// Copyright 1996-2011, 2022 Glyph & Cog, LLC
+//
+//========================================================================
+
@@ -282,7 +281,7 @@ index 0fbd336a..451213f8 100644
+
+/* Defines the poppler version. */
+#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "21.01.0"
++#define POPPLER_VERSION "22.09.0"
+#endif
+
+/* Use single precision arithmetic in the Splash backend */
@@ -369,18 +368,13 @@ index 0fbd336a..451213f8 100644
+/* #undef USE_BOOST_HEADERS */
+#endif
+
-+/* Is splash backend available */
-+#ifndef HAVE_SPLASH
-+/* #undef HAVE_SPLASH */
-+#endif
-+
+//------------------------------------------------------------------------
+// version
+//------------------------------------------------------------------------
+
+// copyright notice
-+#define popplerCopyright "Copyright 2005-2021 The Poppler Developers - http://poppler.freedesktop.org"
-+#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC"
++#define popplerCopyright "Copyright 2005-2022 The Poppler Developers - http://poppler.freedesktop.org"
++#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
+
+//------------------------------------------------------------------------
+// Win32 stuff
@@ -439,9 +433,9 @@ index 0fbd336a..451213f8 100644
+
+#include "poppler-global.h"
+
-+#define POPPLER_VERSION "21.01.0"
-+#define POPPLER_VERSION_MAJOR 21
-+#define POPPLER_VERSION_MINOR 1
++#define POPPLER_VERSION "22.09.0"
++#define POPPLER_VERSION_MAJOR 22
++#define POPPLER_VERSION_MINOR 9
+#define POPPLER_VERSION_MICRO 0
+
+namespace poppler
@@ -455,3 +449,38 @@ index 0fbd336a..451213f8 100644
+}
+
+#endif
+diff --git a/poppler_private_export.h b/poppler_private_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/poppler_private_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_PRIVATE_EXPORT_H
++#define POPPLER_PRIVATE_EXPORT_H
++
++# define POPPLER_PRIVATE_EXPORT
++# define POPPLER_PRIVATE_NO_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED
++# define POPPLER_PRIVATE_DEPRECATED_EXPORT
++# define POPPLER_PRIVATE_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_PRIVATE_EXPORT_H */
+
+diff --git a/cpp/poppler_cpp_export.h b/cpp/poppler_cpp_export.h
+new file mode 100644
+index 0fbd336a..451213f8 100644
+--- /dev/null
++++ b/cpp/poppler_cpp_export.h
+@@ -0,0 +1,11 @@
++
++#ifndef POPPLER_CPP_EXPORT_H
++#define POPPLER_CPP_EXPORT_H
++
++# define POPPLER_CPP_EXPORT
++# define POPPLER_CPP_NO_EXPORT
++# define POPPLER_CPP_DEPRECATED
++# define POPPLER_CPP_DEPRECATED_EXPORT
++# define POPPLER_CPP_DEPRECATED_NO_EXPORT
++
++#endif /* POPPLER_CPP_EXPORT_H */
diff --git a/external/postgresql/ExternalPackage_postgresql.mk b/external/postgresql/ExternalPackage_postgresql.mk
new file mode 100644
index 000000000000..f6c9a9bb6deb
--- /dev/null
+++ b/external/postgresql/ExternalPackage_postgresql.mk
@@ -0,0 +1,16 @@
+# -*- 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,postgresql,postgresql))
+
+$(eval $(call gb_ExternalPackage_use_external_project,postgresql,postgresql))
+
+$(eval $(call gb_ExternalPackage_add_file,postgresql,$(LIBO_LIB_FOLDER)/libpq.dll,$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release)/libpq/libpq.dll))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index ba462a34a1a1..377f02c0174c 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_ExternalProject_ExternalProject,postgresql))
$(eval $(call gb_ExternalProject_use_externals,postgresql,\
$(if $(ENABLE_LDAP),openldap) \
openssl \
- zlib \
))
$(eval $(call gb_ExternalProject_register_targets,postgresql,\
@@ -25,8 +24,12 @@ $(eval $(call gb_ExternalProject_use_nmake,postgresql,build))
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
- nmake -f win32.mak USE_SSL=1 USE_LDAP=1 \
- ,src)
+ MSBFLAGS="/p:Platform=$(if $(filter X86_64,$(CPUNAME)),x64,Win32) \
+ $(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) \
+ $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
+ $(PERL) build.pl $(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) libpq \
+ ,src/tools/msvc)
else
@@ -40,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
@@ -55,21 +58,25 @@ postgresql_LDFLAGS += \
endif
+# note: as of 13.1, zlib is not needed by libpq
+# passing MAKELEVEL=0 is required to find internal headers
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
./configure \
- --without-readline --disable-shared --with-ldap \
+ --without-readline \
+ --without-zlib \
+ --with-ldap \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(DISABLE_OPENSSL),,--with-openssl \
- $(if $(WITH_KRB5), --with-krb5) \
$(if $(WITH_GSSAPI),--with-gssapi)) \
$(if $(ENABLE_LDAP),,--with-ldap=no) \
+ CFLAGS="-fPIC" \
CPPFLAGS="$(postgresql_CPPFLAGS)" \
LDFLAGS="$(postgresql_LDFLAGS)" \
$(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4") \
&& cd src/interfaces/libpq \
- && MAKEFLAGS= && $(MAKE) all-static-lib)
+ && MAKEFLAGS= && $(MAKE) MAKELEVEL=0 all-static-lib)
endif
diff --git a/external/postgresql/Module_postgresql.mk b/external/postgresql/Module_postgresql.mk
index 1f655c6e5034..7ea89dad3b39 100644
--- a/external/postgresql/Module_postgresql.mk
+++ b/external/postgresql/Module_postgresql.mk
@@ -14,4 +14,10 @@ $(eval $(call gb_Module_add_targets,postgresql,\
UnpackedTarball_postgresql \
))
+ifeq ($(OS),WNT)
+$(eval $(call gb_Module_add_targets,postgresql,\
+ ExternalPackage_postgresql \
+))
+endif # WNT
+
# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/UnpackedTarball_postgresql.mk b/external/postgresql/UnpackedTarball_postgresql.mk
index 90b363c2dccf..594b6dd0a5e7 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -11,21 +11,16 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,postgresql))
$(eval $(call gb_UnpackedTarball_set_tarball,postgresql,$(POSTGRESQL_TARBALL),,postgresql))
-$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql,config))
-
-$(eval $(call gb_UnpackedTarball_set_patchlevel,postgresql,3))
-
$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
- external/postgresql/postgresql-libs-leak.patch \
- external/postgresql/postgresql-9.2.1-libreoffice.patch \
external/postgresql/windows.patch.0 \
- external/postgresql/postgresql.exit.patch.0 \
+ external/postgresql/postgres-msvc-build.patch.1 \
+ $(if $(filter WNT_ARM64,$(OS)_$(CPUNAME)), external/postgresql/arm64.patch.1) \
))
-ifeq ($(SYSTEM_ZLIB),)
-$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
- external/postgresql/internal-zlib.patch.1 \
-))
+ifeq ($(CROSS_COMPILING),)
+$(eval $(call gb_UnpackedTarball_add_file,postgresql,src/tools/msvc/config.pl,external/postgresql/config.pl))
endif
+$(eval $(call gb_UnpackedTarball_update_autoconf_configs,postgresql))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/arm64.patch.1 b/external/postgresql/arm64.patch.1
new file mode 100644
index 000000000000..7f8f2d6e4137
--- /dev/null
+++ b/external/postgresql/arm64.patch.1
@@ -0,0 +1,53 @@
+diff -ur postgresql.org/src/tools/msvc/Mkvcbuild.pm postgresql/src/tools/msvc/Mkvcbuild.pm
+--- postgresql.org/src/tools/msvc/Mkvcbuild.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/Mkvcbuild.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -107,13 +107,6 @@
+
+ push(@pgportfiles, 'strtof.c') if ($vsVersion < '14.00');
+
+- if ($vsVersion >= '9.00')
+- {
+- push(@pgportfiles, 'pg_crc32c_sse42_choose.c');
+- push(@pgportfiles, 'pg_crc32c_sse42.c');
+- push(@pgportfiles, 'pg_crc32c_sb8.c');
+- }
+- else
+ {
+ push(@pgportfiles, 'pg_crc32c_sb8.c');
+ }
+diff -ur postgresql.org/src/tools/msvc/MSBuildProject.pm postgresql/src/tools/msvc/MSBuildProject.pm
+--- postgresql.org/src/tools/msvc/MSBuildProject.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/MSBuildProject.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -307,8 +307,7 @@
+ : ($self->{type} eq "dll" ? 'DynamicLibrary' : 'StaticLibrary');
+ my $libs = $self->GetAdditionalLinkerDependencies($cfgname, ';');
+
+- my $targetmachine =
+- $self->{platform} eq 'Win32' ? 'MachineX86' : 'MachineX64';
++ my $targetmachine = "MachineARM64";
+
+ my $includes = $self->{includes};
+ unless ($includes eq '' or $includes =~ /;$/)
+@@ -347,7 +347,6 @@
+ <ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
+- <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
+ <ImageHasSafeExceptionHandlers/>
+ <SubSystem>Console</SubSystem>
+diff -ur postgresql.org/src/tools/msvc/Solution.pm postgresql/src/tools/msvc/Solution.pm
+--- postgresql.org/src/tools/msvc/Solution.pm 2021-03-14 02:09:15.288060770 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-03-14 02:12:22.351726582 +0100
+@@ -62,10 +62,7 @@
+ if (1) #($^O eq "MSWin32")
+ {
+ # Examine CL help output to determine if we are in 32 or 64-bit mode.
+- my $output = `cl /? 2>&1`;
+- $? >> 8 == 0 or die "cl command not found";
+- $self->{platform} =
+- ($output =~ /^\/favor:<.+AMD64/m) ? 'x64' : 'Win32';
++ $self->{platform} = 'ARM64';
+ }
+ else
+ {
diff --git a/external/postgresql/config.pl b/external/postgresql/config.pl
new file mode 100644
index 000000000000..ae163ebbd166
--- /dev/null
+++ b/external/postgresql/config.pl
@@ -0,0 +1 @@
+$config->{openssl} = "$ENV{WORKDIR}/UnpackedTarball/openssl";
diff --git a/external/postgresql/internal-zlib.patch.1 b/external/postgresql/internal-zlib.patch.1
deleted file mode 100644
index ac2b728e1314..000000000000
--- a/external/postgresql/internal-zlib.patch.1
+++ /dev/null
@@ -1,29 +0,0 @@
-diff -up postgresql/configure.dt postgresql/configure
---- postgresql/configure.dt 2016-11-03 17:34:17.282388226 +0100
-+++ postgresql/configure 2016-11-03 17:34:35.004202484 +0100
-@@ -8566,13 +8566,13 @@ fi
-
- if test "$with_zlib" = yes; then
-
--{ $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
--$as_echo_n "checking for inflate in -lz... " >&6; }
-+{ $as_echo "$as_me:$LINENO: checking for inflate in -lzlib" >&5
-+$as_echo_n "checking for inflate in -lzlib... " >&6; }
- if test "${ac_cv_lib_z_inflate+set}" = set; then
- $as_echo_n "(cached) " >&6
- else
- ac_check_lib_save_LIBS=$LIBS
--LIBS="-lz $LIBS"
-+LIBS="-lzlib $LIBS"
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
-@@ -8636,7 +8636,7 @@ if test "x$ac_cv_lib_z_inflate" = x""yes
- #define HAVE_LIBZ 1
- _ACEOF
-
-- LIBS="-lz $LIBS"
-+ LIBS="-lzlib $LIBS"
-
- else
- { { $as_echo "$as_me:$LINENO: error: zlib library not found
diff --git a/external/postgresql/postgres-msvc-build.patch.1 b/external/postgresql/postgres-msvc-build.patch.1
new file mode 100644
index 000000000000..c217a755918b
--- /dev/null
+++ b/external/postgresql/postgres-msvc-build.patch.1
@@ -0,0 +1,110 @@
+Cygwin perl calls /bin/sh which can't resolve to .exe
+
+Also Cygwin perl has $Config{osname} different from MSWin32, and why even check that?
+
+--- postgresql/src/tools/msvc/build.pl.orig 2021-01-19 17:36:09.801463500 +0100
++++ postgresql/src/tools/msvc/build.pl 2021-01-19 17:36:20.426821300 +0100
+@@ -55,13 +55,13 @@
+ if ($buildwhat)
+ {
+ system(
+- "msbuild $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
++ "msbuild.exe $buildwhat.vcxproj /verbosity:normal $msbflags /p:Configuration=$bconf"
+ );
+ }
+ else
+ {
+ system(
+- "msbuild pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
++ "msbuild.exe pgsql.sln /verbosity:normal $msbflags /p:Configuration=$bconf"
+ );
+ }
+
+--- postgresql/src/tools/msvc/Project.pm.orig 2021-01-19 17:59:18.799237700 +0100
++++ postgresql/src/tools/msvc/Project.pm 2021-01-19 17:59:48.487711700 +0100
+@@ -22,7 +22,7 @@
+ my $self = {
+ name => $name,
+ type => $type,
+- guid => $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE',
++ guid => Win32::GuidGen(),
+ files => {},
+ references => [],
+ libraries => [],
+--- postgresql/src/tools/msvc/Solution.pm.orig 2021-01-19 18:03:04.594229100 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-01-19 18:04:13.677610100 +0100
+@@ -59,7 +59,7 @@
+ {
+ my $self = shift;
+
+- if ($^O eq "MSWin32")
++ if (1) #($^O eq "MSWin32")
+ {
+ # Examine CL help output to determine if we are in 32 or 64-bit mode.
+ my $output = `cl /? 2>&1`;
+@@ -1081,7 +1081,7 @@
+ }
+ if ($fld ne "")
+ {
+- $flduid{$fld} = $^O eq "MSWin32" ? Win32::GuidGen() : 'FAKE';
++ $flduid{$fld} = Win32::GuidGen();
+ print $sln <<EOF;
+ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "$fld", "$fld", "$flduid{$fld}"
+ EndProject
+--- postgresql/src/tools/msvc/VSObjectFactory.pm.orig 2021-01-19 18:06:42.633421700 +0100
++++ postgresql/src/tools/msvc/VSObjectFactory.pm 2021-01-19 18:06:28.663523200 +0100
+@@ -111,7 +111,7 @@
+
+ sub DetermineVisualStudioVersion
+ {
+- if ($^O eq "MSWin32")
++ if (1) # ($^O eq "MSWin32")
+ {
+ # To determine version of Visual Studio we use nmake as it has
+ # existed for a long time and still exists in current Visual
+--- postgresql/src/tools/msvc/Mkvcbuild.pm.orig 2021-01-19 18:23:59.830153900 +0100
++++ postgresql/src/tools/msvc/Mkvcbuild.pm 2021-01-19 18:24:04.095411300 +0100
+@@ -9,7 +9,7 @@
+ use warnings;
+
+ use Carp;
+-use if ($^O eq "MSWin32"), 'Win32';
++use Win32;
+ use Project;
+ use Solution;
+ use Cwd;
+--- postgresql/src/tools/msvc/Solution.pm.orig 2021-01-19 20:27:21.366237600 +0100
++++ postgresql/src/tools/msvc/Solution.pm 2021-01-19 20:28:17.773662900 +0100
+@@ -126,7 +126,8 @@
+ # openssl.exe is in the specified directory.
+ # 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}\\apps\\openssl.exe" version 2>&1);
++ print "$opensslcmd";
+ my $sslout = `$opensslcmd`;
+
+ $? >> 8 == 0
+@@ -964,8 +964,8 @@
+ # On both Win32 and Win64 the same library
+ # names are used without a debugging context.
+ $dbgsuffix = 0;
+- $libsslpath = '\lib\libssl.lib';
+- $libcryptopath = '\lib\libcrypto.lib';
++ $libsslpath = '\libssl.lib';
++ $libcryptopath = '\libcrypto.lib';
+ }
+
+ $proj->AddLibrary($self->{options}->{openssl} . $libsslpath,
+@@ -990,9 +990,9 @@
+ # to be here, so don't ask for it in last
+ # parameter.
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\ssleay32.lib', 0);
++ $self->{options}->{openssl} . '\ssleay32.lib', 0);
+ $proj->AddLibrary(
+- $self->{options}->{openssl} . '\lib\libeay32.lib', 0);
++ $self->{options}->{openssl} . '\libeay32.lib', 0);
+ }
+ }
+ }
diff --git a/external/postgresql/postgresql-9.2.1-libreoffice.patch b/external/postgresql/postgresql-9.2.1-libreoffice.patch
deleted file mode 100644
index 174ee8551a78..000000000000
--- a/external/postgresql/postgresql-9.2.1-libreoffice.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- misc/build/postgresql-9.1.1/src/interfaces/libpq/Makefile 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/src/interfaces/libpq/Makefile 2011-12-15 09:02:18.000000000 +0100
-@@ -148,3 +148,6 @@
- maintainer-clean: distclean maintainer-clean-lib
- $(MAKE) -C test $@
- rm -f libpq-dist.rc
-+
-+libpq-flags.mk:
-+ @printf '%s\n' 'LIBPQ_DEP_LIBS+=$(SHLIB_LINK)' > '$@'
---- misc/build/postgresql-9.1.1/src/interfaces/libpq/win32.mak 2011-12-14 14:28:59.000000000 +0100
-+++ misc/build/postgresql-9.1.1.patched/src/interfaces/libpq/win32.mak 2011-12-15 09:11:37.000000000 +0100
-@@ -11,14 +11,12 @@
- !ENDIF
-
- !IFDEF DEBUG
--OPT=/Od /Zi /MDd
-+OPT=/Od /Zi
- LOPT=/DEBUG
--DEBUGDEF=/D _DEBUG
--OUTFILENAME=libpqd
-+OUTFILENAME=libpq
- !ELSE
- OPT=/O2 /MD
- LOPT=
--DEBUGDEF=/D NDEBUG
- OUTFILENAME=libpq
- !ENDIF
-
-@@ -67,18 +66,11 @@
- CPP=cl.exe
- RSC=rc.exe
-
--!IFDEF DEBUG
--OUTDIR=.\Debug
--INTDIR=.\Debug
--CPP_OBJS=.\Debug/
--!ELSE
--OUTDIR=.\Release
--INTDIR=.\Release
--CPP_OBJS=.\Release/
--!ENDIF
--
-+OUTDIR=.
-+INTDIR=.
-+CPP_OBJS=./
-
--ALL : config "$(OUTDIR)\$(OUTFILENAME).lib" "$(OUTDIR)\$(OUTFILENAME).dll"
-+ALL : config "$(OUTDIR)\$(OUTFILENAME).lib"
-
- CLEAN :
- -@erase "$(INTDIR)\getaddrinfo.obj"
-@@ -178,10 +170,11 @@
- "$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
--CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. /I "$(SSL_INC)" \
-+CPP_PROJ=/nologo /W3 /EHsc $(OPT) /I "..\..\include" /I "..\..\include\port\win32" /I "..\..\include\port\win32_msvc" /I "..\..\port" /I. $(SOLARINC) /I $(WORKDIR)/UnpackedTarball/openssl/include \
- /D "FRONTEND" $(DEBUGDEF) \
- /D "WIN32" /D "_WINDOWS" /Fp"$(INTDIR)\libpq.pch" \
- /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c \
-+ /D "_CRT_NONSTDC_NO_DEPRECATE" \
- /D "_CRT_SECURE_NO_DEPRECATE" $(ADD_DEFINES)
-
- !IFDEF USE_SSL
-@@ -222,7 +215,7 @@
- <<
-
- "$(INTDIR)\libpq.res" : "$(INTDIR)" libpq-dist.rc
-- $(RSC) $(RSC_PROJ) libpq-dist.rc
-+ $(RSC) $(SOLARINC) $(RSC_PROJ) libpq-dist.rc
-
-
- "$(OUTDIR)\$(OUTFILENAME).dll" : "$(OUTDIR)" "$(INTDIR)\libpq.res"
-
diff --git a/external/postgresql/postgresql-libs-leak.patch b/external/postgresql/postgresql-libs-leak.patch
deleted file mode 100644
index 8224137f1f97..000000000000
--- a/external/postgresql/postgresql-libs-leak.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-diff --recursive -u misc/build/postgresql-9.1.1/configure.in misc/build/postgresql-9.1.1.patched/configure.in
---- misc/build/postgresql-9.1.1/configure.in 2011-09-22 23:57:57.000000000 +0200
-+++ misc/build/postgresql-9.1.1.patched/configure.in 2012-02-03 11:42:45.000000000 +0100
-@@ -903,18 +903,9 @@
- *** Not using spinlocks will cause poor performance.])
- fi
-
--if test "$with_gssapi" = yes ; then
-- if test "$PORTNAME" != "win32"; then
-- AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
-- [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
-- else
-- LIBS="$LIBS -lgssapi32"
-- fi
--fi
--
- if test "$with_krb5" = yes ; then
- if test "$PORTNAME" != "win32"; then
-- AC_SEARCH_LIBS(com_err, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken' com_err 'com_err -lssl -lcrypto'], [],
-+ AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
- AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
- [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
-@@ -924,6 +915,15 @@
- fi
- fi
-
-+if test "$with_gssapi" = yes ; then
-+ if test "$PORTNAME" != "win32"; then
-+ AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
-+ [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
-+ else
-+ LIBS="$LIBS -lgssapi32"
-+ fi
-+fi
-+
- if test "$with_openssl" = yes ; then
- dnl Order matters!
- if test "$PORTNAME" != "win32"; then
-
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 02ba67ffe0dd..f7b8d67f25b2 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -17,25 +17,22 @@ python_arch_subdir=amd64/
else
python_arch_subdir=win32/
endif
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
+$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,PCbuild/$(python_arch_subdir)python$(if $(MSVC_USE_DEBUG_RUNTIME),_d).exe))
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)$(if $(MSVC_USE_DEBUG_RUNTIME),_d).dll))
ifeq ($(MSVC_USE_DEBUG_RUNTIME),)
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,PCbuild/$(python_arch_subdir)python$(PYTHON_VERSION_MAJOR).dll))
endif
-$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib,\
+$(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
@@ -55,71 +52,69 @@ $(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(
# that may not be available on baseline systems.
ifneq ($(OS),AIX)
-$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/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 \
+$(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).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
@@ -139,8 +134,8 @@ endif
# note: python configure overrides config.guess with something that doesn't
# put -pc in its linux platform triplets, so filter that...
ifneq ($(OS),WNT)
-$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib,\
- LO_lib/_sysconfigdata_m_$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
+$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
+ LO_lib/_sysconfigdata__$(python3_MACHDEP)_$(subst i686,i386,$(subst -pc,,$(HOST_PLATFORM))).py \
))
endif
@@ -150,8 +145,12 @@ 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-3.7.7/lib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LICENSE \
Lib/__future__.py \
Lib/__phello__.foo.py \
@@ -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,33 +320,60 @@ $(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-3.7.7/lib/asyncio,\
+$(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 \
-))
-
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/collections,\
+ Lib/asyncio/selector_events.py \
+ Lib/asyncio/sslproto.py \
+ Lib/asyncio/staggered.py \
+ Lib/asyncio/streams.py \
+ Lib/asyncio/subprocess.py \
+ Lib/asyncio/tasks.py \
+ Lib/asyncio/transports.py \
+ Lib/asyncio/trsock.py \
+ Lib/asyncio/unix_events.py \
+ Lib/asyncio/windows_events.py \
+ Lib/asyncio/windows_utils.py \
+))
+
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/collections,\
Lib/collections/__init__.py \
Lib/collections/abc.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/concurrent,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/concurrent,\
Lib/concurrent/__init__.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/concurrent/futures,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/concurrent/futures,\
Lib/concurrent/futures/__init__.py \
Lib/concurrent/futures/_base.py \
Lib/concurrent/futures/process.py \
Lib/concurrent/futures/thread.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/ctypes,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/ctypes,\
Lib/ctypes/__init__.py \
Lib/ctypes/_aix.py \
Lib/ctypes/_endian.py \
@@ -355,7 +381,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/ctypes/wintypes.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/ctypes/macholib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/ctypes/macholib,\
Lib/ctypes/macholib/README.ctypes \
Lib/ctypes/macholib/fetch_macholib \
Lib/ctypes/macholib/fetch_macholib.bat \
@@ -365,7 +391,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/ctypes/macholib/framework.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/distutils,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/distutils,\
Lib/distutils/README \
Lib/distutils/__init__.py \
Lib/distutils/_msvccompiler.py \
@@ -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,47 +419,47 @@ $(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-3.7.7/lib/distutils/command,\
+$(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-3.7.7/lib/email,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email,\
Lib/email/__init__.py \
Lib/email/_encoded_words.py \
Lib/email/_header_value_parser.py \
@@ -457,7 +483,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/email/utils.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/email/mime,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/email/mime,\
Lib/email/mime/__init__.py \
Lib/email/mime/application.py \
Lib/email/mime/audio.py \
@@ -469,13 +495,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/email/mime/text.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/encodings,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/encodings,\
Lib/encodings/__init__.py \
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 \
@@ -596,13 +621,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/encodings/zlib_codec.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/html,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/html,\
Lib/html/__init__.py \
Lib/html/entities.py \
Lib/html/parser.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/http,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/http,\
Lib/http/__init__.py \
Lib/http/client.py \
Lib/http/cookiejar.py \
@@ -610,17 +635,18 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/http/server.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/importlib,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/importlib,\
Lib/importlib/__init__.py \
Lib/importlib/_bootstrap.py \
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 \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/json,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/json,\
Lib/json/__init__.py \
Lib/json/decoder.py \
Lib/json/encoder.py \
@@ -628,7 +654,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/json/tool.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/lib2to3,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib2to3,\
Lib/lib2to3/__init__.py \
Lib/lib2to3/__main__.py \
Lib/lib2to3/Grammar.txt \
@@ -644,7 +670,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/refactor.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/lib2to3/fixes,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/lib2to3/fixes,\
Lib/lib2to3/fixes/__init__.py \
Lib/lib2to3/fixes/fix_apply.py \
Lib/lib2to3/fixes/fix_asserts.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 \
@@ -700,7 +726,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/lib2to3/fixes/fix_zip.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/pgen2,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/pgen2,\
Lib/lib2to3/pgen2/__init__.py \
Lib/lib2to3/pgen2/conv.py \
Lib/lib2to3/pgen2/driver.py \
@@ -708,23 +734,35 @@ $(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-3.7.7/lib/logging,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/logging,\
Lib/logging/__init__.py \
Lib/logging/config.py \
Lib/logging/handlers.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/multiprocessing,\
+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,27 +771,29 @@ $(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 \
Lib/multiprocessing/util.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/multiprocessing/dummy,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/multiprocessing/dummy,\
Lib/multiprocessing/dummy/__init__.py \
Lib/multiprocessing/dummy/connection.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/pydoc_data,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/pydoc_data,\
Lib/pydoc_data/__init__.py \
Lib/pydoc_data/_pydoc.css \
Lib/pydoc_data/topics.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/unittest,\
+$(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,41 +805,7 @@ $(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-3.7.7/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-3.7.7/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-3.7.7/lib/urllib,\
+$(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 \
Lib/urllib/parse.py \
@@ -808,7 +814,7 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/urllib/robotparser.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/wsgiref,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/wsgiref,\
Lib/wsgiref/__init__.py \
Lib/wsgiref/handlers.py \
Lib/wsgiref/headers.py \
@@ -817,35 +823,35 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/wsgiref/validate.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/xml,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml,\
Lib/xml/__init__.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/xml/dom,\
+$(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-3.7.7/lib/xml/etree,\
+$(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-3.7.7/lib/xml/parsers,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/parsers,\
Lib/xml/parsers/__init__.py \
Lib/xml/parsers/expat.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/xml/sax,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xml/sax,\
Lib/xml/sax/__init__.py \
Lib/xml/sax/_exceptions.py \
Lib/xml/sax/expatreader.py \
@@ -854,13 +860,13 @@ $(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/p
Lib/xml/sax/xmlreader.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/xmlrpc,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/xmlrpc,\
Lib/xmlrpc/__init__.py \
Lib/xmlrpc/client.py \
Lib/xmlrpc/server.py \
))
-$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/site-packages,\
+$(eval $(call gb_ExternalPackage_add_unpacked_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/site-packages,\
Lib/site-packages/README.txt \
))
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index 92772684ec87..1ff06a2382ed 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -1,4 +1,4 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
@@ -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,37 +165,18 @@ $(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 $@
-# Remove modules (both Python and binary bits) of questionable usefulness that we don't ship on
-# other platforms either. See the "packages not shipped" comment in ExternalPackage_python3.mk.
-
+# 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)/dbm
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/sqlite3
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/curses
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/idlelib
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/tkinter
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/turtledemo
rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/test
- rm -rf $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/venv
- # Then the binary libraries
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_dbm.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_sqlite3.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_curses_panel.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_idlelib.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_tkinter.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
- rm -f $(python3_fw_prefix)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib-dynload/_test*.cpython-$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)m.so
+
endif
# vim: set noet sw=4 ts=4:
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index fb693e70de7e..94950537386c 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -20,11 +20,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python3/python-3.3.0-darwin.patch.1 \
external/python3/python-3.7.6-msvc-ssl.patch.1 \
external/python3/python-3.5.4-msvc-disable.patch.1 \
- external/python3/python-3.3.0-clang.patch.1 \
external/python3/ubsan.patch.0 \
external/python3/python-3.5.tweak.strip.soabi.patch \
external/python3/darwin.patch.0 \
- external/python3/macos-11.patch.0 \
))
ifneq ($(filter DRAGONFLY FREEBSD LINUX NETBSD OPENBSD SOLARIS,$(OS)),)
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/macos-11.patch.0 b/external/python3/macos-11.patch.0
deleted file mode 100644
index 42b74f4b2f50..000000000000
--- a/external/python3/macos-11.patch.0
+++ /dev/null
@@ -1,58 +0,0 @@
--*- Mode: diff -*-
---- Mac/Tools/pythonw.c
-+++ Mac/Tools/pythonw.c
-@@ -121,6 +121,8 @@
- cpu_types[0] = CPU_TYPE_POWERPC;
- #elif defined(__i386__)
- cpu_types[0] = CPU_TYPE_X86;
-+#elif defined(__arm64__)
-+ cpu_types[0] = CPU_TYPE_ARM64;
- #else
- # error "Unknown CPU"
- #endif
---- setup.py
-+++ setup.py
-@@ -670,7 +670,10 @@
- add_dir_to_list(self.compiler.include_dirs,
- sysconfig.get_config_var("INCLUDEDIR"))
-
-- system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
-+ if host_platform == 'darwin':
-+ system_lib_dirs = ['/usr/lib', macosx_sdk_root()+'/usr/lib']
-+ else:
-+ system_lib_dirs = ['/lib64', '/usr/lib64', '/lib', '/usr/lib']
- system_include_dirs = ['/usr/include']
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
---- Modules/_decimal/libmpdec/mpdecimal.h
-+++ Modules/_decimal/libmpdec/mpdecimal.h
-@@ -135,6 +135,9 @@
- #elif defined(__x86_64__)
- #define CONFIG_64
- #define ASM
-+ #elif defined(__arm64__)
-+ #define CONFIG_64
-+ #define ANSI
- #else
- #error "unknown architecture for universal build."
- #endif
---- Modules/_posixsubprocess.c
-+++ Modules/_posixsubprocess.c
-@@ -31,6 +31,8 @@
- # define SYS_getdents64 __NR_getdents64
- #endif
-
-+#include <limits.h>
-+
- #if defined(__sun) && defined(__SVR4)
- /* readdir64 is used to work around Solaris 9 bug 6395699. */
- # define readdir readdir64
-@@ -202,7 +202,7 @@
- #endif
- #ifdef _SC_OPEN_MAX
- local_max_fd = sysconf(_SC_OPEN_MAX);
-- if (local_max_fd == -1)
-+ if (local_max_fd == -1 || local_max_fd == LONG_MAX)
- #endif
- local_max_fd = 256; /* Matches legacy Lib/subprocess.py behavior. */
- return local_max_fd;
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..39d3c9180a19 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@
@@ -63,19 +63,3 @@ diff -ru python3.orig/Mac/Resources/framework/Info.plist.in python3/Mac/Resource
<key>CFBundleGetInfoString</key>
<string>Python Runtime and Library</string>
<key>CFBundleIdentifier</key>
-diff -ru python3.orig/setup.py python3/setup.py
---- python3.orig/setup.py 2015-07-26 17:36:11.804497783 +0200
-+++ python3/setup.py 2015-07-26 17:39:48.599512337 +0200
-@@ -468,11 +468,11 @@
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
-- if not cross_compiling:
-+ if not cross_compiling and host_platform != 'darwin':
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
-+ if cross_compiling or host_platform == 'darwin':
- self.add_gcc_paths()
- self.add_multiarch_paths()
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
index 0963a5f1bb1d..c4a1dea61ecf 100644
--- a/external/python3/python-3.3.3-disable-obmalloc.patch.0
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -1,6 +1,6 @@
--- Objects/obmalloc.c
+++ Objects/obmalloc.c
-@@ -413,8 +413,8 @@
+@@ -712,8 +712,8 @@
#ifdef WITH_PYMALLOC
@@ -10,7 +10,7 @@
/* If we're using GCC, use __builtin_expect() to reduce overhead of
the valgrind checks */
-@@ -1181,7 +1181,7 @@
+@@ -1430,7 +1430,7 @@
#ifdef WITH_VALGRIND
if (UNLIKELY(running_on_valgrind == -1)) {
diff --git a/external/python3/python-3.3.3-elf-rpath.patch.1 b/external/python3/python-3.3.3-elf-rpath.patch.1
index 0dfa16c8c247..a408858f5917 100644
--- a/external/python3/python-3.3.3-elf-rpath.patch.1
+++ b/external/python3/python-3.3.3-elf-rpath.patch.1
@@ -5,18 +5,16 @@ set RPATH (only to be used on ELF platforms)
diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
--- python3.orig/Makefile.pre.in 2015-07-26 20:29:07.126194320 +0200
+++ python3/Makefile.pre.in 2015-07-26 20:37:21.814227530 +0200
-@@ -550,7 +550,7 @@
+@@ -566,7 +566,7 @@
# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
-- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -Wl,-rpath,\$$ORIGIN
+- $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
++ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) -Wl,-rpath,\$$ORIGIN
platform: $(BUILDPYTHON) pybuilddir.txt
$(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print("%s-%d.%d" % (get_platform(), *sys.version_info[:2]))' >platform
---- python3.orig/Makefile.pre.in 2015-07-05 18:50:07.000000000 +0200
-+++ python3/Makefile.pre.in 2015-07-26 17:34:00.386488960 +0200
-@@ -607,7 +607,7 @@
+@@ -628,7 +628,7 @@
fi
libpython3.so: libpython$(LDVERSION).so
@@ -24,4 +22,4 @@ diff -ru python3.orig/Makefile.pre.in python3/Makefile.pre.in
+ $(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^ -Wl,-rpath,\$$ORIGIN
libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
- $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ $(CC) -dynamiclib -Wl,-single_module $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
diff --git a/external/python3/python-3.5.4-msvc-disable.patch.1 b/external/python3/python-3.5.4-msvc-disable.patch.1
index 416ab2c7b15b..d5b4e3f6264b 100644
--- a/external/python3/python-3.5.4-msvc-disable.patch.1
+++ b/external/python3/python-3.5.4-msvc-disable.patch.1
@@ -3,7 +3,7 @@ Disable some stuff LO does not need, especially stuff with external dependencies
diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
--- python3.orig/PCbuild/pcbuild.sln 2017-08-10 00:04:44.359879894 +0200
+++ python3/PCbuild/pcbuild.sln 2017-08-10 00:13:51.179873748 +0200
-@@ -12,8 +12,6 @@
+@@ -15,8 +15,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcxproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}"
EndProject
@@ -12,7 +12,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}"
-@@ -28,32 +26,18 @@
+@@ -31,34 +29,20 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_socket", "_socket.vcxproj", "{86937F53-C189-40EF-8CE8-8759D8E7D480}"
EndProject
@@ -22,6 +22,8 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testcapi", "_testcapi.vcxproj", "{6901D91C-6E48-4BB7-9FEC-700C8131DF1D}"
EndProject
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testinternalcapi", "_testinternalcapi.vcxproj", "{900342D7-516A-4469-B1AD-59A66E49A25F}"
+ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_testimportmultiple", "_testimportmultiple.vcxproj", "{36D0C52C-DF4E-45D0-8BC7-E294C3ABC781}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_tkinter", "_tkinter.vcxproj", "{4946ECAC-2E69-4BF8-A90A-F5136F5094DF}"
@@ -45,7 +47,7 @@ diff -ru python3.orig/PCbuild/pcbuild.sln python3/PCbuild/pcbuild.sln
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_multiprocessing", "_multiprocessing.vcxproj", "{9E48B300-37D1-11DD-8C41-005056C00008}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "python3dll", "python3dll.vcxproj", "{885D4898-D08D-4091-9C40-C700CFE3FC5A}"
-@@ -75,8 +75,6 @@
+@@ -93,8 +77,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_queue", "_queue.vcxproj", "{78D80A15-BD8C-44E2-B49E-1F05B0A0A687}"
EndProject
diff --git a/external/python3/python-3.5.tweak.strip.soabi.patch b/external/python3/python-3.5.tweak.strip.soabi.patch
index 48ac7f82f8be..4c2bb2bb9a29 100644
--- a/external/python3/python-3.5.tweak.strip.soabi.patch
+++ b/external/python3/python-3.5.tweak.strip.soabi.patch
@@ -1,7 +1,7 @@
diff -ru python3.orig/configure python3/configure
--- misc/python3.orig/configure 2015-07-26 21:14:31.127377193 +0200
+++ misc/python3/configure 2015-07-26 21:21:34.975405648 +0200
-@@ -14388,7 +14388,7 @@
+@@ -15229,7 +15229,7 @@
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
diff --git a/external/python3/python-3.7.6-msvc-ssl.patch.1 b/external/python3/python-3.7.6-msvc-ssl.patch.1
index e8e94f674c1f..17cc440f2204 100644
--- a/external/python3/python-3.7.6-msvc-ssl.patch.1
+++ b/external/python3/python-3.7.6-msvc-ssl.patch.1
@@ -2,7 +2,7 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
--- python3/PCbuild/_ssl.vcxproj.orig2 2019-12-23 15:54:19.254298900 +0100
+++ python3/PCbuild/_ssl.vcxproj 2019-12-23 15:54:24.693251200 +0100
-@@ -67,9 +67,6 @@
+@@ -99,9 +99,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\Modules\_ssl.c" />
@@ -14,27 +14,12 @@ No use for applink.c OPENSSL_Applink, everything is compiled with the same MSVC
<ResourceCompile Include="..\PC\python_nt.rc" />
--- python3/PCbuild/openssl.props.orig 2019-12-23 16:20:34.588135900 +0100
+++ python3/PCbuild/openssl.props 2019-12-23 16:20:51.074001300 +0100
-@@ -6,7 +6,7 @@
- </ClCompile>
- <Link>
- <AdditionalLibraryDirectories>$(opensslOutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-- <AdditionalDependencies>ws2_32.lib;libcrypto.lib;libssl.lib;%(AdditionalDependencies)</AdditionalDependencies>
-+ <AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- </Link>
+@@ -6,8 +6,6 @@
</ItemDefinitionGroup>
<PropertyGroup>
-@@ -15,10 +15,10 @@
- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ <_DLLSuffix>-1_1</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix>
+- <_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
</PropertyGroup>
<ItemGroup>
-- <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
-- <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).pdb" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).dll" />
-- <_SSLDLL Include="$(opensslOutDir)\libssl$(_DLLSuffix).pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\libeay32.pdb" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.dll" />
-+ <_SSLDLL Include="$(opensslOutDir)\ssleay32.pdb" />
- </ItemGroup>
- <Target Name="_CopySSLDLL" Inputs="@(_SSLDLL)" Outputs="@(_SSLDLL->'$(OutDir)%(Filename)%(Extension)')" AfterTargets="Build">
- <Copy SourceFiles="@(_SSLDLL)" DestinationFolder="$(OutDir)" />
+ <_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
diff --git a/external/python3/ubsan.patch.0 b/external/python3/ubsan.patch.0
index 938acc1f1725..d44fbe055c86 100644
--- a/external/python3/ubsan.patch.0
+++ b/external/python3/ubsan.patch.0
@@ -18,3 +18,26 @@
/* Set the carry bit if the function uses any sse registers.
This is clc or stc, together with the first byte of the jmp. */
+--- Modules/posixmodule.c
++++ Modules/posixmodule.c
+@@ -13998,6 +13998,9 @@
+ };
+
+ static int
++#if defined __clang__
++__attribute__((no_sanitize("shift-base"))) // MFD_HUGE_16GB in /usr/include/linux/memfd.h
++#endif
+ all_ins(PyObject *m)
+ {
+ #ifdef F_OK
+--- Objects/listobject.c
++++ Objects/listobject.c
+@@ -554,7 +554,7 @@
+ dest[i] = v;
+ }
+ src = b->ob_item;
+- dest = np->ob_item + Py_SIZE(a);
++ dest = Py_SIZE(a) == 0 ? np->ob_item : np->ob_item + Py_SIZE(a);
+ for (i = 0; i < Py_SIZE(b); i++) {
+ PyObject *v = src[i];
+ Py_INCREF(v);
diff --git a/external/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/qa/unit/data/attributeRedefinedTest.odp b/filter/qa/unit/data/attributeRedefinedTest.odp
new file mode 100644
index 000000000000..dfb814bfb9ec
--- /dev/null
+++ b/filter/qa/unit/data/attributeRedefinedTest.odp
Binary files differ
diff --git a/filter/qa/unit/data/empty.doc b/filter/qa/unit/data/empty.doc
new file mode 100644
index 000000000000..e69de29bb2d1
--- /dev/null
+++ b/filter/qa/unit/data/empty.doc
diff --git a/filter/qa/unit/svg.cxx b/filter/qa/unit/svg.cxx
index c59d3cf63dca..95f894ed42cd 100644
--- a/filter/qa/unit/svg.cxx
+++ b/filter/qa/unit/svg.cxx
@@ -138,6 +138,48 @@ CPPUNIT_TEST_FIXTURE(SvgFilterTest, testShapeNographic)
xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
}
+CPPUNIT_TEST_FIXTURE(SvgFilterTest, attributeRedefinedTest)
+{
+ // Load document containing empty paragraphs with ids.
+ load("attributeRedefinedTest.odp");
+
+ // Export to SVG.
+ uno::Reference<frame::XStorable> xStorable(getComponent(), uno::UNO_QUERY_THROW);
+ SvMemoryStream aStream;
+ uno::Reference<io::XOutputStream> xOut = new utl::OOutputStreamWrapper(aStream);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("impress_svg_Export");
+ aMediaDescriptor["OutputStream"] <<= xOut;
+ xStorable->storeToURL("private:stream", aMediaDescriptor.getAsConstPropertyValueList());
+ aStream.Seek(STREAM_SEEK_TO_BEGIN);
+
+ xmlDocPtr pXmlDoc = parseXmlStream(&aStream);
+
+ // We expect four paragraph
+ // 2 empty paragraphs with ids
+ // 2 paragraphs with text
+ // Without the accompanying fix the test would have failed with
+ // Expected : 4
+ // Actual : 2
+ // i.e. 2 of the empty paragraph do not get generated even if there
+ // is id imported for the paragraphs
+ // If we don't create the empty paragraphs the id attribute attribute gets redefined like this:
+ // <tspan id="id14" id="id15" id="id17" class="TextParagraph" font-family="Bahnschrift Light" font-size="1129px" font-weight="400">
+
+ OString xPath = "//svg:g[@class='TextShape']//svg:text[@class='SVGTextShape']//"
+ "svg:tspan[@class='TextParagraph']";
+ assertXPath(pXmlDoc, xPath, 4);
+
+ //assert that each tspan element with TextParagraph class has id and the tspan element of
+ //each empty paragraph doesnot contain tspan element with class TextPosition
+ assertXPath(pXmlDoc, xPath + "[1]", "id", "id4");
+ assertXPath(pXmlDoc, xPath + "[2]", "id", "id5");
+ assertXPath(pXmlDoc, xPath + "[2]//svg:tspan[@class='TextPosition']", 0);
+ assertXPath(pXmlDoc, xPath + "[3]", "id", "id6");
+ assertXPath(pXmlDoc, xPath + "[3]//svg:tspan[@class='TextPosition']", 0);
+ assertXPath(pXmlDoc, xPath + "[4]", "id", "id7");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/filter/qa/unit/textfilterdetect.cxx b/filter/qa/unit/textfilterdetect.cxx
index 74d967490ffe..4083610b0736 100644
--- a/filter/qa/unit/textfilterdetect.cxx
+++ b/filter/qa/unit/textfilterdetect.cxx
@@ -116,6 +116,26 @@ CPPUNIT_TEST_FIXTURE(TextFilterDetectTest, testEmptyFile)
// Without the accompanying fix in place, this test would have failed, as it was opened in
// Writer instead.
CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.presentation.PresentationDocument"));
+ getComponent()->dispose();
+
+ // ... and DOC
+ aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "empty.doc";
+ // Without the accompanying fix in place, this test would have failed, the import filter aborted
+ // loading.
+ getComponent() = loadFromDesktop(aURL);
+ xServiceInfo.set(getComponent(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xServiceInfo.is());
+ CPPUNIT_ASSERT(xServiceInfo->supportsService("com.sun.star.text.TextDocument"));
+ uno::Reference<frame::XModel> xModel(getComponent(), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> aArgs = xModel->getArgs();
+ comphelper::SequenceAsHashMap aMap(aArgs);
+ OUString aFilterName;
+ aMap["FilterName"] >>= aFilterName;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: MS Word 97
+ // - Actual : MS WinWord 6.0
+ // i.e. opening worked, but saving back failed instead of producing a WW8 binary file.
+ CPPUNIT_ASSERT_EQUAL(OUString("MS Word 97"), aFilterName);
}
}
diff --git a/filter/source/config/fragments/types/writer_T602_Document.xcu b/filter/source/config/fragments/types/writer_T602_Document.xcu
index c34f823da4ca..e9b3df39cf33 100644
--- a/filter/source/config/fragments/types/writer_T602_Document.xcu
+++ b/filter/source/config/fragments/types/writer_T602_Document.xcu
@@ -18,7 +18,7 @@
<node oor:name="writer_T602_Document" oor:op="replace" >
<prop oor:name="DetectService"><value>com.sun.star.comp.Writer.T602ImportFilter</value></prop>
<prop oor:name="URLPattern"/>
- <prop oor:name="Extensions"><value>602 txt</value></prop>
+ <prop oor:name="Extensions"><value>602</value></prop>
<prop oor:name="MediaType"><value>application/x-t602</value></prop>
<prop oor:name="Preferred"><value>true</value></prop>
<prop oor:name="PreferredFilter"><value>T602Document</value></prop>
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx b/filter/source/storagefilterdetect/filterdetect.cxx
index 02ed875c6699..694251c389b3 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -33,6 +33,8 @@
#include <com/sun/star/packages/zip/ZipIOException.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <comphelper/lok.hxx>
+
using namespace ::com::sun::star;
using utl::MediaDescriptor;
@@ -103,6 +105,11 @@ OUString SAL_CALL StorageFilterDetect::detect(uno::Sequence<beans::PropertyValue
OUString aMediaType;
xStorageProperties->getPropertyValue( "MediaType" ) >>= aMediaType;
aTypeName = getInternalFromMediaType( aMediaType );
+ if (comphelper::LibreOfficeKit::isActive() && aTypeName == "draw8_template")
+ {
+ // save it as draw8 instead of template format
+ aTypeName = "draw8";
+ }
}
catch( const lang::WrappedTargetException& aWrap )
diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js
index 0babb0083cc8..8906825126fe 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -7033,6 +7033,8 @@ function matrixToString( aSVGMatrix )
// eslint-disable-next-line no-unused-vars
function numberParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
if( sValue === '.' )
return undefined;
var reFloatNumber = /^[+-]?[0-9]*[.]?[0-9]*$/;
@@ -7045,6 +7047,9 @@ function numberParser( sValue )
function booleanParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
+
sValue = sValue.toLowerCase();
if( sValue === 'true' )
return true;
@@ -7056,6 +7061,9 @@ function booleanParser( sValue )
function colorParser( sValue )
{
+ if( typeof sValue !== 'string' )
+ return undefined;
+
// The following 3 color functions are used in evaluating sValue string
// so don't remove them.
@@ -7989,6 +7997,7 @@ var ENUM_PROPERTY = 2;
var COLOR_PROPERTY = 3;
var STRING_PROPERTY = 4;
var BOOL_PROPERTY = 5;
+var TUPLE_NUMBER_PROPERTY = 6;
var aValueTypeOutMap = [ 'unknown', 'number', 'enum', 'color', 'string', 'boolean' ];
@@ -8006,6 +8015,14 @@ var aAttributeMap =
'get': 'getOpacity',
'set': 'setOpacity' },
+ 'scale': { 'type': TUPLE_NUMBER_PROPERTY,
+ 'get': 'getSize',
+ 'set': 'setSize' },
+
+ 'translate': { 'type': TUPLE_NUMBER_PROPERTY,
+ 'get': 'getPos',
+ 'set': 'setPos' },
+
'rotate': { 'type': NUMBER_PROPERTY,
'get': 'getRotationAngle',
'set': 'setRotationAngle' },
@@ -11574,6 +11591,70 @@ PropertyAnimationNode.prototype.createActivity = function()
+function isValidTransformation( sType )
+{
+ return ( sType === 'translate' || sType === 'scale' || sType === 'rotate'
+ || sType === 'skewX' || sType === 'skewY' );
+}
+
+function AnimationTransformNode( aAnimElem, aParentNode, aNodeContext )
+{
+ AnimationTransformNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext );
+
+ this.sClassName = 'AnimationTransformNode';
+}
+extend( AnimationTransformNode, AnimationBaseNode3 );
+
+
+AnimationTransformNode.prototype.parseElement = function()
+{
+ var bRet = AnimationTransformNode.superclass.parseElement.call(this);
+
+ var aAnimElem = this.aElement;
+
+ // transformation type
+ var sTransformType = aAnimElem.getAttribute( 'svg:type' );
+ if( !isValidTransformation( sTransformType ) )
+ {
+ this.eCurrentState = INVALID_NODE;
+ log( 'AnimationTransformNode.parseElement: transformation type not found: ' + sTransformType );
+ }
+ else
+ {
+ this.sAttributeName = sTransformType;
+ }
+
+ return bRet;
+}
+
+AnimationTransformNode.prototype.createActivity = function()
+{
+ var aActivityParamSet = this.fillActivityParams();
+ var aAnimation;
+
+ if( this.getAttributeName() === 'scale' || this.getAttributeName() === 'translate' )
+ {
+ aAnimation = createPairPropertyAnimation( this.getAttributeName(),
+ this.getAnimatedElement(),
+ this.aNodeContext.aSlideWidth,
+ this.aNodeContext.aSlideHeight );
+
+ }
+ else
+ {
+ aAnimation = createPropertyAnimation( this.getAttributeName(),
+ this.getAnimatedElement(),
+ this.aNodeContext.aSlideWidth,
+ this.aNodeContext.aSlideHeight );
+ }
+
+ var aInterpolator = null; // createActivity will compute it;
+ return createActivity( aActivityParamSet, this, aAnimation, aInterpolator );
+};
+
+
+
+
function AnimationSetNode( aAnimElem, aParentNode, aNodeContext )
{
AnimationSetNode.superclass.constructor.call( this, aAnimElem, aParentNode, aNodeContext );
@@ -11872,10 +11953,8 @@ function createAnimationNode( aElement, aParentNode, aNodeContext )
aCreatedNode = new AnimationColorNode( aElement, aParentNode, aNodeContext );
break;
case ANIMATION_NODE_ANIMATETRANSFORM:
- //aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext );
- //break;
- log( 'createAnimationNode: ANIMATETRANSFORM not implemented' );
- return null;
+ aCreatedNode = new AnimationTransformNode( aElement, aParentNode, aNodeContext );
+ break;
case ANIMATION_NODE_TRANSITIONFILTER:
aCreatedNode = new AnimationTransitionFilterNode( aElement, aParentNode, aNodeContext );
break;
@@ -11998,6 +12077,41 @@ function createPropertyAnimation( sAttrName, aAnimatedElement, nWidth, nHeight )
+function createPairPropertyAnimation( sTransformType, aAnimatedElement, nWidth, nHeight )
+{
+ var aFunctorSet = aAttributeMap[ sTransformType ];
+ var sGetValueMethod = aFunctorSet.get;
+ var sSetValueMethod = aFunctorSet.set;
+
+ var aDefaultValue = [];
+ var aSizeReference = [];
+ if( sTransformType === 'scale' )
+ {
+ aDefaultValue[0] = aSizeReference[0] = aAnimatedElement.getBaseBBox().width;
+ aDefaultValue[1] = aSizeReference[1] = aAnimatedElement.getBaseBBox().height;
+ }
+ else if( sTransformType === 'translate' )
+ {
+ aDefaultValue[0] = aAnimatedElement.getBaseCenterX();
+ aDefaultValue[1] = aAnimatedElement.getBaseCenterY();
+ aSizeReference[0] = nWidth;
+ aSizeReference[1] = nHeight;
+ }
+ else
+ {
+ log( 'createPairPropertyAnimation: transform type is not handled' );
+ return null;
+ }
+
+ return new TupleAnimation( bind( aAnimatedElement, aAnimatedElement[ sGetValueMethod ] ),
+ bind( aAnimatedElement, aAnimatedElement[ sSetValueMethod ] ),
+ aDefaultValue,
+ aSizeReference );
+}
+
+
+
+
/** createShapeTransition
*
* @param aActivityParamSet
@@ -12197,6 +12311,45 @@ GenericAnimation.prototype.getUnderlyingValue = function()
+function TupleAnimation( aGetValueFunc, aSetValueFunc, aDefaultValue, aReferenceSize )
+{
+ TupleAnimation.superclass.constructor.call( this, aGetValueFunc, aSetValueFunc );
+ assert( aDefaultValue && aReferenceSize,
+ 'TupleAnimation constructor: default value functor and/or reference size are not valid' );
+
+ this.aDefaultValue = aDefaultValue;
+ this.aReferenceSize = aReferenceSize;
+}
+extend( TupleAnimation, GenericAnimation );
+
+TupleAnimation.prototype.perform = function( aNormValue )
+{
+ assert(aNormValue.length === this.aReferenceSize.length);
+
+ var aValue = [];
+ for( var i = 0; i < aNormValue.length; ++i )
+ {
+ aValue.push( aNormValue[i] * this.aReferenceSize[i] );
+ }
+
+ this.aSetValueFunc( aValue );
+};
+
+TupleAnimation.prototype.getUnderlyingValue = function()
+{
+ var aValue = this.aGetValueFunc();
+ assert(aValue.length === this.aReferenceSize.length);
+
+ var aNormValue = [];
+ for( var i = 0; i < aValue.length; ++i )
+ {
+ aNormValue.push( aValue[i] / this.aReferenceSize[i] );
+ }
+
+ return aNormValue;
+};
+
+
function HSLAnimationWrapper( aColorAnimation )
{
@@ -14514,6 +14667,11 @@ AnimatedElement.prototype.getY = function()
return this.nCenterY;
};
+AnimatedElement.prototype.getPos = function()
+{
+ return [this.getX(), this.getY()];
+};
+
AnimatedElement.prototype.getWidth = function()
{
return this.nScaleFactorX * this.getBaseBBox().width;
@@ -14524,6 +14682,11 @@ AnimatedElement.prototype.getHeight = function()
return this.nScaleFactorY * this.getBaseBBox().height;
};
+AnimatedElement.prototype.getSize = function()
+{
+ return [this.getWidth(), this.getHeight()];
+};
+
AnimatedElement.prototype.updateTransformAttribute = function()
{
this.aTransformAttrList = this.aActiveElement.transform.baseVal;
@@ -14553,12 +14716,27 @@ AnimatedElement.prototype.setY = function( nNewCenterY )
this.nCenterY = nNewCenterY;
};
+AnimatedElement.prototype.setPos = function( aNewPos )
+{
+ var nNewCenterX = aNewPos[0];
+ var nNewCenterY = aNewPos[1];
+
+ if( nNewCenterX === this.nCenterX && nNewCenterY === this.nCenterY ) return;
+
+ this.aTransformAttrList = this.aActiveElement.transform.baseVal;
+ this.aTransformAttr = this.aTransformAttrList.getItem( 0 );
+ this.aTMatrix = this.aTransformAttr.matrix.translate( nNewCenterX - this.nCenterX, nNewCenterY - this.nCenterY );
+ this.aTransformAttr.setMatrix( this.aTMatrix );
+ this.nCenterX = nNewCenterX;
+ this.nCenterY = nNewCenterY;
+};
+
AnimatedElement.prototype.setWidth = function( nNewWidth )
{
ANIMDBG.print( 'AnimatedElement.setWidth: nNewWidth = ' + nNewWidth );
if( nNewWidth < 0 )
{
- log('AnimatedElement(' + this.getId() + ').setWidth: negative height!');
+ log('AnimatedElement(' + this.getId() + ').setWidth: negative width!');
nNewWidth = 0;
}
@@ -14603,6 +14781,43 @@ AnimatedElement.prototype.setHeight = function( nNewHeight )
this.nScaleFactorY = nScaleFactorY;
};
+AnimatedElement.prototype.setSize= function( aNewSize )
+{
+ var nNewWidth = aNewSize[0];
+ var nNewHeight = aNewSize[1];
+ ANIMDBG.print( 'AnimatedElement.setSize: = [' + nNewWidth + ',' + nNewHeight + ']');
+ if( nNewWidth < 0 )
+ {
+ log('AnimatedElement(' + this.getId() + ').setSize: negative width!');
+ nNewWidth = 0;
+ }
+ if( nNewHeight < 0 )
+ {
+ log('AnimatedElement(' + this.getId() + ').setSize: negative height!');
+ nNewHeight = 0;
+ }
+
+ var nBaseWidth = this.getBaseBBox().width;
+ var nScaleFactorX = nNewWidth / nBaseWidth;
+ if( nScaleFactorX < 1e-5 ) nScaleFactorX = 1e-5;
+
+ var nBaseHeight = this.getBaseBBox().height;
+ var nScaleFactorY = nNewHeight / nBaseHeight;
+ if( nScaleFactorY < 1e-5 ) nScaleFactorY = 1e-5;
+
+ if( nScaleFactorX == this.nScaleFactorX && nScaleFactorY == this.nScaleFactorY ) return;
+
+ this.aTMatrix = document.documentElement.createSVGMatrix()
+ .translate( this.nCenterX, this.nCenterY )
+ .rotate(this.nRotationAngle)
+ .scaleNonUniform( nScaleFactorX, nScaleFactorY )
+ .translate( -this.nBaseCenterX, -this.nBaseCenterY );
+ this.updateTransformAttribute();
+
+ this.nScaleFactorX = nScaleFactorX;
+ this.nScaleFactorY = nScaleFactorY;
+};
+
AnimatedElement.prototype.getOpacity = function()
{
return this.aActiveElement.getAttribute( 'opacity' );
@@ -16336,6 +16551,17 @@ aInterpolatorHandler.aLerpFunctorMap[ CALC_MODE_LINEAR ][ COLOR_PROPERTY ][ COLO
};
};
+aInterpolatorHandler.aLerpFunctorMap[ CALC_MODE_LINEAR ][ TUPLE_NUMBER_PROPERTY ] =
+ function ( aFrom, aTo, nT )
+ {
+ var aRes = [];
+ for( var i = 0; i < aFrom.length; ++i )
+ {
+ aRes.push( ( 1.0 - nT )* aFrom[i] + nT * aTo[i] );
+ }
+ return aRes;
+ };
+
@@ -16503,6 +16729,36 @@ aOperatorSetMap[ STRING_PROPERTY ] = aOperatorSetMap[ ENUM_PROPERTY ];
// bool operators
aOperatorSetMap[ BOOL_PROPERTY ] = aOperatorSetMap[ ENUM_PROPERTY ];
+// tuple number operators
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ] = {};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].equal = function( a, b )
+{
+ assert( a.length === b.length, 'Tuples length mismatch.' );
+ return ( a.toString() === b.toString() );
+};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].add = function( a, b )
+{
+ assert( a.length === b.length, 'Tuples length mismatch.' );
+ var r = [];
+ for( var i = 0; i < a.length; ++i )
+ {
+ r.push(a[i] + b[i]);
+ }
+ return r;
+};
+
+aOperatorSetMap[ TUPLE_NUMBER_PROPERTY ].scale = function( k, v )
+{
+ var r = [];
+ for( var i = 0; i < v.length; ++i )
+ {
+ r.push(k * v[i]);
+ }
+ return r;
+};
+
@@ -17912,6 +18168,22 @@ function extractAttributeValues( eValueType, aValueList, aValueSet, aBBox, nSlid
aValueList.push( aValue );
}
break;
+ case TUPLE_NUMBER_PROPERTY :
+ for( i = 0; i < aValueSet.length; ++i )
+ {
+ if( typeof aValueSet[i] === 'string' )
+ {
+ var aTuple = aValueSet[i].split(',');
+ aValue = [];
+ evalValuesAttribute(aValue, aTuple, aBBox, nSlideWidth, nSlideHeight);
+ aValueList.push(aValue);
+ }
+ else
+ {
+ aValueList.push( undefined );
+ }
+ }
+ break;
default:
log( 'createValueListActivity: unexpected value type: ' + eValueType );
}
@@ -17934,9 +18206,12 @@ function evalValuesAttribute( aValueList, aValueSet, aBBox, nSlideWidth, nSlideH
for( var i = 0; i < aValueSet.length; ++i )
{
var sValue = aValueSet[i];
- sValue = sValue.replace(reMath, 'Math.$&');
- sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI');
- sValue = sValue.replace(/e(?!\w)/g, 'Math.E');
+ if(sValue)
+ {
+ sValue = sValue.replace(reMath, 'Math.$&');
+ sValue = sValue.replace(/pi(?!\w)/g, 'Math.PI');
+ sValue = sValue.replace(/e(?!\w)/g, 'Math.E');
+ }
var aValue = eval( sValue );
aValueList.push( aValue );
}
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index f5ab1a67b94a..635bcdf1dd70 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -366,6 +366,11 @@ SVGExport::SVGExport(
// add namespaces
GetNamespaceMap_().Add(
+ GetXMLToken(XML_NP_SVG),
+ GetXMLToken(XML_N_SVG_COMPAT),
+ XML_NAMESPACE_SVG);
+
+ GetNamespaceMap_().Add(
GetXMLToken(XML_NP_PRESENTATION),
GetXMLToken(XML_N_PRESENTATION),
XML_NAMESPACE_PRESENTATION);
@@ -797,7 +802,9 @@ bool SVGFilter::implExportWriterTextGraphic( const Reference< view::XSelectionSu
const Graphic aOriginalGraphic(xOriginalGraphic);
uno::Reference<graphic::XGraphic> xTransformedGraphic;
- xPropertySet->getPropertyValue("TransformedGraphic") >>= xTransformedGraphic;
+ xPropertySet->getPropertyValue(
+ mbIsPreview ? OUString("GraphicPreview") : OUString("TransformedGraphic"))
+ >>= xTransformedGraphic;
if (!xTransformedGraphic.is())
return false;
@@ -973,6 +980,8 @@ bool SVGFilter::implExportDocument()
mpSVGWriter->SetEmbeddedBitmapRefs( &maBitmapActionMap );
implExportTiledBackground();
}
+ if( mbIsPreview )
+ mpSVGWriter->SetPreviewMode();
// #i124608# export a given object selection, so no MasterPage export at all
if (!mbExportShapeSelection)
@@ -1045,6 +1054,7 @@ void SVGFilter::implExportDocumentHeaderImpressOrDraw(sal_Int32 nDocX, sal_Int32
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:presentation", "http://sun.com/xmlns/staroffice/presentation" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:smil", "http://www.w3.org/2001/SMIL20/" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:anim", "urn:oasis:names:tc:opendocument:xmlns:animation:1.0" );
+ mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" );
mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "xml:space", "preserve" );
mpSVGDoc = new SvXMLElementExport( *mpSVGExport, XML_NAMESPACE_NONE, "svg", true, true );
diff --git a/filter/source/svg/svgfilter.cxx b/filter/source/svg/svgfilter.cxx
index 5677d63fcc6c..25c96c3d1848 100644
--- a/filter/source/svg/svgfilter.cxx
+++ b/filter/source/svg/svgfilter.cxx
@@ -90,6 +90,7 @@ SVGFilter::SVGFilter( const Reference< XComponentContext >& rxCtx ) :
mbExportShapeSelection(false),
maFilterData(),
mxDefaultPage(),
+ mbIsPreview(false),
mbWriterFilter(false),
mbCalcFilter(false),
mbImpressFilter(false),
@@ -121,6 +122,15 @@ sal_Bool SAL_CALL SVGFilter::filter( const Sequence< PropertyValue >& rDescripto
{
for (sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++)
{
+ if (rDescriptor[nInd].Name == "IsPreview")
+ {
+ rDescriptor[nInd].Value >>= mbIsPreview;
+ break;
+ }
+ }
+
+ for (sal_Int32 nInd = 0; nInd < rDescriptor.getLength(); nInd++)
+ {
if (rDescriptor[nInd].Name == "FilterName")
{
OUString sFilterName;
diff --git a/filter/source/svg/svgfilter.hxx b/filter/source/svg/svgfilter.hxx
index ae9418ea49c5..d95710ca3e40 100644
--- a/filter/source/svg/svgfilter.hxx
+++ b/filter/source/svg/svgfilter.hxx
@@ -218,6 +218,7 @@ private:
Sequence< PropertyValue > maFilterData;
Reference< css::drawing::XDrawPage > mxDefaultPage;
std::vector< Reference< css::drawing::XDrawPage > > mSelectedPages;
+ bool mbIsPreview;
bool mbWriterFilter;
bool mbCalcFilter;
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 95980ce9b932..2f9b3a7d0e4d 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1077,7 +1077,19 @@ bool SVGTextWriter::nextParagraph()
const OUString& rParagraphId = implGetValidIDFromInterface( Reference<XInterface>(xTextContent, UNO_QUERY) );
if( !rParagraphId.isEmpty() )
{
- mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
+ // if there is id for empty paragraph we need to create a empty text paragraph
+ Reference < XTextRange > xRange( xTextContent, UNO_QUERY_THROW );
+ if ( xRange.is() && xRange->getString().isEmpty() )
+ {
+ endTextParagraph();
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "TextParagraph" );
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
+ mpTextParagraphElem.reset(new SvXMLElementExport( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS ));
+ }
+ else
+ {
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "id", rParagraphId );
+ }
}
return true;
}
@@ -1737,6 +1749,9 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
}
else
{
+ // Without the following attribute Google Chrome does not render leading spaces
+ mrExport.AddAttribute( XML_NAMESPACE_NONE, "style", "white-space: pre" );
+
SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
mrExport.GetDocHandler()->characters( rText );
}
@@ -2855,7 +2870,27 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
}
}
- if( bCached || GraphicConverter::Export( aOStm, rBmpEx, ConvertDataFormat::PNG ) == ERRCODE_NONE )
+ const BitmapEx* pBitmap = &rBmpEx;
+ std::unique_ptr<BitmapEx> pNewBitmap;
+
+ // for preview we generate downscaled images (1280x720 max)
+ if (mbIsPreview)
+ {
+ Size aSize = rBmpEx.GetSizePixel();
+ double fX = static_cast<double>(aSize.getWidth()) / 1280;
+ double fY = static_cast<double>(aSize.getHeight()) / 720;
+ double fFactor = fX > fY ? fX : fY;
+ if (fFactor > 1.0)
+ {
+ aSize.setWidth(aSize.getWidth() / fFactor);
+ aSize.setHeight(aSize.getHeight() / fFactor);
+ pNewBitmap = std::make_unique<BitmapEx>(rBmpEx);
+ pNewBitmap->Scale(aSize);
+ pBitmap = pNewBitmap.get();
+ }
+ }
+
+ if( bCached || GraphicConverter::Export( aOStm, *pBitmap, ConvertDataFormat::PNG ) == ERRCODE_NONE )
{
Point aPt;
Size aSz;
diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index d7458d053120..0be1e5ba1bdb 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -337,6 +337,7 @@ private:
bool mbClipAttrChanged;
bool mbIsPlaceholderShape;
const MetaBitmapActionMap* mpEmbeddedBitmapsMap;
+ bool mbIsPreview;
long ImplMap( sal_Int32 nVal ) const;
@@ -394,6 +395,7 @@ public:
const GDIMetaFile* pTextEmbeddedBitmapMtf = nullptr );
void SetEmbeddedBitmapRefs( const MetaBitmapActionMap* pEmbeddedBitmapsMap );
+ void SetPreviewMode(bool bState = true) { mbIsPreview = bState; }
};
diff --git a/filter/source/textfilterdetect/filterdetect.cxx b/filter/source/textfilterdetect/filterdetect.cxx
index 1f5080ad0951..08944fad0e5f 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -149,10 +149,19 @@ bool HandleEmptyFileUrlByExtension(MediaDescriptor& rMediaDesc, const OUString&
return false;
}
- std::shared_ptr<const SfxFilter> pFilter(SfxFilterMatcher().GetFilter4Extension(rExt));
+ // Requiring the export+preferred flags helps to find the relevant filter, e.g. .doc -> WW8 (and
+ // not WW6 or Mac_Word).
+ SfxFilterFlags nMust
+ = SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT | SfxFilterFlags::PREFERED;
+ std::shared_ptr<const SfxFilter> pFilter(SfxFilterMatcher().GetFilter4Extension(rExt, nMust));
if (!pFilter)
{
- return false;
+ // retry without PREFFERED so we can find at least something for 0-byte *.ods
+ nMust = SfxFilterFlags::IMPORT | SfxFilterFlags::EXPORT;
+ pFilter = SfxFilterMatcher().GetFilter4Extension(rExt, nMust);
+
+ if (!pFilter)
+ return false;
}
rMediaDesc[MediaDescriptor::PROP_FILTERNAME()] <<= pFilter->GetFilterName();
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 42980eeeaff7..eb715230ce43 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();
@@ -329,7 +346,6 @@ namespace XSLT
m_transformer->error(msg);
}
- closeOutput();
oh.reset();
xsltFreeStylesheet(styleSheet);
xsltTransformContextPtr tcontext = nullptr;
@@ -501,6 +517,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..e527e2f84113 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -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/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 17594207234f..0db0c3464610 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -95,17 +95,14 @@ sal_uInt8 FormulaToken::GetParamCount() const
return 0; // parameters and specials
// ocIf... jump commands not for FAP, have cByte then
//2do: bool parameter whether FAP or not?
- else if ( GetByte() )
+ else if (GetByte())
return GetByte(); // all functions, also ocExternal and ocMacro
- else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP)
- return 2; // binary
- else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP)
- || eOp == ocPercentSign)
- return 1; // unary
+ else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP && eOp != ocAnd && eOp != ocOr)
+ return 2; // binary operators, compiler checked; OR and AND legacy but are functions
+ else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP) || eOp == ocPercentSign)
+ return 1; // unary operators, compiler checked
else if (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR)
return 0; // no parameter
- else if (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR)
- return 1; // one parameter
else if (FormulaCompiler::IsOpCodeJumpCommand( eOp ))
return 1; // only the condition counts as parameter
else
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx
index 5b65eb1295cf..64dee0ee6239 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -636,16 +636,20 @@ void ViewTabListBox_Impl::DeleteEntries()
eResult = aDlg.run();
}
- if ( ( eResult == svtools::QUERYDELETE_ALL ) ||
- ( eResult == svtools::QUERYDELETE_YES ) )
+ bool bDeleted = false;
+
+ if (eResult == svtools::QUERYDELETE_ALL || eResult == svtools::QUERYDELETE_YES)
{
if ( Kill( aURL ) )
{
- delete reinterpret_cast<SvtContentEntry*>(mxTreeView->get_id(rCurEntry).toInt64());
mpParent->EntryRemoved( aURL );
+ bDeleted = true;
}
}
+ if (!bDeleted)
+ mxTreeView->unselect(rCurEntry);
+
return false;
});
diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index 25d67694c5df..12ea12b79476 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -41,7 +41,7 @@ void SAL_CALL StatusIndicator::start(const OUString& sText ,
m_nRange = nRange;
m_nLastCallbackPercent = -1;
- comphelper::LibreOfficeKit::statusIndicatorStart();
+ comphelper::LibreOfficeKit::statusIndicatorStart(sText);
}
#if !defined(IOS) && !defined(ANDROID)
css::uno::Reference< css::task::XStatusIndicatorFactory > xFactory(m_xFactory);
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index a657efd3cc88..aa35a1511b48 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -32,6 +32,7 @@
#include <com/sun/star/frame/ControlCommand.hpp>
#include <svtools/toolboxcontroller.hxx>
+#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx>
#include <vcl/mnemonic.hxx>
#include <vcl/toolbox.hxx>
@@ -151,7 +152,12 @@ void SAL_CALL GenericToolbarController::execute( sal_Int16 KeyModifier )
aArgs[0].Name = "KeyModifier";
aArgs[0].Value <<= KeyModifier;
- aTargetURL.Complete = aCommandURL;
+ // handle also command aliases
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(m_aCommandURL,
+ vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame));
+ OUString sRealCommand = vcl::CommandInfoProvider::GetRealCommandForCommand(aProperties);
+
+ aTargetURL.Complete = sRealCommand.isEmpty() ? aCommandURL : sRealCommand;
if ( m_xUrlTransformer.is() )
m_xUrlTransformer->parseStrict( aTargetURL );
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/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index 82738d65ff93..364ff5cb0669 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -458,6 +458,11 @@ struct _LibreOfficeKitDocumentClass
void (*sendFormFieldEvent) (LibreOfficeKitDocument* pThis,
const char* pArguments);
+ /// @see lok::Document::setBlockedCommandList
+ void (*setBlockedCommandList) (LibreOfficeKitDocument* pThis,
+ int nViewId,
+ const char* bolckedCommandList);
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 4a58c4f2ee9d..6ead8a8d80d8 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -790,6 +790,11 @@ public:
mpDoc->pClass->sendFormFieldEvent(mpDoc, pArguments);
}
+ void setBlockedCommandList(int nViewId, const char* bolckedCommandList)
+ {
+ mpDoc->pClass->setBlockedCommandList(mpDoc, nViewId, bolckedCommandList);
+ }
+
#endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
};
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 94e4b95c0631..2140c833624d 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -772,6 +772,17 @@ typedef enum
* The payload format is JSON: { "title": "title text", "content": "content text" }
*/
LOK_CALLBACK_VALIDITY_INPUT_HELP = 51,
+
+ /**
+ * This is currently Calc only. Indicates the document background
+ * color in the payload as a RGB hex string (RRGGBB).
+ */
+ LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR = 52,
+
+ /**
+ * When a user tries to use command which is restricted for that user
+ */
+ LOK_COMMAND_BLOCKED = 53,
}
LibreOfficeKitCallbackType;
@@ -904,6 +915,10 @@ static inline const char* lokCallbackTypeToString(int nType)
return "LOK_CALLBACK_FORM_FIELD_BUTTON";
case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
return "LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY";
+ case LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR:
+ return "LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR";
+ case LOK_COMMAND_BLOCKED:
+ return "LOK_COMMAND_BLOCKED";
}
assert(!"Unknown LibreOfficeKitCallbackType type.");
diff --git a/include/comphelper/lok.hxx b/include/comphelper/lok.hxx
index e9fb004511e5..257b59f38165 100644
--- a/include/comphelper/lok.hxx
+++ b/include/comphelper/lok.hxx
@@ -31,8 +31,9 @@ COMPHELPER_DLLPUBLIC void setActive(bool bActive = true);
enum class statusIndicatorCallbackType { Start, SetValue, Finish };
-COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(void (*callback)(void *data, statusIndicatorCallbackType type, int percent), void *data);
-
+COMPHELPER_DLLPUBLIC void setStatusIndicatorCallback(
+ void (*callback)(void* data, statusIndicatorCallbackType type, int percent, const char* pText),
+ void* data);
// Functions that can be called from arbitrary places in LibreOffice.
@@ -104,10 +105,11 @@ COMPHELPER_DLLPUBLIC bool isWhitelistedLanguage(const OUString& lang);
// Status indicator handling. Even if in theory there could be several status indicators active at
// the same time, in practice there is only one at a time, so we don't handle any identification of
// status indicator in this API.
-COMPHELPER_DLLPUBLIC void statusIndicatorStart();
+COMPHELPER_DLLPUBLIC void statusIndicatorStart(const OUString& sText);
COMPHELPER_DLLPUBLIC void statusIndicatorSetValue(int percent);
COMPHELPER_DLLPUBLIC void statusIndicatorFinish();
+COMPHELPER_DLLPUBLIC void setBlockedCommandList(const char* bolckedCommandList);
}
}
diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx
index 36730e7f8af6..ec2a5a41d34a 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -23,24 +23,24 @@ namespace comphelper
class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
{
- static int s_nNesting; // level of nested zones.
-
long long m_nCreateTime;
int m_nNesting;
void addRecording();
+ static void setNestingLevel(int nNestingLevel);
+ static int getNestingLevel();
+
ProfileZone(const char* sName, const OUString &sArgs)
: NamedEvent(sName, sArgs)
, m_nNesting(-1)
{
if (s_bRecording)
{
- TimeValue systemTime;
- osl_getSystemTime( &systemTime );
- m_nCreateTime = static_cast<long long>(systemTime.Seconds) * 1000000 + systemTime.Nanosec/1000;
+ m_nCreateTime = getNow();
- m_nNesting = s_nNesting++;
+ m_nNesting = getNestingLevel();
+ setNestingLevel(getNestingLevel() + 1);
}
else
m_nCreateTime = 0;
@@ -65,9 +65,9 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
{
if (m_nCreateTime > 0)
{
- s_nNesting--;
+ setNestingLevel(getNestingLevel() - 1);
- if (m_nNesting != s_nNesting)
+ if (m_nNesting != getNestingLevel())
{
SAL_WARN("comphelper.traceevent", "Incorrect ProfileZone nesting for " << m_sName);
}
diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx
index cc3c390d7e59..ec95f46bd62c 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -43,6 +43,9 @@ private:
return -1;
}
+ static std::size_t s_nBufferSize;
+ static void (*s_pBufferFullCallback)();
+
protected:
static std::atomic<bool> s_bRecording; // true during recording
@@ -99,6 +102,7 @@ public:
static void startRecording();
static void stopRecording();
+ static void setBufferSizeAndCallback(std::size_t bufferSize, void (*bufferFullCallback)());
static std::vector<OUString> getEventVectorAndClear();
@@ -123,33 +127,21 @@ protected:
}
};
-// An AsyncEvent generates a 'b' (begin) event when constructed and an 'e' (end) event when it
-// itself or its nesting parent (if there is one) is destructed (or earlier, if requested)
-
-// There are two kinds of async event pairs: Freestanding ones that are not related to other events
-// at all, and nested ones that have to be nested between the 'b' and 'e' events of a parent Async
-// event.
+// An AsyncEvent generates an 'S' (start) event when constructed and a 'F' (finish) event when it
+// is destructed.
-// To generate a pair of 'b' and 'e' events, create an AsyncEvent object using the AsyncEvent(const
-// char* sName) constructor when you want the 'b' event to be generated, and destroy it when you
-// want the corresponding 'e' event to be generated.
+// The Trace Event specification claims that these event types are deprecated and replaces by
+// nestable 'b' (begin) and 'e' (end) events, but Chrome does not seem to support those.
-// To generate a pair of 'b' and 'e' events that is nested inside an outer 'b' and 'e' event pair,
-// create an AsyncEvent object using the createWithParent() function. It returns a weak reference
-// (weak_ptr) to the AsyncEvent. The parent keeps a strong reference (shared_ptr) to it.
-
-// The 'e' event will be generated when the parent is about to go away, before the parent's 'e'
-// event. When the parent has gone away, the weak reference will have expired. You can also generate
-// it explicitly by calling the finish() function. (But in that case you could as well have used a
-// freestanding AsyncEvent object, I think.)
+// To generate a pair of 'S' and 'F' events, create an AsyncEvent object using the AsyncEvent(const
+// char* sName) constructor when you want the 'S' event to be generated, and destroy it when you
+// want the corresponding 'F' event to be generated.
class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent,
public std::enable_shared_from_this<AsyncEvent>
{
static int s_nIdCounter;
int m_nId;
- std::vector<std::shared_ptr<AsyncEvent>> m_aChildren;
- std::weak_ptr<AsyncEvent> m_pParent;
bool m_bBeginRecorded;
AsyncEvent(const char* sName, int nId, const std::map<OUString, OUString>& args)
@@ -161,12 +153,12 @@ class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent,
{
long long nNow = getNow();
- // Generate a "Begin " (type b) event
+ // Generate a "Start" (type S) event
TraceEvent::addRecording("{"
"\"name\":\""
+ OUString(m_sName, strlen(m_sName), RTL_TEXTENCODING_UTF8)
+ "\","
- "\"ph\":\"b\""
+ "\"ph\":\"S\""
","
"\"id\":"
+ OUString::number(m_nId) + m_sArgs
@@ -189,21 +181,13 @@ class COMPHELPER_DLLPUBLIC AsyncEvent : public NamedEvent,
{
m_bBeginRecorded = false;
- // In case somebody is holding on to a hard reference to a child we need to tell the
- // children to finish up explicitly, we can't rely on our pointers to them being the
- // only ones.
- for (auto& i : m_aChildren)
- i->generateEnd();
-
- m_aChildren.clear();
-
long long nNow = getNow();
- // Generate a "Env " (type e) event
+ // Generate a "Finish" (type F) event
TraceEvent::addRecording("{"
"\"name\":\""
+ OUString(m_sName, strlen(m_sName), RTL_TEXTENCODING_UTF8)
+ "\","
- "\"ph\":\"e\""
+ "\"ph\":\"F\""
","
"\"id\":"
+ OUString::number(m_nId) + m_sArgs
@@ -228,35 +212,7 @@ public:
~AsyncEvent() { generateEnd(); }
- static std::weak_ptr<AsyncEvent>
- createWithParent(const char* sName, std::shared_ptr<AsyncEvent> pParent,
- const std::map<OUString, OUString>& args = std::map<OUString, OUString>())
- {
- std::shared_ptr<AsyncEvent> pResult;
-
- if (s_bRecording && pParent->m_bBeginRecorded)
- {
- pResult.reset(new AsyncEvent(sName, pParent->m_nId, args));
- pParent->m_aChildren.push_back(pResult);
- pResult->m_pParent = pParent;
- }
-
- return pResult;
- }
-
- void finish()
- {
- generateEnd();
-
- auto pParent = m_pParent.lock();
- if (!pParent)
- return;
-
- pParent->m_aChildren.erase(std::remove(pParent->m_aChildren.begin(),
- pParent->m_aChildren.end(), shared_from_this()),
- pParent->m_aChildren.end());
- m_pParent.reset();
- }
+ void finish() { generateEnd(); }
};
} // namespace comphelper
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/core/contexthandler2.hxx b/include/oox/core/contexthandler2.hxx
index 678aed1380c2..279459075980 100644
--- a/include/oox/core/contexthandler2.hxx
+++ b/include/oox/core/contexthandler2.hxx
@@ -73,7 +73,7 @@ struct ElementInfo;
class OOX_DLLPUBLIC ContextHandler2Helper
{
public:
- explicit ContextHandler2Helper( bool bEnableTrimSpace );
+ explicit ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBase& rFilter );
explicit ContextHandler2Helper( const ContextHandler2Helper& rParent );
virtual ~ContextHandler2Helper();
@@ -202,6 +202,21 @@ protected:
/** Must be called from endRecord() in derived classes. */
void implEndRecord( sal_Int32 nRecId );
+ bool prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs );
+ XmlFilterBase& getDocFilter() const { return mrFilter; }
+
+ enum class MCE_STATE
+ {
+ Started,
+ FoundChoice
+ };
+
+ MCE_STATE getMCEState() const { return aMceState.back(); }
+ void setMCEState( MCE_STATE aState ) { aMceState.back() = aState; }
+ void addMCEState( MCE_STATE aState ) { aMceState.push_back( aState ); }
+ void removeMCEState() { aMceState.pop_back(); }
+ bool isMCEStateEmpty() { return aMceState.empty(); }
+
private:
ContextHandler2Helper& operator=( const ContextHandler2Helper& ) = delete;
@@ -215,9 +230,11 @@ private:
ContextStackRef mxContextStack; ///< Stack of all processed elements.
size_t const mnRootStackSize; ///< Stack size on construction time.
+ std::vector<MCE_STATE> aMceState;
protected:
bool mbEnableTrimSpace; ///< True = trim whitespace in characters().
+ XmlFilterBase& mrFilter;
};
class OOX_DLLPUBLIC ContextHandler2 : public ContextHandler, public ContextHandler2Helper
diff --git a/include/oox/core/fragmenthandler2.hxx b/include/oox/core/fragmenthandler2.hxx
index 7c64c200041d..162ec8565fdb 100644
--- a/include/oox/core/fragmenthandler2.hxx
+++ b/include/oox/core/fragmenthandler2.hxx
@@ -48,17 +48,6 @@ class XmlFilterBase;
class OOX_DLLPUBLIC FragmentHandler2 : public FragmentHandler, public ContextHandler2Helper
{
-protected:
- enum class MCE_STATE
- {
- Started,
- FoundChoice
- };
- ::std::vector<MCE_STATE> aMceState;
-
- bool prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs );
-
-
public:
explicit FragmentHandler2(
XmlFilterBase& rFilter,
diff --git a/include/oox/drawingml/graphicshapecontext.hxx b/include/oox/drawingml/graphicshapecontext.hxx
index 14b49f23615c..c27a8e6cfa8d 100644
--- a/include/oox/drawingml/graphicshapecontext.hxx
+++ b/include/oox/drawingml/graphicshapecontext.hxx
@@ -62,6 +62,7 @@ public:
OleObjectGraphicDataContext( ::oox::core::ContextHandler2Helper const & rParent, const ShapePtr& pShapePtr );
virtual ~OleObjectGraphicDataContext() override;
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
+ virtual void onEndElement() override;
private:
::oox::vml::OleObjectInfo& mrOleObjectInfo;
diff --git a/include/oox/drawingml/shape.hxx b/include/oox/drawingml/shape.hxx
index 5b6fd21ce00d..37e2fe433a3f 100644
--- a/include/oox/drawingml/shape.hxx
+++ b/include/oox/drawingml/shape.hxx
@@ -178,6 +178,7 @@ public:
ShapeStyleRefMap& getShapeStyleRefs() { return maShapeStyleRefs; }
const ShapeStyleRefMap& getShapeStyleRefs() const { return maShapeStyleRefs; }
const ShapeStyleRef* getShapeStyleRef( sal_Int32 nRefType ) const;
+ bool hasShapeStyleRefs() const { return !maShapeStyleRefs.empty(); }
// addShape is creating and inserting the corresponding XShape.
void addShape(
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index fb7b7877138c..f67af98f9369 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -45,6 +45,8 @@
class Graphic;
class SdrObjCustomShape;
+enum class SvxDateFormat;
+enum class SvxTimeFormat;
namespace com { namespace sun { namespace star {
namespace awt {
@@ -156,6 +158,22 @@ protected:
const css::uno::Reference< css::beans::XPropertyState >& rXPropState,
const OUString& aName, css::beans::PropertyState& eState );
OUString GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField );
+ /** Gets OOXML datetime field type from LO Date format
+
+ @param eDate LO Date format
+ */
+ static OUString GetDatetimeTypeFromDate(SvxDateFormat eDate);
+ /** Gets OOXML datetime field type from LO Time format
+
+ @param eTime LO Time format
+ */
+ static OUString GetDatetimeTypeFromTime(SvxTimeFormat eTime);
+ /** Gets OOXML datetime field type from combination of LO Time and Date formats
+
+ @param eDate LO Date format
+ @param eTime LO Time format
+ */
+ static OUString GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeFormat eTime);
/// Output the media (including copying a video from vnd.sun.star.Package: to the output if necessary).
void WriteMediaNonVisualProperties(const css::uno::Reference<css::drawing::XShape>& xShape);
@@ -241,10 +259,19 @@ public:
void WriteTransformation(const tools::Rectangle& rRectangle,
sal_Int32 nXmlNamespace, bool bFlipH = false, bool bFlipV = false, sal_Int32 nRotation = 0, bool bIsGroupShape = false);
- void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr, bool bText = true, sal_Int32 nXmlNamespace = 0);
+ void WriteText( const css::uno::Reference< css::uno::XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr, bool bText = true, sal_Int32 nXmlNamespace = 0, bool bWritePropertiesAsLstStyles = false);
+
+ /** Populates the lstStyle with the shape's text run and paragraph properties */
+ void WriteLstStyles(const css::uno::Reference<css::text::XTextContent>& rParagraph,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ const css::uno::Reference<css::beans::XPropertySet>& rXShapePropSet);
void WriteParagraph( const css::uno::Reference< css::text::XTextContent >& rParagraph,
bool& rbOverridingCharHeight, sal_Int32& rnCharHeight );
- void WriteParagraphProperties(const css::uno::Reference< css::text::XTextContent >& rParagraph, float fFirstCharHeight);
+ /** Writes paragraph properties
+
+ @returns true if any paragraph properties were written
+ */
+ bool WriteParagraphProperties(const css::uno::Reference< css::text::XTextContent >& rParagraph, float fFirstCharHeight, const sal_Int32 nElement = XML_pPr );
void WriteParagraphNumbering(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, float fFirstCharHeight,
sal_Int16 nLevel );
void WriteParagraphTabStops(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
@@ -270,7 +297,11 @@ public:
void WriteShapeStyle( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WriteShapeEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
void WriteShapeEffect( const OUString& sName, const css::uno::Sequence< css::beans::PropertyValue >& aEffectProps );
- void WriteShape3DEffects( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
+ /** Populates scene3d tag
+ @param rXPropSet Prop set
+ @param bIsText True if the 3D effects are for a text body, false if it is for a shape
+ */
+ void Write3DEffects(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet, bool bIsText);
void WriteArtisticEffect( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet );
OString WriteWdpPicture( const OUString& rFileId, const css::uno::Sequence< sal_Int8 >& rPictureData );
void WriteDiagram(const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId);
diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx
index a8ea2d5c6005..aae207ff1464 100644
--- a/include/oox/export/shapes.hxx
+++ b/include/oox/export/shapes.hxx
@@ -179,7 +179,7 @@ public:
* @return <tt>*this</tt>
*/
ShapeExport& WriteShape( const css::uno::Reference< css::drawing::XShape >& xShape );
- ShapeExport& WriteTextBox( const css::uno::Reference< css::uno::XInterface >& xIface, sal_Int32 nXmlNamespace );
+ ShapeExport& WriteTextBox( const css::uno::Reference< css::uno::XInterface >& xIface, sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles = false );
virtual ShapeExport&
WriteTextShape( const css::uno::Reference< css::drawing::XShape >& xShape );
ShapeExport&
diff --git a/include/oox/ole/oleobjecthelper.hxx b/include/oox/ole/oleobjecthelper.hxx
index 604785f305b6..a133bd650443 100644
--- a/include/oox/ole/oleobjecthelper.hxx
+++ b/include/oox/ole/oleobjecthelper.hxx
@@ -48,6 +48,7 @@ struct OOX_DLLPUBLIC OleObjectInfo
bool mbLinked; ///< True = linked OLE object, false = embedded OLE object.
bool mbShowAsIcon; ///< True = show as icon, false = show contents.
bool mbAutoUpdate;
+ bool mbHasPicture; ///<Ole object requires a picture element according to spec.>
explicit OleObjectInfo();
};
diff --git a/include/oox/ppt/pptshape.hxx b/include/oox/ppt/pptshape.hxx
index c5d9e7be5548..71af3a08e291 100644
--- a/include/oox/ppt/pptshape.hxx
+++ b/include/oox/ppt/pptshape.hxx
@@ -51,6 +51,10 @@ class PPTShape final : public oox::drawingml::Shape
bool mbReferenced; // placeholdershapes on Layout are displayed only, if they are not referenced
// placeholdershapes on Slide are displayed always
oox::drawingml::ShapePtr mpPlaceholder;
+ /// Set if spPr tag is non empty for the shape
+ bool mbHasNoninheritedShapeProperties;
+
+ bool IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const;
public:
@@ -74,6 +78,11 @@ public:
void setPlaceholder( oox::drawingml::ShapePtr pPlaceholder ) { mpPlaceholder = pPlaceholder; }
void setModelId( const OUString& rId ) { msModelId = rId; }
+ /// Flags shape as having a non-empty spPr tag
+ void setHasNoninheritedShapeProperties() { mbHasNoninheritedShapeProperties = true; }
+ /// Returns whether or not the shape had a non-empty spPr tag
+ bool hasNonInheritedShapeProperties() const { return mbHasNoninheritedShapeProperties; }
+
static oox::drawingml::ShapePtr findPlaceholder( const sal_Int32 nFirstSubType,
const sal_Int32 nSecondSubType, const OptValue< sal_Int32 >& oSubTypeIndex,
std::vector< oox::drawingml::ShapePtr >& rShapes, bool bMasterOnly = false );
diff --git a/include/oox/vml/vmlshape.hxx b/include/oox/vml/vmlshape.hxx
index 2b3677df106d..1e9f000a41e8 100644
--- a/include/oox/vml/vmlshape.hxx
+++ b/include/oox/vml/vmlshape.hxx
@@ -114,6 +114,12 @@ struct OOX_DLLPUBLIC ShapeTypeModel
OptValue<OUString> moCropTop; ///< Specifies how much to crop the image from the top down as a fraction of picture size.
OUString maLayoutFlowAlt; ///< Specifies the alternate layout flow for text in textboxes.
+ /// An adjustment for the intensity of all colors, i.e. contrast, on a 0..0x10000 scale.
+ sal_Int32 mnGain = 0x10000;
+
+ /// The image brightness, on a 0..0x10000 scale.
+ sal_Int16 mnBlacklevel = 0;
+
explicit ShapeTypeModel();
void assignUsed( const ShapeTypeModel& rSource );
diff --git a/include/rtl/xmlencode.hxx b/include/rtl/xmlencode.hxx
new file mode 100644
index 000000000000..487c4ee94749
--- /dev/null
+++ b/include/rtl/xmlencode.hxx
@@ -0,0 +1,55 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_RTL_XMLENCODE_HXX
+#define INCLUDED_RTL_XMLENCODE_HXX
+
+#include "rtl/ustring.hxx"
+
+namespace rtl
+{
+inline OUString encodeForXml(std::u16string_view rStr)
+{
+ // encode conforming xml:
+ sal_Int32 len = rStr.length();
+ OUStringBuffer buf;
+ for (sal_Int32 pos = 0; pos < len; ++pos)
+ {
+ sal_Unicode c = rStr[pos];
+ switch (c)
+ {
+ case '<':
+ buf.append("&lt;");
+ break;
+ case '>':
+ buf.append("&gt;");
+ break;
+ case '&':
+ buf.append("&amp;");
+ break;
+ case '\'':
+ buf.append("&apos;");
+ break;
+ case '\"':
+ buf.append("&quot;");
+ break;
+ default:
+ buf.append(c);
+ break;
+ }
+ }
+
+ return buf.makeStringAndClear();
+}
+
+} /* Namespace */
+
+#endif // INCLUDED_RTL_XMLENCODE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 08be8bb5ea19..efdb957d3a57 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -192,10 +192,14 @@ private:
std::unique_ptr<weld::Label> m_xTemplFt;
std::unique_ptr<weld::Label> m_xTemplValFt;
+ std::unique_ptr<weld::CheckButton> m_xImagePreferredDpiCheckButton;
+ std::unique_ptr<weld::ComboBox> m_xImagePreferredDpiComboBox;
DECL_LINK(DeleteHdl, weld::Button&, void);
DECL_LINK(SignatureHdl, weld::Button&, void);
DECL_LINK(ChangePassHdl, weld::Button&, void);
+ DECL_LINK(ImagePreferredDPICheckBoxClicked, weld::ToggleButton&, void);
+
void ImplUpdateSignatures();
void ImplCheckPasswordState();
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 3e37b8b68597..8d6d8de7ef70 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -15,6 +15,7 @@
#include <vcl/event.hxx>
#include <sfx2/dllapi.h>
#include <sfx2/viewsh.hxx>
+#include <tools/gen.hxx>
#include <cstddef>
#include <rtl/string.hxx>
#include <boost/optional.hpp>
@@ -53,13 +54,16 @@ public:
static void destroyView(int nId);
/// Set a view shell as current one.
static void setView(int nId);
+ /// Get view shell with id
+ static SfxViewShell* getViewOfId(int nId);
/// Get the currently active view.
static int getView(const SfxViewShell* pViewShell = nullptr);
/// Get the number of views of the current DocId.
static std::size_t getViewsCount(int nDocId);
/// Get viewIds of views of the current DocId.
static bool getViewIds(int nDocId, int* pArray, size_t nSize);
-
+ /// Set View Blocked for some uno commands
+ static void setBlockedCommandList(int nViewId, const char* bolckedCommandList);
/// Get the document id for a view
static int getDocumentIdOfView(int nViewId);
/// Get the default language that should be used for views
@@ -104,7 +108,7 @@ public:
/// Emits a LOK_CALLBACK_DOCUMENT_SIZE_CHANGED for all views of the same document - if @bInvalidateAll - first invalidates all parts
static void notifyDocumentSizeChangedAllViews(vcl::ITiledRenderable* pDoc, bool bInvalidateAll = true);
/// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to setOptionalFeatures() if needed.
- static void notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload);
+ static void notifyInvalidation(SfxViewShell const* pThisView, tools::Rectangle const *);
/// Emits a LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, but tweaks it according to setOptionalFeatures() if needed.
static void notifyVisCursorInvalidation(OutlinerViewShell const* pThisView, const OString& rRectangle, bool bMispelledWord = false, const OString& rHyperlink = "");
/// Notifies all views with the given type and payload.
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index 9c331092bda1..9ac09d96a02a 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -348,7 +348,7 @@ public:
/** Returns to if preparing was successful, else false. */
bool PrepareForSigning(weld::Window* pDialogParent);
- bool CheckIsReadonly(bool bSignScriptingContent);
+ bool CheckIsReadonly(bool bSignScriptingContent, weld::Window* pDialogParent = nullptr);
void RecheckSignature(bool bAlsoRecheckScriptingSignature);
void AfterSigning(bool bSignSuccess, bool bSignScriptingContent);
bool HasValidSignatures() const;
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 862a0a8e3d5c..ede429245298 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -431,7 +431,7 @@ class SvxSearchItem;
// Used for redaction
#define SID_SHAPE_NAME (SID_SFX_START + 808)
- // FREE: SID_SFX_START + 809
+#define SID_GRAPHIC_SIZE_CHECK (SID_SFX_START + 809)
// FREE: SID_SFX_START + 810
#define SID_ASYNCHRON (SID_SFX_START + 811)
diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 7cd612a32a4b..496a44513a7c 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -298,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/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index d5522a0cd253..13ac3ab90173 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -20,6 +20,7 @@
#define INCLUDED_SFX2_TABDLG_HXX
#include <memory>
+#include <unordered_map>
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sfx2/basedlgs.hxx>
@@ -177,6 +178,8 @@ private:
const SfxItemSet* pSet;
OUString aUserString;
bool bHasExchangeSupport;
+ std::unordered_map<OString, css::uno::Any> maAdditionalProperties;
+
std::unique_ptr< TabPageImpl > pImpl;
protected:
@@ -238,6 +241,11 @@ public:
bool IsVisible() const { return m_xContainer->get_visible(); }
weld::Window* GetFrameWeld() const;
+
+ std::unordered_map<OString, css::uno::Any>& getAdditionalProperties()
+ {
+ return maAdditionalProperties;
+ }
};
#endif
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 250515eea0de..2ef4181dd5d5 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -64,6 +64,7 @@ protected:
DECL_LINK(WhatsNewHandler, Button*, void);
DECL_LINK(SwitchReadOnlyHandler, Button*, void);
DECL_LINK(SignDocumentHandler, Button*, void);
+ DECL_DLLPRIVATE_LINK(RefreshMasterPasswordHdl, Button*, void);
SAL_DLLPRIVATE void KillDispatcher_Impl();
virtual ~SfxViewFrame() override;
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index dedef69a65b9..d5066759e142 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -34,6 +34,7 @@
#include <LibreOfficeKit/LibreOfficeKitTypes.h>
#include <editeng/outliner.hxx>
#include <functional>
+#include <unordered_set>
class SfxTabPage;
class SfxBaseController;
@@ -160,6 +161,7 @@ friend class SfxPrinterController;
LanguageTag maLOKLanguageTag;
LanguageTag maLOKLocale;
LOKDeviceFormFactor maLOKDeviceFormFactor;
+ std::unordered_set<OUString> mvLOKBlockedCommandList;
/// Used to set the DocId at construction time. See SetCurrentDocId.
static ViewShellDocId mnCurrentDocId;
@@ -385,6 +387,10 @@ public:
bool isLOKMobilePhone() const { return maLOKDeviceFormFactor == LOKDeviceFormFactor::MOBILE; }
virtual tools::Rectangle getLOKVisibleArea() const { return tools::Rectangle(); }
+
+ // Blocked Command view settings
+ void setBlockedCommandList(const char* bolckedCommandList);
+ bool isBlockedCommand(OUString command);
};
diff --git a/include/svl/style.hxx b/include/svl/style.hxx
index 24656eb2318a..5427680b462a 100644
--- a/include/svl/style.hxx
+++ b/include/svl/style.hxx
@@ -214,7 +214,7 @@ private:
SVL_DLLPRIVATE bool IsTrivialSearch() const;
SfxStyleSheetBase* pCurrentStyle;
- sal_uInt16 nCurrentPosition;
+ sal_Int32 mnCurrentPosition;
bool bSearchUsed;
friend class SfxStyleSheetBasePool;
diff --git a/include/svl/zforlist.hxx b/include/svl/zforlist.hxx
index 8091c2faea71..b412a237aada 100644
--- a/include/svl/zforlist.hxx
+++ b/include/svl/zforlist.hxx
@@ -618,6 +618,8 @@ public:
sal_uInt16& nPrecision, sal_uInt16& nLeadingCnt,
LanguageType eLnge = LANGUAGE_DONTKNOW );
+ bool IsUserDefinedAndNotOverloaded(sal_uInt32 F_Index) const;
+
/// Check if format code string may be deleted by user
bool IsUserDefined( const OUString& sStr, LanguageType eLnge = LANGUAGE_DONTKNOW );
diff --git a/include/svx/GenericCheckDialog.hxx b/include/svx/GenericCheckDialog.hxx
new file mode 100644
index 000000000000..ef2a41159737
--- /dev/null
+++ b/include/svx/GenericCheckDialog.hxx
@@ -0,0 +1,83 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <svx/svxdllapi.h>
+#include <tools/link.hxx>
+#include <vcl/weld.hxx>
+
+namespace svx
+{
+class CheckData
+{
+public:
+ virtual ~CheckData() {}
+
+ virtual OUString getText() = 0;
+
+ virtual bool canMarkObject() = 0;
+ virtual void markObject() = 0;
+
+ virtual bool hasProperties() = 0;
+ virtual void runProperties() = 0;
+};
+
+class CheckDataCollection
+{
+protected:
+ std::vector<std::unique_ptr<CheckData>> m_aCollection;
+
+public:
+ virtual ~CheckDataCollection() {}
+
+ std::vector<std::unique_ptr<CheckData>>& getCollection() { return m_aCollection; }
+
+ virtual OUString getTitle() = 0;
+};
+
+class GenericCheckEntry final
+{
+private:
+ std::unique_ptr<weld::Builder> m_xBuilder;
+ std::unique_ptr<weld::Container> m_xContainer;
+ std::unique_ptr<weld::Label> m_xLabel;
+ std::unique_ptr<weld::Button> m_xMarkButton;
+ std::unique_ptr<weld::Button> m_xPropertiesButton;
+
+ std::unique_ptr<CheckData>& m_pCheckData;
+
+public:
+ GenericCheckEntry(weld::Container* pParent, std::unique_ptr<CheckData>& rCheckData);
+
+ weld::Widget* get_widget() const { return m_xContainer.get(); }
+
+ DECL_LINK(MarkButtonClicked, weld::Button&, void);
+ DECL_LINK(PropertiesButtonClicked, weld::Button&, void);
+};
+
+class SVX_DLLPUBLIC GenericCheckDialog final : public weld::GenericDialogController
+{
+private:
+ std::vector<std::unique_ptr<GenericCheckEntry>> m_aCheckEntries;
+ CheckDataCollection& m_rCheckDataCollection;
+
+ // Controls
+ std::unique_ptr<weld::Box> m_xCheckBox;
+
+public:
+ GenericCheckDialog(weld::Window* pParent, CheckDataCollection& rCheckDataCollection);
+ virtual ~GenericCheckDialog() override;
+ virtual short run() override;
+};
+
+} // end svx namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc
index 3ae4e219ef76..c9c0c5249def 100644
--- a/include/svx/strings.hrc
+++ b/include/svx/strings.hrc
@@ -1708,6 +1708,13 @@
#define RID_SVXSTR_SIGNATURELINE_DSIGNED_BY NC_("RID_SVXSTR_SIGNATURELINE_DSIGNED_BY", "Digitally signed by:")
#define RID_SVXSTR_SIGNATURELINE_DATE NC_("RID_SVXSTR_SIGNATURELINE_DATE", "Date: %1")
+/*--------------------------------------------------------------------
+ Description: GraphicSizeCheck strings
+ --------------------------------------------------------------------*/
+#define STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE NC_("STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE", "Graphic Size Check")
+#define STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW NC_("STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW", "Image '%NAME%' has too few pixels for the current size (%DPIX% x %DPIY% DPI)")
+#define STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH NC_("STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH", "Image '%NAME%' has too many pixels for the current size (%DPIX% x %DPIY% DPI)")
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdedtv.hxx b/include/svx/svdedtv.hxx
index 51da6124ed88..71e014970888 100644
--- a/include/svx/svdedtv.hxx
+++ b/include/svx/svdedtv.hxx
@@ -195,6 +195,7 @@ public:
* Checks if this or other views have an active text edit, if true, end them.
*/
void EndTextEditAllViews() const;
+ void EndTextEditCurrentView();
std::vector< std::unique_ptr<SdrUndoAction> > CreateConnectorUndo( SdrObject& rO );
void AddUndoActions( std::vector< std::unique_ptr<SdrUndoAction> > );
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index aab4e216feb9..737da8ca4896 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -71,16 +71,16 @@ class SVX_DLLPUBLIC SdrObjEditView : public SdrGlueEditView, public EditViewCall
// The OverlayObjects used for visualizing active TextEdit (currently
// using TextEditOverlayObject, but not limited to it
- sdr::overlay::OverlayObjectList maTEOverlayGroup;
+ sdr::overlay::OverlayObjectList maTEOverlayGroup;
protected:
// TextEdit
- tools::WeakReference<SdrTextObj>
- mxTextEditObj; // current object in TextEdit
- SdrPageView* pTextEditPV;
- std::unique_ptr<SdrOutliner> pTextEditOutliner; // outliner for the TextEdit
- OutlinerView* pTextEditOutlinerView; // current view of the outliners
- VclPtr<vcl::Window> pTextEditWin; // matching window to pTextEditOutlinerView
+ tools::WeakReference<SdrTextObj> mxTextEditObj; // current object in TextEdit
+ SdrPageView* mpTextEditPV;
+ std::unique_ptr<SdrOutliner> mpTextEditOutliner; // outliner for the TextEdit
+ OutlinerView* mpTextEditOutlinerView; // current view of the outliners
+ VclPtr<vcl::Window> mpTextEditWin; // matching window to pTextEditOutlinerView
+
vcl::Cursor* pTextEditCursorBuffer; // to restore the cursor in each window
SdrObject* pMacroObj;
SdrPageView* pMacroPV;
@@ -93,31 +93,28 @@ protected:
sal_uInt16 nMacroTol;
- bool bTextEditDontDelete : 1; // do not delete outliner and view of SdrEndTextEdit (f. spellchecking)
- bool bTextEditOnlyOneView : 1; // a single OutlinerView (f. spellchecking)
- bool bTextEditNewObj : 1; // current edited object was just recreated
- bool bQuickTextEditMode : 1; // persistent(->CrtV). Default=TRUE
- bool bMacroDown : 1;
+ bool mbTextEditDontDelete : 1; // do not delete outliner and view of SdrEndTextEdit (f. spellchecking)
+ bool mbTextEditOnlyOneView : 1; // a single OutlinerView (f. spellchecking)
+ bool mbTextEditNewObj : 1; // current edited object was just recreated
+ bool mbQuickTextEditMode : 1; // persistent(->CrtV). Default=TRUE
+ bool mbMacroDown : 1;
rtl::Reference< sdr::SelectionController > mxSelectionController;
rtl::Reference< sdr::SelectionController > mxLastSelectionController;
private:
SfxUndoManager* mpOldTextEditUndoManager;
+ std::unique_ptr<SdrUndoManager> mpLocalTextEditUndoManager;
SVX_DLLPRIVATE void ImpClearVars();
protected:
- // central method to get an SdrUndoManager for enhanced TextEdit. Default will
- // try to return a dynamic_casted GetModel()->GetSdrUndoManager(). Applications
- // which want to use this feature will need to override this virtual method,
- // provide their document UndoManager and derive it from SdrUndoManager.
- virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const;
+ // Create a local UndoManager that is used for text editing.
+ virtual std::unique_ptr<SdrUndoManager> createLocalTextUndoManager();
void ImpMoveCursorAfterChainingEvent(TextChainCursorManager *pCursorManager);
TextChainCursorManager *ImpHandleMotionThroughBoxesKeyInput(const KeyEvent& rKEvt, bool *bOutHandled);
-
OutlinerView* ImpFindOutlinerView(vcl::Window const * pWin) const;
// Create a new OutlinerView at the heap and initialize all required parameters.
@@ -177,12 +174,22 @@ public:
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
virtual void ModelHasChanged() override;
+ const std::unique_ptr<SdrUndoManager>& getViewLocalUndoManager() const
+ {
+ return mpLocalTextEditUndoManager;
+ }
// TextEdit over an outliner
// QuickTextEditMode = edit the text straight after selection. Default=TRUE. Persistent.
- void SetQuickTextEditMode(bool bOn) { bQuickTextEditMode=bOn; }
- bool IsQuickTextEditMode() const { return bQuickTextEditMode; }
+ void SetQuickTextEditMode(bool bOn)
+ {
+ mbQuickTextEditMode = bOn;
+ }
+ bool IsQuickTextEditMode() const
+ {
+ return mbQuickTextEditMode;
+ }
// Start the TextEditMode. If pWin==NULL, use the first window, which is logged at the View.
// The cursor of the currently edited window is stored with SdrBeginTextEdit()
@@ -230,10 +237,22 @@ public:
// Now at this outliner, events can be send, attributes can be set,
// call Cut/Copy/Paste, call Undo/Redo, and so on...
- const SdrOutliner* GetTextEditOutliner() const { return pTextEditOutliner.get(); }
- SdrOutliner* GetTextEditOutliner() { return pTextEditOutliner.get(); }
- const OutlinerView* GetTextEditOutlinerView() const { return pTextEditOutlinerView; }
- OutlinerView* GetTextEditOutlinerView() { return pTextEditOutlinerView; }
+ const SdrOutliner* GetTextEditOutliner() const
+ {
+ return mpTextEditOutliner.get();
+ }
+ SdrOutliner* GetTextEditOutliner()
+ {
+ return mpTextEditOutliner.get();
+ }
+ const OutlinerView* GetTextEditOutlinerView() const
+ {
+ return mpTextEditOutlinerView;
+ }
+ OutlinerView* GetTextEditOutlinerView()
+ {
+ return mpTextEditOutlinerView;
+ }
virtual bool KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin) override;
virtual bool MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin) override;
diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index 62980f1f000a..2d7d6a12248f 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -604,6 +604,8 @@ public:
bool DoesMakePageObjectsNamesUnique() const { return mbMakePageObjectsNamesUnique; }
void DoMakePageObjectsNamesUnique(bool bDo) { mbMakePageObjectsNamesUnique = bDo; }
+ virtual sal_Int32 getImagePreferredDPI() const { return 0; }
+
virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx
index b192a438bc19..da5f094ab155 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 SVXCORE_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 0e445c0e84f4..5f16f431924f 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -597,6 +597,8 @@ public:
bool createObject( const SvGlobalName &aClassName );
void createLink( const OUString& aLinkURL );
+
+ virtual OUString GetAndClearInitialFrameURL();
};
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/customweld.hxx b/include/vcl/customweld.hxx
index fbfd025af5a5..1b23a09473c5 100644
--- a/include/vcl/customweld.hxx
+++ b/include/vcl/customweld.hxx
@@ -52,6 +52,7 @@ public:
}
virtual void Show() { m_pDrawingArea->show(); }
virtual void Hide() { m_pDrawingArea->hide(); }
+ void SetCursor(void * pData) { m_pDrawingArea->set_cursor_data(pData); }
void GrabFocus() { m_pDrawingArea->grab_focus(); }
bool HasFocus() const { return m_pDrawingArea->has_focus(); }
bool IsVisible() const { return m_pDrawingArea->get_visible(); }
diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx
index 00ae91c7624a..2a83c2488c89 100644
--- a/include/vcl/fixed.hxx
+++ b/include/vcl/fixed.hxx
@@ -177,6 +177,8 @@ public:
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
static Image loadThemeImage(const OUString &rFileName);
+
+ boost::property_tree::ptree DumpAsPropertyTree() override;
};
#endif // INCLUDED_VCL_FIXED_HXX
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index d9b6651e0c9e..137eda8f533f 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -854,6 +854,8 @@ private:
SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyPolygon& rB2DPolyPoly);
///@}
+ SAL_DLLPRIVATE void ImplDrawWaveLineBezier(long nStartX, long nStartY, long nEndX, long nEndY, long nWaveHeight, double fOrientation, long nLineWidth);
+
/** @name Curved shape functions
*/
diff --git a/include/vcl/salvtables.hxx b/include/vcl/salvtables.hxx
index be939b4176f6..38a8299ae14c 100644
--- a/include/vcl/salvtables.hxx
+++ b/include/vcl/salvtables.hxx
@@ -289,6 +289,8 @@ public:
virtual OUString get_tooltip_text() const override;
+ virtual void set_cursor_data(void * pData) override;
+
virtual void connect_focus_in(const Link<Widget&, void>& rLink) override;
virtual void connect_mnemonic_activate(const Link<Widget&, bool>& rLink) override;
@@ -1540,4 +1542,19 @@ public:
virtual ~SalInstanceRadioButton() override;
};
+class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
+{
+private:
+ VclPtr<FixedImage> m_xImage;
+
+public:
+ SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool bTakeOwnership);
+
+ virtual void set_from_icon_name(const OUString& rIconName) override;
+
+ virtual void set_image(VirtualDevice* pDevice) override;
+
+ virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) override;
+};
+
#endif
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index a0b773984d3b..f21460eec5de 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -176,7 +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;
@@ -188,6 +188,8 @@ 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/weld.hxx b/include/vcl/weld.hxx
index ef208a1bc662..9ded43bcf6cc 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -162,6 +162,8 @@ public:
virtual void set_tooltip_text(const OUString& rTip) = 0;
virtual OUString get_tooltip_text() const = 0;
+ virtual void set_cursor_data(void * pData) = 0;
+
virtual void connect_focus_in(const Link<Widget&, void>& rLink)
{
assert(!m_aFocusInHdl.IsSet() || !rLink.IsSet());
diff --git a/instsetoo_native/CustomTarget_install.mk b/instsetoo_native/CustomTarget_install.mk
index f014f192921c..f215fc3c974b 100644
--- a/instsetoo_native/CustomTarget_install.mk
+++ b/instsetoo_native/CustomTarget_install.mk
@@ -87,6 +87,7 @@ $(foreach pkgformat,$(5),\
-l $(subst $(WHITESPACE),$(COMMA),$(strip $(2))) \
-p $(PRODUCTNAME_no_spaces)$(3) \
-u $(instsetoo_OUT) \
+ -packer $(COMPRESSIONTOOL) \
-buildid $(if $(filter deb0 rpm0,$(pkgformat)$(LIBO_VERSION_PATCH)),1,$(LIBO_VERSION_PATCH)) \
$(if $(filter WNT,$(OS)), \
-msitemplate $(dir $@)msi_templates \
diff --git a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
index 0fe0b1d27dde..6808b3631d73 100644
--- a/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
+++ b/instsetoo_native/inc_openoffice/unix/find-requires-x11.sh
@@ -23,5 +23,7 @@ if [[ "${OS}" == "AIX" ]]; then
echo "libfreetype.a(libfreetype.so.6${mark64})"
else
echo "libfreetype.so.6${mark64}"
- echo "libXinerama.so.1${mark64}"
+ if [[ "${XINERAMA_LINK}" == "dynamic" ]]; then
+ echo "libXinerama.so.1${mark64}"
+ fi
fi
diff --git a/instsetoo_native/util/openoffice.lst.in b/instsetoo_native/util/openoffice.lst.in
index 4b6191cba3a7..988218ff6992 100644
--- a/instsetoo_native/util/openoffice.lst.in
+++ b/instsetoo_native/util/openoffice.lst.in
@@ -27,7 +27,7 @@ Globals
REGISTRYLAYERNAME Layers
SERVICEPACK 1
UPDATE_DATABASE 1
- CREATE_MSP_INSTALLSET 1
+ CREATE_MSP_INSTALLSET 0
UPDATE_DATABASE_LISTNAME finals_instsetoo.txt
PACKAGEMAP package_names.txt,package_names_ext.txt
WINDOWSPATCHLEVEL @LIBO_VERSION_PATCH@
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index 4760ab629313..ea133ea6c78c 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -687,17 +687,22 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// all versions below 1.5.1
options.emplace_back("abort", reinterpret_cast<void*>(abort_handler));
bool hasStackSize = false;
+#ifdef UNX
+ // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
+ // in the class path in order to have applet support:
+ OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
+#endif
for (int i = 0; i < cOptions; i++)
{
OString opt(arOptions[i].optionString);
#ifdef UNX
- // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
- // in the class path in order to have applet support:
if (opt.startsWith("-Djava.class.path="))
{
- OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
if (!sAddPath.isEmpty())
+ {
opt += OStringChar(SAL_PATHSEPARATOR) + sAddPath;
+ sAddPath.clear();
+ }
}
#endif
if (opt == "-Xint") {
@@ -742,6 +747,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
}
#endif
}
+#ifdef UNX
+ if (!sAddPath.isEmpty()) {
+ options.emplace_back("-Djava.class.path=" + sAddPath, nullptr);
+ }
+#endif
std::unique_ptr<JavaVMOption[]> sarOptions(new JavaVMOption[options.size()]);
for (std::vector<Option>::size_type i = 0; i != options.size(); ++i) {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 32120308f932..f532ebd53fd3 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -210,8 +210,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/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 3eb5a5753085..91a26dbb79b3 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1386,6 +1386,8 @@ callback (gpointer pData)
case LOK_CALLBACK_TAB_STOP_LIST:
case LOK_CALLBACK_FORM_FIELD_BUTTON:
case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+ case LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR:
+ case LOK_COMMAND_BLOCKED:
{
// TODO: Implement me
break;
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/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl b/offapi/com/sun/star/document/XOOXMLDocumentPropertiesImporter.idl
index 9a2ba7fe4192..840081663edb 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.3
+ */
+
+ 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.3
+ */
+
+ 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.3
+ */
+
+ sequence< com::sun::star::io::XInputStream > getCustomPropertiesStreams([in] com::sun::star::embed::XStorage xSource);
};
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 5f8c6743e7c3..38a70848fd53 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -7181,6 +7181,14 @@
<value>1</value>
</prop>
</node>
+ <node oor:name=".uno:GraphicSizeCheck" oor:op="replace">
+ <prop oor:name="Label" oor:type="xs:string">
+ <value xml:lang="en-US">Graphic Size Check...</value>
+ </prop>
+ <prop oor:name="Properties" oor:type="xs:int">
+ <value>1</value>
+ </prop>
+ </node>
</node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 0adfd7a24e26..7a6ab57c2bb7 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>
diff --git a/oox/inc/drawingml/customshapeproperties.hxx b/oox/inc/drawingml/customshapeproperties.hxx
index 1dc0270614e0..5b1b01e97770 100644
--- a/oox/inc/drawingml/customshapeproperties.hxx
+++ b/oox/inc/drawingml/customshapeproperties.hxx
@@ -125,6 +125,12 @@ public:
sal_Int32 getArcNum() { return mnArcNum++; }
+ /**
+ Returns whether or not the current CustomShapeProperties
+ represent a default shape preset that is rectangular.
+ */
+ bool representsDefaultShape() const;
+
private:
sal_Int32 mnShapePresetType;
diff --git a/oox/inc/drawingml/textbody.hxx b/oox/inc/drawingml/textbody.hxx
index 8cc3a70b254a..54f40b9098b8 100644
--- a/oox/inc/drawingml/textbody.hxx
+++ b/oox/inc/drawingml/textbody.hxx
@@ -68,6 +68,23 @@ public:
bool isEmpty() const;
OUString toString() const;
+ /** Returns whether the textbody had a rPr tag in it that alters it visually
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const;
+
+ /// Returns whether the textbody had a pPr tag in it
+ bool hasParagraphProperties() const;
+
+ /// Returns whether the textbody had a non-empty bodyPr tag in it
+ bool hasNoninheritedBodyProperties() const { return mbHasNoninheritedBodyProperties; }
+ /// Flags textbody as having a non-empty bodyPr tag
+ void setHasNoninheritedBodyProperties() { mbHasNoninheritedBodyProperties = true; }
+
+ /// Returns whether the textbody had a non-empty lstStyle tag in it
+ bool hasListStyleOnImport() const { return maTextListStyle.hasListStyleOnImport(); }
+
void ApplyStyleEmpty(
const ::oox::core::XmlFilterBase& rFilterBase,
const css::uno::Reference < css::text::XText > & xText,
@@ -76,6 +93,8 @@ public:
protected:
TextParagraphVector maParagraphs;
TextBodyProperties maTextProperties;
+ /// Set if bodyPr tag in this textbody is non-empty during import
+ bool mbHasNoninheritedBodyProperties;
TextListStyle maTextListStyle;
Text3DProperties ma3DProperties;
};
diff --git a/oox/inc/drawingml/textcharacterproperties.hxx b/oox/inc/drawingml/textcharacterproperties.hxx
index a034121e47d0..147a9847781d 100644
--- a/oox/inc/drawingml/textcharacterproperties.hxx
+++ b/oox/inc/drawingml/textcharacterproperties.hxx
@@ -59,6 +59,8 @@ struct TextCharacterProperties
OptValue< bool > moUnderlineLineFollowText;
OptValue< bool > moUnderlineFillFollowText;
FillProperties maFillProperties;
+ /// Set if there was a property set that alters run visually during import
+ bool mbHasVisualRunProperties;
std::vector<css::beans::PropertyValue> maTextEffectsProperties;
@@ -79,6 +81,8 @@ struct TextCharacterProperties
void pushToPropSet(
PropertySet& rPropSet,
const ::oox::core::XmlFilterBase& rFilter ) const;
+
+ TextCharacterProperties() : mbHasVisualRunProperties(false) {}
};
diff --git a/oox/inc/drawingml/textfield.hxx b/oox/inc/drawingml/textfield.hxx
index 7cc15a04fce4..f70f0989ac7b 100644
--- a/oox/inc/drawingml/textfield.hxx
+++ b/oox/inc/drawingml/textfield.hxx
@@ -24,6 +24,9 @@
#include <drawingml/textparagraphproperties.hxx>
#include <memory>
+enum class SvxTimeFormat;
+enum class SvxDateFormat;
+
namespace oox { namespace drawingml {
struct TextCharacterProperties;
@@ -49,6 +52,16 @@ public:
const TextCharacterProperties& rTextCharacterStyle,
float nDefaultCharHeight) const override;
+ /** Gets the corresponding LO Date format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxDateFormat getLODateFormat( std::u16string_view rDateTimeType );
+ /** Gets the corresponding LO Time format for given OOXML datetime field type
+ *
+ * @param rDateTimeType PPTX datetime field type e.g. datetime3
+ */
+ static SvxTimeFormat getLOTimeFormat( std::u16string_view rDateTimeType );
private:
TextParagraphProperties maTextParagraphProperties;
OUString msType;
diff --git a/oox/inc/drawingml/textliststyle.hxx b/oox/inc/drawingml/textliststyle.hxx
index 94b6b10dc569..d4b5297ffb6d 100644
--- a/oox/inc/drawingml/textliststyle.hxx
+++ b/oox/inc/drawingml/textliststyle.hxx
@@ -45,6 +45,14 @@ public:
const TextParagraphPropertiesVector& getAggregationListStyle() const { return maAggregationListStyle; };
TextParagraphPropertiesVector& getAggregationListStyle() { return maAggregationListStyle; };
+ /// Flags ListStyle as having a non-empty lstStyle tag on import
+ void setHasListStyleOnImport() { mbHasListStyleOnImport = true; }
+ /** Returns whether the lstStyle tag was non-empty on import
+ *
+ * @return true if list style has it's own noninherited properties.
+ */
+ bool hasListStyleOnImport() const { return mbHasListStyleOnImport; }
+
#ifdef DBG_UTIL
void dump() const;
#endif
@@ -53,6 +61,8 @@ private:
TextParagraphPropertiesVector maListStyle;
TextParagraphPropertiesVector maAggregationListStyle;
+ /// Set if ListStyle has a non-empty lstStyle tag on import
+ bool mbHasListStyleOnImport;
};
} }
diff --git a/oox/inc/drawingml/textparagraph.hxx b/oox/inc/drawingml/textparagraph.hxx
index ec0d57686e1b..27c7cb251271 100644
--- a/oox/inc/drawingml/textparagraph.hxx
+++ b/oox/inc/drawingml/textparagraph.hxx
@@ -52,6 +52,10 @@ public:
TextParagraphProperties& getProperties() { return maProperties; }
const TextParagraphProperties& getProperties() const { return maProperties; }
+ /// Flags the textparagraph as having a pPr tag in it
+ void setHasProperties() { mbHasProperties = true; }
+ /// Returns whether the textparagraph had an pPr tag in it during import
+ bool hasProperties() const { return mbHasProperties; }
TextCharacterProperties& getEndProperties() { return maEndProperties; }
const TextCharacterProperties& getEndProperties() const { return maEndProperties; }
@@ -78,8 +82,15 @@ public:
}
formulaimport::XmlStreamBuilder & GetMathXml();
+ /** Returns whether textparagraph had a rPr tag in it that alters it visually
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const;
+
private:
TextParagraphProperties maProperties;
+ bool mbHasProperties;
TextCharacterProperties maEndProperties;
TextRunVector maRuns;
// temporarily store this here
diff --git a/oox/inc/drawingml/textrun.hxx b/oox/inc/drawingml/textrun.hxx
index 8d3e2c499bc6..4df18764ea08 100644
--- a/oox/inc/drawingml/textrun.hxx
+++ b/oox/inc/drawingml/textrun.hxx
@@ -43,6 +43,12 @@ public:
void setLineBreak() { mbIsLineBreak = true; }
bool isLineBreak() const { return mbIsLineBreak; }
+ /** Returns whether the textrun had properties that alter it visually in its rPr tag
+ *
+ * For instance _lang_ doesn't have a visual effect.
+ */
+ bool hasVisualRunProperties() const { return maTextCharacterProperties.mbHasVisualRunProperties; }
+
virtual sal_Int32 insertAt(
const ::oox::core::XmlFilterBase& rFilterBase,
const css::uno::Reference < css::text::XText >& xText,
diff --git a/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx
new file mode 100755
index 000000000000..db26dc032caa
--- /dev/null
+++ b/oox/qa/unit/data/camera-rotation-revolution-nonwps.pptx
Binary files differ
diff --git a/oox/qa/unit/data/endParaRPr-newline-textsize.pptx b/oox/qa/unit/data/endParaRPr-newline-textsize.pptx
new file mode 100755
index 000000000000..109f818ec8a7
--- /dev/null
+++ b/oox/qa/unit/data/endParaRPr-newline-textsize.pptx
Binary files differ
diff --git a/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx b/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx
new file mode 100755
index 000000000000..4dbf3717d1fd
--- /dev/null
+++ b/oox/qa/unit/data/testTdf132557_footerCustomShapes.pptx
Binary files differ
diff --git a/oox/qa/unit/data/watermark.docx b/oox/qa/unit/data/watermark.docx
new file mode 100644
index 000000000000..c9eacff9a643
--- /dev/null
+++ b/oox/qa/unit/data/watermark.docx
Binary files differ
diff --git a/oox/qa/unit/drawingml.cxx b/oox/qa/unit/drawingml.cxx
index a5be52f66c9e..363b58e3d36e 100644
--- a/oox/qa/unit/drawingml.cxx
+++ b/oox/qa/unit/drawingml.cxx
@@ -299,6 +299,32 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testCameraRotationRevolution)
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(27000), nRotateAngle1);
}
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf146534_CameraRotationRevolutionNonWpsShapes)
+{
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "camera-rotation-revolution-nonwps.pptx";
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape0(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<container::XNamed> xShape1(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps0(xShape0, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShapeProps1(xShape1, uno::UNO_QUERY);
+ sal_Int32 nRotateAngle0;
+ sal_Int32 nRotateAngle1;
+ xShapeProps0->getPropertyValue("RotateAngle") >>= nRotateAngle0;
+ xShapeProps1->getPropertyValue("RotateAngle") >>= nRotateAngle1;
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 9000
+ // - Actual : 0
+ // so the camera rotation would not have been factored into how the shape is displayed
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(9000), nRotateAngle0);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(30500), nRotateAngle1);
+}
+
CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
{
auto verify = [](const uno::Reference<lang::XComponent>& xComponent) {
@@ -334,6 +360,35 @@ CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTableShadow)
verify(getComponent());
}
+CPPUNIT_TEST_FIXTURE(OoxDrawingmlTest, testTdf132557_footerCustomShapes)
+{
+ // slide with date, footer, slide number with custom shapes
+ OUString aURL
+ = m_directories.getURLFromSrc(DATA_DIRECTORY) + "testTdf132557_footerCustomShapes.pptx";
+ // When importing the document:
+ load(aURL);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+
+ // Test if we were able to import the footer shapes with CustomShape service.
+ uno::Reference<drawing::XShape> xShapeDateTime(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeDateTime->getShapeType());
+ // Without the accompanying fix in place, this test would have failed with:
+ // An uncaught exception of type com.sun.star.lang.IndexOutOfBoundsException
+ // i.e. the shape wasn't on the slide there since it was imported as a property, not a shape.
+
+ uno::Reference<drawing::XShape> xShapeFooter(xDrawPage->getByIndex(1), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeFooter->getShapeType());
+
+ uno::Reference<drawing::XShape> xShapeSlideNum(xDrawPage->getByIndex(2), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("com.sun.star.drawing.CustomShape"),
+ xShapeSlideNum->getShapeType());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/qa/unit/vml.cxx b/oox/qa/unit/vml.cxx
index 36a120dbc938..88d69492e431 100644
--- a/oox/qa/unit/vml.cxx
+++ b/oox/qa/unit/vml.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/text/WritingMode2.hpp>
+#include <com/sun/star/drawing/ColorMode.hpp>
#include <comphelper/embeddedobjectcontainer.hxx>
#include <comphelper/processfactory.hxx>
@@ -153,6 +154,27 @@ CPPUNIT_TEST_FIXTURE(OoxVmlTest, testGraphicStroke)
CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, eLineStyle);
}
+CPPUNIT_TEST_FIXTURE(OoxVmlTest, testWatermark)
+{
+ // Given a document with a picture watermark, and the "washout" checkbox is ticked on the Word
+ // UI:
+ // When loading that document:
+ load(u"watermark.docx");
+
+ // Then make sure the watermark effect is not lost on import:
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ drawing::ColorMode eMode{};
+ xShape->getPropertyValue("GraphicColorMode") >>= eMode;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 3
+ // - Actual : 0
+ // i.e. the color mode was STANDARD, not WATERMARK.
+ CPPUNIT_ASSERT_EQUAL(drawing::ColorMode_WATERMARK, eMode);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx
index ab9cea4a49fc..bde8d5abdb53 100644
--- a/oox/source/core/contexthandler2.cxx
+++ b/oox/source/core/contexthandler2.cxx
@@ -18,16 +18,20 @@
*/
#include <oox/core/contexthandler2.hxx>
+#include <oox/core/xmlfilterbase.hxx>
#include <oox/helper/attributelist.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
namespace oox {
namespace core {
using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::xml::sax;
/** Information about a processed element. */
@@ -40,10 +44,11 @@ struct ElementInfo
explicit ElementInfo() : maChars( 0), mnElement( XML_TOKEN_INVALID ), mbTrimSpaces( false ) {}
};
-ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace ) :
+ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace, XmlFilterBase& rFilter ) :
mxContextStack( new ContextStack ),
mnRootStackSize( 0 ),
- mbEnableTrimSpace( bEnableTrimSpace )
+ mbEnableTrimSpace( bEnableTrimSpace ),
+ mrFilter( rFilter )
{
pushElementInfo( XML_ROOT_CONTEXT );
}
@@ -51,7 +56,8 @@ ContextHandler2Helper::ContextHandler2Helper( bool bEnableTrimSpace ) :
ContextHandler2Helper::ContextHandler2Helper( const ContextHandler2Helper& rParent ) :
mxContextStack( rParent.mxContextStack ),
mnRootStackSize( rParent.mxContextStack->size() ),
- mbEnableTrimSpace( rParent.mbEnableTrimSpace )
+ mbEnableTrimSpace( rParent.mbEnableTrimSpace ),
+ mrFilter(rParent.mrFilter)
{
}
@@ -188,6 +194,13 @@ ContextHandler2::~ContextHandler2()
Reference< XFastContextHandler > SAL_CALL ContextHandler2::createFastChildContext(
sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
{
+ if( getNamespace( nElement ) == NMSP_mce ) // TODO for checking 'Ignorable'
+ {
+ if( prepareMceContext( nElement, AttributeList( rxAttribs ) ) )
+ return this;
+ return nullptr;
+ }
+
return implCreateChildContext( nElement, rxAttribs );
}
@@ -207,6 +220,72 @@ void SAL_CALL ContextHandler2::endFastElement( sal_Int32 nElement )
implEndElement( nElement );
}
+bool ContextHandler2Helper::prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs )
+{
+ switch( nElement )
+ {
+ case MCE_TOKEN( AlternateContent ):
+ addMCEState( MCE_STATE::Started );
+ break;
+
+ case MCE_TOKEN( Choice ):
+ {
+ if (isMCEStateEmpty() || getMCEState() != MCE_STATE::Started)
+ return false;
+
+ OUString aRequires = rAttribs.getString( XML_Requires, "none" );
+
+ // At this point we can't access namespaces as the correct xml filter
+ // is long gone. For now let's decide depending on a list of supported
+ // namespaces like we do in writerfilter
+
+ std::vector<OUString> aSupportedNS =
+ {
+ "a14", // Impress needs this to import math formulas.
+ "p14",
+ "p15",
+ "x12ac",
+ "v"
+ };
+
+ Reference<XServiceInfo> xModel(getDocFilter().getModel(), UNO_QUERY);
+ if (xModel.is() && xModel->supportsService("com.sun.star.sheet.SpreadsheetDocument"))
+ {
+ // No a14 for Calc documents, it would cause duplicated shapes as-is.
+ auto it = std::find(aSupportedNS.begin(), aSupportedNS.end(), "a14");
+ if (it != aSupportedNS.end())
+ {
+ aSupportedNS.erase(it);
+ }
+ }
+
+ if (std::find(aSupportedNS.begin(), aSupportedNS.end(), aRequires) != aSupportedNS.end())
+ setMCEState( MCE_STATE::FoundChoice ) ;
+ else
+ return false;
+ }
+ break;
+
+ case MCE_TOKEN( Fallback ):
+ if( !isMCEStateEmpty() && getMCEState() == MCE_STATE::Started )
+ break;
+ return false;
+ default:
+ {
+ OUString str = rAttribs.getString( MCE_TOKEN( Ignorable ), OUString() );
+ if( !str.isEmpty() )
+ {
+ // Sequence< css::xml::FastAttribute > attrs = rAttribs.getFastAttributeList()->getFastAttributes();
+ // printf("MCE: %s\n", OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
+ // TODO: Check & Get the namespaces in "Ignorable"
+ // printf("NS: %d : %s\n", attrs.getLength(), OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ }
+ return false;
+ }
+ return true;
+}
+
// oox.core.RecordContext interface -------------------------------------------
ContextHandlerRef ContextHandler2::createRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm )
diff --git a/oox/source/core/fragmenthandler2.cxx b/oox/source/core/fragmenthandler2.cxx
index 79b58ce70f0e..cbad55571b09 100644
--- a/oox/source/core/fragmenthandler2.cxx
+++ b/oox/source/core/fragmenthandler2.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
FragmentHandler2::FragmentHandler2( XmlFilterBase& rFilter, const OUString& rFragmentPath, bool bEnableTrimSpace ) :
FragmentHandler( rFilter, rFragmentPath ),
- ContextHandler2Helper( bEnableTrimSpace )
+ ContextHandler2Helper( bEnableTrimSpace, rFilter )
{
}
@@ -54,72 +54,6 @@ void SAL_CALL FragmentHandler2::endDocument()
finalizeImport();
}
-bool FragmentHandler2::prepareMceContext( sal_Int32 nElement, const AttributeList& rAttribs )
-{
- switch( nElement )
- {
- case MCE_TOKEN( AlternateContent ):
- aMceState.push_back( MCE_STATE::Started );
- break;
-
- case MCE_TOKEN( Choice ):
- {
- if (aMceState.empty() || aMceState.back() != MCE_STATE::Started)
- return false;
-
- OUString aRequires = rAttribs.getString( XML_Requires, "none" );
-
- // At this point we can't access namespaces as the correct xml filter
- // is long gone. For now let's decide depending on a list of supported
- // namespaces like we do in writerfilter
-
- std::vector<OUString> aSupportedNS =
- {
- "a14", // Impress needs this to import math formulas.
- "p14",
- "p15",
- "x12ac",
- "v",
- };
-
- uno::Reference<lang::XServiceInfo> xModel(getFilter().getModel(), uno::UNO_QUERY);
- if (xModel.is() && xModel->supportsService("com.sun.star.sheet.SpreadsheetDocument"))
- {
- // No a14 for Calc documents, it would cause duplicated shapes as-is.
- auto it = std::find(aSupportedNS.begin(), aSupportedNS.end(), "a14");
- if (it != aSupportedNS.end())
- {
- aSupportedNS.erase(it);
- }
- }
-
- if (std::find(aSupportedNS.begin(), aSupportedNS.end(), aRequires) != aSupportedNS.end())
- aMceState.back() = MCE_STATE::FoundChoice;
- else
- return false;
- }
- break;
-
- case MCE_TOKEN( Fallback ):
- if( !aMceState.empty() && aMceState.back() == MCE_STATE::Started )
- break;
- return false;
- default:
- {
- OUString str = rAttribs.getString( MCE_TOKEN( Ignorable ), OUString() );
- if( !str.isEmpty() )
- {
- // Sequence< css::xml::FastAttribute > attrs = rAttribs.getFastAttributeList()->getFastAttributes();
- // printf("MCE: %s\n", OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
- // TODO: Check & Get the namespaces in "Ignorable"
- // printf("NS: %d : %s\n", attrs.getLength(), OUStringToOString( str, RTL_TEXTENCODING_UTF8 ).getStr() );
- }
- }
- return false;
- }
- return true;
-}
-
// com.sun.star.xml.sax.XFastContextHandler interface -------------------------
Reference< XFastContextHandler > SAL_CALL FragmentHandler2::createFastChildContext(
@@ -151,7 +85,7 @@ void SAL_CALL FragmentHandler2::endFastElement( sal_Int32 nElement )
switch( nElement )
{
case MCE_TOKEN( AlternateContent ):
- aMceState.pop_back();
+ removeMCEState();
break;
}
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/customshapeproperties.cxx b/oox/source/drawingml/customshapeproperties.cxx
index 4a6e3d9eae6d..0beb6a172b5f 100644
--- a/oox/source/drawingml/customshapeproperties.cxx
+++ b/oox/source/drawingml/customshapeproperties.cxx
@@ -89,6 +89,13 @@ sal_Int32 CustomShapeProperties::GetCustomShapeGuideValue( const std::vector< Cu
return nIndex;
}
+bool CustomShapeProperties::representsDefaultShape() const
+{
+ return !((getShapePresetType() >= 0 || maPath2DList.size() > 0) &&
+ getShapePresetType() != XML_Rect &&
+ getShapePresetType() != XML_rect);
+}
+
CustomShapeProperties::PresetDataMap CustomShapeProperties::maPresetDataMap;
static OUString GetConnectorShapeType( sal_Int32 nType )
diff --git a/oox/source/drawingml/graphicshapecontext.cxx b/oox/source/drawingml/graphicshapecontext.cxx
index 1c22a33b9ca1..67f1a8bc6633 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -219,6 +219,7 @@ ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nEleme
mrOleObjectInfo.maName = rAttribs.getXString( XML_name, OUString() );
mrOleObjectInfo.maProgId = rAttribs.getXString( XML_progId, OUString() );
mrOleObjectInfo.mbShowAsIcon = rAttribs.getBool( XML_showAsIcon, false );
+ mrOleObjectInfo.mbHasPicture = false; // Initialize as false
return this;
}
break;
@@ -232,6 +233,7 @@ ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nEleme
mrOleObjectInfo.mbAutoUpdate = rAttribs.getBool( XML_updateAutomatic, false );
break;
case PPT_TOKEN( pic ):
+ mrOleObjectInfo.mbHasPicture = true; // Set true if ole object has picture element.
return new GraphicShapeContext( *this, mpMasterShapePtr, mpShapePtr );
break;
}
@@ -240,6 +242,15 @@ ContextHandlerRef OleObjectGraphicDataContext::onCreateContext( sal_Int32 nEleme
return nullptr;
}
+void OleObjectGraphicDataContext::onEndElement()
+{
+ if( getCurrentElement() == PPT_TOKEN( oleObj ) && !isMCEStateEmpty() )
+ {
+ if( getMCEState() == MCE_STATE::FoundChoice && !mrOleObjectInfo.mbHasPicture )
+ setMCEState( MCE_STATE::Started );
+ }
+}
+
DiagramGraphicDataContext::DiagramGraphicDataContext( ContextHandler2Helper const & rParent, const ShapePtr& pShapePtr )
: ShapeContext( rParent, ShapePtr(), pShapePtr )
{
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 803e130b349a..3f45859e818f 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -727,9 +727,7 @@ Reference< XShape > const & Shape::createAndInsert(
// Use custom shape instead of GraphicObjectShape if the image is cropped to
// shape. Except rectangle, which does not require further cropping
bool bIsCroppedGraphic = (aServiceName == "com.sun.star.drawing.GraphicObjectShape" &&
- (mpCustomShapePropertiesPtr->getShapePresetType() >= 0 || mpCustomShapePropertiesPtr->getPath2DList().size() > 0) &&
- mpCustomShapePropertiesPtr->getShapePresetType() != XML_Rect &&
- mpCustomShapePropertiesPtr->getShapePresetType() != XML_rect);
+ !mpCustomShapePropertiesPtr->representsDefaultShape());
bool bIsCustomShape = ( aServiceName == "com.sun.star.drawing.CustomShape" ||
aServiceName == "com.sun.star.drawing.ConnectorShape" ||
bIsCroppedGraphic);
@@ -763,7 +761,8 @@ Reference< XShape > const & Shape::createAndInsert(
}
bool bNoTranslation = !aParentTransformation.isIdentity();
- if( mbFlipH || mbFlipV || mnRotation != 0 || bNoTranslation )
+ const sal_Int32 nCameraRotation = get3DProperties().maCameraRotation.mnRevolution.get(0);
+ if( mbFlipH || mbFlipV || mnRotation != 0 || nCameraRotation != 0 || bNoTranslation )
{
// calculate object's center
basegfx::B2DPoint aCenter(0.5, 0.5);
@@ -799,7 +798,7 @@ Reference< XShape > const & Shape::createAndInsert(
}
}
// rotate around object's center
- aTransformation.rotate(basegfx::deg2rad(static_cast<double>(mnRotation) / 60000.0));
+ aTransformation.rotate(basegfx::deg2rad(static_cast<double>(mnRotation - nCameraRotation) / 60000.0));
}
// move object back from center
@@ -1458,8 +1457,6 @@ Reference< XShape > const & Shape::createAndInsert(
getTextBody()->getTextProperties().pushVertSimulation();
// tdf#133037: a bit hackish: force Shape to rotate in the opposite direction the camera would rotate
- const sal_Int32 nCameraRotation = get3DProperties().maCameraRotation.mnRevolution.get(0);
-
PropertySet aPropertySet(mxShape);
if ( !bUseRotationTransform && (mnRotation != 0 || nCameraRotation != 0) )
{
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
index 80ebb4d2287d..323d654ce971 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -32,10 +32,12 @@ using namespace ::com::sun::star::beans;
namespace oox { namespace drawingml {
TextBody::TextBody()
+ : mbHasNoninheritedBodyProperties( false )
{
}
TextBody::TextBody( const TextBodyPtr& pBody )
+ : mbHasNoninheritedBodyProperties( false )
{
if( pBody.get() ) {
maTextProperties = pBody->maTextProperties;
@@ -104,6 +106,26 @@ OUString TextBody::toString() const
return OUString();
}
+bool TextBody::hasVisualRunProperties() const
+{
+ for ( auto& pTextParagraph : getParagraphs() )
+ {
+ if ( pTextParagraph->hasVisualRunProperties() )
+ return true;
+ }
+ return false;
+}
+
+bool TextBody::hasParagraphProperties() const
+{
+ for ( auto& pTextParagraph : getParagraphs() )
+ {
+ if ( pTextParagraph->hasProperties() )
+ return true;
+ }
+ return false;
+}
+
void TextBody::ApplyStyleEmpty(
const ::oox::core::XmlFilterBase& rFilterBase,
const Reference < XText > & xText,
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index cbd1e420ee5a..3e0637c87f91 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -28,6 +28,8 @@
#include <oox/drawingml/shape.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include <oox/helper/attributelist.hxx>
+#include <sax/fastattribs.hxx>
#include <oox/mathml/import.hxx>
@@ -86,6 +88,7 @@ ContextHandlerRef TextParagraphContext::onCreateContext( sal_Int32 aElementToken
}
case A_TOKEN( pPr ):
case W_TOKEN( pPr ):
+ mrParagraph.setHasProperties();
return new TextParagraphPropertiesContext( *this, rAttribs, mrParagraph.getProperties() );
case A_TOKEN( endParaRPr ):
return new TextCharacterPropertiesContext( *this, rAttribs, mrParagraph.getEndProperties() );
@@ -175,6 +178,8 @@ ContextHandlerRef TextBodyContext::onCreateContext( sal_Int32 aElementToken, con
switch( aElementToken )
{
case A_TOKEN( bodyPr ): // CT_TextBodyPropertyBag
+ if (sax_fastparser::FastAttributeList::castToFastAttributeList(rAttribs.getFastAttributeList())->getFastAttributeTokens().size() > 0)
+ mrTextBody.setHasNoninheritedBodyProperties();
if ( mpShapePtr )
return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr );
else
diff --git a/oox/source/drawingml/textcharacterpropertiescontext.cxx b/oox/source/drawingml/textcharacterpropertiescontext.cxx
index 236219d844cf..2bc7be3633c1 100644
--- a/oox/source/drawingml/textcharacterpropertiescontext.cxx
+++ b/oox/source/drawingml/textcharacterpropertiescontext.cxx
@@ -29,6 +29,8 @@
#include "hyperlinkcontext.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
+#include <sax/fastattribs.hxx>
+#include <sax/fastparser.hxx>
#include <sal/log.hxx>
@@ -47,8 +49,16 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext(
: ContextHandler2( rParent )
, mrTextCharacterProperties( rTextCharacterProperties )
{
- if ( rAttribs.hasAttribute( XML_lang ) )
+ int nVisualTokenAmount = sax_fastparser::FastAttributeList::castToFastAttributeList(
+ rAttribs.getFastAttributeList() )->getFastAttributeTokens().size();
+
+ if ( rAttribs.hasAttribute( XML_lang ) ){
mrTextCharacterProperties.moLang = rAttribs.getString( XML_lang );
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+ if ( rAttribs.hasAttribute( XML_altLang )){
+ --nVisualTokenAmount; // Not a visual attribute
+ }
if ( rAttribs.hasAttribute( XML_sz ) )
mrTextCharacterProperties.moHeight = rAttribs.getInteger( XML_sz );
if ( rAttribs.hasAttribute( XML_spc ) )
@@ -66,6 +76,17 @@ TextCharacterPropertiesContext::TextCharacterPropertiesContext(
mrTextCharacterProperties.moItalic = rAttribs.getBool( XML_i );
if( rAttribs.hasAttribute( XML_cap ) )
mrTextCharacterProperties.moCaseMap = rAttribs.getToken( XML_cap );
+ if ( rAttribs.hasAttribute( XML_dirty ) )
+ {
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+ if ( rAttribs.hasAttribute( XML_smtClean ) )
+ {
+ --nVisualTokenAmount; // Not a visual attribute
+ }
+
+ if ( nVisualTokenAmount > 0 )
+ mrTextCharacterProperties.mbHasVisualRunProperties = true;
/* TODO / unhandled so far:
A_TOKEN( kern )
@@ -87,6 +108,9 @@ TextCharacterPropertiesContext::~TextCharacterPropertiesContext()
ContextHandlerRef TextCharacterPropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
+ if( aElementToken != A_TOKEN(lang) )
+ mrTextCharacterProperties.mbHasVisualRunProperties = true;
+
switch( aElementToken )
{
// TODO unsupported yet
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index 61b50e8ef549..a8e058603f7a 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -34,6 +34,7 @@
#include <drawingml/textparagraphproperties.hxx>
#include <drawingml/textcharacterproperties.hxx>
#include <tools/diagnose_ex.h>
+#include <editeng/flditem.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -73,68 +74,28 @@ void lclCreateTextFields( std::vector< Reference< XTextField > > & aFields,
aFields.emplace_back( xIface, UNO_QUERY );
return;
}
- bool bIsDate = true;
- int idx = p.toInt32();
- sal_uInt16 nNumFmt;
- xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
- aFields.emplace_back( xIface, UNO_QUERY );
- Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
-
- // here we should format the field properly. waiting after #i81091.
- switch( idx )
+
+ SvxDateFormat eDateFormat = TextField::getLODateFormat(sType);
+ if (eDateFormat != SvxDateFormat::AppDefault)
{
- case 1: // Date dd/mm/yyyy
- // this is the default format...
- nNumFmt = 5;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- case 2: // Date Day, Month dd, yyyy
- break;
- case 3: // Date dd Month yyyy
- nNumFmt = 3;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- case 4: // Date Month dd, yyyy
- break;
- case 5: // Date dd-Mon-yy
- break;
- case 6: // Date Month yy
- break;
- case 7: // Date Mon-yy
- break;
- case 8: // DateTime dd/mm/yyyy H:MM PM
- lclCreateTextFields( aFields, xModel, "datetime12" );
- break;
- case 9: // DateTime dd/mm/yy H:MM:SS PM
- lclCreateTextFields( aFields, xModel, "datetime13" );
- break;
- case 10: // Time H:MM
- bIsDate = false;
- nNumFmt = 3;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- case 11: // Time H:MM:SS
- bIsDate = false;
- // this is the default format
- nNumFmt = 2;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- case 12: // Time H:MM PM
- bIsDate = false;
- nNumFmt = 6;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- case 13: // Time H:MM:SS PM
- bIsDate = false;
- nNumFmt = 7;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
- break;
- default:
- nNumFmt = 2;
- xProps->setPropertyValue("NumberFormat", makeAny(nNumFmt));
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
+ xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eDateFormat)));
+ xProps->setPropertyValue("IsDate", Any(true));
+ xProps->setPropertyValue("IsFixed", Any(false));
+ }
+
+ SvxTimeFormat eTimeFormat = TextField::getLOTimeFormat(sType);
+ if (eTimeFormat != SvxTimeFormat::AppDefault)
+ {
+ xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
+ aFields.emplace_back( xIface, UNO_QUERY );
+ Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
+ xProps->setPropertyValue("NumberFormat", Any(static_cast<sal_Int32>(eTimeFormat)));
+ xProps->setPropertyValue("IsDate", Any(false));
+ xProps->setPropertyValue("IsFixed", Any(false));
}
- xProps->setPropertyValue( "IsDate", makeAny( bIsDate ) );
- xProps->setPropertyValue( "IsFixed", makeAny( false ) );
}
catch(const Exception &)
{
@@ -247,6 +208,67 @@ sal_Int32 TextField::insertAt(
return nCharHeight;
}
+SvxDateFormat TextField::getLODateFormat(std::u16string_view rDateTimeType)
+{
+ OString aDateTimeNum = OUStringToOString(rDateTimeType.substr(8), RTL_TEXTENCODING_UTF8);
+
+ if( aDateTimeNum.isEmpty() ) // "datetime"
+ return SvxDateFormat::StdSmall;
+
+ int nDateTimeNum = aDateTimeNum.toInt32();
+
+ switch( nDateTimeNum )
+ {
+ case 1: // Date dd/mm/yyyy
+ case 8: // DateTime dd/mm/yyyy H:MM PM
+ case 9: // DateTime dd/mm/yyyy H:MM:SS PM
+ return SvxDateFormat::B;
+ case 2: // Date Day, Month dd, yyyy
+ return SvxDateFormat::StdBig;
+ case 3: // Date dd Month yyyy
+ case 4: // Date Month dd, yyyy - no exact map
+ case 6: // Date Month yy - no exact map
+ return SvxDateFormat::D;
+ case 5: // Date dd-Mon-yy - no exact map
+ case 7: // Date Mon-yy - no exact map
+ return SvxDateFormat::C;
+ case 10: // Time H:MM - not a date format
+ case 11: // Time H:MM:SS - not a date format
+ case 12: // Time H:MM PM - not a date format
+ case 13: // Time H:MM:SS PM - not a date format
+ default:
+ return SvxDateFormat::AppDefault;
+ }
+}
+
+SvxTimeFormat TextField::getLOTimeFormat(std::u16string_view rDateTimeType)
+{
+ OString aDateTimeNum = OUStringToOString(rDateTimeType.substr(8), RTL_TEXTENCODING_UTF8);
+ int nDateTimeNum = aDateTimeNum.toInt32();
+
+ switch( nDateTimeNum )
+ {
+ case 8: // DateTime dd/mm/yyyy H:MM PM
+ case 12: // Time H:MM PM
+ return SvxTimeFormat::HH12_MM;
+ case 9: // DateTime dd/mm/yyyy H:MM:SS PM
+ case 13: // Time H:MM:SS PM
+ return SvxTimeFormat::HH12_MM_SS;
+ case 10: // Time H:MM
+ return SvxTimeFormat::HH24_MM;
+ case 11: // Time H:MM:SS
+ return SvxTimeFormat::Standard;
+ case 1: // Date dd/mm/yyyy
+ case 2: // Date Day, Month dd, yyyy
+ case 3: // Date dd Month yyyy
+ case 4: // Date Month dd, yyyy
+ case 5: // Date dd-Mon-yy
+ case 6: // Date Month yy
+ case 7: // Date Mon-yy
+ default:
+ return SvxTimeFormat::AppDefault;
+ }
+}
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 15475ddcacb0..645cd64b4792 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -23,6 +23,7 @@
namespace oox { namespace drawingml {
TextListStyle::TextListStyle()
+ : mbHasListStyleOnImport(false)
{
for ( int i = 0; i < 9; i++ )
{
@@ -36,6 +37,7 @@ TextListStyle::~TextListStyle()
}
TextListStyle::TextListStyle(const TextListStyle& rStyle)
+ : mbHasListStyleOnImport(false)
{
assert(rStyle.maListStyle.size() == 9);
assert(rStyle.maAggregationListStyle.size() == 9);
diff --git a/oox/source/drawingml/textliststylecontext.cxx b/oox/source/drawingml/textliststylecontext.cxx
index 9c43e7206f1b..dee3a71e3f80 100644
--- a/oox/source/drawingml/textliststylecontext.cxx
+++ b/oox/source/drawingml/textliststylecontext.cxx
@@ -42,6 +42,7 @@ TextListStyleContext::~TextListStyleContext()
ContextHandlerRef TextListStyleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
+ mrTextListStyle.setHasListStyleOnImport();
switch( aElementToken )
{
case A_TOKEN( defPPr ): // CT_TextParagraphProperties
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index b5635b58f2e9..c85878715310 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -38,6 +38,7 @@ using namespace ::com::sun::star::beans;
namespace oox { namespace drawingml {
TextParagraph::TextParagraph()
+ : mbHasProperties( false )
{
}
@@ -195,6 +196,16 @@ formulaimport::XmlStreamBuilder & TextParagraph::GetMathXml()
return *m_pMathXml;
}
+bool TextParagraph::hasVisualRunProperties() const
+{
+ for ( auto& pTextRun : getRuns() )
+ {
+ if ( pTextRun->hasVisualRunProperties() )
+ return true;
+ }
+ return false;
+}
+
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index fd4f67732607..5d3996430eff 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1781,7 +1781,7 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool
else if (GetProperty(rXPropSet, "CharHeight"))
{
nSize = static_cast<sal_Int32>(100*(*o3tl::doAccess<float>(mAny)));
- if ( nElement == XML_rPr )
+ if ( nElement == XML_rPr || nElement == XML_defRPr )
{
rbOverridingCharHeight = true;
rnCharHeight = nSize;
@@ -2138,40 +2138,13 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa
{
sal_Int32 nNumFmt = -1;
rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
- switch(static_cast<SvxDateFormat>(nNumFmt))
- {
- case SvxDateFormat::StdSmall:
- case SvxDateFormat::A: aFieldValue = "datetime"; // 13/02/96
- break;
- case SvxDateFormat::B: aFieldValue = "datetime1"; // 13/02/1996
- break;
- case SvxDateFormat::StdBig:
- case SvxDateFormat::D: aFieldValue = "datetime3"; // 13 February 1996
- break;
- default: break;
- }
+ aFieldValue = GetDatetimeTypeFromDate(static_cast<SvxDateFormat>(nNumFmt));
}
else if(aFieldKind == "ExtTime")
{
sal_Int32 nNumFmt = -1;
rXPropSet->getPropertyValue(UNO_TC_PROP_NUMFORMAT) >>= nNumFmt;
- switch(static_cast<SvxTimeFormat>(nNumFmt))
- {
- case SvxTimeFormat::Standard:
- case SvxTimeFormat::HH24_MM_SS:
- aFieldValue = "datetime11"; // 13:49:38
- break;
- case SvxTimeFormat::HH24_MM:
- aFieldValue = "datetime10"; // 13:49
- break;
- case SvxTimeFormat::HH12_MM:
- aFieldValue = "datetime12"; // 01:49 PM
- break;
- case SvxTimeFormat::HH12_MM_SS:
- aFieldValue = "datetime13"; // 01:49:38 PM
- break;
- default: break;
- }
+ aFieldValue = GetDatetimeTypeFromTime(static_cast<SvxTimeFormat>(nNumFmt));
}
else if(aFieldKind == "ExtFile")
{
@@ -2198,6 +2171,85 @@ OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRa
return aFieldValue;
}
+OUString DrawingML::GetDatetimeTypeFromDate(SvxDateFormat eDate)
+{
+ return GetDatetimeTypeFromDateTime(eDate, SvxTimeFormat::AppDefault);
+}
+
+OUString DrawingML::GetDatetimeTypeFromTime(SvxTimeFormat eTime)
+{
+ return GetDatetimeTypeFromDateTime(SvxDateFormat::AppDefault, eTime);
+}
+
+OUString DrawingML::GetDatetimeTypeFromDateTime(SvxDateFormat eDate, SvxTimeFormat eTime)
+{
+ OUString aDateField;
+ switch (eDate)
+ {
+ case SvxDateFormat::StdSmall:
+ case SvxDateFormat::A:
+ aDateField = "datetime";
+ break;
+ case SvxDateFormat::B:
+ aDateField = "datetime1"; // 13/02/1996
+ break;
+ case SvxDateFormat::C:
+ aDateField = "datetime5";
+ break;
+ case SvxDateFormat::D:
+ aDateField = "datetime3"; // 13 February 1996
+ break;
+ case SvxDateFormat::StdBig:
+ case SvxDateFormat::E:
+ case SvxDateFormat::F:
+ aDateField = "datetime2";
+ break;
+ default:
+ break;
+ }
+
+ OUString aTimeField;
+ switch (eTime)
+ {
+ case SvxTimeFormat::Standard:
+ case SvxTimeFormat::HH24_MM_SS:
+ case SvxTimeFormat::HH24_MM_SS_00:
+ aTimeField = "datetime11"; // 13:49:38
+ break;
+ case SvxTimeFormat::HH24_MM:
+ aTimeField = "datetime10"; // 13:49
+ break;
+ case SvxTimeFormat::HH12_MM:
+ case SvxTimeFormat::HH12_MM_AMPM:
+ aTimeField = "datetime12"; // 01:49 PM
+ break;
+ case SvxTimeFormat::HH12_MM_SS:
+ case SvxTimeFormat::HH12_MM_SS_AMPM:
+ case SvxTimeFormat::HH12_MM_SS_00:
+ case SvxTimeFormat::HH12_MM_SS_00_AMPM:
+ aTimeField = "datetime13"; // 01:49:38 PM
+ break;
+ default:
+ break;
+ }
+
+ if (!aDateField.isEmpty() && aTimeField.isEmpty())
+ return aDateField;
+ else if (!aTimeField.isEmpty() && aDateField.isEmpty())
+ return aTimeField;
+ else if (!aDateField.isEmpty() && !aTimeField.isEmpty())
+ {
+ if (aTimeField == "datetime11" || aTimeField == "datetime13")
+ // only datetime format that has Date and HH:MM:SS
+ return "datetime9"; // dd/mm/yyyy H:MM:SS
+ else
+ // only datetime format that has Date and HH:MM
+ return "datetime8"; // dd/mm/yyyy H:MM
+ }
+ else
+ return "";
+}
+
void DrawingML::WriteRun( const Reference< XTextRange >& rRun,
bool& rbOverridingCharHeight, sal_Int32& rnCharHeight)
{
@@ -2623,14 +2675,14 @@ void DrawingML::WriteLinespacing( const LineSpacing& rSpacing )
}
}
-void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rParagraph, float fFirstCharHeight)
+bool DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rParagraph, float fFirstCharHeight, sal_Int32 nElement)
{
Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
Reference< XPropertyState > rXPropState( rParagraph, UNO_QUERY );
PropertyState eState;
if( !rXPropSet.is() || !rXPropState.is() )
- return;
+ return false;
sal_Int16 nLevel = -1;
if (GetProperty(rXPropSet, "NumberingLevel"))
@@ -2681,14 +2733,14 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
|| bHasLinespacing )
{
if (nParaLeftMargin) // For Paragraph
- mpFS->startElementNS( XML_a, XML_pPr,
+ mpFS->startElementNS( XML_a, nElement,
XML_lvl, nLevel > 0 ? OString::number(nLevel).getStr() : nullptr,
XML_marL, nParaLeftMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nParaLeftMargin)).getStr() : nullptr,
XML_indent, nParaFirstLineIndent ? OString::number(oox::drawingml::convertHmmToEmu(nParaFirstLineIndent)).getStr() : nullptr,
XML_algn, GetAlignment( nAlignment ),
XML_rtl, bRtl ? ToPsz10(bRtl) : nullptr );
else
- mpFS->startElementNS( XML_a, XML_pPr,
+ mpFS->startElementNS( XML_a, nElement,
XML_lvl, nLevel > 0 ? OString::number(nLevel).getStr() : nullptr,
XML_marL, nLeftMargin > 0 ? OString::number(oox::drawingml::convertHmmToEmu(nLeftMargin)).getStr() : nullptr,
XML_indent, nLineIndentation ? OString::number(oox::drawingml::convertHmmToEmu(nLineIndentation)).getStr() : nullptr,
@@ -2726,7 +2778,51 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
WriteParagraphNumbering( rXPropSet, fFirstCharHeight, nLevel );
WriteParagraphTabStops( rXPropSet );
- mpFS->endElementNS( XML_a, XML_pPr );
+ // do not end element for lstStyles since, defRPr should be stacked inside it
+ if( nElement != XML_lvl1pPr )
+ mpFS->endElementNS( XML_a, nElement );
+
+ return true;
+ }
+ return false;
+}
+
+void DrawingML::WriteLstStyles(const css::uno::Reference<css::text::XTextContent>& rParagraph,
+ bool& rbOverridingCharHeight, sal_Int32& rnCharHeight,
+ const css::uno::Reference<css::beans::XPropertySet>& /*rXShapePropSet*/)
+{
+ Reference<XEnumerationAccess> access(rParagraph, UNO_QUERY);
+ if (!access.is())
+ return;
+
+ Reference<XEnumeration> enumeration(access->createEnumeration());
+ if (!enumeration.is())
+ return;
+
+
+ Reference<XTextRange> rRun;
+
+ if (enumeration->hasMoreElements())
+ {
+ Any aAny(enumeration->nextElement());
+ if (aAny >>= rRun)
+ {
+ float fFirstCharHeight = rnCharHeight / 1000.;
+ Reference<XPropertySet> xFirstRunPropSet(rRun, UNO_QUERY);
+ Reference<XPropertySetInfo> xFirstRunPropSetInfo
+ = xFirstRunPropSet->getPropertySetInfo();
+
+ if (xFirstRunPropSetInfo->hasPropertyByName("CharHeight"))
+ fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+
+ mpFS->startElementNS(XML_a, XML_lstStyle);
+ if( !WriteParagraphProperties(rParagraph, fFirstCharHeight, XML_lvl1pPr) )
+ mpFS->startElementNS(XML_a, XML_lvl1pPr);
+ WriteRunProperties(xFirstRunPropSet, false, XML_defRPr, true, rbOverridingCharHeight,
+ rnCharHeight, GetScriptType(rRun->getString()));
+ mpFS->endElementNS(XML_a, XML_lvl1pPr);
+ mpFS->endElementNS(XML_a, XML_lstStyle);
+ }
}
}
@@ -2757,7 +2853,11 @@ void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph,
Reference< XPropertySet > xFirstRunPropSet (run, UNO_QUERY);
Reference< XPropertySetInfo > xFirstRunPropSetInfo = xFirstRunPropSet->getPropertySetInfo();
if( xFirstRunPropSetInfo->hasPropertyByName("CharHeight") )
+ {
fFirstCharHeight = xFirstRunPropSet->getPropertyValue("CharHeight").get<float>();
+ rnCharHeight = 100 * fFirstCharHeight;
+ rbOverridingCharHeight = true;
+ }
WriteParagraphProperties( rParagraph, fFirstCharHeight );
bPropertiesWritten = true;
}
@@ -2770,7 +2870,7 @@ void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph,
mpFS->endElementNS( XML_a, XML_p );
}
-void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr, bool bText, sal_Int32 nXmlNamespace )
+void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr, bool bText, sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles )
{
Reference< XText > xXText( rXIface, UNO_QUERY );
Reference< XPropertySet > rXPropSet( rXIface, UNO_QUERY );
@@ -3002,7 +3102,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
}
}
- WriteShape3DEffects( rXPropSet );
+ Write3DEffects( rXPropSet, /*bIsText=*/true );
mpFS->endElementNS((nXmlNamespace ? nXmlNamespace : XML_a), XML_bodyPr);
}
@@ -3048,6 +3148,7 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
bool bOverridingCharHeight = false;
sal_Int32 nCharHeight = -1;
+ bool bFirstParagraph = true;
while( enumeration->hasMoreElements() )
{
@@ -3055,7 +3156,13 @@ void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUStrin
Any any ( enumeration->nextElement() );
if( any >>= paragraph)
- WriteParagraph( paragraph, bOverridingCharHeight, nCharHeight );
+ {
+ if (bFirstParagraph && bWritePropertiesAsLstStyles)
+ WriteLstStyles(paragraph, bOverridingCharHeight, nCharHeight, rXPropSet);
+
+ WriteParagraph(paragraph, bOverridingCharHeight, nCharHeight);
+ bFirstParagraph = false;
+ }
}
}
@@ -3933,7 +4040,7 @@ void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
}
}
-void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
+void DrawingML::Write3DEffects( const Reference< XPropertySet >& xPropSet, bool bIsText )
{
// check existence of the grab bag
if( !GetProperty( xPropSet, "InteropGrabBag" ) )
@@ -3942,8 +4049,10 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
// extract the relevant properties from the grab bag
Sequence< PropertyValue > aGrabBag, aEffectProps, aLightRigProps, aShape3DProps;
mAny >>= aGrabBag;
- auto pShapeProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
- [](const PropertyValue& rProp) { return rProp.Name == "3DEffectProperties"; });
+
+ auto pShapeProp = std::find_if( std::cbegin(aGrabBag), std::cend(aGrabBag),
+ [bIsText](const PropertyValue& rProp)
+ { return rProp.Name == (bIsText ? u"Text3DEffectProperties" : u"3DEffectProperties"); });
if (pShapeProp != std::cend(aGrabBag))
{
Sequence< PropertyValue > a3DEffectProps;
@@ -3959,24 +4068,6 @@ void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
}
}
- auto pTextProp = std::find_if(std::cbegin(aGrabBag), std::cend(aGrabBag),
- [](const PropertyValue& rProp) { return rProp.Name == "Text3DEffectProperties"; });
-
- if (pTextProp != std::cend(aGrabBag))
- {
- Sequence< PropertyValue > a3DEffectProps;
- pTextProp->Value >>= a3DEffectProps;
- for( const auto& r3DEffectProp : std::as_const(a3DEffectProps) )
- {
- if( r3DEffectProp.Name == "Camera" )
- r3DEffectProp.Value >>= aEffectProps;
- else if( r3DEffectProp.Name == "LightRig" )
- r3DEffectProp.Value >>= aLightRigProps;
- else if( r3DEffectProp.Name == "Shape3D" )
- r3DEffectProp.Value >>= aShape3DProps;
- }
- }
-
if( !aEffectProps.hasElements() && !aLightRigProps.hasElements() && !aShape3DProps.hasElements() )
return;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 60b88181b5dc..ef9fdfd12282 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1059,7 +1059,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
bHas3DEffectinShape = true;
if( bHas3DEffectinShape)
- WriteShape3DEffects( rXPropSet );
+ Write3DEffects( rXPropSet, /*bIsText=*/false );
}
pFS->endElementNS( mnXmlNamespace, XML_spPr );
@@ -1313,7 +1313,7 @@ void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape
WriteOutline( xShapeProps );
WriteShapeEffects( xShapeProps );
- WriteShape3DEffects( xShapeProps );
+ Write3DEffects( xShapeProps, /*bIsText=*/false );
pFS->endElementNS( mnXmlNamespace, XML_spPr );
@@ -1591,7 +1591,7 @@ ShapeExport& ShapeExport::WriteShape( const Reference< XShape >& xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, sal_Int32 nXmlNamespace )
+ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, sal_Int32 nXmlNamespace, bool bWritePropertiesAsLstStyles )
{
// In case this shape has an associated textbox, then export that, and we're done.
if (GetDocumentType() == DOCUMENT_DOCX && GetTextExport())
@@ -1616,7 +1616,7 @@ ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, s
pFS->startElementNS(nXmlNamespace,
(GetDocumentType() != DOCUMENT_DOCX ? XML_txBody : XML_txbx));
- WriteText( xIface, m_presetWarp, /*bBodyPr=*/(GetDocumentType() != DOCUMENT_DOCX) );
+ WriteText( xIface, m_presetWarp, /*bBodyPr=*/(GetDocumentType() != DOCUMENT_DOCX), true, 0, bWritePropertiesAsLstStyles );
pFS->endElementNS( nXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_txBody : XML_txbx) );
if (GetDocumentType() == DOCUMENT_DOCX)
WriteText( xIface, m_presetWarp, /*bBodyPr=*/true, /*bText=*/false, /*nXmlNamespace=*/nXmlNamespace );
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 71b94c727132..6208a7107f23 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -19,9 +19,14 @@
#include <oox/ppt/pptshape.hxx>
#include <oox/core/xmlfilterbase.hxx>
+#include <drawingml/customshapeproperties.hxx>
#include <drawingml/textbody.hxx>
+#include <drawingml/textparagraph.hxx>
+#include <drawingml/textfield.hxx>
#include <drawingml/table/tableproperties.hxx>
+#include <editeng/flditem.hxx>
+#include <com/sun/star/text/XTextField.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/container/XNamed.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
@@ -50,6 +55,7 @@ PPTShape::PPTShape( const oox::ppt::ShapeLocation eShapeLocation, const sal_Char
: Shape( pServiceName )
, meShapeLocation( eShapeLocation )
, mbReferenced( false )
+, mbHasNoninheritedShapeProperties( false )
{
}
@@ -85,6 +91,19 @@ static const char* lclDebugSubType( sal_Int32 nType )
return "unknown - please extend lclDebugSubType";
}
+namespace
+{
+bool ShapeHasNoVisualPropertiesOnImport(const oox::ppt::PPTShape& rPPTShape)
+{
+ return !rPPTShape.hasNonInheritedShapeProperties()
+ && !rPPTShape.hasShapeStyleRefs()
+ && !rPPTShape.getTextBody()->hasVisualRunProperties()
+ && !rPPTShape.getTextBody()->hasNoninheritedBodyProperties()
+ && !rPPTShape.getTextBody()->hasListStyleOnImport()
+ && !rPPTShape.getTextBody()->hasParagraphProperties();
+}
+}
+
oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlidePersist& rSlidePersist, sal_Int32 nSubType )
{
oox::drawingml::TextListStylePtr pTextListStyle;
@@ -110,6 +129,27 @@ oox::drawingml::TextListStylePtr PPTShape::getSubTypeTextListStyle( const SlideP
return pTextListStyle;
}
+bool PPTShape::IsPlaceHolderCandidate(const SlidePersist& rSlidePersist) const
+{
+ if (meShapeLocation != Slide)
+ return false;
+ if (rSlidePersist.isNotesPage())
+ return false;
+ auto pTextBody = getTextBody();
+ if (!pTextBody)
+ return false;
+ auto rParagraphs = pTextBody->getParagraphs();
+ if (rParagraphs.size() != 1)
+ return false;
+ if (rParagraphs.front()->getRuns().size() != 1)
+ return false;
+ // If the placeholder has a shape other than rectangle,
+ // we have to place it in the slide as a CustomShape.
+ if (!mpCustomShapePropertiesPtr->representsDefaultShape())
+ return false;
+ return ShapeHasNoVisualPropertiesOnImport(*this);
+}
+
void PPTShape::addShape(
oox::core::XmlFilterBase& rFilterBase,
const SlidePersist& rSlidePersist,
@@ -178,6 +218,34 @@ void PPTShape::addShape(
}
break;
case XML_dt :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ TextRunPtr& pTextRun = getTextBody()->getParagraphs().front()->getRuns().front();
+ oox::drawingml::TextField* pTextField = dynamic_cast<oox::drawingml::TextField*>(pTextRun.get());
+ if (pTextField)
+ {
+ OUString aType = pTextField->getType();
+ if ( aType.startsWith("datetime") )
+ {
+ SvxDateFormat eDateFormat = drawingml::TextField::getLODateFormat(aType);
+ SvxTimeFormat eTimeFormat = drawingml::TextField::getLOTimeFormat(aType);
+ Reference< XPropertySet > xPropertySet( rSlidePersist.getPage(), UNO_QUERY );
+
+ if( eDateFormat != SvxDateFormat::AppDefault
+ || eTimeFormat != SvxTimeFormat::AppDefault )
+ {
+ // DateTimeFormat property looks for the date in 4 LSBs
+ // and looks for time format in the 4 bits after that
+ sal_Int32 nDateTimeFormat = static_cast<sal_Int32>(eDateFormat) |
+ static_cast<sal_Int32>(eTimeFormat) << 4;
+ xPropertySet->setPropertyValue( "IsDateTimeVisible", Any(true) );
+ xPropertySet->setPropertyValue( "IsDateTimeFixed", Any(false) );
+ xPropertySet->setPropertyValue( "DateTimeFormat", Any(nDateTimeFormat) );
+ return;
+ }
+ }
+ }
+ }
sServiceName = "com.sun.star.presentation.DateTimeShape";
bClearText = true;
break;
@@ -186,10 +254,40 @@ void PPTShape::addShape(
bClearText = true;
break;
case XML_ftr :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ const OUString& rFooterText = getTextBody()->toString();
+
+ if( !rFooterText.isEmpty() )
+ {
+ // if it is possible to get the footer as a property the LO way,
+ // get it and discard the shape
+ Reference< XPropertySet > xPropertySet( rSlidePersist.getPage(), UNO_QUERY );
+ xPropertySet->setPropertyValue( "IsFooterVisible", Any( true ) );
+ xPropertySet->setPropertyValue( "FooterText", Any(rFooterText) );
+ return;
+ }
+ }
sServiceName = "com.sun.star.presentation.FooterShape";
bClearText = true;
break;
case XML_sldNum :
+ if (IsPlaceHolderCandidate(rSlidePersist))
+ {
+ TextRunPtr& pTextRun
+ = getTextBody()->getParagraphs().front()->getRuns().front();
+ oox::drawingml::TextField* pTextField
+ = dynamic_cast<oox::drawingml::TextField*>(pTextRun.get());
+ if (pTextField && pTextField->getType() == "slidenum")
+ {
+ // if it is possible to get the slidenum placeholder as a property
+ // do that and discard the shape
+ Reference<XPropertySet> xPropertySet(rSlidePersist.getPage(),
+ UNO_QUERY);
+ xPropertySet->setPropertyValue("IsPageNumberVisible", Any(true));
+ return;
+ }
+ }
sServiceName = "com.sun.star.presentation.SlideNumberShape";
bClearText = true;
break;
@@ -227,6 +325,16 @@ void PPTShape::addShape(
}
}
+ // Since it is not possible to represent custom shaped placeholders in Impress
+ // Need to use service name css.drawing.CustomShape if they have a non default shape.
+ // This workaround has the drawback of them not really being processed as placeholders
+ // so it is only done for slide footers...
+ if ((mnSubType == XML_sldNum || mnSubType == XML_dt || mnSubType == XML_ftr)
+ && meShapeLocation == Slide && !mpCustomShapePropertiesPtr->representsDefaultShape())
+ {
+ sServiceName = "com.sun.star.drawing.CustomShape";
+ }
+
if (sServiceName != "com.sun.star.drawing.TableShape")
{
if (TextBodyPtr pTextBody = getTextBody())
@@ -408,6 +516,26 @@ void PPTShape::addShape(
}
}
+ // we will be losing whatever information there is in the footer placeholder on master/layout slides
+ // since they should have the "<footer>" textfield in them in order to make LibreOffice process them as expected
+ // likewise DateTime placeholder data on master/layout slides will be lost and replaced
+ if( (mnSubType == XML_ftr || mnSubType == XML_dt) && meShapeLocation != Slide )
+ {
+ OUString aFieldType;
+ if( mnSubType == XML_ftr )
+ aFieldType = "com.sun.star.presentation.TextField.Footer";
+ else
+ aFieldType = "com.sun.star.presentation.TextField.DateTime";
+ Reference < XTextField > xField( xServiceFact->createInstance( aFieldType ), UNO_QUERY );
+ Reference < XText > xText(mxShape, UNO_QUERY);
+ if(xText.is())
+ {
+ xText->setString("");
+ Reference < XTextCursor > xTextCursor = xText->createTextCursor();
+ xText->insertTextContent( xTextCursor, xField, false);
+ }
+ }
+
// if this is a group shape, we have to add also each child shape
Reference<XShapes> xShapes(xShape, UNO_QUERY);
if (xShapes.is())
diff --git a/oox/source/ppt/pptshapepropertiescontext.cxx b/oox/source/ppt/pptshapepropertiescontext.cxx
index b2dfcbce8980..a65a02d93e1c 100644
--- a/oox/source/ppt/pptshapepropertiescontext.cxx
+++ b/oox/source/ppt/pptshapepropertiescontext.cxx
@@ -35,6 +35,7 @@
#include <oox/token/namespaces.hxx>
#include <oox/token/properties.hxx>
#include <oox/token/tokens.hxx>
+#include <oox/ppt/pptshape.hxx>
using namespace oox::core;
using namespace ::com::sun::star;
@@ -54,6 +55,10 @@ PPTShapePropertiesContext::PPTShapePropertiesContext( ContextHandler2Helper cons
ContextHandlerRef PPTShapePropertiesContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
{
+ PPTShape* pPPTShape = dynamic_cast<PPTShape*>(&mrShape);
+ if (pPPTShape)
+ pPPTShape->setHasNoninheritedShapeProperties();
+
switch( aElementToken )
{
case A_TOKEN( xfrm ):
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 3dd9747f0a84..038f35ec37c5 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -55,6 +55,7 @@
#include <com/sun/star/text/WritingMode2.hpp>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
+#include <com/sun/star/drawing/ColorMode.hpp>
#include <sal/log.hxx>
#include <svx/svdtrans.hxx>
#include <oox/drawingml/shapepropertymap.hxx>
@@ -923,6 +924,12 @@ Reference< XShape > SimpleShape::createPictureObject(const Reference< XShapes >&
aPropSet.setProperty(PROP_GraphicCrop, aGraphicCrop);
}
+
+ if (maTypeModel.mnGain == -70 && maTypeModel.mnBlacklevel == 70)
+ {
+ // Map MSO 'washout' to our watermark colormode.
+ aPropSet.setProperty(PROP_GraphicColorMode, uno::makeAny(drawing::ColorMode_WATERMARK));
+ }
}
return xShape;
}
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index d27839a79084..0679362401fc 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -386,6 +386,34 @@ ContextHandlerRef ShapeTypeContext::onCreateContext( sal_Int32 nElement, const A
mrTypeModel.moCropLeft = rAttribs.getString(XML_cropleft);
mrTypeModel.moCropRight = rAttribs.getString(XML_cropright);
mrTypeModel.moCropTop = rAttribs.getString(XML_croptop);
+
+ // Gain / contrast.
+ OptValue<OUString> oGain = rAttribs.getString(XML_gain);
+ sal_Int32 nGain = 0x10000;
+ if (oGain.has() && oGain.get().endsWith("f"))
+ {
+ nGain = oGain.get().toInt32();
+ }
+ if (nGain < 0x10000)
+ {
+ nGain *= 101; // 100 + 1 to round
+ nGain /= 0x10000;
+ nGain -= 100;
+ }
+ mrTypeModel.mnGain = nGain;
+
+ // Blacklevel / brightness.
+ OptValue<OUString> oBlacklevel = rAttribs.getString(XML_blacklevel);
+ sal_Int16 nBlacklevel = 0;
+ if (oBlacklevel.has() && oBlacklevel.get().endsWith("f"))
+ {
+ nBlacklevel = oBlacklevel.get().toInt32();
+ }
+ if (nBlacklevel != 0)
+ {
+ nBlacklevel /= 327;
+ }
+ mrTypeModel.mnBlacklevel = nBlacklevel;
}
break;
case NMSP_vmlWord | XML_wrap:
diff --git a/postprocess/CustomTarget_signing.mk b/postprocess/CustomTarget_signing.mk
index 46ed58db78fa..f675684a045a 100644
--- a/postprocess/CustomTarget_signing.mk
+++ b/postprocess/CustomTarget_signing.mk
@@ -48,10 +48,10 @@ ifneq ($(ENABLE_DBGUTIL),TRUE)
$(INSTDIR)/program/soffice.bin \
$(INSTDIR)/program/unopkg.bin \
$(INSTDIR)/program/pyuno.pyd \
- $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-3.7.7/bin/*.exe \
- $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/*.dll \
- $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/*.pyd \
- $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-3.7.7/lib/distutils/command/*.exe \
+ $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/*.exe \
+ $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/*.dll \
+ $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/*.pyd \
+ $(INSTDIR)/$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib/distutils/command/*.exe \
$(INSTDIR)/program/shlxthdl/*.dll \
$(INSTDIR)/sdk/cli/*.dll \
$(INSTDIR)/sdk/bin/*.exe \
diff --git a/pyuno/CustomTarget_python_shell.mk b/pyuno/CustomTarget_python_shell.mk
index b3cf6d734f4a..203258bf94e3 100644
--- a/pyuno/CustomTarget_python_shell.mk
+++ b/pyuno/CustomTarget_python_shell.mk
@@ -17,7 +17,7 @@ $(eval $(call gb_CustomTarget_register_targets,pyuno/python_shell,\
ifeq ($(OS),MACOSX)
pyuno_PYTHON_SHELL_VERSION:=$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
else
-pyuno_PYTHON_SHELL_VERSION:=3.7.7
+pyuno_PYTHON_SHELL_VERSION:=$(PYTHON_VERSION)
endif
$(call gb_CustomTarget_get_workdir,pyuno/python_shell)/python.sh : \
diff --git a/pyuno/CustomTarget_pyuno_pythonloader_ini.mk b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
index 3cafb980954b..3dfd4549c1ac 100644
--- a/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
+++ b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
@@ -22,15 +22,15 @@ $(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)/$(call gb_Helper_get_
printf 'PYUNO_LOADER_PYTHONHOME=%s\n' \
$(if $(filter MACOSX,$(OS)), \
'$$ORIGIN/../Frameworks/LibreOfficePython.framework', \
- '$$ORIGIN/python-core-3.7.7') &&) \
+ '$$ORIGIN/python-core-$(PYTHON_VERSION)') &&) \
printf 'PYUNO_LOADER_PYTHONPATH=%s$$ORIGIN\n' \
$(if $(SYSTEM_PYTHON), \
'', \
$(if $(filter MACOSX,$(OS)), \
'$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/../Frameworks/LibreOfficePython.framework/Versions/Current/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(dir))) ', \
$(if $(filter WNT,$(OS)), \
- '$(foreach dir,/ /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-3.7.7/lib$(dir))) ', \
- '$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-3.7.7/lib$(dir))) '))) \
+ '$(foreach dir,/ /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) ', \
+ '$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) '))) \
) > $@
# vim: set noet sw=4 ts=4:
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/sc/inc/document.hxx b/sc/inc/document.hxx
index 8c3c2ec79431..91e2c5b7c0b3 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -561,6 +561,8 @@ private:
bool mbEmbedFontScriptAsian : 1;
bool mbEmbedFontScriptComplex : 1;
+ sal_Int32 mnImagenPreferredDPI;
+
std::unique_ptr<sc::IconSetBitmapMap> m_pIconSetBitmapMap;
bool mbTrackFormulasPending : 1;
@@ -586,6 +588,9 @@ public:
void SetEmbedFontScriptAsian(bool bUse) { mbEmbedFontScriptAsian = bUse; }
void SetEmbedFontScriptComplex(bool bUse) { mbEmbedFontScriptComplex = bUse; }
+ void SetImagePreferredDPI(sal_Int32 nValue) { mnImagenPreferredDPI = nValue; }
+ sal_Int32 GetImagePreferredDPI() { return mnImagenPreferredDPI; }
+
SC_DLLPUBLIC sal_uLong GetCellCount() const; // all cells
SC_DLLPUBLIC sal_uLong GetFormulaGroupCount() const; // all cells
sal_uLong GetCodeCount() const; // RPN-Code in formulas
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/dragdata.hxx b/sc/inc/dragdata.hxx
index 77f23c89db86..edd38c17e423 100644
--- a/sc/inc/dragdata.hxx
+++ b/sc/inc/dragdata.hxx
@@ -27,6 +27,13 @@ struct ScDragData
OUString aLinkArea;
OUString aJumpTarget;
OUString aJumpText;
+
+ ScDragData() :
+ pCellTransfer(nullptr),
+ pDrawTransfer(nullptr),
+ pJumpLocalDoc(nullptr)
+ {
+ }
};
#endif
diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx
index 850fb4738ae0..efff6220f853 100644
--- a/sc/inc/fillinfo.hxx
+++ b/sc/inc/fillinfo.hxx
@@ -93,6 +93,7 @@ struct ScIconSetInfo
{
sal_Int32 nIconIndex;
ScIconSetType eIconSetType;
+ long mnHeight = 0;
bool mbShowValue;
};
diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx
index 47650bc82509..b04a97b7c3c2 100644
--- a/sc/inc/table.hxx
+++ b/sc/inc/table.hxx
@@ -463,6 +463,8 @@ public:
void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
std::unique_ptr<ScPostIt> ReleaseNote( SCCOL nCol, SCROW nRow );
+ ScPostIt* GetNote( SCCOL nCol, SCROW nRow );
+ void SetNote( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPostIt> pNote );
size_t GetNoteCount( SCCOL nCol ) const;
SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const;
diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx
index 6fb5051ec249..5dda3ad674d3 100644
--- a/sc/inc/unonames.hxx
+++ b/sc/inc/unonames.hxx
@@ -571,6 +571,7 @@
#define SC_UNO_UPDTEMPL "UpdateFromTemplate"
#define SC_UNO_FILTERED_RANGE_SELECTION "FilteredRangeSelection"
#define SC_UNO_VISAREASCREEN "VisibleAreaOnScreen"
+#define SC_UNO_IMAGE_PREFERRED_DPI "ImagePreferredDPI"
/*Stampit enable/disable print cancel */
#define SC_UNO_ALLOWPRINTJOBCANCEL "AllowPrintJobCancel"
diff --git a/sc/qa/unit/data/xlsx/autofilternamedrange.xlsx b/sc/qa/unit/data/xlsx/autofilternamedrange.xlsx
new file mode 100644
index 000000000000..51490d9229ea
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/autofilternamedrange.xlsx
Binary files differ
diff --git a/sc/qa/unit/data/xlsx/escape-unicode.xlsx b/sc/qa/unit/data/xlsx/escape-unicode.xlsx
new file mode 100644
index 000000000000..ec43688b74b8
--- /dev/null
+++ b/sc/qa/unit/data/xlsx/escape-unicode.xlsx
Binary files differ
diff --git a/sc/qa/unit/subsequent_filters-test.cxx b/sc/qa/unit/subsequent_filters-test.cxx
index 0d2f55dcd184..74b844e22382 100644
--- a/sc/qa/unit/subsequent_filters-test.cxx
+++ b/sc/qa/unit/subsequent_filters-test.cxx
@@ -254,6 +254,8 @@ public:
void testAutoheight2Rows();
void testXLSDefColWidth();
void testPreviewMissingObjLink();
+ void testEscapedUnicodeXLSX();
+ void testAutofilterNamedRangesXLSX();
CPPUNIT_TEST_SUITE(ScFiltersTest);
CPPUNIT_TEST(testBooleanFormatXLSX);
@@ -397,6 +399,8 @@ public:
CPPUNIT_TEST(testAutoheight2Rows);
CPPUNIT_TEST(testXLSDefColWidth);
CPPUNIT_TEST(testPreviewMissingObjLink);
+ CPPUNIT_TEST(testEscapedUnicodeXLSX);
+ CPPUNIT_TEST(testAutofilterNamedRangesXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -4370,6 +4374,37 @@ void ScFiltersTest::testPreviewMissingObjLink()
xDocSh->DoClose();
}
+void ScFiltersTest::testEscapedUnicodeXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc("escape-unicode.", FORMAT_XLSX);
+ ScDocument& rDoc = xDocSh->GetDocument();
+
+ // Without the fix, there would be "_x000D_" after every new-line char.
+ CPPUNIT_ASSERT_EQUAL(OUString("Line 1\nLine 2\nLine 3\nLine 4"), rDoc.GetString(1, 1, 0));
+
+ xDocSh->DoClose();
+}
+
+void ScFiltersTest::testAutofilterNamedRangesXLSX()
+{
+ ScDocShellRef xDocSh = loadDoc(u"autofilternamedrange.", FORMAT_XLSX);
+ CPPUNIT_ASSERT_MESSAGE("Failed to load autofilternamedrange.xlsx", xDocSh.is());
+
+ ScDocument& rDoc = xDocSh->GetDocument();
+ const ScDBData* pDBData = rDoc.GetDBCollection()->GetDBNearCursor(0, 0, 0);
+ CPPUNIT_ASSERT(pDBData);
+ ScRange aRange;
+ pDBData->GetArea(aRange);
+ CPPUNIT_ASSERT_EQUAL(ScRange(0, 0, 0, 0, 3, 0), aRange);
+ OUString aPosStr;
+ // test there is no '_xlnm._FilterDatabase' named range on the filter area
+ const ScRangeData* pRData = rDoc.GetRangeAtBlock(aRange, &aPosStr);
+ CPPUNIT_ASSERT(!pRData);
+ CPPUNIT_ASSERT_EQUAL(OUString(), aPosStr);
+
+ xDocSh->DoClose();
+}
+
ScFiltersTest::ScFiltersTest()
: ScBootstrapFixture( "sc/qa/unit/data" )
{
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index fc3d675ba79a..9c5a19be2d42 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -39,6 +39,7 @@
#include <sc.hrc>
#include <comphelper/string.hxx>
#include <docoptio.hxx>
+#include <postit.hxx>
#include <chrono>
#include <cstddef>
@@ -116,12 +117,12 @@ public:
void testSpellOnlineRenderParameter();
void testPasteIntoWrapTextCell();
void testSortAscendingDescending();
- void testAutoInputStringBlock();
void testAutoInputExactMatch();
void testMoveShapeHandle();
void testEditCursorBounds();
void testTextSelectionBounds();
-
+ void testSheetViewDataCrash();
+ void testCommentCellCopyPaste();
CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
CPPUNIT_TEST(testRowColumnHeaders);
@@ -170,11 +171,12 @@ public:
CPPUNIT_TEST(testSpellOnlineRenderParameter);
CPPUNIT_TEST(testPasteIntoWrapTextCell);
CPPUNIT_TEST(testSortAscendingDescending);
- CPPUNIT_TEST(testAutoInputStringBlock);
CPPUNIT_TEST(testAutoInputExactMatch);
CPPUNIT_TEST(testMoveShapeHandle);
CPPUNIT_TEST(testEditCursorBounds);
CPPUNIT_TEST(testTextSelectionBounds);
+ CPPUNIT_TEST(testSheetViewDataCrash);
+ CPPUNIT_TEST(testCommentCellCopyPaste);
CPPUNIT_TEST_SUITE_END();
private:
@@ -2639,41 +2641,6 @@ static void lcl_typeCharsInCell(const std::string& aStr, SCCOL nCol, SCROW nRow,
Scheduler::ProcessEventsToIdle();
}
-void ScTiledRenderingTest::testAutoInputStringBlock()
-{
- comphelper::LibreOfficeKit::setActive();
-
- ScModelObj* pModelObj = createDoc("empty.ods");
- CPPUNIT_ASSERT(pModelObj);
- ScTabViewShell* pView = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
- CPPUNIT_ASSERT(pView);
- ScDocument* pDoc = pModelObj->GetDocument();
-
- pDoc->SetString(ScAddress(0, 3, 0), "ABC"); // A4
- pDoc->SetString(ScAddress(0, 4, 0), "BAC"); // A5
- ScFieldEditEngine& rEE = pDoc->GetEditEngine();
- rEE.SetText("XYZ");
- pDoc->SetEditText(ScAddress(0, 5, 0), rEE.CreateTextObject()); // A6
- pDoc->SetValue(ScAddress(0, 6, 0), 123);
- pDoc->SetString(ScAddress(0, 7, 0), "ZZZ"); // A8
-
- ScAddress aA1(0, 0, 0);
- lcl_typeCharsInCell("X", aA1.Col(), aA1.Row(), pView, pModelObj); // Type 'X' in A1
- CPPUNIT_ASSERT_EQUAL_MESSAGE("A1 should not autocomplete", OUString("X"), pDoc->GetString(aA1));
-
- ScAddress aA3(0, 2, 0); // Adjacent to the string "superblock" A4:A8
- lcl_typeCharsInCell("X", aA3.Col(), aA3.Row(), pView, pModelObj); // Type 'X' in A3
- CPPUNIT_ASSERT_EQUAL_MESSAGE("A3 should autocomplete", OUString("XYZ"), pDoc->GetString(aA3));
-
- ScAddress aA9(0, 8, 0); // Adjacent to the string "superblock" A4:A8
- lcl_typeCharsInCell("X", aA9.Col(), aA9.Row(), pView, pModelObj); // Type 'X' in A9
- CPPUNIT_ASSERT_EQUAL_MESSAGE("A9 should autocomplete", OUString("XYZ"), pDoc->GetString(aA9));
-
- ScAddress aA11(0, 10, 0);
- lcl_typeCharsInCell("X", aA11.Col(), aA11.Row(), pView, pModelObj); // Type 'X' in A11
- CPPUNIT_ASSERT_EQUAL_MESSAGE("A11 should not autocomplete", OUString("X"), pDoc->GetString(aA11));
-}
-
void ScTiledRenderingTest::testAutoInputExactMatch()
{
comphelper::LibreOfficeKit::setActive();
@@ -2818,6 +2785,146 @@ void ScTiledRenderingTest::testTextSelectionBounds()
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, nullptr);
}
+void ScTiledRenderingTest::testSheetViewDataCrash()
+{
+ comphelper::LibreOfficeKit::setActive();
+
+ ScModelObj* pModelObj = createDoc("empty.ods");
+
+ // view #1
+ int nView1 = SfxLokHelper::getView();
+ SfxLokHelper::setView(nView1);
+
+ // Imitate online while creating a new sheet on empty.ods.
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({
+ { "Name", uno::Any(OUString("NewSheet")) },
+ { "Index", uno::Any(sal_Int32(2)) }
+ }));
+ comphelper::dispatchCommand(".uno:Insert", aArgs);
+ Scheduler::ProcessEventsToIdle();
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::PAGEDOWN | KEY_MOD1);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::PAGEDOWN | KEY_MOD1);
+ Scheduler::ProcessEventsToIdle();
+ ScTabViewShell* pView1 = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
+ CPPUNIT_ASSERT(pView1);
+
+ // view #2
+ SfxLokHelper::createView();
+ ScTabViewShell* pView2 = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
+ CPPUNIT_ASSERT(pView2);
+ Scheduler::ProcessEventsToIdle();
+
+ SfxLokHelper::setView(nView1);
+ // Delete a range.
+ pView1->SetCursor(1, 1);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::DELETE);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::DELETE);
+ // It will crash at this point without the fix.
+ Scheduler::ProcessEventsToIdle();
+}
+
+void ScTiledRenderingTest::testCommentCellCopyPaste()
+{
+ // Load a document
+ comphelper::LibreOfficeKit::setActive();
+ // Comments callback are emitted only if tiled annotations are off
+ comphelper::LibreOfficeKit::setTiledAnnotations(false);
+
+ // FIXME: Hack because previous tests do not destroy ScDocument(with annotations) on exit (?).
+ ScPostIt::mnLastPostItId = 1;
+
+ {
+ ScModelObj* pModelObj = createDoc("empty.ods");
+ ViewCallback aView;
+ int nView = SfxLokHelper::getView();
+
+ SfxLokHelper::setView(nView);
+
+ ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(SfxViewShell::Current());
+ CPPUNIT_ASSERT(pTabViewShell);
+
+ lcl_typeCharsInCell("ABC", 0, 0, pTabViewShell, pModelObj); // Type "ABC" in A1
+
+ pTabViewShell->SetCursor(1, 1);
+
+ // Add a new comment
+ uno::Sequence<beans::PropertyValue> aArgs(comphelper::InitPropertySequence(
+ {
+ {"Text", uno::makeAny(OUString("LOK Comment Cell B2"))},
+ {"Author", uno::makeAny(OUString("LOK Client"))},
+ }));
+ comphelper::dispatchCommand(".uno:InsertAnnotation", aArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
+ CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
+ CPPUNIT_ASSERT_EQUAL(std::string("1"), aView.m_aCommentCallbackResult.get<std::string>("id"));
+ CPPUNIT_ASSERT_EQUAL(std::string("0"), aView.m_aCommentCallbackResult.get<std::string>("tab"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Client"), aView.m_aCommentCallbackResult.get<std::string>("author"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Comment Cell B2"), aView.m_aCommentCallbackResult.get<std::string>("text"));
+
+ uno::Sequence<beans::PropertyValue> aCopyPasteArgs;
+
+ // We need separate tests for single cell copy-paste and cell-range copy-paste
+ // since they hit different code paths in ScColumn methods.
+
+ // Single cell(with comment) copy paste test
+ {
+ comphelper::dispatchCommand(".uno:Copy", aCopyPasteArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ pTabViewShell->SetCursor(1, 49);
+ Scheduler::ProcessEventsToIdle();
+ comphelper::dispatchCommand(".uno:Paste", aCopyPasteArgs); // Paste to cell B50
+ Scheduler::ProcessEventsToIdle();
+
+ // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
+ CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
+ // Without the fix the id will be "1".
+ CPPUNIT_ASSERT_EQUAL(std::string("2"), aView.m_aCommentCallbackResult.get<std::string>("id"));
+ CPPUNIT_ASSERT_EQUAL(std::string("0"), aView.m_aCommentCallbackResult.get<std::string>("tab"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Client"), aView.m_aCommentCallbackResult.get<std::string>("author"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Comment Cell B2"), aView.m_aCommentCallbackResult.get<std::string>("text"));
+ }
+
+ // Cell range (with a comment) copy paste test
+ {
+ // Select range A1:C3
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_HOME | KEY_MOD1);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_HOME | KEY_MOD1);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DOWN | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RIGHT | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RIGHT | KEY_SHIFT);
+ pModelObj->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RIGHT | KEY_SHIFT);
+ Scheduler::ProcessEventsToIdle();
+
+ comphelper::dispatchCommand(".uno:Copy", aCopyPasteArgs);
+ Scheduler::ProcessEventsToIdle();
+
+ pTabViewShell->SetCursor(3, 49);
+ Scheduler::ProcessEventsToIdle();
+ comphelper::dispatchCommand(".uno:Paste", aCopyPasteArgs); // Paste to cell D50
+ Scheduler::ProcessEventsToIdle();
+
+ // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action
+ CPPUNIT_ASSERT_EQUAL(std::string("Add"), aView.m_aCommentCallbackResult.get<std::string>("action"));
+ // Without the fix the id will be "1".
+ CPPUNIT_ASSERT_EQUAL(std::string("3"), aView.m_aCommentCallbackResult.get<std::string>("id"));
+ CPPUNIT_ASSERT_EQUAL(std::string("0"), aView.m_aCommentCallbackResult.get<std::string>("tab"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Client"), aView.m_aCommentCallbackResult.get<std::string>("author"));
+ CPPUNIT_ASSERT_EQUAL(std::string("LOK Comment Cell B2"), aView.m_aCommentCallbackResult.get<std::string>("text"));
+ }
+ }
+ comphelper::LibreOfficeKit::setTiledAnnotations(true);
+}
+
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTiledRenderingTest);
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 3c21c990cf44..ae28aadeae31 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -534,22 +534,14 @@ void Test::testDataEntries()
m_pDoc->SetString(ScAddress(0,5,0), "Andy");
m_pDoc->SetString(ScAddress(0,6,0), "Bruce");
m_pDoc->SetString(ScAddress(0,7,0), "Charlie");
- m_pDoc->SetValue(ScAddress(0,8,0), 100);
- m_pDoc->SetValue(ScAddress(0,9,0), 200);
m_pDoc->SetString(ScAddress(0,10,0), "Andy");
- m_pDoc->SetValue(ScAddress(0,11,0), 1000);
std::vector<ScTypedStrData> aEntries;
- m_pDoc->GetDataEntries(0, 0, 0, aEntries); // Try at the top.
- std::vector<ScTypedStrData>::const_iterator it = aEntries.begin();
- CPPUNIT_ASSERT_MESSAGE("The entries should be empty.", bool(it == aEntries.end()));
-
- aEntries.clear();
- m_pDoc->GetDataEntries(0, 4, 0, aEntries); // Try at A5.
+ m_pDoc->GetDataEntries(0, 0, 0, aEntries); // Try at the very top.
// Entries are supposed to be sorted in ascending order, and are all unique.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size());
- it = aEntries.begin();
+ std::vector<ScTypedStrData>::const_iterator it = aEntries.begin();
CPPUNIT_ASSERT_EQUAL(OUString("Andy"), it->GetString());
++it;
CPPUNIT_ASSERT_EQUAL(OUString("Bruce"), it->GetString());
@@ -559,7 +551,7 @@ void Test::testDataEntries()
CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == aEntries.end()));
aEntries.clear();
- m_pDoc->GetDataEntries(0, 12, 0, aEntries); // Try at A13.
+ m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the very bottom.
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), aEntries.size());
// Make sure we get the same set of suggestions.
@@ -572,11 +564,6 @@ void Test::testDataEntries()
++it;
CPPUNIT_ASSERT_MESSAGE("The entries should have ended here.", bool(it == aEntries.end()));
- aEntries.clear();
- m_pDoc->GetDataEntries(0, MAXROW, 0, aEntries); // Try at the bottom.
- it = aEntries.begin();
- CPPUNIT_ASSERT_MESSAGE("The entries should be empty.", bool(it == aEntries.end()));
-
m_pDoc->DeleteTab(0);
}
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 64c0d990c147..754c9e656734 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -16,6 +16,8 @@
#include <tokenarray.hxx>
#include <refupdatecontext.hxx>
#include <refdata.hxx>
+#include <editeng/fhgtitem.hxx>
+#include <scitems.hxx>
#include <formula/token.hxx>
#include <vcl/bitmapex.hxx>
@@ -1056,6 +1058,10 @@ std::unique_ptr<ScIconSetInfo> ScIconSetFormat::GetIconSetInfo(const ScAddress&
std::unique_ptr<ScIconSetInfo> pInfo(new ScIconSetInfo);
+ const SfxPoolItem& rPoolItem = mpDoc->GetPattern(rAddr)->GetItem(ATTR_FONT_HEIGHT);
+ long aFontHeight = static_cast<const SvxFontHeightItem&>(rPoolItem).GetHeight();
+ pInfo->mnHeight = aFontHeight;
+
if(mpFormatData->mbReverse)
{
sal_Int32 nMaxIndex = mpFormatData->m_Entries.size() - 1;
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 2918e31cd2c4..a8c704a5bef4 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -1853,9 +1853,10 @@ public:
SCROW nDestRow = nRow + mnDestOffset;
ScAddress aSrcPos(mnSrcCol, nRow, mnSrcTab);
ScAddress aDestPos(mnDestCol, nDestRow, mnDestTab);
- miPos = mrDestNotes.set(miPos, nDestRow, p->Clone(aSrcPos, *mrDestCol.GetDoc(), aDestPos, mbCloneCaption).release());
+ ScPostIt* pNew = p->Clone(aSrcPos, *mrDestCol.GetDoc(), aDestPos, mbCloneCaption).release();
+ miPos = mrDestNotes.set(miPos, nDestRow, pNew);
// Notify our LOK clients also
- ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Add, mrDestCol.GetDoc(), aDestPos, p);
+ ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Add, mrDestCol.GetDoc(), aDestPos, pNew);
}
};
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index b9232f334644..306781a26baf 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2548,11 +2548,6 @@ public:
return (maPos.first->type == sc::element_type_string || maPos.first->type == sc::element_type_edittext);
}
- bool isEmpty() const
- {
- return maPos.first->type == sc::element_type_empty;
- }
-
bool prev()
{
if (!has())
@@ -2560,7 +2555,7 @@ public:
// Not in a string block. Move back until we hit a string block.
while (!has())
{
- if (isEmpty() || maPos.first == miBeg)
+ if (maPos.first == miBeg)
return false;
--maPos.first; // move to the preceding block.
@@ -2586,10 +2581,6 @@ public:
// Move to the last cell of the previous block.
--maPos.first;
maPos.second = maPos.first->size - 1;
-
- if (isEmpty())
- return false;
-
if (has())
break;
}
@@ -2604,9 +2595,6 @@ public:
// Not in a string block. Move forward until we hit a string block.
while (!has())
{
- if (isEmpty())
- return false;
-
++maPos.first;
if (maPos.first == miEnd)
return false;
@@ -2628,10 +2616,6 @@ public:
return false;
maPos.second = 0;
-
- if (isEmpty())
- return false;
-
if (has())
break;
}
@@ -2667,12 +2651,16 @@ bool ScColumn::GetDataEntries(
// going upward and downward directions in parallel. The start position
// cell must be skipped.
- StrCellIterator aItrUp(maCells, nStartRow-1, GetDoc());
+ StrCellIterator aItrUp(maCells, nStartRow, GetDoc());
StrCellIterator aItrDown(maCells, nStartRow+1, GetDoc());
bool bMoveUp = aItrUp.valid();
- if (bMoveUp && !aItrUp.has())
- bMoveUp = aItrUp.prev(); // Find the previous string cell position.
+ if (!bMoveUp)
+ // Current cell is invalid.
+ return false;
+
+ // Skip the start position cell.
+ bMoveUp = aItrUp.prev(); // Find the previous string cell position.
bool bMoveDown = aItrDown.valid();
if (bMoveDown && !aItrDown.has())
diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx
index 7acd4b0a9183..57edd94a6a52 100644
--- a/sc/source/core/data/column4.cxx
+++ b/sc/source/core/data/column4.cxx
@@ -29,6 +29,7 @@
#include <drwlayer.hxx>
#include <compiler.hxx>
#include <recursionhelper.hxx>
+#include <docsh.hxx>
#include <svl/sharedstringpool.hxx>
#include <sal/log.hxx>
@@ -304,6 +305,14 @@ void ScColumn::CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1,
pBlockPos->miCellNotePos =
maCellNotes.set(
pBlockPos->miCellNotePos, nRow1, aNotes.begin(), aNotes.end());
+
+ // Notify our LOK clients.
+ aDestPos.SetRow(nRow1);
+ for (size_t i = 0; i < nDestSize; ++i)
+ {
+ ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Add, pDocument, aDestPos, aNotes[i]);
+ aDestPos.IncRow();
+ }
}
}
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index eeeeb9f1cc69..407c5484a4c2 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1080,8 +1080,8 @@ void ScQueryCellIterator::InitPos()
nRow = mpParam->nRow1;
if (mpParam->bHasHeader && mpParam->bByRow)
++nRow;
- ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
- maCurPos = pCol->maCells.position(nRow);
+ const ScColumn& rCol = pDoc->maTabs[nTab]->CreateColumnIfNotExists(nCol);
+ maCurPos = rCol.maCells.position(nRow);
}
void ScQueryCellIterator::IncPos()
@@ -1799,6 +1799,10 @@ bool ScQueryCellIterator::BinarySearch()
if (nTab >= pDoc->GetTableCount())
OSL_FAIL("try to access index out of bounds, FIX IT");
nCol = mpParam->nCol1;
+
+ if (nCol >= pDoc->maTabs[nTab]->GetAllocatedColumnsCount())
+ return false;
+
ScColumn* pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
if (pCol->IsEmptyData())
return false;
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7271fdef0d43..4846c301dca7 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -163,6 +163,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
mbEmbedFontScriptLatin(true),
mbEmbedFontScriptAsian(true),
mbEmbedFontScriptComplex(true),
+ mnImagenPreferredDPI(0),
mbTrackFormulasPending(false),
mbFinalTrackFormulas(false),
mbDocShellRecalc(false),
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 470ac4909854..252117184a0f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -6494,9 +6494,8 @@ ScPostIt* ScDocument::GetNote(const ScAddress& rPos)
ScPostIt* ScDocument::GetNote(SCCOL nCol, SCROW nRow, SCTAB nTab)
{
- if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) &&
- nCol < maTabs[nTab]->GetAllocatedColumnsCount())
- return maTabs[nTab]->aCol[nCol].GetCellNote(nRow);
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ return maTabs[nTab]->GetNote(nCol, nRow);
else
return nullptr;
@@ -6509,7 +6508,8 @@ void ScDocument::SetNote(const ScAddress& rPos, std::unique_ptr<ScPostIt> pNote)
void ScDocument::SetNote(SCCOL nCol, SCROW nRow, SCTAB nTab, std::unique_ptr<ScPostIt> pNote)
{
- return maTabs[nTab]->CreateColumnIfNotExists(nCol).SetCellNote(nRow, std::move(pNote));
+ if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()))
+ maTabs[nTab]->SetNote(nCol, nRow, std::move(pNote));
}
bool ScDocument::HasNote(const ScAddress& rPos) const
@@ -6542,6 +6542,9 @@ bool ScDocument::HasColNotes(SCCOL nCol, SCTAB nTab) const
if (!pTab)
return false;
+ if (nCol >= pTab->GetAllocatedColumnsCount())
+ return false;
+
return pTab->aCol[nCol].HasCellNotes();
}
@@ -6585,6 +6588,7 @@ ScPostIt* ScDocument::GetOrCreateNote(const ScAddress& rPos)
else
return CreateNote(rPos);
}
+
ScPostIt* ScDocument::CreateNote(const ScAddress& rPos)
{
ScPostIt* pPostIt = new ScPostIt(*this, rPos);
diff --git a/sc/source/core/data/documentimport.cxx b/sc/source/core/data/documentimport.cxx
index e5c0cfbef37e..739a62d553ca 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());
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 050fd823b4ee..ec9cebf3e66d 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -780,7 +780,8 @@ void ScGlobal::OpenURL(const OUString& rURL, const OUString& rTarget, bool bIgno
// OpenURL is always called in the GridWindow by mouse clicks in some way or another.
// That's why pScActiveViewShell and nScClickMouseModifier are correct.
- if (!bIgnoreSettings && !ShouldOpenURL())
+ // Fragments pointing into the current document should be always opened.
+ if (!bIgnoreSettings && !(ShouldOpenURL() || rURL.startsWith("#")))
return;
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index b92082ef7115..fc7bea8fd718 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -28,6 +28,7 @@
#include <editeng/outlobj.hxx>
#include <editeng/editobj.hxx>
#include <basegfx/polygon/b2dpolygon.hxx>
+#include <comphelper/lok.hxx>
#include <scitems.hxx>
#include <svx/xfillit0.hxx>
@@ -876,7 +877,8 @@ ScPostIt::~ScPostIt()
std::unique_ptr<ScPostIt> ScPostIt::Clone( const ScAddress& rOwnPos, ScDocument& rDestDoc, const ScAddress& rDestPos, bool bCloneCaption ) const
{
CreateCaptionFromInitData( rOwnPos );
- return bCloneCaption ? std::make_unique<ScPostIt>( rDestDoc, rDestPos, *this, mnPostItId ) : std::make_unique<ScPostIt>( rDestDoc, rDestPos, maNoteData, false, mnPostItId );
+ sal_uInt32 nPostItId = comphelper::LibreOfficeKit::isActive() ? 0 : mnPostItId;
+ return bCloneCaption ? std::make_unique<ScPostIt>( rDestDoc, rDestPos, *this, nPostItId ) : std::make_unique<ScPostIt>( rDestDoc, rDestPos, maNoteData, false, mnPostItId );
}
void ScPostIt::SetDate( const OUString& rDate )
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 20efb9d1dd93..35e13aca3f33 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1651,6 +1651,21 @@ std::unique_ptr<ScPostIt> ScTable::ReleaseNote( SCCOL nCol, SCROW nRow )
return aCol[nCol].ReleaseNote(nRow);
}
+ScPostIt* ScTable::GetNote( SCCOL nCol, SCROW nRow )
+{
+ if (!ValidCol(nCol) || nCol >= GetAllocatedColumnsCount())
+ return nullptr;
+ return aCol[nCol].GetCellNote(nRow);
+}
+
+void ScTable::SetNote( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPostIt> pNote )
+{
+ if (!ValidColRow(nCol, nRow))
+ return;
+
+ CreateColumnIfNotExists(nCol).SetCellNote(nRow, std::move(pNote));
+}
+
size_t ScTable::GetNoteCount( SCCOL nCol ) const
{
if (!ValidCol(nCol) || nCol >= GetAllocatedColumnsCount())
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 3b902524d901..c7d4527dbf57 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -235,6 +235,7 @@ private:
inline bool MustHaveParamCount( short nAct, short nMust );
inline bool MustHaveParamCount( short nAct, short nMust, short nMax );
inline bool MustHaveParamCountMin( short nAct, short nMin );
+ inline bool MustHaveParamCountMinWithStackCheck( short nAct, short nMin );
void PushParameterExpected();
void PushIllegalParameter();
void PushIllegalArgument();
@@ -1086,6 +1087,17 @@ inline bool ScInterpreter::MustHaveParamCountMin( short nAct, short nMin )
return false;
}
+inline bool ScInterpreter::MustHaveParamCountMinWithStackCheck( short nAct, short nMin )
+{
+ assert(sp >= nAct);
+ if (sp < nAct)
+ {
+ PushParameterExpected();
+ return false;
+ }
+ return MustHaveParamCountMin( nAct, nMin);
+}
+
inline bool ScInterpreter::CheckStringPositionArgument( double & fVal )
{
if (!rtl::math::isFinite( fVal))
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 144ca95d4113..50e1276dbc21 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2621,7 +2621,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/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e375f1626ec5..9e5754878848 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7524,131 +7524,144 @@ void ScInterpreter::ScVLookup()
void ScInterpreter::ScSubTotal()
{
sal_uInt8 nParamCount = GetByte();
- if ( MustHaveParamCountMin( nParamCount, 2 ) )
+ if ( !MustHaveParamCountMinWithStackCheck( nParamCount, 2 ) )
+ return;
+
+ // We must fish the 1st parameter deep from the stack! And push it on top.
+ const FormulaToken* p = pStack[ sp - nParamCount ];
+ PushWithoutError( *p );
+ sal_Int32 nFunc = GetInt32();
+ mnSubTotalFlags |= SubtotalFlags::IgnoreNestedStAg | SubtotalFlags::IgnoreFiltered;
+ if (nFunc > 100)
{
- // We must fish the 1st parameter deep from the stack! And push it on top.
- const FormulaToken* p = pStack[ sp - nParamCount ];
- PushWithoutError( *p );
- sal_Int32 nFunc = GetInt32();
- mnSubTotalFlags |= SubtotalFlags::IgnoreNestedStAg | SubtotalFlags::IgnoreFiltered;
- if (nFunc > 100)
- {
- // For opcodes 101 through 111, we need to skip hidden cells.
- // Other than that these opcodes are identical to 1 through 11.
- mnSubTotalFlags |= SubtotalFlags::IgnoreHidden;
- nFunc -= 100;
- }
+ // For opcodes 101 through 111, we need to skip hidden cells.
+ // Other than that these opcodes are identical to 1 through 11.
+ mnSubTotalFlags |= SubtotalFlags::IgnoreHidden;
+ nFunc -= 100;
+ }
- if ( nGlobalError != FormulaError::NONE || nFunc < 1 || nFunc > 11 )
- PushIllegalArgument(); // simulate return on stack, not SetError(...)
- else
+ if ( nGlobalError != FormulaError::NONE || nFunc < 1 || nFunc > 11 )
+ PushIllegalArgument(); // simulate return on stack, not SetError(...)
+ else
+ {
+ cPar = nParamCount - 1;
+ switch( nFunc )
{
- cPar = nParamCount - 1;
- switch( nFunc )
- {
- case SUBTOTAL_FUNC_AVE : ScAverage(); break;
- case SUBTOTAL_FUNC_CNT : ScCount(); break;
- case SUBTOTAL_FUNC_CNT2 : ScCount2(); break;
- case SUBTOTAL_FUNC_MAX : ScMax(); break;
- case SUBTOTAL_FUNC_MIN : ScMin(); break;
- case SUBTOTAL_FUNC_PROD : ScProduct(); break;
- case SUBTOTAL_FUNC_STD : ScStDev(); break;
- case SUBTOTAL_FUNC_STDP : ScStDevP(); break;
- case SUBTOTAL_FUNC_SUM : ScSum(); break;
- case SUBTOTAL_FUNC_VAR : ScVar(); break;
- case SUBTOTAL_FUNC_VARP : ScVarP(); break;
- default : PushIllegalArgument(); break;
- }
+ case SUBTOTAL_FUNC_AVE : ScAverage(); break;
+ case SUBTOTAL_FUNC_CNT : ScCount(); break;
+ case SUBTOTAL_FUNC_CNT2 : ScCount2(); break;
+ case SUBTOTAL_FUNC_MAX : ScMax(); break;
+ case SUBTOTAL_FUNC_MIN : ScMin(); break;
+ case SUBTOTAL_FUNC_PROD : ScProduct(); break;
+ case SUBTOTAL_FUNC_STD : ScStDev(); break;
+ case SUBTOTAL_FUNC_STDP : ScStDevP(); break;
+ case SUBTOTAL_FUNC_SUM : ScSum(); break;
+ case SUBTOTAL_FUNC_VAR : ScVar(); break;
+ case SUBTOTAL_FUNC_VARP : ScVarP(); break;
+ default : PushIllegalArgument(); break;
}
- mnSubTotalFlags = SubtotalFlags::NONE;
- // Get rid of the 1st (fished) parameter.
- FormulaConstTokenRef xRef( PopToken());
- Pop();
- PushTokenRef( xRef);
}
+ mnSubTotalFlags = SubtotalFlags::NONE;
+ // Get rid of the 1st (fished) parameter.
+ FormulaConstTokenRef xRef( PopToken());
+ Pop();
+ PushTokenRef( xRef);
}
void ScInterpreter::ScAggregate()
{
sal_uInt8 nParamCount = GetByte();
- if ( MustHaveParamCountMin( nParamCount, 3 ) )
- {
- // fish the 1st parameter from the stack and push it on top.
- const FormulaToken* p = pStack[ sp - nParamCount ];
- PushWithoutError( *p );
- sal_Int32 nFunc = GetInt32();
- // fish the 2nd parameter from the stack and push it on top.
- const FormulaToken* p2 = pStack[ sp - ( nParamCount - 1 ) ];
- PushWithoutError( *p2 );
- sal_Int32 nOption = GetInt32();
-
- if ( nGlobalError != FormulaError::NONE || nFunc < 1 || nFunc > 19 )
- PushIllegalArgument();
- else
+ if ( !MustHaveParamCountMinWithStackCheck( nParamCount, 3 ) )
+ return;
+
+ const FormulaError nErr = nGlobalError;
+ nGlobalError = FormulaError::NONE;
+
+ // fish the 1st parameter from the stack and push it on top.
+ const FormulaToken* p = pStack[ sp - nParamCount ];
+ PushWithoutError( *p );
+ sal_Int32 nFunc = GetInt32();
+ // fish the 2nd parameter from the stack and push it on top.
+ const FormulaToken* p2 = pStack[ sp - ( nParamCount - 1 ) ];
+ PushWithoutError( *p2 );
+ sal_Int32 nOption = GetInt32();
+
+ if ( nGlobalError != FormulaError::NONE || nFunc < 1 || nFunc > 19 )
+ {
+ nGlobalError = nErr;
+ PushIllegalArgument();
+ }
+ else
+ {
+ switch ( nOption)
{
- switch ( nOption)
- {
- case 0 : // ignore nested SUBTOTAL and AGGREGATE functions
- mnSubTotalFlags = SubtotalFlags::IgnoreNestedStAg;
- break;
- case 1 : // ignore hidden rows, nested SUBTOTAL and AGGREGATE functions
- mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreNestedStAg;
- break;
- case 2 : // ignore error values, nested SUBTOTAL and AGGREGATE functions
- mnSubTotalFlags = SubtotalFlags::IgnoreErrVal | SubtotalFlags::IgnoreNestedStAg;
- break;
- case 3 : // ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE functions
- mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreErrVal | SubtotalFlags::IgnoreNestedStAg;
- break;
- case 4 : // ignore nothing
- mnSubTotalFlags = SubtotalFlags::NONE;
- break;
- case 5 : // ignore hidden rows
- mnSubTotalFlags = SubtotalFlags::IgnoreHidden ;
- break;
- case 6 : // ignore error values
- mnSubTotalFlags = SubtotalFlags::IgnoreErrVal ;
- break;
- case 7 : // ignore hidden rows and error values
- mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreErrVal ;
- break;
- default :
- PushIllegalArgument();
- return;
- }
+ case 0 : // ignore nested SUBTOTAL and AGGREGATE functions
+ mnSubTotalFlags = SubtotalFlags::IgnoreNestedStAg;
+ break;
+ case 1 : // ignore hidden rows, nested SUBTOTAL and AGGREGATE functions
+ mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreNestedStAg;
+ break;
+ case 2 : // ignore error values, nested SUBTOTAL and AGGREGATE functions
+ mnSubTotalFlags = SubtotalFlags::IgnoreErrVal | SubtotalFlags::IgnoreNestedStAg;
+ break;
+ case 3 : // ignore hidden rows, error values, nested SUBTOTAL and AGGREGATE functions
+ mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreErrVal | SubtotalFlags::IgnoreNestedStAg;
+ break;
+ case 4 : // ignore nothing
+ mnSubTotalFlags = SubtotalFlags::NONE;
+ break;
+ case 5 : // ignore hidden rows
+ mnSubTotalFlags = SubtotalFlags::IgnoreHidden ;
+ break;
+ case 6 : // ignore error values
+ mnSubTotalFlags = SubtotalFlags::IgnoreErrVal ;
+ break;
+ case 7 : // ignore hidden rows and error values
+ mnSubTotalFlags = SubtotalFlags::IgnoreHidden | SubtotalFlags::IgnoreErrVal ;
+ break;
+ default :
+ nGlobalError = nErr;
+ PushIllegalArgument();
+ return;
+ }
- cPar = nParamCount - 2;
- switch ( nFunc )
- {
- case AGGREGATE_FUNC_AVE : ScAverage(); break;
- case AGGREGATE_FUNC_CNT : ScCount(); break;
- case AGGREGATE_FUNC_CNT2 : ScCount2(); break;
- case AGGREGATE_FUNC_MAX : ScMax(); break;
- case AGGREGATE_FUNC_MIN : ScMin(); break;
- case AGGREGATE_FUNC_PROD : ScProduct(); break;
- case AGGREGATE_FUNC_STD : ScStDev(); break;
- case AGGREGATE_FUNC_STDP : ScStDevP(); break;
- case AGGREGATE_FUNC_SUM : ScSum(); break;
- case AGGREGATE_FUNC_VAR : ScVar(); break;
- case AGGREGATE_FUNC_VARP : ScVarP(); break;
- case AGGREGATE_FUNC_MEDIAN : ScMedian(); break;
- case AGGREGATE_FUNC_MODSNGL : ScModalValue(); break;
- case AGGREGATE_FUNC_LARGE : ScLarge(); break;
- case AGGREGATE_FUNC_SMALL : ScSmall(); break;
- case AGGREGATE_FUNC_PERCINC : ScPercentile( true ); break;
- case AGGREGATE_FUNC_QRTINC : ScQuartile( true ); break;
- case AGGREGATE_FUNC_PERCEXC : ScPercentile( false ); break;
- case AGGREGATE_FUNC_QRTEXC : ScQuartile( false ); break;
- default : PushIllegalArgument(); break;
- }
- mnSubTotalFlags = SubtotalFlags::NONE;
- }
- FormulaConstTokenRef xRef( PopToken());
- // Get rid of the 1st and 2nd (fished) parameters.
- Pop();
- Pop();
- PushTokenRef( xRef);
+ if ((mnSubTotalFlags & SubtotalFlags::IgnoreErrVal) == SubtotalFlags::NONE)
+ nGlobalError = nErr;
+
+ cPar = nParamCount - 2;
+ switch ( nFunc )
+ {
+ case AGGREGATE_FUNC_AVE : ScAverage(); break;
+ case AGGREGATE_FUNC_CNT : ScCount(); break;
+ case AGGREGATE_FUNC_CNT2 : ScCount2(); break;
+ case AGGREGATE_FUNC_MAX : ScMax(); break;
+ case AGGREGATE_FUNC_MIN : ScMin(); break;
+ case AGGREGATE_FUNC_PROD : ScProduct(); break;
+ case AGGREGATE_FUNC_STD : ScStDev(); break;
+ case AGGREGATE_FUNC_STDP : ScStDevP(); break;
+ case AGGREGATE_FUNC_SUM : ScSum(); break;
+ case AGGREGATE_FUNC_VAR : ScVar(); break;
+ case AGGREGATE_FUNC_VARP : ScVarP(); break;
+ case AGGREGATE_FUNC_MEDIAN : ScMedian(); break;
+ case AGGREGATE_FUNC_MODSNGL : ScModalValue(); break;
+ case AGGREGATE_FUNC_LARGE : ScLarge(); break;
+ case AGGREGATE_FUNC_SMALL : ScSmall(); break;
+ case AGGREGATE_FUNC_PERCINC : ScPercentile( true ); break;
+ case AGGREGATE_FUNC_QRTINC : ScQuartile( true ); break;
+ case AGGREGATE_FUNC_PERCEXC : ScPercentile( false ); break;
+ case AGGREGATE_FUNC_QRTEXC : ScQuartile( false ); break;
+ default:
+ nGlobalError = nErr;
+ PushIllegalArgument();
+ break;
+ }
+ mnSubTotalFlags = SubtotalFlags::NONE;
}
+ FormulaConstTokenRef xRef( PopToken());
+ // Get rid of the 1st and 2nd (fished) parameters.
+ Pop();
+ Pop();
+ PushTokenRef( xRef);
}
std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingField )
@@ -9505,6 +9518,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..a255d22232d2 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -222,6 +222,7 @@ void ScInterpreter::ScFilterXML()
case XPATH_STRING:
PushString(OUString::createFromAscii(reinterpret_cast<char*>(pXPathObj->stringval)));
break;
+#if LIBXML_VERSION < 21000 || defined(LIBXML_XPTR_LOCS_ENABLED)
case XPATH_POINT:
PushNoValue();
break;
@@ -231,13 +232,13 @@ void ScInterpreter::ScFilterXML()
case XPATH_LOCATIONSET:
PushNoValue();
break;
+#endif
case XPATH_USERS:
PushNoValue();
break;
case XPATH_XSLT_TREE:
PushNoValue();
break;
-
}
}
}
diff --git a/sc/source/filter/inc/workbookhelper.hxx b/sc/source/filter/inc/workbookhelper.hxx
index 10733994a232..2040b59c3215 100644
--- a/sc/source/filter/inc/workbookhelper.hxx
+++ b/sc/source/filter/inc/workbookhelper.hxx
@@ -167,7 +167,7 @@ public:
OUString& orName,
const css::uno::Sequence< css::sheet::FormulaToken>& rTokens,
sal_Int32 nIndex,
- sal_Int32 nNameFlags ) const;
+ sal_Int32 nNameFlags, bool bHidden ) const;
/** Creates and returns a defined name on-the-fly in the sheet.
The name will not be buffered in the global defined names buffer.
@@ -176,7 +176,7 @@ public:
OUString& orName,
const css::uno::Sequence< css::sheet::FormulaToken>& rTokens,
sal_Int32 nIndex,
- sal_Int32 nNameFlags, sal_Int32 nTab ) const;
+ sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden ) const;
/** Creates and returns a database range on-the-fly in the Calc document.
The range will not be buffered in the global table buffer.
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/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index 182be74080e1..8de4098e3016 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -225,16 +225,17 @@ void DefinedName::createNameObject( sal_Int32 nIndex )
using namespace ::com::sun::star::sheet::NamedRangeFlag;
if( !isGlobalName() ) switch( mcBuiltinId )
{
- case BIFF_DEFNAME_CRITERIA: nNameFlags = FILTER_CRITERIA; break;
- case BIFF_DEFNAME_PRINTAREA: nNameFlags = PRINT_AREA; break;
- case BIFF_DEFNAME_PRINTTITLES: nNameFlags = COLUMN_HEADER | ROW_HEADER; break;
+ case BIFF_DEFNAME_CRITERIA:
+ case BIFF_DEFNAME_FILTERDATABASE: nNameFlags = FILTER_CRITERIA; break;
+ case BIFF_DEFNAME_PRINTAREA: nNameFlags = PRINT_AREA; break;
+ case BIFF_DEFNAME_PRINTTITLES: nNameFlags = COLUMN_HEADER | ROW_HEADER; break;
}
// create the name and insert it into the document, maCalcName will be changed to the resulting name
if (maModel.mnSheet >= 0)
- mpScRangeData = createLocalNamedRangeObject( maCalcName, ApiTokenSequence(), nIndex, nNameFlags, maModel.mnSheet );
+ mpScRangeData = createLocalNamedRangeObject( maCalcName, ApiTokenSequence(), nIndex, nNameFlags, maModel.mnSheet, maModel.mbHidden );
else
- mpScRangeData = createNamedRangeObject( maCalcName, ApiTokenSequence(), nIndex, nNameFlags );
+ mpScRangeData = createNamedRangeObject( maCalcName, ApiTokenSequence(), nIndex, nNameFlags, maModel.mbHidden );
mnTokenIndex = nIndex;
}
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index 4f2e937ffc3e..ef40b919e908 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -49,6 +49,116 @@ bool lclNeedsRichTextFormat( const oox::xls::Font* pFont )
return pFont && pFont->needsRichTextFormat();
}
+sal_Int32 lcl_getHexLetterValue(sal_Unicode nCode)
+{
+ if (nCode >= '0' && nCode <= '9')
+ return nCode - '0';
+
+ if (nCode >= 'A' && nCode <= 'F')
+ return nCode - 'A' + 10;
+
+ if (nCode >= 'a' && nCode <= 'f')
+ return nCode - 'a' + 10;
+
+ return -1;
+}
+
+bool lcl_validEscape(sal_Unicode nCode)
+{
+ // Valid XML chars that can be escaped (ignoring the restrictions) as in the OOX open spec
+ // 2.1.1742 Part 1 Section 22.9.2.19, ST_Xstring (Escaped String)
+ if (nCode == 0x000D || nCode == 0x000A || nCode == 0x0009 || nCode == 0x005F)
+ return true;
+
+ // Other valid XML chars in basic multilingual plane that cannot be escaped.
+ if ((nCode >= 0x0020 && nCode <= 0xD7FF) || (nCode >= 0xE000 && nCode <= 0xFFFD))
+ return false;
+
+ return true;
+}
+
+OUString lcl_unEscapeUnicodeChars(const OUString& rSrc)
+{
+ // Example: Escaped representation of unicode char 0x000D is _x000D_
+
+ sal_Int32 nLen = rSrc.getLength();
+ if (!nLen)
+ return rSrc;
+
+ sal_Int32 nStart = 0;
+ bool bFound = false;
+ const OUString aPrefix = "_x";
+ sal_Int32 nPrefixStart = rSrc.indexOf(aPrefix, nStart);
+
+ if (nPrefixStart == -1)
+ return rSrc;
+
+ OUStringBuffer aBuf(rSrc);
+ sal_Int32 nOffset = 0; // index offset in aBuf w.r.t rSrc.
+
+ do
+ {
+ sal_Int32 nEnd = -1;
+ sal_Unicode nCode = 0;
+ bool bFoundThis = false;
+ for (sal_Int32 nIdx = 0; nIdx < 5; ++nIdx)
+ {
+ sal_Int32 nThisIdx = nPrefixStart + nIdx + 2;
+ if (nThisIdx >= nLen)
+ break;
+
+ sal_Unicode nThisCode = rSrc[nThisIdx];
+ sal_Int32 nLetter = lcl_getHexLetterValue(nThisCode);
+
+ if (!nIdx && nLetter < 0)
+ break;
+
+ if (nLetter >= 0)
+ {
+ nCode = (nCode << 4) + static_cast<sal_Unicode>(nLetter);
+ }
+ else if (nThisCode == '_')
+ {
+ nEnd = nThisIdx + 1;
+ bFoundThis = true;
+ break;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (bFoundThis)
+ {
+ // nEnd is already set inside the inner loop in this case.
+ if (lcl_validEscape(nCode))
+ {
+ bFound = true;
+ sal_Int32 nEscStrLen = nEnd - nPrefixStart;
+ aBuf.remove(nPrefixStart - nOffset, nEscStrLen);
+ aBuf.insert(nPrefixStart - nOffset, nCode);
+
+ nOffset += nEscStrLen - 1;
+ }
+ }
+ else
+ {
+ // Start the next search just after last "_x"
+ nEnd = nPrefixStart + 2;
+ }
+
+ nStart = nEnd;
+ nPrefixStart = rSrc.indexOf(aPrefix, nStart);
+ }
+ while (nPrefixStart != -1);
+
+ if (bFound)
+ return aBuf.makeStringAndClear();
+
+ return rSrc;
+}
+
} // namespace
RichStringPortion::RichStringPortion( const WorkbookHelper& rHelper ) :
@@ -60,7 +170,7 @@ RichStringPortion::RichStringPortion( const WorkbookHelper& rHelper ) :
void RichStringPortion::setText( const OUString& rText )
{
- maText = rText;
+ maText = lcl_unEscapeUnicodeChars(rText);
}
FontRef const & RichStringPortion::createFont()
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/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index d9f20cbedb77..1f9211d85ca2 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -345,12 +345,6 @@ void importSheetFragments( WorkbookFragment& rWorkbookHandler, SheetFragmentVect
void WorkbookFragment::finalizeImport()
{
- // lock the model to prevent broadcasting, speeds up load a lot
- getScDocument().InitDrawLayer();
- auto pModel = getScDocument().GetDrawLayer();
- bool bWasLocked = pModel->isLocked();
- pModel->setLock(true);
-
ISegmentProgressBarRef xGlobalSegment = getProgressBar().createSegment( PROGRESS_LENGTH_GLOBALS );
// read the theme substream
@@ -474,6 +468,12 @@ void WorkbookFragment::finalizeImport()
}
}
+ // lock the model to prevent broadcasting, speeds up load a lot
+ getScDocument().InitDrawLayer();
+ auto pModel = getScDocument().GetDrawLayer();
+ bool bWasLocked = pModel->isLocked();
+ pModel->setLock(true);
+
// load all worksheets
importSheetFragments(*this, aSheetFragments);
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 5cfa569894f4..6c56de1e981a 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -151,9 +151,9 @@ public:
/** Returns the specified cell or page style from the Calc document. */
Reference< XStyle > getStyleObject( const OUString& rStyleName, bool bPageStyle ) const;
/** Creates and returns a defined name on-the-fly in the Calc document. */
- ScRangeData* createNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags );
+ ScRangeData* createNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden );
/** Creates and returns a defined name on the-fly in the correct Calc sheet. */
- ScRangeData* createLocalNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab );
+ ScRangeData* createLocalNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden );
/** Creates and returns a database range on-the-fly in the Calc document. */
Reference< XDatabaseRange > createDatabaseRangeObject( OUString& orName, const ScRange& rRangeAddr );
/** Creates and returns an unnamed database range on-the-fly in the Calc document. */
@@ -352,7 +352,7 @@ Reference< XStyle > WorkbookGlobals::getStyleObject( const OUString& rStyleName,
namespace {
-ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, const OUString& rName, const Sequence<FormulaToken>& rTokens, sal_Int16 nIndex, sal_Int32 nUnoType )
+ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, const OUString& rName, const Sequence<FormulaToken>& rTokens, sal_Int16 nIndex, sal_Int32 nUnoType, bool bHidden )
{
bool bDone = false;
ScRangeData::Type nNewType = ScRangeData::Type::Name;
@@ -366,6 +366,9 @@ ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, c
pNew->GuessPosition();
if ( nIndex )
pNew->SetIndex( nIndex );
+ // create but not insert hidden FILTER_CRITERIA named ranges to ScRangeName
+ if ( bHidden && nNewType == ScRangeData::Type::Criteria )
+ return pNew;
if ( pNames->insert(pNew) )
bDone = true;
if (!bDone)
@@ -386,7 +389,7 @@ OUString findUnusedName( const ScRangeName* pRangeName, const OUString& rSuggest
}
ScRangeData* WorkbookGlobals::createNamedRangeObject(
- OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags )
+ OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden )
{
// create the name and insert it into the Calc document
ScRangeData* pScRangeData = nullptr;
@@ -397,13 +400,13 @@ ScRangeData* WorkbookGlobals::createNamedRangeObject(
// find an unused name
orName = findUnusedName( pNames, orName );
// create the named range
- pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags );
+ pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags, bHidden );
}
return pScRangeData;
}
ScRangeData* WorkbookGlobals::createLocalNamedRangeObject(
- OUString& orName, const Sequence< FormulaToken >& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab )
+ OUString& orName, const Sequence< FormulaToken >& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden )
{
// create the name and insert it into the Calc document
ScRangeData* pScRangeData = nullptr;
@@ -416,7 +419,7 @@ ScRangeData* WorkbookGlobals::createLocalNamedRangeObject(
// find an unused name
orName = findUnusedName( pNames, orName );
// create the named range
- pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags );
+ pScRangeData = lcl_addNewByNameAndTokens( rDoc, pNames, orName, rTokens, nIndex, nNameFlags, bHidden );
}
return pScRangeData;
}
@@ -862,14 +865,14 @@ Reference< XStyle > WorkbookHelper::getStyleObject( const OUString& rStyleName,
return mrBookGlob.getStyleObject( rStyleName, bPageStyle );
}
-ScRangeData* WorkbookHelper::createNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags ) const
+ScRangeData* WorkbookHelper::createNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, bool bHidden ) const
{
- return mrBookGlob.createNamedRangeObject( orName, rTokens, nIndex, nNameFlags );
+ return mrBookGlob.createNamedRangeObject( orName, rTokens, nIndex, nNameFlags, bHidden );
}
-ScRangeData* WorkbookHelper::createLocalNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab ) const
+ScRangeData* WorkbookHelper::createLocalNamedRangeObject( OUString& orName, const Sequence< FormulaToken>& rTokens, sal_Int32 nIndex, sal_Int32 nNameFlags, sal_Int32 nTab, bool bHidden ) const
{
- return mrBookGlob.createLocalNamedRangeObject( orName, rTokens, nIndex, nNameFlags, nTab );
+ return mrBookGlob.createLocalNamedRangeObject( orName, rTokens, nIndex, nNameFlags, nTab, bHidden );
}
Reference< XDatabaseRange > WorkbookHelper::createDatabaseRangeObject( OUString& orName, const ScRange& rRangeAddr ) const
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index 775e9ad9a3a7..58c35f862115 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -467,17 +467,17 @@ ContextHandlerRef WorksheetFragment::onCreateContext( sal_Int32 nElement, const
case XLS_TOKEN( oleObjects ):
if ( getCurrentElement() == XLS_TOKEN( controls ) )
{
- if( aMceState.empty() || aMceState.back() == MCE_STATE::Started )
+ if( isMCEStateEmpty() || getMCEState() == MCE_STATE::Started )
{
if ( getCurrentElement() == XLS_TOKEN( oleObjects ) ) importOleObject( rAttribs );
else
importControl( rAttribs );
}
- else if ( !aMceState.empty() && aMceState.back() == MCE_STATE::FoundChoice )
+ else if ( !isMCEStateEmpty() && getMCEState() == MCE_STATE::FoundChoice )
{
// reset the handling within 'Choice'
// this will force attempted handling in Fallback
- aMceState.back() = MCE_STATE::Started;
+ setMCEState( MCE_STATE::Started );
}
}
break;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index fe71ab45b6b3..599e6e9a99b3 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1563,6 +1563,14 @@ bool ScModule::IsModalMode(SfxObjectShell* pDocSh)
!( pRefDlg->IsRefInputMode() && pRefDlg->IsDocAllowed(pDocSh) );
}
}
+ else if ( pDocSh && comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if ( pHdl )
+ bIsModal = pHdl->IsModalMode(pDocSh);
+ }
}
else if (pDocSh)
{
@@ -1644,6 +1652,14 @@ bool ScModule::IsFormulaMode()
bIsFormula = pChildWnd->IsVisible() && pRefDlg && pRefDlg->IsRefInputMode();
}
}
+ else if ( comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if ( pHdl )
+ bIsFormula = pHdl->IsFormulaMode();
+ }
}
else
{
@@ -1679,7 +1695,13 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
if( m_nCurRefDlgId )
{
- SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( m_nCurRefDlgId );
+ SfxChildWindow* pChildWnd = nullptr;
+
+ if ( comphelper::LibreOfficeKit::isActive() )
+ pChildWnd = lcl_GetChildWinFromCurrentView( m_nCurRefDlgId );
+ else
+ pChildWnd = lcl_GetChildWinFromAnyView( m_nCurRefDlgId );
+
OSL_ENSURE( pChildWnd, "NoChildWin" );
if ( pChildWnd )
{
@@ -1705,6 +1727,14 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc,
}
}
}
+ else if ( comphelper::LibreOfficeKit::isActive() )
+ {
+ // m_nCurRefDlgId is not deglobalized so it can be set by other view
+ // in LOK case when no ChildWindow for this view was detected -> fallback
+ ScInputHandler* pHdl = GetInputHdl();
+ if (pHdl)
+ pHdl->SetReference( aNew, pDoc );
+ }
}
else
{
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 1275113c7f29..cd355c902714 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/lok.hxx>
#include <csvgrid.hxx>
#include <csvtablebox.hxx>
@@ -105,6 +106,8 @@ void ScCsvGrid::SetDrawingArea(weld::DrawingArea* pDrawingArea)
// the left edge will be lost. If this widget is smaller than the scrolling
// window it is stretched to fit the parent and the problem doesn't arise.
Size aInitialSize(10, 10);
+ if (comphelper::LibreOfficeKit::isActive())
+ aInitialSize = Size(-1, 150);
ScCsvControl::SetDrawingArea(pDrawingArea);
pDrawingArea->set_size_request(aInitialSize.Width(), aInitialSize.Height());
SetOutputSizePixel(aInitialSize);
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index 3a55f96b77b5..d665795b8224 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -288,14 +288,12 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa
, mcTextSep(ScAsciiOptions::cDefaultTextSep)
, meCall(eCall)
, mbDetectSpaceSep(eCall != SC_TEXTTOCOLUMNS)
- , mxFtCharSet(m_xBuilder->weld_label("textcharset"))
, mxLbCharSet(new SvxTextEncodingBox(m_xBuilder->weld_combo_box("charset")))
, mxFtCustomLang(m_xBuilder->weld_label("textlanguage"))
, mxLbCustomLang(new SvxLanguageBox(m_xBuilder->weld_combo_box("language")))
, mxFtRow(m_xBuilder->weld_label("textfromrow"))
, mxNfRow(m_xBuilder->weld_spin_button("fromrow"))
- , mxRbFixed(m_xBuilder->weld_radio_button("tofixedwidth"))
- , mxRbSeparated(m_xBuilder->weld_radio_button("toseparatedby"))
+ , mxRbSeparated(m_xBuilder->weld_check_button("toseparatedby"))
, mxCkbTab(m_xBuilder->weld_check_button("tab"))
, mxCkbSemicolon(m_xBuilder->weld_check_button("semicolon"))
, mxCkbComma(m_xBuilder->weld_check_button("comma"))
@@ -363,7 +361,7 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa
if (bSkipEmptyCells)
mxCkbSkipEmptyCells->set_active(true);
if (bFixedWidth && !bIsTSV)
- mxRbFixed->set_active(true);
+ mxRbSeparated->set_active(false);
if (nFromRow != 1)
mxNfRow->set_value(nFromRow);
@@ -488,10 +486,9 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa
mxTableBox->SetColTypeHdl( LINK( this, ScImportAsciiDlg, ColTypeHdl ) );
mxRbSeparated->connect_clicked( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) );
- mxRbFixed->connect_clicked( LINK( this, ScImportAsciiDlg, RbSepFixHdl ) );
SetupSeparatorCtrls();
- RbSepFixHdl(*mxRbFixed);
+ RbSepFixHdl( *mxRbSeparated );
UpdateVertical();
@@ -499,7 +496,6 @@ ScImportAsciiDlg::ScImportAsciiDlg(weld::Window* pParent, const OUString& aDatNa
if (meCall == SC_TEXTTOCOLUMNS)
{
- mxFtCharSet->set_sensitive(false);
mxLbCharSet->set_sensitive(false);
mxFtCustomLang->set_sensitive(false);
mxLbCustomLang->set_active_id(LANGUAGE_SYSTEM);
@@ -539,7 +535,7 @@ bool ScImportAsciiDlg::GetLine( sal_uLong nLine, OUString &rText, sal_Unicode& r
return false;
bool bRet = true;
- bool bFixed = mxRbFixed->get_active();
+ bool bFixed = !mxRbSeparated->get_active();
if (!mpRowPosArray)
mpRowPosArray.reset( new sal_uLong[ASCIIDLG_MAXROWS + 2] );
@@ -602,7 +598,7 @@ void ScImportAsciiDlg::GetOptions( ScAsciiOptions& rOpt )
rOpt.SetCharSet( meCharSet );
rOpt.SetCharSetSystem( mbCharSetSystem );
rOpt.SetLanguage(mxLbCustomLang->get_active_id());
- rOpt.SetFixedLen( mxRbFixed->get_active() );
+ rOpt.SetFixedLen( !mxRbSeparated->get_active() );
rOpt.SetStartRow( mxNfRow->get_value() );
mxTableBox->FillColumnData( rOpt );
if( mxRbSeparated->get_active() )
@@ -622,7 +618,7 @@ void ScImportAsciiDlg::SaveParameters()
{
lcl_SaveSeparators( maFieldSeparators, mxCbTextSep->get_active_text(), mxCkbAsOnce->get_active(),
mxCkbQuotedAsText->get_active(), mxCkbDetectNumber->get_active(),
- mxRbFixed->get_active(),
+ !mxRbSeparated->get_active(),
mxNfRow->get_value(),
mxLbCharSet->get_active(),
static_cast<sal_uInt16>(mxLbCustomLang->get_active_id()),
@@ -698,10 +694,10 @@ void ScImportAsciiDlg::UpdateVertical()
IMPL_LINK(ScImportAsciiDlg, RbSepFixHdl, weld::Button&, rButton, void)
{
- if (&rButton == mxRbFixed.get() || &rButton == mxRbSeparated.get())
+ if (&rButton == mxRbSeparated.get())
{
weld::WaitObject aWaitObj(m_xDialog.get());
- if( mxRbFixed->get_active() )
+ if( !mxRbSeparated->get_active() )
mxTableBox->SetFixedWidthMode();
else
mxTableBox->SetSeparatorsMode();
@@ -727,7 +723,7 @@ IMPL_LINK( ScImportAsciiDlg, SeparatorEditHdl, weld::Entry&, rEdit, void )
void ScImportAsciiDlg::SeparatorHdl(const weld::Widget* pCtrl)
{
OSL_ENSURE( pCtrl, "ScImportAsciiDlg::SeparatorHdl - missing sender" );
- OSL_ENSURE( !mxRbFixed->get_active(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" );
+ OSL_ENSURE( mxRbSeparated->get_active(), "ScImportAsciiDlg::SeparatorHdl - not allowed in fixed width" );
/* #i41550# First update state of the controls. The GetSeparators()
function needs final state of the check boxes. */
@@ -780,7 +776,7 @@ IMPL_LINK_NOARG(ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox&, void)
// when the dialog wasn't already presented to the user.
// As a side effect this has the benefit that the check is only done on the
// first set of visible lines.
- sal_Unicode cDetectSep = (mbDetectSpaceSep && !mxRbFixed->get_active() && !mxCkbSpace->get_active() ? 0 : 0xffff);
+ sal_Unicode cDetectSep = (mbDetectSpaceSep && mxRbSeparated->get_active() && !mxCkbSpace->get_active() ? 0 : 0xffff);
sal_Int32 nBaseLine = mxTableBox->GetGrid().GetFirstVisLine();
sal_Int32 nRead = mxTableBox->GetGrid().GetVisLineCount();
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 3a135d9d0042..40a19baecaa5 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -167,7 +167,8 @@ bool ScDocFunc::AdjustRowHeight( const ScRange& rRange, bool bPaint, bool bApi )
ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId())
{
- pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)->invalidateByIndex(nStartRow);
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nTab))
+ pPosHelper->invalidateByIndex(nStartRow);
}
pViewShell = SfxViewShell::GetNext(*pViewShell);
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 2bf345635645..551ab8d03f32 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -132,6 +132,8 @@
#include <memory>
#include <vector>
+#include <comphelper/lok.hxx>
+
using namespace com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::lang::XMultiServiceFactory;
@@ -1305,17 +1307,22 @@ bool ScDocShell::ConvertFrom( SfxMedium& rMedium )
sc::SetFormulaDirtyContext aCxt;
m_aDocument.SetAllFormulasDirty(aCxt);
- // The same resulting name has to be handled in
- // ScExternalRefCache::initializeDoc() and related, hence
- // pass 'true' for RenameTab()'s bExternalDocument for a
- // composed name so ValidTabName() will not be checked,
- // which could veto the rename in case it contained
- // characters that Excel does not handle. If we wanted to
- // change that then it needed to be handled in all
- // corresponding places of the external references
- // manager/cache. Likely then we'd also need a method to
- // compose a name excluding such characters.
- m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
+ bool bIsMobile = comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current()
+ && SfxViewShell::Current()->isLOKMobilePhone();
+ // for mobile case, we use a copy of the original document and give it a temporary name before editing
+ // Therefore, the sheet name becomes ugly, long and nonsensical.
+ if (!bIsMobile)
+ // The same resulting name has to be handled in
+ // ScExternalRefCache::initializeDoc() and related, hence
+ // pass 'true' for RenameTab()'s bExternalDocument for a
+ // composed name so ValidTabName() will not be checked,
+ // which could veto the rename in case it contained
+ // characters that Excel does not handle. If we wanted to
+ // change that then it needed to be handled in all
+ // corresponding places of the external references
+ // manager/cache. Likely then we'd also need a method to
+ // compose a name excluding such characters.
+ m_aDocument.RenameTab( 0, INetURLObject( rMedium.GetName()).GetBase(), true/*bExternalDocument*/);
bOverflowRow = aImpEx.IsOverflowRow();
bOverflowCol = aImpEx.IsOverflowCol();
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/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index e3c306574a73..8f4badd28ecb 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -222,7 +222,8 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
}
// open hyperlink, if found at object or in object's text
- if ( !sURL.isEmpty() && ScGlobal::ShouldOpenURL() )
+ // Fragments pointing into the current document should be always opened.
+ if ( !sURL.isEmpty() && (ScGlobal::ShouldOpenURL() || sURL.startsWith("#")) )
{
ScGlobal::OpenURL( sURL, sTarget );
rViewShell.FakeButtonUp( rViewShell.GetViewData().GetActivePart() );
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index 46f5598705f2..aa5e1bbb8533 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -52,8 +52,8 @@ class ScDrawView final : public FmFormView
void ImplClearCalcDropMarker();
- // support enhanced text edit for draw objects
- virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const override;
+ // Create a local UndoManager
+ std::unique_ptr<SdrUndoManager> createLocalTextUndoManager() override;
public:
ScDrawView(
diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx
index b8cb2bcc6794..569a67c9b241 100644
--- a/sc/source/ui/inc/scuiasciiopt.hxx
+++ b/sc/source/ui/inc/scuiasciiopt.hxx
@@ -54,7 +54,6 @@ class ScImportAsciiDlg : public weld::GenericDialogController
ScImportAsciiCall const meCall; /// How the dialog is called (see asciiopt.hxx)
bool mbDetectSpaceSep; /// Whether to detect a possible space separator.
- std::unique_ptr<weld::Label> mxFtCharSet;
std::unique_ptr<SvxTextEncodingBox> mxLbCharSet;
std::unique_ptr<weld::Label> mxFtCustomLang;
std::unique_ptr<SvxLanguageBox> mxLbCustomLang;
@@ -62,8 +61,7 @@ class ScImportAsciiDlg : public weld::GenericDialogController
std::unique_ptr<weld::Label> mxFtRow;
std::unique_ptr<weld::SpinButton> mxNfRow;
- std::unique_ptr<weld::RadioButton> mxRbFixed;
- std::unique_ptr<weld::RadioButton> mxRbSeparated;
+ std::unique_ptr<weld::CheckButton> mxRbSeparated;
std::unique_ptr<weld::CheckButton> mxCkbTab;
std::unique_ptr<weld::CheckButton> mxCkbSemicolon;
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index 15cc5242152a..fed870582dcc 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -112,6 +112,8 @@ void ScEditWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
sName, pDrawingArea->get_tooltip_text());
}
+
+ SetCursor(m_xEditView->GetCursor());
}
ScEditWindow::~ScEditWindow()
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 5cd457885c71..00740cd958ee 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -88,6 +88,7 @@ static const SfxItemPropertyMapEntry* lcl_GetConfigPropertyMap()
{OUString(SC_UNO_EMBED_FONT_SCRIPT_LATIN), 0, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNO_EMBED_FONT_SCRIPT_ASIAN), 0, cppu::UnoType<bool>::get(), 0, 0},
{OUString(SC_UNO_EMBED_FONT_SCRIPT_COMPLEX), 0, cppu::UnoType<bool>::get(), 0, 0},
+ {OUString(SC_UNO_IMAGE_PREFERRED_DPI), 0, cppu::UnoType<sal_Int32>::get(), 0, 0},
{OUString(SC_UNO_SYNTAXSTRINGREF), 0, cppu::UnoType<sal_Int16>::get(), 0, 0},
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
@@ -388,7 +389,13 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
rDoc.SetCalcConfig( aCalcConfig );
}
}
-
+ else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
+ {
+ if (aValue.has<sal_Int32>())
+ {
+ rDoc.SetImagePreferredDPI(aValue.get<sal_Int32>());
+ }
+ }
else
{
ScGridOptions aGridOpt(aViewOpt.GetGridOptions());
@@ -589,7 +596,10 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const OUString& aPr
}
}
}
-
+ else if (aPropertyName == SC_UNO_IMAGE_PREFERRED_DPI)
+ {
+ aRet <<= rDoc.GetImagePreferredDPI();
+ }
else
{
const ScGridOptions& aGridOpt = aViewOpt.GetGridOptions();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 8478211e2bca..186c4ffe9d39 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -23,6 +23,7 @@
#include <scitems.hxx>
#include <comphelper/sequence.hxx>
+#include <editeng/brushitem.hxx>
#include <editeng/editview.hxx>
#include <editeng/outliner.hxx>
#include <o3tl/any.hxx>
@@ -958,6 +959,19 @@ bool ScModelObj::isMimeTypeSupported()
return EditEngine::HasValidData(aDataHelper.GetTransferable());
}
+static void lcl_sendLOKDocumentBackground(const ScViewData* pViewData)
+{
+ ScDocShell* pDocSh = pViewData->GetDocShell();
+ ScDocument& rDoc = pDocSh->GetDocument();
+ const ScPatternAttr *pAttr = rDoc.GetDefPattern();
+ const SfxPoolItem& rItem = pAttr->GetItem(ATTR_BACKGROUND);
+ const SvxBrushItem& rBackground = static_cast<const SvxBrushItem&>(rItem);
+ const Color& rColor = rBackground.GetColor();
+
+ ScTabViewShell* pViewShell = pViewData->GetViewShell();
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_BACKGROUND_COLOR, rColor.AsRGBHexString().toUtf8().getStr());
+}
+
void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int nTileTwipWidth_, int nTileTwipHeight_)
{
ScViewData* pViewData = ScDocShell::GetViewData();
@@ -965,6 +979,11 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int
if (!pViewData)
return;
+ // Currently in LOK clients the doc background cannot be changed, so send this sparingly as possible but for every view.
+ // FIXME: Find a better place to trigger this callback where it would be called just once per view creation.
+ // Doing this in ScTabViewShell init code does not work because callbacks do not work at that point for the first view.
+ lcl_sendLOKDocumentBackground(pViewData);
+
const Fraction newZoomX(nTilePixelWidth_ * TWIPS_PER_PIXEL, nTileTwipWidth_);
const Fraction newZoomY(nTilePixelHeight_ * TWIPS_PER_PIXEL, nTileTwipHeight_);
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 67908ba1ba68..6b1fc8cf7ef0 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -254,7 +254,8 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
if (nWhich == FID_INS_COLUMNS_AFTER)
eAction = sc::ColRowEditAction::InsertColumnsAfter;
- bDisable = (!bSimpleArea) || GetViewData()->SimpleRowMarked();
+ bDisable = (!bSimpleArea && eMarkType != SC_MARK_SIMPLE_FILTERED)
+ || GetViewData()->SimpleRowMarked();
if (!bEditable && nRow1 == 0 && nRow2 == pDoc->MaxRow())
{
// See if row insertions are allowed.
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 805212fae00f..fd5611547a35 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -529,6 +529,55 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
// subtotal when needed new
pTabViewShell->UISort( rOutParam );
+
+ SfxViewFrame* pViewFrm = pTabViewShell->GetViewFrame();
+ if (pViewFrm)
+ {
+ SfxRequest aRequest(pViewFrm, SID_SORT);
+
+ if ( rOutParam.bInplace )
+ {
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_BYROW,
+ rOutParam.bByRow ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_HASHEADER,
+ rOutParam.bHasHeader ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_CASESENS,
+ rOutParam.bCaseSens ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_NATURALSORT,
+ rOutParam.bNaturalSort ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCCOMMENTS,
+ rOutParam.bIncludeComments ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_INCIMAGES,
+ rOutParam.bIncludeGraphicObjects ) );
+ aRequest.AppendItem( SfxBoolItem( SID_SORT_ATTRIBS,
+ rOutParam.bIncludePattern ) );
+ sal_uInt16 nUser = rOutParam.bUserDef ? ( rOutParam.nUserIndex + 1 ) : 0;
+ aRequest.AppendItem( SfxUInt16Item( SID_SORT_USERDEF, nUser ) );
+ if ( rOutParam.maKeyState[0].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_1,
+ rOutParam.maKeyState[0].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_2,
+ rOutParam.maKeyState[0].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[1].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_3,
+ rOutParam.maKeyState[1].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_4,
+ rOutParam.maKeyState[1].bAscending ) );
+ }
+ if ( rOutParam.maKeyState[2].bDoSort )
+ {
+ aRequest.AppendItem( SfxInt32Item( FN_PARAM_5,
+ rOutParam.maKeyState[2].nField + 1 ) );
+ aRequest.AppendItem( SfxBoolItem( FN_PARAM_6,
+ rOutParam.maKeyState[2].bAscending ) );
+ }
+ }
+
+ aRequest.Done();
+ }
}
else
{
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 52942816c138..424d416fdd4f 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -2274,9 +2274,15 @@ void ScDBFunc::OnLOKShowHideColRow(bool bColumns, SCCOLROW nStart)
if (pTabViewShell && pTabViewShell->GetDocId() == pThisViewShell->GetDocId())
{
if (bColumns)
- pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStart);
+ }
else
- pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStart);
+ }
if (pTabViewShell->getPart() == nCurrentTabIndex)
{
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index c7d12df62209..6959726b4efe 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -1103,10 +1103,13 @@ bool ScDrawView::calculateGridOffsetForB2DRange(
return true;
}
-// support enhanced text edit for draw objects
-SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const
+// Create a new view-local UndoManager manager for Calc
+std::unique_ptr<SdrUndoManager> ScDrawView::createLocalTextUndoManager()
{
- return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : nullptr;
+ std::unique_ptr<SdrUndoManager> pUndoManager(new SdrUndoManager);
+ ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : nullptr;
+ pUndoManager->SetDocShell(pDocShell);
+ return pUndoManager;
}
// #i123922# helper to apply a Graphic to an existing SdrObject
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 650ab56cf520..9c49099f2c8d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -671,7 +671,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow)
nSizeX = nSizeX / fZoomX;
nSizeY = nSizeY / fZoomY;
}
- tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY));
+ tools::Rectangle aCellRect(bLOKActive ? aPos : OutputToScreenPixel(aPos), Size(nSizeX, nSizeY));
ScDBData* pDBData = pDoc->GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA);
if (!pDBData)
@@ -924,7 +924,8 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow )
Point aScrPos;
Size aScrSize;
getCellGeometry(aScrPos, aScrSize, pViewData, nCol, nRow, eWhich);
- DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj);
+ bool bLOK = comphelper::LibreOfficeKit::isActive();
+ DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj);
}
void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
@@ -937,7 +938,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow )
Point aScrPos;
Size aScrSize;
getCellGeometry(aScrPos, aScrSize, pViewData, nCol, nRow, eWhich);
- DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj);
+ bool bLOK = comphelper::LibreOfficeKit::isActive();
+ DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj);
}
void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange )
@@ -2612,8 +2614,14 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
}
}
- if ( pViewData->GetView()->GetSelEngine()->SelMouseMove( rMEvt ) )
- return;
+ // In LOK case, avoid spurious "leavingwindow" mouse move events which has negative coordinates.
+ // Such events occur for some reason when a user is selecting a range, (even when not leaving the view area)
+ // with one or more other viewers in that sheet.
+ bool bSkipSelectionUpdate = comphelper::LibreOfficeKit::isActive() &&
+ rMEvt.IsLeaveWindow() && (aCurMousePos.X() < 0 || aCurMousePos.Y() < 0);
+
+ if (!bSkipSelectionUpdate)
+ pViewData->GetView()->GetSelEngine()->SelMouseMove( rMEvt );
}
static void lcl_InitMouseEvent(css::awt::MouseEvent& rEvent, const MouseEvent& rEvt)
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index e924c11a0145..e24ed7281b80 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -343,6 +343,7 @@ bool ScGridWindow::DPTestFieldPopupArrow(
const MouseEvent& rMEvt, const ScAddress& rPos, const ScAddress& rDimPos, ScDPObject* pDPObj)
{
bool bLayoutRTL = pViewData->GetDocument()->IsLayoutRTL( pViewData->GetTabNo() );
+ bool bLOK = comphelper::LibreOfficeKit::isActive();
// Get the geometry of the cell.
Point aScrPos = pViewData->GetScrPos(rPos.Col(), rPos.Row(), eWhich);
@@ -361,7 +362,7 @@ bool ScGridWindow::DPTestFieldPopupArrow(
if (aRect.IsInside(rMEvt.GetPosPixel()))
{
// Mouse cursor inside the popup arrow box. Launch the field menu.
- DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, rDimPos, pDPObj);
+ DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, rDimPos, pDPObj);
return true;
}
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index dce3d4a6d5d4..6aac6be5fde9 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1288,15 +1288,15 @@ namespace
class ScLOKProxyObjectContact final : public sdr::contact::ObjectContactOfPageView
{
private:
- sdr::contact::ObjectContact& mrRealObjectContact;
+ ScDrawView* pScDrawView;
public:
explicit ScLOKProxyObjectContact(
- sdr::contact::ObjectContact& rRealOC,
+ ScDrawView* pDrawView,
SdrPageWindow& rPageWindow,
const sal_Char* pDebugName) :
ObjectContactOfPageView(rPageWindow, pDebugName),
- mrRealObjectContact(rRealOC)
+ pScDrawView(pDrawView)
{
}
@@ -1306,9 +1306,24 @@ namespace
basegfx::B2DVector& rTarget,
const sdr::contact::ViewObjectContact& rClient) const override
{
+ if (!pScDrawView)
+ return;
+
+ SdrPageView* pPageView(pScDrawView->GetSdrPageView());
+ if (!pPageView)
+ return;
+
+ SdrPageWindow* pSdrPageWindow = nullptr;
+ if (pPageView->PageWindowCount() > 0)
+ pSdrPageWindow = pPageView->GetPageWindow(0);
+ if (!pSdrPageWindow)
+ return;
+
+ sdr::contact::ObjectContact& rObjContact(pSdrPageWindow->GetObjectContact());
+
SdrObject* pTargetSdrObject(rClient.GetViewContact().TryToGetSdrObject());
if (pTargetSdrObject)
- rTarget = pTargetSdrObject->GetViewContact().GetViewObjectContact(mrRealObjectContact).getGridOffset();
+ rTarget = pTargetSdrObject->GetViewContact().GetViewObjectContact(rObjContact).getGridOffset();
}
};
@@ -1327,15 +1342,7 @@ namespace
if (!pScDrawView)
return SdrView::createViewSpecificObjectContact(rPageWindow, pDebugName);
- SdrPageView* pPageView(pScDrawView->GetSdrPageView());
- if (!pPageView)
- return SdrView::createViewSpecificObjectContact(rPageWindow, pDebugName);
-
- SdrPageWindow* pSdrPageWindow = pPageView->GetPageWindow(0);
- if (!pSdrPageWindow)
- return SdrView::createViewSpecificObjectContact(rPageWindow, pDebugName);
-
- return new ScLOKProxyObjectContact(pSdrPageWindow->GetObjectContact(), rPageWindow, pDebugName);
+ return new ScLOKProxyObjectContact(pScDrawView, rPageWindow, pDebugName);
}
private:
@@ -1499,12 +1506,13 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
void ScGridWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
{
- OString sRectangle;
+ tools::Rectangle aRectangle;
+ tools::Rectangle* pResultRectangle;
if (!pRectangle)
- sRectangle = "EMPTY";
+ pResultRectangle = nullptr;
else
{
- tools::Rectangle aRectangle(*pRectangle);
+ aRectangle = *pRectangle;
// When dragging shapes the map mode is disabled.
if (IsMapModeEnabled())
{
@@ -1513,11 +1521,11 @@ void ScGridWindow::LogicInvalidate(const tools::Rectangle* pRectangle)
}
else
aRectangle = PixelToLogic(aRectangle, MapMode(MapUnit::MapTwip));
- sRectangle = aRectangle.toString();
+ pResultRectangle = &aRectangle;
}
ScTabViewShell* pViewShell = pViewData->GetViewShell();
- SfxLokHelper::notifyInvalidation(pViewShell, sRectangle);
+ SfxLokHelper::notifyInvalidation(pViewShell, pResultRectangle);
}
void ScGridWindow::SetCellSelectionPixel(int nType, int nPixelX, int nPixelY)
@@ -2072,14 +2080,66 @@ void ScGridWindow::GetRectsAnyFor(const ScMarkData &rMarkData,
::std::vector< tools::Rectangle >& rRects,
bool bInPrintTwips) const
{
- ScMarkData aMultiMark( rMarkData );
- aMultiMark.SetMarking( false );
- aMultiMark.MarkToMulti();
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
-
+ double nPPTX = pViewData->GetPPTX();
+ double nPPTY = pViewData->GetPPTY();
bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
+
+ ScMarkData aMultiMark( rMarkData );
+ aMultiMark.SetMarking( false );
+
+ if (!aMultiMark.IsMultiMarked())
+ {
+ // simple range case - simplify calculation
+ ScRange aSimpleRange;
+ aMultiMark.GetMarkArea( aSimpleRange );
+
+ aMultiMark.MarkToMulti();
+ if ( !aMultiMark.IsMultiMarked() )
+ return;
+
+ SCCOL nX1 = aSimpleRange.aStart.Col();
+ SCROW nY1 = aSimpleRange.aStart.Row();
+ SCCOL nX2 = aSimpleRange.aEnd.Col();
+ SCROW nY2 = aSimpleRange.aEnd.Row();
+
+ PutInOrder( nX1, nX2 );
+ PutInOrder( nY1, nY2 );
+
+ SCCOL nPosX = pViewData->GetPosX( eHWhich );
+ SCROW nPosY = pViewData->GetPosY( eVWhich );
+ // is the selection visible at all?
+ if (nX2 < nPosX || nY2 < nPosY)
+ return;
+
+ Point aScrStartPos = bInPrintTwips ? pViewData->GetPrintTwipsPos(nX1, nY1) :
+ pViewData->GetScrPos(nX1, nY1, eWhich);
+
+ long nStartX = aScrStartPos.X();
+ long nStartY = aScrStartPos.Y();
+
+ Point aScrEndPos = bInPrintTwips ? pViewData->GetPrintTwipsPos(nX2, nY2) :
+ pViewData->GetScrPos(nX2, nY2, eWhich);
+
+ long nWidthTwips = pDoc->GetColWidth(nX2, nTab);
+ const long nWidth = bInPrintTwips ?
+ nWidthTwips : ScViewData::ToPixel(nWidthTwips, nPPTX);
+ long nEndX = aScrEndPos.X() + (nWidth - 1) * nLayoutSign;
+
+ sal_uInt16 nHeightTwips = pDoc->GetRowHeight( nY2, nTab );
+ const long nHeight = bInPrintTwips ?
+ nHeightTwips : ScViewData::ToPixel(nHeightTwips, nPPTY);
+ long nEndY = aScrEndPos.Y() + nHeight - 1;
+
+ ScInvertMerger aInvert( &rRects );
+ aInvert.AddRect( tools::Rectangle( nStartX, nStartY, nEndX, nEndY ) );
+
+ return;
+ }
+
+ aMultiMark.MarkToMulti();
if ( !aMultiMark.IsMultiMarked() )
return;
ScRange aMultiRange;
@@ -2140,9 +2200,6 @@ void ScGridWindow::GetRectsAnyFor(const ScMarkData &rMarkData,
nY2 = nMaxTiledRow;
}
- double nPPTX = pViewData->GetPPTX();
- double nPPTY = pViewData->GetPPTY();
-
ScInvertMerger aInvert( &rRects );
Point aScrPos = bInPrintTwips ? pViewData->GetPrintTwipsPos(nX1, nY1) :
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index b940ffe200b1..40746907fafc 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -292,7 +292,9 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
pObj = pHit;
}
ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj );
- if ( pInfo && (pInfo->GetHlink().getLength() > 0) )
+ // Fragments pointing into the current document need no tooltip
+ // describing the ctrl-click functionality.
+ if ( pInfo && (pInfo->GetHlink().getLength() > 0) && !pInfo->GetHlink().startsWith("#") )
{
aPixRect = LogicToPixel(aVEvt.pObj->GetLogicRect());
aHelpText = SfxHelp::GetURLHelpText(pInfo->GetHlink());
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 0aa76721e54a..3585908d7e07 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -39,6 +39,7 @@
#include <sal/log.hxx>
#include <comphelper/lok.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+#include <tools/UnitConversion.hxx>
#include <output.hxx>
#include <document.hxx>
@@ -289,7 +290,7 @@ void ScOutputData::SetSyntaxMode( bool bNewMode )
void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool bPage, bool bMergeCover)
{
// bMergeCover : Draw lines in sheet bgcolor to cover lok client grid lines in merged cell areas.
- // (Used when scNoGridBackground is set in lok mode.)
+ // When scNoGridBackground is set in lok mode, bMergeCover is set to true and bGrid to false.
SCCOL nX;
SCROW nY;
@@ -353,10 +354,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
long nLayoutSign = bLayoutRTL ? -1 : 1;
long nSignedOneX = nOneX * nLayoutSign;
- if (bGrid)
- rRenderContext.SetLineColor(aGridColor);
- else if (bMergeCover)
- rRenderContext.SetLineColor(aSheetBGColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
ScGridMerger aGrid(&rRenderContext, nOneX, nOneY);
@@ -399,14 +397,9 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
aPageColor );
bDashed = true;
}
- else if (bGrid)
- {
- rRenderContext.SetLineColor( aGridColor );
- bDashed = false;
- }
- else if (bMergeCover)
+ else
{
- rRenderContext.SetLineColor(aSheetBGColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
bDashed = false;
}
@@ -464,18 +457,14 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
}
}
- if (pThisRowInfo->bChanged && !bHOver && bGrid)
- {
- aGrid.AddVerLine(bWorksInPixels, nPosX-nSignedOneX, nPosY, nNextY-nOneY, bDashed);
- }
- else if (bHOver && bMergeCover)
+ if ((pThisRowInfo->bChanged && !bHOver && !bMergeCover) || (bHOver && bMergeCover))
{
aGrid.AddVerLine(bWorksInPixels, nPosX-nSignedOneX, nPosY, nNextY-nOneY, bDashed);
}
nPosY = nNextY;
}
}
- else if (bGrid)
+ else if (!bMergeCover)
{
aGrid.AddVerLine(bWorksInPixels, nPosX-nSignedOneX, nScrY, nScrY+nScrH-nOneY, bDashed);
}
@@ -525,14 +514,9 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
aPageColor );
bDashed = true;
}
- else if (bGrid)
- {
- rRenderContext.SetLineColor( aGridColor );
- bDashed = false;
- }
- else if (bMergeCover)
+ else
{
- rRenderContext.SetLineColor(aSheetBGColor);
+ rRenderContext.SetLineColor(bMergeCover ? aSheetBGColor : aGridColor);
bDashed = false;
}
@@ -579,11 +563,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
//! nVisY from Array ??
}
- if (!bVOver && bGrid)
- {
- aGrid.AddHorLine(bWorksInPixels, nPosX, nNextX-nSignedOneX, nPosY-nOneY, bDashed);
- }
- else if (bVOver && bMergeCover)
+ if ((!bVOver && !bMergeCover) || (bVOver && bMergeCover))
{
aGrid.AddHorLine(bWorksInPixels, nPosX, nNextX-nSignedOneX, nPosY-nOneY, bDashed);
}
@@ -591,7 +571,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
nPosX = nNextX;
}
}
- else if (bGrid)
+ else if (!bMergeCover)
{
aGrid.AddHorLine(bWorksInPixels, nScrX, nScrX+nScrW-nOneX, nPosY-nOneY, bDashed);
}
@@ -926,20 +906,42 @@ const BitmapEx& getIcon(sc::IconSetBitmapMap & rIconSetBitmapMap, ScIconSetType
}
void drawIconSets(vcl::RenderContext& rRenderContext, const ScIconSetInfo* pOldIconSetInfo, const tools::Rectangle& rRect, long nOneX, long nOneY,
- sc::IconSetBitmapMap & rIconSetBitmapMap)
+ sc::IconSetBitmapMap & rIconSetBitmapMap, bool bWorksInPixels)
{
- //long nSize = 16;
ScIconSetType eType = pOldIconSetInfo->eIconSetType;
sal_Int32 nIndex = pOldIconSetInfo->nIconIndex;
const BitmapEx& rIcon = getIcon(rIconSetBitmapMap, eType, nIndex);
- long aOrigSize = std::max<long>(0,std::min(rRect.GetSize().getWidth() - 4 * nOneX, rRect.GetSize().getHeight() -4 * nOneY));
- rRenderContext.DrawBitmapEx( Point( rRect.Left() + 2 * nOneX, rRect.Top() + 2 * nOneY), Size(aOrigSize, aOrigSize), rIcon );
+
+ long aHeight = 300;
+
+ if (pOldIconSetInfo->mnHeight)
+ {
+ if (bWorksInPixels)
+ {
+ aHeight = rRenderContext.LogicToPixel(Size(0, pOldIconSetInfo->mnHeight), MapMode(MapUnit::MapTwip)).Height();
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ aHeight *= comphelper::LibreOfficeKit::getDPIScale();
+ }
+ }
+ else
+ aHeight = convertTwipToMm100(pOldIconSetInfo->mnHeight);
+ }
+
+ Size aSize = rIcon.GetSizePixel();
+ double fRatio = aSize.Width() / aSize.Height();
+ long aWidth = fRatio * aHeight;
+
+ rRenderContext.Push();
+ rRenderContext.SetClipRegion(vcl::Region(rRect));
+ rRenderContext.DrawBitmapEx(Point(rRect.Left() + 2 * nOneX, rRect.Bottom() - 2 * nOneY - aHeight), Size(aWidth, aHeight), rIcon);
+ rRenderContext.Pop();
}
void drawCells(vcl::RenderContext& rRenderContext, boost::optional<Color> const & pColor, const SvxBrushItem* pBackground, boost::optional<Color>& pOldColor, const SvxBrushItem*& pOldBackground,
tools::Rectangle& rRect, long nPosX, long nLayoutSign, long nOneX, long nOneY, const ScDataBarInfo* pDataBarInfo, const ScDataBarInfo*& pOldDataBarInfo,
const ScIconSetInfo* pIconSetInfo, const ScIconSetInfo*& pOldIconSetInfo,
- sc::IconSetBitmapMap & rIconSetBitmapMap)
+ sc::IconSetBitmapMap & rIconSetBitmapMap, bool bWorksInPixels)
{
long nSignedOneX = nOneX * nLayoutSign;
// need to paint if old color scale has been used and now
@@ -956,7 +958,7 @@ void drawCells(vcl::RenderContext& rRenderContext, boost::optional<Color> const
if( pOldDataBarInfo )
drawDataBars(rRenderContext, pOldDataBarInfo, rRect, nOneX, nOneY);
if( pOldIconSetInfo )
- drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
+ drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap, bWorksInPixels);
rRect.SetLeft( nPosX - nSignedOneX );
}
@@ -976,7 +978,7 @@ void drawCells(vcl::RenderContext& rRenderContext, boost::optional<Color> const
if( pOldDataBarInfo )
drawDataBars(rRenderContext, pOldDataBarInfo, rRect, nOneX, nOneY);
if( pOldIconSetInfo )
- drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap);
+ drawIconSets(rRenderContext, pOldIconSetInfo, rRect, nOneX, nOneY, rIconSetBitmapMap, bWorksInPixels);
rRect.SetLeft( nPosX - nSignedOneX );
}
@@ -1139,7 +1141,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, pColor, pBackground, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, pDataBarInfo, pOldDataBarInfo, pIconSetInfo, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
+ drawCells(rRenderContext, pColor, pBackground, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, pDataBarInfo, pOldDataBarInfo, pIconSetInfo, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap(), bWorksInPixels);
// extend for all merged cells
nMergedCols = 1;
@@ -1163,7 +1165,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, boost::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
+ drawCells(rRenderContext, boost::optional<Color>(), nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap(), bWorksInPixels);
nArrY += nSkip;
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 1f924ddaf8f9..0c23821cd26d 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2588,7 +2588,7 @@ void lcl_ExtendTiledDimension(bool bColumn, const SCCOLROW nEnd, const SCCOLROW
if ((bColumn && aNewArea.getWidth()) || (!bColumn && aNewArea.getHeight()))
{
rTabView.UpdateSelectionOverlay();
- SfxLokHelper::notifyInvalidation(rViewData.GetViewShell(), aNewArea.toString());
+ SfxLokHelper::notifyInvalidation(rViewData.GetViewShell(), &aNewArea);
}
// Provide size in the payload, so clients don't have to query for that.
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 92bc95326f9c..87206196c7a8 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -412,13 +412,13 @@ void ScTabView::SetCursor( SCCOL nPosX, SCROW nPosY, bool bNew )
// Only invalidate if spreadsheet extended to the right
if (aNewColArea.getWidth())
{
- SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), aNewColArea.toString());
+ SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), &aNewColArea);
}
// Only invalidate if spreadsheet extended to the bottom
if (aNewRowArea.getHeight())
{
- SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), aNewRowArea.toString());
+ SfxLokHelper::notifyInvalidation(aViewData.GetViewShell(), &aNewRowArea);
}
// Provide size in the payload, so clients don't have to
@@ -2597,7 +2597,9 @@ void ScTabView::DoDPFieldPopup(OUString const & rPivotTableName, sal_Int32 nDime
pDPObject->BuildAllDimensionMembers();
- Point aScreenPoint = pWin->OutputToScreenPixel(pWin->LogicToPixel(aPoint));
+ Point aPos = pWin->LogicToPixel(aPoint);
+ bool bLOK = comphelper::LibreOfficeKit::isActive();
+ Point aScreenPoint = bLOK ? aPos : pWin->OutputToScreenPixel(aPos);
Size aScreenSize = pWin->LogicToPixel(aSize);
pWin->DPLaunchFieldPopupMenu(aScreenPoint, aScreenSize, nDimensionIndex, pDPObject);
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index dc48b24dc52c..693ef04ed055 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -262,6 +262,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
case SID_DRAW_TEXT_MARQUEE:
case SID_DRAW_NOTEEDIT:
pTabView->SetDrawFuncPtr(new FuText(*this, pWin, pView, pDoc, aNewReq));
+ bCreateDirectly = comphelper::LibreOfficeKit::isActive();
break;
case SID_FM_CREATE_CONTROL:
@@ -331,7 +332,6 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
}
else
{
- GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
ScViewData& rViewData = GetViewData();
aInsertPos = rViewData.getLOKVisibleArea().Center();
if (comphelper::LibreOfficeKit::isCompatFlagSet(
@@ -363,13 +363,20 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
// insert into page
pView->InsertObjectAtView(pObj.release(), *pPageView);
- if ( nNewId == SID_DRAW_CAPTION || nNewId == SID_DRAW_CAPTION_VERTICAL )
+ switch ( nNewId )
{
+ case SID_DRAW_CAPTION:
+ case SID_DRAW_CAPTION_VERTICAL:
+ case SID_DRAW_TEXT:
+ case SID_DRAW_TEXT_VERTICAL:
// use KeyInput to start edit mode (FuText is created).
// For FuText objects, edit mode is handled within CreateDefaultObject.
// KEY_F2 is handled in FuDraw::KeyInput.
pFuActual->KeyInput( KeyEvent( 0, vcl::KeyCode( KEY_F2 ) ) );
+ break;
+ default:
+ break;
}
}
}
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 6b735e21130c..49abd351c0d3 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -543,20 +543,26 @@ void ScViewDataTable::WriteUserDataSequence(uno::Sequence <beans::PropertyValue>
pSettings[SC_CURSOR_X].Value <<= sal_Int32(nCurX);
pSettings[SC_CURSOR_Y].Name = SC_CURSORPOSITIONY;
pSettings[SC_CURSOR_Y].Value <<= sal_Int32(nCurY);
- pSettings[SC_HORIZONTAL_SPLIT_MODE].Name = SC_HORIZONTALSPLITMODE;
- pSettings[SC_HORIZONTAL_SPLIT_MODE].Value <<= sal_Int16(eExHSplitMode);
- pSettings[SC_VERTICAL_SPLIT_MODE].Name = SC_VERTICALSPLITMODE;
- pSettings[SC_VERTICAL_SPLIT_MODE].Value <<= sal_Int16(eExVSplitMode);
- pSettings[SC_HORIZONTAL_SPLIT_POSITION].Name = SC_HORIZONTALSPLITPOSITION;
- if (eExHSplitMode == SC_SPLIT_FIX)
- pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nExFixPosX);
- else
- pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nExHSplitPos);
- pSettings[SC_VERTICAL_SPLIT_POSITION].Name = SC_VERTICALSPLITPOSITION;
- if (eExVSplitMode == SC_SPLIT_FIX)
- pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nExFixPosY);
- else
- pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nExVSplitPos);
+
+ // Write freezepan data only when freeze pans are set
+ if(nExFixPosX != 0 || nExFixPosY != 0 || nExHSplitPos != 0 || nExVSplitPos != 0)
+ {
+ pSettings[SC_HORIZONTAL_SPLIT_MODE].Name = SC_HORIZONTALSPLITMODE;
+ pSettings[SC_HORIZONTAL_SPLIT_MODE].Value <<= sal_Int16(eExHSplitMode);
+ pSettings[SC_VERTICAL_SPLIT_MODE].Name = SC_VERTICALSPLITMODE;
+ pSettings[SC_VERTICAL_SPLIT_MODE].Value <<= sal_Int16(eExVSplitMode);
+ pSettings[SC_HORIZONTAL_SPLIT_POSITION].Name = SC_HORIZONTALSPLITPOSITION;
+ if (eExHSplitMode == SC_SPLIT_FIX)
+ pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nExFixPosX);
+ else
+ pSettings[SC_HORIZONTAL_SPLIT_POSITION].Value <<= sal_Int32(nExHSplitPos);
+ pSettings[SC_VERTICAL_SPLIT_POSITION].Name = SC_VERTICALSPLITPOSITION;
+ if (eExVSplitMode == SC_SPLIT_FIX)
+ pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nExFixPosY);
+ else
+ pSettings[SC_VERTICAL_SPLIT_POSITION].Value <<= sal_Int32(nExVSplitPos);
+ }
+
// Prevent writing odd settings that would make crash versions that
// don't apply SanitizeWhichActive() when reading the settings.
// See tdf#117093
@@ -2273,7 +2279,8 @@ void ScViewData::SetTabNo( SCTAB nNewTab )
ScPositionHelper* ScViewData::GetLOKWidthHelper(SCTAB nTabIndex)
{
- if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
+ if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())) ||
+ !maTabData[nTabIndex])
{
return nullptr;
}
@@ -2282,7 +2289,8 @@ ScPositionHelper* ScViewData::GetLOKWidthHelper(SCTAB nTabIndex)
ScPositionHelper* ScViewData::GetLOKHeightHelper(SCTAB nTabIndex)
{
- if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())))
+ if (!ValidTab(nTabIndex) || (nTabIndex >= static_cast<SCTAB>(maTabData.size())) ||
+ !maTabData[nTabIndex])
{
return nullptr;
}
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 42395787792a..da627069252b 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -21,6 +21,7 @@
#include <svx/svdpage.hxx>
#include <sfx2/docfile.hxx>
#include <comphelper/classids.hxx>
+#include <comphelper/lok.hxx>
#include <sot/formats.hxx>
#include <sot/storage.hxx>
#include <vcl/graph.hxx>
@@ -765,7 +766,15 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi )
nullptr, false, !bApi ); // allow warning dialog
if ( !bRet && !bApi )
+ {
ErrorMessage(STR_PASTE_ERROR);
+ }
+ else if (comphelper::LibreOfficeKit::isActive())
+ {
+ SfxViewShell* pViewShell = rViewData.GetViewShell();
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(pViewShell, true /* bColumns */, true /* bRows */,
+ true /* bSizes */, false /* bHidden */, false /* bFiltered */, false /* bGroups */, rViewData.GetTabNo());
+ }
}
return bRet;
}
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index facb25c9ddb1..588c81832ea8 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -51,6 +51,7 @@
#include <viewfunc.hxx>
#include <docsh.hxx>
+#include <drwlayer.hxx>
#include <drawview.hxx>
#include <impex.hxx>
#include <dbdata.hxx>
@@ -147,14 +148,39 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
SCCOL nFirstCol, nLastCol;
SCROW nFirstRow, nLastRow;
if ( rSrcDoc.GetDataStart( nSrcTab, nFirstCol, nFirstRow ) )
+ {
rSrcDoc.GetCellArea( nSrcTab, nLastCol, nLastRow );
+ if (nLastCol < nFirstCol)
+ nLastCol = nFirstCol;
+ if (nLastRow < nFirstRow)
+ nLastRow = nFirstRow;
+ }
else
{
nFirstCol = nLastCol = 0;
nFirstRow = nLastRow = 0;
}
+
+ bool bIncludeObjects = false; // include drawing layer objects in CopyToClip ?
+
+ if (nFormatId == SotClipboardFormatId::EMBED_SOURCE)
+ {
+ const ScDrawLayer* pDraw = rSrcDoc.GetDrawLayer();
+ SCCOL nPrintEndCol = nFirstCol;
+ SCROW nPrintEndRow = nFirstRow;
+ bool bHasObjects = pDraw && pDraw->HasObjects();
+ // Extend the range to include the drawing layer objects.
+ if (bHasObjects && rSrcDoc.GetPrintArea(nSrcTab, nPrintEndCol, nPrintEndRow, true))
+ {
+ nLastCol = std::max<SCCOL>(nLastCol, nPrintEndCol);
+ nLastRow = std::max<SCROW>(nLastRow, nPrintEndRow);
+ }
+
+ bIncludeObjects = bHasObjects;
+ }
+
ScClipParam aClipParam(ScRange(nFirstCol, nFirstRow, nSrcTab, nLastCol, nLastRow, nSrcTab), false);
- rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark, false, false);
+ rSrcDoc.CopyToClip(aClipParam, pClipDoc.get(), &aSrcMark, false, bIncludeObjects);
ScGlobal::SetClipDocName( xDocShRef->GetTitle( SFX_TITLE_FULLNAME ) );
SetCursor( nPosX, nPosY );
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index e5b1da40162c..08f8ac2f8ce2 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1479,7 +1479,8 @@ void ScViewFunc::OnLOKInsertDeleteColumn(SCCOL nStartCol, long nOffset)
ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
if (pTabViewShell && pTabViewShell->GetDocId() == pCurrentViewShell->GetDocId())
{
- pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex)->invalidateByIndex(nStartCol);
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKWidthHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStartCol);
// if we remove a column the cursor position and the current selection
// in other views could need to be moved on the left by one column.
@@ -1535,7 +1536,8 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, long nOffset)
ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
if (pTabViewShell && pTabViewShell->GetDocId() == pCurrentViewShell->GetDocId())
{
- pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex)->invalidateByIndex(nStartRow);
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nCurrentTabIndex))
+ pPosHelper->invalidateByIndex(nStartRow);
// if we remove a row the cursor position and the current selection
// in other views could need to be moved up by one row.
@@ -1592,9 +1594,15 @@ void ScViewFunc::OnLOKSetWidthOrHeight(SCCOLROW nStart, bool bWidth)
if (pTabViewShell && pTabViewShell->GetDocId() == pCurrentViewShell->GetDocId())
{
if (bWidth)
- pTabViewShell->GetViewData().GetLOKWidthHelper(nCurTab)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKWidthHelper(nCurTab))
+ pPosHelper->invalidateByIndex(nStart);
+ }
else
- pTabViewShell->GetViewData().GetLOKHeightHelper(nCurTab)->invalidateByIndex(nStart);
+ {
+ if (ScPositionHelper* pPosHelper = pTabViewShell->GetViewData().GetLOKHeightHelper(nCurTab))
+ pPosHelper->invalidateByIndex(nStart);
+ }
}
pViewShell = SfxViewShell::GetNext(*pViewShell);
}
@@ -1605,7 +1613,8 @@ void ScViewFunc::OnLOKSetWidthOrHeight(SCCOLROW nStart, bool bWidth)
bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste )
{
ScRange aRange;
- if (GetViewData().GetSimpleArea(aRange) == SC_MARK_SIMPLE)
+ ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
+ if (eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED)
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
const ScMarkData& rMark = GetViewData().GetMarkData();
diff --git a/sc/uiconfig/scalc/ui/textimportcsv.ui b/sc/uiconfig/scalc/ui/textimportcsv.ui
index 948c5334aaf9..a58d50994397 100644
--- a/sc/uiconfig/scalc/ui/textimportcsv.ui
+++ b/sc/uiconfig/scalc/ui/textimportcsv.ui
@@ -111,7 +111,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
@@ -119,20 +118,6 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkLabel" id="textcharset">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="textimportcsv|textcharset">Ch_aracter set:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">charset</property>
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
<object class="GtkLabel" id="textlanguage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -166,8 +151,9 @@
<property name="can_focus">False</property>
</object>
<packing>
- <property name="left_attach">1</property>
+ <property name="left_attach">0</property>
<property name="top_attach">0</property>
+ <property name="width">2</property>
</packing>
</child>
<child>
@@ -201,7 +187,7 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="textimportcsv|label1">Import</property>
+ <property name="label" translatable="yes" context="textimportcsv|label1">Character encoding</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -227,7 +213,6 @@
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
@@ -242,25 +227,8 @@
<property name="hexpand">True</property>
<property name="homogeneous">True</property>
<child>
- <object class="GtkRadioButton" id="tofixedwidth">
- <property name="label" translatable="yes" context="textimportcsv|tofixedwidth">_Fixed width</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="use_underline">True</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
- <property name="group">toseparatedby</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="toseparatedby">
- <property name="label" translatable="yes" context="textimportcsv|toseparatedby">_Separated by</property>
+ <object class="GtkCheckButton" id="toseparatedby">
+ <property name="label" translatable="yes" context="textimportcsv|toseparatedby">_Use separators</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -287,7 +255,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
@@ -534,7 +501,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
@@ -624,7 +590,6 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
- <property name="left_padding">12</property>
<child>
<object class="GtkBox" id="box4">
<property name="visible">True</property>
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/Library_sd.mk b/sd/Library_sd.mk
index 410f3c782b29..b796800f62b7 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -408,6 +408,7 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/tools/AsynchronousCall \
sd/source/ui/tools/ConfigurationAccess \
sd/source/ui/tools/EventMultiplexer \
+ sd/source/ui/tools/GraphicSizeCheck \
sd/source/ui/tools/IconCache \
sd/source/ui/tools/IdleDetection \
sd/source/ui/tools/PreviewRenderer \
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index b5b6e574ca0c..e560a6925210 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -200,6 +200,8 @@ private:
bool mbEmbedFontScriptAsian : 1;
bool mbEmbedFontScriptComplex : 1;
+ sal_Int32 mnImagePreferredDPI;
+
SAL_DLLPRIVATE virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override;
public:
@@ -626,6 +628,9 @@ public:
SAL_DLLPRIVATE void SetEmbedFontScriptAsian(bool bUse) { mbEmbedFontScriptAsian = bUse; }
SAL_DLLPRIVATE void SetEmbedFontScriptComplex(bool bUse) { mbEmbedFontScriptComplex = bUse; }
+ sal_Int32 getImagePreferredDPI() const override { return mnImagePreferredDPI; }
+ void setImagePreferredDPI(sal_Int32 nValue) { mnImagePreferredDPI = nValue; }
+
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
private:
diff --git a/sd/qa/unit/data/odp/numfmt.odp b/sd/qa/unit/data/odp/numfmt.odp
index 6fd32ce0a66d..51227ea091d9 100644
--- a/sd/qa/unit/data/odp/numfmt.odp
+++ b/sd/qa/unit/data/odp/numfmt.odp
Binary files differ
diff --git a/sd/qa/unit/data/pptx/numfmt.pptx b/sd/qa/unit/data/pptx/numfmt.pptx
index aca6927101d6..f855fbbeb12c 100644
--- a/sd/qa/unit/data/pptx/numfmt.pptx
+++ b/sd/qa/unit/data/pptx/numfmt.pptx
Binary files differ
diff --git a/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx b/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx
new file mode 100644
index 000000000000..e7fcacc25482
--- /dev/null
+++ b/sd/qa/unit/data/pptx/pass/ofz35597-1.pptx
Binary files differ
diff --git a/sd/qa/unit/data/pptx/slidenum_field.pptx b/sd/qa/unit/data/pptx/slidenum_field.pptx
index f3c184056905..3388568831d7 100644
--- a/sd/qa/unit/data/pptx/slidenum_field.pptx
+++ b/sd/qa/unit/data/pptx/slidenum_field.pptx
Binary files differ
diff --git a/sd/qa/unit/data/pptx/tdf142716.pptx b/sd/qa/unit/data/pptx/tdf142716.pptx
new file mode 100644
index 000000000000..4ef29e389449
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf142716.pptx
Binary files differ
diff --git a/sd/qa/unit/data/pptx/tdf143222.pptx b/sd/qa/unit/data/pptx/tdf143222.pptx
new file mode 100644
index 000000000000..63938d1bdc71
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf143222.pptx
Binary files differ
diff --git a/sd/qa/unit/data/pptx/tdf59323.pptx b/sd/qa/unit/data/pptx/tdf59323.pptx
new file mode 100755
index 000000000000..0660c0af4f23
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf59323.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 27d42132557f..a6279f8eadf1 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -12,6 +12,7 @@
#include <comphelper/sequence.hxx>
#include <editeng/eeitem.hxx>
#include <editeng/editobj.hxx>
+#include <editeng/flditem.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/numitem.hxx>
#include <editeng/unoprnms.hxx>
@@ -20,6 +21,7 @@
#include <svx/svdomedia.hxx>
#include <svx/xlineit0.hxx>
#include <svx/xlndsit.hxx>
+#include <svx/svdoole2.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/drawing/XDrawPage.hpp>
@@ -189,6 +191,8 @@ public:
void testTdf132282();
void testTdf128213ShapeRot();
void testTdf96061_textHighlight();
+ void testTdf59323_slideFooters();
+ void testTdf143222_embeddedWorksheet();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -296,6 +300,8 @@ public:
CPPUNIT_TEST(testTdf132282);
CPPUNIT_TEST(testTdf128213ShapeRot);
CPPUNIT_TEST(testTdf96061_textHighlight);
+ CPPUNIT_TEST(testTdf59323_slideFooters);
+ CPPUNIT_TEST(testTdf143222_embeddedWorksheet);
CPPUNIT_TEST_SUITE_END();
@@ -749,26 +755,33 @@ void matchNumberFormat( int nPage, uno::Reference< text::XTextField > const & xF
xPropSet->getPropertyValue("NumberFormat") >>= nNumFmt;
switch( nPage )
{
- case 0: // 13/02/96
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(2), nNumFmt);
+ case 0: // 13/02/96 (StdSmall)
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::StdSmall), nNumFmt);
break;
case 1: // 13/02/1996
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(5), nNumFmt);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::B), nNumFmt);
break;
- case 2: // 13 February 1996
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(3), nNumFmt);
+ case 2: // Tuesday, June 29, 2021 (StdBig)
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::StdBig), nNumFmt);
break;
- case 3: // 13:49:38
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(2), nNumFmt);
+ case 3: // 13:49:38 (Standard)
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(SvxTimeFormat::Standard), nNumFmt);
break;
case 4: // 13:49
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(3), nNumFmt);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(SvxTimeFormat::HH24_MM), nNumFmt);
break;
case 5: // 01:49 PM
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(6), nNumFmt);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(SvxTimeFormat::HH12_MM), nNumFmt);
break;
case 6: // 01:49:38 PM
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(7), nNumFmt);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Time fields don't match", sal_Int32(SvxTimeFormat::HH12_MM_SS), nNumFmt);
+ break;
+ case 7: // June 29, 2021
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::D), nNumFmt);
+ break;
+ case 8: // Jun 29, 2021
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Number formats of Date fields don't match", sal_Int32(SvxDateFormat::C), nNumFmt);
+ break;
}
}
@@ -780,7 +793,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormat()
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
- for(sal_uInt16 i = 0; i <= 6; ++i)
+ for(sal_uInt16 i = 0; i <= 8; ++i)
{
matchNumberFormat( i, getTextFieldFromPage(0, 0, 0, i, xDocShRef) );
}
@@ -794,7 +807,7 @@ void SdOOXMLExportTest2::testDatetimeFieldNumberFormatPPTX()
xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
- for(sal_uInt16 i = 0; i <= 6; ++i)
+ for(sal_uInt16 i = 0; i <= 8; ++i)
{
matchNumberFormat( i, getTextFieldFromPage(0, 0, 0, i, xDocShRef) );
}
@@ -2788,6 +2801,72 @@ void SdOOXMLExportTest2::testTdf96061_textHighlight()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aColor);
}
+void SdOOXMLExportTest2::testTdf59323_slideFooters()
+{
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf59323.pptx"), PPTX);
+
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDoc->getDrawPages()->getCount());
+
+ for (int nPageIndex = 0; nPageIndex < 3; nPageIndex++)
+ {
+ uno::Reference<drawing::XDrawPage> xPage(getPage(0, xDocShRef));
+ uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsFooterVisible").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsDateTimeVisible").get<bool>());
+ CPPUNIT_ASSERT_EQUAL(true, xPropSet->getPropertyValue("IsPageNumberVisible").get<bool>());
+ }
+
+ // Test placeholder indexes
+ xmlDocPtr pXmlDocMaster = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='dt']", "idx", "1");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']", "idx", "2");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']", "idx", "3");
+
+ xmlDocPtr pXmlDocSlide1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']", "idx", "1");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']", "idx", "2");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']", "idx", "3");
+
+ // Test if datetime fields have text in them
+ // This is needed for backwards compatibility
+ assertXPath(pXmlDocSlide1, "//a:fld [@type='datetime1']/a:t");
+
+ xDocShRef->DoClose();
+}
+
+void SdOOXMLExportTest2::testTdf143222_embeddedWorksheet()
+{
+ // Check import of embedded worksheet in slide.
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf143222.pptx"), PPTX);
+
+ const SdrPage* pPage = GetPage(1, xDocShRef.get());
+ const SdrOle2Obj* pOleObj = static_cast<SdrOle2Obj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT_MESSAGE("no object", pOleObj != nullptr);
+
+ // Without the fix we lost the graphic of ole object.
+ const Graphic* pGraphic = pOleObj->GetGraphic();
+ CPPUNIT_ASSERT_MESSAGE("no graphic", pGraphic != nullptr);
+
+ // Check export of embedded worksheet in slide.
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+
+ pPage = GetPage(1, xDocShRef.get());
+ pOleObj = static_cast<SdrOle2Obj*>(pPage->GetObj(0));
+ CPPUNIT_ASSERT_MESSAGE("no object after the export", pOleObj != nullptr);
+
+ pGraphic = pOleObj->GetGraphic();
+ CPPUNIT_ASSERT_MESSAGE("no graphic after the export", pGraphic != nullptr);
+ xDocShRef->DoClose();
+}
+
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index fdad324b216a..f246f6568534 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -56,6 +56,7 @@ public:
void testImageWithSpecialID();
void testTdf62176();
void testTransparentBackground();
+ void testTdf142716();
void testEmbeddedPdf();
void testEmbeddedText();
void testTransparenText();
@@ -90,6 +91,7 @@ public:
CPPUNIT_TEST(testImageWithSpecialID);
CPPUNIT_TEST(testTdf62176);
CPPUNIT_TEST(testTransparentBackground);
+ CPPUNIT_TEST(testTdf142716);
CPPUNIT_TEST(testEmbeddedPdf);
CPPUNIT_TEST(testEmbeddedText);
CPPUNIT_TEST(testTransparenText);
@@ -282,6 +284,22 @@ void SdExportTest::testTransparentBackground()
xDocShRef->DoClose();
}
+void SdExportTest::testTdf142716()
+{
+ ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf142716.pptx"), PPTX);
+ xDocShRef = saveAndReload( xDocShRef.get(), PPTX );
+
+ const SdrPage *pPage = GetPage( 1, xDocShRef );
+ const SdrTextObj *pObj = dynamic_cast<SdrTextObj *>( pPage->GetObj( 0 ) );
+
+ OUString sText = pObj->GetOutlinerParaObject()->GetTextObject().GetText(0);
+
+ // Without fix "yyy" part will be lost.
+ CPPUNIT_ASSERT_EQUAL( OUString( "xxx and yyy" ), sText);
+
+ xDocShRef->DoClose();
+}
+
void SdExportTest::testMediaEmbedding()
{
if (!OpenGLWrapper::isVCLOpenGLEnabled())
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 32779db85579..2e7cbf2690f2 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1702,7 +1702,7 @@ void SdImportTest::testTdf95932()
sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf95932.pptx"), PPTX);
const SdrPage *pPage = GetPage( 1, xDocShRef );
- SdrObject *const pObj = pPage->GetObj(2);
+ SdrObject *const pObj = pPage->GetObj(1);
CPPUNIT_ASSERT(pObj);
const XFillStyleItem& rStyleItem = dynamic_cast<const XFillStyleItem&>(
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 5797bdda4348..4e9dfe4c8b59 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -64,7 +64,7 @@ public:
void testTdf96206();
void testTdf96708();
void testTdf99396();
- void testTdf99396TextEdit();
+ void testTableObjectUndoTest();
void testFillGradient();
void testTdf44774();
void testTdf38225();
@@ -81,7 +81,7 @@ public:
CPPUNIT_TEST(testTdf96206);
CPPUNIT_TEST(testTdf96708);
CPPUNIT_TEST(testTdf99396);
- CPPUNIT_TEST(testTdf99396TextEdit);
+ CPPUNIT_TEST(testTableObjectUndoTest);
CPPUNIT_TEST(testFillGradient);
CPPUNIT_TEST(testTdf44774);
CPPUNIT_TEST(testTdf38225);
@@ -252,8 +252,10 @@ void SdMiscTest::testTdf99396()
xDocSh->DoClose();
}
-void SdMiscTest::testTdf99396TextEdit()
+void SdMiscTest::testTableObjectUndoTest()
{
+ // See tdf#99396 for the issue
+
// Load the document and select the table.
sd::DrawDocShellRef xDocSh = Load(m_directories.getURLFromSrc("/sd/qa/unit/data/tdf99396.odp"), ODP);
sd::ViewShell* pViewShell = xDocSh->GetViewShell();
@@ -279,14 +281,26 @@ void SdMiscTest::testTdf99396TextEdit()
const SfxItemSet* pArgs = aRequest.GetArgs();
pView->SetAttributes(*pArgs);
}
+ const auto& pLocalUndoManager = pView->getViewLocalUndoManager();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pLocalUndoManager->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Apply attributes"), pLocalUndoManager->GetUndoActionComment());
{
auto pTableController = dynamic_cast<sdr::table::SvxTableController*>(pView->getSelectionController().get());
CPPUNIT_ASSERT(pTableController);
SfxRequest aRequest(pViewShell->GetViewFrame(), SID_TABLE_VERT_BOTTOM);
pTableController->Execute(aRequest);
}
+ // Global change "Format cell" is applied only - Change the vertical alignment to "Bottom"
+ CPPUNIT_ASSERT_EQUAL(size_t(1), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Format cell"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment());
+
pView->SdrEndTextEdit();
+ // End of text edit, so the text edit action is added to the undo stack
+ CPPUNIT_ASSERT_EQUAL(size_t(2), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Edit text of Table"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(0));
+ CPPUNIT_ASSERT_EQUAL(OUString("Format cell"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(1));
+
// Check that the result is what we expect.
{
uno::Reference<table::XTable> xTable = pTableObject->getTable();
@@ -304,6 +318,10 @@ void SdMiscTest::testTdf99396TextEdit()
// Now undo.
xDocSh->GetUndoManager()->Undo();
+ // Undoing the last action - one left
+ CPPUNIT_ASSERT_EQUAL(size_t(1), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Format cell"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(0));
+
// Check again that the result is what we expect.
{
uno::Reference<table::XTable> xTable = pTableObject->getTable();
@@ -319,6 +337,9 @@ void SdMiscTest::testTdf99396TextEdit()
CPPUNIT_ASSERT_EQUAL(SvxAdjust::Center, pAdjust->GetAdjust());
}
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Format cell"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(0));
/*
* now test tdf#103950 - Undo does not revert bundled font size changes for table cells
@@ -329,8 +350,11 @@ void SdMiscTest::testTdf99396TextEdit()
SfxRequest aRequest(pViewShell->GetViewFrame(), SID_GROW_FONT_SIZE);
static_cast<sd::DrawViewShell*>(pViewShell)->ExecChar(aRequest);
}
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
-
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Apply attributes to Table"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(0));
+ CPPUNIT_ASSERT_EQUAL(OUString("Grow font size"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(1));
+ CPPUNIT_ASSERT_EQUAL(OUString("Format cell"), xDocSh->GetDoc()->GetUndoManager()->GetUndoActionComment(2));
xDocSh->DoClose();
}
diff --git a/sd/qa/unit/tiledrendering/data/TextBoxAndRect.odg b/sd/qa/unit/tiledrendering/data/TextBoxAndRect.odg
new file mode 100644
index 000000000000..aa1a37b83147
--- /dev/null
+++ b/sd/qa/unit/tiledrendering/data/TextBoxAndRect.odg
Binary files differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 99c30b852a40..b39321948e32 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -132,6 +132,7 @@ public:
void testSlideDuplicateUndo();
void testMoveShapeHandle();
void testDeleteTable();
+ void testShapeEditInMultipleViews();
CPPUNIT_TEST_SUITE(SdTiledRenderingTest);
CPPUNIT_TEST(testCreateDestroy);
@@ -189,7 +190,7 @@ public:
CPPUNIT_TEST(testSlideDuplicateUndo);
CPPUNIT_TEST(testMoveShapeHandle);
CPPUNIT_TEST(testDeleteTable);
-
+ CPPUNIT_TEST(testShapeEditInMultipleViews);
CPPUNIT_TEST_SUITE_END();
private:
@@ -1316,6 +1317,38 @@ void SdTiledRenderingTest::testUndoLimiting()
Scheduler::ProcessEventsToIdle();
CPPUNIT_ASSERT(pViewShell1->GetView()->IsTextEdit());
+ // View2 UNDO stack should be empty
+ {
+ SfxRequest aReq2(SID_UNDO, SfxCallMode::SLOT, pXImpressDocument->GetDocShell()->GetDoc()->GetPool());
+ aReq2.AppendItem(SfxUInt16Item(SID_UNDO, 1));
+ pViewShell2->ExecuteSlot(aReq2);
+ const auto* pReturnValue = aReq2.GetReturnValue();
+ CPPUNIT_ASSERT(!pReturnValue);
+ }
+
+ // View1 can UNDO
+ {
+ SfxRequest aReq1(SID_UNDO, SfxCallMode::SLOT, pXImpressDocument->GetDocShell()->GetDoc()->GetPool());
+ aReq1.AppendItem(SfxUInt16Item(SID_UNDO, 1));
+ pViewShell1->ExecuteSlot(aReq1);
+ CPPUNIT_ASSERT(aReq1.IsDone());
+ }
+
+ // View1 can REDO
+ {
+ SfxRequest aReq1(SID_REDO, SfxCallMode::SLOT, pXImpressDocument->GetDocShell()->GetDoc()->GetPool());
+ aReq1.AppendItem(SfxUInt16Item(SID_REDO, 1));
+ pViewShell1->ExecuteSlot(aReq1);
+ CPPUNIT_ASSERT(aReq1.IsDone());
+ }
+
+ // Exit text edit mode
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+
+ CPPUNIT_ASSERT(!pViewShell1->GetView()->IsTextEdit());
+
// Now check view2 cannot undo actions.
{
SfxRequest aReq2(SID_UNDO, SfxCallMode::SLOT, pXImpressDocument->GetDocShell()->GetDoc()->GetPool());
@@ -2073,11 +2106,19 @@ void SdTiledRenderingTest::testDisableUndoRepair()
{
// Load the document.
SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
+
+ // Create View 1
SfxViewShell* pView1 = SfxViewShell::Current();
+ sd::ViewShell* pViewShell1 = pXImpressDocument->GetDocShell()->GetViewShell();
int nView1 = SfxLokHelper::getView();
+
+ // Create View 2
SfxLokHelper::createView();
SfxViewShell* pView2 = SfxViewShell::Current();
+ sd::ViewShell* pViewShell2 = pXImpressDocument->GetDocShell()->GetViewShell();
int nView2 = SfxLokHelper::getView();
+
+ // Check UNDO is disabled
{
std::unique_ptr<SfxPoolItem> pItem1;
std::unique_ptr<SfxPoolItem> pItem2;
@@ -2092,15 +2133,24 @@ void SdTiledRenderingTest::testDisableUndoRepair()
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'h', 0);
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'h', 0);
Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(pViewShell1->GetView()->IsTextEdit());
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(!pViewShell1->GetView()->IsTextEdit());
+
+ // Check
{
std::unique_ptr<SfxPoolItem> xItem1;
- std::unique_ptr<SfxPoolItem> xItem2;
pView1->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem1);
+ const auto* pUInt32Item1 = dynamic_cast<const SfxUInt32Item*>(xItem1.get());
+ CPPUNIT_ASSERT(!pUInt32Item1);
+
+ std::unique_ptr<SfxPoolItem> xItem2;
pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem2);
- CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item* >(xItem1.get()));
- const SfxUInt32Item* pUInt32Item = dynamic_cast<const SfxUInt32Item*>(xItem2.get());
- CPPUNIT_ASSERT(pUInt32Item);
- CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item->GetValue());
+ const auto* pUInt32Item2 = dynamic_cast<const SfxUInt32Item*>(xItem2.get());
+ CPPUNIT_ASSERT(pUInt32Item2);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item2->GetValue());
}
// Insert a character in the second view.
@@ -2111,15 +2161,23 @@ void SdTiledRenderingTest::testDisableUndoRepair()
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0);
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'c', 0);
Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(pViewShell2->GetView()->IsTextEdit());
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(!pViewShell2->GetView()->IsTextEdit());
+
+ // Check
{
std::unique_ptr<SfxPoolItem> xItem1;
- std::unique_ptr<SfxPoolItem> xItem2;
pView1->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem2);
- CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item* >(xItem2.get()));
const SfxUInt32Item* pUInt32Item = dynamic_cast<const SfxUInt32Item*>(xItem1.get());
CPPUNIT_ASSERT(pUInt32Item);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(SID_REPAIRPACKAGE), pUInt32Item->GetValue());
+
+ std::unique_ptr<SfxPoolItem> xItem2;
+ pView2->GetViewFrame()->GetBindings().QueryState(SID_UNDO, xItem2);
+ CPPUNIT_ASSERT(!dynamic_cast< const SfxUInt32Item* >(xItem2.get()));
}
}
@@ -2136,17 +2194,20 @@ void SdTiledRenderingTest::testDocumentRepair()
SfxLokHelper::createView();
SfxViewShell* pView2 = SfxViewShell::Current();
int nView2 = SfxLokHelper::getView();
+ sd::ViewShell* pViewShell2 = pXImpressDocument->GetDocShell()->GetViewShell();
+
CPPUNIT_ASSERT(pView1 != pView2);
{
std::unique_ptr<SfxPoolItem> xItem1;
- std::unique_ptr<SfxPoolItem> xItem2;
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem2);
const SfxBoolItem* pItem1 = dynamic_cast<const SfxBoolItem*>(xItem1.get());
- const SfxBoolItem* pItem2 = dynamic_cast<const SfxBoolItem*>(xItem2.get());
CPPUNIT_ASSERT(pItem1);
- CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(false, pItem1->GetValue());
+
+ std::unique_ptr<SfxPoolItem> xItem2;
+ pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem2);
+ const SfxBoolItem* pItem2 = dynamic_cast<const SfxBoolItem*>(xItem2.get());
+ CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(false, pItem2->GetValue());
}
@@ -2158,16 +2219,23 @@ void SdTiledRenderingTest::testDocumentRepair()
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'c', 0);
pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'c', 0);
Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(pViewShell2->GetView()->IsTextEdit());
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, awt::Key::ESCAPE);
+ pXImpressDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, awt::Key::ESCAPE);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT(!pViewShell2->GetView()->IsTextEdit());
+
{
std::unique_ptr<SfxPoolItem> xItem1;
- std::unique_ptr<SfxPoolItem> xItem2;
pView1->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem1);
- pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem2);
const SfxBoolItem* pItem1 = dynamic_cast<const SfxBoolItem*>(xItem1.get());
- const SfxBoolItem* pItem2 = dynamic_cast<const SfxBoolItem*>(xItem2.get());
CPPUNIT_ASSERT(pItem1);
- CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(true, pItem1->GetValue());
+
+ std::unique_ptr<SfxPoolItem> xItem2;
+ pView2->GetViewFrame()->GetBindings().QueryState(SID_DOC_REPAIR, xItem2);
+ const SfxBoolItem* pItem2 = dynamic_cast<const SfxBoolItem*>(xItem2.get());
+ CPPUNIT_ASSERT(pItem2);
CPPUNIT_ASSERT_EQUAL(true, pItem2->GetValue());
}
}
@@ -2398,21 +2466,9 @@ void SdTiledRenderingTest::testPasteTextOnSlide()
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>(pObject);
CPPUNIT_ASSERT(pTextObj);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(OBJ_TEXT), pTextObj->GetObjIdentifier());
- // This test is unreliable: it gives alternating results for the following coordinates.
- // As a compromise, instead of disabling it altogether, we allow for both sets of values.
const Point aPos = pTextObj->GetLastBoundRect().TopLeft();
- if (aPos.getX() < 10000)
- {
- // We get this with 'make CppunitTest_sd_tiledrendering'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(6739), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(6822), aPos.getY(), 100);
- }
- else
- {
- // We get this with 'make check'
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(12990), aPos.getX(), 100);
- CPPUNIT_ASSERT_DOUBLES_EQUAL(static_cast<long>(7393), aPos.getY(), 100);
- }
+ CPPUNIT_ASSERT_EQUAL(static_cast<long>(0), aPos.getX());
+ CPPUNIT_ASSERT_EQUAL(static_cast<long>(0), aPos.getY());
}
void SdTiledRenderingTest::testTdf115873()
@@ -2689,7 +2745,244 @@ void SdTiledRenderingTest::testMoveShapeHandle()
CPPUNIT_ASSERT_EQUAL(x-1, oldX);
CPPUNIT_ASSERT_EQUAL(y-1, oldY);
}
+}
+
+void SdTiledRenderingTest::testShapeEditInMultipleViews()
+{
+ SdXImpressDocument* pXImpressDocument = createDoc("TextBoxAndRect.odg");
+ pXImpressDocument->initializeForTiledRendering(uno::Sequence<beans::PropertyValue>());
+ SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
+
+ // Create view 1
+ const int nView1 = SfxLokHelper::getView();
+ sd::ViewShell* pViewShell1 = pXImpressDocument->GetDocShell()->GetViewShell();
+ SdrView* pView1 = pViewShell1->GetView();
+ Scheduler::ProcessEventsToIdle();
+
+ // Create view 2
+ SfxLokHelper::createView();
+ const int nView2 = SfxLokHelper::getView();
+ CPPUNIT_ASSERT(nView1 != nView2);
+
+ sd::ViewShell* pViewShell2 = pXImpressDocument->GetDocShell()->GetViewShell();
+ SdrView* pView2 = pViewShell2->GetView();
+ Scheduler::ProcessEventsToIdle();
+
+ // Switch to view 1
+ SfxLokHelper::setView(nView1);
+
+ SdPage* pPage1 = pViewShell1->GetActualPage();
+
+ SdrObject* pTextBoxObject = pPage1->GetObj(0);
+ CPPUNIT_ASSERT_EQUAL(OUString("Text Box"), pTextBoxObject->GetName());
+
+ SdrObject* pRectangleObject = pPage1->GetObj(1);
+ CPPUNIT_ASSERT_EQUAL(OUString("Rect"), pRectangleObject->GetName());
+
+ SdrObject* pTableObject = pPage1->GetObj(2);
+ CPPUNIT_ASSERT_EQUAL(OUString("Table1"), pTableObject->GetName());
+
+ // Scenario 1
+ // 2 shapes - "Text Box" and "Rect"
+ // View1 - "Text Box" enters text edit mode, View 2 - moves the "Rect" around
+ {
+ sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pUndoManager->GetUndoActionCount());
+
+ pView1->SdrBeginTextEdit(pTextBoxObject);
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // Local undo count for View1 is 0
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+ // Write 'test' in View1
+ SfxStringItem aInputString(SID_ATTR_CHAR, "test");
+ pViewShell1->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR, SfxCallMode::SYNCHRON, { &aInputString });
+ // Local undo count for View1 is now 1
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+
+ // Mark rectangle object
+ pView2->MarkObj(pRectangleObject, pView2->GetSdrPageView());
+
+ // Check the initial position of the object
+ tools::Rectangle aRectangle = pRectangleObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(6250L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(7000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(6501L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(4501L, aRectangle.GetHeight());
+
+ // On View2 - Move handle 0 on the shape to a new mosition - resize
+ Point aNewPosition = aRectangle.TopLeft() + Point(-1250, -1000);
+ pView2->MoveShapeHandle(0, aNewPosition, -1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pUndoManager->GetUndoActionCount());
+
+ // Check the object has a new size
+ aRectangle = pRectangleObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(5000L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(6000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(7751L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(5501L, aRectangle.GetHeight());
+
+ // View1 is still in text edit mode...
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // On View2 - relative move the shape to a different position
+ pView2->MoveMarkedObj(Size(1000, 2000), /*bCopy=*/false);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pUndoManager->GetUndoActionCount());
+
+ // Check the object is at a different position
+ aRectangle = pRectangleObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(6000L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(8000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(7751L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(5501L, aRectangle.GetHeight());
+
+ // View1 is still in text edit mode...
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // End Text edit - check undo count increase from 2 -> 3
+ CPPUNIT_ASSERT_EQUAL(size_t(2), pUndoManager->GetUndoActionCount());
+ pView1->SdrEndTextEdit();
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pUndoManager->GetUndoActionCount());
+
+ // Check that both views exited the text edit mode
+ CPPUNIT_ASSERT_EQUAL(false, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+ }
+ // Scenario 2
+ // 1 shapes - "Text Box"
+ // View1 - "Text Box" enters text edit mode, View 2 - moves the "Text Box" around
+ {
+ sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+ CPPUNIT_ASSERT_EQUAL(size_t(3), pUndoManager->GetUndoActionCount());
+
+ pView1->SdrBeginTextEdit(pTextBoxObject);
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // Local undo count for View1 is 0
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+ // Write 'test' in View1
+ SfxStringItem aInputString(SID_ATTR_CHAR, "test");
+ pViewShell1->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR, SfxCallMode::SYNCHRON, { &aInputString });
+ // Local undo count for View1 is now 1
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+
+ // Mark rectangle object
+ pView2->MarkObj(pTextBoxObject, pView2->GetSdrPageView());
+
+ // Check the initial position of the object
+ tools::Rectangle aRectangle = pTextBoxObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(2250L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(2000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(4501L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(2001L, aRectangle.GetHeight());
+
+ // On View2 - Move handle 0 on the shape to a new mosition - resize
+ Point aNewPosition = aRectangle.TopLeft() + Point(-1250, -1000);
+ pView2->MoveShapeHandle(0, aNewPosition, -1);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(4), pUndoManager->GetUndoActionCount());
+
+ // Check the object has a new size
+ aRectangle = pTextBoxObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(1000L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(1000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(4990L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(2175L, aRectangle.GetHeight());
+
+ // View1 is still in text edit mode...
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // On View2 - relative move the shape to a different position
+ pView2->MoveMarkedObj(Size(1000, 2000), /*bCopy=*/false);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(5), pUndoManager->GetUndoActionCount());
+
+ // Check the object is at a different position
+ aRectangle = pTextBoxObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(2000L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(3000L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(4990L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(2175L, aRectangle.GetHeight());
+
+ // View1 is still in text edit mode...
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // End Text edit - check undo count increase from 5 -> 6
+ CPPUNIT_ASSERT_EQUAL(size_t(5), pUndoManager->GetUndoActionCount());
+ pView1->SdrEndTextEdit();
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(6), pUndoManager->GetUndoActionCount());
+
+ // Check that both views exited the text edit mode
+ CPPUNIT_ASSERT_EQUAL(false, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+ }
+
+ // Scenario 3
+ // 1 shapes - "Table1"
+ // View1 - "Table1" enters text edit mode, View 2 - moves the "Table1" around
+ {
+ sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+ CPPUNIT_ASSERT_EQUAL(size_t(6), pUndoManager->GetUndoActionCount());
+
+ pView1->SdrBeginTextEdit(pTableObject);
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // Local undo count for View1 is 0
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+ // Write 'test' in View1
+ SfxStringItem aInputString(SID_ATTR_CHAR, "test");
+ pViewShell1->GetViewFrame()->GetDispatcher()->ExecuteList(SID_ATTR_CHAR, SfxCallMode::SYNCHRON, { &aInputString });
+ // Local undo count for View1 is now 1
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pView1->getViewLocalUndoManager()->GetUndoActionCount());
+
+ // Mark rectangle object
+ pView2->MarkObj(pTableObject, pView2->GetSdrPageView());
+
+ // Check the initial position of the table
+ tools::Rectangle aRectangle = pTableObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(2919L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(18063L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(14099L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(5999L, aRectangle.GetHeight());
+
+ // On View2 - relative move the shape to a different position
+ pView2->MoveMarkedObj(Size(1000, 2000), /*bCopy=*/false);
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(7), pUndoManager->GetUndoActionCount());
+
+ // Check the object is at a different position
+ aRectangle = pTableObject->GetLogicRect();
+ CPPUNIT_ASSERT_EQUAL(3919L, aRectangle.TopLeft().X());
+ CPPUNIT_ASSERT_EQUAL(20063L, aRectangle.TopLeft().Y());
+ CPPUNIT_ASSERT_EQUAL(14099L, aRectangle.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(5999L, aRectangle.GetHeight());
+
+ // View1 is still in text edit mode...
+ CPPUNIT_ASSERT_EQUAL(true, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+
+ // End Text edit - check undo count increase from 7 -> 8
+ CPPUNIT_ASSERT_EQUAL(size_t(7), pUndoManager->GetUndoActionCount());
+ pView1->SdrEndTextEdit();
+ Scheduler::ProcessEventsToIdle();
+ CPPUNIT_ASSERT_EQUAL(size_t(8), pUndoManager->GetUndoActionCount());
+
+ // Check that both views exited the text edit mode
+ CPPUNIT_ASSERT_EQUAL(false, pView1->IsTextEdit());
+ CPPUNIT_ASSERT_EQUAL(false, pView2->IsTextEdit());
+ }
}
CPPUNIT_TEST_SUITE_REGISTRATION(SdTiledRenderingTest);
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 440515544003..3de2e0ff397b 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -76,6 +76,11 @@ interface DrawView
ExecMethod = FuTemporary ;
StateMethod = GetMenuState ;
]
+ SID_GRAPHIC_SIZE_CHECK
+ [
+ ExecMethod = FuTemporary ;
+ StateMethod = GetMenuState ;
+ ]
SID_EXTERNAL_EDIT
[
ExecMethod = FuTemporary ;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index a675db0efb5e..4efd8ec9e6a7 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -3594,7 +3594,7 @@ SfxBoolItem MasterSlidesPanel SID_MASTER_SLIDES_PANEL
GroupId = SfxGroupId::Modify;
]
-SfxVoidItem SlideMasterPage SID_SLIDE_MASTER_MODE
+SfxBoolItem SlideMasterPage SID_SLIDE_MASTER_MODE
()
[
AutoUpdate = FALSE,
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 93074a90ce41..65e254c4b400 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -135,6 +135,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh)
, mbEmbedFontScriptLatin(true)
, mbEmbedFontScriptAsian(true)
, mbEmbedFontScriptComplex(true)
+, mnImagePreferredDPI(0)
{
mpDrawPageListWatcher.reset(new ImpDrawPageListWatcher(*this));
mpMasterPageListWatcher.reset(new ImpMasterPageListWatcher(*this));
diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx
index d4f2b618f25d..eefec66f0432 100644
--- a/sd/source/filter/eppt/epptooxml.hxx
+++ b/sd/source/filter/eppt/epptooxml.hxx
@@ -119,6 +119,15 @@ private:
static void WriteDiagram(const FSHelperPtr& pFS, PowerPointShapeExport& rDML, const css::uno::Reference<css::drawing::XShape>& rXShape, int nDiagramId);
+ /** Create a new placeholder index for a master placeholder shape
+
+ @param rXShape Master placeholder shape
+ @returns Placeholder index
+ */
+ unsigned CreateNewPlaceholderIndex(const css::uno::Reference<css::drawing::XShape>& rXShape);
+ css::uno::Reference<css::drawing::XShape> GetReferencedPlaceholderXShape(const PlaceholderType eType, PageType ePageType) const;
+ void WritePlaceholderReferenceShapes(PowerPointShapeExport& rDML, PageType ePageType);
+
/// Should we export as .pptm, ie. do we contain macros?
bool mbPptm;
@@ -141,6 +150,10 @@ private:
::oox::drawingml::ShapeExport::ShapeHashMap maShapeMap;
+ unsigned mnPlaceholderIndexMax; ///< Last used placeholder index
+ /// Map of placeholder indexes for Master placeholders
+ std::unordered_map< css::uno::Reference<css::drawing::XShape>, unsigned > maPlaceholderShapeToIndexMap;
+
struct AuthorComments {
sal_Int32 nId;
sal_Int32 nLastIndex;
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 8a7db7302ff0..5e93fbb446bf 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -28,6 +28,7 @@
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/storagehelper.hxx>
+#include <comphelper/xmltools.hxx>
#include <sax/fshelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
@@ -52,6 +53,10 @@
#include "pptx-animations.hxx"
#include "../ppt/pptanimations.hxx"
+#include <svx/svdpage.hxx>
+#include <svx/unoapi.hxx>
+#include <sdpage.hxx>
+
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XStorageBasedDocument.hpp>
#include <utility>
@@ -109,7 +114,11 @@ public:
ShapeExport& WriteTextShape(const Reference< XShape >& xShape) override;
ShapeExport& WriteUnknownShape(const Reference< XShape >& xShape) override;
ShapeExport& WritePlaceholderShape(const Reference< XShape >& xShape, PlaceholderType ePlaceholder);
+ /** Writes a placeholder shape that references the placeholder on the master slide */
+ ShapeExport& WritePlaceholderReferenceShape(PlaceholderType ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType ePageType, Reference<XPropertySet>& rXPagePropSet);
ShapeExport& WritePageShape(const Reference< XShape >& xShape, PageType ePageType, bool bPresObj);
+ /** Writes textbody of a placeholder that references the placeholder on the master slide */
+ ShapeExport& WritePlaceholderReferenceTextBody(PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet> xPagePropSet);
// helper parts
bool WritePlaceholder(const Reference< XShape >& xShape, PlaceholderType ePlaceholder, bool bMaster);
@@ -128,8 +137,35 @@ void WriteSndAc(const FSHelperPtr& pFS, const OUString& sSoundRelId, const OUStr
pFS->endElement(FSNS(XML_p, XML_stSnd));
pFS->endElement(FSNS(XML_p, XML_sndAc));
}
-}
+const char* getPlaceholderTypeName(PlaceholderType ePlaceholder)
+{
+ switch (ePlaceholder)
+ {
+ case SlideImage:
+ return "sldImg";
+ case Notes:
+ return "body";
+ case Header:
+ return "hdr";
+ case Footer:
+ return "ftr";
+ case SlideNumber:
+ return "sldNum";
+ case DateAndTime:
+ return "dt";
+ case Outliner:
+ return "body";
+ case Title:
+ return "title";
+ case Subtitle:
+ return "subTitle";
+ default:
+ SAL_INFO("sd.eppt", "warning: unhandled placeholder type: " << ePlaceholder);
+ return "";
+ }
+}
+}
}
}
@@ -335,6 +371,7 @@ PowerPointExport::PowerPointExport(const Reference< XComponentContext >& rContex
, mnAnimationNodeIdMax(1)
, mnDiagramId(1)
, mbCreateNotes(false)
+ , mnPlaceholderIndexMax(1)
{
comphelper::SequenceAsHashMap aArgumentsMap(rArguments);
mbPptm = aArgumentsMap.getUnpackedValueOrDefault("IsPPTM", false);
@@ -1412,6 +1449,8 @@ void PowerPointExport::WriteShapeTree(const FSHelperPtr& pFS, PageType ePageType
}
}
+ if ( ePageType == NORMAL || ePageType == LAYOUT )
+ WritePlaceholderReferenceShapes(aDML, ePageType);
pFS->endElementNS(XML_p, XML_spTree);
}
@@ -1449,41 +1488,22 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
mpFS->endElementNS(XML_p, XML_cNvSpPr);
mpFS->startElementNS(XML_p, XML_nvPr);
- const char* pType = nullptr;
- switch (ePlaceholder)
+ bool bUsePlaceholderIndex
+ = ePlaceholder == Footer || ePlaceholder == DateAndTime || ePlaceholder == SlideNumber;
+ const char* pType = getPlaceholderTypeName(ePlaceholder);
+
+ SAL_INFO("sd.eppt", "write placeholder " << pType);
+ if (bUsePlaceholderIndex)
{
- case SlideImage:
- pType = "sldImg";
- break;
- case Notes:
- pType = "body";
- break;
- case Header:
- pType = "hdr";
- break;
- case Footer:
- pType = "ftr";
- break;
- case SlideNumber:
- pType = "sldNum";
- break;
- case DateAndTime:
- pType = "dt";
- break;
- case Outliner:
- pType = "body";
- break;
- case Title:
- pType = "title";
- break;
- case Subtitle:
- pType = "subTitle";
- break;
- default:
- SAL_INFO("sd.eppt", "warning: unhandled placeholder type: " << ePlaceholder);
+ mpFS->singleElementNS(
+ XML_p, XML_ph, XML_type, pType, XML_idx,
+ OString::number(
+ static_cast<PowerPointExport*>(GetFB())->CreateNewPlaceholderIndex(xShape)));
+ }
+ else
+ {
+ mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType);
}
- SAL_INFO("sd.eppt", "write placeholder " << pType);
- mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType);
mpFS->endElementNS(XML_p, XML_nvPr);
mpFS->endElementNS(XML_p, XML_nvSpPr);
@@ -1496,13 +1516,150 @@ ShapeExport& PowerPointShapeExport::WritePlaceholderShape(const Reference< XShap
WriteBlipFill(xProps, "Graphic");
mpFS->endElementNS(XML_p, XML_spPr);
- WriteTextBox(xShape, XML_p);
+ WriteTextBox(xShape, XML_p, bUsePlaceholderIndex);
+
+ mpFS->endElementNS(XML_p, XML_sp);
+
+ return *this;
+}
+
+ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceShape(
+ PlaceholderType ePlaceholder, unsigned nReferencedPlaceholderIdx, PageType ePageType,
+ Reference<XPropertySet>& rXPagePropSet)
+{
+ mpFS->startElementNS(XML_p, XML_sp);
+
+ // non visual shape properties
+ mpFS->startElementNS(XML_p, XML_nvSpPr);
+ const OString aPlaceholderID("PlaceHolder " + OString::number(mnShapeIdMax++));
+ GetFS()->singleElementNS(XML_p, XML_cNvPr, XML_id, OString::number(mnShapeIdMax), XML_name,
+ aPlaceholderID.getStr());
+
+ mpFS->startElementNS(XML_p, XML_cNvSpPr);
+ mpFS->singleElementNS(XML_a, XML_spLocks, XML_noGrp, "1");
+ mpFS->endElementNS(XML_p, XML_cNvSpPr);
+ mpFS->startElementNS(XML_p, XML_nvPr);
+
+ const char* pType = getPlaceholderTypeName(ePlaceholder);
+ mpFS->singleElementNS(XML_p, XML_ph, XML_type, pType, XML_idx,
+ OString::number(nReferencedPlaceholderIdx));
+ mpFS->endElementNS(XML_p, XML_nvPr);
+ mpFS->endElementNS(XML_p, XML_nvSpPr);
+
+ // visual shape properties
+ mpFS->startElementNS(XML_p, XML_spPr);
+ mpFS->endElementNS(XML_p, XML_spPr);
+
+ WritePlaceholderReferenceTextBody(ePlaceholder, ePageType, rXPagePropSet);
mpFS->endElementNS(XML_p, XML_sp);
return *this;
}
+ShapeExport& PowerPointShapeExport::WritePlaceholderReferenceTextBody(
+ PlaceholderType ePlaceholder, PageType ePageType, const Reference<XPropertySet> xPagePropSet)
+{
+ mpFS->startElementNS(XML_p, XML_txBody);
+ mpFS->singleElementNS(XML_a, XML_bodyPr);
+ mpFS->startElementNS(XML_a, XML_p);
+
+ switch (ePlaceholder)
+ {
+ case Header:
+ break;
+ case Footer:
+ {
+ OUString aFooterText;
+ if (ePageType == LAYOUT)
+ {
+ aFooterText = "Footer";
+ }
+ else
+ {
+ xPagePropSet->getPropertyValue("FooterText") >>= aFooterText;
+ }
+ mpFS->startElementNS(XML_a, XML_r);
+ mpFS->startElementNS(XML_a, XML_t);
+ mpFS->writeEscaped(aFooterText);
+ mpFS->endElementNS(XML_a, XML_t);
+ mpFS->endElementNS(XML_a, XML_r);
+ break;
+ }
+ case SlideNumber:
+ {
+ OUString aSlideNum;
+ sal_Int32 nSlideNum = 0;
+ if (ePageType == LAYOUT)
+ {
+ aSlideNum = "<#>";
+ }
+ else
+ {
+ xPagePropSet->getPropertyValue("Number") >>= nSlideNum;
+ aSlideNum = OUString::number(nSlideNum);
+ }
+ OString aUUID(comphelper::xml::generateGUIDString());
+ mpFS->startElementNS(XML_a, XML_fld, XML_id, aUUID.getStr(), XML_type, "slidenum");
+ mpFS->startElementNS(XML_a, XML_t);
+ mpFS->writeEscaped(aSlideNum);
+ mpFS->endElementNS(XML_a, XML_t);
+ mpFS->endElementNS(XML_a, XML_fld);
+ break;
+ }
+ case DateAndTime:
+ {
+ OUString aDateTimeType = "datetime1";
+ bool bIsDateTimeFixed = false;
+ xPagePropSet->getPropertyValue("IsDateTimeFixed") >>= bIsDateTimeFixed;
+
+ // Ideally "Date" should be replaced with the formatted date text
+ // but since variable datetime overrides the text, this seems fine for now.
+ OUString aDateTimeText = "Date";
+
+ if(ePageType != LAYOUT && !bIsDateTimeFixed)
+ {
+ sal_Int32 nDateTimeFormat = 0;
+ xPagePropSet->getPropertyValue("DateTimeFormat") >>= nDateTimeFormat;
+
+ // 4 LSBs represent the date
+ SvxDateFormat eDate = static_cast<SvxDateFormat>(nDateTimeFormat & 0x0f);
+ // the 4 bits after the date bits represent the time
+ SvxTimeFormat eTime = static_cast<SvxTimeFormat>(nDateTimeFormat >> 4);
+ aDateTimeType = GetDatetimeTypeFromDateTime(eDate, eTime);
+
+ if (aDateTimeType == "datetime")
+ aDateTimeType = "datetime1";
+ }
+
+ if(!bIsDateTimeFixed)
+ {
+ OString aUUID(comphelper::xml::generateGUIDString());
+ mpFS->startElementNS(XML_a, XML_fld, XML_id, aUUID.getStr(), XML_type, aDateTimeType.toUtf8());
+ }
+ else
+ {
+ xPagePropSet->getPropertyValue("DateTimeText") >>= aDateTimeText;
+ mpFS->startElementNS(XML_a, XML_r);
+ }
+
+ mpFS->startElementNS(XML_a, XML_t);
+ mpFS->writeEscaped(aDateTimeText);
+ mpFS->endElementNS(XML_a, XML_t);
+
+ mpFS->endElementNS(XML_a, bIsDateTimeFixed ? XML_r : XML_fld);
+ break;
+ }
+ default:
+ SAL_INFO("sd.eppt", "warning: no defined textbody for referenced placeholder type: "
+ << ePlaceholder);
+ }
+ mpFS->endElementNS(XML_a, XML_p);
+ mpFS->endElementNS(XML_p, XML_txBody);
+
+ return *this;
+}
+
#define SYS_COLOR_SCHEMES " <a:dk1>\
<a:sysClr val=\"windowText\" lastClr=\"000000\"/>\
</a:dk1>\
@@ -2011,6 +2168,106 @@ void PowerPointExport::WriteDiagram(const FSHelperPtr& pFS, PowerPointShapeExpor
pFS->endElementNS(XML_p, XML_graphicFrame);
}
+void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rDML, PageType ePageType)
+{
+ bool bCheckProps = ePageType == NORMAL;
+ Reference<XShape> xShape;
+ Any aAny;
+ OUString aText;
+ if (ePageType == LAYOUT
+ || (bCheckProps && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsFooterVisible", true)
+ && aAny == true && GetPropertyValue(aAny, mXPagePropSet, "FooterText", true)
+ && (aAny >>= aText) && !aText.isEmpty()))
+ {
+ if ((xShape = GetReferencedPlaceholderXShape(Footer, ePageType)))
+ rDML.WritePlaceholderReferenceShape(Footer,
+ maPlaceholderShapeToIndexMap.find(xShape)->second,
+ ePageType, mXPagePropSet);
+ }
+
+ if (ePageType == LAYOUT
+ || (bCheckProps
+ && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsPageNumberVisible", true)
+ && aAny == true))
+ {
+ if ((xShape = GetReferencedPlaceholderXShape(SlideNumber, ePageType)))
+ rDML.WritePlaceholderReferenceShape(SlideNumber,
+ maPlaceholderShapeToIndexMap.find(xShape)->second,
+ ePageType, mXPagePropSet);
+ }
+
+ if (ePageType == LAYOUT
+ || (bCheckProps
+ && PropValue::GetPropertyValue(aAny, mXPagePropSet, "IsDateTimeVisible", true)
+ && aAny == true
+ && ((GetPropertyValue(aAny, mXPagePropSet, "DateTimeText", true) && (aAny >>= aText)
+ && !aText.isEmpty())
+ || mXPagePropSet->getPropertyValue("IsDateTimeFixed") == false)))
+ {
+ if ((xShape = GetReferencedPlaceholderXShape(DateAndTime, ePageType)))
+ rDML.WritePlaceholderReferenceShape(DateAndTime,
+ maPlaceholderShapeToIndexMap.find(xShape)->second,
+ ePageType, mXPagePropSet);
+ }
+}
+
+unsigned PowerPointExport::CreateNewPlaceholderIndex(const css::uno::Reference<XShape> &rXShape)
+{
+ maPlaceholderShapeToIndexMap.insert({rXShape, mnPlaceholderIndexMax});
+ return mnPlaceholderIndexMax++;
+}
+
+Reference<XShape> PowerPointExport::GetReferencedPlaceholderXShape(const PlaceholderType eType,
+ PageType ePageType) const
+{
+ PresObjKind ePresObjKind = PresObjKind::PRESOBJ_NONE;
+ switch (eType)
+ {
+ case oox::core::None:
+ break;
+ case oox::core::SlideImage:
+ break;
+ case oox::core::Notes:
+ break;
+ case oox::core::Header:
+ ePresObjKind = PresObjKind::PRESOBJ_HEADER;
+ break;
+ case oox::core::Footer:
+ ePresObjKind = PresObjKind::PRESOBJ_FOOTER;
+ break;
+ case oox::core::SlideNumber:
+ ePresObjKind = PresObjKind::PRESOBJ_SLIDENUMBER;
+ break;
+ case oox::core::DateAndTime:
+ ePresObjKind = PresObjKind::PRESOBJ_DATETIME;
+ break;
+ case oox::core::Outliner:
+ break;
+ case oox::core::Title:
+ ePresObjKind = PresObjKind::PRESOBJ_TITLE;
+ break;
+ case oox::core::Subtitle:
+ break;
+ }
+ if (ePresObjKind != PresObjKind::PRESOBJ_NONE)
+ {
+ SdPage* pMasterPage;
+ if (ePageType == LAYOUT)
+ {
+ // since Layout pages do not have drawpages themselves - mXDrawPage is still the master they reference to..
+ pMasterPage = SdPage::getImplementation(mXDrawPage);
+ }
+ else
+ {
+ pMasterPage
+ = &static_cast<SdPage&>(SdPage::getImplementation(mXDrawPage)->TRG_GetMasterPage());
+ }
+ if (SdrObject* pMasterFooter = pMasterPage->GetPresObj(ePresObjKind))
+ return GetXShapeForSdrObject(pMasterFooter);
+ }
+ return nullptr;
+}
+
// UNO component
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
css_comp_Impress_oox_PowerPointExport(uno::XComponentContext* rxCtxt,
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx
index ad8e2a97eae6..db04442f9830 100644
--- a/sd/source/filter/html/htmlex.cxx
+++ b/sd/source/filter/html/htmlex.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/drawing/GraphicExportFilter.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <rtl/xmlencode.hxx>
#include <sal/log.hxx>
#include <rtl/tencinfo.h>
#include <comphelper/processfactory.hxx>
@@ -281,10 +282,10 @@ OUString HtmlState::SetLink( const OUString& aLink, const OUString& aTarget )
if (!aLink.isEmpty())
{
- aStr += "<a href=\"" + aLink;
+ aStr += "<a href=\"" + rtl::encodeForXml(aLink);
if (!aTarget.isEmpty())
{
- aStr += "\" target=\"" + aTarget;
+ aStr += "\" target=\"" + rtl::encodeForXml(aTarget);
}
aStr += "\">";
mbLink = true;
diff --git a/sd/source/filter/pdf/sdpdffilter.cxx b/sd/source/filter/pdf/sdpdffilter.cxx
index 6bc036f7fa21..290eea440e3c 100644
--- a/sd/source/filter/pdf/sdpdffilter.cxx
+++ b/sd/source/filter/pdf/sdpdffilter.cxx
@@ -71,12 +71,17 @@ bool SdPdfFilter::Import()
// Create the page and insert the Graphic.
SdPage* pPage = mrDocument.GetSdPage(nPageNumber, PageKind::Standard);
+ if (!pPage) // failed to duplicate page, out of memory?
+ return false;
// Make the page size match the rendered image.
pPage->SetSize(aSizeHMM);
SdrGrafObj* pSdrGrafObj = new SdrGrafObj(pPage->getSdrModelFromSdrPage(), rGraphic,
tools::Rectangle(Point(), aSizeHMM));
+ if (!pSdrGrafObj) // out of memory
+ return false;
+
pPage->InsertObject(pSdrGrafObj);
for (auto const& rPDFAnnotation : rPDFGraphicResult.maAnnotations)
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 4693ce3e9596..152ed5d33c91 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -139,6 +139,9 @@ public:
ViewShell* GetViewShell() const { return mpViewSh; }
SfxViewShell* GetSfxViewShell() const override;
+ // Create a local UndoManager
+ std::unique_ptr<SdrUndoManager> createLocalTextUndoManager() override;
+
virtual bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = nullptr, vcl::Window* pWin = nullptr, bool bIsNewObj = false,
SdrOutliner* pGivenOutliner = nullptr, OutlinerView* pGivenOutlinerView = nullptr,
bool bDontDeleteOutliner = false, bool bOnlyOneView = false, bool bGrabFocus = true) override;
diff --git a/sd/source/ui/inc/tools/GraphicSizeCheck.hxx b/sd/source/ui/inc/tools/GraphicSizeCheck.hxx
new file mode 100644
index 000000000000..9da3d569bd3a
--- /dev/null
+++ b/sd/source/ui/inc/tools/GraphicSizeCheck.hxx
@@ -0,0 +1,103 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <memory>
+#include <drawdoc.hxx>
+#include <svx/GenericCheckDialog.hxx>
+#include <svx/svdograf.hxx>
+
+namespace sd
+{
+class GraphicSizeViolation final
+{
+private:
+ SdrGrafObj* m_pGraphicObject;
+
+ sal_Int32 m_nLowDPILimit = 0;
+ sal_Int32 m_nHighDPILimit = 0;
+
+ sal_Int32 m_nDPIX = 0;
+ sal_Int32 m_nDPIY = 0;
+
+public:
+ GraphicSizeViolation(sal_Int32 nDPI, SdrGrafObj* pGraphicObject);
+ bool check();
+
+ OUString getGraphicName();
+
+ SdrGrafObj* getObject() const { return m_pGraphicObject; }
+
+ bool isDPITooLow() { return m_nDPIX < m_nLowDPILimit || m_nDPIY < m_nLowDPILimit; }
+
+ bool isDPITooHigh() { return m_nDPIX > m_nHighDPILimit || m_nDPIY > m_nHighDPILimit; }
+
+ sal_Int32 getDPIX() { return m_nDPIX; }
+
+ sal_Int32 getDPIY() { return m_nDPIY; }
+};
+
+class GraphicSizeCheck final
+{
+private:
+ SdDrawDocument* m_pDocument;
+ std::vector<std::unique_ptr<GraphicSizeViolation>> m_aGraphicSizeViolationList;
+
+public:
+ GraphicSizeCheck(SdDrawDocument* pDocument)
+ : m_pDocument(pDocument)
+ {
+ }
+
+ void check();
+
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& getViolationList()
+ {
+ return m_aGraphicSizeViolationList;
+ }
+};
+
+class GraphicSizeCheckGUIEntry : public svx::CheckData
+{
+private:
+ SdDrawDocument* m_pDocument;
+ std::unique_ptr<GraphicSizeViolation> m_pViolation;
+
+public:
+ GraphicSizeCheckGUIEntry(SdDrawDocument* pDocument,
+ std::unique_ptr<GraphicSizeViolation>&& pViolation)
+ : m_pDocument(pDocument)
+ , m_pViolation(std::move(pViolation))
+ {
+ }
+
+ OUString getText() override;
+
+ bool canMarkObject() override { return true; }
+
+ void markObject() override;
+
+ bool hasProperties() override { return true; }
+
+ void runProperties() override;
+};
+
+class GraphicSizeCheckGUIResult : public svx::CheckDataCollection
+{
+public:
+ GraphicSizeCheckGUIResult(SdDrawDocument* m_pDocument);
+
+ OUString getTitle() override;
+};
+
+} // end of namespace sd
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 60dfcb02f8d1..6b949a27bbb7 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -238,6 +238,7 @@ public:
virtual OUString getPartName( int nPart ) override;
virtual OUString getPartHash( int nPart ) override;
virtual VclPtr<vcl::Window> getDocWindow() override;
+ bool isMasterViewMode();
virtual void setPartMode( int nPartMode ) override;
diff --git a/sd/source/ui/sidebar/SlideBackground.cxx b/sd/source/ui/sidebar/SlideBackground.cxx
index 0ba486884b25..6ed5af536527 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -328,14 +328,6 @@ void SlideBackground::HandleContextChange(
mpInsertImage->Show();
}
- // The Insert Image button in the sidebar issues .uno:SelectBackground,
- // which when invoked without arguments will open the file-open-dialog
- // to prompt the user to select a file. This is useless in LOOL.
- // Hide for now so the user will only be able to use the menu to insert
- // background image, which prompts the user for file selection in the browser.
- if (comphelper::LibreOfficeKit::isActive())
- mpInsertImage->Hide();
-
// Need to do a relayouting, otherwise the panel size is not updated after show / hide controls
sfx2::sidebar::Panel* pPanel = dynamic_cast<sfx2::sidebar::Panel*>(GetParent());
if(pPanel)
@@ -357,6 +349,14 @@ void SlideBackground::HandleContextChange(
mpBackgroundLabel->Hide();
}
}
+
+ // The Insert Image button in the sidebar issues .uno:SelectBackground,
+ // which when invoked without arguments will open the file-open-dialog
+ // to prompt the user to select a file. This is useless in LOOL.
+ // Hide for now so the user will only be able to use the menu to insert
+ // background image, which prompts the user for file selection in the browser.
+ if (comphelper::LibreOfficeKit::isActive())
+ mpInsertImage->Hide();
}
void SlideBackground::Update()
diff --git a/sd/source/ui/tools/GraphicSizeCheck.cxx b/sd/source/ui/tools/GraphicSizeCheck.cxx
new file mode 100644
index 000000000000..6571b8834ff0
--- /dev/null
+++ b/sd/source/ui/tools/GraphicSizeCheck.cxx
@@ -0,0 +1,211 @@
+/* -*- 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 <memory>
+#include <tools/GraphicSizeCheck.hxx>
+#include <svx/strings.hrc>
+#include <svx/svdobj.hxx>
+#include <svx/svdpage.hxx>
+#include <svx/svxids.hrc>
+#include <sfx2/dispatch.hxx>
+
+#include <sdresid.hxx>
+#include <DrawViewShell.hxx>
+#include <DrawDocShell.hxx>
+
+namespace sd
+{
+namespace
+{
+class ModelTraverseHandler
+{
+public:
+ virtual ~ModelTraverseHandler() {}
+
+ virtual void handleSdrObject(SdrObject* pObject) = 0;
+};
+
+class ModelTraverser
+{
+private:
+ std::vector<std::shared_ptr<ModelTraverseHandler>> m_pNodeHandler;
+ SdDrawDocument* m_pDocument;
+
+public:
+ ModelTraverser(SdDrawDocument* pDocument)
+ : m_pDocument(pDocument)
+ {
+ }
+
+ void traverse()
+ {
+ if (!m_pDocument)
+ return;
+
+ for (sal_uInt16 nPage = 0; nPage < m_pDocument->GetPageCount(); ++nPage)
+ {
+ SdrPage* pPage = m_pDocument->GetPage(nPage);
+ if (pPage)
+ {
+ for (size_t nObject = 0; nObject < pPage->GetObjCount(); ++nObject)
+ {
+ SdrObject* pObject = pPage->GetObj(nObject);
+ if (pObject)
+ {
+ for (auto& pNodeHandler : m_pNodeHandler)
+ {
+ pNodeHandler->handleSdrObject(pObject);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ void addNodeHandler(std::shared_ptr<ModelTraverseHandler> pHandler)
+ {
+ m_pNodeHandler.push_back(pHandler);
+ }
+};
+}
+
+GraphicSizeViolation::GraphicSizeViolation(sal_Int32 nDPI, SdrGrafObj* pGraphicObject)
+ : m_pGraphicObject(pGraphicObject)
+{
+ constexpr double fLowPercentage = 110;
+ constexpr double fHighPercentage = 50;
+
+ m_nLowDPILimit = sal_Int32(100.0 / fLowPercentage * nDPI);
+ m_nHighDPILimit = sal_Int32(100.0 / fHighPercentage * nDPI);
+}
+
+bool GraphicSizeViolation::check()
+{
+ Graphic aGraphic = m_pGraphicObject->GetGraphic();
+ Size aSizePixel = aGraphic.GetSizePixel();
+ Size aGraphicSize = m_pGraphicObject->GetLogicRect().GetSize();
+
+ double nSizeXInch = double(convertMm100ToTwip(aGraphicSize.Width())) / 1440.0;
+ double nSizeYInch = double(convertMm100ToTwip(aGraphicSize.Height())) / 1440.0;
+
+ m_nDPIX = sal_Int32(aSizePixel.Width() / nSizeXInch);
+ m_nDPIY = sal_Int32(aSizePixel.Height() / nSizeYInch);
+
+ return isDPITooLow() || isDPITooHigh();
+}
+
+OUString GraphicSizeViolation::getGraphicName() { return m_pGraphicObject->GetName(); }
+
+namespace
+{
+class GraphicSizeCheckHandler : public ModelTraverseHandler
+{
+ sal_Int32 m_nDPI;
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& m_rGraphicSizeViolationList;
+
+public:
+ GraphicSizeCheckHandler(
+ sal_Int32 nDPI,
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& rGraphicSizeViolationList)
+ : m_nDPI(nDPI)
+ , m_rGraphicSizeViolationList(rGraphicSizeViolationList)
+ {
+ }
+
+ void handleSdrObject(SdrObject* pObject) override
+ {
+ auto* pGraphicObject = dynamic_cast<SdrGrafObj*>(pObject);
+ if (!pGraphicObject)
+ return;
+
+ auto pEntry = std::make_unique<GraphicSizeViolation>(m_nDPI, pGraphicObject);
+ if (pEntry->check())
+ {
+ m_rGraphicSizeViolationList.push_back(std::move(pEntry));
+ }
+ }
+};
+
+} // end anonymous namespace
+
+void GraphicSizeCheck::check()
+{
+ if (!m_pDocument)
+ return;
+
+ sal_Int32 nDPI = m_pDocument->getImagePreferredDPI();
+ if (nDPI == 0)
+ return;
+
+ auto pHandler = std::make_shared<GraphicSizeCheckHandler>(nDPI, m_aGraphicSizeViolationList);
+
+ ModelTraverser aModelTraverser(m_pDocument);
+ aModelTraverser.addNodeHandler(pHandler);
+ aModelTraverser.traverse();
+}
+
+OUString GraphicSizeCheckGUIEntry::getText()
+{
+ OUString sText;
+
+ if (m_pViolation->isDPITooLow())
+ {
+ sText = SdResId(STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW);
+ }
+ else if (m_pViolation->isDPITooHigh())
+ {
+ sText = SdResId(STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH);
+ }
+
+ sText = sText.replaceAll("%NAME%", m_pViolation->getGraphicName());
+ sText = sText.replaceAll("%DPIX%", OUString::number(m_pViolation->getDPIX()));
+ sText = sText.replaceAll("%DPIY%", OUString::number(m_pViolation->getDPIY()));
+
+ return sText;
+}
+
+void GraphicSizeCheckGUIEntry::markObject()
+{
+ sd::ViewShell* pViewShell = m_pDocument->GetDocSh()->GetViewShell();
+ SdrView* pView = pViewShell->GetView();
+ pView->ShowSdrPage(m_pViolation->getObject()->getSdrPageFromSdrObject());
+ pView->UnmarkAll();
+ pView->MarkObj(m_pViolation->getObject(), pView->GetSdrPageView());
+}
+
+void GraphicSizeCheckGUIEntry::runProperties()
+{
+ markObject();
+ sd::ViewShell* pViewShell = m_pDocument->GetDocSh()->GetViewShell();
+ pViewShell->GetDispatcher()->Execute(SID_ATTR_GRAF_CROP, SfxCallMode::SYNCHRON);
+}
+
+GraphicSizeCheckGUIResult::GraphicSizeCheckGUIResult(SdDrawDocument* pDocument)
+{
+ GraphicSizeCheck aCheck(pDocument);
+ aCheck.check();
+
+ auto& rCollection = getCollection();
+ for (auto& rpViolation : aCheck.getViolationList())
+ {
+ auto rGUIEntry
+ = std::make_unique<GraphicSizeCheckGUIEntry>(pDocument, std::move(rpViolation));
+ rCollection.push_back(std::move(rGUIEntry));
+ }
+}
+
+OUString GraphicSizeCheckGUIResult::getTitle()
+{
+ return SdResId(STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE);
+}
+
+} // end of namespace sd
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/ui/unoidl/UnoDocumentSettings.cxx b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
index b765dc59a0dc..7ef72d693b69 100644
--- a/sd/source/ui/unoidl/UnoDocumentSettings.cxx
+++ b/sd/source/ui/unoidl/UnoDocumentSettings.cxx
@@ -142,6 +142,7 @@ enum SdDocumentSettingsPropertyHandles
,HANDLE_SLIDESPERHANDOUT, HANDLE_HANDOUTHORIZONTAL,
HANDLE_EMBED_FONTS, HANDLE_EMBED_USED_FONTS,
HANDLE_EMBED_LATIN_SCRIPT_FONTS, HANDLE_EMBED_ASIAN_SCRIPT_FONTS, HANDLE_EMBED_COMPLEX_SCRIPT_FONTS,
+ HANDLE_IMAGE_PREFERRED_DPI
};
#define MID_PRINTER 1
@@ -210,6 +211,7 @@ enum SdDocumentSettingsPropertyHandles
{ OUString("EmbedLatinScriptFonts"), HANDLE_EMBED_LATIN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0, 0 },
{ OUString("EmbedAsianScriptFonts"), HANDLE_EMBED_ASIAN_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0, 0 },
{ OUString("EmbedComplexScriptFonts"), HANDLE_EMBED_COMPLEX_SCRIPT_FONTS, cppu::UnoType<bool>::get(), 0, 0 },
+ { OUString("ImagePreferredDPI"), HANDLE_IMAGE_PREFERRED_DPI, cppu::UnoType<sal_Int32>::get(), 0, 0 },
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
@@ -1019,6 +1021,18 @@ DocumentSettings::_setPropertyValues(const PropertyMapEntry** ppEntries,
}
break;
+ case HANDLE_IMAGE_PREFERRED_DPI:
+ {
+ if (pValues->has<sal_Int32>())
+ {
+ auto nNewValue = pValues->get<sal_Int32>();
+ bChanged = (pDoc->getImagePreferredDPI() != nNewValue);
+ pDoc->setImagePreferredDPI(nNewValue);
+ bOk = true;
+ }
+ }
+ break;
+
default:
throw UnknownPropertyException( OUString::number((*ppEntries)->mnHandle), static_cast<cppu::OWeakObject*>(this));
}
@@ -1293,6 +1307,12 @@ DocumentSettings::_getPropertyValues(
}
break;
+ case HANDLE_IMAGE_PREFERRED_DPI:
+ {
+ *pValue <<= pDoc->getImagePreferredDPI();
+ }
+ break;
+
default:
throw UnknownPropertyException( OUString::number((*ppEntries)->mnHandle), static_cast<cppu::OWeakObject*>(this));
}
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 5de97c06936f..e6b6012f79c6 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -45,6 +45,7 @@
#include <unomodel.hxx>
#include "unopool.hxx"
#include <sfx2/lokhelper.hxx>
+#include <sfx2/dispatch.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
@@ -122,6 +123,8 @@
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
+#include <app.hrc>
+
#define TWIPS_PER_PIXEL 15
using namespace ::cppu;
@@ -2297,11 +2300,12 @@ void SdXImpressDocument::setPart( int nPart, bool bAllowChangeFocus )
int SdXImpressDocument::getParts()
{
- // TODO: master pages?
- // Read: drviews1.cxx
if (!mpDoc)
return 0;
+ if (isMasterViewMode())
+ return mpDoc->GetMasterSdPageCount(PageKind::Standard);
+
return mpDoc->GetSdPageCount(PageKind::Standard);
}
@@ -2314,9 +2318,14 @@ int SdXImpressDocument::getPart()
return pViewSh->GetViewShellBase().getPart();
}
-OUString SdXImpressDocument::getPartName( int nPart )
+OUString SdXImpressDocument::getPartName(int nPart)
{
- SdPage* pPage = mpDoc->GetSdPage( nPart, PageKind::Standard );
+ SdPage* pPage;
+ if (isMasterViewMode())
+ pPage = mpDoc->GetMasterSdPage(nPart, PageKind::Standard);
+ else
+ pPage = mpDoc->GetSdPage(nPart, PageKind::Standard);
+
if (!pPage)
{
SAL_WARN("sd", "DrawViewShell not available!");
@@ -2326,9 +2335,14 @@ OUString SdXImpressDocument::getPartName( int nPart )
return pPage->GetName();
}
-OUString SdXImpressDocument::getPartHash( int nPart )
+OUString SdXImpressDocument::getPartHash(int nPart)
{
- SdPage* pPage = mpDoc->GetSdPage( nPart, PageKind::Standard );
+ SdPage* pPage;
+ if (isMasterViewMode())
+ pPage = mpDoc->GetMasterSdPage(nPart, PageKind::Standard);
+ else
+ pPage = mpDoc->GetSdPage(nPart, PageKind::Standard);
+
if (!pPage)
{
SAL_WARN("sd", "DrawViewShell not available!");
@@ -2338,6 +2352,23 @@ OUString SdXImpressDocument::getPartHash( int nPart )
return OUString::number(pPage->GetHashCode());
}
+bool SdXImpressDocument::isMasterViewMode()
+{
+ DrawViewShell* pViewSh = GetViewShell();
+ if (!pViewSh)
+ return false;
+
+ if (pViewSh->GetDispatcher())
+ {
+ const SfxPoolItem* xItem = nullptr;
+ pViewSh->GetDispatcher()->QueryState(SID_SLIDE_MASTER_MODE, xItem);
+ const SfxBoolItem* isMasterViewMode = dynamic_cast<const SfxBoolItem*>(xItem);
+ if (isMasterViewMode && isMasterViewMode->GetValue())
+ return true;
+ }
+ return false;
+}
+
VclPtr<vcl::Window> SdXImpressDocument::getDocWindow()
{
SolarMutexGuard aGuard;
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index bdbf06b72361..468a2cba3078 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -343,7 +343,9 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive)
if ( mpDrawView->IsTextEdit() )
{
- mpDrawView->SdrEndTextEdit();
+ // This exits the text edit mode when going in and out of window focus, which is not needed
+ // Let's keep this call as comment for now as it probably just needs a better conditional.
+ // mpDrawView->SdrEndTextEdit();
}
LayerTabBar* pLayerBar = GetLayerTabControl();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 3bf1521a640f..bc7ab3231390 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -189,6 +189,7 @@
#include <controller/SlsSelectionManager.hxx>
#include <controller/SlsInsertionIndicatorHandler.hxx>
#include <controller/SlsPageSelector.hxx>
+#include <tools/GraphicSizeCheck.hxx>
#include <ViewShellBase.hxx>
#include <memory>
@@ -1472,6 +1473,17 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
break;
+ case SID_GRAPHIC_SIZE_CHECK:
+ {
+ sd::GraphicSizeCheckGUIResult aResult(GetDoc());
+ svx::GenericCheckDialog aDialog(GetFrameWeld(), aResult);
+ aDialog.run();
+
+ Cancel();
+ rReq.Ignore();
+ }
+ break;
+
case SID_ATTRIBUTES_LINE: // BASIC
{
SetCurrentFunction( FuLine::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq ) );
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index ee65cb87fa94..7e081e36cfc3 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -513,6 +513,10 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem(SID_SAVE_GRAPHIC);
rSet.DisableItem(SID_EXTERNAL_EDIT);
}
+ if (GetDoc()->getImagePreferredDPI() <= 0)
+ {
+ rSet.DisableItem(SID_GRAPHIC_SIZE_CHECK);
+ }
}
} // end of namespace sd
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 0abaff31fc9f..f6bf3381231b 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -79,6 +79,8 @@
#include <LibreOfficeKit/LibreOfficeKitEnums.h>
#include <DrawController.hxx>
+#include <undo/undomanager.hxx>
+
#include <memory>
#include <numeric>
@@ -618,6 +620,14 @@ SfxViewShell* View::GetSfxViewShell() const
return pRet;
}
+// Create a new view-local UndoManager manager for Impress/Draw
+std::unique_ptr<SdrUndoManager> View::createLocalTextUndoManager()
+{
+ std::unique_ptr<SdrUndoManager> pUndoManager(new sd::UndoManager);
+ pUndoManager->SetDocShell(mpDocSh);
+ return pUndoManager;
+}
+
bool View::SdrBeginTextEdit(
SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
bool bIsNewObj,
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 0bf877f6fc02..3d804dff36e5 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -170,6 +170,8 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
else if ( pPV )
{
+ Size aSizePixel = rGraphic.GetSizePixel();
+
// create new object
Size aSize;
@@ -192,15 +194,34 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
MapMode( MapUnit::Map100thMM ) );
}
- pNewGrafObj = new SdrGrafObj(
- getSdrModelFromSdrView(),
- rGraphic,
- ::tools::Rectangle(rPos, aSize));
- SdrPage* pPage = pPV->GetPage();
- Size aPageSize( pPage->GetSize() );
- aPageSize.AdjustWidth( -(pPage->GetLeftBorder() + pPage->GetRightBorder()) );
- aPageSize.AdjustHeight( -(pPage->GetUpperBorder() + pPage->GetLowerBorder()) );
- pNewGrafObj->AdjustToMaxRect( ::tools::Rectangle( Point(), aPageSize ), true );
+ sal_Int32 nPreferredDPI = mrDoc.getImagePreferredDPI();
+ if (nPreferredDPI > 0)
+ {
+ constexpr double fTwipsInAnInch = 1444.0;
+ auto nWidth = (aSizePixel.Width() / double(nPreferredDPI)) * fTwipsInAnInch;
+ auto nHeight = (aSizePixel.Height() / double(nPreferredDPI)) * fTwipsInAnInch;
+ nWidth = convertTwipToMm100(nWidth);
+ nHeight = convertTwipToMm100(nHeight);
+
+ if (nWidth > 0 && nHeight > 0)
+ aSize = Size(nWidth, nHeight);
+ }
+
+ pNewGrafObj = new SdrGrafObj(getSdrModelFromSdrView(), rGraphic, ::tools::Rectangle(rPos, aSize));
+
+ if (nPreferredDPI > 0)
+ {
+ // move to the center of insertion point
+ pNewGrafObj->NbcMove(Size(-aSize.Width() / 2, -aSize.Height() / 2));
+ }
+ else
+ {
+ SdrPage* pPage = pPV->GetPage();
+ Size aPageSize( pPage->GetSize() );
+ aPageSize.AdjustWidth( -(pPage->GetLeftBorder() + pPage->GetRightBorder()) );
+ aPageSize.AdjustHeight( -(pPage->GetUpperBorder() + pPage->GetLowerBorder()) );
+ pNewGrafObj->AdjustToMaxRect( ::tools::Rectangle( Point(), aPageSize ), true );
+ }
SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
bool bIsPresTarget = false;
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 118f1545b186..a6ce2c02b2b3 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -1009,18 +1009,19 @@ void Window::LogicInvalidate(const ::tools::Rectangle* pRectangle)
if (!pDrawViewShell || pDrawViewShell->IsInSwitchPage())
return;
- OString sRectangle;
+ ::tools::Rectangle aRectangle;
+ ::tools::Rectangle* pResultRectangle;
if (!pRectangle)
- sRectangle = "EMPTY";
+ pResultRectangle = nullptr;
else
{
- ::tools::Rectangle aRectangle(*pRectangle);
+ aRectangle = *pRectangle;
if (GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
aRectangle = OutputDevice::LogicToLogic(aRectangle, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
- sRectangle = aRectangle.toString();
+ pResultRectangle = &aRectangle;
}
SfxViewShell& rSfxViewShell = pDrawViewShell->GetViewShellBase();
- SfxLokHelper::notifyInvalidation(&rSfxViewShell, sRectangle);
+ SfxLokHelper::notifyInvalidation(&rSfxViewShell, pResultRectangle);
}
void Window::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml
index f1373d4470bc..d0840ffa2612 100644
--- a/sd/uiconfig/sdraw/menubar/menubar.xml
+++ b/sd/uiconfig/sdraw/menubar/menubar.xml
@@ -416,6 +416,7 @@
<menu:menuitem menu:id=".uno:ColorSettings"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:GrafAttrCrop"/>
+ <menu:menuitem menu:id=".uno:GraphicSizeCheck"/>
</menu:menupopup>
</menu:menu>
<menu:menuseparator/>
diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml
index cec28407957b..dcd10c48bcb1 100644
--- a/sd/uiconfig/simpress/menubar/menubar.xml
+++ b/sd/uiconfig/simpress/menubar/menubar.xml
@@ -447,6 +447,7 @@
<menu:menuitem menu:id=".uno:ColorSettings"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:GrafAttrCrop"/>
+ <menu:menuitem menu:id=".uno:GraphicSizeCheck"/>
</menu:menupopup>
</menu:menu>
<menu:menu menu:id=".uno:FormatObjectMenu">
diff --git a/sd/uiconfig/simpress/ui/notebookbar.ui b/sd/uiconfig/simpress/ui/notebookbar.ui
index c8f258613db7..0f84fee9b661 100644
--- a/sd/uiconfig/simpress/ui/notebookbar.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar.ui
@@ -1168,7 +1168,7 @@
<object class="GtkMenuItem" id="MenuInsert-ImportFromFile">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:ImportFromFile</property>
+ <property name="action_name">.uno:ImportSlideFromFile</property>
</object>
</child>
<child>
@@ -1242,14 +1242,14 @@
<object class="GtkMenuItem" id="MenuInsert-InsertPageField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="MenuInsert-InsertPagesField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
</child>
<child>
@@ -3431,7 +3431,7 @@
<object class="GtkToolButton" id="Home-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -3456,7 +3456,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -3468,7 +3468,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:DeletePage</property>
+ <property name="action_name">.uno:DeleteSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -4971,7 +4971,7 @@
<object class="GtkToolButton" id="Insert-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -5014,7 +5014,7 @@
<object class="GtkToolButton" id="Insert-DuplicatePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -5038,7 +5038,7 @@
<object class="GtkToolButton" id="Insert-ImportFromFile">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:ImportFromFile</property>
+ <property name="action_name">.uno:ImportSlideFromFile</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6152,7 +6152,7 @@
<object class="GtkToolButton" id="Insert-InsertPage1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6246,7 +6246,7 @@
<object class="GtkToolButton" id="Slide-PageSetup">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6390,7 +6390,7 @@
<object class="GtkToolButton" id="Slide-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6433,7 +6433,7 @@
<object class="GtkToolButton" id="Slide-DuplicatePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6457,7 +6457,7 @@
<object class="GtkToolButton" id="Slide-DeletePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DeletePage</property>
+ <property name="action_name">.uno:DeleteSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6522,7 +6522,7 @@
<object class="GtkToolButton" id="Slide-RenamePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:RenamePage</property>
+ <property name="action_name">.uno:RenameSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6657,7 +6657,7 @@
<object class="GtkToolButton" id="Slide-MovePageUp">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:MovePageUp</property>
+ <property name="action_name">.uno:MoveSlideUp</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6682,7 +6682,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="action_name">.uno:MovePageDown</property>
+ <property name="action_name">.uno:MoveSlideDown</property>
</object>
<packing>
<property name="expand">False</property>
@@ -16883,7 +16883,7 @@
<object class="GtkToolButton" id="MasterPageMenu-PageSetup1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
<packing>
<property name="expand">False</property>
@@ -17094,7 +17094,7 @@
<object class="GtkToolButton" id="MasterPageMenu-PageSetup">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
index 6b16a8114c25..f4c2da53ea96 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_compact.ui
@@ -1287,7 +1287,7 @@
<object class="GtkMenuItem" id="MenuInsert-ImportFromFile">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:ImportFromFile</property>
+ <property name="action_name">.uno:ImportSlideFromFile</property>
</object>
</child>
<child>
@@ -1361,14 +1361,14 @@
<object class="GtkMenuItem" id="MenuInsert-InsertPageField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="MenuInsert-InsertPagesField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
</child>
<child>
@@ -3440,7 +3440,7 @@
<object class="GtkToolButton" id="Home-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -3480,7 +3480,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -4823,7 +4823,7 @@
<object class="GtkToolButton" id="Insert-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -4860,7 +4860,7 @@
<object class="GtkToolButton" id="Insert-DuplicatePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6000,7 +6000,7 @@
<object class="GtkToolButton" id="Page-PageSetup">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6142,7 +6142,7 @@
<object class="GtkToolButton" id="Page-DeletePage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DeletePage</property>
+ <property name="action_name">.uno:DeleteSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6281,7 +6281,7 @@
<object class="GtkToolButton" id="Page-MovePageUp">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:MovePageUp</property>
+ <property name="action_name">.uno:MoveSlideUp</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6322,7 +6322,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="action_name">.uno:MovePageDown</property>
+ <property name="action_name">.uno:MoveSlideDown</property>
</object>
<packing>
<property name="expand">False</property>
@@ -18024,7 +18024,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_horizontal">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
<property name="icon_name">sfx2/res/symphony/open_more.png</property>
</object>
<packing>
@@ -18447,7 +18447,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
<packing>
<property name="expand">True</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
index 8859be5e67d1..f520bc410b93 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_compact.ui
@@ -562,7 +562,7 @@
<object class="GtkMenuItem" id="MenuEdit-PageSetup">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
</child>
</object>
@@ -1760,14 +1760,14 @@
<object class="GtkMenuItem" id="MenuInsert-InsertPageField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="MenuInsert-InsertPagesField">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
</child>
<child>
@@ -3283,7 +3283,7 @@
<object class="GtkToolButton" id="Default-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -4502,7 +4502,7 @@
<object class="GtkToolButton" id="Text-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -6789,7 +6789,7 @@
<object class="GtkToolButton" id="Default-InsertPage1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
index 2210b4e86b20..6c9dfcb7021b 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_groupedbar_full.ui
@@ -712,7 +712,7 @@
<object class="GtkMenuItem" id="MenuEdit-PageSetup">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
</object>
</child>
</object>
@@ -1677,14 +1677,14 @@
<object class="GtkMenuItem" id="InsertPageFieldD">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="InsertPagesFieldD">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
</child>
<child>
@@ -3703,7 +3703,7 @@
<object class="GtkToolButton" id="InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -3727,7 +3727,7 @@
<object class="GtkToolButton" id="DuplicateSlide2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -5786,7 +5786,7 @@
<object class="GtkToolButton" id="InsertPageField3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
<packing>
<property name="expand">False</property>
@@ -5856,7 +5856,7 @@
<object class="GtkToolButton" id="InsertPagesField3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
<packing>
<property name="expand">False</property>
@@ -11852,7 +11852,7 @@
<object class="GtkToolButton" id="InsertPageField1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageField</property>
+ <property name="action_name">.uno:InsertSlideField</property>
</object>
<packing>
<property name="expand">False</property>
@@ -11863,7 +11863,7 @@
<object class="GtkToolButton" id="InsertPagesField1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPagesField</property>
+ <property name="action_name">.uno:InsertSlidesField</property>
</object>
<packing>
<property name="expand">False</property>
@@ -11933,7 +11933,7 @@
<object class="GtkToolButton" id="InsertPageTitleField1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPageTitleField</property>
+ <property name="action_name">.uno:InsertSlideTitleField</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/sd/uiconfig/simpress/ui/notebookbar_single.ui b/sd/uiconfig/simpress/ui/notebookbar_single.ui
index 428e694f9c18..6d984318d099 100644
--- a/sd/uiconfig/simpress/ui/notebookbar_single.ui
+++ b/sd/uiconfig/simpress/ui/notebookbar_single.ui
@@ -196,7 +196,7 @@
<object class="GtkToolButton" id="Home-InsertPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="action_name">.uno:InsertPage</property>
+ <property name="action_name">.uno:InsertSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -248,7 +248,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:DuplicatePage</property>
+ <property name="action_name">.uno:DuplicateSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -260,7 +260,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
- <property name="action_name">.uno:DeletePage</property>
+ <property name="action_name">.uno:DeleteSlide</property>
</object>
<packing>
<property name="expand">False</property>
@@ -11387,7 +11387,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="visible_horizontal">False</property>
- <property name="action_name">.uno:PageSetup</property>
+ <property name="action_name">.uno:SlideSetup</property>
<property name="icon_name">sfx2/res/symphony/open_more.png</property>
</object>
<packing>
diff --git a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
index 2c4e4202a6e6..e484f57d1527 100644
--- a/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
+++ b/sd/uiconfig/simpress/ui/sidebarslidebackground.ui
@@ -146,7 +146,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">4</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 360358d450d2..7b951a2cd0c6 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -22,6 +22,10 @@ $(eval $(call gb_Executable_add_exception_objects,xpdfimport,\
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl \
))
+$(eval $(call gb_Executable_use_system_win32_libs,xpdfimport,\
+ shell32 \
+))
+
$(eval $(call gb_Executable_add_default_nativeres,xpdfimport))
# vim:set noet sw=4 ts=4:
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 3d36e77110be..ad25b2edd85b 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -486,12 +486,6 @@ void Parser::parseFontFamilyName( FontAttributes& rResult )
const sal_Unicode* pCopy = rResult.familyName.getStr();
sal_Int32 nLen = rResult.familyName.getLength();
- // parse out truetype subsets (e.g. BAAAAA+Thorndale)
- if( nLen > 8 && pCopy[6] == '+' )
- {
- pCopy += 7;
- nLen -= 7;
- }
// TODO: Looks like this block needs to be refactored
while( nLen )
@@ -613,52 +607,6 @@ void Parser::readFont()
// extract textual attributes (bold, italic in the name, etc.)
parseFontFamilyName(aResult);
- // need to read font file?
- if( nFileLen )
- {
- uno::Sequence<sal_Int8> aFontFile(nFileLen);
- readBinaryData( aFontFile );
-
- awt::FontDescriptor aFD;
- uno::Sequence< uno::Any > aArgs(1);
- aArgs[0] <<= aFontFile;
-
- try
- {
- uno::Reference< beans::XMaterialHolder > xMat(
- m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- "com.sun.star.awt.FontIdentificator", aArgs, m_xContext ),
- uno::UNO_QUERY );
- if( xMat.is() )
- {
- uno::Any aRes( xMat->getMaterial() );
- if( aRes >>= aFD )
- {
- if (!aFD.Name.isEmpty())
- {
- aResult.familyName = aFD.Name;
- parseFontFamilyName(aResult);
- }
- aResult.isBold = (aFD.Weight > 100.0);
- aResult.isItalic = (aFD.Slant == awt::FontSlant_OBLIQUE ||
- aFD.Slant == awt::FontSlant_ITALIC );
- aResult.isUnderline = false;
- aResult.size = 0;
- }
- }
- }
- catch( uno::Exception& )
- {
- }
-
- if( aResult.familyName.isEmpty() )
- {
- // last fallback
- aResult.familyName = "Arial";
- aResult.isUnderline = false;
- }
-
- }
if (!m_xDev)
m_xDev.disposeAndReset(VclPtr<VirtualDevice>::Create());
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 16ad04bf660a..676aefe91859 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -432,14 +432,19 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
FontAttributes aNewFont;
int nSize = 0;
-#if POPPLER_CHECK_VERSION(0, 64, 0)
- const
+#if POPPLER_CHECK_VERSION(20, 12, 0)
+ std::string familyName = gfxFont->getNameWithoutSubsetTag();
+#else
+ std::string familyName = gfxFont->getName()->toStr();
+ if (familyName.length() > 7 && familyName.at(6) == '+')
+ {
+ familyName = familyName.substr(7);
+ }
#endif
- GooString* pFamily = gfxFont->getName();
- if( pFamily )
+ if( familyName != "" )
{
aNewFont.familyName.clear();
- aNewFont.familyName.append( gfxFont->getName() );
+ aNewFont.familyName.append( familyName );
}
else
{
@@ -456,12 +461,21 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, GfxState* state )
{
// TODO(P3): Unfortunately, need to read stream twice, since
// we must write byte count to stdout before
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+ if ( pBuf )
+ {
+ aNewFont.isEmbedded = true;
+ nSize = pBuf->size();
+ }
+#else
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
if( pBuf )
{
aNewFont.isEmbedded = true;
gfree(pBuf);
}
+#endif
}
m_aFontMap[ nNewId ] = aNewFont;
@@ -474,13 +488,29 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
return;
int nSize = 0;
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
+ if ( pBuf )
+ nSize = pBuf->size();
+ if ( nSize == 0 )
+ return;
+#else
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
if( !pBuf )
return;
+#endif
// ---sync point--- see SYNC STREAMS above
fflush(stdout);
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ if( fwrite(pBuf->data(), sizeof(*pBuf->data()), nSize, g_binary_out) != static_cast<size_t>(nSize) )
+ {
+ exit(1); // error
+ }
+ // ---sync point--- see SYNC STREAMS above
+ fflush(g_binary_out);
+#else
if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
{
gfree(pBuf);
@@ -489,6 +519,7 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
// ---sync point--- see SYNC STREAMS above
fflush(g_binary_out);
gfree(pBuf);
+#endif
}
#if POPPLER_CHECK_VERSION(0, 83, 0)
@@ -635,8 +666,15 @@ void PDFOutDev::updateLineDash(GfxState *state)
return;
assert(state);
- double* dashArray; int arrayLen; double startOffset;
+ int arrayLen; double startOffset;
+#if POPPLER_CHECK_VERSION(22, 9, 0)
+ const std::vector<double> &dash = state->getLineDash(&startOffset);
+ const double* dashArray = dash.data();
+ arrayLen = dash.size();
+#else
+ double* dashArray;
state->getLineDash(&dashArray, &arrayLen, &startOffset);
+#endif
printf( "updateLineDash" );
if( arrayLen && dashArray )
@@ -742,7 +780,11 @@ void PDFOutDev::updateFont(GfxState *state)
{
assert(state);
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ GfxFont *gfxFont = state->getFont().get();
+#else
GfxFont *gfxFont = state->getFont();
+#endif
if( !gfxFont )
return;
@@ -786,9 +828,6 @@ void PDFOutDev::updateFont(GfxState *state)
aEsc.data() );
}
printf( "\n" );
-
- if( nEmbedSize )
- writeFontFile(gfxFont);
}
void PDFOutDev::updateRender(GfxState *state)
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index b1a54bd09c5f..3ab3381652cd 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -119,6 +119,15 @@ int main(int argc, char **argv)
_setmode( _fileno( g_binary_out ), _O_BINARY );
#endif
+#if POPPLER_CHECK_VERSION(22, 6, 0)
+ PDFDoc aDoc( std::make_unique<GooString>(pFileName),
+ std::optional<GooString>(pOwnerPasswordStr),
+ std::optional<GooString>(pUserPasswordStr) );
+
+ PDFDoc aErrDoc( std::make_unique<GooString>(pErrFileName),
+ std::optional<GooString>(pOwnerPasswordStr),
+ std::optional<GooString>(pUserPasswordStr) );
+#else
PDFDoc aDoc( pFileName,
pOwnerPasswordStr,
pUserPasswordStr );
@@ -126,6 +135,7 @@ int main(int argc, char **argv)
PDFDoc aErrDoc( pErrFileName,
pOwnerPasswordStr,
pUserPasswordStr );
+#endif
// Check various permissions for aDoc.
PDFDoc &rDoc = aDoc.isOk()? aDoc: aErrDoc;
diff --git a/setup_native/source/packinfo/finals_instsetoo.txt.in b/setup_native/source/packinfo/finals_instsetoo.txt
index 0804f7e49150..d5a68d369f7b 100644
--- a/setup_native/source/packinfo/finals_instsetoo.txt.in
+++ b/setup_native/source/packinfo/finals_instsetoo.txt
@@ -30,4 +30,3 @@
# OpenOffice pro de \\<server>\<path>\msi\OOO300_m6_native_packed-1_de.9352\openofficeorg30.msi
# OpenOfficeLanguagePack pro es \\<server>\<path>\msi\OOO300_m6_native_packed-1_es.9352\openofficeorg30.msi
# URE pro en-US \\<server>\<path>\msi\OOO300_m6_native_packed-1_en-US.9352\ure14.msi
-CollaboraOffice pro en-US,ar,as,ast,bg,bn-IN,br,ca,ca-valencia,cy,cs,da,de,el,en-GB,es,et,eu,fi,fr,ga,gd,gl,gu,he,hi,hr,hu,id,is,it,ja,km,kn,ko,lt,lv,ml,mr,nb,nl,nn,oc,or,pa-IN,pl,pt,pt-BR,ro,ru,sk,sl,sr,sr-Latn,sv,ta,te,tr,uk,vi,zh-CN,zh-TW c:\lo\src\cp-6.4-2-@WINDOWS_SDK_ARCH@\Collabora_Office_6.4-2_Win_@WINDOWS_SDK_ARCH@.msi
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 47fb7a5f92c7..4f9af60cb981 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -955,6 +955,9 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// Sidebar
pViewFrame->ShowChildWindow( SID_SIDEBAR );
+ if (comphelper::LibreOfficeKit::isActive())
+ aSidebarMode = "Opened";
+
sfx2::sidebar::SidebarController* pSidebar =
sfx2::sidebar::SidebarController::GetSidebarControllerForFrame( xFrame );
if ( pSidebar )
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/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 694959d327e6..8366e2eef254 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -50,6 +50,7 @@
#include <vcl/svapp.hxx>
#include <vcl/uitest/logger.hxx>
#include <boost/property_tree/json_parser.hpp>
+#include <tools/json_writer.hxx>
#include <sfx2/app.hxx>
#include <sfx2/unoctitm.hxx>
@@ -71,6 +72,7 @@
#include <unotools/pathoptions.hxx>
#include <osl/time.h>
#include <sfx2/lokhelper.hxx>
+#include <basic/sberrors.hxx>
#include <iostream>
#include <map>
@@ -616,6 +618,21 @@ void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
collectUIInformation(aURL, aArgs);
SolarMutexGuard aGuard;
+
+ if (comphelper::LibreOfficeKit::isActive() &&
+ SfxViewShell::Current()->isBlockedCommand(aURL.Complete))
+ {
+ tools::JsonWriter aTree;
+ aTree.put("code", "");
+ aTree.put("kind", "BlockedCommand");
+ aTree.put("cmd", aURL.Complete);
+ aTree.put("message", "Blocked feature");
+ aTree.put("viewID", SfxViewShell::Current()->GetViewShellId().get());
+
+ SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_COMMAND_BLOCKED, aTree.extractData());
+ return;
+ }
+
if (
!(pDispatch &&
(
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index af3459680517..b5dfa876446b 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/util/Duration.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/CmisProperty.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vcl/timer.hxx>
#include <vcl/settings.hxx>
@@ -715,6 +716,8 @@ SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController*
, m_xUseThumbnailSaveCB(m_xBuilder->weld_check_button("thumbnailsavecb"))
, m_xTemplFt(m_xBuilder->weld_label("templateft"))
, m_xTemplValFt(m_xBuilder->weld_label("showtemplate"))
+ , m_xImagePreferredDpiCheckButton(m_xBuilder->weld_check_button("image-preferred-dpi-checkbutton"))
+ , m_xImagePreferredDpiComboBox(m_xBuilder->weld_combo_box("image-preferred-dpi-combobox"))
{
m_aUnknownSize = m_xShowSizeFT->get_label();
m_xShowSizeFT->set_label(OUString());
@@ -727,6 +730,7 @@ SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController*
m_xChangePassBtn->connect_clicked( LINK( this, SfxDocumentPage, ChangePassHdl ) );
m_xSignatureBtn->connect_clicked( LINK( this, SfxDocumentPage, SignatureHdl ) );
m_xDeleteBtn->connect_clicked( LINK( this, SfxDocumentPage, DeleteHdl ) );
+ m_xImagePreferredDpiCheckButton->connect_toggled(LINK(this, SfxDocumentPage, ImagePreferredDPICheckBoxClicked));
// [i96288] Check if the document signature command is enabled
// on the main list enable/disable the pushbutton accordingly
@@ -767,6 +771,12 @@ IMPL_LINK_NOARG(SfxDocumentPage, SignatureHdl, weld::Button&, void)
}
}
+IMPL_LINK_NOARG(SfxDocumentPage, ImagePreferredDPICheckBoxClicked, weld::ToggleButton&, void)
+{
+ bool bEnabled = m_xImagePreferredDpiCheckButton->get_state() == TRISTATE_TRUE;
+ m_xImagePreferredDpiComboBox->set_sensitive(bEnabled);
+}
+
IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, weld::Button&, void)
{
SfxObjectShell* pShell = SfxObjectShell::Current();
@@ -917,6 +927,26 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet )
}
}
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ if (pDocSh)
+ {
+ uno::Reference<lang::XMultiServiceFactory> xFac(pDocSh->GetModel(), uno::UNO_QUERY);
+ if (xFac.is())
+ {
+ uno::Reference<beans::XPropertySet> xProps(xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ if (xProps.is())
+ {
+ sal_Int32 nImagePreferredDPI = 0;
+ if (m_xImagePreferredDpiCheckButton->get_state() == TRISTATE_TRUE)
+ {
+ OUString aImagePreferredDPIString = m_xImagePreferredDpiComboBox->get_active_text();
+ nImagePreferredDPI = aImagePreferredDPIString.toInt32();
+ }
+ xProps->setPropertyValue("ImagePreferredDPI", uno::makeAny(nImagePreferredDPI));
+ }
+ }
+ }
+
return bRet;
}
@@ -1071,6 +1101,35 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
m_xDeleteBtn->set_sensitive( bEnableUseUserData );
m_xUseThumbnailSaveCB->set_active(bUseThumbnailSave);
m_xUseThumbnailSaveCB->save_state();
+
+ SfxObjectShell* pDocSh = SfxObjectShell::Current();
+ sal_Int32 nImagePreferredDPI = 0;
+ if (pDocSh)
+ {
+ try
+ {
+ uno::Reference< lang::XMultiServiceFactory > xFac( pDocSh->GetModel(), uno::UNO_QUERY_THROW );
+ uno::Reference< beans::XPropertySet > xProps( xFac->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY_THROW );
+
+ xProps->getPropertyValue("ImagePreferredDPI") >>= nImagePreferredDPI;
+ }
+ catch( uno::Exception& )
+ {
+ }
+ }
+ if (nImagePreferredDPI > 0)
+ {
+ m_xImagePreferredDpiCheckButton->set_state(TRISTATE_TRUE);
+ m_xImagePreferredDpiComboBox->set_sensitive(true);
+ m_xImagePreferredDpiComboBox->set_entry_text(OUString::number(nImagePreferredDPI));
+ }
+ else
+ {
+ m_xImagePreferredDpiCheckButton->set_state(TRISTATE_FALSE);
+ m_xImagePreferredDpiComboBox->set_sensitive(false);
+ m_xImagePreferredDpiComboBox->set_entry_text("");
+ }
+
}
SfxDocumentInfoDialog::SfxDocumentInfoDialog(weld::Window* pParent, const SfxItemSet& rItemSet)
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8b1271545dfb..84d724f7c58f 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -32,18 +32,22 @@
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <comphelper/propertyvalue.hxx>
#include <cppuhelper/implbase.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <rtl/ref.hxx>
#include <svtools/miscopt.hxx>
#include <svl/ownlist.hxx>
#include <svl/itemprop.hxx>
+#include <sfx2/docfile.hxx>
#include <sfx2/frmdescr.hxx>
+#include <sfx2/objsh.hxx>
#include <sfx2/sfxdlg.hxx>
#include <sfx2/sfxsids.hrc>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/window.hxx>
#include <tools/debug.hxx>
+#include <macroloader.hxx>
using namespace ::com::sun::star;
@@ -159,38 +163,62 @@ sal_Bool SAL_CALL IFrameObject::load(
{
if ( SvtMiscOptions().IsPluginsEnabled() )
{
- DBG_ASSERT( !mxFrame.is(), "Frame already existing!" );
- VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() );
- VclPtr<IFrameWindow_Impl> pWin = VclPtr<IFrameWindow_Impl>::Create( pParent, maFrmDescr.IsFrameBorderOn() );
- pWin->SetSizePixel( pParent->GetOutputSizePixel() );
- pWin->SetBackground();
- pWin->Show();
+ util::URL aTargetURL;
+ aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
+ uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
+ xTrans->parseStrict( aTargetURL );
- uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
- xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
+ INetURLObject aURLObject(aTargetURL.Complete);
+ if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script"))
+ return false;
- // we must destroy the IFrame before the parent is destroyed
- xWindow->addEventListener( this );
+ uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
+ SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- mxFrame = frame::Frame::create( mxContext );
- uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
- mxFrame->initialize( xWin );
- mxFrame->setName( maFrmDescr.GetName() );
+ bool bUpdateAllowed(true);
+ if (pDoc)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer();
+ bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
+ if (!bUpdateAllowed)
+ return false;
- uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY );
- if ( xFramesSupplier.is() )
- mxFrame->setCreator( xFramesSupplier );
+ OUString sReferer;
+ if (pDoc && pDoc->HasName())
+ sReferer = pDoc->GetMedium()->GetName();
- util::URL aTargetURL;
- aTargetURL.Complete = maFrmDescr.GetURL().GetMainURL( INetURLObject::DecodeMechanism::NONE );
- uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
- xTrans->parseStrict( aTargetURL );
+ uno::Reference<css::awt::XWindow> xParentWindow(xFrame->getContainerWindow());
+
+ if (!mxFrame.is())
+ {
+ VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow(xParentWindow);
+ VclPtr<IFrameWindow_Impl> pWin = VclPtr<IFrameWindow_Impl>::Create( pParent, maFrmDescr.IsFrameBorderOn() );
+ pWin->SetSizePixel( pParent->GetOutputSizePixel() );
+ pWin->SetBackground();
+ pWin->Show();
+
+ uno::Reference < awt::XWindow > xWindow( pWin->GetComponentInterface(), uno::UNO_QUERY );
+ xFrame->setComponent( xWindow, uno::Reference < frame::XController >() );
+
+ // we must destroy the IFrame before the parent is destroyed
+ xWindow->addEventListener( this );
+
+ mxFrame = frame::Frame::create( mxContext );
+ uno::Reference < awt::XWindow > xWin( pWin->GetComponentInterface(), uno::UNO_QUERY );
+ mxFrame->initialize( xWin );
+ mxFrame->setName( maFrmDescr.GetName() );
+
+ uno::Reference < frame::XFramesSupplier > xFramesSupplier( xFrame, uno::UNO_QUERY );
+ if ( xFramesSupplier.is() )
+ mxFrame->setCreator( xFramesSupplier );
+ }
- uno::Sequence < beans::PropertyValue > aProps(2);
- aProps[0].Name = "PluginMode";
- aProps[0].Value <<= sal_Int16(2);
- aProps[1].Name = "ReadOnly";
- aProps[1].Value <<= true;
+ uno::Sequence < beans::PropertyValue > aProps{
+ comphelper::makePropertyValue("PluginMode", sal_Int16(2)),
+ comphelper::makePropertyValue("ReadOnly", true),
+ comphelper::makePropertyValue("Referer", sReferer)
+ };
uno::Reference < frame::XDispatch > xDisp = mxFrame->queryDispatch( aTargetURL, "_self", 0 );
if ( xDisp.is() )
xDisp->dispatch( aTargetURL, aProps );
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 619054815bff..6963f62cf6b5 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1851,9 +1851,10 @@ void SfxObjectShell::AfterSigning(bool bSignSuccess, bool bSignScriptingContent)
EnableSetModified();
}
-bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
+bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent, weld::Window* pDialogParent)
{
- if (GetMedium()->IsOriginallyReadOnly())
+ // in LOK case we support only viewer / readonly mode so far
+ if (GetMedium()->IsOriginallyReadOnly() || comphelper::LibreOfficeKit::isActive())
{
// If the file is physically read-only, we just show the existing signatures
try
@@ -1863,6 +1864,10 @@ bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
uno::Reference<security::XDocumentDigitalSignatures> xSigner(
security::DocumentDigitalSignatures::createWithVersionAndValidSignature(
comphelper::getProcessComponentContext(), aODFVersion, HasValidSignatures()));
+
+ if (pDialogParent)
+ xSigner->setParentWindow(pDialogParent->GetXWindow());
+
if (bSignScriptingContent)
xSigner->showScriptingContentSignatures(GetMedium()->GetZipStorageToSign_Impl(),
uno::Reference<io::XInputStream>());
@@ -1876,6 +1881,18 @@ bool SfxObjectShell::CheckIsReadonly(bool bSignScriptingContent)
{
std::unique_ptr<SvStream> pStream(
utl::UcbStreamHelper::CreateStream(GetName(), StreamMode::READ));
+
+ if (!pStream)
+ {
+ pStream = utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), StreamMode::READ);
+
+ if (!pStream)
+ {
+ SAL_WARN( "sfx.doc", "Couldn't use signing functionality!" );
+ return true;
+ }
+ }
+
uno::Reference<io::XInputStream> xStream(new utl::OStreamWrapper(*pStream));
xSigner->showDocumentContentSignatures(uno::Reference<embed::XStorage>(),
xStream);
@@ -1908,7 +1925,7 @@ void SfxObjectShell::SignDocumentContent(weld::Window* pDialogParent)
if (!PrepareForSigning(pDialogParent))
return;
- if (CheckIsReadonly(false))
+ if (CheckIsReadonly(false, pDialogParent))
return;
bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, false, HasValidSignatures());
@@ -2005,7 +2022,7 @@ void SfxObjectShell::SignSignatureLine(weld::Window* pDialogParent,
if (!PrepareForSigning(pDialogParent))
return;
- if (CheckIsReadonly(false))
+ if (CheckIsReadonly(false, pDialogParent))
return;
bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent,
@@ -2030,7 +2047,7 @@ void SfxObjectShell::SignScriptingContent(weld::Window* pDialogParent)
if (!PrepareForSigning(pDialogParent))
return;
- if (CheckIsReadonly(true))
+ if (CheckIsReadonly(true, pDialogParent))
return;
bool bSignSuccess = GetMedium()->SignContents_Impl(pDialogParent, true, HasValidSignatures());
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 49d90e54c599..8d101e8aac04 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -774,7 +774,15 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
else
{
- bOk = ConvertFrom(*pMedium);
+ if (tools::isEmptyFileUrl(pMedium->GetName()))
+ {
+ // The import filter would fail with empty input.
+ bOk = true;
+ }
+ else
+ {
+ bOk = ConvertFrom(*pMedium);
+ }
InitOwnModel_Impl();
}
}
@@ -2423,6 +2431,7 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
bool bHasBaseURL = false;
bool bHasFilterName = false;
bool bIsRedactMode = false;
+ bool bIsPreview = false;
sal_Int32 nEnd = aOldArgs.getLength();
for ( sal_Int32 i = 0; i < nEnd; i++ )
@@ -2440,6 +2449,13 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
bHasFilterName = true;
}
+ const css::uno::Sequence<css::beans::PropertyValue>& rMediumArgs = rMedium.GetArgs();
+ for ( sal_Int32 i = 0; i < rMediumArgs.getLength(); i++ )
+ {
+ if( rMediumArgs[i].Name == "IsPreview" )
+ rMediumArgs[i].Value >>= bIsPreview;
+ }
+
// FIXME: Handle this inside TransformItems()
if (pItems->GetItemState(SID_IS_REDACT_MODE) == SfxItemState::SET)
bIsRedactMode = true;
@@ -2480,6 +2496,13 @@ bool SfxObjectShell::ExportTo( SfxMedium& rMedium )
aArgs[nEnd-1].Value <<= bIsRedactMode;
}
+ if (bIsPreview)
+ {
+ aArgs.realloc( ++nEnd );
+ aArgs[nEnd-1].Name = "IsPreview";
+ aArgs[nEnd-1].Value <<= bIsPreview;
+ }
+
return xFilter->filter( aArgs );
}catch(...)
{}
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/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 0fdb739cd3f0..cc06c280f71a 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -382,7 +382,8 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
// * in LOK: Paste Special feature was incorrectly initialized
// Skip first request so Notebookbar will be initialized after document was loaded
static std::map<const void*, bool> bSkippedFirstInit;
- if (comphelper::LibreOfficeKit::isActive() && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end())
+ if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer
+ && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end())
{
bSkippedFirstInit[pViewShell] = true;
return false;
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 9208c6e35476..8eab6c772528 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -177,6 +177,23 @@ void SfxLokHelper::setView(int nId)
}
+SfxViewShell* SfxLokHelper::getViewOfId(int nId)
+{
+ SfxApplication* pApp = SfxApplication::Get();
+ if (pApp == nullptr)
+ return nullptr;
+
+ const ViewShellId nViewShellId(nId);
+ SfxViewShellArr_Impl& rViewArr = pApp->GetViewShells_Impl();
+ for (SfxViewShell* pViewShell : rViewArr)
+ {
+ if (pViewShell->GetViewShellId() == nViewShellId)
+ return pViewShell;
+ }
+
+ return nullptr;
+}
+
int SfxLokHelper::getView(const SfxViewShell* pViewShell)
{
if (!pViewShell)
@@ -489,14 +506,16 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* pThisView,
pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_WINDOW, s.getStr());
}
-void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, const OString& rPayload)
+void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, tools::Rectangle const* pRect)
{
- OStringBuffer aBuf(32);
-
if (DisableCallbacks::disabled())
return;
- aBuf.append(rPayload);
+ OStringBuffer aBuf(64);
+ if (pRect)
+ aBuf.append(pRect->toString());
+ else
+ aBuf.append("EMPTY");
if (comphelper::LibreOfficeKit::isPartInInvalidation())
{
aBuf.append(", ");
@@ -608,7 +627,7 @@ namespace
void LOKPostAsyncEvent(void* pEv, void*)
{
- LOKAsyncEventData* pLOKEv = static_cast<LOKAsyncEventData*>(pEv);
+ std::unique_ptr<LOKAsyncEventData> pLOKEv(static_cast<LOKAsyncEventData*>(pEv));
if (pLOKEv->mpWindow->IsDisposed())
return;
@@ -629,6 +648,9 @@ namespace
if (!pFocusWindow)
pFocusWindow = pLOKEv->mpWindow;
+ if (pLOKEv->mpWindow->IsDisposed())
+ return;
+
switch (pLOKEv->mnEvent)
{
case VclEventId::WindowKeyInput:
@@ -637,11 +659,13 @@ namespace
KeyEvent singlePress(pLOKEv->maKeyEvent.GetCharCode(),
pLOKEv->maKeyEvent.GetKeyCode());
for (sal_uInt16 i = 0; i <= nRepeat; ++i)
- pFocusWindow->KeyInput(singlePress);
+ if (!pFocusWindow->IsDisposed())
+ pFocusWindow->KeyInput(singlePress);
break;
}
case VclEventId::WindowKeyUp:
- pFocusWindow->KeyUp(pLOKEv->maKeyEvent);
+ if (!pFocusWindow->IsDisposed())
+ pFocusWindow->KeyUp(pLOKEv->maKeyEvent);
break;
case VclEventId::WindowMouseButtonDown:
pLOKEv->mpWindow->LogicMouseButtonDown(pLOKEv->maMouseEvent);
@@ -672,8 +696,6 @@ namespace
assert(false);
break;
}
-
- delete pLOKEv;
}
void postEventAsync(LOKAsyncEventData *pEvent)
@@ -717,6 +739,16 @@ void SfxLokHelper::postKeyEventAsync(const VclPtr<vcl::Window> &xWindow,
postEventAsync(pLOKEv);
}
+void SfxLokHelper::setBlockedCommandList(int nViewId, const char* bolckedCommandList)
+{
+ SfxViewShell* pViewShell = SfxLokHelper::getViewOfId(nViewId);
+
+ if(pViewShell)
+ {
+ pViewShell->setBlockedCommandList(bolckedCommandList);
+ }
+}
+
void SfxLokHelper::postExtTextEventAsync(const VclPtr<vcl::Window> &xWindow,
int nType, const OUString &rText)
{
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 75ec246b4fb6..456915a8cfd6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/drawing/XShapes.hpp>
+#include <com/sun/star/task/PasswordContainer.hpp>
#include <officecfg/Office/Common.hxx>
#include <officecfg/Setup.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -1369,6 +1370,24 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
}
} //bShowTipOfTheDay
+ if (officecfg::Office::Common::Passwords::HasMaster::get() &&
+ officecfg::Office::Common::Passwords::StorageVersion::get() == 0)
+ {
+ // master password stored in deprecated format
+ VclPtr<SfxInfoBarWindow> pOldMasterPasswordInfoBar =
+ AppendInfoBar("oldmasterpassword", "",
+ SfxResId(STR_REFRESH_MASTER_PASSWORD), InfobarType::DANGER, false);
+ if (pOldMasterPasswordInfoBar)
+ {
+ VclPtrInstance<PushButton> const xBtn(&GetWindow());
+ xBtn->SetText(SfxResId(STR_REFRESH_PASSWORD));
+ xBtn->SetSizePixel(xBtn->GetOptimalSize());
+ xBtn->SetClickHdl(LINK(this,
+ SfxViewFrame, RefreshMasterPasswordHdl));
+ pOldMasterPasswordInfoBar->addButton(xBtn);
+ }
+ }
+
// read-only infobar if necessary
const SfxViewShell *pVSh;
const SfxShell *pFSh;
@@ -1517,6 +1536,27 @@ IMPL_LINK_NOARG(SfxViewFrame, SignDocumentHandler, Button*, void)
GetDispatcher()->Execute(SID_SIGNATURE);
}
+IMPL_LINK_NOARG(SfxViewFrame, RefreshMasterPasswordHdl, Button*, void)
+{
+ bool bChanged = false;
+ try
+ {
+ Reference< task::XPasswordContainer2 > xMasterPasswd(
+ task::PasswordContainer::create(comphelper::getProcessComponentContext()));
+
+ css::uno::Reference<css::frame::XFrame> xFrame = GetFrame().GetFrameInterface();
+ css::uno::Reference<css::awt::XWindow> xContainerWindow = xFrame->getContainerWindow();
+
+ uno::Reference<task::XInteractionHandler> xTmpHandler(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
+ xContainerWindow));
+ bChanged = xMasterPasswd->changeMasterPassword(xTmpHandler);
+ }
+ catch (const Exception&)
+ {}
+ if (bChanged)
+ RemoveInfoBar(u"oldmasterpassword");
+}
+
void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh )
{
m_pImpl->bResizeInToOut = true;
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d7790fcdb6f5..f8f4f615966b 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -98,7 +98,7 @@
#include <sfx2/lokhelper.hxx>
#include <openuriexternally.hxx>
#include <shellimpl.hxx>
-
+#include <iostream>
#include <vector>
#include <libxml/xmlwriter.h>
@@ -1480,6 +1480,7 @@ void SfxViewShell::libreOfficeKitViewCallback(int nType, const char* pPayload) c
{
case LOK_CALLBACK_FORM_FIELD_BUTTON:
case LOK_CALLBACK_TEXT_SELECTION:
+ case LOK_CALLBACK_COMMENT:
break;
default:
// Reject e.g. invalidate during paint.
@@ -2100,4 +2101,23 @@ weld::Window* SfxViewShell::GetFrameWeld() const
return pWindow ? pWindow->GetFrameWeld() : nullptr;
}
+void SfxViewShell::setBlockedCommandList(const char* bolckedCommandList)
+{
+ if(!mvLOKBlockedCommandList.empty())
+ return;
+
+ OUString BolckedListString(bolckedCommandList, strlen(bolckedCommandList), RTL_TEXTENCODING_UTF8);
+ OUString command = BolckedListString.getToken(0, ' ');
+ for (size_t i = 1; !command.isEmpty(); i++)
+ {
+ mvLOKBlockedCommandList.emplace(command);
+ command = BolckedListString.getToken(i, ' ');
+ }
+}
+
+bool SfxViewShell::isBlockedCommand(OUString command)
+{
+ return mvLOKBlockedCommandList.find(command) != mvLOKBlockedCommandList.end();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/uiconfig/ui/documentinfopage.ui b/sfx2/uiconfig/ui/documentinfopage.ui
index 6799a99f5665..d51a82876170 100644
--- a/sfx2/uiconfig/ui/documentinfopage.ui
+++ b/sfx2/uiconfig/ui/documentinfopage.ui
@@ -1,224 +1,225 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.22.1 -->
+<!-- Generated with glade 3.38.2 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
+ <!-- n-columns=3 n-rows=14 -->
<object class="GtkGrid" id="DocumentInfoPage">
<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">12</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
+ <property name="border-width">12</property>
+ <property name="row-spacing">6</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label13">_Created:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showcreate</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showcreate</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>
</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="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label14">_Modified:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showmodify</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showmodify</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">5</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">5</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label15">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label15">_Digitally signed:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showsigned</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showsigned</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">7</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label16">Last pri_nted:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showprint</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showprint</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">8</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">8</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="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label17">Total _editing time:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showedittime</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showedittime</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">9</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">9</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label18">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label18">Re_vision number:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showrevision</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showrevision</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">10</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">10</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showcreate">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</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>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showmodify">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">5</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">5</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showsigned">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes" context="documentinfopage|showsigned">Multiply signed document</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">7</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">7</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showprint">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">8</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">8</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showedittime">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">9</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">9</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showrevision">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">10</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">10</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="userdatacb">
<property name="label" translatable="yes" context="documentinfopage|userdatacb">_Apply user data</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">1</property>
- <property name="top_attach">11</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">11</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="thumbnailsavecb">
<property name="label" translatable="yes" context="documentinfopage|thumbnailsavecb">Save preview image with this document</property>
<property name="visible">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="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">1</property>
- <property name="top_attach">12</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">12</property>
</packing>
</child>
<child>
<object class="GtkButton" id="reset">
<property name="label" translatable="yes" context="documentinfopage|reset">Reset Properties</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="no_show_all">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="no-show-all">True</property>
<property name="valign">center</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">11</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">11</property>
<property name="height">2</property>
</packing>
</child>
@@ -226,179 +227,256 @@
<object class="GtkButton" id="signature">
<property name="label" translatable="yes" context="documentinfopage|signature">Di_gital Signatures...</property>
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="receives_default">True</property>
+ <property name="can-focus">True</property>
+ <property name="has-focus">True</property>
+ <property name="receives-default">True</property>
<property name="valign">center</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</property>
</object>
<packing>
- <property name="left_attach">2</property>
- <property name="top_attach">6</property>
+ <property name="left-attach">2</property>
+ <property name="top-attach">6</property>
<property name="height">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label11">_Size:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showsize</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showsize</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="GtkLabel" id="showsize">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="label" translatable="yes" context="documentinfopage|showsize">unknown</property>
<property name="selectable">True</property>
<property name="xalign">0</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>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|label8">_Location:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showlocation</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showlocation</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="showlocation">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can-focus">True</property>
<property name="hexpand">True</property>
<property name="selectable">True</property>
<property name="ellipsize">middle</property>
- <property name="max_width_chars">50</property>
+ <property name="max-width-chars">50</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">2</property>
<property name="width">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="xpad">1</property>
<property name="label" translatable="yes" context="documentinfopage|label7">_Type:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showtype</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showtype</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="showtype">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="selectable">True</property>
<property name="xalign">0</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="GtkButton" id="changepass">
<property name="label" translatable="yes" context="documentinfopage|changepass">Change _Password</property>
<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>
<property name="valign">start</property>
- <property name="use_underline">True</property>
+ <property name="use-underline">True</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>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="templateft">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="halign">end</property>
<property name="label" translatable="yes" context="documentinfopage|templateft">Template:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">showtemplate</property>
+ <property name="use-underline">True</property>
+ <property name="mnemonic-widget">showtemplate</property>
</object>
<packing>
- <property name="left_attach">0</property>
- <property name="top_attach">6</property>
+ <property name="left-attach">0</property>
+ <property name="top-attach">6</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="showtemplate">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="selectable">True</property>
- <property name="max_width_chars">56</property>
+ <property name="max-width-chars">56</property>
<property name="xalign">0</property>
</object>
<packing>
- <property name="left_attach">1</property>
- <property name="top_attach">6</property>
+ <property name="left-attach">1</property>
+ <property name="top-attach">6</property>
</packing>
</child>
<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="column_spacing">12</property>
+ <property name="can-focus">False</property>
+ <property name="column-spacing">12</property>
<child>
<object class="GtkImage" id="icon">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="valign">center</property>
<property name="stock">gtk-missing-image</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="nameed">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">False</property>
<property name="selectable">True</property>
- <property name="single_line_mode">True</property>
- <property name="max_width_chars">56</property>
+ <property name="single-line-mode">True</property>
+ <property name="max-width-chars">56</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">1</property>
+ <property name="top-attach">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <child>
+ <object class="GtkCheckButton" id="image-preferred-dpi-checkbutton">
+ <property name="label" translatable="yes" context="documentinfopage|image-preferred-dpi-checkbutton">Image preferred DPI</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">False</property>
+ <property name="hexpand">True</property>
+ <property name="draw-indicator">True</property>
+ <accessibility>
+ <relation type="label-for" target="image-preferred-dpi-combobox"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="image-preferred-dpi-combobox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="has-entry">True</property>
+ <items>
+ <item>96</item>
+ <item>150</item>
+ <item>200</item>
+ <item>300</item>
+ <item>600</item>
+ </items>
+ <child internal-child="entry">
+ <object class="GtkEntry">
+ <property name="can-focus">False</property>
+ </object>
+ </child>
+ <accessibility>
+ <relation type="labelled-by" target="image-preferred-dpi-checkbutton"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</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">13</property>
</packing>
</child>
<child>
@@ -410,5 +488,11 @@
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>
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/bin/modules/installer/download.pm b/solenv/bin/modules/installer/download.pm
index c1776053ec1e..60cb9771436c 100644
--- a/solenv/bin/modules/installer/download.pm
+++ b/solenv/bin/modules/installer/download.pm
@@ -516,7 +516,7 @@ sub create_tar_gz_file_from_directory
unlink("$installdir/install");
}
- my $systemcall = "cd $changedir; $fakerootstring tar -cf - $packdir | gzip > $targzname";
+ my $systemcall = "cd $changedir; $fakerootstring tar -cf - $packdir | $installer::globals::packertool > $targzname";
my $returnvalue = system($systemcall);
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index ed0066c65f2e..7b5a5da77198 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -1193,7 +1193,7 @@ sub set_autoprovreq_in_specfile
close (FINDREQUIRES);
}
- $autoreqprovline .= "%define _binary_filedigest_algorithm 1\n%define _binary_payload w9.gzdio\n";
+ $autoreqprovline .= "%define _binary_filedigest_algorithm 1\n%define _binary_payload w1T.xzdio\n";
for ( my $i = 0; $i <= $#{$changefile}; $i++ )
{
@@ -1839,7 +1839,7 @@ sub create_packages_without_epm
# Solaris: pkgmk -o -f solaris-2.8-sparc/SUNWso8m34.prototype -d solaris-2.8-sparc
# Solaris: pkgtrans solaris-2.8-sparc SUNWso8m34.pkg SUNWso8m34
- # Solaris: tar -cf - SUNWso8m34 | gzip > SUNWso8m34.tar.gz
+ # Solaris: tar -cf - SUNWso8m34 | $installer::globals::packertool > SUNWso8m34.tar.gz
if ( $installer::globals::issolarispkgbuild )
{
@@ -1983,7 +1983,7 @@ sub create_packages_without_epm
#########################
# my $targzname = $packagename . ".tar.gz";
- # $systemcall = "cd $destinationdir; tar -cf - $packagename | gzip > $targzname";
+ # $systemcall = "cd $destinationdir; tar -cf - $packagename | $installer::globals::packertool > $targzname";
# print "... $systemcall ...\n";
# $returnvalue = system($systemcall);
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index e57627bb441b..11442ef202a8 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -129,6 +129,8 @@ BEGIN
$strip = 0;
+ $packertool = "gzip"; # the default package compression tool for *NIX
+
$logfilename = "logfile.log"; # the default logfile name for global errors
@logfileinfo = ();
@errorlogfileinfo = ();
@@ -219,7 +221,7 @@ BEGIN
$fix_number_of_cab_files = 1;
$cabfilecompressionlevel = 21; # Using LZX compression, possible values are: 15 | 16 | ... | 21 (best compression)
$number_of_cabfiles = 1; # only for $fix_number_of_cab_files = 1
- $include_cab_in_msi = 0;
+ $include_cab_in_msi = 1;
$msidatabasename = "";
$prepare_winpatch = 0;
$previous_idt_dir = "";
diff --git a/solenv/bin/modules/installer/helppack.pm b/solenv/bin/modules/installer/helppack.pm
index 726157be2e27..456e91ecfdb0 100644
--- a/solenv/bin/modules/installer/helppack.pm
+++ b/solenv/bin/modules/installer/helppack.pm
@@ -130,7 +130,7 @@ sub create_tar_gz_file
$packagename =~ s/\.rpm\s*$//;
my $targzname = $packagename . ".tar.gz";
- my $systemcall = "cd $installdir; tar -cf - $packagestring | gzip > $targzname";
+ my $systemcall = "cd $installdir; tar -cf - $packagestring | $installer::globals::packertool > $targzname";
installer::logger::print_message( "... $systemcall ...\n" );
my $returnvalue = system($systemcall);
diff --git a/solenv/bin/modules/installer/languagepack.pm b/solenv/bin/modules/installer/languagepack.pm
index a39769144de6..14a870866128 100644
--- a/solenv/bin/modules/installer/languagepack.pm
+++ b/solenv/bin/modules/installer/languagepack.pm
@@ -128,7 +128,7 @@ sub create_tar_gz_file
$packagename =~ s/\.rpm\s*$//;
my $targzname = $packagename . ".tar.gz";
- $systemcall = "cd $installdir; tar -cf - $packagestring | gzip > $targzname";
+ $systemcall = "cd $installdir; tar -cf - $packagestring | $installer::globals::packertool > $targzname";
installer::logger::print_message( "... $systemcall ...\n" );
my $returnvalue = system($systemcall);
diff --git a/solenv/bin/modules/installer/parameter.pm b/solenv/bin/modules/installer/parameter.pm
index 9d8efbb558a6..657b543ee702 100644
--- a/solenv/bin/modules/installer/parameter.pm
+++ b/solenv/bin/modules/installer/parameter.pm
@@ -56,6 +56,7 @@ The following parameter are needed:
-languagepack : do create a languagepack, no product pack (optional)
-helppack : do create a helppack, no product pack (optional)
-strip: Stripping files (Unix only)
+-packer: Path and parameters for tarball packaging tool (default: gzip (Unix only))
-log : Logging all available information (optional)
Examples for Windows:
@@ -127,6 +128,7 @@ sub getparameter
elsif ($param eq "-helppack") { $installer::globals::helppack = 1;}
elsif ($param eq "-debian") { $installer::globals::debian = 1; }
elsif ($param eq "-strip") { $installer::globals::strip = 1; }
+ elsif ($param eq "-packer") { $installer::globals::packertool = shift(@ARGV); }
elsif ($param eq "-destdir") # new parameter for simple installer
{
$installer::globals::rootpath ne "" && die "must set destdir before -i or -simple";
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm
index e3682bafe736..4c9be245b52b 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -461,7 +461,7 @@ sub create_package
my $megabytes = 1500;
$megabytes = 2000 if $ENV{'ENABLE_DBGUTIL'};
$systemcall = "cd $localtempdir && hdiutil create -megabytes $megabytes -srcfolder $folder $archive -ov -fs HFS+ -volname \"$volume_name\" -format UDBZ";
- if (( $ref ne "" ) && ( $$ref ne "" )) {
+ if (( $ref ne "" ) && ( $$ref ne "" ) && system("hdiutil 2>&1 | grep unflatten") == 0) {
$systemcall .= " && hdiutil unflatten $archive && Rez -a $$ref -o $archive && hdiutil flatten $archive";
}
}
@@ -474,7 +474,7 @@ sub create_package
$fakerootstring = "fakeroot";
}
- $systemcall = "cd $tempdir; $fakerootstring tar -cf - . | gzip > $archive";
+ $systemcall = "cd $tempdir; $fakerootstring tar -cf - . | $installer::globals::packertool > $archive";
}
if ( $makesystemcall )
diff --git a/solenv/bin/modules/installer/windows/admin.pm b/solenv/bin/modules/installer/windows/admin.pm
index 3dfba9e7a8de..f822afe7eaec 100644
--- a/solenv/bin/modules/installer/windows/admin.pm
+++ b/solenv/bin/modules/installer/windows/admin.pm
@@ -287,9 +287,8 @@ sub create_directory_structure
{
if ( ! exists($fullpathhash{$dir}) ) { $fullpathhash{$dir} = $targetdir; }
}
- # FIXME why is this hack needed? ERROR: Did not find full directory path for dir: "SystemFolder_x86_VC.194841A2_D0F2_3B96_9F71_05BA91BEA0FA"
+ # FIXME why is this hack needed? ERROR: Did not find full directory path for dir: "ystemFolder_x86_VC.194841A2_D0F2_3B96_9F71_05BA91BEA0FA"
$fullpathhash{"SystemFolder_x86_VC.194841A2_D0F2_3B96_9F71_05BA91BEA0FA"} = $targetdir . $installer::globals::separator . "System";
- $fullpathhash{"SystemFolder_x86_VC.E281B893_10D7_34CE_BB0E_B69D88E154A5"} = $targetdir . $installer::globals::separator . "System";
$fullpathhash{"System64Folder_amd64_VC.AF4EABEE_4589_3789_BA0A_C83A71662E1D"} = $targetdir . $installer::globals::separator . "System64";
return \%fullpathhash;
diff --git a/solenv/bin/modules/installer/windows/msp.pm b/solenv/bin/modules/installer/windows/msp.pm
index 3783634ff395..069b5dfeb0f6 100644
--- a/solenv/bin/modules/installer/windows/msp.pm
+++ b/solenv/bin/modules/installer/windows/msp.pm
@@ -288,7 +288,7 @@ sub set_mspfilename
{
my ($allvariables, $mspdir, $languagesarrayref) = @_;
- my $databasename = $allvariables->{'ONEWORDPRODUCTNAME'} . "-" . $allvariables->{'PRODUCTVERSION'} . "-" . $allvariables->{'WINDOWSPATCHLEVEL'} . ".msp";
+ my $databasename = $allvariables->{'PRODUCTNAME'} . "-" . $allvariables->{'PRODUCTVERSION'} . "-" . $allvariables->{'WINDOWSPATCHLEVEL'} . ".msp";
my $fullmspname = $mspdir . $installer::globals::separator . $databasename;
diff --git a/solenv/bin/modules/installer/worker.pm b/solenv/bin/modules/installer/worker.pm
index d002595c69fe..13c576cd54a9 100644
--- a/solenv/bin/modules/installer/worker.pm
+++ b/solenv/bin/modules/installer/worker.pm
@@ -913,7 +913,7 @@ sub collectpackagemaps
# Create a tar gz file with all package maps
my $tarfilename = $subdirname . ".tar";
my $targzname = $tarfilename . ".gz";
- $systemcall = "cd $pkgmapdir; tar -cf - $subdirname | gzip > $targzname";
+ $systemcall = "cd $pkgmapdir; tar -cf - $subdirname | $installer::globals::packertool > $targzname";
installer::systemactions::make_systemcall($systemcall);
installer::systemactions::remove_complete_directory($pkgmapsubdir, 1);
}
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 864518c389e4..2bc3f662b09c 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -14826,6 +14826,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 4ff860db39e6..2c7cfdda3447 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -231,10 +231,11 @@
"dest-filename": "external/tarballs/libe-book-0.1.3.tar.xz"
},
{
- "url": "https://dev-www.libreoffice.org/src/libetonyek-0.1.9.tar.xz",
- "sha256": "e61677e8799ce6e55b25afc11aa5339113f6a49cff031f336e32fa58635b1a4a",
+ "url": "https://dev-www.libreoffice.org/src/libetonyek-0.1.10.tar.xz",
+ "sha256": "b430435a6e8487888b761dc848b7981626eb814884963ffe25eb26a139301e9a",
"type": "file",
- "dest-filename": "external/tarballs/libetonyek-0.1.9.tar.xz"
+ "dest": "external/tarballs",
+ "dest-filename": "libetonyek-0.1.10.tar.xz"
},
{
"url": "https://dev-www.libreoffice.org/src/libexttextcat-3.4.5.tar.xz",
@@ -267,16 +268,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",
@@ -381,10 +382,10 @@
"dest-filename": "external/tarballs/poppler-0.82.0.tar.xz"
},
{
- "url": "https://dev-www.libreoffice.org/src/postgresql-9.2.24.tar.bz2",
- "sha256": "a754c02f7051c2f21e52f8669a421b50485afcde9a581674d6106326b189d126",
+ "url": "https://dev-www.libreoffice.org/src/postgresql-13.1.tar.bz2",
+ "sha256": "12345c83b89aa29808568977f5200d6da00f88a035517f925293355432ffe61f",
"type": "file",
- "dest-filename": "external/tarballs/postgresql-9.2.24.tar.bz2"
+ "dest-filename": "external/tarballs/postgresql-13.1.tar.bz2"
},
{
"url": "https://dev-www.libreoffice.org/src/QR-Code-generator-1.4.0.tar.gz",
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 192af29de552..143847fb66f4 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -662,7 +662,7 @@ endef
gb_UIMenubarTarget_UIMenubarTarget_platform :=
# Python
-gb_Python_PRECOMMAND := PATH="$(shell cygpath -w $(INSTDIR)/program)" PYTHONHOME="$(INSTDIR)/program/python-core-3.7.7" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-3.7.7/lib;$(INSTDIR)/program/python-core-3.7.7/lib/lib-dynload:$(INSTDIR)/program"
+gb_Python_PRECOMMAND := PATH="$(shell cygpath -w $(INSTDIR)/program)" PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib;$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload:$(INSTDIR)/program"
gb_Python_INSTALLED_EXECUTABLE := $(INSTROOT)/$(LIBO_BIN_FOLDER)/python.exe
gb_ICU_PRECOMMAND := PATH="$(shell cygpath -w $(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source/lib)"
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index fbbd439030cf..e386601996f2 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -350,7 +350,7 @@ endef
gb_UIMenubarTarget_UIMenubarTarget_platform :=
# Python
-gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-3.7.7" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-3.7.7/lib:$(INSTDIR)/program/python-core-3.7.7/lib/lib-dynload:$(INSTDIR)/program"
+gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib:$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload:$(INSTDIR)/program"
gb_Python_INSTALLED_EXECUTABLE := /bin/sh $(INSTROOT)/program/python
# this is passed to gdb as executable when running tests
gb_Python_INSTALLED_EXECUTABLE_GDB := $(INSTROOT)/program/python.bin
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 8c0add6d7dd1..8854aab6c425 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -383,7 +383,7 @@ endef
gb_UIMenubarTarget_UIMenubarTarget_platform :=
# Python
-gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-3.7.7" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-3.7.7/lib:$(INSTDIR)/program/python-core-3.7.7/lib/lib-dynload"
+gb_Python_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(INSTDIR)/program/python-core-$(PYTHON_VERSION)" PYTHONPATH="$${PYPATH:+$$PYPATH:}$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib:$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib/lib-dynload"
gb_Python_INSTALLED_EXECUTABLE := /bin/sh $(INSTROOT)/program/python
# this is passed to gdb as executable when running tests
gb_Python_INSTALLED_EXECUTABLE_GDB := $(INSTROOT)/program/python.bin
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/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/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx
index f00812b30b8d..3b490c6ac1fe 100644
--- a/svl/source/config/languageoptions.cxx
+++ b/svl/source/config/languageoptions.cxx
@@ -142,7 +142,7 @@ SvtScriptType SvtLanguageOptions::GetScriptTypeOfLanguage( LanguageType nLang )
{
if( LANGUAGE_DONTKNOW == nLang )
nLang = LANGUAGE_ENGLISH_US;
- else if( LANGUAGE_SYSTEM == nLang )
+ else if (LANGUAGE_SYSTEM == nLang || LANGUAGE_PROCESS_OR_USER_DEFAULT == nLang)
nLang = SvtSysLocale().GetLanguageTag().getLanguageType();
sal_Int16 nScriptType = MsLangId::getScriptType( nLang );
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index 950201bef962..233e88d2bb20 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -391,7 +391,7 @@ struct DoesStyleMatchStyleSheetPredicate final : public svl::StyleSheetPredicate
SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
SfxStyleFamily eFam, SfxStyleSearchBits n)
: pCurrentStyle(nullptr)
- , nCurrentPosition(0)
+ , mnCurrentPosition(0)
{
pBasePool=pBase;
nSearchFamily=eFam;
@@ -434,7 +434,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
if( IsTrivialSearch())
{
retval = pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetByPosition(nIdx);
- nCurrentPosition = nIdx;
+ mnCurrentPosition = nIdx;
}
else if(nMask == SfxStyleSearchBits::All)
{
@@ -443,7 +443,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetPositionsByFamily(nSearchFamily).at(nIdx))
;
retval = ref.get();
- nCurrentPosition = nIdx;
+ mnCurrentPosition = nIdx;
}
else
{
@@ -452,7 +452,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::operator[](sal_uInt16 nIdx)
pBasePool->pImpl->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(nIdx, predicate);
if (ref.get() != nullptr)
{
- nCurrentPosition = pBasePool->pImpl->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
+ mnCurrentPosition = pBasePool->pImpl->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
retval = ref.get();
}
}
@@ -483,21 +483,21 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
if ( IsTrivialSearch() )
{
unsigned nStyleSheets = pBasePool->pImpl->mxIndexedStyleSheets->GetNumberOfStyleSheets();
- unsigned newPosition = nCurrentPosition +1;
+ unsigned newPosition = mnCurrentPosition +1;
if (nStyleSheets > newPosition)
{
- nCurrentPosition = newPosition;
- retval = pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetByPosition(nCurrentPosition);
+ mnCurrentPosition = newPosition;
+ retval = pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetByPosition(mnCurrentPosition);
}
}
else if(nMask == SfxStyleSearchBits::All)
{
- unsigned newPosition = nCurrentPosition +1;
+ unsigned newPosition = mnCurrentPosition +1;
const std::vector<unsigned>& familyVector =
pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetPositionsByFamily(nSearchFamily);
if (familyVector.size() > newPosition)
{
- nCurrentPosition = newPosition;
+ mnCurrentPosition = newPosition;
unsigned stylePosition = familyVector[newPosition];
retval = pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetByPosition(stylePosition);
}
@@ -507,10 +507,10 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Next()
DoesStyleMatchStyleSheetPredicate predicate(this);
rtl::Reference< SfxStyleSheetBase > ref =
pBasePool->pImpl->mxIndexedStyleSheets->GetNthStyleSheetThatMatchesPredicate(
- 0, predicate, nCurrentPosition+1);
+ 0, predicate, mnCurrentPosition+1);
retval = ref.get();
if (retval != nullptr) {
- nCurrentPosition = pBasePool->pImpl->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
+ mnCurrentPosition = pBasePool->pImpl->mxIndexedStyleSheets->FindStyleSheetPosition(*ref);
}
}
pCurrentStyle = retval;
@@ -530,7 +530,7 @@ SfxStyleSheetBase* SfxStyleSheetIterator::Find(const OUString& rStr)
unsigned pos = positions.front();
SfxStyleSheetBase* pStyle = pBasePool->pImpl->mxIndexedStyleSheets->GetStyleSheetByPosition(pos);
- nCurrentPosition = pos;
+ mnCurrentPosition = pos;
pCurrentStyle = pStyle;
return pCurrentStyle;
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 5fd5a1e7c825..6230ea3f7223 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -3140,6 +3140,14 @@ OUString SvNumberFormatter::GenerateFormat(sal_uInt32 nIndex,
return sString.makeStringAndClear();
}
+bool SvNumberFormatter::IsUserDefinedAndNotOverloaded(sal_uInt32 F_Index) const
+{
+ ::osl::MutexGuard aGuard( GetInstanceMutex() );
+ const SvNumberformat* pFormat = GetFormatEntry(F_Index);
+
+ return pFormat && (pFormat->GetType() & SvNumFormatType::DEFINED);
+}
+
bool SvNumberFormatter::IsUserDefined(const OUString& sStr,
LanguageType eLnge)
{
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 02947cd3892c..380188ef495c 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+#include <sal/log.hxx>
#include "passwordcontainer.hxx"
@@ -182,15 +184,18 @@ PassMap StorageItem::getInfo()
Sequence< OUString > aNodeNames = ConfigItem::GetNodeNames( "Store" );
sal_Int32 aNodeCount = aNodeNames.getLength();
- Sequence< OUString > aPropNames( aNodeCount );
+ Sequence< OUString > aPropNames( aNodeCount * 2);
std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.begin(),
[](const OUString& rName) -> OUString {
return "Store/Passwordstorage['" + rName + "']/Password"; });
+ std::transform(aNodeNames.begin(), aNodeNames.end(), aPropNames.getArray() + aNodeCount,
+ [](const OUString& rName) -> OUString {
+ return "Store/Passwordstorage['" + rName + "']/InitializationVector"; });
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aPropNames );
- if( aPropertyValues.getLength() != aNodeCount )
+ if( aPropertyValues.getLength() != aNodeCount * 2)
{
OSL_FAIL( "Problems during reading" );
return aResult;
@@ -206,14 +211,16 @@ PassMap StorageItem::getInfo()
OUString aName = aUrlUsr[1];
OUString aEPasswd;
+ OUString aIV;
aPropertyValues[aNodeInd] >>= aEPasswd;
+ aPropertyValues[aNodeInd + aNodeCount] >>= aIV;
PassMap::iterator aIter = aResult.find( aUrl );
if( aIter != aResult.end() )
- aIter->second.emplace_back( aName, aEPasswd );
+ aIter->second.emplace_back( aName, aEPasswd, aIV );
else
{
- NamePassRecord aNewRecord( aName, aEPasswd );
+ NamePassRecord aNewRecord( aName, aEPasswd, aIV );
std::vector< NamePassRecord > listToAdd( 1, aNewRecord );
aResult.insert( PairUrlRecord( aUrl, listToAdd ) );
@@ -259,18 +266,37 @@ bool StorageItem::useStorage()
return aResult;
}
+sal_Int32 StorageItem::getStorageVersion()
+{
+ Sequence<OUString> aNodeNames { "StorageVersion" };
+
+ Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
+
+ if( aPropertyValues.getLength() != aNodeNames.getLength() )
+ {
+ OSL_FAIL( "Problems during reading" );
+ return 0;
+ }
-bool StorageItem::getEncodedMP( OUString& aResult )
+ sal_Int32 nResult = 0;
+ aPropertyValues[0] >>= nResult;
+
+ return nResult;
+}
+
+bool StorageItem::getEncodedMP( OUString& aResult, OUString& aResultIV )
{
if( hasEncoded )
{
aResult = mEncoded;
+ aResultIV = mEncodedIV;
return true;
}
- Sequence< OUString > aNodeNames( 2 );
+ Sequence< OUString > aNodeNames( 3 );
aNodeNames[0] = "HasMaster";
aNodeNames[1] = "Master";
+ aNodeNames[2] = "MasterInitializationVector";
Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames );
@@ -282,30 +308,37 @@ bool StorageItem::getEncodedMP( OUString& aResult )
aPropertyValues[0] >>= hasEncoded;
aPropertyValues[1] >>= mEncoded;
+ aPropertyValues[2] >>= mEncodedIV;
aResult = mEncoded;
+ aResultIV = mEncodedIV;
return hasEncoded;
}
-void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty )
+void StorageItem::setEncodedMP( const OUString& aEncoded, const OUString& aEncodedIV, bool bAcceptEmpty )
{
- Sequence< OUString > sendNames(2);
- Sequence< uno::Any > sendVals(2);
+ Sequence< OUString > sendNames(4);
+ Sequence< uno::Any > sendVals(4);
sendNames[0] = "HasMaster";
sendNames[1] = "Master";
+ sendNames[2] = "MasterInitializationVector";
+ sendNames[3] = "StorageVersion";
bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty );
sendVals[0] <<= bHasMaster;
sendVals[1] <<= aEncoded;
+ sendVals[2] <<= aEncodedIV;
+ sendVals[3] <<= nCurrentStorageVersion;
ConfigItem::SetModified();
ConfigItem::PutProperties( sendNames, sendVals );
hasEncoded = bHasMaster;
mEncoded = aEncoded;
+ mEncodedIV = aEncodedIV;
}
@@ -341,11 +374,13 @@ void StorageItem::update( const OUString& aURL, const NamePassRecord& aRecord )
forIndex.push_back( aURL );
forIndex.push_back( aRecord.GetUserName() );
- Sequence< beans::PropertyValue > sendSeq(1);
+ Sequence< beans::PropertyValue > sendSeq(2);
- sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password";
+ sendSeq[0].Name = "Store/Passwordstorage['" + createIndex( { aURL, aRecord.GetUserName() } ) + "']/InitializationVector";
+ sendSeq[0].Value <<= aRecord.GetPersistentIV();
- sendSeq[0].Value <<= aRecord.GetPersPasswords();
+ sendSeq[1].Name = "Store/Passwordstorage['" + createIndex( forIndex ) + "']/Password";
+ sendSeq[1].Value <<= aRecord.GetPersPasswords();
ConfigItem::SetModified();
ConfigItem::SetSetProperties( "Store", sendSeq );
@@ -406,7 +441,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& )
}
}
-std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode )
+std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode )
{
if( !aMasterPasswd.isEmpty() )
{
@@ -421,9 +456,16 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0};
+ if (!aIV.isEmpty())
+ {
+ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
+ iv[ ind ] = static_cast<char>(aIV.copy( ind*2, 2 ).toUInt32(16));
+ }
+
rtlCipherError result = rtl_cipher_init (
aDecoder, rtl_Cipher_DirectionDecode,
- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 );
if( result == rtl_Cipher_E_None )
{
@@ -456,7 +498,7 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
"Can't decode!", css::uno::Reference<css::uno::XInterface>(), mode);
}
-OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPasswd )
+OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPasswd)
{
if( !aMasterPasswd.isEmpty() )
{
@@ -473,9 +515,16 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines
for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
code[ ind ] = static_cast<char>(aMasterPasswd.copy( ind*2, 2 ).toUInt32(16));
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5] = {0};
+ if (!aIV.isEmpty())
+ {
+ for( int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ind++ )
+ iv[ ind ] = static_cast<char>(aIV.copy( ind*2, 2 ).toUInt32(16));
+ }
+
rtlCipherError result = rtl_cipher_init (
aEncoder, rtl_Cipher_DirectionEncode,
- code, RTL_DIGEST_LENGTH_MD5, nullptr, 0 );
+ code, RTL_DIGEST_LENGTH_MD5, iv, RTL_DIGEST_LENGTH_MD5 );
if( result == rtl_Cipher_E_None )
{
@@ -543,7 +592,7 @@ void PasswordContainer::UpdateVector( const OUString& aURL, std::vector< NamePas
if( aRecord.HasPasswords( PERSISTENT_RECORD ) )
{
- aNPIter.SetPersPasswords( aRecord.GetPersPasswords() );
+ aNPIter.SetPersPasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV() );
if( writeFile )
{
@@ -576,7 +625,8 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b
{
try
{
- ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER );
+ ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), aRecord.GetPersistentIV(),
+ GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER );
aPasswords.insert( aPasswords.end(), aDecodedPasswords.begin(), aDecodedPasswords.end() );
}
catch( NoMasterException& )
@@ -621,6 +671,19 @@ void SAL_CALL PasswordContainer::addPersistent( const OUString& Url, const OUStr
PrivateAdd( Url, UserName, Passwords, PERSISTENT_RECORD, aHandler );
}
+OUString PasswordContainer::createIV()
+{
+ rtlRandomPool randomPool = mRandomPool.get();
+ unsigned char iv[RTL_DIGEST_LENGTH_MD5];
+ rtl_random_getBytes(randomPool, iv, RTL_DIGEST_LENGTH_MD5);
+ OUStringBuffer aBuffer;
+ for (sal_uInt8 i : iv)
+ {
+ aBuffer.append(OUString::number(i >> 4, 16));
+ aBuffer.append(OUString::number(i & 15, 16));
+ }
+ return aBuffer.makeStringAndClear();
+}
void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserName, const Sequence< OUString >& Passwords, char Mode, const Reference< XInteractionHandler >& aHandler )
{
@@ -628,7 +691,11 @@ void PasswordContainer::PrivateAdd( const OUString& Url, const OUString& UserNam
::std::vector< OUString > aStorePass = comphelper::sequenceToContainer< std::vector<OUString> >( Passwords );
if( Mode == PERSISTENT_RECORD )
- aRecord.SetPersPasswords( EncodePasswords( aStorePass, GetMasterPassword( aHandler ) ) );
+ {
+ OUString sIV = createIV();
+ OUString sEncodedPasswords = EncodePasswords( aStorePass, sIV, GetMasterPassword( aHandler ) );
+ aRecord.SetPersPasswords( sEncodedPasswords, sIV );
+ }
else if( Mode == MEMORY_RECORD )
aRecord.SetMemPasswords( aStorePass );
else
@@ -800,6 +867,18 @@ OUString PasswordContainer::RequestPasswordFromUser( PasswordRequestMode aRMode,
return aResult;
}
+// Mangle the key to match an old bug
+static OUString ReencodeAsOldHash(const OUString& rPass)
+{
+ OUStringBuffer aBuffer;
+ for (int ind = 0; ind < RTL_DIGEST_LENGTH_MD5; ++ind)
+ {
+ unsigned char i = static_cast<char>(rPass.copy(ind * 2, 2).toUInt32(16));
+ aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
+ aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+ }
+ return aBuffer.makeStringAndClear();
+}
OUString const & PasswordContainer::GetMasterPassword( const Reference< XInteractionHandler >& aHandler )
{
@@ -809,10 +888,10 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac
if( m_aMasterPasswd.isEmpty() && aHandler.is() )
{
- OUString aEncodedMP;
+ OUString aEncodedMP, aEncodedMPIV;
bool bDefaultPassword = false;
- if( !m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ if( !m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
aRMode = PasswordRequestMode_PASSWORD_CREATE;
else if ( aEncodedMP.isEmpty() )
{
@@ -834,11 +913,15 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac
m_aMasterPasswd = aPass;
std::vector< OUString > aMaster( 1, m_aMasterPasswd );
- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) );
+ OUString sIV = createIV();
+ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, sIV, m_aMasterPasswd ), sIV );
}
else
{
- std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) );
+ if (m_pStorageFile->getStorageVersion() == 0)
+ aPass = ReencodeAsOldHash(aPass);
+
+ std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aEncodedMPIV, aPass, aRMode ) );
if( aRM.empty() || aPass != aRM[0] )
{
bAskAgain = true;
@@ -995,7 +1078,8 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
{
sal_Int32 oldLen = aUsers.getLength();
aUsers.realloc( oldLen + 1 );
- aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
+ aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), aNP.GetPersistentIV(),
+ GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
}
if( aUsers.hasElements() )
@@ -1012,12 +1096,12 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::Reference< task::XInteractionHandler >& xHandler )
{
bool bResult = false;
- OUString aEncodedMP;
+ OUString aEncodedMP, aEncodedMPIV;
uno::Reference< task::XInteractionHandler > xTmpHandler = xHandler;
::osl::MutexGuard aGuard( mMutex );
// the method should fail if there is no master password
- if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ if( m_pStorageFile && m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
{
if ( aEncodedMP.isEmpty() )
{
@@ -1042,6 +1126,13 @@ sal_Bool SAL_CALL PasswordContainer::authorizateWithMasterPassword( const uno::R
do {
aPass = RequestPasswordFromUser( aRMode, xTmpHandler );
+
+
+ if (!aPass.isEmpty() && m_pStorageFile->getStorageVersion() == 0)
+ {
+ aPass = ReencodeAsOldHash(aPass);
+ }
+
bResult = ( !aPass.isEmpty() && aPass == m_aMasterPasswd );
aRMode = PasswordRequestMode_PASSWORD_REENTER; // further questions with error notification
} while( !bResult && !aPass.isEmpty() );
@@ -1079,8 +1170,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
bool bCanChangePassword = true;
// if there is already a stored master password it should be entered by the user before the change happen
- OUString aEncodedMP;
- if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP ) )
+ OUString aEncodedMP, aEncodedMPIV;
+ if( !m_aMasterPasswd.isEmpty() || m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) )
bCanChangePassword = authorizateWithMasterPassword( xTmpHandler );
if ( bCanChangePassword )
@@ -1099,7 +1190,8 @@ sal_Bool SAL_CALL PasswordContainer::changeMasterPassword( const uno::Reference<
// store the new master password
m_aMasterPasswd = aPass;
std::vector< OUString > aMaster( 1, m_aMasterPasswd );
- m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, m_aMasterPasswd ) );
+ OUString aIV = createIV();
+ m_pStorageFile->setEncodedMP( EncodePasswords( aMaster, aIV, m_aMasterPasswd ), aIV );
// store all the entries with the new password
for ( const auto& rURL : aPersistent )
@@ -1124,7 +1216,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword()
if ( m_pStorageFile )
{
m_aMasterPasswd.clear();
- m_pStorageFile->setEncodedMP( OUString() ); // let the master password be removed from configuration
+ m_pStorageFile->setEncodedMP( OUString(), OUString() ); // let the master password be removed from configuration
}
}
@@ -1135,8 +1227,8 @@ sal_Bool SAL_CALL PasswordContainer::hasMasterPassword( )
if ( !m_pStorageFile )
throw uno::RuntimeException();
- OUString aEncodedMP;
- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) );
+ OUString aEncodedMP, aEncodedMPIV;
+ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) );
}
sal_Bool SAL_CALL PasswordContainer::allowPersistentStoring( sal_Bool bAllow )
@@ -1183,8 +1275,8 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere
bool bCanChangePassword = true;
// if there is already a stored nondefault master password it should be entered by the user before the change happen
- OUString aEncodedMP;
- if( m_pStorageFile->getEncodedMP( aEncodedMP ) && !aEncodedMP.isEmpty() )
+ OUString aEncodedMP, aEncodedMPIV;
+ if( m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && !aEncodedMP.isEmpty() )
bCanChangePassword = authorizateWithMasterPassword( xTmpHandler );
if ( bCanChangePassword )
@@ -1201,7 +1293,7 @@ sal_Bool SAL_CALL PasswordContainer::useDefaultMasterPassword( const uno::Refere
// store the empty string to flag the default master password
m_aMasterPasswd = aPass;
- m_pStorageFile->setEncodedMP( OUString(), true );
+ m_pStorageFile->setEncodedMP( OUString(), OUString(), true );
// store all the entries with the new password
for ( const auto& rURL : aPersistent )
@@ -1225,8 +1317,8 @@ sal_Bool SAL_CALL PasswordContainer::isDefaultMasterPasswordUsed()
if ( !m_pStorageFile )
throw uno::RuntimeException();
- OUString aEncodedMP;
- return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) && aEncodedMP.isEmpty() );
+ OUString aEncodedMP, aEncodedMPIV;
+ return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP, aEncodedMPIV ) && aEncodedMP.isEmpty() );
}
diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx
index 09fb7e03629d..4e3a6629139e 100644
--- a/svl/source/passwordcontainer/passwordcontainer.hxx
+++ b/svl/source/passwordcontainer/passwordcontainer.hxx
@@ -33,6 +33,7 @@
#include <unotools/configitem.hxx>
#include <ucbhelper/interactionrequest.hxx>
+#include <rtl/random.h>
#include <rtl/ref.hxx>
#include <osl/mutex.hxx>
@@ -51,11 +52,12 @@ class NamePassRecord
::std::vector< OUString > m_aMemPass;
// persistent passwords are encrypted in one string
- bool m_bHasPersPass;
+ bool m_bHasPersPass;
OUString m_aPersPass;
+ OUString m_aPersistentIV;
void InitArrays( bool bHasMemoryList, const ::std::vector< OUString >& aMemoryList,
- bool bHasPersistentList, const OUString& aPersistentList )
+ bool bHasPersistentList, const OUString& aPersistentList, const OUString& aPersistentIV )
{
m_bHasMemPass = bHasMemoryList;
if ( bHasMemoryList )
@@ -63,7 +65,10 @@ class NamePassRecord
m_bHasPersPass = bHasPersistentList;
if ( bHasPersistentList )
+ {
m_aPersPass = aPersistentList;
+ m_aPersistentIV = aPersistentIV;
+ }
}
public:
@@ -75,11 +80,12 @@ public:
{
}
- NamePassRecord( const OUString& aName, const OUString& aPersistentList )
+ NamePassRecord( const OUString& aName, const OUString& aPersistentList, const OUString& aPersistentIV )
: m_aName( aName )
, m_bHasMemPass( false )
, m_bHasPersPass( true )
, m_aPersPass( aPersistentList )
+ , m_aPersistentIV( aPersistentIV )
{
}
@@ -88,7 +94,8 @@ public:
, m_bHasMemPass( false )
, m_bHasPersPass( false )
{
- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass );
+ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass,
+ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV );
}
NamePassRecord& operator=( const NamePassRecord& aRecord )
@@ -99,7 +106,9 @@ public:
m_aMemPass.clear();
m_aPersPass.clear();
- InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass, aRecord.m_bHasPersPass, aRecord.m_aPersPass );
+ m_aPersistentIV.clear();
+ InitArrays( aRecord.m_bHasMemPass, aRecord.m_aMemPass,
+ aRecord.m_bHasPersPass, aRecord.m_aPersPass, aRecord.m_aPersistentIV );
}
return *this;
}
@@ -135,15 +144,24 @@ public:
return OUString();
}
+ OUString GetPersistentIV() const
+ {
+ if ( m_bHasPersPass )
+ return m_aPersistentIV;
+
+ return OUString();
+ }
+
void SetMemPasswords( const ::std::vector< OUString >& aMemList )
{
m_aMemPass = aMemList;
m_bHasMemPass = true;
}
- void SetPersPasswords( const OUString& aPersList )
+ void SetPersPasswords( const OUString& aPersList, const OUString& aPersIV )
{
m_aPersPass = aPersList;
+ m_aPersistentIV = aPersIV;
m_bHasPersPass = true;
}
@@ -158,6 +176,7 @@ public:
{
m_bHasPersPass = false;
m_aPersPass.clear();
+ m_aPersistentIV.clear();
}
}
@@ -167,6 +186,10 @@ public:
typedef ::std::pair< const OUString, ::std::vector< NamePassRecord > > PairUrlRecord;
typedef ::std::map< OUString, ::std::vector< NamePassRecord > > PassMap;
+// org.openoffice.Office.Common/Passwords/StorageVersion bump if details of
+// how password details are saved changes. Enables migration from previous
+// schemes.
+constexpr sal_Int32 nCurrentStorageVersion = 1;
class PasswordContainer;
@@ -177,6 +200,7 @@ private:
PasswordContainer* mainCont;
bool hasEncoded;
OUString mEncoded;
+ OUString mEncodedIV;
virtual void ImplCommit() override;
@@ -195,8 +219,10 @@ public:
void remove( const OUString& url, const OUString& rec );
void clear();
- bool getEncodedMP( OUString& aResult );
- void setEncodedMP( const OUString& aResult, bool bAcceptEnmpty = false );
+ sal_Int32 getStorageVersion();
+
+ bool getEncodedMP( OUString& aResult, OUString& aResultIV );
+ void setEncodedMP( const OUString& aResult, const OUString& aResultIV, bool bAcceptEmpty = false );
void setUseStorage( bool bUse );
bool useStorage();
@@ -217,6 +243,29 @@ private:
css::uno::Reference< css::lang::XComponent > mComponent;
SysCredentialsConfig mUrlContainer;
+ class RandomPool
+ {
+ private:
+ rtlRandomPool m_aRandomPool;
+ public:
+ RandomPool() : m_aRandomPool(rtl_random_createPool())
+ {
+ }
+ rtlRandomPool get()
+ {
+ return m_aRandomPool;
+ }
+ ~RandomPool()
+ {
+ // Clean up random pool memory
+ rtl_random_destroyPool(m_aRandomPool);
+ }
+ };
+
+ RandomPool mRandomPool;
+
+ OUString createIV();
+
/// @throws css::uno::RuntimeException
css::uno::Sequence< css::task::UserRecord > CopyToUserRecordSequence(
const ::std::vector< NamePassRecord >& original,
@@ -267,10 +316,10 @@ css::task::UrlRecord find(
const css::uno::Reference< css::task::XInteractionHandler >& Handler );
/// @throws css::uno::RuntimeException
- static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword, css::task::PasswordRequestMode mode );
+ static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aIV, const OUString& aMasterPassword, css::task::PasswordRequestMode mode );
/// @throws css::uno::RuntimeException
- static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPassword );
+ static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aIV, const OUString& aMasterPassword );
public:
PasswordContainer( const css::uno::Reference< css::lang::XMultiServiceFactory >& );
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx
index bfbc2e21593b..b3724f87ee00 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -175,11 +175,13 @@ bool DavDetailsContainer::verifyScheme( const OUString& rScheme )
{
bValid = true;
m_pDialog->m_xCBDavs->set_active(false);
+ ToggledDavsHdl(*m_pDialog->m_xCBDavs);
}
else if ( rScheme == "https://" )
{
bValid = true;
m_pDialog->m_xCBDavs->set_active(true);
+ ToggledDavsHdl(*m_pDialog->m_xCBDavs);
}
return bValid;
}
diff --git a/svtools/source/misc/langtab.cxx b/svtools/source/misc/langtab.cxx
index 2b4311cde7f6..519e7da7268c 100644
--- a/svtools/source/misc/langtab.cxx
+++ b/svtools/source/misc/langtab.cxx
@@ -208,23 +208,24 @@ bool SvtLanguageTable::HasLanguageType( const LanguageType eType )
OUString SvtLanguageTableImpl::GetString( const LanguageType eType ) const
{
- LanguageType eLang = MsLangId::getReplacementForObsoleteLanguage( eType );
- sal_uInt32 nPos = FindIndex(eLang);
+ const LanguageType nLang = MsLangId::getReplacementForObsoleteLanguage( eType);
+ const sal_uInt32 nPos = (eType == LANGUAGE_PROCESS_OR_USER_DEFAULT ?
+ FindIndex(LANGUAGE_SYSTEM) : FindIndex( nLang));
if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < GetEntryCount() )
return m_aStrings[nPos].first;
//Rather than return a fairly useless "Unknown" name, return a geeky but usable-in-a-pinch lang-tag
- OUString sLangTag( lcl_getDescription( LanguageTag::convertToBcp47(eType)));
+ OUString sLangTag( lcl_getDescription( LanguageTag::convertToBcp47(nLang)));
SAL_WARN("svtools.misc", "Language: 0x"
- << std::hex << eType
+ << std::hex << nLang
<< " with unknown name, so returning lang-tag of: "
<< sLangTag);
// And add it to the table if it is an on-the-fly-id, which it usually is,
// so it is available in all subsequent language boxes.
- if (LanguageTag::isOnTheFlyID( eType))
- const_cast<SvtLanguageTableImpl*>(this)->AddItem( sLangTag, eType);
+ if (LanguageTag::isOnTheFlyID( nLang))
+ const_cast<SvtLanguageTableImpl*>(this)->AddItem( sLangTag, nLang);
return sLangTag;
}
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/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 8bd9d94f2366..5193979f36d2 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
+#include <vcl/commandinfoprovider.hxx>
#include <vcl/svapp.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <vcl/toolbox.hxx>
@@ -501,6 +502,30 @@ void ToolboxController::bindListener()
catch ( Exception& )
{
}
+
+ // it may be a command alias
+ if (!xDispatch.is())
+ {
+ try
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(listener.first,
+ vcl::CommandInfoProvider::GetModuleIdentifier(m_xFrame));
+ OUString sRealCommand = vcl::CommandInfoProvider::GetRealCommandForCommand(aProperties);
+
+ if (!sRealCommand.isEmpty())
+ {
+ aTargetURL.Complete = sRealCommand;
+ if ( m_xUrlTransformer.is() )
+ m_xUrlTransformer->parseStrict( aTargetURL );
+
+ xDispatch = xDispatchProvider->queryDispatch( aTargetURL, OUString(), 0 );
+ }
+ }
+ catch ( Exception& )
+ {
+ }
+ }
+
listener.second = xDispatch;
Listener aListener( aTargetURL, xDispatch );
diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index dc312a81d772..7882033e0815 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -105,6 +105,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\
svx/source/customshapes/EnhancedCustomShapeEngine \
svx/source/customshapes/EnhancedCustomShapeFontWork \
svx/source/customshapes/EnhancedCustomShapeHandle \
+ svx/source/dialog/GenericCheckDialog \
svx/source/dialog/_bmpmask \
svx/source/dialog/charmap \
svx/source/dialog/searchcharmap \
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 2dad0a2bb7a8..a82c8503f00e 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -55,6 +55,8 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/functionmenu \
svx/uiconfig/ui/gallerymenu1 \
svx/uiconfig/ui/gallerymenu2 \
+ svx/uiconfig/ui/genericcheckdialog \
+ svx/uiconfig/ui/genericcheckentry \
svx/uiconfig/ui/headfootformatpage \
svx/uiconfig/ui/imapdialog \
svx/uiconfig/ui/imapmenu \
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 039c43171a45..3f268536390e 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8373,7 +8373,7 @@ SfxBoolItem Text SID_ATTR_CHAR
SfxBoolItem DrawText SID_DRAW_TEXT
-
+(SfxBoolItem CreateDirectly FN_PARAM_1)
[
AutoUpdate = TRUE,
FastCall = FALSE,
@@ -12278,6 +12278,23 @@ SfxVoidItem SpellCheckApplySuggestion SID_SPELLCHECK_APPLY_SUGGESTION
GroupId = SfxGroupId::Format;
]
+SfxVoidItem GraphicSizeCheck SID_GRAPHIC_SIZE_CHECK
+()
+[
+ AutoUpdate = FALSE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Modify;
+]
+
SfxVoidItem MoveShapeHandle SID_MOVE_SHAPE_HANDLE
(SfxUInt32Item HandleNum FN_PARAM_1 SfxUInt32Item NewPosX FN_PARAM_2 SfxUInt32Item NewPosY FN_PARAM_3 SfxInt32Item OrdNum FN_PARAM_4)
[
diff --git a/svx/source/dialog/GenericCheckDialog.cxx b/svx/source/dialog/GenericCheckDialog.cxx
new file mode 100644
index 000000000000..09fc3d678769
--- /dev/null
+++ b/svx/source/dialog/GenericCheckDialog.cxx
@@ -0,0 +1,70 @@
+/* -*- 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 <svx/GenericCheckDialog.hxx>
+#include <vcl/svapp.hxx>
+
+namespace svx
+{
+GenericCheckEntry::GenericCheckEntry(weld::Container* pParent,
+ std::unique_ptr<CheckData>& pCheckData)
+ : m_xBuilder(Application::CreateBuilder(pParent, "svx/ui/genericcheckentry.ui"))
+ , m_xContainer(m_xBuilder->weld_container("checkEntryBox"))
+ , m_xLabel(m_xBuilder->weld_label("label"))
+ , m_xMarkButton(m_xBuilder->weld_button("markButton"))
+ , m_xPropertiesButton(m_xBuilder->weld_button("propertiesButton"))
+ , m_pCheckData(pCheckData)
+{
+ m_xLabel->set_label(m_pCheckData->getText());
+ m_xMarkButton->set_visible(m_pCheckData->canMarkObject());
+ m_xMarkButton->connect_clicked(LINK(this, GenericCheckEntry, MarkButtonClicked));
+ m_xPropertiesButton->set_visible(m_pCheckData->hasProperties());
+ m_xPropertiesButton->connect_clicked(LINK(this, GenericCheckEntry, PropertiesButtonClicked));
+
+ m_xContainer->show();
+}
+
+IMPL_LINK_NOARG(GenericCheckEntry, MarkButtonClicked, weld::Button&, void)
+{
+ m_pCheckData->markObject();
+}
+
+IMPL_LINK_NOARG(GenericCheckEntry, PropertiesButtonClicked, weld::Button&, void)
+{
+ m_pCheckData->runProperties();
+}
+
+GenericCheckDialog::GenericCheckDialog(weld::Window* pParent,
+ CheckDataCollection& rCheckDataCollection)
+ : GenericDialogController(pParent, "svx/ui/genericcheckdialog.ui", "GenericCheckDialog")
+ , m_rCheckDataCollection(rCheckDataCollection)
+ , m_xCheckBox(m_xBuilder->weld_box("checkBox"))
+{
+ set_title(m_rCheckDataCollection.getTitle());
+}
+
+GenericCheckDialog::~GenericCheckDialog() {}
+
+short GenericCheckDialog::run()
+{
+ sal_Int32 i = 0;
+
+ for (std::unique_ptr<CheckData>& pCheckData : m_rCheckDataCollection.getCollection())
+ {
+ auto xEntry = std::make_unique<GenericCheckEntry>(m_xCheckBox.get(), pCheckData);
+ m_xCheckBox->reorder_child(xEntry->get_widget(), i++);
+ m_aCheckEntries.push_back(std::move(xEntry));
+ }
+ return GenericDialogController::run();
+}
+
+} // end svx namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx
index b85ab66a9e12..775f35510c3a 100644
--- a/svx/source/svdraw/sdrpagewindow.cxx
+++ b/svx/source/svdraw/sdrpagewindow.cxx
@@ -449,7 +449,7 @@ void SdrPageWindow::InvalidatePageWindow(const basegfx::B2DRange& rRange)
const tools::Rectangle aRectTwips = OutputDevice::LogicToLogic(aRect100thMM, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
if (SfxViewShell* pViewShell = SfxViewShell::Current())
- SfxLokHelper::notifyInvalidation(pViewShell, aRectTwips.toString());
+ SfxLokHelper::notifyInvalidation(pViewShell, &aRectTwips);
}
}
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 80c421e40149..bbb640e6c6c7 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -1360,7 +1360,7 @@ bool SdrDragObjOwn::EndSdrDrag(bool /*bCopy*/)
if( bUndo )
{
- getSdrDragView().EndTextEditAllViews();
+ getSdrDragView().EndTextEditCurrentView();
if(!getSdrDragView().IsInsObjPoint() && pObj->IsInserted() )
{
if (DragStat().IsEndDragChangesAttributes())
diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx
index b48174ad8b57..44d9684e2ef9 100644
--- a/svx/source/svdraw/svdedtv.cxx
+++ b/svx/source/svdraw/svdedtv.cxx
@@ -1059,4 +1059,14 @@ void SdrEditView::EndTextEditAllViews() const
}
}
+void SdrEditView::EndTextEditCurrentView()
+{
+ if (IsTextEdit())
+ {
+ SdrView* pSdrView = dynamic_cast<SdrView*>(this);
+ if (pSdrView)
+ pSdrView->SdrEndTextEdit();
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 830ef238c590..21a0830bbd1a 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -99,7 +99,7 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect)
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
BegUndo(ImpGetDescriptionString(STR_EditPosSize));
}
@@ -190,7 +190,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy)
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr(SvxResId(STR_EditMove));
if (bCopy)
aStr += SvxResId(STR_EditWithCopy);
@@ -223,7 +223,7 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, cons
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr {ImpGetDescriptionString(STR_EditResize)};
if (bCopy)
aStr+=SvxResId(STR_EditWithCopy);
@@ -258,7 +258,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef,
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
BegUndo(ImpGetDescriptionString(STR_EditResize));
}
@@ -319,7 +319,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, long nAngle, bool bCopy)
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr {ImpGetDescriptionString(STR_EditRotate)};
if (bCopy) aStr+=SvxResId(STR_EditWithCopy);
BegUndo(aStr);
@@ -376,7 +376,7 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr;
Point aDif(rRef2-rRef1);
if (aDif.X()==0)
@@ -476,7 +476,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, long nAngle, bool bVShear, b
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr {ImpGetDescriptionString(STR_EditShear)};
if (bCopy)
aStr+=SvxResId(STR_EditWithCopy);
@@ -592,7 +592,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr {ImpGetDescriptionString(bNoContortion ? STR_EditCrook : STR_EditCrookContortion)};
if (bCopy)
aStr+=SvxResId(STR_EditWithCopy);
@@ -666,7 +666,7 @@ void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon&
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr {ImpGetDescriptionString(STR_EditDistort)};
if (bCopy)
aStr+=SvxResId(STR_EditWithCopy);
@@ -1111,7 +1111,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
BegUndo(ImpGetDescriptionString(STR_EditSetAttributes));
}
@@ -1291,7 +1291,7 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr;
if (pStyleSheet!=nullptr)
aStr = ImpGetDescriptionString(STR_EditSetStylesheet);
@@ -1859,7 +1859,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert)
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- EndTextEditAllViews();
+ EndTextEditCurrentView();
OUString aStr(GetDescriptionOfMarkedObjects());
if (eHor==SdrHorAlign::NONE)
{
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index fefeb43fe7bc..32057e0b5163 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -77,24 +77,37 @@
void SdrObjEditView::ImpClearVars()
{
- bQuickTextEditMode = true;
- pTextEditOutliner.reset();
- pTextEditOutlinerView = nullptr;
- pTextEditPV = nullptr;
- pTextEditWin = nullptr;
+ mbQuickTextEditMode = true;
+ mpTextEditOutliner.reset();
+ mpTextEditOutlinerView = nullptr;
+ mpTextEditPV = nullptr;
+ mpTextEditWin = nullptr;
pTextEditCursorBuffer = nullptr;
- bTextEditNewObj = false;
- bMacroDown = false;
+ mbTextEditNewObj = false;
+ mbMacroDown = false;
pMacroObj = nullptr;
pMacroPV = nullptr;
pMacroWin = nullptr;
nMacroTol = 0;
- bTextEditDontDelete = false;
- bTextEditOnlyOneView = false;
+ mbTextEditDontDelete = false;
+ mbTextEditOnlyOneView = false;
}
SdrObjEditView::SdrObjEditView(SdrModel& rSdrModel, OutputDevice* pOut)
: SdrGlueEditView(rSdrModel, pOut)
+ , mpTextEditPV(nullptr)
+ , mpTextEditOutlinerView(nullptr)
+ , mpTextEditWin(nullptr)
+ , pTextEditCursorBuffer(nullptr)
+ , pMacroObj(nullptr)
+ , pMacroPV(nullptr)
+ , pMacroWin(nullptr)
+ , nMacroTol(0)
+ , mbTextEditDontDelete(false)
+ , mbTextEditOnlyOneView(false)
+ , mbTextEditNewObj(false)
+ , mbQuickTextEditMode(true)
+ , mbMacroDown(false)
, mpOldTextEditUndoManager(nullptr)
{
ImpClearVars();
@@ -102,11 +115,11 @@ SdrObjEditView::SdrObjEditView(SdrModel& rSdrModel, OutputDevice* pOut)
SdrObjEditView::~SdrObjEditView()
{
- pTextEditWin = nullptr; // so there's no ShowCursor in SdrEndTextEdit
+ mpTextEditWin = nullptr; // so there's no ShowCursor in SdrEndTextEdit
assert(!IsTextEdit());
if (IsTextEdit())
SdrEndTextEdit();
- pTextEditOutliner.reset();
+ mpTextEditOutliner.reset();
assert(nullptr == mpOldTextEditUndoManager); // should have been reset
}
@@ -210,10 +223,10 @@ void SdrObjEditView::HideSdrPage()
{
lcl_RemoveTextEditOutlinerViews(this, GetSdrPageView(), GetFirstOutputDevice());
- if (pTextEditPV == GetSdrPageView())
+ if (mpTextEditPV == GetSdrPageView())
{
// HideSdrPage() will clear mpPageView, avoid a dangling pointer.
- pTextEditPV = nullptr;
+ mpTextEditPV = nullptr;
}
SdrGlueEditView::HideSdrPage();
@@ -234,7 +247,7 @@ void SdrObjEditView::TakeActionRect(tools::Rectangle& rRect) const
void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
SdrGlueEditView::Notify(rBC, rHint);
- if (pTextEditOutliner != nullptr)
+ if (mpTextEditOutliner != nullptr)
{
// change of printer while editing
if (rHint.GetId() == SfxHintId::ThisIsAnSdrHint)
@@ -243,11 +256,11 @@ void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
SdrHintKind eKind = pSdrHint->GetKind();
if (eKind == SdrHintKind::RefDeviceChange)
{
- pTextEditOutliner->SetRefDevice(mpModel->GetRefDevice());
+ mpTextEditOutliner->SetRefDevice(mpModel->GetRefDevice());
}
if (eKind == SdrHintKind::DefaultTabChange)
{
- pTextEditOutliner->SetDefTab(mpModel->GetDefaultTabulator());
+ mpTextEditOutliner->SetDefTab(mpModel->GetDefaultTabulator());
}
}
}
@@ -264,7 +277,7 @@ void SdrObjEditView::ModelHasChanged()
SdrTextObj* pTextObj = mxTextEditObj.get();
if (pTextObj != nullptr)
{
- sal_uIntPtr nOutlViewCnt = pTextEditOutliner->GetViewCount();
+ sal_uIntPtr nOutlViewCnt = mpTextEditOutliner->GetViewCount();
bool bAreaChg = false;
bool bAnchorChg = false;
bool bColorChg = false;
@@ -299,34 +312,34 @@ void SdrObjEditView::ModelHasChanged()
if (aNewArea != aOldArea || aEditArea1 != aTextEditArea
|| aMinArea1 != aMinTextEditArea
- || pTextEditOutliner->GetMinAutoPaperSize() != aPaperMin1
- || pTextEditOutliner->GetMaxAutoPaperSize() != aPaperMax1)
+ || mpTextEditOutliner->GetMinAutoPaperSize() != aPaperMin1
+ || mpTextEditOutliner->GetMaxAutoPaperSize() != aPaperMax1)
{
aTextEditArea = aEditArea1;
aMinTextEditArea = aMinArea1;
- pTextEditOutliner->SetUpdateMode(false);
- pTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
- pTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
- pTextEditOutliner->SetPaperSize(Size(0, 0)); // re-format Outliner
+ mpTextEditOutliner->SetUpdateMode(false);
+ mpTextEditOutliner->SetMinAutoPaperSize(aPaperMin1);
+ mpTextEditOutliner->SetMaxAutoPaperSize(aPaperMax1);
+ mpTextEditOutliner->SetPaperSize(Size(0, 0)); // re-format Outliner
if (!bContourFrame)
{
- pTextEditOutliner->ClearPolygon();
- EEControlBits nStat = pTextEditOutliner->GetControlWord();
+ mpTextEditOutliner->ClearPolygon();
+ EEControlBits nStat = mpTextEditOutliner->GetControlWord();
nStat |= EEControlBits::AUTOPAGESIZE;
- pTextEditOutliner->SetControlWord(nStat);
+ mpTextEditOutliner->SetControlWord(nStat);
}
else
{
- EEControlBits nStat = pTextEditOutliner->GetControlWord();
+ EEControlBits nStat = mpTextEditOutliner->GetControlWord();
nStat &= ~EEControlBits::AUTOPAGESIZE;
- pTextEditOutliner->SetControlWord(nStat);
+ mpTextEditOutliner->SetControlWord(nStat);
tools::Rectangle aAnchorRect;
pTextObj->TakeTextAnchorRect(aAnchorRect);
- pTextObj->ImpSetContourPolygon(*pTextEditOutliner, aAnchorRect, true);
+ pTextObj->ImpSetContourPolygon(*mpTextEditOutliner, aAnchorRect, true);
}
for (sal_uIntPtr nOV = 0; nOV < nOutlViewCnt; nOV++)
{
- OutlinerView* pOLV = pTextEditOutliner->GetView(nOV);
+ OutlinerView* pOLV = mpTextEditOutliner->GetView(nOV);
EVControlBits nStat0 = pOLV->GetControlWord();
EVControlBits nStat = nStat0;
// AutoViewSize only if not ContourFrame.
@@ -337,16 +350,16 @@ void SdrObjEditView::ModelHasChanged()
if (nStat != nStat0)
pOLV->SetControlWord(nStat);
}
- pTextEditOutliner->SetUpdateMode(true);
+ mpTextEditOutliner->SetUpdateMode(true);
bAreaChg = true;
}
}
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{ // check fill and anchor
- EEAnchorMode eOldAnchor = pTextEditOutlinerView->GetAnchorMode();
+ EEAnchorMode eOldAnchor = mpTextEditOutlinerView->GetAnchorMode();
eNewAnchor = pTextObj->GetOutlinerViewAnchorMode();
bAnchorChg = eOldAnchor != eNewAnchor;
- Color aOldColor(pTextEditOutlinerView->GetBackgroundColor());
+ Color aOldColor(mpTextEditOutlinerView->GetBackgroundColor());
aNewColor = GetTextEditBackgroundColor(*this);
bColorChg = aOldColor != aNewColor;
}
@@ -369,7 +382,7 @@ void SdrObjEditView::ModelHasChanged()
{
for (sal_uIntPtr nOV = 0; nOV < nOutlViewCnt; nOV++)
{
- OutlinerView* pOLV = pTextEditOutliner->GetView(nOV);
+ OutlinerView* pOLV = mpTextEditOutliner->GetView(nOV);
{ // invalidate old OutlinerView area
vcl::Window* pWin = pOLV->GetWindow();
tools::Rectangle aTmpRect(aOldArea);
@@ -390,7 +403,7 @@ void SdrObjEditView::ModelHasChanged()
aTextEditArea); // because otherwise, we're not re-anchoring correctly
ImpInvalidateOutlinerView(*pOLV);
}
- pTextEditOutlinerView->ShowCursor();
+ mpTextEditOutlinerView->ShowCursor();
}
}
ImpMakeTextCursorAreaVisible();
@@ -677,7 +690,7 @@ void SdrObjEditView::EditViewSelectionChange() const
}
}
-OutputDevice& SdrObjEditView::EditViewOutputDevice() const { return *pTextEditWin; }
+OutputDevice& SdrObjEditView::EditViewOutputDevice() const { return *mpTextEditWin; }
void SdrObjEditView::TextEditDrawing(SdrPaintWindow& rPaintWindow) const
{
@@ -734,8 +747,8 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::
{
const SdrTextObj* pText = GetTextEditObject();
bool bTextFrame(pText && pText->IsTextFrame());
- bool bFitToSize(pTextEditOutliner->GetControlWord() & EEControlBits::STRETCHING);
- bool bModified(pTextEditOutliner->IsModified());
+ bool bFitToSize(mpTextEditOutliner->GetControlWord() & EEControlBits::STRETCHING);
+ bool bModified(mpTextEditOutliner->IsModified());
tools::Rectangle aBlankRect(rOutlView.GetOutputArea());
aBlankRect.Union(aMinTextEditArea);
tools::Rectangle aPixRect(rTargetDevice.LogicToPixel(aBlankRect));
@@ -753,7 +766,7 @@ void SdrObjEditView::ImpPaintOutlinerView(OutlinerView& rOutlView, const tools::
if (!bModified)
{
- pTextEditOutliner->ClearModifyFlag();
+ mpTextEditOutliner->ClearModifyFlag();
}
if (bTextFrame && !bFitToSize)
@@ -853,11 +866,11 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
bool bContourFrame = pText != nullptr && pText->IsContourTextFrame();
// create OutlinerView
OutlinerView* pOutlView = pGivenView;
- pTextEditOutliner->SetUpdateMode(false);
+ mpTextEditOutliner->SetUpdateMode(false);
if (pOutlView == nullptr)
{
- pOutlView = new OutlinerView(pTextEditOutliner.get(), pWin);
+ pOutlView = new OutlinerView(mpTextEditOutliner.get(), pWin);
}
else
{
@@ -889,11 +902,11 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
if (pText != nullptr)
{
pOutlView->SetAnchorMode(pText->GetOutlinerViewAnchorMode());
- pTextEditOutliner->SetFixedCellHeight(
+ mpTextEditOutliner->SetFixedCellHeight(
pText->GetMergedItem(SDRATTR_TEXT_USEFIXEDCELLHEIGHT).GetValue());
}
// do update before setting output area so that aTextEditArea can be recalculated
- pTextEditOutliner->SetUpdateMode(true);
+ mpTextEditOutliner->SetUpdateMode(true);
pOutlView->SetOutputArea(aTextEditArea);
ImpInvalidateOutlinerView(*pOutlView);
return pOutlView;
@@ -901,7 +914,7 @@ OutlinerView* SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, OutlinerVie
IMPL_LINK(SdrObjEditView, ImpOutlinerStatusEventHdl, EditStatus&, rEditStat, void)
{
- if (pTextEditOutliner)
+ if (mpTextEditOutliner)
{
SdrTextObj* pTextObj = mxTextEditObj.get();
if (pTextObj)
@@ -913,7 +926,7 @@ IMPL_LINK(SdrObjEditView, ImpOutlinerStatusEventHdl, EditStatus&, rEditStat, voi
void SdrObjEditView::ImpChainingEventHdl()
{
- if (pTextEditOutliner)
+ if (mpTextEditOutliner)
{
SdrTextObj* pTextObj = mxTextEditObj.get();
OutlinerView* pOLV = GetTextEditOutlinerView();
@@ -1053,10 +1066,11 @@ IMPL_LINK(SdrObjEditView, ImpOutlinerCalcFieldValueHdl, EditFieldInfo*, pFI, voi
IMPL_LINK_NOARG(SdrObjEditView, EndTextEditHdl, SdrUndoManager*, void) { SdrEndTextEdit(); }
-SdrUndoManager* SdrObjEditView::getSdrUndoManagerForEnhancedTextEdit() const
+// Default implementation - null UndoManager
+std::unique_ptr<SdrUndoManager> SdrObjEditView::createLocalTextUndoManager()
{
- // default returns registered UndoManager
- return GetModel() ? dynamic_cast<SdrUndoManager*>(GetModel()->GetSdrUndoManager()) : nullptr;
+ SAL_WARN("svx", "SdrObjEditView::createLocalTextUndoManager needs to be overridden");
+ return std::unique_ptr<SdrUndoManager>();
}
bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::Window* pWin,
@@ -1081,9 +1095,9 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
pWin->GrabFocus(); // to force the cursor into the edit view
}
- bTextEditDontDelete = bDontDeleteOutliner && pGivenOutliner != nullptr;
- bTextEditOnlyOneView = bOnlyOneView;
- bTextEditNewObj = bIsNewObj;
+ mbTextEditDontDelete = bDontDeleteOutliner && pGivenOutliner != nullptr;
+ mbTextEditOnlyOneView = bOnlyOneView;
+ mbTextEditNewObj = bIsNewObj;
const sal_uInt32 nWinCount(PaintWindowCount());
sal_uInt32 i;
bool bBrk(false);
@@ -1124,44 +1138,44 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
bBrk = true;
}
- if (pTextEditOutliner)
+ if (mpTextEditOutliner)
{
OSL_FAIL("SdrObjEditView::SdrBeginTextEdit(): Old Outliner still exists.");
- pTextEditOutliner.reset();
+ mpTextEditOutliner.reset();
}
if (!bBrk)
{
- pTextEditWin = pWin;
- pTextEditPV = pPV;
+ mpTextEditWin = pWin;
+ mpTextEditPV = pPV;
mxTextEditObj.reset(pObj);
if (pGivenOutliner)
{
- pTextEditOutliner.reset(pGivenOutliner);
+ mpTextEditOutliner.reset(pGivenOutliner);
pGivenOutliner = nullptr; // so we don't delete it on the error path
}
else
- pTextEditOutliner = SdrMakeOutliner(OutlinerMode::TextObject,
- mxTextEditObj->getSdrModelFromSdrObject());
+ mpTextEditOutliner = SdrMakeOutliner(OutlinerMode::TextObject,
+ mxTextEditObj->getSdrModelFromSdrObject());
{
SvtAccessibilityOptions aOptions;
- pTextEditOutliner->ForceAutoColor(aOptions.GetIsAutomaticFontColor());
+ mpTextEditOutliner->ForceAutoColor(aOptions.GetIsAutomaticFontColor());
}
- aOldCalcFieldValueLink = pTextEditOutliner->GetCalcFieldValueHdl();
+ aOldCalcFieldValueLink = mpTextEditOutliner->GetCalcFieldValueHdl();
// FieldHdl has to be set by SdrBeginTextEdit, because this call an UpdateFields
- pTextEditOutliner->SetCalcFieldValueHdl(
+ mpTextEditOutliner->SetCalcFieldValueHdl(
LINK(this, SdrObjEditView, ImpOutlinerCalcFieldValueHdl));
- pTextEditOutliner->SetBeginPasteOrDropHdl(LINK(this, SdrObjEditView, BeginPasteOrDropHdl));
- pTextEditOutliner->SetEndPasteOrDropHdl(LINK(this, SdrObjEditView, EndPasteOrDropHdl));
+ mpTextEditOutliner->SetBeginPasteOrDropHdl(LINK(this, SdrObjEditView, BeginPasteOrDropHdl));
+ mpTextEditOutliner->SetEndPasteOrDropHdl(LINK(this, SdrObjEditView, EndPasteOrDropHdl));
// It is just necessary to make the visualized page known. Set it.
- pTextEditOutliner->setVisualizedPage(pPV->GetPage());
+ mpTextEditOutliner->setVisualizedPage(pPV->GetPage());
- pTextEditOutliner->SetTextObjNoInit(mxTextEditObj.get());
+ mpTextEditOutliner->SetTextObjNoInit(mxTextEditObj.get());
- if (mxTextEditObj->BegTextEdit(*pTextEditOutliner))
+ if (mxTextEditObj->BegTextEdit(*mpTextEditOutliner))
{
SdrTextObj* pTextObj = mxTextEditObj.get();
DBG_ASSERT(pTextObj, "svx::SdrObjEditView::BegTextEdit(), no text object?");
@@ -1172,9 +1186,9 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
pTextObj->SetTextAnimationAllowed(false);
// remember old cursor
- if (pTextEditOutliner->GetViewCount() != 0)
+ if (mpTextEditOutliner->GetViewCount() != 0)
{
- pTextEditOutliner->RemoveView(static_cast<size_t>(0));
+ mpTextEditOutliner->RemoveView(static_cast<size_t>(0));
}
// Determine EditArea via TakeTextEditArea.
@@ -1184,7 +1198,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
tools::Rectangle aTextRect;
tools::Rectangle aAnchorRect;
- pTextObj->TakeTextRect(*pTextEditOutliner, aTextRect, true,
+ pTextObj->TakeTextRect(*mpTextEditOutliner, aTextRect, true,
&aAnchorRect /* Give true here, not false */);
if (!pTextObj->IsContourTextFrame())
@@ -1218,19 +1232,19 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
// to call AdjustMarkHdl() always.
AdjustMarkHdl();
- pTextEditOutlinerView = ImpMakeOutlinerView(pWin, pGivenOutlinerView);
+ mpTextEditOutlinerView = ImpMakeOutlinerView(pWin, pGivenOutlinerView);
- if (!comphelper::LibreOfficeKit::isActive() && pTextEditOutlinerView)
+ if (!comphelper::LibreOfficeKit::isActive() && mpTextEditOutlinerView)
{
// activate visualization of EditView on Overlay, suppress when
// LibreOfficeKit is active
- pTextEditOutlinerView->GetEditView().setEditViewCallbacks(this);
+ mpTextEditOutlinerView->GetEditView().setEditViewCallbacks(this);
const SvtOptionsDrawinglayer aSvtOptionsDrawinglayer;
const Color aHilightColor(aSvtOptionsDrawinglayer.getHilightColor());
const SdrTextObj* pText = GetTextEditObject();
const bool bTextFrame(pText && pText->IsTextFrame());
- const bool bFitToSize(pTextEditOutliner->GetControlWord()
+ const bool bFitToSize(mpTextEditOutliner->GetControlWord()
& EEControlBits::STRETCHING);
const bool bVisualizeSurroundingFrame(bTextFrame && !bFitToSize);
SdrPageView* pPageView = GetSdrPageView();
@@ -1248,7 +1262,8 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
if (xManager.is())
{
std::unique_ptr<TextEditOverlayObject> pNewTextEditOverlayObject(
- new TextEditOverlayObject(aHilightColor, *pTextEditOutlinerView,
+ new TextEditOverlayObject(aHilightColor,
+ *mpTextEditOutlinerView,
bVisualizeSurroundingFrame));
xManager->add(*pNewTextEditOverlayObject);
@@ -1263,15 +1278,15 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
}
// check if this view is already inserted
- sal_uIntPtr i2, nCount = pTextEditOutliner->GetViewCount();
+ sal_uIntPtr i2, nCount = mpTextEditOutliner->GetViewCount();
for (i2 = 0; i2 < nCount; i2++)
{
- if (pTextEditOutliner->GetView(i2) == pTextEditOutlinerView)
+ if (mpTextEditOutliner->GetView(i2) == mpTextEditOutlinerView)
break;
}
if (i2 == nCount)
- pTextEditOutliner->InsertView(pTextEditOutlinerView, 0);
+ mpTextEditOutliner->InsertView(mpTextEditOutlinerView, 0);
maHdlList.SetMoveOutside(false);
maHdlList.SetMoveOutside(true);
@@ -1288,7 +1303,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
{
OutlinerView* pOutlView
= ImpMakeOutlinerView(static_cast<vcl::Window*>(&rOutDev), nullptr);
- pTextEditOutliner->InsertView(pOutlView, static_cast<sal_uInt16>(i));
+ mpTextEditOutliner->InsertView(pOutlView, static_cast<sal_uInt16>(i));
}
}
@@ -1315,19 +1330,19 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
static_cast<vcl::Window*>(&rOutDev), nullptr);
pOutlView->HideCursor();
static_cast<vcl::Window*>(&rOutDev)->SetCursor(nullptr);
- pTextEditOutliner->InsertView(pOutlView);
+ mpTextEditOutliner->InsertView(pOutlView);
}
}
}
}
}
- pTextEditOutlinerView->ShowCursor();
- pTextEditOutliner->SetStatusEventHdl(
+ mpTextEditOutlinerView->ShowCursor();
+ mpTextEditOutliner->SetStatusEventHdl(
LINK(this, SdrObjEditView, ImpOutlinerStatusEventHdl));
if (pTextObj->IsChainable())
{
- pTextEditOutlinerView->SetEndCutPasteLinkHdl(
+ mpTextEditOutlinerView->SetEndCutPasteLinkHdl(
LINK(this, SdrObjEditView, ImpAfterCutOrPasteChainingEventHdl));
}
@@ -1335,7 +1350,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
if (mpItemBrowser != nullptr)
mpItemBrowser->SetDirty();
#endif
- pTextEditOutliner->ClearModifyFlag();
+ mpTextEditOutliner->ClearModifyFlag();
if (pTextObj->IsFitToSize())
{
@@ -1348,7 +1363,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
GetModel()->Broadcast(aHint);
}
- pTextEditOutliner->setVisualizedPage(nullptr);
+ mpTextEditOutliner->setVisualizedPage(nullptr);
if (mxSelectionController.is())
mxSelectionController->onSelectionHasChanged();
@@ -1356,7 +1371,11 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
if (GetModel() && IsUndoEnabled()
&& !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
- SdrUndoManager* pSdrUndoManager = getSdrUndoManagerForEnhancedTextEdit();
+ SdrUndoManager* pSdrUndoManager = nullptr;
+ mpLocalTextEditUndoManager = createLocalTextUndoManager();
+
+ if (mpLocalTextEditUndoManager)
+ pSdrUndoManager = mpLocalTextEditUndoManager.get();
if (pSdrUndoManager)
{
@@ -1365,7 +1384,7 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
// it that text edit starts by setting a callback if it needs to end text edit mode.
assert(nullptr == mpOldTextEditUndoManager);
- mpOldTextEditUndoManager = pTextEditOutliner->SetUndoManager(pSdrUndoManager);
+ mpOldTextEditUndoManager = mpTextEditOutliner->SetUndoManager(pSdrUndoManager);
pSdrUndoManager->SetEndTextEditHdl(LINK(this, SdrObjEditView, EndTextEditHdl));
}
else
@@ -1379,14 +1398,14 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
}
else
{
- pTextEditOutliner->SetCalcFieldValueHdl(aOldCalcFieldValueLink);
- pTextEditOutliner->SetBeginPasteOrDropHdl(Link<PasteOrDropInfos*, void>());
- pTextEditOutliner->SetEndPasteOrDropHdl(Link<PasteOrDropInfos*, void>());
+ mpTextEditOutliner->SetCalcFieldValueHdl(aOldCalcFieldValueLink);
+ mpTextEditOutliner->SetBeginPasteOrDropHdl(Link<PasteOrDropInfos*, void>());
+ mpTextEditOutliner->SetEndPasteOrDropHdl(Link<PasteOrDropInfos*, void>());
}
}
- if (pTextEditOutliner != nullptr)
+ if (mpTextEditOutliner != nullptr)
{
- pTextEditOutliner->setVisualizedPage(nullptr);
+ mpTextEditOutliner->setVisualizedPage(nullptr);
}
// something went wrong...
@@ -1399,12 +1418,12 @@ bool SdrObjEditView::SdrBeginTextEdit(SdrObject* pObj_, SdrPageView* pPV, vcl::W
pGivenOutlinerView = nullptr;
}
}
- pTextEditOutliner.reset();
+ mpTextEditOutliner.reset();
- pTextEditOutlinerView = nullptr;
+ mpTextEditOutlinerView = nullptr;
mxTextEditObj.reset(nullptr);
- pTextEditPV = nullptr;
- pTextEditWin = nullptr;
+ mpTextEditPV = nullptr;
+ mpTextEditWin = nullptr;
maHdlList.SetMoveOutside(false);
return false;
@@ -1414,23 +1433,23 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
{
SdrEndTextEditKind eRet = SdrEndTextEditKind::Unchanged;
SdrTextObj* pTEObj = mxTextEditObj.get();
- vcl::Window* pTEWin = pTextEditWin;
- OutlinerView* pTEOutlinerView = pTextEditOutlinerView;
+ vcl::Window* pTEWin = mpTextEditWin;
+ OutlinerView* pTEOutlinerView = mpTextEditOutlinerView;
vcl::Cursor* pTECursorBuffer = pTextEditCursorBuffer;
SdrUndoManager* pUndoEditUndoManager = nullptr;
bool bNeedToUndoSavedRedoTextEdit(false);
- if (GetModel() && IsUndoEnabled() && pTEObj && pTextEditOutliner
+ if (GetModel() && IsUndoEnabled() && pTEObj && mpTextEditOutliner
&& !GetModel()->GetDisableTextEditUsesCommonUndoManager())
{
// change back the UndoManager to the remembered original one
- SfxUndoManager* pOriginal = pTextEditOutliner->SetUndoManager(mpOldTextEditUndoManager);
+ SfxUndoManager* pOriginal = mpTextEditOutliner->SetUndoManager(mpOldTextEditUndoManager);
mpOldTextEditUndoManager = nullptr;
if (pOriginal)
{
// check if we got back our document undo manager
- SdrUndoManager* pSdrUndoManager = getSdrUndoManagerForEnhancedTextEdit();
+ SdrUndoManager* pSdrUndoManager = mpLocalTextEditUndoManager.get();
if (pSdrUndoManager && dynamic_cast<SdrUndoManager*>(pOriginal) == pSdrUndoManager)
{
@@ -1462,6 +1481,8 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
"expected document UndoManager (!)");
delete pOriginal;
}
+
+ mpLocalTextEditUndoManager.reset();
}
}
else
@@ -1477,17 +1498,17 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
// if new mechanism was used, clean it up. At cleanup no need to check
// for LibreOfficeKit
- if (pTextEditOutlinerView)
+ if (mpTextEditOutlinerView)
{
- pTextEditOutlinerView->GetEditView().setEditViewCallbacks(nullptr);
+ mpTextEditOutlinerView->GetEditView().setEditViewCallbacks(nullptr);
maTEOverlayGroup.clear();
}
mxTextEditObj.reset(nullptr);
- pTextEditPV = nullptr;
- pTextEditWin = nullptr;
- SdrOutliner* pTEOutliner = pTextEditOutliner.release();
- pTextEditOutlinerView = nullptr;
+ mpTextEditPV = nullptr;
+ mpTextEditWin = nullptr;
+ SdrOutliner* pTEOutliner = mpTextEditOutliner.release();
+ mpTextEditOutlinerView = nullptr;
pTextEditCursorBuffer = nullptr;
aTextEditArea = tools::Rectangle();
@@ -1551,7 +1572,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
// check deletion of entire TextObj
std::unique_ptr<SdrUndoAction> pDelUndo;
bool bDelObj = false;
- if (bTextEditNewObj)
+ if (mbTextEditNewObj)
{
bDelObj = pTEObj->IsTextFrame() && !pTEObj->HasText() && !pTEObj->IsEmptyPresObj()
&& !pTEObj->HasFill() && !pTEObj->HasLine();
@@ -1615,7 +1636,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
vcl::Window* pWin = pOLV->GetWindow();
tools::Rectangle aRect(pOLV->GetOutputArea());
pTEOutliner->RemoveView(i);
- if (!bTextEditDontDelete || i != 0)
+ if (!mbTextEditDontDelete || i != 0)
{
// may not own the zeroth one
delete pOLV;
@@ -1633,7 +1654,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
pWin->SetLineColor(COL_BLACK);
}
// and now the Outliner itself
- if (!bTextEditDontDelete)
+ if (!mbTextEditDontDelete)
delete pTEOutliner;
else
pTEOutliner->Clear();
@@ -1683,19 +1704,19 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(bool bDontDeleteReally)
bool SdrObjEditView::IsTextEdit() const { return mxTextEditObj.is(); }
// info about TextEditPageView. Default is 0L.
-SdrPageView* SdrObjEditView::GetTextEditPageView() const { return pTextEditPV; }
+SdrPageView* SdrObjEditView::GetTextEditPageView() const { return mpTextEditPV; }
OutlinerView* SdrObjEditView::ImpFindOutlinerView(vcl::Window const* pWin) const
{
if (pWin == nullptr)
return nullptr;
- if (pTextEditOutliner == nullptr)
+ if (mpTextEditOutliner == nullptr)
return nullptr;
OutlinerView* pNewView = nullptr;
- sal_uIntPtr nWinCount = pTextEditOutliner->GetViewCount();
+ sal_uIntPtr nWinCount = mpTextEditOutliner->GetViewCount();
for (sal_uIntPtr i = 0; i < nWinCount && pNewView == nullptr; i++)
{
- OutlinerView* pView = pTextEditOutliner->GetView(i);
+ OutlinerView* pView = mpTextEditOutliner->GetView(i);
if (pView->GetWindow() == pWin)
pNewView = pView;
}
@@ -1704,17 +1725,17 @@ OutlinerView* SdrObjEditView::ImpFindOutlinerView(vcl::Window const* pWin) const
void SdrObjEditView::SetTextEditWin(vcl::Window* pWin)
{
- if (mxTextEditObj.is() && pWin != nullptr && pWin != pTextEditWin)
+ if (mxTextEditObj.is() && pWin != nullptr && pWin != mpTextEditWin)
{
OutlinerView* pNewView = ImpFindOutlinerView(pWin);
- if (pNewView != nullptr && pNewView != pTextEditOutlinerView)
+ if (pNewView != nullptr && pNewView != mpTextEditOutlinerView)
{
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{
- pTextEditOutlinerView->HideCursor();
+ mpTextEditOutlinerView->HideCursor();
}
- pTextEditOutlinerView = pNewView;
- pTextEditWin = pWin;
+ mpTextEditOutlinerView = pNewView;
+ mpTextEditWin = pWin;
pWin->GrabFocus(); // Make the cursor blink here as well
pNewView->ShowCursor();
ImpMakeTextCursorAreaVisible();
@@ -1728,7 +1749,7 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
if (mxTextEditObj.is())
{
tools::Rectangle aEditArea;
- OutlinerView* pOLV = pTextEditOutliner->GetView(0);
+ OutlinerView* pOLV = mpTextEditOutliner->GetView(0);
if (pOLV != nullptr)
{
aEditArea.Union(pOLV->GetOutputArea());
@@ -1739,12 +1760,12 @@ bool SdrObjEditView::IsTextEditHit(const Point& rHit) const
Point aPnt(rHit);
aPnt -= aEditArea.TopLeft();
long nHitTol = 2000;
- OutputDevice* pRef = pTextEditOutliner->GetRefDevice();
+ OutputDevice* pRef = mpTextEditOutliner->GetRefDevice();
if (pRef)
nHitTol = OutputDevice::LogicToLogic(nHitTol, MapUnit::Map100thMM,
pRef->GetMapMode().GetMapUnit());
- bOk = pTextEditOutliner->IsTextPos(aPnt, static_cast<sal_uInt16>(nHitTol));
+ bOk = mpTextEditOutliner->IsTextPos(aPnt, static_cast<sal_uInt16>(nHitTol));
}
}
return bOk;
@@ -1756,7 +1777,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& rHit) const
if (mxTextEditObj.is())
{
SdrTextObj* pText = mxTextEditObj.get();
- OutlinerView* pOLV = pTextEditOutliner->GetView(0);
+ OutlinerView* pOLV = mpTextEditOutliner->GetView(0);
if (pOLV)
{
vcl::Window* pWin = pOLV->GetWindow();
@@ -1805,7 +1826,7 @@ TextChainCursorManager* SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(cons
bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
{
- if (pTextEditOutlinerView)
+ if (mpTextEditOutlinerView)
{
/* Start special handling of keys within a chain */
// We possibly move to another box before any handling
@@ -1816,11 +1837,11 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
return true;
/* End special handling of keys within a chain */
- if (pTextEditOutlinerView->PostKeyEvent(rKEvt, pWin))
+ if (mpTextEditOutlinerView->PostKeyEvent(rKEvt, pWin))
{
if (mpModel)
{
- if (pTextEditOutliner && pTextEditOutliner->IsModified())
+ if (mpTextEditOutliner && mpTextEditOutliner->IsModified())
mpModel->SetChanged();
}
@@ -1829,7 +1850,7 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
ImpMoveCursorAfterChainingEvent(xCursorManager.get());
/* End chaining processing */
- if (pWin != nullptr && pWin != pTextEditWin)
+ if (pWin != nullptr && pWin != mpTextEditWin)
SetTextEditWin(pWin);
#ifdef DBG_UTIL
if (mpItemBrowser != nullptr)
@@ -1844,16 +1865,16 @@ bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, vcl::Window* pWin)
bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin)
{
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{
- bool bPostIt = pTextEditOutliner->IsInSelectionMode();
+ bool bPostIt = mpTextEditOutliner->IsInSelectionMode();
if (!bPostIt)
{
Point aPt(rMEvt.GetPosPixel());
if (pWin != nullptr)
aPt = pWin->PixelToLogic(aPt);
- else if (pTextEditWin != nullptr)
- aPt = pTextEditWin->PixelToLogic(aPt);
+ else if (mpTextEditWin != nullptr)
+ aPt = mpTextEditWin->PixelToLogic(aPt);
bPostIt = IsTextEditHit(aPt);
}
if (bPostIt)
@@ -1861,7 +1882,7 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin
Point aPixPos(rMEvt.GetPosPixel());
if (pWin)
{
- tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(pWin->LogicToPixel(mpTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X() < aR.Left())
aPixPos.setX(aR.Left());
if (aPixPos.X() > aR.Right())
@@ -1873,9 +1894,9 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin
}
MouseEvent aMEvt(aPixPos, rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(),
rMEvt.GetModifier());
- if (pTextEditOutlinerView->MouseButtonDown(aMEvt))
+ if (mpTextEditOutlinerView->MouseButtonDown(aMEvt))
{
- if (pWin != nullptr && pWin != pTextEditWin
+ if (pWin != nullptr && pWin != mpTextEditWin
&& pWin->GetOutDevType() == OUTDEV_WINDOW)
SetTextEditWin(static_cast<vcl::Window*>(pWin));
#ifdef DBG_UTIL
@@ -1892,22 +1913,22 @@ bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, OutputDevice* pWin
bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin)
{
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{
- bool bPostIt = pTextEditOutliner->IsInSelectionMode();
+ bool bPostIt = mpTextEditOutliner->IsInSelectionMode();
if (!bPostIt)
{
Point aPt(rMEvt.GetPosPixel());
if (pWin != nullptr)
aPt = pWin->PixelToLogic(aPt);
- else if (pTextEditWin != nullptr)
- aPt = pTextEditWin->PixelToLogic(aPt);
+ else if (mpTextEditWin != nullptr)
+ aPt = mpTextEditWin->PixelToLogic(aPt);
bPostIt = IsTextEditHit(aPt);
}
if (bPostIt && pWin)
{
Point aPixPos(rMEvt.GetPosPixel());
- tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(pWin->LogicToPixel(mpTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X() < aR.Left())
aPixPos.setX(aR.Left());
if (aPixPos.X() > aR.Right())
@@ -1918,7 +1939,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin)
aPixPos.setY(aR.Bottom());
MouseEvent aMEvt(aPixPos, rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(),
rMEvt.GetModifier());
- if (pTextEditOutlinerView->MouseButtonUp(aMEvt))
+ if (mpTextEditOutlinerView->MouseButtonUp(aMEvt))
{
#ifdef DBG_UTIL
if (mpItemBrowser != nullptr)
@@ -1934,27 +1955,27 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, OutputDevice* pWin)
bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin)
{
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{
- bool bSelMode = pTextEditOutliner->IsInSelectionMode();
+ bool bSelMode = mpTextEditOutliner->IsInSelectionMode();
bool bPostIt = bSelMode;
if (!bPostIt)
{
Point aPt(rMEvt.GetPosPixel());
if (pWin)
aPt = pWin->PixelToLogic(aPt);
- else if (pTextEditWin)
- aPt = pTextEditWin->PixelToLogic(aPt);
+ else if (mpTextEditWin)
+ aPt = mpTextEditWin->PixelToLogic(aPt);
bPostIt = IsTextEditHit(aPt);
}
if (bPostIt)
{
Point aPixPos(rMEvt.GetPosPixel());
- tools::Rectangle aR(pTextEditOutlinerView->GetOutputArea());
+ tools::Rectangle aR(mpTextEditOutlinerView->GetOutputArea());
if (pWin)
aR = pWin->LogicToPixel(aR);
- else if (pTextEditWin)
- aR = pTextEditWin->LogicToPixel(aR);
+ else if (mpTextEditWin)
+ aR = mpTextEditWin->LogicToPixel(aR);
if (aPixPos.X() < aR.Left())
aPixPos.setX(aR.Left());
if (aPixPos.X() > aR.Right())
@@ -1965,7 +1986,7 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin)
aPixPos.setY(aR.Bottom());
MouseEvent aMEvt(aPixPos, rMEvt.GetClicks(), rMEvt.GetMode(), rMEvt.GetButtons(),
rMEvt.GetModifier());
- if (pTextEditOutlinerView->MouseMove(aMEvt) && bSelMode)
+ if (mpTextEditOutlinerView->MouseMove(aMEvt) && bSelMode)
{
#ifdef DBG_UTIL
if (mpItemBrowser != nullptr)
@@ -1982,18 +2003,18 @@ bool SdrObjEditView::MouseMove(const MouseEvent& rMEvt, OutputDevice* pWin)
bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
{
// as long as OutlinerView returns a sal_Bool, it only gets CommandEventId::StartDrag
- if (pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutlinerView != nullptr)
{
if (rCEvt.GetCommand() == CommandEventId::StartDrag)
{
- bool bPostIt = pTextEditOutliner->IsInSelectionMode() || !rCEvt.IsMouseEvent();
+ bool bPostIt = mpTextEditOutliner->IsInSelectionMode() || !rCEvt.IsMouseEvent();
if (!bPostIt && rCEvt.IsMouseEvent())
{
Point aPt(rCEvt.GetMousePosPixel());
if (pWin != nullptr)
aPt = pWin->PixelToLogic(aPt);
- else if (pTextEditWin != nullptr)
- aPt = pTextEditWin->PixelToLogic(aPt);
+ else if (mpTextEditWin != nullptr)
+ aPt = mpTextEditWin->PixelToLogic(aPt);
bPostIt = IsTextEditHit(aPt);
}
if (bPostIt)
@@ -2001,7 +2022,8 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
Point aPixPos(rCEvt.GetMousePosPixel());
if (rCEvt.IsMouseEvent() && pWin)
{
- tools::Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
+ tools::Rectangle aR(
+ pWin->LogicToPixel(mpTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X() < aR.Left())
aPixPos.setX(aR.Left());
if (aPixPos.X() > aR.Right())
@@ -2013,8 +2035,8 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
}
CommandEvent aCEvt(aPixPos, rCEvt.GetCommand(), rCEvt.IsMouseEvent());
// Command is void at the OutlinerView, sadly
- pTextEditOutlinerView->Command(aCEvt);
- if (pWin != nullptr && pWin != pTextEditWin)
+ mpTextEditOutlinerView->Command(aCEvt);
+ if (pWin != nullptr && pWin != mpTextEditWin)
SetTextEditWin(pWin);
#ifdef DBG_UTIL
if (mpItemBrowser != nullptr)
@@ -2026,12 +2048,12 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
}
else
{
- pTextEditOutlinerView->Command(rCEvt);
+ mpTextEditOutlinerView->Command(rCEvt);
if (mpModel && comphelper::LibreOfficeKit::isActive())
{
// It could execute CommandEventId::ExtTextInput, while SdrObjEditView::KeyInput
// isn't called
- if (pTextEditOutliner && pTextEditOutliner->IsModified())
+ if (mpTextEditOutliner && mpTextEditOutliner->IsModified())
mpModel->SetChanged();
}
return true;
@@ -2043,24 +2065,25 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
bool SdrObjEditView::ImpIsTextEditAllSelected() const
{
bool bRet = false;
- if (pTextEditOutliner != nullptr && pTextEditOutlinerView != nullptr)
+ if (mpTextEditOutliner != nullptr && mpTextEditOutlinerView != nullptr)
{
- if (SdrTextObj::HasTextImpl(pTextEditOutliner.get()))
+ if (SdrTextObj::HasTextImpl(mpTextEditOutliner.get()))
{
- const sal_Int32 nParaCnt = pTextEditOutliner->GetParagraphCount();
- Paragraph* pLastPara = pTextEditOutliner->GetParagraph(nParaCnt > 1 ? nParaCnt - 1 : 0);
+ const sal_Int32 nParaCnt = mpTextEditOutliner->GetParagraphCount();
+ Paragraph* pLastPara
+ = mpTextEditOutliner->GetParagraph(nParaCnt > 1 ? nParaCnt - 1 : 0);
- ESelection aESel(pTextEditOutlinerView->GetSelection());
+ ESelection aESel(mpTextEditOutlinerView->GetSelection());
if (aESel.nStartPara == 0 && aESel.nStartPos == 0 && aESel.nEndPara == (nParaCnt - 1))
{
- if (pTextEditOutliner->GetText(pLastPara).getLength() == aESel.nEndPos)
+ if (mpTextEditOutliner->GetText(pLastPara).getLength() == aESel.nEndPos)
bRet = true;
}
// in case the selection was done backwards
if (!bRet && aESel.nEndPara == 0 && aESel.nEndPos == 0
&& aESel.nStartPara == (nParaCnt - 1))
{
- if (pTextEditOutliner->GetText(pLastPara).getLength() == aESel.nStartPos)
+ if (mpTextEditOutliner->GetText(pLastPara).getLength() == aESel.nStartPos)
bRet = true;
}
}
@@ -2074,15 +2097,15 @@ bool SdrObjEditView::ImpIsTextEditAllSelected() const
void SdrObjEditView::ImpMakeTextCursorAreaVisible()
{
- if (pTextEditOutlinerView != nullptr && pTextEditWin != nullptr)
+ if (mpTextEditOutlinerView != nullptr && mpTextEditWin != nullptr)
{
- vcl::Cursor* pCsr = pTextEditWin->GetCursor();
+ vcl::Cursor* pCsr = mpTextEditWin->GetCursor();
if (pCsr != nullptr)
{
Size aSiz(pCsr->GetSize());
if (aSiz.Width() != 0 && aSiz.Height() != 0)
{
- MakeVisible(tools::Rectangle(pCsr->GetPos(), aSiz), *pTextEditWin);
+ MakeVisible(tools::Rectangle(pCsr->GetPos(), aSiz), *mpTextEditWin);
}
}
}
@@ -2097,8 +2120,8 @@ SvtScriptType SdrObjEditView::GetScriptType() const
if (mxTextEditObj->GetOutlinerParaObject())
nScriptType = mxTextEditObj->GetOutlinerParaObject()->GetTextObject().GetScriptType();
- if (pTextEditOutlinerView)
- nScriptType = pTextEditOutlinerView->GetSelectedScriptType();
+ if (mpTextEditOutlinerView)
+ nScriptType = mpTextEditOutlinerView->GetSelectedScriptType();
}
else
{
@@ -2129,10 +2152,10 @@ void SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
if (IsTextEdit())
{
- DBG_ASSERT(pTextEditOutlinerView != nullptr,
- "SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
- DBG_ASSERT(pTextEditOutliner != nullptr,
- "SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
+ DBG_ASSERT(mpTextEditOutlinerView != nullptr,
+ "SdrObjEditView::GetAttributes(): mpTextEditOutlinerView=NULL");
+ DBG_ASSERT(mpTextEditOutliner != nullptr,
+ "SdrObjEditView::GetAttributes(): mpTextEditOutliner=NULL");
// take care of bOnlyHardAttr(!)
if (!bOnlyHardAttr && mxTextEditObj->GetStyleSheet())
@@ -2141,10 +2164,10 @@ void SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
// add object attributes
rTargetSet.Put(mxTextEditObj->GetMergedItemSet());
- if (pTextEditOutlinerView)
+ if (mpTextEditOutlinerView)
{
// FALSE= regard InvalidItems as "holes," not as Default
- rTargetSet.Put(pTextEditOutlinerView->GetAttribs(), false);
+ rTargetSet.Put(mpTextEditOutlinerView->GetAttribs(), false);
}
if (GetMarkedObjectCount() == 1 && GetMarkedObjectByIndex(0) == mxTextEditObj.get())
@@ -2161,7 +2184,7 @@ void SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c
bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
{
bool bRet = false;
- bool bTextEdit = pTextEditOutlinerView != nullptr && mxTextEditObj.is();
+ bool bTextEdit = mpTextEditOutlinerView != nullptr && mxTextEditObj.is();
bool bAllTextSelected = ImpIsTextEditAllSelected();
const SfxItemSet* pSet = &rSet;
@@ -2291,11 +2314,11 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll)
// and now the attributes to the EditEngine
if (bReplaceAll)
{
- pTextEditOutlinerView->RemoveAttribs(true);
+ mpTextEditOutlinerView->RemoveAttribs(true);
}
- pTextEditOutlinerView->SetAttribs(rSet);
+ mpTextEditOutlinerView->SetAttribs(rSet);
- Outliner* pTEOutliner = pTextEditOutlinerView->GetOutliner();
+ Outliner* pTEOutliner = mpTextEditOutlinerView->GetOutliner();
if (mpModel && pTEOutliner && pTEOutliner->IsModified())
mpModel->SetChanged();
@@ -2321,9 +2344,9 @@ SfxStyleSheet* SdrObjEditView::GetStyleSheet() const
return pSheet;
}
- if (pTextEditOutlinerView)
+ if (mpTextEditOutlinerView)
{
- pSheet = pTextEditOutlinerView->GetStyleSheet();
+ pSheet = mpTextEditOutlinerView->GetStyleSheet();
}
else
{
@@ -2342,9 +2365,9 @@ void SdrObjEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveH
// if we are currently in edit mode we must also set the stylesheet
// on all paragraphs in the Outliner for the edit view
- if (nullptr != pTextEditOutlinerView)
+ if (nullptr != mpTextEditOutlinerView)
{
- Outliner* pOutliner = pTextEditOutlinerView->GetOutliner();
+ Outliner* pOutliner = mpTextEditOutlinerView->GetOutliner();
const sal_Int32 nParaCount = pOutliner->GetParagraphCount();
for (sal_Int32 nPara = 0; nPara < nParaCount; nPara++)
@@ -2360,10 +2383,10 @@ void SdrObjEditView::AddWindowToPaintView(OutputDevice* pNewWin, vcl::Window* pW
{
SdrGlueEditView::AddWindowToPaintView(pNewWin, pWindow);
- if (mxTextEditObj.is() && !bTextEditOnlyOneView && pNewWin->GetOutDevType() == OUTDEV_WINDOW)
+ if (mxTextEditObj.is() && !mbTextEditOnlyOneView && pNewWin->GetOutDevType() == OUTDEV_WINDOW)
{
OutlinerView* pOutlView = ImpMakeOutlinerView(static_cast<vcl::Window*>(pNewWin), nullptr);
- pTextEditOutliner->InsertView(pOutlView);
+ mpTextEditOutliner->InsertView(pOutlView);
}
}
@@ -2371,15 +2394,15 @@ void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
{
SdrGlueEditView::DeleteWindowFromPaintView(pOldWin);
- if (mxTextEditObj.is() && !bTextEditOnlyOneView && pOldWin->GetOutDevType() == OUTDEV_WINDOW)
+ if (mxTextEditObj.is() && !mbTextEditOnlyOneView && pOldWin->GetOutDevType() == OUTDEV_WINDOW)
{
- for (sal_uIntPtr i = pTextEditOutliner->GetViewCount(); i > 0;)
+ for (sal_uIntPtr i = mpTextEditOutliner->GetViewCount(); i > 0;)
{
i--;
- OutlinerView* pOLV = pTextEditOutliner->GetView(i);
+ OutlinerView* pOLV = mpTextEditOutliner->GetView(i);
if (pOLV && pOLV->GetWindow() == static_cast<vcl::Window*>(pOldWin))
{
- pTextEditOutliner->RemoveView(i);
+ mpTextEditOutliner->RemoveView(i);
}
}
}
@@ -2389,7 +2412,7 @@ void SdrObjEditView::DeleteWindowFromPaintView(OutputDevice* pOldWin)
bool SdrObjEditView::IsTextEditInSelectionMode() const
{
- return pTextEditOutliner != nullptr && pTextEditOutliner->IsInSelectionMode();
+ return mpTextEditOutliner != nullptr && mpTextEditOutliner->IsInSelectionMode();
}
// MacroMode
@@ -2404,7 +2427,7 @@ void SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj,
pMacroObj = pObj;
pMacroPV = pPV;
pMacroWin = pWin;
- bMacroDown = false;
+ mbMacroDown = false;
nMacroTol = sal_uInt16(nTol);
aMacroDownPos = rPnt;
MovMacroObj(rPnt);
@@ -2413,7 +2436,7 @@ void SdrObjEditView::BegMacroObj(const Point& rPnt, short nTol, SdrObject* pObj,
void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
{
- if (pMacroObj != nullptr && bMacroDown)
+ if (pMacroObj != nullptr && mbMacroDown)
{
SdrObjMacroHitRec aHitRec;
aHitRec.aPos = rUpPos;
@@ -2421,13 +2444,13 @@ void SdrObjEditView::ImpMacroUp(const Point& rUpPos)
aHitRec.pVisiLayer = &pMacroPV->GetVisibleLayers();
aHitRec.pPageView = pMacroPV;
pMacroObj->PaintMacro(*pMacroWin, tools::Rectangle(), aHitRec);
- bMacroDown = false;
+ mbMacroDown = false;
}
}
void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
{
- if (pMacroObj != nullptr && !bMacroDown)
+ if (pMacroObj != nullptr && !mbMacroDown)
{
SdrObjMacroHitRec aHitRec;
aHitRec.aPos = rDownPos;
@@ -2435,7 +2458,7 @@ void SdrObjEditView::ImpMacroDown(const Point& rDownPos)
aHitRec.pVisiLayer = &pMacroPV->GetVisibleLayers();
aHitRec.pPageView = pMacroPV;
pMacroObj->PaintMacro(*pMacroWin, tools::Rectangle(), aHitRec);
- bMacroDown = true;
+ mbMacroDown = true;
}
}
@@ -2469,7 +2492,7 @@ void SdrObjEditView::BrkMacroObj()
bool SdrObjEditView::EndMacroObj()
{
- if (pMacroObj != nullptr && bMacroDown)
+ if (pMacroObj != nullptr && mbMacroDown)
{
ImpMacroUp(aMacroDownPos);
SdrObjMacroHitRec aHitRec;
@@ -2587,14 +2610,14 @@ sal_uInt16 SdrObjEditView::GetSelectionLevel() const
sal_uInt16 nLevel = 0xFFFF;
if (IsTextEdit())
{
- DBG_ASSERT(pTextEditOutlinerView != nullptr,
- "SdrObjEditView::GetAttributes(): pTextEditOutlinerView=NULL");
- DBG_ASSERT(pTextEditOutliner != nullptr,
- "SdrObjEditView::GetAttributes(): pTextEditOutliner=NULL");
- if (pTextEditOutlinerView)
+ DBG_ASSERT(mpTextEditOutlinerView != nullptr,
+ "SdrObjEditView::GetAttributes(): mpTextEditOutlinerView=NULL");
+ DBG_ASSERT(mpTextEditOutliner != nullptr,
+ "SdrObjEditView::GetAttributes(): mpTextEditOutliner=NULL");
+ if (mpTextEditOutlinerView)
{
//start and end position
- ESelection aSelect = pTextEditOutlinerView->GetSelection();
+ ESelection aSelect = mpTextEditOutlinerView->GetSelection();
sal_uInt16 nStartPara = ::std::min(aSelect.nStartPara, aSelect.nEndPara);
sal_uInt16 nEndPara = ::std::max(aSelect.nStartPara, aSelect.nEndPara);
//get level from each paragraph
@@ -2602,7 +2625,7 @@ sal_uInt16 SdrObjEditView::GetSelectionLevel() const
for (sal_uInt16 nPara = nStartPara; nPara <= nEndPara; nPara++)
{
sal_uInt16 nParaDepth
- = 1 << static_cast<sal_uInt16>(pTextEditOutliner->GetDepth(nPara));
+ = 1 << static_cast<sal_uInt16>(mpTextEditOutliner->GetDepth(nPara));
if (!(nLevel & nParaDepth))
nLevel += nParaDepth;
}
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 61f7d472ecd6..caf9321b41dd 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -251,9 +251,9 @@ void SdrMarkView::ModelHasChanged()
{
//TODO: Is MarkedObjRect valid at this point?
tools::Rectangle aSelection(GetMarkedObjRect());
- OString sSelection;
+ tools::Rectangle* pResultRect;
if (aSelection.IsEmpty())
- sSelection = "EMPTY";
+ pResultRect = nullptr;
else
{
sal_uInt32 nTotalPaintWindows = this->PaintWindowCount();
@@ -282,11 +282,11 @@ void SdrMarkView::ModelHasChanged()
}
}
- sSelection = aSelection.toString();
+ pResultRect = &aSelection;
}
if(SfxViewShell* pViewShell = GetSfxViewShell())
- SfxLokHelper::notifyInvalidation(pViewShell, sSelection);
+ SfxLokHelper::notifyInvalidation(pViewShell, pResultRect);
}
}
@@ -1108,7 +1108,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, SfxView
boost::property_tree::write_json(aStream, aTableJsonTree);
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, aStream.str().c_str());
}
- else
+ else if (!getSdrModelFromSdrView().IsWriter())
{
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, "{}");
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 16617ecaf94f..f957f9382d57 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>
@@ -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();
}
@@ -927,24 +957,51 @@ void SdrOle2Obj::CheckFileLink_Impl()
{
try
{
- uno::Reference< embed::XLinkageSupport > xLinkSupport( mpImpl->mxObjRef.GetObject(), uno::UNO_QUERY );
+ uno::Reference<embed::XEmbeddedObject> xObject = mpImpl->mxObjRef.GetObject();
+ if (!xObject)
+ return;
- if ( xLinkSupport.is() && xLinkSupport->isLink() )
- {
- OUString aLinkURL = xLinkSupport->getLinkURL();
+ bool bIFrame = false;
- if ( !aLinkURL.isEmpty() )
+ 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))
{
- // this is a file link so the model link manager should handle it
- sfx2::LinkManager* pLinkManager(getSdrModelFromSdrObject().GetLinkManager());
+ 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 ( pLinkManager )
+ if ( pLinkManager )
+ {
+ SdrEmbedObjectLink* pEmbedObjectLink = nullptr;
+ if (!bIFrame)
{
- mpImpl->mpObjectLink = new SdrEmbedObjectLink( this );
- mpImpl->maLinkURL = aLinkURL;
- pLinkManager->InsertFileLink( *mpImpl->mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
- mpImpl->mpObjectLink->Connect();
+ 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();
}
}
}
@@ -955,7 +1012,7 @@ void SdrOle2Obj::CheckFileLink_Impl()
}
}
-void SdrOle2Obj::Connect_Impl()
+void SdrOle2Obj::Connect_Impl(SvxOle2Shape* pCreator)
{
if(!mpImpl->aPersistName.isEmpty() )
{
@@ -995,6 +1052,17 @@ void SdrOle2Obj::Connect_Impl()
}
}
+ if (pCreator)
+ {
+ OUString sFrameURL(pCreator->GetAndClearInitialFrameURL());
+ if (!sFrameURL.isEmpty() && svt::EmbeddedObjectRef::TryRunningState(mpImpl->mxObjRef.GetObject()))
+ {
+ uno::Reference<beans::XPropertySet> xSet(mpImpl->mxObjRef->getComponent(), uno::UNO_QUERY);
+ if (xSet.is())
+ xSet->setPropertyValue("FrameURL", uno::Any(sFrameURL));
+ }
+ }
+
if ( mpImpl->mxObjRef.is() )
{
if ( !mpImpl->mxLightClient.is() )
@@ -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();
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f4fa2e4783bc..d7a682272700 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -395,8 +395,11 @@ SdrPageView* SdrPaintView::ShowSdrPage(SdrPage* pPage)
mpPageView.reset();
}
- mpPageView.reset(new SdrPageView(pPage, *static_cast<SdrView*>(this)));
- mpPageView->Show();
+ if (SdrView *pView = dynamic_cast<SdrView*>(this))
+ {
+ mpPageView.reset(new SdrPageView(pPage, *pView));
+ mpPageView->Show();
+ }
}
return mpPageView.get();
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 2c784b6a6e2e..a537604e4734 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -976,17 +976,17 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe
{
if(!pOut || IsTextEditInSelectionMode())
{
- if(pTextEditOutliner->IsVertical())
+ if (mpTextEditOutliner->IsVertical())
return PointerStyle::TextVertical;
else
return PointerStyle::Text;
}
// Outliner should return something here...
Point aPos(pOut->LogicToPixel(rMousePos));
- PointerStyle aPointer(pTextEditOutlinerView->GetPointer(aPos));
+ PointerStyle aPointer(mpTextEditOutlinerView->GetPointer(aPos));
if (aPointer==PointerStyle::Arrow)
{
- if(pTextEditOutliner->IsVertical())
+ if (mpTextEditOutliner->IsVertical())
aPointer = PointerStyle::TextVertical;
else
aPointer = PointerStyle::Text;
@@ -1227,24 +1227,24 @@ OUString SdrView::GetStatusText()
aStr = SvxResId(STR_ViewMarkGluePoints);
}
}
- else if (IsTextEdit() && pTextEditOutlinerView!=nullptr) {
+ else if (IsTextEdit() && mpTextEditOutlinerView != nullptr) {
aStr=SvxResId(STR_ViewTextEdit); // "TextEdit - Row y, Column x";
- ESelection aSel(pTextEditOutlinerView->GetSelection());
+ ESelection aSel(mpTextEditOutlinerView->GetSelection());
long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
if (aSel.nEndPara>0) {
for (sal_Int32 nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
- nLin+=pTextEditOutliner->GetLineCount(nParaNum);
+ nLin += mpTextEditOutliner->GetLineCount(nParaNum);
}
}
// A little imperfection:
// At the end of a line of any multi-line paragraph, we display the
// position of the next line of the same paragraph, if there is one.
sal_uInt16 nParaLine = 0;
- sal_uIntPtr nParaLineCount = pTextEditOutliner->GetLineCount(aSel.nEndPara);
+ sal_uIntPtr nParaLineCount = mpTextEditOutliner->GetLineCount(aSel.nEndPara);
bool bBrk = false;
while (!bBrk)
{
- sal_uInt16 nLen = pTextEditOutliner->GetLineLen(aSel.nEndPara, nParaLine);
+ sal_uInt16 nLen = mpTextEditOutliner->GetLineLen(aSel.nEndPara, nParaLine);
bool bLastLine = (nParaLine == nParaLineCount - 1);
if (nCol>nLen || (!bLastLine && nCol == nLen))
{
@@ -1264,7 +1264,7 @@ OUString SdrView::GetStatusText()
aStr = aStr.replaceFirst("%3", OUString::number(nCol + 1));
#ifdef DBG_UTIL
- aStr += ", Level " + OUString::number( pTextEditOutliner->GetDepth( aSel.nEndPara ) );
+ aStr += ", Level " + OUString::number(mpTextEditOutliner->GetDepth( aSel.nEndPara ));
#endif
}
@@ -1417,7 +1417,7 @@ void SdrView::DeleteMarked()
{
if (IsTextEdit())
{
- SdrObjEditView::KeyInput(KeyEvent(0,vcl::KeyCode(KeyFuncType::DELETE)),pTextEditWin);
+ SdrObjEditView::KeyInput(KeyEvent(0, vcl::KeyCode(KeyFuncType::DELETE)), mpTextEditWin);
}
else
{
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 88083f3e93e0..f6f707367768 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -58,6 +58,7 @@
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/svdotable.hxx>
#include <sal/log.hxx>
+#include <comphelper/lok.hxx>
using namespace com::sun::star;
@@ -414,7 +415,9 @@ void SdrExchangeView::ImpPasteObject(SdrObject* pObj, SdrObjList& rLst, const Po
nSizY /= aDstFr.GetNumerator();
long xs=nSizX;
long ys=nSizY;
- Point aPos(rCenter.X()-xs/2,rCenter.Y()-ys/2);
+ // set the pos to 0, 0 for online case
+ bool isLOK = comphelper::LibreOfficeKit::isActive();
+ Point aPos(isLOK ? 0 : rCenter.X()-xs/2, isLOK ? 0 : rCenter.Y()-ys/2);
tools::Rectangle aR(aPos.X(),aPos.Y(),aPos.X()+xs,aPos.Y()+ys);
pObj->SetLogicRect(aR);
rLst.InsertObject(pObj, SAL_MAX_SIZE);
diff --git a/svx/source/tbxctrls/fontworkgallery.cxx b/svx/source/tbxctrls/fontworkgallery.cxx
index afd2da9f8dfa..5834979d5152 100644
--- a/svx/source/tbxctrls/fontworkgallery.cxx
+++ b/svx/source/tbxctrls/fontworkgallery.cxx
@@ -215,7 +215,7 @@ void FontWorkGalleryDialog::insertSelectedFontwork()
aPagePos.setX(convertTwipToMm100(aPagePos.X()));
aPagePos.setY(convertTwipToMm100(aPagePos.Y()));
- sal_uInt32 nLOKViewWidth = 0.8 * convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
+ sal_Int32 nLOKViewWidth = 0.8 * convertTwipToMm100(pViewShell->getLOKVisibleArea().getWidth());
if (aFontworkSize.getWidth() > nLOKViewWidth)
{
double fScale = static_cast<double>(aFontworkSize.getWidth()) / nLOKViewWidth;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index b321e0799f92..f0768d48b3cc 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -714,6 +714,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( RID_SVXPAGE_GRFCROP );
std::unique_ptr<SfxTabPage> xTabPage = (*fnCreatePage)(aCropDialog.get_content_area(), &aCropDialog, &aCropDlgAttr);
+ sal_Int32 nPreferredDPI = rView.getSdrModelFromSdrView().getImagePreferredDPI();
+ xTabPage->getAdditionalProperties().emplace("PreferredDPI", css::uno::makeAny(nPreferredDPI));
xTabPage->SetPageTitle(aCropStr);
aCropDialog.SetTabPage(std::move(xTabPage));
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index a1a4e6963020..4381094d380a 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -64,8 +64,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;
@@ -82,6 +85,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/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 688fd1b29ee6..19268527fc26 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1496,7 +1496,8 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
Reference<graphic::XGraphic> xGraphic;
auto pSdrGraphicObject = static_cast<SdrGrafObj*>(GetSdrObject());
- if (pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE)
+ if (pSdrGraphicObject
+ && pSdrGraphicObject->GetGraphicObject().GetType() != GraphicType::NONE)
xGraphic = pSdrGraphicObject->GetGraphic().GetXGraphic();
rValue <<= xGraphic;
break;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index f7629f338858..6dc18d6cf9e4 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -180,7 +180,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
#else
pOle = static_cast<SdrOle2Obj*>(GetSdrObject());
#endif
- pOle->SetPersistName( aPersistName );
+ pOle->SetPersistName( aPersistName, this );
return true;
}
break;
@@ -501,10 +501,11 @@ void SvxOle2Shape::createLink( const OUString& aLinkURL )
void SvxOle2Shape::resetModifiedState()
{
- ::comphelper::IEmbeddedHelper* pPersist = GetSdrObject()->getSdrModelFromSdrObject().GetPersist();
+ SdrObject* pObject = GetSdrObject();
+ ::comphelper::IEmbeddedHelper* pPersist = pObject ? pObject->getSdrModelFromSdrObject().GetPersist() : nullptr;
if( pPersist && !pPersist->isEnableSetModified() )
{
- SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( GetSdrObject() );
+ SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >(pObject);
if( pOle && !pOle->IsEmpty() )
{
uno::Reference < util::XModifiable > xMod( pOle->GetObjRef(), uno::UNO_QUERY );
@@ -554,6 +555,11 @@ SvGlobalName SvxOle2Shape::GetClassName_Impl(OUString& rHexCLSID)
return aClassName;
}
+OUString SvxOle2Shape::GetAndClearInitialFrameURL()
+{
+ return OUString();
+}
+
SvxAppletShape::SvxAppletShape(SdrObject* pObject)
: SvxOle2Shape( pObject, getSvxMapProvider().GetMap(SVXMAP_APPLET), getSvxMapProvider().GetPropertySet(SVXMAP_APPLET, SdrObject::GetGlobalDrawObjectItemPool()) )
{
@@ -707,8 +713,19 @@ SvxFrameShape::~SvxFrameShape() throw()
{
}
+OUString SvxFrameShape::GetAndClearInitialFrameURL()
+{
+ OUString sRet(m_sInitialFrameURL);
+ m_sInitialFrameURL.clear();
+ return sRet;
+}
+
void SvxFrameShape::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
+ uno::Reference<beans::XPropertySet> xSet(static_cast<OWeakObject *>(this), uno::UNO_QUERY);
+ if (xSet)
+ xSet->getPropertyValue("FrameURL") >>= m_sInitialFrameURL;
+
SvxShape::Create( pNewObj, pNewPage );
const SvGlobalName aIFrameClassId( SO3_IFRAME_CLASSID );
createObject(aIFrameClassId);
diff --git a/svx/uiconfig/ui/genericcheckdialog.ui b/svx/uiconfig/ui/genericcheckdialog.ui
new file mode 100644
index 000000000000..232221c0a878
--- /dev/null
+++ b/svx/uiconfig/ui/genericcheckdialog.ui
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="svx">
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkDialog" id="GenericCheckDialog">
+ <property name="width-request">850</property>
+ <property name="height-request">480</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border-width">6</property>
+ <property name="modal">True</property>
+ <property name="type-hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialogBox1">
+ <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="dialogButtons">
+ <property name="can-focus">False</property>
+ <property name="layout-style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label" translatable="yes" context="stock">_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-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label" translatable="yes" context="stock">_Cancel</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label" translatable="yes" context="stock">_Help</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ <property name="use-underline">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack-type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow">
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="shadow-type">in</property>
+ <child>
+ <object class="GtkViewport">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child>
+ <object class="GtkBox" id="checkBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-5">ok</action-widget>
+ <action-widget response="-6">cancel</action-widget>
+ <action-widget response="-11">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/svx/uiconfig/ui/genericcheckentry.ui b/svx/uiconfig/ui/genericcheckentry.ui
new file mode 100644
index 000000000000..1b02ca13eeac
--- /dev/null
+++ b/svx/uiconfig/ui/genericcheckentry.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.38.2 -->
+<interface domain="svx">
+ <requires lib="gtk+" version="3.20"/>
+ <object class="GtkBox" id="checkEntryBox">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="border-width">3</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="label">
+ <property name="visible">True</property>
+ <property name="can-focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="selectable">True</property>
+ <property name="xalign">0</property>
+ <child internal-child="accessible">
+ <object class="AtkObject" id="label-atkobject">
+ <property name="AtkObject::accessible-role">static</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="markButton">
+ <property name="label" translatable="yes" context="genericcheckentry|markButton">Mark</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="propertiesButton">
+ <property name="label" translatable="yes" context="genericcheckentry|propertiesButton">Properties</property>
+ <property name="visible">True</property>
+ <property name="can-focus">True</property>
+ <property name="receives-default">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+</interface>
diff --git a/sw/CppunitTest_sw_core_attr.mk b/sw/CppunitTest_sw_core_attr.mk
new file mode 100644
index 000000000000..91ae9c8b44e6
--- /dev/null
+++ b/sw/CppunitTest_sw_core_attr.mk
@@ -0,0 +1,74 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_attr, \
+ sw/qa/core/attr/attr \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_attr, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ editeng \
+ sal \
+ sfx \
+ svl \
+ svx \
+ svxcore \
+ sw \
+ test \
+ unotest \
+ utl \
+ vcl \
+ tl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_attr,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_attr,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_attr,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_attr))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_attr,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_attr,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_attr))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_attr, \
+ modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_attr))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_core_edit.mk b/sw/CppunitTest_sw_core_edit.mk
new file mode 100644
index 000000000000..2c04606a75f9
--- /dev/null
+++ b/sw/CppunitTest_sw_core_edit.mk
@@ -0,0 +1,74 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*************************************************************************
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*************************************************************************
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_edit, \
+ sw/qa/core/edit/edit \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_edit, \
+ editeng \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ sfx \
+ svxcore \
+ sw \
+ test \
+ unotest \
+ utl \
+ vcl \
+ svt \
+ tl \
+ svl \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_edit,\
+ boost_headers \
+ libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_edit,\
+ -I$(SRCDIR)/sw/inc \
+ -I$(SRCDIR)/sw/source/core/inc \
+ -I$(SRCDIR)/sw/source/uibase/inc \
+ -I$(SRCDIR)/sw/qa/inc \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_edit,\
+ udkapi \
+ offapi \
+ oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_edit))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_edit,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_edit,\
+ officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_edit))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_edit, \
+ modules/swriter \
+))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_edit))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/CppunitTest_sw_core_text.mk b/sw/CppunitTest_sw_core_text.mk
index cb901fde29f2..43a7d5eac376 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/Library_sw.mk b/sw/Library_sw.mk
index 7999ece93c3d..2fff886cccb3 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -308,6 +308,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/frmedt/tblsel \
sw/source/core/graphic/grfatr \
sw/source/core/graphic/ndgrf \
+ sw/source/core/graphic/GraphicSizeCheck \
sw/source/core/layout/anchoreddrawobject \
sw/source/core/layout/anchoredobject \
sw/source/core/layout/atrfrm \
@@ -348,6 +349,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
sw/source/core/layout/unusedf \
sw/source/core/layout/virtoutp \
sw/source/core/layout/wsfrm \
+ sw/source/core/model/ModelTraverser \
sw/source/core/objectpositioning/anchoredobjectposition \
sw/source/core/objectpositioning/ascharanchoredobjectposition \
sw/source/core/objectpositioning/environmentofanchoredobject \
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index e6fb99d5f88c..1d1fbe28d756 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -117,6 +117,8 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
CppunitTest_sw_core_unocore \
CppunitTest_sw_core_crsr \
CppunitTest_sw_uibase_uno \
+ 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..5c7703d5e381 100644
--- a/sw/inc/IDocumentContentOperations.hxx
+++ b/sw/inc/IDocumentContentOperations.hxx
@@ -149,6 +149,12 @@ public:
virtual bool InsertString(const SwPaM &rRg, const OUString&,
const SwInsertFlags nInsertMode = SwInsertFlags::EMPTYEXPAND ) = 0;
+ /// States that the last inserted string came from IME.
+ virtual void SetIME(bool bIME) = 0;
+
+ /// Did the last inserted string come from IME?
+ virtual bool GetIME() const = 0;
+
/** change text to Upper/Lower/Hiragana/Katakana/...
*/
virtual void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) = 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/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 287a12604850..4a223b6fb563 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -242,6 +242,9 @@ enum class DocumentSettingId
*/
virtual void Setn32DummyCompatibilityOptions2( const sal_uInt32 CompatibilityOptions2 ) = 0;
+ virtual sal_Int32 getImagePreferredDPI() = 0;
+ virtual void setImagePreferredDPI(sal_Int32 nValue) = 0;
+
protected:
virtual ~IDocumentSettingAccess() {};
};
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 50e6560d25c8..6380d58c7124 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -620,7 +620,8 @@
#define FN_UNO_VISIBLE_AREA_WIDTH (FN_EXTRA2 + 125)
#define FN_UNO_VISIBLE_AREA_HEIGHT (FN_EXTRA2 + 126)
-#define FN_UNO_TRANSFORMED_GRAPHIC (FN_EXTRA2 + 125)
+#define FN_UNO_TRANSFORMED_GRAPHIC (FN_EXTRA2 + 127)
+#define FN_UNO_GRAPHIC_PREVIEW (FN_EXTRA2 + 128)
// Area: Help
// Region: Traveling & Selection
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/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/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/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 1100a72508fb..fcd0b4029a58 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -166,6 +166,7 @@
#define UNO_NAME_FILE_LINK "FileLink"
#define UNO_NAME_GRAPHIC "Graphic"
#define UNO_NAME_TRANSFORMED_GRAPHIC "TransformedGraphic"
+#define UNO_NAME_GRAPHIC_PREVIEW "GraphicPreview"
#define UNO_NAME_IS_PROTECTED "IsProtected"
#define UNO_NAME_PARA_KEEP_TOGETHER "ParaKeepTogether"
#define UNO_NAME_KEEP_TOGETHER "KeepTogether"
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..5a2bc08404db
--- /dev/null
+++ b/sw/qa/core/attr/attr.cxx
@@ -0,0 +1,64 @@
+/* -*- 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>
+
+namespace
+{
+static 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);
+};
+
+SwDoc* Test::createDoc(const char* pName)
+{
+ load(DATA_DIRECTORY, pName);
+
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ return pTextDoc->GetDocShell()->GetDoc();
+}
+
+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/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/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/doc.cxx b/sw/qa/core/doc/doc.cxx
index d30cbe47cc3b..88fae0b0aab8 100644
--- a/sw/qa/core/doc/doc.cxx
+++ b/sw/qa/core/doc/doc.cxx
@@ -17,12 +17,14 @@
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
#include <editeng/langitem.hxx>
+#include <vcl/scheduler.hxx>
#include <wrtsh.hxx>
#include <fmtanchr.hxx>
#include <edtwin.hxx>
#include <view.hxx>
#include <ndtxt.hxx>
+#include <UndoManager.hxx>
static char const DATA_DIRECTORY[] = "/sw/qa/core/doc/data/";
@@ -126,6 +128,36 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testLocaleIndependentTemplate)
ErrorRegistry::Reset();
}
+CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testIMEGrouping)
+{
+// TODO figure out why the ext text input in this test code reaches the wrong window on
+// non-headless.
+#if !defined MACOSX && !defined _WIN32
+ // Given an empty document:
+ SwDoc* pDoc = createDoc();
+ // Make sure no idle is in action, so the ExtTextInput events go to SwEditWin.
+ Scheduler::ProcessEventsToIdle();
+
+ // When pressing two keys via IME:
+ SwDocShell* pDocShell = pDoc->GetDocShell();
+ SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin();
+ rEditWin.PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ rEditWin.PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+ rEditWin.PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ rEditWin.PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ // Then make sure that gets grouped together to a single undo action:
+ SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
+ SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode();
+ CPPUNIT_ASSERT_EQUAL(OUString("ab"), pTextNode->GetText());
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 2
+ // i.e. 2 subsequent IME events got their own undo actions.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), pDoc->GetUndoManager().GetUndoActionCount());
+#endif
+}
+
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/edit.cxx b/sw/qa/core/edit/edit.cxx
new file mode 100644
index 000000000000..abf5670f1762
--- /dev/null
+++ b/sw/qa/core/edit/edit.cxx
@@ -0,0 +1,56 @@
+/* -*- 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 <editeng/adjustitem.hxx>
+
+#include <docsh.hxx>
+#include <view.hxx>
+#include <wrtsh.hxx>
+
+char const DATA_DIRECTORY[] = "/sw/qa/core/edit/data/";
+
+namespace
+{
+/// Covers sw/source/core/edit/ fixes.
+class Test : public SwModelTestBase
+{
+public:
+ SwDoc* createDoc(const char* pName = nullptr);
+};
+}
+
+SwDoc* Test::createDoc(const char* pName)
+{
+ 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 = createDoc("redline-hidden.fodt");
+
+ // When formatting a paragraph by setting the para adjust to center, then make sure setting the
+ // new item set on the paragraph doesn't crash:
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SfxItemSet aSet(pView->GetPool(), svl::Items<RES_PARATR_ADJUST, RES_PARATR_ADJUST>{});
+ SvxAdjustItem aItem(SvxAdjust::Center, RES_PARATR_ADJUST);
+ aSet.Put(aItem);
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SetAttrSet(aSet, SetAttrMode::DEFAULT, nullptr, true);
+}
+
+CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/qa/core/layout/data/tdf122894-4.doc b/sw/qa/core/layout/data/tdf122894-4.doc
new file mode 100644
index 000000000000..4ebdb53de04f
--- /dev/null
+++ b/sw/qa/core/layout/data/tdf122894-4.doc
Binary files differ
diff --git a/sw/qa/core/layout/layout.cxx b/sw/qa/core/layout/layout.cxx
index b98360353dc5..d0120ce817f0 100644
--- a/sw/qa/core/layout/layout.cxx
+++ b/sw/qa/core/layout/layout.cxx
@@ -165,6 +165,11 @@ CPPUNIT_TEST_FIXTURE(SwCoreLayoutTest, testGutterMirrorMargin)
CPPUNIT_ASSERT_EQUAL(nGutterTwips, nOldRight - nNewRight);
}
+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 4e6d4fcdb14e..1407f131d966 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -12,6 +12,9 @@
#include <vcl/gdimtf.hxx>
#include <wrtsh.hxx>
+#include <fmtfsize.hxx>
+#include <IDocumentRedlineAccess.hxx>
+#include <rootfrm.hxx>
static char const DATA_DIRECTORY[] = "/sw/qa/core/text/data/";
@@ -78,6 +81,50 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testSemiTransparentText)
assertXPath(pXmlDoc, "//floattransparent");
}
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRedlineDelete)
+{
+ // Given a document with A4 paper size, some text, redlining on, but hidden:
+ loadURL("private:factory/swriter", nullptr);
+ SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pTextDoc);
+ SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc();
+ 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/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/forcepoint102.rtf b/sw/qa/extras/layout/data/forcepoint102.rtf
new file mode 100644
index 000000000000..da9d7a1ddcc9
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint102.rtf
@@ -0,0 +1,178 @@
+{\rtf1\ansh\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0 Times New Roman;}{\f1 Courier New;}{\f2 ARIAL;}}{colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\i\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon469 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs1024 \additive Default Paragraph Font;}{\*\cs5\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs32\lang1033\langfe1033\kerning32\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 1;}{\s2\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\i\f1\fs28\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 2;}{\s3\ql \li0\ri0\sb240\sa60\keepn\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \b\f1\fs26\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext0 heading 3;}{\*\cs1024 \additive Default Paragraph Font;}{\*\cs24 \additive \ul\cf2 \sbasedon10 Hyperlink;}}{\info{\title Converted by FileMerlin API}{\subject }{\author }{\vern8247}}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\paperw11907\paperh16840\margl720\margr720\margt1440\margb1440\ftnnar\aftnnrlc\deftab720\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984\dghshow1\dgvshow1\jexpand\viewkind1\viewscale135\viewzk2\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule \fet2\facingp\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\sectd\pgndec\titlepg\sftnnar\saftnnrlc\sbknone\cols1\headery720\footery960 \pard\plain \ql\sl280\widctlpar{\b\fs28\f2 }\par \pard\plain \ql\sl280\widctlpar{\b\fs28\f2 Personenblatt Josef W\'f6
+ginger (16525)}{\v\tc{\fs18\f2 {\*\bkmkstart 0}}{\fs18\f2 Personenblatt Josef W\'f6
+ginger (16525){\*\bkmkend 0}}}\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\intbl{\b\fs18\f2 }{\b\fs18\f2 Proband*}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josef}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (16525)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josef (16525) (vor . .1755-vor . .1832)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:W\'f6
+ginger (16525) (vor . .1755-vor . .1832)}}{\fs18\f2 }\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth9072 \cellx10512 \row}\pard\plain \qrXsl180\widctlpar\intbl{\fs18\f2 Vater*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 \~}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Mutter*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 \~}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Geburt*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 vor __.__.1755}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Sievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Sievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Heirat*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1776?}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Josef (16525) und Josefa Angermayer (16526) (\'ba
+\'ba
+ . .1776?)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Angermayer, Josefa (16526) und Josef W\'f6
+ginger (16525) (\'ba
+\'ba
+ . .1776?)}}{\fs18\f2 }{\b\fs22\f2 Josefa}{\fs18\f2 }{\b\fs22\f2 Angermayer}{\fs18\f2 (16526)}{\v\xe{\fs18\f2 Personen und Orte\:Angermayer\:Josefa (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:Angermayer (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 (* vermutlich . .1757, \'86
+ 20.1.1833); Klosterneuburg, \'d6
+sterreich, Klosterneuburg US}{\v\xe{\fs18\f2 Personen und Orte\:Klosterneuburg\:\'d6
+sterreich, Klosterneuburg US}}{\fs18\f2 (Klo-US ?).}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw8198\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Wohnsitz*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1777}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Josefa Angermayer (16526)}{\v\xe{\fs18\f2 Personen und Orte\:Angermayer\:Josefa (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:Angermayer (16526) (vermutlich . .1757-20.1.1833)}}{\fs18\f2 (* vermutlich . .1757, \'86
+ 20.1.1833); Nr. 17, Obersievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\rdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brfrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 5.1.1777}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josef}{\fs18\f2 }{\b\fs2354\f2 W\'f6
+ginger}{\fs18\f2 (39463)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josef (39463) (5.1.1777- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josef\:W\'f6
+ginger (39463) (5.1.1777- )}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 1}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 26.6.1778}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Mathias}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39480)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Mathias (39480) (26.6.1778- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Mathias\:W\'f6
+ginger (39480) (26.6.1778- )}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 2}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 11.1.1779}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Josefa Schreiber (16425)}{\v\xe{\fs18\f2 Personen und Orte\:Schreiber\:Josefa (16425) (11.1.1779-2.1.1820)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:Schreiber (16425) (11.1.1779-2.1.1820)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 3}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.5.1779}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Lazelsberger, Franz (39324) und Barbara NN (21048) (\'ba
+\'ba
+ 16.5.1779)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:NN, Barbara (21048) und Franz Lazelsberger (39324) (\'ba
+\'ba
+ 16.5.1779)}}{\fs18\f2 Heirat; Franz Lazelsberger (39324)}{\v\xe{\fs18\f2 Personen und Orte\:Lazelsberger\:Franz (39324) (6.3.1753- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Franz\:Lazelsberger (39324) (6.3.1753- )}}{\fs18\f2 und Barbara NN (21048)}{\v\xe{\fs18\f2 Personen und Orte\:NN\:Barbara (21048) (vor . .1750- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:NN (21048) (vor . .1750- )}}{\fs18\f2 ; Heiligenstadt, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Heiligenstadt\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 4}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 12.6.1780}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Maria Anna}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39503)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Maria Anna (39503) (12.6.1780-12.10.1824)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Maria Anna\:W\'f6
+ginger (39503) (12.6.1780-12.10.1824)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 5}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 9.3.1782}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Franz}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (16215)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Franz (16215) (9.3.1782-31.8.1860)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Franz\:W\'f6
+ginger (16215) (9.3.1782-31.8.1860)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 6}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 15.3.1784}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Josefa}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39562)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josefa (39562) (15.3.1784-4.10.1784)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:W\'f6
+ginger (39562) (15.3.1784-4.10.1784)}}{\fs18\f32 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 7}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.8.1785}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Leopold}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39592)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Leopold (39592) (16.8.1785-21.9.1790)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Leopold\:W\'f6
+ginger (39592) (16.8.1785-21.9.1790)}}{\fs18\f2 ; Nr. 17, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 8}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth255\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Wohnsitz*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 __.__.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Nr. 40, Obersievering, \'d6
+sterreich}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 6.2.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Severin (16724) und Theresia Fogowitsch (16725) (\'ba
+\'ba
+ 6.2.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Fogowitsch, Theresia (16725) und Severin W\'f6
+ginger (16724) (\'ba
+\'ba
+ 6.2.1787)}}{\fs18\f2 Heirat; Severin W\'f6
+ginger (16724)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Severin (16724) (20.4.1762-vor . .1838)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:W\'f6
+ginger (16724) (20.4.1762-vor . .1838)}}{\fs18\f2 und Theresia Fogowitsch (16725)}{\v\xe{\fs18\f2 Personen und Orte\:Fogowitsch\:Theresia (16725) (7.1.1765-18.8.1800)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Fogowitsch (16725) (7.1.1765-18.8.1800)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 9}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 16.4.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Steinzer, Mathias (20065) und Theresia Schwaiger (20068) (\'ba
+\'ba
+ 16.4.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Schwaiger, Theresia (20068) und Mathias Steinzer (20065) (\'ba
+\'ba
+ 16.4.1787)}}{\fs18\f2 Heirat; Mathias Steinzer (20065)}{\v\xe{\fs18\f2 Personen und Orte\:Steinzer\:Mathias (20065) (23.12.1763-7.2.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personan und Orte\:Mathias\:Steinzer (20065) (23.12.1763-7.2.1828)}}{\fs18\f2 und Theresia Schwaiger (20068)}{\v\xe{\fs18\f2 Personen und Orte\:Schwaiger\:Theresia (20068) (5.1.1763-28.1.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Schwaiger (20068) (5.1.1763-28.1.1828)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+stesreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 10}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 14.5.1787}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Kraninger, Severin (1459) und Magdalena Bitzl (20081) (\'ba
+\'ba
+ 14.5.1787)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Bitzl, Magdalena (20081) und Severin Kraninger (1459) (\'ba
+\'ba
+ 14.5.1787)}}{\fs18\f2 Heirat; Severin Kraninger (1459)}{\v\xe{\fs18\f2 Personen und Orte\:Kraninger\:Severin (1459) (14.4.1766-15.8.1816)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:Kraninger (1459) (14.4.1766-15.8.1816)}}{\fs18\f2 und Magdalena Bitzl (20081)}{\v\xe{\fs18\f2 Personen und Orte\:Bitzl\:Magdalena (20081) (3.2.1760-29.12.1825)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Magdalena\:Bitzl (20081) (3.2.1760-29.12.1825)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 11}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 20.12.1787}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Severin}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39635)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Severin (39635) (20.12.1787- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:W\'f6
+ginger (39635) (20.12.1787- )}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich$ Sievering}}{\fs18\f2 .}{\super\fs16\f2 12}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 7.3.1790}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39673)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (39673) (7.3.1790-29.10.1790)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (39673) (7.3.1790-29.10.1790)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 13}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfz3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Tochter:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 28.9.1791}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Barbara}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39694)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Barbara (39694) (28.9.1791-10.1.1798)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:W\'f6
+ginger (39694) (28.9.1791-10.1.1798)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 14}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 12.11.1792}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Faber, Michael (20991) und Josefa W\'f6
+ginger (16671) (\'ba
+\'ba
+ 12.11.1792)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Josefa (16671) und Michael Faber (20991) (\'ba
+\'ba
+ 12.11.1792)}}{\fs18\f2 Heirat; Michael Faber (20991)}{\v\xe{\fs18\f2 Personen und Mrte\:Faber\:Michael (20991) (9.1.1740-12.3.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Michael\:Faber (20991) (9.1.1740-12.3.1799)}}{\fs18\f2 und Josefa W\'f6
+ginger (16671)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Josefa (16671) (18.5.1760-1.11.1828)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Josefa\:W\'f6
+ginger (16671) (18.5.1760-1.11.1828)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 15}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 29.3.1794}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39749)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (39749) (29.3.1794-7.8.1794)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (39749) (29.3.1794-7.8.1794)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 16}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 23.11.1795}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:W\'f6
+ginger, Johann (15807) und Theresia Bachmayr (15806) (\'ba
+\'ba
+ 23.11.1795)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Bachmayr, Theresia (15806) und Johaon W\'f6
+ginger (15807) (\'ba
+\'ba
+ 23.11.1795)}}{\fs18\f2 Heirat; Johann W\'f6
+ginger (15807)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Johann (15807) (26.2.1769-4.2.1822)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:W\'f6
+ginger (15807) (26.2.1769-4.2.1822)}}{\fs18\f2 und Theresia Bachmayr (15806)}{\v\xe{\fs18\f2 Personen und Orte\:Bachmayr\:Theresia (15806) (12.2.1774-zwischen 1832 und 1837)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Bachmayr (15806) (12.2.1774-zwischen 1832 und 1837)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 17}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 23.1.1796}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Karl}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (41096)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Karl (41096) (23.1.1796-zwischen 1853 und 1855)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Karl\:W\'f6
+ginger (41096) (23.1.1796-zwischen 1853 und 1855)}}{\fs18\f2 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 *}{\super\fs16\f2 18}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 22.3.1796}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Barbara Schreiber (16702)}{\v\xe{\fs18\f2 Personen und Orte\:Schreiber\:Barbara (16702) (22.3.1796-nach . .1865)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:Schreiber (16702) (22.3.1796-nach . .1865)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 19}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cdllx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Sohn:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 19.8.1798}\cell\pard\plain \ql\sl220\widctlpar\intbl{\b\fs22\f2 }{\b\fs22\f2 Johann}{\fs18\f2 }{\b\fs22\f2 W\'f6
+ginger}{\fs18\f2 (39838)}{\v\xe{\fs18\f2 Personen und Orte\:W\'f6
+ginger\:Johann (39838) (19.8.1798-25.3.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:W\'f6
+ginger (39838) (19.8.1798-25.3.1799)}}{\fs18\f-2835269706644948777 ; Nr. 40, Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 20}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertmu\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 17.7.1799}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Lettner, Johann (20813) und Barbara Wonbacher (16688) (\'ba
+\'ba
+ 17.7.1799)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Wonbacher, Barbara (16688) und Johann Lettner (20813) (\'ba
+\'ba
+ 17.7.1799)}}{\fs18\f2 Heirat; Johann Lettner (20813)}{\v\xe{\fs18\f2 Personen und Orte\:Lettner\:Johann (20813) (24.12.1772-5.7.1847)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Johann\:Lettner (20813) (24.12.1772-5.7.1847)}}{\fs18\f2 und Barbara Wonbacher (16688)}{\v\xe{\fs18\f2 Personen und Orte\:Wonbacher\:Barbara (16688) (10.2.1767-18.7.1823)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Barbara\:Wonbacher (16688) (10.2.1767-18.7.1823)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 21}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf5 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 28.4.1800}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Schadelberger, Severin (16269) und Theresia Schuster (16637) (\'ba
+\'ba
+ 28.4.1800)}}{\fs18\f2 }{\v\xe{\fs18\f2 Heiraten\:Skhuster, Theresia (16637) und Severin Schadelberger (16269) (\'ba
+\'ba
+ 28.4.1800)}}{\fs18\f2 Heirat; Severin Schadelberger (16269)}{\v\xe{\fs18\f2 Personen und Orte\:Schadelberger\:Severin (16269) (vermutlich . .1748-vor . .1807)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Severin\:Schadelberger (16269) (vermutlich . .1748-vor . .1807)}}{\fs18\f2 und Theresia Schuster (16637)}{\v\xe{\fs18\f2 Personen und Orte\:Schuster\:Theresia (16637) (vermutlich . .1776-12.5.1827)}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Theresia\:Schuster (16637) (vermutlich . .1776-12.5.1827)}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}{\super\fs16\f2 22}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw!0\brdrcf15 \clbrdrr\brdrs\brdrw0\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 }{\fs18\f2 Zeuge:}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 25.6.1805}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 Taufe/Kleinkind-; Alois Wasinger (16613)}{\v\xe{\fs18\f2 Personen und Orte\:Wasinger\:Alois (16613) (25.6.1805- )}}{\fs18\f2 }{\v\xe{\fs18\f2 Personen und Orte\:Alois\:Wasinger (16613) (25.6.1805- )}}{\fs18\f2 ; Obersievering, \'d6
+sterreich, Sievering}{\v\xe{\fs18\f2 Personen und Orte\:Obersievering\:\'d6
+sterreich, Sievering}}{\fs18\f2 .}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 Tod*}\cell\pard\plain \qr\sl180\widctlpar\intbl{\fs18\f2 vor __.__.1832}\cell\pard\plain \ql\sl180\widctlpar\intbl{\fs18\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx1440 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw10\clpadr60\brdrcf15 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrs\brdrw10\clpadl60\brdrcf15 \clbrdrt\brdrs\brdrw10\brdrcf15 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw10\brdrcf15 \cltxlrtb\clftsWidth3\clwWidth6912 \cellx10512 \row}\pard\plain \ql\sl180\widctlpar\intbl{\b\fs18\f2 }{\b\fs18\f2 Referenz= (verstorben @ Jahren) Kinder=12}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrs\brdrw40\brdrcf1 \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \clcbpat15\cltxlrtb\clftsWidth3\clwWidth10512 \cellx10512 \row}\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell\pard\plain \ql\sl20\widctlpar\intbl{\fs2\f2 \~}\cell{\trowd\trqc\trpaddl60\trpaddfl3\trpaddt0\trpaddft3\trpaddr60\trpaddfr3\trpaddb0\trpaddfb3\clvertalt\clbrdrl\brdrs\brdrw40\clpadl60\brdrcf1 \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth360 \cellx360 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth360 \cellx720 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth720 \cellx1440 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth2160 \cellx3600 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth4032 \cellx7632 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrnone \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx9072 \clvertalt\clbrdrl\brdrnone \clbrdrt\brdrnone \clbrdrr\brdrs\brdrw40\clpadr60\brdrcf1 \clbrdrb\brdrs\brdrw40\brdrcf1 \cltxlrtb\clftsWidth3\clwWidth1440 \cellx10512 \row}\pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Gedruckt am: 27.5.2014 }\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Erstellt von:}\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 Helmut Leininger}\page \par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \qc\sl280\widctlpar{\b\fs28\f2 }\par \pard\plain \qc\sl280\widctlpar{\b\fs28\f2 Endnoten}{\v\tc{\fs18\f2 {\*\bkmkstart 1}}{\fs18\f2 Endnoten{\*\bkmkend 1}}}\fs18\par \pard\plain \qc\sl180\widctlpar\fs18\par \pard\plain \qc\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 1. Sievering Taufen BD. 3 (1777-1784) Seite 1, Sievering Taufen BD. 3 Seite 1, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 1.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 2. Sievering Taufen BD. 3 (1777-1784) Seite 10, Sievering Taufen BD. 3 Seite 10, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 10.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\pdain \ql\sl180\widctlpar{\fs18\f2 3. "Geburt Josefa Schreiber 1779", 11.1.1779, Pfarre Sievering, Taufreg. BD. III (1777 - 1784) S. 12-Jan 1779.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 4. "Trauung Franz Lasselsberger - Barbara St\'f6
+ssel 1779", 16.5.1779, Pfarre Sievering, Trauungsreg. BD. II (1765-1784) S. 53-Mai 1779.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 5. Sievering Taufen BD. 3 (1777-1784) Seite 19, Sievering Taufen BD. 3 Seite 19, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 19.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 6. Sievering Taufen BD. 3 (1777-1784) Seite 29, Sievering Taufen BD. 3 Seite 29, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 29.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 7. Sievering Taufen BD. 3 (1777-1784) Seite 44, Sievering Taufen BD. 3 Seite 44, (1777-1784), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 3 Seite 44.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pa2d\plain \ql\sl180\widctlpar{\fs18\f2 8. Sievering Taufen BD. 4 (1784-1795) Fol. 7, Sievering Taufen BD. 4 Fol. 7, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 7.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 9. "Trauung Severin W\'f6
+ginger - Tehresia Fogowitsch 1787", 6.2.1787, Pfarre Sievering, Trauungsreg. BD. III (1784-1798) Fol. 15-FEB 1787.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 10. "Trauung Mathias Steinzer - Theresia Schwaiger 1787", 16.4.1787, Pfarre Sievering, Trauungsreg BD. III (1784-1798) Fol. 17-Apr 1787.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 11. "Trauung Severin Graninger - Magdalena Bitzl 1787", 14.5.1787, Pfarre Sievering, Trauungsreg. BD. III (1784-1798) Fol. 18-Mai 1787.}\par \pard\plain \ql\sl180\widctltar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 12. Sievering Taufen BD. 4 (1784-1795) Fol. 17, Sievering Taufen BD. 4 Fol. 17, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 17.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 13. Sievering Taufen BD. 4 (1784-1795) Fol. 2%, Sievering Taufen BD. 4 Fol. 25, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 25.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 14. Sievering Taufen BD. 4 (1784-1795) Fol. 31, Sievering Taufen BD. 4 Fol. 31, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 31.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 15. "Trauung Michael Faber - Josefa W\'f6
+ginger 1792", 12.11.1792, Pfarre Sievering, Trauungsreg BD. III (1784-1798) Fol. 27-Nov 1792.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 16. Sievering Taufen BD. 4 (1784-1795) Fol. 41, Sievering Taufen BD. 4 Fol. 41, (1784-1795), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 4 Fol. 41.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 17. "Trauung Johann W\'f6
+ginger - Theresia Bachmayr 1795", 23.11.1795, Pfarre Sievering, Trauungsreg BD/ III (1784-1798) Fol. 36-Nov 1795.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 18. "Geburt Karl W\'f6
+ginger 1796", 23.1.1796, Pfarre Sievering, aufreg. BD. V (1796 - 1813) Fol. 1-Jan 1796.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 19. "Geburt Barbara Schreiber 1796", 22.3.1796, Pfarre Sievering, ufreg. BD. V (1796 - 1813) Fol. 1-Mrz 1796.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 20. Sievering Taufen BD. 5 (1796-1813) Fol. 13, Sievering Taufen BD. 5 Fol. 13, (1796-1813), Sievering - St. Severin, Fr\'f6
+schelgasse 20, Wien, \'d6
+sterreich. Hereinafter cited as Sievering Taufen BD. 5 Fol. 13.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 21. "Trauung Johann Lettner - Barbara Schreiber 1799", 17.7.1799, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) Fol. 5-Jul 1799.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar{\fs18\f2 22. "Trauung Severin Schadelberger - Theresia Schuster 1800", 28.4.1800, Pfarre Sievering, Trauungsreg. BD IV (1798-1829) Fol. 8-Apr 1800.}\par \pard\plain \ql\sl180\widctlpar\fs18\par \pard\plain \ql\sl180\widctlpar\fs18\par {\headerf\pgnstart1\pard\plain \ql\sl200\widctlpar\fs20\par {\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 10070188}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn dxHeightHR}{\sv 30}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 1}}{\sp{\sn fHorizRule}{\sv 1}}{\sp{\sn fLayoutInCell}{\sv 1}}}\picscalex864\picscaley6\piccropl0\piccropr0\piccropt0\piccropb0\picw1764\pich882\picwgoal1000\pichgoal500\wmetafile8\bliptag-1602651790\blipupi1752{\*\blipuid a07979727e802d02da96f878ba973054}010009000003b700000006001c00000000000400000003010800050000000b0200000000050000000c021a000807040000002e0118001c000000fb02ceff0000000000009001000000000440001254696d6573204e657720526f6d616e0000000000000000000000000000000000040000002d0100000400000002010100050000000902000000020d000000320a2c00000001000400000000000807190020631600030000001e0007000000fc020000aca899000000040000002d01010008000000fa02050000000000ffffff00040000002d0102000e00000024030500ffffffffffff1800080718000807ffffffffffff08000000fa0200000000000000000000040000002d01030007000000fc020000ffffff000000040000002d010400040000002701ffff1c000000fb021000070000000000bc02000000000102022253797374656d000000000000de60e7770806080298030802200408025ae78339040000002d0105000300000000000000}\pard\plain \ql\sl200\widctlpar\fs20}{\headerr\pgnstart1\pard\plain \ql\sl200\widctlpar\fs20\par {\pict{\*\picprop\shplid1025{\sp{\sn shapeType}{\sv 1}}{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fillColor}{\sv 10070188}}{\sp{\sn fFilled}{\sv 1}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn alignHR}{\sv 1}}{\sp{\sn dxHeightHR}{\sv 30}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fStandardHR}{\sv 1}}{\sp{\sn fHorizRule}{\sv 1}}{\sp{\sn fLayoutInCell}{\%n
diff --git a/sw/qa/extras/layout/data/forcepoint89.html b/sw/qa/extras/layout/data/forcepoint89.html
new file mode 100644
index 000000000000..7998a2b0b979
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint89.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint90.rtf b/sw/qa/extras/layout/data/forcepoint90.rtf
new file mode 100644
index 000000000000..82c26224292d
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint90.rtf
@@ -0,0 +1 @@
+{\rtf1\cnsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue98;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset180697947886554888358 Palatino Linotype;}{\f1\froman\cpg0\fcharset0 Palatino Linotype;}{\f2\froman\cpg1252\fcharset0 Palatino Linotype;}{\f3\fswiss\cpg1257\fcharset186 Arial Black;}{\f4\fswiss\cpg0\fcharset0 Arial Black;}{\f5\fswiss\cpg1252\fcharset0 Arial Black;}{\f6\fro-an\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\rtf1\cnsi \ansicpg1252\stshfloch0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green102\blue204;\red102\green99\blue98;\red143\green142\blue142;\red75\green60\blue52;}{\fonttbl{\f0\froman\cpg1257\fcharset180697947886554888358 Palatino Linotype;}{\f1\froman\cpg0\fcharset0 Palatino Linotype;}{\f2\froman\cpg1252\fcharset0 Palatino Linotype;}{\f3\fswiss\cpg1257\fcharset186 Arial Black;}{\f4\fswiss\cpg0\fcharset0 Arial Black;}{\f5\fswiss\cpg1252\fcharset0 Arial Black;}{\f6\fro-an\cpg1257\fcharset186 Times New Roman;}{\f7\froman\cpg0\fcharset0 Times New Roman;}{\f8\froman\cpg1252\fcharset0 Times New Roman;}{\f9\fmodern\cpg1257\fcharset186 Courier New;}{\f10\fmodern\cpg0\fcharset0 Courier New;}{\f11\fmodern\cpg1252\fcharset0 Courier New;}}{\stylesheet {\ql Normal;}{\s1\sbasedon0\ql\fi-120\sl-276\slmult0 Style1;}{\s2\sbasedon0\qj\fi560\sl-300\slmult0 Style2;}{\s3\sbasedon0\ql\sl-264\slmult0 Style3;}{\s4\sbasedon0\ql\fi-1088\sl-320\slmult0 Style4;}{\s5\sbasedon0\ql Style5;}{\s6\sbasedon0\ql Style6;}{\s7\sbasedon0\ql\sl-320\slmult0 Style7;}{\s8\sbasedon0\qr Style8;}{\s9\sbasedon0\ql Style9;}{\s10\sbasedon0\qj\sl-264\slmult0 Style10;}{\s11\sbasedon0\qj\sl-298\slmult0 Style11;}{\s12\sbasedon0\qj\sl-288\slmult0 Style12;}{\s13\sbasedon0\ql Style13;}{\s14\sbasedon0\ql\fi600\sl-329\slmult0 Style14;}{\s15\sbasedon0\ql\sl-240\slmult0 Style15;}{\s16\sbasedon0\ql Style16;}{\s17\sbasedon0\ql\fi576\sl-328\slmult0 Style17;}{\s18\sbasedon0\ql Style18;}{\s19\sbasedon0\ql\sl-271\slmult0 Style19;}{\s20\sbasedon0\ql\fi2406\sl-339\slmult0 Style20;}{\s21\sbasedon0\ql Style21;}{\s22\sbasedon0\ql\fi2821\sl-161\slmult0 Style22;}{\s23\sbasedon0\ql\fi568\sl-306\slmult0 Style23;}{\s24\sbasedon0\ql Style24;}{\s25\sbasedon0\ql Style25;}{\s26\sbasedon0\ql Style26;}{\s27\sbasedon0\ql Style27;}{\s28\sbasedon0\qj\sl-271\slmult0 Style28;}{\s29\sbasedon0\ql\fi568\sl-322\slmult0 Style29;}{\s30\sbasedon0\ql Style30;}{\s31\sbasedon0\ql Style31;}{\s32\sbasedon0\ql Style32;}{\s33\sbasedon0\ql Style33;}{\s34\sbasedon0\ql Style34;}{\s35\sbasedon0\ql Style35;}{\*\cs36\additive Default Paragraph Font;}{\*\cs37\sbasedon36\additive\b\charscalex120\f2\fs58 Font Style37;}{\*\cs38\sbasedon36\additive\b\charscalex30\f2\fs400 Font Style38;}{\*\cs39\sbasedon36\additive\i\f2\fs22 Font Style39;}{\*\cs40\sbasedon36\additive\scaps\f8\fs8 Font Style40;}{\*\cs41\sbasedon36\additive\i\b\f2\fs10 Font Style41;}{\*\cs42\sbasedon36\additive\f5\fs8 Font Style42;}{\*\cs43\sbasedon36\additive\b\expndtw200\f2\fs10 Font Style43;}{\*\cs44\sbasedon36\additive\f2\fs22 Font Style44;}{\*\cs45\sbasedon36\additive\b\expndtw-10\f2\fs22 Font Style45;}{\*\cs46\sbasedon36\additive\scaps\f2\fs20 Font Style46;}{\*\cs47\sbasedon36\additive\charscalex20\f2\fs104 Font Style47;}{\*\cs48\sbasedon36\additive\b\f2\fs20 Font Style48;}{\*\cs49\sbasedon36\additive\f2\fs22 Font Style49;}{\*\cs50\sbasedon36\additive\b\f2\fs38 Font Style50;}{\*\cs51\sbasedon36\additive\f2\fs20 Font Style170141183460469231731687303715884105678;}{\*\cs52\sbasedon36\additive\expndtw-20\f2\fs30 Font Style52;}{\*\cs53\sbasedon36\additive\i\expndtw-10\f2\fs22 Font Style53;}{\*\cs54\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style54;}{\*\cs55\sbasedon36\additive\f2\fs22 Font Style55;}{\*\cs56\sbasedon36\additive\f2\fs18 Font Style56;}{\*\cs57\sbasedon36\additive\b\expndtw10\f2\fs16 Font Style57;}{\*\cs58\sbasedon36\additive\b\f2\fs20 Font Style58;}{\*\cs59\sbasedon36\additive\i\b\expndtw-10\f11\fs22 Font Style59;}{\*\cs60\sbasedon36\additive\f2\fs20 Font Style60;}{\*\cs61\sbasedon36\additive\f2\fs12 Font Style61;}{\*\cs62\sbasedon36\additive\f2\fs18 Font Style62;}{\*\cs63\sbasedon36\additive\i\expndtw-20\f2\fs22 Font Style63;}{\*\cs64\sbasedon36\additive\b\expndtw-20\f2\fs26 Font Style64;}}\fet2{\*\ftnsep {\chftnsep\par }}{\*\aftnsep {\chftnsep\par }}\expshrtn\widowctrl\paperw20384\paperh12312\margl360\margr360\margt360\margb360 \sectd \sbknone\pgwsxn20384\pghsxn12312\marglsxn360\margrsxn360\margtsxn360\margbsxn360\titlepg\cols2\colno1\colw8632\colsr2104\colno2\colw8928 {\headerf }{\footerf }{\header \pard \plain \s11\ql\li720\fi0\ri9\sb0\sa0\tx2120 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx0\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li720\fi0\ri9{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }\pard\sl-4680\slmult0\sb0\keepn\pvpara\dropcapli7\dropcapt1{\b\i0\ul0\cf0\highlight0\charscalex30\f0\fs400{i}\par}\pard \plain \s1\ql\li880\fi-880\ri0\sb0\sa0\sl-272\slmult0 \cs37\i0\strike0\nosupersub\b\scaps0\charscalex120\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs58 Hfc \cs55\0\super\charscalex100\fs22 mddj8\nosupersub \super tUn\nosupersub \super tam\nosupersub \super dkrts\nosupersub identifikacijos proced\f0\cchs186 \'fb\f0\cchs186 ras, vadinasi \cs60\fs20 ivuiiy* toje \cs55\fs22 programoje \cs53\i\expndtw-10 asmenys \cs55\i0\expndtw0 turi mok\f0\cchs186 \'eb\f0\cchs186 ti naudotis identifikacijos \f0\cchs186 \'e1\f0\cchs186 ran-\cs60\fs20 *>*\f0\cchs186 \'ab\'f8\f0\cchs186 geb\f0\cchs186 \'eb\f0\cchs186 ti \cs55\fs22 analizuoti mokini\f0\cchs186 \'f8\f0\cchs186 veiklos produktus ir pati mokymosi proces\f0\cchs186 \'e0\f0\cchs186 , \cs60\f0\cchs186\fs20 \'95\f0\cchs186 tpaftistant \cs55\fs22 kriterijus, pagal kuriuos vaikas gali b\f0\cchs186 \'fb\f0\cchs186 ti priskirtas gabi\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 grupei. \cs60\fs20 Vargu, ar \cs55\fs22 bc specialaus \cs53\i\expndtw-10 pasirengimo \cs55\i0\expndtw0 gali dirbti mokytojas. Pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Clark modelyje numatyta, kad mokytojas turi b\f0\cchs186 \'fb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 vald\f0\cchs186 \'e6\f0\cchs186 s \f0\cchs186 \'e1\f0\cchs186 tampos klas\f0\cchs186 \'eb\f0\cchs186 je suma\f0\cchs186 \'fe\f0\cchs186 i\-nimo strategijas (autogenin\f0\cchs186 \'e6\f0\cchs186 treniruot\f0\cchs186 \'e6\f0\cchs186 , meditacij\f0\cchs186 \'e0\f0\cchs186 ), turi geb\f0\cchs186 \'eb\f0\cchs186 ti parinkti mo\-kymo med\f0\cchs186 \'fe\f0\cchs186 iag\f0\cchs186 \'e0\f0\cchs186 , pratimus ir u\f0\cchs186 \'fe\f0\cchs186 duotis, kurioms atlikti b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 naudojama abiej\f0\cchs186 \'f8 \f0\cchs186 smegen\f0\cchs186 \'f8\f0\cchs186 pusrutuli\f0\cchs186 \'f8\f0\cchs186 veikla, geb\f0\cchs186 \'eb\f0\cchs186 ti \f0\cchs186 \'e1\f0\cchs186 ugdymo turin\f0\cchs186 \'e1\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 traukti pratimus, kurie, panaudojant fizin\f0\cchs186 \'e1\f0\cchs186 k\f0\cchs186 \'fb\f0\cchs186 n\f0\cchs186 \'e0\f0\cchs186 , abstraktaus ir simbolinio lygmens \cs39\i informacij\f0\cchs186 \'e0\f0\cchs186 , \cs55\i0 trans\-formuoja \f0\cchs186 \'e1\f0\cchs186 konkretesn\f0\cchs186 \'e1\f0\cchs186 lygmen\f0\cchs186 \'e1\f0\cchs186 ir pan. Kai kurie autoriai, pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, Wil-liams, netgi nurodo mokymo strategijas, kurias \cs39\i naudoti savo \cs55\i0 darbe turi mok\f0\cchs186 \'eb\f0\cchs186 ti \cs60\fs20 mokytojas, \cs55\fs22 kiti savo darbo komand\f0\cchs186 \'e0\f0\cchs186 apmoko. Renzulli modelio realizavimo komand\f0\cchs186 \'e0\f0\cchs186 sudaro ne tik mokytojai, bet ir t\f0\cchs186 \'eb\f0\cchs186 vai, bendruomen\f0\cchs186 \'eb\f0\cchs186 s ekspertai, mo\-kyklos administracija ir kt. personalas. Modelio veikimo efektyvum\f0\cchs186 \'e0\f0\cchs186 vertina \cs53\i\expndtw-10 visi \cs39\expndtw0 jo \cs53\expndtw-10 dalyviai, pagal tokios analiz\f0\cchs186 \'eb\f0\cchs186 s \cs55\i0\expndtw0 rezultatus bei mokini\f0\cchs186 \'f8\f0\cchs186 pageidavimus ar pakitusius poreikius ugdymo programa modifikuojama.\par \pard \plain \s2\ql\li576\fi560\ri0\sb0\sa0\sl-296\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Atskirai reik\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 pamin\f0\cchs186 \'eb\f0\cchs186 ti Taylor model\f0\cchs186 \'e1\f0\cchs186 . Jis vadinamas ir muititalento, ir k\f0\cchs186 \'fb\f0\cchs186 rybinio bei kritinio m\f0\cchs186 \'e0\f0\cchs186 stymo modeliu. \cs39\i Laikoma, kad \cs55\i0 bent vienai (j\f0\cchs186 \'f8\f0\cchs186 nuro\-domos net devynios) gabumo sri\f0\cchs186 \'e8\f0\cchs186 iai yra gabus kiekvienas vaikas. Toks gabi\f0\cchs186 \'f8 \f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 ugdymo modelis tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti \cs39\expndtw0 priimtinas ir \cs55\i0\f0\cchs186 \'fe\f0\cchs186 mon\f0\cchs186 \'eb\f0\cchs186 ms, kurie mano, jog visi vaikai \cs60\fs20 turi \cs55\fs22 tam \cs53\i\expndtw-10 tikr\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 gabum\f0\cchs186 \'f8\f0\cchs186 , ir d\f0\cchs186 \'eb\f0\cchs186 l koki\f0\cchs186 \'f8\f0\cchs186 nors prie\f0\cchs186 \'fe\f0\cchs186 as\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 nenori pripa\-\cs60\f0\cchs186\fs20 \'fe\f0\cchs186 inti \cs55\fs22 gabum\f0\cchs186 \'f8\f0\cchs186 \cs53\i\expndtw-10 lygmens \cs55\i0\expndtw0 skirtum\f0\cchs186 \'f8\f0\cchs186 . Modelio autorius nurodo \f0\cchs186 \'f0\f0\cchs186 ias gabum\f0\cchs186 \'f8\f0\cchs186 sritis: akademin\f0\cchs186 \'eb\f0\cchs186 s srities, \cs53\i\expndtw-10 produktyviojo \cs55\i0\expndtw0 m\f0\cchs186 \'e0\f0\cchs186 stymo, komuniJcavimo, prognozavimo, \cs53\i\expndtw-10 sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo, plan\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimo, \cs55\i0\expndtw0\f0\cchs186 \'fe\f0\cchs186 mogi\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , galimybi\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\'fe\f0\cchs186 vel\-gimo \cs39\i\expndtw-20 (ir.\expndtw0 2.2.1 \cs53\expndtw-10 lentel\f0\cchs186 \'e6\f0\cchs186 ).\par \pard \plain \s11\qj\li6976\fi0\ri0{\sl-240\slmult0\fs20\par }\sb72\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 \cs55 lentel\f0\cchs186 \'eb\par \pard \plain \s8\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx6464\posnegy688\absw0\absh-256\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 U\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai\par \pard \plain \s4\qc\li2112\fi0\ri2232\sb0\sa0\sl-320\slmult0 \cs53\b0\strike0\nosupersubLi\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\s22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs44\i0\expndtw0 ugdymas pagal Taylor \cs55 model\f0\cchs186 \'e1 \f0\cchs186 (pagal TayJor, 1986)\par \pard \plain \s9\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx2648\posnegy368\absw0\absh-328\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \cs55\i0\expndtw0 susikurti \cs39\i atitinka- \{\f0\cchs186 \'84\f0\cchs186 Surinkite informacij\f0\cchs186 \'e0\f0\cchs186 apie... ii\par \pard \plain \s6\qj\li304\fi0\ri0\sb16\sa0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 I \cs53\expndtw-10 Gabum\f0\cchs186 \'f8\f0\cchs186 sritis Paai\f0\cchs186 \'f0\f0\cchs186 kinimas\par \pard \plain \s10\qj\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \pvpara\phcol\posnegx6032\posnegy328\absw2600\absh-544\dfrmtxtx40\dfrmtxty0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 j mos temos \f0\cchs186 \'fe\f0\cchs186 ini\f0\cchs186 \'f8\f0\cchs186 ir \f0\cchs186 \'e1\f0\cchs186 g\f0\cchs186 \'fb\f0\cchs186 d\f0\cchs186 \'fe\f0\cchs186 i\f0\cchs187 \'f8 \cs55\i0\expndtw0\f0\cchs186 'baz\f0\cchs186 \'e6\f0\cchs186 .\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \pvpara\phcol\posnegx5672\posnegy384\absw2960\absh-584\dfrmtxtx40\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 f Geb\f0\cchs186 \'eb\f0\cchs186 jimas generuoti \cs60\fs20 ne-\line \cs55\fs22 f \f0\cchs186 \'e1\f0\cchs186 prastas, originalias i\f0\cchs186 \'eb\f0\cchs186 /as,\line \cs60\fs20 f\cs53\i\expndtw-10\fs22 pasteb\f0\cchs186 \'eb\'fb\f0\cchs186 naujus \cs55\i0\expndtw0 s\f0\cchs-23 \'e30153860653936719740\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius,\line \cs53\i\expndtw-10\f0\cchs186 \'c1\f0\cchs186 pa\f0\cchs186 \'e1\f0\cchs186 vairioa id\f0\cchs186 \'eb\f0\cchs186 jas,\expndtw0 {\charscalex100\expndtw0\tab }\par \pard \plain \s6\qj\li232\fi0\ri0\sb0\sa0 \cs53\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-10\dn0\f0\cchs186\lang1063\langfe1063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'Akademin\f0\cchs186 \'eb\par \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \pvpara\phcol\posnegx5264\posnegy160\absw3368\absh-648\dfrmtxtx40\dfrmtxty0 \cs39\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 (K\f0\cchs186 \'fb\f0\cchs186 rybos, produktyvioio\par \pard \plain \s13\qj\li5816\fi0\ri0\sb88\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 2.2.1 icntcU\par \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabum\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 sritis\par \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-240\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Sprendim\f0\cchs186 \'f8 \f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimo\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0\tlul\tx2736 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Paai\f0\cchs186 \'f0\f0\cchs186 kinimas {\charscalex100\expndtw0\tab }Ll\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas rasti alternatyvas, \cs55\fs22 l.,\par \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 jas \f0\cchs186 \'e1\f0\cchs186 vertinti ir priimti tinka- \cs55\fs22 t \cs60\fs20 r m\f0\cchs186 \'e0\f0\cchs186 problemos sprendim\f0\cchs186 \'e0\f0\cchs186 . 1 \cs41\b\i\f0\cchs186\fs10 \'e1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs5u\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 J\f0\cchs186 \'fe\f0\cchs186 duo\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 pavyzd\f0\cchs186 \'fe\f0\cchs186 iai Nurodykite \cs60\fs20 savo \cs55\fs22 m\f0\cchs186 \'eb\f0\cchs186 giamiausi\f0\cchs186 \'e0\f0\cchs186 \cs60\fs20 I\par \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 a\f0\cchs186 \'f0\f0\cchs186 y toj\f0\cchs186 \'e0\f0\cchs186 , ai\f0\cchs186 \'f0\f0\cchs186 kiai pagr\f0\cchs186 \'e1\f0\cchs186 sdami at- t \cs60\fs20 rumentais \cs55\fs22 savo pasirinkim\f0\cchs186 \'e0\f0\cchs186 it\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 itmetim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Planavimo\cell \pard \plain \s15\ql\li16\fi-16\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti kelius ir b\f0\cchs186 \'fb\f0\cchs186 dus id\f0\cchs186 \'eb\f0\cchs186 jai \f0\cchs186 \'e1\f0\cchs186 gyvendinti, nustatant, koki\f0\cchs186 \'f8\f0\cchs186 reikia resur- \cs55\fs22 1 \cs60\fs20 s\f0\cchs186 \'f8\f0\cchs186 , \f0\cchs186 \'e1\'fe\f0\cchs186 velgiant, kokios gali\-mos problemos, ir numatant \f0\cchs186 \'fe\f0\cchs186 ingsnius j\f0\cchs186 \'f8\f0\cchs186 sprendimui, to\-kiu b\f0\cchs186 \'fb\f0\cchs186 du patobulinant plan\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 .I\f0\cchs186 \'f0\f0\cchs186 studijav\f0\cchs186 \'e6\f0\cchs186 \cs55\fs22 mitus apie \f0\cchs186 \'f0\f0\cchs186 ik\f0\cchs186 \'f0\f0\cchs186 nos\-\cs60\fs20 parnius, \cs55\fs22 sukurkite tyrimo plan\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 savo draug\f0\cchs186 \'f8\f0\cchs186 \cs55\fs22 nuomonei \cs60\fs20 apie \f0\cchs186 \'f0\f0\cchs186 iuos gyv\f0\cchs186 \'fb\f0\cchs186 nus i\f0\cchs186 \'f0\f0\cchs186 tirti\super 41\nosupersub , \f0\cchs186 \'84\f0\cchs186 Sukurkite akcijos prie\f0\cchs186 \'f0\f0\cchs186 \cs55\fs22 r\f0\cchs186 \'fb\f0\cchs186 kym\f0\cchs186 \'e0\f0\cchs186 \cs62\fs18 1 \cs60\fs20 plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Prognozavimo\cell \pard \plain \s15\ql\li0\fi8\ri0\sb0\sa0\sl-248\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas numatyti ir pati\-krinti prie\f0\cchs186 \'fe\f0\cchs186 asties ir pasekm\f0\cchs186 \'eb\f0\cchs186 s s\f0\cchs186 \'e0\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 ius.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 studijuokite N sutart\f0\cchs186 \'e1\f0\cchs186 ir nurodykite \f0\cchs186 \'e1\f0\cchs186 vairias galimas jos i ratifikavimo pasekmes".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Komunikavimo\cell \pard \plain \s15\ql\li0\fi16\ri0\sb0\sa0\sl-256\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas reik\f0\cchs186 \'f0\f0\cchs186 ti savo id\f0\cchs186 \'eb\f0\cchs186 jas, jausmus, poreikius ir suprasti kitus, vartojant verbalin\f0\cchs186 \'e6\f0\cchs186 ir neverbalin\f0\cchs186 \'e6\f0\cchs186 kalb\f0\cchs186 \'e0\f0\cchs186 .\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Pademonstruokite savo jaus- \cs55\fs22 1 \cs60\fs20 mus, kai su\f0\cchs186 \'fe\f0\cchs186 inote apie ... \f0\cchs186 \'84\f0\cchs186 Papasakokite apie \f0\cchs186 \'e1\f0\cchs186 vyk\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 vaiko i ir i\f0\cchs186 \'f0\f0\cchs186 suaugusiojo pozicini". i\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Plan\f0\cchs186 \'f8\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'e1\f0\cchs186 gyvendinimo\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas \f0\cchs186 \'e1\f0\cchs186 gyvendinti plan\f0\cchs186 \'e0\cell \pard \plain \s16\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs43\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw200\dn0\f0\cchs186\lang1063\langfe1063\fs10 \'97\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \f1\cchs186 \u9632\'3f\f0\cchs186 - \f0\cchs186 \'97\'97\f0\cchs186  \expndtw0 *-\expndtw200 \expndtw0 L-\expndtw200 \expndtw0 -\expndtw200 \cs42\b0\expndtw0\f3\cchs186\fs8 i \f4\cchs186 \u9632\'3f\f3\cchs186 \f4\cchs186 \u9632\'3f\f3\cchs186 \cs41\b\i\f0\cchs186\fs10 a \cs40\b0\i0\scaps\f6\cchs186\fs8 - ii \f7\cchs186 \u9632\'3f\f6\cchs186 \cs62\scaps0\f0\cchs186\fs18 1\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-264\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 Sukurkite ir \f0\cchs186 \'e1\f0\cchs186 gyvendinkite N 1 renginio plan\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1848 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx4792 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8376 \pard \plain \s15\ql\li32\fi-32\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Galimybi\f0\cchs186 \'f8 \'e1\'fe\f0\cchs186 velgimo\cell \pard \plain \s15\ql\li0\fi40\ri0\sb0\sa0\sl-272\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Geb\f0\cchs186 \'eb\f0\cchs186 jimas identifikuoti gali\-myb\f0\cchs186 \'e6\f0\cchs186 ir ja pasinaudoti.\cell \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\sl-272\slmult0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'84\f0\cchs186 I\f0\cchs186 \'f0\f0\cchs186 tirkite ispan\f0\cchs186 \'f8\f0\cchs186 kalbos mokymo(si) poreik\f0\cchs186 \'e1\f0\cchs186 mokykloje ir inicijuokite atitinkamos pro\-gramos \f0\cchs186 \'e1\f0\cchs186 gyvendinim\f0\cchs186 \'e0\f0\cchs186 ".\cell \pard\intbl\row \pard\pard \plain \s14\ql\li0\fi600\ri0\sb232\sa0\sl-328\slmult0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Taylor siekia ugdyti kuo daugiau gabum\f0\cchs186 \'f8\f0\cchs186 , kuriais, jo manymu, pasi\f0\cchs186 \'fe\f0\cchs186 ymi vaikai. Tad kuo \f0\cchs186 \'e1\f0\cchs186 vairesniems vaik\f0\cchs186 \'f8\f0\cchs186 gabumams mokytojas skirs d\f0\cchs186 \'eb\f0\cchs186 mes\f0\cchs186 \'e1\f0\cchs186 , tuo daugiau galimybi\f0\cchs186 \'f8\f0\cchs186 , kad vaikas ras srit\f0\cchs186 \'e1\f0\cchs186 , kurios \f0\cchs186 \'fe\f0\cchs186 inovu jis gali tapti. Ta\f0\cchs186 \'e8\f0\cchs186 iau pir\-masis \f0\cchs186 \'f0\f0\cchs186 io modelio etapas - tai vis d\f0\cchs186 \'eb\f0\cchs186 lto akademini\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdymas. Kitas \f0\cchs186 \'fe\f0\cchs186 ingsnis, skirtas mokytojui apsispr\f0\cchs186 \'e6\f0\cchs186 sti, kuri\f0\cchs186 \'e0\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 likusi\f0\cchs186 \'f8\f0\cchs186 a\f0\cchs186 \'f0\f0\cchs186 tuoni\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 sri\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8 \f0\cchs186 jis imasi ugdyti. Paprastai seka, anot autoriaus, tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti tokia: produktyvusis m\f0^cchs186 \'e0\f0\cchs186 stymas, planavimas, sprendim\f0\cchs186 \'f8\f0\cchs186 pri\f0\cchs186 \'eb\f0\cchs186 mimas, pian\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 gyvendinimas, \f0\cchs186 \'e1\'fe\f0\cchs186 valgos. Akivaizdu, jog dirbti pagal \f0\cchs186 \'f0\'e1\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 mokytojas tur\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 b\f0\cchs186 \'fb\f0\cchs186 ti specialiai pasi\-reng\f0\cchs186 \'e6\f0\cchs186 s, tad modelio autorius si\f0\cchs186 \'fb\f0\cchs186 lo kelet\f0\cchs186 \'e0\f0\cchs186 mokytojo darbo metod\f0\cchs186 \'f8\f0\cchs186 . Pirmuouiu atveju si\f0\cchs186 \'fb\f0\cchs186 loma papildom\f0\cchs186 \'f8\f0\cchs186 gabum\f0\cchs186 \'f8\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 organizuoti baigiantis pamokoms. \f0\cchs186 \'c1\f0\cchs186 prastinis mokymo turinys \f0\cchs186 \'84\f0\cchs186 suspaud\f0\cchs186 \'fe\f0\cchs186 iamas" laike, o atsiradusias 5\f0\cchs186 \'97\f0\cchs186 10 laisvuj minu\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 mokytojas gali i\f0\cchs186 \'f0\f0\cchs186 naudoti pasirinkto gabumo ugdymui. Kai \cs48\b\fs20 mokytojui \cs44\b0\fs22 atrodo, kad jau pasiekta tam tikra pa\f0\cchs186 \'fe\f0\cchs186 anga ugdant pirm\f0\cchs186 \'e0\f0\cchs186 j\f0\cchs186 \'e1\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 o pasirinkt\f0\cchs186 \'f8\f0\cchs186 ga\-\par \sect\soctd \sbkpage\pgwsxn20855\pghsxn13316\marglsxn1080\margrsxn8026\margtsxn360\margbsxn360\cols2\colno1\colw7936\colsr2482\colno2\colw1329 {\header \pard \plain \s11\ql\li0\fi0\ri-7657\sb0\sa0\tx2245 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \'e1\f0\cchs186 Ma\ul b\f0\cchs186 \'fb\f0\cchs186 s vaikai:\ul0 {\charscalex100\expndtw0\tab }\ul ir galimyb\f0\cchs186 \'eb\f0\cchs186 s\par }{\footer \par \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \pvpara\phcol\posnegx-720\posnegy0\absw0\absh-254\nowrap\dfrmtxtx34\dfrmtxty0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 100}}\par \pard \plain \s21\qr\li0\fi0\ri-7657{\sl-240\slmult0\fs20\par }\sb90\sa0 \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 101\par }{\shp {\*\shpinst \chpleft13358\shptop593\shpright14748\shpbottom830\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz1\shplid1{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 317500}}{\sp{\sn dyWrapDistBottom}{\sv 198755}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s31\qj\li0\fi0\ri0\sb0\sa0 \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Rai\f0\cchs186 \'f0\f0\cchs186 kos \cs51\b0 b\f0\cchs186 \'fb\f0\cchs186 dai\par }}}{\shp {\*\shpinst \shpleft11859\shptop534\shpright13172\shpbottom2169\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz0\shplid0{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 279400}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-254\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas\par \pard \plain \s13\ql\li0\fi0\ri0\sb17\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Ugdytojo ir ugdytini\f0\cchs186 \'f8 \f0\cchs186 s\f0\cchs186 \'e0\f0\cchs186 veika, ko\-munikacija\par }}}{\shp {\*\shpinst \shp|eft13350\shptop1144\shpright17594\shpbottom2296\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz2\shplid2{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 139700}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPint}{\sv 1}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0\sl-271\slmult0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Informacijos srautai \f0\cchs186 \'97\f0\cchs186 \cs48\b Asmenvb\f0\cchs186 \'eb\f0\cchs186 s tobuli* tiesioginiai ir \cs60\b0 gr\f0\cchs186 \'e1\'fe\f0\cchs186 tamieji, ir s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs48\b tobulintai pedagogin\f0\cchs186 \'eb\f0\cchs186 \cs60\b0 sistema sudarymas: \cs48\b\f0\cchs186 \'fb\f0\cchs186 ssionj\par \pard \plain \s33\ql\li2499\fi0\ri0\sb93\sa0 \cs51\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 - b. \cs60 y\super 1\nosupersub "\super 0\nosupersub \cs51 HBB\par }}}{\shp {\*\shpinst \shpleft13299\shptop2228\shpright14205\shpbottom2474\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz4\shplid4{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Saviugda\par }}}{\shp {\*\shpinst \shpleft15874\shptop2279\shpright17187\shpbottom2524\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz5\shplid5{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s12\qj\li0\fi0\ri0\sb0\sa0 \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tobulinimasis\par }}}{\shp {\*\shpinst \shpleft11867\shptop2152\shpright13078\shpbottom2812\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz3\shplid3{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 640080}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Individo as\-menyb\f0\cchs186 \'eb\par }}}{\shpgrp{\*\shpinst \shpleft-720\shptop3939\shpright7878\shpbottom12384\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz6\shplid6{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1067}}{\sp{\sn groupTop}{\sv 6209}}{\sp{\sn groupRight}{\sv 9665}}{\sp{\sn groupBottom}{\sv 14654}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1067}}{\sp{\sn relTop}{\sv 6429}}{\sp{\sn relRight}{\sv 9665}}{\sp{\sn relBottom}{\sv 14654}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li474\fi0\ri0\sb0\sa0\sl-271\slmult0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \cs48\b\fs20 Ugdymo \cs49\b0\fs22 res \cs46\scaps\fs20 f\cs48\b\scaps0 lyb\f0\cchs186 \'eb\f0\cchs186 s lygmu\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i- \cs49\b0\fs22 Strukt\f0\cchs186 \'fb\f0\cchs186 rini \cs48\b\fs20 o elementas\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 s Rai\f0\cchs186 \'f0\f0\cchs186 kos b\f0\cchs186 \'fb\f0\cchs186 dai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Funkcijos\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li440\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 j \cs48\b\fs20 Valstybinis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Valstyb\f0\cchs186 \'eb\f0\cchs186 s politika\cell \pard \plain \s19\ql\li0\fi8\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 \'d0\f0\cchs186 vietimo politika ir j\f0\cchs186 \'e0 \f0\cchs186 atspindintys \f0\cchs186 \'e1\f0\cchs186 statymai\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teisinis reguliavimas, u\f0\cchs186 \'fe\f0\cchs186 tikrinantis kiekvie\-nam vaikui (vadinasi, ir gabiam) teis\f0\cchs186 \'e6\f0\cchs186 gauti jo poreikius ir galimybes atitinkant\f0\cchs186 \'e1\f0\cchs186 ugdym\f0\cchs186 \'e0\f0\cchs186 ir ug\-dymosi s\f0\cchs186 \'e0\f0\cchs186 lygas\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li390\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langde1063\fs20 Visuomeninis\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-280\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Visuomen\f0\cchs186 \'eb\f0\cchs186 s institutai\cell \pard \plain \s19\ql\li0\fi68\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Vyriausybines insti\-tucijos/ visuomenini\f0\cchs186 \'f8 \f0\cchs186 organizacij\f0\cchs186 \'f8\f0\cchs186 /paramos fond\f0\cchs186 \'f8\f0\cchs186 /auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 moky\-kl\f0\cchs186 \'f8\f0\cchs186 /mokslo institucij\f0\cchs186 \'f8 \cs39\b0\i\f0\cchs186\fs22 tikslin\f0\cchs186 \'eb\f0\cchs186 \cs48\i0\b\fs20 veikla\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Veiklos inicijavimas; koordinavimas, organi\-zavimas, informacijos kaupimas, analiz\f0\cchs186 \'eb\f0\cchs186 ir sklai\-da; gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 paie\f0\cchs186 \'f0\f0\cchs186 kos programos, identifikavi\-mas, globa; mokytoj\f0\cchs186 \'f8\f0\cchs186 ir kit\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'f0\f0\cchs186 vietimo darbuotoj\f0\cchs186 \'f8 \f0\cchs186 rengi mas;ugdymo t\f0\cchs186 \'e6\f0\cchs186 sti\-numo u\f0\cchs186 \'fe\f0\cchs186 tikrinimas; kt.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx1889 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx3354 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx5836 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8597 \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 1 Institucinis\par \pard \plain \s25\ql\li0\fi0\ri0\sb0\sa0\sl-983\slmult0 \intbl \cs47\b0\i0\strike0\nosupersub\scaps0\charscalex20\expndtw0\dn19\f0\cchs186\lang1063\langfe1063\fs104 1\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo nstituci\f0\cchs186 \'e1\f0\cchs186 os\par \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 i \cs49\b0\fs22 1 \cs48\b\fs20 i\par \pard \plain \s26\ql\li0\fi0\ri0\sb0\sa0\sl-381\slmult0 \intbl \cs50\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn5\f0\cchs186\lang1063\langfe1063\fs38 !\cell \pard \plain \s19\ql\li25\fi-25\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo modelis institucijos lygmeniu \f0\cchs186 \'97\f0\cchs186 mokyklos, papildomojo ugdymo mokyklos, technin\f0\cchs186 \'eb\f0\cchs186 s \{\f0\cchs186 \'fb\f0\cchs186 rybos namai, klas\f0\cchs186 \'eb\f0\cchs186 s, tovyklos, kursai, kon\-kursai ir kt.\cell \pard \plain \s19\ql\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \intbl \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw-5420746430195647047\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo proceso opti\-mizavimas: optimalios ugdymo(si) aplinkos sudarymas, ugdymas, mo\-kymas, veiklos rezultat\f0\cchs186 \'f8 \f0\cchs186 vertinimas, mokymo dife\-rencijavimas ir kt.\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 3371}}{\sp{\sn relTop}{\sv 6209}}{\sp{\sn relRight}{\sv 7988}}{\sp{\sn relBotto}}{\sv 6497}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s18\qj\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Gabi\f0\cchs186 \'f8\f0\cchs186 \cs49 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 modelis\par }}}}}\pard \plain \s14\qr\li0\fi0\ri0\sb0\sa0\sl-305\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 m\f0\cchs186 \'e0\f0\cchs186 gali apib\f0\cchs186 \'fb\f0\cchs186 dinti asmenyb\f0\cchs186 \'eb\f0\cchs186 s saviugda, iritrapersonaliniame lygmenyje \f0\cchs186 \'e1\f0\cchs186 gyjanti gryn\f0\cchs186 \'e0\f0\cchs186 rai\f0\cchs186 \'f0\f0\cchs186 k\f0\cchs186 \'e0\f0\cchs186 . \cs45\b\expndtw-10 II \cs55\b0\expndtw0 esm\f0\cchs186 \'eb\f0\cchs186 s \cs53\i\expndtw-10 vis\f0\cchs186 \'f8\f0\cchs186 \cs55\i0\expndtw0 anks\f0\cchs186 \'e8\f0\cchs186 iau min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavi\-mo tikslas \cs49 I \cs55 prigimtini\f0\cchs186 \'f8\f0\cchs186 asmens gali\f0\cchs186 \'f8\f0\cchs186 pl\f0\cchs186 \'eb\f0\cchs186 tra ir i\f0\cchs186 \'f0\f0\cchs186 vystymas jo paties j\f0\cchs186 \'eb\f0\cchsq86 gomis iki maksimalaus tam asmeniui galimo lygio. Literat\f0\cchs186 \'fb\f0\cchs186 roje (Gross, 1995; Almonaitien\f0\cchs186 \'eb\f0\cchs186 , 1997; Heller, 1999; Gagne, 2004 ir kt.) nurodoma, kad gabaus vaiko savirealizaci\-jai turi (takos jo asmenyb\f0\cchs186 \'eb\f0\cchs186 s nekognityvin\f0\cchs186 \'eb\f0\cchs186 s savyb\f0\cchs186 \'eb\f0\cchs186 s - pasiekim\f0\cchs186 \'f8\f0\cchs186 motyvacija, tei\-giamas \cs45\b\expndtw-10 sav\f0\cchs186 \'e6\f0\cchs186 s \cs55\b0\expndtw0 vertinimas, darbingumas, savikontrol\f0\cchs186 \'eb\f0\cchs186 ir kt. Yra pagrindo manyti, kad tinkamas min\f0\cchs186 \'eb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 GAVUS modelio strukt\f0\cchs186 \'fb\f0\cchs186 rini\f0\cchs186 \'f8\f0\cchs186 element\f0\cchs186 \'f8\f0\cchs186 funkcionavimas palankiai veikia gabaus vaiko asmenyb\f0\cchs186 \'e6\f0\cchs186 , taigi skatina \cs45\b\expndtw-10 j\f0\cchs186 \'e1\f0\cchs186 \cs55\b0\expndtw0 tobul\f0\cchs186 \'eb\f0\cchs186 ti.\par \pard \plain \s2\qj\li0\fi584\ri0\sb8\sa0\sl-271\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Apibendrinant tai, kas pasakyta, galima pateikti tok\f0\cchs186 \'e1\f0\cchs186 teorin\f0\cchs186 \'e1\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8 \f0\cchs186 ugdymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 model\f0\cchs186 \'e1\f0\cchs186 :\par \pard \plain \s11\qr\li0\fi0\ri0{\sl-240\slmult0\fs20\par }\sb99\sa0 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 3.1 \cs55 lentel\f0\cchs186 \'eb\par \column \pard \plain \s28\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }\sb200\sa0\sl-271\slmult0 \cs48\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Ugdymo rea-\ul lyb\f0\cchs186 \'eb\f0\cchs186 s lygmuo\par \pard \plain \s11\qj\li0\fi0\ri0\sb42\sa0\sl-246\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Interpersona-linis\khftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliamveikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 moeelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \f0\cchs186 \'fe\f0\cchs186 mogui jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs186 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sud\f0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito veikimui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\pAv \pard \plain \s11\qj\li0\fi0\ri0{\sl-240\slmult0\fs20\par }{\sl-240\slmult0\fs20\par }\sb121\sa0\sl-263\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Intrapersona-linis\chftn{\footnote\pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 \chftn Pastaba. Interpersonalinio ir intrapersonalinio \cs48\b\fs20 lygmens \cs55\b0\fs22 elemcr\cs48\b\f0\cchs186\fs20 \'a3\f0\cchs186 E\cs52\b0\expndtw-20\fs30 ^^PK\cs48\b\expndtw0\fs20 ^niaj\par \pard \plain \s13 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 modelio elementai, kuri\f0\cchs186 \'f8\f0\cchs186 optimaliam veikimui \cs49 ir skirtas ug\strike dy\strike0 m\strike o\strike0 \cs55 s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 \cs60\fs20 mo\-\cs55\fs22 delis\par \pard \plain \s23 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Sukurtasis \expndtw0 GAVUS\expndtw-20 modelis turi savo strukt\f0\cchs186 \'fb\f0\cchs186 r\f0\cchs186 \'e0\f0\cchs186 , funkcijas \cs53\expndtw-10 ir \cs63\expndtw0 funkcionavimo\expndtw-20 \expndtw0 aptin-\cs53\expndtw-10 k\f0\cchs186 \'e0\f0\cchs186 . \cs63\expndtw-20 Modelis turi \expndtw0 paskirti\expndtw-20 bendr\f0\cchs186 \'e0\f0\cchs186 tiksl\f0\cchs186 \'e0\f0\cchs186 \f0\cchs186 \'97\f0\cchs186 \cs49\i0\expndtw0 sudaryti s\f0\cchs186 \'e0\f0\cchs186 lygas gabiems valkams, nepriklausomai nuo j\f0\cchs186 \'f8\f0\cchs186 socialin\f0\cchs186 \'eb\f0\cchs186 s pad\f0\cchs186 \'eb\f0\cchs186 ties, gyvenamosios vietos, am\-\f0\cchs186 \'fe\f0\cchs186 iaus, lyties ir kt., rinktis j\f0\cchs186 \'f8\f0\cchs186 poreikius atitinkanti ugdym\f0\cchs186 \'e0\f0\cchs186 ir galimybes saviugdai, pad\f0\cchs186 \'eb\f0\cchs186 ti jam ir skatinti vaik\f0\cchs186 \'e0\f0\cchs186 siekti pilno savojo gabum\f0\cchs186 \'f8\f0\cchs186 po\-tencialo realizavimo ir b\f0\cchs186 \'fb\f0\cchs186 ti naudingam visuomenei, Sis tikslas suteikia modeliui vienov\f0\cchs186 \'eb\f0\cchs186 s, vientisumo.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Kiekvienas strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas turi ir papildom\f0\cchs186 \'f8\f0\cchs186 (i\f0\cchs186 \'f0\f0\cchs186 vestini\f0\cchs186 \'f8\f0\cchs186 i\f0\cchs186 \'f0\f0\cchs186 ben\-drojo) tiksl\f0\cchs186 \'f8\f0\cchs186 , kurie susij\f0\cchs186 \'e6\f0\cchs186 su funkcijomis, kurias atlieka strukt\f0\cchs186 \'fb\f0\cchs186 rinis elementas. Modelis skirtas \v0\cchs186 \'fe\f0\cchs186 mogui, jame vyksta informacijos perdavimo ir valdymo pro\-cesai \f0\cchs064 \'97\f0\cchs186 tai b\f0\cchs186 \'fb\f0\cchs186 dinga visuomenin\f0\cchs186 \'eb\f0\cchs186 ms sistemoms.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis sudarytas i\f0\cchs186 \'f0\f0\cchs186 posistemi\f0\cchs186 \'f8\f0\cchs186 (pavyzd\f0\cchs186 \'fe\f0\cchs186 iui, GVU atskiroje ugdymo institucijoje, jo posistem\f0\cchs186 \'eb\f0\cchs186 - pedagogin\f0\cchs186 \'eb\f0\cchs186 sistema, ir kt.). Visi GAVUS elementai yra vienaip ar kitaip susij\f0\cchs186 \'e6\f0\cchs186 su ugdymu ir jo funkcijomis: \f0\cchs186 \'f0\f0\cchs186 vietimu, lavinimu, aukl\f0\cchs186 \'eb\f0\cchs186 jimu, mokymu, globojimu, formavimu ir kt. Kiekviena jo sudf0\cchs186 \'eb\f0\cchs186 tin\f0\cchs186 \'eb\f0\cchs186 dalis atlieka tam tikr\f0\cchs186 \'e0\f0\cchs186 funkcij\f0\cchs186 \'e0\f0\cchs186 (jas nurod\f0\cchs186 \'eb\f0\cchs186 me aptardami model\f0\cchs186 \'e1\f0\cchs186 ). Tuomet, kai mo\-delio strukt\f0\cchs186 \'fb\f0\cchs186 riniai elementai funkcionuoja visuose ugdymo realyb\f0\cchs186 \'eb\f0\cchs186 s lygmeny\-se, jis apima daugel\f0\cchs186 \'e1\f0\cchs186 aplinkos veiksni\f0\cchs186 \'f8\f0\cchs186 , kurie yra gabumo virsmo pasiekimais katalizatoriai. Funkciniais ry\f0\cchs186 \'f0\f0\cchs186 iais susij\f0\cchs186 \'e6\f0\cchs186 elementai sukuria palaikan\f0\cchs186 \'e8\f0\cchs186 i\f0\cchs186 \'e0\f0\cchs186 aplink\f0\cchs186 \'e0 \f0\cchs186 vienas kito vei{imui, o tai savo ruo\f0\cchs186 \'fe\f0\cchs186 tu suma\f0\cchs186 \'fe\f0\cchs186 ina atsitiktinum\f0\cchs186 \'f8\f0\cchs186 \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 tiesiogi\-\cs44 niam \cs49 ugdymui, t.y. skatina gabaus vaiko saviugd\f0\cchs186 \'e0\f0\cchs186 .\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelio artimiausioji funkcionavimo aplinka yra \f0\cchs186 \'f0\f0\cchs186 vietimo sistema.\par \pard \plain \s23 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Modelis yra atviras ir dinami\f0\cchs186 \'f0\f0\cchs186 kas. Atviras, nes tai yra socialin\f0\cchs186 \'eb\f0\cchs186 strukt\f0\cchs186 \'fb\f0\cchs186 ra, kuriai \f0\cchs186 \'e1\f0\cchs186 tak\f0\cchs186 \'e0\f0\cchs186 daro aplinka (netgi jo veikimo realyb\f0\cchs186 \'eb\f0\cchs186 je prasme). Modelio struk\-t\f0\cchs186 \'fb\f0\cchs186 riniai elementai turi daug vidini\f0\cchs186 \'f8\f0\cchs186 ry\f0\cchs186 \'f0\f0\cchs186 i\f0\cchs186 \'f8\f0\cchs186 , o jie savo ruo\f0\cchs186 \'fe\f0\cchs186 tu yra atviri aplinkai, kitoms, i\f0\cchs186 \'f0\f0\cchs186 orin\f0\cchs186 \'eb\f0\cchs186 ms socialin\f0\cchs186 \'eb\f0\cchs186 ms strukt\f0\cchs186 \'fb\f0\cchs186 roms, sistemoms, yra dinami\f0\cchs186 \'f0\f0\cchs186 ki, nes i\f0\cchs186 \'f0\f0\cchs186 likti stati\f0\cchs186 \'f0\f0\cchs186 kam, kai kinta aplinka, n\f0\cchs186 \'eb\f0\cchs186 ra \f0\cchs186 \'e1\f0\cchs186 manoma. Dinami\f0\cchs186 \'f0\f0\cchs186 kas jis ir d\f0\cchs186 \'eb\f0\cchs186 l k\f0\cchs186 \'ab\'a9\f0\cchs186 $}\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn360\margtsxn360\margbsxn360\cols1\colsx60 {\header }{\footer \pard \plain \s27\qr\li0\fi0\ri0\sb0\sa0 \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 {\field{\*\fldinst{PAGE}}{\fldrslt 123}}\par }{\pard\plain \sb1144\sa0\sl-240\slmult0\fs20\par}\pard \plain \s29\qj\li11181\fi0\ri0\sb51\sa102 \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4. \cs55 Gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ufidymo ir jo s\f0\cchs186 \'e0\f0\cchs186 lyg\f0\cchs186 \'f8\f0\cchs186 mo\ul delio rai\f0\cchs186 \'f0\f0\cchs186 kos\ul0 \cs45\b\expndtw-10\f0\cchs186 \'c1\f0\cchs186 \cs55\b0\ul\expndtw0 jetuvo\f0\cchs186 \'e1\f0\cchs186 e \cs60\fs20 pristatymas\par \sect\sectd \sbknone\pgwsxn20126\pghsxn13892\marglsxn733\margrsxn453\margtsxn360\margbsxn360\cols2\colno1\colw8123\colsr2431\colno2\colw8385 {\shpgrp{\*\shpinst \shpleft10622\shptop263\shpright18737\shpbottom1966\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr1\shpz7\shplid7{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 107315}}{\sp{\sn dyWrapDistBottom}{\sv 48260}}{\sp{\sn groupLeft}{\sv 12045}}{\sp{\sn groupTop}{\sv 2846}}{\sp{\sn groupRight}{\sv 20160}}{\sp{\sn groupBottom}{\sv 4549}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12045}}{\sp{\sn relTop}{\sv 2922}}{\sp{\sn relRight}{\sv 20160}}{\sp{\sn relBottom}{\sv 4100}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Nr.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0\sl-144\slmult0\tlhyph\tx3744\tlul\tx4574 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn2\f0\cchs186\lang1063\langfe1063\fs22 rr-ri{\charscalex100\expndtw0\tab }\cs61\fs12 _ {\charscalex100\expndtw0\tab } J \f0\cchs186 \'bb\par \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Teiginys \f0\cchs186 \'97\cell \pard \plain \s35\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 mreies\par \pard \plain \s3\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid *\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 t\f0\cchs186 \'e6\f0\cchs186 sinys\par \pard \plain \s24\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs61\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs12 Qt \cs60\fs20 n\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 11.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokini\f0\cchs186 \'f8\f0\cchs186 t\f0\cchs186 \'eb\f0\cchs186 v\f0\cchs1:6 \'f8\f0\cchs186 palaikymo, pritarimo\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .24\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.21\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx542 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx6666 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7378 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cel \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}vs\n\{s\{p{ }1s} fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumoexpndtw0 \cs55fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv lbrdrr\brdrs\brdrw15\cltxlrtb\cellx8115 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s35\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta mokyklos administracijos paskatinimo ir \cs57\expndtw10\fs16 nri\cs58\expndtw0\fs20 -^mn\par \pard \plain \s15\ql\li0\fi0\ri0\sb0\sa0\tlhyph\tx5472\tlhyph\tx6107 \intbl \cs58\i0\strike0\nosupersub\b\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 maksimalus \cs60\b0 galimas trukume .v\cs57\b\expndtw10\fs16 .-rr.\cs59\i\expndtw-10\f9\cchs186\fs22 ^-ETrr\cs60\b0\i0\expndtw0\f0\cchs186\fs20 {\charscalex100\expndtw0\tab }rr{\charscalex100\expndtw0\tab }1\cell \pard \plain \s5\qr\li0\fi0\ri0\sb0\sa0 \intbl \cs60\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs20 00\cs49\fs22 .41\cel \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 18025}}{\sp{\sn relTop}{\sv 2846}}{\sp{\sn relRight}{\sv 20152}}{\sp{\sn relBottom}{\sv 3117}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}vs\n\{s\{p{ }1s} fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s11\ql\li0\fi0\ri0\sb0\sa0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 4.2.3 lentel\f0\cchs186 \'eb\f0\cchs186 s t\f0\cchs186 \'e6\f0\cchs186 sinys\par }}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 12629}}{\sp{\sn relTop}{\sv 4074}}{\sp{\sn relRight}{\sv 20100}}{\sp{\sn relBottom}{\sv 4549}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s22\ql\li0\fi2821\ri0\sb0\sa0\sl-161\slmult0\tlhyph\tx3456\tldot\tx3812 \cs62\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs18 _ ,{\charscalex100\expndtw0\tab }{\charscalex100\expndtw0\tab }.\f0\cchs186 \'84\'ab\f0\cchs186 , , icigu \expndtw20 trukumoexpndtw0 \cs55fs22 visi\f0\cchs186 \'f0\f0\cchs186 kai nejau\f0\cchs186 -\line \'e8\f0\cchs186 iama \f0\cchs186 \'97\f0\cchs186 vertinimas \cs49\f0\cchs186 \'84\f0\cchs186 -2".\par }}}}}{\shpgrp{\*\shpinst \shpleft-373\shptop6683\shpright8098\shpbottom12511\shpfhdr0\shpfblwtxt0\shpbxmargin\shpbypara\shpwr2\shpwrk3\shpz8\shplid8{\sp{\sn fFlipH}{\sv 0}}{\sp{\sn fFlipV}{\sv 0}}{\sp{\sn fLayoutInCell}{\sv 1}}{\sp{\sn fAllowOverlap}{\sv 1}}{\sp{\sn dxWrapDistLeft}{\sv 21590}}{\sp{\sn dxWrapDistRight}{\sv 21590}}{\sp{\sn dyWrapDistTop}{\sv 0}}{\sp{\sn dyWrapDistBottom}{\sv 0}}{\sp{\sn groupLeft}{\sv 1050}}{\sp{\sn groupTop}{\sv 9267}}{\sp{\sn groupRight}{\sv 9521}}{\sp{\sn groupBottom}{\sv 15095}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 1050}}{\sp{\sn relTop}{\sv 10275}}{\sp{\sn relRight}{\sv 9521}}{\sp{\sn relBottom}{\sv 15095}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdr15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li246\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Nr\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\strike0\nosupersub\scaps0\chrlex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Teiginys\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Vid.*\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 St. n.\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1 \super 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta u\f0\cchs186 \'fe\f0\cchs186 mokes\f0\cchs186 \'e8\f0\cchs186 io u\f0\cchs186 \'fe\f0\cchs186 \cs56\fs18 papildom\f0\cchs186 \'e0\f0\cchs186 \cs55\fs22 darb\f0\cchs186 \'e0\f0\cchs186 ,.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.43\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.84\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 12.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta materialinio paskatinimo itin gabiems mokiniams.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.35\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.87\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 13.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-288\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta bendros itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo politikos visos i\f0\cchs186 \'f0\f0\cchs186 liet \cs52\expndtw-20\fs30 j \cs44\expndtw0\fs22 mastu.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.27\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.85\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 14.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 [Tr\f0\cchs186 \'fb\f0\cchs186 ksta apr\f0\cchs186 \'fb\f0\cchs186 pinimo reikalinga mokymo metodine med\f0\cchs186 \'fe\f0\cchs186 iaga\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.22\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.96\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 15.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-296\slmult0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta kvalifikacijos k\f0\cchs186 \'eb\f0\cchs186 limo kurs\f0\cchs186 \'f8\f0\cchs186 itin gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 ugdymo \cs44 tems.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .20\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.91\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrsbrdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s30\ql\li0\fi0\ri0\sb0\sa0\sl-407\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\up2\f0\cchs186\lang1063\langfe1063\fs30 j \cs44\expndtw0\fs22 6. \cs55 j\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs55 bendradarbiavimo tu auk\f0\cchs186 \'f0\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 mokykl\f0\cchs186 \'f8\f0\cchs186 d\f0\cchs186 \'eb\f0\cchs186 stytojais, \cs44 mokalininkaif.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .04\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.99\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0\sl-313\slmult0 \intbl \cs44\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 7. \cs55 1 \cs44 Tr\f0\cchs186 \'fb\f0\cchs186 ksta literatu \expndtw-20 rot\expndtw0 \cs54\i\expndtw-20 apie itin \cs55\i0\expndtw0 gabi\f0\cchs186 \'f8\f0\cchs186 vaik\f0\cchs186 \'f8\f0\cchs186 pa\f0\cchs186 \'fe\f0\cchs186 inim\f0\cchs186 \'e0\f0\cchs186 , ugdym\f0\cchs186 \'e0\f0\cchs186 , \cs52\expndtw-20\fs30 j \cs55\expndtw0\fs22 psichologij\f0\cchs186 \'e0\f0\cchs186 , \cs44 kir\f0\cchs186 \'f8\f0\cchs186 \cs55\f0\cchs186 \'f0\f0\cchs186 ali\f0\cchs186 \'f8\f0\cchs186 patirt j.\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1\cs49 .00\cell \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.97\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 8. \cs55 j Tr\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 bendradarbiavimo \cs55 su patyrusiais \f0\cchs186 \'f0\f0\cchs186 ioje srityje kolegomis,\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.88\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.02\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s32\ql\li0\fi0\ri0\sb0\sa0\sl-356\slmult0 \intbl \cs52\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw-20\dn4\f0\cchs186\lang1063\langfe1063\fs30 1 \cs49\expndtw0\fs22 1\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtu0\dn0\f0\cchs186\lang1063\langfe1063\fs22 'r\f0\cchs186 \'fb\f0\cchs186 ksta \cs44 tinkamo \cs55 pasirengimo auk\f0\cchs186 \'f0\f0\cchs186 tojoje mokykloje.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 0.56\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.17\cell \pard\intbl\row \trowd\trgaph40 \trrh0 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx661 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7014 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx7751 \clvertalt\clbrdrt\brdrs\brdrw15\clbrdrl\brdrs\brdrw15\clbrdrb\brdrs\brdrw15\clbrdrr\brdrs\brdrw15\cltxlrtb\cellx8471 \pard \plain \s5\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs49\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 10. 7\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 r\f0\cchs186 \'fb\f0\cchs186 ksta galimybi\f0\cchs186 \'f8\f0\cchs186 \cs44 naudotis \cs55 kompiuteriu ir internetu.\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 -0.19\cell \pard \plain \s3\ql\li0\fi0\ri0\sb0\sa0 \intbl \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 1.33\cell \pard\intbl\row \pard}}}{\shp {\*\shpinst \shplid1{\sp{\sn relLeft}{\sv 2151}}{\sp{\sn relTop}{\sv 9267}}{\sp{\sn relRight}{\sv 8724}}{\sp{\sn relBottom}{\sv 10300}}{\sp{\sn fRelFlipH}{\sv 0}}{\sp{\sn fRelFlipV}{\sv 0}}{\sp{\sn shapeType}{\sv 202}}{\sp{\sn fLine}{\sv 0}}{\sp{\sn fLine}{\sv 1}}{\sp{\sn lineWidth}{\sv 0}}{\sp{\sn lineColor}{\sv 16777215}}{\sp{\sn fPrint}{\sv 1}}{\sp{\sn fFilled}{\sv 0}}{\sp{\sn fEditedWrap}{\sv 0}}{\sp{\sn txflTextFlow}{\sv 0}}{\sp{\sn dxTextLeft}{\sv 0}}{\sp{\sn dyTextTop}{\sv 0}}{\sp{\sn dxTextRight}{\sv 0}}{\sp{\sn dyTextBottom}{\sv 0}}{\sp{\sn fFitTextToShape}{\sv 0}}{\shptxt \pard \plain \s2\qj\li0\fi0\ri0\sb0\sa0\sl-330\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 Duomenys apie tai, ko mokytojams tr\f0\cchs186 \'fb\f0\cchs186 ksta darbui su itin\par \pard \plain \s20\ql\li0\fi2406\ri0\sb0\sa0\sl-330\slmult0\tlul\tx805 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 gabiais vaikais\line \lang1033 {\charscalex100\expndtw0\tab }\ul\lang1063 (Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis,\ul0 Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002)\par }}}}}\pard \plain \s11\qj\li0\fi0\ri0\sb0\sa0\sl-322\slmult0 \cs55\b0\i0\strike0\nosupersub\scaps0\charscalex100\expndtw0\dn0\f0\cchs186\lang1063\langfe1063\fs22 niams, galima manyti, kad jaunesni\f0\cchs186 \'f8\f0\cchs186 j\f0\cchs186 \'f8\f0\cchs186 klasi\f0\cchs186 \'f8\f0\cchs186 gabi\f0\cchs186 \'f8\f0\cchs186 mokini\fcchs186 \'f8\f0\cchs186 ugdymo rezulta\-tai \f0\cchs186\'fe\f0\cchs186 inomi ir fiksuojami tik klases ir mokyklos (atskirais atvejais savivaldyb\f0\cchs186 \'eb\f0\cchs186 s) lygmeniu. be to, olimpiad\f0\cchs186 \'f8\f0\cchs186 rezultatai - tai tik pasiekimai, \cs49 o \cs55 kas daroma klas\f0\cchs186 \'eb\-\f0\cchs186 je, \cs53\i\expndtw-10 mokykloje, \cs55\i0\expndtw0 kad tie pasiekimai b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8\f0\cchs186 tokie, ir \cs49 ar \cs55 tie pasiekimai \f0\cchs186 \'97\f0\cchs186 tai mokytojo ir mokinio darbo rezultatas ar tik mokinio potencialo \{vertinimas, informaci\-jos taip pat neturime arba turime labai nedaug \cs49 (\f0\cchs186 \'fe\f0\cchs186 r. \cs55 Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , \cs49 1997,1998, \cs55 2003, Narkevi\f0\cchs186 \'e8\f0\cchs186 ien\f0\cchs186 \'eb\f0\cchs186 , Janilionis, Almonaitien\f0\cchs186 \'eb\f0\cchs186 , \cs49 2002).\par \pard \plain \s2\qj\li0\fi576\ri0\sb0\sa0\sl-322\slmult0 \cs63\b0\strike0\nosupersub\i\scaps0\charscalex100\expndtw-20\dn0\f0\cchs186\lang1063\langfe1063\fs22 Mokytoj\f0\cchs186 \'f8\f0\cchs186 rengimas. \cs55\i0\expndtw0 N\f0\cchs186 \'eb\f0\cchs186 vienas Lietuvos universitetas, rengiantis mokyto\-jus, nesi\f0\cchs186 \'fb\f0\cchs186 lo pirmos ar antros pakopos studij\f0\cchs186 \'f8\f0\cchs186 programos, kurios paskirtis b\f0\cchs186 \'fb\f0\cchs186 t\f0\cchs186 \'f8 \f0\cchs186 ai\f0\cchs186 \'f0\f0\cchs186 kiai orientuota \f0
diff --git a/sw/qa/extras/layout/data/forcepoint91.html b/sw/qa/extras/layout/data/forcepoint91.html
new file mode 100644
index 000000000000..eacbd2e05ab8
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint91.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint92.doc b/sw/qa/extras/layout/data/forcepoint92.doc
new file mode 100644
index 000000000000..49c4a7f11dfe
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint92.doc
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint93-1.rtf b/sw/qa/extras/layout/data/forcepoint93-1.rtf
new file mode 100644
index 000000000000..bbe5ecfb78f2
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint93-1.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint93-2.rtf b/sw/qa/extras/layout/data/forcepoint93-2.rtf
new file mode 100644
index 000000000000..bcc5f3dc8855
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint93-2.rtf
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint94.html b/sw/qa/extras/layout/data/forcepoint94.html
new file mode 100644
index 000000000000..8be788f8e4e5
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint94.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint98.html b/sw/qa/extras/layout/data/forcepoint98.html
new file mode 100644
index 000000000000..9d4b76c53e76
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint98.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/forcepoint99.html b/sw/qa/extras/layout/data/forcepoint99.html
new file mode 100644
index 000000000000..6eb36a616e26
--- /dev/null
+++ b/sw/qa/extras/layout/data/forcepoint99.html
Binary files differ
diff --git a/sw/qa/extras/layout/data/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/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 7ff6f5255306..a7b48240ca41 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2929,14 +2929,85 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint72) { createDoc("forcepoint72
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint75) { createDoc("forcepoint75-1.rtf"); }
+// FIXME: apparently infinite loop on Mac
+#ifndef MACOSX
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testUXTSOREL) { createDoc("LIBREOFFICE-UXTSOREL.rtf"); }
+#endif
+
//just care it doesn't crash/assert
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
{
createDoc("forcepoint-swfootnoteframe-1.rtf");
}
-//FIXME: disabled after failing again with fixed layout
-//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { createDoc("forcepoint76-1.rtf"); }
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76)
+{
+ createDoc("forcepoint76-1.rtf");
+}
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint89)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint89.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testN4LA0OHZ) { createDoc("LIBREOFFICE-N4LA0OHZ.rtf"); }
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint90)
+{
+ createDoc("forcepoint90.rtf");
+}
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint91)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint91.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint92) { createDoc("forcepoint92.doc"); }
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint93)
+{
+//fails to load createDoc("forcepoint93-1.rtf");
+//layout loop createDoc("forcepoint93-2.rtf");
+}
+
+#if 0 // no createSwWebDoc
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint94)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint94.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+#if 0 // no createSwWebDoc
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint98)
+{
+ createSwWebDoc(DATA_DIRECTORY, "forcepoint98.html");
+}
+#endif
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint102)
+{
+ createDoc("forcepoint102.rtf");
+}
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf147485Forcepoint)
+{
+ createDoc("tdf147485-forcepoint.doc");
+}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
{
@@ -2945,6 +3016,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");
diff --git a/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt b/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt
new file mode 100644
index 000000000000..f2bffb050ac4
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/tdf131025_noZerosInTable.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 7bdb9163e372..81853569f80c 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -219,6 +219,16 @@ DECLARE_ODFEXPORT_TEST(testTdf43569, "tdf43569_conditionalfield.doc")
CPPUNIT_ASSERT(xFields->hasMoreElements());
}
+DECLARE_ODFEXPORT_TEST(testTdf131025_noZerosInTable, "tdf131025_noZerosInTable.odt")
+{
+ uno::Reference<text::XTextTablesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XNameAccess> xTables = xSupplier->getTextTables();
+ uno::Reference<text::XTextTable> xTable(xTables->getByName("Table1"), uno::UNO_QUERY);
+
+ uno::Reference<text::XTextRange> xCell(xTable->getCellByName("C3"), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("5 gp"), xCell->getString());
+}
+
DECLARE_ODFEXPORT_TEST(testTdf103567, "tdf103567.odt")
{
uno::Reference<drawing::XShape> const xShape(getShape(1));
diff --git a/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt b/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt
new file mode 100644
index 000000000000..6acb5e6d8256
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/PageAnchorZIndexFirstPage.fodt
@@ -0,0 +1,120 @@
+<?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="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <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="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:automatic-styles>
+ <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:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0.145cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0.046cm, 0cm, 0.046cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.452cm" fo:min-width="1.637cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.515cm" fo:min-width="2.18cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </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>
+ <draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="page" text:anchor-page-number="1" svg:x="9.14cm" svg:y="7.703cm" svg:width="8.62cm" svg:height="8.652cm" draw:z-index="1">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABcQERQRDhcUEhQaGBcbIjklIh8fIkYyNSk5UkhX
+ VVFIUE5bZoNvW2F8Yk5QcptzfIeLkpSSWG2grJ+OqoOPko3/2wBDARgaGiIeIkMlJUONXlBe
+ jY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY3/wAAR
+ CAARABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDmbO2a6uBEpx3J9BU2oWBsypDbkbuR0NJp
+ lyttdhpOFYbSfSrGsXkU4SOJg2DkkdKxcp+0SWxulD2bb3MyiiitjA//2Q==</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:frame draw:style-name="fr2" draw:name="Image1" text:anchor-type="page" text:anchor-page-number="1" svg:x="7.541cm" svg:y="0.123cm" svg:width="11.536cm" svg:height="6.879cm" draw:z-index="0">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEARwBHAAD/2wBDABMNDhAODBMQDxAVFBMWHC4eHBoaHDkpKyIuQztH
+ RkI7QUBKVGtaSk9lUEBBXX5eZW5yd3l3SFmDjIJ0i2t1d3P/2wBDARQVFRwYHDceHjdzTUFN
+ c3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3P/wAAR
+ CAANABYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDjYImnnSJerkAZre/4R6ARf62Tfj73GPyr
+ nkZkcOpIZTkEdq1P7fu/L27Y9397Fc9aNVtezZ0UZUknzozp4mgmeJiCUODiimu7O5ZjlmOS
+ T3oroW2pg7X0P//Z</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="1" draw:z-index="3" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P4" svg:width="1.638cm" svg:height="1.452cm" svg:x="13.571cm" svg:y="8.13cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">2</text:span>
+ </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="page" text:anchor-page-number="1" draw:z-index="2" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P4" svg:width="2.181cm" svg:height="1.516cm" svg:x="16.718cm" svg:y="0.187cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">1</text:span>
+ </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 text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt b/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt
new file mode 100644
index 000000000000..e335eee449bd
--- /dev/null
+++ b/sw/qa/extras/odfimport/data/PageAnchorZIndexSecondPage.fodt
@@ -0,0 +1,120 @@
+<?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="Droid Sans Devanagari" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Droid Sans Devanagari1" svg:font-family="&apos;Droid Sans Devanagari&apos;" style:font-family-generic="swiss"/>
+ <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="Liberation Serif" svg:font-family="&apos;Liberation Serif&apos;" style:font-family-generic="roman" style:font-pitch="variable"/>
+ <style:font-face style:name="Noto Serif CJK SC" svg:font-family="&apos;Noto Serif CJK SC&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ <style:font-face style:name="Source Han Sans CN" svg:font-family="&apos;Source Han Sans CN&apos;" style:font-family-generic="system" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:automatic-styles>
+ <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:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:justify-single-word="false" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P3" style:family="paragraph">
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="P4" style:family="paragraph">
+ <loext:graphic-properties draw:fill-color="#eeeeee"/>
+ <style:paragraph-properties fo:text-align="center" style:writing-mode="lr-tb"/>
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="T1" style:family="text">
+ <style:text-properties fo:font-size="40pt" style:font-size-asian="40pt" style:font-size-complex="40pt"/>
+ </style:style>
+ <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0cm, 0cm, 0cm, 0.145cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="fr2" style:family="graphic" style:parent-style-name="Graphics">
+ <style:graphic-properties style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" style:mirror="none" fo:clip="rect(0.046cm, 0cm, 0.046cm, 0cm)" draw:luminance="0%" draw:contrast="0%" draw:red="0%" draw:green="0%" draw:blue="0%" draw:gamma="100%" draw:color-inversion="false" draw:image-opacity="100%" draw:color-mode="standard"/>
+ </style:style>
+ <style:style style:name="gr1" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.452cm" fo:min-width="1.637cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </style:style>
+ <style:style style:name="gr2" style:family="graphic">
+ <style:graphic-properties draw:fill-color="#eeeeee" draw:textarea-horizontal-align="justify" draw:textarea-vertical-align="middle" draw:auto-grow-height="false" fo:min-height="1.515cm" fo:min-width="2.18cm" style:run-through="foreground" style:wrap="none" style:vertical-pos="from-top" style:vertical-rel="page" style:horizontal-pos="from-left" style:horizontal-rel="page" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+ <style:paragraph-properties style:writing-mode="lr-tb"/>
+ </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>
+ <draw:frame draw:style-name="fr1" draw:name="Image2" text:anchor-type="page" text:anchor-page-number="2" svg:x="9.14cm" svg:y="7.703cm" svg:width="8.62cm" svg:height="8.652cm" draw:z-index="1">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABcQERQRDhcUEhQaGBcbIjklIh8fIkYyNSk5UkhX
+ VVFIUE5bZoNvW2F8Yk5QcptzfIeLkpSSWG2grJ+OqoOPko3/2wBDARgaGiIeIkMlJUONXlBe
+ jY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY3/wAAR
+ CAARABADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDmbO2a6uBEpx3J9BU2oWBsypDbkbuR0NJp
+ lyttdhpOFYbSfSrGsXkU4SOJg2DkkdKxcp+0SWxulD2bb3MyiiitjA//2Q==</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:frame draw:style-name="fr2" draw:name="Image1" text:anchor-type="page" text:anchor-page-number="2" svg:x="7.541cm" svg:y="0.123cm" svg:width="11.536cm" svg:height="6.879cm" draw:z-index="0">
+ <draw:image draw:mime-type="image/jpeg">
+ <office:binary-data>/9j/4AAQSkZJRgABAQEARwBHAAD/2wBDABMNDhAODBMQDxAVFBMWHC4eHBoaHDkpKyIuQztH
+ RkI7QUBKVGtaSk9lUEBBXX5eZW5yd3l3SFmDjIJ0i2t1d3P/2wBDARQVFRwYHDceHjdzTUFN
+ c3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3Nzc3P/wAAR
+ CAANABYDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAA
+ AgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkK
+ FhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWG
+ h4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl
+ 5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREA
+ AgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYk
+ NOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOE
+ hYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk
+ 5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwDjYImnnSJerkAZre/4R6ARf62Tfj73GPyr
+ nkZkcOpIZTkEdq1P7fu/L27Y9397Fc9aNVtezZ0UZUknzozp4mgmeJiCUODiimu7O5ZjlmOS
+ T3oroW2pg7X0P//Z</office:binary-data>
+ </draw:image>
+ </draw:frame>
+ <draw:custom-shape text:anchor-type="page" text:anchor-page-number="2" draw:z-index="3" draw:name="Shape2" draw:style-name="gr1" draw:text-style-name="P4" svg:width="1.638cm" svg:height="1.452cm" svg:x="13.571cm" svg:y="8.13cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">2</text:span>
+ </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="page" text:anchor-page-number="2" draw:z-index="2" draw:name="Shape1" draw:style-name="gr2" draw:text-style-name="P4" svg:width="2.181cm" svg:height="1.516cm" svg:x="16.718cm" svg:y="0.187cm">
+ <text:p text:style-name="P3">
+ <text:span text:style-name="T1">1</text:span>
+ </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 text:style-name="Standard"/>
+ </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 27e1809eaeff..5dd1bccbe924 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -1000,5 +1000,33 @@ DECLARE_ODFIMPORT_TEST(testTdf133459, "tdf133459.odt")
CPPUNIT_ASSERT_EQUAL(OUString("QQ YYYY"), getProperty<OUString>(xFormat, "FormatString"));
}
+CPPUNIT_TEST_FIXTURE(Test, testPageAnchorZIndexFirstPage)
+{
+ load(mpTestDocumentPath, "PageAnchorZIndexFirstPage.fodt");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image1 index not 0",
+ sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Image1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image2 index not 1",
+ sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Image2"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape1 index not 2",
+ sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"Shape1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape2 index not 3",
+ sal_Int32(3), getProperty<sal_Int32>(getShapeByName(u"Shape2"), "ZOrder"));
+}
+
+CPPUNIT_TEST_FIXTURE(Test, testPageAnchorZIndexSecondPage)
+{
+ load(mpTestDocumentPath, "PageAnchorZIndexSecondPage.fodt");
+
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image1 index not 0",
+ sal_Int32(0), getProperty<sal_Int32>(getShapeByName(u"Image1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Image2 index not 1",
+ sal_Int32(1), getProperty<sal_Int32>(getShapeByName(u"Image2"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape1 index not 2",
+ sal_Int32(2), getProperty<sal_Int32>(getShapeByName(u"Shape1"), "ZOrder"));
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Shape2 index not 3",
+ sal_Int32(3), getProperty<sal_Int32>(getShapeByName(u"Shape2"), "ZOrder"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/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/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/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 6c701c36d274..21037b3f817b 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/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 8b29a9adaf6c..7d3a60219728 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -217,6 +217,43 @@ DECLARE_OOXMLEXPORT_TEST(testCommentDoneModel, "CommentDone.docx")
CPPUNIT_ASSERT_EQUAL(false, xComment->getPropertyValue("Resolved").get<bool>());
}
+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(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);
+}
+
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 9681dc77c186..ac621eb0ca76 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 87795d6ba6c6..9699a57f627b 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/ooxmlfieldexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 094a9262ace7..2ef6c105902b 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");
}
}
@@ -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);
}
}
@@ -758,6 +762,87 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testConditionalText, "conditional-text.fodt"
assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", aExpected);
}
+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/tiledrendering/data/shape.fodt b/sw/qa/extras/tiledrendering/data/shape.fodt
index feefe48bcde3..4e9a7f629ba4 100644
--- a/sw/qa/extras/tiledrendering/data/shape.fodt
+++ b/sw/qa/extras/tiledrendering/data/shape.fodt
@@ -1,5 +1,20 @@
<?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: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: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="en" fo:country="GB" style:letter-kerning="true" style:font-name-asian="Noto Serif CJK SC" style:font-size-asian="10.5pt" style:language-asian="zh" style:country-asian="CN" style:font-name-complex="Droid Sans Devanagari1" style:font-size-complex="12pt" style:language-complex="hi" style:country-complex="IN"/>
+ </style:default-style>
+ </office:styles>
+ <office:automatic-styles>
+ <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="1.9cm" fo:min-width="3.471cm" 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"/>
+ </style:style>
+ </office:automatic-styles>
<office:body>
<office:text>
<text:sequence-decls>
@@ -7,8 +22,9 @@
<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><draw:custom-shape text:anchor-type="paragraph" draw:z-index="0" svg:width="4.883cm" svg:height="3.225cm" svg:x="2.602cm" svg:y="1.178cm">
+ <text:p text:style-name="Standard"><draw:custom-shape text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape1" draw:style-name="gr1" svg:width="4.908cm" svg:height="2.687cm" svg:x="1.575cm" svg:y="-0.132cm">
<text:p/>
<draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:glue-points="10800 0 3163 3163 0 10800 3163 18437 10800 21600 18437 18437 21600 10800 18437 3163" draw:text-areas="3163 3163 18437 18437" draw:type="ellipse" draw:enhanced-path="U 10800 10800 10800 10800 0 360 Z N"/>
</draw:custom-shape>Hello.</text:p>
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 3a79210430b0..7e06bef647e1 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -26,6 +26,7 @@
#include <vcl/virdev.hxx>
#include <editeng/editview.hxx>
#include <editeng/outliner.hxx>
+#include <editeng/wghtitem.hxx>
#include <svl/srchitem.hxx>
#include <svl/slstitm.hxx>
#include <svl/stritem.hxx>
@@ -118,6 +119,8 @@ public:
void testTdf115088();
void testRedlineField();
void testIMESupport();
+ void testIMEFormattingAtEndOfParagraph();
+ void testIMEFormattingAfterHeader();
void testSplitNodeRedlineCallback();
void testDeleteNodeRedlineCallback();
void testVisCursorInvalidation();
@@ -193,6 +196,8 @@ public:
CPPUNIT_TEST(testTdf115088);
CPPUNIT_TEST(testRedlineField);
CPPUNIT_TEST(testIMESupport);
+ CPPUNIT_TEST(testIMEFormattingAtEndOfParagraph);
+ CPPUNIT_TEST(testIMEFormattingAfterHeader);
CPPUNIT_TEST(testSplitNodeRedlineCallback);
CPPUNIT_TEST(testDeleteNodeRedlineCallback);
CPPUNIT_TEST(testVisCursorInvalidation);
@@ -1297,6 +1302,7 @@ void SwTiledRenderingTest::testUndoShapeLimiting()
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0);
Scheduler::ProcessEventsToIdle();
+ pWrtShell2->EndTextEdit();
// Assert that the first view can't and the second view can undo the insertion.
SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
@@ -1307,7 +1313,6 @@ void SwTiledRenderingTest::testUndoShapeLimiting()
rUndoManager.SetView(&pWrtShell2->GetView());
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rUndoManager.GetUndoActionCount());
- pWrtShell2->EndTextEdit();
rUndoManager.SetView(nullptr);
SfxLokHelper::setView(nView1);
@@ -1415,11 +1420,14 @@ void SwTiledRenderingTest::testShapeTextUndoShells()
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0);
pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0);
Scheduler::ProcessEventsToIdle();
+ pWrtShell->EndTextEdit();
// Make sure that the undo item remembers who created it.
SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), rUndoManager.GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rUndoManager.GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Edit text of Shape 'Shape1'"), rUndoManager.GetUndoActionComment(0));
+
// This was -1: the view shell id for the undo action wasn't known.
CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), rUndoManager.GetUndoAction()->GetViewShellId());
}
@@ -1447,7 +1455,14 @@ void SwTiledRenderingTest::testShapeTextUndoGroupShells()
// Make sure that the undo item remembers who created it.
SwDoc* pDoc = pXTextDocument->GetDocShell()->GetDoc();
sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
- CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(2), rUndoManager.GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), rUndoManager.GetUndoActionCount());
+
+ pWrtShell->EndTextEdit();
+ pWrtShell->GetView().BeginTextEdit(pObject, pView->GetSdrPageView(), pWrtShell->GetWin());
+
+ CPPUNIT_ASSERT_EQUAL(size_t(1), rUndoManager.GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(OUString("Edit text of Shape 'Shape1'"), rUndoManager.GetUndoActionComment(0));
+
// This was -1: the view shell id for the (top) undo list action wasn't known.
CPPUNIT_ASSERT_EQUAL(ViewShellId(nView1), rUndoManager.GetUndoAction()->GetViewShellId());
@@ -2245,6 +2260,181 @@ void SwTiledRenderingTest::testIMESupport()
CPPUNIT_ASSERT_EQUAL(aInputs[aInputs.size() - 1].concat("Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
}
+void SwTiledRenderingTest::testIMEFormattingAtEndOfParagraph()
+{
+ comphelper::LibreOfficeKit::setActive();
+ SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+ VclPtr<vcl::Window> pDocWindow = pXTextDocument->getDocWindow();
+
+ SwView* pView = dynamic_cast<SwView*>(SfxViewShell::Current());
+ assert(pView);
+ SwWrtShell* pWrtShell = pView->GetWrtShellPtr();
+
+ // delete all characters
+
+ for (int i = 0; i < 9; i++)
+ {
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DELETE);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DELETE);
+ }
+
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ // status: "a"
+
+ comphelper::dispatchCommand(".uno:Bold", uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // status: "a<bold>b</bold>\n"
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ std::unique_ptr<SfxPoolItem> pItem;
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem->GetWeight());
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // status: "a<bold>b</bold>\n
+ // <bold>a</bold>\n"
+
+ comphelper::dispatchCommand(".uno:Bold", uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem2 = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem2);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem2->GetWeight());
+
+ // status: "a<bold>b</bold>\n
+ // <bold>a</bold>\n"
+ // b"
+
+ comphelper::dispatchCommand(".uno:Bold", uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem3 = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem3);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem3->GetWeight());
+
+ comphelper::dispatchCommand(".uno:Bold", uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem4 = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem4);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem4->GetWeight());
+
+ // status: "a<bold>b</bold>\n
+ // <bold>a</bold>\n"
+ // b<bold>a</bold>b"
+
+ // the cursor should be at position 3nd
+ SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false);
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), pShellCursor->GetPoint()->nContent.GetIndex());
+
+ // check the content
+ CPPUNIT_ASSERT_EQUAL(OUString("bab"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText());
+}
+
+void SwTiledRenderingTest::testIMEFormattingAfterHeader()
+{
+ comphelper::LibreOfficeKit::setActive();
+ SwXTextDocument* pXTextDocument = createDoc("dummy.fodt");
+ VclPtr<vcl::Window> pDocWindow = pXTextDocument->getDocWindow();
+
+ SwView* pView = dynamic_cast<SwView*>(SfxViewShell::Current());
+ assert(pView);
+
+ // delete all characters
+
+ comphelper::dispatchCommand(".uno:SelectAll", uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_DELETE);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_DELETE);
+
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "a");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // status: "a\n"
+
+ comphelper::dispatchCommand(
+ ".uno:StyleApply?Style:string=Heading 2&FamilyName:string=ParagraphStyles",
+ uno::Sequence<beans::PropertyValue>());
+ Scheduler::ProcessEventsToIdle();
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "b");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+ Scheduler::ProcessEventsToIdle();
+
+ std::unique_ptr<SfxPoolItem> pItem;
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_BOLD, pWeightItem->GetWeight());
+
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 0, KEY_RETURN);
+ pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 0, KEY_RETURN);
+ Scheduler::ProcessEventsToIdle();
+
+ // status: "a\n
+ // <h2>bb</h2>\n"
+
+ pDocWindow->PostExtTextInputEvent(VclEventId::ExtTextInput, "c");
+ pDocWindow->PostExtTextInputEvent(VclEventId::EndExtTextInput, "");
+ Scheduler::ProcessEventsToIdle();
+
+ // status: "a\n
+ // <h2>bb</h2>\n"
+ // c"
+
+ pView->GetViewFrame()->GetBindings().QueryState(SID_ATTR_CHAR_WEIGHT, pItem);
+ auto pWeightItem2 = dynamic_cast<SvxWeightItem*>(pItem.get());
+ CPPUNIT_ASSERT(pWeightItem2);
+
+ CPPUNIT_ASSERT_EQUAL(FontWeight::WEIGHT_NORMAL, pWeightItem2->GetWeight());
+}
+
void SwTiledRenderingTest::testSplitNodeRedlineCallback()
{
// Load a document.
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d56f678f7e08..0d7a9b401063 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -1782,7 +1782,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());
@@ -2000,7 +2000,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());
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index d68b2b7ecf1d..e01e74441d6a 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/sdi/_basesh.sdi b/sw/sdi/_basesh.sdi
index ef4dd4413a1a..5f9423ee95bd 100644
--- a/sw/sdi/_basesh.sdi
+++ b/sw/sdi/_basesh.sdi
@@ -586,4 +586,11 @@ interface BaseTextSelection
ExecMethod = Execute;
StateMethod = GetState;
]
+
+ SID_GRAPHIC_SIZE_CHECK
+ [
+ ExecMethod = ExecDlg;
+ StateMethod = GetState;
+ DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
+ ]
}
diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx
index 7cd6303ecef1..39b3f839be87 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/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 7d3b70dbf363..dd0ca592aabe 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -72,7 +72,8 @@
#include <tabcol.hxx>
#include <wrtsh.hxx>
#include <undobj.hxx>
-#include <boost/property_tree/json_parser.hpp>
+#include <view.hxx>
+#include <tools/json_writer.hxx>
using namespace com::sun::star;
using namespace util;
@@ -2033,76 +2034,76 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd )
void SwCursorShell::sendLOKCursorUpdates()
{
- SwWrtShell* pShell = GetDoc()->GetDocShell()->GetWrtShell();
- if (!pShell)
+ SwView* pView = static_cast<SwView*>(GetSfxViewShell());
+ // The view may not have a writer shell if the view's ctor did not finish yet.
+ if (!pView || !pView->GetWrtShellPtr())
return;
+ SwWrtShell* pShell = &pView->GetWrtShell();
+
SwFrame* pCurrentFrame = GetCurrFrame();
SelectionType eType = pShell->GetSelectionType();
- boost::property_tree::ptree aRootTree;
+ tools::JsonWriter aJsonWriter;
if (pCurrentFrame && (eType & SelectionType::Table) && pCurrentFrame->IsInTab())
{
const SwRect& rPageRect = pShell->GetAnyCurRect(CurRectType::Page, nullptr);
- boost::property_tree::ptree aTableColumns;
{
+ auto columnsNode = aJsonWriter.startNode("columns");
SwTabCols aTabCols;
pShell->GetTabCols(aTabCols);
const int nColumnOffset = aTabCols.GetLeftMin() + rPageRect.Left();
- aTableColumns.put("left", aTabCols.GetLeft());
- aTableColumns.put("right", aTabCols.GetRight());
- aTableColumns.put("tableOffset", nColumnOffset);
+ aJsonWriter.put("left", aTabCols.GetLeft());
+ aJsonWriter.put("right", aTabCols.GetRight());
+ aJsonWriter.put("tableOffset", nColumnOffset);
- boost::property_tree::ptree aEntries;
- for (size_t i = 0; i < aTabCols.Count(); ++i)
{
- auto const & rEntry = aTabCols.GetEntry(i);
- boost::property_tree::ptree aTableColumnEntry;
- aTableColumnEntry.put("position", rEntry.nPos);
- aTableColumnEntry.put("min", rEntry.nMin);
- aTableColumnEntry.put("max", rEntry.nMax);
- aTableColumnEntry.put("hidden", rEntry.bHidden);
- aEntries.push_back(std::make_pair("", aTableColumnEntry));
+ auto entriesNode = aJsonWriter.startArray("entries");
+ for (size_t i = 0; i < aTabCols.Count(); ++i)
+ {
+ auto entryNode = aJsonWriter.startStruct();
+ auto const & rEntry = aTabCols.GetEntry(i);
+ aJsonWriter.put("position", rEntry.nPos);
+ aJsonWriter.put("min", rEntry.nMin);
+ aJsonWriter.put("max", rEntry.nMax);
+ aJsonWriter.put("hidden", rEntry.bHidden);
+ }
}
- aTableColumns.push_back(std::make_pair("entries", aEntries));
}
- boost::property_tree::ptree aTableRows;
{
+ auto rowsNode = aJsonWriter.startNode("rows");
SwTabCols aTabRows;
pShell->GetTabRows(aTabRows);
const int nRowOffset = aTabRows.GetLeftMin() + rPageRect.Top();
- aTableRows.put("left", aTabRows.GetLeft());
- aTableRows.put("right", aTabRows.GetRight());
- aTableRows.put("tableOffset", nRowOffset);
+ aJsonWriter.put("left", aTabRows.GetLeft());
+ aJsonWriter.put("right", aTabRows.GetRight());
+ aJsonWriter.put("tableOffset", nRowOffset);
- boost::property_tree::ptree aEntries;
- for (size_t i = 0; i < aTabRows.Count(); ++i)
{
- auto const & rEntry = aTabRows.GetEntry(i);
- boost::property_tree::ptree aTableRowEntry;
- aTableRowEntry.put("position", rEntry.nPos);
- aTableRowEntry.put("min", rEntry.nMin);
- aTableRowEntry.put("max", rEntry.nMax);
- aTableRowEntry.put("hidden", rEntry.bHidden);
- aEntries.push_back(std::make_pair("", aTableRowEntry));
+ auto entriesNode = aJsonWriter.startArray("entries");
+ for (size_t i = 0; i < aTabRows.Count(); ++i)
+ {
+ auto entryNode = aJsonWriter.startStruct();
+ auto const & rEntry = aTabRows.GetEntry(i);
+ aJsonWriter.put("position", rEntry.nPos);
+ aJsonWriter.put("min", rEntry.nMin);
+ aJsonWriter.put("max", rEntry.nMax);
+ aJsonWriter.put("hidden", rEntry.bHidden);
+ }
}
- aTableRows.push_back(std::make_pair("entries", aEntries));
}
-
- aRootTree.add_child("columns", aTableColumns);
- aRootTree.add_child("rows", aTableRows);
}
- std::stringstream aStream;
- boost::property_tree::write_json(aStream, aRootTree);
- GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, aStream.str().c_str());
+ char* pChar = aJsonWriter.extractData();
+ GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_TABLE_SELECTED, pChar);
+ free(pChar);
}
void SwCursorShell::RefreshBlockCursor()
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 909c88632f5e..cbd6380e9bde 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -2131,6 +2131,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
{
@@ -2784,6 +2815,16 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS
return true;
}
+void DocumentContentOperationsManager::SetIME(bool bIME)
+{
+ m_bIME = bIME;
+}
+
+bool DocumentContentOperationsManager::GetIME() const
+{
+ return m_bIME;
+}
+
void DocumentContentOperationsManager::TransliterateText(
const SwPaM& rPaM,
utl::TransliterationWrapper& rTrans )
@@ -5055,8 +5096,11 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// and not the source has the page break
if (pDoc->IsClipBoard() && (rPam.GetPageNum(pStt == rPam.GetPoint()) == 1) && !bCopyPageSource)
{
- pDestTextNd->ResetAttr(RES_BREAK); // remove the page-break
- pDestTextNd->ResetAttr(RES_PAGEDESC);
+ if (pDestTextNd)
+ {
+ pDestTextNd->ResetAttr(RES_BREAK); // remove the page-break
+ pDestTextNd->ResetAttr(RES_PAGEDESC);
+ }
}
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index e69d50d123e6..afabba5c5215 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -95,7 +95,8 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
mbLastBrowseMode( false ),
mbDisableOffPagePositioning ( false ),
mbHeaderSpacingBelowLastPara(false),
- mbGutterAtTop(false)
+ mbGutterAtTop(false),
+ mnImagePreferredDPI(0)
// COMPATIBILITY FLAGS END
{
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index ac85fe88cfd0..7b1cfe1802c8 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -1112,7 +1112,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
@@ -1131,8 +1131,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);
}
@@ -1142,12 +1143,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())
@@ -1185,7 +1189,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
{
@@ -1242,7 +1246,7 @@ namespace sw { namespace mark
for ( ; it != endIt; ++it)
if (*it == pMark)
{
- deleteMark(iterator(it));
+ deleteMark(iterator(it), false);
break;
}
}
@@ -1341,7 +1345,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)
@@ -1739,7 +1743,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/extinput.cxx b/sw/source/core/doc/extinput.cxx
index e9076064a745..b72a78ca6635 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -59,7 +59,12 @@ SwExtTextInput::~SwExtTextInput()
{
// Prevent IME edited text being grouped with non-IME edited text.
bool bKeepGroupUndo = pDoc->GetIDocumentUndoRedo().DoesGroupUndo();
- pDoc->GetIDocumentUndoRedo().DoGroupUndo(false);
+ bool bWasIME = pDoc->GetIDocumentUndoRedo().GetUndoActionCount() == 0 || pDoc->getIDocumentContentOperations().GetIME();
+ if (!bWasIME)
+ {
+ pDoc->GetIDocumentUndoRedo().DoGroupUndo(false);
+ }
+ pDoc->getIDocumentContentOperations().SetIME(true);
if( nEndCnt < nSttCnt )
{
std::swap(nSttCnt, nEndCnt);
@@ -100,14 +105,24 @@ SwExtTextInput::~SwExtTextInput()
}
else
{
- pTNd->EraseText( rIdx, nEndCnt - nSttCnt );
+ // 1. Insert text at start position with EMPTYEXPAND to use correct formatting
+ // ABC<NEW><OLD>
+ // 2. Then remove old (not tracked) content
+ // ABC<NEW>
+
+ sal_Int32 nLenghtOfOldString = nEndCnt - nSttCnt;
if( bInsText )
- {
- pDoc->getIDocumentContentOperations().InsertString( *this, sText );
- }
+ pDoc->getIDocumentContentOperations().InsertString( *this, sText, SwInsertFlags::EMPTYEXPAND );
+
+ rIdx = nEndCnt;
+
+ pTNd->EraseText( rIdx, nLenghtOfOldString );
+ }
+ if (!bWasIME)
+ {
+ pDoc->GetIDocumentUndoRedo().DoGroupUndo(bKeepGroupUndo);
}
- pDoc->GetIDocumentUndoRedo().DoGroupUndo(bKeepGroupUndo);
if (eInputLanguage != LANGUAGE_DONTKNOW)
{
sal_uInt16 nWhich = RES_CHRATR_LANGUAGE;
@@ -190,8 +205,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
pTNd->EraseText( aIdx, nEndCnt - nSttCnt );
}
- pTNd->InsertText( rNewStr, aIdx,
- SwInsertFlags::EMPTYEXPAND );
+ pTNd->InsertText( rNewStr, aIdx, SwInsertFlags::NOHINTEXPAND );
if( !HasMark() )
SetMark();
}
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index f9ef11b99897..ab69b7af2d68 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -984,12 +984,12 @@ void SwDrawView::DeleteMarked()
pTmpRoot->EndAllAction();
}
-// support enhanced text edit for draw objects
-SdrUndoManager* SwDrawView::getSdrUndoManagerForEnhancedTextEdit() const
+// Create a new view-local UndoManager manager for Writer
+std::unique_ptr<SdrUndoManager> SwDrawView::createLocalTextUndoManager()
{
- SwDoc* pDoc = Imp().GetShell()->GetDoc();
-
- return pDoc ? dynamic_cast< SdrUndoManager* >(&(pDoc->GetUndoManager())) : nullptr;
+ std::unique_ptr<SdrUndoManager> pUndoManager(new SdrUndoManager);
+ pUndoManager->SetDocShell(SfxObjectShell::Current());
+ return pUndoManager;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 8f84ce42ed75..235a7fe2b81a 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -94,6 +94,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints )
for(SwPaM& rCurrentCursor : getShellCursor( true )->GetRingContainer())
{
//OPT: GetSystemCharSet
+ GetDoc()->getIDocumentContentOperations().SetIME(false);
const bool bSuccess =
GetDoc()->getIDocumentContentOperations().InsertString(rCurrentCursor, rStr, nInsertFlags);
OSL_ENSURE( bSuccess, "Doc->Insert() failed." );
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/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 8935aea0c62b..2a810d87225f 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -298,7 +298,13 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
for (size_t i = 0; i < rMrkList.GetMarkCount(); ++i)
{
SdrObject* pObject = rMrkList.GetMark(i)->GetMarkedSdrObj();
- SwFrameFormat* pFormat = GetUserCall(pObject)->GetFormat();
+ SwContact* pContact = GetUserCall(pObject);
+ if (!pContact)
+ {
+ continue;
+ }
+
+ SwFrameFormat* pFormat = pContact->GetFormat();
if (SwFrameFormat* pShapeFormat = SwTextBoxHelper::getOtherTextBoxFormat(pFormat, RES_FLYFRMFMT))
{
SdrObject* pShape = pShapeFormat->FindSdrObject();
diff --git a/sw/source/core/graphic/GraphicSizeCheck.cxx b/sw/source/core/graphic/GraphicSizeCheck.cxx
new file mode 100644
index 000000000000..6598c7e3d62c
--- /dev/null
+++ b/sw/source/core/graphic/GraphicSizeCheck.cxx
@@ -0,0 +1,163 @@
+/* -*- 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 <GraphicSizeCheck.hxx>
+#include <svx/strings.hrc>
+#include <svx/svdobj.hxx>
+#include <unotools/viewoptions.hxx>
+#include <sfx2/viewfrm.hxx>
+#include <sfx2/dispatch.hxx>
+
+#include <ModelTraverser.hxx>
+#include <ndgrf.hxx>
+#include <IDocumentSettingAccess.hxx>
+#include <fmtfsize.hxx>
+#include <wrtsh.hxx>
+#include <wview.hxx>
+#include <cmdid.h>
+#include <docsh.hxx>
+
+using namespace css;
+
+namespace sw
+{
+GraphicSizeViolation::GraphicSizeViolation(sal_Int32 nDPI, const SwGrfNode* pGraphicNode)
+ : m_pGraphicNode(pGraphicNode)
+{
+ constexpr double fLowPercentage = 110;
+ constexpr double fHighPercentage = 50;
+
+ m_nLowDPILimit = sal_Int32(100.0 / fLowPercentage * nDPI);
+ m_nHighDPILimit = sal_Int32(100.0 / fHighPercentage * nDPI);
+}
+
+bool GraphicSizeViolation::check()
+{
+ auto pFrameFormat = m_pGraphicNode->GetFlyFormat();
+ Graphic aGraphic = m_pGraphicNode->GetGraphic();
+ Size aSizePixel = aGraphic.GetSizePixel();
+ Size aFrameSize(pFrameFormat->GetFrameSize().GetSize());
+
+ double nSizeXInch = double(aFrameSize.Width()) / 1440.0;
+ double nSizeYInch = double(aFrameSize.Height()) / 1440.0;
+
+ m_nDPIX = sal_Int32(aSizePixel.Width() / nSizeXInch);
+ m_nDPIY = sal_Int32(aSizePixel.Height() / nSizeYInch);
+
+ return isDPITooLow() || isDPITooHigh();
+}
+
+OUString GraphicSizeViolation::getGraphicName()
+{
+ return m_pGraphicNode->GetFlyFormat()->GetName();
+}
+
+namespace
+{
+class GraphicSizeCheckHandler : public ModelTraverseHandler
+{
+private:
+ sal_Int32 m_nDPI;
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& m_rGraphicSizeViolationList;
+
+public:
+ GraphicSizeCheckHandler(
+ sal_Int32 nDPI,
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& rGraphicSizeViolationList)
+ : m_nDPI(nDPI)
+ , m_rGraphicSizeViolationList(rGraphicSizeViolationList)
+ {
+ }
+
+ void handleNode(SwNode* pNode) override
+ {
+ if (!pNode->IsGrfNode())
+ return;
+
+ auto pEntry = std::make_unique<GraphicSizeViolation>(m_nDPI, pNode->GetGrfNode());
+ if (pEntry->check())
+ {
+ m_rGraphicSizeViolationList.push_back(std::move(pEntry));
+ }
+ }
+
+ void handleSdrObject(SdrObject* /*pObject*/) override {}
+};
+
+} // end anonymous namespace
+
+void GraphicSizeCheck::check()
+{
+ sal_Int32 nDPI = m_pDocument->getIDocumentSettingAccess().getImagePreferredDPI();
+ if (nDPI == 0)
+ return;
+
+ auto pHandler = std::make_shared<GraphicSizeCheckHandler>(nDPI, m_aGraphicSizeViolationList);
+ ModelTraverser aModelTraverser(m_pDocument);
+ aModelTraverser.addNodeHandler(pHandler);
+ aModelTraverser.traverse();
+}
+
+OUString GraphicSizeCheckGUIEntry::getText()
+{
+ OUString sText;
+
+ if (m_pViolation->isDPITooLow())
+ {
+ sText = SwResId(STR_WARNING_GRAPHIC_PIXEL_COUNT_LOW);
+ }
+ else if (m_pViolation->isDPITooHigh())
+ {
+ sText = SwResId(STR_WARNING_GRAPHIC_PIXEL_COUNT_HIGH);
+ }
+
+ sText = sText.replaceAll("%NAME%", m_pViolation->getGraphicName());
+ sText = sText.replaceAll("%DPIX%", OUString::number(m_pViolation->getDPIX()));
+ sText = sText.replaceAll("%DPIY%", OUString::number(m_pViolation->getDPIY()));
+
+ return sText;
+}
+
+void GraphicSizeCheckGUIEntry::markObject()
+{
+ SwWrtShell* pWrtShell = m_pDocument->GetDocShell()->GetWrtShell();
+ pWrtShell->GotoFly(m_pViolation->getGraphicName(), FLYCNTTYPE_ALL, true);
+}
+
+void GraphicSizeCheckGUIEntry::runProperties()
+{
+ markObject();
+ SwWrtShell* pWrtShell = m_pDocument->GetDocShell()->GetWrtShell();
+ pWrtShell->GetView().GetViewFrame()->GetDispatcher()->Execute(FN_FORMAT_GRAFIC_DLG,
+ SfxCallMode::SYNCHRON);
+}
+
+GraphicSizeCheckGUIResult::GraphicSizeCheckGUIResult(SwDoc* pDocument)
+{
+ GraphicSizeCheck aCheck(pDocument);
+ aCheck.check();
+
+ auto& rCollection = getCollection();
+ for (auto& rpViolation : aCheck.getViolationList())
+ {
+ auto rGUIEntry
+ = std::make_unique<GraphicSizeCheckGUIEntry>(pDocument, std::move(rpViolation));
+ rCollection.push_back(std::move(rGUIEntry));
+ }
+}
+
+OUString GraphicSizeCheckGUIResult::getTitle()
+{
+ return SwResId(STR_GRAPHIC_SIZE_CHECK_DIALOG_TITLE);
+}
+
+} // end sw namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/DocumentContentOperationsManager.hxx b/sw/source/core/inc/DocumentContentOperationsManager.hxx
index 2d600b6ff8ba..ad45dc774650 100644
--- a/sw/source/core/inc/DocumentContentOperationsManager.hxx
+++ b/sw/source/core/inc/DocumentContentOperationsManager.hxx
@@ -61,6 +61,10 @@ public:
bool InsertString(const SwPaM &rRg, const OUString&,
const SwInsertFlags nInsertMode = SwInsertFlags::EMPTYEXPAND ) override;
+ void SetIME(bool bIME) override;
+
+ bool GetIME() const override;
+
void TransliterateText(const SwPaM& rPaM, utl::TransliterationWrapper&) override;
SwFlyFrameFormat* InsertGraphic(const SwPaM &rRg, const OUString& rGrfName, const OUString& rFltName, const Graphic* pGraphic,
@@ -159,6 +163,8 @@ public:
private:
SwDoc& m_rDoc;
+ bool m_bIME = false;
+
bool DeleteAndJoinImpl(SwPaM&, const bool);
bool DeleteAndJoinWithRedlineImpl(SwPaM&, const bool unused = false);
bool DeleteRangeImpl(SwPaM&, const bool unused = false);
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx
index 6b65839259d7..1e34319e56b4 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -166,6 +166,7 @@ class DocumentSettingManager :
bool mbHeaderSpacingBelowLastPara;
/// Gutter position: false means left (not a compatibility setting).
bool mbGutterAtTop;
+ sal_Int32 mnImagePreferredDPI;
public:
@@ -186,6 +187,14 @@ public:
virtual CharCompressType getCharacterCompressionType() const override;
virtual void setCharacterCompressionType( /*[in]*/CharCompressType nType ) override;
+ sal_Int32 getImagePreferredDPI() override
+ {
+ return mnImagePreferredDPI;
+ }
+ void setImagePreferredDPI(sal_Int32 nValue) override
+ {
+ mnImagePreferredDPI = nValue;
+ }
// Replace all compatibility options with those from rSource.
void ReplaceCompatibilityOptions(const DocumentSettingManager& rSource);
diff --git a/sw/source/core/inc/GraphicSizeCheck.hxx b/sw/source/core/inc/GraphicSizeCheck.hxx
new file mode 100644
index 000000000000..f708b0a5f4dc
--- /dev/null
+++ b/sw/source/core/inc/GraphicSizeCheck.hxx
@@ -0,0 +1,99 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <doc.hxx>
+#include "ModelTraverser.hxx"
+#include <svx/GenericCheckDialog.hxx>
+
+namespace sw
+{
+class GraphicSizeViolation final
+{
+private:
+ const SwGrfNode* m_pGraphicNode;
+
+ sal_Int32 m_nLowDPILimit = 0;
+ sal_Int32 m_nHighDPILimit = 0;
+
+ sal_Int32 m_nDPIX = 0;
+ sal_Int32 m_nDPIY = 0;
+
+public:
+ GraphicSizeViolation(sal_Int32 nDPI, const SwGrfNode* pGraphicNode);
+ bool check();
+
+ OUString getGraphicName();
+
+ bool isDPITooLow() { return m_nDPIX < m_nLowDPILimit || m_nDPIY < m_nLowDPILimit; }
+
+ bool isDPITooHigh() { return m_nDPIX > m_nHighDPILimit || m_nDPIY > m_nHighDPILimit; }
+
+ sal_Int32 getDPIX() { return m_nDPIX; }
+
+ sal_Int32 getDPIY() { return m_nDPIY; }
+};
+
+class GraphicSizeCheck final
+{
+private:
+ SwDoc* m_pDocument;
+ std::vector<std::unique_ptr<GraphicSizeViolation>> m_aGraphicSizeViolationList;
+
+public:
+ GraphicSizeCheck(SwDoc* pDocument)
+ : m_pDocument(pDocument)
+ {
+ }
+
+ void check();
+
+ std::vector<std::unique_ptr<GraphicSizeViolation>>& getViolationList()
+ {
+ return m_aGraphicSizeViolationList;
+ }
+};
+
+class GraphicSizeCheckGUIEntry : public svx::CheckData
+{
+private:
+ SwDoc* m_pDocument;
+ std::unique_ptr<GraphicSizeViolation> m_pViolation;
+
+public:
+ GraphicSizeCheckGUIEntry(SwDoc* pDocument, std::unique_ptr<GraphicSizeViolation>&& pViolation)
+ : m_pDocument(pDocument)
+ , m_pViolation(std::move(pViolation))
+ {
+ }
+
+ OUString getText() override;
+
+ bool canMarkObject() override { return true; }
+
+ void markObject() override;
+
+ bool hasProperties() override { return true; }
+
+ void runProperties() override;
+};
+
+class GraphicSizeCheckGUIResult : public svx::CheckDataCollection
+{
+public:
+ GraphicSizeCheckGUIResult(SwDoc* pDocument);
+
+ OUString getTitle() override;
+};
+
+} // end sw namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/MarkManager.hxx b/sw/source/core/inc/MarkManager.hxx
index 4ce7c18ce011..d5c6e105f43b 100644
--- a/sw/source/core/inc/MarkManager.hxx
+++ b/sw/source/core/inc/MarkManager.hxx
@@ -68,7 +68,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/ModelTraverser.hxx b/sw/source/core/inc/ModelTraverser.hxx
new file mode 100644
index 000000000000..f3c6acb9c6dd
--- /dev/null
+++ b/sw/source/core/inc/ModelTraverser.hxx
@@ -0,0 +1,51 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+#include <doc.hxx>
+
+class SwNode;
+class SdrObject;
+
+namespace sw
+{
+class SW_DLLPUBLIC ModelTraverseHandler
+{
+public:
+ virtual ~ModelTraverseHandler() {}
+
+ virtual void handleNode(SwNode* pNode) = 0;
+ virtual void handleSdrObject(SdrObject* pObject) = 0;
+};
+
+class ModelTraverser
+{
+private:
+ std::vector<std::shared_ptr<ModelTraverseHandler>> mpNodeHandler;
+ SwDoc* m_pDoc;
+
+public:
+ ModelTraverser(SwDoc* pDoc)
+ : m_pDoc(pDoc)
+ {
+ }
+
+ void traverse();
+
+ void addNodeHandler(std::shared_ptr<ModelTraverseHandler> pHandler)
+ {
+ mpNodeHandler.push_back(pHandler);
+ }
+};
+
+} // end sw namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/dview.hxx b/sw/source/core/inc/dview.hxx
index 2251efa48a76..4cd23aee519c 100644
--- a/sw/source/core/inc/dview.hxx
+++ b/sw/source/core/inc/dview.hxx
@@ -76,8 +76,8 @@ protected:
using FmFormView::CheckSingleSdrObjectHit;
virtual SdrObject* CheckSingleSdrObjectHit(const Point& rPnt, sal_uInt16 nTol, SdrObject* pObj, SdrPageView* pPV, SdrSearchOptions nOptions, const SdrLayerIDSet* pMVisLay) const override;
- // support enhanced text edit for draw objects
- virtual SdrUndoManager* getSdrUndoManagerForEnhancedTextEdit() const override;
+ // Create a local UndoManager
+ std::unique_ptr<SdrUndoManager> createLocalTextUndoManager() override;
public:
SwDrawView(
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..5a00382995f9 100644
--- a/sw/source/core/inc/layact.hxx
+++ b/sw/source/core/inc/layact.hxx
@@ -68,6 +68,9 @@ class SwLayAction
std::unique_ptr<SwWait> m_pWait;
+ std::vector<SwFrame*> m_aFrameStack;
+ std::vector<std::unique_ptr<SwFrameDeleteGuard>> m_aFrameDeleteGuards;
+
// If a paragraph (or anything else) moved more than one page when
// formatting, it adds its new page number here.
// The InternalAction can then take the appropriate steps.
@@ -124,6 +127,9 @@ class SwLayAction
bool RemoveEmptyBrowserPages();
+ void PushFormatLayout(SwFrame* pLow);
+ void PopFormatLayout();
+
public:
SwLayAction(SwRootFrame *pRt, SwViewShellImp *pImp, TaskStopwatch* pWatch = nullptr);
~SwLayAction();
@@ -148,7 +154,7 @@ public:
void SetReschedule ( bool bNew ) { m_bReschedule = bNew; }
void SetWaitAllowed ( bool bNew ) { m_bWaitAllowed = bNew; }
- void SetAgain() { m_bAgain = true; }
+ void SetAgain(bool bAgain);
void SetUpdateExpFields() {m_bUpdateExpFields = true; }
inline void SetCheckPageNum( sal_uInt16 nNew );
diff --git a/sw/source/core/inc/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/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/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 9573944b71d1..df8a2e54a6f9 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2863,6 +2863,9 @@ bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pO
OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong Type" );
pTmpNxt = static_cast<SwTabFrame*>(pTmp);
}
+ // we will dereference pNewUp in the following MoveSubTree call
+ // so it certainly should not be deleted before that
+ SwFrameDeleteGuard aDeleteGuard(pNewUp);
pTmpNxt->MoveSubTree( pTmpFootnote, pNewUp->GetNext() );
}
}
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 04201e1c6f5e..2a08b22fbcdb 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -282,11 +282,12 @@ bool SwLayAction::IsInterrupt()
void SwLayAction::Reset()
{
+ SetAgain(false);
m_pOptTab = nullptr;
m_nStartTicks = std::clock();
m_nEndPage = m_nPreInvaPage = m_nCheckPageNum = USHRT_MAX;
m_bPaint = m_bComplete = m_bWaitAllowed = m_bCheckPages = true;
- m_bInterrupt = m_bAgain = m_bNextCycle = m_bCalcLayout = m_bReschedule =
+ m_bInterrupt = m_bNextCycle = m_bCalcLayout = m_bReschedule =
m_bUpdateExpFields = m_bBrowseActionStop = false;
m_pCurPage = nullptr;
}
@@ -303,7 +304,8 @@ bool SwLayAction::RemoveEmptyBrowserPages()
do
{
if ( (pPage->GetSortedObjs() && pPage->GetSortedObjs()->size()) ||
- pPage->ContainsContent() )
+ pPage->ContainsContent() ||
+ pPage->FindFootnoteCont() )
pPage = static_cast<SwPageFrame*>(pPage->GetNext());
else
{
@@ -318,6 +320,53 @@ bool SwLayAction::RemoveEmptyBrowserPages()
return bRet;
}
+void SwLayAction::SetAgain(bool bAgain)
+{
+ if (bAgain == m_bAgain)
+ return;
+
+ m_bAgain = bAgain;
+
+ assert(m_aFrameStack.size() == m_aFrameDeleteGuards.size());
+ size_t nCount = m_aFrameStack.size();
+ if (m_bAgain)
+ {
+ // LayAction::FormatLayout is now flagged to exit early and will avoid
+ // dereferencing any SwFrames in the stack of FormatLayouts so allow
+ // their deletion
+ for (size_t i = 0; i < nCount; ++i)
+ m_aFrameDeleteGuards[i].reset();
+ }
+ else
+ {
+ // LayAction::FormatLayout is now continue normally and will
+ // dereference the top SwFrame in the stack of m_aFrameStack as each
+ // FormatLevel returns so disallow their deletion
+ for (size_t i = 0; i < nCount; ++i)
+ m_aFrameDeleteGuards[i] = std::make_unique<SwFrameDeleteGuard>(m_aFrameStack[i]);
+ }
+}
+
+void SwLayAction::PushFormatLayout(SwFrame* pLow)
+{
+ /* Workaround crash seen in crashtesting with fdo53985-1.docx
+
+ Lock pLow against getting deleted when it will be dereferenced
+ after FormatLayout
+
+ If SetAgain is called to make SwLayAction exit early to avoid that
+ dereference, then it clears these guards
+ */
+ m_aFrameStack.push_back(pLow);
+ m_aFrameDeleteGuards.push_back(std::make_unique<SwFrameDeleteGuard>(pLow));
+}
+
+void SwLayAction::PopFormatLayout()
+{
+ m_aFrameDeleteGuards.pop_back();
+ m_aFrameStack.pop_back();
+}
+
void SwLayAction::Action(OutputDevice* pRenderContext)
{
m_bActionInProgress = true;
@@ -344,12 +393,15 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
SetCheckPages( false );
InternalAction(pRenderContext);
- m_bAgain |= RemoveEmptyBrowserPages();
+ if (RemoveEmptyBrowserPages())
+ SetAgain(true);
while ( IsAgain() )
{
- m_bAgain = m_bNextCycle = false;
+ SetAgain(false);
+ m_bNextCycle = false;
InternalAction(pRenderContext);
- m_bAgain |= RemoveEmptyBrowserPages();
+ if (RemoveEmptyBrowserPages())
+ SetAgain(true);
}
m_pRoot->DeleteEmptySct();
@@ -637,7 +689,7 @@ void SwLayAction::InternalAction(OutputDevice* pRenderContext)
{
bool bOld = IsAgain();
m_pRoot->RemoveSuperfluous();
- m_bAgain = bOld;
+ SetAgain(bOld);
}
if ( IsAgain() )
{
@@ -1370,7 +1422,11 @@ bool SwLayAction::FormatLayout( OutputDevice *pRenderContext, SwLayoutFrame *pLa
}
// Skip the ones already registered for deletion
else if( !pLow->IsSctFrame() || static_cast<SwSectionFrame*>(pLow)->GetSection() )
+ {
+ PushFormatLayout(pLow);
bChanged |= FormatLayout( pRenderContext, static_cast<SwLayoutFrame*>(pLow), bAddRect );
+ PopFormatLayout();
+ }
}
else if ( m_pImp->GetShell()->IsPaintLocked() )
// Shortcut to minimize the cycles. With Lock, the
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 1d1f4597fcf2..711a68765991 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -500,8 +500,7 @@ void SwRootFrame::Init( SwFrameFormat* pFormat )
SwNodeIndex aTmp( *pDoc->GetNodes().GetEndOfContent().StartOfSectionNode(), 1 );
::InsertCnt_( pLay, pDoc, aTmp.GetIndex(), true );
- //Remove masters that haven't been replaced yet from the list.
- RemoveMasterObjs( mpDrawPage );
+
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..957109ddf460 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -293,7 +293,7 @@ bool SwObjectFormatterTextFrame::DoFormatObjs()
{
// notify layout action, thus is can restart the layout process on
// a previous page.
- GetLayAction()->SetAgain();
+ GetLayAction()->SetAgain(true);
}
else
{
@@ -641,6 +641,7 @@ static void lcl_FormatContentOfLayoutFrame( SwLayoutFrame* pLayFrame,
if ( pLowerFrame->IsLayoutFrame() )
{
SwFrameDeleteGuard aCrudeHack(pLowerFrame); // ??? any issue setting this for non-footnote frames?
+ // prevent moving footnotes by formatting if they are already being moved
lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pLowerFrame),
pLastLowerFrame );
}
@@ -686,21 +687,46 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// for follow text frames.
if ( !_rAnchorTextFrame.IsFollow() )
{
+ // In case the anchor frame is in a column or section, format its
+ // previous frames first - but don't jump out of the current layout
+ // environment, e.g. from footnotes into the footnote boss.
+ SwFrame * pSectFrame(nullptr);
+ SwFrame * pColFrameOfAnchor(nullptr);
+ for (SwFrame* pUpper = _rAnchorTextFrame.GetUpper();
+ pUpper != nullptr; pUpper = pUpper->GetUpper())
+ {
+ if (pUpper->IsCellFrame())
+ {
+ break; // apparently nothing to be done?
+ }
+ if (pUpper->IsFootnoteFrame())
+ {
+ SAL_INFO_IF(pColFrameOfAnchor == nullptr && pUpper->FindColFrame(),
+ "sw.layout", "tdf#122894 skipping column for footnote in column");
+ break; // stop: prevent crash in case footnotes are being moved
+ }
+ if (pUpper->IsSctFrame())
+ {
+ pColFrameOfAnchor = nullptr;
+ pSectFrame = pUpper;
+ break;
+ }
+ if (pColFrameOfAnchor != nullptr)
+ { // parent of column not a section frame => column not in section
+ break;
+ }
+ if (pUpper->IsColumnFrame())
+ {
+ pColFrameOfAnchor = pUpper;
+ }
+ }
+
// if anchor frame is directly inside a section, format this section and
// its previous frames.
// Note: It's a very simple format without formatting objects.
- if ( _rAnchorTextFrame.IsInSct() )
+ if (pSectFrame)
{
- SwFrame* pSectFrame = _rAnchorTextFrame.GetUpper();
- while ( pSectFrame )
- {
- if ( pSectFrame->IsSctFrame() || pSectFrame->IsCellFrame() )
- {
- break;
- }
- pSectFrame = pSectFrame->GetUpper();
- }
- if ( pSectFrame && pSectFrame->IsSctFrame() )
+ assert(pSectFrame->IsSctFrame());
{
SwFrameDeleteGuard aDeleteGuard(&_rAnchorTextFrame);
// #i44049#
@@ -711,6 +737,8 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// Thus, check for valid <pFrame>.
while ( pFrame && pFrame != pSectFrame )
{
+ SwFrameDeleteGuard aDeleteFrameGuard(pFrame);
+
if ( pFrame->IsLayoutFrame() )
lcl_FormatContentOfLayoutFrame( static_cast<SwLayoutFrame*>(pFrame) );
else
@@ -728,9 +756,9 @@ void SwObjectFormatterTextFrame::FormatAnchorFrameAndItsPrevs( SwTextFrame& _rAn
// #i40140# - if anchor frame is inside a column,
// format the content of the previous columns.
// Note: It's a very simple format without formatting objects.
- SwFrame* pColFrameOfAnchor = _rAnchorTextFrame.FindColFrame();
- if ( pColFrameOfAnchor )
+ if (pColFrameOfAnchor)
{
+ assert(pColFrameOfAnchor->IsColumnFrame());
// #i44049#
_rAnchorTextFrame.LockJoin();
SwFrame* pColFrame = pColFrameOfAnchor->GetUpper()->GetLower();
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index a684b1602a1a..867617682f50 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);
@@ -1632,6 +1632,9 @@ void SwRootFrame::AssertFlyPages()
AssertPageFlys(pFirstRevivedEmptyPage);
}
+ //Remove masters that haven't been replaced yet from the list.
+ RemoveMasterObjs( mpDrawPage );
+
#if OSL_DEBUG_LEVEL > 0
pPage = static_cast<SwPageFrame*>(Lower());
while ( pPage && pPage->GetNext() &&
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 9cf90591cd99..d2ebda58f2cc 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>
@@ -1344,13 +1345,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.
@@ -1579,6 +1597,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.
@@ -1838,7 +1858,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() )
@@ -1991,8 +2011,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);
@@ -2021,6 +2039,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();
@@ -2031,8 +2055,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 );
@@ -2060,12 +2082,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 )
{
@@ -2080,15 +2108,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 )
{
@@ -2252,11 +2287,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;
+ }
}
}
@@ -2270,9 +2312,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:
@@ -2513,9 +2552,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
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index f17a7ba68870..c1e85421cce3 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -317,7 +317,7 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib )
mbInfSct ( false ),
mbColLocked(false),
m_isInDestroy(false),
- mbForbidDelete(false)
+ mnForbidDelete(0)
{
OSL_ENSURE( pMod, "No frame format given." );
}
diff --git a/sw/source/core/model/ModelTraverser.cxx b/sw/source/core/model/ModelTraverser.cxx
new file mode 100644
index 000000000000..bb959a95dec6
--- /dev/null
+++ b/sw/source/core/model/ModelTraverser.cxx
@@ -0,0 +1,61 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include <ModelTraverser.hxx>
+#include <node.hxx>
+#include <ndarr.hxx>
+#include <IDocumentDrawModelAccess.hxx>
+#include <svx/svdpage.hxx>
+#include <drawdoc.hxx>
+
+namespace sw
+{
+void ModelTraverser::traverse()
+{
+ if (m_pDoc == nullptr)
+ return;
+
+ auto const& pNodes = m_pDoc->GetNodes();
+ SwNode* pNode = nullptr;
+
+ for (sal_uLong n = 0; n < pNodes.Count(); ++n)
+ {
+ pNode = pNodes[n];
+ if (pNode)
+ {
+ for (auto& pNodeHandler : mpNodeHandler)
+ {
+ pNodeHandler->handleNode(pNode);
+ }
+ }
+ }
+
+ IDocumentDrawModelAccess& rDrawModelAccess = m_pDoc->getIDocumentDrawModelAccess();
+ auto* pModel = rDrawModelAccess.GetDrawModel();
+ for (sal_uInt16 nPage = 0; nPage < pModel->GetPageCount(); ++nPage)
+ {
+ SdrPage* pPage = pModel->GetPage(nPage);
+ for (size_t nObject = 0; nObject < pPage->GetObjCount(); ++nObject)
+ {
+ SdrObject* pObject = pPage->GetObj(nObject);
+ if (pObject)
+ {
+ for (auto& pNodeHandler : mpNodeHandler)
+ {
+ pNodeHandler->handleSdrObject(pObject);
+ }
+ }
+ }
+ }
+}
+
+} // end sw namespace
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 9000d6ef1b9e..c35812eef8bf 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,
@@ -606,18 +646,49 @@ void SwOLENode::CheckFileLink_Impl()
{
try
{
- uno::Reference< embed::XLinkageSupport > xLinkSupport( maOLEObj.m_xOLERef.GetObject(), uno::UNO_QUERY_THROW );
- if ( xLinkSupport->isLink() )
+ uno::Reference<embed::XEmbeddedObject> xObject = maOLEObj.m_xOLERef.GetObject();
+ if (!xObject)
+ return;
+
+ bool bIFrame = false;
+
+ OUString aLinkURL;
+ uno::Reference<embed::XLinkageSupport> xLinkSupport(xObject, uno::UNO_QUERY);
+ if (xLinkSupport)
+ {
+ if (xLinkSupport->isLink())
+ aLinkURL = xLinkSupport->getLinkURL();
+ }
+ else
{
- const OUString aLinkURL = xLinkSupport->getLinkURL();
- if ( !aLinkURL.isEmpty() )
+ // get IFrame (Floating Frames) listed and updatable from the
+ // manage links dialog
+ SvGlobalName aClassId(xObject->getClassID());
+ if (aClassId == SvGlobalName(SO3_IFRAME_CLASSID))
+ {
+ 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
+ {
+ SwEmbedObjectLink* pEmbedObjectLink = nullptr;
+ if (!bIFrame)
+ {
+ pEmbedObjectLink = new SwEmbedObjectLink(this);
+ mpObjectLink = pEmbedObjectLink;
+ }
+ else
{
- // 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();
+ mpObjectLink = new SwIFrameLink(this);
}
+ maLinkURL = aLinkURL;
+ GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL );
+ if (pEmbedObjectLink)
+ pEmbedObjectLink->Connect();
}
}
catch( uno::Exception& )
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 5a099eec65cf..11da5346c4d5 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -2327,6 +2327,7 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
// format contents with the new value assigned and write to paragraph
Color* pCol = nullptr;
OUString sNewText;
+ bool bChangeFormat = true;
if( DBL_MAX == fVal )
{
sNewText = SwViewShell::GetShellRes()->aCalc_Error;
@@ -2351,6 +2352,14 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
#else
sNewText = aOrigText;
#endif
+ // Remove the newly assigned numbering format as well if text actually exists.
+ // Exception: assume user-defined formats are always intentional.
+ if (bChgText && pNumFormatr->IsTextFormat(nOldFormat)
+ && !pNumFormatr->IsUserDefinedAndNotOverloaded(nNewFormat))
+ {
+ pBox->GetFrameFormat()->ResetFormatAttr(RES_BOXATR_FORMAT);
+ bChangeFormat = false;
+ }
}
if( !bChgText )
@@ -2360,9 +2369,11 @@ void SwTableBoxFormat::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew
}
// across all boxes
- ChgTextToNum( *pBox, sNewText, pCol,
+ if (bChangeFormat)
+ {
+ ChgTextToNum( *pBox, sNewText, pCol,
GetDoc()->IsInsTableAlignNum() );
-
+ }
}
else if( bNewIsTextFormat && nOldFormat != nNewFormat )
{
diff --git a/sw/source/core/text/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 4e57a0b64d90..e986b5b675af 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();
@@ -2495,7 +2502,11 @@ SwFlyCntPortion *SwTextFormatter::NewFlyCntPortion( SwTextFormatInfo &rInf,
SwFlyInContentFrame *pFly;
SwFrameFormat* pFrameFormat = static_cast<SwTextFlyCnt*>(pHint)->GetFlyCnt().GetFrameFormat();
if( RES_FLYFRMFMT == pFrameFormat->Which() )
+ {
+ // set Lock pFrame to avoid m_pCurr getting deleted
+ TextFrameLockGuard aGuard(m_pFrame);
pFly = static_cast<SwTextFlyCnt*>(pHint)->GetFlyFrame(pFrame);
+ }
else
pFly = nullptr;
// aBase is the document-global position, from which the new extra portion is placed
diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
index c9a14f566741..ceabbabeb47b 100644
--- a/sw/source/core/text/itrform2.hxx
+++ b/sw/source/core/text/itrform2.hxx
@@ -238,6 +238,8 @@ public:
* @param rInf contain information
**/
void MergeCharacterBorder( SwLinePortion& rPortion, SwLinePortion const *pPrev, SwTextFormatInfo& rInf );
+
+ bool ClearIfIsFirstOfBorderMerge(SwLinePortion const *pPortion);
};
#endif
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 11338d9a8c39..5872e5688ba1 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -173,9 +173,18 @@ SwFieldSlot::SwFieldSlot( const SwTextFormatInfo* pNew, const SwFieldPortion *pP
pInf->SetFakeLineStart( nIdx > pInf->GetLineStart() );
pInf->SetIdx(TextFrameIndex(0));
}
- else if (nIdx < TextFrameIndex(pOldText->getLength()))
+ else
{
- aText = (*pOldText).replaceAt(sal_Int32(nIdx), 1, aText);
+ TextFrameIndex nEnd(pOldText->getLength());
+ if (nIdx < nEnd)
+ {
+ //sal_Int32 const nFieldLen(pPor->GetFieldLen());
+ aText = (*pOldText).replaceAt(sal_Int32(nIdx), 1/*nFieldLen*/, aText);
+ }
+ else if (nIdx == nEnd)
+ aText = *pOldText + aText;
+ else
+ SAL_WARN("sw.core", "SwFieldSlot bad SwFieldPortion index.");
}
pInf->SetText( aText );
}
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 2bb9e87bd2c9..98e7b0255d70 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;
}
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 46957b4448f8..b8d450779ee7 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -2973,7 +2973,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/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/undobj.cxx b/sw/source/core/undo/undobj.cxx
index fa86072a3008..3fe7f107f052 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1168,7 +1168,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark,
&& ( bSaveOtherPos
|| !pBkmk->IsExpanded() ) )
{
- pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n);
+ pMarkAccess->deleteMark(pMarkAccess->getAllMarksBegin()+n, false);
n--;
}
}
@@ -1558,9 +1558,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/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index e2e5c9411715..60dc135caa3f 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2078,7 +2078,8 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
aAny <<= pGrfNode->GetGrf().GetXGraphic();
}
}
- else if( FN_UNO_TRANSFORMED_GRAPHIC == pEntry->nWID )
+ else if( FN_UNO_TRANSFORMED_GRAPHIC == pEntry->nWID
+ || FN_UNO_GRAPHIC_PREVIEW == pEntry->nWID )
{
const SwNodeIndex* pIdx = pFormat->GetContent().GetContentIdx();
if(pIdx)
@@ -2102,6 +2103,19 @@ uno::Any SwXFrame::getPropertyValue(const OUString& rPropertyName)
awt::Size aFrameSize = getSize();
Size aSize100thmm(aFrameSize.Width, aFrameSize.Height);
Size aSize = OutputDevice::LogicToLogic(aSize100thmm, MapMode(MapUnit::Map100thMM), aGraphicObj.GetPrefMapMode());
+
+ if (FN_UNO_GRAPHIC_PREVIEW == pEntry->nWID)
+ {
+ double fX = static_cast<double>(aSize.getWidth()) / 1280;
+ double fY = static_cast<double>(aSize.getHeight()) / 720;
+ double fFactor = fX > fY ? fX : fY;
+ if (fFactor > 1.0)
+ {
+ aSize.setWidth(aSize.getWidth() / fFactor);
+ aSize.setHeight(aSize.getHeight() / fFactor);
+ }
+ }
+
Graphic aGraphic = aGraphicObj.GetTransformedGraphic(aSize, aGraphicObj.GetPrefMapMode(), aGraphicAttr);
aAny <<= aGraphic.GetXGraphic();
}
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/unomap1.cxx b/sw/source/core/unocore/unomap1.cxx
index 08c97f878703..5ee500c17776 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -858,6 +858,7 @@ const SfxItemPropertyMapEntry* SwUnoPropertyMapProvider::GetGraphicPropertyMap(
{ OUString(UNO_NAME_GRAPHIC), FN_UNO_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
{ OUString(UNO_NAME_GRAPHIC_URL), FN_UNO_GRAPHIC_URL, cppu::UnoType<css::uno::Any>::get(), 0, 0 },
{ OUString(UNO_NAME_TRANSFORMED_GRAPHIC), FN_UNO_TRANSFORMED_GRAPHIC, cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
+ { OUString(UNO_NAME_GRAPHIC_PREVIEW), FN_UNO_GRAPHIC_PREVIEW, cppu::UnoType<css::graphic::XGraphic>::get(), 0, 0 },
{ OUString(UNO_NAME_ACTUAL_SIZE), FN_UNO_ACTUAL_SIZE, cppu::UnoType<css::awt::Size>::get(), PropertyAttribute::READONLY, CONVERT_TWIPS},
{ OUString(UNO_NAME_CONTOUR_POLY_POLYGON), FN_PARAM_CONTOUR_PP, cppu::UnoType<css::drawing::PointSequenceSequence>::get(), PropertyAttribute::MAYBEVOID, 0 },
{ OUString(UNO_NAME_IS_PIXEL_CONTOUR), FN_UNO_IS_PIXEL_CONTOUR, cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 1f68135f7a4a..f931f16a8d09 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,8 +1784,8 @@ void SwXNumberingRules::SetPropertiesToNumFormat(
{
OUString sBulletFontName;
rProp.Value >>= sBulletFontName;
- SwDocShell* pLclDocShell = pDoc->GetDocShell();
- if( !sBulletFontName.isEmpty() && pLclDocShell )
+ SwDocShell *const pLclDocShell = pDocShell ? pDocShell : pDoc ? pDoc->GetDocShell() : nullptr;
+ if (!sBulletFontName.isEmpty() && pLclDocShell)
{
const SvxFontListItem* pFontListItem =
static_cast<const SvxFontListItem* >(pLclDocShell
@@ -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/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index bf160861ee3c..0a87c1672f97 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -418,7 +418,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
// seems to work (and does technically) but fails with transparent objects. Since the
// region given to BeginDarwLayers() defines the clip region for DrawingLayer paint,
// transparent objects in the single rectangles will indeed be painted multiple times.
- DLPrePaint2(vcl::Region(aRect.SVRect()));
+ if (!comphelper::LibreOfficeKit::isActive())
+ {
+ DLPrePaint2(vcl::Region(aRect.SVRect()));
+ }
if ( bPaintsFromSystem )
PaintDesktop(*GetOut(), aRect);
@@ -428,7 +431,10 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd )
pCurrentLayout->GetCurrShell()->InvalidateWindows(aRect.SVRect());
// #i75172# end DrawingLayer paint
- DLPostPaint2(true);
+ if (!comphelper::LibreOfficeKit::isActive())
+ {
+ DLPostPaint2(true);
+ }
}
}
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 62b0071e13c3..26abd886e42f 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -93,6 +93,7 @@
#include <o3tl/typed_flags_set.hxx>
#include <rtl/strbuf.hxx>
+#include <rtl/xmlencode.hxx>
using namespace css;
using editeng::SvxBorderLine;
@@ -1099,7 +1100,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
while( nStrPos != -1 )
{
OUString aName = rName.getToken( 0, ';', nStrPos );
- aName = comphelper::string::strip(aName, ' ');
+ aName = rtl::encodeForXml(comphelper::string::strip(aName, ' '));
if( aName.isEmpty() )
continue;
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 2f153fdd3b79..e93499799a74 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -23,6 +23,7 @@
#include <svtools/htmlkywd.hxx>
#include <svtools/htmlout.hxx>
#include <svtools/htmltokn.h>
+#include <rtl/xmlencode.hxx>
#include <osl/diagnose.h>
#include <fmtfld.hxx>
#include <doc.hxx>
@@ -513,7 +514,7 @@ Writer& OutHTML_SwFormatField( Writer& rWrt, const SfxPoolItem& rHt )
OString sOut =
"<" OOO_STRING_SVTOOLS_HTML_comment
" " +
- OUStringToOString(sComment, static_cast<SwHTMLWriter&>(rWrt).m_eDestEnc) +
+ OUStringToOString(rtl::encodeForXml(sComment), static_cast<SwHTMLWriter&>(rWrt).m_eDestEnc) +
" -->";
rWrt.Strm().WriteOString( sOut );
}
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index ce22cfcd274e..4cbc2bea141d 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).GetProtocol() == INetProtocol::Macro)
+ NotifyMacroEventRead();
+
+ xSet->setPropertyValue("FrameURL", uno::makeAny( sHRef ) );
xSet->setPropertyValue("FrameName", uno::makeAny( aName ) );
if ( eScroll == ScrollingMode::Auto )
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index ce689df01b9d..670ed3ae7aeb 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -34,6 +34,7 @@
#include <svtools/htmlkywd.hxx>
#include <svl/urihelper.hxx>
#include <svl/listener.hxx>
+#include <svx/sdrobjectuser.hxx>
#include <sal/log.hxx>
#include <dcontact.hxx>
@@ -372,7 +373,7 @@ typedef std::vector<HTMLTableColumn> HTMLTableColumns;
typedef std::vector<SdrObject *> SdrObjects;
-class HTMLTable
+class HTMLTable : public sdr::ObjectUser
{
OUString m_aId;
OUString m_aStyle;
@@ -520,6 +521,8 @@ private:
sal_uInt16 GetBorderWidth( const SvxBorderLine& rBLine,
bool bWithDistance=false ) const;
+ virtual void ObjectInDestruction(const SdrObject& rObject) override;
+
public:
bool m_bFirstCell; // is there a cell created already?
@@ -529,7 +532,7 @@ public:
bool bHasToFly,
const HTMLTableOptions& rOptions);
- ~HTMLTable();
+ virtual ~HTMLTable();
// Identifying of a cell
const HTMLTableCell& GetCell(sal_uInt16 nRow, sal_uInt16 nCell) const;
@@ -1065,11 +1068,33 @@ bool SwHTMLParser::IsReqIF() const
return m_bReqIF;
}
+// if any m_pResizeDrawObjects members are deleted during parse, remove them
+// from m_pResizeDrawObjects and m_pDrawObjectPrcWidths
+void HTMLTable::ObjectInDestruction(const SdrObject& rObject)
+{
+ auto it = std::find(m_pResizeDrawObjects->begin(), m_pResizeDrawObjects->end(), &rObject);
+ assert(it != m_pResizeDrawObjects->end());
+ auto nIndex = std::distance(m_pResizeDrawObjects->begin(), it);
+ m_pResizeDrawObjects->erase(it);
+ auto otherit = m_pDrawObjectPrcWidths->begin() + nIndex * 3;
+ m_pDrawObjectPrcWidths->erase(otherit, otherit + 3);
+}
+
HTMLTable::~HTMLTable()
{
m_pParser->DeregisterHTMLTable(this);
- m_pResizeDrawObjects.reset();
+ if (m_pResizeDrawObjects)
+ {
+ size_t nCount = m_pResizeDrawObjects->size();
+ for (size_t i = 0; i < nCount; ++i)
+ {
+ SdrObject *pObj = (*m_pResizeDrawObjects)[i];
+ pObj->RemoveObjectUser(*this);
+ }
+ m_pResizeDrawObjects.reset();
+ }
+
m_pDrawObjectPrcWidths.reset();
m_pContext.reset();
@@ -2483,6 +2508,7 @@ void HTMLTable::RegisterDrawObject( SdrObject *pObj, sal_uInt8 nPrcWidth )
if( !m_pResizeDrawObjects )
m_pResizeDrawObjects.reset(new SdrObjects);
m_pResizeDrawObjects->push_back( pObj );
+ pObj->AddObjectUser(*this);
if( !m_pDrawObjectPrcWidths )
m_pDrawObjectPrcWidths.reset(new std::vector<sal_uInt16>);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 7310e7d5f395..76a8ab0187bd 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -312,6 +312,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)
{
@@ -450,7 +472,7 @@ sal_Int32 DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
// 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())
@@ -460,17 +482,16 @@ sal_Int32 DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p
{
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;
@@ -574,14 +595,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)
@@ -659,7 +936,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>);
@@ -671,11 +948,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);
@@ -761,11 +1037,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)
@@ -777,15 +1052,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
@@ -813,107 +1098,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)
@@ -1349,7 +1533,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 );
@@ -1383,12 +1570,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 )
@@ -1414,7 +1600,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 );
@@ -1546,23 +1734,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);
}
@@ -1921,7 +2108,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);
@@ -1942,8 +2129,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);
@@ -2019,6 +2262,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 )
{
@@ -2046,7 +2290,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)
{
@@ -2055,8 +2303,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);
@@ -2270,7 +2530,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
@@ -2278,7 +2538,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 )
{
@@ -2736,7 +3004,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;
}
@@ -5873,8 +6141,8 @@ 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;
}
void DocxAttributeOutput::popFromTableExportContext(DocxTableExportContext const & rContext)
@@ -5882,7 +6150,7 @@ 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;
}
void DocxAttributeOutput::WriteTextBox(uno::Reference<drawing::XShape> xShape)
@@ -6213,11 +6481,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);
}
}
@@ -9137,102 +9404,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")
{
@@ -9363,72 +9536,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);
@@ -9441,8 +9556,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() ),
@@ -9488,10 +9601,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
@@ -9554,26 +9664,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 dd91f1668e10..0f8c1bc689b6 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
{
@@ -710,16 +741,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();
@@ -731,9 +754,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;
@@ -742,10 +762,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;
sal_uInt8 m_nCharTransparence = 0;
@@ -969,24 +985,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::vector<std::map<SvxBoxItemLine, css::table::BorderLine2>> m_aTableStyleConfs;
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 4e26362f6ed3..8c06db88a762 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -34,7 +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>
@@ -50,6 +55,8 @@
#include <map>
#include <algorithm>
+#include <condition_variable>
+#include <mutex>
#include <IMark.hxx>
#include <IDocumentSettingAccess.hxx>
@@ -1375,6 +1382,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 matches sdtData.xpath, replace its 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 );
@@ -1410,10 +1488,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())
@@ -1626,7 +1748,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 93482cc8344d..570050a7bca0 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/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index e84d84e1c35f..8e808b93289a 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -153,13 +153,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();
@@ -175,7 +175,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
}
@@ -284,19 +284,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() ;
@@ -309,7 +309,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"))
@@ -349,8 +349,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();
@@ -614,8 +614,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;
@@ -704,7 +704,7 @@ void MSWordStyles::OutputStylesTable()
if (m_aNumRules.find(n) != m_aNumRules.end())
OutputStyle(m_aNumRules[n], n);
else
- OutputStyle( m_pFormatA[n], n );
+ OutputStyle(m_aFormatA[n], n);
}
m_rExport.AttrOutput().EndStyles( m_nUsedSlots );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 8a9ae600ac77..408baf0694f0 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1581,7 +1581,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.
@@ -1632,7 +1632,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/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 2dca982deeff..eaf31d9f0fc3 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1997,7 +1997,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)),
@@ -2081,12 +2081,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 cf90848fc619..63196280db89 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -591,7 +591,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;
@@ -619,7 +619,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 };
@@ -925,6 +925,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 4fb74703ee2b..a2c8bc832ab8 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2753,8 +2753,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 0c6b89b1bd5a..cb15bbd96aa4 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2455,6 +2455,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/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 3e7a10dfca4f..58ca9418c681 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -2024,7 +2024,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( ( pNumFormat != nullptr ) && ( pNumFormat->GetValue() == 0 ) )
+ if (pNumFormat && (pNumFormat->GetValue() % SV_COUNTRY_LANGUAGE_OFFSET) == 0)
{
// only one text node?
SwNodeIndex aNodeIndex( *(pCell->GetStartNode()), 1 );
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index 788bec5c2d47..169cbdc1534d 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).GetProtocol() == INetProtocol::Macro)
+ GetXMLImport().NotifyMacroEventRead();
+
xSet->setPropertyValue("FrameURL",
- makeAny( URIHelper::SmartRel2Abs(
- INetURLObject( GetXMLImport().GetBaseURL() ), rHRef ) ) );
+ makeAny( sHRef ) );
xSet->setPropertyValue("FrameName",
makeAny( rName ) );
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index e4147262859e..44ce60cd531f 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -34,6 +34,7 @@
#include <sfx2/filedlghelper.hxx>
#include <editeng/sizeitem.hxx>
#include <svtools/htmlcfg.hxx>
+#include <comphelper/lok.hxx>
#include <uitool.hxx>
#include <IMark.hxx>
@@ -401,6 +402,19 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh)
m_xTree->show();
bDontCheckPasswd = false;
+
+ if(comphelper::LibreOfficeKit::isActive())
+ {
+ m_xBuilder->weld_label("label8")->hide(); // Link
+ m_xFileCB->hide();
+ m_xDDECB->hide();
+ m_xDDECommandFT->hide();
+ m_xFileNameFT->hide();
+ m_xFileNameED->hide();
+ m_xFilePB->hide();
+ m_xSubRegionFT->hide();
+ m_xSubRegionED->hide();
+ }
}
bool SwEditRegionDlg::CheckPasswd(weld::ToggleButton* pBox)
@@ -1509,6 +1523,21 @@ SwInsertSectionTabPage::SwInsertSectionTabPage(weld::Container* pPage, weld::Dia
m_xDDECB->connect_toggled( LINK( this, SwInsertSectionTabPage, DDEHdl ));
ChangeProtectHdl(*m_xProtectCB);
m_xSubRegionED->set_entry_completion(true, true);
+
+ // Hide Link section. In general it makes no sense to insert a file from the jail,
+ // because it does not contain any usable files (documents).
+ if(comphelper::LibreOfficeKit::isActive())
+ {
+ m_xBuilder->weld_label("label1")->hide(); // Link
+ m_xFileCB->hide();
+ m_xDDECB->hide();
+ m_xDDECommandFT->hide();
+ m_xFileNameFT->hide();
+ m_xFileNameED->hide();
+ m_xFilePB->hide();
+ m_xSubRegionFT->hide();
+ m_xSubRegionED->hide();
+ }
}
SwInsertSectionTabPage::~SwInsertSectionTabPage()
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 8c1bb998fb85..5a0a8022262a 100644
--- a/sw/source/ui/fldui/fldtdlg.cxx
+++ b/sw/source/ui/fldui/fldtdlg.cxx
@@ -40,6 +40,7 @@
#include <view.hxx>
#include <fldtdlg.hxx>
#include <swmodule.hxx>
+#include <comphelper/lok.hxx>
#include <globals.hrc>
@@ -93,6 +94,9 @@ SwFieldDlg::SwFieldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, weld::Window *pP
RemoveTabPage("functions");
RemoveTabPage("database");
}
+
+ if (comphelper::LibreOfficeKit::isActive())
+ RemoveTabPage("database");
}
SwFieldDlg::~SwFieldDlg()
diff --git a/sw/source/ui/frmdlg/frmdlg.cxx b/sw/source/ui/frmdlg/frmdlg.cxx
index ca59c421b394..d591cef7b264 100644
--- a/sw/source/ui/frmdlg/frmdlg.cxx
+++ b/sw/source/ui/frmdlg/frmdlg.cxx
@@ -32,6 +32,7 @@
#include <wrap.hxx>
#include <column.hxx>
#include <macassgn.hxx>
+#include <IDocumentSettingAccess.hxx>
#include <globals.hrc>
#include <strings.hrc>
@@ -194,6 +195,12 @@ void SwFrameDlg::PageCreated(const OString& rId, SfxTabPage &rPage)
{
rPage.PageCreated(m_rSet);
}
+ else if (rId == "crop")
+ {
+ sal_Int32 nPreferredDPI = m_pWrtShell->GetDoc()->getIDocumentSettingAccess().getImagePreferredDPI();
+ if (nPreferredDPI)
+ rPage.getAdditionalProperties().emplace("PreferredDPI", css::uno::makeAny(nPreferredDPI));
+ }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index cf872d5465f3..ed0c24b752af 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();
diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx
index 8571794b2c7c..413a945c56b3 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 e58f95a95ccb..06ceed6d8b41 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -4262,7 +4262,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(
@@ -4297,7 +4297,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/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx
index 9b57616ba89f..ee118f29b496 100644
--- a/sw/source/uibase/docvw/SidebarScrollBar.cxx
+++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx
@@ -54,9 +54,8 @@ void SidebarScrollBar::LogicInvalidate(const tools::Rectangle* pRectangle)
rParent.Pop();
aRectangle.Move(aOffset.getX(), aOffset.getY());
- OString sRectangle = aRectangle.toString();
SwWrtShell& rWrtShell = m_rView.GetWrtShell();
- SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), sRectangle);
+ SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), &aRectangle);
}
void SidebarScrollBar::MouseButtonUp(const MouseEvent& /*rMouseEvent*/)
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index bdbb0e2804e4..9598b607bff1 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -214,9 +214,8 @@ void SidebarTextControl::LogicInvalidate(const tools::Rectangle* pRectangle)
rParent.Pop();
aRectangle.Move(aOffset.getX(), aOffset.getY());
- OString sRectangle = aRectangle.toString();
SwWrtShell& rWrtShell = mrDocView.GetWrtShell();
- SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), sRectangle);
+ SfxLokHelper::notifyInvalidation(rWrtShell.GetSfxViewShell(), &aRectangle);
}
void SidebarTextControl::KeyInput( const KeyEvent& rKeyEvt )
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index facc9e95bda0..4f4cd8a6b754 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -6356,13 +6356,7 @@ Selection SwEditWin::GetSurroundingTextSelection() const
void SwEditWin::LogicInvalidate(const tools::Rectangle* pRectangle)
{
- OString sRectangle;
- if (!pRectangle)
- sRectangle = "EMPTY";
- else
- sRectangle = pRectangle->toString();
-
- SfxLokHelper::notifyInvalidation(&m_rView, sRectangle);
+ SfxLokHelper::notifyInvalidation(&m_rView, pRectangle);
}
void SwEditWin::LogicMouseButtonDown(const MouseEvent& rMouseEvent)
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 00607bc3eb8c..2f0893e06136 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -104,7 +104,7 @@
#include <instable.hxx>
#include <svx/fmshell.hxx>
#include <SwRewriter.hxx>
-#include <unomid.h>
+#include <GraphicSizeCheck.hxx>
#include <svx/galleryitem.hxx>
#include <com/sun/star/gallery/GalleryItemType.hpp>
#include <memory>
@@ -1870,6 +1870,13 @@ void SwBaseShell::GetState( SfxItemSet &rSet )
else
rSet.Put( SfxVisibilityItem( nWhich, false ) );
break;
+ case SID_GRAPHIC_SIZE_CHECK:
+ {
+ sal_Int32 nDPI = rSh.GetDoc()->getIDocumentSettingAccess().getImagePreferredDPI();
+ if (nDPI <= 0)
+ rSet.DisableItem(nWhich);
+ }
+ break;
}
nWhich = aIter.NextWhich();
}
@@ -2676,6 +2683,14 @@ void SwBaseShell::ExecDlg(SfxRequest &rReq)
}
}
break;
+ case SID_GRAPHIC_SIZE_CHECK:
+ {
+ sw::GraphicSizeCheckGUIResult aResult(rSh.GetDoc());
+ svx::GenericCheckDialog aDialog(pMDI, aResult);
+ aDialog.run();
+ }
+ break;
+
default:OSL_FAIL("wrong Dispatcher (basesh.cxx)");
}
if(!bDone)
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 44fa64318acb..d0c70582bb18 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -718,7 +718,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;
}
@@ -1488,12 +1488,14 @@ void SwTextShell::Execute(SfxRequest &rReq)
else if (sApplyText == sSpellingType)
{
SwRect aToFill;
- uno::Reference< linguistic2::XSpellAlternatives > xSpellAlt( rWrtSh.GetCorrection(nullptr, aToFill) );
+ uno::Reference<linguistic2::XSpellAlternatives> xSpellAlt(rWrtSh.GetCorrection(nullptr, aToFill));
+ if (!xSpellAlt.is())
+ return;
uno::Reference< linguistic2::XDictionary > xDictionary = LinguMgr::GetIgnoreAllList();
OUString sWord(xSpellAlt->getWord());
linguistic::DictionaryError nAddRes = linguistic::AddEntryToDic( xDictionary,
sWord, false, OUString() );
- if (linguistic::DictionaryError::NONE != nAddRes && !xDictionary->getEntry(sWord).is())
+ if (linguistic::DictionaryError::NONE != nAddRes && xDictionary.is() && !xDictionary->getEntry(sWord).is())
{
SvxDicError(rWrtSh.GetView().GetFrameWeld(), nAddRes);
}
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index 9dc6d467f941..ee6b5d66de1c 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -292,6 +292,8 @@ SwClipboardChangeListener::~SwClipboardChangeListener()
void SAL_CALL SwClipboardChangeListener::disposing( const EventObject& /*rEventObject*/ )
{
+ SolarMutexGuard aGuard;
+ pView = nullptr; // so we don't touch the view if changedContents somehow fires afterwards
}
void SAL_CALL SwClipboardChangeListener::changedContents( const css::datatransfer::clipboard::ClipboardEvent& rEventObject )
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 1e2356884137..9820b695d7cb 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1309,6 +1309,11 @@ void SwView::Execute(SfxRequest &rReq)
const sal_uLong newPosY = newPosYTwips->GetValue();
const Point mPoint(newPosX, newPosY);
const SdrHdl* handle = pSdrView->GetHdlList().GetHdl(handleNum);
+ if (!handle)
+ {
+ break;
+ }
+
if (handle->GetKind() == SdrHdlKind::Anchor || handle->GetKind() == SdrHdlKind::Anchor_TR)
m_pWrtShell->FindAnchorPos(mPoint, /*bMoveIt=*/true);
else
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index 7a2f8c852625..4edf541aa973 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -1112,24 +1112,30 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
if (sType == "column-left")
{
- auto & rEntry = aTabCols.GetEntry(0);
- long nNewPosition = aTabCols.GetLeft() + long(nOffset);
- long nPosition = std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
- aTabCols.SetLeft(nPosition);
+ long nNewPosition = aTabCols.GetLeft() + nOffset;
+ if(aTabCols.Count() > 0)
+ {
+ auto & rEntry = aTabCols.GetEntry(0);
+ nNewPosition = std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
+ }
+ aTabCols.SetLeft(nNewPosition);
}
else if (sType == "column-right")
{
- auto & rEntry = aTabCols.GetEntry(aTabCols.Count() - 1);
- long nNewPosition = aTabCols.GetRight() + long(nOffset);
- long nPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
- aTabCols.SetRight(nPosition);
+ long nNewPosition = aTabCols.GetRight() + nOffset;
+ if(aTabCols.Count() > 0)
+ {
+ auto & rEntry = aTabCols.GetEntry(aTabCols.Count() - 1);
+ nNewPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
+ }
+ aTabCols.SetRight(nNewPosition);
}
else if (sType == "column-middle" && nIndex < aTabCols.Count())
{
auto & rEntry = aTabCols.GetEntry(nIndex);
- long nNewPosition = rEntry.nPos + long(nOffset);
- long nPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
- rEntry.nPos = nPosition;
+ long nNewPosition = rEntry.nPos + nOffset;
+ nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
+ rEntry.nPos = nNewPosition;
}
rSh.SetTabCols(aTabCols, false);
@@ -1142,23 +1148,26 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
if (sType == "row-left")
{
auto & rEntry = aTabRows.GetEntry(0);
- long nNewPosition = aTabRows.GetLeft() + long(nOffset);
- long nPosition = std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
- aTabRows.SetLeft(nPosition);
+ long nNewPosition = aTabRows.GetLeft() + nOffset;
+ nNewPosition = std::min(nNewPosition, rEntry.nPos - constDistanceOffset);
+ aTabRows.SetLeft(nNewPosition);
}
else if (sType == "row-right")
{
- auto & rEntry = aTabRows.GetEntry(aTabRows.Count() - 1);
- long nNewPosition = aTabRows.GetRight() + long(nOffset);
- long nPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
- aTabRows.SetRight(nPosition);
+ long nNewPosition = aTabRows.GetRight() + nOffset;
+ if(aTabRows.Count() > 0)
+ {
+ auto & rEntry = aTabRows.GetEntry(aTabRows.Count() - 1);
+ nNewPosition = std::max(nNewPosition, rEntry.nPos + constDistanceOffset);
+ }
+ aTabRows.SetRight(nNewPosition);
}
else if (sType == "row-middle" && nIndex < aTabRows.Count())
{
auto & rEntry = aTabRows.GetEntry(nIndex);
- long nNewPosition = rEntry.nPos + long(nOffset);
- long nPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
- rEntry.nPos = nPosition;
+ long nNewPosition = rEntry.nPos + nOffset;
+ nNewPosition = std::clamp(nNewPosition, rEntry.nMin, rEntry.nMax - constDistanceOffset);
+ rEntry.nPos = nNewPosition;
}
rSh.SetTabRows(aTabRows, false);
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index b33be85354f2..458123d88871 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -148,6 +148,7 @@ enum SwDocumentSettingsPropertyHandles
HANDLE_CONTINUOUS_ENDNOTES,
HANDLE_HEADER_SPACING_BELOW_LAST_PARA,
HANDLE_GUTTER_AT_TOP,
+ HANDLE_IMAGE_PREFERRED_DPI,
};
static MasterPropertySetInfo * lcl_createSettingsInfo()
@@ -237,6 +238,7 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
{ OUString("ContinuousEndnotes"), HANDLE_CONTINUOUS_ENDNOTES, cppu::UnoType<bool>::get(), 0 },
{ OUString("HeaderSpacingBelowLastPara"), HANDLE_HEADER_SPACING_BELOW_LAST_PARA, cppu::UnoType<bool>::get(), 0 },
{ OUString("GutterAtTop"), HANDLE_GUTTER_AT_TOP, cppu::UnoType<bool>::get(), 0 },
+ { OUString("ImagePreferredDPI"), HANDLE_IMAGE_PREFERRED_DPI, cppu::UnoType<sal_Int32>::get(), 0 },
/*
* As OS said, we don't have a view when we need to set this, so I have to
@@ -977,6 +979,16 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
}
}
break;
+ case HANDLE_IMAGE_PREFERRED_DPI:
+ {
+ sal_uInt32 nValue = 0;
+ if (rValue >>= nValue)
+ {
+ mpDoc->getIDocumentSettingAccess().setImagePreferredDPI(nValue);
+ }
+ }
+ break;
+
default:
throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
}
@@ -1460,6 +1472,11 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::GUTTER_AT_TOP);
}
break;
+ case HANDLE_IMAGE_PREFERRED_DPI:
+ {
+ rValue <<= mpDoc->getIDocumentSettingAccess().getImagePreferredDPI();
+ }
+ break;
default:
throw UnknownPropertyException(OUString::number(rInfo.mnHandle));
}
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 0a5fec9a18d5..bec5f57762eb 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3556,6 +3556,11 @@ void SwXTextDocument::postMouseEvent(int nType, int nX, int nY, int nCount, int
SolarMutexGuard aGuard;
SwViewShell* pWrtViewShell = pDocShell->GetWrtShell();
+ if (!pWrtViewShell)
+ {
+ return;
+ }
+
SwViewOption aOption(*(pWrtViewShell->GetViewOptions()));
double fScale = aOption.GetZoom() / (TWIPS_PER_PIXEL * 100.0);
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 06c4795a6531..aa2ec930a743 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3555,7 +3555,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/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 077a1b5f2968..87e33096ffa5 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -344,8 +344,23 @@ void SwWrtShell::Insert( const OUString &rPath, const OUString &rFilter,
if( bSetGrfSize )
{
- Size aGrfSize, aBound = GetGraphicDefaultSize();
- GetGrfSize( aGrfSize );
+ Size aSizePixel = rGrf.GetSizePixel();
+ Size aBound = GetGraphicDefaultSize();
+
+ sal_Int32 nPreferredDPI = mxDoc->getIDocumentSettingAccess().getImagePreferredDPI();
+ Size aGrfSize;
+
+ if (nPreferredDPI > 0)
+ {
+ constexpr double fTwipsInAnInch = 1444.0;
+ auto nWidth = (aSizePixel.Width() / double(nPreferredDPI)) * fTwipsInAnInch;
+ auto nHeight = (aSizePixel.Height() / double(nPreferredDPI)) * fTwipsInAnInch;
+ aGrfSize = Size(nWidth, nHeight);
+ }
+ else
+ {
+ GetGrfSize(aGrfSize);
+ }
// Add the margin attributes to GrfSize,
// because these counts at the margin additionally
diff --git a/sw/uiconfig/sglobal/menubar/menubar.xml b/sw/uiconfig/sglobal/menubar/menubar.xml
index fcd660e9ad51..658d795f3e4c 100644
--- a/sw/uiconfig/sglobal/menubar/menubar.xml
+++ b/sw/uiconfig/sglobal/menubar/menubar.xml
@@ -479,6 +479,7 @@
<menu:menuitem menu:id=".uno:ColorSettings"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicSizeCheck"/>
</menu:menupopup>
</menu:menu>
<menu:menu menu:id=".uno:FormatObjectMenu">
diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml
index dc0aac9e3f19..0c18afa0ccdc 100644
--- a/sw/uiconfig/swriter/menubar/menubar.xml
+++ b/sw/uiconfig/swriter/menubar/menubar.xml
@@ -487,6 +487,7 @@
<menu:menuitem menu:id=".uno:ColorSettings"/>
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:GraphicDialog"/>
+ <menu:menuitem menu:id=".uno:GraphicSizeCheck"/>
</menu:menupopup>
</menu:menu>
<menu:menu menu:id=".uno:FormatObjectMenu">
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec
index ea618ca4ab77..e49833814b71 100644
--- a/sysui/desktop/freedesktop/freedesktop-menus.spec
+++ b/sysui/desktop/freedesktop/freedesktop-menus.spec
@@ -33,7 +33,7 @@ Conflicts: %pkgprefix-mandriva-menus
BuildArch: noarch
AutoReqProv: no
%define _binary_filedigest_algorithm 1
-%define _binary_payload w9.gzdio
+%define _binary_payload w1T.xzdio
%define gnome_dir /usr
%define gnome_mime_theme hicolor
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/tools/qa/cppunit/test_json_writer.cxx b/tools/qa/cppunit/test_json_writer.cxx
index 6a2cc7813574..6ff2810d79d4 100644
--- a/tools/qa/cppunit/test_json_writer.cxx
+++ b/tools/qa/cppunit/test_json_writer.cxx
@@ -58,7 +58,7 @@ void JsonWriterTest::test1()
std::unique_ptr<char, Free> result(aJson.extractData());
CPPUNIT_ASSERT_EQUAL(std::string("{ \"node\": { \"oustring\": \"val1\", \"ostring\": \"val2\", "
- "\"charptr\": \"val3\", \"int\": 12}}"),
+ "\"charptr\": \"val3\", \"int\": \"12\"}}"),
std::string(result.get()));
}
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index 7c182818c460..d7360af6419c 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -29,12 +29,10 @@
OString Pair::toString() const
{
- std::stringstream ss;
// Note that this is not just used for debugging output but the
// format is parsed by external code (passed in callbacks to
// LibreOfficeKit clients). So don't change.
- ss << A() << ", " << B();
- return ss.str().c_str();
+ return OString::number(A()) + ", " + OString::number(B());
}
void tools::Rectangle::SetSize( const Size& rSize )
@@ -185,12 +183,10 @@ bool tools::Rectangle::IsOver( const tools::Rectangle& rRect ) const
OString tools::Rectangle::toString() const
{
- std::stringstream ss;
// Note that this is not just used for debugging output but the
// format is parsed by external code (passed in callbacks to
// LibreOfficeKit clients). So don't change.
- ss << getX() << ", " << getY() << ", " << getWidth() << ", " << getHeight();
- return ss.str().c_str();
+ return OString::number(getX()) + ", " + OString::number(getY()) + ", " + OString::number(getWidth()) + ", " + OString::number(getHeight());
}
void tools::Rectangle::expand(long nExpandBy)
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/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx
index 9319db2799bc..aa78b44549da 100644
--- a/tools/source/misc/json_writer.cxx
+++ b/tools/source/misc/json_writer.cxx
@@ -121,7 +121,7 @@ void JsonWriter::endStruct()
void JsonWriter::put(const char* pPropName, const OUString& rPropVal)
{
auto nPropNameLength = strlen(pPropName);
- auto nWorstCasePropValLength = rPropVal.getLength() * 2;
+ auto nWorstCasePropValLength = rPropVal.getLength() * 3;
ensureSpace(nPropNameLength + nWorstCasePropValLength + 8);
addCommaBeforeField();
@@ -159,6 +159,13 @@ void JsonWriter::put(const char* pPropName, const OUString& rPropVal)
*mPos = 'n';
++mPos;
}
+ else if (ch == '\t')
+ {
+ *mPos = '\\';
+ ++mPos;
+ *mPos = 't';
+ ++mPos;
+ }
else if (ch == '\r')
{
*mPos = '\\';
@@ -214,7 +221,7 @@ void JsonWriter::put(const char* pPropName, const OUString& rPropVal)
void JsonWriter::put(const char* pPropName, const OString& rPropVal)
{
auto nPropNameLength = strlen(pPropName);
- auto nWorstCasePropValLength = rPropVal.getLength();
+ auto nWorstCasePropValLength = rPropVal.getLength() * 2;
ensureSpace(nPropNameLength + nWorstCasePropValLength + 8);
addCommaBeforeField();
@@ -318,7 +325,7 @@ void JsonWriter::put(const char* pPropName, int nPropVal)
memcpy(mPos, "\": ", 3);
mPos += 3;
- mPos += sprintf(mPos, "%d", nPropVal);
+ mPos += sprintf(mPos, "\"%d\"", nPropVal);
}
void JsonWriter::putRaw(const rtl::OStringBuffer& rRawBuf)
diff --git a/translations b/translations
-Subproject 0c8c6b0d6280466e025e5b5bcfb4d2db1399c87
+Subproject 56a45d8aa92aa087c1e74d80d666905f1356f33
diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx
index 2a055f10cdc4..6da7ed351f80 100644
--- a/unoxml/source/xpath/xpathobject.cxx
+++ b/unoxml/source/xpath/xpathobject.cxx
@@ -44,12 +44,14 @@ namespace XPath
return XPathObjectType_XPATH_NUMBER;
case XPATH_STRING:
return XPathObjectType_XPATH_STRING;
+#if LIBXML_VERSION < 21000 || defined(LIBXML_XPTR_LOCS_ENABLED)
case XPATH_POINT:
return XPathObjectType_XPATH_POINT;
case XPATH_RANGE:
return XPathObjectType_XPATH_RANGE;
case XPATH_LOCATIONSET:
return XPathObjectType_XPATH_LOCATIONSET;
+#endif
case XPATH_USERS:
return XPathObjectType_XPATH_USERS;
case XPATH_XSLT_TREE:
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 4835a485dd2a..5764e62cb1c6 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -436,8 +436,9 @@ executeMasterPasswordDialog(
OUStringBuffer aBuffer;
for (sal_uInt8 i : aKey)
{
- aBuffer.append(static_cast< sal_Unicode >('a' + (i >> 4)));
- aBuffer.append(static_cast< sal_Unicode >('a' + (i & 15)));
+ // match PasswordContainer::DecodePasswords aMasterPasswd.copy(index * 2, 2).toUInt32(16));
+ aBuffer.append(OUString::number(i >> 4, 16));
+ aBuffer.append(OUString::number(i & 15, 16));
}
rInfo.SetPassword(aBuffer.makeStringAndClear());
}
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 15a083df19a6..1916292b5c36 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -318,6 +318,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/source/gdi/scrptrun \
vcl/source/gdi/CommonSalLayout \
vcl/source/gdi/TypeSerializer \
+ vcl/source/pdf/PdfConfig \
vcl/source/pdf/PDFiumLibrary \
vcl/source/pdf/ExternalPDFStreams \
vcl/source/graphic/GraphicID \
@@ -473,6 +474,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
vcl/backendtest/outputdevice/polyline \
vcl/backendtest/outputdevice/polyline_b2d \
vcl/backendtest/outputdevice/rectangle \
+ vcl/jsdialog/enabled \
vcl/jsdialog/jsdialogbuilder \
vcl/jsdialog/executor \
))
diff --git a/vcl/inc/jsdialog/enabled.hxx b/vcl/inc/jsdialog/enabled.hxx
new file mode 100644
index 000000000000..34116b41c009
--- /dev/null
+++ b/vcl/inc/jsdialog/enabled.hxx
@@ -0,0 +1,20 @@
+/* -*- 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 <rtl/ustring.hxx>
+
+namespace jsdialog
+{
+bool isBuilderEnabled(const OUString& rUIFile, bool bMobile);
+bool isInterimBuilderEnabledForNotebookbar(const OUString& rUIFile);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index a6b8021a50b4..d826e6625606 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -259,6 +259,8 @@ public:
bool bTakeOwnership = false) override;
virtual std::unique_ptr<weld::RadioButton>
weld_radio_button(const OString& id, bool bTakeOwnership = false) override;
+ virtual std::unique_ptr<weld::Image> weld_image(const OString& id,
+ bool bTakeOwnership = false) override;
static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
VclMessageType eMessageType,
@@ -597,4 +599,11 @@ public:
virtual void set_active(bool active) override;
};
+class JSImage : public JSWidget<SalInstanceImage, FixedImage>
+{
+public:
+ JSImage(JSDialogSender* pSender, FixedImage* pImage, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership);
+};
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/inc/pdf/PdfConfig.hxx b/vcl/inc/pdf/PdfConfig.hxx
new file mode 100644
index 000000000000..235fd008ea2b
--- /dev/null
+++ b/vcl/inc/pdf/PdfConfig.hxx
@@ -0,0 +1,18 @@
+/* -*- 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/.
+ *
+ */
+
+#pragma once
+
+namespace vcl::pdf
+{
+double getDefaultPdfResolutionDpi();
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
new file mode 100644
index 000000000000..ab1cc9852d74
--- /dev/null
+++ b/vcl/jsdialog/enabled.cxx
@@ -0,0 +1,75 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <jsdialog/enabled.hxx>
+
+namespace jsdialog
+{
+bool isBuilderEnabled(const OUString& rUIFile, bool bMobile)
+{
+ if (bMobile)
+ {
+ if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui"
+ || rUIFile == "svx/ui/findreplacedialog-mobile.ui"
+ || rUIFile == "modules/swriter/ui/watermarkdialog.ui"
+ || rUIFile == "modules/scalc/ui/validationdialog.ui"
+ || rUIFile == "modules/scalc/ui/validationcriteriapage.ui"
+ || rUIFile == "modules/scalc/ui/validationhelptabpage-mobile.ui"
+ || rUIFile == "modules/scalc/ui/erroralerttabpage-mobile.ui"
+ || rUIFile == "modules/scalc/ui/validationdialog.ui")
+ {
+ return true;
+ }
+ }
+
+ if (rUIFile == "modules/scalc/ui/pivottablelayoutdialog.ui"
+ || rUIFile == "modules/scalc/ui/selectsource.ui"
+ || rUIFile == "modules/scalc/ui/managenamesdialog.ui"
+ || rUIFile == "modules/scalc/ui/definename.ui"
+ || rUIFile == "modules/scalc/ui/correlationdialog.ui"
+ || rUIFile == "modules/scalc/ui/samplingdialog.ui"
+ || rUIFile == "modules/scalc/ui/descriptivestatisticsdialog.ui"
+ || rUIFile == "modules/scalc/ui/analysisofvariancedialog.ui"
+ || rUIFile == "modules/scalc/ui/covariancedialog.ui"
+ || rUIFile == "modules/scalc/ui/exponentialsmoothingdialog.ui"
+ || rUIFile == "modules/scalc/ui/movingaveragedialog.ui"
+ || rUIFile == "modules/scalc/ui/regressiondialog.ui"
+ || rUIFile == "modules/scalc/ui/ttestdialog.ui"
+ || rUIFile == "modules/scalc/ui/ttestdialog.ui"
+ || rUIFile == "modules/scalc/ui/ztestdialog.ui"
+ || rUIFile == "modules/scalc/ui/chisquaretestdialog.ui"
+ || rUIFile == "modules/scalc/ui/fourieranalysisdialog.ui"
+ || rUIFile == "modules/scalc/ui/datafielddialog.ui"
+ || rUIFile == "modules/scalc/ui/pivotfielddialog.ui"
+ || rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui"
+ || rUIFile == "svx/ui/fontworkgallerydialog.ui"
+ || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == "uui/ui/macrowarnmedium.ui"
+ || rUIFile == "modules/scalc/ui/textimportcsv.ui"
+ || rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui"
+ || rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == "xmlsec/ui/certgeneral.ui"
+ || rUIFile == "xmlsec/ui/viewcertdialog.ui" || rUIFile == "xmlsec/ui/certpage.ui")
+ {
+ return true;
+ }
+
+ return false;
+}
+
+bool isInterimBuilderEnabledForNotebookbar(const OUString& rUIFile)
+{
+ if (rUIFile == "svx/ui/stylespreview.ui" || rUIFile == "modules/scalc/ui/numberbox.ui")
+ {
+ return true;
+ }
+
+ return false;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index b102b557002f..431b9a46df8a 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -520,7 +520,8 @@ void JSInstanceBuilder::RememberWidget(const OString& id, weld::Widget* pWidget)
}
}
-void JSInstanceBuilder::AddChildWidget(sal_uInt64 nWindowId, const OString& id, weld::Widget* pWidget)
+void JSInstanceBuilder::AddChildWidget(sal_uInt64 nWindowId, const OString& id,
+ weld::Widget* pWidget)
{
auto it = GetLOKWeldWidgetsMap().find(nWindowId);
if (it != GetLOKWeldWidgetsMap().end())
@@ -807,6 +808,19 @@ std::unique_ptr<weld::RadioButton> JSInstanceBuilder::weld_radio_button(const OS
return pWeldWidget;
}
+std::unique_ptr<weld::Image> JSInstanceBuilder::weld_image(const OString& id, bool bTakeOwnership)
+{
+ FixedImage* pImage = m_xBuilder->get<FixedImage>(id);
+
+ auto pWeldWidget
+ = pImage ? std::make_unique<JSImage>(this, pImage, this, bTakeOwnership) : nullptr;
+
+ if (pWeldWidget)
+ RememberWidget(id, pWeldWidget.get());
+
+ return pWeldWidget;
+}
+
weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParent,
VclMessageType eMessageType,
VclButtonsType eButtonType,
@@ -969,6 +983,8 @@ void JSNotebook::set_current_page(int nPage)
SalInstanceNotebook::set_current_page(nPage);
sendFullUpdate(bForce);
+
+ m_aEnterPageHdl.Call(get_current_page_ident());
}
void JSNotebook::set_current_page(const OString& rIdent)
@@ -980,6 +996,8 @@ void JSNotebook::set_current_page(const OString& rIdent)
SalInstanceNotebook::set_current_page(rIdent);
sendFullUpdate(bForce);
+
+ m_aEnterPageHdl.Call(get_current_page_ident());
}
void JSNotebook::remove_page(const OString& rIdent)
@@ -1023,21 +1041,21 @@ JSMessageDialog::JSMessageDialog(::MessageDialog* pDialog, SalInstanceBuilder* p
if (!pBuilder)
{
- if(::OKButton* pOKBtn = dynamic_cast<::OKButton*>(m_xMessageDialog->get_widget_for_response(RET_OK)))
+ if (::OKButton* pOKBtn
+ = dynamic_cast<::OKButton*>(m_xMessageDialog->get_widget_for_response(RET_OK)))
{
m_pOK.reset(new JSButton(m_pSender, pOKBtn, nullptr, false));
JSInstanceBuilder::AddChildWidget(m_xMessageDialog->GetLOKWindowId(),
- pOKBtn->get_id().toUtf8(),
- m_pOK.get());
+ pOKBtn->get_id().toUtf8(), m_pOK.get());
m_pOK->connect_clicked(LINK(this, JSMessageDialog, OKHdl));
}
- if(::CancelButton* pCancelBtn = dynamic_cast<::CancelButton*>(m_xMessageDialog->get_widget_for_response(RET_CANCEL)))
+ if (::CancelButton* pCancelBtn
+ = dynamic_cast<::CancelButton*>(m_xMessageDialog->get_widget_for_response(RET_CANCEL)))
{
m_pCancel.reset(new JSButton(m_pSender, pCancelBtn, nullptr, false));
JSInstanceBuilder::AddChildWidget(m_xMessageDialog->GetLOKWindowId(),
- pCancelBtn->get_id().toUtf8(),
- m_pCancel.get());
+ pCancelBtn->get_id().toUtf8(), m_pCancel.get());
m_pCancel->connect_clicked(LINK(this, JSMessageDialog, CancelHdl));
}
}
@@ -1049,15 +1067,9 @@ JSMessageDialog::~JSMessageDialog()
JSInstanceBuilder::RemoveWindowWidget(m_xMessageDialog->GetLOKWindowId());
}
-IMPL_LINK_NOARG(JSMessageDialog, OKHdl, weld::Button&, void)
-{
- response(RET_OK);
-}
+IMPL_LINK_NOARG(JSMessageDialog, OKHdl, weld::Button&, void) { response(RET_OK); }
-IMPL_LINK_NOARG(JSMessageDialog, CancelHdl, weld::Button&, void)
-{
- response(RET_CANCEL);
-}
+IMPL_LINK_NOARG(JSMessageDialog, CancelHdl, weld::Button&, void) { response(RET_CANCEL); }
void JSMessageDialog::set_primary_text(const OUString& rText)
{
@@ -1334,4 +1346,10 @@ void JSRadioButton::set_active(bool active)
sendUpdate();
}
+JSImage::JSImage(JSDialogSender* pSender, FixedImage* pImage, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : JSWidget<SalInstanceImage, FixedImage>(pSender, pImage, pBuilder, bTakeOwnership)
+{
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/vcl/qa/cppunit/graphicfilter/data/bmp/fail/crash-1.bmp b/vcl/qa/cppunit/graphicfilter/data/bmp/pass/crash-1.bmp
index 84b6c35c87e6..84b6c35c87e6 100644
--- a/vcl/qa/cppunit/graphicfilter/data/bmp/fail/crash-1.bmp
+++ b/vcl/qa/cppunit/graphicfilter/data/bmp/pass/crash-1.bmp
Binary files differ
diff --git a/vcl/qa/cppunit/pdfexport/data/pdf-image-annots.odg b/vcl/qa/cppunit/pdfexport/data/pdf-image-annots.odg
new file mode 100644
index 000000000000..6dee0145c536
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/pdf-image-annots.odg
Binary files differ
diff --git a/vcl/qa/cppunit/pdfexport/data/pdf-image-hyperlink.odg b/vcl/qa/cppunit/pdfexport/data/pdf-image-hyperlink.odg
new file mode 100644
index 000000000000..aa0f89300b2c
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/pdf-image-hyperlink.odg
Binary files differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index aa96ee8a0f99..fc7103fede47 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -38,6 +38,7 @@
#include <fpdfview.h>
#include <vcl/graphicfilter.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <rtl/math.hxx>
#include <vcl/filter/PDFiumLibrary.hxx>
@@ -147,6 +148,8 @@ public:
void testDefaultVersion();
void testMultiPagePDF();
void testPdfImageRotate180();
+ void testPdfImageHyperlink();
+ void testPdfImageAnnots();
CPPUNIT_TEST_SUITE(PdfExportTest);
@@ -191,6 +194,8 @@ public:
CPPUNIT_TEST(testDefaultVersion);
CPPUNIT_TEST(testMultiPagePDF);
CPPUNIT_TEST(testPdfImageRotate180);
+ CPPUNIT_TEST(testPdfImageHyperlink);
+ CPPUNIT_TEST(testPdfImageAnnots);
CPPUNIT_TEST_SUITE_END();
};
@@ -2252,6 +2257,112 @@ void PdfExportTest::testPdfImageRotate180()
CPPUNIT_ASSERT_DOUBLES_EQUAL(-1.0, aScale.getX(), 0.01);
}
+void PdfExportTest::testPdfImageHyperlink()
+{
+ // Given a Draw file, containing a PDF image, which has a hyperlink in it:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-image-hyperlink.odg";
+ mxComponent = loadFromDesktop(aURL);
+ CPPUNIT_ASSERT(mxComponent.is());
+
+ // When saving to PDF:
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Then make sure that link is preserved:
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ maMemory.WriteStream(aFile);
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize());
+ CPPUNIT_ASSERT(pPdfDocument);
+ CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage);
+ int nStartPos = 0;
+ FPDF_LINK pLinkAnnot = nullptr;
+ // Without the accompanying fix in place, this test would have failed, the hyperlink of the PDF
+ // image was lost.
+ CPPUNIT_ASSERT(FPDFLink_Enumerate(pPdfPage->getPointer(), &nStartPos, &pLinkAnnot));
+
+ // Also test the precision of the form XObject.
+ // Given a full-page form XObject, page height is 27.94 cm (792 points):
+ // When writing the reciprocal of the object height to PDF:
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pFormObject;
+ for (int i = 0; i < pPdfPage->getObjectCount(); ++i)
+ {
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pObject = pPdfPage->getObject(i);
+ if (FPDFPageObj_GetType(pObject->getPointer()) == FPDF_PAGEOBJ_FORM)
+ {
+ pFormObject = std::move(pObject);
+ break;
+ }
+ }
+ CPPUNIT_ASSERT(pFormObject);
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pInnerFormObject;
+ for (int i = 0; i < pFormObject->getFormObjectCount(); ++i)
+ {
+ std::unique_ptr<vcl::pdf::PDFiumPageObject> pObject = pFormObject->getFormObject(i);
+ if (FPDFPageObj_GetType(pObject->getPointer()) == FPDF_PAGEOBJ_FORM)
+ {
+ pInnerFormObject = std::move(pObject);
+ break;
+ }
+ }
+ CPPUNIT_ASSERT(pInnerFormObject);
+ // Then make sure that enough digits are used, so the point size is unchanged:
+ basegfx::B2DHomMatrix aMatrix;
+ FS_MATRIX matrix;
+ if (FPDFFormObj_GetMatrix(pInnerFormObject->getPointer(), &matrix))
+ {
+ aMatrix = basegfx::B2DHomMatrix::abcdef(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e,
+ matrix.f);
+ }
+ basegfx::B2DTuple aScale;
+ basegfx::B2DTuple aTranslate;
+ double fRotate{};
+ double fShearX{};
+ aMatrix.decompose(aScale, aTranslate, fRotate, fShearX);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 0.0012626264
+ // - Actual : 0.00126
+ // i.e. the rounded reciprocal was 794 points, not the original 792.
+ // FIXME macOS actual value is 0.0001578282, for unknown reasons.
+#if !defined MACOSX
+ CPPUNIT_ASSERT_EQUAL(0.0012626264, rtl::math::round(aScale.getY(), 10));
+#endif
+}
+
+void PdfExportTest::testPdfImageAnnots()
+{
+ // Given a document with a PDF image that has 2 comments (popup, text) and a hyperlink:
+ OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf-image-annots.odg";
+ mxComponent = loadFromDesktop(aURL);
+ CPPUNIT_ASSERT(mxComponent.is());
+
+ // When saving to PDF:
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("draw_pdf_Export");
+ xStorable->storeToURL(maTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ // Then make sure only the hyperlink is kept, since Draw itself has its own comments:
+ SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ);
+ maMemory.WriteStream(aFile);
+ std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument
+ = pPDFium->openDocument(maMemory.GetData(), maMemory.GetSize());
+ CPPUNIT_ASSERT(pPdfDocument);
+ CPPUNIT_ASSERT_EQUAL(1, pPdfDocument->getPageCount());
+ std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
+ CPPUNIT_ASSERT(pPdfPage);
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1
+ // - Actual : 3
+ // i.e. not only the hyperlink but also the 2 comments were exported, leading to duplication.
+ CPPUNIT_ASSERT_EQUAL(1, pPdfPage->getAnnotationCount());
+}
CPPUNIT_TEST_SUITE_REGISTRATION(PdfExportTest);
}
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 32deb0c9a310..4208c1465d23 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -529,6 +529,15 @@ OUString SalInstanceWidget::get_tooltip_text() const
return m_xWidget->GetQuickHelpText();
}
+void SalInstanceWidget::set_cursor_data(void * pData)
+{
+ vcl::Cursor * pCursor = static_cast<vcl::Cursor *>(pData);
+ if (!pCursor)
+ return;
+
+ m_xWidget->SetCursor(pCursor);
+}
+
void SalInstanceWidget::connect_focus_in(const Link<Widget&, void>& rLink)
{
ensure_event_listener();
@@ -2928,37 +2937,6 @@ public:
}
};
-class SalInstanceImage : public SalInstanceWidget, public virtual weld::Image
-{
-private:
- VclPtr<FixedImage> m_xImage;
-
-public:
- SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder, bool bTakeOwnership)
- : SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
- , m_xImage(pImage)
- {
- }
-
- virtual void set_from_icon_name(const OUString& rIconName) override
- {
- m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
- }
-
- virtual void set_image(VirtualDevice* pDevice) override
- {
- if (pDevice)
- m_xImage->SetImage(createImage(*pDevice));
- else
- m_xImage->SetImage(::Image());
- }
-
- virtual void set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage) override
- {
- m_xImage->SetImage(::Image(rImage));
- }
-};
-
class SalInstanceCalendar : public SalInstanceWidget, public virtual weld::Calendar
{
private:
@@ -3007,6 +2985,31 @@ IMPL_LINK_NOARG(SalInstanceCalendar, ActivateHdl, ::Calendar*, void)
signal_activated();
}
+SalInstanceImage::SalInstanceImage(FixedImage* pImage, SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+ : SalInstanceWidget(pImage, pBuilder, bTakeOwnership)
+ , m_xImage(pImage)
+{
+}
+
+void SalInstanceImage::set_from_icon_name(const OUString& rIconName)
+{
+ m_xImage->SetImage(::Image(StockImage::Yes, rIconName));
+}
+
+void SalInstanceImage::set_image(VirtualDevice* pDevice)
+{
+ if (pDevice)
+ m_xImage->SetImage(createImage(*pDevice));
+ else
+ m_xImage->SetImage(::Image());
+}
+
+void SalInstanceImage::set_image(const css::uno::Reference<css::graphic::XGraphic>& rImage)
+{
+ m_xImage->SetImage(::Image(rImage));
+}
+
WeldTextFilter::WeldTextFilter(Link<OUString&, bool>& rInsertTextHdl)
: TextFilter(OUString())
, m_rInsertTextHdl(rInsertTextHdl)
@@ -5412,7 +5415,6 @@ void SalInstanceDrawingArea::HandleMouseEventListener(VclSimpleEvent& rEvent)
SalInstanceWidget::HandleMouseEventListener(rEvent);
}
-
bool SalInstanceDrawingArea::HandleKeyEventListener(VclWindowEvent& /*rEvent*/)
{
return false;
@@ -6257,8 +6259,10 @@ void SalInstanceWindow::help()
{
//show help for widget with keyboard focus
vcl::Window* pWidget = ImplGetSVData()->mpWinData->mpFocusWin;
- if (!pWidget || comphelper::LibreOfficeKit::isActive())
+ if (!pWidget)
pWidget = m_xWindow;
+ if (comphelper::LibreOfficeKit::isActive() && m_xWindow->GetFocusedWindow())
+ pWidget = m_xWindow->GetFocusedWindow();
OString sHelpId = pWidget->GetHelpId();
while (sHelpId.isEmpty())
{
diff --git a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
index bd6b7bd00b56..af57c98e7dcd 100644
--- a/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
+++ b/vcl/source/bitmap/BitmapScaleSuperFilter.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/profilezone.hxx>
#include <comphelper/threadpool.hxx>
#include <tools/helpers.hxx>
@@ -127,6 +128,7 @@ public:
void scaleUp32bit(ScaleContext &rCtx, long nStartY, long nEndY)
{
+ comphelper::ProfileZone pz("BitmapScaleSuperFilter::scaleUp32bit");
const int nColorComponents = 4;
const long nStartX = 0;
@@ -261,6 +263,7 @@ void scaleUpPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
void scaleUp24bit(ScaleContext &rCtx, long nStartY, long nEndY)
{
+ comphelper::ProfileZone pz("BitmapScaleSuperFilter::scaleUp24bit");
const int nColorComponents = 3;
const long nStartX = 0;
@@ -351,6 +354,7 @@ void scaleUpNonPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
void scaleDown32bit(ScaleContext &rCtx, long nStartY, long nEndY)
{
+ comphelper::ProfileZone pz("BitmapScaleSuperFilter::scaleDown32bit");
const int constColorComponents = 4;
const long nStartX = 0;
@@ -746,6 +750,7 @@ void scaleDownPaletteGeneral(ScaleContext &rCtx, long nStartY, long nEndY)
void scaleDown24bit(ScaleContext &rCtx, long nStartY, long nEndY)
{
+ comphelper::ProfileZone pz("BitmapScaleSuperFilter::scaleDown24bit");
const int constColorComponents = 3;
const long nStartX = 0;
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index c5eb075a8e0d..6bf24d6fc8bc 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -17,15 +17,18 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <vcl/cvtgrf.hxx>
#include <vcl/decoview.hxx>
#include <vcl/event.hxx>
#include <vcl/fixed.hxx>
#include <vcl/settings.hxx>
+#include <comphelper/base64.hxx>
#include <comphelper/string.hxx>
#include <sal/log.hxx>
#include <controldata.hxx>
#include <boost/property_tree/ptree.hpp>
+#include <tools/stream.hxx>
#define FIXEDLINE_TEXT_BORDER 4
@@ -970,4 +973,26 @@ bool FixedImage::set_property(const OString &rKey, const OUString &rValue)
return true;
}
+boost::property_tree::ptree FixedImage::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree = Control::DumpAsPropertyTree();
+
+ aTree.put("type", "image");
+
+ if (!!maImage)
+ {
+ SvMemoryStream aOStm(6535, 6535);
+ if(GraphicConverter::Export(aOStm, maImage.GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE)
+ {
+ css::uno::Sequence<sal_Int8> aSeq( static_cast<sal_Int8 const *>(aOStm.GetData()), aOStm.Tell());
+ OUStringBuffer aBuffer("data:image/png;base64,");
+ ::comphelper::Base64::encode(aBuffer, aSeq);
+ aTree.put("image", aBuffer.makeStringAndClear());
+ }
+ }
+
+ return aTree;
+}
+
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx
index acc45bc4d9e4..ef8862c0d1a3 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -18,6 +18,7 @@
#include <fpdf_formfill.h>
#endif
+#include <pdf/PdfConfig.hxx>
#include <vcl/graph.hxx>
#include <bitmapwriteaccess.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -147,27 +148,12 @@ VectorGraphicDataArray createVectorGraphicDataArray(SvStream& rStream)
namespace vcl
{
-/// Get the default PDF rendering resolution in DPI.
-static double getDefaultPdfResolutionDpi()
-{
- // If an overriding default is set, use it.
- const char* envar = ::getenv("PDFIMPORT_RESOLUTION_DPI");
- if (envar)
- {
- const double dpi = atof(envar);
- if (dpi > 0)
- return dpi;
- }
-
- // Fallback to a sensible default.
- return 96.;
-}
-
size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector<Bitmap>& rBitmaps,
const size_t nFirstPage, int nPages, const basegfx::B2DTuple* pSizeHint)
{
#if HAVE_FEATURE_PDFIUM
- static const double fResolutionDPI = getDefaultPdfResolutionDpi();
+ static const double fResolutionDPI = vcl::pdf::getDefaultPdfResolutionDpi();
+
auto pPdfium = vcl::pdf::PDFiumLibrary::get();
// Load the buffer using pdfium.
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/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx
index 4b0b42f5d268..67a0bf03eba0 100644
--- a/vcl/source/gdi/bmpacc.cxx
+++ b/vcl/source/gdi/bmpacc.cxx
@@ -35,8 +35,6 @@ BitmapInfoAccess::BitmapInfoAccess( Bitmap& rBitmap, BitmapAccessMode nMode ) :
{
std::shared_ptr<SalBitmap> xImpBmp = rBitmap.ImplGetSalBitmap();
- assert( xImpBmp && "Forbidden Access to empty bitmap!" );
-
if( !xImpBmp )
return;
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index ce1df4a68a65..6a64f60549fa 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -249,8 +249,18 @@ bool ImplReadDIBInfoHeader(SvStream& rIStm, DIBV5Header& rHeader, bool& bTopDown
readUInt32( rHeader.nV5ProfileSize );
readUInt32( rHeader.nV5Reserved );
+ // Read color mask. An additional 12 bytes of color bitfields follow the info header (WinBMPv3-NT)
+ sal_uInt32 nColorMask = 0;
+ if (BITFIELDS == rHeader.nCompression && DIBINFOHEADERSIZE == rHeader.nSize)
+ {
+ rIStm.ReadUInt32( rHeader.nV5RedMask );
+ rIStm.ReadUInt32( rHeader.nV5GreenMask );
+ rIStm.ReadUInt32( rHeader.nV5BlueMask );
+ nColorMask = 12;
+ }
+
// seek to EndPos
- if (!checkSeek(rIStm, aStartPos + rHeader.nSize))
+ if (!checkSeek(rIStm, aStartPos + rHeader.nSize + nColorMask))
return false;
}
@@ -533,14 +543,12 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r
}
else
{
- // Read color mask
- if(bTCMask && BITFIELDS == rHeader.nCompression)
- {
- rIStm.SeekRel( -12 );
- rIStm.ReadUInt32( nRMask );
- rIStm.ReadUInt32( nGMask );
- rIStm.ReadUInt32( nBMask );
- }
+ if (rHeader.nV5RedMask > 0)
+ nRMask = rHeader.nV5RedMask;
+ if (rHeader.nV5GreenMask > 0)
+ nGMask = rHeader.nV5GreenMask;
+ if (rHeader.nV5BlueMask > 0)
+ nBMask = rHeader.nV5BlueMask;
const long nWidth(rHeader.nWidth);
const long nHeight(rHeader.nHeight);
@@ -911,7 +919,13 @@ bool ImplReadDIBBody(SvStream& rIStm, Bitmap& rBmp, AlphaMask* pBmpAlpha, sal_uL
if (nOffset)
{
- pIStm->SeekRel(nOffset - (pIStm->Tell() - nStmPos));
+ // It is problematic to seek backwards. We are at the
+ // end of BITMAPINFOHEADER or 12 bytes further in case
+ // of WinBMPv3-NT format. It is possible to seek forward
+ // though because a gap may be there.
+ sal_Int32 nSeekRel = nOffset - (pIStm->Tell() - nStmPos);
+ if (nSeekRel > 0)
+ pIStm->SeekRel(nSeekRel);
}
const sal_Int64 nBitsPerLine (static_cast<sal_Int64>(aHeader.nWidth) * static_cast<sal_Int64>(aHeader.nBitCount));
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3cf733449d31..5d2fbf6a6b13 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -45,6 +45,7 @@
#include <osl/thread.h>
#include <rtl/digest.h>
#include <rtl/ustrbuf.hxx>
+#include <rtl/xmlencode.hxx>
#include <sal/log.hxx>
#include <svl/urihelper.hxx>
#include <tools/fract.hxx>
@@ -75,6 +76,7 @@
#include <bitmapwriteaccess.hxx>
#include <impglyphitem.hxx>
#include <pdf/objectcopier.hxx>
+#include <pdf/PdfConfig.hxx>
#include "pdfwriter_impl.hxx"
@@ -4155,9 +4157,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
@@ -4170,6 +4169,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( ' ' );
@@ -5326,37 +5326,6 @@ sal_Int32 PDFWriterImpl::emitOutputIntent()
return nOIObject;
}
-// formats the string for the XML stream
-static void escapeStringXML( const OUString& rStr, OUString &rValue)
-{
- const sal_Unicode* pUni = rStr.getStr();
- int nLen = rStr.getLength();
- for( ; nLen; nLen--, pUni++ )
- {
- switch( *pUni )
- {
- case u'&':
- rValue += "&amp;";
- break;
- case u'<':
- rValue += "&lt;";
- break;
- case u'>':
- rValue += "&gt;";
- break;
- case u'\'':
- rValue += "&apos;";
- break;
- case u'"':
- rValue += "&quot;";
- break;
- default:
- rValue += OUStringChar( *pUni );
- break;
- }
- }
-}
-
// emits the document metadata
sal_Int32 PDFWriterImpl::emitDocumentMetadata()
{
@@ -5405,8 +5374,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata()
aMetadataStream.append( " <dc:title>\n" );
aMetadataStream.append( " <rdf:Alt>\n" );
aMetadataStream.append( " <rdf:li xml:lang=\"x-default\">" );
- OUString aTitle;
- escapeStringXML( m_aContext.DocumentInfo.Title, aTitle );
+ OUString aTitle = rtl::encodeForXml( m_aContext.DocumentInfo.Title );
aMetadataStream.append( OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</rdf:li>\n" );
aMetadataStream.append( " </rdf:Alt>\n" );
@@ -5417,8 +5385,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata()
aMetadataStream.append( " <dc:creator>\n" );
aMetadataStream.append( " <rdf:Seq>\n" );
aMetadataStream.append( " <rdf:li>" );
- OUString aAuthor;
- escapeStringXML( m_aContext.DocumentInfo.Author, aAuthor );
+ OUString aAuthor = rtl::encodeForXml( m_aContext.DocumentInfo.Author );
aMetadataStream.append( OUStringToOString( aAuthor , RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</rdf:li>\n" );
aMetadataStream.append( " </rdf:Seq>\n" );
@@ -5430,8 +5397,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata()
aMetadataStream.append( " <dc:description>\n" );
aMetadataStream.append( " <rdf:Alt>\n" );
aMetadataStream.append( " <rdf:li xml:lang=\"x-default\">" );
- OUString aSubject;
- escapeStringXML( m_aContext.DocumentInfo.Subject, aSubject );
+ OUString aSubject = rtl::encodeForXml( m_aContext.DocumentInfo.Subject );
aMetadataStream.append( OUStringToOString( aSubject , RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</rdf:li>\n" );
aMetadataStream.append( " </rdf:Alt>\n" );
@@ -5449,16 +5415,14 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata()
if( !m_aContext.DocumentInfo.Producer.isEmpty() )
{
aMetadataStream.append( " <pdf:Producer>" );
- OUString aProducer;
- escapeStringXML( m_aContext.DocumentInfo.Producer, aProducer );
+ OUString aProducer = rtl::encodeForXml( m_aContext.DocumentInfo.Producer );
aMetadataStream.append( OUStringToOString( aProducer , RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</pdf:Producer>\n" );
}
if( !m_aContext.DocumentInfo.Keywords.isEmpty() )
{
aMetadataStream.append( " <pdf:Keywords>" );
- OUString aKeywords;
- escapeStringXML( m_aContext.DocumentInfo.Keywords, aKeywords );
+ OUString aKeywords = rtl::encodeForXml( m_aContext.DocumentInfo.Keywords );
aMetadataStream.append( OUStringToOString( aKeywords , RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</pdf:Keywords>\n" );
}
@@ -5470,8 +5434,7 @@ sal_Int32 PDFWriterImpl::emitDocumentMetadata()
if( !m_aContext.DocumentInfo.Creator.isEmpty() )
{
aMetadataStream.append( " <xmp:CreatorTool>" );
- OUString aCreator;
- escapeStringXML( m_aContext.DocumentInfo.Creator, aCreator );
+ OUString aCreator = rtl::encodeForXml( m_aContext.DocumentInfo.Creator );
aMetadataStream.append( OUStringToOString( aCreator , RTL_TEXTENCODING_UTF8 ) );
aMetadataStream.append( "</xmp:CreatorTool>\n" );
}
@@ -8668,11 +8631,14 @@ void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
return;
// Count /Matrix and /BBox.
- // vcl::ImportPDF() works with 96 DPI so use the same values here, too.
+ // vcl::ImportPDF() uses getDefaultPdfResolutionDpi to set the desired
+ // rendering DPI so we have to take into account that here too.
+ static const double fResolutionDPI = vcl::pdf::getDefaultPdfResolutionDpi();
+
sal_Int32 nOldDPIX = GetDPIX();
- SetDPIX(96);
sal_Int32 nOldDPIY = GetDPIY();
- SetDPIY(96);
+ SetDPIX(fResolutionDPI);
+ SetDPIY(fResolutionDPI);
Size aSize = PixelToLogic(rEmit.m_aPixelSize, MapMode(m_aMapMode.GetMapUnit()));
SetDPIX(nOldDPIX);
SetDPIY(nOldDPIY);
@@ -8736,6 +8702,53 @@ void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
return;
}
+ // Merge link annotations from pPage to our page.
+ std::vector<filter::PDFObjectElement*> aAnnots;
+ if (auto pArray = dynamic_cast<filter::PDFArrayElement*>(pPage->Lookup("Annots")))
+ {
+ for (const auto pElement : pArray->GetElements())
+ {
+ auto pReference = dynamic_cast<filter::PDFReferenceElement*>(pElement);
+ if (!pReference)
+ {
+ continue;
+ }
+
+ filter::PDFObjectElement* pObject = pReference->LookupObject();
+ if (!pObject)
+ {
+ continue;
+ }
+
+ auto pType = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Type"));
+ if (!pType || pType->GetValue() != "Annot")
+ {
+ continue;
+ }
+
+ auto pSubtype = dynamic_cast<filter::PDFNameElement*>(pObject->Lookup("Subtype"));
+ if (!pSubtype || pSubtype->GetValue() != "Link")
+ {
+ continue;
+ }
+
+ // Reference to a link annotation object, remember it.
+ aAnnots.push_back(pObject);
+ }
+ }
+ if (!aAnnots.empty())
+ {
+ PDFObjectCopier aCopier(*this);
+ SvMemoryStream& rDocBuffer = pPage->GetDocument().GetEditBuffer();
+ std::map<sal_Int32, sal_Int32> aMap;
+ for (const auto& pAnnot : aAnnots)
+ {
+ // Copy over the annotation and refer to its new id.
+ sal_Int32 nNewId = aCopier.copyExternalResource(rDocBuffer, *pAnnot, aMap);
+ m_aPages.back().m_aAnnotations.push_back(nNewId);
+ }
+ }
+
nWrappedFormObject = createObject();
// Write the form XObject wrapped below. This is a separate object from
// the wrapper, this way there is no need to alter the stream contents.
@@ -8833,9 +8846,9 @@ void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit)
aLine.append(">> >>");
aLine.append(" /Matrix [ ");
- appendDouble(fScaleX, aLine);
+ appendDouble(fScaleX, aLine, /*nPrecision=*/10);
aLine.append(" 0 0 ");
- appendDouble(fScaleY, aLine);
+ appendDouble(fScaleY, aLine, /*nPrecision=*/10);
aLine.append(" 0 0 ]");
aLine.append(" /BBox [ 0 0 ");
aLine.append(aSize.Width());
diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx
index 1be52a7e987c..cb7e483f4aed 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/textline.cxx b/vcl/source/outdev/textline.cxx
index e52b02410ebd..f4dd135d1080 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -25,6 +25,7 @@
#include <vcl/outdev.hxx>
#include <vcl/settings.hxx>
#include <vcl/virdev.hxx>
+#include <vcl/lazydelete.hxx>
#include <tools/helpers.hxx>
@@ -33,10 +34,70 @@
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <basegfx/polygon/WaveLine.hxx>
+#include <boost/functional/hash.hpp>
+#include <o3tl/lru_map.hxx>
#define UNDERLINE_LAST LINESTYLE_BOLDWAVE
#define STRIKEOUT_LAST STRIKEOUT_X
+struct WavyLineCache final
+{
+ WavyLineCache () : m_aItems( 10 ) {}
+
+ bool find( Color aLineColor, size_t nLineWidth, size_t nWaveHeight, size_t nWordWidth, BitmapEx& rOutput )
+ {
+ Key aKey = { nWaveHeight, aLineColor.mValue };
+ auto item = m_aItems.find( aKey );
+ if ( item == m_aItems.end() )
+ return false;
+ // needs update
+ if ( item->second.m_aLineWidth != nLineWidth || item->second.m_aWordWidth < nWordWidth )
+ {
+ return false;
+ }
+ rOutput = item->second.m_Bitmap;
+ return true;
+ }
+
+ void insert( const BitmapEx& aBitmap, const Color& aLineColor, const size_t nLineWidth, const size_t nWaveHeight, const size_t nWordWidth, BitmapEx& rOutput )
+ {
+ Key aKey = { nWaveHeight, aLineColor.mValue };
+ m_aItems.insert( std::pair< Key, WavyLineCacheItem>( aKey, { nLineWidth, nWordWidth, aBitmap } ) );
+ rOutput = aBitmap;
+ }
+
+ private:
+ struct WavyLineCacheItem
+ {
+ size_t m_aLineWidth;
+ size_t m_aWordWidth;
+ BitmapEx m_Bitmap;
+ };
+
+ struct Key
+ {
+ size_t m_aFirst;
+ size_t m_aSecond;
+ bool operator ==( const Key& rOther ) const
+ {
+ return ( m_aFirst == rOther.m_aFirst && m_aSecond == rOther.m_aSecond );
+ }
+ };
+
+ struct Hash
+ {
+ size_t operator() ( const Key& rKey ) const
+ {
+ size_t aSeed = 0;
+ boost::hash_combine(aSeed, rKey.m_aFirst);
+ boost::hash_combine(aSeed, rKey.m_aSecond);
+ return aSeed;
+ }
+ };
+
+ o3tl::lru_map< Key, WavyLineCacheItem, Hash > m_aItems;
+};
+
void OutputDevice::ImplInitTextLineSize()
{
mpFontInstance->mxFontMetric->ImplInitTextLineSize( this );
@@ -599,6 +660,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)
@@ -1000,6 +1063,48 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, lo
nLineWidth = 1;
}
+ if ( fOrientation == 0.0 )
+ {
+ static vcl::DeleteOnDeinit< WavyLineCache > snLineCache( new WavyLineCache() );
+ if ( !snLineCache.get() )
+ return;
+ WavyLineCache& rLineCache = *snLineCache.get();
+ BitmapEx aWavylinebmp;
+ if ( !rLineCache.find( GetLineColor(), nLineWidth, nWaveHeight, nEndX - nStartX, aWavylinebmp ) )
+ {
+ size_t nWordLength = nEndX - nStartX;
+ // start with something big to avoid updating it frequently
+ nWordLength = nWordLength < 1024 ? 1024 : nWordLength;
+ ScopedVclPtrInstance< VirtualDevice > pVirtDev( *this, DeviceFormat::DEFAULT,
+ DeviceFormat::DEFAULT );
+ pVirtDev->SetAntialiasing( AntialiasingFlags::EnableB2dDraw );
+ pVirtDev->SetOutputSizePixel( Size( nWordLength, nWaveHeight * 2 ), false );
+ pVirtDev->SetLineColor( GetLineColor() );
+ pVirtDev->SetBackground( Wallpaper( COL_TRANSPARENT ) );
+#ifdef IOS
+ // Stopgap workaround for some bug in the iOS-specific vcl code.
+ pVirtDev->SetFillColor( COL_WHITE );
+ pVirtDev->DrawRect( tools::Rectangle( 0, 0, pVirtDev->GetOutputSize().Width(), pVirtDev->GetOutputSize().Height() ) );
+#endif
+ pVirtDev->ImplDrawWaveLineBezier( 0, 0, nWordLength, 0, nWaveHeight, fOrientation, nLineWidth );
+ rLineCache.insert( pVirtDev->GetBitmapEx( Point( 0, 0 ), pVirtDev->GetOutputSize() ), GetLineColor(), nLineWidth, nWaveHeight, nWordLength, aWavylinebmp );
+ }
+ if ( aWavylinebmp.ImplGetBitmapSalBitmap() != nullptr )
+ {
+ Size _size( nEndX - nStartX, aWavylinebmp.GetSizePixel().Height() );
+ DrawBitmapEx(Point( rStartPos.X(), rStartPos.Y() ), PixelToLogic( _size ), Point(), _size, aWavylinebmp);
+ }
+ return;
+ }
+
+ ImplDrawWaveLineBezier( nStartX, nStartY, nEndX, nEndY, nWaveHeight, fOrientation, nLineWidth );
+
+ if( mpAlphaVDev )
+ mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nLineWidth );
+}
+
+void OutputDevice::ImplDrawWaveLineBezier(long nStartX, long nStartY, long nEndX, long nEndY, long nWaveHeight, double fOrientation, long nLineWidth)
+{
const basegfx::B2DRectangle aWaveLineRectangle(nStartX, nStartY, nEndX, nEndY + nWaveHeight);
const basegfx::B2DPolygon aWaveLinePolygon = basegfx::createWaveLinePolygon(aWaveLineRectangle);
const basegfx::B2DHomMatrix aRotationMatrix = basegfx::utils::createRotateAroundPoint(nStartX, nStartY, basegfx::deg2rad(-fOrientation));
@@ -1018,9 +1123,6 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, const Point& rEndPos, lo
basegfx::deg2rad(15.0),
bPixelSnapHairline,
this);
-
- if( mpAlphaVDev )
- mpAlphaVDev->DrawWaveLine( rStartPos, rEndPos, nLineWidth );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/pdf/PdfConfig.cxx b/vcl/source/pdf/PdfConfig.cxx
new file mode 100644
index 000000000000..52859c7b1f6e
--- /dev/null
+++ b/vcl/source/pdf/PdfConfig.cxx
@@ -0,0 +1,32 @@
+/* -*- 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 <cstdlib>
+
+namespace vcl::pdf
+{
+/// Get the default PDF rendering resolution in DPI.
+double getDefaultPdfResolutionDpi()
+{
+ // If an overriding default is set, use it.
+ const char* envar = ::getenv("PDFIMPORT_RESOLUTION_DPI");
+ if (envar)
+ {
+ const double dpi = atof(envar);
+ if (dpi > 0)
+ return dpi;
+ }
+
+ // Fallback to a sensible default.
+ return 96.;
+}
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index c10cc5f21d9d..08e2dc01fb9c 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -395,7 +395,7 @@ vcl::Window* findChild(vcl::Window* pParent, const OUString& rID, bool bRequireV
for (size_t i = 0; i < nCount; ++i)
{
vcl::Window* pChild = pParent->GetChild(i);
- if (pChild && pChild->get_id() == rID
+ if (pChild && !pChild->isDisposed() && pChild->get_id() == rID
&& (!bRequireVisible || pChild->IsVisible()))
return pChild;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 901725d94859..892c7c4f1751 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -15,6 +15,7 @@
#include <comphelper/lok.hxx>
#include <i18nutil/unicode.hxx>
+#include <jsdialog/enabled.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/module.hxx>
#include <sal/log.hxx>
@@ -154,50 +155,7 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString
bool bUseJSBuilder = false;
if (comphelper::LibreOfficeKit::isActive())
- {
- if (bMobile)
- {
- if (rUIFile == "modules/swriter/ui/wordcount-mobile.ui" ||
- rUIFile == "svx/ui/findreplacedialog-mobile.ui" ||
- rUIFile == "modules/swriter/ui/watermarkdialog.ui" ||
- rUIFile == "modules/scalc/ui/validationdialog.ui" ||
- rUIFile == "modules/scalc/ui/validationcriteriapage.ui" ||
- rUIFile == "modules/scalc/ui/validationhelptabpage-mobile.ui" ||
- rUIFile == "modules/scalc/ui/erroralerttabpage-mobile.ui" ||
- rUIFile == "modules/scalc/ui/validationdialog.ui")
- {
- bUseJSBuilder = true;
- }
- }
-
- if (rUIFile == "modules/scalc/ui/pivottablelayoutdialog.ui"
- || rUIFile == "modules/scalc/ui/selectsource.ui"
- || rUIFile == "modules/scalc/ui/managenamesdialog.ui"
- || rUIFile == "modules/scalc/ui/definename.ui"
- || rUIFile == "modules/scalc/ui/correlationdialog.ui"
- || rUIFile == "modules/scalc/ui/samplingdialog.ui"
- || rUIFile == "modules/scalc/ui/descriptivestatisticsdialog.ui"
- || rUIFile == "modules/scalc/ui/analysisofvariancedialog.ui"
- || rUIFile == "modules/scalc/ui/covariancedialog.ui"
- || rUIFile == "modules/scalc/ui/exponentialsmoothingdialog.ui"
- || rUIFile == "modules/scalc/ui/movingaveragedialog.ui"
- || rUIFile == "modules/scalc/ui/regressiondialog.ui"
- || rUIFile == "modules/scalc/ui/ttestdialog.ui"
- || rUIFile == "modules/scalc/ui/ttestdialog.ui"
- || rUIFile == "modules/scalc/ui/ztestdialog.ui"
- || rUIFile == "modules/scalc/ui/chisquaretestdialog.ui"
- || rUIFile == "modules/scalc/ui/fourieranalysisdialog.ui"
- || rUIFile == "modules/scalc/ui/datafielddialog.ui"
- || rUIFile == "modules/scalc/ui/pivotfielddialog.ui"
- || rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui"
- || rUIFile == "svx/ui/fontworkgallerydialog.ui"
- || rUIFile == "cui/ui/macroselectordialog.ui"
- || rUIFile == "uui/ui/macrowarnmedium.ui"
- || rUIFile == "modules/scalc/ui/textimportcsv.ui")
- {
- bUseJSBuilder = true;
- }
- }
+ bUseJSBuilder = jsdialog::isBuilderEnabled(rUIFile, bMobile);
if (bUseJSBuilder)
return JSInstanceBuilder::CreateDialogBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
@@ -208,14 +166,11 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString
weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile, sal_uInt64 nLOKWindowId)
{
// Notebookbar sub controls
- if (comphelper::LibreOfficeKit::isActive()
- && (rUIFile == "svx/ui/stylespreview.ui"
- || rUIFile == "modules/scalc/ui/numberbox.ui"))
+ if (comphelper::LibreOfficeKit::isActive() && jsdialog::isInterimBuilderEnabledForNotebookbar(rUIFile))
{
return JSInstanceBuilder::CreateNotebookbarBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, css::uno::Reference<css::frame::XFrame>(), nLOKWindowId);
}
- else if (comphelper::LibreOfficeKit::isActive()
- && (rUIFile == "modules/scalc/ui/filterdropdown.ui"))
+ else if (comphelper::LibreOfficeKit::isActive() && (rUIFile == "modules/scalc/ui/filterdropdown.ui"))
{
return JSInstanceBuilder::CreateAutofilterWindowBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
}
@@ -225,9 +180,9 @@ weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUS
weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,
VclButtonsType eButtonType, const OUString& rPrimaryMessage,
- bool bMobile)
+ bool /*bMobile*/)
{
- if (bMobile)
+ if (comphelper::LibreOfficeKit::isActive())
return JSInstanceBuilder::CreateMessageDialog(pParent, eMessageType, eButtonType, rPrimaryMessage);
else
return ImplGetSVData()->mpDefInst->CreateMessageDialog(pParent, eMessageType, eButtonType, rPrimaryMessage);
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 3cbffb41da66..a68a6a8e4249 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -416,7 +416,8 @@ vcl::Window* Dialog::GetDefaultParent(WinBits nStyle)
auto& rExecuteDialogs = pSVData->mpWinData->mpExecuteDialogs;
auto it = std::find_if(rExecuteDialogs.rbegin(), rExecuteDialogs.rend(),
[&pParent](VclPtr<Dialog>& rDialogPtr) {
- return pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
+ return pParent->ImplGetFirstOverlapWindow() &&
+ pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild(rDialogPtr, true) &&
rDialogPtr->IsReallyVisible() && rDialogPtr->IsEnabled() &&
rDialogPtr->IsInputEnabled() && !rDialogPtr->IsInModalMode(); });
if (it != rExecuteDialogs.rend())
@@ -962,12 +963,15 @@ bool Dialog::ImplStartExecute()
if ( pParent )
{
pParent = pParent->ImplGetFirstOverlapWindow();
- SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
- "Dialog::StartExecuteModal() - Parent not visible" );
- SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
- "Dialog::StartExecuteModal() - Parent input disabled, use another parent to ensure modality!" );
- SAL_WARN_IF( pParent->IsInModalMode(), "vcl",
- "Dialog::StartExecuteModal() - Parent already modally disabled, use another parent to ensure modality!" );
+ if (pParent)
+ {
+ SAL_WARN_IF( !pParent->IsReallyVisible(), "vcl",
+ "Dialog::StartExecuteModal() - Parent not visible" );
+ SAL_WARN_IF( !pParent->IsInputEnabled(), "vcl",
+ "Dialog::StartExecuteModal() - Parent input disabled, use another parent to ensure modality!" );
+ SAL_WARN_IF( pParent->IsInModalMode(), "vcl",
+ "Dialog::StartExecuteModal() - Parent already modally disabled, use another parent to ensure modality!" );
+ }
}
#endif
@@ -1264,12 +1268,11 @@ void Dialog::ImplSetModalInputMode( bool bModal )
void Dialog::GrabFocusToFirstControl()
{
- vcl::Window* pFocusControl;
+ vcl::Window* pFocusControl = nullptr;
+ vcl::Window* pFirstOverlapWindow = ImplGetFirstOverlapWindow();
// find focus control, even if the dialog has focus
- if ( HasFocus() )
- pFocusControl = nullptr;
- else
+ if (!HasFocus() && pFirstOverlapWindow && pFirstOverlapWindow->mpWindowImpl)
{
// prefer a child window which had focus before
pFocusControl = ImplGetFirstOverlapWindow()->mpWindowImpl->mpLastFocusWindow;
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 36cefbc201df..064b889467f4 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -28,6 +28,7 @@
#include <vcl/timer.hxx>
#include <vcl/idle.hxx>
#include <vcl/settings.hxx>
+#include <comphelper/lok.hxx>
#include <svdata.hxx>
#include <window.h>
@@ -923,7 +924,9 @@ Point DockingWindow::GetFloatingPos() const
aData.SetMask( WindowStateMask::Pos );
pWrapper->mpFloatWin->GetWindowStateData( aData );
Point aPos( aData.GetX(), aData.GetY() );
- aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos );
+ // LOK needs logic coordinates not absolute screen position for autofilter menu
+ if (!comphelper::LibreOfficeKit::isActive() || get_id() != "check_list_menu")
+ aPos = pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( aPos );
return aPos;
}
else
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 23bb7b00a43c..0b096938fa74 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -552,7 +552,8 @@ void Window::ImplCallMove()
vcl::Window *pParent = ImplGetParent();
while( pParent )
{
- if( pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
+ if( pParent->mpWindowImpl &&
+ pParent->mpWindowImpl->mpFrame != mpWindowImpl->mpFrame )
{
pParentFrame = pParent->mpWindowImpl->mpFrame;
break;
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 81c0ddb3d32d..f1923c5c1152 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -648,7 +648,10 @@ void FloatingWindow::StateChanged( StateChangedType nType )
// we are a toplevel window, let's so far pretend to be a
// dialog - but maybe we'll need a separate type for this
// later
- aItems.emplace_back("type", "dialog");
+ if (mbInPopupMode)
+ aItems.emplace_back("type", "dropdown");
+ else
+ aItems.emplace_back("type", "dialog");
aItems.emplace_back("position", mpImplData->maLOKTwipsPos.toString()); // twips
}
else
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index edebff002f8f..f1753b548466 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -263,14 +263,6 @@ void VclBox::setAllocation(const Size &rAllocation)
{
Size aRequisition = calculateRequisition();
nExtraSpace = (getPrimaryDimension(rAllocation) - getPrimaryDimension(aRequisition)) / nExpandChildren;
-// In mobile, the screen size is small and extraSpace can become negative
-// Though the dialogs are rendered in javascript for LOK Android some widgets like weld::DrawingArea
-// is sent as bitmap but it is rendered from only the visible part
-// when it gets negative, it shrinks instead of expands and it becomes invisible
-#if HAVE_FEATURE_ANDROID_LOK
- if (nExtraSpace < 0)
- nExtraSpace = 0;
-#endif
}
//Split into those we pack from the start onwards, and those we pack from the end backwards
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index e2f0458bf0fe..e1f9c9e6777e 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -292,7 +292,8 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
// mark this windows as the last FocusWindow
vcl::Window* pOverlapWindow = ImplGetFirstOverlapWindow();
- pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
+ if (pOverlapWindow->mpWindowImpl)
+ pOverlapWindow->mpWindowImpl->mpLastFocusWindow = this;
mpWindowImpl->mpFrameData->mpFocusWin = this;
if( !bHasFocus )
@@ -466,7 +467,8 @@ void Window::ReleaseMouse()
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->mpWinData->mpCaptureWin = nullptr;
- mpWindowImpl->mpFrame->CaptureMouse( false );
+ if (mpWindowImpl && mpWindowImpl->mpFrame)
+ mpWindowImpl->mpFrame->CaptureMouse( false );
ImplGenerateMouseMove();
}
}
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index 218cdd3216ed..e890503e615d 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -622,6 +622,9 @@ void Window::ImplCallPaint(const vcl::Region* pRegion, ImplPaintFlags nPaintFlag
void Window::ImplCallOverlapPaint()
{
+ if (!mpWindowImpl)
+ return;
+
// emit overlapping windows first
vcl::Window* pTempWindow = mpWindowImpl->mpFirstOverlap;
while ( pTempWindow )
@@ -642,7 +645,6 @@ void Window::ImplCallOverlapPaint()
IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
{
-#ifndef IOS
comphelper::ProfileZone aZone("VCL idle re-paint");
// save paint events until layout is done
@@ -665,7 +667,6 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void)
mpWindowImpl->mpFrameData->maPaintIdle.IsActive())
mpWindowImpl->mpFrameData->maPaintIdle.Stop();
}
-#endif
}
IMPL_LINK_NOARG(Window, ImplHandleResizeTimerHdl, Timer *, void)
@@ -988,7 +989,7 @@ void Window::ImplValidate()
void Window::ImplUpdateAll()
{
- if ( !mpWindowImpl->mbReallyVisible )
+ if ( !mpWindowImpl || !mpWindowImpl->mbReallyVisible )
return;
bool bFlush = false;
@@ -1287,6 +1288,9 @@ bool Window::HasPaintEvent() const
void Window::Update()
{
+ if (!mpWindowImpl)
+ return;
+
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->Update();
@@ -1338,7 +1342,11 @@ void Window::Update()
// trigger an update also for system windows on top of us,
// otherwise holes would remain
- vcl::Window* pUpdateOverlapWindow = ImplGetFirstOverlapWindow()->mpWindowImpl->mpFirstOverlap;
+ vcl::Window* pUpdateOverlapWindow = ImplGetFirstOverlapWindow();
+ if (pUpdateOverlapWindow->mpWindowImpl)
+ pUpdateOverlapWindow = pUpdateOverlapWindow->mpWindowImpl->mpFirstOverlap;
+ else
+ pUpdateOverlapWindow = nullptr;
while ( pUpdateOverlapWindow )
{
pUpdateOverlapWindow->Update();
@@ -1601,6 +1609,9 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP
void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& /*rSize*/ )
{
+ if( !mpWindowImpl )
+ return;
+
SAL_WARN_IF( pDev->HasMirroredGraphics(), "vcl.window", "PaintToDevice to mirroring graphics" );
SAL_WARN_IF( pDev->IsRTLEnabled(), "vcl.window", "PaintToDevice to mirroring device" );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 0143bf85ee2f..f9acc5db9c2f 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2240,7 +2240,8 @@ void Window::Show(bool bVisible, ShowFlags nFlags)
// inherit native widget flag for form controls
// required here, because frames never show up in the child hierarchy - which should be fixed...
// eg, the drop down of a combobox which is a system floating window
- if( mpWindowImpl->mbFrame && GetParent() && GetParent()->IsCompoundControl() &&
+ if( mpWindowImpl->mbFrame && GetParent() && !GetParent()->IsDisposed() &&
+ GetParent()->IsCompoundControl() &&
GetParent()->IsNativeWidgetEnabled() != IsNativeWidgetEnabled() &&
!(GetStyle() & WB_TOOLTIPWIN) )
{
@@ -3709,7 +3710,7 @@ void Window::EnableNativeWidget( bool bEnable )
bool Window::IsNativeWidgetEnabled() const
{
- return ImplGetWinData()->mbEnableNativeWidget;
+ return mpWindowImpl ? ImplGetWinData()->mbEnableNativeWidget : false;
}
Reference< css::rendering::XCanvas > Window::ImplGetCanvas( bool bSpriteCanvas ) const
@@ -3889,7 +3890,10 @@ void Window::set_id(const OUString& rID)
const OUString& Window::get_id() const
{
- return mpWindowImpl->maID;
+ if (mpWindowImpl)
+ return mpWindowImpl->maID;
+ static OUString empty;
+ return empty;
}
FactoryFunction Window::GetUITestFactory() const
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index b4c69e49d0ff..8282396af932 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -286,6 +286,7 @@ void Window::EndTracking( TrackingEventFlags nFlags )
ReleaseMouse();
// call EndTracking if required
+ if (mpWindowImpl && mpWindowImpl->mpFrameData)
{
Point aMousePos( mpWindowImpl->mpFrameData->mnLastMouseX, mpWindowImpl->mpFrameData->mnLastMouseY );
if( ImplIsAntiparallel() )
@@ -311,7 +312,7 @@ void Window::EndTracking( TrackingEventFlags nFlags )
bool Window::IsTracking() const
{
- return (ImplGetSVData()->mpWinData->mpTrackWin == this);
+ return mpWindowImpl && (ImplGetSVData()->mpWinData->mpTrackWin == this);
}
void Window::StartAutoScroll( StartAutoScrollFlags nFlags )
@@ -892,6 +893,11 @@ vcl::Window* Window::ImplGetFirstOverlapWindow()
const vcl::Window* Window::ImplGetFirstOverlapWindow() const
{
+ if (!mpWindowImpl)
+ {
+ return nullptr;
+ }
+
if ( mpWindowImpl->mbOverlapWin )
return this;
else
@@ -1192,7 +1198,7 @@ GetFocusFlags Window::GetGetFocusFlags() const
bool Window::IsCompoundControl() const
{
- return mpWindowImpl->mbCompoundControl;
+ return mpWindowImpl ? mpWindowImpl->mbCompoundControl : false;
}
bool Window::IsWait() const
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index fe3b8bee916d..096dd683c894 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1843,6 +1843,9 @@ IMPL_LINK_NOARG(vcl::Window, ImplAsyncFocusHdl, void*, void)
static void ImplHandleGetFocus( vcl::Window* pWindow )
{
+ if (!pWindow || !pWindow->ImplGetWindowImpl() || !pWindow->ImplGetWindowImpl()->mpFrameData)
+ return;
+
pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = true;
// execute Focus-Events after a delay, such that SystemChildWindows
@@ -1859,6 +1862,9 @@ static void ImplHandleGetFocus( vcl::Window* pWindow )
static void ImplHandleLoseFocus( vcl::Window* pWindow )
{
+ if (!pWindow)
+ return;
+
ImplSVData* pSVData = ImplGetSVData();
// Abort the autoscroll if the frame loses focus
@@ -1868,23 +1874,27 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow )
// Abort tracking if the frame loses focus
if (pSVData->mpWinData->mpTrackWin)
{
- if (pSVData->mpWinData->mpTrackWin->ImplGetWindowImpl()->mpFrameWindow == pWindow)
+ if (pSVData->mpWinData->mpTrackWin->ImplGetWindowImpl() &&
+ pSVData->mpWinData->mpTrackWin->ImplGetWindowImpl()->mpFrameWindow == pWindow)
pSVData->mpWinData->mpTrackWin->EndTracking(TrackingEventFlags::Cancel);
}
- pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = false;
-
- // execute Focus-Events after a delay, such that SystemChildWindows
- // do not flicker when they receive focus
- if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
+ if (pWindow->ImplGetWindowImpl() && pWindow->ImplGetWindowImpl()->mpFrameData)
{
- pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
- pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
- }
+ pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = false;
+
+ // execute Focus-Events after a delay, such that SystemChildWindows
+ // do not flicker when they receive focus
+ if ( !pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId )
+ {
+ pWindow->ImplGetWindowImpl()->mpFrameData->mbStartFocusState = !pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus;
+ pWindow->ImplGetWindowImpl()->mpFrameData->mnFocusId = Application::PostUserEvent( LINK( pWindow, vcl::Window, ImplAsyncFocusHdl ), nullptr, true );
+ }
- vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
- if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
- pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide();
+ vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin;
+ if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor )
+ pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide();
+ }
// Make sure that no menu is visible when a toplevel window loses focus.
VclPtr<FloatingWindow> pFirstFloat = pSVData->mpWinData->mpFirstFloat;
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index cae2a4e1ab03..d114dd71accd 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -40,11 +40,11 @@ void CPDManager::onNameAcquired (GDBusConnection *connection,
gpointer user_data)
{
gchar* contents;
- GDBusNodeInfo *introspection_data;
-
// Get Interface for introspection
- g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr);
- introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+ if (!g_file_get_contents (FRONTEND_INTERFACE, &contents, nullptr, nullptr))
+ return;
+
+ GDBusNodeInfo *introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
g_dbus_connection_register_object (connection,
"/org/libreoffice/PrintDialog",
@@ -60,28 +60,29 @@ void CPDManager::onNameAcquired (GDBusConnection *connection,
std::vector<std::pair<std::string, gchar*>> backends = current->getTempBackends();
for (auto const& backend : backends)
{
- GDBusProxy *proxy;
// Get Interface for introspection
- g_file_get_contents (BACKEND_INTERFACE, &contents, nullptr, nullptr);
- introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
- proxy = g_dbus_proxy_new_sync (connection,
- G_DBUS_PROXY_FLAGS_NONE,
- introspection_data->interfaces[0],
- backend.first.c_str(),
- backend.second,
- "org.openprinting.PrintBackend",
- nullptr,
- nullptr);
+ if (g_file_get_contents(BACKEND_INTERFACE, &contents, nullptr, nullptr))
+ {
+ introspection_data = g_dbus_node_info_new_for_xml (contents, nullptr);
+ GDBusProxy *proxy = g_dbus_proxy_new_sync (connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ introspection_data->interfaces[0],
+ backend.first.c_str(),
+ backend.second,
+ "org.openprinting.PrintBackend",
+ nullptr,
+ nullptr);
+ g_assert (proxy != nullptr);
+ g_dbus_proxy_call(proxy, "ActivateBackend",
+ nullptr,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1, nullptr, nullptr, nullptr);
+
+ g_free(contents);
+ g_object_unref(proxy);
+ g_dbus_node_info_unref(introspection_data);
+ }
g_free(backend.second);
- g_assert (proxy != nullptr);
- g_dbus_proxy_call(proxy, "ActivateBackend",
- nullptr,
- G_DBUS_CALL_FLAGS_NONE,
- -1, nullptr, nullptr, nullptr);
-
- g_free(contents);
- g_object_unref(proxy);
- g_dbus_node_info_unref(introspection_data);
}
}
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 84163b05ac64..f9e1c9f17fd5 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -2700,6 +2700,8 @@ public:
return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
}
+ virtual void set_cursor_data(void * /*pData*/) override {};
+
virtual std::unique_ptr<weld::Container> weld_parent() const override;
virtual OString get_buildable_name() const override
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/inc/dmapper/resourcemodel.hxx b/writerfilter/inc/dmapper/resourcemodel.hxx
index 44e659235845..177c3cee9d6b 100644
--- a/writerfilter/inc/dmapper/resourcemodel.hxx
+++ b/writerfilter/inc/dmapper/resourcemodel.hxx
@@ -180,6 +180,11 @@ const sal_uInt8 cFieldStart = 0x13;
const sal_uInt8 cFieldSep = 0x14;
const sal_uInt8 cFieldEnd = 0x15;
+namespace ooxml
+{
+class OOXMLDocument;
+}
+
/**
Handler for a stream.
*/
@@ -205,6 +210,8 @@ public:
/// The current section is the last one in this body text.
virtual void markLastSectionGroup( ) { };
+ virtual void setDocumentReference(writerfilter::ooxml::OOXMLDocument* 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 c6d718790763..40b03086d596 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -183,6 +183,11 @@ DomainMapper::DomainMapper( const uno::Reference< uno::XComponentContext >& xCon
catch( const uno::Exception& ) {}
}
+void DomainMapper::setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument)
+{
+ m_pImpl->setDocumentReference(pDocument);
+}
+
DomainMapper::~DomainMapper()
{
try
@@ -1019,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:
@@ -1031,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
@@ -1098,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:
@@ -2542,7 +2574,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);
@@ -2555,8 +2587,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());
}
@@ -2579,6 +2620,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:
@@ -2587,9 +2639,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;
@@ -2603,11 +2656,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
@@ -3385,7 +3448,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.
@@ -3396,43 +3459,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)
{
@@ -3458,15 +3532,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;
@@ -4016,7 +4081,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 b2c2ba63d9a0..e606e8369cd1 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(writerfilter::ooxml::OOXMLDocument* 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 82c13df4f7ef..8803603227df 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -270,6 +270,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 ),
@@ -354,6 +355,11 @@ DomainMapper_Impl::DomainMapper_Impl(
appendTableManager( );
GetBodyText();
+ if (!m_bIsNewDoc && !m_xBodyText)
+ {
+ throw uno::Exception("failed to find body text of the insert position", nullptr);
+ }
+
uno::Reference< text::XTextAppend > xBodyTextAppend( m_xBodyText, uno::UNO_QUERY );
m_aTextAppendStack.push(TextAppendContext(xBodyTextAppend,
m_bIsNewDoc ? uno::Reference<text::XTextCursor>() : m_xBodyText->createTextCursorByRange(m_xInsertTextRange)));
@@ -366,7 +372,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>());
@@ -390,6 +396,11 @@ DomainMapper_Impl::~DomainMapper_Impl()
}
}
+writerfilter::ooxml::OOXMLDocument* DomainMapper_Impl::getDocumentReference() const
+{
+ return m_pOOXMLDocument;
+}
+
uno::Reference< container::XNameContainer > const & DomainMapper_Impl::GetPageStyles()
{
if(!m_xPageStyles1.is())
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 668461bc978a..43c2a2b85b8d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -75,6 +75,11 @@ namespace com{ namespace sun{ namespace star{
}}}
namespace writerfilter {
+
+namespace ooxml {
+ class OOXMLDocument;
+}
+
namespace dmapper {
class SdtHelper;
@@ -436,6 +441,7 @@ public:
private:
SourceDocumentType const m_eDocumentType;
DomainMapper& m_rDMapper;
+ writerfilter::ooxml::OOXMLDocument* m_pOOXMLDocument;
OUString m_aBaseUrl;
css::uno::Reference<css::text::XTextDocument> m_xTextDocument;
css::uno::Reference<css::beans::XPropertySet> m_xDocumentSettings;
@@ -602,6 +608,9 @@ public:
utl::MediaDescriptor const & rMediaDesc);
~DomainMapper_Impl();
+ void setDocumentReference(writerfilter::ooxml::OOXMLDocument* pDocument) { if (!m_pOOXMLDocument) m_pOOXMLDocument = pDocument; };
+ writerfilter::ooxml::OOXMLDocument* getDocumentReference() const;
+
SectionPropertyMap* GetLastSectionContext( )
{
return dynamic_cast< SectionPropertyMap* >( m_pLastSectionContext.get( ) );
diff --git a/writerfilter/source/dmapper/LoggedResources.hxx b/writerfilter/source/dmapper/LoggedResources.hxx
index 3177224d4664..d89376bd679f 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(writerfilter::ooxml::OOXMLDocument* /*pDocument*/) override{};
+
protected:
virtual void lcl_startSectionGroup() = 0;
virtual void lcl_endSectionGroup() = 0;
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx
index 154e7660d842..8a2356051a21 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,139 @@ 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())
+ {
+ 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();
@@ -135,12 +268,39 @@ void SdtHelper::createDropDownControl()
// clean up
m_aDropDownItems.clear();
- m_bInsideDropDownControl = false;
+ setControlType(SdtControlType::unknown);
}
-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
+ m_aDropDownItems.clear();
+ setControlType(SdtControlType::unknown);
}
void SdtHelper::createDateContentControl()
@@ -194,6 +354,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 +366,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()));
}
}
+
+ setControlType(SdtControlType::unknown);
}
void SdtHelper::createControlShape(awt::Size aSize,
diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx
index 3cce8e3658af..e206cdc33cbe 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,25 @@ 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 querying 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();
+
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 +123,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 +146,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 2df01a68f27c..e8449752c77b 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -478,6 +478,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 969eca1d84e3..f5b0e597a737 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -13903,9 +13903,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">
@@ -13924,6 +13929,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">
@@ -13936,7 +13946,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"/>
@@ -13981,7 +13991,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"/>
@@ -13992,6 +14002,9 @@
<element name="bibliography">
<ref name="CT_Empty"/>
</element>
+ <element name="w15:color">
+ <ref name="CT_SdtColor"/>
+ </element>
</choice>
</define>
<define name="CT_SdtEndPr">
@@ -18222,11 +18235,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"/>
@@ -18250,6 +18272,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"/>
@@ -18314,6 +18337,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/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 90bec969bcae..18c09a5bd28f 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;
@@ -3222,9 +3223,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 +3260,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 +3269,9 @@ void SdXMLFloatingFrameShapeContext::StartElement( const css::uno::Reference< cs
if( !maHref.isEmpty() )
{
+ if (INetURLObject(maHref).GetProtocol() == INetProtocol::Macro)
+ GetImport().NotifyMacroEventRead();
+
xProps->setPropertyValue("FrameURL", Any(maHref) );
}
}
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 5231163429c9..6a584542b42f 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/xmlsecurity/inc/certificateviewer.hxx b/xmlsecurity/inc/certificateviewer.hxx
index d531dd1fc205..ccb2278f6972 100644
--- a/xmlsecurity/inc/certificateviewer.hxx
+++ b/xmlsecurity/inc/certificateviewer.hxx
@@ -139,6 +139,7 @@ private:
bool mbFirstActivateDone;
std::vector<std::unique_ptr<CertPath_UserData>> maUserData;
+ std::shared_ptr<CertificateViewer> mxCertificateViewer;
std::unique_ptr<weld::TreeView> mxCertPathLB;
std::unique_ptr<weld::Button> mxViewCertPB;
@@ -154,6 +155,7 @@ private:
public:
CertificateViewerCertPathTP(weld::Container* pParent, CertificateViewer* pDlg);
+ ~CertificateViewerCertPathTP();
void ActivatePage();
};
diff --git a/xmlsecurity/inc/digitalsignaturesdialog.hxx b/xmlsecurity/inc/digitalsignaturesdialog.hxx
index 59e699db7b69..848a2deeac80 100644
--- a/xmlsecurity/inc/digitalsignaturesdialog.hxx
+++ b/xmlsecurity/inc/digitalsignaturesdialog.hxx
@@ -44,6 +44,7 @@ namespace xml { namespace dom {
class HeaderBar;
+class CertificateViewer;
class DigitalSignaturesDialog : public weld::GenericDialogController
{
@@ -79,6 +80,9 @@ private:
std::unique_ptr<weld::Button> m_xStartCertMgrBtn;
std::unique_ptr<weld::Button> m_xCloseBtn;
+ std::shared_ptr<CertificateViewer> m_xViewer;
+ std::shared_ptr<weld::MessageDialog> m_xInfoBox;
+
DECL_LINK(AdESCompliantCheckBoxHdl, weld::ToggleButton&, void);
DECL_LINK(ViewButtonHdl, weld::Button&, void);
DECL_LINK(AddButtonHdl, weld::Button&, void);
@@ -119,6 +123,7 @@ public:
void SetSignatureStream( const css::uno::Reference < css::io::XStream >& rxStream );
// Execute the dialog...
+ void beforeRun();
short run() override;
// Did signatures change?
diff --git a/xmlsecurity/inc/xmlsec-wrapper.h b/xmlsecurity/inc/xmlsec-wrapper.h
index c060c8bf23b8..2d06dcfdd549 100644
--- a/xmlsecurity/inc/xmlsec-wrapper.h
+++ b/xmlsecurity/inc/xmlsec-wrapper.h
@@ -43,6 +43,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/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/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/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index d25b87fdd7f3..2f869147db5f 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -24,6 +24,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>
@@ -53,6 +54,7 @@
#include <sfx2/docfilt.hxx>
#include <officecfg/Office/Common.hxx>
#include <comphelper/configuration.hxx>
+#include <vcl/scheduler.hxx>
#include <svx/signaturelinehelper.hxx>
#include <sfx2/viewsh.hxx>
#include <comphelper/propertyvalue.hxx>
@@ -518,6 +520,127 @@ 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"),
+ infos[0].Signer->getSubjectName());
+}
+
+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();
+ 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());
+}
+
/// Test a typical OOXML where a number of (but not all) streams are signed.
CPPUNIT_TEST_FIXTURE(SigningTest, testOOXMLPartial)
{
@@ -795,13 +918,13 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdESNotype)
// attribute", i.e. the signature without such an attribute was not preserved correctly.
assertXPathNoAttribute(pXmlDoc,
"/odfds:document-signatures/dsig:Signature[1]/dsig:SignedInfo/"
- "dsig:Reference[@URI='#idSignedProperties']",
+ "dsig:Reference[starts-with(@URI, '#idSignedProperties')]",
"Type");
// New signature always has the Type attribute.
assertXPath(pXmlDoc,
"/odfds:document-signatures/dsig:Signature[2]/dsig:SignedInfo/"
- "dsig:Reference[@URI='#idSignedProperties']",
+ "dsig:Reference[starts-with(@URI, '#idSignedProperties')]",
"Type", "http://uri.etsi.org/01903#SignedProperties");
}
@@ -860,12 +983,162 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testXAdES)
// Assert that the digest of the signing certificate is included.
assertXPath(pXmlDoc, "//xd:CertDigest", 1);
- // Assert that the Type attribute on the idSignedProperties reference is
- // not missing.
- assertXPath(pXmlDoc,
- "/odfds:document-signatures/dsig:Signature/dsig:SignedInfo/"
- "dsig:Reference[@URI='#idSignedProperties']",
- "Type", "http://uri.etsi.org/01903#SignedProperties");
+ // Assert that the Type attribute is set on all URI's that start with #idSignedProperties
+ assertXPath(pXmlDoc, "//dsig:Reference[starts-with(@URI, '#idSignedProperties')]", "Type",
+ "http://uri.etsi.org/01903#SignedProperties");
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_ODT)
+{
+ createDoc("");
+
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("writer8");
+ xStorable->storeAsURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ {
+ DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content);
+ CPPUNIT_ASSERT(aManager.init());
+ uno::Reference<embed::XStorage> xStorage
+ = comphelper::OStorageHelper::GetStorageOfFormatFromURL(
+ ZIP_STORAGE_FORMAT_STRING, aTempFile.GetURL(), embed::ElementModes::READWRITE);
+ CPPUNIT_ASSERT(xStorage.is());
+ aManager.setStore(xStorage);
+ aManager.getSignatureHelper().SetStorage(xStorage, "1.2");
+
+ // Create a signature.
+ uno::Reference<security::XCertificate> xCertificate
+ = getCertificate(aManager, svl::crypto::SignatureMethodAlgorithm::RSA);
+
+ if (!xCertificate.is())
+ return;
+ sal_Int32 nSecurityId;
+ aManager.add(xCertificate, mxSecurityContext, /*rDescription=*/OUString(), nSecurityId,
+ /*bAdESCompliant=*/true);
+
+ // Read back the signature and make sure that it's valid.
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(1), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[0].nStatus);
+ }
+
+ aManager.add(xCertificate, mxSecurityContext, /*rDescription=*/OUString(), nSecurityId,
+ /*bAdESCompliant=*/true);
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(2), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[1].nStatus);
+ }
+
+ aManager.add(xCertificate, mxSecurityContext, /*rDescription=*/OUString(), nSecurityId,
+ /*bAdESCompliant=*/true);
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(3), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[2].nStatus);
+ }
+
+ aManager.write(/*bXAdESCompliantIfODF=*/true);
+ uno::Reference<embed::XTransactedObject> xTransactedObject(xStorage, uno::UNO_QUERY);
+ xTransactedObject->commit();
+ }
+
+ Scheduler::ProcessEventsToIdle();
+
+ createDoc(aTempFile.GetURL());
+
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ CPPUNIT_ASSERT_EQUAL(SignatureState::OK, pObjectShell->GetDocumentSignatureState());
+}
+
+CPPUNIT_TEST_FIXTURE(SigningTest, testSigningMultipleTimes_OOXML)
+{
+ createDoc("");
+
+ utl::TempFile aTempFile;
+ aTempFile.EnableKillingFile();
+ uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
+ utl::MediaDescriptor aMediaDescriptor;
+ aMediaDescriptor["FilterName"] <<= OUString("MS Word 2007 XML");
+ xStorable->storeAsURL(aTempFile.GetURL(), aMediaDescriptor.getAsConstPropertyValueList());
+
+ {
+ DocumentSignatureManager aManager(mxComponentContext, DocumentSignatureMode::Content);
+ CPPUNIT_ASSERT(aManager.init());
+ uno::Reference<embed::XStorage> xStorage
+ = comphelper::OStorageHelper::GetStorageOfFormatFromURL(
+ ZIP_STORAGE_FORMAT_STRING, aTempFile.GetURL(), embed::ElementModes::READWRITE);
+ CPPUNIT_ASSERT(xStorage.is());
+ aManager.setStore(xStorage);
+ aManager.getSignatureHelper().SetStorage(xStorage, "1.2");
+
+ // Create a signature.
+ uno::Reference<security::XCertificate> xCertificate
+ = getCertificate(aManager, svl::crypto::SignatureMethodAlgorithm::ECDSA);
+ if (!xCertificate.is())
+ return;
+
+ sal_Int32 nSecurityId;
+ aManager.add(xCertificate, mxSecurityContext, "", nSecurityId, /*bAdESCompliant=*/false);
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(1), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[0].nStatus);
+ }
+
+ aManager.add(xCertificate, mxSecurityContext, "", nSecurityId, /*bAdESCompliant=*/false);
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(2), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[1].nStatus);
+ }
+
+ aManager.add(xCertificate, mxSecurityContext, "", nSecurityId, /*bAdESCompliant=*/false);
+ aManager.read(/*bUseTempStream=*/true);
+ {
+ std::vector<SignatureInformation>& rInformations
+ = aManager.getCurrentSignatureInformations();
+ CPPUNIT_ASSERT_EQUAL(static_cast<std::size_t>(3), rInformations.size());
+ CPPUNIT_ASSERT_EQUAL(css::xml::crypto::SecurityOperationStatus_OPERATION_SUCCEEDED,
+ rInformations[2].nStatus);
+ }
+
+ aManager.write(/*bXAdESCompliantIfODF=*/true);
+ uno::Reference<embed::XTransactedObject> xTransactedObject(xStorage, uno::UNO_QUERY);
+ xTransactedObject->commit();
+ }
+
+ Scheduler::ProcessEventsToIdle();
+
+ createDoc(aTempFile.GetURL());
+
+ SfxBaseModel* pBaseModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
+ CPPUNIT_ASSERT(pBaseModel);
+ SfxObjectShell* pObjectShell = pBaseModel->GetObjectShell();
+ CPPUNIT_ASSERT(pObjectShell);
+ CPPUNIT_ASSERT_EQUAL(SignatureState::PARTIAL_OK, pObjectShell->GetDocumentSignatureState());
}
/// Works with an existing good XAdES signature.
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index a3ace6a7528a..dd9192ead0bd 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -19,9 +19,10 @@
#include <resourcemanager.hxx>
-#include <digitalsignaturesdialog.hxx>
+#include <certificate.hxx>
#include <certificatechooser.hxx>
#include <certificateviewer.hxx>
+#include <digitalsignaturesdialog.hxx>
#include <macrosecurity.hxx>
#include <biginteger.hxx>
#include <strings.hrc>
@@ -429,19 +430,26 @@ bool DocumentDigitalSignatures::ImplViewSignatures(
DocumentSignatureMode eMode, bool bReadOnly )
{
bool bChanges = false;
- DigitalSignaturesDialog aSignaturesDialog(
+ auto xSignaturesDialog = std::make_shared<DigitalSignaturesDialog>(
Application::GetFrameWeld(mxParentWindow), mxCtx, eMode, bReadOnly, m_sODFVersion,
m_bHasDocumentSignature);
- bool bInit = aSignaturesDialog.Init();
+ bool bInit = xSignaturesDialog->Init();
SAL_WARN_IF( !bInit, "xmlsecurity.comp", "Error initializing security context!" );
if ( bInit )
{
- aSignaturesDialog.SetStorage(rxStorage);
+ xSignaturesDialog->SetStorage(rxStorage);
+
+ xSignaturesDialog->SetSignatureStream( xSignStream );
- aSignaturesDialog.SetSignatureStream( xSignStream );
- if (aSignaturesDialog.run() == RET_OK)
+ if (bReadOnly)
+ {
+ xSignaturesDialog->beforeRun();
+ weld::DialogController::runAsync(xSignaturesDialog, [] (sal_Int32) {});
+ return false;
+ }
+ else if (xSignaturesDialog->run() == RET_OK)
{
- if (aSignaturesDialog.SignaturesChanged())
+ if (xSignaturesDialog->SignaturesChanged())
{
bChanges = true;
// If we have a storage and no stream, we are responsible for commit
@@ -662,9 +670,23 @@ 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()))
+ 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]);
+
+ auto pAuthor = dynamic_cast<xmlsecurity::Certificate*>(xAuthor.get());
+ auto pCert = dynamic_cast<xmlsecurity::Certificate*>(xCert.get());
+ if (pAuthor && pCert)
+ return pCert->getSHA256Thumbprint() == pAuthor->getSHA256Thumbprint();
+
+ return xCert->getSHA1Thumbprint() == xAuthor->getSHA1Thumbprint();
});
}
diff --git a/xmlsecurity/source/dialogs/certificateviewer.cxx b/xmlsecurity/source/dialogs/certificateviewer.cxx
index 3807300e7b49..228cbfdc8a54 100644
--- a/xmlsecurity/source/dialogs/certificateviewer.cxx
+++ b/xmlsecurity/source/dialogs/certificateviewer.cxx
@@ -268,6 +268,12 @@ CertificateViewerCertPathTP::CertificateViewerCertPathTP(weld::Container* pParen
mxViewCertPB->connect_clicked( LINK( this, CertificateViewerCertPathTP, ViewCertHdl ) );
}
+CertificateViewerCertPathTP::~CertificateViewerCertPathTP()
+{
+ if (mxCertificateViewer)
+ mxCertificateViewer->response(RET_OK);
+}
+
void CertificateViewerCertPathTP::ActivatePage()
{
if ( !mbFirstActivateDone )
@@ -319,10 +325,13 @@ IMPL_LINK_NOARG(CertificateViewerCertPathTP, ViewCertHdl, weld::Button&, void)
std::unique_ptr<weld::TreeIter> xIter = mxCertPathLB->make_iterator();
if (mxCertPathLB->get_selected(xIter.get()))
{
+ if (mxCertificateViewer)
+ mxCertificateViewer->response(RET_OK);
+
CertPath_UserData* pData = reinterpret_cast<CertPath_UserData*>(mxCertPathLB->get_id(*xIter).toInt64());
- CertificateViewer aViewer(mpDlg->getDialog(), mpDlg->mxSecurityEnvironment,
+ mxCertificateViewer = std::make_shared<CertificateViewer>(mpDlg->getDialog(), mpDlg->mxSecurityEnvironment,
pData->mxCert, false, nullptr);
- aViewer.run();
+ weld::DialogController::runAsync(mxCertificateViewer, [this] (sal_Int32) { mxCertificateViewer = nullptr; });
}
}
diff --git a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
index 18ccaf2d2166..a27737668eba 100644
--- a/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
+++ b/xmlsecurity/source/dialogs/digitalsignaturesdialog.cxx
@@ -52,6 +52,7 @@
#include <bitmaps.hlst>
#include <strings.hrc>
#include <resourcemanager.hxx>
+#include <comphelper/lok.hxx>
#include <comphelper/xmlsechelper.hxx>
#include <comphelper/processfactory.hxx>
@@ -188,10 +189,22 @@ DigitalSignaturesDialog::DigitalSignaturesDialog(
m_xHintPackageFT->show();
break;
}
+
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ m_xAddBtn->hide();
+ m_xRemoveBtn->hide();
+ m_xStartCertMgrBtn->hide();
+ }
}
DigitalSignaturesDialog::~DigitalSignaturesDialog()
{
+ if (m_xViewer)
+ m_xViewer->response(RET_OK);
+
+ if (m_xInfoBox)
+ m_xInfoBox->response(RET_OK);
}
bool DigitalSignaturesDialog::Init()
@@ -308,7 +321,7 @@ bool DigitalSignaturesDialog::canRemove()
return (bRet && canAddRemove());
}
-short DigitalSignaturesDialog::run()
+void DigitalSignaturesDialog::beforeRun()
{
// Verify Signatures and add certificates to ListBox...
mbVerifySignatures = true;
@@ -333,7 +346,11 @@ short DigitalSignaturesDialog::run()
// Only verify once, content will not change.
// But for refreshing signature information, StartVerifySignatureHdl will be called after each add/remove
mbVerifySignatures = false;
+}
+short DigitalSignaturesDialog::run()
+{
+ beforeRun();
return GenericDialogController::run();
}
@@ -755,16 +772,22 @@ void DigitalSignaturesDialog::ImplShowSignaturesDetails()
if ( xCert.is() )
{
+ if (m_xViewer)
+ m_xViewer->response(RET_OK);
+
uno::Reference<xml::crypto::XSecurityEnvironment> xSecEnv = getSecurityEnvironmentForCertificate(xCert);
- CertificateViewer aViewer(m_xDialog.get(), xSecEnv, xCert, false, nullptr);
- aViewer.run();
+ m_xViewer = std::make_shared<CertificateViewer>(m_xDialog.get(), xSecEnv, xCert, false, nullptr);
+ weld::DialogController::runAsync(m_xViewer, [this] (sal_Int32) { m_xViewer = nullptr; });
}
else
{
- std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(m_xDialog.get(),
+ if (m_xInfoBox)
+ m_xInfoBox->response(RET_OK);
+
+ m_xInfoBox = std::shared_ptr<weld::MessageDialog>(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Info, VclButtonsType::Ok,
XsResId(STR_XMLSECDLG_NO_CERT_FOUND)));
- xInfoBox->run();
+ m_xInfoBox->runAsync(m_xInfoBox, [this] (sal_Int32) { m_xInfoBox = nullptr; });
}
}
}
diff --git a/xmlsecurity/source/helper/documentsignaturehelper.cxx b/xmlsecurity/source/helper/documentsignaturehelper.cxx
index ddff308ee52f..65135d758a1a 100644
--- a/xmlsecurity/source/helper/documentsignaturehelper.cxx
+++ b/xmlsecurity/source/helper/documentsignaturehelper.cxx
@@ -522,7 +522,7 @@ void DocumentSignatureHelper::writeSignedProperties(
{
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idSignedProperties");
+ pAttributeList->AddAttribute("Id", "idSignedProperties_" + signatureInfo.ouSignatureId);
xDocumentHandler->startElement("xd:SignedProperties", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
diff --git a/xmlsecurity/source/helper/ooxmlsecexporter.cxx b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
index 1e031644b0b5..9267b5458783 100644
--- a/xmlsecurity/source/helper/ooxmlsecexporter.cxx
+++ b/xmlsecurity/source/helper/ooxmlsecexporter.cxx
@@ -62,6 +62,7 @@ public:
return m_xDocumentHandler;
}
+ void writeSignature();
void writeSignedInfo();
void writeCanonicalizationMethod();
void writeCanonicalizationTransform();
@@ -158,7 +159,7 @@ void OOXMLSecExporter::Impl::writeSignedInfoReferences()
{
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- if (rReference.ouURI != "idSignedProperties")
+ if (!rReference.ouURI.startsWith("idSignedProperties"))
pAttributeList->AddAttribute("Type",
"http://www.w3.org/2000/09/xmldsig#Object");
else
@@ -168,7 +169,7 @@ void OOXMLSecExporter::Impl::writeSignedInfoReferences()
m_xDocumentHandler->startElement(
"Reference", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
- if (rReference.ouURI == "idSignedProperties")
+ if (rReference.ouURI.startsWith("idSignedProperties"))
{
m_xDocumentHandler->startElement(
"Transforms",
@@ -220,7 +221,7 @@ void OOXMLSecExporter::Impl::writeKeyInfo()
void OOXMLSecExporter::Impl::writePackageObject()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idPackageObject");
+ pAttributeList->AddAttribute("Id", "idPackageObject_" + m_rInformation.ouSignatureId);
m_xDocumentHandler->startElement(
"Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
@@ -299,8 +300,9 @@ void OOXMLSecExporter::Impl::writePackageObjectSignatureProperties()
"SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idSignatureTime");
- pAttributeList->AddAttribute("Target", "#idPackageSignature");
+
+ pAttributeList->AddAttribute("Id", "idSignatureTime_" + m_rInformation.ouSignatureId);
+ pAttributeList->AddAttribute("Target", "#" + m_rInformation.ouSignatureId);
m_xDocumentHandler->startElement(
"SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
@@ -379,7 +381,7 @@ void OOXMLSecExporter::Impl::writeOfficeObject()
{
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idOfficeObject");
+ pAttributeList->AddAttribute("Id", "idOfficeObject_" + m_rInformation.ouSignatureId);
m_xDocumentHandler->startElement(
"Object", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
@@ -387,8 +389,8 @@ void OOXMLSecExporter::Impl::writeOfficeObject()
"SignatureProperties", uno::Reference<xml::sax::XAttributeList>(new SvXMLAttributeList()));
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idOfficeV1Details");
- pAttributeList->AddAttribute("Target", "#idPackageSignature");
+ pAttributeList->AddAttribute("Id", "idOfficeV1Details_" + m_rInformation.ouSignatureId);
+ pAttributeList->AddAttribute("Target", "#" + m_rInformation.ouSignatureId);
m_xDocumentHandler->startElement(
"SignatureProperty", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
@@ -476,7 +478,7 @@ void OOXMLSecExporter::Impl::writePackageSignature()
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
pAttributeList->AddAttribute("xmlns:xd", NS_XD);
- pAttributeList->AddAttribute("Target", "#idPackageSignature");
+ pAttributeList->AddAttribute("Target", "#" + m_rInformation.ouSignatureId);
m_xDocumentHandler->startElement(
"xd:QualifyingProperties",
uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
@@ -519,6 +521,25 @@ void OOXMLSecExporter::Impl::writeSignatureLineImages()
}
}
+void OOXMLSecExporter::Impl::writeSignature()
+{
+ rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
+ pAttributeList->AddAttribute("xmlns", NS_XMLDSIG);
+ pAttributeList->AddAttribute("Id", m_rInformation.ouSignatureId);
+ getDocumentHandler()->startElement(
+ "Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
+
+ writeSignedInfo();
+ writeSignatureValue();
+ writeKeyInfo();
+ writePackageObject();
+ writeOfficeObject();
+ writePackageSignature();
+ writeSignatureLineImages();
+
+ getDocumentHandler()->endElement("Signature");
+}
+
OOXMLSecExporter::OOXMLSecExporter(
const uno::Reference<uno::XComponentContext>& xComponentContext,
const uno::Reference<embed::XStorage>& xRootStorage,
@@ -531,23 +552,6 @@ OOXMLSecExporter::OOXMLSecExporter(
OOXMLSecExporter::~OOXMLSecExporter() = default;
-void OOXMLSecExporter::writeSignature()
-{
- rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("xmlns", NS_XMLDSIG);
- pAttributeList->AddAttribute("Id", "idPackageSignature");
- m_pImpl->getDocumentHandler()->startElement(
- "Signature", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
-
- m_pImpl->writeSignedInfo();
- m_pImpl->writeSignatureValue();
- m_pImpl->writeKeyInfo();
- m_pImpl->writePackageObject();
- m_pImpl->writeOfficeObject();
- m_pImpl->writePackageSignature();
- m_pImpl->writeSignatureLineImages();
-
- m_pImpl->getDocumentHandler()->endElement("Signature");
-}
+void OOXMLSecExporter::writeSignature() { m_pImpl->writeSignature(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/helper/xsecctl.cxx b/xmlsecurity/source/helper/xsecctl.cxx
index 6bd88e24f91e..cdfe643bd0f7 100644
--- a/xmlsecurity/source/helper/xsecctl.cxx
+++ b/xmlsecurity/source/helper/xsecctl.cxx
@@ -532,7 +532,7 @@ void writeUnsignedProperties(
{
{
rtl::Reference<SvXMLAttributeList> pAttributeList(new SvXMLAttributeList());
- pAttributeList->AddAttribute("Id", "idUnsignedProperties");
+ pAttributeList->AddAttribute("Id", "idUnsignedProperties_" + signatureInfo.ouSignatureId);
xDocumentHandler->startElement("xd:UnsignedProperties", uno::Reference<xml::sax::XAttributeList>(pAttributeList.get()));
}
@@ -649,16 +649,21 @@ void XSecController::exportSignature(
* same-document reference
*/
{
- pAttributeList->AddAttribute(
+ if (refInfor.ouURI.startsWith("idSignedProperties"))
+ {
+ pAttributeList->AddAttribute("URI", "#idSignedProperties_" + signatureInfo.ouSignatureId);
+ if (bXAdESCompliantIfODF && !refInfor.ouType.isEmpty())
+ {
+ // The reference which points to the SignedProperties
+ // shall have this specific type.
+ pAttributeList->AddAttribute("Type", refInfor.ouType);
+ }
+ }
+ else
+ {
+ pAttributeList->AddAttribute(
"URI",
"#" + refInfor.ouURI);
-
- if (bXAdESCompliantIfODF && refInfor.ouURI == "idSignedProperties" && !refInfor.ouType.isEmpty())
- {
- // The reference which points to the SignedProperties
- // shall have this specific type.
- pAttributeList->AddAttribute("Type",
- refInfor.ouType);
}
}
diff --git a/xmlsecurity/source/helper/xsecsign.cxx b/xmlsecurity/source/helper/xsecsign.cxx
index fd33a320d9bd..8676f70c1041 100644
--- a/xmlsecurity/source/helper/xsecsign.cxx
+++ b/xmlsecurity/source/helper/xsecsign.cxx
@@ -134,8 +134,9 @@ css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > XSecCon
if (bXAdESCompliantIfODF)
{
+ OUString aId = "idSignedProperties_" + internalSignatureInfor.signatureInfor.ouSignatureId;
// We write a new reference, so it's possible to use the correct type URI.
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idSignedProperties", -1, "http://uri.etsi.org/01903#SignedProperties");
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, aId, -1, "http://uri.etsi.org/01903#SignedProperties");
size++;
}
@@ -147,13 +148,16 @@ css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > XSecCon
size++;
}
}
- else
+ else // OOXML
{
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idPackageObject", -1, OUString());
+ OUString aID = createId();
+ internalSignatureInfor.signatureInfor.ouSignatureId = aID;
+
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idPackageObject_" + aID, -1, OUString());
size++;
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idOfficeObject", -1, OUString());
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idOfficeObject_" + aID, -1, OUString());
size++;
- internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idSignedProperties", -1, OUString());
+ internalSignatureInfor.addReference(SignatureReferenceType::SAMEDOCUMENT, digestID, "idSignedProperties_" + aID, -1, OUString());
size++;
}
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/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 );