[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 10 commits - bin/distro-install-file-lists configure.ac external/libgpg-error include/sfx2 officecfg/Configuration_officecfg.mk officecfg/registry postprocess/CustomTarget_registry.mk Repository.mk RepositoryModule_host.mk scp2/AutoInstall.mk scp2/InstallModule_python.mk sc/source sd/source setup_native/source sfx2/source solenv/bin sw/source sysui/CustomTarget_share.mk sysui/desktop
Michael Stahl (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 31 15:27:13 UTC 2019
Repository.mk | 4
RepositoryModule_host.mk | 1
bin/distro-install-file-lists | 3
configure.ac | 5
external/libgpg-error/UnpackedTarball_libgpg-error.mk | 1
external/libgpg-error/libgpg-error_gawk5.patch | 114 ++++++++++
external/libgpg-error/w32-build-fixes.patch | 2
include/sfx2/objsh.hxx | 2
officecfg/Configuration_officecfg.mk | 3
officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu | 14 -
postprocess/CustomTarget_registry.mk | 6
sc/source/ui/docshell/externalrefmgr.cxx | 53 +++-
scp2/AutoInstall.mk | 1
scp2/InstallModule_python.mk | 6
sd/source/filter/ppt/pptin.cxx | 2
setup_native/source/packinfo/packinfo_office.txt | 17 -
sfx2/source/doc/objmisc.cxx | 33 ++
sfx2/source/notify/eventsupplier.cxx | 18 +
solenv/bin/modules/installer/epmfile.pm | 12 -
sw/source/core/layout/fly.cxx | 2
sw/source/core/layout/ssfrm.cxx | 2
sysui/CustomTarget_share.mk | 27 ++
sysui/desktop/freedesktop/freedesktop-menus.spec | 2
sysui/desktop/share/create_tree.sh | 15 -
24 files changed, 239 insertions(+), 106 deletions(-)
New commits:
commit fa58f27bb421b449134e79c03a4fb8762ab18679
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jul 31 12:30:26 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jul 31 16:53:00 2019 +0200
solenv installer: don't let RPM generate config(...) Requires
Fedora 30's rpm 4.14.2.1 will generate this Requires:
config(lodevbasis6.1-core) = 6.1.7.0.0-1
... but no corresponding Provides because that's disabled, so the
package cannot be installed.
The reason is that there is one %config file in the -core rpm:
%attr(0644,root,root) %config(noreplace) "/opt/libreofficedev6.1/./share/psprint/psprint.conf"
Old RPM from CentOS6 does not generate these config requires.
Unfortunately there doesn't appear to be a way to disable this
config(...) without disabling AutoReq, so do that, and invoke the shell
script find-requires-x11.sh manually from epmfile.pm.
Change-Id: I7fee0d9cd1b9e79f81bd4c611500e84736564881
Reviewed-on: https://gerrit.libreoffice.org/76736
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit b1d555ed42a035e0489accc19903c1ed8897bcee)
diff --git a/solenv/bin/modules/installer/epmfile.pm b/solenv/bin/modules/installer/epmfile.pm
index bc6a76ccf44d..3e3df2a03295 100644
--- a/solenv/bin/modules/installer/epmfile.pm
+++ b/solenv/bin/modules/installer/epmfile.pm
@@ -1182,15 +1182,15 @@ sub set_autoprovreq_in_specfile
{
my ($changefile, $findrequires, $bindir) = @_;
- my $autoreqprovline;
+ my $autoreqprovline = "AutoReqProv\: no\n";
if ( $findrequires )
{
- $autoreqprovline = "AutoProv\: no\n%define _use_internal_dependency_generator 0\n%define __find_requires $bindir/$findrequires\n";
- }
- else
- {
- $autoreqprovline = "AutoReqProv\: no\n";
+ # don't let rpm invoke it, we never want to use AutoReq because
+ # rpm will generate Requires: config(packagename)
+ open (FINDREQUIRES, "echo | $bindir/$findrequires |");
+ while (<FINDREQUIRES>) { $autoreqprovline .= "Requires: $_\n"; }
+ close (FINDREQUIRES);
}
$autoreqprovline .= "%define _binary_filedigest_algorithm 1\n%define _binary_payload w9.gzdio\n";
commit b3f72cd239e5a9d7f863bded46d6fc902a4c570c
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Jul 30 13:40:52 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jul 31 16:51:30 2019 +0200
sysui: fix rpm errors in freedesktop-menus (4.14.1)
RPM build errors:
Explicit %attr() mode not applicable to symlink: /workdir/CustomTarget/sysui/rpm/libreofficedev/freedesktop/usr/bin/libreofficedev6.1
Installed (but unpackaged) file(s) found:
/usr/local/lib/girepository-1.0/LOKDocView-0.1.typelib
/usr/share/gir-1.0/LOKDocView-0.1.gir
The LOKDocView problem turned out to be the result of the first
incremental build after adding --with-package-format, and previously it
was avoided with a if in configure; moving the commands out of
create_tree.sh should be more obvious and reliable though.
Change-Id: I69c1566e26eeaa1d8bf88a3650a78da6ddfb5a3b
Reviewed-on: https://gerrit.libreoffice.org/76596
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 634844354ee6ed884128086a80c3ee32c889d8c9)
diff --git a/configure.ac b/configure.ac
index b2a074b5bc8e..7ebdc176ed9c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9984,10 +9984,7 @@ if test "x$enable_gtk3" = "xyes"; then
PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.18 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="")
if test "x$ENABLE_GTK3" = "xTRUE"; then
R="gtk3"
- dnl Avoid installed by unpackaged files for now.
- if test -z "$PKGFORMAT"; then
- GOBJECT_INTROSPECTION_CHECK(INTROSPECTION_REQUIRED_VERSION)
- fi
+ GOBJECT_INTROSPECTION_CHECK(INTROSPECTION_REQUIRED_VERSION)
else
AC_MSG_ERROR([gtk3 or dependent libraries of the correct versions, not found])
fi
diff --git a/sysui/CustomTarget_share.mk b/sysui/CustomTarget_share.mk
index d4f24b5f8e60..9f5e37139fd7 100644
--- a/sysui/CustomTarget_share.mk
+++ b/sysui/CustomTarget_share.mk
@@ -129,6 +129,9 @@ $(eval $(call gb_CustomTarget_register_targets,sysui/share,\
$(product)/openoffice.keys \
$(product)/openoffice.sh \
$(product)/create_tree.sh \
+ $(if $(INTROSPECTION_SCANNER),\
+ $(product)/LOKDocView-0.1.gir \
+ $(product)/LOKDocView-0.1.typelib) \
$(product)/launcherlist) \
))
@@ -173,6 +176,30 @@ $(share_WORKDIR)/%/create_tree.sh: $(share_SRCDIR)/share/create_tree.sh \
cat $< >> $@
chmod 774 $@
+# Generate gobject-introspection files
+# These are *not* packaged in rpms because there's no good place to put them
+# where the system will actually find them and where it won't conflict with a
+# distro packaged LO; on Fedora 30 at least there's no /opt path in
+# $XDG_DATA_DIRS
+ifneq ($(INTROSPECTION_SCANNER),)
+
+$(share_WORKDIR)/%/LOKDocView-0.1.gir: \
+ $(call gb_Library_get_target,libreofficekitgtk)
+ mkdir -p $(dir $@)
+ g-ir-scanner "${SRCDIR}/include/LibreOfficeKit/LibreOfficeKitGtk.h" \
+ "${SRCDIR}/libreofficekit/source/gtk/lokdocview.cxx" \
+ `${PKG_CONFIG} --cflags gobject-introspection-1.0 gtk+-3.0` \
+ -I"${SRCDIR}/include/" \
+ --include=GLib-2.0 --include=GObject-2.0 --include=Gio-2.0 \
+ --library=libreofficekitgtk --library-path="${INSTDIR}/program" \
+ --include=Gdk-3.0 --include=GdkPixbuf-2.0 --include=Gtk-3.0 \
+ --namespace=LOKDocView --nsversion=0.1 --identifier-prefix=LOKDoc --symbol-prefix=lok_doc \
+ --output="$@" --warn-all --no-libtool
+
+$(share_WORKDIR)/%/LOKDocView-0.1.typelib: $(share_WORKDIR)/%/LOKDocView-0.1.gir
+ g-ir-compiler "$<" --output="$@"
+
+endif
$(share_WORKDIR)/%/launcherlist: $(LAUNCHERS)
mkdir -p $(dir $@)
diff --git a/sysui/desktop/freedesktop/freedesktop-menus.spec b/sysui/desktop/freedesktop/freedesktop-menus.spec
index 6d05b2e0d2a8..fdeea00a5d54 100755
--- a/sysui/desktop/freedesktop/freedesktop-menus.spec
+++ b/sysui/desktop/freedesktop/freedesktop-menus.spec
@@ -391,7 +391,7 @@ done
# compat symlinks
%attr(0755,root,root) /opt/%unixfilename
%endif
-%attr(0755, root, root) /usr/bin/*
+/usr/bin/*
/usr/share/applications/%unixfilename-base.desktop
/usr/share/applications/%unixfilename-calc.desktop
/usr/share/applications/%unixfilename-draw.desktop
diff --git a/sysui/desktop/share/create_tree.sh b/sysui/desktop/share/create_tree.sh
index f146242d3796..0ade96cdb4c0 100755
--- a/sysui/desktop/share/create_tree.sh
+++ b/sysui/desktop/share/create_tree.sh
@@ -83,18 +83,3 @@ for i in base calc draw impress writer; do
done
cp "${APPDATA_SOURCE_DIR}/org.libreoffice.kde.metainfo.xml" "${DESTDIR}/${PREFIXDIR}/share/appdata/org.${PREFIX}.kde.metainfo.xml"
-# Generate gobject-introspection files
-if [ -n "$INTROSPECTION_SCANNER" ]; then
- mkdir -p "${DESTDIR}/${PREFIXDIR}/share/gir-1.0"
- g-ir-scanner "${SRCDIR}/include/LibreOfficeKit/LibreOfficeKitGtk.h" "${SRCDIR}/libreofficekit/source/gtk/lokdocview.cxx" \
- `${PKG_CONFIG} --cflags gobject-introspection-1.0 gtk+-3.0` -I"${SRCDIR}/include/" \
- --include=GLib-2.0 --include=GObject-2.0 --include=Gio-2.0 \
- --library=libreofficekitgtk --library-path="${INSTDIR}/program" \
- --include=Gdk-3.0 --include=GdkPixbuf-2.0 --include=Gtk-3.0 \
- --namespace=LOKDocView --nsversion=0.1 --identifier-prefix=LOKDoc --symbol-prefix=lok_doc \
- --output="${DESTDIR}/${PREFIXDIR}/share/gir-1.0/LOKDocView-0.1.gir" --warn-all --no-libtool
-
- mkdir -p "${DESTDIR}/${LIBDIR}/girepository-1.0"
- g-ir-compiler "${DESTDIR}/${PREFIXDIR}/share/gir-1.0/LOKDocView-0.1.gir" \
- --output="${DESTDIR}/${LIBDIR}/girepository-1.0/LOKDocView-0.1.typelib"
-fi
commit e9d6950387a6e41f8f7b7d91921a2686defe136b
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jul 29 12:28:26 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jul 31 16:48:29 2019 +0200
remove LibreLogo from build
Change-Id: I62b45ea4890f5693e7d12f2b8c4ae43a9a03d16e
diff --git a/Repository.mk b/Repository.mk
index 2a66608621a5..c8170649f86a 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1074,10 +1074,6 @@ $(eval $(call gb_Helper_register_packages_for_install,python_scriptprovider, \
scripting_scriptproviderforpython \
))
-$(eval $(call gb_Helper_register_packages_for_install,python_librelogo, \
- librelogo \
- librelogo_properties \
-))
endif # DISABLE_PYTHON
# External executables
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 3b530286114e..1f35ac0b34ae 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -75,7 +75,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
jurt \
jvmaccess \
jvmfwk \
- librelogo \
libreofficekit \
lingucomponent \
linguistic \
diff --git a/bin/distro-install-file-lists b/bin/distro-install-file-lists
index 378f55ce746b..c2904beaa573 100755
--- a/bin/distro-install-file-lists
+++ b/bin/distro-install-file-lists
@@ -141,14 +141,12 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/pyuno_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
else
merge_flists gid_Module_Optional_Grfflt $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/mailmerge_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/pyuno_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/pyuno_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/filters_list.txt
fi
@@ -157,7 +155,6 @@ if test "z$OOO_VENDOR" != "zDebian" ; then
merge_flists gid_Module_Optional_Headless $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Pymailmerge $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Pyuno $FILELISTSDIR/common_list.txt
- merge_flists gid_Module_Optional_Pyuno_LibreLogo $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Script_Provider_For_Python $FILELISTSDIR/common_list.txt
merge_flists gid_Module_Optional_Xsltfiltersamples $FILELISTSDIR/common_list.txt
fi
diff --git a/officecfg/Configuration_officecfg.mk b/officecfg/Configuration_officecfg.mk
index 9ce55fafcc4a..3190baa8e0f9 100644
--- a/officecfg/Configuration_officecfg.mk
+++ b/officecfg/Configuration_officecfg.mk
@@ -72,7 +72,6 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
org/openoffice/Office/Accelerators-macosx.xcu \
org/openoffice/Office/Accelerators-reportbuilder.xcu \
org/openoffice/Office/Accelerators-unxwnt.xcu \
- org/openoffice/Office/Addons-librelogo.xcu \
org/openoffice/Office/Common-writer.xcu \
org/openoffice/Office/Common-calc.xcu \
org/openoffice/Office/Common-draw.xcu \
@@ -111,7 +110,6 @@ $(eval $(call gb_Configuration_add_spool_modules,registry,officecfg/registry/dat
org/openoffice/Office/Embedding-base.xcu \
org/openoffice/Office/Embedding-reportbuilder.xcu \
org/openoffice/Office/Embedding-writer.xcu \
- org/openoffice/Office/UI/WriterWindowState-librelogo.xcu \
org/openoffice/Office/UI/Controller-reportbuilder.xcu \
org/openoffice/TypeDetection/UISort-writer.xcu \
org/openoffice/TypeDetection/UISort-calc.xcu \
@@ -131,7 +129,6 @@ $(eval $(call gb_Configuration_add_spool_langpack,registry,officecfg/registry/da
$(eval $(call gb_Configuration_add_localized_datas,registry,officecfg/registry/data,\
org/openoffice/Setup.xcu \
org/openoffice/Office/Accelerators.xcu \
- org/openoffice/Office/Addons.xcu \
org/openoffice/Office/Common.xcu \
org/openoffice/Office/DataAccess.xcu \
org/openoffice/Office/PresentationMinimizer.xcu \
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
index 0f1b4a0b080b..58dc7d40aef4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterWindowState.xcu
@@ -858,20 +858,6 @@
<value>true</value>
</prop>
</node>
- <node oor:name="private:resource/toolbar/addon_LibreLogo.OfficeToolBar" oor:op="replace" install:module="librelogo">
- <prop oor:name="UIName" oor:type="xs:string">
- <value xml:lang="en-US">Logo</value>
- </prop>
- <prop oor:name="Visible" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="Locked" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- <prop oor:name="HideFromToolbarMenu" oor:type="xs:boolean">
- <value>false</value>
- </prop>
- </node>
<node oor:name="private:resource/toolbar/changes" oor:op="replace">
<prop oor:name="DockPos" oor:type="xs:string">
<value>1,2</value>
diff --git a/postprocess/CustomTarget_registry.mk b/postprocess/CustomTarget_registry.mk
index 7548789e9766..0c4eeb805e59 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -27,7 +27,6 @@ postprocess_XCDS := \
draw.xcd \
graphicfilter.xcd \
impress.xcd \
- librelogo.xcd \
lingucomponent.xcd \
main.xcd \
math.xcd \
@@ -110,11 +109,6 @@ postprocess_FILES_impress := \
$(postprocess_MOD)/org/openoffice/Office/ProtocolHandler-impress.xcu \
$(postprocess_MOD)/org/openoffice/Setup-impress.xcu
-postprocess_DEPS_librelogo := main writer
-postprocess_FILES_librelogo := \
- $(postprocess_MOD)/org/openoffice/Office/Addons-librelogo.xcu \
- $(postprocess_MOD)/org/openoffice/Office/UI/WriterWindowState-librelogo.xcu
-
postprocess_DEPS_lingucomponent := main
postprocess_FILES_lingucomponent := \
$(SRCDIR)/lingucomponent/config/Linguistic-lingucomponent-hyphenator.xcu \
diff --git a/scp2/AutoInstall.mk b/scp2/AutoInstall.mk
index 7c9d6c4538bd..e198eaa5e3d0 100644
--- a/scp2/AutoInstall.mk
+++ b/scp2/AutoInstall.mk
@@ -39,7 +39,6 @@ $(eval $(call gb_AutoInstall_add_module,ooo_images,,,,PACKAGE_FILELIST))
$(eval $(call gb_AutoInstall_add_module,ooobinarytable,LIBO_LIB_FILE_BINARYTABLE))
$(eval $(call gb_AutoInstall_add_module,python,LIBO_LIB_FILE,LIBO_EXECUTABLE,,PACKAGE_FILELIST))
$(eval $(call gb_AutoInstall_add_module,python_scriptprovider,,,,PACKAGE_FILELIST))
-$(eval $(call gb_AutoInstall_add_module,python_librelogo,,,,PACKAGE_FILELIST))
$(eval $(call gb_AutoInstall_add_module,postgresqlsdbc,LIBO_LIB_FILE,,,PACKAGE_FILELIST))
$(eval $(call gb_AutoInstall_add_module,pdfimport,LIBO_LIB_FILE,LIBO_EXECUTABLE,,PACKAGE_FILELIST))
$(eval $(call gb_AutoInstall_add_module,quickstart,,LIBO_EXECUTABLE))
diff --git a/scp2/InstallModule_python.mk b/scp2/InstallModule_python.mk
index e38d58a9b821..fef10924a62f 100644
--- a/scp2/InstallModule_python.mk
+++ b/scp2/InstallModule_python.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_InstallModule_InstallModule,scp2/python))
$(eval $(call gb_InstallModule_use_auto_install_libs,scp2/python,\
python \
python_scriptprovider \
- python_librelogo \
))
ifeq ($(DISABLE_PYTHON),TRUE)
@@ -37,12 +36,7 @@ endif
$(eval $(call gb_InstallModule_add_scpfiles,scp2/python,\
scp2/source/python/file_python \
- scp2/source/python/file_python_librelogo \
scp2/source/python/module_python \
))
-$(eval $(call gb_InstallModule_add_localized_scpfiles,scp2/python,\
- scp2/source/python/module_python_librelogo \
-))
-
# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index ff128f991d79..5c2666a77782 100644
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -266,6 +266,8 @@ module = "gid_Module_Pyuno"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-pyuno"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core, SUNWPython"
packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno"
+linuxreplaces = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
+linuxincompat = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core"
requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
copyright = "2018 The Document Foundation"
@@ -277,21 +279,6 @@ packageversion = "%PACKAGEVERSION"
End
Start
-module = "gid_Module_Optional_Pyuno_LibreLogo"
-solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-librelogo"
-solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-pyuno,%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-writer,SUNWPython"
-packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-librelogo"
-freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno,%BASISPACKAGEPREFIX%PRODUCTVERSION-writer"
-requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-pyuno %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION,%BASISPACKAGEPREFIX%PRODUCTVERSION-writer %PACKAGEVERSION %PACKAGEVERSION-%PACKAGEREVISION"
-copyright = "2018 The Document Foundation"
-solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
-description = "LibreLogo toolbar for %PRODUCTNAME %PRODUCTVERSION Writer"
-destpath = "/opt"
-packageversion = "%PACKAGEVERSION"
-End
-
-Start
module = "gid_Module_Script_Provider_For_Python"
solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-python-script-provider"
solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")"
commit d2cb70bf110135a02553fe82c5bf51e5f0f47071
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jun 6 13:31:52 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 14:37:30 2019 +0200
tdf#125556 URL fragment leaked from one object..
to another when importing Powerpoint ppt file
regression from
commit 4245454d0c3d6df2d0e0a75aed6f22f0a26ce3e2
Date: Wed Feb 28 15:50:29 2018 +0200
loplugin:useuniqueptr in SdrPowerPointImport
Change-Id: I5f415dfa1f6125629b9f3be1d799cb596c64c605
Reviewed-on: https://gerrit.libreoffice.org/73607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 3309893de4e99a7d89fb1e9b4616631b1f040df0)
Reviewed-on: https://gerrit.libreoffice.org/76309
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index cb0e17d450b5..9b45a7b84416 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -392,9 +392,9 @@ bool ImplSdPPTImport::Import()
nPropCount /= 6; // 6 properties per hyperlink
- SdHyperlinkEntry aHyperlink;
for ( i = 0; i < nPropCount; i++ )
{
+ SdHyperlinkEntry aHyperlink;
aHyperlink.nIndex = 0;
aPropItem.ReadUInt32( nType );
if ( nType != VT_I4 )
commit 8edc7023a14d26a7a6201f154b5c0e8edb47b1d9
Author: nd101 <Fong at nd.com.cn>
AuthorDate: Wed Jul 3 09:41:06 2019 +0800
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 14:37:21 2019 +0200
Fix libgpg-error compilation error with gawk5
This is an adaptation of upstream patch
https://github.com/gpg/libgpg-error/commit/7865041c77f4f7005282f10f9b6666b19072fbdf
plus a fix to Makefile.in
Change-Id: I5bf946cf93e5849b8a3428064ab86f6255be97da
Reviewed-on: https://gerrit.libreoffice.org/75022
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit af3b993ebea2f653fabba981d4c22b9aa779b32a)
Reviewed-on: https://gerrit.libreoffice.org/75075
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 87215115618de0c12d287a300fc5fde993886089)
Reviewed-on: https://gerrit.libreoffice.org/76308
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index ad2145a96aa7..ea99c3c3c076 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libgpg-error,$(LIBGPGERROR_TARBALL)
$(eval $(call gb_UnpackedTarball_set_patchlevel,libgpg-error,0))
$(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
+ external/libgpg-error/libgpg-error_gawk5.patch \
$(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes.patch) \
$(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes-2.patch.1) \
$(if $(filter MSC,$(COM)),external/libgpg-error/w32-build-fixes-3.patch.1) \
diff --git a/external/libgpg-error/libgpg-error_gawk5.patch b/external/libgpg-error/libgpg-error_gawk5.patch
new file mode 100644
index 000000000000..3be76a4538a8
--- /dev/null
+++ b/external/libgpg-error/libgpg-error_gawk5.patch
@@ -0,0 +1,114 @@
+--- src/Makefile.am
++++ src/Makefile.am~
+@@ -266,7 +266,7 @@
+
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+ $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+- -v prefix=GPG_ERR_ -v namespace=errnos_ \
++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+ $(srcdir)/errnos.in >$@
+
+
+--- src/mkerrcodes.awk
++++ src/mkerrcodes.awk~
+@@ -81,7 +81,7 @@
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- src/mkerrcodes1.awk
++++ src/mkerrcodes1.awk~
+@@ -81,7 +81,7 @@
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- src/mkerrcodes2.awk
++++ src/mkerrcodes2.awk~
+@@ -91,7 +91,7 @@
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- src/mkerrnos.awk
++++ src/mkerrnos.awk~
+@@ -83,7 +83,7 @@
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+--- src/mkstrtable.awk
++++ src/mkstrtable.awk~
+@@ -77,7 +77,7 @@
+ #
+ # The variable prefix can be used to prepend a string to each message.
+ #
+-# The variable namespace can be used to prepend a string to each
++# The variable pkg_namespace can be used to prepend a string to each
+ # variable and macro name.
+
+ BEGIN {
+@@ -102,7 +102,7 @@
+ print "/* The purpose of this complex string table is to produce";
+ print " optimal code with a minimum of relocations. */";
+ print "";
+- print "static const char " namespace "msgstr[] = ";
++ print "static const char " pkg_namespace "msgstr[] = ";
+ header = 0;
+ }
+ else
+@@ -110,7 +110,7 @@
+ }
+
+ !header {
+- sub (/\#.+/, "");
++ sub (/#.+/, "");
+ sub (/[ ]+$/, ""); # Strip trailing space and tab characters.
+
+ if (/^$/)
+@@ -150,7 +150,7 @@
+ else
+ print " gettext_noop (\"" last_msgstr "\");";
+ print "";
+- print "static const int " namespace "msgidx[] =";
++ print "static const int " pkg_namespace "msgidx[] =";
+ print " {";
+ for (i = 0; i < coded_msgs; i++)
+ print " " pos[i] ",";
+@@ -158,7 +158,7 @@
+ print " };";
+ print "";
+ print "static GPG_ERR_INLINE int";
+- print namespace "msgidxof (int code)";
++ print pkg_namespace "msgidxof (int code)";
+ print "{";
+ print " return (0 ? 0";
+
+--- src/Makefile.in
++++ src/Makefile.in~
+@@ -1321,7 +1321,7 @@
+
+ errnos-sym.h: Makefile mkstrtable.awk errnos.in
+ $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
+- -v prefix=GPG_ERR_ -v namespace=errnos_ \
++ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
+ $(srcdir)/errnos.in >$@
+
+ mkheader: mkheader.c Makefile
+
diff --git a/external/libgpg-error/w32-build-fixes.patch b/external/libgpg-error/w32-build-fixes.patch
index e8a6b6145d46..96a62e32042c 100644
--- a/external/libgpg-error/w32-build-fixes.patch
+++ b/external/libgpg-error/w32-build-fixes.patch
@@ -136,7 +136,7 @@ diff -ru libgpg-error.orig/src/Makefile.in libgpg-error/src/Makefile.in
errnos-sym.h: Makefile mkstrtable.awk errnos.in
@@ -1325,7 +1325,7 @@
- -v prefix=GPG_ERR_ -v namespace=errnos_ \
+ -v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
$(srcdir)/errnos.in >$@
-mkheader: mkheader.c Makefile
commit 00c4ae49aa88319660b9201e8e5d8393953fa1ed
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Thu Jul 18 14:07:06 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 14:32:41 2019 +0200
sw: fix use after free on tdf117215-1.odt
Move the fix from 6d0ea082889c89eb8b408779f2de08da7441ff54 to
SwFlyFrame::DestroyImpl() so we unregister every SwFlyFrame.
==1550==ERROR: AddressSanitizer: heap-use-after-free on address 0x615000383f56 at pc 0x7efcd70d5ab9 bp 0x7ffeb7ac7c40 sp 0x7ffeb7ac7c38
WRITE of size 1 at 0x615000383f56 thread T0
0 SwAnchoredObject::SetTmpConsiderWrapInfluence(bool) sw/source/core/layout/anchoredobject.cxx:743:32
1 SwObjsMarkedAsTmpConsiderWrapInfluence::Clear() sw/source/core/layout/objstmpconsiderwrapinfl.cxx:53:23
2 SwLayouter::ClearObjsTmpConsiderWrapInfluence(SwDoc const&) sw/source/core/layout/layouter.cxx:387:84
3 sw::DocumentLayoutManager::ClearSwLayouterEntries() sw/source/core/doc/DocumentLayoutManager.cxx:497:5
4 sw::DocumentStateManager::SetModified() sw/source/core/doc/DocumentStateManager.cxx:45:39
5 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3942:36
0x615000383f56 is located 342 bytes inside of 504-byte region [0x615000383e00,0x615000383ff8)
freed by thread T0 here:
1 SwFlyAtContentFrame::~SwFlyAtContentFrame() sw/source/core/inc/flyfrms.hxx:159:7
2 SwFrame::DestroyFrame(SwFrame*) sw/source/core/layout/ssfrm.cxx:389:9
3 SwFrameFormat::DelFrames() sw/source/core/layout/atrfrm.cxx:2624:17
4 SwUndoFlyBase::DelFly(SwDoc*) sw/source/core/undo/undobj1.cxx:161:19
5 SwUndoDelLayFormat::SwUndoDelLayFormat(SwFrameFormat*) sw/source/core/undo/undobj1.cxx:403:5
6 SwHistoryTextFlyCnt::SwHistoryTextFlyCnt(SwFrameFormat*) sw/source/core/undo/rolbck.cxx:538:20
7 SwHistory::Add(SwFlyFrameFormat&, unsigned short&) sw/source/core/undo/rolbck.cxx:1083:50
8 SwUndoSaveContent::DelContentIndex(SwPosition const&, SwPosition const&, DelContentType) sw/source/core/undo/undobj.cxx:1020:39
9 SwUndoDelete::SwUndoDelete(SwPaM&, bool, bool) sw/source/core/undo/undel.cxx:229:9
11 sw::DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM&) sw/source/core/doc/DocumentContentOperationsManager.cxx:3939:55
Change-Id: Ia0c28c9d5792615cbb566e502374efd0f4056daf
Reviewed-on: https://gerrit.libreoffice.org/75857
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit dea72ef111ee8a0b1b178f8cd48757514d5ca831)
Reviewed-on: https://gerrit.libreoffice.org/75941
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 4b9324b93dcbd72c8c8949309d45790dd8f7d5fd)
Reviewed-on: https://gerrit.libreoffice.org/76306
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 74a2f6201e4b..f23e95acdcde 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -265,6 +265,8 @@ void SwFlyFrame::DestroyImpl()
if( GetFormat() && !GetFormat()->GetDoc()->IsInDtor() )
{
+ ClearTmpConsiderWrapInfluence(); // remove this from SwLayouter
+
// OD 2004-01-19 #110582#
Unchain();
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index e97b98e50a34..87a00b1a9172 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -475,7 +475,6 @@ void SwLayoutFrame::DestroyImpl()
const size_t nCnt = pFrame->GetDrawObjs()->size();
// #i28701#
SwAnchoredObject* pAnchoredObj = (*pFrame->GetDrawObjs())[0];
- pAnchoredObj->ClearTmpConsiderWrapInfluence();
if (SwFlyFrame* pFlyFrame = dynamic_cast<SwFlyFrame*>(pAnchoredObj))
{
SwFrame::DestroyFrame(pFlyFrame);
@@ -483,6 +482,7 @@ void SwLayoutFrame::DestroyImpl()
}
else
{
+ pAnchoredObj->ClearTmpConsiderWrapInfluence();
SdrObject* pSdrObj = pAnchoredObj->DrawObj();
SwDrawContact* pContact =
static_cast<SwDrawContact*>(pSdrObj->GetUserCall());
commit 31b1d2af8ce01804049168b7b0317d93d77a42d7
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Thu Jul 11 15:50:07 2019 +0200
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 14:31:14 2019 +0200
Postpone loading of all external references, including INDIRECT()
... which can be constructed with an arbitrary URI text string not
an svExternal* token type, until link updates are allowed.
Reviewed-on: https://gerrit.libreoffice.org/75422
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit b824b23860b2cf533d4f2428d4a750bd72576181)
Reviewed-on: https://gerrit.libreoffice.org/76304
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Change-Id: I2ce4de415ff99ace04c083c36c1383d76a4ef40d
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 1dc2be93efc9..153647a2813b 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -132,11 +132,12 @@ struct UpdateFormulaCell
{
void operator() (ScFormulaCell* pCell) const
{
- // Check to make sure the cell really contains ocExternalRef.
+ // Check to make sure the cell really contains svExternal*.
// External names, external cell and range references all have a
- // ocExternalRef token.
+ // token of svExternal*. Additionally check for INDIRECT() that can be
+ // called with any constructed URI string.
ScTokenArray* pCode = pCell->GetCode();
- if (!pCode->HasExternalRef())
+ if (!pCode->HasExternalRef() && !pCode->HasOpCode(ocIndirect))
return;
if (pCode->GetCodeError() != FormulaError::NONE)
@@ -1657,6 +1658,17 @@ static std::unique_ptr<ScTokenArray> lcl_fillEmptyMatrix(const ScRange& rRange)
return pArray;
}
+namespace {
+bool isLinkUpdateAllowedInDoc(const ScDocument& rDoc)
+{
+ SfxObjectShell* pDocShell = rDoc.GetDocumentShell();
+ if (!pDocShell)
+ return false;
+
+ return pDocShell->GetEmbeddedObjectContainer().getUserAllowsLinkUpdate();
+}
+}
+
ScExternalRefManager::ScExternalRefManager(ScDocument* pDoc) :
mpDoc(pDoc),
mbInReferenceMarking(false),
@@ -1946,8 +1958,19 @@ ScExternalRefCache::TokenRef ScExternalRefManager::getSingleRefToken(
pSrcDoc = getSrcDocument(nFileId);
if (!pSrcDoc)
{
- // Source document not reachable. Throw a reference error.
- pToken.reset(new FormulaErrorToken(FormulaError::NoRef));
+ // Source document not reachable.
+#if 0
+ if (!isLinkUpdateAllowedInDoc(*mpDoc))
+ {
+ // Indicate with specific error.
+ pToken.reset(new FormulaErrorToken(FormulaError::LinkFormulaNeedingCheck));
+ }
+ else
+#endif
+ {
+ // Throw a reference error.
+ pToken.reset(new FormulaErrorToken(FormulaError::NoRef));
+ }
return pToken;
}
@@ -2154,15 +2177,6 @@ void insertRefCellByIterator(
}
}
-bool IsLinkUpdateAllowedInDoc(const ScDocument& rDoc)
-{
- SfxObjectShell* pDocShell = rDoc.GetDocumentShell();
- if (!pDocShell)
- return false;
-
- return pDocShell->GetEmbeddedObjectContainer().getUserAllowsLinkUpdate();
-}
-
}
void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell)
@@ -2373,8 +2387,8 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
if (!pFileName)
return nullptr;
- // Do not load document until it was allowed
- if (!IsLinkUpdateAllowedInDoc(*mpDoc))
+ // Do not load document until it was allowed.
+ if (!isLinkUpdateAllowedInDoc(*mpDoc))
return nullptr;
ScDocument* pSrcDoc = nullptr;
@@ -2483,6 +2497,10 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
if (!isFileLoadable(aFile))
return nullptr;
+ // Do not load document until it was allowed.
+ if (!isLinkUpdateAllowedInDoc(*mpDoc))
+ return nullptr;
+
OUString aOptions = pFileData->maFilterOptions;
if ( !pFileData->maFilterName.isEmpty() )
rFilter = pFileData->maFilterName; // don't overwrite stored filter with guessed filter
@@ -2621,9 +2639,9 @@ void ScExternalRefManager::maybeLinkExternalFile( sal_uInt16 nFileId, bool bDefe
aOptions = pFileData->maFilterOptions;
}
- // Filter detection may access external links; defer it until we are allowed
+ // Filter detection may access external links; defer it until we are allowed.
if (!bDeferFilterDetection)
- bDeferFilterDetection = !IsLinkUpdateAllowedInDoc(*mpDoc);
+ bDeferFilterDetection = !isLinkUpdateAllowedInDoc(*mpDoc);
// If a filter was already set (for example, loading the cached table),
// don't call GetFilterName which has to access the source file.
commit 43bf332aeede732557378e81765f29b704b17188
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Tue Jul 9 18:44:42 2019 +1000
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 14:05:44 2019 +0200
Postpone filter detection until link update is allowed
Change-Id: I85b2185e550f2a133ceb485241ef513b40593e34
Reviewed-on: https://gerrit.libreoffice.org/75301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
(cherry picked from commit 03c708bf085f91480c014d7fa31e7a317b2c7b8f)
Reviewed-on: https://gerrit.libreoffice.org/76303
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 48ae556cf485..1dc2be93efc9 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2154,6 +2154,15 @@ void insertRefCellByIterator(
}
}
+bool IsLinkUpdateAllowedInDoc(const ScDocument& rDoc)
+{
+ SfxObjectShell* pDocShell = rDoc.GetDocumentShell();
+ if (!pDocShell)
+ return false;
+
+ return pDocShell->GetEmbeddedObjectContainer().getUserAllowsLinkUpdate();
+}
+
}
void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& rCell)
@@ -2365,13 +2374,8 @@ ScDocument* ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
return nullptr;
// Do not load document until it was allowed
- SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
- if ( pDocShell )
- {
- const comphelper::EmbeddedObjectContainer& rContainer = pDocShell->GetEmbeddedObjectContainer();
- if ( !rContainer.getUserAllowsLinkUpdate() )
- return nullptr;
- }
+ if (!IsLinkUpdateAllowedInDoc(*mpDoc))
+ return nullptr;
ScDocument* pSrcDoc = nullptr;
ScDocShell* pShell = static_cast<ScDocShell*>(SfxObjectShell::GetFirst(checkSfxObjectShell<ScDocShell>, false));
@@ -2616,6 +2620,11 @@ void ScExternalRefManager::maybeLinkExternalFile( sal_uInt16 nFileId, bool bDefe
aFilter = pFileData->maFilterName;
aOptions = pFileData->maFilterOptions;
}
+
+ // Filter detection may access external links; defer it until we are allowed
+ if (!bDeferFilterDetection)
+ bDeferFilterDetection = !IsLinkUpdateAllowedInDoc(*mpDoc);
+
// If a filter was already set (for example, loading the cached table),
// don't call GetFilterName which has to access the source file.
// If filter detection is deferred, the next successful loadSrcDocument()
commit aab62f2b21c331ff8c31b7c856d5e59080b9d64a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jul 26 13:25:31 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 13:55:09 2019 +0200
decode url escape codes and check each path segment
Change-Id: Ie8f7cef912e8dacbc2a0bca73534a7a242a53ca1
Reviewed-on: https://gerrit.libreoffice.org/76378
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 7942929685fafb0f9c82feb8da7279e5103c87f0)
Reviewed-on: https://gerrit.libreoffice.org/76451
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index ee4265b24562..59d3098115b1 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -41,6 +41,8 @@
#include <com/sun/star/script/provider/XScriptProvider.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
+#include <com/sun/star/uri/XVndSunStarScriptUrlReference.hpp>
#include <com/sun/star/util/XModifiable.hpp>
#include <toolkit/helper/vclunohelper.hxx>
@@ -1349,7 +1351,32 @@ namespace
// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
{
- return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
+ if (!rScriptURL.startsWith("vnd.sun.star.script:"))
+ return false;
+
+ // ensure URL Escape Codes are decoded
+ css::uno::Reference<css::uri::XUriReference> uri(
+ css::uri::UriReferenceFactory::create(comphelper::getProcessComponentContext())->parse(rScriptURL));
+ css::uno::Reference<css::uri::XVndSunStarScriptUrl> sfUri(uri, css::uno::UNO_QUERY);
+
+ if (!sfUri.is())
+ return false;
+
+ OUString sScript = sfUri->getName();
+
+ // check if any path portion matches LibreLogo and ban it if it does
+ sal_Int32 nIndex = 0;
+ do
+ {
+ OUString aToken = sScript.getToken(0, '/', nIndex);
+ if (aToken.startsWithIgnoreAsciiCase("LibreLogo"))
+ {
+ return true;
+ }
+ }
+ while (nIndex >= 0);
+
+ return false;
}
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
commit b14742734481ae0a4731989a99db487d8ae1986a
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 23 15:31:05 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Jul 29 13:54:53 2019 +0200
expand LibreLogo check to global events
Reviewed-on: https://gerrit.libreoffice.org/76189
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 4a66c7eda6ccde26a42c4e31725248c59940255d)
Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f
Reviewed-on: https://gerrit.libreoffice.org/76305
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index d04758567c80..ed09fc6e2acb 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -404,6 +404,8 @@ public:
*/
bool AdjustMacroMode();
+ static bool UnTrustedScript(const OUString& rScriptURL);
+
SvKeyValueIterator* GetHeaderAttributes();
void ClearHeaderAttributesForSourceViewHack();
void SetHeaderAttributesForSourceViewHack();
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 8594e9522e48..ee4265b24562 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1346,16 +1346,12 @@ namespace
}
}
-namespace {
-
// don't allow LibreLogo to be used with our mouseover/etc dom-alike events
-bool UnTrustedScript(const OUString& rScriptURL)
+bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL)
{
return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo");
}
-}
-
ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL,
const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller )
{
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 78667a1d8036..2656e9c213ec 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -207,18 +207,24 @@ void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::Docum
else if (aType == "Service" ||
aType == "Script")
{
- if ( !aScript.isEmpty() )
+ bool bAllowed = false;
+ util::URL aURL;
+ if (!aScript.isEmpty())
{
- SfxViewFrame* pView = pDoc ?
- SfxViewFrame::GetFirst( pDoc ) :
- SfxViewFrame::Current();
-
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
- util::URL aURL;
aURL.Complete = aScript;
xTrans->parseStrict( aURL );
+ bAllowed = !SfxObjectShell::UnTrustedScript(aURL.Complete);
+ }
+
+ if (bAllowed)
+ {
+ SfxViewFrame* pView = pDoc ?
+ SfxViewFrame::GetFirst( pDoc ) :
+ SfxViewFrame::Current();
+
uno::Reference
< frame::XDispatchProvider > xProv;
More information about the Libreoffice-commits
mailing list