Accepting request 890363 from LibreOffice:Factory

OBS-URL: https://build.opensuse.org/request/show/890363
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libreoffice?expand=0&rev=226
This commit is contained in:
Dominique Leuenberger 2021-05-07 14:44:57 +00:00 committed by Git OBS Bridge
commit 86d104787a
23 changed files with 701 additions and 807 deletions

View File

@ -0,0 +1,495 @@
From 702c015e4127de65a4d8ab8a665bf6af6518ef4a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Tue, 30 Mar 2021 16:43:17 +0200
Subject: [PATCH 1/2] Revert java 9 changes
Change-Id: I09f046f54b107b53c86f76a39553bd11ef03d9f6
---
configure.ac | 45 +++++--
jvmfwk/CustomTarget_jreproperties.mk | 2 +-
ridljar/Jar_libreoffice.mk | 8 +-
ridljar/Jar_unoloader.mk | 11 +-
ridljar/source/libreoffice/module-info.java | 142 --------------------
ridljar/source/unoloader/module-info.java | 12 --
solenv/gbuild/Jar.mk | 14 +-
solenv/gbuild/JavaClassSet.mk | 39 +-----
solenv/gbuild/gbuild.mk | 2 -
9 files changed, 43 insertions(+), 232 deletions(-)
delete mode 100644 ridljar/source/libreoffice/module-info.java
delete mode 100644 ridljar/source/unoloader/module-info.java
diff --git a/configure.ac b/configure.ac
index f4850a8cb2dc..c2df878df1d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2313,7 +2313,7 @@ AC_ARG_WITH(linker-hash-style,
AC_ARG_WITH(jdk-home,
AS_HELP_STRING([--with-jdk-home=<absolute path to JDK home>],
- [If you have installed JDK 9 or later on your system please supply the
+ [If you have installed JDK 8 or later on your system please supply the
path here. Note that this is not the location of the java command but the
location of the entire distribution. In case of cross-compiling, this
is the JDK of the host os. Use --with-build-platform-configure-options
@@ -8004,12 +8004,20 @@ if test "$ENABLE_JAVA" != ""; then
reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
reg_jdk_home=$regvalue
fi
-
- if test -f "$reg_jdk_home/lib/jvm.lib" -a -f "$reg_jdk_home/bin/java.exe"; then
- with_jdk_home="$reg_jdk_home"
+ if test -z "$with_jdk_home"; then
+ for ver in 1.8; do
+ reg_get_value "$bitness" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/Java Development Kit/$ver/JavaHome"
+ if test -n "$regvalue"; then
+ _jdk_home=$regvalue
+ break
+ fi
+ done
+ fi
+ if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then
+ with_jdk_home="$_jdk_home"
howfound="found automatically"
else
- AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $WIN_HOST_BITS-bit JDK >= 9])
+ AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option pointing to a $bitness-bit JDK])
fi
else
test "$build_os" = "cygwin" && with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
@@ -8089,7 +8097,24 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
- AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+ JDK=ibm
+
+ dnl IBM JDK specific tests
+ _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//`
+ _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+
+ if test "$_jdk_ver" -lt 10800; then
+ AC_MSG_ERROR([IBM JDK is too old, you need at least 8])
+ fi
+
+ AC_MSG_RESULT([found (IBM JDK $_jdk)])
+
+ if test "$with_jdk_home" = ""; then
+ AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK,
+you must use the "--with-jdk-home" configure option explicitly])
+ fi
+
+ JAVA_HOME=$with_jdk_home
else
JDK=sun
@@ -8097,10 +8122,10 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
_jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED '/^$/d' | $SED s/[[-A-Za-z]]*//`
_jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
- if test "$_jdk_ver" -lt 10900; then
- AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 10900)])
+ if test "$_jdk_ver" -lt 10800; then
+ AC_MSG_ERROR([JDK is too old, you need at least 8])
fi
- if test "$_jdk_ver" -gt 10900; then
+ if test "$_jdk_ver" -gt 10800; then
JAVA_CLASSPATH_NOT_SET=TRUE
fi
@@ -8116,7 +8141,7 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
JAVACFLAGS=-J-Xmx128M
fi
else
- AC_MSG_ERROR([Java not found. You need at least JDK 9])
+ AC_MSG_ERROR([Java not found. You need at least JDK 8])
fi
else
if test -z "$ENABLE_JAVA"; then
diff --git a/jvmfwk/CustomTarget_jreproperties.mk b/jvmfwk/CustomTarget_jreproperties.mk
index da509dbff5ac..ac8f7c053373 100644
--- a/jvmfwk/CustomTarget_jreproperties.mk
+++ b/jvmfwk/CustomTarget_jreproperties.mk
@@ -17,7 +17,7 @@ $(call gb_CustomTarget_get_workdir,jvmfwk/jreproperties)/JREProperties.class : \
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JCS,1)
$(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),JCS)
$(call gb_Helper_abbreviate_dirs, \
- cd $(dir $@) && $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) $(gb_JavaClassSet_JAVACDEBUG) -d $(dir $@) $^)
+ cd $(dir $@) && $(gb_JavaClassSet_JAVACCOMMAND) $(gb_JavaClassSet_JAVACDEBUG) -d $(dir $@) $^)
$(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),JCS)
# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/ridljar/Jar_libreoffice.mk b/ridljar/Jar_libreoffice.mk
index d34ae3f5ebda..4d0f5ef2545f 100644
--- a/ridljar/Jar_libreoffice.mk
+++ b/ridljar/Jar_libreoffice.mk
@@ -7,7 +7,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_Jar_Jar,libreoffice,org.libreoffice.uno))
+$(eval $(call gb_Jar_Jar,libreoffice))
$(eval $(call gb_Jar_use_customtargets,libreoffice,\
ridljar/javamaker \
@@ -27,15 +27,9 @@ $(eval $(call gb_Jar_add_manifest_classpath,libreoffice, \
$(if $(filter MACOSX,$(OS)),../../Frameworks/,../) \
))
-# ugly: the module-info.class is manually added here since it's not in "com" dir
$(eval $(call gb_Jar_add_packagedirs,libreoffice,\
$(call gb_CustomTarget_get_workdir,ridljar/javamaker)/com \
$(call gb_CustomTarget_get_workdir,unoil/javamaker)/com \
- $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,libreoffice))/module-info.class \
-))
-
-$(eval $(call gb_Jar_add_sourcefiles_java9,libreoffice,\
- ridljar/source/libreoffice/module-info \
))
$(eval $(call gb_Jar_add_sourcefiles,libreoffice,\
diff --git a/ridljar/Jar_unoloader.mk b/ridljar/Jar_unoloader.mk
index 2acf20b5b289..50b32e8f0f88 100644
--- a/ridljar/Jar_unoloader.mk
+++ b/ridljar/Jar_unoloader.mk
@@ -7,21 +7,12 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
-$(eval $(call gb_Jar_Jar,unoloader,org.libreoffice.unoloader))
+$(eval $(call gb_Jar_Jar,unoloader))
$(eval $(call gb_Jar_set_packageroot,unoloader,com))
$(eval $(call gb_Jar_set_manifest,unoloader,$(SRCDIR)/ridljar/source/unoloader/com/sun/star/lib/unoloader/manifest))
-# the module-info.class is manually added here since it's not in "com" dir
-$(eval $(call gb_Jar_add_packagedirs,unoloader,\
- $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,unoloader))/module-info.class \
-))
-
-$(eval $(call gb_Jar_add_sourcefiles_java9,unoloader,\
- ridljar/source/unoloader/module-info \
-))
-
$(eval $(call gb_Jar_add_sourcefiles,unoloader,\
ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoClassLoader \
ridljar/source/unoloader/com/sun/star/lib/unoloader/UnoLoader \
diff --git a/ridljar/source/libreoffice/module-info.java b/ridljar/source/libreoffice/module-info.java
deleted file mode 100644
index 8d24c7ccb13c..000000000000
--- a/ridljar/source/libreoffice/module-info.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * 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/.
- */
-
-module org.libreoffice.uno
-{
- requires org.libreoffice.unoloader;
-
- exports com.sun.star.accessibility;
- exports com.sun.star.animations;
- exports com.sun.star.auth;
- exports com.sun.star.awt;
- exports com.sun.star.awt.grid;
- exports com.sun.star.awt.tab;
- exports com.sun.star.awt.tree;
- exports com.sun.star.beans;
- exports com.sun.star.bridge;
- exports com.sun.star.bridge.oleautomation;
- exports com.sun.star.chart;
- exports com.sun.star.chart2;
- exports com.sun.star.chart2.data;
- exports com.sun.star.comp.bridgefactory;
- exports com.sun.star.comp.connections;
- exports com.sun.star.comp.helper;
- exports com.sun.star.comp.loader;
- exports com.sun.star.comp.servicemanager;
- exports com.sun.star.comp.urlresolver;
- exports com.sun.star.configuration;
- exports com.sun.star.configuration.backend;
- exports com.sun.star.connection;
- exports com.sun.star.container;
- exports com.sun.star.cui;
- exports com.sun.star.datatransfer;
- exports com.sun.star.datatransfer.clipboard;
- exports com.sun.star.datatransfer.dnd;
- exports com.sun.star.deployment;
- exports com.sun.star.deployment.test;
- exports com.sun.star.deployment.ui;
- exports com.sun.star.document;
- exports com.sun.star.drawing;
- exports com.sun.star.drawing.framework;
- exports com.sun.star.embed;
- exports com.sun.star.form;
- exports com.sun.star.form.binding;
- exports com.sun.star.form.control;
- exports com.sun.star.form.runtime;
- exports com.sun.star.form.submission;
- exports com.sun.star.form.validation;
- exports com.sun.star.formula;
- exports com.sun.star.frame;
- exports com.sun.star.frame.status;
- exports com.sun.star.gallery;
- exports com.sun.star.geometry;
- exports com.sun.star.graphic;
- exports com.sun.star.i18n;
- exports com.sun.star.inspection;
- exports com.sun.star.io;
- exports com.sun.star.java;
- exports com.sun.star.lang;
- exports com.sun.star.ldap;
- exports com.sun.star.lib.connections.pipe;
- exports com.sun.star.lib.connections.socket;
- exports com.sun.star.lib.uno;
- exports com.sun.star.lib.uno.adapter;
- exports com.sun.star.lib.uno.bridges.java_remote;
- exports com.sun.star.lib.uno.environments.java;
- exports com.sun.star.lib.uno.environments.remote;
- exports com.sun.star.lib.uno.helper;
- exports com.sun.star.lib.uno.protocols.urp;
- exports com.sun.star.lib.uno.typedesc;
- exports com.sun.star.lib.uno.typeinfo;
- exports com.sun.star.lib.util;
- exports com.sun.star.linguistic2;
- exports com.sun.star.loader;
- exports com.sun.star.logging;
- exports com.sun.star.mail;
- exports com.sun.star.media;
- exports com.sun.star.mozilla;
- exports com.sun.star.office;
- exports com.sun.star.packages;
- exports com.sun.star.packages.manifest;
- exports com.sun.star.packages.zip;
- exports com.sun.star.presentation;
- exports com.sun.star.qa;
- exports com.sun.star.rdf;
- exports com.sun.star.reflection;
- exports com.sun.star.registry;
- exports com.sun.star.rendering;
- exports com.sun.star.report;
- exports com.sun.star.report.inspection;
- exports com.sun.star.report.meta;
- exports com.sun.star.resource;
- exports com.sun.star.scanner;
- exports com.sun.star.script;
- exports com.sun.star.script.browse;
- exports com.sun.star.script.provider;
- exports com.sun.star.script.vba;
- exports com.sun.star.sdb;
- exports com.sun.star.sdb.application;
- exports com.sun.star.sdb.tools;
- exports com.sun.star.sdbc;
- exports com.sun.star.sdbcx;
- exports com.sun.star.security;
- exports com.sun.star.setup;
- exports com.sun.star.sheet;
- exports com.sun.star.sheet.opencl;
- exports com.sun.star.smarttags;
- exports com.sun.star.style;
- exports com.sun.star.svg;
- exports com.sun.star.system;
- exports com.sun.star.table;
- exports com.sun.star.task;
- exports com.sun.star.text;
- exports com.sun.star.text.textfield;
- exports com.sun.star.tiledrendering;
- exports com.sun.star.ucb;
- exports com.sun.star.ui;
- exports com.sun.star.ui.dialogs;
- exports com.sun.star.ui.test;
- exports com.sun.star.uno;
- exports com.sun.star.uri;
- exports com.sun.star.util;
- exports com.sun.star.view;
- exports com.sun.star.xforms;
- exports com.sun.star.xml;
- exports com.sun.star.xml.crypto;
- exports com.sun.star.xml.crypto.sax;
- exports com.sun.star.xml.csax;
- exports com.sun.star.xml.dom;
- exports com.sun.star.xml.dom.events;
- exports com.sun.star.xml.dom.views;
- exports com.sun.star.xml.input;
- exports com.sun.star.xml.sax;
- exports com.sun.star.xml.wrapper;
- exports com.sun.star.xml.xpath;
- exports com.sun.star.xml.xslt;
- exports com.sun.star.xsd;
-}
diff --git a/ridljar/source/unoloader/module-info.java b/ridljar/source/unoloader/module-info.java
deleted file mode 100644
index 6eed39c96df4..000000000000
--- a/ridljar/source/unoloader/module-info.java
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * 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/.
- */
-
-module org.libreoffice.unoloader
-{
- exports com.sun.star.lib.unoloader;
-}
diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk
index 9592fbbad6a6..3fa40e03c754 100644
--- a/solenv/gbuild/Jar.mk
+++ b/solenv/gbuild/Jar.mk
@@ -94,7 +94,6 @@ endef
# creates a class set and a dependency to it
# registers target and clean target
# adds jar files to DeliverLogTarget
-# call gb_Jar_Jar,jarname,java9modulename
define gb_Jar_Jar
ifeq (,$$(findstring $(1),$$(gb_Jar_KNOWN)))
$$(eval $$(call gb_Output_info,Currently known jars are: $(sort $(gb_Jar_KNOWN)),ALL))
@@ -107,7 +106,7 @@ $(call gb_Jar_get_target,$(1)) : PACKAGEDIRS :=
$(call gb_Jar_get_target,$(1)) : PACKAGEFILES :=
$(call gb_Jar_get_target,$(1)) : \
$(call gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,$(1)))
-$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)),$(2))
+$(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1)))
$(eval $(call gb_Module_register_target,$(call gb_Jar_get_target,$(1)),$(call gb_Jar_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),Jar,$(call gb_Jar_get_target,$(1)))
@@ -122,12 +121,6 @@ $(call gb_JavaClassSet_add_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2))
endef
-define gb_Jar_add_sourcefile_java9
-$(call gb_JavaClassSet_add_sourcefile_java9,$(call gb_Jar_get_classsetname,$(1)),$(2))
-
-endef
-
-
# PACKAGEROOTS is the list of all root folders created by the JavaClassSet to pack into the jar (without META-INF as this is added automatically)
define gb_Jar_set_packageroot
$(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := $(2)
@@ -166,11 +159,6 @@ $(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile,$(1),$(sourcefile)))
endef
-define gb_Jar_add_sourcefiles_java9
-$(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile_java9,$(1),$(sourcefile)))
-
-endef
-
define gb_Jar_add_generated_sourcefile
$(call gb_JavaClassSet_add_generated_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2))
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index 39887dee6e5b..dc7d02e8904a 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -17,11 +17,10 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
-gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVACFLAGS) \
+gb_JavaClassSet_JAVACCOMMAND := $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVAFLAGS) \
-encoding utf8 \
- --release $(1) \
+ -source $(JAVA_SOURCE_VER) -target $(JAVA_TARGET_VER) \
$(if $(JAVA_CLASSPATH_NOT_SET),-Xlint:-options)
-
gb_JavaClassSet_JAVACDEBUG :=
# Enforces correct dependency order for possibly generated stuff:
@@ -32,35 +31,19 @@ ifneq ($(gb_DEBUGLEVEL),0)
gb_JavaClassSet_JAVACDEBUG := -g
endif
-# $(PACKAGEDIRS) inherited from Jar -- assumption is the last part of the path
-# is top-level java package directory
-# for Java 9 modules, invoke javac another time, with --patch-module so that
-# it finds all the class files for whose packages the module-info contains a
-# declaration
define gb_JavaClassSet__command
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(if $(filter-out $(JARDEPS),$(4)), \
rm -rf $(call gb_JavaClassSet_get_classdir,$(2))/* && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
- $(filter-out $(JARDEPS) $(T_JAVA9FILES),$(4))) && \
- $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) \
+ $(filter-out $(JARDEPS),$(4))) && \
+ $(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \
$(gb_JavaClassSet_JAVACDEBUG) \
-classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
-d $(call gb_JavaClassSet_get_classdir,$(2)) \
@$$RESPONSEFILE &&) \
rm -f $$RESPONSEFILE &&) \
- $(if $(T_MODULENAME),\
- RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
- $(T_JAVA9FILES)) && \
- $(if $(3),$(call gb_JavaClassSet_JAVACCOMMAND,9) \
- $(gb_JavaClassSet_JAVACDEBUG) \
- -classpath "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
- --module-path "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \
- $(if $(T_MODULENAME),--patch-module $(T_MODULENAME)="$(subst $(WHITESPACE),$(gb_CLASSPATHSEP),$(strip $(dir $(PACKAGEDIRS))))") \
- -d $(call gb_JavaClassSet_get_classdir,$(2)) \
- @$$RESPONSEFILE &&) \
- rm -f $$RESPONSEFILE &&) \
touch $(1))
endef
@@ -81,7 +64,6 @@ $(call gb_JavaClassSet_get_preparation_target,%) :
mkdir -p $(dir $@) && touch $@
# depend on makefile to enforce a rebuild if files are removed from the classset
-# call gb_JavaClassSet_JavaClassSet,csname,java9modulename
define gb_JavaClassSet_JavaClassSet
$(call gb_JavaClassSet_get_target,$(1)) : \
$(gb_Module_CURRENTMAKEFILE) \
@@ -89,8 +71,6 @@ $(call gb_JavaClassSet_get_target,$(1)) : \
$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS := \
$(gb_Module_CURRENTMAKEFILE) \
$(call gb_JavaClassSet_get_preparation_target,$(1))
-$(call gb_JavaClassSet_get_target,$(1)) : T_MODULENAME := $(2)
-$(call gb_JavaClassSet_get_target,$(1)) : T_JAVA9FILES :=
endef
@@ -112,17 +92,6 @@ $(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_sourcefile,$(1),$(sourcefil
endef
-define gb_JavaClassSet_add_sourcefile_java9
-$(call gb_JavaClassSet_get_target,$(1)) : $(call gb_JavaClassSet__get_sourcefile,$(2))
-$(call gb_JavaClassSet_get_target,$(1)) : T_JAVA9FILES += $(call gb_JavaClassSet__get_sourcefile,$(2))
-
-endef
-
-define gb_JavaClassSet_add_sourcefiles_java9
-$(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_sourcefile_java9,$(1),$(sourcefile)))
-
-endef
-
define gb_JavaClassSet_add_generated_sourcefile
$(call gb_JavaClassSet_get_target,$(1)) : $(call gb_JavaClassSet__get_generated_sourcefile,$(2))
$(call gb_JavaClassSet__get_generated_sourcefile,$(2)) :| $(call gb_JavaClassSet_get_preparation_target,$(1))
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 86ed3d32a376..da6a3d700864 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -62,8 +62,6 @@ COMMA :=,
OPEN_PAREN :=(
CLOSE_PAREN :=)
-gb_SPACE:=$(gb_SPACE) $(gb_SPACE)
-
gb_VERBOSE := $(verbose)
include $(GBUILDDIR)/Helper.mk
--
2.30.2

3
boost_1_71_0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35e06a3bd7cd8f66be822c7d64e80c2b6051a181e9e897006917cb8e7988a543
size 15137604

View File

@ -1,117 +0,0 @@
From f767b83d1c5493815708135f0f2aec03e47615ac Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.com>
Date: Fri, 12 Feb 2021 17:22:57 +0100
Subject: [PATCH] svx: fix import of multiple paragraphs into title shapes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Title shapes try hard to have a single paragraph only, the Impress UI
inserts linebreaks instead of paragraphs breaks in
sd::FuText::KeyInput(), ever since commit
f47a9d9db3d06927380bb79b04bb6d4721a92d2b (initial import, 2000-09-18).
This matches the PowerPoint behavior. This is most visible when the
paragraph has a bullet associated with it.
Interestingly you can still put multiple paragraphs into title shapes
using paste special -> plain text.
In that case, it was inconsistent that we exported these multiple
paragraphs to ODP, but merged them to a single paragraph on import since
commit 0a783c1a041e2b74b7bf238d11ee2c303f6708f4 (#100190# don't allow
more then one paragraph on title text objects, 2002-06-25).
This results in loosing your bullets on save + open, both in the ODP and
PPTX cases, since removeActionLock() on the XShape triggers this tweak.
Also, PowerPoint does not do this merging on import. So fix the problem
by removing the import-time tweak but leave the UI unchanged.
(cherry picked from commit 043690eff82d5798774452a8364e1566b866a320)
Change-Id: I6796f83c40e83f65cfb0f6c7e66069c3e08c1e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110900
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
---
svx/qa/unit/unodraw.cxx | 33 +++++++++++++++++++++++++++++++++
svx/source/unodraw/unoshtxt.cxx | 12 ------------
2 files changed, 33 insertions(+), 12 deletions(-)
diff --git a/svx/qa/unit/unodraw.cxx b/svx/qa/unit/unodraw.cxx
index 938e44f9ca21..d8e7c03183d1 100644
--- a/svx/qa/unit/unodraw.cxx
+++ b/svx/qa/unit/unodraw.cxx
@@ -18,6 +18,7 @@
#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/table/XCellRange.hpp>
#include <com/sun/star/text/XTextRange.hpp>
+#include <com/sun/star/text/ControlCharacter.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/propertysequence.hxx>
@@ -175,6 +176,38 @@ CPPUNIT_TEST_FIXTURE(UnodrawTest, testTableShadowDirect)
// which has no shadow for cell text (only for cell borders and cell background).
assertXPath(pDocument, "//shadow//sdrblocktext", /*nNumberOfNodes=*/0);
}
+
+CPPUNIT_TEST_FIXTURE(UnodrawTest, testTitleShapeBullets)
+{
+ // Create a title shape with 2 paragraphs in it.
+ mxComponent = loadFromDesktop("private:factory/simpress",
+ "com.sun.star.presentation.PresentationDocument");
+ uno::Reference<drawing::XDrawPagesSupplier> xSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPages> xDrawPages = xSupplier->getDrawPages();
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPages->getByIndex(0), uno::UNO_QUERY);
+ // A default document contains a title shape and a text shape on the first slide.
+ uno::Reference<drawing::XShape> xTitleShape(xDrawPage->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<lang::XServiceInfo> xTitleShapeInfo(xTitleShape, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTitleShapeInfo->supportsService("com.sun.star.presentation.TitleTextShape"));
+ uno::Reference<text::XTextRange> xTitleShapeText(xTitleShape, uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTitleShapeText->getText();
+ uno::Reference<text::XTextRange> xCursor = xText->createTextCursor();
+ xText->insertString(xCursor, "foo", /*bAbsorb=*/false);
+ xText->insertControlCharacter(xCursor, text::ControlCharacter::APPEND_PARAGRAPH,
+ /*bAbsorb=*/false);
+ xText->insertString(xCursor, "bar", /*bAbsorb=*/false);
+
+ // Check that the title shape has 2 paragraphs.
+ uno::Reference<container::XEnumerationAccess> xTextEA(xText, uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xTextE = xTextEA->createEnumeration();
+ // Has a first paragraph.
+ CPPUNIT_ASSERT(xTextE->hasMoreElements());
+ xTextE->nextElement();
+ // Has a second paragraph.
+ // Without the accompanying fix in place, this test would have failed, because the 2 paragraphs
+ // were merged together (e.g. 1 bullet instead of 2 bullets for bulleted paragraphs).
+ CPPUNIT_ASSERT(xTextE->hasMoreElements());
+}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 7f2a8af49606..39cad52c073b 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -780,18 +780,6 @@ void SvxTextEditSourceImpl::UpdateData()
{
if( mpOutliner->GetParagraphCount() != 1 || mpOutliner->GetEditEngine().GetTextLen( 0 ) )
{
- if( mpOutliner->GetParagraphCount() > 1 )
- {
- if (pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_TITLETEXT)
- {
- while( mpOutliner->GetParagraphCount() > 1 )
- {
- ESelection aSel( 0,mpOutliner->GetEditEngine().GetTextLen( 0 ), 1,0 );
- mpOutliner->QuickInsertLineBreak( aSel );
- }
- }
- }
-
pTextObj->NbcSetOutlinerParaObjectForText( mpOutliner->CreateParaObject(), mpText );
}
else
--
2.26.2

View File

@ -1,153 +0,0 @@
From 5f4808d7536a4c551c8764ac2ac6be30ad975f69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= <gulsah.kose@collabora.com>
Date: Thu, 28 Jan 2021 09:37:58 +0300
Subject: [PATCH] tdf#134210 Apply mirror property to custom cropped graphic.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I5bf2ba8fa432af8b6a560cc60c18bef799834fd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110039
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110972
---
oox/inc/drawingml/graphicproperties.hxx | 4 ++-
oox/source/drawingml/fillproperties.cxx | 29 ++++++++++++++++++++-
oox/source/drawingml/shape.cxx | 9 +++++--
sd/qa/unit/data/pptx/mirrored-graphic.pptx | Bin 0 -> 173805 bytes
sd/qa/unit/import-tests.cxx | 16 ++++++++++++
5 files changed, 54 insertions(+), 4 deletions(-)
create mode 100644 sd/qa/unit/data/pptx/mirrored-graphic.pptx
diff --git a/oox/inc/drawingml/graphicproperties.hxx b/oox/inc/drawingml/graphicproperties.hxx
index 85b47dbff593..48d1acf61931 100644
--- a/oox/inc/drawingml/graphicproperties.hxx
+++ b/oox/inc/drawingml/graphicproperties.hxx
@@ -43,7 +43,9 @@ struct GraphicProperties
/** Writes the properties to the passed property map. */
void pushToPropMap(
PropertyMap& rPropMap,
- const GraphicHelper& rGraphicHelper) const;
+ const GraphicHelper& rGraphicHelper,
+ bool bFlipH = false,
+ bool bFlipV = false) const;
};
} // namespace oox::drawingml
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 837578ebc807..78ebff7e2122 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -112,6 +112,28 @@ Reference< XGraphic > lclCropGraphic(uno::Reference<graphic::XGraphic> const & x
return aReturnGraphic.GetXGraphic();
}
+Reference< XGraphic > lclMirrorGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, bool bFlipH, bool bFlipV)
+{
+ ::Graphic aGraphic(xGraphic);
+ ::Graphic aReturnGraphic;
+
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+ BmpMirrorFlags nMirrorFlags = BmpMirrorFlags::NONE;
+
+ if(bFlipH)
+ nMirrorFlags |= BmpMirrorFlags::Horizontal;
+ if(bFlipV)
+ nMirrorFlags |= BmpMirrorFlags::Vertical;
+
+ aBitmapEx.Mirror(nMirrorFlags);
+
+ aReturnGraphic = ::Graphic(aBitmapEx);
+ aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
+
+ return aReturnGraphic.GetXGraphic();
+}
Reference< XGraphic > lclCheckAndApplyChangeColorTransform(const BlipFillProperties &aBlipProps, uno::Reference<graphic::XGraphic> const & xGraphic,
const GraphicHelper& rGraphicHelper, const ::Color nPhClr)
@@ -755,7 +777,7 @@ void FillProperties::pushToPropMap( ShapePropertyMap& rPropMap,
rPropMap.setProperty( ShapeProperty::FillStyle, eFillStyle );
}
-void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper) const
+void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper, bool bFlipH, bool bFlipV) const
{
sal_Int16 nBrightness = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moBrightness.get( 0 ) / PER_PERCENT, -100, 100 );
sal_Int16 nContrast = getLimitedValue< sal_Int16, sal_Int32 >( maBlipProps.moContrast.get( 0 ) / PER_PERCENT, -100, 100 );
@@ -805,6 +827,11 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
xGraphic = lclRotateGraphic(xGraphic, Degree10(nAngle/10) );
}
+ // We have not core feature that flips graphic in the shape.
+ // Here we are applying flip property to bitmap directly.
+ if(bFlipH || bFlipV)
+ xGraphic = lclMirrorGraphic(xGraphic, bFlipH, bFlipV );
+
rPropMap.setProperty(PROP_FillBitmap, xGraphic);
}
else
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 4ec4c425c9ce..e711a3261bb3 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1049,8 +1049,13 @@ Reference< XShape > const & Shape::createAndInsert(
aShapeProps.assignUsed( maDefaultShapeProperties );
if(mnRotation != 0 && bIsCustomShape)
aShapeProps.setProperty( PROP_RotateAngle, sal_Int32( NormAngle36000( mnRotation / -600 ) ));
- if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" || aServiceName == "com.sun.star.drawing.OLE2Shape" || bIsCustomShape )
- mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper );
+ if( bIsEmbMedia ||
+ bIsCustomShape ||
+ aServiceName == "com.sun.star.drawing.GraphicObjectShape" ||
+ aServiceName == "com.sun.star.drawing.OLE2Shape")
+ {
+ mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper, mbFlipH, mbFlipV );
+ }
if ( mpTablePropertiesPtr && aServiceName == "com.sun.star.drawing.TableShape" )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index ee75e62a849b..eff937566383 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -216,6 +216,7 @@ class SdImportTest : public SdModelTestBase
void testTdf128684();
void testShapeGlowEffectPPTXImpoer();
void testShapeBlurPPTXImport();
+ void testMirroredGraphic();
bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
void testPatternImport();
@@ -344,6 +345,7 @@ class SdImportTest : public SdModelTestBase
CPPUNIT_TEST(testTdf49856);
CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer);
CPPUNIT_TEST(testShapeBlurPPTXImport);
+ CPPUNIT_TEST(testMirroredGraphic);
CPPUNIT_TEST_SUITE_END();
};
@@ -3308,6 +3310,20 @@ void SdImportTest::testShapeBlurPPTXImport()
}
+void SdImportTest::testMirroredGraphic()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/mirrored-graphic.pptx"), PPTX);
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT(xShape.is());
+ uno::Reference<graphic::XGraphic> xGraphic;
+ xShape->getPropertyValue("FillBitmap") >>= xGraphic;
+ CPPUNIT_ASSERT(xGraphic.is());
+ Graphic aGraphic(xGraphic);
+ BitmapEx aBitmap(aGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( Color(5196117), aBitmap.GetPixelColor( 0, 0 ));
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();

View File

@ -1,284 +0,0 @@
From 33e69fb9ef450169e7d85ae3215fd9a4fc8082c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?G=C3=BCl=C5=9Fah=20K=C3=B6se?= <gulsah.kose@collabora.com>
Date: Mon, 1 Feb 2021 17:03:33 +0300
Subject: [PATCH] tdf#134210 Import crop position of bitmap filled shape.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: I6a62d68cd0f57e53934851a2f53dae05bf7d3730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110262
Tested-by: Jenkins
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110973
---
oox/source/drawingml/fillproperties.cxx | 84 ++++++++++++++++++------
oox/source/export/drawingml.cxx | 39 +++++++----
sd/qa/unit/data/pptx/crop-position.pptx | Bin 0 -> 175724 bytes
sd/qa/unit/export-tests-ooxml1.cxx | 29 ++++++--
sd/qa/unit/import-tests.cxx | 16 +++++
5 files changed, 129 insertions(+), 39 deletions(-)
create mode 100644 sd/qa/unit/data/pptx/crop-position.pptx
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 78ebff7e2122..3439d28a4f22 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -87,6 +87,30 @@ Reference< XGraphic > lclRotateGraphic(uno::Reference<graphic::XGraphic> const &
return aReturnGraphic.GetXGraphic();
}
+void lclCalculateCropPercentage(uno::Reference<graphic::XGraphic> const & xGraphic, geometry::IntegerRectangle2D &aFillRect)
+{
+ ::Graphic aGraphic(xGraphic);
+ assert (aGraphic.GetType() == GraphicType::Bitmap);
+
+ BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
+
+ sal_Int32 nScaledWidth = aBitmapEx.GetSizePixel().Width();
+ sal_Int32 nScaledHeight = aBitmapEx.GetSizePixel().Height();
+
+ sal_Int32 nOrigWidth = (nScaledWidth * (100000 - aFillRect.X1 - aFillRect.X2)) / 100000;
+ sal_Int32 nOrigHeight = (nScaledHeight * (100000 - aFillRect.Y1 - aFillRect.Y2)) / 100000;
+
+ sal_Int32 nLeftPercentage = nScaledWidth * aFillRect.X1 / nOrigWidth;
+ sal_Int32 nRightPercentage = nScaledWidth * aFillRect.X2 / nOrigWidth;
+ sal_Int32 nTopPercentage = nScaledHeight * aFillRect.Y1 / nOrigHeight;
+ sal_Int32 nBottomPercentage = nScaledHeight * aFillRect.Y2 / nOrigHeight;
+
+ aFillRect.X1 = -nLeftPercentage;
+ aFillRect.X2 = -nRightPercentage;
+ aFillRect.Y1 = -nTopPercentage;
+ aFillRect.Y2 = -nBottomPercentage;
+}
+
Reference< XGraphic > lclCropGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, geometry::IntegerRectangle2D aFillRect)
{
::Graphic aGraphic(xGraphic);
@@ -103,8 +127,15 @@ Reference< XGraphic > lclCropGraphic(uno::Reference<graphic::XGraphic> const & x
sal_Int32 nBottomCorr = nOrigHeight * -1 * static_cast<double>(aFillRect.Y2) / 100000;
nHeight += nBottomCorr;
- aBitmapEx.Scale(Size(aBitmapEx.GetSizePixel().Width(), nHeight));
- aBitmapEx.Crop(tools::Rectangle(Point(0, nTopCorr), Size(aBitmapEx.GetSizePixel().Width(), nOrigHeight)));
+ sal_Int32 nOrigWidth = aBitmapEx.GetSizePixel().Width();
+ sal_Int32 nWidth = nOrigWidth;
+ sal_Int32 nLeftCorr = nOrigWidth * -1 * static_cast<double>(aFillRect.X1) / 100000;
+ nWidth += nLeftCorr;
+ sal_Int32 nRightCorr = nOrigWidth * -1 * static_cast<double>(aFillRect.X2) / 100000;
+ nWidth += nRightCorr;
+
+ aBitmapEx.Scale(Size(nWidth, nHeight));
+ aBitmapEx.Crop(tools::Rectangle(Point(nLeftCorr, nTopCorr), Size(nOrigWidth, nOrigHeight)));
aReturnGraphic = ::Graphic(aBitmapEx);
aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
@@ -813,6 +844,36 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
nContrast = 0;
}
+ // cropping
+ if ( maBlipProps.moClipRect.has() )
+ {
+ geometry::IntegerRectangle2D oClipRect( maBlipProps.moClipRect.get() );
+ awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic ) );
+ if ( aOriginalSize.Width && aOriginalSize.Height )
+ {
+ text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
+ if ( oClipRect.X1 )
+ aGraphCrop.Left = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X1 ) / 100000 );
+ if ( oClipRect.Y1 )
+ aGraphCrop.Top = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y1 ) / 100000 );
+ if ( oClipRect.X2 )
+ aGraphCrop.Right = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X2 ) / 100000 );
+ if ( oClipRect.Y2 )
+ aGraphCrop.Bottom = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y2 ) / 100000 );
+ rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
+ }
+
+ if(mbIsCustomShape)
+ {
+ geometry::IntegerRectangle2D aCropRect = oClipRect;
+ lclCalculateCropPercentage(xGraphic, aCropRect);
+ xGraphic = lclCropGraphic(xGraphic, aCropRect);
+
+ rPropMap.setProperty(PROP_FillBitmap, xGraphic);
+ }
+
+ }
+
if(mbIsCustomShape)
{
// it is a cropped graphic.
@@ -837,25 +898,6 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
else
rPropMap.setProperty(PROP_Graphic, xGraphic);
- // cropping
- if ( maBlipProps.moClipRect.has() )
- {
- geometry::IntegerRectangle2D oClipRect( maBlipProps.moClipRect.get() );
- awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic ) );
- if ( aOriginalSize.Width && aOriginalSize.Height )
- {
- text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
- if ( oClipRect.X1 )
- aGraphCrop.Left = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X1 ) / 100000 );
- if ( oClipRect.Y1 )
- aGraphCrop.Top = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y1 ) / 100000 );
- if ( oClipRect.X2 )
- aGraphCrop.Right = rtl::math::round( ( static_cast< double >( aOriginalSize.Width ) * oClipRect.X2 ) / 100000 );
- if ( oClipRect.Y2 )
- aGraphCrop.Bottom = rtl::math::round( ( static_cast< double >( aOriginalSize.Height ) * oClipRect.Y2 ) / 100000 );
- rPropMap.setProperty(PROP_GraphicCrop, aGraphCrop);
- }
- }
if ( maBlipProps.moAlphaModFix.has() )
{
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 21394acc80da..94b67cb379f2 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1598,27 +1598,40 @@ void DrawingML::WritePattFill(const Reference<XPropertySet>& rXPropSet, const cs
mpFS->endElementNS( XML_a , XML_pattFill );
}
-void DrawingML::WriteGraphicCropProperties(uno::Reference<beans::XPropertySet> const & rXPropSet, Size const & rOriginalSize, MapMode const & rMapMode)
+void DrawingML::WriteGraphicCropProperties(uno::Reference<beans::XPropertySet> const & rXPropSet,
+ Size const & rOriginalSize,
+ MapMode const & rMapMode)
{
if (!GetProperty(rXPropSet, "GraphicCrop"))
return;
- Size aOriginalSize(rOriginalSize);
-
- // GraphicCrop is in mm100, so in case the original size is in pixels, convert it over.
- if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
- aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, MapMode(MapUnit::Map100thMM));
-
css::text::GraphicCrop aGraphicCropStruct;
mAny >>= aGraphicCropStruct;
- if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
+ if(GetProperty(rXPropSet, "CustomShapeGeometry"))
+ {
+ // tdf#134210 GraphicCrop property is handled in import filter because of LibreOffice has not core
+ // feature. We croped the bitmap physically and MSO shouldn't crop bitmap one more time. When we
+ // have core feature for graphic cropping in custom shapes, we should uncomment the code anymore.
+
+ mpFS->singleElementNS( XML_a, XML_srcRect);
+ }
+ else
{
- mpFS->singleElementNS( XML_a, XML_srcRect,
- XML_l, OString::number(rtl::math::round(aGraphicCropStruct.Left * 100000.0 / aOriginalSize.Width())),
- XML_t, OString::number(rtl::math::round(aGraphicCropStruct.Top * 100000.0 / aOriginalSize.Height())),
- XML_r, OString::number(rtl::math::round(aGraphicCropStruct.Right * 100000.0 / aOriginalSize.Width())),
- XML_b, OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 100000.0 / aOriginalSize.Height())) );
+ Size aOriginalSize(rOriginalSize);
+
+ // GraphicCrop is in mm100, so in case the original size is in pixels, convert it over.
+ if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+ aOriginalSize = Application::GetDefaultDevice()->PixelToLogic(aOriginalSize, MapMode(MapUnit::Map100thMM));
+
+ if ( (0 != aGraphicCropStruct.Left) || (0 != aGraphicCropStruct.Top) || (0 != aGraphicCropStruct.Right) || (0 != aGraphicCropStruct.Bottom) )
+ {
+ mpFS->singleElementNS( XML_a, XML_srcRect,
+ XML_l, OString::number(rtl::math::round(aGraphicCropStruct.Left * 100000.0 / aOriginalSize.Width())),
+ XML_t, OString::number(rtl::math::round(aGraphicCropStruct.Top * 100000.0 / aOriginalSize.Height())),
+ XML_r, OString::number(rtl::math::round(aGraphicCropStruct.Right * 100000.0 / aOriginalSize.Width())),
+ XML_b, OString::number(rtl::math::round(aGraphicCropStruct.Bottom * 100000.0 / aOriginalSize.Height())) );
+ }
}
}
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 0e938e05e9c7..a1e752834f1a 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -1145,17 +1145,36 @@ void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect()
xDocShRef->DoClose();
xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml");
- const OString sXmlPath = "//a:blipFill/a:srcRect";
+
+ // tdf#132680
+ // We are preventing the side effect of DOCX improvement to PPTX case.
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
// - Actual : 0
// - XPath '//a:blipFill/a:srcRect' number of nodes is incorrect
// i.e. <a:srcRect> was exported as <a:fillRect> in <a:stretch>, which made part of the image
// invisible.
- double fLeftPercent = std::round(getXPath(pXmlDoc, sXmlPath, "l").toDouble() / 1000);
- CPPUNIT_ASSERT_EQUAL(4.0, fLeftPercent);
- double fRightPercent = std::round(getXPath(pXmlDoc, sXmlPath, "r").toDouble() / 1000);
- CPPUNIT_ASSERT_EQUAL(4.0, fRightPercent);
+
+ // tdf#134210
+ // Original values of attribute of l and r in xml files: <a:srcRect l="4393" r="4393"/>
+ // Because of we have not core feature for cropping bitmap in custom shapes, we added cropping
+ // support to import filter. We modified the bitmap during import. As result the original
+ // image is cropped anymore (if we had the core feature for that, the original image would
+ // remain same, just we would see like cropped in the shape) To see the image in correct
+ // position in Microsoft Office too, we have to remove left right top bottom percentages
+ // anymore. In the future if we add core feature to LibreOffice, this test will failed with
+ // When we add the core feature, we should change the control value with 4393 as following.
+
+ //const OString sXmlPath = "//a:blipFill/a:srcRect";
+ //sal_Int32 nLeftPercent = getXPath(pXmlDoc, sXmlPath, "l").toInt32();
+ //CPPUNIT_ASSERT_EQUAL(sal_Int32(4393), nLeftPercent);
+ //sal_Int32 nRightPercent = getXPath(pXmlDoc, sXmlPath, "r").toInt32();
+ //CPPUNIT_ASSERT_EQUAL(sal_Int32(4393), nRightPercent);
+
+ assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:blipFill/a:srcRect", "l");
+ assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:blipFill/a:srcRect", "r");
+ assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:blipFill/a:srcRect", "t");
+ assertXPathNoAttribute(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:blipFill/a:srcRect", "b");
}
void SdOOXMLExportTest1::testTdf100348FontworkBitmapFill()
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index eff937566383..9aefdd4ecc7b 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -217,6 +217,7 @@ class SdImportTest : public SdModelTestBase
void testShapeGlowEffectPPTXImpoer();
void testShapeBlurPPTXImport();
void testMirroredGraphic();
+ void testCropPositionGraphic();
bool checkPattern(sd::DrawDocShellRef const & rDocRef, int nShapeNumber, std::vector<sal_uInt8>& rExpected);
void testPatternImport();
@@ -346,6 +347,7 @@ class SdImportTest : public SdModelTestBase
CPPUNIT_TEST(testShapeGlowEffectPPTXImpoer);
CPPUNIT_TEST(testShapeBlurPPTXImport);
CPPUNIT_TEST(testMirroredGraphic);
+ CPPUNIT_TEST(testCropPositionGraphic);
CPPUNIT_TEST_SUITE_END();
};
@@ -3324,6 +3326,20 @@ void SdImportTest::testMirroredGraphic()
xDocShRef->DoClose();
}
+void SdImportTest::testCropPositionGraphic()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/crop-position.pptx"), PPTX);
+ uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0, xDocShRef), uno::UNO_SET_THROW);
+ CPPUNIT_ASSERT(xShape.is());
+ uno::Reference<graphic::XGraphic> xGraphic;
+ xShape->getPropertyValue("FillBitmap") >>= xGraphic;
+ CPPUNIT_ASSERT(xGraphic.is());
+ Graphic aGraphic(xGraphic);
+ BitmapEx aBitmap(aGraphic.GetBitmapEx());
+ CPPUNIT_ASSERT_EQUAL( Color(8682893), aBitmap.GetPixelColor( 0, 0 ));
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();

View File

@ -1,149 +0,0 @@
From 54ad2128db5d324f530cb15ee56e6512d9093872 Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.com>
Date: Thu, 25 Feb 2021 18:04:19 +0100
Subject: [PATCH] tdf#132368 svx: empty the interop grab-bag on ending text
edit
Regression from commit aafaf1f55fa413ad49d4556cf7c0a713dd206ae4 (PPTX
export: save SmartArt as diagram instead of group of shapes,
2019-03-13), the idea of interop grab-bag was to carry additional
information around as long as the object is not changed.
However, actual clearing of the grab-bag was never implemented, do this
when editing shape text.
An alternative would be to do this in SdrObject::SetChanged(), but
Writer sets the layer of SdrObjects during layout (when the import
filter is already finished and undo is enabled), so that would mean loss
of the smartart metadata for DOCX.
Change-Id: I9ab205b4ef84169f4b5a16b86fe9a152e3370a6c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111560
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
---
svx/CppunitTest_svx_unit.mk | 1 +
svx/qa/unit/svdraw.cxx | 55 ++++++++++++++++++++++++++++++++++++
svx/source/svdraw/svdobj.cxx | 20 +++++++++++++
3 files changed, 76 insertions(+)
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk
index ac9f3e4531ad..892490265261 100644
--- a/svx/CppunitTest_svx_unit.mk
+++ b/svx/CppunitTest_svx_unit.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
$(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
basegfx \
drawinglayer \
+ editeng \
sal \
sfx \
svxcore \
diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx
index c96ccbb7aa97..783420d56fea 100644
--- a/svx/qa/unit/svdraw.cxx
+++ b/svx/qa/unit/svdraw.cxx
@@ -25,6 +25,12 @@
#include <svx/svdpage.hxx>
#include <svx/unopage.hxx>
#include <vcl/virdev.hxx>
+#include <comphelper/propertyvalue.hxx>
+#include <sfx2/viewsh.hxx>
+#include <svx/svdview.hxx>
+#include <svx/unoapi.hxx>
+#include <sal/log.hxx>
+
#include <sdr/contact/objectcontactofobjlistpainter.hxx>
using namespace ::com::sun::star;
@@ -105,6 +111,55 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testSemiTransparentText)
CPPUNIT_ASSERT_EQUAL(nTransparence,
static_cast<sal_Int16>(basegfx::fround(fTransparence * 100)));
}
+
+CPPUNIT_TEST_FIXTURE(SvdrawTest, testTextEditEmptyGrabBag)
+{
+ // Given a document with a groupshape, which has 2 children.
+ getComponent() = loadFromDesktop("private:factory/sdraw");
+ uno::Reference<lang::XMultiServiceFactory> xFactory(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xRect1(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xRect1->setPosition(awt::Point(1000, 1000));
+ xRect1->setSize(awt::Size(10000, 10000));
+ uno::Reference<drawing::XShape> xRect2(
+ xFactory->createInstance("com.sun.star.drawing.RectangleShape"), uno::UNO_QUERY);
+ xRect2->setPosition(awt::Point(1000, 1000));
+ xRect2->setSize(awt::Size(10000, 10000));
+ uno::Reference<drawing::XShapes> xGroup(
+ xFactory->createInstance("com.sun.star.drawing.GroupShape"), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(getComponent(), uno::UNO_QUERY);
+ uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPagesSupplier->getDrawPages()->getByIndex(0),
+ uno::UNO_QUERY);
+ uno::Reference<drawing::XShape> xGroupShape(xGroup, uno::UNO_QUERY);
+ xDrawPage->add(xGroupShape);
+ xGroup->add(xRect1);
+ xGroup->add(xRect2);
+ uno::Reference<text::XTextRange> xRect2Text(xRect2, uno::UNO_QUERY);
+ xRect2Text->setString("x");
+ uno::Sequence<beans::PropertyValue> aGrabBag = {
+ comphelper::makePropertyValue("OOXLayout", true),
+ };
+ uno::Reference<beans::XPropertySet> xGroupProps(xGroup, uno::UNO_QUERY);
+ xGroupProps->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag));
+
+ // When editing the shape text of the 2nd rectangle (insert a char at the start).
+ SfxViewShell* pViewShell = SfxViewShell::Current();
+ SdrView* pSdrView = pViewShell->GetDrawView();
+ SdrObject* pObject = GetSdrObjectFromXShape(xRect2);
+ pSdrView->SdrBeginTextEdit(pObject);
+ EditView& rEditView = pSdrView->GetTextEditOutlinerView()->GetEditView();
+ rEditView.InsertText("y");
+ pSdrView->SdrEndTextEdit();
+
+ // Then make sure that grab-bag is empty to avoid loosing the new text.
+ xGroupProps->getPropertyValue("InteropGrabBag") >>= aGrabBag;
+ // Without the accompanying fix in place, this test would have failed with:
+ // assertion failed
+ // - Expression: !aGrabBag.hasElements()
+ // i.e. the grab-bag was still around after modifying the shape, and that grab-bag contained the
+ // old text.
+ CPPUNIT_ASSERT(!aGrabBag.hasElements());
+}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 638c590a52cd..5480ac1d86ce 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1740,6 +1740,26 @@ void SdrObject::SetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextO
if (GetCurrentBoundRect()!=aBoundRect0) {
SendUserCall(SdrUserCallType::Resize,aBoundRect0);
}
+
+ if (getSdrModelFromSdrObject().IsUndoEnabled())
+ {
+ // Don't do this during import.
+ SdrObject* pTopGroupObj = nullptr;
+ if (getParentSdrObjectFromSdrObject())
+ {
+ pTopGroupObj = getParentSdrObjectFromSdrObject();
+ while (pTopGroupObj->getParentSdrObjectFromSdrObject())
+ {
+ pTopGroupObj = pTopGroupObj->getParentSdrObjectFromSdrObject();
+ }
+ }
+ if (pTopGroupObj)
+ {
+ // A shape was modified, which is in a group shape. Empty the group shape's grab-bag,
+ // which potentially contains the old text of the shapes in case of diagrams.
+ pTopGroupObj->SetGrabBagItem(uno::makeAny(uno::Sequence<beans::PropertyValue>()));
+ }
+ }
}
void SdrObject::NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> /*pTextObject*/)
--
2.26.2

42
bsc1184961.patch Normal file
View File

@ -0,0 +1,42 @@
From 9fed7b07af44792012028eb57900640a5ee833cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 4 May 2021 09:15:25 +0100
Subject: [PATCH] tdf#141930 document set as unmodified if editengine didn't
modify on keyevent
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
this appears to have always happened for cursor keys, and since
commit 0154f04e8c64df937b793c73ac58d553637f324f
Author: Caolán McNamara <caolanm@redhat.com>
Date: Wed Feb 24 14:32:21 2021 +0000
Resolves: rhbz#1931423 start update timer in IM events as well as keyevents
also happens on Input Engine events which don't cause changes
Change-Id: Ic5cdd9ef4f1bed1cc2b2c17fc847f196a9c6e23a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115055
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
---
starmath/source/edit.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: libreoffice-7.1.3.2/starmath/source/edit.cxx
===================================================================
--- libreoffice-7.1.3.2.orig/starmath/source/edit.cxx
+++ libreoffice-7.1.3.2/starmath/source/edit.cxx
@@ -513,8 +513,8 @@ void SmEditWindow::UserPossiblyChangedTe
// cursor travelling and such things...
SmDocShell *pDocShell = GetDoc();
EditEngine *pEditEngine = GetEditEngine();
- if (pDocShell && pEditEngine)
- pDocShell->SetModified(pEditEngine->IsModified());
+ if (pDocShell && pEditEngine && pEditEngine->IsModified())
+ pDocShell->SetModified(true);
aModifyIdle.Start();
}

3
icu4c-68_1-data.zip Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03ea8b4694155620548c8c0ba20444f1e7db246cc79e3b9c4fc7a960b160d510
size 16819610

3
icu4c-68_1-src.tgz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a9f2e3d8b4434b8e53878b4308bd1e6ee51c9c7042e2b1a376abefb6fbb29f2d
size 24722348

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d6e570c59eec2f61eaccf93623c8dde153ff7c0a44bf68bf4496b0f52112e0ef
size 243478248

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmA3mwAACgkQ9DSh76/u
rqO5YBAAzlTwFHXI74/NibyoEv43DR2Lcsdc5hNxtEN81/sdRmjS4Na+DnECtapD
b3W8ZOoHRdVWoXsgSXn7dT+ikZ9UDTTqYXRZoUsVTOSMqTI0/9yHwNmNPLACNOcN
1smsTVIVOyQ2w6ezYRA8YMAqY5YuwGAHCcx1ZEbwNL4Lkr8p5OeeD09L7HgC1Fjw
3FcsPPn/07ESOCaKqFPQM8D2+R4lio7gOLHKgyN8V5Dn3dP/+WlKk9fDeXjZXLPB
/bIiBgfa4Z/ig77KS3KyAhbqPwu3CA28hbktQovgVUgRyK4v8/5UdWcI4js+WxGO
0JBrLZ7ajDSNdpu8Aa8Tj+G2Osmvxct02ueYOSHXRiLzE2Ey37XF4/kN5tlh9YO2
W53y35osciA7W07XCFP+sCjs5nGUDbTuTi3yGHHn94VH9h1MmYW+j5qnjzVm4vlS
U95J0XFFU3EmBc3RizOA8R4H38kZqTVYMIRSHnNTS40YAakfo45HGxvIn3r7Rmxv
AanujetGmzhzrfgja4G4PEcQkcIPSs14pgiCvH0FSwNRCZdZxyqTqlvgvXSd8AK6
5AtMmDGTA0z5qBPjOBne1iRwEA4PTFrXAQf1wtn6Yl+VR3i1wGVq49JdWkQiUHJW
uh3s+tgg6DkSKB88gwt9gAp6ZR+2nc0y3PH93ksRPlyCU2jfDsI=
=4LjS
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:35af7fd104b253704f770a205f835aee0e82ccc889ebf0949a89d9b3276229bf
size 244104432

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmCJmd0ACgkQ9DSh76/u
rqOeHQ/9EWVwuLTeEzTp4C1QmD/azlT4Y/DSyfTJ3nnTFtReHpXLDeqRfeFSE2sh
33v+tvAN6BOQkWV8YwkMG0AECuQjGgM+rUADSibosbJMStSxIUswY/lqqYzUl6w4
+L2Yk28XyaxPcE5izKh7fPXLhg0KeyePkNE+RQcoKQP3QXWFIRM/Sb6cMx8NzyMH
1iow3FLeyylzrDJaP+wbg639myrAWph85xFLMaeCyTrUXaMuTOUZ0LjpeCbY8MQz
NbwYKNr3QrrTOVI3UmT5g4/DT/hncsI9KFQkB9I8rVqtonBr+RZSK1SunuelKx0r
0hu1NmAjwm1Rv+H1C2L/Qi/ZUpkgnC605VkS5RSmgzl74rd4veh6+KdeTQKhjDnn
UzDlpXVEo1soWH3qqyQMtsJGUYVvB9EiC5JL4YGvrBJMQ25xJ5GbhU0HoBYITY9M
ngUFwGgj2DpFRQCbIItSDJkJ3IjLzyIFm5ZfsH4QTB8JAFsez3LAQMymUBryhlkp
uhN53DVFqoiWazx2Yqbt4lbHTiFS9HLwb95YyfLPdomV0Ng9iIsHeGYwYUAPcNSh
S3AJvhM62ZyKIIZfOa+vk6NBGAlNnhqUOK9qdFC/v7Jyqr3iZS/zEFRWfldJcEkC
9/HV9E5mjDOCPd61IlGmVDB2HJt5v8CLldIBmgg+IkgFKqOmH+Y=
=c9zE
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4774ec743f5463b65ba34e2e542b594d81de090a1be326490a52d3bb37059693
size 111786544

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmA3mwYACgkQ9DSh76/u
rqOcEg/8DpmO1JOAlMwf4Oeqgl/8FSTU0pxakBeOUgNlpn/EqMZhVqW593pxjpYZ
0+iBLZ7Kj5kmM/9mNUcqOAzgjUADL3LRII04XviW6Q3vhe1ckaKaGMQzN7oJHVz+
Ee9QKO8KJ1DwkiAUi139FfmaxzAi1j/ZdKhkuuB9kcCSUK0yRkTM84+ETEr9ESSg
zeSgg2cyNSBQ/3YBhl7gUrNJevqs1BMpnG6TqDj4+hultYgEbc4HX2H1kc8pYnrk
UOnMVOGZk3ZEHyCRUPVkRhovwnEN4NTn6uZ4MDqEK9e8OnWZA0B/Z6wyZbAPtN1e
ALfvP8JF5Ve4Ou7ZSz9+HzzGzziLuDtUw7RbHujWK/6EMMYtx4wFYmRmNupUBijd
Xzy3YYHmuO+hEhKuRZRK8zHTk0EILIAr92FeZgHImaShIEmWEAt2rfabF1a97DEU
Wx3u0ajPJ2isBG1ivspV2RxD+fZ5VhtupRSBSXEbb2+yz3iAn6/IRNt7yc4r1h/s
vapvmM99ANwmkr+L/Iq1nqtfwmOGVXOlwY0hjG1gIMYu9EdUf8LHK6NoCks3pm+s
kmIof+VLza2rygQsIyuMLNKmtnScqhr14oD85r1N6PFvC1q55/N+JVejMjTKKbSI
35TcrDi8iiPHCF7AC58TGf54E6+ZGEi5iA17HtM95F5cuXSAKVQ=
=QcRA
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0f14b4db1585506761ad2ceeb43850cb594f2ec8a20fc9ca7bcb95e77408935
size 111785416

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmCJmeQACgkQ9DSh76/u
rqO7Hg//QG0EMbDa6CQL0gPfGDjp4PIbV8//wPVIwvBJPqd5lgzFh3xQfWUHO7h1
N/1CQ2fHeqrkp+LTRqjghxn0ShNbWD6xILjPDpjNfC+eoD2MRLJuxni55Xzj6i6X
Y1vagDf80Vc2fHH0/a2nNndSV2UuVCvyLsdnQMgzHTtaSnGt0DBHnCYm3P4clb7r
pOEXSF/pRuTvRzzGHMhXaTQ6AfneBLkc9GIOOOa/elmR+J7GH8KyjAGLX7367hx+
Fq8OXFXRcpQPBk/UfwHKF6PadLSp+ilruEiop7uSiuwdIiSAvnfmCegga74Y6MZr
PxcaTVl4m8opve7QzIg70K2dnQMexj5cITUUYuyiP6EoxrYftPN27C9LVZib1QL7
AsLK50fSn+GDAEiVVmpwlfpxJvK7z8H6cT5hrQSEZCOHKsrSo/Vcn7vtbxMwf/p9
lC+XJjju8Ord7S0FeUdUHbcpJ9gy652s0KsVR4cRq9V71QJKln0tthZW1UxmyLri
B0QbIrFPG4Vz1XTJWB3bd3SGdxnNrEU+wbnh1D2sMlwUYoUZDoYRwp1vu3sxrawb
QLvigaIxAxJcMRCnvtzaufUkWrU/cLS+2RY2rt3H1pX9cMbuCyzAjGSQt8rHAwdD
w/8QgXC1PITBdVABlxvtEaUSk+YGHSLDBFRviU3hIFjhX5jVJds=
=3/LI
-----END PGP SIGNATURE-----

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:702bca8e3e3359d065a5e986f5437e1034aa617856ac83ec2769b87300da2dee
size 184669284

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmA3mwcACgkQ9DSh76/u
rqPk7hAApDQBCuJlM4Nt+dsl66the7jhu4e3cWFJqXpeM0GrynOQx0ckWXSZwaN4
Z1RViBC+WiaQHSghiJDBGxMJy/0iIl1Eh+o5H4JVgnOBSHF3Hgm23/UVhJ0WdtrT
H00xvDUxufoZBkYTNffJ0w6nAfnscTEo03VR5+HLgej7958YF5vNO3SCrR/8dluY
efe/d4dm9SCHnkRi6fEA1FA50el6mRIE62gG4PCjw+9xRzhCt1SSw+WKjUi0dCwT
SZR1TZXkWh71t5PaVcuG8R/5bzFlIGu8XxLDFh0bmnCqI3mKZ5445if82R0Sj4bb
1oDDTYEXC1UWoY5RlBv7h/5mTcOkEz2+Lc7pQ0i4w1LBEKKYm4IAs5wcTz8FzSjJ
cSWkWvUjh6qYdnEVl+Kz9/Xg2rrdTGTFKS8MOfJXrPZVii9NGIxX3HPL8+KO6MGM
0hXSupQngAMi2a0UNPJee2wk7Yh2DquD6UZookqjTPuWdiAPX264LZQ3uLLfAzQW
uBzsTtcr996dP68VpbMugtFAtQruk6/sSIaj12wlbMK0zZwvDAEsZOyee24dK+6/
zMMzxUutVvtGph2lXYTDJqqXsDY+wnL9jf7npIJW/+d362RLFujVXHdkjhmMVauA
TX2fR4OZO5gg+1RT3KjZ8gVIMzstXPoVBDelqXjFjePp1YJqtNY=
=e67E
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86138935d274d46d27e4ce92a72d759e7d4491d7b227be952e05735ba5c9b327
size 184886096

View File

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAmCJmeUACgkQ9DSh76/u
rqOUmA/9HRT5E660Lv+sx2UdKe8/UA+T63IZlkRJSdLcr4VJEEX9q0vf7vK+NLyx
9HFC6hswUwPj5hUyITWnxzGIaSCb0AWfmlgU37gi2GlZNthXSUHoxMWn0abLMrvY
jdmBVHij2Tz+9p5eHEOPHSUgiqO1icDAcZv57bgFaIOYAp0+e633oKSWuaIj/LD6
ZFkNjrijydmY0EV+MsrDXgzQzfZ+MR02ruxm4QlU5UfI4g7JUxCumvXcw1em+FyH
TsfsfEWIB8vKmgSmzbzyLR8ELxC57ZCfYIFSy3Kc8G1DmYEThpdeKe6CmhegjG/A
xAqNkHeVnxqOUYiQGo/FOw4mE4F5B4Pkr34AfCrXBRlnMd9wakvngMtzaxKiNqwi
2zcgFY/8agenisXreLvC3UgwwLcJeg0q45bOz0rCJB4+lxhD9wlh747O6BeNkY5P
SeL1d964wkDNyliXxOUZ7+SaW6/FnBvtdt+JxJFRNvqH7ZkbjefleNbUZcCAw9vR
80hqde42Z5zLh5PlDsat+R9JG4xh1qfqAlBIEFX/ho5d9lFK5FPx0AgXQh2SRb8C
8TO7x7DmtM0M1K8kHos4me/mrGAZLFhO45dWKSrIACnjFodqNYb9X0bopgYaUB03
/PvwVymsrU/K3bXX7EgJQyD0CM/XaGC/Jp54r4UxURyLeaTffPE=
=+y28
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,50 @@
-------------------------------------------------------------------
Tue May 4 11:31:27 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Add bsc1184961.patch to fix bsc#1184961 more cleanly
- Drop 0001-Revert-rhbz-1931423.patch
-------------------------------------------------------------------
Mon May 3 09:14:37 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Update to 7.1.3.2
* 7.1.3 final release
- Drop merged patches:
* 0002-fix-the-endif-placement-for-GTK_CHECK_VERSION.patch
* bsc1182970.patch
- Add temporary 0001-Revert-rhbz-1931423.patch (bsc#1184961, bsc#1184527)
* libreoffice oomath does not ask to save changes when closing document
-------------------------------------------------------------------
Tue Apr 20 09:31:35 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Install qt5 plugin when the desktop environment needs it (boo#1184596)
-------------------------------------------------------------------
Tue Apr 6 12:48:51 UTC 2021 - Markéta Machová <mmachova@suse.com>
- Adjust the package to work on SLE-12-SP5
* bundle boost and icu
* add patches 0001-Revert-java-9-changes.patch and
0002-fix-the-endif-placement-for-GTK_CHECK_VERSION.patch
-------------------------------------------------------------------
Thu Apr 1 10:52:06 UTC 2021 - Andras Timar <andras.timar@collabora.com>
- Fix bsc#1182970 - LO-L3: PPTX: image styles that clip images into curvy shapes missing (and images shown rectangular)
* bsc1182970.patch
-------------------------------------------------------------------
Thu Mar 25 14:25:20 UTC 2021 - Tomáš Chvátal <tomas.chvatal@gmail.com>
- Version update to 7.1.2.2:
* 7.1.2 final release
- Drop merged patches:
* bsc1174465.diff
* bsc1181644.diff
* bsc1176547_1.diff
* bsc1176547_2.diff
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 1 11:04:00 UTC 2021 - Markéta Machová <mmachova@suse.com> Mon Mar 1 11:04:00 UTC 2021 - Markéta Machová <mmachova@suse.com>

View File

@ -34,7 +34,6 @@
%else %else
%bcond_with kdeintegration %bcond_with kdeintegration
%endif %endif
%bcond_with firebird
%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse}) %if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120300 && 0%{?is_opensuse})
%bcond_without system_gpgme %bcond_without system_gpgme
%else %else
@ -45,8 +44,9 @@
%global __requires_exclude ^libgpgmepp\\.so.*$ %global __requires_exclude ^libgpgmepp\\.so.*$
%bcond_with system_gpgme %bcond_with system_gpgme
%endif %endif
%bcond_with firebird
Name: libreoffice Name: libreoffice
Version: 7.1.1.2 Version: 7.1.3.2
Release: 0 Release: 0
Summary: A Free Office Suite (Framework) Summary: A Free Office Suite (Framework)
License: LGPL-3.0-or-later AND MPL-2.0+ License: LGPL-3.0-or-later AND MPL-2.0+
@ -101,13 +101,10 @@ Patch2: nlpsolver-no-broken-help.diff
Patch3: mediawiki-no-broken-help.diff Patch3: mediawiki-no-broken-help.diff
# PATCH-FIX-UPSTREAM https://github.com/LibreOffice/core/commit/f14b83b38d35a585976ef5d422754d8e0d0266a6 ucp: fix call to getComponentContext # PATCH-FIX-UPSTREAM https://github.com/LibreOffice/core/commit/f14b83b38d35a585976ef5d422754d8e0d0266a6 ucp: fix call to getComponentContext
Patch4: use-comphelper.patch Patch4: use-comphelper.patch
# Bug 1174465 - LO-L3: Impress in TW (7.0.0.0-beta2) messes up bullet points # PATCH-FIX-UPSTREAM https://github.com/LibreOffice/core/commit/9fed7b07af44792012028eb57900640a5ee833cb tdf#141930 document set as unmodified if editengine didn't modify on keyevent
Patch11: bsc1174465.diff Patch5: bsc1184961.patch
# Bug 1181644 - LO-L3: Text changes are reproducibly lost (PPTX, SmartArt) # Build with java 8
Patch12: bsc1181644.diff Patch101: 0001-Revert-java-9-changes.patch
# Bug 1176547 - Image shown with different aspect ratio (and different clipping), some colored instead of grey, one horizontally mirrored
Patch13: bsc1176547_1.diff
Patch14: bsc1176547_2.diff
# try to save space by using hardlinks # try to save space by using hardlinks
Patch990: install-with-hardlinks.diff Patch990: install-with-hardlinks.diff
# save time by relying on rpm check rather than doing stupid find+grep # save time by relying on rpm check rather than doing stupid find+grep
@ -135,12 +132,8 @@ BuildRequires: google-carlito-fonts
BuildRequires: gperf >= 3.1 BuildRequires: gperf >= 3.1
BuildRequires: graphviz BuildRequires: graphviz
BuildRequires: hyphen-devel BuildRequires: hyphen-devel
# genbrk binary is required
BuildRequires: icu
BuildRequires: java-devel >= 9.0
BuildRequires: junit4 BuildRequires: junit4
BuildRequires: libbase BuildRequires: libbase
BuildRequires: libbox2d-devel
BuildRequires: libcppunit-devel >= 1.14.0 BuildRequires: libcppunit-devel >= 1.14.0
BuildRequires: liberation-fonts BuildRequires: liberation-fonts
BuildRequires: libexif BuildRequires: libexif
@ -183,10 +176,10 @@ BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(graphite2) >= 0.9.3 BuildRequires: pkgconfig(graphite2) >= 0.9.3
BuildRequires: pkgconfig(gssrpc) BuildRequires: pkgconfig(gssrpc)
BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.18
BuildRequires: pkgconfig(harfbuzz) >= 0.9.42 BuildRequires: pkgconfig(harfbuzz) >= 0.9.42
BuildRequires: pkgconfig(harfbuzz-icu) >= 0.9.42 BuildRequires: pkgconfig(harfbuzz-icu) >= 0.9.42
BuildRequires: pkgconfig(hunspell) BuildRequires: pkgconfig(hunspell)
BuildRequires: pkgconfig(icu-i18n)
BuildRequires: pkgconfig(krb5) BuildRequires: pkgconfig(krb5)
BuildRequires: pkgconfig(lcms2) BuildRequires: pkgconfig(lcms2)
BuildRequires: pkgconfig(libabw-0.1) BuildRequires: pkgconfig(libabw-0.1)
@ -239,6 +232,7 @@ Requires: libreoffice-l10n-en = %{version}
Requires: python3 Requires: python3
Recommends: dejavu-fonts Recommends: dejavu-fonts
Recommends: google-carlito-fonts Recommends: google-carlito-fonts
Recommends: (libreoffice-qt5 if lxqt-session)
Provides: %{name}-draw-extensions = %{version} Provides: %{name}-draw-extensions = %{version}
Obsoletes: %{name}-draw-extensions < %{version} Obsoletes: %{name}-draw-extensions < %{version}
Provides: %{name}-impress-extensions = %{version} Provides: %{name}-impress-extensions = %{version}
@ -258,34 +252,45 @@ Obsoletes: %{name}-icon-theme-crystal < %{version}
Provides: %{name}-icon-theme-oxygen = %{version} Provides: %{name}-icon-theme-oxygen = %{version}
Obsoletes: %{name}-icon-theme-oxygen < %{version} Obsoletes: %{name}-icon-theme-oxygen < %{version}
ExclusiveArch: aarch64 %{ix86} x86_64 ppc64le ExclusiveArch: aarch64 %{ix86} x86_64 ppc64le
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} < 1500
BuildRequires: libmariadb-devel # Too old boost on the system
%else Source2020: %{external_url}/boost_1_71_0.tar.xz
BuildRequires: libmysqlclient-devel # Too old icu on the system
%endif Source2021: %{external_url}/icu4c-68_1-src.tgz
%if %{?suse_version} >= 1500 Source2022: %{external_url}/icu4c-68_1-data.zip
BuildRequires: gcc >= 7
BuildRequires: gcc-c++ >= 7
%else
BuildRequires: gcc7 BuildRequires: gcc7
BuildRequires: gcc7-c++ BuildRequires: gcc7-c++
%endif BuildRequires: java-devel >= 1.8
%if 0%{?suse_version} < 1500 BuildRequires: libBox2D-devel
BuildRequires: libmysqlclient-devel
BuildConflicts: java < 1.8
BuildConflicts: java >= 9
BuildConflicts: java-devel < 1.8
BuildConflicts: java-devel >= 9
BuildConflicts: java-headless < 1.8
BuildConflicts: java-headless >= 9
Requires(post): update-desktop-files Requires(post): update-desktop-files
Requires(postun): update-desktop-files Requires(postun):update-desktop-files
%endif %else
BuildRequires: pkgconfig(gtk+-3.0) >= 3.18 BuildRequires: gcc >= 7
%if %{with system_gpgme} BuildRequires: gcc-c++ >= 7
BuildRequires: libgpgmepp-devel
%endif
%if 0%{?suse_version} > 1325
BuildRequires: libboost_date_time-devel BuildRequires: libboost_date_time-devel
BuildRequires: libboost_filesystem-devel BuildRequires: libboost_filesystem-devel
BuildRequires: libboost_iostreams-devel BuildRequires: libboost_iostreams-devel
BuildRequires: libboost_locale-devel BuildRequires: libboost_locale-devel
BuildRequires: libboost_system-devel BuildRequires: libboost_system-devel
%else # genbrk binary is required
BuildRequires: boost-devel BuildRequires: icu
BuildRequires: java-devel >= 9
BuildRequires: libbox2d-devel
BuildRequires: libmariadb-devel
BuildRequires: pkgconfig(icu-i18n)
BuildConflicts: java < 9
BuildConflicts: java-devel < 9
BuildConflicts: java-headless < 9
%endif
%if %{with system_gpgme}
BuildRequires: libgpgmepp-devel
%endif %endif
%if %{with firebird} %if %{with firebird}
BuildRequires: pkgconfig(fbclient) BuildRequires: pkgconfig(fbclient)
@ -356,7 +361,7 @@ This package includes the original branding for the LibreOffice office suite.
Summary: LibreOffice Icon Themes Summary: LibreOffice Icon Themes
Group: Productivity/Office/Suite Group: Productivity/Office/Suite
Requires(post): %{name}-share-linker Requires(post): %{name}-share-linker
Requires(postun): %{name}-share-linker Requires(postun):%{name}-share-linker
Supplements: libreoffice Supplements: libreoffice
Provides: %{name}-icon-theme-breeze = %{version} Provides: %{name}-icon-theme-breeze = %{version}
Obsoletes: %{name}-icon-theme-breeze < %{version} Obsoletes: %{name}-icon-theme-breeze < %{version}
@ -967,10 +972,10 @@ Provides %{langname} translations and additional resources (help files, etc.) fo
%patch2 %patch2
%patch3 %patch3
%patch4 -p1 %patch4 -p1
%patch11 -p1 %patch5 -p1
%patch12 -p1 %if 0%{?suse_version} < 1500
%patch13 -p1 %patch101 -p1
%patch14 -p1 %endif
%patch990 -p1 %patch990 -p1
%patch991 -p1 %patch991 -p1
@ -998,11 +1003,6 @@ sed -i -e /CppunitTest_sc_financial_functions_test/d sc/Module_sc.mk # https://b
sed -i -e /CppunitTest_sc_statistical_functions_test/d sc/Module_sc.mk sed -i -e /CppunitTest_sc_statistical_functions_test/d sc/Module_sc.mk
%endif %endif
%if 0%{?suse_version} < 1500
# Header-only libboost_system is not available
find -name \*.mk -exec sed -i s,-DBOOST_ERROR_CODE_HEADER_ONLY,, {} \;
%endif
# Do not generate doxygen timestamp # Do not generate doxygen timestamp
echo "HTML_TIMESTAMP = NO" >> odk/docs/cpp/Doxyfile echo "HTML_TIMESTAMP = NO" >> odk/docs/cpp/Doxyfile
echo "HTML_TIMESTAMP = NO" >> odk/docs/idl/Doxyfile echo "HTML_TIMESTAMP = NO" >> odk/docs/idl/Doxyfile
@ -1109,6 +1109,10 @@ export NOCONFIGURE=yes
--enable-firebird-sdbc \ --enable-firebird-sdbc \
%else %else
--disable-firebird-sdbc \ --disable-firebird-sdbc \
%endif
%if 0%{?suse_version} < 1500
--without-system-boost \
--without-system-icu \
%endif %endif
--enable-evolution2 \ --enable-evolution2 \
--enable-dbus \ --enable-dbus \
@ -1125,7 +1129,7 @@ export NOCONFIGURE=yes
--enable-symbols \ --enable-symbols \
--with-gdrive-client-secret="${google_default_client_secret}" \ --with-gdrive-client-secret="${google_default_client_secret}" \
--with-gdrive-client-id="${google_default_client_id}" \ --with-gdrive-client-id="${google_default_client_id}" \
--enable-skia --enable-skia
# no coinormp packages for coinmp # no coinormp packages for coinmp
# just call make here as we added the jobs in configure # just call make here as we added the jobs in configure
@ -1207,7 +1211,7 @@ for i in %{buildroot}%{_libdir}/%{name}/program/resource/*/*/*.mo \
%{buildroot}%{_libdir}/%{name}/share/registry/Langpack-*.xcd \ %{buildroot}%{_libdir}/%{name}/share/registry/Langpack-*.xcd \
%{buildroot}%{_libdir}/%{name}/share/config/images*.zip \ %{buildroot}%{_libdir}/%{name}/share/config/images*.zip \
%{buildroot}%{_libdir}/%{name}/share/registry/{cjk,ctl}_*.xcd \ %{buildroot}%{_libdir}/%{name}/share/registry/{cjk,ctl}_*.xcd \
%{buildroot}%{_libdir}/%{name}/share/registry/ctlseqcheck_*.xcd \ %{buildroot}%{_libdir}/%{name}/share/registry/ctlseqcheck_*.xcd \
%{buildroot}%{_libdir}/%{name}/share/wizards/*.properties \ %{buildroot}%{_libdir}/%{name}/share/wizards/*.properties \
; do ; do
trg="`dirname "$i" | sed 's|%{_libdir}|%{_datadir}|'`" trg="`dirname "$i" | sed 's|%{_libdir}|%{_datadir}|'`"
@ -1268,7 +1272,7 @@ done
pushd %{buildroot}%{_libdir}/%{name}/share/autocorr pushd %{buildroot}%{_libdir}/%{name}/share/autocorr
files="" files=""
for file in acor*.dat; do for file in acor*.dat; do
files="$files $file" files="$files $file"
done done
popd popd
for file in $files; do for file in $files; do